A software factory is not a bigger agent. It is many small agent loops, each with walls around it, fed by a queue of work and drained through gates into production, with people running the whole thing from above.
The dream of software built on a repeatable, measurable production line goes back to Bob Bemer's 1968 paper "The economics of program production". For fifty years it mostly fell flat, because you can't stamp out ideas the way you stamp out car parts. Coding agents changed that, and the factory is built in three layers.
One agent, one job, on repeat. Gather context, act, check the result, go again until a condition is met. You stop prompting turn by turn and instead design the small system that prompts the agent for you.
The walls around a loop. The sandbox it runs in, the tools it can reach, the memory that survives between runs, and the gates that decide what "done" means. Give a raw model no harness and it will spin forever.
Many harnessed loops at once. A queue of signals goes in: bugs, feedback, requirements. Work is triaged, specced, built, tested, reviewed, secured, shipped and monitored. Monitoring produces new signals, so it never stops.
Making one engineer faster is no longer the goal. The factory turns the whole delivery lifecycle into a system you can instrument, measure and improve.
Agents work the queue while the team sleeps. Bugs, dependency bumps and migrations stop waiting for a free human.
Every session, review and incident flows back into the loop. A security finding shapes the next code review.
Factories are version controlled, so they can be rolled back, canary tested and improved like any other code.
Route each step to the model with the right cost, speed and quality. When models get cheaper, the whole factory gets cheaper.
People spend their time on intent, architecture and specs. Reviewing a 200-line plan replaces a long code review.
Every action leaves a record that traces back to a human-defined intent, which is useful for audits and post-mortems.
Run it in the cloud, bring your own key, or run it air-gapped. What the factory learns stays inside your walls.
One spec can fan out to N agents at once. Throughput is limited by how fast you can verify, not by headcount.
Generation keeps growing while human attention doesn't. The real problem isn't volume, it's a surplus of bad PRs passing gates nobody trusts.
If people stop reading the code, they stop understanding the software. Debugging an incident at 3am in code no human has read is a new kind of debt.
Stanford CodeX asks who trusts code that agents wrote and agents validated, especially when a security company is the one dropping human review.
Dex Horthy's rule of thumb: an agent holds up for 3 to 10 steps and starts losing the thread past 20. Long loops hide mistakes in the corners.
"$1,000 in tokens per engineer per day" was meant as a provocation, but it shows that cost has moved from salaries to inference.
Much of the writing on this comes from vendors and consultancies. Productivity claims like "3β5x" are mostly unverified.
Some sell control planes that run the whole loop. Others own one station on the line. A few big companies built their own.
The terms come from the cloud-native era. The inner loop is the edit-run-verify cycle on your machine. The outer loop is everything after you push. Agents are now taking over both, and humans own the loop around them.
One agent goes through investigate β implement β run β verify, then repeats. It lives in the IDE or CLI. The judge is fast and deterministic: compiler, tests, linter, types. Most AI use so far sits here.
Issue β PR β CI β review β deploy β observe β new issue. The agents run on their own infrastructure, not your laptop, and are kicked off from Slack, Jira, Linear or GitHub, like Devin and GitHub's Copilot coding agent.
Intent, architecture, policy and deciding which checks earn trust. Osmani's advice: "own the outer loop". Your job becomes designing the loops, not running each turn.
A real factory is a graph, not a straight pipeline. Forward edges move work ahead, and bounded back edges send it back when a gate says no. An observer agent watches every run and tunes the harness, so the factory gets better at building the more it builds.
signal β triage β spec β plan β build Γ3 β test β review β security β ship β monitor.
Failed tests go back to build at most 3 times. When retries run out, work goes back to spec, so a retry loop always has a way out.
A review rejection goes back to spec, a security finding back to build, and a canary rollback back to triage as a new signal.
The observer scores runs and opens PRs against prompts, skills and model choices, so the failure rate falls as harness quality rises.
The simulator above is a graph. Factoryfile, an open project by Diego Pacheco, writes that graph down. It is a block format like main.tf, checked like a compiler, that declares factories, agents, stages, forward edges and bounded loops, so any tool can lint, render or run the same factory.
An open system needs a human to carry each output back in as the next input. A self-closed system feeds itself: production telemetry becomes new work, results become evals, and evals change the harness. It is control theory applied to an engineering org.
What "correct" looks like, written precisely enough for a machine to check. This is the only part humans have to supply.
Deterministic, cheap, frequent and hard to fake. A sensor that drifts or can be gamed makes the loop unstable.
They change code, config and the harness itself, but only inside the walls the harness allows.
If the sensor is wrong, the loop optimizes the wrong thing faster. You need anchors outside the loop: humans setting the setpoint, red-team agents and independent scenarios that the builders never see.
Reproducible environments, repo instructions and well-scoped tasks, never "login is broken sometimes".
Builds, types, linters, tests and scans give the agent machine-readable evidence that the work is done.
An execution record of every step, so failures can be replayed and turned into new evals.
Observer agents score a share of runs and open PRs that adjust prompts, skills and model choice.
The name comes from lights-out manufacturing. At FANUC's plant near Mount Fuji, robots build about 50 robots per 24-hour shift and can run unattended for up to 30 days. In software, a lit factory keeps humans reading at the points where judgment matters. A dark factory lets agents scope, build and ship without anyone reading the details.
| π‘ Lit factory | π Dark factory | |
|---|---|---|
| Who reads code | A human reads what comes out before it ships | Nobody. Validation replaces code review |
| Where judgment lives | Upstream, in product, design, architecture and plan review | Specs, scenarios and the harness itself |
| Trade-off | Judgment and focus, paid for in speed | Speed, paid for in understanding and the risk of breakage |
| Fails as | "All lit": a giant review bottleneck | "All dark": tearing it all down four months later |
| Public face | Most enterprises, CodeRabbit-style risk-based review | StrongDM: "code must not be written by humans" and "code must not be reviewed by humans" |