From vp-beads
Orchestrate multi-agent development sprints with wave-based parallelism. Use when the user wants to plan a swarm sprint, partition work into file-disjoint waves, map file contention across open issues, run a post-wave quality gate with review agents, manage agent backpressure, run a parallel research wave, or coordinate multiple concurrent agents on a shared codebase. Works with or without beads: sources waves from the beads backlog, from a ROADMAP.md, or from a manually supplied work list. Trigger phrases: 'swarm sprint', 'wave plan', 'launch wave', 'execute wave', 'post-wave gate', 'contention map', 'research wave', 'parallel agents', 'multi-agent sprint', 'agent wave', 'swarm orchestration', 'swarm from ROADMAP', 'wave plan without beads', 'swarm with manual list'.
How this skill is triggered — by the user, by Claude, or both
Slash command
/vp-beads:swarm-wave [workflow] [wave-number|topic][workflow] [wave-number|topic]SWARM-*.md.beads/**This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Orchestrate multi-agent development sprints using the swarm wave pattern: group
Orchestrate multi-agent development sprints using the swarm wave pattern: group
file-disjoint work into waves, launch parallel task agents per wave, enforce a
blocking quality gate before committing, and track sprint state in SWARM-NN.md
files.
File isolation is the primary safety mechanism — agents within a wave each own distinct files, preventing merge conflicts without relying on worktrees.
This skill does not create beads issues (use /backlog-groomer), write
retrospectives (use /retrospective), or gate sprint closure (the
sprint-review agent handles that). It orchestrates the execution phase
between backlog grooming and sprint close.
Sprint state is tracked in SWARM-NN.md files in the project root (NN =
sprint number). These are gitignored — they are ephemeral working documents,
not committed artifacts.
Structure:
# SWARM-NN — Sprint Theme
Waves: N | Issues: N | Started: YYYY-MM-DD
## Wave 1 — [Theme]
Status: pending | running | gate-pending | gate-passed | committed
Issues: id1, id2, id3
### Agent Assignments
- Agent A: [file1, file2] -> issue-id
- Agent B: [file3] -> issue-id
- Research: [topic]
### Item Status
| Item | State |
| ----------- | ---------------------------------- |
| id1 | pending / claimed / done / carried |
| id2 | pending / claimed / done / carried |
## Wave 2 — [Theme]
...
Item Status is the run-state table. When beads is available, bd is the
source of truth (claim/close) and this table mirrors it for at-a-glance status.
When beads is unavailable (ROADMAP or manual source), this table is the
source of truth: the orchestrator owns all writes to it — pending at plan
time, claimed when an agent launches, done when the agent reports complete,
carried when an item is deferred to a later wave. Item is a beads id when
beads is used, otherwise a short slug for the work item.
Determine which workflow the user needs based on their request. If ambiguous, default to workflow 1 (Plan a swarm sprint) when the user mentions planning or starting a sprint, workflow 2 (Execute a wave) when a SWARM plan already exists, and workflow 3 (Post-wave gate) when a wave has completed and needs review.
Plan which issues go in which wave, optimizing for file-disjoint parallelism.
Steps:
Determine the work source (Tier A — require-or-fallback). Beads is
available iff a .beads/ directory exists and command -v bd succeeds;
this component is Tier A per CLAUDE.md ### Beads-availability convention. Select the wave source by precedence — beads wins when both
beads and a ROADMAP.md exist:
bd ready and bd list --status open to load
the candidate issue set.ROADMAP.md present — interpret it as the work source
following references/roadmap-interpretation.md (read it in its own
idiom; never reformat it). If that interpretation declines the ROADMAP
(it is not a parallelizable work plan), fall through to the manual path.Downstream steps operate on the resulting item list regardless of source.
Issue creation and bd claim/close are beads-only; for a beadless source
the SWARM-NN.md Item Status table is the run-state equivalent (see
## SWARM Files).
Read the project structure to understand the codebase layout. Use Glob for
key source directories and Read for package.json and relevant config files.
This builds the mental model for file contention analysis.
Build the file contention map using the procedure from workflow 4 (Map file
contention). Identify HIGH contention files (3+ issues touching the same
file). See references/file-contention-and-clustering.md for threshold rules.
Cluster issues into waves. Apply these rules in order:
references/file-contention-and-clustering.md for
priority ordering.references/agent-concurrency-limits.md and reduce if needed.bd blocked) must go in
an earlier wave than their dependents.vp-beads-0e9.6, which spanned skill
code, CLAUDE.md, and MEMORY.md). See
references/file-contention-and-clustering.md "Single owner per issue"
for the trade-off.Draft the wave execution plan in the SWARM file format shown above. Include per-agent file ownership and the research topic for each wave.
Write the plan to SWARM-NN.md in the project root. Collision detection:
pick the next free SWARM-NN (glob existing SWARM-*.md, including
-suffix variants, and choose the lowest unused number) rather than
overwriting an active plan; append if deliberately replanning the same
sprint mid-flight. If any SWARM-*.md is git-tracked, warn the user —
these are ephemeral run-state and should be gitignored (a tracked SWARM file
usually means .gitignore is missing the entry).
Present the plan to the user. No wave execution begins without explicit
approval. After approval, suggest: "Run /swarm-wave execute-wave 1 to
start Wave 1."
Note: GitHub-mirrored beads sync via bd github sync runs post-wave (or
post-sprint), not as part of swarm-wave — the bd v1.0.0 Integration Charter
(gastownhall/beads@5d524cf7:docs/INTEGRATION_CHARTER.md) explicitly punts
cross-tracker orchestration out of bd's scope, and swarm-wave follows the same
boundary.
Launch parallel task agents for a specific wave. Takes the wave number as argument.
Steps:
Read the active SWARM-NN.md file. Find the wave matching the requested
wave number. Verify status is pending — if committed, report it is
done; if gate-pending or gate-passed, redirect to workflow 3
(Post-wave gate).
Run git status — if there are uncommitted changes, stop and report.
Stale staged files get swept into agent commits.
Run the backpressure sequence from
references/agent-concurrency-limits.md — Phase 1 (kill orphans),
Phase 2 (GC cooldown — skip for waves with fewer than 5 agents), and
Phase 3 (pressure check). If memory pressure is HIGH, reduce agent
count and note the reduction. If CRITICAL, stop and report.
Claim all wave issues: run bd update <id> --claim for each issue ID in
the wave. Report the claimed IDs. Beadless source: set each item's row
in the wave's ### Item Status table to claimed instead (the orchestrator
owns these writes).
Update the wave status to running in the SWARM file.
Launch task agents in parallel. For each agent slot in the wave plan,
use the Agent tool with a prompt built from the canonical template in
references/command-patterns.md. Key elements:
bd show <id>)npm run check before finishing."bd close <id> when the issue is done." (Beadless
source: omit this line — the agent reports completion in its final
message and the orchestrator marks the Item Status row done.)If a background research agent is planned for this wave, include it in the same parallel launch batch. Research agents write findings to a separate file and do not modify source files.
All agent launches go in a single response (parallel execution).
Wait for all agents to complete. As each agent reports done, log it.
Verify closures: run bd list --status in_progress to check for unclosed
issues. Any issue still in_progress means the agent did not complete —
note it for the user (carry forward or retry in the next wave). Beadless
source: the equivalent check is the wave's ### Item Status table — any
row still claimed (not done) is the unclosed-item signal; mark deferred
items carried.
Update wave status to gate-pending in the SWARM file.
Suggest: "Wave N agents complete. Run /swarm-wave post-wave-gate N to
run the quality gate."
Run the blocking quality gate after a wave completes. Takes the wave number as argument.
This is a hard blocking gate — no commit happens until all steps pass.
See references/wave-planning-checklist.md for the full gate sequence and
references/review-gate-protocol.md for reviewer details.
Steps:
gate-pending or gate-passed.npm run check in parallel (Agent tool
calls + Bash in a single response):
references/review-gate-protocol.md for the domain specialization
table. If the wave theme is unclear, use a second code reviewer.npm run check: via Bash (not an agent — fast and synchronous).
Capture pass/fail.npm run check must pass (P0 — gate fails immediately on check errors).references/review-gate-protocol.md for threshold details and
severity handling.git commit --no-gpg-sign -m "feat: wave N — [theme] (N issues)".bd close.committed in the SWARM file./retrospective to generate the sprint
retro?" If the user confirms, invoke /retrospective via the Skill
tool.npm run check failures: fix inline (mechanical fixes).references/review-gate-protocol.md for
the severity handling table.Standalone utility: build a file-to-issue matrix to identify contention before planning waves. Also called inline by workflow 1 (Plan a swarm sprint).
Steps:
Run bd ready to get all open issues. If beads is unavailable, ask the
user to provide issue titles and descriptions — the same manual path
workflow 1 (Plan a swarm sprint) Tier A falls back to.
For each issue, identify which files it is likely to touch:
bd show <id>) — look for explicit
file mentions.Build the file-to-issue matrix:
File Issues Contention
src/foo.ts id1, id2, id3 HIGH (3)
src/bar.ts id1, id2 MEDIUM (2)
src/baz.ts id3 LOW (1)
HIGH = 3+ issues. MEDIUM = 2 issues. LOW = 1 issue.
For HIGH contention files with 500+ lines, run a section-level analysis:
Grep for function or class boundaries to identify which sections each
issue touches. If issues touch different sections, they may be compatible
in the same wave — assign explicit line-range ownership. See
references/file-contention-and-clustering.md for the two-tier
contention model.
Present the map to the user. For HIGH contention files, recommend
strategies from references/file-contention-and-clustering.md (sequence,
split, refactor, consolidate).
Orchestrate parallel research agents. Takes a topic or domain as argument.
Delegates issue creation to /backlog-groomer — this workflow only handles
the parallelism and deduplication.
Steps:
explore, deepen, validate, audit, or bm-enrichment. See
references/command-patterns.md for the intent-matching table.references/agent-concurrency-limits.md for the ceiling table./backlog-groomer workflow 5 (Create issues from findings) to turn
these into issues." Keep the findings cap at roughly 15 beads — more
suggests the research scope was too broad.### Beads-availability convention). Use beads when available; otherwise source waves from a
ROADMAP.md (workflow 1 (Plan a swarm sprint)) or a manual list, and use the
SWARM-NN.md Item Status table as run-state in place of bd claim/close.
Guard every bd command so a beadless run never errors. Only stop when no
work source can be obtained at all.SWARM-NN.md files are working documents,
not committed artifacts. They should be gitignored./retrospective is only
invoked via the Skill tool after explicit user confirmation.bd close
instruction. See references/command-patterns.md for the canonical
template. An incomplete prompt is a gate failure waiting to happen.references/agent-concurrency-limits.md come from empirical sprint
data. Exceeding them produces OOM failures. When in doubt, run fewer
agents./upstream-tracker workflow 1 (Log a new entry). When the sprint closes,
hand off to /retrospective. Do not replicate logic that belongs in
other skills.npx claudepluginhub voxpelli/vp-claude --plugin vp-beadsGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.