(How we work)All articles
The software factory behind Redline 2
An orchestrator to rule them all, except the human.
Redline, and what comes next
Redline is our space shooter about riding reactor heat. Firing heats the reactor, and heat makes the guns stronger. At 100% you have one second to release a nova that clears the screen, or the reactor melts down. Every ship, enemy and sound is drawn and synthesised in code. There are no art or sound files in it at all.
Redline 2 keeps that core and builds a story campaign around it. The headline is four ships that each kill in their own way: guns, a swipe that cuts, a line you loop around enemies, and orbiting cells. They were the first thing we built, on purpose, because they were the riskiest idea. The first version was tested on the phone and rejected the same day: the new ships all fired the same guns, and the game felt like Redline 1. The second version passed.
The story went the same way. The first version had portraits and dialogue boxes, and after playing it we were neither excited nor curious. So it was replaced by The Last Convoy, told like a game intro movie, with a camera and a narrator instead of talking heads. Nine hundred and twelve ships flee a dying star. Something follows them out of the dark and takes ships. It follows heat, so forty-one volunteers fly with no governor on their reactors, hot enough to be followed instead. The movie is built in 3D from code, like everything else in the game.
That leaves most of the game: six acts with new hazards, enemies, bosses, rescue missions and a lot of narration. That is a lot of work for a small studio, so we built a software factory for it.
Why a game needs a different factory
Our first software factory adds features to a bookkeeping app. There, four agents review every change, and a person steps in for anything that touches the data. A game breaks that model in one place. Code can be reviewed, but whether a boss is fun or a wave is too hard can only be found out by playing it. The only real test is a person with the phone.
So everything in this factory is built around that one human step. It has to be rare, batched and well prepared. Here is what the game itself told us:
- One phone, one install. A new test build replaces the last one, so we test a batch of changes at a time, not one change per build.
- A few big files. Almost every change touches the same handful of files. Agents are not the limit on how much runs in parallel. Files are.
- Feel is numbers. “Too hard” is usually a value in the game's config, which a tuning panel in the game can change, so it becomes a small tuning item, not a rewrite.
- Some checks cost money. The full mission check runs on a paid macOS runner. An agent never starts it, only we do.
The factory
An idea, or a phase of the build plan, becomes a short spec. Small specs go straight into the queue, and we read the bigger ones first. From the queue, up to three builders work at the same time, each in its own copy of the repo. Before an agent judges anything, scripts check that the change only touched the files the spec named, that the game data still decodes, that it builds, and that the mission check compiles. The gates are scripts, so running them costs no tokens.
An item that passed goes onto an integration branch at once, so the items after it are built on top of it. When an act's worth is there, the integrator makes one release candidate: one build to install, and a checklist made from the specs' device checks, in the order that is fastest to play. Next to each point are the numbers to turn in the tuning panel if it feels wrong.
Each item gets its own branch and its own folder. When a builder starts, the orchestrator runs one command, git worktree add -b factory/<id> .factory/wt/<id> next: a new branch made from the integration branch, checked out in a folder of its own under .factory/wt/. The builder works and commits only there, so three builders never step on each other, and each folder holds exactly what one item changed. Five of the folders from Act 3:
.factory/wt/F-021: flare fronts, a warning line and then a band of heat that sweeps down the screen..factory/wt/F-026: rescue pods that run out of warmth are really lost..factory/wt/F-027: enemy waves can be marked hard, and the easiest setting skips them..factory/wt/F-028: two rescue missions get a gunship and lancers on the harder settings..factory/wt/F-031: the boss's weak points stay open only a short while after each front.
When an item passes, its branch goes onto the integration branch, which has a folder of its own too, .factory/wt/next. The item folders stay until we delete them. An agent never does.
-
Stage: every stage
Agent:
No model Writes: the state in/factorythe orchestrator, a skillspecs/<id>.md, never code -
Stage: spec
Agent:
Model: opus Writes: the spec text: criteria, files, device checksspec-writer -
Stage: build
Agent:
Model: sonnet Writes: code in its own worktreebuilder -
Stage: gates
Agent:
Model: sonnet Writes:testergates.shand the checks -
Stage: verify
Agent:
Model: sonnet Writes: pass, or a numbered list of failuresverifierlow effort, fresh context -
Stage: release
Agent:
Model: sonnet Writes:integratorrc/RC-n.md, the test build
Keeping it cheap
The rules are simple. Scripts run before agents, and the verifier only starts on green. Each builder sees its spec and the files it lists, not the whole game, and every item starts in a fresh context with its state in files. Three builders at most, two retries, and then the item stops and turns red on the board instead of looping. A local board shows every item, which agent has it and how much it has used, so we can see what it costs and turn the limits up or down. The first two rounds, from the first spec to the merge, took nine agent runs and about 292,000 tokens. An act of seven missions, follow-ups included, takes 17 to 33 runs and between 0.49 and 1.15 million tokens, most of it in the builders.
| Day | Agent runs | Tool calls | Tokens | About |
|---|---|---|---|---|
| 2026-11-16 | 21 | 262 | 731k | $2.04 |
| 2026-11-17 | 31 | 543 | 969k | $2.12 |
| 2026-11-18 | 26 | 461 | 1,061k | $2.84 |
| 2026-11-19 | 78 | 1,120 | 2,613k | $6.71 |
| 2026-11-20 | 43 | 504 | 1,275k | $3.77 |
| Five days | 199 | 2,890 | 6,649k | $17.48 |
The phone is the gate
We install the release candidate, play the checklist and mark each item pass, fail or tune, with a note in our own words. Those words go unchanged into the follow-up spec, so the builder reads what we felt with the phone in our hands, not an agent's summary of it.
The very first item showed why. It was the intro movie's sound, and it passed every gate and the verifier. On the phone, the booms were sharper than in the prototype, where they had been “more damped and dark”, and now “a bit too high pitch”. The verdict was tune. The follow-up spec opened with those words, word for word, and nine minutes later there was a new build to install. That one passed.
Agents can read the code. Only a person can tell if it is fun.
If one item in a batch fails, nothing is pulled out. The note becomes a small follow-up item, built on top of the batch, and the next release candidate replaces the last one on the phone, with the checks we had not got to yet. And nothing reaches main until a person types /factory approve RC-n in the session. A hook enforces that, not an instruction to the agents: the hook writes a one-time token for exactly that commit, and the merge script refuses to run without it. A click on the board or an agent's report is information, never approval.
/factory rc hands the batch to the integrator for the next release candidate. Nothing has run on a phone yet; that comes next. Tap to see it full size.The agents do
- write the specs and the checklists
- build in parallel, one copy of the repo each
- check every diff against its spec
- cut the release candidate and the build
A person owns
- the medium and large specs
- playing the game, and the verdict
- the paid mission check
- the approval, and every push
The first rounds
The pilot was a single item, the intro movie's sound. It went from an idea to a build on the phone in under twenty minutes. With the tune round above, that made two release candidates. Then we typed the approval, and main moved forward. Every gate was green on the first try, and nothing was blocked.
The first real round was the story of Act 1. The spec-writer split it into eight items, each with the files it touches and the items it waits for. The two small ones, with no files in common, started at once, next to the tester fixing one of its own checks.
Both builders hit a red gate on their first try, and both fixed it on the retry. The campaign split, pure housekeeping so that later acts can be worked on side by side, was checked by a script: the campaign before and after was identical, all 25,906 bytes of it. The rest of the round follows its dependencies, one item after the other, because they share the story files.
Act 1 went to the phone in two release candidates, four items and then three. Every item passed on the first play, and both were merged within a day of being cut.
Six acts in five days
Act 2, Cold Water, is where the phone earned its place. It brings a new ship that tows survival pods out of comets, past a dashed home line at the bottom of the screen. Seven items got through the gates and the reviews. Then we played it. One mission was too hard even on the easiest setting, with “too many gunships and swarmers around the pods”. And the home line sat so low that dragging a pod across it pulled our thumb into the iPhone's home gesture, which shrank the game window. No script and no review would have found that one.
Both became tune verdicts and two small follow-up items: fewer enemies near the pods, and the line moved up, with the whole tow counted home once the ship crosses it. The spec offered a line at 22% of the screen. We chose 18% instead, and the spec was changed to say so. The next release candidate replaced the last one on the phone, all of Act 2 passed, and it was merged.
The phone also tested the factory. Verdicts saved on the board from the phone were filed under the wrong item, and a second save for the same item overwrote the first, so a note was lost and we typed it again. Now the board keeps one save per mission page and asks which item a verdict is for when a mission has several.
Act 3, Flare Run, went through the line in one evening: seven items and one failed review, over a missing backslash in an error message, fixed on the first retry. The next day we played it. Four items passed, but the new rescue missions and the boss were too easy on the harder settings, where a skilled player would “just ace the level in seconds”. And one rule never fired: a pod could never be lost, because the code that should lose it only looked at pods that were still warm. Six follow-up items went into the next release candidate the same day, with more enemies on the harder settings only and a shorter window to hit the boss. All 22 checks passed, and Act 3 was merged.
Act 4, The Graveyard, was specced and built the same evening Act 3 was merged: eight items, with darkness, drifting wrecks and a new kind of rescue. This time the spec-writer was told what the phone had taught us. The harder settings got an early threat, so no mission can be won before it arrives, and every new way to lose something got a device check that makes it happen. One item failed review once and was fixed on the first retry. On the phone all 36 checks passed on the first play, and Act 4 was merged.
Act 5, The Cradle, followed the same evening: seven items, protected decks you must not set off a nova next to, and a choice of ship on some missions. Every item passed its gates and its review on the first try, and on the phone all 32 checks passed. At about half a million tokens it was the cheapest act so far, with the earlier acts' lessons written into its spec.
Act 6, The Gate, ends the story. It was specced the same evening: six items, a heat floor that keeps the reactor warm, a last mission held in the redline inside the glowing heart of a gate, and an ending we first planned as a dialogue scene and then turned into a short movie with the dialogue running in it. On the phone four items passed and two were tune. The choice of ship only showed when a mission was opened from the campaign menu, and “the user needs to know that a level could be played with a different ship”. And the end movie was skipped when replayed scenes were turned off. Two follow-ups fixed that, and the next release candidate found one more gap: after losing a mission and touching to retry, the choice of ship never showed, because the retry started the run in the same touch. One more follow-up, three release candidates in all, and the last act was merged.
In five days the factory ran 199 agent runs on about 6.6 million tokens, and the game is complete. Not one item was blocked.
What only the phone saw
We build on a Windows PC. There is no iPhone on the line and no simulator to script, so device testing cannot be automated: the gates can compile the game, read its campaign files and fly its missions with a bot, but none of them ever looks at the screen. Some things that went wrong were therefore green all the way to the phone.
- A row of buttons wider than the screen. After three failed attempts a mission offers one try a level easier. That adds a third button to the bottom row, and on the phone the row reaches both edges of the screen.
- A level too hard to win. The same screen is the end of another lost attempt at Act 2, mission 5: six pods in the fog, four of them to tow home, with gunships firing in. The build was green, but on the phone the mission was too hard to win even on Story, the easiest level.
- A title that does not fit. The mission is called Close Enough to Touch. On the briefing screen it is not close enough: the first and last letters fall off the edges.
- Two numbers for the same thing. The scene that ends Act 5 says 24,630 were brought home. The counter in the corner of the same screen says 20 264. The line is written for a perfect campaign, and the counter shows what we had really brought home.
None of these is a crash, and the code behind each one does what its spec says. They are only wrong when you look at them, and looking is the one job on the line that is still ours.
The short version
- Play is the test. The factory is built around smooth testing on the phone with checklists.
- Batches, not builds. One release candidate, one install, one checklist.
- Files set the pace. Two items run together only if they touch different files.
- Three at a time. Up to three items build in parallel, each on its own branch in its own folder. So far two have run side by side at most.
- Our words, verbatim. A failed test becomes the next spec as written.
- A typed yes. Only a person approves a merge, and a hook makes sure of it.
(Your turn)Curious how this could work for your product?
Tell us what you want to build.
hello@digitalavenue.seA few lines is plenty. We will ask the rest.