// Break down complex tasks into atomic, actionable goals with clear dependencies and success criteria. Use this skill when you need to plan multi-step projects, coordinate agents, or decompose complex user requests into manageable sub-tasks.
| name | task-decomposition |
| description | Break down complex tasks into atomic, actionable goals with clear dependencies and success criteria. Use this skill when you need to plan multi-step projects, coordinate agents, or decompose complex user requests into manageable sub-tasks. |
Enable effective planning and execution by decomposing high-level objectives into manageable, testable sub-tasks.
Extract Information:
Questions to Ask:
Top-Down Decomposition:
Main Goal: [High-level objective]
โโ Sub-goal 1: [Component 1]
โ โโ Task 1.1: [Atomic action]
โ โโ Task 1.2: [Atomic action]
โโ Sub-goal 2: [Component 2]
โ โโ Task 2.1: [Atomic action]
โ โโ Task 2.2: [Atomic action]
โโ Sub-goal 3: [Component 3]
โโ Task 3.1: [Atomic action]
Atomic Task Criteria:
Dependency Types:
Sequential Dependencies:
Task A โ Task B โ Task C
(B requires A's output, C requires B's output)
Parallel Independent:
Task A โโ
Task B โโผโ [All can run simultaneously]
Task C โโ
Converging Dependencies:
Task A โโ
Task B โโผโ> Task D (requires A, B, C)
Task C โโ
Resource Dependencies:
Task A (needs resource X)
Task B (needs resource X)
โ Sequential or resource pooling required
For each task, define:
Input Requirements:
Output Expectations:
Quality Standards:
User Request: [Original request]
Analysis:
- Primary Goal: [Main objective]
- Type: [Implementation/Debug/Refactor/Analysis]
- Domain: [Specific area of codebase]
- Complexity: [Simple/Medium/Complex]
Break main goal into 3-7 major components:
Main Goal: Implement batch pattern update feature
Major Components:
1. Database layer (Turso + redb)
2. API layer (public interface)
3. Business logic (batch processing)
4. Testing (unit + integration)
5. Documentation (API docs + examples)
For each component, identify atomic tasks:
Component: Database layer
Tasks:
1. Design batch schema/structure
- Input: Pattern data structures
- Output: Schema definition
- Success: Supports efficient batch operations
2. Implement Turso batch operations
- Input: Schema, patterns array
- Output: Batch insert/update functions
- Success: Atomic transaction, proper error handling
3. Implement redb batch caching
- Input: Schema, patterns array
- Output: Batch cache update functions
- Success: Fast writes, consistency maintained
Dependency Graph:
[Design schema] โโโฌโโ> [Implement Turso batch] โโโ
โ โโโ> [Write tests]
โโโ> [Implement redb batch] โโโโ
[Write tests] โโ> [Write documentation]
Priority Levels:
Prioritization Factors:
For each task:
Task: [Name]
- Complexity: [Low/Medium/High]
- Effort: [Small/Medium/Large]
- Risk: [Low/Medium/High]
- Dependencies: [List]
For architectural changes:
1. Data/Storage layer
2. Business logic layer
3. API/Interface layer
4. Testing layer
5. Documentation layer
For new features:
1. Core functionality (MVP)
2. Error handling & edge cases
3. Performance optimization
4. Integration with existing system
5. Testing & validation
6. Documentation & examples
For large projects:
Phase 1: Research & Design
Phase 2: Foundation & Infrastructure
Phase 3: Core Implementation
Phase 4: Integration & Testing
Phase 5: Optimization & Polish
Phase 6: Documentation & Release
For debugging/fixing:
1. Reproduce issue
2. Diagnose root cause
3. Design solution
4. Implement fix
5. Verify fix
6. Prevent regression (tests)
Request: "Fix failing test in pattern extraction"
Analysis: Simple, focused task
Decomposition:
1. Run test to observe failure
2. Identify failure cause
3. Apply fix
4. Verify test passes
5. Check for similar issues
Dependencies: Sequential (1โ2โ3โ4โ5)
Complexity: Low
Strategy: Single agent, sequential execution
Request: "Add caching to episode retrieval"
Analysis: Medium complexity, multiple components
Decomposition:
1. Design cache strategy
2. Implement cache layer
3. Integrate with retrieval
4. Add tests
5. Measure performance
Dependencies:
- 1 โ 2 โ 3 (sequential)
- 4 depends on 3
- 5 depends on 3
Strategy: Sequential with parallel testing
Request: "Refactor storage layer to support multiple backends"
Analysis: High complexity, architectural change
Major Components:
1. Storage abstraction layer
2. Turso backend implementation
3. redb backend implementation
4. Backend factory & configuration
5. Migration utilities
6. Testing infrastructure
7. Documentation
Strategy: Multi-phase hybrid execution
Coordination: GOAP agent + multiple specialized agents
โ Each task is atomic and actionable โ Dependencies are clearly identified โ Success criteria are measurable โ Complexity is appropriately estimated โ All requirements are covered โ No task is too large (>4 hours work) โ Parallelization opportunities identified
โ Tasks too large or vague โ Missing dependencies โ Unclear success criteria โ Over-decomposition (too granular) โ Missing quality/testing tasks โ No consideration for error handling โ Forgetting documentation tasks
The GOAP agent uses task decomposition as its first phase:
Good task decomposition is the foundation of effective planning and coordination. By breaking complex goals into atomic, well-defined tasks with clear dependencies, you enable:
Use this skill as the first step in any complex task planning workflow.