« All posts

Software Factories: Loops, Harnesses, and the Cost of Going Dark

Loops, harnesses, and factories: why dark automation in software pipelines quietly builds comprehension debt behind green tests.

Drawing on HumanLayer co-founder Dex Horthy's recent talk, this piece revisits the decades-old dream of software as a repeatable production process, first proposed by Bob Bemer in 1968. The modern stack breaks into three layers: a loop (one agent gathering context and acting on repeat), a harness (the sandbox, tools, memory, and gates surrounding that loop), and a factory (many harnessed loops fed by a queue and drained through a review gate). The unit of engineering work shifts from individual diffs to designing loops, harnesses, and the flow between them.

In a 'light' factory, humans stay inside the loop, trading judgment for speed. In a 'dark' factory, code ships without any human reading it, verified only by other machines. Nearly every stage of the pipeline—generation, tests, scanning—runs at near-zero cost and scales effortlessly. The one stubborn exception is the review gate, the single expensive step representing human judgment, and it's where the real debate over faster, safer shipping plays out.

After running a fully automated code factory for roughly four months with no human reading the output, the team found comprehension debt—the growing gap between how much code exists and how much anyone actually understands—accumulating fast, even as tests stayed green. The failure only surfaced through painstaking manual debugging. The takeaway for engineers: models handle small, scoped changes well, but in complex brownfield systems, model-only automation eventually loses to comprehension debt, making the choice of checks and delegated autonomy the hardest design decision.