---
id: pre-commit-hooks-v1
prd: null
title: Pre-commit hooks v1 — husky + fast conformance gates on commit
type: epic
status: done
features: [tooling]
created: 2026-05-13
---

## Goal

Install husky and wire pre-commit hooks that catch the cheap drift classes
before code leaves the developer's machine. Slow checks stay in CI.

## Why

Slip a manifest update without re-running `pnpm work rebuild-state` and
the committed \_state.json drifts from markdown reality. Forget to lint
and a broken commit lands. Pre-commit hooks shrink the cycle from "wait
for CI" to "wait one second".

## Stories

- [x] [01 — Install husky + lint-staged](01-husky-install/_story.md)
- [x] [02 — Pre-commit hook: lint-staged + state-sync](02-pre-commit-hook/_story.md)
- [x] [03 — State-sync guard script + tests](03-state-sync-guard/_story.md)
