Harness Engineering: Why a Minimal CLAUDE.md and a Good Architecture Document Belong Together A February 2026 ETH Zurich study by Gloaguen, Mündler, Müller, Raychev and Vechev, "Evaluating AGENTS.md," found that automatically generated context files lowered AI agent success rates by 3 percent on average and raised costs by over 20 percent, while human-written files improved results by only about 4 percent at a similar cost increase. The findings underpin the "Harness Engineering" approach, in which the harness — instruction files such as CLAUDE.md or AGENTS.md, skills, tools, tests, linters and CI gates — is designed around the agent rather than relying on prompt instructions. The aiup-petclinic project applies this with a roughly 150-line CLAUDE.md that points to docs/ as the source of truth and defers architecture rules to a separate Software Architecture Document. The term Harness Engineering has established itself in recent months. The formula behind it is simple: Agent = Model + Harness. The harness is everything that makes up an AI agent, except the model itself. That includes instruction files like CLAUDE.md or AGENTS.md, skills, tools, tests, linters and CI gates. The core point of Harness Engineering is a shift of focus. We stop telling the agent in the prompt what to do, and we start designing the system around the agent so that it cannot do otherwise. A sentence like “follow our architecture” in the prompt is a hope. A test that breaks the build is a guarantee. In the AI Unified Process, the harness is one of three layers. In this post I use the aiup-petclinic https://github.com/simasch/aiup-petclinic project to show how the layers work together, why the CLAUDE.md there is deliberately small, and why the Software Architecture Document does the real work. The Three Layers of the AI Unified Process The AI Unified Process distinguishes three layers: What : What should the system do? This is where the requirements, the use case diagram, the use case specifications and the entity model live. These artifacts are technology-neutral. They describe behavior from the point of view of the users and the business. Harness : How do we make sure the agent builds the right thing the right way? This is where the instruction files, the skills, the test strategy, the CI gates and the Software Architecture Document live. How : The actual code, the migrations, the tests. This is the output of the agent. The order matters. Without What, the agent does not know what to build. Without Harness, it builds it in a way that works but does not fit our system. Bigger Instruction Files Are Not Better The common assumption is: the more context the agent has, the better it works. So everything ends up in the CLAUDE.md: project description, directory tree, architecture, coding conventions, test rules, commands. A study from ETH Zurich from February 2026 Gloaguen, Mündler, Müller, Raychev, Vechev: “Evaluating AGENTS.md” tested this empirically. The results are sobering. Automatically generated context files lowered the success rate of the agents by 3 percent on average and raised the cost by over 20 percent. Human-written files brought only about 4 percent, with a similar increase in cost. And the agents did follow the instructions. The problem was not a lack of obedience, but that the instructions added noise, redundant steps and unnecessary constraints. One detail of the study is interesting: when the researchers removed the existing documentation from the repositories, the context files suddenly helped. The conclusion: a context file is useful when it provides knowledge the agent cannot find anywhere else. It is useless when it repeats what is already in the documentation, and it is harmful when it fills the context with ballast. For Harness Engineering this means: the CLAUDE.md is not a knowledge base. It is a map. The CLAUDE.md in the PetClinic Project The CLAUDE.md in aiup-petclinic is about 150 lines long and contains essentially four things: 1. What the source of truth is. docs/ is the source of truth, not the code. If a use case and the code disagree, the use case wins. And which sensors check this claim. 2. The stack and the commands. Java 25, Spring Boot 4.1, Vaadin 25.2, jOOQ 3.21, Flyway, PostgreSQL. How to build, test and regenerate the jOOQ classes. This is knowledge the agent cannot find anywhere else. 3. When to read which document. Before implementing a use case: the use case specification. Before any change in src/main/java : docs/guidelines/architecture.md . Before any test: docs/guidelines/testing.md . 4. Which skills exist. The skills of the AI Unified Process are listed so the agent prefers them over ad-hoc generation. What is not in the CLAUDE.md: the architecture rules themselves. No package layout, no jOOQ patterns, no Vaadin conventions. Those are in the Software Architecture Document, and the agent reads them only when it needs them. This is the difference between context that is always loaded and context that is loaded on demand. The CLAUDE.md is loaded into the context in every session. The architecture document only when the agent writes code. When writing a use case specification, it does not burden the context. This has to be defended actively. When the two traceability sensors were added more on those later , the CLAUDE.md grew by a paragraph explaining what each sensor checks. The paragraph was correct, but it repeated what testing.md says in more detail. In the next commit it was cut down to three sentences and a link: there are two sensors, the Status: line is therefore an assertion and not a label, and what each sensor checks is in testing.md . The map shows where the knowledge is. It is not the knowledge. The Software Architecture Document as the Link In the Rational Unified Process, the Software Architecture Document was the central document of the Elaboration phase. Many teams have dropped it in recent years. It was too much effort, nobody read it, it was out of date after three months. With AI agents the math changes. The agent reads the document, on every task that touches code. And it follows it, as long as the document is short and concrete. In the PetClinic project, the architecture document is docs/guidelines/architecture.md , about 100 lines. It answers exactly the questions the agent would otherwise answer with what it has seen in training: - Package structure: package-by-feature under ai.unifiedprocess.petclinic . Each feature owner , pet , visit , vet has the sub-packages ui and domain . No separate service layer, no DTO layer, unless a use case demands it. - Data access: jOOQ, no JPA, no Spring Data repositories. Records are mapped with Records.mapping Type::new , never with fetchInto . Parent-child relationships use multiset to avoid N+1. - Persistence stereotype: classes are named