ADLCThe Agentic Development Lifecycle
Chapter 7 · Part II — The Four Pillars

Chapter 7 — Harness Engineering I: Guides and Sensors

4506 words

"Agent = Model + Harness." — Böckeler, Harness engineering for coding agent users [D]

Context Files: present in 90.6% of repositories. Hooks: 0.9%–3.2%. — Galster et al., n = 2,853 [A]

Those two lines are the chapter. One is the framework; the other is what the framework got used for.

What you'll learn
  • The quadrant that organises every control you can put around a coding agent, and why its four cells are not of equal standing
  • The distinction that decides everything: guides are assertions, sensors are observations
  • Where sensors sit relative to the agent's action — and the class of control that agents make available for the first time
  • The eight configuration mechanisms teams actually use, mapped onto the quadrant, and the ratio that results
  • Why harnesses drift toward text for exactly the same reason codebases drift toward duplication
The claim this chapter defends

teams have overwhelmingly populated the quadrant cell with the weakest authority and fastest depreciation, and left nearly empty the cell whose authority Chapter 5 showed to be the only kind that survives cheap generation. This is not negligence — it is the predictable result of a cost gradient — which is why it needs a counter-force rather than an exhortation.


7.1 The two harnesses

Chapter 1 fixed the vocabulary; this chapter puts it to work. The founding equation is Böckeler's, and it is worth restating because of what it excludes:

Agent = Model + Harness. The harness is everything that is not the weights.

That framing does real work. It says the interesting engineering object is not the model — you did not train it and you cannot change it — but the entire apparatus around it. Chapter 2 measured how much that apparatus is worth: the same weights, a different interface, 1.31% to 12.47%.

Böckeler splits the apparatus into two rings, and the split is the practical crux.

USER HARNESS — yourscontext files · skills · hooks · linters · tests · fitness functions · review agents · MCPBUILDER HARNESS — the vendor'ssystem prompt · retrieval · orchestration · tool definitionsMODELnot yours · not stable · changes without noticeAgent = Model + Harness. Harness engineering is the deliberate design of the OUTER ring.The inner two change under you without notice — so anything that must be stable belongs in the ring you control.
Figure 7.1 — Böckeler's two harnesses. Harness engineering is the deliberate design of the outer ring. The inner two change under you without notice, which is an argument for putting durable authority in the ring you control.

Note the asymmetry the diagram implies, because it becomes an argument later. The model changes without your consent — a new checkpoint arrives and behaviour shifts. The builder harness changes without your consent — a vendor revises a system prompt, adds a tool, alters retrieval. The user harness is the only ring whose behaviour you can hold still. Anything you need to be stable belongs there.

7.2 The quadrant

Böckeler's central contribution, and this book adopts it wholesale with credit. Two axes.

When does the control act? Before generation, shaping what happens — a guide, feedforward. Or after, detecting what happened and enabling correction — a sensor, feedback.

What executes it? A CPU running deterministic code — computational. Or a model producing a probabilistic judgment — inferential.

EVERY CONTROL YOU CAN BUILD SITS IN ONE OF THESE FOUR CELLSGUIDES — feedforward · preventSENSORS — feedback · detect & self-correctlanguage servers · CLIs · scriptscodemodsscaffolds and templatescapabilities for reason (CfRs)linters · static analysistype checkerstest runnersarchitecture fitness functionsCOMPUTATIONALdeterministicCPU · ms–secondsreliableprinciples · rulesreference documentationhow-to guidescontext filesreview agentsLLM-as-judgesemantic analysisarchitecture-review skillsINFERENTIALprobabilisticmodel-bound · slowersemantically richInferential does not mean inferior. Computational controls can only check what is expressible in code.
Figure 7.2 — The quadrant, with Böckeler's own examples. Every control you can build sits in one of these four cells.

Two clarifications before the argument, because both matter.

A mechanism is a vehicle; a cell is a function. A hook is a vehicle — a script that runs at a lifecycle point. It can carry a sensor (run the type checker after every edit) or a guide (inject the current schema before every call). MCP can expose a computational guide (a code graph to query) or reach a sensor (a coverage service). The mapping from tool features to cells is therefore not one-to-one, and I will be careful about that in §7.6 where it matters most.

