AI in practice from Performance Metrics

From the engine room #1: The owner, the tradesperson and the site manager

Written by Thomas Petersen | Nov 23, 2026, 2:15:00 PM

In October I gave a talk about Nexus Runner, the part of our development system Nexus that takes an idea all the way to merged code. In the series it is simply called the runner. A talk forces you to choose what to leave out. This is the long version, in ten parts. Why I built the runner, and what you still have to know when AI writes the code, is in an opening part (#0). It follows the same route as the talk: first the starting point, then the workflow step by step, then the tools and finally what we have learned. Each part can be read on its own, but they are written to be read in order.

Who wrote what

The most important thing first, because the rest follows from it: I have not written the code. Claude sessions have written the runner, the supervisor, the tools around them and the product code they build. They have also written this text. My work is the decisions: what is to be built, what the design should look like, and what may land on master.

It is not that I can't. I have worked professionally with programming and IT development projects for more than 20 years, mostly backend: ten years as a consultant in various places and the last ten years self-employed and as CTO of Performance Metrics ApS.

That is not modesty. It is a division of labour, and it determines how the whole system is built. When code is cheap and can be discarded without loss, developer time is not what is scarce. What is scarce is reliable control and my attention.

The decisions have a background. I am a certified Scrum Master and worked for many years as a Scrum Master at STAR, the Danish Agency for Labour Market and Recruitment, through Edora. That is why the runner speaks Scrum: epics, stories, refinement, a Definition of Done and retrospectives. It is the process I have seen work for teams of people. The rest of the series is about which parts of it also work when the team is made of AI sessions.

AI writes good code, but not alone

A single Claude session can solve a well-defined task quickly and well. That is not where the problem is. The problem shows up across many changes. A session forgets context, it guesses when it does not know, and it can move the finish line to get done: a test that will not go green gets changed instead of the code.

None of those three things goes away with a better prompt. So planning, control and state do not sit with the AI. They sit in ordinary code, and the AI does the creative part.

Three roles

In the talk I used an image from construction. The human is the owner, who decides what is to be built and approves the finished result. A Claude session is the tradesperson, who gets a work order and carries out one bounded piece of work. The runner is the site manager, who checks that the work has been done according to the drawings before the next trade starts.

What the analogy is meant to capture is that the site manager neither builds nor is an AI. The runner is deterministic code. It reads files, counts commits, runs builds and tests and answers yes or no. It cannot be talked round.

Each role has its own characteristics:

  • The human decides what is to be built, clarifies the design in an interview and merges to master. In between, I follow along in Teams and step in only when something is blocked.
  • A session has one task, starts without memory, writes a handoff to the next one and closes. It never talks directly to another session.
  • The runner plans and prioritises, controls every phase transition and measures for itself. It does not trust what a session writes. It also measures itself: what a story costs and how long a task takes.

What a gate is

The word gate comes up in all ten parts. The idea is familiar from test-driven development. First you write a test that fails, then the code that makes it pass, and then you clean up while the test holds. In TDD it is a good habit. With us it is a rule that the runner enforces.

A gate is a check in the runner's code that must pass before the work may move on to the next phase. It answers yes or no. If it answers no, the work goes back. Some examples from the runner:

  • At least one of the spec tests is red before the implementation starts.
  • The spec files are untouched when the implementation is finished.
  • The build and the tests the change requires are green.
  • The handoff to the next session is complete.
  • The story review mentions every single changed file.
  • The build is green after merge.

If a rule matters, it is a gate, a test or a check, not a sentence in a prompt. That is the core idea behind all of it, and it gets its own part at the end (#10).

Intention is not proof

The system works because no session is trusted. When a session writes "all tests are green", that is a claim about what it believes it has done. The runner runs the tests itself. It measures for itself which commits the session has made and which files the diff touches. The session's log has to be filled in, but it proves nothing.

The same goes for the tests. One session writes the test from the acceptance criteria and has to show that it is red before any implementation exists. The runner verifies the red test, commits it and locks the files. Another session does the implementation and may not touch the locked files. If it does anyway, the gate rejects it, however good the explanation. How that works in detail is the subject of #3.

Epic, story and task

The work has three levels:

  • An epic is a goal with a Definition of Done, its own design document and its own branch.
  • A story is a deliverable with acceptance criteria. It has its own branch and its own worktree, so several stories can be built at the same time, and it starts with at most five tasks, because the runner rejects more at refine. Findings from the review can add more (#5).
  • A task is one technical change and always has a spec: the tests that prove it is done.

No session works on more than one task at a time, and no session hands over directly to the next. Every phase transition goes through the runner.

Master is the last boundary

There is one place where the work stops and waits for me: master. Azure DevOps rejects a direct push to master, so everything has to go through a pull request. The runner merges its own finished epics up to an integration branch, runner/main, but no further. I take the last step.

This has to be said precisely, because precision is the whole point of the series. The runner machine runs as one user, and when I merge to master on that machine, that user is recorded as the one who merged. So the fact that the sessions cannot do the same is not a server boundary but a setting in the runner, which stops at runner/main, and my hand on the last merge. It is a risk I have accepted until the sessions get their own identity. How the merge chain works is the subject of #6.

The numbers

Since May, 1,767 stories and 5,012 tasks have been completed, spread across about 250 epics. The state repo, where the runner keeps track of stories, tasks and logs, has 37,045 commits since it was created in August. These numbers are from the product repo, where the runner runs up to eight sessions in parallel. Today the same machine also runs it on two of our other projects with up to two sessions each, so up to twelve sessions share three Claude accounts (#9).

The talk a month ago said 1,140 stories, a number pulled three days earlier, on 16 October. The numbers are not meant to impress. They explain why the control cannot be me. At that pace I do not have time to read every diff, and that is not the intention either. I read the design before the work starts and the result before it lands on master. What happens in between has to be checked by something that does not get tired.

The pace is not the goal in itself. The goal is that a story gets through in the shortest possible time and at the lowest possible cost, without loosening control. That is what the retrospectives on the runner measure, and that is where many of the series' decisions come from (#10).

Less responsibility, not more

The first big decision went the opposite way from most of what I see others do with agents. The trend is to give them more responsibility: longer tasks, more tools and more autonomy. I gave them less.

When we measured in September, a story typically had two tasks, nine out of ten had at most four, and none may start with more than five. Each task has a bounded job and a list of the files it is expected to touch. Everything around the job is controlled by ordinary code: which session starts when, what it is told, what counts as done, and what happens when it fails.

The advantage is that a small job can be checked. A test that was red and is now green is a fact. A diff that touches only the files the task names can be checked. If an attempt fails, it is discarded and a fresh session tries again. That costs tokens and nothing else, and nobody has to clean up after an agent that has worked itself into a corner.

The price is that the system around the agents becomes large. That is the rest of the series.

The example we follow

Throughout the series we follow one real deliverable from idea to master. It was chosen because it is ordinary: an administrator must be able to give a user access per data type, that is queues, licences, policies, statistics and so on, as None, Read or Read and write, instead of a handful of coarse roles. Every SaaS product has a version of that feature. The interesting part is not the feature but the route.

It started with an interview on 4 November and ended up as five epics, 32 stories and 113 tasks. It reached master three times in six days, on 5, 8 and 10 November. Along the way the runner discarded attempts, sessions raised disputes against tests that were wrong, a browser found bugs that no test had caught, and I changed my mind about the design when I saw the result. Each part of the series shows its mechanism on that deliverable, with what actually happened.

The next part starts where it started: with me being questioned (#2).

Numbers as of 19 November 2026.

—
The code is written by AI. So is the text. The decisions are mine.