···11-# Installed by `make pre-commit`. Keep the rev pinned to the ruff version in
22-# uv.lock so local and hook ruff stay aligned; bump both together on `make update`.
33-repos:
44- - repo: https://github.com/astral-sh/ruff-pre-commit
55- rev: v0.15.2
66- hooks:
77- - id: ruff-format
88- args: [--check]
99- - id: ruff-check
+1-10
AGENTS.md
···145145146146| Target | When to use |
147147|--------|-------------|
148148-| `make pre-commit` | Run once after cloning to install the ruff format/lint git hook. |
148148+| `make pre-commit` | Install pre-commit hooks (optional; most coders rely on `make ci` directly). |
149149| `make versions` | Print versions of Python, uv, and key deps. Diagnostic. |
150150151151### Don't use
···273273- Run `make ci` before every commit.
274274- Run `git` commands directly — not `git -C` — you're already in the repo.
275275- Don't commit runtime artifacts written under `tests/fixtures/journal/` by `make dev` / `make sandbox` (`.gitignore` covers them; verify with `git status` anyway).
276276-277277-### Drift prevention
278278-279279-Two gates keep the tree format-clean and lint-clean:
280280-281281-1. `make test` depends on `format-check` (Makefile:303-309); `make ci` adds `ruff check` and the layer/rename gates. Both block locally.
282282-2. `.pre-commit-config.yaml` wires the same `ruff format --check` + `ruff check` into a git pre-commit hook. Run `make pre-commit` once after cloning to install it.
283283-284284-When the hook rejects a commit, run `make format` and re-stage. Do not bypass with `--no-verify` — that re-opens the drift the hook exists to catch.
285276286277## 11. Where to go deeper
287278