Break down complex tasks into actionable, atomic steps that can be executed by individual agents.
npx playbooks add skill mindmorass/reflex --skill task-decomposition
Break down complex tasks into actionable, atomic steps that can be executed by individual agents.
goal_analysis:
end_state: "What does success look like?"
constraints:
- Time/resource limitations
- Technical requirements
- Dependencies on external systems
success_criteria:
- Measurable outcomes
- Acceptance conditions
Feature Request
├── Component A
│ ├── Task A1
│ └── Task A2
├── Component B
│ ├── Task B1
│ └── Task B2
└── Component C
└── Task C1
1. Research Phase
├── Understand requirements
└── Analyze existing code
2. Design Phase
├── Define interfaces
└── Plan architecture
3. Implementation Phase
├── Build core functionality
└── Add edge case handling
4. Validation Phase
├── Write tests
└── Review code
Each task should be:
- "Improve the API"
- "Make it faster"
- "Fix the bugs"
- "Add rate limiting to /api/users endpoint"
- "Add index to users.email column"
- "Fix null pointer in UserService.getUser()"
dependencies:
T1: [] # Can start immediately
T2: [] # Can start immediately
T3: [T1] # Needs T1
T4: [T1, T2] # Needs both T1 and T2
T5: [T3, T4] # Needs T3 and T4
critical_path: [T1, T3, T5] # Longest dependency chain
parallel_groups:
- [T1, T2] # Can run together
- [T3, T4] # Can run after first group
| Task Type | Best Agent |
|-----------|------------|
| Research, fact-finding | Researcher |
| Writing code | Coder |
| Documentation | Writer |
| Data analysis | Analyst |
| Content harvesting | Harvester |
| Code review | Reviewer |
| Testing | Tester |
| Infrastructure | DevOps |
| Level | Tasks | Agents | Time Estimate |
|-------|-------|--------|---------------|
| Simple | 1-3 | 1 | Minutes |
| Moderate | 4-10 | 1-2 | Hours |
| Complex | 11-25 | 2-4 | Days |
| Very Complex | 25+ | 4+ | Weeks |
tasks:
- id: research
description: "Research existing implementation and requirements"
agent: researcher
- id: design
description: "Design solution architecture"
agent: planner
depends_on: [research]
- id: implement
description: "Implement the feature"
agent: coder
depends_on: [design]
- id: test
description: "Write and run tests"
agent: tester
depends_on: [implement]
- id: review
description: "Code review"
agent: reviewer
depends_on: [test]
- id: document
description: "Update documentation"
agent: writer
depends_on: [implement]
tasks:
- id: reproduce
description: "Reproduce and understand the bug"
agent: coder
- id: fix
description: "Implement the fix"
agent: coder
depends_on: [reproduce]
- id: test
description: "Add regression test"
agent: tester
depends_on: [fix]
- id: review
description: "Review fix"
agent: reviewer
depends_on: [test]
tasks:
- id: requirements
description: "Document infrastructure requirements"
agent: devops
- id: provision
description: "Create infrastructure resources"
agent: devops
depends_on: [requirements]
- id: configure
description: "Configure services"
agent: devops
depends_on: [provision]
- id: validate
description: "Validate setup works"
agent: tester
depends_on: [configure]
- id: document
description: "Document infrastructure"
agent: writer
depends_on: [configure]
Breaking tasks too small creates coordination overhead.
Tasks too large hide complexity and block parallelization.
Forgetting dependencies causes failures mid-execution.
A depends on B
B depends on C
C depends on A ← Problem!
Solution: Identify shared component, extract as separate task
Before finalizing decomposition:
Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.