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.
4.3 KiB
id, epic, title, type, status, feature, depends-on, blocks, created, updated
| id | epic | title | type | status | feature | depends-on | blocks | created | updated | |||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 05-trace-revalidation-workflow | ci-security-and-supply-chain | Trace revalidation workflow | technical-story | done | scripts |
|
|
2026-05-14T18:59:12+02:00 | 2026-05-14T19:16:52.691Z |
Goal
Write scripts/library-decisions/revalidate.mjs — a script that walks every approved + pre-shipped trace, re-runs each trace's verification-commands, classifies divergence as soft or hard, and opens/updates/closes GitHub issues accordingly — then wire it into .github/workflows/trace-revalidation-weekly.yml (weekly cron + workflow_dispatch).
Why
ADR-022 traces go stale silently when new CVEs drop or Socket picks up behavioral changes in a package post-adoption. A weekly automated revalidation creates a feedback loop: soft divergence (minor drift) surfaces as a rolling dashboard issue; hard divergence (a re-evaluation is warranted) surfaces as a per-dep library-policy/re-evaluation issue with the trace path + finding + re-walk handoff. No auto-edit of traces and no CI gating on main — the workflow runs in parallel, not on the critical path.
External dependency: library-evaluation epic story 02 (pre-commit check script) must be complete — check.mjs and the docs/library-decisions/ fixture patterns are the prior art this script mirrors.
Done when
scripts/library-decisions/revalidate.mjswalks all traces indocs/library-decisions/whosedecisionfield isacceptedorpre-shipped; for each trace, re-runs itsverification-commands; classifies divergence (soft: minor discrepancy from expected output; hard: finding that would change the evaluation decision); opens a rollinglibrary-policy/dashboard-labeled issue for soft divergence (creates or updates a single issue); opens alibrary-policy/re-evaluation-labeled per-dep issue for hard divergence with titlere-evaluate: <package>@<version> — <finding>, trace path, andevaluate-libraryre-walk pointer; closes openlibrary-policy/re-evaluationissues whose dep has since hadlastRevalidatedrefreshed; skips rejected traces entirely.- Integration tests use a fixture trace directory (no real
ghCLI / no network): no-drift trace → no issue; soft-drift trace → dashboard issue created; hard-drift trace → per-dep issue with correct labels + title format; open per-dep issue already exists → no duplicate opened;lastRevalidatedrefreshed → open issue closed with comment. .github/workflows/trace-revalidation-weekly.ymltriggers onschedule: - cron: "30 6 * * 1"andworkflow_dispatch; job steps: checkout,pnpm install --frozen-lockfile,node scripts/library-decisions/revalidate.mjs; permissions:issues: write,contents: read(NOcontents: write).pnpm typecheck && pnpm lint && pnpm test && pnpm conformance && pnpm fallow:audit && pnpm coverage:diffall pass.
In scope
scripts/library-decisions/revalidate.mjs— the revalidation script.scripts/library-decisions/revalidate.test.mjs— integration tests with fixture directory and mockedghCLI surface..github/workflows/trace-revalidation-weekly.yml— the workflow file.
Out of scope
- Auto-editing trace files — explicitly forbidden (no
contents: write). - Auto-dispatching on
library-policy/re-evaluationissues — human triage required (PRD out of scope). - CI gating on main from this workflow — main keeps deploying; revalidation runs in parallel.
Tasks
- Write
scripts/library-decisions/revalidate.mjs(walk approved+pre-shipped traces, re-runverification-commands, classify soft/hard divergence, open/update/close issues viaghCLI; mock-friendlyghsurface for tests); writerevalidate.test.mjsintegration tests with fixture traces covering: no-drift, soft-drift (dashboard issue), hard-drift (per-dep issue with correct labels+title), duplicate-issue guard, stale-issue close on refreshedlastRevalidated, rejected-trace skip; one commit, all gates pass. - Create
.github/workflows/trace-revalidation-weekly.yml(trigger:schedule: cron: "30 6 * * 1"+workflow_dispatch; steps: checkout,pnpm install --frozen-lockfile,node scripts/library-decisions/revalidate.mjs; permissions:issues: write,contents: read); one commit, all gates pass.