planning

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Planning

规划

Overview

概述

Write comprehensive implementation plans that break down complex features into bite-sized tasks (2-5 minutes each). Every task must include exact file paths, complete code snippets, and specific verification steps following TDD (Red-Green-Refactor) principles.
编写全面的实现计划,将复杂功能拆解为一个个耗时2-5分钟的小型任务。每个任务必须包含精确的文件路径、完整的代码片段,以及遵循TDD(红-绿-重构)原则的具体验证步骤。

When to Use

使用时机

  • Use after a design has been approved (e.g., via the brainstorming skill).
  • Use before starting implementation on any multi-step feature.
  • Use when you need to ensure systematic progress and early verification.
  • 在设计方案获批后使用(例如,通过头脑风暴skill确定的设计)。
  • 在开始任何多步骤功能的实现前使用。
  • 当你需要确保系统化推进并尽早验证时使用。

Task Structure

任务结构

Every task in the plan should follow this structure:
计划中的每个任务都应遵循以下结构:

Task N: [Component/Function Name]

任务N:[组件/函数名称]

Files:
  • Create/Modify:
    path/to/file
  • Test:
    path/to/test_file
Step 1: Write the failing test Provide the exact test code.
Step 2: Run test to verify it fails Provide the command and expected error.
Step 3: Write minimal implementation Provide the minimal code to pass the test.
Step 4: Run test to verify it passes Provide the command and expected success output.
Step 5: Commit Provide the git command.
文件:
  • 创建/修改:
    path/to/file
  • 测试:
    path/to/test_file
步骤1:编写失败的测试用例 提供精确的测试代码。
步骤2:运行测试以验证其失败 提供执行命令和预期的错误信息。
步骤3:编写最小化实现代码 编写能通过测试的最简代码。
步骤4:运行测试以验证其通过 提供执行命令和预期的成功输出。
步骤5:提交代码 提供Git命令。

Key Principles

核心原则

  • Bite-Sized Tasks: Each task should take 2-5 minutes.
  • Exact File Paths: Never use placeholders.
  • Complete Code: Include the actual code, not just descriptions.
  • TDD First: Always write and verify the test failure before implementing.
  • YAGNI & DRY: Keep it simple and don't repeat yourself.
  • 小型任务:每个任务耗时2-5分钟。
  • 精确文件路径:切勿使用占位符。
  • 完整代码:包含实际代码,而非仅描述。
  • TDD优先:在实现前始终先编写并验证测试用例的失败情况。
  • YAGNI & DRY:保持简洁,避免重复造轮子。

Execution Handoff

执行交接

After completing the plan, save it to
docs/plans/YYYY-MM-DD-<feature-name>.md
and ask the user if they are ready to begin execution of the first task.
完成计划后,将其保存至
docs/plans/YYYY-MM-DD-<feature-name>.md
,并询问用户是否准备好开始执行第一个任务。