executing-plans

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Executing Plans

执行计划

Overview

概述

This skill turns an approved plan document into working code through disciplined, batch-based execution. Each step is implemented with TDD, verified before proceeding, and reviewed at checkpoints. It provides the structural framework for moving from plan to production code with consistent quality gates.
Announce at start: "I'm using the executing-plans skill to implement the approved plan at [plan path]."
该skill通过规范的批次化执行流程,将获批的计划文档转化为可运行的代码。每个步骤都采用TDD实现,推进前先经过验证,并在检查点进行评审。它提供了从计划到生产代码的结构框架,配备一致的质量关卡。
启动时声明: "我正在使用executing-plans skill来执行[计划路径]下的获批计划。"

Trigger Conditions

触发条件

  • An approved plan document exists and is ready for implementation
  • /execute
    command invoked with a plan reference
  • Resuming a partially completed plan execution
  • Transition from planning skill after plan approval

  • 存在获批的计划文档,且已准备好进入实施阶段
  • 调用附带计划引用的
    /execute
    命令
  • 恢复执行部分完成的计划
  • 计划获批后从planning skill切换至执行阶段

Phase 1: Read the Plan

阶段1:解读计划

Goal: Thoroughly understand the plan before writing any code.
  1. Read the entire plan document from start to finish
  2. Identify all implementation steps and count them
  3. Map dependencies between steps (what must be done first)
  4. Note any ambiguities or open questions
  5. Confirm understanding with the user before proceeding
目标: 在编写任何代码前全面理解计划内容。
  1. 从头到尾通读完整的计划文档
  2. 识别所有实施步骤并统计数量
  3. 梳理步骤之间的依赖关系(哪些内容必须优先完成)
  4. 标注所有歧义点或待解决的问题
  5. 推进前先与用户确认对计划的理解是否正确

Plan Comprehension Checklist

计划理解检查清单

CheckQuestion
Goal clarityCan you explain the plan's goal in one sentence?
Step countHow many implementation steps are there?
DependenciesWhich steps depend on which?
AmbiguitiesAre there any unclear or underspecified steps?
VerificationDoes every step have a verification method?
STOP — Do NOT proceed to Phase 2 until:
  • You can explain the plan's goal in one sentence
  • You can list all implementation steps
  • Dependencies are mapped
  • Any ambiguities are noted and resolved with user
  • User has confirmed you may proceed

检查项问题
目标清晰度你能否用一句话说明计划的目标?
步骤数量共有多少个实施步骤?
依赖关系各步骤之间的依赖关系是什么?
歧义点是否存在表述不清或说明不足的步骤?
验证方式每个步骤是否都有对应的验证方法?
停止 — 满足以下条件前切勿进入阶段2:
  • 你可以用一句话说明计划的目标
  • 你可以列出所有实施步骤
  • 已梳理完成所有依赖关系
  • 所有歧义点已标注并和用户沟通解决
  • 用户已确认你可以继续推进

Phase 2: Create Task Batch

阶段2:创建任务批次

Goal: Break the plan into small, executable task batches.
目标: 将计划拆分为小型、可执行的任务批次。

Batch Size Decision Table

批次大小决策表

Task ComplexityBatch SizeExamples
Simple (config, boilerplate)Up to 5 tasksENV vars, imports, type definitions
Standard (features, logic)3 tasksEndpoints, services, components
Complex (integrations, security)2 tasksOAuth flows, payment processing
Critical (data migration, auth)1 taskDatabase migrations, credential handling
任务复杂度批次大小示例
简单(配置、样板代码)最多5个任务环境变量、导入声明、类型定义
标准(功能、逻辑)3个任务接口、服务、组件
复杂(集成、安全)2个任务OAuth流程、支付处理
关键(数据迁移、鉴权)1个任务数据库迁移、凭证处理

Task Requirements (STIC)

任务要求(STIC)

CriterionDescription
SpecificClear definition of what to implement
TestableCan be verified with automated tests
IndependentMinimal coupling to other tasks in the batch (where possible)
CompactCompletable in a focused session (2-5 minutes)
标准说明
Specific(明确)对要实现的内容有清晰的定义
Testable(可测试)可以通过自动化测试进行验证
Independent(独立)与批次内其他任务的耦合度尽可能低
Compact(紧凑)可在专注的会话内(2-5分钟)完成

Task Template

任务模板

Task: [concise description]
Plan Step: [reference to plan section]
Files to Create/Modify: [list of exact file paths]
Acceptance Criteria:
  - [specific, testable criterion 1]
  - [specific, testable criterion 2]
