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.
3.7 KiB
id, epic, title, type, status, feature, depends-on, blocks, created, updated
| id | epic | title | type | status | feature | depends-on | blocks | created | updated | ||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 04-major-bump-reevaluation | ci-security-and-supply-chain | Major-bump re-evaluation flow | technical-story | done | scripts |
|
|
2026-05-14T18:59:12+02:00 | 2026-05-14T19:16:52.691Z |
Goal
Extend scripts/library-decisions/check.mjs with a major-bump detection mode: when invoked on a Renovate PR, parse the lockfile diff to find bumped deps, classify each as major/minor/patch, and for any feature- or core-tier major bump require the trace's lastRevalidated field to be fresh (set today); exit non-zero with a pointer to the evaluate-library skill if not.
Why
ADR-022 closes the adoption-time gate; ADR-023 closes the drift gate for major-version changes. A Renovate PR that bumps @sentry/node from 7.x → 8.x is effectively a new adoption decision — the original trace may have evaluated a very different API surface and risk profile. Requiring a fresh lastRevalidated ensures the trace is re-walked before the bump merges. Minor and patch bumps don't trigger re-evaluation (backwards-compatible by semver contract).
External dependency: library-evaluation epic story 02 (pre-commit check script) must be complete — scripts/library-decisions/check.mjs must exist. That epic is marked done.
Done when
check.mjshas a new mode (invocable asnode scripts/library-decisions/check.mjs --renovate-pr) that:- Detects Renovate PRs via
renovate/branch prefix (fromGITHUB_HEAD_REFor--brancharg). - Parses the lockfile diff (from
git diff origin/main -- pnpm-lock.yamlor a--diffarg) to extract bumped deps with from/to versions. - Classifies each bump as major / minor / patch using semver comparison.
- For each feature- or core-tier major bump: reads the corresponding trace from
docs/library-decisions/, checkslastRevalidatedequals today's ISO date. If not fresh, exits non-zero with a message referencing theevaluate-libraryskill and the trace path. - App-tier deps: pass unconditionally (ADR-022 exemption).
- Non-Renovate branch: pass unconditionally (the rule is scoped to Renovate PRs only).
- Multiple bumps in one PR: validated per-dep independently (PRD Q3).
- Detects Renovate PRs via
- Integration tests in
check.test.mjs(or equivalent) cover: minor bump on feature-tier dep → pass; major bump + freshlastRevalidated→ pass; major bump + stalelastRevalidated→ fail with clear pointer; major bump on app-tier dep → pass; patch bump in Renovate branch → pass; non-Renovate branch with major bump → pass. pnpm typecheck && pnpm lint && pnpm test && pnpm conformance && pnpm fallow:audit && pnpm coverage:diffall pass.
In scope
scripts/library-decisions/check.mjs— new--renovate-prmode only; existing modes unchanged.scripts/library-decisions/check.test.mjs— integration tests for the new mode (use fixture trace files + fixture lockfile diffs; no network calls).
Out of scope
- Auto-closing
library-policy/re-evaluationissues whenlastRevalidatedis refreshed — Story 05 (revalidation cron) handles this. - The CI step that invokes this check on Renovate PRs — the script is the unit; wiring it into CI workflows is part of Story 09's guide and/or the reviewer prompt in Story 08.
Tasks
- Extend
scripts/library-decisions/check.mjswith a--renovate-prmode: detect Renovate branch prefix, parse lockfile diff for bumped deps, classify semver deltas, require freshlastRevalidatedon feature/core-tier major bumps (fail withevaluate-librarypointer if stale), pass app-tier + non-Renovate + minor/patch unconditionally; write integration tests incheck.test.mjswith fixture trace files and lockfile diffs covering all six cases; one commit, all gates pass.