← All articles

There Is No Dark Factory

Lights off, nobody home

The dark factory is the new favourite slide in every AI keynote. Write a prompt, go to bed, wake up to a shipped product. The robots weld in the dark because robots don't need lights, and apparently they don't need product managers either.

You've seen this movie before. It was called offshoring, then low-code, then "the cloud runs itself". The pitch never changes. The hard part is going away. It never does. It moves somewhere else and sends you the invoice.

The dark factory is bullshit. Not because the agents are bad. They're very good, and getting better faster than most of us are comfortable admitting. It's bullshit because a car plant builds the same car ten thousand times, and you have never built the same feature twice. Every ticket is a prototype. New code, in a codebase nobody fully understands, for a stakeholder who will change the requirement the day after you ship it.

I've run a team of AI agents on a real product for months. Engineers, reviewers, an architect, a marketing crew, a coordinator who isn't allowed near the code, and a counsel whose only job is to tell everyone their plan is shit. It ships work every day. It is a factory. The lights are on, and I'm still in the building.

This series is about how close to the exit you can get, and what it costs to get there.

What a software factory actually is

Strip off the marketing and a software factory is a production line for change. You decide what gets built. Everything between that decision and the merge button is agents in narrow lanes, passing work down the line and checking each other's homework. None of it is magic. It's the same process discipline your company has ignored for years. The difference is that now something enforces it, and that something never gets tired.

The software factory line: intent, spec, tickets, implementers, review gates and merge, with a loop that turns every stall into a skill, a gate or a script The software factory line: intent, spec, tickets, implementers, review gates and merge, with a loop that turns every stall into a skill, a gate or a script

The architect turns intent into a spec. A coordinator, who never reads or writes code, cuts it into narrow tickets. Implementers each get one ticket and a handful of skills for their lane. Reviewers on a different model throw findings back until the work holds. The loop at the bottom is the only part that matters in the long run. It's how the factory stops needing you.

The three jobs you can't hand off

I've spent months trying to automate myself out of my own factory. Three jobs refuse to leave. Everything else is fair game.

Intent. What are we building, and why? An agent will write a beautiful spec for the wrong feature without blinking. It doesn't know a key customer is about to walk, that sales promised something insane in a contract you haven't seen yet, or that the board is quietly planning to kill the product. Garbage intent in, thoroughly tested garbage out.

Taste. Is it actually good? Tests pass, three reviewers approve, CI is green, and the thing is still clunky, ugly, or solves the problem sideways. Done and good are different words. The agents can prove it works. Whether it's right is your problem.

Doors that only swing one way. Some changes roll back in thirty seconds. Others drop a column, break a public API, or migrate data that doesn't migrate back. Agents bring exactly the same confidence to both. That should bother you more than it does.

The third one is where I've been weakest, and I'd rather admit it here than watch you find out the hard way. For a long time I merged most of my agents' PRs without understanding their impact. Green checks, approvals, merge. That isn't a human in the loop. It's a rubber stamp with a pulse. Plenty of "AI-assisted" teams run exactly like this right now and call it velocity.

So now every PR has to declare how dangerous it is before I look at it. Is it a one-way or two-way door, and how big is the blast radius? The boring ones are on their way to auto-merge. The dangerous ones get my full attention. Your attention is the scarcest resource in the factory. Spend it where nothing else will do.

Less of you every week

Forget dark. Aim for dim. You don't measure a mature factory by how many humans it has left. You measure it by how often it taps you on the shoulder each week, and whether every one of those taps is about intent, taste or a one-way door.

You won't get there by designing the perfect system up front. Nobody has ever designed the perfect system up front, and an architecture diagram with "AI" in the middle of it doesn't change that. You get there by being annoyed by the same thing, repeatedly, until you kill it:

  1. Do the work by hand until you can name every step.
  2. Notice the step you keep repeating.
  3. Write it down properly, as a skill an agent can follow.
  4. Give it to one agent whose job it is, and nobody else.
  5. Put a gate after it, so something other than you catches the mistakes.
  6. Watch where the factory stalls and comes crying to you. That stall is your next step 2.

Everything I no longer do came out of that loop. Agents used to stop dead because a GitHub token expired. Now they get access through a GitHub App, and the token renews itself. I used to close tickets by hand after a merge. Now a helper service listens for the merge and closes them. I used to type "/changes" on every PR that hit a merge conflict. Now the conflict goes straight back to the agent that caused it. Agents used to wake up every few minutes to check on CI, burning tokens to learn that it was still running. Now they go to sleep and get woken once, with the result.

None of that was in the original design. Every one of them was a shoulder tap that pissed me off one time too many.

Ways to fuck it up before you start

I've made most of these mistakes. Some of them twice.

  • Automating a process you've never run by hand. If you can't write the steps on a napkin, an agent can't follow them either. It will just fail faster, and with more confidence.
  • Giving every agent every skill. Load fifty skills, let the model choose, and you pay for it to read the menu on every run. My backend engineer gets five skills. The copywriter gets six different ones. Narrow agents are faster and cheaper, and they get creative less often in the ways you don't want.
  • Letting the model mark its own homework. If the same model writes the plan and approves it, you've built an echo chamber with a token bill. My plan reviewer runs on a different model on purpose. Its job is to disagree.
  • Running everything on max effort. It feels safe. It isn't. My agents hit the weekly subscription limit every week as it is. Routine work runs at medium, reviewers run high, and the expensive settings are for problems that have earned them.
  • Building agents that ask you questions. "Should I create a branch?" Yes. Create the fucking branch. Every question that could have answered itself is a defect in the factory, not good manners.
  • Configuring by clicking. Edit an agent's skill in a UI and you get a fork with a hashed name that the other agents can't find. Your factory is code. Keep it in files, in version control, and apply it with scripts.
  • Believing the reports. Agents write status reports like a consultant billing by the word. If the first line doesn't give you the outcome or the decision it needs from you, send it back.
  • Letting the factory leak into the product. Your repository shouldn't know or care that agents work on it. The day your build scripts depend on your agent platform, you've married it, and that divorce will be expensive.

Where this series goes

Each post covers one pattern. First the idea, which works on any agent platform. Then how I did it, with the actual scripts, skills and config, stripped of anything that belongs to my product. I run mine on Paperclip, so that's where the examples come from. Where other tools do it differently, I'll say so.

  1. There is no dark factory. You're reading it.
  2. Start manual. Run the flow by hand until it bores you.
  3. Specs, then tickets. Narrow tickets beat clever agents.
  4. Roles, not agents. A coordinator who can't code, implementers who can, and a reviewer on a different model whose job is to say no.
  5. Fewer skills, faster agents. And how editing skills in a UI quietly breaks everything.
  6. Nothing blocks on you. Credentials, decisions, watchdogs, and asking the human as the last resort.
  7. Base and overlay. A generic team that fits any product, with a thin layer of project specifics on top. Every project is unique. The core of your factory shouldn't be.
  8. The economics. Effort levels, token churn, the weekly limit, and agents that write three times more code than the job needs.
  9. The merge gate. Scoring PR danger, and earning the right to auto-merge.

The lights stay on. The question is how dim you can make them before something catches fire.

The conversation

0 comments