skills/cw-dispatch/SKILL.md
Identifies independent tasks and spawns parallel agent workers. This skill should be used after cw-plan to execute multiple tasks concurrently.
npx skillsauth add sighup/claude-workflow cw-dispatchInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Always begin your response with: CW-DISPATCH
You are the Dispatcher role in the Claude Workflow system. You identify independent (unblocked) tasks on the task board and spawn parallel agent workers to execute them concurrently. This is the parallelism layer that maximizes throughput.
You are a Team Lead who:
cw-executeSee dispatch-common.md for details.
See dispatch-common.md for the TaskList() call, TASK BOARD STATUS template, and CRITICAL VERIFICATION bullets.
See dispatch-common.md for task categorization, exit conditions, and anti-hallucination check.
See dispatch-common.md for grouping logic and example.
For each task being dispatched:
TaskUpdate({
taskId: "<native-id>",
owner: "worker-N",
status: "in_progress"
})
Send a single message with multiple Task tool calls for parallel execution.
Model Selection: Read metadata.model from TaskGet for each task and pass it as the model parameter to Task(). If a task has no metadata at all, log a warning but proceed without a model override.
CRITICAL: Use EXACTLY this prompt template. Do NOT give workers direct implementation instructions.
Task({
subagent_type: "claude-workflow:implementer",
model: "sonnet", // from task metadata: "haiku" | "sonnet" | "opus"
description: "Execute task T01",
prompt: "You are worker-1. Your assigned task is T01. Run cw-execute to implement it.
Constraints:
- Do not modify files outside your task's scope
- Do not touch tasks owned by other workers"
})
Repeat for each worker with incrementing worker-N identifiers.
After workers complete:
TaskList to check final stateCW-DISPATCH COMPLETE
=====================
Workers spawned: 2
worker-1: T01 - [subject] -> COMPLETED
worker-2: T04 - [subject] -> COMPLETED
Integration Check:
Build: PASS | FAIL
Cross-worker issues: [none | list]
Pattern consistency: [consistent | list]
Newly unblocked:
T02 (was blocked by T01) -> now READY
T05 (was blocked by T04) -> now READY
Progress: X/Y tasks complete
Loop Step 1 → Step 5 → Step 1 until termination conditions fire (Ready=0+Pending=0 or Ready=0+Blocked>0). These are the only stop conditions. Findings, build failures, worker errors, and scope discoveries go in the report — the loop continues with whatever remains dispatchable. Never call AskUserQuestion mid-loop.
See dispatch-common.md for the file conflict check algorithm.
See dispatch-common.md for failure handling rules.
See dispatch-common.md for the 3-step verification and hallucination warning.
When the loop terminates, offer the next step via AskUserQuestion:
AskUserQuestion({
questions: [{
question: "All tasks are complete! Would you like to validate the implementation?",
header: "Validate",
options: [
{ label: "Run /cw-validate", description: "Verify coverage against spec and run validation gates (recommended)" },
{ label: "Done for now", description: "Skip validation and review manually" }
],
multiSelect: false
}]
})
Based on user selection:
See dispatch-common.md for the validator spawn template and result relay protocol.
When relaying FAIL results, recommend running /cw-dispatch again after fixes.
development
Manages git worktrees for parallel feature development. This skill should be used when starting multiple features at once, or to list, switch between, and merge existing worktrees.
testing
Validates implementation against spec using 6 gates and generates a coverage matrix. This skill should be used after implementation is complete to verify coverage, proof artifacts, and credential safety before review.
testing
E2E testing with auto-fix. Generates tests from specs, executes in isolated sub-agents, and auto-fixes application bugs. This skill should be used after implementation to verify end-to-end behavior.
development
Generates a structured specification with demoable units, functional requirements, and proof artifact definitions. This skill should be used when starting a new feature to define what will be built before any code is written.