Foredeck
DocsOpen ForedeckRequest access
  1. Foredeck
  2. Software factory guide
  3. Software factory metrics

Guide · Published November 20, 2026

Software factory metrics

Measure a software factory by what its changes do in production, not by how much it produces. Five metrics cover most of it: change survival, defect escape rate, cost per surviving change (read next to cost per merged change), human touch rate and time to recover. Work them out per change, and compare agents, models and prompts with them, never people.

On this page

  1. The short answer
  2. Start with the change
  3. The five metrics
  4. An example
  5. What misleads
  6. DORA metrics
  7. Compare setups, not people
  8. Where Foredeck fits
  9. FAQ

Start with the change

A software factory turns a queue of work into shipped software, and with coding agents it can turn out a lot of it. Every metric below is counted per Change: one pull request, from the agent run that wrote it, through its checks and merge, to its deploy and what happened after. That one record is what lets you join cost to outcome, and outcome to the agent, model and prompt that made it.

Two rules keep the numbers honest. Judge a change only once it has had time to fail, and keep changes that couldn't be judged out of the rate instead of counting them as successes.

The five metrics, and how to compute them

1. Change survival

The share of changes that lived through a set window in production without being reverted, rolled back, turned off or tied to an alert or incident. It's the factory's yield.

survival = survived ÷ (survived + regressed + rolled back + reverted + turned off)

Changes still inside their window, and changes nobody could judge, stay out of both sides. The window should start when users can see the change: at the production deploy, or, for a change behind a feature flag, when the flag reaches the rollout you meant it to have. A change sitting behind a flag at 0% hasn't survived anything.

Data it needs: merges, production deploys, reverts, rollbacks, alerts or incidents attributed to a release, and flag state over time.

2. Defect escape rate

Of the defects found, the share found in production rather than by the factory's own checks. It tells you whether the checks are keeping up with the workers.

escape rate = defects found after release ÷ (found after release + caught before merge)

The top is the easy half: regressions, reverts and incidents traced to a change. The bottom needs the defects your checks caught, so count failed checks that led to a fix on the same pull request, not every red build. A flaky test isn't a defect caught. A rising escape rate with steady survival usually means changes are getting bigger or riskier, so read it by risk.

Data it needs: check results per pull request, which failures were real, and post-release defects linked back to the change that caused them.

3. Cost per surviving change

What the factory spent, divided by the changes that survived. Changes that failed still cost money, so their cost stays in the top.

cost per surviving change = cost of resolved changes ÷ changes that survived
cost per merged change = cost of resolved changes ÷ changes resolved

Show the two side by side. Cost per merged change is what most teams report, and the gap between the two is the price of the changes that didn't hold up. Leave changes with no cost data out of both ratios rather than counting them as free, and say how many changes the cost covers.

Data it needs: the cost of each agent run (tokens at the price you actually pay, plus compute), tied to the pull request it worked on, and each change's outcome.

4. Human touch rate

The share of agent changes where a person had to step in before merge: pushing a commit to the agent's branch, fixing a failed check by hand or restarting a stuck run.

touch rate = agent changes a person edited or rescued ÷ agent changes merged

An approval that your merge policy requires isn't a touch: that's the gate working. Touch rate tells you where a setup has earned more unattended scope and where it hasn't, and it only means something per agent, model and prompt.

Data it needs: who authored each commit on the pull request (agent or person), and run records showing restarts and manual fixes.

5. Time to recover

How long a bad change stays in front of users once it's been noticed: from the first alert or report to the moment it's contained, by a flag turned off, a rollback or a revert deployed.

time to recover = contained at − detected at, reported as a median and a 90th percentile

Use the median and a high percentile, not the mean, since one long incident drags a mean around. A factory that ships more changes needs this to fall, because it will have more bad ones to contain.

Data it needs: alert and incident timestamps, deploy markers, and an audit log of flag changes.

An example: the cheaper agent that wasn't

The numbers here are illustrative, not from any real team. Two setups each resolved 20 changes in a month.

Illustrative numbers
SetupSurvivedCostPer mergedPer surviving
A17 of 20$180$9.00$10.59
B11 of 20$130$6.50$11.82

By cost per merged change, B is 28% cheaper. By cost per surviving change it's the more expensive one, and that's before the time people spent on the nine changes that failed. Twenty changes is also a small sample: a gap this size could be luck, so look at more weeks before you switch.

Why tokens, PR throughput, merge rate and lines of code mislead

These numbers are easy to collect, and they all rise whether or not the work was good. With agents, that's worse than it used to be: as LeadDev put it, “every metric that tracks volume, speed, or frequency can now be inflated effortlessly by an agent” ( LeadDev).

