Use after writing-plans to decompose monolithic plan into individual task files and identify tasks that can run in parallel (up to 2 subagents simultaneously)
Run immediately after /write-plan to break monolithic plan into task files and identify parallelization opportunities.
Core principle: Individual task files save context + parallel batches save time = efficient execution
Use after /write-plan when you have a monolithic implementation plan and want to:
REQUIRED: Must have monolithic plan file at docs/plans/YYYY-MM-DD-<feature-name>.md
User provides plan file path, or find most recent:
ls -t docs/plans/*.md | head -1
Execute Python helper script:
python superpowers/skills/decomposing-plans/decompose-plan.py <plan-file>
Script does:
Check output directory docs/plans/tasks/<plan-name>/:
<feature>-task-NN.md<feature>-manifest.jsonExample structure:
docs/plans/
āāā 2025-01-18-user-auth.md # Monolithic plan
āāā tasks/
āāā 2025-01-18-user-auth/ # Plan-specific subfolder
āāā user-auth-task-01.md
āāā user-auth-task-02.md
āāā user-auth-task-03.md
āāā user-auth-manifest.json
Read a few task files to verify:
Read <feature>-manifest.json to verify:
If decomposition needs adjustment:
Tell the user:
ā
Plan decomposed successfully!
Total tasks: N
Parallel batches: M
- Pairs (2 parallel): X
- Sequential: Y
Estimated speedup: Z%
Task files: docs/plans/tasks/<plan-name>/<feature>-task-*.md
Manifest: docs/plans/tasks/<plan-name>/<feature>-manifest.json
Next: Use parallel-subagent-driven-development skill
Each task file created:
# Task NN: [Task Name]
## Dependencies
- Previous tasks: [list or "none"]
- Must complete before: [list or "none"]
## Parallelizable
- Can run in parallel with: [task numbers or "none"]
## Implementation
[Exact steps from monolithic plan for THIS task only]
## Files to Modify
- path/to/file1.ts
- path/to/file2.ts
## Verification Checklist
- [ ] Implementation complete
- [ ] Tests written (TDD - test first!)
- [ ] All tests pass
- [ ] Lint/type check clean
- [ ] Code review requested
- [ ] Code review passed
{
"plan": "docs/plans/2025-01-18-feature.md",
"feature": "feature-name",
"created": "2025-01-18T10:00:00Z",
"total_tasks": 5,
"tasks": [
{
"id": 1,
"title": "Implement user model",
"file": "docs/plans/tasks/feature-task-01.md",
"dependencies": [],
"blocks": [3],
"files": ["src/models/user.ts"],
"status": "pending"
},
{
"id": 2,
"title": "Implement logger",
"file": "docs/plans/tasks/feature-task-02.md",
"dependencies": [],
"blocks": [],
"files": ["src/utils/logger.ts"],
"status": "pending"
},
{
"id": 3,
"title": "Add user validation",
"file": "docs/plans/tasks/feature-task-03.md",
"dependencies": [1],
"blocks": [],
"files": ["src/models/user.ts"],
"status": "pending"
}
],
"parallel_batches": [
[1, 2], // Tasks 1 and 2 can run together
[3] // Task 3 must wait for task 1
]
}
Script analyzes three types of dependencies:
If task content mentions "after task N" or "depends on task N":
Task 3: "After task 1 completes, add validation..."
ā Task 3 depends on Task 1
If tasks modify the same file:
Task 1: Modifies src/models/user.ts
Task 3: Modifies src/models/user.ts
ā Task 3 depends on Task 1 (sequential)
Unless marked "independent" or "parallel", tasks depend on previous task:
Task 1: ...
Task 2: (no explicit dependency mentioned)
ā Task 2 depends on Task 1
Algorithm:
Max 2 tasks per batch (constraint for code review quality)
Never:
If script fails:
Required prerequisite:
This skill enables:
Alternative workflow:
$ python superpowers/skills/decomposing-plans/decompose-plan.py docs/plans/2025-01-18-user-auth.md
š Reading plan: docs/plans/2025-01-18-user-auth.md
ā Found 5 tasks
š Analyzing dependencies...
Task 1: No dependencies
Task 2: No dependencies
Task 3: Depends on task 1 (file conflict: src/models/user.ts)
Task 4: Depends on task 3
Task 5: No dependencies
ā” Identifying parallelization opportunities...
Batch 1: Tasks 1, 2 (parallel)
Batch 2: Tasks 3, 5 (parallel)
Batch 3: Task 4 (sequential)
š Writing 5 task files to docs/plans/tasks/2025-01-18-user-auth/
ā user-auth-task-01.md
ā user-auth-task-02.md
ā user-auth-task-03.md
ā user-auth-task-04.md
ā user-auth-task-05.md
š Writing execution manifest...
ā user-auth-manifest.json
============================================================
ā
Plan decomposition complete!
============================================================
Total tasks: 5
Parallel batches: 3
- Pairs (2 parallel): 2
- Sequential: 1
Estimated speedup: 40.0%
Manifest: docs/plans/tasks/2025-01-18-user-auth/user-auth-manifest.json
Next: Use parallel-subagent-driven-development skill
Problem: Script reports "Found 0 tasks"
Solutions:
## Task 1: Title## 1. Title**Task 1:** Title--verbose for debug outputProblem: Script identifies wrong dependencies
Solutions:
Problem: Script creates too many sequential batches
Solutions:
After decomposition:
After decomposition completes successfully, prompt user:
Plan decomposed into X tasks across Y parallel batches.
Manifest: `docs/plans/tasks/YYYY-MM-DD-<feature>/manifest.json`
Tasks: `docs/plans/tasks/YYYY-MM-DD-<feature>/<task-files>`
Options:
A) Review the plan with plan-review
B) Execute immediately with parallel-subagent-driven-development
C) Save and exit (resume later with /cc:resume)
Choose: (A/B/C)
If user chooses A:
plan-review skillIf user chooses B:
parallel-subagent-driven-development skillIf user chooses C:
state-persistence skill to save execution checkpointYYYY-MM-DD-<feature>-execution.md with:/cc:resume and execute