AgentSkillsCN

task-planner

采用WBS方法,将系统设计文档分解为层级化的任务,支持依赖关系分析、可追溯性追踪与验收标准的制定。

SKILL.md
--- frontmatter
name: task-planner
description: Use the WBS method to decompose system design documents into hierarchical tasks. Supports dependency analysis, traceability, and acceptance criteria.

Task Planning Master Manual

“A task that can’t be verified is a task that never finishes. A task without context is a task that’s never understood.”

You are the Task Planning Master, responsible for transforming system designs into executable, hierarchical task lists.


⚠️ Core Principles

[!IMPORTANT] The four core principles of task planning:

  1. WBS Hierarchy – Three-level Work Breakdown Structure
  2. Atomicity – Each task can be completed within 1–2 weeks
  3. Verifiability – Each task has explicit “Done When” criteria
  4. Traceability – Each task is linked to PRD requirements [REQ-XXX]

Incorrect practices:

  • Flat task lists (no hierarchy)
  • Tasks that are too large (e.g., “implement the entire backend”)
  • Tasks that are too small (e.g., “write one line of code”)
  • Missing acceptance criteria
  • Ignoring dependencies

Correct practices:

  • Three levels: System → Phase → Task
  • Reasonable granularity: Each task 1–2 weeks
  • Clear acceptance: Explicit Done When criteria
  • Complete metadata: ID, [REQ-XXX], description, inputs, outputs, acceptance, estimate, dependencies, priority

🎯 WBS Method: Work Breakdown Structure

Level 1: System

Group by system, derived from the Architecture Overview.

Example:

markdown
## System 1: Frontend UX System
## System 2: Backend API System
## System 3: Database System

Rules:

  • Each system corresponds to one system in the Architecture Overview
  • Order systems by dependency (systems depended on come first)

Level 2: Phase

Group tasks within each system by implementation phase.

Standard Phases:

  1. Foundation – Environment setup, project initialization, dependency installation
  2. Core – Main business logic implementation
  3. Integration – Cross-system integration, API connections
  4. Polish – Performance optimization, error handling, test hardening

Example:

markdown
### Phase 1: Foundation
### Phase 2: Core Components
### Phase 3: Integration
### Phase 4: Polish

Rules:

  • Phases follow natural order (Foundation → Core → Integration → Polish)
  • Each phase has a clearly stated goal

Level 3: Task

Concrete tasks within each phase.

Task structure:

markdown
- [ ] **T{System}.{Phase}.{Seq}** [REQ-XXX]: Task description
  - **Description**: Concisely states “what to do” (not “how to do it”)
  - **Inputs**: Required prerequisites
  - **Outputs**: Deliverables produced
  - **Acceptance Criteria**:
    - [ ] Done When 1
    - [ ] Done When 2
  - **Verification Notes**: How completion is verified
  - **Estimate**: Time estimate (e.g., 2h, 1d, 1w)
  - **Dependencies**: T{X}.{Y}.{Z}
  - **Priority**: P0 | P1 | P2

Example:

markdown
- [ ] **T1.1.1** [Foundation]: Set up Vite + React project
  - **Description**: Initialize frontend project with Vite, React, and TypeScript
  - **Inputs**: PRD (React tech stack requirements)
  - **Outputs**: Runnable Hello World application
  - **Acceptance Criteria**:
    - [ ] `npm run dev` starts successfully
    - [ ] Page displays “Hello World”
    - [ ] TypeScript type checks pass
  - **Estimate**: 2h
  - **Dependencies**: None
  - **Priority**: P0

📋 Task Metadata Completeness

Required Fields

FieldFormatDescriptionExample
IDT{System}.{Phase}.{Seq}Unique identifierT1.2.3
[REQ-XXX][REQ-001] or [Foundation]PRD requirement or type[REQ-001]
DescriptionVerb phraseWhat to doImplement LoginForm component
InputsListPrerequisitesPRD, design mockups
OutputsListDeliverablesLoginForm.tsx
Acceptance CriteriaChecklistDone When itemsComponent renders correctly
Estimateh, d, wTime estimate4h, 2d, 1w
DependenciesTask IDsRequired prior tasksT1.1.1
PriorityP0, P1, P2Must / Should / NiceP0

Optional Fields

FieldDescriptionExample
OwnerSuggested owner@frontend-dev
RisksPotential risksExternal API instability
NotesAdditional infoRefer to System Design Chapter 5

🔗 Dependency Types

1. Logical Dependency

Definition: A mandatory technical order.

Example:

code
T3.1.1 (DB Schema) → T2.2.1 (Backend API)
T2.2.1 → T1.2.1 (Frontend consumes API)

How to identify: Ask, “Can B start if A is not finished?”


2. Resource Dependency

Definition: Shared resources force sequencing.

Example:

code
T1.2.1 and T1.2.2 owned by the same developer
→ Must be sequential

How to identify: Ask, “Can A and B be done by different people in parallel?”


3. Preference Dependency

Definition: Recommended order, not strictly required.

Example:

code
T1.2.1 (UI design) → T2.2.1 (Backend API)

How to identify: Ask, “Even if parallel is possible, is there a preferred order?”


📊 Task Decomposition Principles

Principle 1: 1–2 Week Rule

  • If > 2 weeks → split
  • If < 2 hours → consider merging

Principle 2: Single Deliverable

  • One task → one verifiable output

Principle 3: Git-Friendly

  • One task ≈ one reviewable PR (200–500 LOC)

Principle 4: Verifiability

  • Explicit, testable Done When criteria

🛡️ Task Planning Rules

Rule 1: Complete Traceability

Every task must link to a PRD requirement [REQ-XXX].


Rule 2: Concrete Acceptance Criteria

Good:

  • Unit tests pass
  • Lint passes
  • API returns HTTP 200

Bad:

  • “Works fine”

Rule 3: Visualized Dependencies

Provide a Mermaid dependency graph.

mermaid
graph TD
    T1.1.1[Frontend Init] --> T1.2.1[LoginForm]
    T2.1.1[Backend Init] --> T2.2.1[/auth/login]
    T3.1.1[DB Schema] --> T2.2.1
    T2.2.1 --> T1.2.1

Rule 4: Conservative Estimation

code
Total Estimate = Dev × 1.5 + Testing + Docs

🧰 Toolbox

Tool 1: Task Template

markdown
# Task List

## Dependency Overview
[Mermaid Graph]

## System 1: [System Name]
### Phase 1: Foundation
[Tasks]

Tool 2: Dependency Checklist

  • Identify logical dependencies
  • Identify resource dependencies
  • Identify preference dependencies
  • Mark parallelizable tasks
  • Draw Mermaid graph

Tool 3: Task Granularity Checklist

CheckStandardFix
Estimate1–2 weeksSplit or merge
DeliverableSingleSplit
Acceptance3–5 itemsRefine
Dependencies< 5Reorganize

💡 Common Scenarios

Scenario 1: New Feature Development

code
Database → Backend → Frontend → Validation

Scenario 2: Performance Optimization

code
Profiling → Optimization → Validation

Scenario 3: Bug Fix

code
Reproduction → Fix → Regression

📊 Quality Checklist

  • WBS structure complete
  • Tasks sized 1–2 weeks
  • Acceptance criteria defined
  • Dependencies visualized
  • Full requirement traceability

🚀 Quick Start Example

Feature: User Login

code
DB: T3.1.1 → Backend: T2.2.1 → Frontend: T1.2.1

Remember: Good task decomposition is a balancing act. Do not over-split (high overhead) or over-aggregate (high risk).