Repository navigation
docs(skills): split harness adapter operations reference - #3289
kunchenguid merged 9 commits into
Conversation
Confidence Score: 5/5The PR appears safe to merge, with no concrete blocking or independently actionable non-blocking defect identified. The split preserves the harness-adapter safety and ownership boundaries, all declared routing targets exist, and the test runner visibly distinguishes the opt-in evaluation from portable structural coverage. Reviews (1): Last reviewed commit: "no-mistakes(document): Fix harness adapt..." | Re-trigger Greptile |
|
Speaking as Kun's firstmate: this is merged. Thank you @M00NLIG7 — really appreciate you taking the time on this. VISION.md read in full from current main Squash merge |
Resolve the SKILL.md conflict from the harness-adapters doc split (kunchenguid#3289): take main's restructured routing doc and port the branch's --approve trust-dialog sentences into references/harness/pi.md, which now owns that content. No behavior change: bin/fm-spawn.sh and the dispatch-profile test merged clean and pass locally.
Intent
Implement the captain-approved strong split of Firstmate's monolithic
.agents/skills/harness-adapters/SKILL.mdand publish it as a separate public PR whose canonical base is exactlygithub.com/kunchenguid/firstmate, without merging it. Keepharness-adaptersas the single catalogued skill, trigger, and authoritative router at the same path with the same name, direct-loading behavior, and frontmatter semantics. Reduce that file to an approximately 4-8 KB router containing universal non-negotiable safety, detection, and an explicit operation-to-reference matrix. Move shared detail into narrowly owned references under the same skill directory for dispatch, control/recovery, primary hooks, and model/effort, and move each supported tool's detail into one harness reference, combining Pi/Pi-signed only because they genuinely share one contract. The router must identify exactly which common and tool reference to load for start, trust handling, skill invocation, interrupt, exit, resume, recovery, primary startup/integration, model/effort selection, and adapter verification.Preserve every unique safety and operational fact exactly once, pruning duplicates rather than creating second prose owners. Keep executable mechanics, schemas, and command ownership in existing scripts and documentation and continue pointing references to those owners. Make all on-demand relative paths resolve from the skill directory in Pi and every supported consumer of the shared skill tree. Do not change
AGENTS.mdunless its existing trigger pointer becomes false. Do not add or removedisable-model-invocation; this work is separate from the 15-skill metadata correction, and the field must simply follow the rebased public base if that correction lands. Do not alter executable runtime behavior, add an extension, change compaction, session restoration, monitoring, the broader skill catalog, or perform an AGENTS diet.Keep the PR limited to the router/reference split, narrowly required maintainable structural or behavioral-interface tests, and current maintained verification/documentation pointers. Do not add source-byte assertions or prose snapshots. Demonstrate scenario reference selection and preserved requirements across every supported tool, review the complete pre/post inventory for lost facts or duplicate owners, and report measured sizes rather than enforcing them. The pre-fix split measured a 5,372-byte router and 11,185-14,809-byte normal loads; after the approved review corrections, the current acceptance evidence is a 6,043-byte router and 11,504-15,236-byte normal router-plus-common-plus-tool loads, versus the 66,217-byte original. Use Git author and committer
M00NLIG7 <[email protected]>and verify it before publication.Run the complete Firstmate validation and applicable live agent-tool checks. Do not weaken or silently skip failures. Preserve and carry the clean-base differential evidence: the unchanged composer half-block-edge and Muse ancestry checks fail byte-identically on the task's exact original public base, and a further 14 portable failures also reproduce in a clean detached copy of that exact base, for 16 reproducible public-base limitations rather than split regressions. Accurately document that live liveness passed Claude, Codex, OpenCode, and Pi; the live composer check was blocked for Claude by its workspace-trust dialog; the credentialed steering check passed Codex and Pi but Claude remained at trust and OpenCode timed out without acting or acknowledging; Pi-signed, Grok, Kimi, Cursor, and Muse were absent and must remain explicitly unverified rather than counted as passes. Complete every no-mistakes gate through green CI, open the authorized public PR against exactly
github.com/kunchenguid/firstmate, report its full URL and risk level, and do not merge.What Changed
Risk Assessment
✅ Low: Captain, the change is a well-bounded instruction/reference split with explicit routing, honest evaluation limitations, and no source-verifiable runtime behavior regression.
Testing
The bounded local evaluation showed the implicit e2b model was insufficient while explicit zero-provider-call e4b selected every operation scenario and all nine identities; native loader coverage remains explicitly limited to installed tools rather than inferred from that harness-neutral evaluation. Current post-fix measurements are a 6,043-byte router and 11,504-15,236-byte normal loads; 5,372 and 11,185-14,809 are historical pre-fix measurements only. The clean-base differential preserved 16 reproducible original-base portable failures without counting them as passes or split regressions. Live liveness passed Claude, Codex, OpenCode, and Pi; the live composer check reached Claude's workspace-trust dialog, and the credentialed steering check passed Codex and Pi while Claude remained at trust and OpenCode timed out. Pi-signed, Grok, Kimi, Cursor, and Muse were unavailable and remain unverified. All 14 PR checks are green.
Evidence: Live model routing plan for all scenarios
Source: Live model routing plan for all scenarios
Evidence: Focused validation and native-tool availability transcript
Source: Focused validation and native-tool availability transcript
Evidence: Normalized routing contract
Source: Normalized routing contract
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 3 issues found → auto-fixed (6) ✅
.agents/skills/harness-adapters/SKILL.md:22- The new path contract applies to every relative path, but this skill also names active-home and project-relative paths such asconfig/crew-harness,state/<id>.meta, and.claude/settings.json. Following the contract resolves these beneath the skill directory, bypassing the real runtime state. Restrict skill-root resolution to on-demand reference/owner paths and explicitly preserve active-home/project resolution for operational paths..agents/skills/harness-adapters/references/common/control-and-recovery.md:7- The required criterion says to preserve each unique fact “exactly once,” but lifecycle-only control, recordedharness=selection, and trust postcondition rules are owned both here and in router lines 33–37; line 32 also summarizes resume behavior repeated by tool references. Keep universal safety in the router and have this reference point back to it, leaving tool-specific resume facts solely in tool references.tests/fm-harness-adapter-references.test.sh:17- The required criterion says to “demonstrate scenario reference selection ... across every supported tool,” but this test defines an independent routing table and only checks that its hardcoded paths are readable. It still passes if the router’s operation matrix or harness table is removed, mistyped, or contradicts the test, and it omits conditional additions for model selection, replacement recovery, and secondmates. Exercise a real/normalized router-selection interface or otherwise provide evidence tied to the router’s emitted selection contract without adding prose snapshots.🔧 Fix: Fix harness adapter routing and ownership contracts
1 error still open:
.agents/skills/harness-adapters/SKILL.md:32- The intent requires preserving each unique fact “exactly once,” but duplicate prose owners remain: captain/per-task override is stated here and inreferences/common/dispatch.md:10; secondmate fallback resolution is here and in dispatch line 12; and Cursor/Grok model identity is duplicated betweenreferences/common/model-and-effort.md:28andreferences/harness/cursor.md:4. Keep detection and universal overrides solely in the router, cross-harness identity in model-and-effort, and have narrower references point back rather than restating them.🔧 Fix: Prune duplicate harness adapter ownership prose
2 errors still open:
.agents/skills/harness-adapters/SKILL.md:61- The intent requires the router to identify exactly what to load for every start, butstart.defaultomitsmodel-and-effort.md. A dispatch with no explicit effort therefore selects only dispatch/tool references and never loads the required generic effort fallback. Include model/effort in the default start plan or explicitly require every start to union that operation..agents/skills/harness-adapters/references/harness/grok.md:19- The intent requires preserving behavior, but this says both unsupportedxhighand explicitmaxshould be capped tohigh. That conflicts withmodel-and-effort.md, where only fallbackxhighis capped while an unsupported captain-requested value is recorded and omitted. Restrict the cap to fallbackxhighand preserve record-and-omit for explicitmax.🔧 Fix: Fix default effort routing and Grok max semantics
2 errors still open:
tests/fm-harness-adapter-references.test.sh:17- The test-quality rule forbids source-content-only assertions, but this test extracts a fenced JSON block from the skill’s Markdown and only asserts its exact routes and referenced-file readability. No shipped consumer executes this contract, so the test can pass without proving that an agent selects or loads the required references. Replace it with an observable selector/loader interface test, or remove the source-scraping assertions in favor of the required live agent-tool evidence..agents/skills/harness-adapters/SKILL.md:38- The required criterion says to preserve each unique fact “exactly once,” but duplicate owners remain: Muse’s crew/scout-only boundary appears here and inreferences/harness/muse.md:4; Pi-signed detection is repeated between router line 43 andreferences/harness/pi.md:23-28; and generic effort record/omit or fallback rules are restated in Cursor, Kimi, and Grok references. Keep universal semantics in the router/common references and leave harness files with only empirical capabilities plus pointers to those owners.🔧 Fix: Remove source-only routing test and duplicate semantics
1 error still open:
.agents/skills/harness-adapters/SKILL.md:53- The required criterion says “Demonstrate scenario reference selection and preserved requirements across every supported tool,” but the routing object has no executable consumer or behavioral evaluation, and the latest fix deleted the only reference-selection test without replacement. The remaining liveness test only classifies launched processes, so it cannot demonstrate that an agent selects and loads these plans. Add observable agent-tool evaluation across all harness entries without inspecting the router’s source text.🔧 Fix: Add local harness adapter instruction evaluation
2 errors still open:
tests/fm-harness-adapter-instructions-live-e2e.test.sh:40- The new live evaluation prints a structuralokbefore its opt-inskip, butfm-test-run.shrecognizes a gate skip only when it is the first non-empty line. WithoutFM_HARNESS_ADAPTER_INSTRUCTION_EVAL=1, the behavioral evaluation is therefore reported as a pass rather than an explicit skip. Emit the skip first or separate structural and opt-in evaluations.bin/fm-test-run.sh:258- The registered evaluation is not selected when its subject changes: the router falls through topure-contract-unit, while files underreferences/have no mapping and cause--changedto fail as unmapped. Add a harness-adapters tree mapping to the newlive-harness-optinfamily, retaining any required portable family.🔧 Fix: Fix harness evaluation gating and change mapping
✅ Re-checked - no issues remain.
tests/fm-harness-adapter-instructions-live-e2e.test.sh:29- The documented opt-in command leaves the model unset, causing automatic selection ofambient-router-gemma4:e2b. That model reproducibly invented nonexistentreferences/harness/pi-signed.mdpaths on both attempts. Explicitly selecting the installedambient-router-gemma4:e4bpassed all scenarios. Make the documented/default evaluator selection reliably choose a capable model or require an explicit model rather than deterministically choosing the first non-embedding model..agents/skills/harness-adapters/SKILL.md:1- The authoritative intent’s size report is stale relative to the target commit. The router grew from 5,372 bytes in the initial split commit to 6,043 bytes after review fixes; current single-common router-plus-tool loads measure 11,504–15,236 bytes instead of 11,185–14,809. Decide whether the exact reported measurements must be restored or updated to reflect the review-fixed target.git log -1 --format='%H%n%an <%ae>%n%cn <%ce>%n%s'— confirmed target commit and required M00NLIG7 author/committer identitygit diff --stat --name-status f66be0f8f7f56f78d09458d909bdd555b9dbcf76..ccabb6c211056abdc8bcce776136d100159e93ed— scoped the change and focused testsbash tests/fm-harness-adapter-references.test.sh— parsed the public routing contract and resolved every selected referencebash tests/fm-test-run.test.sh— exercised changed-file selection, including router and nested-reference coverage mappingFM_HARNESS_ADAPTER_INSTRUCTION_EVAL=1 bash tests/fm-harness-adapter-instructions-live-e2e.test.sh— failed twice with the automatically selected 2B model on Pi-signed path fidelityFM_HARNESS_ADAPTER_INSTRUCTION_EVAL=1 FM_HARNESS_ADAPTER_LOCAL_MODEL=ambient-router-gemma4:e4b bash tests/fm-harness-adapter-instructions-live-e2e.test.sh— selected all 15 operation/scenario plans across nine identitiesInstrumented the same 4B live evaluation to preserve its normalized generated routing plan in the evidence directoryMeasured current router, common-reference, harness-reference, and composed-load byte sizes withwc -cCompared base and target frontmatter semantically withdiff; no frontmatter changegit status --short— confirmed testing left the worktree clean🔧 Fix: Captain, require explicit harness instruction evaluator model
1 error still open:
.agents/skills/harness-adapters/SKILL.md:1- The previously identified measurement mismatch remains: the router is now 6,043 bytes and normal router-plus-common-plus-tool loads span 11,504–15,236 bytes, while the authoritative acceptance text states 5,372 and 11,185–14,809. Confirm that the final PR report should use the current measured values.bash tests/fm-harness-adapter-references.test.shFM_HARNESS_ADAPTER_INSTRUCTION_EVAL=1 FM_HARNESS_ADAPTER_LOCAL_MODEL=ambient-router-gemma4:e4b bash tests/fm-harness-adapter-instructions-live-e2e.test.shbin/fm-test-run.sh --list --changed --base f66be0f8f7f56f78d09458d909bdd555b9dbcf76Live Ollama routing evaluation recorded inlive-routing-plan.jsonwc -c .agents/skills/harness-adapters/SKILL.md .agents/skills/harness-adapters/references/common/*.md .agents/skills/harness-adapters/references/harness/*.mdgit show f66be0f8f7f56f78d09458d909bdd555b9dbcf76:.agents/skills/harness-adapters/SKILL.md | wc -cgit show -s --format='%an <%ae>%n%cn <%ce>' HEAD✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.