← All projects

Project essay

The software factory: agents build it, people decide what ships

How a small engineering team at Snap eHealth keeps five applications moving with Claude agents working overnight, and why every change still has to earn its way to production.

Thomas Howard · 8 min read

My role
Designed it and run it at Snap eHealth
Focus
Claude agents · Linear · CI/CD · Release safety
Project stage
In daily use · Five applications

Why I built it

Snap eHealth has five applications, all at different stages. Some are live with clinics, some are being built, and one is waiting on data that arrives in January. The engineering team is small, and the list of things to build is not.

I’ve written all of my code through AI for years, so the question was never whether agents could write code. They can. The question was whether we could trust what they wrote at volume, in healthcare, without reading every line ourselves. Our senior engineer’s answer at the start was no. He expected slop, and he wasn’t wrong to. Unchecked agent output is mostly slop.

What changed his mind wasn’t a better model. It was linters, code checks and CI standing between the agent and the main branch. The software factory is that idea taken all the way from the first line of a spec to the last hour of a release.

What a night looks like

Work starts as a Linear ticket. When someone labels it, a chain of Claude agents picks it up and drafts the spec, the design note and the task contract. A Linear webhook triggers an AWS Lambda, so they start within seconds; an hourly sweep catches anything the webhook misses. A person approves the design before any code gets written.

Overnight, 50 to 100 coding agents take approved tickets and work them through the build steps. By morning there are pull requests waiting. Each one bundles up to 8 to 10 related tickets and stays under 400 changed lines, so a person can actually review it.

How a ticket becomes a release
Software factory flow A Linear ticket is picked up by planning agents that draft a spec, design and task contract. A person approves the design. Overnight coding agents build the change, which goes into a pull request of up to 400 lines, then CI, then review sized to the risk, then merge, deploy and a feature-flag rollout with a 24-hour watch. PLAN · DAYTIME BUILD AND SHIP · OVERNIGHT, THEN MORNING Linear ticket labeled for agents Planning agents spec · design · contract Claude, chained by label PERSON Approves design before any code Coding agents 50–100 a night 75+ tickets webhook → Lambda, seconds Pull request 8–10 tickets ≤ 400 lines CI tests · types lint · scans · evals PERSON, BY RISK Review AI, then engineer, then product demo Merge + deploy tagged by commit smoke tests Flag release 5 → 50 → 100% 24-hour watch a failure goes back with evidence, not a retry
  • Agent work
  • Automated check or release
  • A person decides

The 14 steps

Every change has a place in the same 14-step process. Agents do most of the typing. People own the decisions that are expensive to get wrong: what we’re building, whether the design is sound, whether the change does what the ticket asked, and whether it stays on in production.

Spec to release in 14 steps

Plan

Decide what “done” means before anything gets built.

  1. Spec and task contractAcceptance criteria, plus the files in scope and the ones that are off-limits.agent drafts
  2. Design noteA short ADR that a second engineer reads and approves.person approves
  3. Tests firstAgent-drafted tests, plus evals for any AI behavior.agent drafts

Build

Agents write the code inside the lines the contract drew.

  1. Branch from mainFresh branch for every pull request.automated
  2. Agent writes the codeThe engineer steers through the contract and the review.agent + engineer
  3. Run it in DockerSame container shape it will ship in.automated
  4. Local checksTests, lint, format and type checks before anything leaves the box.automated

Check

Prove it works, then have people agree it’s right.

  1. Pull requestThe agent drafts it. The engineer owns it and can explain every line.agent + engineer
  2. CILint, types, tests, Docker build, dependency and secret scanning, evals.automated
  3. ReviewAI reviewer first, then an engineer, then a product demo against the acceptance criteria.people decide

Ship

Release slowly and keep a way back.

  1. Squash mergeOne clean commit per pull request.automated
  2. DeployTagged with the commit SHA. Migrations run, then smoke tests.automated
  3. Feature-flag release5%, then 50%, then 100%, with release notes.automated
  4. 24-hour watchError rate, latency and cost. Roll back by flag or to the last tag.person watches

Two steps carry more weight than the rest. Step 1 is where agents get their boundaries. The task contract lists the files they may touch and the ones they may not, so an agent that wanders gets caught by a check rather than by luck. Step 3 puts the tests in place before the code exists, which means the agent is working toward something a person already agreed is correct.

