Skip to content

docs: add zcode crewmate and scout harness documentation - #4440

Closed
d-ploutarchos wants to merge 2 commits into
kunchenguid:mainfrom
d-ploutarchos:fm/zcode-phase-a-docs
Closed

d-ploutarchos wants to merge 2 commits into
kunchenguid:mainfrom
d-ploutarchos:fm/zcode-phase-a-docs

Conversation

@d-ploutarchos

Copy link
Copy Markdown

zcode Phase A documentation

Docs half of the two-worker zcode harness integration (the sibling PR owns all code under bin/ and tests/; file sets are disjoint).
Every fact cites the zcode research report; no supervised zcode worker has run yet, so the reference keeps the live verification gate ahead of any dispatch.

Files and the report sections they cite

  • .agents/skills/harness-adapters/references/harness/zcode.md (new, agent-runtime)
    • Report §1 (what zcode is: Z.AI official harness, desktop-app CLI, third-party zcode-app-cli Linux artifact, host-integration contract) and §4 (provenance caveat behind the exact-version pin, zcode-app-cli 3.11.2-24 wrapping runtime 0.16.5).
    • Report §2 (empirical evidence: headless -p/--print, --mode build|edit|plan|yolo defaulting to yolo for --prompt, --json, --cwd, --resume/-c/--attach/--disallowed-tools, app-server + doctor, exit-code blindness - errors exit 0, credential paths including ZCODE_API_KEY and ~/.zcode/cli/config.json, no native child marker so Firstmate's FM_ZCODE_HARNESS=zcode marker plus zcode-bin ancestry is the identity, first-run setup wizard, native hook events including Stop).
    • Report §3 items 1, 2, 3, 8, 9 (detection, launch, screen-scrape busy, trust/setup, live verification gate) and the crewmate/scout-only restriction.
  • docs/supervision-protocols/zcode.md (new, agent-runtime)
    • Report §3 items 3, 4, 5: busy via the fm-busy-lib.sh rendered-tail screen-scrape classification (grok-regex shape), control via SIGINT/SIGTERM signal forwarding under the documented host contract, liveness via the grok tail-capture precedent in fm-crew-state.sh.
    • Report §2 for the exit-0 blindness rule and the exact credential-refusal message treated as a credential blocker.
    • Explicitly not a primary wake protocol: a firstmate session running on zcode follows unknown.md, and fm-supervision-instructions.sh does not render this file.
  • AGENTS.md (one line, section 4)
    • Report §1 and §3 item 6: zcode joins the crewmate/scout-only group (muse, gemini, rovo, agy shape).
  • README.md (one line, documentation index)
    • Report §3 item 6: the docs/supervision-protocols/ entry gains the zcode crewmate and scout supervision recipe.
  • docs/documentation-audiences.json
    • Not report content: the two classification rows the repo's docs gate (bin/fm-doc-audience-check.sh) requires for the new surfaces; the gate passes with them.

Notes for review

  • Docs only: no bin/, tests/, or code changes, and zcode was not run or installed; the report's evidence is the sole input.
  • The code sibling PR owns the code-tied harness enumerations that stay stale here on purpose: the harness-adapters SKILL.md description and routing-map entry, CONTRIBUTING.md, docs/architecture.md, and docs/trace-context.md (they describe spawn, busy, send, and trace code behavior that PR adds).
  • bin/fm-doc-audience-check.sh passes: 102 surfaces, 400 local links.

Add the Phase A documentation half of the zcode harness integration: the
harness-adapters reference (operating facts, identity, version pin,
live-verification gate), the worker supervision recipe under
docs/supervision-protocols/, and the verified-harness list entries in
AGENTS.md section 4 and the README documentation index, plus the
documentation-audiences classification rows the docs gate requires.

All facts cite the zcode research report; no supervised zcode worker has
run yet, so the reference keeps the live verification gate ahead of any
dispatch.
…vision recipe

Review fixes on PR kunchenguid#4440:
- drop the AGENTS.md and README verified-list edits; they land with the
  adapter after the live verification gate passes
- fold the supervision recipe into the harness reference instead of
  docs/supervision-protocols/, whose emptiness for crewmate/scout-only
  harnesses is load-bearing in fm-spawn.sh refusal comments
- state the secondmate refusal and busy-state classifier as Phase A
  design requirements with unobserved signatures, not current behavior
- add the zcode routing row to the harness-adapters skill map with
  pending-verification framing
@d-ploutarchos

Copy link
Copy Markdown
Author

Revision 2 pushed (92bd944), resolving the request-changes findings from the independent review:

  • B1: the AGENTS.md section 4 verified-list edit is dropped entirely; it lands with the adapter code after the live verification gate passes. The README.md edit is dropped with it.
  • B2/B4: neither the reference nor the supervision recipe claims verified status anywhere; both open with the pending-verification posture and zcode is never presented as dispatchable.
  • B3: the secondmate refusal is stated as a Phase A spawn-arm design requirement (muse/gemini/agy shape), alongside the accurate current behavior that fm-spawn.sh refuses every zcode spawn as an unknown harness.
  • M1: the busy-state claim now says the Phase A design adds a zcode arm to fm-busy-lib.sh in the grok/rovo/agy rendered-tail shape and that its busy signature is unobserved until the live gate captures a real zcode turn.
  • M2: the zcode row is added to the harness-adapter-routing-v1 harnesses map in harness-adapters/SKILL.md, and the skill's description and safety line name zcode as a pending-verification design, not a verified adapter.
  • M3: the supervision recipe is folded into the harness reference and docs/supervision-protocols/zcode.md is removed, preserving that directory's load-bearing emptiness for crewmate/scout-only harnesses that fm-spawn.sh refusal comments cite.
  • m1: the upstream-terms caveat is stated as a requirement to confirm, not as a settled captain acceptance.
  • m2: the verification record pointer names docs/verification/runtime-backends.md.
  • m3: --cwd is stated as existing rather than as setting the working directory.

Net diff vs main is now three docs files: the revised reference (66 lines), the SKILL.md routing rows, and the single audiences-classification row. All four local gates pass (fm-documentation-audiences, fm-harness-adapter-references, fm-harness-precedence, bin/fm-doc-audience-check.sh: 101 surfaces, 398 local links).

(A pr edit --body-file to refresh the PR description fails with a gh-axi GraphQL Projects-classic deprecation error on both attempts, so this comment carries the revision mapping instead.)

@d-ploutarchos

Copy link
Copy Markdown
Author

Moved to OK-LG/firstmate per captain (the zcode integration lives on OK-LG): OK-LG#1 carries these commits with the same approved review. Closing here.

d-ploutarchos added a commit to OK-LG/firstmate that referenced this pull request Sep 14, 2026
* docs: add zcode crewmate and scout harness documentation

Add the Phase A documentation half of the zcode harness integration: the
harness-adapters reference (operating facts, identity, version pin,
live-verification gate), the worker supervision recipe under
docs/supervision-protocols/, and the verified-harness list entries in
AGENTS.md section 4 and the README documentation index, plus the
documentation-audiences classification rows the docs gate requires.

All facts cite the zcode research report; no supervised zcode worker has
run yet, so the reference keeps the live verification gate ahead of any
dispatch.

* docs: frame zcode reference as pending verification and own its supervision recipe

Review fixes on PR kunchenguid#4440:
- drop the AGENTS.md and README verified-list edits; they land with the
  adapter after the live verification gate passes
- fold the supervision recipe into the harness reference instead of
  docs/supervision-protocols/, whose emptiness for crewmate/scout-only
  harnesses is load-bearing in fm-spawn.sh refusal comments
- state the secondmate refusal and busy-state classifier as Phase A
  design requirements with unobserved signatures, not current behavior
- add the zcode routing row to the harness-adapters skill map with
  pending-verification framing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant