Expose the all-files pre-commit suite as a Ward verb #93

Merged
coilysiren merged 1 commit from restore-all-files-precommit-verb into main 2026-08-12 11:22:16 +00:00
Member

Closes #78.

The catalog hook configuration landed in #87, but no Ward verb ever reached it. That left the repository's advertised validation surface disagreeing with the fleet contract in a small but real way: AGENTS.md told agents to run bare pre-commit run --all-files while every other quality gate routed through ward exec.

What changed

  • .ward/ward.yaml — added pre-commit (pre-commit run --all-files), matching the convention already used by agent-compose and infrastructure: the system binary rather than a uv-managed dependency, since pre-commit is not in this repo's dev extras.
  • .ward/ward.yaml — added pre-commit-install (pre-commit install --hook-type pre-commit --hook-type pre-push).
  • README.md, AGENTS.md — documented both verbs; AGENTS.md no longer advertises the bare invocation.

Why the second verb

A fresh clone has no hooks in .git/hooks, so the commit-time gate silently does not run until somebody installs it — an all-files verb alone does not close that. This is not hypothetical: it is exactly what happened on the clone used for #91/#92 earlier today. The first commit there bypassed the suite entirely, and typos caught a real defect only once the hooks were installed by hand and re-run.

Verification

  • pre-commit run --all-files — every hook passes across all tracked files
  • ward exec pre-commit — same, through the new verb, on a clean tree
  • The #88 and #89 backlogs remain listed excludes in pyproject.toml rather than disabled hooks, so every file not on those lists stays governed

Out of scope, worth a follow-up

.forgejo/workflows/ci.yml does not run the pre-commit suite — its quality job runs ruff, black, mypy, and pytest directly. So the catalog hooks are enforced only at commit time, on clones where somebody ran the install. #78's acceptance criteria do not mention CI, so I have not widened this PR to add the gate, but the validation surface is not fully closed until that happens. Happy to file it separately.

Closes #78. The catalog hook configuration landed in #87, but no Ward verb ever reached it. That left the repository's advertised validation surface disagreeing with the fleet contract in a small but real way: `AGENTS.md` told agents to run bare `pre-commit run --all-files` while every other quality gate routed through `ward exec`. ## What changed - **`.ward/ward.yaml`** — added `pre-commit` (`pre-commit run --all-files`), matching the convention already used by `agent-compose` and `infrastructure`: the system binary rather than a uv-managed dependency, since `pre-commit` is not in this repo's dev extras. - **`.ward/ward.yaml`** — added `pre-commit-install` (`pre-commit install --hook-type pre-commit --hook-type pre-push`). - **`README.md`, `AGENTS.md`** — documented both verbs; `AGENTS.md` no longer advertises the bare invocation. ## Why the second verb A fresh clone has no hooks in `.git/hooks`, so the commit-time gate silently does not run until somebody installs it — an all-files verb alone does not close that. This is not hypothetical: it is exactly what happened on the clone used for #91/#92 earlier today. The first commit there bypassed the suite entirely, and `typos` caught a real defect only once the hooks were installed by hand and re-run. ## Verification - `pre-commit run --all-files` — every hook passes across all tracked files - `ward exec pre-commit` — same, through the new verb, on a clean tree - The #88 and #89 backlogs remain listed `excludes` in `pyproject.toml` rather than disabled hooks, so every file not on those lists stays governed ## Out of scope, worth a follow-up `.forgejo/workflows/ci.yml` does **not** run the pre-commit suite — its `quality` job runs ruff, black, mypy, and pytest directly. So the catalog hooks are enforced only at commit time, on clones where somebody ran the install. #78's acceptance criteria do not mention CI, so I have not widened this PR to add the gate, but the validation surface is not fully closed until that happens. Happy to file it separately.
Expose the all-files pre-commit suite as a Ward verb
All checks were successful
ci / smoke (pull_request) Successful in 8s
ci / quality (pull_request) Successful in 24s
b509efee08
The catalog hook configuration landed in #87, but no Ward verb reached it, so
the repository's advertised validation surface still disagreed with the fleet
contract: AGENTS.md told agents to run bare `pre-commit run --all-files` while
every other gate routed through `ward exec`.

Add `pre-commit` (all files) matching the fleet convention used by
agent-compose and infrastructure - the system binary, not a uv-managed dep,
since pre-commit is not in this repo's dev extras.

Add `pre-commit-install` alongside it. A fresh clone has no hooks in
.git/hooks, so the commit-time gate silently does not run until someone
installs it; the all-files verb alone does not close that gap. Both are
documented in README.md and AGENTS.md.

Verified: `pre-commit run --all-files` passes every hook across all tracked
files, with the #88 and #89 backlog still carried as listed excludes in
pyproject.toml rather than disabled hooks.

closes #78

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!93
No description provided.