Convention shift: epic folders + PRD filenames + frontmatter id
fields are now bare slugs. The created: timestamp (Phase 2) carries
the date; folder names don't repeat it. A future <task-id>-<slug>
shape (e.g. ClickUp) lands cleanly when that integration ships.
Renames (git mv preserves history):
- docs/work/2026-05-13-binder-wrap-helper/
-> docs/work/binder-wrap-helper/
- docs/work/2026-05-14-library-evaluation-policy/
-> docs/work/library-evaluation-policy/
- docs/work/2026-05-14-ci-security-and-supply-chain/
-> docs/work/ci-security-and-supply-chain/
- docs/work/prds/2026-05-13-binder-wrap-helper.prd.md
-> docs/work/prds/binder-wrap-helper.prd.md
- docs/work/prds/2026-05-13-coverage-architecture.prd.md
-> docs/work/prds/coverage-architecture.prd.md
- docs/work/prds/2026-05-14-library-evaluation-policy.prd.md
-> docs/work/prds/library-evaluation-policy.prd.md
- docs/work/prds/2026-05-14-ci-security-and-supply-chain.prd.md
-> docs/work/prds/ci-security-and-supply-chain.prd.md
Frontmatter updates inside the renamed files: epic id, epic prd,
story epic, PRD id, PRD builds-on all drop date prefixes.
System folder + state file move:
- New docs/work/_system/ holds framework-managed state.
- docs/work/_state.json -> docs/work/_system/_state.json.
- state-builder.mjs adds _system to SKIP_FOLDERS.
- cli.mjs + state-sync-guard.mjs + .husky/pre-commit point at the
new path.
template-reset-v1 epic deleted entirely (one-off cleanup epic from
the pre-date-convention era; status was already done).
Generator-template updates (so new artifacts ship in the right
shape):
- .sandcastle/decomposer.prompt.md emits bare-slug folder names +
ISO created: timestamp.
- .claude/skills/to-prd/SKILL.md template uses bare-slug filename +
bare-slug id field + ISO created: timestamp.
Doc reference updates: glossary, runbook, agent-first-workflow-
and-conformance, reviewer prompt, ADR-020, ADR-022, ADR-023 all
point at the new paths/slugs.
2.6 KiB
2.6 KiB
id, epic, title, type, status, feature, depends-on, blocks, created, updated
| id | epic | title | type | status | feature | depends-on | blocks | created | updated | |
|---|---|---|---|---|---|---|---|---|---|---|
| 07-gitleaks-precommit | ci-security-and-supply-chain | Gitleaks pre-commit hook | technical-story | done | tooling |
|
2026-05-14T18:59:12+02:00 | 2026-05-14T19:16:52.691Z |
Goal
Add gitleaks protect --staged --redact as a step in .husky/pre-commit and ship a .gitleaks.toml allowlist that covers test-fixture patterns in __seeds__/**, so a commit containing a known secret pattern is blocked locally before it reaches the remote.
Why
Developer accidents (pasting tokens into config, seeding test fixtures with real-looking keys) are the most common secret-leak vector. A pre-commit hook stops the leak at the earliest possible point — before the secret is ever pushed. GitHub native push protection is the second line of defense (documented in Story 09's guide); the hook is the first. The __seeds__/** allowlist prevents false positives from test fixtures that deliberately use token-shaped strings as dummy data.
Done when
.husky/pre-commithas agitleaks protect --staged --redactstep that runs before the existing state-sync guard (or after — order between guards doesn't matter, both must run)..gitleaks.tomlexists at repo root with at minimum one allowlist rule scoping__seeds__/**test fixtures (usingpathsorallowlist.pathsdepending on the gitleaks version).- A smoke test (bash script or vitest) pipes a staged commit containing a Stripe-style test key (
sk_test_...) through the hook and asserts non-zero exit code. The smoke test is documented in the story's Done-when but may live as a manual verification step given gitleaks requires a binary; include instructions indocs/guides/ci-security.md(Story 09) for consumers to verify locally. pnpm typecheck && pnpm lint && pnpm test && pnpm conformance && pnpm fallow:audit && pnpm coverage:diffall pass.
In scope
.husky/pre-commit— newgitleaksstep..gitleaks.toml— allowlist config.
Out of scope
- Installing
gitleaksas a project devDependency — consumers install it via their OS package manager orbrew; the hook exits gracefully with a warning ifgitleaksis not found in$PATH(to avoid blocking developers who haven't installed it yet, while still enforcing for those who have). - GitHub native push protection configuration — consumer-facing instruction deferred to Story 09's guide.
Tasks
- Add
gitleaks protect --staged --redactstep to.husky/pre-commit(exit-gracefully ifgitleaksnot in$PATH); create.gitleaks.tomlat repo root with__seeds__/**allowlist for test-fixture patterns; one commit, all gates pass.