minifleet

A small software factory you can run yourself. v0.8 beta

GoalHow
Agents take workOne task board; agents claim tasks from it
Free first, paid when neededCheap models start; stuck tasks move up
Small tasksEach task lists its files and a check
ResumableWork is saved often; a retry continues from there
LoggedEvery step of every task is recorded
Easy to debugOne command shows a task's full history
Nothing stuckAlarms fire when work stops moving

minifleet is a short write-up of how to set that up. You don't install it. Your own coding agent reads it and builds a version that fits your repo.

Principles

What it's made of

Nothing fancy. It runs on your own machines and uses things you already have.

PieceWhat it is
BoardOne SQLite file that tracks every task and what happened to it
InboxA folder of task files you or an agent can drop work into
AgentsA small script per model, each working in its own git worktree
LogsPlain files per task, plus an alerts file and a decisions file
MachinesYour laptop plus any spare computer, connected over SSH
LandingGit branches: work lands on a staging branch, then on main once tests pass
ConfigOne JSON file listing your machines, models and limits

No server, no database to run, no cloud account. If you can read a folder and run sqlite3, you can see everything the fleet is doing.

The folders

~/fleet/
  board.db          the task board (SQLite)
  inbox/            new task files land here
  logs/<task>/      one folder per task: prompt, progress, output
  alerts.md         anything that needs attention
  decisions.md      questions for you, answered in place
  fleet.json        machines, models, limits, and where worktrees go

You choose where the agents' worktrees live. A shared spot like ~/fleet/lanes works well for warm lanes that stay ready between tasks. Or keep them next to each project, the way you would normally use git worktree. Just keep them out of Dropbox or iCloud, since a syncing folder and a busy build don't get along.

Warm lanes

My first version made a fresh git worktree for every task. Each one took about half a minute to set up and close to a gigabyte of disk, and they piled up all over the place. For five-minute tasks, that's a lot of waiting.

Now each machine keeps a small pool of worktrees that stay ready. When a task finishes, its worktree is reset to the latest code, but the installed packages and build caches stay put, so the next task starts in a few seconds. Disk use stays fixed.

A warm pool needs three safety rules, and I learned each one by losing work:

A task's life

  1. A task file lands in the inbox: what to do, which files it may touch, and a command that checks the result.
  2. The board picks it up. The next free agent claims it, using the cheapest model that might do the job.
  3. The agent works in its own worktree and saves its progress every few minutes. If it crashes, the next attempt starts from that save, with notes on what went wrong.
  4. When the check passes, the work goes to a staging branch after a quick rebase and a short set of tests.
  5. If something fails, the task goes back with the reason. After two stalls it moves to a stronger model.
  6. Once an hour the full test suite runs, and staging is promoted to main.

More machines

Add a spare computer by listing it in fleet.json. The fleet reaches it over SSH, checks that it has git, node and your agent tools, clones the repo, sets up worktrees, and starts sending it tasks when it has room. Code moves between machines with plain git over SSH.

                                          _________
                                         /        /|   checks in every 30 min
                                        /________/ |   reads the numbers
                                        | watch  | |   fixes one thing
                                        | o o o  | |   writes it down
                                        |________|/

  _________        _________                _________     _________     _________
 /        /|      /        /|              /        /|   /        /|   /        /|
/________/ |     /________/ |             /________/ |  /________/ |  /________/ |
| inbox  | | --| inbox  | | --> | board  | |gt; | board  | | claim -->   |  lane  | |  |  lane  | |  |  lane  | |
| tasks  | |     | sqlite | |             |  free  | |  | cheap  | |  | strong | |
|________|/      |________|/  <-- result  |________|/   |________|/   |________|/
                                               |             |             |
                                               v             v             v
  ====================================================================================
    [##]--[##]--[##]--[##]  >>  check: rebase . quick tests . land
  ====================================================================================
                                                             |
                                            failed? back to the lane that made it
                                                             |
                                                             v
                                            staging ==> main   (hourly full tests)

What it looks like running

This is the live dashboard from my own fleet: every worker, what it's working on and for how long, how fast tasks are finishing and landing, and anything that needs attention.

Why it's built this way

Every rule came from something that broke. My favorite: a tiny bug let a few empty rows into the task list, every write after that failed silently, and the watchdog killed 169 tasks in eight minutes. Now only one program can write to the board, and it complains loudly when something goes wrong. The other 26 stories are here.

Getting better every day

A fleet that runs all night makes a lot of small mistakes. The useful part is that every one of them is written down, so the fleet can learn from them. Here's how that works:

The first time I ran those questions, they found that 27% of attempts were being thrown away, mostly because tasks were handed out when there was no free worktree to run them in. That became the next fix.

Is it for you?

It's for one person, one repo, and a couple of machines. If you'd like a dashboard, a hosted service, or a team setup, one of the other tools will probably suit you better.

Try it

Open a coding agent in your repo and paste this:

Read minifleet.dev/skill and build me a minifleet for this repo.

It'll ask a few questions, then build it step by step.