Skip to content

chore(pre-commit): dogfood the shipped pre-commit gate on the maintainer repo#6

Merged
maybebyte merged 6 commits into
mainfrom
chore/dogfood-precommit
Jul 2, 2026
Merged

chore(pre-commit): dogfood the shipped pre-commit gate on the maintainer repo#6
maybebyte merged 6 commits into
mainfrom
chore/dogfood-precommit

Conversation

@maybebyte

Copy link
Copy Markdown
Owner

Summary

Dogfood the pre-commit gate the template ships, adapted to the maintainer repo's own surface (tests/ only, ruff pinned via uv.lock, a CI-only generation-matrix suite). Closes gap #1 of the dogfooding-gap audit (docs/superpowers/plans/2026-07-01-dogfood-gap-audit.md).

Changes

  • Add .pre-commit-config.yaml: SHA-pinned pre-commit-hooks (check-merge-conflict; eof-fixer / trailing-whitespace excluded on template/), local uv run ruff-check / ruff-format hooks, basedpyright at pre-push, and a forbid-rej copier-conflict guard.
  • Wire it in: pre-commit>=4,<5 dev dep, just setup / just precommit recipes, and an ## Pre-commit section in AGENTS.md. Design + plan committed under docs/superpowers/.

Testing

  • just test — full generation matrix, 70 passed (3m 7s); both pre-commit stages green over the whole tree. Pre-push hooks ran on this branch's push (basedpyright correctly skipped — no .py in the diff).

Notes for reviewers

  • Local-only gate — no CI job added, mirroring the template (downstream just ci never runs pre-commit); the ruff/basedpyright substance stays enforced by the existing lint / typecheck jobs.
  • ruff runs as local uv run hooks (locked 0.15.19) instead of the shipped ruff-pre-commit (0.15.18) to kill version drift. The template's own 0.15.18-vs-0.15.19 mismatch is a real template defect, tracked as follow-up in the design's "Out of scope" section.

maybebyte added 6 commits July 1, 2026 19:46
Reviewed design for wiring pre-commit into the maintainer repo (gap #1 of
the dogfooding-gap audit): a local-only mirror of the shipped config, with
ruff run via local `uv run ruff` hooks (locked 0.15.19, no ruff-pre-commit
drift), the pytest hook dropped (CI matrix is the enforcer), and hygiene hooks
excluding template/. Folds in the adversarial review's amendments (a `setup`
bootstrap recipe, a two-stage `precommit` recipe, and the AGENTS.md section).
Task-by-task plan to implement the pre-commit design (gap #1), with per-step
verification commands and expected output empirically confirmed by a
worktree-isolated dry-run: the four implementation commits land green with a
clean tree. Includes a forbid-rej negative check and corrected pre-push hook
behavior (end-of-file-fixer/trailing-whitespace inherit a pre-push stage).
@maybebyte maybebyte merged commit b3465a8 into main Jul 2, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant