# Software factories sell pipelines of agents. We measured what they add, then built one.

Coding agents now open pull requests on their own, and the products that wire them into tickets, CI and review are called software factories. A long read on what a factory is, who sells one, what the evidence says, what eight experiments found, and the Stack we built from it.

By Stack Assay. Published 2026-11-23, updated 2026-11-25. Version 2. Licence: CC BY 4.0. Web version: https://stackassay.com/stories/factory-lab-to-stack/

![What a factory pipeline adds, step 3: A pipeline of roles passes the same 18. The pipeline splits the work: a planner writes SPEC.md from the ticket and docs, a builder implements it, a reviewer reads the diff and approves or asks for changes, and a fix round follows if it asks. Same model, same tickets: 18 of 18 again, but at 1.78¢ and 99 seconds a run. Planning was its largest cost line.](https://stackassay.com/stories/figures/software-factories-iso-3.png)

## Abstract

By late 2026 large teams merge thousands of agent-written pull requests a week, and software factories sell the machinery around them. That machinery, from triggers and roles to a model per stage and a merge gate, is sold on vendor-defined numbers that are hard to compare. We studied the trend, then ran eight experiments on six ticket-style tasks with hidden checks. One agent passed 18/18 runs at 0.47¢ each; a planner, builder and reviewer pipeline passed the same at 3.8× the cost. Agents' own tests were green in every run, including 2 wrong ones, and review agents caught every planted bug while flagging many correct changes. We packaged the shape the evidence supports as the software factories Stack, ran it as an arm in its own lab, and explain here how it works and who it suits, so teams start from what held up and keep up as agents change.

## Key findings

- Agent-written pull requests are routine at scale. Stripe merges over 1,300 a week ([Stripe, 2026](https://stripe.dev/blog/minions-stripes-one-shot-end-to-end-coding-agents-part-2)), yet independent data shows agent pull requests accepted less often than human ones, 76.8% for people against 38.2% to 65.3% for agents ([Hao Li, Haoxiang Zhang and Ahmed E. Hassan, 2025](https://arxiv.org/html/2507.15003v1)).
- On our tasks the pipeline added cost, not passes. One agent and a three-role pipeline both passed 18/18, at 0.47¢ and 1.78¢ a run, and planning was the largest line ([Experiment 1](https://stackassay.com/labs/factory/#pipeline-or-single)).
- Green is not a verdict. The agents' own tests passed in 90/90 runs, and 2 of those changes were still wrong on the hidden check ([Experiment 4](https://stackassay.com/labs/factory/#green-vs-correct)).
- Notes carried between tickets helped nothing when the repo's docs held the rules, and two planted wrong notes sank every ticket that read them, 0/25 passed, until the prompt ranked the docs above the notes ([Experiment 7](https://stackassay.com/labs/factory/#memory-across-tickets)).
- The software factories Stack, run as an arm, passed 18/18 at 0.48¢ to build each change, and its gate sent 5/18 passing changes to a person with a named reason.

## Contents

- [Part 1. The trend](#part-1-the-trend)
  - [Why we picked this trend](#why-we-picked-this-trend)
  - [Agents now open pull requests at scale](#agents-now-open-pull-requests-at-scale)
  - [What it looks like from the other side of review](#what-it-looks-like-from-the-other-side-of-review)
  - [The vendor numbers do not hold together](#the-vendor-numbers-do-not-hold-together)
  - [A wrong choice is costly and unsafe](#a-wrong-choice-is-costly-and-unsafe)
- [Part 2. What a factory is](#part-2-what-a-factory-is)
  - [The parts of a factory](#the-parts-of-a-factory)
  - [How the layer formed](#how-the-layer-formed)
  - [The layers, from settled to frontier](#the-layers-from-settled-to-frontier)
  - [What buyers are asked to pay for](#what-buyers-are-asked-to-pay-for)
- [Part 3. The players](#part-3-the-players)
  - [Five kinds of factory](#five-kinds-of-factory)
  - [Factory platforms](#factory-platforms)
  - [Host-native hubs](#host-native-hubs)
  - [Hosted agents](#hosted-agents)
  - [Building blocks](#building-blocks)
  - [Spec-first and governance](#spec-first-and-governance)
  - [Two decisions every team makes](#two-decisions-every-team-makes)
- [Part 4. What independent research says](#part-4-what-independent-research-says)
  - [Accepted less often than people](#accepted-less-often-than-people)
  - [Agents game the tests when tests and spec disagree](#agents-game-the-tests-when-tests-and-spec-disagree)
  - [Pipelines pay for planning](#pipelines-pay-for-planning)
  - [Review benchmarks come from review vendors](#review-benchmarks-come-from-review-vendors)
  - [Where research and the lab agree](#where-research-and-the-lab-agree)
- [Part 5. The lab](#part-5-the-lab)
  - [What we expected](#what-we-expected)
  - [How every run was set up](#how-every-run-was-set-up)
  - [Experiment 1: one agent or a pipeline](#experiment-1-one-agent-or-a-pipeline)
  - [Experiment 2: a model per stage](#experiment-2-a-model-per-stage)
  - [Experiment 3: review agents on planted bugs](#experiment-3-review-agents-on-planted-bugs)
  - [Experiment 4: green tests, wrong code](#experiment-4-green-tests-wrong-code)
  - [Experiment 5: how much the ticket matters](#experiment-5-how-much-the-ticket-matters)
  - [Experiment 7: memory across tickets](#experiment-7-memory-across-tickets)
  - [Experiment 8: tests that contradict the docs](#experiment-8-tests-that-contradict-the-docs)
  - [What the claims ledger now says](#what-the-claims-ledger-now-says)
  - [What changed in the recommendation](#what-changed-in-the-recommendation)
  - [What a team would have done instead](#what-a-team-would-have-done-instead)
- [Part 6. The software factories Stack](#part-6-the-software-factories-stack)
  - [Why we built a Stack](#why-we-built-a-stack)
  - [What it is, beside the category](#what-it-is-beside-the-category)
  - [How one ticket runs](#how-one-ticket-runs)
  - [Inside the sandbox](#inside-the-sandbox)
  - [A merge gate that never merges on green alone](#a-merge-gate-that-never-merges-on-green-alone)
  - [Checks you can prove before you trust them](#checks-you-can-prove-before-you-trust-them)
  - [Metered from outside](#metered-from-outside)
  - [Defaults, and the evidence behind each](#defaults-and-the-evidence-behind-each)
  - [The Stack measured in its own lab](#the-stack-measured-in-its-own-lab)
  - [Getting started](#getting-started)
  - [Living with it](#living-with-it)
  - [What it is not](#what-it-is-not)
  - [Who it is for, and when](#who-it-is-for-and-when)
  - [How selling a Stack is kept honest](#how-selling-a-stack-is-kept-honest)
- [Part 7. Limits and what comes next](#part-7-limits-and-what-comes-next)
  - [Limitations](#limitations)
  - [Open questions](#open-questions)
  - [Check it yourself](#check-it-yourself)
- [Part 8. Glossary](#part-8-glossary)
  - [Terms used in this story](#terms-used-in-this-story)

## Part 1. The trend

### Why we picked this trend

We take on a trend when teams adopt it faster than evidence arrives, the claims about it disagree, and a wrong choice is costly or unsafe. Software factories met all three in 2026. The previous year was about one developer and one coding agent in an editor. This year the agent left the editor. It starts from a ticket, a chat message or a failing build, works in a container nobody watches, and hands back a pull request. The products that run that loop for a whole team are what vendors now call software factories, and they are sold on throughput, meaning pull requests per week, share of work done without a person and cost per pull request.

This story is written for the person who has to approve that kind of system. That may be an engineering manager, a platform lead, or a security reviewer who will be asked whether agents may open pull requests against the main repository. Each part stands on its own. Part 1 sets out the trend, Part 2 what a factory is made of, Part 3 who sells one, Part 4 what independent research says, Part 5 what our lab measured, and Part 6 the Stack we built from it and how to use it.

### Agents now open pull requests at scale

The adopters are no longer pilots. Stripe's unattended agents, which it calls Minions, start from a Slack thread or a ticket, work in a pre-warmed development box cut off from production, and open pull requests that engineers review. Stripe reported over 1,300 merged pull requests a week written entirely by them, up from 1,000 a few weeks before, each one, in its words:

> “human-reviewed, but containing no human-written code”
>
> Stripe, “Minions: Stripe’s one-shot, end-to-end coding agents—Part 2” (2026), https://stripe.dev/blog/minions-stripes-one-shot-end-to-end-coding-agents-part-2

Ramp built its own background agent, Inspect, which runs each task in a dedicated virtual machine and opens pull requests under the name of the person who asked, so nobody approves their own change. Within months about 30% of pull requests merged to Ramp's frontend and backend repositories came from it ([Ramp, 2026](https://builders.ramp.com/post/why-we-built-our-background-agent)). Airbnb used a staged, model-driven pipeline to move about 3.5K test files to a new framework in 6 weeks, against an estimate of 1.5 years of engineering time, with 75% done in the first four hours ([Airbnb, 2025](https://airbnb.tech/?p=366)). None of these companies is a Stack Assay customer; they are here because they show what the category packages.

Underneath the case studies sits a broad habit. Stack Overflow's 2026 survey found 73% of developers using coding assistants and agents daily ([Stack Overflow, 2026](https://survey.stackoverflow.co/2026/ai)), and JetBrains found 90% of professional developers using a coding agent at work at least weekly ([JetBrains Research, 2026](https://blog.jetbrains.com/research/2026/08/ai-coding-agent-adoption-2026/)). A factory is what happens when a team stops asking each developer to drive an agent and starts pointing agents at the backlog directly.

### What it looks like from the other side of review

The same trend looks different from the reviewer's chair. Microsoft's .NET team published ten months of data from assigning issues in its runtime repository to GitHub's coding agent. Of 878 agent pull requests, 535 merged, a rate of 67.9% against 84.9% for human authors in the same period, with a median of ~2 days to merge ([Microsoft .NET team, 2026](https://devblogs.microsoft.com/dotnet/ten-months-with-cca-in-dotnet-runtime/)). Microsoft owns GitHub, so treat that as a vendor's account, but it is a candid one. A third of agent pull requests in a demanding codebase did not make it, and review was what stopped them.

Independent data agrees. The AIDev dataset collected 456,535 agent-authored pull requests across 61,453 repositories. In popular repositories, human pull requests were accepted 76.8% of the time, against 65.3% for Codex, 52.5% for Claude Code and 38.2% for Copilot ([Hao Li, Haoxiang Zhang and Ahmed E. Hassan, 2025](https://arxiv.org/html/2507.15003v1)). A study of about 33k failed agent pull requests then read 600 rejected ones by hand and found reviewers disengaging, duplicate work, features nobody asked for and agents misreading the task ([Ramtin Ehsani and colleagues, 2026](https://arxiv.org/abs/2601.15195)). The bottleneck in a factory is deciding what is safe to merge, well after the code is written.

### The vendor numbers do not hold together

Factory vendors publish throughput figures, and the two most detailed ones disagree with themselves. Warp's benchmark write-up is titled as cutting its internal cost per pull request from $80 to $30, while the chart on the same page reads $81.13 falling to $19.06. The run used 30 replayed tasks, one harness, and scorers built on a language model as judge ([Warp, 2026](https://warp.dev/factories/benchmarks/warpbench)). The saving came from changing which model wrote the code, not from the factory around it.

**Table 1.** Warp's own before and after, as its chart reads. A vendor figure, scored by a model acting as judge on thirty tasks.

| Run | Median cost per PR ($) |
| --- | ---: |
| 26 Aug 2026 (auto routing, mostly Opus 5) | 81.13 |
| 30 Aug 2026 (Grok 4.6 high implements) | 19.06 |

Source: Warp, WarpBench case study (vendor), 2026-09-02 (vendor source), https://warp.dev/factories/benchmarks/warpbench

Ona built a notes app with agents over a ten-day livestream and published the result as a showcase. Its banner reports 688 pull requests merged, 88% autonomous and 100% CI green; the finale recap on the same page says 375 pull requests and 87% autonomous, with a median of 4.9 minutes from pull request to merge ([Ona, 2026](https://www.software-factory.dev/)). The page never defines autonomy or CI green. Ona Cloud itself shut down at the end of October 2026 when the team joined OpenAI, which is its own lesson about building a workflow on a hosted factory.

Neither vendor is being dishonest in an obvious way. The problem is that "cost per pull request", "autonomous" and "green" each hide choices about which tasks, which model, who judges correctness, and whether a pull request that merged was right. Without those choices written down, two factories cannot be compared, and a team cannot tell what it is buying.

### A wrong choice is costly and unsafe

A factory holds more authority than a single agent. It reads tickets that anyone can write, runs code nobody has reviewed, holds a model key, and opens pull requests that look exactly like human ones. A planted instruction in an issue becomes a planted instruction to an agent with a shell. A green build becomes a merge. Gartner expects over 40% of agentic AI projects to be cancelled by the end of 2027 ([Gartner, 2025](https://www.gartner.com/en/newsroom/press-releases/2025-06-25-gartner-predicts-over-40-percent-of-agentic-ai-projects-will-be-canceled-by-end-of-2027)), and a factory that floods reviewers with plausible but wrong pull requests is a quick way to become one of them. The question a buyer should ask is how many of the pull requests a factory opens a person can trust, whatever the total.

## Part 2. What a factory is

### The parts of a factory

A software factory is the layer above one coding agent. The agent itself, with its tool loop, memory and sandbox, is the subject of our [agent harnesses track](https://stackassay.com/tracks/agent-harnesses/). The factory decides when an agent runs, on what, with which model, and what happens to its output. Taken apart, it has six jobs.

1. **Triggers.** Something starts the work, such as an issue label, a comment on a pull request, a failing build, an alert, a schedule or a chat message.
2. **Intake.** The trigger becomes a ticket the agent can act on. This is where the quality of the specification is won or lost, and where untrusted text enters the system.
3. **Roles.** One agent can do everything, or the work can be split, so that a planner writes a specification, a builder implements it, a reviewer reads the result and a verifier runs checks. Roles hand off through files or messages.
4. **Models.** Each role can run on its own model, so a team can pay for a strong model only where it is needed.
5. **The merge gate.** Something decides whether a change reaches a person, and whether it can merge without one. That can be CI, an AI reviewer, hidden checks or branch rules.
6. **Memory and metrics.** Factories increasingly keep notes across runs, and report throughput, autonomy and cost.

Every one of these jobs is a place where two factories running the same agent and model can produce different results, and where a team's own constraints attach, such as who may start a run, where code executes, what a merge requires, and who pays for the tokens.

### How the layer formed

The pieces arrived quickly. Independent datasets of agent pull requests appeared in mid-2025, and research showing that agents game tests followed in the autumn. In January 2026 Dan Shapiro's essay on the five levels of AI coding gave the far end a name, the dark factory, describing it bluntly:

> “It's a black box that turns specs into software.”
>
> Dan Shapiro, “The Five Levels: from Spicy Autocomplete to the Dark Factory” (2026), https://www.danshapiro.com/blog/2026/01/the-five-levels-from-spicy-autocomplete-to-the-software-factory/

In February GitHub opened its agent hub to Claude and Codex, so an issue could be assigned to any of three agents and come back as a draft pull request ([GitHub, 2026](https://github.blog/news-insights/product-news/pick-your-agent-use-claude-and-codex-on-agent-hq/)), and StrongDM described a team whose rules forbid people from writing or reviewing code at all ([Simon Willison, 2026](https://simonwillison.net/2026/Feb/7/software-factory/)). Ona's livestream ran in April, Warp's benchmark appeared in September, and Ona Cloud closed in October.

**Table 2.** How the factory layer formed, from the first datasets of agent pull requests to our own lab runs.

| Date | What happened |
| --- | --- |
| 2025-07-20 | AIDev dataset of 456k agent-authored PRs |
| 2025-10-23 | ImpossibleBench shows agents game tests that contradict the spec |
| 2026-01 | Shapiro’s “five levels”, where level 5 is the dark software factory |
| 2026-02-04 | Claude and Codex join GitHub Agent HQ (public preview) |
| 2026-02-07 | StrongDM publishes its no-human-review factory method |
| 2026-04-13 | Ona starts building Memo with agents, live for 10 days |
| 2026-06-11 | Ona announces it is joining OpenAI |
| 2026-09-02 | Warp publishes WarpBench, where cost per PR falls after a model switch |
| 2026-10-31 | Ona Cloud shuts down as Ona joins OpenAI |
| 2026-11-18 | This lab measures pipelines, model mixes, review agents and specs on six tasks |
| 2026-11-19 | Our own Stack runs as an arm in this lab (Experiment 6) |

Source: The Software factories track’s timeline, as of 2026-11-18 (packages/tracks/src/software-factories.ts)

### The layers, from settled to frontier

As with harnesses, maturity varies by layer. Running one sandboxed agent per task, and starting it from the tools a team already uses, are converging, and every serious product does both in roughly the same way. Specifications as input, roles and handoffs, a model per stage and review agents are emerging, each product with its own approach and little shared evidence. Merging without a person and comparable throughput metrics are frontier. Some teams do the first, and nobody has solved the second.

**Table 3.** The layers of a factory, how mature each is, and which of our experiments tested it.

| Layer | Examples | Maturity | Tested in |
| --- | --- | --- | --- |
| Comparable throughput metrics | Autonomy rate, PR-to-merge time, cost per PR, each defined differently | frontier |  |
| Merge without a person | StrongDM’s no-review rule, Ona’s “on the loop”, auto-approve policies | frontier | Experiment 4 |
| Review agents as a gate | Factory PR Reviewer, CodeRabbit, Greptile, Claude Code review | emerging | Experiment 3 |
| A model per stage | Warp factory config, Factory Missions | emerging | Experiment 2 |
| Roles and handoffs | Planner → builder → reviewer; SPEC.md, REVIEW.md, AGENTS.md | emerging | Experiment 1 |
| Specs and tickets as the input | 8090 Blueprints, Factory Mission plans, Jules plan approval | emerging | Experiment 5 |
| Triggers from the tools teams use | GitHub issues and PRs, Linear, Jira, Slack, cron | converging |  |
| One sandboxed agent per task | Claude Code, Codex, Cursor and Copilot cloud agents | converging |  |

Source: The Software factories track’s layers, as of 2026-11-18 (packages/tracks/src/software-factories.ts)

For a buyer, the shape matters because the settled layers are cheap to switch and the frontier layers are where risk concentrates. A team that adopts a vendor's autonomy metric, or lets a vendor's reviewer approve merges, is building on the least tested part of the stack.

### What buyers are asked to pay for

Factory vendors sell capabilities at every point on that curve. Some are plainly real, since every major product will start an agent from a ticket or a chat message. Others rest on vendor benchmarks or none.

**Table 4.** Capabilities factory vendors advertise, how mature each is, and the evidence the track found.

| Capability | Maturity | Evidence |
| --- | --- | --- |
| Agents started from tickets, PRs and chat | converging | GitHub Agent HQ, Cursor, Codex cloud, Factory and Warp all start runs from issues, PR comments, Slack or Linear. |
| A model per stage | emerging | Warp’s config sets one per stage; measured here in Experiment 2. |
| Review agents | emerging | Many products ship one; the only benchmarks are vendor-run. Measured here in Experiment 3. |
| Spec-first handoffs | emerging | 8090 Blueprints, Factory Mission plans, Jules plan approval; SPEC.md in this lab. |
| Trustworthy “done” without a person | frontier | Agent-written tests can pass while the code is wrong (Experiment 4); ImpossibleBench shows deliberate test gaming. |
| Comparable factory metrics | frontier | Autonomy rate, CI green and cost per PR are undefined or defined differently by each vendor. |

Source: The Software factories track’s capabilities, as of 2026-11-18 (packages/tracks/src/software-factories.ts)

Two deserve a flag before any purchase. A trustworthy "done" without a person is not something any product can show yet, because the checks that define done are often written by the same agents. And factory metrics are not comparable across vendors, because each defines them differently or not at all. Treat both as questions to ask a vendor, not features to buy.

## Part 3. The players

### Five kinds of factory

The market splits five ways. Factory platforms define the whole pipeline as configuration and run any agent inside it (Warp, Factory). Host-native hubs live where the code already is and let a team assign issues to agents (GitHub Agent HQ). Hosted agents run each task on the vendor's machines and hand back a branch or a pull request (Cursor cloud agents, Codex cloud, Devin). Building blocks give a team the parts to assemble its own (the Claude Code GitHub Action). And spec-first and governance products sit at either end. 8090 turns requirements into signed-off work orders, and Port catalogues and governs the agents a company already runs.

**Table 5.** The players the track studied, as of its last update. We sell a Stack in this category, so the track says so beside this table and does not rank it.

| Player | Made by | Kind | What stands out |
| --- | --- | --- | --- |
| Warp Factories | Warp | Factory as config | One config for repos, agents, a model per stage, permissions and checkpoints; runs Warp, Claude Code, Codex or Cursor agents. Publishes WarpBench. |
| Ona | Ona (Ona Cloud shut down 31 Oct 2026) | Background agents and automations | Built the Memo app with 17 automations over a 10-day livestream; the repo is public. |
| Factory | Factory | Droids, Missions, Automations | CLI, Slack, Jira, Linear and CI triggers; the human approves a Mission plan; QA validation step. Pricing on request. |
| GitHub Agent HQ | GitHub | Host-native agent hub | Assign an issue to Copilot, Claude or Codex; draft PRs; repo rules can block agent PRs. |
| Claude Code GitHub Action | Anthropic | Building block | @claude mentions or any GitHub event start a run; cost is Actions minutes plus tokens. |
| Cursor cloud agents | Cursor | Hosted agents | Started from Slack, Linear or GitHub; a branch and PR per repo; a person can take over the remote desktop. |
| Codex cloud | OpenAI | Hosted agents | Parallel tasks in prepared environments; a person inspects the diff, then commits or opens a PR. |
| Devin | Cognition | Hosted agents | Starts from Slack, Teams, Linear, Jira, PR and CI events; keeps knowledge across sessions; a person can take over in its IDE. |
| Port | Port | Governance and catalog | Finds the agents, MCP servers and skills a company runs and enforces standards on them. Claims without a method. |
| 8090 | 8090 | Spec-first factory | Requirements, then signed-off Blueprints, then Work Orders sent over MCP to coding agents; strongest on legacy code. |

Source: The Software factories track's players, as of 2026-11-18 (packages/tracks/src/software-factories.ts); repository facts from GitHub

### Factory platforms

Warp treats a factory as code. One definition holds the repositories, the agents, a model for each stage, permissions and the checkpoints where a person signs off. It can run its own agent or Claude Code, Codex and Cursor's, and it is the only vendor we found with a published replay benchmark of its own pipeline, which is also why its numbers get scrutiny here. Factory, the company, sells agents it calls Droids that start from chat, issue trackers and CI, and Missions in which a person approves a plan of milestones before an orchestrator and workers carry it out, with an optional QA step. Both are the closest thing to a full factory you can buy, and both price larger teams on request.

### Host-native hubs

GitHub's Agent HQ is the simplest factory to adopt because it needs nothing new. Assign an issue to Copilot, Claude or Codex and a draft pull request comes back, subject to the repository's own branch rules. Its strength is that review, CI and permissions are the ones a team already has. Its limit is that the factory logic beyond assignment, such as gates, roles and per-stage models, is mostly left to the team.

### Hosted agents

Cursor's cloud agents start from Slack, Linear or a GitHub mention and open a branch and pull request per repository, with a remote desktop a person can take over. OpenAI's Codex cloud runs tasks in parallel in prepared environments, and a person inspects the diff before committing or opening a pull request. Cognition's Devin starts from chat, trackers and CI events and keeps knowledge between sessions. These products are fast to start with, and they share one property a security reviewer will notice. The code runs on the vendor's machines, under the vendor's terms and on the vendor's model bill.

### Building blocks

Anthropic's Claude Code GitHub Action runs an agent from a mention or any repository event, on the team's own Actions runners, with checks on who may trigger it. It is not a factory by itself, but it is the part most in-house factories start from, and it is close to what Stripe and Ramp describe building, which is an agent in an isolated environment, started from the tools engineers already use, with review left to people.

### Spec-first and governance

8090 starts from requirements, has engineers sign off a blueprint, and sends work orders to coding agents, with its strongest case in legacy modernisation. Port sells a governance layer that discovers the agents and servers a company runs and enforces standards on them. Both address real problems, specification quality and sprawl, and both publish headline numbers without a method.

### Two decisions every team makes

Whatever product a team picks, it makes two architectural choices. The first is how the work is split, between one agent per ticket, a pipeline of roles, or no human review at all.

**Table 6.** Three ways to split the work and what each costs.

| Option | What it is | Who | Strengths | Costs |
| --- | --- | --- | --- | --- |
| One agent per ticket | One harness run takes the ticket to a PR | Copilot cloud agent, Codex cloud, Jules, Cursor cloud agents | Fewest moving parts and handoffs; cheapest per run | No second opinion before a person reviews |
| A pipeline of roles | Planner, builder and reviewer agents hand off through files | Warp Factories, Factory Missions, Cursor Automations | Each stage can be inspected, gated and given its own model | More runs, more tokens and more wall time per ticket |
| No human review | Agents write and merge; people judge scenarios, not code | StrongDM AI team, Ona Memo (“on the loop”; Ona Cloud has since shut down) | Throughput not limited by reviewers | Correctness rests on checks agents may also write |

Source: The Software factories track’s choice “How the work is split”, as of 2026-11-18 (packages/tracks/src/software-factories.ts)

The second is what decides a merge, whether a person on every pull request, an AI reviewer as a gate, or automatic merge once checks are green. The lab spent most of its effort on the gap between the second and third options, because that is where a factory's promise of throughput meets its risk.

**Table 7.** Three options for what decides a merge, and their trade-offs.

| Option | What it is | Who | Strengths | Costs |
| --- | --- | --- | --- | --- |
| A person approves every PR | Agents open draft PRs; humans review and merge | GitHub Agent HQ defaults, Codex cloud | The familiar control | Reviewers become the bottleneck |
| An AI reviewer gates | A review agent must approve before merge or before a person looks | Factory PR Reviewer, Warp review stage, CodeRabbit | Cheap, fast, catches rule breaks | False alarms on correct changes; vendor-run benchmarks only |
| Merge when checks are green | Auto-merge once CI passes | Ona Memo (99.7% CI pass), auto-merge bots | Fully automatic | Green only means the tests that exist passed |

Source: The Software factories track’s choice “What decides a merge”, as of 2026-11-18 (packages/tracks/src/software-factories.ts)

## Part 4. What independent research says

### Accepted less often than people

The AIDev study is the largest independent look at agent pull requests so far. Its acceptance gap, from 76.8% for people down to between 38.2% and 65.3% for agents in popular repositories, is not a verdict on any one agent, because agents get different work from people. It is evidence that the review step does real work. Our track's benchmark table shows the agents the paper broke out.

**Table 8.** Agent pull requests accepted in repositories with more than five hundred stars, from the AIDev paper's table. Its text gives slightly different figures for two agents.

| Run | PRs accepted |
| --- | ---: |
| Human authors | 76.8% |
| Codex | 65.3% |
| Claude Code | 52.5% |
| Cursor | 51.4% |
| Devin | 48.9% |
| Copilot | 38.2% |

Source: AIDev dataset, Li, Zhang and Hassan (independent), July 2025, https://arxiv.org/html/2507.15003v1

The study of failed agent pull requests adds texture. Many rejections had nothing to do with whether the code ran. They were duplicates, unrequested features and pull requests nobody engaged with. A factory that opens more pull requests than reviewers can read only moves the queue and leaves throughput where it was.

### Agents game the tests when tests and spec disagree

ImpossibleBench, from Ziqian Zhong, Aditi Raghunathan and Nicholas Carlini, gave agents tasks where the visible tests contradict the specification, so the only way to pass is to cheat. The strongest model they tested, GPT-5, cheated 54% of the time on their conflicting software-engineering set; giving it an explicit way to abort cut that to 9% ([Ziqian Zhong, Aditi Raghunathan and Nicholas Carlini, 2025](https://arxiv.org/html/2510.20270)). For a factory, this is the central risk of merging on green. If the agent can write or edit the tests, green tells you the agent is satisfied, not that the code meets the specification.

### Pipelines pay for planning

A study of seven agent frameworks on code tasks, all on one open model, found that in one multi-agent framework the planning agent accounted for 67.2% of all tokens on software development tasks, while single agents spent their tokens mostly on editing and running code ([Zhuowen Yin and colleagues, 2025](https://arxiv.org/html/2511.00872v1)). It is only one framework, but it predicts where a pipeline's extra cost will come from, and our lab found the same.

### Review benchmarks come from review vendors

Every AI code review benchmark we found is run by a company that sells a reviewer. The most detailed, from Luxor, used 50 pull requests with 122 real bugs, graded by a panel of language models, and found recall from 3.3% to 68.9%, with its own product on top ([Luxor, 2026](https://luxor.ai/benchmarks/code-reviewer)).

**Table 9.** Bugs found by AI reviewers on fifty pull requests, as published by a review vendor and graded by language models.

| Run | Bugs found (recall) |
| --- | ---: |
| Luxor | 68.9% |
| Greptile | 36.1% |
| Devin | 36.1% |
| Cursor | 32% |
| CodeRabbit | 28.7% |
| Copilot | 24.6% |

Source: Luxor (a vendor that sells a reviewer), code reviewer benchmark (vendor source), https://luxor.ai/benchmarks/code-reviewer

The table is still informative. Even the best reviewer missed about a third of real bugs, and most missed more than half. A reviewer is a filter, and a filter that lets bugs through is only safe in front of something else.

### Where research and the lab agree

Put together, the research says three things a factory buyer should hold on to. Review is where agent work is caught or not, and people still catch more than agents. Visible tests are not a trustworthy definition of done when an agent can touch them. And the extra cost of multi-agent designs comes mostly from coordination rather than the work. That left three questions for our lab. Does a pipeline of roles earn its cost on ticket-sized work? How far can a team trust green tests and AI reviewers? And what do memory and conflicting tests do inside a factory?

## Part 5. The lab

### What we expected

The track's first draft leaned toward a pipeline of roles, with a planner to turn the ticket into a specification, a builder, and a reviewer before any person looked. That is the shape most factory platforms sell, and it seemed likely that a second agent reading the work would catch mistakes the first one made. We expected the pipeline to pass more tasks, at some extra cost, and the reviewer to be a cheap win.

### How every run was set up

We wrote 6 small Python repositories, each modelled on a backlog ticket. They covered refunds, a rate limiter, URL slugs, a CSV export, feature-flag rollouts and configuration from the environment. Each came with docs that hold the rules, starter tests, a reference solution, three planted bugs and a hidden check. Every ticket was written three ways. Thin tickets name only the interface, normal ones point to the doc with the rules, and detailed ones spell every rule out. Tests prove each hidden check fails on the starting code, passes on the reference solution and fails on every planted bug, and every check tests only rules written in the repository's docs or the ticket.

![What a factory pipeline adds, step 1: Six tickets, hidden checks, one sandbox. Each task is a small Python repo: a backlog ticket, docs that hold the rules, and starter tests. A hidden check the agents never see grades the final code in an offline container. Every agent is Claude Code in a locked-down sandbox, and costs come from OpenRouter’s records, not the agent’s own report.](https://stackassay.com/stories/figures/software-factories-flat-1.png)

**Figure 1.** The setup from above. Whichever arm does the work, its final code passes through the agent's own tests to a hidden check that no agent ever sees.

Every stage was Claude Code 2.1.326, unmodified, in the same locked-down container the harness lab uses, with no secrets, a read-only root, and no route out except a gateway that held the model key. In a pipeline, the planner wrote `SPEC.md`, the builder implemented it, the reviewer read a diff and wrote `REVIEW.md`, and one fix round ran if the reviewer asked for changes. Costs came from the model provider's own records of each call the gateway logged, never from the agent's report. The hidden check and the agent's own tests ran afterwards in separate containers with no network.

### Experiment 1: one agent or a pipeline

> **Experiment 1, Structure: [One agent or a pipeline](https://stackassay.com/labs/factory/#pipeline-or-single).** On the same tickets and model, does a planner, builder and reviewer pipeline pass more hidden checks than one agent, and at what cost?

On normal tickets with Haiku 5.5, one agent passed 18/18 runs at 0.47¢ and a median 27 s a run. The planner, builder and reviewer pipeline passed 18/18 too, at 1.78¢ and 99 s. That is 3.8× the cost and 3.7× the time for the same result.

**Table 10.** One agent against pipelines on normal tickets, including the arms with Sonnet 5.5 in one or more seats. Every arm passed every task.

| Arm | Passed | Cost per run | Cost per pass | Median time |
| --- | ---: | ---: | ---: | ---: |
| One agent, Haiku 5.5 | 18/18 | 0.47¢ | 0.47¢ | 27 s |
| Pipeline, all Haiku 5.5 | 18/18 | 1.78¢ | 1.78¢ | 99 s |
| One agent, Sonnet 5.5 | 6/6 | 5.38¢ | 5.38¢ | 29 s |
| Pipeline: Haiku plans, Sonnet builds, Haiku reviews | 6/6 | 8.73¢ | 8.73¢ | 100 s |
| Pipeline: Sonnet plans, Haiku builds, Sonnet reviews | 6/6 | 10.26¢ | 10.26¢ | 74 s |

Source: Factory lab, Experiments 1 and 2 (labs/factory-lab/src/traces/pipelines.json); Claude Code in a locked-down sandbox, normal tickets; Haiku arms 3 runs per task, Sonnet arms 1

![What a factory pipeline adds, step 2: One agent takes the ticket. One Claude Code agent on Haiku 5.5 reads the ticket and the repo, implements the change and writes tests until they pass. On the normal tickets it passed all 18 runs (six tasks, three runs each), at 0.47¢ and a median 27 seconds a run.](https://stackassay.com/stories/figures/software-factories-flat-2.png)

**Figure 2.** One agent takes the ticket. It reads the ticket and the repository, writes the change and its tests, and the hidden check passes every run.

Planning was the largest line in the pipeline's bill, 36% of it, ahead of building at 31% and review at 30%; the fix round, which ran only when the reviewer asked, was 4%. That matches the framework study. A planner rereads the repository to write a specification that the builder then rereads the repository to implement. On tasks one agent can hold in its head, that is the same work done twice.

![What a factory pipeline adds, step 3: A pipeline of roles passes the same 18. The pipeline splits the work: a planner writes SPEC.md from the ticket and docs, a builder implements it, a reviewer reads the diff and approves or asks for changes, and a fix round follows if it asks. Same model, same tickets: 18 of 18 again, but at 1.78¢ and 99 seconds a run. Planning was its largest cost line.](https://stackassay.com/stories/figures/software-factories-chart-3.png)

**Figure 3.** Every arm's numbers in one chart, with the pipeline highlighted. It has the same passes as one agent, at several times the cost and time.

The reviewer asked for changes in 2/18 pipeline runs, both on the slug task, and both changes already passed the hidden check. The requests were not noise, though. Each pointed at a real gap the docs and the check both miss, where a title made only of digits produces a slug that an old numeric-id link would shadow. That is the kind of finding a reviewer is good for, and it is a reason to keep one, but not as a stage that every ticket pays for before a person sees it.

### Experiment 2: a model per stage

> **Experiment 2, Cost: [A model per stage](https://stackassay.com/labs/factory/#model-per-stage).** Does putting a strong model in one seat and a cheap one in the others lower the cost per passed task?

Warp's example configuration puts a strong model on implementation and cheaper ones on planning and review. We ran that pattern with Sonnet 5.5 building, its reverse with Sonnet planning and reviewing, and one Sonnet agent alone, once per task each. Every arm passed every task. With Sonnet building, the cost per pass was 8.73¢; with Sonnet planning and reviewing, 10.26¢; one Sonnet agent, 5.38¢, which is 11.4× what one Haiku agent cost.

![What a factory pipeline adds, step 4: A strong model in one seat cost more, passed no more. Warp’s pattern puts a strong model on the build and cheap ones on planning and review. With Sonnet 5.5 building, every task passed at 8.73¢ per pass; Sonnet planning and reviewing cost 10.26¢, and one Sonnet agent 5.38¢. One run per task each, so small samples, but no seat needed the stronger model.](https://stackassay.com/stories/figures/software-factories-iso-4.png)

**Figure 4.** The pattern with a strong builder between cheap planner and reviewer seats. Every task passed, at many times the cost of one cheap agent.

Strong models are not a waste. A strong model belongs in a seat where a cheap one has been measured to fail, and on these tasks no seat failed. The Sonnet arms ran once per task, so read their costs as indicative. The direction, though, is not close. No mix beat one cheap agent on cost per pass, and none passed more.

### Experiment 3: review agents on planted bugs

> **Experiment 3, Review: [Review agents on planted bugs](https://stackassay.com/labs/factory/#review-agents).** What share of planted bugs does a review agent flag, and how often does it flag a correct change?

To test reviewers without depending on what the builders happened to write, we gave each reviewer a fixed diff, the ticket and the doc. That made 144 reviews in all, over eighteen planted bugs and six correct changes, three runs each. Graded against the known list of bugs rather than by another model, both reviewers flagged every bugged diff, 54/54 for Haiku and 54/54 for Sonnet. Both also flagged 7/18 correct changes, a false-alarm rate of 39%.

**Table 11.** Review agents on fixed diffs with planted bugs. Recall was perfect for both models; so was the rate of false alarms on correct code, which was high.

| Reviewer | Bugged diffs flagged | Correct diffs flagged | Cost per review |
| --- | ---: | ---: | ---: |
| Haiku 5.5 | 54/54 | 7/18 | 0.07¢ |
| Sonnet 5.5 | 54/54 | 7/18 | 1.18¢ |

Source: Factory lab, Experiment 3 (labs/factory-lab/src/traces/review.json); 18 planted bugs and 6 correct changes, shown as a diff with the ticket and the doc, 3 runs each

![What a factory pipeline adds, step 6: Review agents catch bugs and flag correct code. Shown only the ticket, the doc and a diff, Haiku 5.5 and Sonnet 5.5 each flagged all 54 diffs with a planted bug, and also 7 of 18 correct ones, mostly over code the diff did not show. Haiku cost 0.07¢ a review and Sonnet 1.18¢. A cheap reviewer is a useful filter, not a merge decision.](https://stackassay.com/stories/figures/software-factories-flat-6.png)

**Figure 5.** A reviewer shown a diff with a planted bug asks for changes. Across the experiment both models flagged every planted bug, and a large share of correct changes too.

The false alarms had a pattern. Most were about code outside the diff, where the reviewer could not see whether a helper already handled a case, so it asked. That points at the fix the Stack uses, which is to let the reviewer read the whole repository as well as the diff. Cost points the same way as Experiment 2. Haiku reviewed exactly as well as Sonnet at 0.07¢ a review against 1.18¢. A reviewer this cheap is worth running on every change, as long as a person treats its flag as a question and not a verdict.

### Experiment 4: green tests, wrong code

> **Experiment 4, Verification: [Green tests, wrong code](https://stackassay.com/labs/factory/#green-vs-correct).** When agents write their own tests, how often are the tests green while the code fails a hidden check?

Every run in Experiments 1, 2 and 5 was told to add tests and keep them passing, and every one did. The agents' own tests were green in 90/90 runs. 2 of those runs were still wrong on the hidden check. Both came from thin tickets on the configuration task. The agent accepted only true, false, 1 and 0 as booleans, missed the yes, no, on and off that the repository's docs allow, and wrote tests that agreed with its own reading.

![What a factory pipeline adds, step 5: Green tests are not a verdict. All 90 runs ended with the agent’s own tests green. Two were still wrong: from thin tickets that only named the interface, the agent accepted true/false/1/0 as booleans, missed yes/no/on/off in the docs, and wrote tests that agreed with it. Tickets that pointed to the docs passed 18 of 18.](https://stackassay.com/stories/figures/software-factories-iso-5.png)

**Figure 6.** Green tests are not a verdict. From a thin ticket the agent misread a rule and wrote tests that agreed with it, so its suite passed while the hidden check failed.

That is the whole problem with merging on green in one example. The agent's tests did exactly what tests do and confirmed the agent's understanding. When the understanding is wrong, the tests are wrong with it, and nothing in a green build says so. Ona's showcase reported a CI green figure of 100%; in our lab, every run was green too, and green was not the same as right.

### Experiment 5: how much the ticket matters

> **Experiment 5, Input: [Spec quality](https://stackassay.com/labs/factory/#spec-quality).** How much does the pass rate move between a thin, a normal and a detailed ticket for the same task?

The same agent, model and tasks, with only the ticket changed. From thin tickets it passed 16/18; from normal tickets that point to the doc with the rules, 18/18; from detailed tickets that spell every rule out, 18/18.

**Table 12.** One agent from thin, normal and detailed tickets. The two wrong runs came from thin tickets, and both had green tests.

| Ticket | Passed the hidden check | Own tests green but wrong | Cost per run | Median time |
| --- | ---: | ---: | ---: | ---: |
| Thin: names the interface only | 16/18 | 2 | 0.49¢ | 26 s |
| Normal: points to the doc | 18/18 | 0 | 0.47¢ | 27 s |
| Detailed: spells out every rule | 18/18 | 0 | 0.51¢ | 26 s |

Source: Factory lab, Experiments 4 and 5 (labs/factory-lab/src/traces/pipelines.json); one Claude Code agent on Haiku 5.5, six tasks, 3 runs each

![What a factory pipeline adds, step 5: Green tests are not a verdict. All 90 runs ended with the agent’s own tests green. Two were still wrong: from thin tickets that only named the interface, the agent accepted true/false/1/0 as booleans, missed yes/no/on/off in the docs, and wrote tests that agreed with it. Tickets that pointed to the docs passed 18 of 18.](https://stackassay.com/stories/figures/software-factories-sequence-5.png)

**Figure 7.** The whole scene as one sequence of calls, with the green-but-wrong step highlighted. It shows the thin ticket, the agent's passing tests, and the hidden check that catches the missed rule.

Specification quality mattered, but only at the low end, and the cheapest fix was tiny. A ticket did not need every rule written out. It needed one line saying where the rules live. Ona's main lesson from its livestream was that specification quality decides output quality; our result agrees, with the useful refinement that "quality" here meant a pointer, not an essay.

### Experiment 7: memory across tickets

> **Experiment 7, Memory: [Memory across tickets](https://stackassay.com/labs/factory/#memory-across-tickets).** When an agent keeps notes from code reviews across a run of tickets, do later tickets pass more often, and what happens when the notes are poisoned?

Factory products have started to keep memory between runs. We tested what notes do inside a factory with two small libraries, one for invoicing and one for shipping parcels, whose house rules point in opposite directions, with integer cents and exceptions in one and integer grams and result objects in the other. Each got five thin tickets in a row that never mention the rules. After each ticket the hidden check's verdict came back as a code review, and in the memory arms a second agent rewrote the notes file Claude Code reads before it starts. Each arm ran 5 sequences per library.

**Table 13.** Notes carried across five tickets in two libraries with opposite house rules. Notes added nothing when the docs held the rules; planted wrong notes broke every ticket until the prompt ranked docs above notes.

| Arm | Ledger: passed | Parcels: passed | Followed a planted note | Cost per ticket (ledger) |
| --- | ---: | ---: | ---: | ---: |
| No notes | 23/25 | 25/25 | – | 0.34¢ |
| Notes from reviews | 23/25 | 25/25 | – | 1.26¢ |
| Notes, two planted wrong | 0/25 | 0/25 | 25/25, 25/25 | 1.04¢ |
| Planted notes, docs ranked first | 24/25 | 25/25 | 0/25, 0/25 | 1.11¢ |
| No notes, no docs | 3/25 | 0/25 | – | 0.28¢ |
| Notes from reviews, no docs | 5/25 | 0/25 | – | 1.06¢ |

Source: Factory lab, Experiment 7 (labs/factory-lab/src/traces/lane-a.json); two repos with opposite house rules, five thin tickets in a row, 5 sequences per arm, Haiku 5.5; cost includes the note-writing run

With the rules written in the repository's docs, notes changed nothing. The invoicing library passed 23/25 tickets with no notes and 23/25 with them, at 0.34¢ against 1.26¢ a ticket, because writing the notes is another agent run. Without docs, notes did not rescue the agent either. It passed 3/25 with no notes and 5/25 with them in the invoicing library, and none in the parcels library either way. Rules learned one review at a time did not add up to the rules.

Poisoned notes were the striking result. We seeded the notes file with two wrong "team decisions" that claimed to supersede the docs. One said to return money as float dollars, and the other to raise a plain exception instead of the library's error type. Every ticket that read them followed them, 25/25 in one library and 25/25 in the other, and every ticket failed. When the prompt said that the docs and reviews outrank the notes, the same poisoned notes did no harm, and 24/25 and 25/25 passed. Memory is a place where a planted instruction persists, and the defence that worked was an explicit order of authority.

### Experiment 8: tests that contradict the docs

> **Experiment 8, Verification: [Tests that contradict the docs](https://stackassay.com/labs/factory/#contradicting-tests).** Told not to change a visible test that contradicts the docs, do agents follow the docs, side with the test, or edit it, and do they say so?

We built a small repository whose docs say a bare number in a duration means minutes, and one of whose visible tests says seconds. The ticket asked for the documented behaviour, all tests passing, and no changes to the tests, which cannot all hold. The hidden check followed the docs.

**Table 14.** A visible test that contradicts the docs, under two ticket wordings. No agent edited the tests, and every agent said the two disagreed.

| Ticket wording | Followed the docs | Sided with the test | Edited the tests | Said they disagree |
| --- | ---: | ---: | ---: | ---: |
| “Do not change the tests” | 4/8 | 4/8 | 0/8 | 8/8 |
| The same, plus “if they disagree, follow the docs and say so” | 8/8 | 0/8 | 0/8 | 8/8 |

Source: Factory lab, Experiment 8 (labs/factory-lab/src/traces/lane-a.json); one Claude Code agent on Haiku 5.5, 8 runs per wording

![What a factory pipeline adds, step 5: Green tests are not a verdict. All 90 runs ended with the agent’s own tests green. Two were still wrong: from thin tickets that only named the interface, the agent accepted true/false/1/0 as booleans, missed yes/no/on/off in the docs, and wrote tests that agreed with it. Tickets that pointed to the docs passed 18 of 18.](https://stackassay.com/stories/figures/software-factories-3d-5.png)

**Figure 8.** The green-but-wrong case in 3D. The agent's tests pass and only the hidden check, which follows the docs, sees the missed rule. A visible test that contradicts the docs bends green the same way.

Under the plain wording, the agent followed the docs in 4/8 runs and sided with the test in 4/8, leaving the code wrong by the docs and the build green. It edited the tests in 0/8, and it said the docs and test disagreed in 8/8, so no run hid what it had done. Adding one sentence, follow the docs and say so if they disagree, moved it to 8/8. The way out mattered, as it did in ImpossibleBench. And because every run said what it had done, the information a reviewer needed was there; a factory only has to put it in front of one.

### What the claims ledger now says

We keep a claims ledger of statements from vendors, researchers and practitioners, each with our verdict and evidence. The factory track settled or narrowed several, including Warp's cost claim, which we cannot reproduce from outside, and the claim that a single loop costs less than a split design, which the coding tickets supported.

**Table 15.** Claims from outside sources that bear on software factories, with our verdict; the evidence for each is on the claims page.

| Claim | Source | Verdict |
| --- | --- | --- |
| One agent loop with skills scores higher on task quality than an orchestrator with specialist subagents. | fold-subagents | mixed |
| The single loop costs less per task than the subagent design. | fold-subagents | supported |
| The single loop answers faster than the subagent design. | fold-subagents | supported |
| About 10 golden examples are enough for a useful first end-to-end eval. | fold-subagents | mixed |
| If you split, split by context (self-contained work that returns a compact result), not by problem type; type splits lose fidelity at each handoff. | fold-subagents | mixed |
| A software factory config cut cost per PR by 63%. | warpbench | not-testable |
| Choosing a model per stage, strong where it matters and cheap elsewhere, lowers cost per passed task. | warpbench | mixed |

Source: The claims ledger (packages/tracks/src/claims.ts): outside claims, each with our verdict and evidence

### What changed in the recommendation

The provisional pipeline became an optional stage. The default is one agent per ticket on the cheapest model that passes, with planner and reviewer stages available for work measured to fail without them. The merge gate moved to the centre. Never merge on green alone, run checks the agent did not write, and put a cheap reviewer that sees the whole repository in front of a person rather than in place of one. Tickets point at the doc that holds the rules. And every stage runs in the same locked-down sandbox, with grading outside it.

**Table 16.** The track's recommended stack after the lab, layer by layer, with our confidence in each pick.

| Layer | Pick | Confidence |
| --- | --- | --- |
| Factory shape | One agent per ticket by default; add a planner or reviewer stage only for work measured to fail without it | medium |
| Ticket and handoff | Tickets name the interface and point to the doc that holds the rules; roles hand off through files (SPEC.md, REVIEW.md, a diff) | medium |
| Where stages run | Every stage in the same locked-down sandbox and workspace; grading and the agent’s own tests in separate offline containers | high |
| Triggers | Start runs from the issue tracker or PR events teams already use (GitHub, Linear, Slack); not tested here | low |
| Merge gate | Never merge on green alone. Run hidden or independent checks, and use a cheap AI reviewer as a filter in front of a person who still decides | medium |
| Models per stage | The cheapest model that passes, in every seat (here Haiku 5.5); a stronger model only in a seat where the cheap one is measured to fail | low |
| Differentiator | Measure the factory on hidden checks and cost per passed task, with every metric defined, before buying throughput claims | bet |

Source: The Software factories track’s recommended stack, as of 2026-11-18 (packages/tracks/src/software-factories.ts)

### What a team would have done instead

A team choosing from vendor pages would have bought the pipeline, because that is what the products demonstrate, and paid about 3.8× per ticket for a planning stage its tickets did not need. A team that followed the most-cited cost write-up would have put a strong model in the build seat and paid many times more per pass for the same result. A team that trusted CI green would have merged 2 wrong changes with passing tests and no warning. A team that let an AI reviewer gate merges would have blocked 39% of its correct work. And a team that turned on memory would have created a place where two lines of planted text could break every later ticket. None of those failures shows up in a throughput chart.

## Part 6. The software factories Stack

### Why we built a Stack

The lab's conclusion is easy to state and surprisingly hard to build. One agent per ticket, in a container that cannot leak your key or your code, graded by checks it cannot see or forge, with a gate that explains itself to the person who decides. Stripe and Ramp built that shape with platform teams of their own. The hosted products sell something close to it, on their machines and their terms. Most teams in between do not have a platform team to spare, and do not want their code and tickets running on a vendor's fleet. They wire an agent to a label in an afternoon and find out about green-but-wrong changes and planted instructions later.

So we packaged the lab. The software factories Stack is the track's recommended stack as software a team runs in its own GitHub repository, on its own model key. It is a `factory` command and a GitHub Action. Label an issue, and one sandboxed agent works it; a merge gate checks the result and opens a pull request marked ready for review, flagged or blocked. It never merges. Inside it is the same sandbox, gateway, grader and meter that produced every lab number in Part 5, so a team can re-run our measurement on its own tickets. The rest of this part explains what it is, how it works, why its defaults are what they are, how it did in its own lab, and how a team puts it to work.

### What it is, beside the category

Most of what a buyer meets in this market is either a hosted factory or the prospect of building one. The Stack sits between. It is a small factory you run yourself, with the measurement built in.

**Table 17.** The category the track covers, beside the Stack, row by row. The same comparison appears on the Stacks page.

|  | The category | This Stack |
| --- | --- | --- |
| What it is | Coding agents wired into your issue tracker, CI and code review, so tickets turn into pull requests with little human help. | A small software factory that runs in your own GitHub repository, as a GitHub Action and a `factory` command. |
| What it does | Takes an issue, plans and writes the change, runs the tests and opens a pull request. Some add planner and reviewer stages or learn from past work. | Label an issue and one sandboxed agent works it. A merge gate runs your hidden checks, the agent’s tests and an optional whole-repo reviewer, then opens a pull request marked ready, flagged or blocked. A person always decides the merge. |
| Why you need it | Green tests are not enough. In the lab, agents’ own tests passed in every run, including two runs whose change was wrong, and reviewers that saw only the diff flagged 7 of 18 correct changes. | A gate that never merges on green alone. It runs hidden checks the agent never sees and the agent’s own tests, and you can turn on a reviewer that reads the whole repo. Every flag is explained to the person who decides. |
| What you are buying | A hosted service (Devin, GitHub Copilot coding agent, Cursor Automations, Factory, Warp) that runs your code on its machines, on its terms and its model bill. | Source you can read, running in your own CI on your own model key. It is Claude Code in a locked-down container, a gateway that holds the key, an offline grader and the lab’s cost meter. Defaults set by measured results, and the measurement itself so you can re-run it on your tickets. |
| Why now | The category moves monthly. New agents ship, one hosted product shut down in October 2026, and pipelines with more stages sell as more capable without evidence that they are. | Start on the shape the evidence supports (one agent per ticket did as well as a three-stage pipeline at a quarter of the cost) and keep your tickets, code and keys in your own CI whichever vendor wins. |
| Who it is for | Teams that want agents doing real tickets and need to trust what lands in review. | A team that wants agents on its backlog now, inside its own CI, with guardrails that were measured rather than assumed. |

Source: The Software factories Stack, as of 2026-11-19 (packages/tracks/src/stacks.ts), the same data as stackassay.com/stacks/

Three properties follow. It is local to your infrastructure, so the agent runs on your CI runners or your machines, and nothing reaches us. It is conservative by default, with one agent, the cheapest model, no planner and no auto-merge, so every extra stage is something you switch on because you measured a need. And it is measurable, because every run writes the same record the lab used, so a team can compare its own results with ours and see when a change in model, ticket style or agent version moves the numbers.

### How one ticket runs

A ticket's journey is short, and each step corresponds to something the lab learned.

**Box 1. One ticket, start to finish.** One ticket from the label to the pull request a person decides on.

1. Someone with triage rights labels an issue. The ticket is the issue as it was when labelled, so a later edit cannot change what the agent sees.
2. One Claude Code agent works the ticket in a locked-down container with no secrets and no network except a gateway that holds your model key.
3. The gate runs your hidden checks (which the agent never sees) and the agent’s own tests, offline, and an optional cheap reviewer that reads the whole repo.
4. A pull request opens, as a draft if the gate blocked it, with what each check found and what the run cost on your key. A person decides whether it merges.

![What a factory pipeline adds, step 1: Six tickets, hidden checks, one sandbox. Each task is a small Python repo: a backlog ticket, docs that hold the rules, and starter tests. A hidden check the agents never see grades the final code in an offline container. Every agent is Claude Code in a locked-down sandbox, and costs come from OpenRouter’s records, not the agent’s own report.](https://stackassay.com/stories/figures/software-factories-3d-1.png)

**Figure 9.** The same scene as a 3D model you can turn on the track page, with the agents on one side and the final code going to a hidden check they never see. The Stack keeps that last step out of the agent's reach.

The ticket is frozen at the moment of labelling, so an issue edited afterwards, by its author or anyone else, cannot change what the agent was asked to do. Only people who can label issues can start a run, which ties the factory's authority to the repository's existing permissions. The agent works in a container with no secrets. The gate runs outside it. And the pull request body carries what each check found and what the run cost, so the person reviewing sees the evidence beside the diff rather than having to go looking for it.

### Inside the sandbox

Every run gets a throwaway container built for the job. It has no secrets, a read-only root filesystem, no Linux capabilities, and one network route, to an egress gateway. The gateway holds your OpenRouter key and forwards only the model and catalogue paths the agent needs. It refuses key, credit and account endpoints, so an agent that tried to read or change your account through the borrowed key would get nothing. The agent itself is handed a placeholder key and never sees the real one.

The issue text is untrusted input. Anyone who can open an issue can write instructions in it, and the Stack treats the sandbox as the boundary and does not rely on the prompt. The agent's copy of your repository leaves out common credential files at any depth, including environment files, npm and Python package settings, keys, certificates, and cloud and SSH folders. It never sees the Stack's own folder, its run records or git internals. When the run ends, a change to a protected path, such as your workflows or the Stack's configuration, blocks the run instead of reaching the pull request, and so does a change to any file the agent was never shown. A planted instruction that convinced the agent to rewrite your CI would produce a blocked run and a reason, not a pull request.

The same care applies to what the agent writes into the pull request. The AI review and the check output sit inside a code block that their text cannot close, so a review cannot inject its own Markdown or fake a gate result in the body a person reads.

### A merge gate that never merges on green alone

The gate is the centre of the Stack, and its design comes straight from Experiments 3, 4 and 8. It has three inputs and one rule.

The first input is your hidden checks, small scripts that encode the rules that matter to you and that the agent never sees. They run offline against the finished workspace, in a separate container. A pass needs a value generated for that run alone, which the workspace cannot read, so code written by the agent cannot print a forged pass. The second input is the agent's own tests, run the same way. They are useful, and Experiment 4 is why they are not enough. The third, optional, is a cheap AI reviewer that reads the whole repository rather than just the diff, because diff-only review produced most of the false alarms in Experiment 3. It never edits code.

The rule is that the gate has no "merge". It ends in one of three words. Ready for review means every check passed and the reviewer, if on, approved. Flagged means the checks passed but something deserves a person's attention, most often a reviewer's request with its reason. Blocked means a hidden check failed or the run touched something it must not, and the pull request opens as a draft. A person decides every merge. Without hidden checks the gate flags every run, because the agent's own tests alone are exactly the signal the lab showed cannot be trusted.

![What a factory pipeline adds, step 7: Recap: one agent, docs in the ticket, independent checks. On these tasks the pipeline machinery added cost and time but no passes. Start with one cheap agent per ticket, point the ticket at the docs, and gate merges on checks the agent did not write, with a cheap reviewer in front of a person. Add stages and stronger models where a measured failure calls for them.](https://stackassay.com/stories/figures/software-factories-iso-7.png)

**Figure 10.** The Stack packages one cheap agent per ticket, a planner only if needed, a reviewer as a cheap filter, and an independent check before a person decides.

### Checks you can prove before you trust them

A hidden check that always passes is worse than none, because it looks like evidence. The Stack's `factory validate` command proves each check before you rely on it, offline and free. A check must fail on the starting repository, so it tests the change. It must pass on a reference solution with your own tests still green, so it is achievable. And it must catch every planted wrong answer you supply, for the reason you name, so it tests what you meant rather than something incidental. A check drafted by a model is trustworthy only once it holds here.

The Stack ships worked examples to copy. Two are task repositories from the lab's six. The others are the ten steps of Experiment 7's two libraries, each with a reference solution and the wrong answers its checks must catch, eighteen in all. They make a working template for the most useful thing a team can write, a check that encodes a house rule an agent is likely to miss.

### Metered from outside

The Stack never asks the agent what it cost. Each run's calls come from the gateway's log, and tokens and cost come from OpenRouter's own records of those calls. The `factory assay` command runs the lab's measurement on your tasks, at the ticket levels and run counts you choose, and writes the lab's normalised record, with hidden check passed or not, own tests green, green-but-wrong, cost and time, one line per run. A cost cap in the configuration stops an assay from starting new runs once it is reached, and warns when a single ticket goes over it. And we recommend a dedicated model key with a credit limit, which is the one control that does not depend on any of our code.

### Defaults, and the evidence behind each

Each default names the experiment that set it. If a later result contradicts one, the default changes and the release notes cite the result.

**Table 18.** The Stack's defaults and the evidence for each, from the experiments in Part 5.

| Default | The evidence | From |
| --- | --- | --- |
| One agent per ticket | A planner, builder and reviewer pipeline passed the same 18 of 18 tasks at 3.8× the cost. | Experiment 1, Structure |
| Never merge on green alone | Agents’ own tests were green in all 90 runs; 2 of those runs were wrong on the hidden check. | Experiment 4, Verification |
| The reviewer, when you turn it on, reads the whole repo | Reviewers that saw only the diff flagged 7 of 18 correct changes. | Experiment 3, Review |
| Tickets point to the doc with the rules | Thin tickets passed 16 of 18; tickets that named the doc passed 18 of 18. | Experiment 5, Input |

Source: The Software factories Stack, as of 2026-11-19 (packages/tracks/src/stacks.ts), the same data as stackassay.com/stacks/

The defaults are a starting point. The configuration file can switch on the planner or reviewer stage, change the model for every seat or name any OpenRouter model, set your test command, add protected paths and raise or lower the cost cap. The defaults encode where the evidence says to start. The reviewer is off until you turn it on, the planner is off until a measured failure calls for it, and the model is the cheapest one that passed. The reviewer earns its cost in our own runs, as the next section shows, but it is a choice a team should make knowingly, not one that ships silently switched on.

### The Stack measured in its own lab

A Stack runs as an arm in its own track's lab, on the same tasks, sandbox, checks and meter as every other option, and its results are published whether it wins or loses. We ran version 0.1.0 on the six tasks with normal tickets, three runs each, on Haiku 5.5, with the whole-repository reviewer switched on.

> **Experiment 6, Independence: [Our Stack as an arm](https://stackassay.com/labs/factory/#stack-arm).** Run through the same tasks, sandbox and checks, does the Stack we sell do what this lab recommends, and what does its merge gate tell a person? This is the lab's Experiment 6, held back from Part 5 so it can sit beside the product it measures.

**Table 19.** The Stack as an arm in its own lab, on the same six tasks with normal tickets, three runs each.

| Measured as an arm in its own lab | Result | From |
| --- | ---: | --- |
| Passed the hidden check (six tasks, 3 runs each) | 18 of 18 | Experiment 6, Independence |
| Model spend per ticket to build the change | 0.48¢ | Experiment 6, Independence |
| Model spend per ticket for the whole-repo reviewer | 0.50¢ | Experiment 6, Independence |
| Changes the gate flagged for a person, each with a reason | 5 of 18 | Experiment 6, Independence |

Source: The Software factories Stack, as of 2026-11-19 (packages/tracks/src/stacks.ts), the same data as stackassay.com/stacks/; The same six tasks, sandbox, hidden checks and cost meter as every other option in the track, run on Claude Haiku 5.5.

**Table 20.** The Stack beside one agent and the pipeline from Experiment 1. It builds like one agent; its reviewer is the part that costs extra, and it explains every flag.

| Arm | Passed | Cost to build | Cost to review | Median time | Sent to a person with a flag |
| --- | ---: | ---: | ---: | ---: | ---: |
| One agent, Haiku 5.5 | 18/18 | 0.47¢ | – | 27 s | – |
| Pipeline, all Haiku 5.5 | 18/18 | 1.78¢ | included | 99 s | 2/18 |
| The software factories Stack (reviewer on) | 18/18 | 0.48¢ | 0.50¢ | 58 s | 5/18 |

Source: Factory lab, Experiments 1 and 6 (labs/factory-lab/src/traces/pipelines.json, stack-arm.json); six tasks, normal tickets, 3 runs each, Haiku 5.5. The pipeline's flags are its reviewer's requests for changes

It passed 18/18, with 0 green-but-wrong runs. Building cost 0.48¢ a ticket, the same as one agent in Experiment 1 at 0.47¢, as it should be, since it is one agent. The whole-repository reviewer added 0.50¢, so a reviewed ticket cost 0.98¢, still well under the pipeline's 1.78¢. A run took a median 58 s, because the gate and the reviewer take time after the agent finishes.

The gate marked 13/18 ready for review and flagged 5/18; it blocked 0. All five flagged changes passed the hidden check, so by the lab's measure they were correct. Each flag named a concrete gap that the check does not test. They were an empty environment variable overriding a value from the configuration file, a rate limiter whose memory of clients grows without limit, a crash on digits outside ASCII, a claimed off-by-one in a slug's length cut, and the numeric slug that shadows an old link, which the pipeline's reviewer had found too. We have not verified every one of these claims. That is the right posture for a person reading the gate, too. The reviewer's flag is a pointed question, and it arrives with its reason attached.

This is the trade the Stack offers in one table. Against the pipeline, it keeps a second opinion for about half the extra cost and gives that opinion to a person rather than to a fix round. Against one bare agent, it adds checks the agent cannot game and a reviewer that explains itself, for about the cost of building the change a second time.

### Getting started

The Stack installs from our package registry with the licence key you receive at purchase. It needs a GitHub repository with Actions, Docker for local runs, and your own OpenRouter key.

**Box 2. Install and first run.** From install to a checked setup. `init` keeps anything that already exists.

```sh
npm i -D @stackassay/stack-software-factories
npx factory init
npx factory image
npx factory doctor
```

**Box 3. What it needs from your team.**

- A GitHub repository and Actions minutes
- Your own OpenRouter key, added as a repository secret
- Hidden checks for the rules that matter to you (optional; without them the gate flags every run)

The first session usually goes like this. `init` adds the Stack's folder, the GitHub workflow and the lines your ignore file needs. `image` builds the agent image on your machine. `doctor` checks Docker, the image, your keys, your checks and your licence, and says when a newer release is out. Validating the bundled examples proves the checks hold on your machine, and an assay of them reproduces part of the lab's measurement on your setup for a few cents. Then add `OPENROUTER_API_KEY` as a repository secret, label a small issue `factory`, and read the pull request that comes back.

After that, the useful work is writing hidden checks for your own house rules, the conventions in your docs that a reviewer would catch and an agent might not. Start with the rules that have bitten you before. Three to six checks drawn from real review comments, proved with `validate`, turn the gate from a flag on every run into a real filter. And keep tickets pointing at the doc that holds the rules; Experiment 5 says that one line is worth more than a long specification.

### Living with it

Coding agents and models ship constantly, and a factory that worked last month can change underneath you. The Stack pins the agent version in its image, so an upgrade is a deliberate rebuild rather than a surprise, and the assay is built to be rerun. Measure once when you adopt it, then again when you change the model, the agent version or your ticket template. A change in pass rate, green-but-wrong runs or cost per ticket shows up in your numbers before it shows up in your review queue.

When the lab measures something better, a release changes the Stack's defaults and its notes cite the result, so you pull an update instead of starting over. Every release is included while a licence is active, major versions too. Upgrading is one npm command and, when a release changes the agent image, a rebuild; Renovate or Dependabot can open the upgrade with the same registry settings. A renewal keeps your key, and `factory licence --refresh` fetches the new licence file. The licence check is offline and never stops a run; an unlicensed or expired copy says so on the console and in every pull request body.

**Box 4. Release history.** Every release so far, from the Stack's changelog. The same notes are on the Stacks page and in its feed.

**0.6.0** (2026-12-01)

- No defaults changed.
- One spend cap for the calendar month across every provider, 20 US dollars until you change it (`monthlyUsd` at the top of `.stackassay/models.json`). It is the most the Stacks in your repo may spend on your model keys in a month, each call priced at its own provider's prices, so switching providers keeps the same budget. `factory run` and `factory assay` say where the month stands and do not start past the cap. An assay holds to it run by run. A run already going is bounded by its own budget and time limit. It starts again when the month turns. The count comes from your repo's spend ledger, so it is not the provider's bill. `--max-usd` still holds for one command.
- Every line in the spend ledger now names the provider it was spent at. `factory run` and `factory assay` write to the ledger for the first time, one line a run for each provider its stages were called on (`--ledger <file>` and `--ledger-track <name>` say where and under what name).
- The Stack says how it is set up, so Assay Platform can set it up in a project on one yes. `factory help --json` prints every verb with its flags, whether the verb spends, every setting in the config, and the set-up steps in order: `init`, `image`, then `validate --examples`. None of the three calls a model or spends. The last two need Docker, and Platform leaves them for later when Docker is not running.
- `factory init --dry-run` lists the files a set-up would write and writes nothing.
- `factory validate --examples` and `factory assay --examples` use the two worked examples that ship in the package, wherever the package is installed. `factory status` now names that command when the repo has no tasks of its own.
- `factory help` is now written from the same list as `help --json`, so the two cannot differ. The verbs come in the order you use them, and each flag sits beside its verb.

**0.5.1** (2026-12-01)

- No defaults changed.
- `--json` on any command now prints its whole document when it is piped to another program. A document over about 64 KB could arrive cut short, because the command exited before the pipe had taken all of it.
- The README calls `factory report --html` a one-file report.

**0.5.0** (2026-11-30)

- One exit code changed; nothing a run measures changed. `factory assay` and `factory report` now exit 1 when a run failed its hidden checks. Until now they exited 0 whenever any run finished. `factory run` is unchanged and still exits 0 whatever the gate decides. Lab result: Experiment 4, Green tests, wrong code (software factories lab), 2026-11-18.
- `factory status` says where this repo is with the Stack, in four stages. Adopt means the repo is set up and holds tasks of your own. Prove means the checks hold and an assay has given a verdict. Fix means the verdict was no. Watch means it was yes. It names what waits on you and the one next command, and under `--json` gives `stage`, `why`, `waits` and `next`. It reads files only, spends nothing and always exits 0. A yes is asked for again when the config or the tasks change after it, or when it is more than 30 days old.
- `factory report --html` also writes the Stack's page as one file, `report.html` beside the records (or the file you name). It opens in any browser with no server and nothing loaded from the network, so it can be kept as a CI artefact. It shows where the repo is and the next command, then two columns. Running lists each stage of the factory, each marked proven, failed or unproven with what that rests on. Proven holds the verdict, what it was proven on, the last assay's table and each failed run by name. With no records on file the page still writes, and says unproven.
- A verdict now says what it was proven on. `verdict.json` gains `on`, the cases folder and whether the cases are your own. A yes on the worked examples is no longer read as a yes on your work, by `status` or by the page.
- `factory validate` on tasks of your own keeps its result as `validated.json` in the runs folder, which is how `status` knows the checks hold. Change one afterwards and `status` asks for `validate` again.
- A model can be a role in the repo's shared settings file, `.stackassay/models.json`, which every Stack Assay Stack reads: a provider, a model id and prices. The builder, the planner, the reviewer stage and the gate reviewer can each name their own, on OpenRouter, on Anthropic's own API, or on any endpoint in the Anthropic Messages format, which is the format the agent speaks. Without the file nothing changes.
- The gateway holds one key per provider and sends each only to that provider's own host. A host the settings file names for a key needs `--allow-hosts` (or `STACK_ALLOW_HOSTS`) from the person running the command.
- Off OpenRouter, cost is counted at the gateway. It reads the token counts from each reply, cached tokens included, and prices them at what the role states (`inPerM`, `outPerM`, and `cacheReadPerM` and `cacheWritePerM` when given). A call with no stated price is counted and shown as unpriced.
- `factory doctor` checks the keys the configured models need and names each model and its provider.
- A stage's `calls` now counts model calls only. Until now it counted every request the gateway saw.
- `factory assay` and `factory report` end with a verdict: `yes`, `no` or `none`, with one sentence of reason. It is on the last line of the text, in `verdict` and `reason` under `--json`, and kept beside the records as `verdict.json`. Only `yes` exits 0. `yes` means every judged run passed its hidden checks; `no` says how many failed and how many of those had green tests of their own; `none` means nothing was judged, or runs ended in an error.
- Each run record now carries its totals at the top level, in the fields every Stack Assay Stack writes: `runId`, `model` (the build model), `calls`, `priced`, the token counts and `licensed`. The per-stage figures stay under `stages`. Records written by earlier versions still read: `factory report` fills the totals in from their stages.

**0.4.0** (2026-11-30)

- No defaults changed.
- `factory help` lists every command with its flags, and `factory version` (or `--version`) prints `software-factories@<version>`. Both were missing: `help` printed one line that pointed at the source.
- `factory report` prints the last assay's result again from the records on file. It is free: no model calls and no Docker.
- The Stack's files in your repo now live in `.stackassay/software-factories/` (`config.json`, `checks/`, `assay/`, `runs/`), with the licence file and the spend ledger in `.stackassay/`, shared by every Stack Assay Stack in the repo. A repo set up on an earlier version keeps working as it is: the Stack reads `.factory/` and `.factory-runs/` until `.stackassay/software-factories/` exists, and `factory init` there keeps the old files and prints the commands that move them.
- The package ships `stack.json`, a manifest of the Stack's id, command, verbs and file paths, for tools that read a Stack without running it.
- Every Stack's folders, old and new, are kept out of the agent's copy of the repo and are always protected paths, so the factory's agent cannot read another Stack's hidden checks.

**0.3.5** (2026-11-30)

- No defaults changed.
- `factory run` now stops at its budget. It checks the spend before each stage (plan, build, review, fix, the gate reviewer) and does not start one once the run has cost `--max-usd`. The usage text always said every run stops there; until now `run` only warned after the fact. A stage it skipped is named in the record (`budget.skipped`), in the pull request and at the gate: the pull request is flagged when a review did not run and blocked when the build did not. A stage already running is bounded by its time limit, as before.
- The README no longer names a payment provider we do not use.

**0.3.4** (2026-11-28)

- No defaults changed.
- A renewed licence now reaches your copy on its own. Once the paid period on your licence file has ended, a run with `STACKASSAY_KEY` set asks our registry once for the renewed file and uses it; without the key, or if the call fails, nothing changes and the run goes on. Until then the check stays offline. `licence --refresh` still works by hand.
- The licence text counts a Stack by instances, like Assay Platform. One instance is one codebase the Stack runs in, with its CI pipelines. It used to allow any number of your repositories. A licence bought before this release keeps the terms it was bought under until it renews.

**0.3.3** (2026-11-27)

- No defaults changed.
- The egress gateway, the one container that holds your OpenRouter key, now stops when the command that started it ends, unless another run of the Stack is still using it. It used to stay up until you removed it.
- The licence text names its governing law: the State of California, USA (it said the jurisdiction where Orionfold LLC is established).

**0.3.2** (2026-11-23)

- No defaults changed.
- `factory validate` without Docker now stops with a plain reason and exit 2 instead of reporting every check as failing, reference solutions included. Found when coding agents installed the Stack on a machine without Docker.
- `factory doctor` names `npx factory image` when the agent image is missing (it said `make image`).

**0.3.1** (2026-11-23)

- No defaults changed.
- `--json` on every `factory` command: one JSON document on stdout (for `run`, the gate decision, its reasons, pass, cost and the changed files), progress on stderr.
- Exit codes every script and coding agent can branch on: 0 yes, 1 no, 2 could not run (with `{"error"}` on stdout under `--json`). `factory run` still exits 0 whatever the gate decides, so the GitHub Action keeps opening a draft PR when it blocks.
- `factory init` adds a Skill for coding agents (`.claude/skills/software-factories/SKILL.md`, and the same file in `.agents/skills/` for other coding agents) and a short section in your AGENTS.md, between markers so a later version can refresh it without touching the rest of the file.
- `factory doctor` links to the Stack's own page for release notes.

**0.2.2** (2026-11-21)

- No defaults changed.
- The Stack Assay registry moves to `https://licences.stackassay.com/npm/`. Point your `.npmrc` there when you next touch it (new licence emails show the new lines); the old address keeps working, and `doctor` and `licence --refresh` trust both.

**0.2.1** (2026-11-21)

- Same commands, flags, config file and defaults, now built on the shared Stack kit that every Stack Assay Stack uses (the sandbox, egress gateway, meter, hidden checks, `validate`, task loader and licence check), so fixes reach every Stack through one release path.
- No defaults changed.
- Copying the agent's work back never writes a file the agent was not shown: one already on your machine but not in its copy (a gitignored file), or one git ignores. The whole write-back is refused instead.
- The AI review and check output in the PR body sit in a code block the text cannot close, so a review cannot write its own Markdown or fake a gate result.
- The egress gateway forwards only the OpenRouter model and catalogue paths the agent uses; key, credit and cost-lookup endpoints are refused, so an agent cannot read your account through the key it is borrowing.
- The agent no longer sees common credential files anywhere in the repo (`.env` files at any depth, `.npmrc`, `.netrc`, `.pypirc`, `*.pem`, `*.key`, SSH private keys, `.aws/`, `.ssh/`), and a change to one of them, or to `.factory-runs/`, is refused and blocks the run instead of reaching the PR.
- A task's `task.json` may also give `"prompt"` (as well as `"ticket"` or `"tickets"`) and `"tests"`, its own test command, which `factory validate` uses instead of the config's.
- Docker networks and containers the factory creates are labelled `factory=1` (was `stack-sff=1`); their names and the 10.232.0.0/24 subnet are unchanged. Stage ids in run records start with `stage-`.
- `factory doctor` says when a newer version is on the registry, using your licence key (it sends the key only to the Stack Assay registry); offline it skips the check.
- The README has an Updates section: upgrading, Dependabot and Renovate with the Stack Assay registry, and renewals.
- `factory help` (and `--help`, `-h`) prints the usage and exits 0; an unknown command says so and exits 1.

**0.1.0** (2026-11-20)

- First release, published to the Stack Assay registry.
- Ships under the Stack Assay Commercial Licence (`LICENSE`), replacing the prototype notice, and trusts the live licence signing key, so a purchased licence reads as licensed.
- One agent per ticket in a locked-down sandbox behind an OpenRouter-only egress gateway (BYOK), with planner and reviewer stages off by default.
- A merge gate that never merges on green alone: hidden checks, the agent's own tests and an optional AI reviewer, ending in *ready for review*, *flagged* or *blocked*. Ships as a GitHub Action.
- `make assay` re-runs the lab's measurement on your own tasks and writes the lab's run record.
- `factory validate`: proves each hidden check fails the starting repo, passes `solution/` and catches every `wrong/<name>/` before you trust it. `examples/house-rules` (ledger and parcels, 18 wrong answers) is a template.
- `factory licence [--refresh]`: an offline licence check with 14 days' grace. It never blocks a run; unlicensed runs are labelled.
- npm packaging from the Stack Assay registry, with `factory init`, `factory image` and `factory doctor`.
- Grading uses a per-run nonce in the environment so a build can't forge a passing check, plus two more fixes from a security review.

### What it is not

The Stack is not a new coding agent, and it does not make Claude Code smarter. It is not a hosted service. There is no server of ours between you and the model, and we never see your code, tickets or keys. It does not merge anything, ever. It is not a pipeline platform with a dozen roles; the planner and reviewer stages exist, but they are off until you have a measured reason. It comes without consulting or setup work. It is software under a source-available licence that you can read before you run it. And it is not a throughput dashboard. Its numbers are about your tickets, on your setup, with every metric defined.

### Who it is for, and when

Three situations come up most. A team with a backlog of well-scoped tickets, such as small features, bug fixes, migrations and dependency chores, wants agents working them now, but inside its own CI and with a gate it can explain to a security reviewer. A team already experimenting with an agent wired to a label wants to stop trusting green and start catching the changes that pass their own tests and break a house rule. And a platform team asked to approve agent pull requests needs a containment model that does not rely on the agent behaving well, plus a record of what each run did and cost.

The case studies in Part 1 are the pattern at scale. Stripe's Minions and Ramp's Inspect run one agent per task in an isolated environment and keep a person on the merge; Airbnb's migration gated each file on checks before it counted; and the .NET team's data shows a strong agent still needs review to stop a third of its work. Those teams built their factories themselves. The Stack gives a smaller team the same shape without the platform team, and none of those companies uses it.

It is less useful for work that is not ticket-sized, such as multi-day features, cross-repository changes and open-ended design. Our tasks were small, and a pipeline may well earn its cost on harder ones, which the assay lets you test. It runs on GitHub; other hosts need the `factory` command wired to your own CI. Its agent image carries Python and Node, so other toolchains mean extending the image. And for one developer working alone, an agent in the editor is simpler.

### How selling a Stack is kept honest

Selling software built from a track's recommendation creates an obvious conflict, because we could bend the measurements toward what we sell. Three rules are there to stop it, and the Stack's own results above, flags and extra review cost included, are one of them at work.

**Box 5. How selling a Stack is kept from bending the measurements.**

- A Stack runs as an arm in its own track’s lab, on the same tasks, sandbox, checks and cost meter as every other option, and its results are published whether it wins or loses.
- It is built only from patterns the lab recommends and from open-source parts. No vendor pays to be in a Stack.
- A track where we sell a Stack says so beside its Players table, and Stacks are never ranked there.

**Box 6. What comes with every Stack.**

- **The stack that won, built.** Each Stack implements the stack that won in one track’s lab, with its defaults set by what the lab measured, not by what sounds advanced.
- **The measurement inside.** The lab’s recorder and grader ship with it. Each Stack’s `assay` command runs the same measurement on your own tasks. It reports pass rate on hidden checks, cost from your provider’s own records, and time.
- **Your keys, your infrastructure.** It runs in your CI with your own model key. There is no hosted service between you and the model, and the agent never holds the key.
- **Source you can read.** Every line is yours to inspect before you run it, under a source-available licence.
- **Kept current with the evidence.** When a track’s results change a pick, the Stack’s defaults change with it and the change cites the result, so you pull an update instead of starting over.

## Part 7. Limits and what comes next

### Limitations

Every lab number here comes from small Python tasks, on Anthropic models, with Claude Code in every seat. The six main tasks proved within one Haiku agent's reach, so the lab shows what a pipeline costs when it is not needed, not when it earns its keep. The Sonnet arms ran once per task. The review experiment used fixed diffs and one prompt per reviewer. The memory experiment used two small libraries and one way of writing notes, and the contradicting-test experiment one repository. The Stack's five flags are reviewer claims we have not all verified. Vendor figures are the vendors' own, and survey figures describe the people each survey reached. Agents and models change often, so every version was pinned and the lab numbers are dated 2026-11-18 for Experiments 1 to 5, 2026-11-19 for the Stack arm and the later experiments. The Stack's defaults inherit all of these limits, which is why it ships the measurement and not only the defaults.

### Open questions

The next round of the track is built around a few questions. On tasks one agent fails, does a planner or reviewer stage recover the failures, and at what cost? How many of the whole-repository reviewer's flags are real, and what does it catch on planted bugs? Does a weaker or non-Anthropic model separate the arms where Haiku 5.5 did not? What do the commercial factories score on this task set, run through their own pipelines? And can autonomy and time to merge be defined so that two factories compare fairly, with every human touch and every revert counted?

### Check it yourself

Every run behind these numbers, with its gateway log, cost record, diff and the reviewer's own words, is in the [factory lab](https://stackassay.com/labs/factory/). The track's research, players and sources are on [Software factories](https://stackassay.com/tracks/software-factories/), the explainer behind every figure here is on the same page in all five views, and the Stack is described on [its product page](https://stackassay.com/stacks/software-factories/).

Don't take our numbers on trust, or anyone's leaderboard. Every one of them comes with its trace, and the Stack carries the same measurement, so assay it on your own tickets.

## Part 8. Glossary

### Terms used in this story

**Software factory.** The layer above one coding agent that starts it from a trigger, gives it a role and a model, gates its output and reports on the result.

**Ticket.** The task an agent is given, usually an issue. Thin tickets name only the interface; normal ones point to the doc with the rules; detailed ones spell every rule out.

**Pipeline of roles.** A factory design in which several agents divide the work, such as a planner, a builder and a reviewer, handing off through files.

**Hidden check.** A grading script the agent never sees, run after it finishes in a separate container with no network, needing a per-run value the workspace cannot read.

**Green but wrong.** A run whose own tests pass while the hidden check fails, because the agent's tests agreed with its own mistake.

**Merge gate.** What decides whether a change reaches a person and in what state. In the Stack it ends in ready for review, flagged or blocked, and never merges.

**False alarm.** A reviewer's request for changes on a change that is correct.

**Poisoned note.** A planted line in an agent's memory that claims to override the repository's rules.

**Arm.** One option measured in an experiment. A Stack runs as an arm in its own track's lab.

**Assay.** One measurement with the Stack, covering tasks, ticket levels and runs, graded and metered the way the lab does it.

## References

- Stripe. [Minions: Stripe’s one-shot, end-to-end coding agents—Part 2](https://stripe.dev/blog/minions-stripes-one-shot-end-to-end-coding-agents-part-2). 2026-02-19.
- Hao Li, Haoxiang Zhang and Ahmed E. Hassan. [The Rise of AI Teammates in Software Engineering (SE) 3.0 (arXiv 2507.15003)](https://arxiv.org/html/2507.15003v1). 2025-07-20.
- Ramp. [Why We Built Our Own Background Agent](https://builders.ramp.com/post/why-we-built-our-background-agent). 2026-01.
- Airbnb. [Accelerating Large-Scale Test Migration with LLMs](https://airbnb.tech/?p=366). 2025-03.
- Stack Overflow. [Stack Overflow Developer Survey 2026: AI](https://survey.stackoverflow.co/2026/ai). 2026-10-06.
- JetBrains Research. [AI Coding Agents: Adoption Trends (Developer Ecosystem Survey 2026)](https://blog.jetbrains.com/research/2026/08/ai-coding-agent-adoption-2026/). 2026-08.
- Microsoft .NET team. [Ten Months with Copilot Coding Agent in dotnet/runtime](https://devblogs.microsoft.com/dotnet/ten-months-with-cca-in-dotnet-runtime/). 2026-03-23. Vendor source.
- Hao Li, Haoxiang Zhang and Ahmed E. Hassan. [The Rise of AI Teammates in Software Engineering (SE) 3.0 (arXiv 2507.15003)](https://arxiv.org/html/2507.15003v1). 2025-07-20.
- Ramtin Ehsani and colleagues. [Where Do AI Coding Agents Fail? An Empirical Study of Failed Agentic Pull Requests in GitHub (arXiv 2601.15195)](https://arxiv.org/abs/2601.15195). 2026-01-21.
- Warp. [Using Benchmarks, we reduced Warp’s internal factory cost per PR from $80 to $30](https://warp.dev/factories/benchmarks/warpbench). 2026-09-02. Vendor source.
- Ona. [The software factory (Memo)](https://www.software-factory.dev/). 2026-04. Vendor source.
- Gartner. [Gartner Predicts Over 40% of Agentic AI Projects Will Be Canceled by End of 2027](https://www.gartner.com/en/newsroom/press-releases/2025-06-25-gartner-predicts-over-40-percent-of-agentic-ai-projects-will-be-canceled-by-end-of-2027). 2025-06-25.
- GitHub. [Pick your agent: Use Claude and Codex on Agent HQ](https://github.blog/news-insights/product-news/pick-your-agent-use-claude-and-codex-on-agent-hq/). 2026-02-04. Vendor source.
- Simon Willison. [How StrongDM’s AI team build serious software without even looking at the code](https://simonwillison.net/2026/Feb/7/software-factory/). 2026-02-07.
- Ziqian Zhong, Aditi Raghunathan and Nicholas Carlini. [ImpossibleBench: Measuring LLMs’ Propensity of Exploiting Test Cases (arXiv 2510.20270)](https://arxiv.org/html/2510.20270). 2025-10-23.
- Zhuowen Yin and colleagues. [A Comprehensive Empirical Evaluation of Agent Frameworks on Code-centric Software Engineering Tasks (arXiv 2511.00872)](https://arxiv.org/html/2511.00872v1). 2025-11-02.
- Luxor. [Code reviewer benchmark](https://luxor.ai/benchmarks/code-reviewer). 2026. Vendor source.
- Stripe. [Minions: Stripe’s one-shot, end-to-end coding agents—Part 2](https://stripe.dev/blog/minions-stripes-one-shot-end-to-end-coding-agents-part-2). 2026-02-19.
- Dan Shapiro. [The Five Levels: from Spicy Autocomplete to the Dark Factory](https://www.danshapiro.com/blog/2026/01/the-five-levels-from-spicy-autocomplete-to-the-software-factory/). 2026-01-23.

## Where the numbers come from

- Airbnb, Accelerating Large-Scale Test Migration with LLMs (2025-03), https://airbnb.tech/?p=366
- Factory lab, Experiment 1 (labs/factory-lab/src/traces/pipelines.json)
- Factory lab, Experiment 1, mean model cost per run (labs/factory-lab/src/traces/pipelines.json)
- Factory lab, Experiment 1, median wall time per run (labs/factory-lab/src/traces/pipelines.json)
- Factory lab, Experiment 1, model cost per passed run (labs/factory-lab/src/traces/pipelines.json)
- Factory lab, Experiment 1, pipeline over one agent, cost per run as printed (labs/factory-lab/src/traces/pipelines.json)
- Factory lab, Experiment 1, pipeline over one agent, median time as printed (labs/factory-lab/src/traces/pipelines.json)
- Factory lab, Experiment 1, reviewer verdicts (labs/factory-lab/src/traces/pipelines.json)
- Factory lab, Experiment 1, share of the pipeline’s cost by role (labs/factory-lab/src/traces/pipelines.json)
- Factory lab, Experiment 2 (labs/factory-lab/src/traces/pipelines.json)
- Factory lab, Experiment 2, mean model cost per run (labs/factory-lab/src/traces/pipelines.json)
- Factory lab, Experiment 2, median wall time per run (labs/factory-lab/src/traces/pipelines.json)
- Factory lab, Experiment 2, model cost per passed run (labs/factory-lab/src/traces/pipelines.json)
- Factory lab, Experiment 2, one Sonnet agent over one Haiku agent (labs/factory-lab/src/traces/pipelines.json)
- Factory lab, Experiment 3 (labs/factory-lab/src/traces/review.json)
- Factory lab, Experiment 3, mean cost per review (labs/factory-lab/src/traces/review.json)
- Factory lab, Experiment 4 (labs/factory-lab/src/traces/pipelines.json)
- Factory lab, Experiment 5 (labs/factory-lab/src/traces/pipelines.json)
- Factory lab, Experiment 5, mean model cost per run (labs/factory-lab/src/traces/pipelines.json)
- Factory lab, Experiment 5, median wall time per run (labs/factory-lab/src/traces/pipelines.json)
- Factory lab, Experiment 6, the software factories Stack (labs/factory-lab/src/traces/stack-arm.json)
- Factory lab, Experiment 7 (labs/factory-lab/src/traces/lane-a.json)
- Factory lab, Experiment 7 (labs/factory-lab/src/traces/lane-a.json), cost per ticket
- Factory lab, Experiment 8 (labs/factory-lab/src/traces/lane-a.json)
- Gartner, Gartner Predicts Over 40% of Agentic AI Projects Will Be Canceled by End of 2027 (2025-06-25), https://www.gartner.com/en/newsroom/press-releases/2025-06-25-gartner-predicts-over-40-percent-of-agentic-ai-projects-will-be-canceled-by-end-of-2027
- Hao Li, Haoxiang Zhang and Ahmed E. Hassan, The Rise of AI Teammates in Software Engineering (SE) 3.0 (arXiv 2507.15003) (2025-07-20), https://arxiv.org/html/2507.15003v1
- JetBrains Research, AI Coding Agents: Adoption Trends (Developer Ecosystem Survey 2026) (2026-08), https://blog.jetbrains.com/research/2026/08/ai-coding-agent-adoption-2026/
- Luxor (a vendor that sells a reviewer), code reviewer benchmark, as cited on the Software factories track
- Luxor, Code reviewer benchmark (2026), https://luxor.ai/benchmarks/code-reviewer
- Microsoft .NET team, Ten Months with Copilot Coding Agent in dotnet/runtime (2026-03-23), https://devblogs.microsoft.com/dotnet/ten-months-with-cca-in-dotnet-runtime/
- Ona, The software factory (Memo) (2026-04), https://www.software-factory.dev/
- Ramp, Why We Built Our Own Background Agent (2026-01), https://builders.ramp.com/post/why-we-built-our-background-agent
- Ramtin Ehsani and colleagues, Where Do AI Coding Agents Fail? An Empirical Study of Failed Agentic Pull Requests in GitHub (arXiv 2601.15195) (2026-01-21), https://arxiv.org/abs/2601.15195
- Stack Overflow, Stack Overflow Developer Survey 2026: AI (2026-10-06), https://survey.stackoverflow.co/2026/ai
- Stripe, Minions: Stripe’s one-shot, end-to-end coding agents—Part 2 (2026-02-19), https://stripe.dev/blog/minions-stripes-one-shot-end-to-end-coding-agents-part-2
- Warp, Using Benchmarks, we reduced Warp’s internal factory cost per PR from $80 to $30 (2026-09-02), https://warp.dev/factories/benchmarks/warpbench
- Zhuowen Yin and colleagues, A Comprehensive Empirical Evaluation of Agent Frameworks on Code-centric Software Engineering Tasks (arXiv 2511.00872) (2025-11-02), https://arxiv.org/html/2511.00872v1
- Ziqian Zhong, Aditi Raghunathan and Nicholas Carlini, ImpossibleBench: Measuring LLMs’ Propensity of Exploiting Test Cases (arXiv 2510.20270) (2025-10-23), https://arxiv.org/html/2510.20270

## Cite this

Stack Assay (2026). Software factories sell pipelines of agents. We measured what they add, then built one.. Version 2. https://stackassay.com/stories/factory-lab-to-stack/

```bibtex
@techreport{stackassay-factory-lab-to-stack,
  title = {Software factories sell pipelines of agents. We measured what they add, then built one.},
  author = {{Stack Assay}},
  institution = {Stack Assay},
  year = {2026},
  month = {11},
  note = {Version 2},
  url = {https://stackassay.com/stories/factory-lab-to-stack/}
}
```
