Lessons

What is an AI software factory?

Six stations on a line inside a dashed frame labelled the factory, with an agent connected from outside over MCP.

An AI software factory is the system around your coding agents that gets their work into the main branch: a queue of work going in, then build, review, fix, test and land, each run by software, with people setting the rules. An agent writes a change. The factory is what makes that change safe to ship, and makes the next ten changes not break each other.

If you have read what is an AI code pipeline, a factory is the same path with every seat filled and the path itself run for you. This guide covers what the term means, how it differs from a pipeline, what an agent needs from one, and when a small team should bother.

Where the term comes from

The phrase is old. Bob Bemer used “software factory” in 1968 for the idea that software could come out of a tooled, repeatable process. It came back in February 2026, when StrongDM’s AI team described shipping production software with agents writing all of the code. Simon Willison’s write-up is the usual starting point, and Addy Osmani’s Software Factories, Light and Dark gave the two variants their names.

In a dark factory nobody reads the code. Agents write it, machines check it, it ships. In a light factory people stay in at the points they choose: they approve the plan, read the review, or decide what lands. For a small team with real users, light is the sane place to start.

Pipeline versus factory

A pipeline is a path with seats. You decide where a model sits: review, a CI job, a test suggestion. A person still carries each change from one seat to the next. They open the pull request, read the comments, push the fix, wait for CI, press merge.

A factory runs the carrying. The change moves from station to station without someone babysitting it, and the line itself is the product.

AI code pipelineAI software factory
Who writes the codePeople, with a model helpingAgents, often several at once
Where the model sitsOne or two named seatsEvery station on the line
Who moves the change alongThe authorThe factory
What people doWrite, review, mergeSet intent and rules, read what they choose to
What breaks firstNoisy review commentsThe main branch, when ten changes land at once

The six stations

Every factory has the same line, whatever it is built from.

  1. Intent. An issue says what to build. A good factory checks it against the repository before any code exists, because a wrong plan is cheapest to fix here.
  2. Build. An agent writes the change on its own branch and opens a pull request.
  3. Review. Every push is read against the codebase and the issue. Findings point at lines.
  4. Fix. Clear findings are patched and pushed. So are merge conflicts and a red CI run.
  5. Test. CI runs on every push, on runners that exist only while there is work.
  6. Land. Approved changes merge one after another through a queue, so two green branches cannot break main together.

You can assemble this yourself from GitHub Actions, a review bot, a merge queue and a lot of glue. Teams do. The glue is the expensive part: it is the code that knows a review is finished, that a fix was pushed, that the queue bounced a change and why.

What an agent needs from a factory

An agent on its own is good at the build station and poor at everything after it. It opens a pull request and then does not know what happened. Was it reviewed? Did CI pass? Is it merged, or merged into the wrong branch? Left alone, an agent says “done” when it has pushed, which is the moment the real work starts.

The useful picture is an exoskeleton. The agent stays the same agent, whichever one you use. The factory gives it the parts it lacks:

  • Memory of open work. A list of its pull requests and where each one stands.
  • A wait that ends. One call that returns when the review is in, instead of the agent polling GitHub and guessing.
  • Findings it can act on. Structured, tied to a file and line, so it fixes the real ones and says why it skipped the rest.
  • A definition of done. Not “pushed”. Not “a layer merged”. Landed on main.
  • A way to hand off the landing. Once the review is clean and CI is green, the change queues and merges without the agent or a person pressing anything.

The connection that makes this practical is MCP, the protocol agents use to call tools. A factory that exposes its line as MCP tools works with any agent that speaks it, and the agent uses the line the way it uses a shell.

A worked example

We build Mergestorm, which is a cloud software factory of this kind, so it is the example we can describe accurately. It is one service with the six stations in it. Vortex reviews issues and pull requests. Cyclone pushes fixes. Surge runs CI and the merge queue. Breeze is a builder for people who do not run their own agents.

Your own agent connects over MCP. In Claude Code that is one line, and it signs in through the browser with no API key:

claude mcp add --transport http mergestorm https://api.mergestorm.ai/api/v1/mcp

Claude, ChatGPT and Cursor connect to the same address. After that, a session looks like this:

  1. The agent opens an issue and waits for the verdict on it.
  2. It writes the change and opens a pull request.
  3. It adopts the pull request as a stack with Auto land on, and waits on the stack.
  4. The wait returns with findings. The agent fixes the real ones, dismisses the wrong ones with a reason, and pushes.
  5. The wait returns clean. The change enters the merge queue and lands. The agent is told it landed, and only then reports done.

We ran this on an open source game: 606 merged pull requests in the four days after the first commit, one person directing and agents writing. The numbers and the public history are in the Mergestorm write-up.

Does a small team need one?

Not always. Use this test.

Stay with a pipeline if people write most of the code and you open a handful of pull requests a day. One model in the review seat is enough. Add AI to your review pipeline is the guide for that.

You need a factory when agents open pull requests faster than you can read them, when two green branches have broken main together, or when you have caught an agent saying “done” on a change that never merged. Those are line problems. A better model does not fix them.

If you are in between, add stations in the order they hurt. Review first. Then the merge queue, the day main goes red from two changes landing together. Then automatic landing, once you trust the first two. Keep it light: every change a pull request you can open, automatic landing off until you turn it on.

What to check before you trust one

  • Can you read everything? Every change should be a normal pull request with its review attached.
  • Does review stay quiet on a clean diff? A factory with a noisy review station just moves the noise faster. When AI review is noise covers the signs.
  • What does the queue test? It should test the change on top of current main, not the branch as it was pushed.
  • Who can turn it off? Automatic landing needs a switch per change, and a person who owns it.
  • Does it work with the agent you already use? If it only works with its own builder, it is a product, not a factory.

A pipeline gives a model a seat. A factory gives your agents a line to work on. Start with the seat, and build the line when the agents outrun you.

Run this on one open PR

Pick a pull request that has been sitting. Let a model take the first pass. You still decide what merges.

Try Mergestorm free on one open PR