In early 2026, teams moved from asking coding agents for snippets to giving them whole features. The frontier labs reported large gains.
Anthropic put its company-wide share of AI-written code at 70–90% (Fortune, 29 Jan 2026). In February, OpenAI described a team of three engineers, later seven, that shipped about a million lines of code in five months with "0 lines of manually-written code" (OpenAI, 11 Feb 2026).
At Ema, our live product runs across six repositories. When we assigned coding agents whole features, the code arrived faster, but the output failed in a few repeatable ways:
- —It passed its own checks but missed the feature's intent.
- —It overrode design decisions made months earlier.
- —It changed one repository in ways that broke its contract with another.
Review and rework ended up consuming much of the time saved from not writing as much code ourselves.
We scoped the work to the step where the agents failed most: the build itself. The software development lifecycle comes down to three questions:
- 01How do we define what needs to be built?
- 02How do we evaluate the "what" above: what are the success and acceptance criteria?
- 03How do we build it, ship it & maintain it?
A coding agent cannot fetch information on its own. It works only from the supplied written information, and where none exists, it makes assumptions. This explains the quality and design failures above: the gap is missing information, not coding ability.
This post is about how we made our software development lifecycle better by adopting harness engineering principles. With the harness, each engineer shipped 1.7× the features (i.e. 2 features a month, up from 1.2), and urgent production bugs closed in a median of about 9 hours, down from about 4 days.
Harness engineering: write it down where the agent works
Harness engineering addresses this problem. An agent is only as reliable as what surrounds it. That surrounding system is the harness, and it has five parts:
- —Instructions: the rules it must follow, each with its reason.
- —Tools: what it can use, such as running tests, querying a database or deploying to dev.
- —Environment: where it works and what it acts on: the repositories, the clusters and the environments.
- —State: what happened before this session: decisions already made, progress so far, what is still open.
- —Feedback: how it finds out whether it got it right: tests, evals, reviews and signals from production.
Most of the work is documentation: moving what lived in people's heads into files the agent reads in every session.
One rule holds it together: the repository is the system of record. If it isn't in the repo, the agent doesn't know it. That rule assumes the product lives in one repository. Ours lives in six.
AgentQA: One product, six repositories
AgentQA is a quality assurance system for contact centres. Instead of a supervisor sampling a handful of calls, it reviews every agent-customer interaction:
- —Transcribes each conversation and separates the speakers.
- —Redacts personal information before anything is stored.
- —Scores the conversation against the customer's own QA scorecard, with a cited reason for every verdict.
- —Builds insight about agents: strengths, gaps and coaching needs.
- —Builds insight about customers: why they contact support, how they feel and whether the issue got resolved.
- —Shows the results on a dashboard, and answers questions in plain English through an agentic assistant.
The product spans six repositories.
A call arrives through the web app. The ingestion service transcribes it. Model serving redacts personal data. The control plane hands the redacted transcript to a scoring and insight engine that another team owns. That engine calls the language models through the model gateway, and the web app renders the results.
A single interaction crosses four of our repositories and one externally owned engine before a score is shown. Most failure points are in the hand-offs between them.
Where the truth lives across six repos
With six repositories, each fact needs an assigned home repository. The rule is stated at the top of our harness standard:
Every fact has exactly one home, and the home is where the fact actually belongs.
Two repositories became the anchors, the two marked in the figure above:
- —The contracts repo is the contract home. Every message that crosses between services lives there, along with the runtime rules a message format can't express.
- —The control plane is the spec home. Every feature's spec, plan, evals, decisions and progress live there, one folder per feature.
- —Every other repository keeps its own guide for working inside it, and points at the two anchors for everything else.
A copy goes stale silently, and an agent can't tell a stale copy from the truth. Across six repos, no single pull request can keep the two in step. So we point instead of copy:
- —Documents link to the home and repeat only the one field their argument depends on.
- —A document that must be derived from a source, like the database diagram from the models, changes in the same pull request as its source, or is generated from it.
What moved out of people's heads and into files, across the lifecycle:
| What we need to know | Scattered in | Written down as |
|---|---|---|
| The problem, the users, the UX | PRDs, PMs' heads | spec.md: what to build and why |
| How to build it across the repos | Design docs, Engineers' heads | PLAN.md: how, and in what order |
| Why we chose X over Y | Engineers' heads, Slack and Doc threads | DECISIONS.md: each choice with its reason |
| Where the work stands | PMs' and engineers' heads | PROGRESS.md: updated every session |
| How to check each criterion | Engineer's head | EVAL.md: one runnable check per criterion |
| How to deploy a branch to dev and test it | Engineers' heads | INFRA.md: the dev deploy-and-test loop |
| What broke after shipping, and its lesson | Jira, Slack and Doc threads | BUGS.md, one per feature |
| The obstacles hit while building | The builder's memory of that session | WALLS.md entries |
Define what to build: a feature is a folder
To start a feature, the engineer's AI assistant copies the template folder into specs/<feature>/ and fills it in. Three files carry the definition:
- —spec.md says what and why: user journeys, failure cases and acceptance criteria.
- —EVAL.md is built from those criteria: one runnable check per acceptance criterion, written and reviewed before any code.
- —PLAN.md says how, and in what order, across the repos the feature touches. The test for a plan: a less capable model could implement it without asking a question.
Human review moves from the code to the intent. People no longer gate how the code is written. They gate what gets built and how it will be built, at two points:
- 01Product and engineering align on what to build. Together they review spec.md. Product owns the what and why; engineering checks it can be built.
- 02Engineering aligns on how to build it. The engineers review PLAN.md for the order of work across repos and EVAL.md for the checks that will prove it.
The spec PR holds only the feature folder, and nothing is built until it merges. Then the build PRs open, one per repo, in the order the plan sets: the contracts first, then the services that depend on them.
Case study used in this post:
Custom PII types: Our redaction system covered a fixed set of 31 entity types, the same for every customer. Customers wanted to decide for themselves what counts as personal data in their calls, for example medication brand names.
This feature gives a QA admin that control: switch on hidden built-in types, or define a new type from a description and examples.
- —The assistant drafted the spec (18 user journeys), the plan and the evals (15 acceptance criteria) before any code existed.
- —An independent agent reviewed the folder first and blocked all five files it checked. Every finding was fixed before a person read them.
Define done: proof before code
Spec-driven development usually stops at acceptance criteria. Our definition of done requires seven items, and a spec is ready for review only when each is present or explicitly waived:
- 01User journeys, the happy paths and the failures
- 02Acceptance criteria
- 03Evals: one runnable check per criterion, with its expected result
- 04Non-functional requirements, against SLAs that are written down
- 05The metrics the feature emits
- 06The dashboards that show them
- 07The alerts that fire on them
Deterministic behaviour gets a yes or no; non-deterministic behaviour gets measured like a model. Whether the new category finds medication names depends on a model, so the answer is a rate. Those criteria follow the foundations of ML evaluation: a frozen dataset, a held-out split, and a bar and a kill line written into EVAL.md before the run:
- —The bar: catch at least 80% of real mentions (recall), and be right at least 60% of the time when it hides something (precision).
- —The kill line: if recall stays under 60% after two attempts, stop and switch to retraining the model.
- —The test set: 670 real call transcripts, frozen, split into 507 to tune on and 163 held back for scoring.
- —The result on the held-back set: precision 1.000, with not one wrong hide across 44 mentions; recall 0.727.
Recall was below the bar. The next step was recorded as a decision in DECISIONS.md, not handled by re-running the eval.
Build, ship and run it across environments
Once the spec PR merged, agents built custom PII in five build PRs, one per repo, working from PLAN.md in parallel. Deployment was harder than the build. Getting each change into the right environment, in the right order, and proving it there depended on knowledge that lived only in people's heads.
The deploy order is a written decision, not a habit. We deploy in a fixed order: first the services that process each call, then the control plane, then the web app. Why: if a service receives a new field it doesn't know yet, it drops the field without raising an error. Deploying the receivers first means every new field has somewhere to land.
Dev is shared, and other teams deploy over it many times a day. During this build, their deploys replaced one of our services five times, and one invalidated a full eval run. Every check now first confirms each service is on the expected build.
Staging confirms; it doesn't prove. A change reaches staging and production only after it passed on dev.
When it breaks, the harness learns
If a bug found after release is fixed only in code, the feature's files stay wrong, and the next agent rebuilds the same mistake from them. So every bug fix also updates the harness.
Each bug is logged with the feature it belongs to. It goes into that feature's BUGS.md, and the entry has to say which file should have caught it:
- —The spec missed it: nobody wrote down that journey or that requirement.
- —The checks missed it: the requirement was there, but no check tested this case.
- —The code drifted: it didn't do what the plan said.
A bug counts as closed only when two things are done: the code is fixed, and the feature-spec that missed it is fixed too.
Break the Product session. Before a feature reaches customers, an AI assistant builds a test kit and attacks the feature with it; for custom PII it found 9 problems. Once those are fixed, the team runs the same session with the same kit and gets creative.
Grow the harness only after a real failure
The harness's top rule: don't solve problems we haven't hit yet. Start with the smallest structure that works. Add a file, a rule or a check only when something real went wrong without it.
How the harness grows. Every obstacle hit during a build goes into that feature's WALLS.md; custom PII logged 14. Most stay as notes. When the same lesson shows up again, in another session or another feature, it moves up one step:
- —A lesson becomes a rule in the file where it belongs, with the reason written next to it.
- —When several rules keep being used together, they become a skill: one step-by-step playbook, written so any assistant, or any engineer, follows it the same way. The dev rules in INFRA.md became the deploy-to-dev skill. The harness holds 15 skills today.
- —When a skill runs so often that nobody should have to remember to start it, it becomes an agent: our harness has a spec-adversarial-reviewer agent, a code-reviewer agent, and so on.
The ROI of the harness way
The return was measured in three areas: feature shipping rate, production incident count and fix time, and engineering time spent on external-facing documents.
Feature velocity
How we counted: merged PRs across the six repositories, and features marked complete on the team's roadmap (new features and enhancements, not bug fixes).
| Period | Engineers | PRs per engineer per week | Features shipped | Features per engineer per month |
|---|---|---|---|---|
| Before the harness (April – May) | 7 | 2.2 | 16 | 1.2 |
| With the harness (June – October) | 6 | 3.8 | 56 | 2.0 |
What the numbers say:
- —Fewer engineers shipped more features. Each engineer shipped about 2 features a month with the harness, against about 1.2 before it.
- —The design work became visible. 60+ spec PRs carried the what, why, how and proof of each feature into a place that can be reviewed. Before the harness, that conversation lived in chat threads and was never counted.
Incidents
Urgent bugs were closed faster. Data: every urgent (P0) production bug filed against the product in our bug tracker:
| Before the harness (April – May) | With the harness (June – October) | |
|---|---|---|
| Urgent production bugs | 4 | 15 |
| Median time to close | about 4 days | about 9 hours |
| Closed within a day | 1 of 4 | 12 of 15 |
The fix path is written down. The bug goes into the feature's BUGS.md, deploy steps live in INFRA.md, and the feature's spec says what correct looks like.
Whoever picks the bug up does not need to find the person who built the feature first. Of all the changes, this one saved the team the most time.
External-facing documents
- —The architecture and data-journey document that customers' security and compliance teams read is an export of one harness file. Any PR that changes a data fact must update that file in the same PR, so the export does not drift.
- —The public product docs: the 16-page AgentQA doc is refreshed every week by an automation. It reads the repositories and opens a PR for product to review.
Both save engineering time for the same reason: the facts already have one home, so a customer document is assembled, not researched.
Our assessment of the harness's main effect: a six-person team produced the output of a larger one. Engineers were not blocked on each other, because the information each one needed was in the harness. Part of the gain came from improvements in coding agents.
Try it yourself, and what we are building next
To adopt harness engineering, start from your own repositories, not from a copy of our folder. Open Claude, or another AI coding assistant, inside your repositories and give it this prompt:
1I want to set up harness engineering for <product>, which spans these repositories: <list>.2The goal: everything a coding agent needs to build, ship and run this product is written3down in the repositories, with one home for each fact.45Work with me in this order. Stop for my review after each step.671. Map the scattered knowledge. Read the repositories and ask me questions. List what8 lives only in people's heads, chat threads or old tickets: how we decide what to build,9 how we know it works, how we deploy and to which environments, how we debug10 production, and where bugs go.112. Pick the homes. Propose one repository as the system of record for the product, and12 one home for each kind of knowledge from step 1. Where a fact already lives in code,13 point to it instead of copying it.143. Write the entry point. Draft an AGENTS.md that is a map, not an encyclopedia: what the15 product is, where each kind of knowledge lives, and the rules that apply everywhere,16 each with its reason.174. Create a feature template. One folder per feature: spec.md (what and why, user18 journeys, acceptance criteria), EVAL.md (one runnable check per acceptance criterion),19 PLAN.md (how, and in what order), DECISIONS.md (each choice with its reason) and20 PROGRESS.md (updated every session). Keep it small; add files only when we feel pain.215. Write the run book. One INFRA file: our environments, how to deploy to each, how to22 check what is running, and where the logs are.236. Set up the learning loop. A WALLS.md for obstacles hit while building, and a BUGS.md24 per feature for bugs that escape. When a lesson repeats, propose a rule. When related25 rules pile up, propose a skill. When a rule keeps being broken, propose a CI check.267. Pick one feature we are about to build and take it through the template end to end:27 a human reviews the spec and the eval before any code is written.2829Do not invent processes we do not have. If you cannot find where something lives, ask me.
Our next problem: the harness changes only when a person changes it.
Target state: an agent reads the walls and bugs files across every feature, spots the lessons that keep coming back, and proposes the change itself. The change is a rule, a skill or an automatic check, with its reason. A person only reviews it.
References
- —OpenAI, "Harness engineering: leveraging Codex in an agent-first world" (February 2026): openai.com/index/harness-engineering
- —Anthropic, "Effective harnesses for long-running agents": anthropic.com/engineering/effective-harnesses-for-long-running-agents
- —Walking Labs, "Learn Harness Engineering", a free course with lessons and templates: walkinglabs.github.io/learn-harness-engineering
EOF — Abhishek Niranjan · 2026-12-01 · thanks for reading.
