AI code quality: no sprawl, no drift

This is the main difference. The autonomous factory checks its own quality on every train, against the same standardized metrics, and quality is only allowed to hold or improve. AI coding tools tend to let a codebase sprawl and drift; this one holds the line.

As of 8 November 2026Based on 337,000 lines of code and more than 43 billion tokens burned.

Where drift comes from

When agents write the code and another AI decides whether it is good enough, nothing holds the line. Each change is judged on its own and looks fine.

Components get written again instead of reused, patterns multiply, and quality slides a little with every merge. Nobody notices until the codebase is hard to change.

Metrics are the gate, not an AI

Opinions find problems. Numbers decide what merges.

Gate
A change merges when standardized metrics say so. The same metrics apply to every car of every train, so the numbers compare across time.
AI review
AI review still reads every change. Every finding must quote the code it is about, is checked against that code, and only then counts as real or false. AI review does not get the final word.
Isolated runs
Tests, lint, type checks and static analysis run in isolation on every change, so a result does not depend on whose machine it ran on.

Measured on every train

Nine free static tools, coverage and type checks make up a scorecard that runs on every train. A change may not add a violation.

Train scorecard: first measurement and 8 November 2026
Metric8 NovTrendDirection
Line coverageHigher is betterGoogle: 75% commendable, 90% exemplary (opens in a new tab)91.40%▲ better
Branch coverageHigher is better84.90%▲ better
Function coverageHigher is better88.70%▲ better
Files under type checkingHigher is betterGrows with every car57.2%▲ better
Duplicated lines (jscpd)Lower is betterSonarQube default: at most 3% in new code (opens in a new tab)0.56%▲ better
Import cyclesLower is better0▲ better
ESLint findings on held rulesLower is better408 (97 rules)More checksThe ratchet holds 14 times as many rules as at the first measurement (7 → 97), each at its own count, so the figure rose with the checks, not with defects. 1,688 more findings come from rules that only report.
Unused exports (knip)Lower is better0▲ better
Vulnerable dependencies, high (OSV)Lower is betterCritical: 00▲ better
Semgrep findings (errors)Lower is better38 (0)▲ betterThe fall came with an update of the rule set, not of the code.
Files over 800 linesLower is better0▲ better
Maintainability Index, mean (0–100)Higher is betterMicrosoft: 20 and above is green (opens in a new tab)27.3▲ betterFirst read on 31 October. 65% of files are in the green band. Microsoft scores a method, the factory a whole file, so its levels sit lower by construction.
Car size, median code lines without commentsLower is betterLinearB elite: under 105 lines changed in all (opens in a new tab)57▲ betterFirst read for the week to 25 October. 241 lines changed in all, comments included.
Comment share of the codeTelemetry, no target22.7%= heldFirst read on 29 October.
Vulnerable dependencies, critical / high (Dependabot)Lower is betterCritical: 00 / 0= heldFirst read on 1 November.
Availability: the app, its site and sign-inHigher is better100%= held2,017 checks each in the week to 8 November, no outage; checked since 30 October.

As of 8 November, all nine static tools run on every train, and a tool that did not run fails the release. The trend line runs through the first measurement and the ends of the last three weeks.

A ratchet on code quality

Each quality metric has a floor that only moves up. Over many trains, quality can only accumulate.

Holds
The change keeps every quality metric where it is. It can merge.
Improves
The change makes a metric better. It can merge, and the new level becomes the floor.
Slips
The change adds a violation or lowers a metric. It does not merge until the metric is back.
Higher is betterTest coverage, nightly build on mainPercent of the application covered by tests, nightly from 7 October to 8 November
  • Lines
  • Functions
  • Branches
