← Back

Process deep dive · November 2026

The Factory

Instead of pairing with one AI assistant and relaying every message myself, I give one agent an outcome and let a small team of agents build it, review it, test it and deploy it to dev. This is how it's set up, what it did on its first real task, and what I learned.

SoloClaude CodeCodex CLIOpenCodePythonPostgreSQLFly.io

Overview

I run a small-business CRM, PathSix CRM, and I'm building an offline-capable iPhone app for it. That means a lot of careful backend groundwork: migrations, row-level security, sync plumbing. It's exactly the kind of work where a single AI assistant marking its own homework is a risk.

So I split the job. One agent is the lead. I give it a goal, such as “add stable identifiers to the six syncable tables”, and it owns the task until it's finished. It hands the work to a reviewer and a tester, reads their reports, fixes what they find, asks for a recheck, then merges, deploys to a development environment and checks the result.

I step in to kick things off, to make the decisions that belong to me, and to approve anything that touches production. On the first real task, that came to one “go” and one agent restart. I relayed no messages.

The Cast

Who does what

Lead

Claude Code · Claude Opus

Owns the task from start to finish: plans, writes code, hands off work, reads the reports, fixes, merges and deploys to dev.

Runs no tests and never waits on them.

Reviewer

OpenAI Codex

Reviews every change against the acceptance criteria. Writes code when the lead assigns it.

Can’t push, merge, deploy or run tests.

Tester

OpenCode · free open-weight model

Writes tests, and is the only agent that runs anything: test suites, linters, builds, migration rehearsals.

Can’t push, merge or deploy.

Owner

Me

Sets the scope, makes product and risk decisions, and approves anything that touches production.

All three agents run side by side as terminal processes inside Solo, a workspace app that lets agents message each other, share task lists and scratchpads, and set timers that fire when another agent goes idle. Solo is the factory floor.

Why split it this way

Three reasons

Independence

The agent that wrote the code is the worst one to judge it. A separate reviewer and a separate tester catch what the author misses, and on the first run they did.

Cost

Running tests is slow and uses a lot of tokens, but it doesn’t need a frontier model. Giving all test execution to a free model keeps the expensive models on the thinking work.

Throughput

While the tester spends fifteen minutes on a full run, the reviewer reads the diff and the lead moves on. Nobody sits waiting.

The rule I care about most: the reviewer isn't the boss

The reviewer's job is to find problems, not give orders. The lead may disagree with a finding and not implement it, but it has to tell me every time, and why. That keeps the reviewer honest and the lead accountable, and the disagreements are the part I read most closely.

The Workflow

How a task moves

Every task is one shared record with a fixed header. Every report is a comment on that record and names the commit it covers. “Tests pass” means nothing unless you know which code they passed against.

Task:       F-1 Stable UUID identifiers
Owner:      Claude (lead)
Scope:      plan section, and what is explicitly out of scope
Repo:       backend   Branch: f1-stable-uuids   Worktree: <path>
Revision:   <exact commit under review or test>
Acceptance: numbered criteria, each written as a test
Status:     planned | implementing | in review | in test
            | fixing | done | escalated
  1. 1.The lead updates the task record and sends a short instruction straight into the other agent’s terminal.
  2. 2.It checks that agent’s output to confirm the work actually started.
  3. 3.It sets a Solo timer that wakes it when that agent goes idle. Idle means “go check for a report”, not “done”.
  4. 4.It reads the report, records it on the task, fixes confirmed issues and asks for a recheck against the new commit.
  5. 5.If something hasn’t settled after two review rounds, or the decision belongs to me, it escalates.

Guardrails

What keeps it safe

Production is off-limits

Nothing touches production unless I say so, every time. Deploys go to a dedicated dev environment that runs the same row-level security as production.

Synthetic data only

Tests and the dev environment never see real customer data.

No secrets in prompts

The admin database credential is encrypted on my machine and only ever piped into commands, never printed.

Scope lock

The approved plan is the authorized work. Agents may fix bugs they find; anything new is written down as a future consideration and brought to me.

Isolated branches

Each coding task gets its own git worktree and branch, so two agents can write code at once. Work merges to an integration branch, and CI runs the full suite on every push.

Honest reporting