Tokens measure effort, not results. In LeadDev's 2026 AI Impact Report, 58% of respondents said token-usage metrics are ineffective (LeadDev). When usage was ranked, people inflated it: Amazon took down an internal leaderboard of AI tool use after staff ran agents on needless tasks to climb it, and Meta shut a similar ranking (CIO). Tokens belong in the cost numerator, not on a scoreboard.

Pull request throughput rewards splitting. An agent that opens three pull requests to land one fix looks three times as productive, and a change that's reverted next day counts the same as one that lasts.

Merge rate mostly measures your gate. If changes merge when checks go green, an agent can retry until they do, and a high merge rate can mean the checks are weak as easily as it means the work is good. A merge is where a change's record starts, not where it ends.

Lines of code was a weak measure before agents, and more code isn't more value. GitClear's analysis of 211 million changed lines found copy-pasted lines outgrowing moved, reused code for the first time in 2024 (GitClear).

Even how fast it feels can mislead. In METR's 2025 trial, 16 experienced open-source developers took 19% longer on tasks with AI tools allowed, yet afterwards believed the tools had sped them up by 20% (METR; METR notes the tools have moved on since). Outcomes in production don't depend on anyone's impression.

How DORA metrics relate

DORA's five software delivery metrics are change lead time, deployment frequency, failed deployment recovery time, change fail rate and deployment rework rate, grouped as throughput and instability (DORA). Factory metrics build on them rather than replace them:

  • Change fail rate is the closest relative of survival. DORA counts deployments that needed immediate intervention. Survival counts each change, over a window, and so it can name the agent, model and prompt behind a failure.
  • Failed deployment recovery time is time to recover, at the deploy level.
  • Deployment rework rate, the share of unplanned deployments caused by a production incident, is a cousin of escape rate.
  • Lead time and deployment frequency are where agents make the numbers easy to move. LeadDev argues that deployment frequency “stops signalling team health and starts signalling tool adoption” (LeadDev).

DORA's own research is a reason to weight instability. Its 2024 report found that rising AI adoption went with an estimated 7.2% drop in delivery stability (Google Cloud). In 2025, adoption was linked to higher throughput, while instability kept rising (Google; InfoQ). Both are correlations, not proof that AI caused either. What DORA's metrics leave out is cost, and who or what made each change. Those are the two things a factory can act on.

Compare agents, models and prompts, never people

The point of these numbers is to decide what to change in the factory: which model to run, which prompt or instruction file to keep, which kind of work an agent can take on alone. Those are comparisons between setups. DORA warns against turning its metrics into goals and against using them to compete with other teams (DORA), and the same goes double for people. A per-engineer survival rate mostly measures which work they were handed, and the fastest way to improve it is to stop taking risky work.

To make a comparison between setups fair:

  • Credit one setup per change. When several agents touched a pull request, pick a rule, such as the setup with the largest authoring spend, and stick to it.
  • Compare like with like. A setup given only docs fixes will beat one given migrations. Split or filter by risk.
  • Show the sample size. Hide rates for groups of a handful of changes, and show an interval, not just a point.
  • Treat before-and-after with care. When you change a prompt, other things change that week too. Look for a shift that lasts over several weeks.

Where Foredeck fits

Foredeck is the stats and control plane for your software factory. Each pull request becomes a Change, tied to the agent run, model and prompt that made it, with its checks, deploys and run cost. After its survival window, seven days by default, it gets an outcome: survived, regressed, reverted, rolled back or turned off.

The factory scorecard computes change survival and cost per surviving change next to cost per merged change by agent, model and harness version, with a minimum group size and a single credited setup per Change. Defect escape rate, human touch rate and time to recover aren't on the scorecard yet. A Change can ship behind its own Flag, with every Flag change audited. It's built for a light factory, with you at the helm.

Request accessWhat is a software factory? →

Software factory metrics FAQ

What are the most important AI coding agent metrics?

Start with change survival and cost per surviving change. Survival says whether an agent's changes hold up in production, and cost per surviving change says what each one that held up really cost, including the ones that didn't. Add defect escape rate, human touch rate and time to recover once you have those two.

Are DORA metrics enough to measure a software factory?

They're a good base, and change fail rate, recovery time and rework rate carry straight over. They're measured per deployment and per team, though, and they say nothing about cost or about which agent, model or prompt made a change. A factory needs those to decide what to change next.

How long should a survival window be?

Long enough for most problems to show up, short enough to act on. A week is a common default. Start the window when users can actually see the change, not at the merge, and keep it the same across everything you compare.

Should we track survival rate per engineer?

No. Most variation in results comes from the system: the codebase, the tests, the harness and the work itself. Per-person scores invite gaming and tell you little you can fix. Compare agents, models and prompts, where a change to the setup is something you can actually make.

© 2026 ForedeckBuilt for light factories, with people at the helm.HomeDocsinfo@foredeck.ai