{"type":"meta","slug":"harness-v2-phase1","base_branch":"origin/main","gate0_mode":"strict","preset":"codex","land_mode":"merge-to-main"}
{"type":"goal","text":"Rebuild harness v2 Phase 1 trust core: independent review, bounded gate repair, ordered seat fallback, durable retry stop-loss, rate-limit parking, and flat remaining presets."}
{"type":"methodology","text":"Implement contract-first in dependency waves; persist authority in append-only journal state; use TDD; preserve strict gates; fail closed; commit only each task's declared files."}
{"type":"intent","text":"Make unattended v2 execution trustworthy before adding supervision, queueing, control, maintenance, or landing automation."}
{"type":"direction","verbatim":"no daemons as monoliths — systemd units/timers + short idempotent scripts + state on disk"}
{"type":"direction","verbatim":"fail-closed"}
{"type":"direction","verbatim":"v1 code bodies are NEVER ported, only behavior re-specced"}
{"type":"direction","verbatim":"Owner approved the scope; do not add approval gates."}
{"type":"anchor","path":"docs/specs/2026-07-29-harness-v2-parity-design.md","what":"spec"}
{"type":"anchor","path":"docs/plans/2026-07-29-harness-v2-phase1.md","what":"plan"}
{"type":"task","id":"t1","wave":1,"seat":"coder","tier":"medium","desc":"Read docs/plans/2026-07-29-harness-v2-phase1.md Task 1 (Durable Retry Ledger) for the full contract. Persist quality attempts, parking counts, monotonic journal sequence, and repeated-failure stop-loss state across restarts. Acceptance: node --test modules/harness/v2/test/journal-quality.test.js. Commit only: modules/harness/v2/journal.js, modules/harness/spec/events.schema.json, modules/harness/v2/test/journal-quality.test.js.","requires_decision":null,"verify":["node --test modules/harness/v2/test/journal-quality.test.js"],"acceptance":["node --test modules/harness/v2/test/journal-quality.test.js"]}
{"type":"task","id":"t2","wave":1,"seat":"coder","tier":"medium","desc":"Read docs/plans/2026-07-29-harness-v2-phase1.md Task 2 (Ordered Seat Fallback and Independent Reviewer) for the full contract. Resolve bounded eligible fallback chains and require an independent healthy reviewer binding. Acceptance: node --test modules/harness/v2/test/seats-quality.test.js. Commit only: modules/harness/v2/seats.js, modules/harness/spec/presets.schema.json, modules/harness/spec/PRESETS.md, modules/harness/v2/test/seats-quality.test.js.","requires_decision":null,"verify":["node --test modules/harness/v2/test/seats-quality.test.js"],"acceptance":["node --test modules/harness/v2/test/seats-quality.test.js"]}
{"type":"task","id":"t3","wave":1,"seat":"coder","tier":"medium","desc":"Read docs/plans/2026-07-29-harness-v2-phase1.md Task 3 (Rate-Limit Parking) for the full contract. Park exit-75 dispatches with reset/wake handling, heartbeats, and an eight-park cap without consuming normal retry attempts. Acceptance: node --test modules/harness/v2/test/dispatch-parking.test.js. Commit only: modules/harness/v2/dispatch.js, modules/harness/v2/test/dispatch-parking.test.js.","requires_decision":null,"verify":["node --test modules/harness/v2/test/dispatch-parking.test.js"],"acceptance":["node --test modules/harness/v2/test/dispatch-parking.test.js"]}
{"type":"task","id":"t4","wave":1,"seat":"coder","tier":"medium","desc":"Read docs/plans/2026-07-29-harness-v2-phase1.md Task 4 (Flatten Anthropic-Less Preset) for the full contract. Replace anthropic-less tiered coder routing with its approved flat medium binding. Acceptance: node modules/harness/presets/_validate.mjs. Commit only: modules/harness/presets/anthropic-less.json.","requires_decision":null,"verify":["node modules/harness/presets/_validate.mjs"],"acceptance":["node modules/harness/presets/_validate.mjs"]}
{"type":"task","id":"t5","wave":1,"seat":"coder","tier":"medium","desc":"Read docs/plans/2026-07-29-harness-v2-phase1.md Task 5 (Flatten Canary Preset) for the full contract. Replace duplicate canary coder and reviewer tier maps with flat deterministic bindings. Acceptance: node modules/harness/presets/_validate.mjs. Commit only: modules/harness/presets/canary.json.","requires_decision":null,"verify":["node modules/harness/presets/_validate.mjs"],"acceptance":["node modules/harness/presets/_validate.mjs"]}
{"type":"task","id":"t6","wave":1,"seat":"coder","tier":"medium","desc":"Read docs/plans/2026-07-29-harness-v2-phase1.md Task 6 (Flatten Grok Preset) for the full contract. Replace grok tiered coder routing with its approved flat medium binding. Acceptance: node modules/harness/presets/_validate.mjs. Commit only: modules/harness/presets/grok.json.","requires_decision":null,"verify":["node modules/harness/presets/_validate.mjs"],"acceptance":["node modules/harness/presets/_validate.mjs"]}
{"type":"task","id":"t7","wave":2,"seat":"coder","tier":"medium","desc":"Read docs/plans/2026-07-29-harness-v2-phase1.md Task 7 (Review and Gate-Fix State Machine) for the full contract. Enforce read-only independent review and deterministic dependency-repair→fixer→stronger-fixer gate recovery. Acceptance: node --test modules/harness/v2/test/quality.test.js modules/harness/v2/test/child.test.js. Commit only: modules/harness/v2/quality.js, modules/harness/v2/child.js, modules/harness/v2/test/quality.test.js, modules/harness/v2/test/child.test.js.","requires_decision":null,"verify":["node --test modules/harness/v2/test/quality.test.js modules/harness/v2/test/child.test.js"],"acceptance":["node --test modules/harness/v2/test/quality.test.js modules/harness/v2/test/child.test.js"]}
{"type":"task","id":"t8","wave":3,"seat":"coder","tier":"medium","desc":"Read docs/plans/2026-07-29-harness-v2-phase1.md Task 8 (Integrate Trust Core into Run Lifecycle) for the full contract. Wire fallback, parking, review, repair, retry ledger, and stop-loss into the v2 task lifecycle before checkpoint. Acceptance: node --test modules/harness/v2/test/run-quality.test.js. Commit only: modules/harness/v2/run.js, modules/harness/v2/test/run-quality.test.js.","requires_decision":null,"verify":["node --test modules/harness/v2/test/run-quality.test.js"],"acceptance":["node --test modules/harness/v2/test/run-quality.test.js"]}
{"type":"task","id":"t9","wave":4,"seat":"coder","tier":"medium","desc":"Read docs/plans/2026-07-29-harness-v2-phase1.md Task 9 (Register and Run Full v2 Regression Suite) for the full contract. Register every new Phase 1 suite and verify syntax, preset validation, and all v2 regressions without warnings. Acceptance: node --check modules/harness/v2/journal.js && node --check modules/harness/v2/seats.js && node --check modules/harness/v2/dispatch.js && node --check modules/harness/v2/quality.js && node --check modules/harness/v2/run.js && node modules/harness/presets/_validate.mjs && node modules/harness/v2/test/index.js. Commit only: modules/harness/v2/test/index.js.","requires_decision":null,"verify":["node --check modules/harness/v2/journal.js && node --check modules/harness/v2/seats.js && node --check modules/harness/v2/dispatch.js && node --check modules/harness/v2/quality.js && node --check modules/harness/v2/run.js && node modules/harness/presets/_validate.mjs && node modules/harness/v2/test/index.js"],"acceptance":["node --check modules/harness/v2/journal.js && node --check modules/harness/v2/seats.js && node --check modules/harness/v2/dispatch.js && node --check modules/harness/v2/quality.js && node --check modules/harness/v2/run.js && node modules/harness/presets/_validate.mjs && node modules/harness/v2/test/index.js"]}
