Harness Engineering

Agent = Model + Harness

The harness is everything in a coding agent except the model.

Agent = Model + Harness

The harness is the guides, tools, checks, permissions, memory and context around the model. You rarely change the model; you change the harness, so good output is more likely and the agent corrects itself before a human sees the result.

Source: Birgitta Böckeler, Harness engineering for coding agent users, in Martin Fowler's Exploring Gen AI series (2026). The companion piece, Maintainability sensors for coding agents, develops the sensor half.

Feedforward and feedback

Feedforward controls steer the agent before it acts: style guides, templates, conventions, examples. In harness-kit these are the guides. Feedback controls observe after it acts and let it self-correct: linters, tests, structure checks, scored reviews. In harness-kit these are the sensors and evals. Feedback works best written for the model: "missing section X; add it with these fields".

Computational and inferential controls

Computational controls are deterministic: same input, same verdict, cheap, blind to meaning. Inferential controls use a model for semantic judgment, such as whether a design names its trade-offs; they are probabilistic and need calibration.

Most harness-kit sensors are computational; those that need judgment declare Execution: inferential and never report a pass. Evals are inferential, scored by a Claude evaluator or by Jev (see Evals). Push what you can into a sensor and keep the eval for meaning.

What the controls regulate

Böckeler names three dimensions: functional behavior (tests, acceptance criteria), maintainability (linters, structure, style), and architecture fitness (fitness functions, convention overrides). In harness-kit, sensors enforce structure and conventions, evals score clarity and rigor, and per-repo .claude/conventions/ files pin architecture fitness.

Humans outside, in, or on the loop

Outside the loop, the agent ships without review, which is rare and high risk. In the loop, a human reviews every output, which caps throughput at the review rate. On the loop, the human maintains the harness and the harness reviews the outputs. harness-kit is built for on the loop, the only posture that scales: you tune a rubric once, and when the agent drifts you fix the guide, not the output.

How harness-kit applies it

Every stage of every pipeline is a small harness:

Layer Control What it does Where
Guide feedforward how to write it guides/, templates/, examples/
Reference context what to pull in AGENTS.md, prior artifacts, conventions/
Sensor computational or inferential must-pass structure, blocks approval sensors/, run by sensor-runner.py
Eval inferential weighted rubric of yes/no checks, threshold 8.0, retry up to 3 times evals/, verified by eval-score.py

An artifact advances only when its sensors pass and its eval clears 8.0, for PRDs, PRPs, plans, code, tests, PRs and System Design Docs. Guides, sensors and evals are plain markdown; only runners, scripts and hooks are code, so you can read and change what gets checked.

See also

Guides, Sensors, Evals, Pipeline and Stages, Golden Path, References.

This page mirrors Harness Engineering in the wiki. Edit it there.