Skip to content

What a software factory borrows from a real factory

A software factory, or AI factory, is more than a row of agents. The parts worth copying from real plants are standard work, inspection, and stopping the line.

5 min read

Two things called an “AI factory”#

The phrase names two different things, and it helps to separate them first.

PhraseWhat goes inWhat comes out
AI factory, infrastructure sensePower, GPUs, dataModel output. Nvidia popularized this use for data centers built to produce tokens
Software factory, or AI software factoryTickets, alerts, requestsReviewed changes to software, with agents doing most of the work at each stage

This post is about the second one. Nested does not produce tokens. Its agents call the model provider you chose.

The second idea is also older than it looks. Robert Bemer proposed a “software factory” in 1968, and Hitachi opened a facility it called the Software Works in 1969. Those efforts kept meeting the same objection: software is design work, every unit is different, and you cannot standardize design the way you standardize a weld.

What changed is the worker. A coding agent follows written instructions about as reliably as you check that it did. So the useful question is no longer whether software can be a factory. It is which factory ideas are worth copying, and which are only a picture of a conveyor belt.

Standard work becomes a pack#

In a plant, standard work is the written, current best way to do one job at one station. When someone finds a better way, the document changes, and every shift gets the improvement.

In Nested, the document is a skill: a SKILL.md file that teaches an agent one kind of job. Skills ship inside a pack, a versioned archive that also carries subagents, formulas, and MCP servers. Improving the way your team reviews a migration means publishing a new pack version, not hoping every prompt repeats the advice. See Packs.

Stations become steps#

A formula is a graph of steps. Each step is an ordinary agent task with its own prompt and, if you declare one, its own output schema. Nothing about a step is special to the agent. It is the same kind of work it does from chat, in a fixed place in a sequence.

Inspection happens at the station#

Toyota’s word for this is jidoka: when a defect appears, stop at the station that made it, instead of finding it at the end of the line. End-of-line inspection finds the defect after everything downstream has been built on top of it. For an agent, “everything downstream” is three more steps of confident work on a wrong diagnosis.

A formula gate is the inspection. Here is the one after the triage step of our bug-fix formula. A resolver must answer one yes-or-no statement about the evidence:

yaml
questions:
  - id: pass
    type: bool
    prompt: Symptom is restated as one testable statement. No fix was applied yet.

If the answer is no, triage runs once more. If it is still no, the run fails with the reason “triage did not pass its check”. The statement targets a defect agents really produce: fixing before understanding.

Two kinds of check can also attach to a step. A human check offers approve, revise, or reject, with at most three revisions. A command check runs a fixed command in the agent’s sandbox and passes on exit code 0. Command checks are off until an operator enables them for the install.

Anyone can stop the line, except the agent#

A plant gives every worker a cord that stops the line. The formula version is a human gate or a human check: the run parks, and the decision appears under Needs you in the app. A wait has no timeout of its own unless the formula sets one. Only the run’s 7-day limit ends it.

One rule matters more than the rest. Agents cannot approve themselves. A step’s task cannot answer its own run’s input request, and agents have no tool at all for gate decisions or human checks. Those belong to a person with manage access on the agent.

Intake is an automation#

A factory does not start when somebody walks up to a machine. Work arrives. In Nested an automation starts a formula on a schedule, or from a webhook, GitHub, GitLab, Gitea, Slack, or Sentry, and maps the event’s payload onto the formula’s inputs. The details are in Automations: how a GitHub event becomes an agent task.

Limits on work in progress#

Lean plants cap work in progress because unlimited inventory hides problems. An agent loop without a cap hides problems too, and it sends a bill while it does.

LimitDefault
Visits per step10
Executions per run200 (hard cap 1,000)
Fan-out items32
Sub-formula depth4
Run duration7 days

A run that reaches a loop limit ends, and it cannot be restarted, because the same run would only reach the same limit.

The production report is not written by the product#

Every run keeps an ordered event log, and the app can replay it. Every closed day, Nested writes a report per agent and per account: outcomes by kind, successes and failures per formula and automation, and latency at p50 and p95.

Those reports contain no model-written summaries, on purpose. A factory’s scrap rate should not be narrated by the machine being measured.

Where the metaphor breaks#

  • Every unit is different. A formula standardizes the order of proof, such as reproduce, then fix, then verify. It does not standardize the fix. The 1968 objection still holds for the product; it no longer holds for the process.
  • There is no conveyor. Formulas run agent tasks and other formulas, and nothing else. There are no HTTP steps and no “wait until” steps. If a step must call a system, the agent calls it with your connectors.
  • More stations is not more output. A plant optimizes throughput. A software team is limited by how much change people can review. Ten more agents in front of one reviewer makes a longer queue, as we argue in Agentic development is a queueing problem.
  • The defects are plausible. A bad weld looks bad. An agent’s wrong answer reads well. That is why a gate question must be a specific statement that the evidence makes true or false. “Is the code good?” inspects nothing.

The smallest factory that works#

You do not need a fleet. One line is enough to find out whether the idea suits your team:

  1. One agent, with a pack that contains a bug-fix formula.
  2. One automation that starts the formula from your tracker or forge and fills its inputs, in our case ticket and slug.
  3. Gates after the stages where your agents skip ahead. Start with triage.
  4. One human check before the change leaves the agent’s branch.
  5. A weekly look at the report: which gate fails most? That gate is telling you which standard work to rewrite.

Step 5 is the part people leave out, and it is the part that makes it a factory instead of a script. To build the line, read Formula runs in chat and the Formula reference.

Questions

What is a software factory?
A process where requests come in and reviewed software changes come out, with coding agents doing most of the work at each stage. What makes it a factory is written standard work, inspection between stages, limits on work in progress, and a way for a person to stop the line.
What is the difference between an AI factory and a software factory?
“AI factory” usually means infrastructure: a data center built to produce model output. A software factory, or AI software factory, is a development process that uses agents to turn tickets into reviewed changes. Nested is the second kind.
How does Nested stop an agent from skipping a step?
With formulas. A gate after a step asks a typed question about the evidence, and the run only moves on when the answer allows it. Steps can also carry a human check, or a command check that must exit with code 0.
Can an agent approve its own work in a Nested formula?
No. Human gates and human checks need a person with manage access on the agent. Agents have no tool for those decisions, and a step cannot answer its own run’s input request.

5 min read

Agentic development is a queueing problem

Agentic development means handing whole tasks to coding agents. Once they work unattended, the hard parts are queues, review, and recovery, not prompts.