type: meta

slug: harness-nongated

topic: Harness sub-project deliverables buildable WITHOUT Plan A landed (OKF KB + adapter-config CLI)

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 — reconcile statuses against git, never trust a COMMITTED line with no commit

refresh_how: native Read of THIS file — 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 — NO next action

seat: codex

glue_model: haiku

codex_impl_effort: low

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 — 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


verbatim: No stubs/placeholders/workarounds in DELIVERABLE code — full functionality. A contract/spec/plan that pins the seam + leaves the body to the implementer is the CORRECT shape, NOT a stub.


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

what: source: nav-protocol master text (okf-T2 copies lines 19-38 byte-verbatim) — declared an anchor so --isolate seeds local edits into the clone


type: task

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

gate0_cmd: bash -n run-tests.sh


desc: OKF store format contract (spec/okf-format.md) — required frontmatter block + index.md line shape, both verbatim

gate0_cmd: test -f spec/okf-format.md


desc: Navigation protocol canonical text (spec/okf-nav-protocol.md) = byte-verbatim copy of docs/design.txt lines 19-38

gate0_cmd: bash test/okf-nav-protocol.test.sh


desc: Tier resolution + promotion helper (lib/okf-scope) — global/project/job resolve, deterministic precedence job>project>global, job->project promote

gate0_cmd: node lib/okf-scope.test.js


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

gate0_cmd: bash test/adapter-state.sh


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


desc: Capture engine (lib/okf-capture) — claude-memory->OKF reverse map, subsume mapping, dedup/loop guard, conflict keeps OKF master; FIXTURE $HOME tests only


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


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


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


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).


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.


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 — 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 → 'unbound variable' → 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 → 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).