{"type":"meta","schema":"session-state/v1","slug":"harness-nongated","topic":"Harness sub-project deliverables buildable WITHOUT Plan A landed (OKF KB + adapter-config CLI)","created":"2026-06-30","exec_mode":"ship","scheduler":"dag-parallel","land_mode":"merge-to-main","base_branch":"main","land_testcmd":"bash run-tests.sh","status_enum":["BLOCKED","PENDING","WORKING","WRITTEN","REVIEWED","COMMITTED"],"truth_rule":"this file is ground truth for INTENT (goals/directions/task list); git is ground truth for DONE-NESS \u2014 reconcile statuses against git, never trust a COMMITTED line with no commit","refresh_how":"native Read of THIS file \u2014 NEVER ctx_execute/ctx_search","refresh_what":"meta + every goal/methodology/intent/direction record + all WORKING and BLOCKED tasks (skip COMMITTED lines)","refresh_when":["wave/phase boundary","any task status change","after a compaction system-reminder","before calling advisor"],"update_rule":"on status change, rewrite that task's single line in place; append new tasks/session_memory as new lines","report_rule":"at session end emit brief: done / blocked / deferred / canceled \u2014 NO next action","no_north":true,"seat":"codex","glue_model":"haiku","codex_impl_model":"gpt-5.4","codex_impl_effort":"low","codex_review_model":"gpt-5.3-codex-spark","codex_review_effort":"high","gate0_cmd":"bash run-tests.sh"}
{"type":"goal","text":"Build the two Plan-A-independent harness tracks: the OKF knowledge-base system (store format, tier resolver, projection+capture engines, bin/okf CLI, hook integration) and the adapter-config CLI (bin/harness-adapter core/state + read/merge/secrets/available-models)."}
{"type":"methodology","text":"Contract-level TDD per task: write failing tests from the pinned seam, implement minimal body, run the one acceptance check, commit. Zero-dep Node stdlib only (no npm). Fail-closed everywhere. SAFETY: all OKF projection/capture tests run against a FIXTURE $HOME/XDG tmp dir, NEVER real ~/.claude \u2014 wholesale MEMORY.md regen on a real dir is destructive. Adapter tests run against a FIXTURE catalog (real presets/adapters.json is Plan-A-gated)."}
{"type":"intent","text":"Unblock everything the user can build now while Plan A is still running, without colliding with Plan A's files. These deliverables also feed the harness-gated plan's Web UI (bin/okf + bin/harness-adapter)."}
{"type":"direction","verbatim":"all the non-gated specs and tasks now"}
{"type":"direction","verbatim":"No stubs/placeholders/workarounds in DELIVERABLE code \u2014 full functionality. A contract/spec/plan that pins the seam + leaves the body to the implementer is the CORRECT shape, NOT a stub."}
{"type":"direction","verbatim":"Secrets (adapter credentials) NEVER committed: set-secret writes a per-machine envFile created 0600, gitignored, value read from stdin/prompt NEVER argv, never echoed/logged/returned by any verb."}
{"type":"deferred","text":"Repo-level execution serialization behind Plan A","reason":"Plan A (mega-plan-harness) is live in this same repo with worktrees in /tmp + integration branch plan/mega-plan-harness. Running this plan concurrently risks branch/worktree collision. Land Plan A first, then run this plan."}
{"type":"anchor","path":"docs/specs/2026-06-30-okf-kb-design.md","what":"spec (OKF KB)"}
{"type":"anchor","path":"docs/specs/2026-06-30-harness-adapter-config-design.md","what":"spec (adapter-config)"}
{"type":"anchor","path":"docs/plans/2026-06-30-harness-nongated.md","what":"plan"}
{"type":"anchor","path":"docs/design.txt","what":"source: nav-protocol master text (okf-T2 copies lines 19-38 byte-verbatim) \u2014 declared an anchor so --isolate seeds local edits into the clone"}
{"type":"task","id":"agg-T1","wave":1,"phase":1,"desc":"Land-gate test runner (run-tests.sh, repo ROOT not under test/ so it never self-matches) — discover+run every tree test: test/*.sh, **/*.test.sh, **/test-*.sh (bash) and **/*.test.js, **/test-*.js (node), dedup, fail-closed exit 1 if zero found, propagate any failure. discovery loop lives in THIS committed runner (DRY: versioned logic in one file); land_testcmd='bash run-tests.sh' references it. ('$' in a testcmd is safe — ship-init bakes facts single-quoted via shq)","status":"COMMITTED","deps":[],"requires_decision":null,"files":["run-tests.sh"],"blocker":null,"gate0_cmd":"bash -n run-tests.sh"}
{"type":"task","id":"okf-T1","wave":1,"phase":1,"desc":"OKF store format contract (spec/okf-format.md) — required frontmatter block + index.md line shape, both verbatim","status":"COMMITTED","deps":[],"requires_decision":null,"files":["spec/okf-format.md"],"blocker":null,"gate0_cmd":"test -f spec/okf-format.md"}
{"type":"task","id":"okf-T2","wave":1,"phase":1,"desc":"Navigation protocol canonical text (spec/okf-nav-protocol.md) = byte-verbatim copy of docs/design.txt lines 19-38","status":"COMMITTED","deps":[],"requires_decision":null,"files":["spec/okf-nav-protocol.md","test/okf-nav-protocol.test.sh"],"blocker":null,"gate0_cmd":"bash test/okf-nav-protocol.test.sh"}
{"type":"task","id":"okf-T3","wave":1,"phase":1,"desc":"Tier resolution + promotion helper (lib/okf-scope) — global/project/job resolve, deterministic precedence job>project>global, job->project promote","status":"COMMITTED","deps":[],"requires_decision":null,"files":["lib/okf-scope.js","lib/okf-scope.test.js"],"blocker":null,"gate0_cmd":"node lib/okf-scope.test.js"}
{"type":"task","id":"adp-T8","wave":1,"phase":1,"desc":"harness-adapter core + per-machine state writers (bin/harness-adapter) — enable/disable/config/set-models, adapters-state/v1, atomic write, fail-closed; tested vs FIXTURE catalog","status":"COMMITTED","deps":[],"requires_decision":null,"files":["bin/harness-adapter","test/adapter-state.sh"],"blocker":null,"gate0_cmd":"bash test/adapter-state.sh"}
{"type":"task","id":"okf-T4","wave":2,"phase":1,"desc":"Projection engine (lib/okf-project) — outbound to claude memory/MEMORY.md/CLAUDE.md/AGENTS.md, managed-region sentinels, idempotent, atomic; FIXTURE $HOME tests only","status":"COMMITTED","deps":["okf-T2","okf-T3"],"requires_decision":null,"files":["lib/okf-project.js","test/okf-project.test.js"],"blocker":null}
{"type":"task","id":"okf-T5","wave":2,"phase":1,"desc":"Capture engine (lib/okf-capture) — claude-memory->OKF reverse map, subsume mapping, dedup/loop guard, conflict keeps OKF master; FIXTURE $HOME tests only","status":"COMMITTED","deps":["okf-T3"],"requires_decision":null,"files":["lib/okf-capture.js","test/okf-capture.test.js"],"blocker":null}
{"type":"task","id":"adp-T9","wave":2,"phase":1,"desc":"harness-adapter read/merge + write-only secrets + available-models cache (bin/harness-adapter) — list/show effective descriptor, set-secret 0600 stdin-only, available-models TTL24h; FIXTURE catalog + stub wrapper","status":"COMMITTED","deps":["adp-T8"],"requires_decision":null,"files":["bin/harness-adapter","test/adapter-read.sh"],"blocker":null}
{"type":"task","id":"okf-T6","wave":3,"phase":1,"desc":"okf CLI (bin/okf) — verbs project/capture/sync/new/index/promote/doctor, exit 0/2/3, atomic writes, sync=capture-then-project ordering invariant","status":"COMMITTED","deps":["okf-T3","okf-T4","okf-T5"],"requires_decision":null,"files":["bin/okf","test/okf.test.sh"],"blocker":null}
{"type":"task","id":"okf-T7","wave":4,"phase":1,"desc":"Harness hook integration — thin shells over bin/okf wired into existing global dispatcher (commit e178459); session-start->project, wave-boundary/session-end->sync; failure logged non-fatal","status":"COMMITTED","deps":["okf-T6"],"requires_decision":null,"files":["hooks/okf-session-start.sh","hooks/okf-sync.sh","test/okf-hooks.test.sh"],"blocker":null}
{"type":"session_memory","note":"adp-T8/adp-T9 build bin/harness-adapter against a FIXTURE catalog; the real presets/adapters.json + validator cross-check are Plan-A-gated and live in plan harness-gated (adpg-T6/adpg-T8). The --health/--list-models wrapper modes adp-T9 consumes are also authored in harness-gated (ca-T1/T2/T3)."}
{"type":"session_memory","note":"okf-T7 creates two NEW thin-shell hooks (hooks/okf-session-start.sh, hooks/okf-sync.sh) over bin/okf; wiring them into the global core.hooksPath dispatcher (per commit 74dee35/e178459 convention) is config, not a tracked repo file. wave-boundary auto-trigger only fires once Plan A's runner emits that event; session-start + manual sync work standalone now."}
{"type":"session_memory","note":"meta.land_testcmd='bash run-tests.sh' is this plan's land gate (run by ship.sh land before merge/PR). The DISCOVERY loop lives in the committed runner run-tests.sh (agg-T1), NOT inline in land_testcmd \u2014 DRY/versioned-logic best practice, not a workaround: ship-init now bakes every frozen fact SINGLE-quoted (shq helper), so a '$'-laden testcmd is safe (the prior DOUBLE-quoted bake re-expanded a loop var $t at wrapper-load under set -u \u2192 'unbound variable' \u2192 every ship.sh subcommand incl drift crashed; fixed at root in ship-init.sh, locked by test-ship-init 3b + test-rp-isolate section 6). run-tests.sh discovers+runs test/*.sh, **/*.test.sh, **/test-*.sh (bash) and **/*.test.js, **/test-*.js (node), dedup, fail-closed if zero. Every task's acceptance test MUST be named to match one of those globs (adapter tests already do: test/adapter-state.sh, test/adapter-read.sh; okf lib tests \u2192 put under test/ or name *.test.js). Runner sits at repo ROOT so test/*.sh never matches it (no self-recursion). Gate exists because --isolate forces pr-land and the isolated branch must NOT inherit Plan A's TESTCMD (references Plan-A-only files absent here)."}
