docs(work): close pre-commit-hooks-v1 epic
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"updated_at": "2026-05-13T05:47:28.219Z",
|
||||
"updated_at": "2026-05-13T05:56:35.878Z",
|
||||
"epics": {
|
||||
"agent-workflow-docs-v1": {
|
||||
"status": "done",
|
||||
@@ -91,6 +91,30 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"pre-commit-hooks-v1": {
|
||||
"status": "done",
|
||||
"title": "Pre-commit hooks v1 — husky + fast conformance gates on commit",
|
||||
"stories": {
|
||||
"01-husky-install": {
|
||||
"status": "done",
|
||||
"title": "Install husky + lint-staged",
|
||||
"ac_total": 3,
|
||||
"ac_completed": 3
|
||||
},
|
||||
"02-pre-commit-hook": {
|
||||
"status": "done",
|
||||
"title": "Pre-commit hook script",
|
||||
"ac_total": 2,
|
||||
"ac_completed": 2
|
||||
},
|
||||
"03-state-sync-guard": {
|
||||
"status": "done",
|
||||
"title": "State-sync guard + tests",
|
||||
"ac_total": 4,
|
||||
"ac_completed": 4
|
||||
}
|
||||
}
|
||||
},
|
||||
"work-system-v1": {
|
||||
"status": "done",
|
||||
"title": "Work system v1 (MVP) — state tracking + pnpm work CLI",
|
||||
|
||||
@@ -3,23 +3,26 @@ id: 01-husky-install
|
||||
epic: pre-commit-hooks-v1
|
||||
title: Install husky + lint-staged
|
||||
type: technical-story
|
||||
status: in-progress
|
||||
status: done
|
||||
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/`
|
||||
|
||||
- [x] Story scaffold
|
||||
- [x] Install husky + lint-staged + add scripts/config
|
||||
- [x] Verify `pnpm install` initialises `.husky/`
|
||||
|
||||
@@ -3,12 +3,13 @@ id: 02-pre-commit-hook
|
||||
epic: pre-commit-hooks-v1
|
||||
title: Pre-commit hook script
|
||||
type: technical-story
|
||||
status: todo
|
||||
status: done
|
||||
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
|
||||
|
||||
- [x] `.husky/pre-commit` runs lint-staged
|
||||
- [x] Pre-commit also regenerates \_state.json when docs/work/ changes and re-stages it
|
||||
|
||||
@@ -3,14 +3,15 @@ id: 03-state-sync-guard
|
||||
epic: pre-commit-hooks-v1
|
||||
title: State-sync guard + tests
|
||||
type: technical-story
|
||||
status: todo
|
||||
status: done
|
||||
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
|
||||
|
||||
- [x] `scripts/work/state-sync-guard.mjs` fails when \_state.json differs from rebuild output
|
||||
- [x] Tests
|
||||
- [x] Wire into pre-commit
|
||||
- [x] Final verification + closeout
|
||||
|
||||
@@ -3,22 +3,25 @@ id: pre-commit-hooks-v1
|
||||
prd: null
|
||||
title: Pre-commit hooks v1 — husky + fast conformance gates on commit
|
||||
type: epic
|
||||
status: in-progress
|
||||
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
|
||||
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)
|
||||
|
||||
- [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)
|
||||
|
||||
Reference in New Issue
Block a user