How my software factory takes an issue to a pull request
Most of the code in my products is now written by agents. I still decide what gets built and what gets merged. The system in between is what I call the Factory, and its dashboard and command-line tool are open source under the MIT license.
This post walks through what happens to one change.
1. Triage
Work comes in from three places: a GitHub issue, an alert from production, or a note I write. A triage agent reads it and does one of two things. It turns the item into a written brief with a clear scope, or it rejects the item and says why.
Nothing gets built without a brief. A vague request produces vague code, and an agent will happily write a lot of it.
2. Prototype first, for features
A bug fix goes straight to a build. A new feature does not. An agent first makes a clickable prototype with fake data, including the empty, loading and error states. I open it, try it, and either validate it or send it back with notes.
It is much cheaper to say "no, not like that" to a prototype than to a finished pull request.
3. Build
One agent takes one brief. It works in its own copy of the code, so ten agents can work on the same repository at once without stepping on each other. When it is done it has to prove the change works on the real thing, then it opens a pull request.
4. Review
The agent that wrote the code never reviews it. Other agents do, each from one angle: bugs, security, whether it matches the brief, and whether it touches the path money takes. Their findings go back to the builder until the review is clean.
5. Merge
Then it waits for me. Nothing ships, sends an email or spends money without my approval.
How the agents ask me things
Agents get stuck on decisions that are mine to make. They do not guess. They file a question with the options, the one they recommend and why. All the questions land in one inbox on the dashboard. I answer there, and the answer is pushed back to the agent that asked.
The same dashboard shows where every project stands, which agents are working right now, and how many tokens each provider used.
What I learned
Three rules did most of the work:
- One agent, one job. An agent with two jobs does both badly, so I split it.
- The author never reviews. A fresh agent finds what the builder cannot see.
- A human approves anything that leaves the building. Merges, emails and payments all stop at me.
You can watch the agents at work on the Factory page, and the code is on GitHub.