Decompose a large task into parallel-executable subtasks with branch names
Decomposes large tasks into parallel-executable subtasks with isolated scopes and branch names. Use this when you need to split complex work across multiple workers to speed up development while avoiding file conflicts.
/plugin marketplace add ken2403/.claude-paralell-dev-plugin/plugin install pw@claude-parallel-dev-plugindesign output or task descriptionopus$ARGUMENTS
Each subtask MUST satisfy ALL of these:
| Task Size | Workers | Pattern |
|---|---|---|
| Small | 2 | Core + Tests |
| Medium | 3 | Core + Tests + Docs |
| Large | 4-5 | By component/layer |
Pattern A: Feature-Based Split
Worker 1: Authentication (src/auth/)
Worker 2: Dashboard (src/dashboard/)
Worker 3: API layer (src/api/)
Pattern B: Layer-Based Split
Worker 1: Frontend (components/, pages/)
Worker 2: Backend (server/, api/)
Worker 3: Tests (tests/)
Pattern C: Task-Type Split
Worker 1: New implementation
Worker 2: Refactoring
Worker 3: Test additions
Use explorer subagent to understand file structure:
Use explorer subagent to find module boundaries and file organization
For each subtask, specify:
Check for conflicts:
# Task Decomposition: [Task Name]
## Summary
- **Total subtasks**: N
- **Parallel execution**: Full / Partial / Sequential
- **Estimated complexity**: Low / Medium / High
## Subtasks
### Subtask 1: [Name]
- **Branch**: `feature/[descriptive-name]`
- **Scope**: [Clear description of what to implement]
- **Target files**:
- `path/to/file1.py`
- `path/to/file2.py`
- **Do NOT modify**:
- `path/to/shared/` (other workers' territory)
- **Success criteria**:
- [ ] [Criterion 1]
- [ ] [Criterion 2]
- [ ] Tests pass
- [ ] Lint/type check pass
- **Dependencies**: None
### Subtask 2: [Name]
- **Branch**: `feature/[descriptive-name]`
...
## Execution Order
Phase 1 (Parallel):
Phase 2 (After Phase 1):
## Worker Commands
Copy-paste ready commands for orchestration:
### Start Workers
```bash
cd [repository]
# Find plugin directory
if [ -d ".claude-paralell-dev-plugin/scripts" ]; then
PLUGIN_DIR=".claude-paralell-dev-plugin"
elif [ -d "../.claude-paralell-dev-plugin/scripts" ]; then
PLUGIN_DIR="../.claude-paralell-dev-plugin"
fi
"${PLUGIN_DIR}/scripts/spinup.sh" feature/xxx feature/yyy feature/zzz
# Worker 1
tmux send-keys -t '[project]__feature-xxx' \
'claude -p "/pw:worker [Subtask 1 description]"' Enter
# Worker 2
tmux send-keys -t '[project]__feature-yyy' \
'claude -p "/pw:worker [Subtask 2 description]"' Enter
# Worker 3
tmux send-keys -t '[project]__feature-zzz' \
'claude -p "/pw:worker [Subtask 3 description]"' Enter
## Worker Instruction Template
When assigning tasks, use this template format:
You are responsible for "<task-name>".
<directory>/<shared-directory>/Create a git commit and open a PR. Detect base branch from workspace settings.
## Next Step
Run `/pw:orchestrate` with the branch names to start parallel execution.