# Software factory

> A software factory brings the agents that build software, their rules, their machines and their metrics into one shared system. It takes work from a ticket or an alert all the way to production: an agent opens a PR, and the pipeline checks and ships it. It gets better by learning from its own results.

The term covers two ideas. The first is centralization: agent configuration, context and history live in one place, the way a team agrees on a single CI system. The second is the loop: the factory measures what it produces and tunes itself to do better.

Running several agents in parallel does not make a factory. You need a shared setup that agents and engineers can both reach, in the cloud or on company servers. It sets where the agent runs, with which permissions and which sequence of steps it follows. Depending on the risk of the change, some steps wait for a person’s approval. Most often, that person approves the spec for a large piece of work or a PR in a sensitive area.

Take a flaky test. The factory triages it and links it to the service it belongs to. The agent reproduces the failure, fixes it and opens a PR. The pipeline checks the change, then the review policy decides whether a person reviews it. If a check fails, the work goes back to the agent. After the merge, the agent follows the release and checks that the test stays stable on later runs. Every run is logged with its cost and outcome.

A software factory can already carry part of a product on its own, from requirement to merge. OpenAI did it on a new internal product, and StrongDM on the code of a three-person team. People write the intent, the spec and the acceptance criteria (at StrongDM, scenarios hidden from the agents), and agents write and review the code. These teams publish no defect rate, and they spend a lot of tokens on the most capable models.

That level of autonomy depends on agent readiness, meaning how solid the team’s software engineering practice is. It takes a reproducible environment, fast checks, thorough tests and scenarios, security guardrails and written context. Spotify had been running large-scale changes through a dedicated platform for years before it plugged in its agent. The stronger these practices, the more work agents can take on without anyone reading the code. Autonomy is therefore set zone by zone. It can be broad for reversible work and for generic or supporting domains. It stays narrow for a complex, high-stakes core domain. Inside a critical application, some work can get more autonomy than the rest: the front end, dependency updates, security fixes outside sensitive areas. The eight-layer stack above lists the pieces you need, and Foundations covers how to prepare a repository.

**When**: When several teams hand work to agents and individual setups start to drift apart.

**Trade-offs**: You need shared infrastructure and a team to run it. In return, every improvement benefits everyone and agent work becomes measurable.

## Where to start

- Centralize agent configuration in a repository
- Run agents on shared infrastructure
- Define the steps and, depending on risk, where a person steps in
- Link each run to the task that started it and to its result
- Measure cost and quality, then adjust

## Common mistakes

- Calling a few agents running in parallel a factory
- Giving every area of the code the same autonomy
- Speeding up code writing without adapting review

## Metrics

- Cost per successful task
- Lead time
- Share of work completed without human intervention

## Sources

- [Warp, Becoming a factory engineer](https://www.warp.dev/blog/factory-engineering-software-factories)
- [Warp, 7 core components for building a software factory](https://www.warp.dev/blog/7-ways-to-build-a-software-factory)
- [Atlassian, The AI SDLC transformation playbook](https://www.atlassian.com/blog/ai-at-work/ai-sdlc-transformation-playbook)
- [OpenAI, Harness engineering: leveraging Codex in an agent-first world](https://openai.com/index/harness-engineering/)
- [Stanford Law, Built by Agents, Tested by Agents, Trusted by Whom?](https://law.stanford.edu/2026/02/08/built-by-agents-tested-by-agents-trusted-by-whom/)
- [Spotify, 1,500+ PRs Later: Spotify’s Journey with Our Background Coding Agent](https://engineering.atspotify.com/2025/11/spotifys-background-coding-agent-part-1)
- [Dan Shapiro, The Five Levels: from Spicy Autocomplete to the Software Factory](https://www.danshapiro.com/blog/2026/01/the-five-levels-from-spicy-autocomplete-to-the-software-factory/)
- [Spotify, Fleet Management at Spotify (Part 1)](https://engineering.atspotify.com/2023/4/spotifys-shift-to-a-fleet-first-mindset-part-1)
