From 4bd77905b2568b2011cded3d428b79caf33fc9f6 Mon Sep 17 00:00:00 2001 From: Justin Bollinger Date: Fri, 20 Feb 2026 21:38:32 -0500 Subject: [PATCH] docs: document prek 0.3.3 config format in CLAUDE.md Note the repos-based TOML schema, correct install command, and the breaking change from the old commands = [...] format. Co-Authored-By: Claude Sonnet 4.6 --- CLAUDE.md | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 74a28c0..839276e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -39,15 +39,32 @@ make coverage ## Git Hooks -Git hooks are managed by [prek](https://github.com/nicholasgasior/prek). Install with: +Git hooks are managed by [prek](https://github.com/j178/prek) (v0.3.3+). Install with: ```bash -prek install +prek install --hook-type pre-push --hook-type post-commit ``` -Hooks defined in `prek.toml`: -- **pre-push**: ruff check, ty check, pytest -- **post-commit**: documentation audit +Hooks are defined in `prek.toml` using the pre-commit local-repo schema (TOML, not YAML): + +```toml +[[repos]] +repo = "local" + +[[repos.hooks]] +id = "ruff" +entry = "uv run ruff check hate_crack" +language = "system" +stages = ["pre-push"] +pass_filenames = false +always_run = true +``` + +Active hooks: +- **pre-push**: ruff, ty, pytest, pytest-lima +- **post-commit**: audit-docs + +**Note**: prek 0.3.3 expects `repos = [...]` at the top level. The old `[hooks.] commands = [...]` format is not supported and will fail with `missing field 'repos'`. ## Documentation Auditing