The factory after the code
Toward the industrialization of software engineering
A few days ago two articles fell into my hands and left me talking to myself. One, a Thoughtworks report* on how engineering changes once a machine starts writing the code. The other, an essay by Konstantine Buhler*, of Sequoia, looking higher and further out: we externalized our muscles and built the modern world, he says, and now we're externalizing the mind. Each confirmed things I'd been chewing over and brought me new ones. The one that stuck with me most is this. The tests, the types, the linter, the CI, the permissions, the environment that comes up the same on your machine and on mine. For twenty years all that was the scaffolding: what surrounded the real work, which was banging out the program. Turns out it was the other way around, and we didn't notice until the program started being written by a machine.
When generating code was expensive and slow, the sums came out that way. The costly bit was writing; the rest, a good craftsman's prudence. But once the price of generating collapses, the whole calculation flips. If producing is free, what's scarce isn't the production: it's being able to trust what's produced. And trust isn't a feeling. It's a pile of concrete work: checks that pass, limits that don't get crossed, tests someone bothered to write to keep the machine from going off the rails.
That pile of work is what the Thoughtworks one names, with a term already going around the trade: *the harness*. And plenty of people talk about "harness engineering" as if it were a newborn profession. I'm a bit wary of the name, we do get carried away christening categories, but not of the idea. The idea is old and good: the code the model spits out is the part; the harness is the factory that decides whether that part ships or not.
My hunch is that what's happening has a name that scares less than "harness" and explains more: the manufacture of software is being industrialized. And not from scratch, mind. The materials have come from a catalogue for decades, npm, PyPI, Maven, parts made by someone else that nobody dreams of forging at home anymore; that was already half the industry done. What stayed artisanal was the assembly: a person in front of a screen placing those parts by hand, decision by decision, line by line, playing their own private game of Tetris. The last craftsman's gesture we had left. And that's exactly the one AI is industrializing now.
And we know a thing or two about industrializing, because we've done it many times before. Ford didn't invent the automobile. What he did was reorganize its manufacture until it became a mass product: interchangeable parts, a moving belt, each station repeating the same gesture over and over. The car stopped being a craftsman's work and became a product that comes out the same, one after another, at a price anyone could suddenly pay. And when the act of producing gets that much cheaper all at once, the whole trade rearranges itself around it: the hand that executes stops being what's worth paying for, and value shifts to whoever designs the line and the product.
Let me be clear, because this sounds like industrializing kills the craftsman and I don't think that's it. What it does is move the trade up a floor. The value doesn't vanish from the car industry: it shifts from bending each panel to designing the line, maintaining it, and certifying what it turns out. The trade doesn't die, it changes altitude. Ours is on the same journey, from the one who bangs out the code to the one who decides what gets banged out and checks that it holds. And that upstairs trade, the one that designs, decides and guarantees, is exactly the one that ends up inside the harness.
But the line has a catch. At full speed, a line turns out defects in series as happily as it turns out hits. If nobody stops it, it spits out a thousand bad parts as efficiently as it would spit out a thousand good ones. You can set about inspecting each unit at the end, sure, but it doesn't scale: if you have to check every part one by one, the factory isn't really automatic. The leap that matters was made by another factory, and it went the other way: build the quality into the process. Have the line stop itself the moment something goes wrong.
Sakichi Toyoda built a loom in 1924 that did exactly that. A loom that stopped itself the moment a thread snapped. Sounds like nothing, but it changed everything. All of a sudden one person could tend many looms at once, because there was no need to watch them: the looms spoke up. Toyota built half a company on that idea and gave it a Japanese name, *jidoka**, roughly automation with a touch of judgment: the machine knows when to stop. Out of this, seventy years on, half the car industry.
Well, that's a harness: building the place where the model works so that, when a thread snaps, and it does, the line stops before the botch reaches production. The prompt isn't the factory: it's a work order at most. Nor is the model: it's a general-purpose machine, clever and still without judgment, that does what you ask and also what you don't. The factory appears when you decide what it can touch, what information it gets, what it has to check before calling itself done, and which failure forces it to stop and call a human.
Out of that comes something like a law, and I reckon it's the most useful line in all this: a system's autonomy can only grow at the pace of its capacity to verify itself. If you let it generate faster than you can check, you didn't build a factory. You built a machine for manufacturing debt with an immaculate finish.
And here Buhler's essay crosses paths with mine. He calls the coding agents the Spinning Jennies* of this revolution, the first skilled trade to flip completely, with the human going from performing the task to supervising it. I'll take one thing from him, because even he, all optimism, stops at what doesn't automate: wanting things, choosing between them, being accountable for what you choose, being trusted by other people. The machine can draft the treaty; someone still has to sign it.
Now, the uncomfortable part, before this starts to sound like a happy ending. The harness has cracks, and I won't wave any of them away.
Anyone who's ever set a number as a target knows this one. Any measure that becomes a target stops measuring what it measured: it's Goodhart's law*, and with a model that optimizes to the hilt whatever you put in front of it, it's a time bomb. You ask it to pass the tests and it learns to pass the tests, which isn't the same as doing the work well. The better and tighter the harness, the more slyly the model will find the soft spots without touching what you actually wanted.
There's also judgment that won't fit in a check, and it tends to be the kind worth most. Whether an API fits the business well. Whether an architecture won't make you suffer three years from now. Whether the product makes sense, not just whether it compiles green. That doesn't reduce to black or white, and whoever thinks enough rules will let them delegate the lot is probably in for a nasty surprise. The harness doesn't remove judgment. At most it decides where to spend it.
And then the worst, the one with no tidy fix: how that judgment gets made in the first place. Because the senior's, the one who decides when to stop the line, where did it come from? From years of banging out the boring work, from screwing up and carrying the can, from maintaining systems others left to rot. It came, precisely, from the ordinary work the factory is here to clear away. So the harness asks you to bottle the judgment of the one who already has it and turn it into rules, right while we saw off the ladder you climbed to get it. This setup can run beautifully for ten years, or however many it takes for the last one who learned the old way to retire.
And that's the debt the factory carries in the fine print, the one we celebrate without reading. To build it we extract the judgment from those who have it and turn it into rules, but we still need people to acquire it, and we've just taken away the place where it was acquired. I don't know how that bill gets paid, and neither, quite, do the two articles that set me thinking. We learned to build machines that stop themselves when a thread snaps. What we're missing is the other thing, and it's the question I'm left with: who will teach the next generation to see the thread?