My Take on a Software Factory

My Take on a Software Factory

Published: December 1, 2026

How I get from a task to a reviewed pull request with coding agents, and how you can build your own factory.

How do you know a coding agent is actually done?

When I first started experimenting with passing real work to agents, writing the actual code stopped being the slow part. Instead, it would fly through the development and say that it was done and then I’d find missing tests, code formatted incorrectly, or new bugs that landed in the PR. So I’d write feedback, wait, check again, and maybe have to go through the process again.

I wanted three things: proof that a task was really done (tests, and screenshots of anything visible), more looping to fix problems without waiting on me, and a path that runs from a task all the way to a pull request. So I built my take on a software factory. It’s a skill for Claude Code, plus a few agents and scripts around it. I give it one task (a feature, a change or a bug) and it comes back with a reviewed branch that is ready to publish as a PR.

I still make the technical decisions: the stack, the architecture, the standards the code has to meet, and what gets merged. The factory does the building and the checking inside those decisions.

Since mid-October it has run 146 jobs across six repos: client work, my own apps, and this site.

Fixed rules, free approach

My first instinct was to script every step. That got messy pretty fast. Tasks are too different, so the skill became gigantic and the model seemed to actually be limited by attempting to follow a super strict script. This filled up the context and ended up with not-so-great results.

So instead, my factory fixes only a few things and leaves the rest open. What is fixed:

Inside those lines, the model works out how to carry out the job: which files to read, how to order the change, how to structure a test. The lines themselves are mine, and so are the technical choices. The instructions are more describing the end goal, rather than laying out every single step.

What “done” means

A job is done when all six of these hold, and the job’s record shows the evidence:

  1. Aligned. The record states the goal, the scope, what’s out of scope, and acceptance criteria that can be tested. Nothing in the diff is outside the scope.
  2. Built to my house rules. My coding standards load before the first line of code. Tests come first where the repo has a suite. A cleanup pass strips the usual generated-code clutter before review (why does Claude love to comment sooooo much?!).
  3. Proven. Every acceptance criterion maps to a test, a command or a recorded check that ran against the final commit. The project’s full check set runs the way CI runs it. Anything visible is looked at in a real browser at phone and desktop widths, in light and dark mode.
  4. Independently reviewed. At least one reviewer that never saw the build read the whole diff, and every serious finding was fixed or disproved with evidence.
  5. Mergeable. A script checks for a clean tree, no conflicts with the base branch, and nothing in the commits or branch name that shouldn’t be there.
  6. Reported. The job ends with a short report I can quickly review and move forward with in two minutes: what changed, how it was verified, where to look, and what was left.

“Proven” is the line that matters most to me. Requiring tests and screenshots of what changed shows me a task is actually done. It also means the agent catches issues and loops to fix them without needing my feedback on each round.

The life of a job

Here’s what happens between typing /factory and opening a pull request. Tried out a mermaid flowchart here, hope it’s not too clunky (especially on mobile with horizontal scrolling).

flowchart TD
    accTitle: The life of a factory job
    accDescr: A task goes through preflight and planning, with stops for my input when a product decision is open, or when the plan is large, differs from what I asked for, or touches auth, data or money. A builder writes the code, the checks and screenshots prove it, and independent reviewers read it. Serious findings are fixed and reviewed once more; if one survives, I choose to re-plan, fix it once more, or ship with it listed. A mergeable check and a report follow, and the pull request opens only on my go.
    A[Task or ticket] --> B[Preflight: job folder and branch]
    B --> C[Plan: goal, scope, criteria]
    C --> D{Needs me?}
    D -- product question --> E[Interview me]
    E --> C
    D -- big or sensitive --> F[My go on the plan]
    D -- no --> G
    F --> G[Builder: code and tests]
    G --> H[Prove it: checks, screenshots]
    H --> I[Review pass 1]
    I --> J{Serious finding?}
    J -- yes --> K[Fix, review pass 2]
    K --> L{Still serious?}
    L -- yes --> M{I decide}
    M -- re-plan --> C
    M -- fix once more --> K
    M -- ship, listed --> N
    J -- no --> N
    L -- no --> N[Mergeable check, report]
    N --> O{My go?}
    O -- change --> G
    O -- yes --> P[Open the pull request]
