Use when executing independent tasks concurrently. Launch multiple agents simultaneously for 50-70% speedup.
Purpose: Concurrent teammate execution for independent tasks, 50-70% speedup Target: Team Leads coordinating multiple independent SCs/tasks in Agent Teams
# Spawn teammates for independent SCs (from execute-plan Step 3)
Spawn teammate "sc1-impl" with prompt:
"You are a $SC_AGENT. Execute SC-1: Create authentication service.
Skills: tdd, ralph-loop, vibe-coding. Mark task done when complete."
Spawn teammate "sc2-impl" with prompt:
"You are a $SC_AGENT. Execute SC-2: Create user service.
Skills: tdd, ralph-loop, vibe-coding. Mark task done when complete."
Spawn teammate "sc3-impl" with prompt:
"You are a $SC_AGENT. Execute SC-3: Create database migrations.
Skills: tdd, ralph-loop, vibe-coding. Mark task done when complete."
Note: $SC_AGENT is selected per-SC (not per-plan) in execute-plan Step 3 based on each SC's file paths and keywords. Different SCs may use different specialized agents (e.g., SC-1 โ frontend-engineer, SC-2 โ backend-engineer).
Parallel = Multiple teammates spawned simultaneously in Agent Team:
# โ
TRUE PARALLEL (single response, multiple Spawn calls)
Spawn teammate "sc1-impl" with prompt: "Execute SC-1..."
Spawn teammate "sc2-impl" with prompt: "Execute SC-2..."
Spawn teammate "sc3-impl" with prompt: "Execute SC-3..."
Sequential = One teammate per response (loop dispatch):
# โ NOT PARALLEL (even if called "parallel")
for SC in $SC_LIST; do
Spawn teammate "impl-$SC" with prompt: "Execute $SC..."
done
Team Lead delegate mode: Coordinate only (Shift+Tab), never implement directly
Pattern 1: Independent SCs
Spawn teammate "explore-auth" with prompt:
"You are an explorer. Search for auth patterns. Share findings via Message."
Spawn teammate "explore-db" with prompt:
"You are an explorer. Search for database patterns. Share findings via Message."
Spawn teammate "explore-api" with prompt:
"You are an explorer. Search for API patterns. Share findings via Message."
Pattern 2: Parallel Verification
Spawn teammate "test-reviewer" with prompt:
"You are a tester. Run tests and verify coverage. Mark task done when complete."
Spawn teammate "quality-reviewer" with prompt:
"You are a validator. Run type check and lint. Mark task done when complete."
Spawn teammate "deep-reviewer" with prompt:
"You are a code-reviewer (Opus). Review for async bugs. Mark task done when complete."
Pattern 3: Multi-Angle Review
Spawn teammate "plan-review" with prompt:
"You are a plan-reviewer. Review plan completeness. Message other reviewers with findings."
Spawn teammate "code-review" with prompt:
"You are a code-reviewer. Review code quality. Message other reviewers with findings."
Spawn teammate "security-review" with prompt:
"You are a security-analyst. Review security issues. Message other reviewers with findings."
Before launching parallel teammates, check for conflicts:
Result Integration:
Performance: 50-70% faster for independent tasks
Don't parallelize:
Critical: Multiple tester teammates in parallel can cause worker explosion (6 teammates ร 16 workers = 96 processes, Load 85+)
Pattern: Test type-aware concurrency
--maxWorkers=50% (unit parallel)Detection (from execute-plan Step 3):
**/e2e/**, **/integration/**, **/*.e2e.*unit (parallel with worker limit)Implementation: @.claude/agents/tester.md applies --maxWorkers=50% (Jest) or --workers=1 (Playwright E2E)
Full examples: See @.claude/skills/parallel-subagents/REFERENCE.md#test-execution-concurrency
Team Lead context is limited (~200K tokens). By delegating:
Spawn teammate "[role-name]" with prompt:
"""
You are a [agent-type] (see @.claude/agents/[agent-type].md).
[Clear task description with all context needed]
Skills to use: [skill1, skill2]
When complete, mark task as done. If blocked, message the team lead.
"""
Single Coder Delegation:
Spawn teammate "sc1-impl" with prompt:
"""
You are a coder (see @.claude/agents/coder.md).
Execute SC-1: Create authentication service from $PLAN_PATH.
Skills to use: tdd, ralph-loop, vibe-coding.
When complete, mark task as done. If blocked, message the team lead.
"""
Single Plan-Reviewer Delegation:
Spawn teammate "plan-review" with prompt:
"""
You are a plan-reviewer (see @.claude/agents/plan-reviewer.md).
Review plan at $PLAN_FILE for gaps and issues.
Review criteria: requirements coverage, success criteria clarity.
When complete, mark task as done. If blocked, message the team lead.
"""
Single Documenter Delegation:
Spawn teammate "doc-sync" with prompt:
"""
You are a documenter (see @.claude/agents/documenter.md).
Invoke the three-tier-docs skill to sync documentation.
Project root: $PROJECT_ROOT.
When complete, mark task as done. If blocked, message the team lead.
"""
# Launch 3 independent teammates
Spawn teammate "find-ts" with prompt: "You are an explorer. Find TypeScript files."
Spawn teammate "find-tests" with prompt: "You are an explorer. Find test files."
Spawn teammate "find-config" with prompt: "You are an explorer. Find config files."
# Team Lead operates in delegate mode (Shift+Tab)
# TaskCompleted hook auto-verifies quality gates
# Shared Task List shows completion status
Internal: @.claude/skills/parallel-subagents/REFERENCE.md - Detailed dependency analysis, command-specific patterns, coordination examples | @.claude/skills/agent-teams/SKILL.md - Agent Teams core concepts | @.claude/skills/using-git-worktrees/SKILL.md - Parallel development in isolated worktrees
External: None