1.9 KiB
1.9 KiB
Scratchpad — RI-4-001 One transitional PRD authority (RI-N3, #1275)
- Objective: single PrdService authority in
@mosaicstack/prdy;mosaic prdyandmission --planbecome thin adapters; mission↔PRD linkage persisted on disk; Markdown export is a labeled generated view (never read back); import is validated/conflict-aware with typed refusals. - Budget: ~35K tokens (card cap). Baselines: prdy build/lint rc=0, 0 tests; mosaic build rc=0 (after root turbo build), lint rc=0, 1548 tests pass; root build rc=0.
- Plan: (1) extend store schema (version, missions linkage) (2) PrdService + typed errors (3) wizard/cli route through service (4) mosaic adapters (5) contract specs both packages (6) gates (7) sabotage control (8) report to /var/tmp/ri-050/ri-4-001-report.md.
- Decisions:
- Linkage lives ON the PRD document (
missionsarray) — one authority file, survives restart, no sidecar sync problems. version= content revision of sections/status (bumped by update/import accept). Linkage writes bumpupdatedAtonly, so ids/versions stay stable for the card's "stable ids/versions" contract.- Mission version marker =
mission.updatedAt(gateway MissionInfo has no numeric version field). - Import reads YAML documents only — never the exported Markdown (keeps the "no code path reads exported Markdown" invariant).
- Import of an existing id with identical core content →
identicalno-op; divergent → typedPrdImportConflictErrorcarrying proposed successor (existing.version + 1, status draft, linkages preserved). Original bytes untouched until explicitacceptSuccessor. requirementIdsdefault[]at the mission command (no requirement selection UI yet) — service accepts ids when a caller has them.
- Linkage lives ON the PRD document (
- Progress log:
- [16:35] baselines captured (see above)
- [in progress] implementation