Date: 2026-06-23 Author: Codex Scope: non-normative migration prep after Phase 2 approval
Phase 3 should move from read-only derived task/status shards toward a controlled live aggregate workflow without weakening Turnfile's human-legible governance boundary.
- Keep current aggregate files authoritative.
- Add per-agent live shard directories under
working-session/agents/<agent>/. - Add schemas for:
status.yamlorstatus.json;task-events.jsonl;- task aggregate conflicts;
- participant registry entries.
- Add a read-only derivation check that compares shard-derived task state to selected
TURNFILE.yamltask state. - Run in shadow mode until drift is understood and reviewed.
- Promote a narrow live-write path only after Maintainer approval and peer review.
- It must not let an unknown local model register itself as a Turnfile agent.
- It must not let shard presence imply write authority.
- It must not remove the legible
TURNFILE.yaml,MAILBOX.md, orWORKLOG.mdaudit surface before replacement semantics are accepted. - It must not add Qwen to
policy.required_reviewersor OWNERSHIP paths as a side effect of Qwen onboarding.
- Derived task aggregate matches an equivalent
TURNFILE.yamltask subset in shadow mode. - Drift between aggregate and shard state is reported without overwriting either side.
- Unknown participant shard cannot create tasks, claim tasks, or set status.
- Participant registry change requires Maintainer-authored or Maintainer-approved event.
- Reserved task fields cannot be overwritten by
task.updated. - Completion authority is explicit: owner completion, maintainer completion, and non-owner completion have distinct outcomes.
- Duplicate signal IDs in aggregate coordination are detected before new writes are accepted.
- Mailbox projection remains fresh after any derived aggregate regeneration.
- Introduce
schemas/prd-031/task-event-v0.schema.json. - Introduce
schemas/prd-031/task-aggregate-v0.schema.json. - Extend
tools/aggregate-coordination.mjs --emit task-jsononly after schema coverage exists. - Add
tools/validate-task-aggregate.mjsas a validator rather than folding validation into the reducer. - Add
tools/compare-turnfile-tasks.mjsfor shadow-mode drift reporting. - Keep live shared-file mutation behind the existing
next-stateand mailbox invariant discipline until a later PRD explicitly replaces it.
- Should task status shards be YAML for human editing or JSON for schema validation?
- Should completion authority be task-owner-only by default, or should any registered agent completion be allowed with conflict surfacing?
- Should participant registry live in
PRD_STATUS.json,TURNFILE.yaml, or a new append-only participant event log? - Should Phase 3 cover mailbox shards too, or stay task/status-only until task shadow mode is stable?