Inferential does not mean inferior. Computational controls are cheap, fast, and reliable but can only check properties expressible in code. "Is this the right abstraction?" and "does this test actually test anything?" are semantic questions, and Chapter 8's hardest problem lives there. The two columns are complements, not competitors, and Böckeler's point is precisely that inferential controls "allow us to both provide rich guidance, and add additional semantic judgment."

7.3 Guides assert. Sensors observe.

Here is the distinction that the rest of the chapter turns on, and it is epistemic rather than technical.

A guide is an assertion. It says: this is how things should be done here. It is a claim, written in advance, about behaviour that has not happened yet. Its truth is never tested by the act of writing it.

A sensor is an observation. It says: this is what did happen. It makes contact with the artefact and returns a verdict about the actual state of the world.

The asymmetry between these is the whole game. An assertion can be wrong, stale, contradicted by a neighbouring assertion, or simply ignored, and none of those failures announces itself. An observation can also be wrong — a flaky test, a false-positive lint — but its failures are loud, because a sensor that fires produces an artefact someone must dispose of.

Now consider a harness composed almost entirely of guides. It is a system of assertions about the organisation's own behaviour with almost no observation of that behaviour. It will feel well-governed. It will read well in an onboarding document. And it will contain no mechanism by which a false assertion is ever discovered.

There is a name for a body of confident claims insulated from contact with evidence, and it is not engineering. Taleb's long argument against narrative — that a coherent story is not a substitute for a record of outcomes, and that coherence is easier to manufacture than accuracy — applies directly. A guide is a map. A sensor is contact with the territory. You can improve a map indefinitely without ever touching the ground.

This gives the ordering that Chapter 5 arrived at from a different direction. Chapter 5's gate audit asked: if producing the artefact became free, would this gate still carry information? Every gate that survived was computational; every gate that failed was social. The reason is now visible in the quadrant. Social gates inferred an unobservable from an observable that used to correlate with it. Computational sensors observe the property directly. They never cared how hard anyone worked, and they do not care whether the author was a person.

So the four cells have an authority ordering, and it is forced:

CellWhat its authority rests onSurvives cheap generation?
Computational sensorDirect observation of a checkable propertyFully
Computational guideMechanical constraint on what is expressibleFully
Inferential sensorA probabilistic observation, sampledPartly — needs its own calibration
Inferential guideAn assertion, read voluntarily, unverifiedWeakly — nothing detects it being ignored

7.4 Where a sensor sits

Fowler's community teaches keep quality left — distribute controls by cost and speed so cheap ones run often and early. Chapter 5 explained why the principle now bites harder: a regulator slower than its plant does not regulate it.

But "left" is usually read as earlier in the delivery pipeline, and for agents there is a more precise axis: how close is the sensor to the agent's action?

SENSOR PLACEMENT — VALUE FALLS SHARPLY MOVING DOWN, BECAUSE EACH STEP SPENDS MORE OF THE CONSTRAINT1 · BLOCKING — the action does not happen unless it passeslint-on-edit refuses the write · the failure never enters the worldcosts agent retries, which are elastic2 · IN-LOOP — the agent sees the verdict and may self-correcttest output, type errors · costs tokens, not humans3 · OUT-OF-LOOP — a human sees it laterCI, dashboards, weekly reports · costs the scarce resource of Chapter 3most organisations' sensors are here, inherited from an era when level 1 was politically impossibleMoving a sensor from level 3 to level 1 is a direct increase in μ — and the cheapest one available.
Figure 7.3 — Sensor placement. Value falls sharply moving down, because each step spends more of the constraint. Most organisations' sensors are at level 3, inherited from an era when level 1 was politically impossible.

The ordering is not aesthetic. It is Chapter 3's arithmetic. A blocking sensor consumes no review capacity at all — the bad state never exists. An in-loop sensor consumes tokens, which are elastic. An out-of-loop sensor consumes human attention, which is the binding constraint. Moving a sensor from level 3 to level 1 is a direct increase in μ, and it is the cheapest such increase available.

