Adopt the catalog pre-commit suite at aos-precommit-v0.18.0 #90

Merged
coilysiren merged 2 commits from aos/claude/adopt-precommit into main 2026-08-11 01:46:20 +00:00
Member

Closes #87.

This repository shipped no .pre-commit-config.yaml, so no catalog validator had ever run against it. pre-commit run --all-files failed with InvalidConfigError rather than reporting anything.

Adopted at aos-precommit-v0.18.0, the current release. Note that makes agent-proxy the first repo on the newer suite: deploy is still pinned at v0.102.0, which predates typos, actionlint, actions-run-one-line, source-doc-refs, and context-load-points.

The config is generated by the owning tool rather than hand-written, so a future apply-agentic-os-hooks.py run is a no-op instead of a conflict.

Why it was missed

The rollout script selects targets from the on-disk checkout set, and agent-proxy is not resident. It was never a target and nothing reported a gap. Filed at coilyco-flight-deck/agentic-os#991, along with ward-mcp, which is missing it for the same reason.

Fixed to reach green

  • CLAUDE.md bridge so Claude Code loads the shared doctrine.
  • catalog: block in .ward/ward.yaml. No fleet code dependencies, so dependsOn is empty.
  • AGENTS.md restructured onto the ten standard sections. Existing content was redistributed, not rewritten, and nothing was dropped.
  • ## See also cross-links in README.md and docs/FEATURES.md.
  • The ward.yaml field reference now points at ward's doc by URL. It read as a dead local path because that file lives in another repository.
  • .github/actionlint.yaml declaring the docker self-hosted runner label. The rollout script detects that file and adds -config-file itself, so this survives a re-roll.
  • _typos.toml accepting ser. typos splits ser8 and flags the fragment. One entry, and it was the only unique finding across 50 output lines.

The Telegram alert moves into a tracked script

.forgejo/workflows/ci.yml carried the same ~50-line Python body inlined twice, byte-identical. That is exactly the pattern aos-precommit-v0.18.0 added a check for.

It now lives in scripts/telegram_alert.py and both steps call it. The body was decoded out of the workflow programmatically rather than retyped, so it is unchanged apart from a __main__ guard. The follow-up commit formats it, and I compared parsed ASTs before and after to confirm that change is whitespace only.

Three exemptions, and why they are excludes not enabled = false

.pre-commit-config.yaml is permanent: its BEGIN and END markers are generated, and they are how the rollout finds its own block to refresh. Hand-editing them would break idempotency.

The other two are backlog, filed as #88 (nine oversized docs) and #89 (96 comment blocks). Both list specific files, so every file not named stays governed, including all new ones. Entries come off as the work lands.

Those two are not drive-by work. docs/trajectory-contract-v1.md is a versioned contract other services build against, and docs/proxy.md is cited from coilyco-bridge/deploy, so splitting them changes a citation surface this repo cannot see the far side of. The 96 comment blocks are concentrated in app/config.py, app/models.py, and app/resilience.py, where the context-budget arithmetic and fallback policy are explained, and #41 has not yet demonstrated LiteLLM parity, so that reasoning is still load-bearing. The hook asks for those explanations to move into docs/, not to be deleted.

Verification

  • pre-commit run --all-files passes all 26 hooks.
  • ward exec format-check, lint, typecheck, and test all pass. 235 tests.
  • Not run: ward exec test-container, which needs a Docker daemon.

One thing worth knowing for review: pre-commit run --all-files only covers files git already tracks, so three violations in the generated config itself did not surface until the files were staged. Worth remembering when adopting the suite elsewhere.

