docs: introduce library evaluation policy (ADR-022 + PRD)
- ADR-022 codifies the tiered library-evaluation policy: 8 hard auto-reject filters (license, types, maintenance, boundary-fit, shadow-check, EU residency, CVE scan, named consumer), 3 discussion prompts, per-decision trace artifact at docs/library-decisions/, and a 4-layer enforcement stack (Claude PreToolUse/PostToolUse hook -> evaluate-library skill -> pre-commit hook -> sandcastle reviewer prompt). Mirrors the conformance-system latency pattern from ADR-012. - PRD at docs/work/prds/2026-05-14-library-evaluation-policy.prd.md seeds the implementation epic; status: approved, ready for \`pnpm work decompose\`. - Glossary gains "Library trace" + "Pre-shipped trace" entries referenced by both artifacts. Catalyst: the 2026-05-14 grill session nearly adopted trpc-to-openapi + zod-to-json-schema before someone asked who the HTTP consumer was. Honest answer: none -- all callers are TS via createCaller. This policy makes that question structurally unavoidable for any future feature- or core-tier dep.
This commit is contained in:
@@ -296,6 +296,12 @@ A `pnpm turbo gen <kind>` invocation. Generator-first is **non-negotiable** —
|
||||
**Slice = task = PR = commit**:
|
||||
The shipping rhythm. One vertical slice closes one task, becomes one PR, lands as one commit.
|
||||
|
||||
**Library trace**:
|
||||
A per-decision artifact at `docs/library-decisions/<YYYY-MM-DD>-<package-name>.md` recording the outcome of the `evaluate-library` skill against a candidate third-party dependency. Frontmatter is the machine surface (tier, decision, filter-results enum); headings are the human surface (one per filter + one per prompt). Both `decision: approved` and `decision: rejected` traces are first-class — the rejection record is the value, since it stops future agents from re-evaluating the same library. Required for any new runtime dep in a `feature`- or `core`-tagged package; the pre-commit hook blocks the commit if the trace is missing.
|
||||
|
||||
**Pre-shipped trace**:
|
||||
A library trace emitted by `pnpm turbo gen core-package <name>` for each direct runtime dep of a pre-curated optional core. Pre-approved by the template's ADRs (015 events / 016 realtime / 018 audit). Generated alongside the core's frozen snapshot so optional cores satisfy the library-evaluation policy by default.
|
||||
|
||||
## Modes
|
||||
|
||||
**Production mode**:
|
||||
|
||||
Reference in New Issue
Block a user