From waves
Decomposes large goals into parallel subagent waves, verifies handoffs, and synthesizes results. Invoke with /waves for research, analysis, audits, and codebase exploration.
How this skill is triggered — by the user, by Claude, or both
Slash command
/waves:wavesThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Run **wave-based orchestration** inside one local Cursor session. A **wave** is a
Run wave-based orchestration inside one local Cursor session. A wave is a
bounded round of isolated agents working in parallel, then a round that verifies
what came back, then a deliberate decision to build on it — not an open-ended
loop. You are the orchestrator: you discover, decompose the goal into
independent slices, fan them out to parallel workers (multiple Task tool
calls in one message, backgrounded where the surface supports it), read each
worker's structured handoff, verify it, and synthesize one deliverable.
Workers are isolated and return exactly one handoff.
The shape of every wave — WAVE:
A loop doesn't know when to stop; a wave does, because verification is the stop
function. (Invoked explicitly with /waves: a run spawns more agents than usual,
so it's opt-in, not auto-triggered.)
Waves runs in place of cloud orchestration. It adopts the principles the
Cursor team proved out in their cloud orchestrate plugin — planners plan,
workers hand off up, no cross-talk — but runs them on local subagents with zero
setup: no separate cloud agents, no API keys, no runtime. Local subagent runs
are the whole story here.
Adapted from orchestrate. These keep the run converging without coordination.
references/handoff-format.md).Status: success is a claim, not
evidence. Check each handoff against something re-openable before folding it
into the synthesis. See "Verification" below and references/verification.md.Before you fan out, treat the goal as an entropy-reduction problem: shrink how many plausible interpretations and plans still fit what you know. A vague, high-entropy request ("build a Flappy Bird game", "make my app faster") doesn't slice cleanly yet — reduce the uncertainty first, then decompose the low-entropy version. Name what's uncertain, because the two kinds resolve differently:
Spend the cheapest action that buys the most certainty first — an information-gain ladder — and aim each probe at the unknown whose answer eliminates the most plans: the highest-information question is the one that splits the surviving interpretations roughly in half, not the one easiest to look up.
Then cascade: one high-level request becomes a decomposition wave
(understand → locate unknowns → draft the plan) → verify → an execution wave
that builds the ordered subtasks, with more scouting sub-waves wherever entropy
stays high. Order the plan least-to-most — do the first-order subtasks first and
let each verified result lower the uncertainty for the next. Keep the living
plan in TodoWrite, and stop reducing when entropy is low enough to act: the
verification gate doubles as "is the uncertainty low enough to commit?" One
caution: a plan-then-execute pass fixes missing steps, not a misread goal —
only the specification check above catches wrong framing, which is why it comes
before planning. (Worked example + wave shape + paper grounding:
references/examples.md.)
Track it with TodoWrite so the waves stay visible.
Do not fan out blind. Spend a few cheap tool calls in the main session to learn the shape of the problem: list the directory, read the schema, sample the data, confirm coverage/size. This is what tells you the natural decomposition (how many chunks, which workstreams). Skipping discovery produces overlapping or mis-sized slices.
explore workers are read-only by design, and read-only mode blocks all MCP
tools (Cursor staff-confirmed), so they can't reach databases or MCP-backed
sources. If the source is remote or wrapped in noise, the orchestrator must
stage clean inputs before fanning out:
rsync/export the relevant data to a local
scratch dir so read-only workers can read it (e.g. query a remote SQLite
read-only, export the rows, rsync the markdown)..waves/<run>/ with staging/,
handoffs/, synthesis-wave-N.md) so prompts cite paths instead of pasting
content and later waves re-read files, not chat history.references/verification.md §1.)In practice this serial prep is often the largest phase; the parallel fan-out is fast once inputs are clean.
Size the run first, out loud. Weigh breadth (how many independent slices),
depth (how much reasoning each needs), ambiguity (how well-formed the goal is —
see "Entropy-first decomposition"), and stakes (how costly a wrong answer is —
this sets verification tiers), then state the chosen shape in one line before
spawning — e.g. Run shape: one wave, 4 workers (3 research + 1 data chunk); second wave only if handoffs expose gaps. On the fence between two shapes,
pick the smaller and say so. And if triage says no wave is needed, do the task
inline and say that — never present inline work as wave coverage.
Then classify each slice on three axes — this is the classify-and-act pattern, routing the right work to the right handler:
explore) / web-research (generalPurpose) /
shell / competing-attempt (best-of-n-runner) / specialized review (bugbot,
security-review). (See the table under "Choosing subagent_type".)auto-accept (low-stakes, corroborated) → single verifier (medium) →
multi-model panel (high-stakes) → debate (contested, no ground truth).
Spend the verification budget where a wrong claim is expensive, not uniformly.Record the triage as a wave manifest — one row per slice, written before
you spawn (in TodoWrite or .waves/<run>/manifest.md):
| slice | scope | worker type | model | depends_on | verification tier |
|---|---|---|---|---|---|
| 1 | msgs 1–500 | explore | (default fast) | — | auto-accept |
| 2 | voice-stack research | generalPurpose | (default) | — | single verifier |
| 3 | voice build spike | generalPurpose | (default) | 2 | single verifier |
depends_on defines the wave boundaries: a wave is every not-yet-run slice
whose dependencies are all met — and a dependency is met only when its
handoff has been verified (Step 3), not merely returned. Launch wave 1 (no
dependencies) in parallel; launch each dependent slice with the distilled,
verified findings (or their .waves/<run>/ path) folded into its
self-contained prompt — and unrelated slices stay parallel. The manifest is
also your completion gate: N rows spawned means N handoffs collected and
checked off before synthesis — a wave with a missing handoff has a silent
hole in it (Step 3).
Split along whichever axis makes slices independent:
Each slice needs: a one-line scope, what to look at, and a defined output. For a big wave (roughly 5+ workers), state the decomposition plan to the user before spawning so they can redirect cheaply. If you have many slices, fan out in waves (launch a batch, let it complete, launch the next) rather than all at once, so you stay within practical concurrency limits.
Send one message with multiple Task tool calls — one per slice whose
dependencies are met (handoffs verified, not just returned) — that is what
makes them run concurrently (this is the officially documented parallelism
mechanism). Pick subagent_type per slice (table below). Give each a 3-5 word
description and a self-contained prompt ending with the required handoff
format.
Backgrounding is surface-dependent: the documented switch is the
is_background: true frontmatter field on custom subagents; a per-call
run_in_background: true parameter exists on some surfaces but is
undocumented (and absent on others, e.g. cloud agents) — pass it when the
schema exposes it, and don't rely on it elsewhere. Background workers include
their final message in the completion notification. (/multitask is a separate
user-facing Agents Window command, not this skill's mechanism.)
When workers run in the background, end your turn. You are notified as each
completes — do not AwaitShell, poll, or read output files in a loop. The
Task call itself confirms the launch. When the surface runs Task calls
synchronously, the batch still executes concurrently and returns together.
Completion gate first: check off every handoff against the wave manifest —
N spawned means N accounted for. A worker that never returns, errors out, or
comes back partial/blocked is a hole in the wave, and synthesizing around
it silently drops a slice. Worker failure ladder: (1) re-task once,
narrower — resume the same worker (each Task returns an agent ID that
resumes with context preserved; completed subagents persist checkpoints, so a
resume restores prior context even after the worker finished) when the slice
just needs continuation, or re-spawn fresh with a narrower scope and a note
about what came back. Resume only for continuation of the same slice — a
resumed worker carries its old slice's context, which contaminates an
unrelated assignment; (2) if
it fails again, do that slice yourself in the main session; (3) if it stays
blocked, carry the slice into the synthesis explicitly as not-covered —
never average over a missing slice as if coverage were complete.
As handoffs arrive, read each one: note Status, extract Key findings, and
mine Open questions / Suggested follow-ups — each bullet may become a
second-wave task. Reconcile conflicts across workers.
Don't trust a handoff because it says success. Verify each finding's
evidence (cited file:line / URL / metric resolves and says what's claimed),
recount headline numbers from the source, and route low-confidence,
conflicting, or citation-heavy claims to a verifier (Step 3.5). See
"Verification" below. A wave's handoffs count as verified only when these
checks pass and every claim whose manifest tier demands a verifier has its
verdict back — cheap checks alone don't clear a single verifier or higher
tier.
Only then compress at the barrier: write the distilled synthesis to
.waves/<run>/synthesis-wave-N.md and work from that file — next-wave prompts
cite paths into the scratch dir, never re-paste raw handoffs. This file is
what dependent slices and later waves consume, so nothing unverified enters it
as a finding: a claim still awaiting its verdict is carried only as an
explicit pending-verification line.
Pin the constraints through the compression. The wave manifest, the stop conditions/budget, and any safety or scope rules are carried verbatim into every synthesis file and every between-wave summary — never paraphrased or summarized away. Compaction silently drops in-context constraints (measured: violation rates rise from 0% to 30–59% after compaction; pinning restores 0% — arXiv 2606.22528), and a run whose stop conditions got compressed out is a run that loops or quits at random.
Before writing the wave synthesis, spawn dedicated verifier workers for every
claim whose manifest tier is single verifier or higher — and for anything
that arrived contested, surprising, single-sourced, or low-confidence. Give
each verifier the claim + its cited sources, no generator reasoning, no
authorship labels (see "Verification"). Verifiers can run while you draft
around them, but their verdicts gate the wave synthesis itself, not just the
final deliverable: until its verdict returns, a claim may sit in
synthesis-wave-N.md only as an explicit pending-verification line — never
as a settled finding, and never in a dependent slice's prompt (Step 0.7's
met-only-when-verified rule).
If handoffs exposed gaps or follow-ups — or verified handoffs just unblocked
dependent manifest slices — spawn another parallel wave the same way. Repeat
until no slice is pending and nothing new surfaced. Stopping early while
genuine follow-ups remain is the failure mode this skill guards against; the
stop function is the manifest plus the stated budget (see "Bounded waves"),
never "we've already done a wave or two."
Skipping a follow-up wave is legitimate in exactly three cases — name which one applies when you decide: the remaining open items are primary-source-verified (a verifier can't improve on the evidence), time-gated (unresolvable until an external event, carry them as explicit open items), or genuinely contested (independent quality sources disagree; more sampling won't settle taste — record the disagreement instead).
Synthesize all handoffs into the single artifact the user asked for (roadmap,
report, summary, plan). Cite which worker produced which finding when it helps,
and carry each claim's confidence through (verified / single-sourced / unverified) — never launder a low into a confident sentence.
Then write any code/files yourself, or spawn a dedicated implementation wave
(mind "Parallel writes"). Verify the deliverable, not just the handoffs:
re-run/curl/validate served artifacts, regression-check sibling routes, and
re-read the critical files you wrote (see references/verification.md §6).
A wave is bounded on purpose — but bounded by completion and budget, not by a wave count. "Loop-until-done" unbounded burns tokens for little gain: candidate generation is cheap, selection plateaus, and extra rounds are non-monotonic — more iterations can lower quality, not just cost. Equally real is the opposite failure: stopping while the manifest still has open slices. Bounded waves keep the exploration, drop the runaway, and never abandon un-terminal work.
budget: ~20 workers). Do not stop
because a round number of waves has passed; a realistic run is often
12 + 3 + 1 workers across three waves, and a decomposition cascade on a
vague goal legitimately runs more. (Grounding: verification-driven replan
loops that stop on completeness thresholds, diminishing returns, and token
budgets — not fixed iteration caps — arXiv 2603.11445; convergence-based
stopping beats a fixed max_iterations at parity quality, arXiv 2606.27009.)Loop-until-done is justified only when ALL hold: a cheap, reliable ~ground-truth verifier exists; the signal is crisp and actionable (a failing test, not "try harder"); each iteration shows measurable progress; the work is easy–medium difficulty; and it stays hard-capped. That fits code-with-tests and exec-feedback pipelines; it misfits open-ended research/writing/design (verify in bounded waves instead).
The orchestrator's highest-leverage job. You can't make a worker smarter at inference time, but verifying a handoff is far cheaper than producing it, and in a multi-wave run one unchecked bad handoff compounds into the synthesis.
Strongest on objective, checkable work (counts, code, facts-with-sources); on
taste/judgment, verify the sub-claims, don't fake a grade. Keep claims honest:
isolation reduces error propagation / path dependency, but don't claim a
quantified "prevents poisoning" — there's no isolation-only ablation. Full
playbook: references/verification.md.
subagent_type| Slice is… | Use | Notes |
|---|---|---|
| Read-only code/data exploration | explore | Fast, read-only by design — and read-only mode blocks all MCP tools. Pass thoroughness: "quick" / "medium" / "very thorough". |
| Research needing web / MCP (Exa, Ref, docs) | generalPurpose | Multi-step; can use available web/MCP tools. Do not set readonly: true (read-only blocks all MCP). |
| Multi-step work mixing read + light reasoning | generalPurpose | The general workhorse. |
| Shell/git heavy investigation | shell | Command execution specialist. |
| Browser testing / UI verification | browser-use | Navigates and screenshots. Stateful: auto-resumes one shared instance, so don't fan out browser-use in parallel — use a single serial UI slice. Needs agent mode (not readonly). |
| Competing attempts at the same task | best-of-n-runner | Each runs in an isolated git worktree/branch — safe from shared-checkout clobbering; you then compare attempts and merge the winner. |
Naming drift across surfaces. Cursor's docs describe the built-ins as
explore, bash, and browser, while Task-tool schemas expose
surface-dependent values (generalPurpose, explore, shell, browser-use,
best-of-n-runner, review specialists…). Read the live subagent_type enum
off the Task tool rather than assuming this table's names — the roles are
stable, the labels drift.
Custom subagents and the missing-type fallback. Custom subagents (project
.cursor/agents/, user ~/.cursor/agents/, or plugin-provided) show up as
their own subagent_type values — worth defining when a role repeats across
runs (a verifier, a docs researcher) so its prompt, pinned model, readonly,
and is_background defaults live in one file. Two verified gotchas
(staff-confirmed on the forum, not in docs): new agent files register only
after a Cursor restart, and a type missing from the enum is not permission
to skip the role — run it as generalPurpose with the role's instructions
inlined in the worker prompt (passing the intended model on the call)
instead. Nesting note: the platform itself now allows the main agent and its
direct subagents to launch subagents (one extra level, no deeper — the SDK
docs state the same cap); this skill still keeps fan-out orchestrator-only as
policy, because nested fan-out hides work from the manifest and the
verification gate.
Model choice is a cost/speed lever — route it, don't put every slice on a frontier model:
explore and search subagents already default to the
Composer fast family (e.g. composer-2.5-fast) for exactly this: fast, cheap,
and tuned for codebase understanding and tool use — so read waves are cheap by
default and you often need not set model at all. To pin it, pass
model: "composer-2.5" on the Task worker, or set the model field
(inherit | a model ID) on a custom .cursor/agents/ subagent. For
lightweight short-context slices on the GPT side, gpt-5.6-luna at a higher
effort is the cost-per-unit-of-work champion — but never give Luna
long-context reads (its recall collapses on 256K+ contexts per OpenAI's own
MRCR tables; route big-file slices to a stronger tier or chunk smaller).
This is the entropy-reduction workhorse.gpt-5.6-sol, claude-opus-4-8[effort=high,context=300k],
composer-2.5[fast=false], composer-2.5[] (empty brackets pin the
standard, non-fast variant). Use [effort=…] instead of guessing separate
"thinking" slugs.effort=high,
escalating effort only for a slice that stays unresolved). For a
user-requested or high-stakes multi-model panel, ask which models to use;
don't guess slugs (see "Multi-model fan-out").Caveats: availability varies (Max Mode, plan, or admin restrictions can force a
fallback to a compatible model; legacy request-based plans without Max Mode run
subagents on Composer regardless of model configuration); slugs drift, so
read them off Cursor's model picker rather than hardcoding volatile ones;
inherit can be unreliable in some surfaces (omit model to inherit). When a
custom agent's model matters, pin it in the frontmatter and pass the
matching model on the Task call — the field has been ignored under some
conditions (documented fallbacks plus confirmed bug reports), so if a worker's
output quality looks off, consider that the intended model may not have run.
Respect the user's cost and model preferences over any default here.
For review/audit slices, Cursor also exposes specialized subagents when available
(e.g. bugbot, security-review, ci-investigator, ci-watcher) — prefer them
for those slice types.
The default fan-out runs each slice on one model. A high-stakes slice — an architecture/design call, a risky correctness question, a security or audit pass, or a key research synthesis — fan the same slice out to a panel of different models, then act as judge and synthesizer.
Reconcile; don't concatenate. Label CONSENSUS (2+ models agree) vs lone-model findings, resolve contradictions, dedupe overlap, and carry each claim's confidence into one answer. The synthesis is where most of the value lives — per OpenRouter's Fusion research, roughly three-quarters of the gain comes from the synthesis step, not the model diversity — so invest there rather than stapling outputs together. Evidence: a panel of independent models + a judge + a synthesizer matched and surpassed a single top-tier model on hard, deep-research problems (OpenRouter, Surpassing Frontier Performance with Fusion, openrouter.ai/blog/announcements/fusion-beats-frontier/).
Run it in Cursor: pass a different model to each sibling Task worker on
the same slice, launch them in one message (parallel; backgrounded where
the surface supports it), then synthesize. This is the high-stakes end of model routing —
the orchestrator picks frontier models only when the user asks for a multi-model
pass or the slice is explicitly high-stakes — so ask which models to use;
don't guess slugs. (The cheap end — routing scouting and read-heavy waves to
Composer 2.5 — is under "Picking the model per slice.")
Caveat: a panel multiplies token cost (you pay every worker) and adds latency — reserve it for high-stakes slices, not routine ones. The adversarial multi-model review (a panel of reviewer models + one synthesized verdict) is this same pattern applied to code review. For grading panels specifically, judges drawn from disjoint model families beat a single frontier judge on human agreement while cutting self-preference bias and cost (PoLL) — the family diversity, not the head count, is what does the work.
For open-ended ideation or "produce the single best X", generate several candidates and filter — don't trust one attempt:
best-of-n-runner for competing implementation attempts (each in its
own git worktree), then inspect/test/merge the winner yourself.A worker cannot ask follow-up questions. Under-specified prompts drift silently. Write each as if you get one shot. Every worker prompt includes:
references/handoff-format.md.high|med|low), and state what you could not verify. Analysis workers:
"read COMPLETELY (N lines) and report the count." Research workers: "use live
sources, not training data."See references/handoff-format.md for the copy-paste worker handoff template and
references/examples.md for a full worked run (the health-coach research job in
the screenshots) plus reusable decomposition recipes.
Local subagents share one working directory. Concurrent writes to overlapping files clobber each other.
best-of-n-runner (each in its
own git worktree/branch), then inspect, test, and merge the chosen result
yourself — worktrees prevent clobbering, not the merge.Waves is deliberately the replacement for cloud fan-out, not a stepping
stone to it. Local subagent runs cover the whole workload this skill targets —
research, audits, data analysis, exploration, and bounded implementation — with
isolation, parallelism, resume, and verification, and none of the cloud setup
(separate VMs, API keys, runtimes). The lessons worth keeping from the Cursor
team's cloud orchestrate plugin are already folded into this skill: planners
plan, workers hand off up, no cross-talk, disk/git as the durable medium. Do
not spawn cloud agents for a waves run; if a run truly outgrows one machine
(days-long fleets, PR-per-task pipelines), that is a different tool choice for
the user to make — say so and let them decide.
Cursor subagent mechanics here were checked on 2026-07-19 against current docs, changelogs, and staff forum replies: parallel Task calls in one message are the documented fan-out;
is_backgroundfrontmatter is the documented background switch while per-callrun_in_backgroundis live but undocumented and absent on some surfaces; completed subagents persist resume checkpoints (CLI release 2026-07-06); nesting is capped at one extra level; read-only mode blocks all MCP; there is no documented concurrency cap, but staff report ~40 concurrent workers can overwhelm the extension host — batch into waves. The details most likely to drift: Task parameter names, thesubagent_typeenum, and model-ID bracket options. Re-verify those if they matter to your run.
gpt-5.6-luna for short-context slices only); reserved frontier /
panel models for high-stakes slices; never gave Luna-class models
long-context reads.depends_on
edges are recorded in the manifest.Task calls sent in one message; backgrounded where the
surface supports it (is_background / run_in_background).Status); escalated
low-confidence / conflicting / uncited findings; wrote
synthesis-wave-N.md only from verdict-cleared findings (pending claims
tagged pending-verification, never fed to dependent slices).npx claudepluginhub rayfernando1337/rayfernando-skills --plugin wavesOrchestrates bounded waves of parallel Codex subagents: decompose goals, fan out workers, collect evidence-backed handoffs, verify claims, and synthesize deliverables.
Orchestrates multi-agent work at scale — research swarms, parallel builds, wave dispatch, and build-review-fix pipelines. Activates on mentions of swarm, multi-agent, or parallel agents.
Coordinates native Claude agents and Codex subagents in structured waves with context budget tracking and directive diversity. Prevents context exhaustion and duplication when dispatching many agents.