Files
agentic-dev/docs/work/epics/library-evaluation-policy/08-backfill-traces/_story.md
Danijel Martinek 756e36c720 refactor(work): move epic folders into docs/work/epics/
The previous layout placed epic folders directly under docs/work/
alongside prds/ and _system/. Tightening: epics now live in their
own docs/work/epics/ subfolder, peer to prds/ and _system/. Same
shape as the existing prds/ bucket.

Final docs/work/ layout:
  README.md
  prds/<slug>.prd.md
  _system/_state.json
  epics/<slug>/_epic.md + <story-folder>/_story.md

Renames (git mv preserves history):
- docs/work/binder-wrap-helper/
    -> docs/work/epics/binder-wrap-helper/
- docs/work/library-evaluation-policy/
    -> docs/work/epics/library-evaluation-policy/
- docs/work/ci-security-and-supply-chain/
    -> docs/work/epics/ci-security-and-supply-chain/

Tooling updates:
- state-builder.mjs walks workRoot/epics/ directly; SKIP_FOLDERS
  obsoleted (no more sibling folders to filter out).
- dispatch.mjs's findNextTask, tickStoryBulletInEpic, and
  flipEpicDoneIfAllStoriesDone all join with "epics" segment.
- prd-ship.mjs's deriveShippingCommits walks workRoot/epics/ and
  git-logs docs/work/epics/<epic>/.
- decomposer.prompt.md emits epics under docs/work/epics/<epic-id>/.
- handoff + grill-with-docs glossary references updated.
- Glossary entry for Epic updated.

Reserved future shape: when a task-tracker integration (ClickUp,
Linear) ships, the epics/ subfolder hosts <task-id>-<slug>/
folders. Today it just hosts bare slugs.
2026-05-14 21:21:51 +02:00

3.2 KiB

id, epic, title, type, status, feature, depends-on, blocks, created, updated
id epic title type status feature depends-on blocks created updated
08-backfill-traces library-evaluation-policy Backfill library traces for existing feature- and core-tier runtime deps technical-story done docs
01-trace-schema-foundation
2026-05-14T06:52:02+02:00 2026-05-14T19:21:52.308Z

Goal

Write approved library trace files dated 2026-05-14 in docs/library-decisions/ for every existing runtime dependency in feature- and core-tier packages, grouped by ADR provenance into four commits. No package.json is changed; these commits are pure trace-file additions.

Why

Without backfill, every existing dep becomes a pre-commit-hook failure the first time someone touches a package.json — the enforcement gate would fire retroactively. Backfill establishes the baseline so the gate is additive (new deps require traces) rather than disruptive (old deps fail immediately). Grouping by ADR cluster makes the commit history readable and keeps each commit focused on a coherent rationale.

Done when

  • All runtime deps in packages/ (feature- and core-tier) have a corresponding docs/library-decisions/YYYY-MM-DD-<name>.md with decision: approved, date: 2026-05-14, and the relevant adr citation (or null for un-cited deps).
  • Four commits land, one per cluster:
    • ADR-002 cluster: inversify, reflect-metadata.
    • ADR-014 cluster: @sentry/node, @sentry/nextjs, @sentry/react, and any other Sentry packages present.
    • ADR-017 cluster: @opentelemetry/api, @opentelemetry/sdk-node, and any other OTel packages present.
    • Un-cited cluster: payload, @trpc/server, zod, superjson, and any remaining runtime deps not covered by an ADR.
  • All trace files pass validateTrace() from schema.mjs (Story 01).
  • pnpm lint && pnpm fallow:audit pass after all four commits.

In scope

  • docs/library-decisions/<date>-<name>.md trace files — one per dep.
  • Four conventional commits: chore(deps): backfill library traces for <cluster>.

Out of scope

  • Deps in apps/* — app-tier is out of scope per the PRD.
  • devDeps in any tier — exempt from traces.
  • Changing any package.json — backfill is trace-only.
  • Optional core packages not yet installed in the workspace — covered by Story 07 (generator pre-shipped traces) when they are scaffolded.

Tasks

  • Inventory all runtime deps in packages/ (run jq '.dependencies // {} | keys' packages/*/package.json packages/core-*/package.json or equivalent); write approved trace files for the ADR-002 cluster (inversify, reflect-metadata) in docs/library-decisions/; commit as chore(deps): backfill library traces for ADR-002 cluster.
  • Write approved trace files for the ADR-014 cluster (Sentry packages); commit as chore(deps): backfill library traces for ADR-014 cluster.
  • Write approved trace files for the ADR-017 cluster (OpenTelemetry packages); commit as chore(deps): backfill library traces for ADR-017 cluster.
  • Write approved trace files for the un-cited cluster (payload, @trpc/server, zod, superjson, and any remaining runtime deps); commit as chore(deps): backfill library traces for un-cited cluster; all gates pass after this final commit.