Skip to content

v1.2: Pre-commit Git Hook

Choose a tag to compare

@teelr teelr released this 19 May 19:19
· 116 commits to main since this release
f591534

Universal opt-in pre-commit hook converting the /gate-fast-before-commit rule from documentation to mechanical enforcement.

  • shell/git-hooks/pre-commit — looks for scripts/gate_fast.sh at the repo root; no-ops where absent, refuses commits on FAIL otherwise. Bypass via SKIP_GATE_FAST=1 for WIP on private branches.
  • New install.sh git-hooks category symlinks the hook into ~/.claude/git-hooks/. Opt-in per-repo activation via git config core.hooksPath ~/.claude/git-hooks.
  • Symmetric verify.sh extension; uninstall.sh unchanged (generic scan already captures the new symlink).
  • 5-assertion tests/git-hooks/ suite covers the cross product of (no-gate / passing / failing) × (default env / SKIP_GATE_FAST=1) plus install integration. Gate climbs 153 → 158 PASS.

Scope-narrowed from initial 3-Phase v1.2 proposal — v0.4's other deferred items (gate_full.sh per-template builds, perf benchmarks) stay deferred per the "defer until evidence" ruling; no lessons.md entry reports either gap biting.