
Part 3 of 8 · Factories, Loops and the New Orchestrators
Success Is the Compiler
Part 3 of 8 in a series, Factories, Loops and the New Orchestrators. Previously: Part 1, Vibe Coding Built the Prototype. Who Builds the Next Hundred?, Part 2, One Factory Is Not Enough.
For decades, the compiler was the first judge of our work.
You wrote something, you ran it, and within seconds you knew whether it was valid. Red or green. The feedback was instant, objective and free. Whole engineering cultures grew around that loop: unit tests, linters, continuous integration.
But the compiler never told us whether the code was valuable. It couldn't. It answered one question, "is this well-formed?", and left the harder one to people, to roadmaps, to quarterly reviews, to the market.
That division of labor worked because producing valid code was expensive. Humans wrote it slowly, so we spent our attention on whether it was the right thing to write.
Then agents arrived.
The old question got cheap
An agent can now produce valid, compiling, test-passing code at close to zero marginal cost. Ten variants, a hundred, overnight. "Does it compile?" and "do the unit tests pass?" stopped being interesting questions. They are still necessary. They no longer separate good changes from bad ones.
Which means the scarce thing moved. If validity is free, the only question left is the one the compiler never answered: does this change move the system closer to what success means?
That is the compiler a factory needs. And someone has to write it.
The activity trap
The tempting shortcut is to measure what's easy to see. Tokens consumed. Pull requests merged. Lines generated. "Percent of our code written by AI."
These numbers are attractive because they go up fast, they are easy to collect, and they make a good slide. They also measure the factory's activity, not its results.
Goodhart's law says that when a measure becomes a target, it stops being a good measure. Tell a team to maximize AI-generated code and you will get a lot of AI-generated code. Some of it will be needed. Much of it will be extra surface area someone now has to review, secure and maintain. The cost of that code does not appear on the dashboard that celebrates it.
Activity is never the measure. A factory that is proud of its throughput, without knowing what the throughput bought, is a very efficient way to build the wrong thing.
Define success before you define the line
So what do you measure? I think a factory needs three things, and I'd argue it isn't finished without them.
A north star: the single outcome the factory exists to deliver. Not "ship features". Something a business person would recognize as success, such as faster time to a working system in production, or more customers finishing a process.
A few leading indicators: signals that move earlier than the north star, so you can steer before the slow number arrives. Keep them few. Three well-chosen ones beat fifteen.
And guardrails: the things that must not get worse while you chase the rest. Security posture, cost, performance, accessibility, compliance. A guardrail is a measure with a veto. Moving the north star by breaking a guardrail is not progress.
These belong in the factory's definition, next to the type of system it builds and the constraints it works under. If you can't write them down, you have a code generator with good marketing.
From measures to gates
A measure you only look at on a dashboard is an opinion. A measure wired into the line becomes a gate: a test or validation that a change must pass before it moves forward.
I think of it as a ladder.
At the bottom, functional tests. Does it do what the spec says? These run in seconds.
Next, parity tests, which matter most in modernization. Does the new system behave like the old one on the cases that count? When the old system is the best specification you have, its behavior is the test.
Above that, experience and quality checks: accessibility, performance, security scans, the guardrails made executable. Minutes to hours.
At the top, business-outcome checks after release. Did completion go up? Did the time to value drop? These take days or weeks, because reality is slow.
Both ends belong in the loop. The fast gates keep the line moving. The slow ones tell you whether the line is pointed the right way.
Two illustrations, both generic.
A modernization factory might define its north star as time to the first migrated system running in production. Its gates would include parity against the legacy system's behavior, a performance guardrail, and a security gate. The outcome check is whether the migrated system actually went live and stayed there.
A customer-onboarding app factory might set completion rate as its north star, with time to complete as a leading indicator and error rate as a guardrail. A change that shortens the flow but raises errors fails the guardrail, however good the demo looked.
The shape is what matters: every measure has a gate, and every gate traces back to a measure.
One question for every change
The decision test is short enough to put on a wall:
Which measure does this change move, and which gate proves it?
If a proposed change can't answer the first half, it is activity. If it can't answer the second half, it is a hope. Both are fine for exploration. Neither belongs in a factory's main line.
This question is also an excellent way to say no. A lot of what agents can now produce fails it, politely and without drama.
Gates are how trust gets built
There is a second reason this matters, and it is about delegation.
People delegate when they can see evidence. A manager hands over more when the work keeps passing the checks that matter. The same logic applies to agents. An agent that has produced changes passing functional, parity and guardrail gates over time has earned more room than one that has produced nothing but confident prose. Autonomy should be a result of evidence, and it should be revoked when the evidence turns.
There is one rule I would not bend. The factory must not write its own exam. Measures and gates are owned by people, because a system that sets its own targets and then grades itself will eventually pass. I'll come back to this later in the series: a factory never grades itself.
The tradeoffs are real
None of this is free.
Some measures are slow. Business outcomes can take weeks to show. Use leading indicators to steer in the meantime, and record a look-back date for the slow measure so someone actually returns to it.
Some measures get gamed. Any number with a reward attached will be optimized. Pair each measure with a guardrail that catches the obvious way to cheat it, and prefer outcomes over counts.
You can over-instrument. A hundred gates is a bureaucracy that agents will be very good at satisfying. Start with the few measures that decide whether the factory is succeeding, and add a gate only when you can name the measure it protects.
Gates need maintenance. A gate that no longer reflects what success means is worse than none. Review them on purpose.
Questions worth asking right now
- What is the north star of each of our factories, in one sentence a business person would sign?
- Which guardrails must never get worse, and are they executable, or just written in a policy document?
- For our last ten changes, can we name the measure each one moved?
- Which of our numbers measure activity, and who is proud of them?
- Who owns the gates, and is it anyone other than the thing being graded?
The compiler told us the code was valid. In a world where validity is free, success has to take its place.
Key takeaways
- Agents made "valid" cheap, so validity can no longer be the main test. The factory's real compiler is success.
- Tokens, PRs and lines of code are activity. Goodhart's law applies: never the measure.
- Define a north star, a few leading indicators and guardrails as part of the factory, then turn them into a ladder of gates from functional tests to business outcomes.
- For every change, ask which measure it moves and which gate proves it. People own the measures and the gates, and agents earn autonomy from the evidence.
I'd love to hear which measure your team would put at the top of the ladder, and which one you'd quietly retire.
#AIAgents #SoftwareEngineering #ProductStrategy #EnterpriseAI
Earlier in this series
- Part 1: Vibe Coding Built the Prototype. Who Builds the Next Hundred?
- Part 2: One Factory Is Not Enough
Related reading from me