Waves
WAVES — Workers · Aggregate · Verify · Extend — wave-based orchestration for Cursor. Decompose a big goal into independent slices, fan them out to isolated parallel subagents via parallel Task tool calls as a bounded "wave", verify each structured handoff, then synthesize, and extend into another wave only when warranted. Invoke explicitly with /waves; bounded by design to avoid runaway token loops. For big research, analysis, audits, and codebase or data exploration where one linear pass is slow. Formerly parallel-orchestrate; also fan out, parallelize, orchestrate subagents, multi-agent.
By- name:
- waves
- description:
- WAVES — Workers · Aggregate · Verify · Extend — wave-based orchestration for Cursor. Decompose a big goal into independent slices, fan them out to isolated parallel subagents via parallel Task tool calls as a bounded "wave", verify each structured handoff, then synthesize, and extend into another wave only when warranted. Invoke explicitly with /waves; bounded by design to avoid runaway token loops. For big research, analysis, audits, and codebase or data exploration where one linear pass is slow. Formerly parallel-orchestrate; also fan out, parallelize, orchestrate subagents, multi-agent.
WAVES — Workers · Aggregate · Verify · Extend (Cursor)
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:
- W — Workers. Fan out isolated workers across disjoint slices (the bounded parallel round).
- A — Aggregate. Wait for all of them and merge their structured handoffs at the synthesize barrier.
- V — Verify. The moat: check the evidence behind each handoff before you trust it.
- E — Extend. Decide — deliberately — whether to launch another wave, or stop.
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.
When to use
- A large goal that splits into independent slices (research areas, data chunks, files/modules, audit dimensions).
- The work is mostly read / research / analysis — the safest thing to parallelize locally (see "Parallel writes" for why).
- A single linear pass would be slow and you want real speedup from concurrency.
When to skip
- Small or linear tasks (just do them — fan-out overhead isn't worth it).
- Work needing tight back-and-forth or shared mutable state between steps.
- Parallel edits to the same files — local workers share one filesystem.
Core principles
Adapted from orchestrate. These keep the run converging without coordination.
- Orchestrator plans and synthesizes; it does not do the heavy lifting. Discovering, decomposing, reading handoffs, and writing the final deliverable are your job. The bulk reading/research/analysis is delegated to workers.
- Workers are isolated. A subagent has no access to the user's message, your prior steps, or sibling workers. Every worker prompt must be fully self-contained: goal context, its exact slice, where to look, what to return.
- One worker, one slice, one handoff. The worker's final message is the
only thing you read back. Define its exact shape (see
references/handoff-format.md). - Parallelism is for reading, not writing. Local workers share the workspace; concurrent writes to overlapping paths corrupt each other.
- Continuous motion. A handoff can reveal new work. Spawn a second wave (driven by a handoff gap or a new user request). Stop only when every slice is terminal and the synthesis is complete.
- Verify before you trust. A worker's
Status: successis a claim, not evidence. Check each handoff against something re-openable before folding it into the synthesis. See "Verification" below andreferences/verification.md. - Decomposition is entropy reduction. A vague goal is high-entropy — many plausible plans still fit it. Your first job is to shrink that space (dig locally, then pull from attached resources, then ask the user only if it pays) before you slice it; slicing a high-entropy goal yields overlapping, mis-sized slices. See "Entropy-first decomposition."
Entropy-first decomposition
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:
- Specification uncertainty — what the user wants (ambiguous goal, missing acceptance criteria, unstated constraints). Resolve by stating an explicit assumption and proceeding — or, only when a wrong guess is expensive, by asking.
- Environment / knowledge uncertainty — facts you don't have yet but can get (repo shape, schema, API behavior, current docs, data size). Resolve by gathering, not by asking.
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.
- Dig locally first (cheap). Tool calls in the main session (list, read the schema/README, grep, sample data). This is Step 0, framed as entropy reduction; it often collapses most of the uncertainty for free.
- Then pull from attached resources. If the environment doesn't hold the answer, spawn a small scouting wave of research workers to fetch it (web, Exa/Ref MCP, docs) — route these read-heavy slices to the cheap, fast model (see "Picking the model per slice").
- Ask the user last, and only when it pays. Ask only when residual specification uncertainty is high and the question's expected information gain clearly beats its cost. Most requests carry enough to proceed on a stated assumption; over-asking is its own failure mode.
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.)
The loop
Track it with TodoWrite so the waves stay visible.
Step 0 — Discover first (serial, in the main session)
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.
Step 0.5 — Stage the data (when it's remote or messy)
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:
- Pull remote → local. SSH/
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,rsyncthe markdown). - Clean + normalize once, centrally. Strip wrappers, boilerplate, and binary blobs (base64, logs); fix timestamps. Doing this once beats making every worker re-derive it (and keeps noise out of their context).
- Pre-chunk for the workers. Split into the exact per-worker files/ranges so each prompt can point at one path.
- One scratch dir per run. Keep staged inputs, worker artifacts, and
between-wave syntheses in one place (e.g.
.waves/<run>/withstaging/,handoffs/,synthesis-wave-N.md) so prompts cite paths instead of pasting content and later waves re-read files, not chat history. - Verify before you spawn. Print counts and per-slice bounds; confirm the
partition sums to the total (e.g. 8 chunks × ~388 = 3,097) so no slice is a
silent blind spot. Fix anomalies (bad sort, dups) centrally, then re-check.
(Details:
references/verification.md§1.)
In practice this serial prep is often the largest phase; the parallel fan-out is fast once inputs are clean.
Step 0.7 — Triage: size the run, then classify each slice
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:
- Worker type — read-only (
explore) / web-research (generalPurpose) / shell / competing-attempt (best-of-n-runner) / specialized review (bugbot,security-review). (See the table under "Choosingsubagent_type".) - Dependencies — which slices (if any) this one needs verified output from. Most slices should have none; a real dependency edge is what separates waves.
- Verification tier — how much checking the slice's stakes justify:
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).
Step 1 — Decompose into independent slices
Split along whichever axis makes slices independent:
- Data chunks — partition large data and give each worker a disjoint range (e.g. messages 1–500, 501–1000, …).
- Workstreams — separate research/analysis areas (e.g. "research voice stack", "research the Notion SDK", "audit auth code").
- Files / modules — disjoint, non-overlapping path sets.
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.
Step 2 — Fan out in parallel
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.
Step 3 — Collect and synthesize
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.
Step 3.5 — Verifier pass (when the tier demands it)
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).
Step 4 — Second waves (continuous motion)
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).
Step 5 — Deliver
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).
Bounded waves — size, budget, and the stop function
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.
- Width: N = 3–8 workers per wave. Size N so you can fully verify all N. Go wider only when a cheap automatic check (tests, schema, exec) gates the results. (Grounding: homogeneous-agent teams plateau around N≈4–8 — added workers contribute redundant evidence, and diversity, not head count, is what escapes the ceiling — arXiv 2606.02646, 2602.03794. Practically, Cursor staff confirm no fixed subagent cap but that ~40 concurrent workers can overwhelm the extension host: batch into waves.)
- Depth: the manifest is the stop function. Keep extending while any
manifest slice is non-terminal and the last wave added verified progress.
Stop only on one of three conditions: completion (every slice terminal
and the synthesis done), stagnation (a wave surfaces nothing new and its
outputs near-duplicate the last, or quality dropped), or budget
exhaustion. State the budget up front in the run-shape line — a worker or
token budget, not a wave count (e.g.
budget: ~20 workers). Do not stop because a round number of waves has passed; a realistic run is often12 + 3 + 1workers 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 fixedmax_iterationsat parity quality, arXiv 2606.27009.) - Scouting is cheap — don't let it eat the budget. Entropy-reduction waves (scouting, decomposition) run on cheap models and count separately from the execution budget. Never end a run "out of waves" when the caps were consumed by discovery before execution started.
- Budget split: ~60% generation / 40% verification. Selection is the scarce resource; spend there.
- Match width to difficulty: easy → 1 + a light refine; medium → 3–5; hard/open-ended → 5–8 for approach diversity; hardest/novel → don't loop, escalate the model.
- Anti-poisoning handoff: carry only a distilled, verified handoff (the winner + a short critique) into the next wave — never raw transcripts or losing candidates. Long, irrelevant context measurably degrades reasoning.
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).
Verification
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.
- Gate before spawn — counts, coverage, partition-sums (Step 0.5).
- Cheap checks every handoff — evidence present + resolves, scope match, contradiction skim, citations actually support the claim.
- Self-checks in the prompt — cite-or-drop, confidence tags, "read COMPLETELY", live sources, flag-unverified. (Don't rely on freeform "double-check yourself"; give an oracle or a separate verifier.)
- Dedicated verifier worker for high-stakes / contested / citation-heavy claims — give it the claim + sources but not the generator's reasoning nor any authorship label (judges favor output marked as their own; blind them), and have it reason against a rubric/reference before its verdict (reference-guided + CoT is the cheapest reliable judge upgrade). Never show the generator the verifier's rubric (anti-gaming). For the highest-stakes calls, a multi-model panel + synthesis checks harder still (see "Multi-model fan-out").
- Measure & cross-check — re-run the oracle, recount from source, require ≥2 independent sources that actually entail the claim (a citation being present ≠ the claim being supported).
- Escalate low-confidence / conflicting findings (re-task with a tighter prompt → dedicated verifier → ask the user, who may choose a stronger model) instead of folding them in.
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.
Choosing 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.
Picking the model per slice (cost / speed routing)
Model choice is a cost/speed lever — route it, don't put every slice on a frontier model:
- Scouting / decomposition / read-heavy exploration → the cheap, fast model.
Cursor's built-in
exploreand 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 setmodelat all. To pin it, passmodel: "composer-2.5"on theTaskworker, or set themodelfield (inherit| a model ID) on a custom.cursor/agents/subagent. For lightweight short-context slices on the GPT side,gpt-5.6-lunaat 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. - Per-model options ride in brackets on the model ID (documented syntax):
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. - High-stakes verification, synthesis, or a multi-model panel → stronger
reasoning, chosen deliberately (e.g. a frontier tier at
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"). - Otherwise honor a model the user named; if a requested model is unavailable, say so rather than silently substituting.
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.
Multi-model fan-out (panel + synthesize)
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.
Generate-and-filter & tournaments
For open-ended ideation or "produce the single best X", generate several candidates and filter — don't trust one attempt:
- Cheap filter first. Gate candidates through a near-ground-truth check (tests, schema/exec, dedup/clustering) before spending judge tokens — generation is cheap, judging is not. (AlphaCode's shape: generate many → filter ~99% by tests → cluster → submit a few.)
- Selection ladder, not all-pairs. Dedup/cluster → shortlist → pairwise-judge only among finalists. A naive O(N²) tournament spends most of its tokens comparing also-rans.
- Use
best-of-n-runnerfor competing implementation attempts (each in its own git worktree), then inspect/test/merge the winner yourself. - For high-stakes judgment calls, the multi-model panel (above) is the generate-and-filter of verification.
- Budget check. At equal cost, k independent attempts + a majority vote or cheap filter usually beats critique/debate loops — benchmark any iterative loop against that baseline before paying for it.
Worker prompt = the contract
A worker cannot ask follow-up questions. Under-specified prompts drift silently. Write each as if you get one shot. Every worker prompt includes:
- Overall goal (context only — "don't try to own the whole goal").
- This worker's exact slice (the disjoint range / area / paths).
- Where to look (dirs, files, data ranges, which MCP/tools to use).
- What to return — the structured handoff from
references/handoff-format.md. - Self-verify rules — cite-or-drop every claim, tag confidence
(
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." - Scope boundaries — what's explicitly OUT of scope (so it doesn't overlap a sibling worker).
- Return only the handoff, and keep it a digest. The worker's entire final message becomes your context — tell it to return only the structured handoff, capped at roughly 15 findings with one-line evidence each, and to write any large artifact (tables, logs, full lists) to a file and cite the path instead of pasting it inline.
- Edit workers: you are not alone. For implementation slices, warn the worker that siblings may be active: own only the listed paths, don't revert others' changes, and never spawn its own subagents (only the orchestrator fans out).
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.
Parallel writes (the local gotcha)
Local subagents share one working directory. Concurrent writes to overlapping files clobber each other.
- Parallel reads/research/analysis: always safe. This is the default use.
- Disjoint edits you keep all of: use regular workers only when path sets are strictly disjoint, or do the edits serially after the research waves finish.
- Competing attempts at the same task: use
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 instead of cloud orchestration
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.
Checklist
- Discovered the problem shape before decomposing.
- Reduced entropy before slicing (dug locally → pulled from attached resources → asked the user only if it paid); sliced the low-entropy goal.
- Stated the run shape in one line before spawning (on the fence → the smaller shape); never presented inline work as wave coverage.
- Triaged each slice (worker type + dependencies + verification tier).
- Routed scouting / read-heavy waves to the cheap fast model (Composer 2.5,
or
gpt-5.6-lunafor short-context slices only); reserved frontier / panel models for high-stakes slices; never gave Luna-class models long-context reads. - Slices are independent (disjoint data/areas/paths), or their
depends_onedges are recorded in the manifest. - Wrote the wave manifest (slice / worker type / model / depends_on / verification tier) before spawning; launched dependent slices only after their dependencies' handoffs were verified (distilled findings fed into their prompts).
- Each worker prompt is fully self-contained (no reliance on chat history).
- Each wave's
Taskcalls sent in one message; backgrounded where the surface supports it (is_background/run_in_background). - Ended turn to await background completions — no polling loop.
- No two parallel workers write the same paths.
- Verified coverage before spawning (counts/bounds/partition-sum).
- Checked every manifest row off at collection (completion gate); ran the failure ladder on missing/blocked slices — no slice silently dropped.
- Read every handoff; spawned follow-ups for open questions.
- Waves bounded by the manifest + stated budget (width ≈3–8; scouting waves counted separately): continued while slices were non-terminal and progress was verified; stopped only on completion, stagnation, or budget — and named which of the three no-second-wave cases applied when skipping a follow-up.
- Carried only distilled handoffs forward; manifest, stop conditions, and budget pinned verbatim through every synthesis/compaction.
- Verified each handoff's evidence (not just its
Status); escalated low-confidence / conflicting / uncited findings; wrotesynthesis-wave-N.mdonly from verdict-cleared findings (pending claims taggedpending-verification, never fed to dependent slices). - Verified the final deliverable (re-ran/validated; re-read critical writes).
- Synthesized one deliverable from the handoffs.
Open this reference as its own page
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)
- List the data dir; find the message store (e.g. the SQLite db / export files).
- Read the schema; sample a few messages; count rows and date coverage.
- Result: "~3,000 messages; chunk into 8 disjoint ranges. Plus 4 research workstreams + 1 workspace-data reader."
Step 1 — Decompose
- 8 × data-chunk workers: messages split into 8 disjoint ranges.
- 1 × workspace reader: read the agent's memory/config/workspace files.
- 3 × research workers: realtime voice stack; Notion SDK platform; iOS SDK + on-device models.
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
- Read all 12 handoffs; merge findings; note conflicts and open questions.
- Spawn a small second wave for gaps surfaced in
Suggested follow-ups. - Synthesize the roadmap yourself from the merged handoffs.
Reusable recipes
Decomposition of a vague build ("build a Flappy Bird game")
A single high-level request expands into understanding + plan + subtasks:
- 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?).
- 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.
- 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.
- 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:
- 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. - Wave B — disjoint edits. One
workerper plan subtask with strictly disjoint path sets (orbest-of-n-runnerworktrees 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. - 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):
- 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. - 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.
- 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:
- Label CONSENSUS (2+ models agree) vs lone-model findings.
- Resolve contradictions instead of averaging them.
- Dedupe overlap and carry each claim's confidence forward.
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
- Pointing read-only workers at remote/un-staged data.
exploreworkers are local + offline; pull and clean the data locally first (see SKILL Step 0.5). - Fan out before discovering. Produces overlapping or mis-sized slices.
- Slicing a high-entropy goal before reducing its uncertainty. Vague goals decompose into overlapping, mis-sized slices; dig locally → pull from attached resources → ask only if it pays, then slice (see "Entropy-first decomposition").
- Fan out before verifying coverage. Check counts/bounds/partition-sum first; a missing chunk is a silent blind spot.
- Thin worker prompts. Workers can't see chat history; vague scope = drift.
- Polling for results. Background workers notify on completion — end the turn.
- Trusting
Status: success. It's a claim, not evidence; verify each handoff (seeverification.md). - Skipping a re-read of your own writes. Don't assume a
Writelanded; re-read orgrepcritical files before depending on them. - Parallel writes to shared paths. Corruption. Partition or use worktrees.
- Forwarding raw handoffs as the answer. The orchestrator must synthesize.
Grounding (why entropy-first works)
Framing decomposition as uncertainty reduction is well-supported, and each source contributes a usable mechanism — not just a citation:
- Prefer the probe that halves the surviving interpretations. Uncertainty of Thoughts (UoT, arXiv 2402.03271, NeurIPS 2024) scores candidate questions by expected information gain and shows the best probe is the one that splits the remaining hypotheses ~50/50 (binary-answer entropy peaks at an even split). Swapping that entropy reward into a tree search — not the search itself — carried most of its +38% average success gain. Orchestrator use: aim scouts at the unknown whose answer eliminates the most plans, not the one easiest to look up.
- Ask only when the value of asking clears a threshold. SAGE-Agent (arXiv 2511.08798) prices each candidate question by expected value of perfect information minus a redundancy cost, asks only when that beats a fraction of its confidence in the best current interpretation, and acts once that confidence passes an execute threshold. Penalizing redundant questions cut questions asked ~18–27% with under 3% quality loss — over-asking is measurably wasteful. This paper is also the explicit source of the specification-vs-model uncertainty split.
- Judge "is the goal fully specified?" before acting, and err toward asking. arXiv 2606.19559 gates clarification on a specification-uncertainty score emitted before choosing an action; a conservative ask-threshold silently failed (recall collapsed), while a generous one cost little. Two honest caveats it adds: every extra self-assessment channel taxed task success slightly, and verbalized confidence ran overconfident — treat self-reported scores as rankings, not probabilities. ("Resolve environment unknowns by gathering via tools" is this skill's operational extension, not that paper's mechanism.)
- Order the plan least-to-most; invest in the decomposition itself. Least-to-Most (arXiv 2205.10625, ICLR 2023) solves subproblems in sequence, each answer feeding the next; its gains concentrate on deep problems (5+ dependent steps — shallow tasks gain nothing), and its own error analysis shows the decomposition step, not the solving, is the bottleneck — and that decompositions don't transfer across domains. Plan-and-Solve (arXiv 2305.04091, ACL 2023) shows plan-then-execute cuts missing-step errors but leaves misread-goal errors untouched — which is exactly why the specification check above comes before planning.
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.
Open this reference as its own page
Worker handoff format
A worker's final message is its handoff — the only thing the orchestrator reads back. Put everything important in it; intermediate output is invisible to the parent. End every worker prompt by pasting one of these templates and saying "Use exactly this structure."
Research / analysis worker
The common case (data analysis, web/MCP research, code reading, audits).
## Status
success | partial | blocked
## Scope
<the exact slice this worker owned: data range / area / paths>
## Coverage
- Read: <what you actually read of your scope, with counts, e.g. 388/388 lines or rows>
- Skipped: <anything in scope you did not read, and why — or "none">
## Key findings
- [high|med|low] <finding> — evidence: <file:line | msg id+date | URL | metric> — sources agreeing: <N>
- <finding …>
## Sources
- <paths read, data ranges covered, URLs/docs fetched — so the parent can trace claims>
## Confidence & verification
- Verified (re-ran / cross-checked ≥2 sources / recounted): <which findings + how>
- Inferred (not independently checked): <which findings>
- Single-sourced / unresolved: <claims on one source, or that I could not confirm>
- Citations: <each URL/path cited → resolves? does it actually support the claim?>
- Would change my conclusion: <missing evidence / what would falsify>
## Open questions / gaps
- <anything ambiguous, missing, or out of scope that the parent should resolve>
## Suggested follow-ups
- <concrete next tasks the orchestrator should consider spawning>
Code / edit worker
When a worker edits files (use only with disjoint paths, or via
best-of-n-runner worktrees).
## Status
success | partial | blocked
## Changed
- <path>: <what changed and why>
## Verification
<one of: live-verified | test-verified | type-check-only | not-verified>
- <command run → outcome / test pass-fail counts>
## Notes & deviations
- <assumptions, surprises, broken invariants, anything the parent must know>
## Confidence & risk
- Risk: <low | med | high> — <blast radius / what could break / what you did NOT test>
## Suggested follow-ups
- <tasks the orchestrator should consider>
Verifier worker
For a worker whose only job is to check another handoff's claims. Give it the claims + their cited sources, but not the original worker's reasoning (so it can't inherit the same mistake).
## Status
success | partial | blocked
## Verdict per claim
- <claim> → supported | partly-supported | unsupported | source-not-found
- evidence: <quote / file:line / metric that settles it>
- source checked: <URL/path> (resolved: yes/no)
## Overall
accept | revise | reject — <one line why>
## Corrections
- <for partly/unsupported claims: the corrected statement, or "drop">
How the orchestrator reads a handoff
- Status ≠
success→ decide: retry, repair scope, or spawn a clarifying task. - Coverage → check scope vs read vs skipped first, before trusting any findings. If the worker didn't read its whole slice, the gap is a silent blind spot — re-task it rather than synthesizing on partial reads.
- Key findings → each must carry inline evidence + a confidence tag. A claim with no traceable source is unverified — demote, re-task, or send to a verifier. Skim for claims that contradict expectations or another worker.
- Sources / Confidence & verification → keep; accept
verified/ corroborated findings outright. Routelow/single-sourced/ unresolved-citation findings to a verifier worker or escalate; carry the surviving confidence label into the final deliverable. - Open questions / Suggested follow-ups → the richest section; each bullet is a candidate second-wave task. Accept, reject, or consolidate.
Why a fixed shape
Uniform handoffs are what let many isolated workers converge without talking to each other — the parent diffs and merges them mechanically. A sloppy, freeform return forces the orchestrator to re-derive structure from prose and pollutes the synthesis. The format is a shared commons; keep it tight.
Carrying a handoff into the next wave
When one wave feeds another, pass forward only a distilled, verified handoff — the accepted findings plus a one-line critique — never raw transcripts or rejected candidates. Long, irrelevant context measurably degrades the next wave's reasoning; the synthesize barrier is where you compress.
One exception to compression: constraints are pinned, never summarized. The wave manifest, stop conditions/budget, and safety/scope rules travel verbatim through every synthesis file and compaction — measured compaction behavior silently drops in-context constraints (violations rising from 0% to 30–59% post-compaction; pinning restores 0% — arXiv 2606.22528).
Open this reference as its own page
Verification (the orchestrator's highest-leverage job)
You can't make a worker smarter at inference time, but you can decide how much verification to buy per handoff. Two facts make this decisive:
- Verification is cheaper than generation (verification asymmetry). You can re-check a claim for far less than it cost to produce, so checking pays off.
- Per-step errors compound. A multi-wave run is a long-horizon task; each handoff is a step. One unchecked bad handoff poisons the synthesis. The verification discipline, not the raw worker output, is the moat.
A worker's Status: success is a claim, not evidence. A confident,
well-written finding can still be a hallucination ("reads-correct" ≠
"is-correct"). Verify against something checkable.
This is strongest where work is objective and checkable (counts, code, facts-with-sources) and weakest on taste/judgment. On subjective slices, verify the sub-claims; don't fake a crisp grade on an inherently subjective output.
1. Verify before you spawn (the pre-fan-out gate)
Catch decomposition bugs while they're cheap (one of Fable's strongest habits):
- Counts + coverage. Print line/row counts; confirm the partition sums to the total (e.g. 8 chunks × ~388 = 3,097). A missing chunk = a silent blind spot.
- Per-slice bounds. Print each chunk's range (e.g.
chunk-1: 388 msgs, 2026-03-10 → 2026-03-22). Anomalies (bad sort, dup ranges) surface here. - Fix centrally, then re-verify. If you find a problem (timestamp sort bug, duplicates), fix it once in staging and re-check before fanning out.
2. Cheap checks on every handoff (always)
- Evidence present. Each finding cites something re-openable: file:line, msg id/date, URL, metric. No traceable source → demote or re-task it.
- Scope match. The worker covered exactly its slice. Gaps → re-task; overlap → dedupe.
- Contradiction skim. Flag claims that conflict with your prior or another worker; route those to a verifier, don't fold them into the draft.
- Citations resolve. Spot-check that cited URLs/paths exist and actually say what's claimed. Deep-research workers hallucinate ~3–13% of citation URLs, and 5–18% don't resolve at all (arXiv 2604.03173) — a cheap URL-health pass before trusting links cuts non-resolving citations to under 1%.
3. Push self-checks into the worker prompt (scalable)
Bake into the handoff contract so the worker verifies before returning:
- Cite-or-drop. Every claim carries inline evidence, or it's omitted.
- Confidence per finding (
high|med|low+ why) — separate verified from inferred. - Read COMPLETELY. Analysis workers report how many lines they read
(
388/388) and may addtargeted greps to verify coverage. - Live sources only (research workers): use current docs/web, not training
data;
flag anything you could NOT verify. - Factored self-verification (CoVe). For top claims: draft → list check questions → answer each in a fresh context without the draft (isolated questions get ~70% right where the same facts in a longform draft ran ~17%) → cross-check each answer against the draft → revise. Phrase checks as open questions ("When did X ship?"), not yes/no — models tend to agree with whatever a yes/no question asserts.
- Self-consistency. If the slice yields one number/pick/label (not prose), sample 5–10× with real sampling temperature — repeating a greedy call adds nothing — and report the majority + agreement. Most of the gain arrives in the first handful of samples; low agreement is itself a low-confidence flag.
Caveat: intrinsic self-correction often degrades reasoning — models flip correct answers to wrong more often than the reverse when told to "double-check yourself" with no external signal. Give the worker an external check (a test, an independent re-derivation compared against the original, a fresh source) or a separate verifier — and never let a retry loop's stop condition peek at the expected answer (that measures the oracle, not the worker). Budget rule: at equal cost, k independent samples + majority vote usually beats critique/debate loops — benchmark any added loop against that baseline.
4. Spawn a dedicated VERIFIER worker when it matters
Verifying is a different, easier job than generating — isolate it. Spawn a
verifier (generalPurpose for web/MCP, explore for local) when a finding is
high-stakes (drives the deliverable / a go-no-go / a number the user acts on),
surprising / contested / conflicting, or the handoff is citation-heavy.
Give the verifier the claim + its cited sources but NOT the generator's
reasoning (so it can't inherit the same mistake). It returns, per claim:
supported | partly | unsupported | source-not-found + the quote/file:line that
settles it. (This is the CitationAgent pattern: re-attribute every claim to a
source after the fact.) See the Verifier worker template in handoff-format.md.
Make the verifier's job robust:
- Reference-guided + chain-of-thought. Give it a rubric or reference and have it reason step-by-step before the verdict — removing the reference is the single biggest judge-accuracy drop, and CoT-before-verdict is the mitigation that helps broadly.
- Anti-gaming. Never show the generator the verifier's rubric, and prefer a verifier that can re-derive/execute over one that re-reads prose (verifiers get gamed; over-optimizing a weak proxy verifier makes true quality fall — Goodhart).
- Hide authorship and order. Never tell the verifier which worker/model produced a claim — judges strongly prefer whatever is labeled as their own output, and swapping the label flips the preference. For pairwise comparisons, run both orderings and average (ordering bias alone flips a large fraction of verdicts). Paraphrasing a candidate before judging also blunts self-preference.
- Keep the judge on task. For reference-matching checks ("does the answer match the staged data?"), instruct the verifier to match against the reference only and not inject outside knowledge — strong models over-reason on what is essentially entailment checking.
- Different model (optional, strongest). A same-model verifier can still self-prefer even with an isolated context — models recognize and favor their own output, and the more capable the model, the stronger the effect. For the highest-stakes calls, ask the user for a different model family as the verifier; a small panel of judges from disjoint model families (majority vote on binary verdicts, average on scores) beat a single frontier judge on human agreement while cutting intra-model bias and cost ~7× (PoLL). (Planned as a Cursor default in a later version pending testing; for now it's an opt-in escalation, consistent with the user-prompted multi-model rule — don't guess model slugs.)
Budget: don't verify everything equally. Inline self-checks are free; reserve dedicated verifier workers for the ~20% of findings the deliverable hinges on.
5. Measure & cross-check (the strongest signals)
- Re-run the oracle, don't re-read the prose. If a claim is checkable by
execution — tests pass, a count, a query/regex result, a metric — have a worker
run it and report
command → output. - Recount from source. For "N items / all X do Y", recompute N from the staged data, not from the summary.
- ≥2 independent sources that ENTAIL the claim to mark it
supported— check entailment, don't just count citations (a citation being present ≠ the claim being supported; even strong models lack full citation support on ~half of long-form answers). One source =single-sourced(flag). Agreement compounds only under real independence: three independent ~90%-accurate checks give ~97% by majority vote, but a shared model family or shared search results breaks the assumption — diversify both. - Decompose then verify (SAFE). Split a long-form claim into atomic facts, rewrite each to be self-contained (resolve pronouns and vague references — the step most retellings skip), then check each against a fresh source rather than judging the paragraph whole. Sentence-level checks are too coarse: a large share of sentences mix supported and unsupported facts. A cheap model with search access is a strong rater here (SAFE's GPT-3.5 + search agreed with human annotators 72%, won 76% of disagreements, at >20× lower cost).
- Panel cross-check. Running the same high-stakes/contested claim across several models and synthesizing the results (consensus vs lone-model) is a strong cross-check — see SKILL "Multi-model fan-out".
6. Verify the deliverable, not just the handoffs
Before declaring done (Fable's habit on served artifacts):
- Run/serve it. For anything deployed:
curllocal and production/tailnet; check status, size, title. Regression-check sibling routes you might have touched. - Validator scripts. For generated artifacts (diagrams, configs), add a
validator (e.g. headless mermaid parse →
20/20 ok) and run it in the build. - Verify intent on infra. After a first push fails, confirm the result
(
gh repo view --json visibility→ PRIVATE), not just that the command exited 0. - Re-read critical writes. Don't assume a
Writelanded correctly; re-read orgrepthe files the deliverable depends on (Fable hitEdit-before-Readfailures from skipping this).
7. Acceptance, conflicts, escalation
- Accept only if: evidence present + source resolves + scope-correct + not contradicted. Otherwise it isn't "done."
- Encode acceptance bars. Write
Done when:criteria into specs/issues at synthesis time; fileopen-questionitems for claims workers flagged unverified. - Conflicts → don't average. Tie-break with a verifier (both claims + both sources) or a one-round debate; facts both sides drop are usually the false ones.
- Three tiers: auto-accept (high-confidence + corroborated) → verify (medium) → escalate (low / single-sourced / unresolved): re-task narrower → dedicated verifier → ask the user (who may choose a stronger model).
- Carry confidence into the synthesis. Mark surviving claims
verified / single-sourced / unverified; never launder alowinto a confident sentence. Prefer "couldn't confirm X" over a confident guess.
Sources
- Jason Wei, Asymmetry of verification & verifier's law — https://www.jasonwei.net/blog/asymmetry-of-verification-and-verifiers-law
- Anthropic, Building a multi-agent research system (rubric judge + CitationAgent) — https://www.anthropic.com/engineering/multi-agent-research-system
- Chain-of-Verification (CoVe; factored + factor-revise variants, open-not-yes/no check questions), arXiv 2309.11495, Findings of ACL 2024 — https://arxiv.org/abs/2309.11495
- Self-Consistency (majority vote over sampled answers; agreement ≈ confidence), arXiv 2203.11171, ICLR 2023 — https://arxiv.org/abs/2203.11171
- SAFE / LongFact (split → make self-contained → search → rate facts), arXiv 2403.18802, NeurIPS 2024 — https://arxiv.org/abs/2403.18802
- Self-correction needs external feedback (and debate loses to self-consistency at matched budget), arXiv 2310.01798, ICLR 2024 — https://arxiv.org/abs/2310.01798
- Self-preference & self-recognition in LLM judges (hide authorship; swap orderings), arXiv 2404.13076, NeurIPS 2024 — https://arxiv.org/abs/2404.13076
- Panel of LLM judges (PoLL: 3 judges from disjoint families, cheaper + less biased than one big judge), arXiv 2404.18796 — https://arxiv.org/abs/2404.18796
- Cited ≠ supported (FActScore 2305.14251; ALCE entailment-scored citations 2305.14627 — both EMNLP 2023)
- Reference hallucination rates in deep-research agents (3–13% of citation URLs fabricated; URL-health pass fixes most), arXiv 2604.03173 — https://arxiv.org/abs/2604.03173
- Verification-driven replanning as the orchestration-level coordination signal (Plan-Execute-Verify-Replan; stop on completeness / diminishing returns / budget, not fixed iteration caps; most replans are retries of incomplete slices), VMAO, arXiv 2603.11445 — https://arxiv.org/abs/2603.11445
- Verification as a scaling axis (continuous verifier scores that improve along score granularity, repeated evaluation, and criteria decomposition), LLM-as-a-Verifier, arXiv 2607.05391 — https://arxiv.org/abs/2607.05391
- Centralized verification contains error amplification (4.4× under a coordinator bottleneck vs 17.2× for unchecked independent agents; multi-agent hurts sequential-reasoning tasks), arXiv 2512.08296 — https://arxiv.org/abs/2512.08296
- Compaction silently drops in-context constraints (0% → 30–59% violations post-compaction; pin constraints verbatim through summaries), Governance Decay, arXiv 2606.22528 — https://arxiv.org/abs/2606.22528
- Team-size scaling: homogeneous agent teams plateau (hard ceiling for instruct-class models on bounded tasks, correctness level; diversity is the lever that escapes it; an N≤5 pilot identifies the regime), Ringelmann effect, arXiv 2606.02646 — https://arxiv.org/abs/2606.02646; 2 diverse agents can match 16 homogeneous, arXiv 2602.03794 — https://arxiv.org/abs/2602.03794
- Convergence-based early stopping beats fixed
max_iterationsat parity quality (and per-round judge gating is counterproductive), arXiv 2606.27009 — https://arxiv.org/abs/2606.27009
More in this playbook
Sf ai agentforce
Agentforce Builder metadata path for Builder-managed topics/actions, Prompt Builder templates, GenAiFunction/GenAiPlugin, Models API, and custom Lightning types. TRIGGER when: user maintains or configures Builder metadata agents, creates topics/actions, works with Prompt Builder templates, or touches .genAiFunction, .genAiPlugin, or .genAiPromptTemplate metadata XML files. DO NOT TRIGGER when: Agent Script DSL .agent files (use sf-ai-agentscript), agent testing (use sf-ai-agentforce-testing), or persona design (use sf-ai-agentforce-persona).
Agentic workflowsMITSf ai agentforce grid
Use this skill whenever users want to build, inspect, debug, automate, or publish workflows in Agentforce Grid (AI Workbench) using Salesforce plus the Grid MCP or direct Grid REST calls. Trigger it for Grid workbook creation, worksheet setup, Object/Reference/AI/Agent/AgentTest/Evaluation/PromptTemplate/InvocableAction column design, prompt drafting inside Grid, worksheet execution troubleshooting, Grid YAML `apply_grid` specs, and Windows-specific Grid setup issues. Also use it when users mention AI Workbench, Grid Studio, workbook IDs, worksheet IDs, Grid Connect, or ask for recipes like "top opportunities with AI email drafts", "agent test suite in Grid", or "build this worksheet from YAML". Do not use it for generic Salesforce work unrelated to Agentforce Grid.
Agentic workflowsMITSf ai agentforce observability
Agentforce session tracing extraction and analysis. TRIGGER when: user extracts STDM data from Data Cloud, analyzes agent session traces, debugs agent conversations via telemetry, or works with .parquet files from Agentforce. DO NOT TRIGGER when: testing agents (use sf-ai-agentforce-testing), Apex debug logs (use sf-debug), or building agents (use sf-ai-agentforce).
