Task Decomposition
v2.0.0Plan, 追踪, and learn from complex multi-step tasks. Decomposes 请求s into dependency-aware subtasks with parallel execution, 进度 追踪ing, and a learning loop that improves future plans from past outcomes. Use when: (1) A 请求 involves 3+ steps with dependencies, (2) Work spans multiple 工具s or sub-代理s, (3) User says 'plan this out', 'break this down', or 'how should we 应用roach this', (4) Managing a project, 工作流, or multi-phase build, (5) Coordinating parallel work流s. Improves over time — completed plans feed back into planning intelligence. NOT for: simple one-shot 请求s, single 工具 calls, or conversational exchanges.
运行时依赖
安装命令
点击复制技能文档
Task Decomposition
Plan complex work. 追踪 it. Learn from it. 获取 better at planning over time.
Plan 格式化
Store plans in plans/ (workspace-relative). Name: [slug].plan.md. Multiple concurrent plans supported.
# Plan: 部署 new API 启动ed: 2026-03-03 11:00 状态: in-进度 Revised: 1
Tasks
- [x] 1. (S) Provision database — Postgres 16, 端点 saved to .env
- [ ] 2. (M) Build auth 中间件 (depends: 1)
- [ ] 3. (M) Build CRUD 端点s (depends: 1)
- [ ] 4. (L) Integration tests (depends: 2, 3)
- [ ] 5. (S) 部署 to staging (depends: 4) ⚠️ blocked: wAIting on VPN 访问
Retro
Notation Size: (S) <30min, (M) 30min-2h, (L) 2h+ Dependencies: (depends: 1, 3) = must complete first Parallel: ↳ parallel with N = concurrent with task N Blocked: ⚠️ blocked: [reason] Delegated: spawned: [会话-id] Done: - [x] with outcome after dash: — 结果 summary Planning Read the FULL 请求 before decomposing Identify boundaries: different 工具s, 上下文s, or 输出s = different tasks Mark real dependencies only — parallel what CAN be parallel Size each task (S/M/L) — makes 进度 报告s honest Action-oriented names: "安装 X", "配置 Y", "验证 Z" 检查 plans/ for similar past plans — reuse what worked, avoid what didn't Execution Work in dependency order, parallelize where noted 更新 plan after each TASK completes (not each 工具 call) Blocked? Mark it, work next unblocked task Record outcomes — future you needs them Revision
Plans change mid-flight. When they do:
Insert: 添加 with next number, 更新 down流 depends: 移除: Strikethrough, don't renumber (preserves refs) Reorder: 更新 depends: only Bump the Revised: counter
Don't follow a bad plan to completion.
恢复 (After Re启动)
When you find an existing plan:
Read it — 检查 状态 Find first un检查ed, unblocked task Quick sanity 检查 that prior tasks still hold Continue — or revise first if 上下文 changed 失败 Task fAIls → note it, assess: can down流 tasks still 运行? Un恢复able → 状态: abandoned, explAIn why Always record what DID work — partial 进度 has value Sub-代理 Delegation One sub-代理 per independent BRANCH, not per task Record 会话 ID on the task line Don't poll in loops — 检查 on 事件 or when asked 进度 报告
When asked "状态?" or "where are we?":
📋 Plan: 部署 new API 进度: 3/7 tasks (1L + 2S remAIning) Current: Task 4 (L) — 运行ning integration tests Blocked: Task 5 — wAIting on VPN 访问 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 迁移s with data backfill: always (L)
Dependencies
- Auth must come before any 认证d 端点 work
- Don't parallelize tasks that write to the same config file
Templates
- API build: provision → auth + 端点s (parallel) → tests → 部署
- Re搜索 报告: gather sources → analyze (parallel per source) → synthesize → review
This file 获取s 检查ed during Step 6 of Planning ("检查 past plans"). Over time, sizing 获取s more accurate, dependency mistakes 停止 repeating, and common project types 获取 reusable templates.
Decay
Review patterns.md monthly. 移除 patterns that:
Haven't 应用lied in 30+ days Were wrong more than once Are too project-specific to generalize 归档
Completed/abandoned plans → rename [date]-[slug].plan.md:
plans/ ├── 部署-API.plan.md # active ├── patterns.md # learned patterns ├── 2026-03-01-设置up-acw.plan.md # 归档d └── 2026-03-02-osint-recon.plan.md # 归档d
Anti-patterns Over-decomposition: 15 tasks for 4 steps of real work Phantom dependencies: Marking sequential what's actually parallel Plan worship: Following a wrong plan because it exists Size blindness: "4/5 done!" when the remAIning task is (L) Skipping retros: No retro = no learning = same mistakes forever