w02-task-planning

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

任务规划规范

Task Planning Specification

适用于长程任务的事前规划,通过 Plan + Checkpoint 机制确保执行可控、进度可追踪。

Applicable to pre-planning of long-term tasks, ensuring controllable execution and trackable progress through the Plan + Checkpoint mechanism.

⚠️ 核心强制要求

⚠️ Core Mandatory Requirements

触发条件

Trigger Conditions

  • 用户明确要求"规划"、"计划"、"设计方案"等
  • Agent 评估任务需要 >= 3 个明确步骤
  • 涉及多文件改动或架构变更
  • The user explicitly requests "planning", "plan", "design scheme", etc.
  • The Agent assesses that the task requires >= 3 clear steps
  • Involves multi-file modifications or architecture changes

复杂任务必须创建计划书

Complex Tasks Must Create a Project Plan

复杂度特征处理方式
简单1-2 步,单文件直接执行
中等3-5 步,2-3 文件建议创建计划书
复杂>5 步,多文件/架构变更必须创建计划书
ComplexityCharacteristicsHandling Method
Simple1-2 steps, single fileExecute directly
Medium3-5 steps, 2-3 filesIt is recommended to create a project plan
Complex>5 steps, multi-file/architecture changesMust create a project plan

长程任务必须启用 GitHub Issue 存档(W00)

Long-term Tasks Must Enable GitHub Issue Archiving (W00)

  • 预计跨会话/跨天任务,或需要全局追踪进行中状态时,必须通过
    w00-workflow-checkpoint
    创建或绑定 Issue。
  • 计划书需记录:
    Issue #
    、当前
    status
    Next
    (下一步)。
  • 创建/绑定 Issue 由主流程完成;
    w00-workflow-checkpoint
    仅负责后续存档与读档。

  • For tasks expected to span sessions/days, or requiring global tracking of in-progress status, an Issue must be created or bound via
    w00-workflow-checkpoint
    .
  • The project plan must record:
    Issue #
    , current
    status
    ,
    Next
    (next step).
  • Issue creation/binding is completed by the main process;
    w00-workflow-checkpoint
    is only responsible for subsequent archiving and context loading.

AI Agent 行为要求

AI Agent Behavior Requirements

主动提议

Active Proposal

对于复杂任务,必须主动提议先创建计划书:
检测到任务涉及 [N] 个步骤,建议先创建计划书。是否执行 scripts/generate_task_plan.py?
For complex tasks, must actively propose creating a project plan first:
Detected that the task involves [N] steps, it is recommended to create a project plan first. Execute scripts/generate_task_plan.py?

状态更新

Status Update

每完成一个 CP 后,提醒更新状态表:
CP1 已完成,建议更新计划书状态表:CP1: ⬜ → ✅ 已完成 | 2026-01-22
并同步更新对应 Issue 的 checkpoint(含
下一步
)。
After completing each CP, remind to update the status table:
CP1 completed, it is recommended to update the project plan status table: CP1: ⬜ → ✅ Completed | 2026-01-22
And synchronously update the checkpoint of the corresponding Issue (including
next step
).

与 W00 协同(自动 + 手动)

Collaboration with W00 (Automatic + Manual)

  • 创建计划书并完成 Issue 绑定后可自动触发:
    w00-workflow-checkpoint checkpoint
  • 也可手动触发:
    执行 /w00-workflow-checkpoint
    进行 checkpoint 存档或读档上下文。
  • 若已存在 Issue:在计划书中补写
    Issue #
    并沿用状态流转。
  • 若未明确 Issue 且存在多个候选:先列候选 issue(3~5 条)并让用户选择,再执行存档/读档。
  • After creating the project plan and binding the Issue, it can automatically trigger:
    w00-workflow-checkpoint checkpoint
    .
  • It can also be triggered manually: Execute
    /w00-workflow-checkpoint
    for checkpoint archiving or context loading.
  • If an Issue already exists: Fill in
    Issue #
    in the project plan and follow the existing status flow.
  • If no clear Issue exists and there are multiple candidates: List 3~5 candidate issues first, let the user select, then perform archiving/loading.

必须等待用户决策

Must Wait for User Decision

  • 架构/技术选型
  • 性能与维护性取舍
  • 技术债务或临时方案

  • Architecture/technology selection
  • Trade-offs between performance and maintainability
  • Technical debt or temporary solutions

工具脚本

Tool Scripts

脚本
scripts/generate_task_plan.py
功能:规划 Checkpoint、生成符合规范的计划书

Script:
scripts/generate_task_plan.py
Function: Plan Checkpoints, generate standardized project plans

参考资料

Reference Materials

  • references/planning-workflow.md
    - 规划工作流详细说明(CP划分、状态标记、文件管理、文件清单格式)
  • references/requirements-decisions.md
    - 需求决策流程详细说明(需求理解、方案设计、决策确认)
  • ../w00-workflow-checkpoint/SKILL.md
    - Workflow GitHub Issues 基础存档能力(自动 + 手动)
  • refactor-and-decompose/SKILL.md
    - 规划时文件清单与模块边界约束
  • references/planning-workflow.md
    - Detailed explanation of planning workflow (CP division, status marking, file management, file list format)
  • references/requirements-decisions.md
    - Detailed explanation of requirement decision-making process (requirement understanding, scheme design, decision confirmation)
  • ../w00-workflow-checkpoint/SKILL.md
    - Basic archiving capability of Workflow GitHub Issues (Automatic + Manual)
  • refactor-and-decompose/SKILL.md
    - File list and module boundary constraints during planning