Dependencies: [other tasks that must be done first, or "none"]
Verification: [exact command to run]
STOP — Do NOT proceed to Phase 3 until:
  • Tasks created for the current batch
  • Each task has clear acceptance criteria
  • Dependencies are satisfied (previous tasks complete)
  • Tasks ordered by dependency (independent tasks first)

Task: [简洁描述]
Plan Step: [对应计划章节的引用]
Files to Create/Modify: [精确的文件路径列表]
Acceptance Criteria:
  - [明确、可测试的验收标准1]
  - [明确、可测试的验收标准2]
Dependencies: [必须优先完成的其他任务,或"none"]
Verification: [要运行的精确命令]
停止 — 满足以下条件前切勿进入阶段3:
  • 已为当前批次创建所有任务
  • 每个任务都有清晰的验收标准
  • 所有依赖已满足(前置任务已完成)
  • 任务已按依赖关系排序(独立任务优先)

Phase 3: Execute Tasks

阶段3:执行任务

Goal: Execute each task one at a time using TDD.
目标: 采用TDD逐个执行每个任务。

Per-Task Workflow

单任务工作流

1. ANNOUNCE which task you are starting
2. IMPLEMENT using test-driven-development skill:
   a. Write failing test (RED)
   b. Write minimal code to pass (GREEN)
   c. Refactor (REFACTOR)
   d. Repeat RED-GREEN-REFACTOR for each behavior
3. VERIFY using verification-before-completion skill:
   a. Run full test suite (not just new tests)
   b. Run lint, type-check, build as applicable
   c. Confirm all checks pass
4. MARK task as complete
5. PROCEED to next task
1. 声明你即将开始执行的任务
2. 使用test-driven-development skill进行实现:
   a. 编写失败的测试(RED)
   b. 编写最少的代码让测试通过(GREEN)
   c. 重构(REFACTOR)
   d. 为每个行为重复红-绿-重构流程
3. 使用verification-before-completion skill进行验证:
   a. 运行完整测试套件(不仅仅是新增测试)
   b. 根据场景运行lint、类型检查、构建命令
   c. 确认所有检查通过
4. 标记任务为完成
5. 推进到下一个任务

Execution Rules

执行规则

RuleRationale
One task at a timeDo not start task 2 until task 1 is verified
Follow TDD strictlyNo production code without a failing test
Do not deviate from the planIf plan needs changes, stop and discuss with user
Do not skip verificationEvery task must pass verification before marking complete
Report progressAnnounce start and completion of each task
规则逻辑
一次执行一个任务任务1验证通过前不要启动任务2
严格遵循TDD流程没有失败的测试就不要编写生产代码
不要偏离计划如果计划需要修改,停止并和用户讨论
不要跳过验证每个任务标记完成前必须通过验证
同步进度声明每个任务的开始和完成状态

Task Outcome Decision Table

任务结果决策表

OutcomeActionNext Step
Verification passesMark completeNext task
Test failure, obvious fixFix and re-verifySame task
Test failure, unclear causeInvoke
systematic-debugging
Same task after fix
Plan step is ambiguousStop and ask userWait for clarification
Plan step is not feasibleReport blockerWait for direction
Unexpected dependency foundReport and reorderAdjust batch
STOP — Do NOT proceed to next task until:
  • Current task's acceptance criteria are met
  • All tests pass (new and existing)
  • Verification-before-completion has been executed
  • Task marked as complete

结果动作下一步
验证通过标记为完成下一个任务
测试失败,有明确修复方案修复后重新验证同一个任务
测试失败,原因不明调用
systematic-debugging
修复后回到当前任务
计划步骤存在歧义停止并询问用户等待澄清
计划步骤不可行上报阻塞问题等待指示
发现未预期的依赖上报并重新排序调整批次
停止 — 满足以下条件前切勿进入下一个任务:
  • 当前任务的验收标准已全部满足
  • 所有测试通过(新增测试和存量测试)
  • 已执行verification-before-completion流程
  • 任务已标记为完成

Phase 4: Batch Checkpoint

阶段4:批次检查点

Goal: After completing all tasks in a batch, perform a full checkpoint review.
目标: 完成批次内所有任务后,执行全面的检查点评审。

Checkpoint Steps

