Now inviting automation leaders: publish your playbook as a skill, under your own name. Publish yours →
Automation Skills
All skills/Waves/Examples
Reference · Waves

Examples

Part of Waves. Install the skill and your agent reads this page when it needs the depth.

Worked example + decomposition recipes

Worked run: "analyze all my messages and build a roadmap"

The motivating run (a health-coach app: read every message to an agent, find patterns/goals/frustrations, research the stack, and produce a roadmap). It has been run end to end. The reference run (model "Fable") fanned out 16 workers across 3 waves — wave 1: 8 message chunks + 1 workspace reader + 3 research (voice, Notion, iOS); wave 2: 3 Convex deep-dives (split when the user narrowed scope); wave 3: 1 iOS-MVP worker — with heavy serial staging up front (export → clean → chunk → verify counts/date-ranges, which caught a timestamp-sort bug) and synthesis between waves. Takeaway: plan for multiple waves, not one burst, and verify coverage before each fan-out.

Step 0 — Discover (serial, main session)

Step 1 — Decompose

Step 2 — Fan out (one message, many Task calls)

Read-only data chunks → explore. Web/MCP research → generalPurpose. Background them where the surface supports it (run_in_background is live on some surfaces but undocumented; is_background frontmatter is the documented default for custom subagents). Illustrative shape of one analysis worker:

Task(
  description = "Analyze messages chunk 3",
  subagent_type = "explore",        // read-only; "very thorough"
  run_in_background = true,
  prompt = """
  Overall goal (context only): find patterns, goals, frustrations, and recurring
  workflows in a user's chat history with their assistant, to inform an app roadmap.

  Your slice: messages with id 1001–1500 only, in <path-to-store>.

  Do: read that disjoint range. Extract recurring topics, stated goals, repeated
  pain points, and any workflow the user performs often. Quote message id + date
  as evidence.

  Return EXACTLY the research/analysis handoff format (Status, Scope, Key findings,
  Sources, Open questions, Suggested follow-ups).
  """
)

…and one research worker:

Task(
  description = "Research realtime voice stack",
  subagent_type = "generalPurpose", // needs web + Exa/Ref MCP — do NOT set readonly
  run_in_background = true,
  prompt = """
  Overall goal (context only): build a low-latency realtime-voice health assistant.

  Your slice: research the realtime voice stack ONLY (e.g. OpenAI Realtime API,
  proxy/SDK options, latency tradeoffs). Use web search + the Exa/Ref MCP tools.

  Return EXACTLY the research/analysis handoff format. Include source URLs.
  """
)

Send all ~12 in one message, then end the turn and wait for completion notifications (no polling).

Step 3-5 — Collect, second wave, deliver

Reusable recipes

Decomposition of a vague build ("build a Flappy Bird game")

