mit einem Klick
dispatching-parallel-agents
Use when multiple independent read-only research tasks can run simultaneously, or when you need to fan out investigation across many files or hypotheses.
Menü
Use when multiple independent read-only research tasks can run simultaneously, or when you need to fan out investigation across many files or hypotheses.
Use when adding new classes, refactoring code, or reviewing PRs for Particle-Viewer.
Use when a task needs design exploration before any implementation begins. Required for any task with unclear approach, significant architecture impact, or multiple valid solutions.
Use when building, adding dependencies, configuring CMake options, troubleshooting build failures, or managing Flatpak packaging for Particle-Viewer.
Use when writing or reviewing C++ code, running pre-commit checks, or addressing formatting, naming, or static analysis violations.
Use when writing tests for any interface, abstract base class, or type with multiple implementations.
Use when implementing C++ code for Particle-Viewer, handling GL resources, working with SDL3, or applying DRY/deprecation/docs-commit patterns.
| name | dispatching-parallel-agents |
| license | MIT |
| description | Use when multiple independent read-only research tasks can run simultaneously, or when you need to fan out investigation across many files or hypotheses. |
YOU MUST RESTRICT PARALLEL AGENTS TO READ-ONLY WORK ONLY.
YOU MUST PROVIDE EACH WRITE AGENT WITH ITS OWN ISOLATED WORKTREE -- ONE WORKTREE PER AGENT.
No exceptions.
Violating the letter of this rule is violating the spirit of this rule.
Announce at start: "I am using the dispatching-parallel-agents skill to [describe what is being parallelized]."
When dispatching parallel agents, the main agent acts as a team lead:
| Role | Actor | Responsibilities |
|---|---|---|
| Manager | User / human | Receives validated, aggregated results. Never receives raw agent output directly. |
| Team lead | Main agent (you) | Orchestrates agents, tracks work status, validates and cross-checks all results, presents conclusions to the user |
| Team members | Subagents | Execute specific, isolated tasks. Return structured results to the team lead only. |
What the team lead does between dispatch and presentation:
What the team lead never does:
See references/AGENT_CACHING.md for the agent response caching protocol (postmortem evidence format and scratch/ conventions).
Before dispatching any agent, select the correct type. The wrong type wastes context and produces lower-quality output.
| Task type | Correct agent | Wrong choice |
|---|---|---|
| Read-only research across 3+ files -- patterns, symbols, hypotheses | explore | general-purpose |
| Code compliance, style, logic, or spec review | code-review | general-purpose |
| Multi-step implementation with file modifications | general-purpose + worktree | explore |
| Build, test, or lint execution -- success/failure result only | task | general-purpose |
| Any read-only + write combination | Separate explore and general-purpose agents | One general-purpose for everything |
Routing rule: Use the most constrained agent type that can complete the job. general-purpose can do everything -- which means it accumulates context, produces serial output, and contaminates findings with session assumptions for work that a constrained agent would complete faster and cleaner.
Dispatch agents in parallel when ALL of the following are true:
Good candidates for parallelization:
Do NOT parallelize:
BEFORE DISPATCHING PARALLEL AGENTS, verify:
[+] All met -> dispatch agents [-] Any unmet -> resolve the dependency, define the return format, or serialize the dispatch before proceeding
[+] All met -> dispatch agents [-] Any unmet -> resolve the dependency, define the return format, or serialize the dispatch before proceeding
Verify your account's agent concurrency limit before dispatching. Default assumption: up to 4 concurrent unless you have confirmed a higher limit.
State your concurrency assumption before dispatching: "Dispatching N agents in parallel -- [confirmed N-agent limit / assuming default 4]."
Each parallel agent MUST receive:
Why isolation matters: Agents that share context inherit your biases and assumptions. Isolated agents search without your anchoring.
When parallel agents return:
Agent 1 found: [X] -- verified by reading [file:line]
Agent 2 found: [Y] -- conflicts with Agent 1 -- investigating
When any agent cites specific file names, page names, or resource paths as evidence, apply this gate before accepting any cited finding into synthesis:
REJECTED: [resource] does not exist -- citation unverified. Do NOT re-dispatch the original agent for the same citation.VERIFIED: read [path] -- content confirms [claim].Why: Agents -- especially when working with large archives or documentation sets -- frequently cite plausible-but-nonexistent resources. Treating citations as hypotheses and verifying them before synthesis prevents hallucinated evidence from reaching conclusions.
When parallelizing write work (e.g., multiple implementers working on independent subsystems):
git check-ignore -q .worktrees || echo "NOT IGNORED"See references/WRITE_AGENTS_SETUP.md for git commands and using-git-worktrees skill for full lifecycle.
| Pattern | Action |
|---|---|
| Two or more agents assigned to the same file or overlapping file sets | STOP. Reassign to non-overlapping sets or serialize the dispatch. |
| Dispatching agents without a defined return format | STOP. Define the exact return format for every agent before dispatching. |
| Acting on one agent's result before all agents have returned | STOP. Collect ALL results first, then aggregate and verify. |
| More than 4 concurrent agents on a Standard account without confirming the limit | STOP. Verify your account's concurrency limit before dispatching. |
| Forwarding agent output to the user without verifying it against source files | STOP. Cross-check every finding against source files before presenting conclusions. |
| Excuse | Reality |
|---|---|
| "These tasks are mostly independent" | Mostly = risk. Confirm independence before dispatching. |
| "I'll just have them both edit the file" | Race condition. One agent's changes will be overwritten. Use worktrees. |
| "I'll share my session context -- it's helpful" | It contaminates their search. They'll confirm your assumptions instead of testing them. |
| "One agent can do all this" | Sequential agents fill your context. Parallel agents preserve it. |
| "I don't need to verify -- the agent found it" | Findings are hypotheses. You verify before you propagate. |
| "I'll use general-purpose -- it can do everything" | general-purpose for read-only research wastes context and produces serial output. Use explore for research across many files. |
| "I'll run them sequentially -- parallel is harder to coordinate" | YOU MUST run independent tasks in parallel. Sequential dispatch wastes turns. |
| "The agents can share the same branch -- I'll merge their changes manually" | YOU MUST use worktrees for parallel agents with side effects. Shared branches produce conflicts. |
subagent-driven-development -- orchestration framework; parallel dispatch is a specialized case of subagent dispatchusing-git-worktrees -- required for any parallel write agents; isolation guaranteeexecution -- work loop and commit rhythm that parallel dispatch operates within