Harness Skill
What Is the Harness
Agent = Model + Harness. The harness is the system of feedforward guides (what to do before coding) and feedback sensors (what catches violations after coding).
- Feedforward:
AGENTS.mdand.agents/skills/— context, constraints, conventions read before coding. - Feedback:
do-harness verify— automated checks that fire after code changes. Computational output strictly supersedes LLM self-assessment.
Feedback Sensors
| Sensor | Command | Stage |
|---|---|---|
| verify | do-harness verify |
pre-commit (subset) + pre-push + CI (full) |
| individual | do-harness verify --only <name> |
targeted re-runs |
Sensors are defined in do-harness.toml; run do-harness list to see them.
Self-Correction Protocol
- Read the full error output — it includes the failing check.
- Classify the failure: formatting / compile / lint / test / config.
- Apply the minimal fix — do not refactor unrelated code.
- Re-run the specific sensor (
do-harness verify --only <name>). - Proceed only when the sensor is green.
Fail-Fast Policy
If the same subtask fails a sensor 3 consecutive times, halt, record the error
signature in .do-harness/agent_state.db, and surface a diagnostic.
New-Repo Adoption (Dogfood Rule)
do-harness init(rust pack) scaffolds a minimal crate when noCargo.tomlexists, soinit && verifyexits 0 on an empty tree; existing crates are never touched, not even with--force.- The generic pack ships zero sensors: its
verifypass is vacuous until real[[sensors]]are configured — not evidence. - Never assume the harness works in this repo: re-prove with
do-harness verify --format jsonand read the per-sensor exit codes.
Gotchas
- Never trust LLM self-assessment over a computational sensor's exit code.
- Fix the sensor that fired; do not refactor unrelated code in the same pass.
- An empty sensor suite passes vacuously; that is not evidence.