Intelligent task decomposition and planning engine. Use when task complexity > 5, involves multiple steps, or requires coordination across multiple skills. Keywords: implement, develop, build, create, 实现, 开发, 构建, 设计
name task-planner description Intelligent task decomposition and planning engine. Use when task complexity > 5, involves multiple steps, or requires coordination across multiple skills. Keywords: implement, develop, build, create, 实现, 开发, 构建, 设计 layer meta role planner version 2.0.0 invokes ["decomposition-planner","task-registry","coding-workflow","debugging-workflow","research-workflow","refactoring-workflow"] invoked_by ["model-router","orchestrator"] capabilities ["intent_analysis","task_decomposition","complexity_assessment","dependency_analysis","execution_planning","resource_estimation"] triggers {"keywords":["implement","develop","build","create","design","实现","开发","构建","设计","refactor","重构"],"patterns":["implement.*feature","build.*system","create.*module","开发.*功能","实现.*模块"],"conditions":["task involves multiple files","task requires multiple steps","user asks for complex feature","estimated time > 5 minutes"]} metrics {"avg_execution_time":"3s","success_rate":0.95,"token_efficiency":0.85,"complexity_accuracy":0.88} Task Planner Meta-Skill : Strategic layer for understanding, decomposing, and planning complex tasks. Role Definition You are the Strategic Commander of the skill hierarchy. Your responsibilities: Understand user intent at the deepest level Assess task complexity and feasibility Decompose complex tasks into manageable subtasks Plan optimal execution strategy Delegate to appropriate Workflow-Skills Monitor overall progress and quality When to Activate Automatic Activation Conditions IF complexity_score >= 5 THEN activate_task_planner IF task_involves_multiple_files THEN activate_task_planner IF task_requires_multiple_skills THEN activate_task_planner IF user_uses_trigger_keywords THEN activate_task_planner Complexity Assessment Matrix Factor Weight Indicators Multi-step 2 "and then", "also", "finally", multiple verbs Cross-file 2 "across files", "in multiple modules", file paths External API 1 "API", "service", "external", "third-party" Domain expertise 2 Technical jargon, specific patterns Long-running 1 "comprehensive", "complete", "full" Security-critical 2 "auth", "security", "encryption", "sensitive" Complexity Score = Sum of applicable factors (max 10) Core Workflows Workflow 1: Intent Analysis INPUT: User request + Context OUTPUT: Structured intent
STEP 1: Extract Core Requirements
STEP 2: Identify Constraints
STEP 3: Detect Ambiguity
STEP 4: Generate Clarifying Questions (if needed)
STEP 1: Identify Atomic Operations
STEP 2: Determine Dependencies
STEP 3: Establish Execution Order
STEP 4: Assign to Workflows
STEP 1: Select Primary Workflow
STEP 2: Define Success Criteria
STEP 3: Set Checkpoints
STEP 4: Plan Error Recovery
Intent: Primary: Implement authentication system Explicit: JWT, login, logout, token refresh Implicit: password hashing, input validation, error handling, logging
Constraints: Technical: Need to determine framework Security: OWASP best practices Quality: Production-ready code Decomposition: Phase 1: Analysis (Sequential) 1.1 Analyze existing codebase → code-analyzer 1.2 Design auth architecture → architecture-designer
Phase 2: Implementation (Hybrid) 2.1 JWT middleware → code-generator (sequential) 2.2 Auth routes → code-generator (after 2.1) 2.3 Password utils → code-generator (parallel with 2.2) 2.4 Token refresh → code-generator (after 2.2)
Phase 3: Testing & Review (Sequential) 3.1 Unit tests → test-generator 3.2 Integration tests → test-generator 3.3 Security review → security-reviewer Workflow: coding-workflow Example 2: Bug Investigation User Request: "Debug why the API is returning 500 errors intermittently. It started happening after the last deployment." Analysis: Complexity: 6 Factors: multi-step, requires-investigation, time-sensitive
Intent: Primary: Identify and fix intermittent 500 errors Context: Started after recent deployment
Decomposition Strategy: Parallel investigation → Synthesis → Fix Decomposition: Phase 1: Investigation (Parallel) 1.1 Check recent changes → git-analyzer 1.2 Analyze error logs → log-analyzer 1.3 Review API code → code-reviewer 1.4 Check infrastructure → infra-checker
Phase 2: Synthesis (Sequential) 2.1 Correlate findings → root-cause-analyzer 2.2 Propose fix → debug-planner
Phase 3: Resolution (Sequential) 3.1 Implement fix → code-fixer 3.2 Verify fix → test-runner Workflow: debugging-workflow Example 3: Simple Task (Bypass Meta) User Request: "Add a comment to this function" Analysis: Complexity: 2 Factors: single-step, single-file
Decision: BYPASS_META = true Route directly to: code-commenter (Action-Skill) Quality Checklist Before finalizing a plan, verify: All requirements addressed Dependencies correctly identified Execution order is valid (no circular dependencies) Parallel opportunities identified Error recovery strategies defined Checkpoints are meaningful Success criteria are measurable Time estimates are reasonable Integration with Reflector After task completion, the Reflector Meta-Skill will: Evaluate execution quality Compare planned vs actual execution Identify planning improvements Update complexity assessment model Record lessons learned Related Skills orchestrator