{"type":"meta","schema":"session-state/v1","slug":"autonomy-p1-foundations","topic":"P1 of autonomy epic — config layering X10, taxonomy rev (9 classes), wrapper contract rev, preflight gate A3, review.passed/task.usage journaling, X9 trailers, I9/I10","created":"2026-07-08","exec_mode":"ship","scheduler":"sequential","land_mode":"merge-to-main","base_branch":"main","gate0_mode":"strict","depends_on":["autonomy-p0-chaos-scaffold"],"status_enum":["BLOCKED","PENDING","WORKING","WRITTEN","REVIEWED","COMMITTED"],"truth_rule":"this file is ground truth for INTENT (goals/task list); git is ground truth for DONE-NESS — reconcile statuses against git, never trust a COMMITTED line with no commit","report_rule":"at session end emit brief: done / blocked / deferred / canceled"}
{"type":"goal","text":"foundational layer for autonomy: one config chain, complete fail-class set, one wrapper-contract rev, engine-native preflight, per-attempt usage + review-proof journaling, commit provenance, version-skew refusal + secret redaction"}
{"type":"anchor","path":"spec/IMPLEMENTER-NOTES.md","what":"READ FIRST"}
{"type":"anchor","path":"spec/WRAPPER-CONTRACT-AMENDMENTS.md","what":"canonical for Task 3 — one atomic contract rev"}
{"type":"anchor","path":"docs/plans/2026-07-07-design-gap-handoff.md","what":"rationale — PART II A3, PART V I9/I10, PART VI V1/V2, PART VIII X9/X10"}
{"type":"anchor","path":"docs/plans/2026-07-08-autonomy-p1-foundations.md","what":"plan — pinned per-task contracts (### Task N)"}
{"type":"task","id":"w1.t1","wave":1,"phase":1,"seat":"coder","tier":"high","desc":"X10 config layering src/config.js: resolveConfig(cli, planMeta, repoRoot), merge chain later-wins, unknown key fail-closed naming layer, per-key provenance (plan Task 1)","status":"PENDING","deps":[],"requires_decision":null,"files":["src/config.js","src/config.test.js"],"blocker":null}
{"type":"task","id":"w1.t2","wave":1,"phase":1,"seat":"coder","tier":"high","desc":"taxonomy rev src/fail-taxonomy.js: add task-stalled, agent-idle, land-failed, land-blocked-unreviewed, protected-path-touched, provider-quota, budget-exceeded, artifacts-missing, adapter-contract-violation — bands/scopes per specs, names verbatim vs spec/RESOLVER.md table (plan Task 2)","status":"PENDING","deps":[],"requires_decision":null,"files":["src/fail-taxonomy.js","test/self-healing-integration.sh"],"blocker":null}
{"type":"task","id":"w1.t3","wave":1,"phase":1,"seat":"coder","tier":"high","desc":"wrapper contract rev per spec/WRAPPER-CONTRACT-AMENDMENTS.md sections A-D as ONE rev: usage event + metered flag, errorKind quota channel, transcript tee, north dialect + _validate cross-check (plan Task 3)","status":"PENDING","deps":[],"requires_decision":null,"files":["spec/events.schema.json","presets/_validate.mjs","presets/adapters.json","wrappers/"],"blocker":null}
{"type":"task","id":"w2.t1","wave":2,"phase":1,"seat":"coder","tier":"high","desc":"preflight gate A3: runplan preflight <slug> + config --show verbs, --unattended refuses dirty preflight, machine-readable findings, read-only, config via resolveConfig (plan Task 4)","status":"PENDING","deps":["w1.t1","w1.t2"],"requires_decision":null,"files":["src/runner.js","bin/runplan"],"blocker":"waiting on wave 1"}
{"type":"task","id":"w3.t0","wave":3,"phase":1,"seat":"coder","tier":"medium","desc":"root-cause refactor: introduce shared task_state_seq(journal,task) helper in test/runner-integration.sh (always excludes kind-tagged additive records via (.kind|not)) and replace every duplicated inline jq '.state'-sequence filter repo-wide (test/runner-integration.sh + test/self-healing-integration.sh) with a call to it; zero raw un-helpered occurrences remain; full suite green (plan Task 5 prerequisite, authorized by user to prevent recurring fixer-scope-blocked quarantine on additive-journal-record tasks)","status":"PENDING","deps":["w2.t1"],"requires_decision":null,"files":["test/runner-integration.sh","test/self-healing-integration.sh"],"blocker":"waiting on w2.t1"}
{"type":"task","id":"w3.t1","wave":4,"phase":1,"seat":"coder","tier":"medium","desc":"journal review.passed {task,stage} on review path + task.usage {attemptKind,adapter,...} per attempt from wrapper usage event; additive-only journal API (plan Task 5)","status":"PENDING","deps":["w1.t3","w2.t1","w3.t0"],"requires_decision":null,"files":["src/runner.js","lib/journal.sh","lib/test-journal.sh","src/test/runner-transcript.test.js","test/runner-integration.sh"],"blocker":"waiting on w3.t0"}
{"type":"task","id":"w4.t1","wave":5,"phase":1,"seat":"coder","tier":"medium","desc":"X9 commit trailers Plan:/Task:/Run: at engine commit sites + post-implement gate check (fixable class); merge commits get Plan:/Run:; new commit-trailers-missing fail class needs its self-healing-integration.sh coverage scenario committed in the SAME task (do not split); replace the rg-based routing self-check in runner-integration.sh with grep -E, do NOT add any runtime rg shim/fallback to src/runner.js (plan Task 6)","status":"PENDING","deps":["w3.t1"],"requires_decision":null,"files":["src/runner.js","src/fail-taxonomy.js","test/runner-integration.sh","test/self-healing-integration.sh"],"blocker":"waiting on w3.t1"}
{"type":"task","id":"w5.t1","wave":6,"phase":1,"seat":"coder","tier":"medium","desc":"I9 formatVersion skew refusal (newer journal → fail-closed) + I10 secret redaction at append boundary in BOTH writers (src/runner.js, lib/journal.sh) (plan Task 7)","status":"PENDING","deps":["w4.t1"],"requires_decision":null,"files":["src/runner.js","lib/journal.sh"],"blocker":"waiting on w4.t1"}
{"type":"task","id":"w6.t1","wave":7,"phase":1,"seat":"coder","tier":"low","desc":"ungate P1 chaos assertions per spec/CHAOS-SUITE.md phase gate map; full suite green (plan Task 8)","status":"PENDING","deps":["w5.t1"],"requires_decision":null,"files":["test/chaos/scenarios/"],"blocker":"waiting on w5.t1"}
{"type": "task", "id": "w7.t1", "wave": 7, "phase": 1, "seat": "coder", "tier": "medium", "desc": "pi engine wrapper wrappers/pi.sh per REVISED WRAPPER-CONTRACT (headless Pi, openai-codex subscription provider, auth precondition exit 3, quota→75 with resume_at, model+effort pinned) + adapters.json entry id=pi; contract probe green (plan Task 9)", "status": "PENDING", "deps": ["w1.t3"], "requires_decision": null, "files": ["wrappers/pi.sh", "presets/adapters.json"], "blocker": "waiting on w1.t3"}
