chore(code-comments): remove enabled=false escape hatch, fix managed-marker false-positive, drop grandfather excludes #200

Closed
opened 2026-06-08 21:51:36 +00:00 by coilysiren · 1 comment
Owner

What

The code-comments check lives here. Cleaning it up across the fleet (catalogue built 2026-06-08, per-repo issues filed in each repo) surfaced three changes the check itself needs.

1. Remove the enabled = false escape hatch for code-comments

No repo sets enabled = false under [tool.agentic-os.code-comments]. The disable path exists but is unused, and Kai does not want code-comments to be silenceable repo-wide. Drop the is_enabled(HOOK_ID) guard in check_code_comments.main() so the check cannot be turned off. Per-path excludes stay as the only escape, scoped to genuinely generated or vendored content.

2. Fix the managed-marker false-positive

scripts/apply-agentic-os-hooks.py writes the block delimiters as comments below content:

  # BEGIN managed by agentic-os/scripts/apply-agentic-os-hooks.py
  ...
  # END managed by agentic-os/scripts/apply-agentic-os-hooks.py

Both lines sit below the first content line of .pre-commit-config.yaml, so the YAML rule (comments only in the top header) flags two violations in every consumer repo. This is the recurring .pre-commit-config.yaml(2) noise seen fleet-wide. It is upstream, not per-repo. Options: emit the markers differently, exclude .pre-commit-config.yaml from the YAML rule, or special-case generator-owned markers.

3. Drop this repo's own grandfather excludes

pyproject.toml carries an 8-entry excludes list for code-comments that hides agentic-os's own 77 YAML violations (.agents/skills/categories.yaml, .coily/coily.yaml, docs/*.yaml, warp/launch_configurations/**, and others). Remove the grandfather entries, keep only genuinely generated paths, and clean what surfaces.

The check walks git ls-files, so checked-in generated or vendored source gets flagged (e.g. generated/ dirs, vendored mod source). Consider teaching the check or its docs a default-skip convention for obvious generated trees, so consumers do not have to enumerate them by hand.

Done when

  • code-comments cannot be disabled via enabled = false
  • a fresh apply-agentic-os-hooks.py run produces a .pre-commit-config.yaml that passes the YAML rule
  • this repo's grandfather excludes are gone and pre-commit run code-comments --all-files passes
## What The `code-comments` check lives here. Cleaning it up across the fleet (catalogue built 2026-06-08, per-repo issues filed in each repo) surfaced three changes the check itself needs. ## 1. Remove the `enabled = false` escape hatch for code-comments No repo sets `enabled = false` under `[tool.agentic-os.code-comments]`. The disable path exists but is unused, and Kai does not want code-comments to be silenceable repo-wide. Drop the `is_enabled(HOOK_ID)` guard in `check_code_comments.main()` so the check cannot be turned off. Per-path `excludes` stay as the only escape, scoped to genuinely generated or vendored content. ## 2. Fix the managed-marker false-positive `scripts/apply-agentic-os-hooks.py` writes the block delimiters as comments below content: ``` # BEGIN managed by agentic-os/scripts/apply-agentic-os-hooks.py ... # END managed by agentic-os/scripts/apply-agentic-os-hooks.py ``` Both lines sit below the first content line of `.pre-commit-config.yaml`, so the YAML rule (comments only in the top header) flags two violations in **every** consumer repo. This is the recurring `.pre-commit-config.yaml(2)` noise seen fleet-wide. It is upstream, not per-repo. Options: emit the markers differently, exclude `.pre-commit-config.yaml` from the YAML rule, or special-case generator-owned markers. ## 3. Drop this repo's own grandfather excludes `pyproject.toml` carries an 8-entry `excludes` list for code-comments that hides agentic-os's own 77 YAML violations (`.agents/skills/categories.yaml`, `.coily/coily.yaml`, `docs/*.yaml`, `warp/launch_configurations/**`, and others). Remove the grandfather entries, keep only genuinely generated paths, and clean what surfaces. ## Related quirk - generated/vendored not skipped The check walks `git ls-files`, so checked-in generated or vendored source gets flagged (e.g. `generated/` dirs, vendored mod source). Consider teaching the check or its docs a default-skip convention for obvious generated trees, so consumers do not have to enumerate them by hand. ## Done when * `code-comments` cannot be disabled via `enabled = false` * a fresh `apply-agentic-os-hooks.py` run produces a `.pre-commit-config.yaml` that passes the YAML rule * this repo's grandfather `excludes` are gone and `pre-commit run code-comments --all-files` passes
Author
Owner

Backlog burndown 2026-06-17: closing low-priority (P3/P4) to bring the open count to a manageable level. Nothing lost — reopen if this resurfaces. Batch tag: burndown-2026-06.

Backlog burndown 2026-06-17: closing low-priority (P3/P4) to bring the open count to a manageable level. Nothing lost — reopen if this resurfaces. Batch tag: `burndown-2026-06`.
coilysiren 2026-06-17 08:23:04 +00:00
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#200
No description provided.