docs(work): scaffold pre-commit-hooks-v1 epic + stories
This commit is contained in:
25
docs/work/pre-commit-hooks-v1/01-husky-install/_story.md
Normal file
25
docs/work/pre-commit-hooks-v1/01-husky-install/_story.md
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
id: 01-husky-install
|
||||
epic: pre-commit-hooks-v1
|
||||
title: Install husky + lint-staged
|
||||
type: technical-story
|
||||
status: in-progress
|
||||
feature: tooling
|
||||
depends-on: []
|
||||
blocks: [02-pre-commit-hook]
|
||||
---
|
||||
|
||||
## Goal
|
||||
husky + lint-staged are dependencies of the root workspace and the
|
||||
`prepare` script wires the hooks on `pnpm install`.
|
||||
|
||||
## In scope
|
||||
- Add husky + lint-staged to root devDependencies
|
||||
- Add `prepare` script that runs `husky` (initialises `.husky/`)
|
||||
- Create `.husky/` directory + the husky shim
|
||||
- Add `lint-staged` config to root package.json
|
||||
|
||||
## Tasks
|
||||
- [ ] Story scaffold
|
||||
- [ ] Install husky + lint-staged + add scripts/config
|
||||
- [ ] Verify `pnpm install` initialises `.husky/`
|
||||
14
docs/work/pre-commit-hooks-v1/02-pre-commit-hook/_story.md
Normal file
14
docs/work/pre-commit-hooks-v1/02-pre-commit-hook/_story.md
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
id: 02-pre-commit-hook
|
||||
epic: pre-commit-hooks-v1
|
||||
title: Pre-commit hook script
|
||||
type: technical-story
|
||||
status: todo
|
||||
feature: tooling
|
||||
depends-on: [01-husky-install]
|
||||
blocks: [03-state-sync-guard]
|
||||
---
|
||||
|
||||
## Tasks
|
||||
- [ ] `.husky/pre-commit` runs lint-staged
|
||||
- [ ] Pre-commit also regenerates _state.json when docs/work/ changes and re-stages it
|
||||
16
docs/work/pre-commit-hooks-v1/03-state-sync-guard/_story.md
Normal file
16
docs/work/pre-commit-hooks-v1/03-state-sync-guard/_story.md
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
id: 03-state-sync-guard
|
||||
epic: pre-commit-hooks-v1
|
||||
title: State-sync guard + tests
|
||||
type: technical-story
|
||||
status: todo
|
||||
feature: tooling
|
||||
depends-on: [02-pre-commit-hook]
|
||||
blocks: []
|
||||
---
|
||||
|
||||
## Tasks
|
||||
- [ ] `scripts/work/state-sync-guard.mjs` fails when _state.json differs from rebuild output
|
||||
- [ ] Tests
|
||||
- [ ] Wire into pre-commit
|
||||
- [ ] Final verification + closeout
|
||||
24
docs/work/pre-commit-hooks-v1/_epic.md
Normal file
24
docs/work/pre-commit-hooks-v1/_epic.md
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
id: pre-commit-hooks-v1
|
||||
prd: null
|
||||
title: Pre-commit hooks v1 — husky + fast conformance gates on commit
|
||||
type: epic
|
||||
status: in-progress
|
||||
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
|
||||
- [ ] [01 — Install husky + lint-staged](01-husky-install/_story.md)
|
||||
- [ ] [02 — Pre-commit hook: lint-staged + state-sync](02-pre-commit-hook/_story.md)
|
||||
- [ ] [03 — State-sync guard script + tests](03-state-sync-guard/_story.md)
|
||||
Reference in New Issue
Block a user