Show as table
Test coverage, nightly build on main
NightLinesFunctionsBranches
7 Oct84.8%81.5%79.4%
8 Oct84.8%81.5%79.5%
9 Oct85.6%82.3%79.9%
10 Oct87.0%83.8%81.2%
11 Oct87.2%84.0%81.4%
12 Oct87.3%84.1%81.5%
13 Oct87.3%84.2%81.5%
14 Oct87.4%84.2%81.5%
15 Oct87.6%84.4%81.8%
16 Oct87.6%84.4%81.8%
17 Oct88.2%85.0%82.5%
18 Oct88.4%85.3%82.9%
19 Oct88.4%85.3%82.9%
20 Oct88.4%85.3%82.9%
21 Oct90.2%87.2%84.0%
22 Oct90.2%87.2%84.1%
23 Oct90.6%87.6%84.4%
24 Oct90.8%87.9%84.5%
25 Oct90.9%87.9%84.5%
26 Oct90.9%87.9%84.5%
27 Oct90.9%88.0%84.5%
28 Oct90.9%88.0%84.5%
29 Oct91.4%88.6%84.9%
30 Oct91.4%88.7%84.9%
31 Oct91.4%88.7%84.9%
1 Nov91.4%88.7%84.9%
2 Nov91.4%88.7%84.9%
3 Nov91.4%88.7%84.9%
4 Nov91.4%88.7%84.9%
5 Nov91.4%88.7%84.9%
6 Nov91.4%88.7%84.9%
7 Nov91.4%88.7%84.9%
8 Nov91.4%88.7%84.9%

Every finding checked against the code

Every car passes AI review and automated checks before merge. Only confirmed P1/P2 findings hold a car.

Review results, the week to 1 November and the week to 8 November
ReviewWeek to 1 NovWeek to 8 Nov
Review runs9671,037
Findings confirmed real263352
of them P0/P1 (would have hurt a user or their data)712
Findings judged false5733
Precision (real ÷ real + false)82%91%
Real findings per car1.351.38

Different models miss different things, so each car is reviewed by more than one. In the week to 8 November nine in ten of their findings held up when checked against the code.

Defects caught by review before mergeConfirmed real findings per working day, 12 October to 8 November. The vertical dashed line marks 18 and 19 October, two days without work, left out.
  • 2–8 Nov
  • Earlier weeks
  • Trend, weekly average per calendar day

The dashed trend is background: a straight line through each week’s average per calendar day (43, 36, 38, then 50). Defects per car fell from 2.19 to 1.46 and 1.35, then held at 1.38 in a week of 31% more cars, three products and the factory’s own install path.

Show as table
Defects caught by review before merge
DayReal findings
12 Oct18
13 Oct58
14 Oct26
15 Oct70
16 Oct80
17 Oct46
20 Oct22
21 Oct18
22 Oct54
23 Oct71
24 Oct39
25 Oct48
26 Oct4
27 Oct53
28 Oct25
29 Oct44
30 Oct76
31 Oct50
1 Nov11
2 Nov32
3 Nov47
4 Nov112
5 Nov81
6 Nov24
7 Nov24
8 Nov38

What a defect costs

A defect caught before merge is the cheapest defect there is. The factory knows exactly what each one cost.

Lower is betterCost of one confirmed defect caught before mergeUS dollars per defect, four weeks to 8 November
  • Human review, 200 lines an hour$59.12
  • Human review, 400 lines an hour$29.56
  • Rational Trains: review and tests$1.99
  • Rational Trains: review only$1.38

Human review: SmartBear advises reviewing 200 to 400 lines at a time, for no more than an hour. At that pace and €30 an hour, the four weeks’ 409,603 changed lines come to $30 to $59 for each of the same 1,165 defects, assuming a human would find as many. Changes that altered no behaviour, such as a one-time reformat, are left out.

Show as table
Cost of one confirmed defect caught before merge
ItemPer defect
Human review, 200 lines an hour$59.12
Human review, 400 lines an hour$29.56
Rational Trains: review and tests$1.99
Rational Trains: review only$1.38

Everything in BigQuery

Every car and every train writes its metrics to BigQuery, so progress is visible, not claimed.

See every number in Reporting
Functional
What shipped, train by train: cars, review rounds, test runs, pass rate, real and false bugs, cost.
Code quality
The scorecard of every train, including how much code is reused instead of written again.
Your view
It is plain BigQuery: query it, chart it, compare any two trains.

It learns

The same way a good team does: by looking back at every release.

Retrospectives
Every train ends with a retrospective. What it finds goes into how the next train runs.
Critical bugs
A critical bug found while a feature is being built is fixed in the same train, before release.
Triage
AI review over-reports: of 278 “known issue” lines left by 13 trains, 3 were worth fixing. Triage is now part of the factory, so noise does not pile up.

Where the numbers come from

The factory’s figures come from its own BigQuery journal. Industry figures come from the publishers’ own pages.