Task Decomposition
by @nathancjackson
Plan, track, and learn from complex multi-step tasks. Decomposes requests into dependency-aware subtasks with parallel execution, progress tracking, and a le...
clawhub install task-decompπ About This Skill
name: task-decomp description: "Plan, track, and learn from complex multi-step tasks. Decomposes requests into dependency-aware subtasks with parallel execution, progress tracking, and a learning loop that improves future plans from past outcomes. Use when: (1) A request involves 3+ steps with dependencies, (2) Work spans multiple tools or sub-agents, (3) User says 'plan this out', 'break this down', or 'how should we approach this', (4) Managing a project, workflow, or multi-phase build, (5) Coordinating parallel workstreams. Improves over time β completed plans feed back into planning intelligence. NOT for: simple one-shot requests, single tool calls, or conversational exchanges."
Task Decomposition
Plan complex work. Track it. Learn from it. Get better at planning over time.
Plan Format
Store plans in plans/ (workspace-relative). Name: [slug].plan.md. Multiple concurrent plans supported.
# Plan: Deploy new API
Started: 2026-03-03 11:00
Status: in-progress
Revised: 1Tasks
[x] 1. (S) Provision database β Postgres 16, endpoint saved to .env
[ ] 2. (M) Build auth middleware (depends: 1)
[ ] 3. (M) Build CRUD endpoints (depends: 1)
β³ parallel with 2
[ ] 4. (L) Integration tests (depends: 2, 3)
[ ] 5. (S) Deploy to staging (depends: 4) β οΈ blocked: waiting on VPN access
spawned: session-k9x2Retro
Notation
(S) <30min, (M) 30min-2h, (L) 2h+(depends: 1, 3) = must complete firstβ³ parallel with N = concurrent with task Nβ οΈ blocked: [reason]spawned: [session-id]- [x] with outcome after dash: β result summaryPlanning
1. Read the FULL request before decomposing
2. Identify boundaries: different tools, contexts, or outputs = different tasks
3. Mark real dependencies only β parallel what CAN be parallel
4. Size each task (S/M/L) β makes progress reports honest
5. Action-oriented names: "Install X", "Configure Y", "Verify Z"
6. Check plans/ for similar past plans β reuse what worked, avoid what didn't
Execution
1. Work in dependency order, parallelize where noted 2. Update plan after each TASK completes (not each tool call) 3. Blocked? Mark it, work next unblocked task 4. Record outcomes β future you needs them
Revision
Plans change mid-flight. When they do:
depends:depends: onlyRevised: counterDon't follow a bad plan to completion.
Resume (After Restart)
When you find an existing plan: 1. Read it β check Status 2. Find first unchecked, unblocked task 3. Quick sanity check that prior tasks still hold 4. Continue β or revise first if context changed
Failure
abandoned, explain whySub-agent Delegation
Progress Report
When asked "status?" or "where are we?":
π Plan: Deploy new API
Progress: 3/7 tasks (1L + 2S remaining)
Current: Task 4 (L) β running integration tests
Blocked: Task 5 β waiting on VPN access
Revised: 1x
Size-aware > task-count. "1/5 done" is misleading when the 4 remaining are all (L).
Learning Loop β what makes plans improve
Retro (on completion)
When a plan finishes (completed or abandoned), fill the ## Retro section:
## Retro
What worked: Parallelizing tasks 2+3 saved ~1h
What didn't: Underestimated task 4 (sized M, was actually L)
Sizing accuracy: 3/5 tasks sized correctly
Dependencies missed: Task 5 actually needed task 2 directly, not just via 4
Reusable pattern: [If this plan type recurs, note the template]
Patterns File
Maintain plans/patterns.md β distilled lessons from retros:
# Planning Patterns (learned from retros)Sizing
API integration tasks: usually (M), not (S)
"Write tests" is always bigger than you think β size up one level
Database migrations with data backfill: always (L) Dependencies
Auth must come before any authenticated endpoint work
Don't parallelize tasks that write to the same config file Templates
API build: provision β auth + endpoints (parallel) β tests β deploy
Research report: gather sources β analyze (parallel per source) β synthesize β review
This file gets checked during Step 6 of Planning ("check past plans"). Over time, sizing gets more accurate, dependency mistakes stop repeating, and common project types get reusable templates.
Decay
Review patterns.md monthly. Remove patterns that:
Archive
Completed/abandoned plans β rename [date]-[slug].plan.md:
plans/
βββ deploy-api.plan.md # active
βββ patterns.md # learned patterns
βββ 2026-03-01-setup-acw.plan.md # archived
βββ 2026-03-02-osint-recon.plan.md # archived