agentic-os keeps its own .pre-commit-config.yaml code-comments exclude after #993 #1181

Open
opened 2026-08-22 21:33:42 +00:00 by coilyco-ops · 0 comments
Member

Split out of #993, which asked the code-comments hook to stop flagging the comments scripts/apply-agentic-os-hooks.py emits into a consumer's .pre-commit-config.yaml.

That fix landed: scan_yaml now skips comment lines inside a # BEGIN managed by ... / # END managed by ... region, so the four consumer repos (infrastructure, deploy, agentic-os-kai, sirens-echo) can drop their whole-file exclude on the next repin sweep.

What it does not close

#993 said the fix "lets all five repos drop the exclude". It does not, and agentic-os is the exception.

This repo authors the generator rather than being stamped by it, so its own .pre-commit-config.yaml carries no markers and is hand-written end to end. Three below-content comments survive:

.pre-commit-config.yaml:195  # At commit-msg it is handed an absolute $GIT_DIR/COMMIT_EDITMSG, whose
.pre-commit-config.yaml:196  # drive colon reads as illegal, so every worktree commit fails.
.pre-commit-config.yaml:204  # Forgejo workflows use GitHub Actions syntax; no exclude split is needed yet.

Each annotates the key directly below it. Moving them to a top header separates them from what they explain, which is the outcome the rule is trying to avoid rather than achieve. So the whole-file exclude stays, and it still over-excludes: nothing else in that file is checked either.

Options

  1. Set yaml_comments_below_content = true for this repo. The dial exists for exactly this case, and agentic-os runs no yaml-strict sorter, so the drift risk the YAML restriction guards against is absent here. Relaxes the rule for every YAML file in the repo, not just this one.
  2. Support a per-file dial rather than a repo-wide one, so the exclude can narrow to the rule that actually needs relaxing.
  3. Leave it. Accept that the authoring repo's own config is unchecked, and record that as deliberate.

Option 1 is cheapest and is the dial's documented purpose. It is worth deciding rather than defaulting, because it moves every YAML file in the repo at once.

Acceptance

.pre-commit-config.yaml leaves [tool.agentic-os.code-comments] excludes, or the entry carries a stated reason for staying that survives the "why not the dial" question.

Split out of #993, which asked the `code-comments` hook to stop flagging the comments `scripts/apply-agentic-os-hooks.py` emits into a consumer's `.pre-commit-config.yaml`. That fix landed: `scan_yaml` now skips comment lines inside a `# BEGIN managed by ...` / `# END managed by ...` region, so the four consumer repos (infrastructure, deploy, agentic-os-kai, sirens-echo) can drop their whole-file exclude on the next repin sweep. ## What it does not close #993 said the fix "lets all five repos drop the exclude". It does not, and agentic-os is the exception. This repo **authors** the generator rather than being stamped by it, so its own `.pre-commit-config.yaml` carries no markers and is hand-written end to end. Three below-content comments survive: ``` .pre-commit-config.yaml:195 # At commit-msg it is handed an absolute $GIT_DIR/COMMIT_EDITMSG, whose .pre-commit-config.yaml:196 # drive colon reads as illegal, so every worktree commit fails. .pre-commit-config.yaml:204 # Forgejo workflows use GitHub Actions syntax; no exclude split is needed yet. ``` Each annotates the key directly below it. Moving them to a top header separates them from what they explain, which is the outcome the rule is trying to avoid rather than achieve. So the whole-file exclude stays, and it still over-excludes: nothing else in that file is checked either. ## Options 1. **Set `yaml_comments_below_content = true`** for this repo. The dial exists for exactly this case, and agentic-os runs no `yaml-strict` sorter, so the drift risk the YAML restriction guards against is absent here. Relaxes the rule for every YAML file in the repo, not just this one. 2. **Support a per-file dial** rather than a repo-wide one, so the exclude can narrow to the rule that actually needs relaxing. 3. **Leave it.** Accept that the authoring repo's own config is unchecked, and record that as deliberate. Option 1 is cheapest and is the dial's documented purpose. It is worth deciding rather than defaulting, because it moves every YAML file in the repo at once. ## Acceptance `.pre-commit-config.yaml` leaves `[tool.agentic-os.code-comments] excludes`, or the entry carries a stated reason for staying that survives the "why not the dial" question.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
coilyco-flight-deck/agentic-os#1181
No description provided.