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

Examples

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

Worked Example and Decomposition Recipes

Worked Run: Analyze Messages and Build a Roadmap

Goal: read a user's message history, find patterns/goals/frustrations, research the relevant product stack, and produce a roadmap.

The upgraded reference pattern is multi-wave, not one burst: 16 workers across 3 waves.

The serial staging phase was the largest phase: export, clean, chunk, verify counts and date ranges, fix a timestamp-sort issue, then fan out.

Step 0 - Discover Serially

Step 1 - Decompose

Step 2 - Fan Out with Codex Subagents

Use explicit manager wording:

Spawn 12 Codex subagents in parallel and wait for all of them before synthesis.
Use explorer agents for the 8 read-only message chunks and workspace reader.
Use docs/research-capable agents for the 3 stack research streams. Each worker
must return the research/analysis handoff format from references/handoff-format.md,
including Coverage and Confidence & verification sections.

Example data worker 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/messages.sqlite.

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

Coverage rule: report messages read as <actual>/<assigned>. If you skip any
message, list why.

Verification rule: cite-or-drop every finding, tag confidence high|med|low, and
separate verified, inferred, single-sourced, and unresolved claims.

Do not: analyze other message ranges, write files, or produce the final roadmap.

Return exactly the research/analysis handoff format.

Example research worker prompt:

Overall goal, context only: build a low-latency realtime voice companion app.

Your slice: research realtime voice stack options only, including current OpenAI
Realtime APIs, proxy/SDK options, and latency tradeoffs. Use available docs/web
or MCP tools. Include source URLs and dates where relevant.

Verification rule: use live/current sources, not training data. Cite-or-drop
claims, tag confidence high|med|low, and say what could not be verified.

Do not: compare all roadmap options or write implementation code.

Return exactly the research/analysis handoff format.

Step 3-5 - Collect, Verify, Spawn Next Waves, Deliver

Recipe: Decomposition of a Vague Build

Use when a single high-level request ("build a Flappy Bird game") must expand 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 is 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 cannot answer, spawn a small scouting wave (one explorer per candidate engine/framework) on a fast low-effort model, and verify. State assumptions for 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 uncertainty for the next.
  4. Execute in waves. Build with disjoint-ownership workers (or serially -- see "Parallel Writes in Codex"), verify the artifact, and open another scouting sub-wave only where a subtask is still high-entropy.

Recipe: Data-Chunk Fan-Out

Use for large corpora: messages, tickets, logs, transcripts, documents, or analytics rows.

  1. Discover total size and schema.
  2. Split into disjoint ranges or files.
  3. Verify total count, per-slice bounds, gaps/overlaps, and partition sum.
  4. Spawn one explorer per chunk, or use spawn_agents_on_csv when one row maps cleanly to one worker.
  5. Require coverage and evidence identifiers in every finding.
  6. Merge into themes, counts, outliers, and follow-ups; spawn a focused second wave for the follow-ups that change the deliverable.

CSV-shaped prompt:

Create /tmp/messages.csv with columns chunk_id, start_id, end_id, db_path.
Then use spawn_agents_on_csv if available:
- csv_path: /tmp/messages.csv
- id_column: chunk_id
- instruction: "Analyze messages {start_id}-{end_id} in {db_path}. Return JSON
  with status, scope, coverage, key_findings, sources,
  confidence_and_verification, open_questions, and suggested_follow_ups via
  report_agent_job_result."
- output_csv_path: /tmp/message-analysis-results.csv
- max_concurrency: 6

Verifier pass:

Create /tmp/claims.csv with columns claim_id, claim, sources, acceptance_question.
Then use spawn_agents_on_csv if available:
- csv_path: /tmp/claims.csv
- id_column: claim_id
- instruction: "Verify claim {claim_id}: {claim}. Check only these sources:
  {sources}. Answer this acceptance question: {acceptance_question}. Return JSON
  with verdict, evidence, source_status, correction, confidence, and gaps via
  report_agent_job_result."
- output_csv_path: /tmp/claim-verification-results.csv
- max_concurrency: 6

Recipe: Multi-Stream Research

Use for comparisons and roadmaps.

  1. Define one worker per technology, vendor, API, or approach.
  2. Workers research their own option only.
  3. Require source URLs, version/date notes, and confidence labels.
  4. Split huge topics when one question list would blow context.
  5. The manager performs the comparison and recommendation.

Good slices:

Recipe: Whole-Repo Audit

Use for broad audits where one lens would be slow or noisy.

Split by dimension:

Or split by module:

Default to read-only explorer or custom reviewer agents. The manager produces a severity-ordered report with file references and confidence labels.

Recipe: Parallel Implementation

Use only when ownership is clear.

Safer patterns:

Risky patterns:

Recipe: 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 manager 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 one worktree per competing design). Each prompt carries the plan excerpt for its subtask, its exact paths, the "you are not alone" warning, and the code/edit handoff format. Use high effort.
  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 manager 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 update_plan and the per-subtask status in the wave manifest.

Recipe: 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. Fan out the edits: spawn_agents_on_csv with one row per target (or batches of 3-8 workers each owning a disjoint file subset when the CSV tool is unavailable); prompts point at 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.

Recipe: CI-Failure Triage (Diagnosis, Then One Fix Wave)

For a red CI run with several failing jobs: one read-only explorer per failing job/log bundle (disjoint), each returning root-cause hypothesis + evidence (log lines, commit range) + confidence. The manager 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.

Wave Shapes

A wave is not one move - pick the shape from how much you know about the problem.

Human-in-the-loop is optional by design: read the synthesis and shape the next wave yourself, or let the verifier gate it automatically.

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 references/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.