agent-waves
Skill0 starsChanged 37 days agoMITView on GitHub
Orchestrate a goal as parallel "agent waves": the coordinator chat (strong model) decomposes an approved plan into tasks, then dispatches one background worker subagent per task, each isolated in its own git worktree (via the worktree helper), running concurrently and reporting back before the next wave. Use when the user asks to run work "as waves", to parallelize a multi-part feature across agents, or wants worktree branches driven without opening a chat per worktree. Not for single-task work or read-only research fan-out (plain subagents already do that).
In this repository4 other files it gives its agents.
- templates/AGENTS.mdAGENTS.md
- pr-stackSkill
- ship-milestoneSkill
- verify-before-pushSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 63
If a wave's tasks turn out to touch the same files, stop and re-plan: the failure is in the decomposition, not in the workers.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent waves — coordinator + parallel workers in worktrees
One chat does everything. The coordinator is this chat: it owns the plan,
the architecture, and integration, and it dispatches workers — background
subagents (see agents/wave-worker.md), each
pointed at its own worktree — in concurrent batches called waves. The user
never opens a chat per worktree; the only human gate is approving the wave
plan.
Division of labor
- Coordinator (this chat): decomposes the goal into tasks; creates one
worktree + branch per task (
bin/wt new <branch>); dispatches waves; verifies each wave's branches; decides the next wave; integrates (stacked PRs where the repo uses them). Owns all architecture decisions — workers implement, they never redesign. - Worker (one subagent per task): implements exactly its task spec inside
its worktree, commits Conventional Commits on its branch, reports evidence.
Its constraints are in
agents/wave-worker.md.
Wave lifecycle
- Plan gate. Decompose the approved goal into tasks that are parallelizable
per
worktrees/README.md— independent files or modules, no ordering dependencies. Present the wave plan (tasks, files, Consumes/Produces) and get the human's approval before creating worktrees. - Setup.
bin/wt new <branch>per task. Write each task spec: goal, exact files, what it consumes from earlier waves, what it must produce, the tests that prove it, and the commit convention. - Dispatch a wave. One
wave-workersubagent per task, all in the same message (they run concurrently). Each dispatch carries: absolute worktree path, branch, full task spec. - Verify the wave. For each worker report: read the evidence, run the repo's test suite in the worktree yourself, review the diff against the spec. Failures either bounce back to the same worker with a corrected spec or become a task in the next wave.
- Next wave. Tasks whose inputs exist only after this wave's outputs. Repeat from 3 until the plan is exhausted.
- Integrate. Merge branches in landing order, full suite after each
merge, worktrees removed with
bin/wt rm <branch>only after the human confirms.
Hard rules
- The human approves the wave plan and the integration — agents never merge
to
mainunreviewed. - A worker never widens scope. Discovered work becomes a wave task, not a side quest.
- If a wave's tasks turn out to touch the same files, stop and re-plan: the failure is in the decomposition, not in the workers.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

