All insights

How I build with coding agents: a harness for the whole team

By Senior Software Engineer & Architect

8 min read

Photo by Kody Dahl on Unsplash

Your team has been using coding agentsCoding agentA tool like Claude Code or Codex that works on its own inside a repository. It reads the code, plans a change, writes it with tests and documentation, and runs the checks. A harness spells out what the agent may change and the conditions for a merge.More in the glossary → like Claude CodeClaude CodeAnthropic's coding agent, working in the terminal and in the editor: it reads code, proposes changes, and carries out tasks. Like any model, it needs a firm frame and reviewed results.More in the glossary → and CodexCodexOpenAI's coding agent. It takes on tasks in the repository, such as implementing changes or writing tests. Here too, a person reviews the results before they're merged.More in the glossary → for months. One developer has an agent write whole features. Another only uses it for tests. A third turned it off after a bad week. The pull requestsPull requestA proposal to merge a change into the main branch, review included. GitLab calls it a merge request.More in the glossary → in your review queue are bigger than they used to be, they come in three different styles, and you can no longer tell which parts came from a person and which from a model.

I developed the approach in this article for a team I’d joined. Now I bring it to every project. The agents write the code, tests, and documentation. I decide up front what gets built, and I sign off on every change. That makes every change my responsibility.

What is a harness?

A harnessHarnessWritten rules and checks that apply to everyone who writes code, human or model. They include coding conventions, tests that run before every merge, and limits on what an agent may change. The rules and checks live as files in the repository.More in the glossary → is the set of written rules and checks that applies to everyone who writes code, human or model.

Most teams already have the rules: a file in the repository, such as CLAUDE.md or AGENTS.md, that explains how the project is structured and which conventions apply. That’s a good start, but it isn’t a harness yet. A rules file is a wish. A harness is a wish with enforcement.

A harness also covers what happens after the code is written. Formatting, static analysis, tests, and the build run before every merge, on the agent’s work and on a teammate’s alike. It includes an agreement on what an agent may touch, when it has to ask first, and how a generated diff gets read before anyone approves it. And it keeps project knowledge in one place the agent can find in every session: architecture decisions, naming conventions, and the reasons behind the exceptions.

On the team I built the harness for, it had an effect I’d underestimated. The code looked the same no matter who wrote it or which tool they used. The documentation became consistent, because the agent used the same templates as the team. And the software got more stable, because every change ran through the checks, not just the ones where someone remembered to run them.

Spec and acceptance criteria come before the code

I decide what gets built before the agent writes a line. It starts with a round of questions: the agent reads the ticket and keeps asking until no decision is left open. It looks up facts in the code on its own and brings the decisions to me.

The agent writes the spec from my answers. The spec says what will change and which criteria I’ll use to accept the change. I go through it and make sure it matches what I decided. The agent doesn’t write code until I’ve approved the spec.

Without a spec, an agent fills the gaps in a ticket with assumptions, and the result still looks finished. The assumptions end up in the diff, and whoever reviews it has to dig them out. The round of questions surfaces those gaps earlier, as questions I can answer.

Three layers of review before the merge

Between the approved spec and the merge, a change passes through three layers of review, each with a different reviewer: the agent, me, and your team.

Step 1: The agent

The agent follows the harness’s written rules and runs the checks. It writes tests and documentation along with the code, using the harness’s templates. Then it runs a first review before I see the work. It compares the change against the project’s rules and lists what it finds, such as a call in the wrong layer or a missing test.

Step 2: Me, the architect

I built the harness and wrote the agents’ instructions myself. So I know where I can rely on their work and where I need to look more closely.

I test every change myself before it goes into a pull request. In the pull request, I go through the code, and a second coding agent backs me up with its review. That’s where I notice a test that only confirms what the code already does.

There’s a record in the pull request: the steps the change went through and my sign-off. Your team sees what has already been checked before they start reading.

Step 3: Your team

Your team sees the comments from the agents’ reviews and decides which ones matter. They dismiss some, because the agent doesn’t know the reason behind an exception. Then a person reads the code, as always. That person adds what a model doesn’t catch: Does this fit where the module is heading? Is this what the customer meant?

So review is combined, not replaced. The agents take the search for style and convention violations off the reviewer’s plate. The call on architecture and intent stays with the reviewer. I wouldn’t want to work without that support, and reviews have gotten better because of it.

Nothing gets merged until a person has signed off on it.

Three questions a CTO asks

