Three passages in docs/design/data-model.md no longer match the Store:
- Prune scope: the doc says prune "deletes only completed Tasks older than the cutoff" (and
docs/design/cli-contract.md says "tasks_deleted counts the deleted completed Tasks"), but src/store/maintenance.ts:155-180 deletes (status = 'completed' AND completed_at < ?) OR (status = 'abandoned' AND abandoned_at < ?). The contract even contradicts itself — its crew prune command section correctly says "completed or abandoned", as does the src/cli.ts help text.
- Migration catalogue: the released-migrations narrative covers
1→2 then jumps to 3→4, omitting the released fromVersion: 2, toVersion: 3 migration in src/store/schema.ts:647-755 (the destructive rebuild of tasks/task_events for the abandoned status), even though the doc's own overview mentions what v3 added.
- Actor authority: the Tasks invariants state requeue authority but not abandon/land authority. Code enforces both: land requires creator or reviewer (
src/store/tasks.ts:724-726); abandon requires creator/reviewer or — when both are archived — the active plain operator identity (src/store/tasks.ts:652-660).
Impact: the doc that must move "together" with schema changes understates what a destructive command deletes, skips a released migration's mechanics, and hides a store-level authorization invariant.
Acceptance: the prune passages (data-model.md and the cli-contract.md tasks_deleted line) include abandoned Tasks by abandoned_at; the 2→3 step joins the migration narrative; the abandon/land actor rules (including the operator fallback) join the invariants.
Three passages in
docs/design/data-model.mdno longer match the Store:docs/design/cli-contract.mdsays "tasks_deletedcounts the deleted completed Tasks"), butsrc/store/maintenance.ts:155-180deletes(status = 'completed' AND completed_at < ?) OR (status = 'abandoned' AND abandoned_at < ?). The contract even contradicts itself — itscrew prunecommand section correctly says "completed or abandoned", as does thesrc/cli.tshelp text.1→2then jumps to3→4, omitting the releasedfromVersion: 2, toVersion: 3migration insrc/store/schema.ts:647-755(the destructive rebuild oftasks/task_eventsfor theabandonedstatus), even though the doc's own overview mentions what v3 added.src/store/tasks.ts:724-726); abandon requires creator/reviewer or — when both are archived — the active plainoperatoridentity (src/store/tasks.ts:652-660).Impact: the doc that must move "together" with schema changes understates what a destructive command deletes, skips a released migration's mechanics, and hides a store-level authorization invariant.
Acceptance: the prune passages (data-model.md and the cli-contract.md
tasks_deletedline) include abandoned Tasks byabandoned_at; the 2→3 step joins the migration narrative; the abandon/land actor rules (including the operator fallback) join the invariants.