Risk decides how many steps run

Running all 14 steps on a typo would be silly, and people would start routing around the process. So every change falls into one of four risk tiers, and the tier decides the path. Four things never get skipped: a branch, a pull request, CI, and the checks that gate the merge.

Which steps run at each risk tier
Steps 1 to 14 by risk tier. A filled dot means the step runs; a half dot means a lighter version runs.
Tier1234567891011121314Also
1 · Trivialtypo, copy, config Merges on passing tests and AI review
2 · Small bug fixknown, contained One-line spec and a failing test that reproduces the bug
3 · New featurenew behavior A person approves the merge
4 · High riskpatient data, Sally, access Eval set with a pass bar, security check, feature flag, longer watch

runs    lighter version    skipped

Tier 4 exists because of Sally, our patient-facing voice agent. Anything that changes what she says, what data she can reach, or who can do what runs the whole process plus an eval set with a pass bar, a security check and a longer watch. It’s the kind of eval that once caught Sally hanging up before she finished saying goodbye in 40% of runs. A single test pass would have missed it.

Tiers 1 and 2 are where the time savings come from. Small fixes merge on passing tests and an AI review, without waiting for a person. People spend their review time on features and on anything that touches patients.

Keeping agent work readable

The biggest risk with agent-written code isn’t that it’s wrong. It’s that nobody understands it six months later. A few rules keep that from happening:

The fourth rule does the most work over time. Every review makes the next night’s agents a little better, and the rulebook grows from real mistakes rather than from guesses.

No staging, on purpose

We don’t have a staging environment, and with a team our size I’d rather not maintain one. Instead the checks it would have given us happen earlier and later. Migrations run against a production-shaped copy of the database filled with fake data. Tests and evals run in CI. Product signs off on a demo before the merge.

Release ramp and the way back
Feature-flag release ramp After deploy, a feature is turned on for 5 percent of users, then 50 percent, then 100 percent, watched for 24 hours on error rate, latency and cost. At any point it can be rolled back by turning off the flag or redeploying the last tag. 5% deploy, smoke tests 50% no regressions 100% release notes out 24-hour watch error rate latency cost roll back by flag or last tag

Production is where the remaining risk gets handled. Every deploy is tagged with its commit, every feature sits behind a flag, and the flag goes from 5% to 50% to 100% while someone watches error rate, latency and cost for a day. If something looks wrong, we turn the flag off or redeploy the last tag. Neither one needs a meeting.

What changed

75+Linear tickets completed a night by 50 to 100 Claude agents
~1 week → hoursTypical bug turnaround, before and after the factory
50–75Pull requests a week across five applications

The clearest example came the week of November 23. We hit a significant production bug. Using the factory’s bug-fix path (a one-line spec, a failing test that reproduced the bug, an agent fix, CI and review), it was diagnosed, fixed and released in about 37 minutes. A hotfix like that used to take three to four days.

That number comes from the process, not from anyone typing faster. The bug-fix path is short because it’s narrow: the failing test pins down the bug before anyone touches the code, so the fix has something concrete to pass.

Because the work runs overnight and all five applications sit in the same queue, we also work ahead. By the time a clinic asks for something on an app that’s still early, the groundwork is often already merged behind a flag.

The same pattern, at startup scale

Larger companies have built the same thing. Stripe’s Minions merge more than 1,300 pull requests a week with no human-written code. Spotify’s Honk is a background coding agent built on Claude’s Agent SDK. The shape is the same as the factory’s. Work comes in as tasks, agents run unattended in isolation, and deterministic checks plus human review decide what merges.

Ours runs at a fraction of their volume, but on the same parts. Growing it means adding agent workers and review capacity, not rebuilding it. Review is the part that limits you first. That’s why the risk tiers matter, and why the rulebook keeps turning repeated review comments into automated checks.

What I’d tell a founder

Don’t judge agents by how much code they write. Judge them by how much of their output you can merge without reading every line. Put the effort into the gates, not the prompts.

Let risk set the process. If a typo takes as long to ship as a new feature, people will start skipping steps, and they’ll pick the wrong ones to skip.

Turn every repeated review comment into a rule. That’s how the system gets better without anyone having to remember anything.