Chapter 2 supplies the measurement. The linting guardrail in SWE-agent was a level-1 blocking sensor: let a modification apply only if it does not produce major errors. It was worth +3.0 points, and it prevented a cascade in which one failed edit dropped the odds of eventual success from 90.5% to 57.2% [A]. The value came not from telling anyone about the bad edit but from the bad edit never landing.

Now the observation I think is genuinely useful, and it is about politics rather than engineering.

Blocking controls were always the most effective and always the least adoptable. Every engineer who has tried to introduce a rejecting pre-commit hook knows the objection: it is obstructive, it fires on false positives, it stops people working, someone will add --no-verify. Those objections were reasonable. A human being blocked by a tool experiences friction, resents it, and escalates.

An agent does not. It has no ego, no deadline anxiety, and no ability to complain to your manager. It reads the rejection, adjusts, and retries — which is precisely what the SWE-agent guardrail measured.

Delegation has made a whole class of control politically available for the first time. The blocking sensors that human teams rejected on grounds of friction are now free of the thing that made them costly.

This is one of the few genuinely good consequences of the transition in this book, and almost nobody is collecting it. Which brings us to the evidence.

7.5 What teams actually built

The best available picture of harness practice comes from Galster and colleagues: 2,853 GitHub repositories using at least one agentic coding tool, filtered from 37,249, snapshot February 2026 [A]. Chapter 6 used its context-file figures; here the whole dataset matters.

They identify eight repository-level configuration mechanisms: Context Files, Settings, Skills, Subagents, Commands, Hooks, Rules, and MCP. Two are supported by all five tools studied; no single tool implements all eight.

Adoption, as a percentage of each tool's repositories:

MechanismClaudeCopilotCursorGemini
Context Files94.3%98.6%61.5%62.3%
Settings15.7%4.4%11.0%62.3%
Commands11.3%2.2%19.0%8.6%
Skills9.6%6.4%9.5%5.1%
Rules7.9%3.2%72.8%6.9%
Subagents6.8%6.6%—7.4%
MCP4.5%2.3%11.6%8.0%
Hooks3.2%0.9%3.1%1.1%

Context Files are present in 2,586 of 2,853 repositories (90.6%) — 4,768 files in total, CLAUDE.md 1,640, AGENTS.md 1,508, copilot-instructions.md 1,393. Most repositories hold one or two.

The advanced mechanisms are barely used. 601 Skills across 158 repositories (median 2); 450 Subagents across 131 (median 2). And the finding Chapter 6 already quoted, which matters even more here: 514 of 601 Skills (85.5%) bundle no additional resources at all — no scripts/, no references/. The authors' conclusion is unhedged: Skills "function primarily as structured text rather than executable scripts." Also: no repository used the persistent memory feature of Subagents.

The authors' own summary: "Harness engineering in open source today is therefore mostly context engineering."

7.6 The ratio

Now map those mechanisms onto the quadrant, and something appears that neither source states.

Recall the caveat from §7.2: a mechanism is a vehicle. Context Files, Rules, and text-only Skills carry inferential guides — reference documentation, principles, conventions. Hooks execute scripts at agent lifecycle points and are the primary vehicle for putting a computational sensor inside the agent loop, at level 1 or 2 of Figure 7.3. MCP is mixed. Commands package prompts. Settings enable rather than control.

GUIDES — feedforward act before generation · prevent SENSORS — feedback act after · detect and self-correct COMPUTATIONAL deterministic ms–seconds reliable INFERENTIAL probabilistic slower semantically rich language servers · CLIs · scripts codemods · scaffolds · templates types that make bad states unrepresentable MCP 2.3–11.6% linters · type checkers · tests static analysis · fitness functions highest authority · never ages HOOKS — sensors inside the agent loop 0.9 – 3.2% least adopted of all eight mechanisms principles · rules · how-to guides reference documentation lowest authority · ages fastest CONTEXT FILES — CLAUDE.md, AGENTS.md 90.6% present in 2,586 of 2,853 repositories review agents · LLM-as-judge semantic analysis advisory adds review load; only blocking removes it Subagents 6.6–7.4% roughly 29 : 1
Figure 7.4 — Galster's eight mechanisms placed in Böckeler's quadrant. Adoption is concentrated in the cell with the weakest authority and nearly absent from the cell with the strongest.

