Skip to main content

moai harness Harness

UPDATED 2026-08-13 2 min read EDIT ON GITHUB ↗

moai harness is a unified command tree that manages SPEC-complexity routing and the harness learning subsystem. It provides subcommands for routing, validation, lifecycle, proposal management, the v4 harness lifecycle, and the observation ledger.

Deciding how much harness gating a SPEC needs based on its scope is a decision manager agents must repeat every time, so this command accumulates the observation ledger to track how the routing rules are actually used. That makes it the single source of truth when routing inaccuracies recur and you need to trace the cause.

It accepts the common flag --project-root <path> (default: current directory).

Routing verbs

CommandDescription
moai harness route --spec <id>Route a SPEC to a minimal/standard/thorough harness level
moai harness validateValidate harness.yaml against the schema and invariants

route accepts --json (JSON output), --path <harness.yaml>, and --base-dir <dir>.

Lifecycle verbs

CommandDescription
moai harness statusShow observation/tier/evolution summary
moai harness applyReturn pending proposals to the orchestrator (or run the Go apply path with --execute)
moai harness rollback <date>Restore the snapshot for the given date
moai harness disableDisable the learning subsystem (learning.enabled: false)

Proposal-management verbs

CommandDescription
moai harness muteMute a proposal category (workflow.yaml)
moai harness mute-listPrint the currently muted categories
moai harness unmuteRemove a category from the mute list
moai harness verifyVerify harness determinism

v4 harness lifecycle verbs

CommandDescription
moai harness listList all v4 harnesses (name + domain + entry command)
moai harness edit <name>Show the edit paths for a v4 harness manifest + specialist
moai harness remove <name>Atomically remove a v4 harness (command + workflow + specialist + skill + manifest)
moai harness doctorDiagnose harness installation status

list and edit accept the --json flag.

Observation ledger

moai harness ledger manages the routing observation ledger.

CommandDescription
moai harness ledger recordRecord the routing decision at dispatch time (pending row)
moai harness ledger annotatePatch routing metadata into an already-existing pending row
moai harness ledger evidenceAdd a machine-evidence ref (or delegation entry) to a pending row
moai harness ledger listList final ledger rows with filters

ledger record and ledger evidence do not expose an --outcome flag, so the outcome cannot be forged. The outcome is derived from the machine evidence.

Delegation map analysis (delegation)

moai harness delegation covers delegation map analysis built from the observed routing record.

CommandDescription
moai harness delegation analyzeAnalyze observed delegation history and produce a delegation-map proposal