Measuring developer work when agents write the code
Why counts of lines, pull requests and tokens say little, and what to measure instead
Why the old counts stopped working
An engineer with three agents running can open forty pull requests in a month. Two years ago that number would have marked a star or a problem. Now it mostly tells you how many agents they kept busy. Counts of lines and pull requests measure the agent's typing speed, and the agent types as fast as anyone lets it.
The newer dashboards count usage instead: prompts sent, tokens spent, share of code written by AI. Those numbers reward activity. A person who spends twice the tokens on a change that gets reverted looks more engaged than a colleague who fixed the same bug once.
What a developer adds in this setup is the judgment: what to ask for, when to steer and what to keep. The fair way to measure that work is to look at what came out of it, at what it cost to get there, and at how the person worked with the agent along the way. We have spent the last months building such a measure at work, and testing it on real repositories. The numbers below come from that work, and so do the places where it failed.
The older frameworks still help at the team level. DORA's four keys describe how well a delivery pipeline works, and the SPACE framework argued in 2021 that no single number captures a developer's productivity. Neither was built for a person who directs six agents at once and reviews what they return.
Separate the input from the output
Every piece of work gets three readings. The input is how the person worked with the agent: whether the ask was clear, whether they gave the context it needed, whether they planned before building and reviewed what came back. The output is the work itself, judged on its own. The cost is everything it took to reach a result that held.
The three readings sit side by side on the page and are never added into one score. Adding them would hide the most useful question the data can answer, which is whether good input predicts good output at all.
A lesson from model routers explains why. A router that sends "change the button color" to the cheapest model per token can end up paying more, because the cheap model does not know the codebase and needs three tries. What matters is the cost to resolution. People work the same way. Some engineers write short prompts, agree with the agent most of the time and rarely change course, and still ship better work than most of the team. A score built on prompt style would mark them down.
So the output judge works blind. It never sees the prompt score, the person's name or the cost. The prompt score reaches anyone's feedback only after it has been shown to predict the output inside the same kind of work, measured against a plain baseline of counts. Until then it is a hypothesis about good practice.
Scoring the output
The output score has two parts. The review reads the work. The outcome records what happened to it after delivery.
The review
A model reads the ask, the full diff, the files the change touches and the repository's own rules. It scores a fixed set of fields from 1 to 10, and every score cites the lines it is about. A teammate can add their own score beside it.
| Field | For code | For a document, analysis or deck |
|---|---|---|
| 1 | Fit to the ask | Answers the ask |
| 2 | Correctness | Accuracy |
| 3 | Clean integration with the existing structure | Fit for its reader |
| 4 | Simplicity | Ready to send |
| 5 | Verification inside the change | Safe to share |
| 6 | Security, left blank when nothing security-relevant changed |
Integration is the field that needs the most context. Our repositories keep a map of their flows and components, with the boundaries each one may cross, so the judge can check a change against the structure it was supposed to respect. Without that map, "clean integration" turns into taste.
The outcome
The second part looks at what the work did after it shipped. It falls into one of four bands. Held means merged, never reverted and with no fix to its lines within 14 days. Held after fixes means it stayed in but needed later repair. Did not land covers work that was closed or thrown away. Not scored is for work with no honest signal, such as an exploration.
We use bands instead of a number from 0 to 100 because the evidence is a handful of events. A merge followed by one small fix cannot support a decimal, and a decimal invites ranking.
One rule keeps the two parts from overlapping. Anything that happened before delivery, such as review rounds or parallel attempts that lost, goes into cost. Anything after delivery, such as a revert or a fix to the same lines, goes into the band. Counting review rounds in the band would charge the same effort twice.
Where it broke
Deciding what counts as a fix turned out to be the hard part. Line overlap alone measures churn, and churn includes plenty of healthy work. A later change now counts as a fix only when it overlaps the lines and also states a fix intent, carries a person's link to the original or comes from a reviewer's suggestion someone kept.
Even with that rule the band was unstable. On one repository of 462 pull requests, the share marked held moved from 33% to 66% depending on which detection rule we used. On our team's repository, 436 scored pull requests came out at 88% held, 5% held after fixes and 8% not landed, with no reverts. When we checked the detected fixes by hand, between 29% and 67% of them were real fixes. Our gate was 80%.
So the first version shows the facts (merged, reverted, later changes to these lines) without the band words, until fix detection passes the gate. In the meantime the review gets calibrated against something we already had: 80% of the team's pull requests carry a peer review from a colleague.
Cost per unit of quality
Cost to resolution counts every model call from the first prompt until the work held. That includes the parallel attempts that lost and the later fixes, which get charged back to the work they repaired. When some calls went unrecorded, the figure reads "at least $X". Prices are list prices, so two teams on different contracts see comparable numbers.
The person's time sits beside the money. It is their minutes with the agent, with pauses over 15 minutes left out. It is never turned into money per person. A combined view adds the two using one hourly rate for the whole workspace, which its owner sets and every page that uses it prints. Nobody's salary appears anywhere.
The money alone gives the wrong answer often enough to matter. We ran a worked example on invented data from a seeded script, eight people and four weeks of work, with effects planted on purpose so we could see whether the method finds them. In it, one engineer does most of the work by hand in small agent turns. On model spend alone she is the cheapest person on the team, at 0.60 of the team's cost per held piece. Once her time counts, at $60 an hour, she is the most expensive, at 1.55. A colleague who runs agents in parallel goes the other way, from 1.01 on spend to 0.77 combined.
Parallel agents on features show the same pattern. They cost $20.54 a feature in model calls against $12.06 for one agent at a time. With time counted they cost $88 against $112, because the work took 54 minutes of attention instead of 96. In a bug fix, 87% of the combined cost was the person's time.
That matches outside evidence. METR's 2025 study of experienced open-source developers found they took 19% longer on tasks with AI tools while believing they had been faster. A measure that only watches spend would never see that, and a measure that only watches time would miss the money a parallel run burns.
Time has its own blind spot. It only sees time with the agent open, so someone who finishes the work by hand in an editor looks fast. Both lenses stay on the page until a first real test shows whether the time figure is reliable enough to lead.
Patterns and quadrants
Cost and outcome together give a picture of how a team works. The unit in that picture is a piece of work. Each piece sits inside its class, which is its kind of work crossed with its size: a small bug fix, a large feature, a new document, a revised analysis.
Pieces make a better unit than people. There are enough of them: eight people make eight dots of noise, while the same eight people made 133 pieces of work in four weeks. Hard work also stays fair: one engineer takes the gnarly features, and per piece those cost 1.8 times the class median while all five of them held, which reads as expensive but reliable.
Inside a class, cost runs across on a log scale against the class median, and the outcome runs up. That gives four quadrants.
Held and cheap is the pattern to learn from. Held and dear is reliable work that cost more than it had to. Did not hold and cheap is the false economy, the quick first pass that needed fixing later. Did not hold and dear is money that resolved nothing, and the lead should see that total every week.
The useful move is a contrast. Take the held-and-cheap pieces in a class, set them against the held-and-dear ones, and look for what differs: a skill the agent loaded, the model that ran, whether there was a plan, whether the context was summarized three times. Check that the cheap side did not push its cost into later fixes. Then write the difference up as a practice that installs into every agent on the team, give it to half the team first, and compare the two halves four weeks later.
How much data that takes
Cost per piece has a long tail. On our team's real bug fixes the spread was 1.33 log units. At that spread, telling apart two practices where one costs twice the other needs about 58 pieces on each side. A class needs 30 judged pieces from at least 5 people before it is shown as quadrants at all, and that floor is far below what a contrast needs.
Held rates are worse. One person with 8 judged pieces and a true held rate of 75% has a 95% range from 45% to 100%. Two people's held rates cannot be told apart inside a quarter.
The worked example made this visible. The script planted a real effect in operations work, where giving the source sheet in the first message raised the chance of holding by 12 points. Only two people did that kind of work, and their 34 pieces showed the opposite, 62% held with the sheet first against 78% without. With two people, a statistic is a coin toss.
Keeping the classes honest
Classes come from a short fixed list, so a lead can read a class name and say whether two things belong together. The author can correct a wrong class with one click until the outcome is final. After that, a change needs a second person on the project to agree, which closes the cheapest game: moving an expensive bug fix into "feature" once you know how it ended.
The quadrant itself is waiting. Until a quality signal passes validation, the first views show cost and method, with the quality facts printed beside each piece.
Using it fairly
A measure like this becomes surveillance the moment it ranks people, and it stops measuring anything the moment people optimize for it. Goodhart's law applies with full force. So the rules about use carry as much weight as the math.
Nobody gets a league table. Each person gets a private weekly note that compares their work with the team's best work of the same kind and gives one tip with its evidence, sometimes with a teammate who has offered to show how. The lead gets the team's quadrants and the money that resolved nothing, along with the practices that worked and the people who have agreed to teach.
Small groups are never compared. A class with fewer than 30 pieces from 5 authors stays out of comparisons. A person needs 8 pieces in a class before they see their own summary in it. No view ever shows a group of fewer than 3 authors.
Outcomes settle slowly and can be challenged. A band becomes final after 14 days for code and 7 for other work, and anything later shows as late. Anyone involved can contest a band with a reason from a fixed list, and the piece leaves every comparison at once while the contest is open.
Some work is never scored. Private work, explorations, reviews of other people's work and automated runs stay out. Private work counts only in its author's own numbers.
Credit follows the artifact. A score attaches to the pull request or the delivered document, and each person's role on it (owner, contributor, starter) comes from their share of the lines. A harness or a model gets credit only when it made at least 80% of the cost.
The first version is deliberately small: scores per pull request, engineering work only, with no ranking, quadrant, team table or tips. Each of those arrives only after the test in front of it passes.
TL;DR
- Line counts, pull request counts and token totals measure the agent. A developer's contribution is judgment, and it shows in the result.
- Keep three readings apart: input (how the person worked with the agent), output (the work, judged blind) and cost to resolution. Never add them into one number.
- Score output with a cited review on fixed fields and an outcome band from what happened after delivery. Anything before delivery is cost.
- Count cost from the first prompt until the work held, including losing attempts and later fixes, with the person's time beside the money.
- Compare pieces of work inside their class, never people across classes, and learn from the held-and-cheap ones.
- Rank nobody and show nothing below the minimum sample sizes. Validate every signal before it reaches anyone's feedback.