Expand description
The harness adapter API — the single seam between generic dispatch code and harness-specific behavior.
The trait is tiered into a baseline every harness must implement and enhancements that raise fidelity when a harness has the native support:
- Baseline (required):
labelandskills_dir. A new harness compiles with just these two methods; dispatched through its one-shot CLI (with--no-stageinlining the skill when native staging isn’t wired), it already supportsllm_judgegrading and thedetect-stray-writespost-pass. - Enhancements (defaulted): every other method has a default — either a
working generic fallback (e.g. the plain available-skills block) or an
Unsupportederror naming the enhancement it belongs to (e.g. transcript ingest, the write guard). Override the methods of an enhancement to wire it for a harness.
Generic code resolves an adapter with adapter_for
and then calls the trait — so the registry is the one
place that names a concrete harness for this surface. The impls live in the
per-harness modules (claude_code,
codex, opencode).
Structs§
- CliDispatch
Context - Context for rendering a harness’s one-shot CLI agent-dispatch guidance.
- CliJudge
Context - Context for rendering a harness’s one-shot CLI judge-dispatch guidance.
- CliManifest
Context - Context for rendering a harness’s
dispatch-manifest.mdCLI recipe. - Tool
Vocabulary - One harness’s tool-name vocabulary: every name its guard hook payloads or
transcript parser can produce, grouped by role. Consumers match against the
union across all harnesses (
all_tool_vocabulary).
Constants§
- RUNBOOK_
TEMPLATE - The shared (human-followed)
RUNBOOK.mdtemplate used by every run, regardless of harness (Claude Code, Codex, OpenCode).
Traits§
- Harness
Adapter - The behavior that varies by harness. Generic dispatch code depends on this trait, never on a concrete harness variant. See the module docs for the baseline-vs-enhancement contract.