Closes #87. This repository shipped no `.pre-commit-config.yaml`, so no catalog validator had ever run against it. `pre-commit run --all-files` failed with `InvalidConfigError` rather than reporting anything. Adopted at **`aos-precommit-v0.18.0`**, the current release. Note that makes agent-proxy the first repo on the newer suite: `deploy` is still pinned at `v0.102.0`, which predates `typos`, `actionlint`, `actions-run-one-line`, `source-doc-refs`, and `context-load-points`. The config is generated by the owning tool rather than hand-written, so a future `apply-agentic-os-hooks.py` run is a no-op instead of a conflict. ## Why it was missed The rollout script selects targets from the on-disk checkout set, and agent-proxy is not resident. It was never a target and nothing reported a gap. Filed at coilyco-flight-deck/agentic-os#991, along with `ward-mcp`, which is missing it for the same reason. ## Fixed to reach green * `CLAUDE.md` bridge so Claude Code loads the shared doctrine. * `catalog:` block in `.ward/ward.yaml`. No fleet code dependencies, so `dependsOn` is empty. * `AGENTS.md` restructured onto the ten standard sections. Existing content was redistributed, not rewritten, and nothing was dropped. * `## See also` cross-links in `README.md` and `docs/FEATURES.md`. * The ward.yaml field reference now points at ward's doc by URL. It read as a dead local path because that file lives in another repository. * `.github/actionlint.yaml` declaring the `docker` self-hosted runner label. The rollout script detects that file and adds `-config-file` itself, so this survives a re-roll. * `_typos.toml` accepting `ser`. typos splits `ser8` and flags the fragment. One entry, and it was the only unique finding across 50 output lines. ## The Telegram alert moves into a tracked script `.forgejo/workflows/ci.yml` carried the same ~50-line Python body inlined twice, byte-identical. That is exactly the pattern `aos-precommit-v0.18.0` added a check for. It now lives in `scripts/telegram_alert.py` and both steps call it. **The body was decoded out of the workflow programmatically rather than retyped**, so it is unchanged apart from a `__main__` guard. The follow-up commit formats it, and I compared parsed ASTs before and after to confirm that change is whitespace only. ## Three exemptions, and why they are `excludes` not `enabled = false` `.pre-commit-config.yaml` is **permanent**: its BEGIN and END markers are generated, and they are how the rollout finds its own block to refresh. Hand-editing them would break idempotency. The other two are backlog, filed as #88 (nine oversized docs) and #89 (96 comment blocks). Both list specific files, so **every file not named stays governed, including all new ones**. Entries come off as the work lands. Those two are not drive-by work. `docs/trajectory-contract-v1.md` is a versioned contract other services build against, and `docs/proxy.md` is cited from `coilyco-bridge/deploy`, so splitting them changes a citation surface this repo cannot see the far side of. The 96 comment blocks are concentrated in `app/config.py`, `app/models.py`, and `app/resilience.py`, where the context-budget arithmetic and fallback policy are explained, and #41 has not yet demonstrated LiteLLM parity, so that reasoning is still load-bearing. The hook asks for those explanations to move into `docs/`, not to be deleted. ## Verification * `pre-commit run --all-files` passes all 26 hooks. * `ward exec format-check`, `lint`, `typecheck`, and `test` all pass. 235 tests. * Not run: `ward exec test-container`, which needs a Docker daemon. One thing worth knowing for review: `pre-commit run --all-files` only covers files git already tracks, so three violations in the generated config itself did not surface until the files were staged. Worth remembering when adopting the suite elsewhere.
Closes #87.

This repository shipped no `.pre-commit-config.yaml`, so no catalog
validator had ever run against it. The rollout script selects targets from
the on-disk checkout set and agent-proxy is not resident, so it was never
a target. That gap is filed at coilyco-flight-deck/agentic-os#991.

Config generated by the owning tool rather than hand-written, so a future
`apply-agentic-os-hooks.py` run is a no-op instead of a conflict.

Fixed to reach green:

* `CLAUDE.md` bridge so Claude Code loads the shared doctrine.
* `catalog:` block in `.ward/ward.yaml`, with no fleet code dependencies.
* `AGENTS.md` restructured onto the ten standard sections. Existing
  content was redistributed, not rewritten.
* `## See also` cross-links in `README.md` and `docs/FEATURES.md`.
* The ward.yaml field reference now points at ward's doc by URL. It read
  as a dead local path because the file lives in another repository.
* `.github/actionlint.yaml` declaring the `docker` self-hosted runner
  label. The script detects that file and adds `-config-file` itself.
* `_typos.toml` accepting `ser`, which typos splits out of `ser8`. One
  entry, and it was the only unique finding across 50 output lines.

The Telegram alert moves out of the workflow into
`scripts/telegram_alert.py`. It was the same inlined body twice, and it is
the exact pattern aos-precommit-v0.18.0 added a check for. The body was
decoded from the workflow rather than retyped, so it is unchanged apart
from a `__main__` guard.

Three exemptions in `pyproject.toml`. `.pre-commit-config.yaml` is
permanent, because its BEGIN and END markers are generated and are how the
rollout finds its own block. The other two are backlog, filed as #88 (nine
oversized docs) and #89 (96 comment blocks). Both are `excludes` rather
than `enabled = false`, so every file not named stays governed, including
new ones. Splitting `trajectory-contract-v1.md` and `proxy.md` in
particular changes a citation surface other repositories depend on, so it
wants its own change rather than riding along here.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Kai Siren <coilysiren@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
style: format the extracted telegram alert
All checks were successful
ci / smoke (pull_request) Successful in 6s
ci / quality (pull_request) Successful in 2m53s
e1aaecc109
The inlined workflow body predated this repo's formatter, so lifting it
out verbatim left the only file `ward exec format-check` rejects. Parsed
both versions and compared the ASTs to confirm the change is whitespace
only.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Kai Siren <coilysiren@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
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/agent-proxy!90
No description provided.