AI harnesses: guides and sensors, the four boxes to fill

· Published · 2 min read

A harness is everything in an agent that is not the model.

Birgitta Böckeler (martinfowler.com, April 2026) structures it along two axes.

Axis 1: timing

  • Guides act before: they raise the probability that the first draft is right.
  • Sensors act after: they let the agent correct itself.

Without sensors, the agent repeats the same mistake. Without guides, it does not know which rules to apply.

Axis 2: mode

  • Computational: tsc, ESLint, dependency-cruiser. Deterministic, a few seconds.
  • Inferential: a review skill, an LLM judge. Semantic, expensive, non-deterministic.

Four boxes

Cross the two axes and you get four boxes.

Your AGENTS.md occupies only one of them: inferential guides. The least deterministic box, yet often the only one filled.

A dependency-cruiser rule wired into a hook fills another box: the agent learns it violated a boundary before you open the PR.

Placement rule: the faster a check is, the further left it belongs. Hook, pre-commit, CI, human review.

The harnessability of a codebase

But not all of these checks are available everywhere. Strict typing gives you a sensor. Clean module boundaries make a structural rule possible. Without those properties, the check does not exist.

Böckeler calls this the harnessability of a codebase, and draws the conclusion that hurts: the harness is most necessary where it is hardest to build.

Building it anyway is a big part of my job.

A very opinionated framework buys that harnessability upfront: its strict conventions fill several of the boxes before a single line of code is written.

An ADR is a guide in the same sense: a page written before the decision is made, so a human or an AI reading the repo later finds the rules of the game for free.

A concrete account of what happens when you push these four boxes to their maximum: zero hand-written lines of code.

Pushing that logic all the way draws the outline of a new job: the Harness Engineer.

That same reinforcement, applied to a single import rule, also lets you drop to a model 4 to 5 times cheaper at equal quality.

Sources