检查点步骤

  1. Run full test suite — all tests, not just those from the current batch
  2. Run all verification commands — lint, type-check, build, format
  3. Review what was implemented — summarize completed tasks and outcomes
  4. Assess progress against the plan — how far through are we?
  5. Identify any issues or risks that came up during execution
  6. Report to user and ask for direction
  1. 运行完整测试套件 — 所有测试,不仅仅是当前批次的测试
  2. 运行所有验证命令 — lint、类型检查、构建、格式化
  3. 评审已实现内容 — 总结已完成的任务和结果
  4. 对照计划评估进度 — 当前完成了多少进度?
  5. 识别执行过程中出现的所有问题或风险
  6. 上报给用户并询问下一步指示

Checkpoint Report Template

检查点报告模板

BATCH CHECKPOINT
================
Batch: [N] of [estimated total]
Tasks Completed: [list]

Verification Results:
  Tests:      [X passed, Y failed, Z skipped]
  Build:      [pass/fail]
  Lint:       [pass/fail, N warnings]
  Type-check: [pass/fail]

Progress: [N of M plan steps complete] ([percentage]%)

Issues Encountered:
  - [issue 1 and how it was resolved]

Risks or Concerns:
  - [risk 1]

Next Batch Preview:
  - [task 1]
  - [task 2]
  - [task 3]

Awaiting direction: Continue with next batch / Adjust plan / Other?
STOP — Do NOT proceed to next batch until:
  • Full test suite passes
  • All verification commands pass
  • Checkpoint report presented to user
  • User has confirmed to continue

BATCH CHECKPOINT
================
Batch: [批次号] / [预估总批次]
Tasks Completed: [任务列表]

Verification Results:
  Tests:      [X passed, Y failed, Z skipped]
  Build:      [pass/fail]
  Lint:       [pass/fail, N warnings]
  Type-check: [pass/fail]

Progress: [已完成N个/M个计划步骤] ([百分比]%)

Issues Encountered:
  - [问题1及解决方式]

Risks or Concerns:
  - [风险1]

Next Batch Preview:
  - [任务1]
  - [任务2]
  - [任务3]

Awaiting direction: Continue with next batch / Adjust plan / Other?
停止 — 满足以下条件前切勿进入下一个批次:
  • 完整测试套件运行通过
  • 所有验证命令执行通过
  • 已向用户提交检查点报告
  • 用户已确认可以继续

Phase 5: Continue, Adjust, or Complete

阶段5:继续、调整或完成

Goal: Act on user direction after each checkpoint.
目标: 根据每个检查点后用户的指示执行对应动作。

Direction Decision Table

指示决策表

User DirectionActionNext Phase
"Continue"Create next batch of tasksPhase 2
"Adjust plan"Discuss changes, update plan documentPhase 2 (with updated plan)
"Stop here"Summarize progress, note remaining workCompletion
"Skip ahead to [step]"Verify dependencies are met, then jumpPhase 2 (at new step)
"Go back and redo [task]"Revert if needed, re-execute with correctionsPhase 3
Never proceed to the next batch without explicit user approval.

用户指示动作下一阶段
"继续"创建下一批任务阶段2
"调整计划"讨论变更,更新计划文档阶段2(使用更新后的计划)
"在此停止"总结进度,标注剩余工作完成
"跳转到[步骤]"验证依赖满足后跳转阶段2(从新步骤开始)
"返回重做[任务]"必要时回滚,修正后重新执行阶段3
没有用户明确批准的情况下,切勿推进到下一个批次。

Critical Blocker Handling

严重阻塞处理

When you encounter something that prevents task completion, do NOT work around it. Stop and escalate.
当遇到导致任务无法完成的问题时,切勿绕过问题。停止并上报。

Blocker Classification

阻塞分类

TypeExamplesAction
Ambiguous specPlan step could mean multiple thingsPresent interpretations, ask user
Missing dependencyRequired API or library unavailableReport with alternatives
ContradictionStep conflicts with another part of the planIdentify both sides, ask user
Security concernPlanned approach has vulnerabilityReport risk, propose safer alternative
FeasibilityStep cannot be implemented as describedExplain why, propose alternatives
类型示例动作
规范歧义计划步骤可能有多种含义给出你的理解,询问用户
依赖缺失所需的API或库不可用上报并提供替代方案
内容矛盾步骤与计划的其他部分冲突指出矛盾点,询问用户
安全隐患计划的实现方案存在漏洞上报风险,提出更安全的替代方案
可行性问题步骤无法按描述实现说明原因,提出替代方案

Blocker Report Format

阻塞报告格式

CRITICAL BLOCKER
================
Task: [which task is blocked]
Blocker: [clear description of the problem]
Impact: [what cannot proceed until this is resolved]
Options:
  A. [option with tradeoffs]
  B. [option with tradeoffs]
  C. [skip this step and continue]

