33 lines
1.9 KiB
Markdown
33 lines
1.9 KiB
Markdown
# Scratchpad — RI-4-001 One transitional PRD authority (RI-N3, #1275)
|
|
|
|
- Objective: single PrdService authority in `@mosaicstack/prdy`; `mosaic prdy` and
|
|
`mission --plan` become 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 (`missions` array) — one authority file,
|
|
survives restart, no sidecar sync problems.
|
|
- `version` = content revision of sections/status (bumped by update/import
|
|
accept). Linkage writes bump `updatedAt` only, 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 → `identical` no-op;
|
|
divergent → typed `PrdImportConflictError` carrying proposed successor
|
|
(existing.version + 1, status draft, linkages preserved). Original bytes
|
|
untouched until explicit `acceptSuccessor`.
|
|
- `requirementIds` default `[]` at the mission command (no requirement
|
|
selection UI yet) — service accepts ids when a caller has them.
|
|
- Progress log:
|
|
- [16:35] baselines captured (see above)
|
|
- [in progress] implementation
|