Designing a Control System for AI Code Generators: The Harness Engineering Framework

This article breaks down Birgitta Böckeler's Harness Engineering framework, explaining its 2×2 control matrix, the distinction between computational and inferential controls, three regulation dimensions, and new concepts like Harnessability and Harness Templates, while offering concrete actions for engineering leaders.

DevOps in Software Development
DevOps in Software Development
DevOps in Software Development
Designing a Control System for AI Code Generators: The Harness Engineering Framework

One‑sentence version

Harness Engineering is a “guides + sensors” control system for AI coding agents that lets them operate autonomously within constraints, self‑correct when they err, and requires human intervention only at critical points.

Core framework: a 2×2 matrix

The framework combines two orthogonal dimensions:

Direction : Guides (pre‑emptive, feed‑forward controls such as AGENTS.md, architecture specifications, coding‑style guides) and Sensors (post‑hoc, feedback controls such as unit tests, linters, code‑review agents).

Execution mode : Computational controls are deterministic, cheap, and run on the CPU (type checks, linters, structural tests). Inferential controls are probabilistic, expensive, and run on large language models (LLM‑based code review, semantic analysis, architecture‑review agents).

Both dimensions must be paired; guides without sensors provide no visibility, while sensors without guides cause repeated mistakes and wasted compute.

Quadrant examples

Computational + Guides : bootstrap scripts, code templates, OpenRewrite rules.

Computational + Sensors : pre‑commit hooks, linters, structural tests, coverage checks.

Inferential + Guides : AGENTS.md, architecture documents, skill prompts for the agent.

Inferential + Sensors : AI‑driven code‑review agents, architecture‑review agents.

Three regulation dimensions

Maintainability – internal code quality (duplication, complexity, test coverage, style). Computational sensors (linters, static analysis) reliably catch structural issues.

Architecture Fitness – performance, observability, security, etc. Implemented as fitness‑function sensors (performance benchmarks, log‑format validation, security scans).

Behaviour – does the code actually do what it should? AI‑generated tests are insufficient; human‑authored validation or manual testing remains essential.

New concepts

Harnessability

Not every codebase can be effectively controlled. Strongly‑typed languages, clear module boundaries, and mature frameworks (e.g., Spring) provide built‑in sensors. Legacy, dynamically‑typed, or monolithic codebases lack such natural sensors and are harder to harness.

Harness templates

Common service topologies (API services, event processors, dashboards) can be packaged as reusable harness templates. A template bundles a code skeleton together with pre‑configured guides and sensors, making it easier to adopt a control system for new projects and influencing technology‑stack decisions.

Harness overview diagram
Harness overview diagram

Implications for engineering roles

Human developers contribute tacit knowledge—coding habits, aesthetic judgment, team conventions—that AI agents lack. Harness engineering externalizes this knowledge into explicit guides and sensors, allowing engineers to focus on high‑impact decisions.

Senior engineers shift from writing code to designing control systems that reliably steer AI agents. Required skills include systems thinking, architecture design, tool‑chain engineering, and deep code‑quality expertise. Junior engineers transition from “learn to code” to “learn to harness the coding agent.”

Immediate actions

Ask leadership for a 2×2 control matrix and identify gaps in each quadrant.

Introduce “harnessability” as an evaluation criterion in the next architecture review.

When a team reports 100 % test pass rate on AI‑generated code, verify who authored the tests and ensure human validation.

Sources

Interpretation of Birgitta Böckeler’s article “Harness engineering for coding‑agent users” (April 2 2026) on martin‑fowler.com, with reference to the earlier “Harness Engineering: The AI‑engineered era has arrived” (March 24 2026).

software architectureAI code generationsoftware developmentteam managementAI engineeringcontrol systemsHarness Engineering
DevOps in Software Development
Written by

DevOps in Software Development

Exploring how to boost efficiency in development, turning a cost center into a value center that grows with the business. We share agile and DevOps insights for collective learning and improvement.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.