Fig. 1. A job loops on its own until review is clean, and stops for me only at the decisions that are mine.

A few details matter more than they look:

The builder never grades its own work

Two rooms divided by a solid wall. A workbench sits on one side, and a tray passes through a slot to four inspection desks on the other, one of them drawn in a different color.

Fig. 2. Builders and reviewers never share a conversation. The diff is the only thing that crosses the wall.

Every reviewer is a fresh agent with no build context. It gets the job folder, the base branch and a lens, and it reads the whole diff. It can’t edit the code: a hook lets it write only its own review file, and another hook takes a snapshot of the working tree and checks that the reviewer left it exactly as it found it.

Each reviewer looks through one lens, a single angle on the change. The lenses depend on the change. Every job gets a code review. Anything that touches auth, input, storage, money, permissions, user input, or outside services also gets a security review. Anything visible gets ui and ux reviews, and those reviewers get the screenshots.

Each review starts with a verdict, and findings are sorted into Critical, Warning and Suggestion. A Critical or Warning has to name the concrete input or sequence that fails. A doubt without a failing case is a Suggestion at most, which keeps reviews from filling up with maybes.

A second opinion from a different model

The code reviewer on my jobs isn’t Claude. It’s Gemini 4 Neon, Google’s model, which I reach through the Antigravity provider in T3 Code, the app I run my agent sessions in. A reviewer from the same model family as the builder tends to share its blind spots. A different model reads the same diff with different instincts.

Neon gets an adversarial brief: assume the change is wrong, and find the input, state, timing or sequence of calls that proves it. When Neon can’t be reached, Claude Opus steps in, and the record says which one reviewed each pass. Neon also writes the final report and the pull request description from the finished record, and then the planning session checks every claim in them against the diff.

Two passes, then a human

Review loops can run forever if you let them. A reviewer will always find one more thing, especially when told to be adversarial.

Reviewing my own past jobs showed where the value is. The first pass earns its keep: in 46 of the 85 jobs with review files in the current format, at least one first-pass reviewer asked for changes. Before I capped the loop, 34 jobs went to a third pass, and only 4 of those 45 third-pass reviews asked for anything more. Some of that is just a loop converging, which is the point. But a full review to confirm fixes that pass 2 had already checked was rarely worth its cost and just added edge case fixes that polluted the codebase.

So review now stops at two passes:

A fix that needs a third look usually means the approach is wrong, and more review won’t fix an approach.

A finding that is right can’t be argued away either. The builder can reject a finding only with evidence: a file:line or a test that shows the reviewer is wrong. Pass 2 then accepts the rejection or repeats the finding, and a repeated one comes to me.

Rules a hook enforces, not a prompt

A guarded conveyor belt. A striped barrier arm blocks a side chute that runs off a cliff edge, while parcels carry on along the main belt.

Fig. 3. The rules that must never break live in scripts that run before every command, not in the instructions.

A rule in a prompt is a strong suggestion. Over enough jobs, a model will eventually talk itself past one. So the hard rules are enforced by a script wired in as a Claude Code PreToolUse hook, which runs before every shell command the factory, its builders and its reviewers try to run. It blocks:

When the hook blocks something I actually want on a given job, I can let that one command through by hand. Everything else stays blocked.

Not every rule can be a hook, and that’s fine. “Never weaken a test to make it pass” lives in the instructions and in the review. But anything a script can check, a script checks.

What stays my call

The technical direction is set before a job starts, and I set it: the stack, the architecture, the patterns a change should follow, and the coding standards every builder loads. Inside that, the factory makes the small calls on its own, like naming, how to structure a test, or whether to apply a minor suggestion. Anything bigger comes back to me:

When it does ask, it asks once, with its recommendation first. At the end of a job I get a short summary with the screenshots, then one question: push the branch and open the pull request, or change something.

One record per job

Every job has one file, job.md, that follows it from plan to report: goal, scope, non-goals, acceptance criteria, dated decisions with who made them, build notes, a verification table that maps each criterion to its proof and commit, a summary of each review pass, and the final report. The reviews and screenshots sit next to it.

The record is written for a reader who wasn’t there. That might be me tomorrow, a fresh session picking the job up after a context reset, or the retro.

The factory improves itself

A loop where finished parcels pass a desk with an open notebook, and a rolled blueprint travels back along a curved track to a machine at the start of the line being adjusted with a wrench.

Fig. 4. Retros read finished jobs and suggest changes to the factory itself, not to the code.

After a job, I can run a retro on it. The retro reads the job record and the session transcript and looks for friction: where agents searched for a long time, retried, guessed, or needed me to step in. Then it suggests changes to the environment, most severe first: a missing check, a vague instruction, a reviewer that keeps raising findings that get rejected. It changes nothing until I pick which suggestions to apply.

flowchart TD
    accTitle: The retro loop
    accDescr: Jobs leave records and transcripts, a retro finds friction in them, I pick the fixes, and the skill, hooks and agents change before the next jobs run.
    A[Jobs run] --> B[Job records]
    B --> C[Retro finds friction]
    C --> D[I pick the fixes]
    D --> E[Rules change]
    E --> A
Fig. 5. A retro turns friction in one job into a rule for every job after it.

Bringing Neon in came out of a retro. I used to run a second Claude code reviewer next to the first, and the retros kept showing that it rarely raised anything the first one had missed. A reviewer from a different model family was the better use of that pass.

What it costs

None of this is free. A job takes longer from start to finish than asking one agent to make the change, because it plans, proves, reviews and sometimes loops. It also uses a lot more of my usage: a visible change can mean a builder plus four reviewers, and some jobs get a second pass on top.

For a one-line fix, that’s overkill. For work that ships to a client or to production, I’ll trade usage for the hour I’d otherwise spend checking the work myself, and for the bugs that check would have missed.

How you can build your own factory

You’re probably thinking: “Okay Ryan, let’s see the skill repo!”. Everyone seems to be making one these days. However, I really don’t suggest plugging in other people’s skills into your repo without reviewing them first. And half the time, the skills aren’t tailored enough to your actual needs.

You don’t need my files to do this. These are the ideas that made the biggest difference, roughly in the order I’d add them. Point a decent model at this post with reasoning turned up a bit, and have it adapt this to your current workflows:

  1. Write your definition of done first. Make every line checkable, and make the agent show evidence for each one. This alone changes how “done” feels.
  2. Keep one record per job. A plain markdown file with the plan, decisions and proof. It gives the agent somewhere to put its reasoning that isn’t your chat window, and it makes everything after this possible.
  3. Separate building from reviewing. Reviewers should start fresh, see only the diff and the record, and be unable to change the code. Use a different model for at least one of them if you can.
  4. Require a failing case for serious findings. Without it, reviewers flood you with maybes.
  5. Cap the review loop. Two passes, then a human decides.
  6. Move hard rules into hooks. Anything a script can check shouldn’t depend on the model remembering.
  7. Decide what’s yours to decide. Write down which decisions the agent must bring to you, and let it make the rest.
  8. Run retros and fix the environment. When something goes wrong, change the instructions, the checks or the tooling so it can’t happen the same way again.

Start with one skill file and the first two ideas. Add the rest as you hit the problems they solve.

Where this is going

The factory isn’t finished, and I don’t expect it to be. Every few days a retro turns up something worth changing. I have a dashboard set up alongside this that tracks cost per project (according to their complexity level) and tracks each change to make sure cost and effectiveness improve. Otherwise, I roll back and try something else.

It seems as the models get better, I’m able to cut more and more out of this skill. Will this still be how we’re working in 6 months? Not sure, but for now I’m getting some solid results out of my take on a software factory.