Every report lists what was not verified as plainly as what was.

The First Real Run

Stable IDs for offline sync

To prove the setup, I picked one bounded backlog item: give six tables (clients, leads, projects, contacts, interactions, accounts) a stable UUID that a phone can generate offline, without disturbing the integer IDs the web app relies on. Small, but it touches a migration, row-level security, two test databases (SQLite and PostgreSQL) and a live deployment, so there was plenty of room to get it wrong.

01

Implementation

The lead built the change, and while reading the surrounding code it found a latent bug: an archive feature serialized every column to JSON, and a UUID value would have crashed it. Fixed before anything shipped.

02

Review and test in parallel

The reviewer came back with two medium findings and one low. Meanwhile the tester wrote six acceptance tests and ran them alongside about 700 existing ones.

03

A real regression, caught

One existing security test failed. The tester ran it against the previous commit, showed it passed there, proved the new code caused the failure, diagnosed why, and reported it without touching the code.

04

Fixes and one disagreement

The lead fixed the regression and accepted the review findings, except one it accepted only in part. It told me which, and why.

05

Stronger tests

The reviewer pushed for tighter tests, and the lead wrote two more.

06

A bug in the test itself

In round three, two agents independently found the same bug in the lead’s new test (a database savepoint released after PostgreSQL had already aborted it) and proposed the same fix. My rule is to escalate after two rounds; the lead went ahead because the fix was mechanical and agreed on, and told me it had. I was fine with that.

07

Green

All 8 new tests passed, along with every relevant test tier and the full CI run.

08

Deployed and verified

The lead merged, deployed and migrated the dev environment, then connected as the app’s restricted database user and confirmed that all 129 existing records had a unique UUID and that tenant isolation still held.

By the Numbers

One task, end to end

8

review findings

7 accepted, 1 in part with reasoning

1

regression caught

by the tester, before it shipped

1

latent crash fixed

found by the lead along the way

~700

existing tests rerun

plus the full suite in CI

3

review rounds

one past the escalation rule, flagged

0

production systems touched

Rough Edges

What didn't go smoothly

It works, but it isn't magic yet.

01

Sandboxes

Each agent starts scoped to one folder. The reviewer couldn’t write to the backend repo until I restarted it with extra folders allowed. We checked access with a throwaway file before starting real work, which was the right call.

02

Message delivery

Messages sent to the reviewer often land in its input box without being submitted, so the lead learned to check and press Enter.

03

Reporting

The helper agents can’t comment on the shared task yet, so the lead copies their reports from the terminal into the record. It works, but it’s manual.

04

Windows

The first migration attempt failed harmlessly because PowerShell appended a carriage return to a piped connection string. It was caught before anything changed, fixed, and added to the runbook.

05

Speed

The free model is thorough but slow, around fifteen minutes per full set of test tiers. Running review in parallel hides most of that.

Lessons

What I've learned so far

01

Define “done” as tests, up front

Every acceptance criterion is written as a test before work starts. That ends arguments about whether something works.

02

Separate writing from verifying

The regression and the bug in the test were both caught by an agent that didn’t write the code.

03

Pin every claim to a commit

Reviews and test runs name the exact revision they covered, so nothing gets credit for code it never saw.

04

Let the lead disagree, but make it say so

Reviews get better when they’re treated as input rather than orders, and the reasoning is written down.

05

Write the boundaries down

Who can commit, push, merge and deploy, and where, lives in one short file every agent reads.

06

Prove it on one real task first

I didn’t hand the factory a backlog until it had finished one task end to end and I’d read the whole report.

What's Next

The factory has finished one task and earned a little more autonomy. Next it works through the rest of the backend groundwork for the mobile app: change tracking, soft-delete tombstones, a sync change feed, idempotent writes and device authentication.

I keep the decisions that matter (the sync engine, the conflict policy, how long a phone may work offline) and I approve anything that goes near production.

Project: Python (Quart + SQLAlchemy) on PostgreSQL with row-level tenant security, hosted on Fly.io · React web frontend · React Native + Expo iPhone app in progress. Process docs: AGENTS.md (project rules), FACTORY.md (roles, handoffs, permissions) and the project plan, the single source of truth for scope and progress.

← Back to portfolioPathSix CRM case study →