If you’ve watched agents work on your own team, you know three places where things go wrong.

“The agent touches more than it should.”

The harness rules say what’s off limits. A guard checks every command the agent issues before it runs and blocks whatever the rules prohibit.

There’s one more rule: one ticket, one branch, one pull request. The agent never works on several things in one change, and every pull request stays on one topic. If I see something in the diff that doesn’t belong to the ticket, the change goes back to the agent, not on to your team.

“The agent ignores the architecture, especially in the UI.”

Static analysis enforces the boundaries between the layers of the architecture. If the UI accesses data directly, the check fails.

For the UI itself, there is a fixed set of components. The agent has to use them and isn’t allowed to build its own. When I go through the code, I see whether it did.

“The UI is wrong because the agent can’t see it.”

An agent that only reads code doesn’t notice a button disappearing behind the keyboard. Mobile apps are where that hurts most.

My agents take their own screenshots and check them before I see the work. On top of that, there are golden tests: automated tests that compare screenshots. If a screen differs from the approved version, the test fails.

Some criteria only a person can judge. They’re marked that way in the spec, and I go through them myself, with a real phone in my hand. Some on-device tests run automatically, but a person always takes a look as well, so I budget time for that.

One workspace for the whole system

When a product spans more than one repository, another problem shows up. An agent only knows the repository it’s working in. In the frontend, it writes a call the backend doesn’t support, and the code looks convincing.

For those projects, I set up a workspace where the frontend and the backend sit side by side. That gives the agent what it needs to know about the whole system: which endpoint returns what, how the data models relate, and where the boundaries are. It plans a change across both sides and implements it that way.

I’ve seen what that does on a team: developers who normally only know the backend made frontend changes themselves, helped review them, and shipped them. For you as a CTO, that means the work depends less on who happens to be available.

Switching tools without starting over

A harness that lives in the repository isn’t tied to any tool. I went through one switch in the middle of a project, when the tool’s pricing changed. The rules files, checks, documentation, and workspace stayed as they were. The code looked the same afterward, and the only thing the team had to learn was the new tool.

I plan for that from day one. Rules and knowledge belong in the repository, not in a vendor’s settings. Right now I work with Claude Code and Codex, and I’m open to others. The rules apply to every agent, which leaves you free to pick the tool based on price and capability.

What stays with your team

When I leave a project, the harness stays in the repository: the rules, the checks, the templates for tests and documentation, and the workspace. The review process stays too, with the agent doing the groundwork. And your team knows the reasons behind the rules, because they helped write them.

I measure work with agents by whether your team can still build on the code with confidence a year from now.

I bring the harness. Your team and I work out which rules go into it, tailored to your code and your workflow.

Do your code reviews show that agents have been on your team for a while, with no harness around them? Get in touch: How is your project set up, and where would a harness start on your team? I join your team, work in your sprints, set up the harness with your developers, and ship features along the way.

FAQ

Questions about this article.

What is a harness in AI-assisted software development?

A harness is the set of written rules and checks that applies to everyone who writes code, human or model. It covers the project's conventions, the checks that run before every merge (formatting, static analysis, tests, build), and the limits on what a coding agent may touch. A rules file alone isn't a harness. It becomes one when the checks behind it run and the team sticks to it.

Does AI replace code review?

No. Review is combined, not replaced. Coding agents support the reviewer: they read every change and list what they find. I test the change myself and sign off on it, then go through the code. Your team decides which findings stand, reads the code itself, and adds findings of its own. Whether a change fits the architecture is a person's call.

What happens when a team switches AI tools?

Not much, as long as the rules and the project knowledge live in the repository and not in the tool. Rules files, checks, and documentation stay where they are, and the new agent reads the same instructions. The one time I went through a switch, the code looked the same afterward. The only thing the team had to learn was the new tool.

Does every change go through the full process of spec, checks, and sign-off?

Yes. Everything, every time, just smaller. Every change starts with a spec and goes through the same checks and my sign-off. For a small change the spec is short, but there is one.

Let's talk about what you want to build next.

On a thirty-minute video call, you tell me what's coming up and how your team works today. I'll tell you if I can help, and how. By the end, you'll know whether it's a fit.

Send a message

A few sentences are enough. I'll reply by the next business day.

For example: what you want to build, where things are stuck, and when you need it by.

I only use your details to reply to your message. See the privacy policy (in German). This form is protected by Friendly Captcha, and its Privacy Policy and Terms of Use apply.