The headline is a ratio. Within Claude Code repositories, 1,223 have Context Files and 42 have Hooks — 29 to 1. Within Copilot repositories, 944 against 9: 105 to 1. Across every tool studied, Hooks are the least-adopted of all eight mechanisms, and Context Files are the most.

Set that against §7.3's authority table and the conclusion is stark:

The field has invested overwhelmingly in assertions and almost not at all in observations — and specifically, it has left nearly empty the one cell whose authority Chapter 5 demonstrated to be the only kind that survives cheap generation.

Three qualifications, because the argument should be stated at its weakest as well as its strongest.

Sensors exist outside these mechanisms. Every one of these repositories almost certainly has tests and CI. The absence of Hooks does not mean the absence of linters; it means the linters are at level 3 of Figure 7.3 — out-of-loop, consuming human attention when they fire — rather than at level 1, blocking, inside the agent's edit cycle. That is a weaker claim than "there are no sensors" and it is the claim I am making. The sensors are there; they are in the wrong place relative to the agent.

The mapping is imprecise. Hooks can implement guides; MCP straddles cells. But the imprecision cannot rescue the picture, because the extremes are three orders of magnitude apart. No reasonable re-assignment of vehicles to cells turns 90.6% against 0.9–3.2% into a balanced portfolio.

Open source is not enterprise. The authors say so explicitly, and enterprise practice may differ. But Chapter 3's enterprise case is the only counter-datum available, and it points the same way: that organisation reached for inferential sensors — automated review bots, ≈38% of review events — under queue pressure, not for computational ones inside the loop.

7.7 Why it happened

The temptation is to read §7.6 as a failure of diligence. It is not, and treating it as one guarantees the wrong remedy. It is a cost gradient, and we have met this shape before.

Chapter 4 asked why an agent duplicates rather than extracts when both are correct, and answered: extraction requires knowing every call site, which is expensive from a bounded view, while duplication is cheap and safe. The gradient points at duplication, and no instruction reverses a gradient.

Run the same analysis one level up, on the humans building harnesses.

COST OF POPULATING EACH CELL — AND ADOPTION TRACKS CHEAPNESS, NOT EFFECTIVENESSinferential guide — a context fileminutesno tooling, breaks nothing, looks like progress in a PR · 90.6% adoptioninferential sensor — a review agentdaysconfigure, tune the prompt, dispose of its outputcomputational guide — a scaffold or codemodweeksbuild it, integrate it, keep it currentcomputational sensor — a wired blocking checka quarter + an ownerdecide what to check, build, integrate, live with false positives forever · 0.9–3.2% adoptionAuthority and durability run in the OPPOSITE direction. Nobody chose this — it is Chapter 4's gradient acting on harness authors.
Figure 7.5 — Adoption tracks cheapness, not effectiveness. This is Chapter 4's gradient operating on harness authors instead of on agents. Nobody chose it.

Writing a paragraph in CLAUDE.md takes minutes, requires no tooling, breaks nothing, and produces an artefact that looks like progress in a pull request. Wiring a custom check into every edit requires deciding what to check, building it, integrating it, and then living with its false positives forever. Both are "harness work." One costs an afternoon; the other costs a quarter and an owner.

So harnesses drift toward text for exactly the reason codebases drift toward duplication. Individually rational, collectively degrading, nobody's fault, and not fixable by asking people to try harder.

There is a second force, and it is the more insidious one. Chapter 2 established that guides age and sensors persist — a guide compensates for a model deficit, and when the deficit closes the guide becomes overhead. Combine that with Figure 7.5 and the portfolio problem sharpens:

Teams have concentrated their harness investment in the cheapest to build, weakest in authority, and fastest to depreciate asset class.

A test written in 2015 still works. A type system still works. A CLAUDE.md paragraph explaining how to avoid a failure mode that three model generations have since eliminated is not neutral — it occupies the budget Chapter 6 showed to be scarce, and worse, it teaches everyone reading the file that the file's contents are decorative. Taleb's Lindy heuristic gives the portfolio advice in one line: tests and type systems have survived fifty years and will likely survive the next model; context-file conventions are eighteen months old. Weight accordingly.

None of this argues against context files. Chapter 6 defended them: architecture is exactly what an agent cannot infer locally, and a markdown file is the cheapest available attack on the right problem. The argument is about portfolio balance, and the balance is currently 29-to-1 or worse in favour of the asset that depreciates.

7.8 What to build first

The practical output. If §7.6 is right, the highest-value move for most teams is not a better context file — it is the first level-1 blocking sensor.

Chapter 2 tells you which one, because it measured it. The single most valuable control in the SWE-agent ablation was a check that ran on every edit and refused to apply a change that introduced a syntax or compile error. Cost: milliseconds. Value: +3.0 points, and the prevention of a cascade that halved recovery odds.

Generalised into a first move:

Wire your fastest deterministic check into the agent's edit cycle as a blocking control, before you write another guide. Syntax, then types, then the fast unit tests. In that order, because that is the order of speed.

Then a minimal harness that populates all four cells rather than one. Appendix B works this out in full; the shape is:

CellMinimum viableWhy this one
Computational sensorBlocking format/syntax/type check on edit; fast tests in-loopThe highest-authority, best-measured control available
Computational guideA scaffold or template for your dominant service shapeMakes the correct structure the path of least resistance
Inferential guideOne context file: architecture, conventions, non-obvious constraintsCheapest attack on what cannot be inferred locally
Inferential sensorOne review agent with a narrow, named remitCatches semantic problems no linter expresses

Four rules for maintaining it, all consequences of earlier chapters rather than taste:

  1. Every guide carries a date and the failure it was added for. Chapter 2: guides age. Undated guides cannot be pruned, so they accumulate.
  2. Prefer blocking to advisory, advisory to reporting. Figure 7.3. Each step rightward spends more of the constraint.
  3. Prefer computational to inferential when the property is expressible. Chapter 1's rule: a linter that catches a defect every time beats a review agent that catches it four times in five — categorically, because you can build a policy on the first and only a hope on the second.
  4. Every new control is a hypothesis. Chapter 2's iterative search scored below having no search at all. Controls can be iatrogenic. Chapter 14 makes this measurable; until then, at minimum, know when each control was added and what it was supposed to prevent.

7.9 What this pillar cannot do

As in Chapter 6, the honest close is the pillar's ceiling — three of them.

Guides cannot make intent exist. A guide transmits intent that someone articulated. Chapter 0's closing line stands: a harness cannot verify correctness against a requirement never stated. No quantity of guides substitutes for the specification, and Chapter 5 showed that intent can no longer be recovered afterwards by asking.

Sensors cannot check what they cannot express. The computational column is bounded by what is mechanically checkable. Misdiagnosis of the underlying problem, over-engineering, unrequested features, and correctness against an unstated intent are precisely the high-impact failures Böckeler notes that neither column reliably catches. This is Chapter 8's unsolved third of the harness.

A harness has no mechanism for keeping itself coherent. Guides accumulate, contradict each other, and go stale silently; sensors that never fire are indistinguishable from sensors that are blind. Böckeler poses both as open questions, and Chapter 8 takes them up as the steering loop's central problem, with Chapter 21 naming the failure modes — Harness Theatre, the Silent Sensor, Guide Sprawl.

Which is the handoff. This chapter described the components. Chapter 8 is about the loop that maintains them: how a harness grows without becoming incoherent, how to distribute controls across the change lifecycle, why some codebases are structurally easier to govern than others, and why the hardest regulation category — whether the software actually does what was wanted — remains, in the words of the person who named it, the elephant in the room.