A single high-level request expands into understanding + plan + subtasks:

  1. Locate the entropy. Specification unknowns (web or native? which engine/framework? scope — one screen, score, difficulty curve?) vs environment unknowns (what's already in the repo? build tooling? asset pipeline?).
  2. Reduce it cheaply. Dig locally (read the repo, package manifest, existing scaffolding). For anything the repo can't answer, spawn a small scouting wave (e.g. one worker per candidate engine/framework) on the cheap fast model, and verify. State assumptions for the specification gaps ("web canvas, vanilla TS, one screen + score") instead of blocking — ask only the one question whose answer would change the whole plan.
  3. Decompose least-to-most. The plan is now low-entropy: game loop → render pipes/bird → input + gravity → collision → score/state → polish. First-order subtasks first; each verified piece lowers the uncertainty for the next.
  4. Execute in waves. Build with disjoint-ownership workers (or serially — see "Parallel writes"), verify the served artifact, and open another scouting sub-wave only where a subtask is still high-entropy.

Data-chunk fan-out (large corpus → patterns)

Discover size → split into N disjoint ranges → N explore workers, each owning one range → merge findings. Use when one agent can't hold or read it all in time.

Multi-stack research (→ comparison / roadmap)

One generalPurpose worker per technology/option, each returning findings + source URLs → orchestrator builds the comparison/roadmap. Workers never compare across options; the orchestrator does the cross-cutting synthesis.

Whole-repo audit (→ report)

One worker per dimension (security, performance, dead code, test coverage) or per top-level module, all explore (read-only) → merge into a severity-ordered report. Pairs well with specialized review subagents when available.

Parallel implementation (→ code)

Only with disjoint file sets per worker, or best-of-n-runner (one git worktree each). Otherwise do research in parallel and edits serially.

Implement a reviewed plan (plan → edit wave → verify wave)

The end-to-end SWE shape — three waves with different jobs:

  1. Wave A — spec. A small wave (or the orchestrator alone) turns the goal into a written plan: ordered subtasks, explicit file ownership per subtask, Done when: criteria. Verify it (the artifact-then-bigger-wave shape); the verified plan is the contract every edit worker anchors to.
  2. Wave B — disjoint edits. One worker per plan subtask with strictly disjoint path sets (or best-of-n-runner worktrees for contested designs). Each prompt carries the plan excerpt for its subtask, its exact paths, the "you are not alone" warning, and the code/edit handoff format.
  3. Wave C — verify. Read-only workers run the oracles: tests, type checks, lint, a reviewer pass over the combined diff, regression checks on sibling routes. Route failures back as narrow fix tasks (bounded — don't loop). The orchestrator merges, re-reads critical files, and delivers.

Interleave cheaply: Wave C slices that only touch Wave B's finished subtasks can start while slower edits finish. Keep the plan in TodoWrite and the per-subtask status in the wave manifest.

Codemod / migration across many files (row-shaped)

When the same mechanical change applies to N files/callsites (rename an API, swap a client, migrate a schema field):

  1. Stage the target list. Grep/list the exact targets into .waves/<run>/targets.csv (path, symbol, line hints). Verify the count — the list is the coverage gate.
  2. Wave the edits in batches of 3–8 workers, each owning a disjoint file subset from the list; prompts point at the list rows, not pasted code.
  3. Verify by oracle, not prose: after each batch, re-run the grep (old pattern count must fall to the expected residue), then tests/type checks. A row-shaped run with a cheap oracle is the one place going wider than usual is safe.

CI-failure triage (→ diagnosis, then one fix wave)

For a red CI run with several failing jobs: one read-only worker per failing job/log bundle (disjoint), each returning root-cause hypothesis + evidence (log lines, commit range) + confidence. Prefer the specialized CI subagents (ci-investigator, ci-watcher) where available. The orchestrator dedupes root causes across jobs (one bad commit often explains several failures), sends contested diagnoses to a verifier, then runs a single fix wave with disjoint ownership — and re-runs CI as the deliverable check.

Multi-model panel (the Fusion pattern)

When a slice is high-stakes — a design call, a risky correctness/security question, a key research synthesis — fan the same prompt to N different models in one parallel wave (ask the user which models; don't guess slugs), then synthesize one answer rather than trusting any single output:

The synthesis carries most of the gain (per OpenRouter's Fusion research, ~3/4 from the synthesis step, not the diversity), and cost/latency scale with panel size — so reserve it for high-stakes slices. The adversarial multi-model code review (reviewer panel → one synthesized verdict) is the same recipe — see the SKILL "Multi-model fan-out" section for the Cursor mechanics.

Wave shapes

A wave isn't one move — pick the shape from how much you know about the problem.

Decomposition / scouting wave (reduce entropy before the big wave)

When the goal is vague or high-entropy ("build a Flappy Bird game", "make it faster"), the first wave's job is to reduce uncertainty, not to build. Dig locally, then fan a small scouting wave at the unknowns (stack, constraints, current APIs, repo shape) on the cheap fast model, verify what came back, and only then decompose the low-entropy version into the execution wave. The scout de-risks the build the way the artifact wave does — see "Entropy-first decomposition" in the SKILL.

Exploratory wave (you don't know the shape yet)

When the problem space is unmapped (QA, an unfamiliar repo, "what's wrong here?"), send a broad first wave — many workers probing different surfaces/flows at once. Its job is to find the edges, not to finish. Verify what's real, and now you know the shape.

Shaping wave (narrow as you learn)

After the broad wave reports, the next wave is more focused: kill the dead ends, double down on the areas with teeth. Each wave spends the previous wave's findings instead of re-guessing — the opposite of a loop re-running the same blunt prompt.

Artifact-then-bigger-wave (let a small wave earn a big one)

Sometimes a wave's deliverable is a document. A small wave writes an architecture doc; you verify it; then a much bigger wave builds against it, many workers anchored to the same verified spec. The small wave de-risks the big one; the artifact keeps the big wave from poisoning itself.

Divergent research wave (fan out directions, not just chunks)

For research, send workers in genuinely different directions on the same question, let them return independently, then run verification across them. High token value with no cross-contamination — separate contexts mean the directions don't poison each other, and the verify round turns parallel exploration into one trustworthy synthesis.

Human-in-the-loop is optional by design: read the synthesis and shape the next wave yourself, or let the verifier gate it automatically. The wave boundary is the seam a loop doesn't give you.

Anti-patterns

Grounding (why entropy-first works)

Framing decomposition as uncertainty reduction is well-supported, and each source contributes a usable mechanism — not just a citation:

These are single-model prompting results. The parallel fan-out, the verification gates between waves, and "each verified result lowers uncertainty for the next" are this skill's multi-agent adaptation — the verification half is grounded separately in verification.md.

Publish your skill

Copy this prompt into Claude Code, Codex or any agent. It walks you through your first skill in about 20 minutes, with you as the author.

Click to copy.