_Published: 2026-12-05_
**tl;dr: In about five months I went from a horrifying Telegram-to-Claude bridge held together with shell scripts, to running a small "dark software factory": agents that pick up tickets, write code, review each other, merge and deploy, while I mostly make decisions. This is new. Really new. And I think it changes what one person can build.**
As I sit at my laptop just... doing stuff. I wonder, why do I do stuff on a laptop? Why isn't some agent doing the stuff that I plan to do before I do it? Why am I not a [hyperoptimised engineer](https://www.youtube.com/watch?v=MhEL9cvLxQE)? More on this in future blog posts as I try to automate the hard stuff in business (basically everything except software engineering).
## What's a dark factory?
A "dark factory" (or lights-out factory) is a manufacturing plant that runs without people on the floor. No people, no need for lights. Robots build the thing; humans design the line and fix it when it breaks.
A **dark software factory** is the same idea for code. Tickets go in one end, merged and deployed changes come out the other. The agents write the code, review it, fix the review comments, merge it and ship it. The human sets the direction, makes the calls the agents can't, and works on the factory itself.
A year ago this was a fun thought experiment. In the last few months it's become something you can actually run, mostly because agentic coding tools got good enough to work for hours without someone holding their hand.
Here's my epic journey!
## Stage 1: The Frankenstein (early-2026)
It started with me wanting to talk to Claude from my phone.
So I built a Telegram bridge. A bot on one end, Claude Code sessions on the other, and a pile of shell scripts in between. It could:
- start a session and give it a task
- send me alerts and ask me to approve things
- relay messages between me and whatever was running
It was horrifying. Scripts calling scripts, state in random files under my home directory, a different relay for every little job. But it _worked_, and it meant I could approve a deploy from the supermarket.
The low point was 4 August, when an `rm -rf ~` wiped my home directory. Half the bridge lived only in `~/.claude/` and had never been committed. The relays, the Telegram sender, the crontab: gone. I spent the day rebuilding them, this time _into the repo_.
Lesson one: if your factory lives in your home directory, you don't have a factory.
![[nxr-0b-original-react-expeditions.jpg]]
*What shipping fast with no factory looks like: Nexus Rift's old Expeditions page.*
## Stage 2: First Mate (September–October)
Next I moved to [Firstmate](https://github.com/kunchenguid/firstmate), an agent orchestrator built around a nautical metaphor. You're the captain. A first mate runs a crew of agents, each working a ticket in its own lane, and only comes to you when something needs a decision.
That was a big step up:
- **Lanes.** Several agents working in parallel on separate tickets, each in its own branch.
- **A captain's queue.** Agents escalated decisions to me instead of guessing.
- **Pull requests.** From 11 October every change went through a PR instead of straight onto master.
I liked it enough to build things around it: cdw, a web based kanban board for watching the crew in [Herdr](https://herdr.dev), and a bridge to Linear.
But I was still the bottleneck. Every merge, every review, every "is this actually done?" came back to me. The crew could write code faster than I could check it.
## Stage 3: Gas City (November–now)
In November I moved to [Gas City](https://github.com/gastownhall/gascity), "the open-source platform for building software factories from teams of coding agents". It came at exactly the right moment: the same week I started the Gleam rewrite of Nexus Rift.
Gas City gives you the parts: agents, rigs (projects), "beads" (a git-backed issue tracker with a dependency graph), formulas (repeatable workflows), orders (scheduled jobs) and mail between agents. What you build out of them is up to you.
Here's the line I built.
### The workflow
1. **A ticket.** I describe what I want, or the supervisor agent breaks a bigger goal into small tickets. Each one is small enough for one pull request.
2. **The queue.** Tickets labelled for shipping get picked up automatically, a few at a time, by worker agents on different models.
3. **A worker builds it.** On its own branch: write the code, run the checks, open a pull request.
4. **A reviewer reviews it.** A separate agent reviews every new commit against a written rubric. Anything that touches money, the simulation, database migrations or sign-in gets _two_ independent reviews on two different models, and it needs both to pass.
5. **The fix loop.** Review comments go back to the worker. Up to five rounds. Still failing after five? The PR gets parked with a `needs-human` label and waits for me.
6. **Merge.** A green, approved PR is squash-merged. Stale ones get rebased.
7. **Release.** Every three minutes, if master has moved and CI is green, it deploys to production and checks it came up.
8. **The supervisor.** An agent called the mayor watches the whole line: failed releases, parked PRs, a queue running low, a red master. It fixes what it can and pings my phone for the rest.
My job is now mostly:
- deciding what to build
- answering the questions only I can answer
- unsticking parked PRs
- anything that touches money, secrets or production infrastructure, which stays human
### Did it work?
For the Gleam rewrite of Nexus Rift, from 2 November to 5 December:
- **~1,400 commits**
- **~1,350 merged pull requests**, around 40 a day
- **~5,000 tests**
- the game server and then the whole client cut over to production
I didn't write those by hand. I couldn't have reviewed them all by hand either. That's the point.
![[nxr-7-gleam.jpg]]
*The same page, rebuilt by the factory in Gleam.*
## The honest bit
It's not magic, and it's not free.
- **It costs real money.** Tokens add up fast when several agents work all day and every PR gets reviewed, sometimes twice.
- **Agents cut corners.** They'll hand-edit generated files, quietly widen a ticket's scope, or "fix" a test by weakening it. Every one of those became a new check on the line.
- **The factory is a product too.** I spend real time on the factory itself: the rubric, the checks, the supervisor's rules, the scripts.
- **Some things stay human, on purpose.** Infrastructure changes, secrets, rollbacks and anything that touches citizens' money. Today's cutover still needed me at a terminal running Terraform.
- **Quality is a function of the checks.** The factory is only as good as its tests, its types and its reviewers. That's a big part of why I picked Gleam: a strict compiler is a reviewer that never gets tired. (More on that in [[PR-012 - Porting a game to Gleam with AI]].)
## Why this matters
For most of my career, the limit on what a small team could build was how fast people could write and review code. That limit is moving.
One person with a good factory can now run something that used to need a team: parallel workstreams, consistent review, continuous deploys, around the clock. The skill shifts from writing code to designing the line: what gets checked, what gets escalated, and what never gets automated.
We're very early. The tools change every week, and half of my setup will look silly in a year. But I've seen it work on a real project with real players, and I don't think I'm going back.