The takeaway

Guides assert and sensors observe, and the field has bought assertions at roughly thirty to one over observations — concentrating its harness investment in the cheapest, weakest, fastest-depreciating cell of the quadrant, for the same cost-gradient reason codebases drift toward duplication, which means the remedy is a measured counter-force rather than better intentions.

Open questions
  • Does deeper configuration actually pay? Galster's authors call for exactly this study: "Future work should assess whether deeper configuration leads to measurable performance gains." This chapter's normative argument rests on Chapter 5's authority analysis, not on a controlled comparison of hooks against context files — because that comparison does not exist. It is the most important missing experiment in Part II.
  • Is the 29:1 ratio wrong or right? I have argued it is a cost artefact. The alternative reading is that it is an efficient allocation — context files may simply have a better return per hour invested, in which case the portfolio is correct and this chapter is wrong. Distinguishing these requires the study above.
  • How much of the blocking-control unlock is real? §7.4's argument that agents remove the political cost of rejecting controls is mechanistic and, I think, obviously true in direction. The magnitude is unmeasured, and there is a plausible counter-effect: a blocking control that fires often may push an agent into expensive retry loops that a human would have short-circuited by thinking.
  • What is the right proportion? Nothing here says what a balanced harness portfolio looks like. Chapter 14 proposes harness coverage as the measurement, and the honest position is that the field has no target to aim at yet.
Sources
  • Böckeler, Birgitta. Harness engineering for coding agent users, martinfowler.com; Harness Engineering — first thoughts; Thoughtworks, Harness engineering and agent feedback: exploring AI coding sensors [D] ✅ primary verified — Agent = Model + Harness; builder vs user harness as concentric rings (§7.1); the guides/sensors × computational/inferential quadrant with all cell contents (§7.2), including capabilities for reason (CfRs); inferential controls "allow us to both provide rich guidance, and add additional semantic judgment"; keep quality left; the failures neither column reliably catches (§7.9); the open questions on harness coherence and silent sensors. The framework of this chapter is hers; the authority ordering, placement hierarchy, mechanism mapping, and cost-gradient argument are this book's
  • Galster, Mohsenimofidi, Lulla, Abubakar, Treude, Baltes. Harness Engineering for Agentic AI Coding Tools: An Exploratory Study. arXiv 2602.14690v5, AIware '26 [A] ✅ primary read — n = 2,853 repositories; the eight mechanisms; the full adoption table (§7.5); Context Files in 90.6%, 4,768 files; Hooks least-adopted at 0.9–3.2%; 601 Skills / 158 repositories, 450 Subagents / 131, median 2 each; 85.5% of Skills bundle no resources, "function primarily as structured text rather than executable scripts"; no repository used Subagent persistent memory; "harness engineering in open source today is therefore mostly context engineering"; February 2026 snapshot; open-source-only limitation stated by the authors; their call for studies of whether deeper configuration pays
  • Yang et al. SWE-agent. arXiv 2405.15793, NeurIPS 2024 [A] ✅ primary read — the linting guardrail as a blocking sensor, +3.0 points; edit-failure cascade 90.5% → 57.2%; iterative search 12.0 vs no search 15.7 (§7.8's fourth rule); the model-held-constant ratio 1.31% → 12.47% (§7.1)
  • He, Agarwal, Denisov-Blanch, Azaletskiy, Koyejo, Vasilescu. arXiv 2607.01904 [B] ✅ — automated review overtaking human review; bots ≈38% of review events. The enterprise counter-datum in §7.6
  • Santos, Costa, Montandon, Valente. arXiv 2511.09268 [B] 🔴 — 328 CLAUDE.md files, architectural concerns dominate
  • DORA 2025 [C] ✅ — quality internal platforms among the seven capabilities; carried into Ch 8's harness templates
  • Ford, Parsons, Kua, Building Evolutionary Architectures ✅ canonical — architecture fitness functions as computational sensors
  • Taleb — narrative versus record (§7.3); the Lindy portfolio argument (§7.7)

Full entries and verification status: references/sources.md.