Awaiting direction before proceeding.
Do NOT guess what the user intended. Do NOT implement a workaround without approval. Do NOT skip the blocked task silently. DO present options with clear tradeoffs. DO continue with non-blocked tasks if possible (but flag the skip).

CRITICAL BLOCKER
================
Task: [被阻塞的任务]
Blocker: [清晰的问题描述]
Impact: [问题解决前哪些内容无法推进]
Options:
  A. [方案及利弊]
  B. [方案及利弊]
  C. [跳过该步骤继续]

Awaiting direction before proceeding.
切勿猜测用户的意图。切勿未经批准实现绕过方案。切勿静默跳过被阻塞的任务。务必提供带有明确利弊的选项。可以在可能的情况下继续执行未被阻塞的任务(但要标注跳过的内容)。

Subagent Dispatch Option

子代理调度选项

For larger plans, individual tasks can be dispatched to subagents for parallel execution.
对于大型计划,可将单个任务派发给子代理并行执行。

When to Suggest Subagent Dispatch

建议使用子代理调度的场景

ConditionThreshold
Independent tasks in plan10+ tasks with few dependencies
Task specification qualityEach task has clear acceptance criteria
Speed requirementUser has indicated urgency
Task interdependencyLow coupling between tasks
When conditions are met, suggest switching to the
subagent-driven-development
skill for the remaining work.

条件阈值
计划中存在独立任务10个以上低依赖任务
任务说明质量高每个任务都有清晰的验收标准
速度要求用户明确表示需要加急
任务依赖度任务之间耦合度低
满足条件时,建议切换到
subagent-driven-development
skill完成剩余工作。

Anti-Patterns / Common Mistakes

反模式/常见错误

Anti-PatternWhy It FailsCorrect Approach
Implementing entire plan at onceNo checkpoints, no quality gatesBatch-based execution with checkpoints
Skipping TDD because "it's simple"Bugs accumulate, regressions appearEvery task uses TDD, no exceptions
Working around blockers silentlyUser unaware, wrong assumptions baked inStop and escalate blockers
Proceeding without approval after batchDirection may have changedAlways checkpoint and wait
Deviating from the planUnauthorized changes, scope creepDiscuss changes before implementing
Running only new testsRegressions go undetectedFull test suite at checkpoints
Marking tasks complete without verificationFalse progress, accumulated bugsVerification is mandatory
Batches larger than 5 tasksHard to review, too much risk per batchKeep batches small
Skipping checkpoint reportUser loses visibility into progressAlways present full checkpoint
Not committing at batch boundariesHuge diffs, hard to revertCommit after each batch

反模式失败原因正确做法
一次性实现整个计划没有检查点,没有质量关卡带检查点的批次化执行
因为"很简单"跳过TDD漏洞累积,出现回归问题每个任务都使用TDD,没有例外
静默绕过阻塞问题用户不知情,错误假设被固化到代码中停止并上报阻塞问题
批次完成后未经批准直接推进方向可能已经变更每次都走检查点流程并等待确认
偏离计划未授权变更,范围蔓延实现前先讨论变更
只运行新增测试回归问题无法被发现检查点运行完整测试套件
未验证就标记任务完成虚假进度,漏洞累积验证是强制要求
批次超过5个任务难以评审,每个批次风险过高保持小批次
跳过检查点报告用户无法感知进度每次都提交完整的检查点报告
批次边界不提交代码差异过大,难以回滚每个批次完成后提交代码

Anti-Rationalization Guards

反合理化防护

<HARD-GATE> Do NOT skip any verification step. Do NOT proceed past a checkpoint without user approval. Do NOT deviate from the approved plan without discussion. </HARD-GATE>
If you catch yourself thinking:
  • "I know what comes next, I'll skip the checkpoint..." — No. Report and wait.
  • "This verification is redundant..." — Run it anyway. Fresh evidence only.
  • "The plan is close enough, I'll adjust as I go..." — Discuss adjustments first.

<HARD-GATE> 切勿跳过任何验证步骤。没有用户批准的情况下切勿通过检查点。未经讨论切勿偏离获批计划。 </HARD-GATE>
如果你发现自己有以下想法:
  • "我知道接下来要做什么,跳过检查点吧..." — 不行,上报并等待。
  • "这个验证是多余的..." — 还是要运行,只采信最新的验证结果。
  • "计划差不多对,我边做边调吧..." — 先讨论调整方案。

Subagent Dispatch Opportunities

