Files
agentic-dev/docs/work/library-evaluation-policy/07-generator-pre-shipped-traces/_story.md
Danijel Martinek bae4b66fa4 refactor(work): drop date prefixes + move _state.json into _system/
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.
2026-05-14 21:16:51 +02:00

3.1 KiB

id, epic, title, type, status, feature, depends-on, blocks, created, updated
id epic title type status feature depends-on blocks created updated
07-generator-pre-shipped-traces library-evaluation-policy Generator templates — pre-shipped traces for optional core packages technical-story done tooling
01-trace-schema-foundation
2026-05-14T06:52:02+02:00 2026-05-14T19:16:52.691Z

Goal

Update the five optional-core generator templates (events, realtime, audit, trpc, ui) so that when pnpm turbo gen core-package <name> runs, it copies pre-written decision: approved library traces into docs/library-decisions/ for every direct runtime dependency of that core package. Update the corresponding __snapshots__ files so the snapshot tests cover the new trace files.

Why

A developer who scaffolds an optional core via the generator should not immediately face a pre-commit failure for its bundled deps — the generator is the policy-compliant path, so the traces should land by construction. Without pre-shipped traces, the very act of using the generator would trigger the enforcement gate it's supposed to clear.

Done when

  • Each of the five generator templates (turbo/generators/templates/core-package/{events,realtime,audit,trpc,ui}/) contains a docs/library-decisions/ subtree with one .md trace file per direct runtime dependency of that core, dated at generation time (use the template variable for date, or freeze to the scaffold date with a comment), decision: approved, and citing the relevant ADR (events → ADR-015, realtime → ADR-016, audit → ADR-018; trpc and ui cite their closest ADR or null if none).
  • The generator copies these files into the workspace when run.
  • The turbo/generators/__snapshots__/core-package/<name>.snapshot.json files are updated to include the new trace files; pnpm turbo gen core-package events (or any other optional core) passes the existing snapshot test.
  • pnpm lint && pnpm fallow:audit pass.

In scope

  • turbo/generators/templates/core-package/events/ — pre-shipped trace(s).
  • turbo/generators/templates/core-package/realtime/ — pre-shipped trace(s).
  • turbo/generators/templates/core-package/audit/ — pre-shipped trace(s).
  • turbo/generators/templates/core-package/trpc/ — pre-shipped trace(s).
  • turbo/generators/templates/core-package/ui/ — pre-shipped trace(s).
  • Snapshot JSON updates for all five cores.
  • Generator copy logic (if not already handled by the template mechanism).

Out of scope

  • Backfill traces for already-installed optional cores in the live workspace — Story 08.
  • Generator templates for non-core-package generators (feature, event, job, realtime, component) — no runtime deps are emitted by those generators.

Tasks

  • Inventory the direct runtime deps of each of the five optional core generator templates (read each template's package.json); write one approved trace file per dep in the correct generator template subtree with ADR citation; update the five snapshot JSON files to include the new trace file entries; verify pnpm turbo gen core-package events (or equivalent dry-run) matches the updated snapshot; all gates pass on this single commit.