executing-plans

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

执行计划

Execution Plan

概述

Overview

加载计划,批判性审查,执行所有任务,完成后报告。
开始时宣布: "我正在使用 executing-plans 技能来实现此计划。"
注意: 告诉你的人类伙伴,Superpowers 在有子代理支持时效果好得多。如果在支持子代理的平台上运行(如 Claude Code 或 Codex),其工作质量会显著提高。如果子代理可用,请使用 superpowers:subagent-driven-development 而非此技能。
Load the plan, conduct a critical review, execute all tasks, and report upon completion.
Announce at start: "I am using the executing-plans skill to implement this plan."
Note: Tell your human partner that Superpowers work much better with sub-agent support. If running on a platform that supports sub-agents (such as Claude Code or Codex), the quality of work will improve significantly. If sub-agents are available, use superpowers:subagent-driven-development instead of this skill.

流程

Process

步骤 1:加载并审查计划

Step 1: Load and Review the Plan

  1. 读取计划文件
  2. 批判性审查——识别计划中的任何问题或疑虑
  3. 如果有疑虑:在开始之前向你的人类伙伴提出
  4. 如果没有疑虑:创建 TodoWrite 并继续
审查时重点检查:
  • 步骤之间是否有依赖遗漏?(A 依赖 B,但 B 排在 A 之后)
  • 验证条件是否明确?("确认可用"不算,"运行
    npm test
    全部通过"才算)
  • 是否有隐含的环境假设?(Node 版本、数据库连接、API Key)
审查示例:
计划文件:docs/plan.md
任务清单:5 个任务

审查发现:
- 任务 3(添加数据库迁移)应在任务 2(编写数据模型)之后,顺序正确 ✓
- 任务 4 的验证条件写的是"确认功能正常"→ 需澄清:具体跑什么测试?
- 计划未提及 Python 版本要求 → 需确认

向伙伴提出:
"计划整体可执行。有两个问题:(1) 任务 4 的验证条件不够具体,建议改为
'运行 pytest tests/test_api.py 全部通过';(2) 需要确认 Python 版本要求。"
  1. Read the plan file
  2. Critical review – identify any issues or concerns in the plan
  3. If there are concerns: Raise them to your human partner before starting
  4. If no concerns: Create a TodoWrite and proceed
Key review checks:
  • Are there missing dependencies between steps? (A depends on B, but B is listed after A)
  • Are validation conditions clear? ("Confirm availability" is not acceptable; "Run
    npm test
    with all passing" is)
  • Are there implicit environment assumptions? (Node version, database connection, API Key)
Review example:
Plan file: docs/plan.md
Task list: 5 tasks

Review findings:
- Task 3 (Add database migration) should come after Task 2 (Write data model), order is correct ✓
- The validation condition for Task 4 says "Confirm functionality works" → Needs clarification: What specific tests should be run?
- The plan does not mention Python version requirements → Needs confirmation

To partner:
"The plan is generally executable. There are two issues: (1) The validation condition for Task 4 is not specific enough, it is recommended to change it to 'Run pytest tests/test_api.py with all passing'; (2) Need to confirm the Python version requirement."

步骤 2:执行任务

Step 2: Execute Tasks

对于每个任务:
  1. 标记为进行中 — 更新 TodoWrite
  2. 理解目标 — 重读任务描述,明确完成标准
  3. 执行实现 — 严格按照计划步骤执行(计划已有小步骤)
  4. 运行验证 — 按要求运行测试或检查
  5. 提交变更 — 每完成一个任务提交一次,commit message 引用任务编号
  6. 标记为已完成 — 更新 TodoWrite
每个任务的节奏:
--- 任务 2/5:添加用户验证 ---
[标记进行中]

目标:为 /api/users 添加输入验证
完成标准:所有验证测试通过,无效输入返回 400

[实现]
- 添加 validateUser() 中间件
- 编写 3 个验证规则(email 格式、密码强度、用户名长度)

[验证]
$ npm test -- --grep "validation"
  ✓ 拒绝无效 email (12ms)
  ✓ 拒绝弱密码 (8ms)
  ✓ 拒绝过长用户名 (5ms)
  3 passing

[提交]
$ git add src/middleware/validate.js tests/validation.test.js
$ git commit -m "feat: 添加用户输入验证(任务 2/5)"

[标记完成]
--- 任务 2/5 完成 ---
批量审查检查点:
  • 每完成 3 个任务后,暂停回顾:整体方向还对吗?有没有偏离计划?
  • 如果发现前面的实现有问题,先修复再继续,不要带着问题往下走
For each task:
  1. Mark as in progress – Update TodoWrite
  2. Understand the goal – Re-read the task description to clarify completion criteria
  3. Execute implementation – Follow the plan steps strictly (the plan includes detailed sub-steps)
  4. Run validation – Execute required tests or checks as specified
  5. Submit changes – Commit once per task completed, reference the task number in the commit message
  6. Mark as completed – Update TodoWrite
Rhythm for each task:
--- Task 2/5: Add User Validation ---
[Mark as in progress]

Goal: Add input validation for /api/users
Completion criteria: All validation tests pass, invalid inputs return 400

[Implementation]
- Add validateUser() middleware
- Write 3 validation rules (email format, password strength, username length)

[Validation]
$ npm test -- --grep "validation"
  ✓ Reject invalid email (12ms)
  ✓ Reject weak password (8ms)
  ✓ Reject overly long username (5ms)
  3 passing

[Submission]
$ git add src/middleware/validate.js tests/validation.test.js
$ git commit -m "feat: Add user input validation (Task 2/5)"

[Mark as completed]
--- Task 2/5 Completed ---
Batch review checkpoints:
  • After completing every 3 tasks, pause to review: Is the overall direction still correct? Have we deviated from the plan?
  • If issues are found in previous implementations, fix them before proceeding; do not continue with unresolved problems

步骤 3:处理常见异常

Step 3: Handle Common Exceptions

测试失败:
  1. 读错误信息,定位失败原因
  2. 区分:是实现 bug?还是测试本身有问题?还是计划描述有误?
  3. 实现 bug → 修复并重跑
  4. 测试有问题 → 修复测试,向伙伴说明
  5. 计划有误 → 停下来,向伙伴报告并建议修正
依赖缺失:
任务 3 需要 Redis 连接,但计划中没有提及 Redis 配置。
→ 停止执行
→ 向伙伴报告:"任务 3 需要 Redis,计划中未包含配置步骤。
   建议:在任务 3 前插入 '配置 Redis 连接' 步骤。"
指令不清:
  • 不要猜测意图,不要"合理推断"
  • 列出你的理解和困惑,让伙伴澄清
  • 等待回复后再继续
Test failures:
  1. Read error messages to locate the cause of failure
  2. Distinguish: Is it an implementation bug? A problem with the test itself? Or an error in the plan description?
  3. Implementation bug → Fix and re-run
  4. Test issue → Fix the test and inform the partner
  5. Plan error → Stop execution, report to the partner and suggest corrections
Missing dependencies:
Task 3 requires a Redis connection, but Redis configuration is not mentioned in the plan.
→ Stop execution
→ Report to partner: "Task 3 requires Redis, but the plan does not include configuration steps.
   Recommendation: Insert 'Configure Redis connection' step before Task 3."
Unclear instructions:
  • Do not guess intentions, do not "reasonably infer"
  • List your understanding and confusion, ask the partner to clarify
  • Wait for a response before proceeding

步骤 4:完成开发

Step 4: Complete Development

所有任务完成并验证后:
  • 宣布:"我正在使用 finishing-a-development-branch 技能来完成此工作。"
  • 必需子技能: 使用 superpowers:finishing-a-development-branch
  • 按照该技能的指引验证测试、展示选项、执行选择
完成报告模板:
undefined
After all tasks are completed and validated:
  • Announce: "I am using the finishing-a-development-branch skill to complete this work."
  • Required sub-skill: Use superpowers:finishing-a-development-branch
  • Follow the guidelines of that skill to validate tests, present options, and execute selections
Completion report template:
undefined

执行报告

Execution Report

计划: docs/plan.md 分支: feature/user-validation 任务: 5/5 已完成
Plan: docs/plan.md Branch: feature/user-validation Tasks: 5/5 completed

完成的任务

Completed Tasks

  1. ✅ 初始化项目结构
  2. ✅ 添加用户验证
  3. ✅ 添加数据库迁移
  4. ✅ 实现 API 端点
  5. ✅ 添加集成测试
  1. ✅ Initialize project structure
  2. ✅ Add user validation
  3. ✅ Add database migration
  4. ✅ Implement API endpoints
  5. ✅ Add integration tests

验证结果

Validation Results

  • 单元测试:23/23 通过
  • 集成测试:8/8 通过
  • lint 检查:0 个警告
  • Unit tests: 23/23 passed
  • Integration tests: 8/8 passed
  • Lint check: 0 warnings

偏离计划的地方

Deviations from Plan

  • 任务 3:Redis 配置从 env 改为 config.yaml(经伙伴同意)
  • Task 3: Redis configuration changed from env to config.yaml (approved by partner)

下一步

Next Steps

按 finishing-a-development-branch 技能处理合并/PR
undefined
Process merge/PR according to the finishing-a-development-branch skill
undefined

何时停下来求助

When to Stop and Ask for Help

在以下情况立即停止执行:
  • 遇到阻塞(缺少依赖、测试失败、指令不清)
  • 计划有严重缺陷导致无法开始
  • 你不理解某条指令
  • 验证反复失败(同一测试失败 2 次以上)
不确定时就问,不要猜测。
Stop execution immediately in the following cases:
  • Encountering blocks (missing dependencies, test failures, unclear instructions)
  • The plan has serious flaws that prevent starting
  • You do not understand an instruction
  • Validation fails repeatedly (the same test fails more than 2 times)
Ask when in doubt, do not guess.

何时回到之前的步骤

When to Return to Previous Steps

回到审查(步骤 1)当:
  • 伙伴根据你的反馈更新了计划
  • 根本性的方案需要重新考虑
不要硬闯阻塞 — 停下来问。
Return to Review (Step 1) when:
  • The partner updates the plan based on your feedback
  • The fundamental solution needs to be reconsidered
Do not force through blocks – Stop and ask.

注意事项

Notes

  • 先批判性审查计划
  • 严格按照计划步骤执行
  • 不要跳过验证
  • 每个任务单独提交,commit message 引用任务编号
  • 计划要求时引用相应技能
  • 遇到阻塞时停下来,不要猜测
  • 未经用户明确同意,绝不在 main/master 分支上开始实现
  • Conduct a critical review of the plan first
  • Follow the plan steps strictly
  • Do not skip validation
  • Commit separately for each task, reference the task number in the commit message
  • Reference corresponding skills when required by the plan
  • Stop and ask when encountering blocks, do not guess
  • Never start implementation on the main/master branch without explicit user consent

集成

Integration

必需的工作流技能:
  • superpowers:using-git-worktrees - 必需:开始前建立隔离的工作空间
  • superpowers:writing-plans - 创建此技能要执行的计划
  • superpowers:finishing-a-development-branch - 所有任务完成后收尾开发
Required workflow skills:
  • superpowers:using-git-worktrees - Required: Set up an isolated workspace before starting
  • superpowers:writing-plans - Create the plan to be executed by this skill
  • superpowers:finishing-a-development-branch - Wrap up development after all tasks are completed