type: meta

topic: P2 first half — journal v2 (I2), single-writer state V6, runner split V7, intent log I3, land exactly-once I4 journal side, structured fatal stderr

exec_mode: ship

scheduler: sequential

land_mode: merge-to-main

base_branch: main

gate0_mode: strict

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: trustworthy state substrate: self-verifying recoverable journal, one writer, modular engine, write-ahead intents, exactly-once land — resolver and daemon build on this


type: anchor

what: canonical spec for Tasks 1-4, 7 — implement per spec, plan only sequences


what: READ FIRST — esp. cross-spec invariants + LLM failure-mode self-checks


what: plan — pinned per-task contracts (### Task N)


type: task

seat: coder

tier: high

desc: src/state/journal.js per spec/JOURNAL-V2.md (SQLite via node:sqlite, amended 2026-07-09): schema+triggers, API, open checks (integrity/version-skew fail-closed), v1 migration; spec tests 1-5 (plan Task 1)

status: PENDING


desc: src/state/lock.js (hardlink + pid/pidStartTime staleness) + src/state/liveness.js (port lib/liveness semantics + pgid/pidStartTime) per spec module layout (plan Task 2)


tier: medium

desc: src/state/cli.js (incl. journal-export) + lib/journal.sh and lib/liveness write-paths → ≤10-line exec shims; test-journal.sh asserts via journal-export, liveness tests UNMODIFIED (plan Task 3)

blocker: waiting on wave 1


desc: src/state/intents.js: intent.start/done/swept, deterministic keys, redrive|rollback registry, unknown op fail-closed (plan Task 4)

blocker: waiting on w1.t1


desc: V7 split part 1: extract src/engine/scheduler.js + src/engine/lease.js from runner.js — moves only, zero behavior change, re-exports preserved, one module per commit (plan Task 5)


desc: V7 split part 2: extract src/engine/gates.js, repair.js, ship.js; runner.js → wiring+CLI only; same pure-move rules (plan Task 6)

blocker: waiting on w3.t1


desc: engine on v2 single-writer (migrate-on-open), run.done into slug journal, land.intent/land.done exactly-once per spec, structured fatal stderr JSON last line (plan Task 7)

blocker: waiting on w4.t1


tier: low

desc: ungate P2-state chaos assertions (journal integrity C9 SQLite form, kill matrix core+land-intent, concurrency suite) per spec/CHAOS-SUITE.md phase map (plan Task 8)

blocker: waiting on w5.t1