子代理调度场景

Task PatternDispatch ToWhen
Independent plan steps with no shared stateParallel subagents via
Agent
tool
When dependency analysis shows no blockers between steps
Code review of completed step
code-reviewer
agent
After each major plan step completion
Test execution for completed featuresBackground
Bash
task
When tests can run independently of ongoing work
Follow the
dispatching-parallel-agents
skill protocol when dispatching.

任务模式调度对象时机
无共享状态的独立计划步骤通过
Agent
工具调度并行子代理
依赖分析显示步骤之间无阻塞时
已完成步骤的代码评审
code-reviewer
agent
每个主要计划步骤完成后
已完成功能的测试执行后台
Bash
任务
测试可以独立于正在进行的工作运行时
调度时遵循
dispatching-parallel-agents
skill协议。

Integration Points

集成点

SkillRelationshipWhen
planning
Upstream — provides approved plan documentPlan is the input to this skill
test-driven-development
Per-task — TDD cycle for every code taskPhase 3 execution
verification-before-completion
Per-task — verification gateBefore marking any task complete
systematic-debugging
On failure — investigate unexpected failuresWhen task encounters errors
code-review
At checkpoints — review code qualityPhase 4 batch review
subagent-driven-development
Alternative — parallel execution pathFor large independent task sets
resilient-execution
On failure — retry with alternativesWhen task approaches fail
task-management
Complementary — provides task trackingCan be used together

Skill关系时机
planning
上游 — 提供获批的计划文档计划是本skill的输入
test-driven-development
单任务 — 每个代码任务的TDD循环阶段3执行
verification-before-completion
单任务 — 验证关卡标记任何任务完成前
systematic-debugging
出错时 — 排查意外故障任务遇到错误时
code-review
检查点 — 评审代码质量阶段4批次评审
subagent-driven-development
替代方案 — 并行执行路径适用于大型独立任务集
resilient-execution
出错时 — 用替代方案重试任务执行失败时
task-management
补充 — 提供任务跟踪能力可搭配使用

Concrete Examples

具体示例

Example: Batch Creation from Plan

示例:从计划创建批次

Plan: "Add user authentication with JWT"
Batch 1 (3 tasks):
  Task 1: Write failing test for JWT token generation
    Files: tests/auth/jwt.test.ts
    Verification: npm test -- --grep "JWT generation" → FAIL (expected)

  Task 2: Implement JWT token generation
    Files: src/auth/jwt.ts
    Verification: npm test -- --grep "JWT generation" → PASS

  Task 3: Write failing test for auth middleware
    Files: tests/middleware/auth.test.ts
    Verification: npm test -- --grep "auth middleware" → FAIL (expected)

[CHECKPOINT after batch 1]

Batch 2 (3 tasks):
  Task 4: Implement auth middleware
  Task 5: Write failing test for login endpoint
  Task 6: Implement login endpoint

[CHECKPOINT after batch 2]

计划:"添加基于JWT的用户认证"
Batch 1 (3 tasks):
  Task 1: Write failing test for JWT token generation
    Files: tests/auth/jwt.test.ts
    Verification: npm test -- --grep "JWT generation" → FAIL (expected)

  Task 2: Implement JWT token generation
    Files: src/auth/jwt.ts
    Verification: npm test -- --grep "JWT generation" → PASS

  Task 3: Write failing test for auth middleware
    Files: tests/middleware/auth.test.ts
    Verification: npm test -- --grep "auth middleware" → FAIL (expected)

[CHECKPOINT after batch 1]

Batch 2 (3 tasks):
  Task 4: Implement auth middleware
  Task 5: Write failing test for login endpoint
  Task 6: Implement login endpoint

[CHECKPOINT after batch 2]

Completion Criteria

完成标准

The plan execution is complete when:
  1. All plan steps have been implemented as tasks
  2. All tasks have passed verification
  3. Full test suite passes
  4. Final checkpoint report presented to user
  5. User confirms the plan is complete

满足以下条件时计划执行完成:
  1. 所有计划步骤都已作为任务实现
  2. 所有任务都已通过验证
  3. 完整测试套件运行通过
  4. 已向用户提交最终检查点报告
  5. 用户确认计划已完成

Skill Type

Skill类型

RIGID — Follow this process exactly. Batches, checkpoints, and verification gates are non-negotiable. No task is complete without verification. No batch proceeds without user approval.
RIGID(刚性) — 严格遵循本流程。批次、检查点和验证关卡是不可协商的要求。未验证的任务不算完成。没有用户批准的批次不能推进。