diff --git a/HARNESS.md b/HARNESS.md index dd9491d..6aece25 100644 --- a/HARNESS.md +++ b/HARNESS.md @@ -255,7 +255,10 @@ that describe it, in the same change.** with `git config core.hooksPath scripts/hooks`. `--no-verify` bypasses it, and the commit body should say why. The hook also regenerates `harness/surface.md` and stages it, so a generated file is never something you have to remember — and it refuses a commit with unstaged `.go` changes, because what it - generated describes the working tree rather than what you are committing. + generated describes the working tree rather than what you are committing. It carries **no file + extension**, so a repo-wide sweep filtered by `--include='*.sh'` walks straight past it: ADR-0082's + rename left it staging a path that no longer existed, and the failure surfaced as a `fatal:` from inside + a commit that otherwise succeeded. When renaming anything the gate names, grep without an include filter. - `harness/decisions.md` registers every ADR number ever used, entries and withdrawals alike, so a citation can resolve to a decision or to a deferral but never to nothing. - `./scripts/verify.sh --list` names every gate that exists. A doc claiming enforcement is checkable diff --git a/scripts/hooks/pre-commit b/scripts/hooks/pre-commit index 85c8848..ed8540b 100755 --- a/scripts/hooks/pre-commit +++ b/scripts/hooks/pre-commit @@ -14,7 +14,7 @@ cd "$(git rev-parse --show-toplevel)" || exit 1 # Checked before generating, because a staged deletion also breaks the generator. unstaged=$(git diff --name-only -- '*.go') if [ -n "$unstaged" ]; then - printf 'FAIL unstaged .go changes — docs/surface.md would describe code this commit lacks:\n' + printf 'FAIL unstaged .go changes — harness/surface.md would describe code this commit lacks:\n' printf ' %s\n' $unstaged printf ' stage them, stash them, or commit with --no-verify and say why in the body.\n' exit 1 @@ -23,6 +23,6 @@ fi # One generated artifact, so one call. A second one makes this a two-line list; it does not make it a # registry (CLAUDE.md rule 1). ./scripts/surface.sh --write >/dev/null || exit 1 -git add docs/surface.md +git add harness/surface.md exec ./scripts/verify.sh --quiet