Skip to content

Swarm-driven development: running software delivery with agent swarms

Written by Alex Vakhitov, founder of Comonad Limited. Published

On this page

Where this comes from

In 1975 Fred Brooks wrote that adding manpower to a late software project makes it later. New people need training, and every extra person adds conversations. For human teams he was right, and he still is.

I argued on my own blog, in Nine women, one month (opens in new tab), that coding agents skip both of those costs. An agent's training is reading the repository and the plan. And you choose who talks to whom, so communication grows with the number of agents rather than with its square.

That was the argument. This guide is about what we actually do, across several products built mostly by agents, and what broke along the way.

It starts with a plan

A swarm without a plan is a lot of agents burning budget on the wrong problem. Every piece of work starts as a written plan. A prompt in a chat window doesn't count.

Our plans have the same few parts: the goal, the one decision the work is meant to settle, a "done when" line that someone can check, and a list of owner gates. Those are the things no agent does without a person saying yes. On one programme that list reads: production merge, hosted migration, money, legal, accounts, secrets, client messages, destructive resets. It sits at the top of the plan, where every agent reads it.

The plan then becomes a spec and a set of thin slices. A slice is one small feature, end to end, with its own tests, touching as little shared code as possible. The cleaner the slices, the more of them can run at once.

There's one rule we learned the slow way. Anything two slices share gets built first. On one multi-tenant platform the plan says a shared seam must merge its type, a fake and a contract test before any work that depends on it starts. Without that, two agents invent two slightly different versions of the same interface, and someone has to reconcile them later.

We also cap concurrency. That same plan allows at most two sessions per lane. Adding agents is cheap. Untangling them isn't. When agents do clash, the fix we reach for is narrower jobs: a planner, a reviewer, an integrator. We don't put more writers in the same lane.

Two ways to fan out

We use two shapes of parallel work.

The first is a split. Each agent gets its own slice and its own git worktree, so nobody edits anyone else's files. The main thread lands the finished commits in plan order.

The second is a race. Several agents get exactly the same brief, often on different models. They don't see the marking scheme, but we write it before they start: three to six criteria you could actually grade. A separate judge, read-only and preferably from another model family, scores the candidates. We then pick the best one as the base and borrow good ideas from the others. This is useful when the design isn't obvious, or when a bug has several plausible causes. Ten theories tested at once is a lot quicker than one engineer working through them in turn.

Gates decide, reviewers suggest

Every change goes through checks that don't care how confident the agent sounds. Lint, type checks and tests run from the first commit, and red CI blocks the merge. On one platform the tests run in a random order with a recorded seed, so a test that only passes because of what ran before it gets caught.

Review comes from a different model to the one that wrote the code. A model reviewing its own work tends to share its own blind spots. We usually build with one lab's agent and review with another's.

Reviewers make mistakes too, so their findings stay as suggestions until proven. The rule is in writing: the code and how it actually runs come first, then the deterministic gates, and the reviewers "produce candidate findings. They decide nothing." Each finding is reproduced before it counts. Each real one gets its own commit, so the history shows what was wrong and what fixed it.

What went wrong

Plenty. These are the ones that taught us something.

  • A merge beat the review. On a public electricity dashboard, an agent marked a pull request ready and merged it a few minutes later. Marking it ready was what triggered the automated review. The review comments arrived five minutes after the merge, and two of the problems were already live. One was a forecast showing as the current reading. The rule now is simple: no merge while any review thread is open, and wait for automated reviews to finish. The follow-up fix was reviewed too, and the reviewer found that the fix itself could overwrite good data with blanks. Glad we checked.
  • The reviewer didn't look at the last commit. A day later, on the same project, the reviewer finished before the final fix was pushed. It doesn't re-review new commits unless something asks it to. We asked. It found a real bug in how two data feeds were lined up.
  • The rule lived in the wrong place. On a hotel energy product, the script that enforced "every review thread resolved before every merge" sat in a folder git doesn't track. A fresh clone lost the script and any sign that it existed. It's now in the repository, with a merge queue that merges in order, only on green, and stops at the first refusal.
  • Parallel agents trod on each other. Separate worktrees don't mean separate everything. On one platform, an agent in one worktree could shut down or rebuild a local database that an agent in another worktree was using mid-run. The fix was a lease: you can't take a stack down while someone holds it.
  • Swarms leave mess. After one long programme, the clean-up list had 63 leftover worktrees, branches and folders. The agent was allowed to delete only those exact names, and it removed 60. The other three failed a safety check, so they stayed.

The pattern is the same each time. A rule that only exists in a document, or in an agent's memory, will eventually be skipped. The fix is to move it into code, where it either passes or fails.

Where the person sits

People don't review every line, and they shouldn't have to. What they keep are the decisions: the plan choices, the merges to production, anything involving money, accounts, secrets or deleting things.

Permissions don't carry over between tasks, either. On this website every change gets a preview first, and each production merge waits for a yes. When an agent was told "merge when ready" for one piece of work, a later agent refused to treat that as permission for a different one. That's the behaviour you want.

There's a record, too. A decision log with one line per decision and a pointer to the evidence: a commit, a pull request, a screenshot. A slice is only done when its acceptance checks pass on a named environment, with a recording or a runnable path attached. When something goes wrong at 2am, you can see who decided what, and why.

The tooling

Reviewed on 28 November 2026, against astack v0.4.0 (MIT licence).

I packaged most of this into astack (opens in new tab), an open-source plugin and CLI for Claude Code, Codex, Cursor and other agent clients. It covers planning rounds, test-first slices, swarms, races, cross-model review, hardening and merge guards. Its README is honest about the limits: skills and rules guide the agent, and "a model can still ignore them". Hooks and CI gates are what actually stop things.

You can work this way without astack. What you still need is some version of each piece. As we said in Plan first, then route, the layer worth owning sits above the harness.

What this means for an enterprise team

Most large engineering organisations already have coding agents somewhere. Few have the plan format, the gates and the merge rules that make it safe to run more than one at a time. That's where we start.

We help teams write plans that agents can work from, and cut the work into slices that can run in parallel. We set up independent review and deterministic gates, and we agree which decisions stay with people. Then we roll it out one team at a time, with a record that audit and incident review can use.

How Comonad helps

That's our AI-enabled SDLC consultancy. The control model behind it is in How to set up an AI-enabled SDLC in a large organisation, and the rules for which assistants are allowed are in the AI coding assistant policy. If your agents also act in live systems, the controls are in the AI agent governance framework and our work on AI agent harnesses.

Discuss AI in your SDLC

Sources

Discuss AI in your SDLC

Tell us how many teams you have, how they release, and where AI is already in use.

Discuss AI in your SDLC