spec-implementation-execute

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

spec-implementation-execute(I2:执行 / plan.md SSOT)

spec-implementation-execute (I2: Execution / plan.md SSOT)

概览

Overview

I2 的目标是把
{FEATURE_DIR}/implementation/plan.md
中的任务按批次执行,并把执行状态与最小审计信息只回写到
plan.md
(作为唯一执行清单与状态 SSOT)。
本技能是
skills/executing-plans/SKILL.md
的 Spec 实现阶段版:重度复用其“五步执行 + 批次检查点 + 遇阻塞即停”骨架,但将“计划文件”的语义替换为实现阶段 SOP(见
design/aisdlc_spec_implementation.md
)的硬约束:
  • plan.md
    唯一执行清单与状态来源(checkbox + 审计信息 + 验证结果摘要)
  • 默认每批执行前 3 个未完成任务
  • 任何
    NEEDS CLARIFICATION
    / 关键计划缺陷 / 阻塞:立即停止并汇报(禁止脑补推进)
  • 若执行中产生决策/契约变更:仅在
    {FEATURE_DIR}
    内草拟
    ,并在
    plan.md
    追加 Merge-back 待办清单(本阶段禁止直接更新
    project/*
开始时宣布:「我正在使用 spec-implementation-execute 技能按 plan.md 分批执行并回写 SSOT。」
The goal of I2 is to execute the tasks in
{FEATURE_DIR}/implementation/plan.md
in batches, and write back only the execution status and minimal audit information to
plan.md
(as the sole SSOT for execution checklist and status).
This skill is the Spec implementation phase version of
skills/executing-plans/SKILL.md
: it heavily reuses its "five-step execution + batch checkpoint + stop on block" framework, but replaces the semantics of "plan file" with the hard constraints of the implementation phase SOP (see
design/aisdlc_spec_implementation.md
):
  • plan.md
    is the only source of execution checklist and status (checkbox + audit information + validation result summary)
  • By default, execute the first 3 uncompleted tasks per batch
  • Any
    NEEDS CLARIFICATION
    / critical plan defect / block: stop and report immediately (no speculative advancement allowed)
  • If decisions/contract changes arise during execution: draft only within
    {FEATURE_DIR}
    , and append a Merge-back Todo List to
    plan.md
    (direct updates to
    project/*
    are prohibited in this phase)
Announce at start: "I am using the spec-implementation-execute skill to execute in batches according to plan.md and write back to SSOT."

何时使用 / 不使用

When to Use / Not to Use

  • 使用时机
    • 已有
      {FEATURE_DIR}/implementation/plan.md
      (I1 已完成),现在进入 I2 按任务实现。
    • 你需要在执行中严格做“批次检查点汇报”,并把状态/审计回写到
      plan.md
  • 不要用在
    • spec-context
      失败、拿不到
      FEATURE_DIR
      (此时必须停止)。
    • plan.md
      不存在,或缺少可执行的任务清单(此时回到 I1:
      spec-implementation-plan
      )。
    • plan.md
      NEEDS CLARIFICATION
      仍未消除、或存在关键缺陷导致无法开始(此时必须先停止并提出澄清/修计划)。
  • Use Scenarios
    • {FEATURE_DIR}/implementation/plan.md
      already exists (I1 is completed), and now enter I2 to implement tasks according to the plan.
    • You need to strictly perform "batch checkpoint reporting" during execution, and write back status/audit information to
      plan.md
      .
  • Do Not Use
    • spec-context
      fails and
      FEATURE_DIR
      cannot be obtained (stop immediately in this case).
    • plan.md
      does not exist, or lacks an executable task list (return to I1:
      spec-implementation-plan
      in this case).
    • Unresolved
      NEEDS CLARIFICATION
      exists in
      plan.md
      , which will block execution (stop and propose clarification/plan revision first in this case).

门禁 / 停止(严格执行)

Gatekeeping / Stopping (Strictly Enforced)

REQUIRED SUB-SKILL:先执行
spec-context
并在对话中回显
FEATURE_DIR=...
powershell
$repoRoot = (git rev-parse --show-toplevel)
. (Join-Path $repoRoot "skills\spec-context\spec-common.ps1")
$context = Get-SpecContext
$FEATURE_DIR = $context.FEATURE_DIR
Write-Host "FEATURE_DIR=$FEATURE_DIR"
立刻停止(满足其一即可):
  • 未得到
    FEATURE_DIR
  • 当前分支是
    main/master
    (或你未得到用户明确同意在主分支实施)
  • {FEATURE_DIR}/implementation/plan.md
    不存在或不可读
  • plan.md
    中存在未消除的
    NEEDS CLARIFICATION
    ,且其会阻断继续执行
  • 计划存在关键缺陷:缺失可执行命令/缺失最小验证/范围不清/依赖不明,导致无法安全开始
  • 执行中遇到阻塞:缺依赖/权限/环境/数据、测试反复失败、某条指令不理解
寻求澄清,而非猜测。
REQUIRED SUB-SKILL: Execute
spec-context
first and echo
FEATURE_DIR=...
in the conversation.
powershell
$repoRoot = (git rev-parse --show-toplevel)
. (Join-Path $repoRoot "skills\spec-context\spec-common.ps1")
$context = Get-SpecContext
$FEATURE_DIR = $context.FEATURE_DIR
Write-Host "FEATURE_DIR=$FEATURE_DIR"
Stop immediately (if any of the following is met):
  • FEATURE_DIR
    is not obtained
  • Current branch is
    main/master
    (or you have not obtained explicit user consent to implement on the main branch)
  • {FEATURE_DIR}/implementation/plan.md
    does not exist or is unreadable
  • Unresolved
    NEEDS CLARIFICATION
    exists in
    plan.md
    and it will block further execution
  • Critical plan defects exist: missing executable commands/missing minimal validation/unclear scope/unknown dependencies, making safe execution impossible
  • Blocks encountered during execution: missing dependencies/permissions/environments/data, repeated test failures, unclear instructions
Seek clarification instead of guessing.

输入 / 输出(落盘约定)

Input / Output (Disk Storage Convention)

  • 读取(渐进式披露,最少必要)
    • {FEATURE_DIR}/implementation/plan.md
      (必须;SSOT)
    • plan.md
      引用到的
      {FEATURE_DIR}/requirements/*
      {FEATURE_DIR}/design/*
      (按需读取,不要全量展开)
    • 项目级索引(只读,按需):
      project/memory/*
      project/contracts/
      project/adr/
  • 写入(唯一状态来源)
    • 只把状态/审计写回
      {FEATURE_DIR}/implementation/plan.md
      :勾选任务、补齐
      commit/pr/changed_files
      、记录关键验证结果摘要与阻塞取证路径
  • 代码与配置变更
    • plan.md
      每任务声明的路径实现(创建/修改/测试)
  • Spec 内决策/契约草案(如执行中产生)
    • ADR 草案:优先写到
      {FEATURE_DIR}/design/design.md
      的“决策/权衡”段;必要时新增
      {FEATURE_DIR}/design/adr/*.md
    • 契约草案:写到
      {FEATURE_DIR}/design/contracts/
    • 同步要求:在
      plan.md
      追加/更新 “Merge-back 待办清单”(仅记录,不在 I2 直接改
      project/*
命令书写约定:默认面向 PowerShell;同一行多命令请用
;
分隔(不要用
&&
)。
  • Reading (Progressive Disclosure, Minimal Necessary)
    • {FEATURE_DIR}/implementation/plan.md
      (required; SSOT)
    • {FEATURE_DIR}/requirements/*
      ,
      {FEATURE_DIR}/design/*
      referenced in
      plan.md
      (read on demand, do not expand all)
    • Project-level indexes (read-only, on demand):
      project/memory/*
      ,
      project/contracts/
      ,
      project/adr/
  • Writing (Only Status Source)
    • Write only status/audit information back to
      {FEATURE_DIR}/implementation/plan.md
      : check off tasks, fill in
      commit/pr/changed_files
      , record key validation result summaries and block evidence paths
  • Code and Configuration Changes
    • Implement according to the paths specified in each task of
      plan.md
      (create/modify/test)
  • Spec Decision/Contract Drafts (If Generated During Execution)
    • ADR drafts: prefer writing to the "Decisions/Trade-offs" section of
      {FEATURE_DIR}/design/design.md
      ; add
      {FEATURE_DIR}/design/adr/*.md
      if necessary
    • Contract drafts: write to
      {FEATURE_DIR}/design/contracts/
    • Synchronization requirement: append/update the "Merge-back Todo List" in
      plan.md
      (only record, do not directly modify
      project/*
      in I2)
Command writing convention: PowerShell by default; use
;
to separate multiple commands on the same line (do not use
&&
).

流程(重用 executing-plans 的五步骨架)

Process (Reusing the Five-Step Framework of executing-plans)

步骤 1:加载并审查计划(Review)

Step 1: Load and Review Plan (Review)

  1. 打开并阅读
    {FEATURE_DIR}/implementation/plan.md
  2. 严格审查——识别任何会阻断执行的问题或疑虑,例如:
    • 任务未写清“改哪些文件/跑什么命令/期望看到什么信号”
    • 缺失最小验证方式或验证不可执行
    • 任务越界(与 plan.md 的范围 / 里程碑不一致)
    • 依赖/权限/环境未满足
    • NEEDS CLARIFICATION
      未消除
  3. 若有关键疑虑:在开始前停止并汇报(把问题写清、给出取证路径;必要时回到 I1 修订 plan.md)
  4. 若无疑虑:创建 TodoWrite 并进入批次执行
  1. Open and read
    {FEATURE_DIR}/implementation/plan.md
  2. Strictly review—identify any issues or concerns that will block execution, such as:
    • Tasks do not specify "which files to modify/which commands to run/what signals to expect"
    • Missing minimal validation methods or unexecutable validation
    • Task scope creep (inconsistent with the scope/milestones of plan.md)
    • Unmet dependencies/permissions/environments
    • Unresolved
      NEEDS CLARIFICATION
  3. If there are critical concerns: stop and report before starting (clearly state the problem, provide evidence paths; return to I1 to revise plan.md if necessary)
  4. If no concerns: Create TodoWrite and proceed to batch execution

步骤 2:执行批次(Batch execute)

Step 2: Execute Batch (Batch execute)

默认:前 3 个未完成任务(可根据风险与依赖调整,但必须解释原因)。
对每个任务:
  1. 标记为 in_progress
  2. 严格按任务步骤执行(不要跳步;不要替换命令;不要暗改验收)
  3. 按任务声明运行最小验证,并记录关键输出/信号(PASS/FAIL 的判据)
  4. 频繁提交(如果计划要求更细提交点,优先按计划来)
    • Commit message 必须中文
  5. 回写
    plan.md
    (唯一状态来源):
    • - [ ]
      - [x]
    • 补齐
      commit/pr/changed_files
    • 记录该任务的关键验证结果摘要(含命令与关键信号)
    • 若阻塞:写清“缺什么、如何补齐、向谁/从哪取证”,并停止进入下一任务
  6. 标记为 completed(或 blocked)
Default: First 3 uncompleted tasks (adjustable based on risks and dependencies, but must explain the reason).
For each task:
  1. Mark as in_progress
  2. Strictly execute according to task steps (do not skip steps; do not replace commands; do not secretly modify acceptance criteria)
  3. Run minimal validation as specified in the task, and record key outputs/signals (criteria for PASS/FAIL)
  4. Commit frequently (if the plan requires finer-grained commit points, follow the plan first)
    • Commit message must be in Chinese
  5. Write back to
    plan.md
    (only status source):
    • - [ ]
      - [x]
    • Fill in
      commit/pr/changed_files
    • Record the key validation result summary of the task (including commands and key signals)
    • If blocked: clearly state "what is missing, how to supplement it, who to ask/where to obtain evidence", and stop proceeding to the next task
  6. Mark as completed (or blocked)

步骤 3:批次检查点报告(Report checkpoint)

Step 3: Batch Checkpoint Report (Report checkpoint)

批次完成时必须汇报:
  • 已完成任务列表(对应 Task ID)
  • 验证结果摘要(关键命令 + 关键输出/信号)
  • plan.md
    已回写的位置与审计信息(commit/pr/changed_files)
  • 未完成任务概览
  • 阻塞项清单(如有)
然后说:「准备好反馈。」并等待反馈后再继续下一批。
Report must be submitted when the batch is completed:
  • List of completed tasks (corresponding Task IDs)
  • Validation result summary (key commands + key outputs/signals)
  • Location and audit information written back to
    plan.md
    (commit/pr/changed_files)
  • Overview of uncompleted tasks
  • List of blocked items (if any)
Then say: "Ready for feedback." and wait for feedback before proceeding to the next batch.

步骤 4:继续 / 回到审查(Continue / Re-review)

Step 4: Continue / Return to Review (Continue / Re-review)

根据反馈:
  • 如对计划做了更新或出现新的关键疑虑:返回 步骤 1 重新审查
  • 否则:执行下一批并重复步骤 2–3,直至任务清单处理完毕
Based on feedback:
  • If the plan is updated or new critical concerns arise: return to Step 1 for re-review
  • Otherwise: Execute the next batch and repeat Steps 2–3 until the task list is processed

步骤 5:完成开发(Finish)

Step 5: Complete Development (Finish)

plan.md
中计划内任务全部完成且最小验证通过后:
  • 宣布:「我正在使用 finishing-development 技能做开发收尾确认(仅验证,确保测试/检查全绿)。」
  • 必需子技能: 使用
    finishing-development
  • 产物要求:确保
    plan.md
    的审计信息完整可追溯(至少包含
    commit
    与关键验证结果摘要;若有 PR 则补齐
    pr
When all planned tasks in
plan.md
are completed and minimal validation passes:
  • Announce: "I am using the finishing-development skill to perform development finalization confirmation (validation only, ensuring all tests/checks pass)."
  • Required sub-skill: Use
    finishing-development
  • Product requirement: Ensure the audit information in
    plan.md
    is fully traceable (at least includes
    commit
    and key validation result summaries; fill in
    pr
    if there is a PR)

何时停止并寻求帮助(Stop on block)

When to Stop and Seek Help (Stop on block)

立即停止执行:
  • 批次中遇到阻塞(缺失依赖/权限/环境/数据)
  • 测试或验证反复失败(无法在当前证据下定位或修复)
  • 不理解某条指令或验收口径
  • 发现
    plan.md
    有关键缺陷(无法继续安全执行)
  • 发现/新增
    NEEDS CLARIFICATION
    会影响正确性或范围
寻求澄清,而非猜测。
Stop execution immediately:
  • Blocks encountered in the batch (missing dependencies/permissions/environments/data)
  • Repeated test or validation failures (cannot locate or fix with current evidence)
  • Unclear instructions or acceptance criteria
  • Critical defects found in
    plan.md
    (cannot continue safe execution)
  • New/unresolved
    NEEDS CLARIFICATION
    that affects correctness or scope
Seek clarification instead of guessing.

何时返回 earlier 步骤

When to Return to Earlier Steps

返回审查(步骤 1)时:
  • 协作方根据你的反馈更新了
    plan.md
  • 你需要对任务顺序/拆分做调整才能继续(必须先在
    plan.md
    明确化,再执行)
  • 根本方案需要重新考虑(先停、再修计划/补证据)
Return to Review (Step 1) when:
  • Collaborators updated
    plan.md
    based on your feedback
  • You need to adjust task order/splitting to continue (must clarify in
    plan.md
    first before execution)
  • The core solution needs to be reconsidered (stop first, then revise the plan/supplement evidence)

牢记

Key Reminders

  • 始终先
    spec-context
    拿到
    FEATURE_DIR=...
    ,失败就停止
  • plan.md
    是唯一执行清单与状态 SSOT:不要另起“状态来源”
  • 严格按
    plan.md
    步骤执行;不要跳过验证
  • 默认每批前 3 个未完成任务;批次之间只汇报并等待
  • 遇到阻塞/澄清项立刻停止,不要猜测推进
  • 执行中产生 ADR/契约:只在
    {FEATURE_DIR}
    内落盘草案,并在
    plan.md
    记录 Merge-back 待办(I2 不直接改
    project/*
  • Always execute
    spec-context
    first to obtain
    FEATURE_DIR=...
    ; stop if it fails
  • plan.md
    is the only SSOT for execution checklist and status: do not create alternative status sources
  • Strictly execute according to
    plan.md
    steps; do not skip validation
  • By default, execute the first 3 uncompleted tasks per batch; only report and wait between batches
  • Stop immediately when encountering blocks/clarification items; do not advance speculatively
  • ADRs/contracts generated during execution: only draft within
    {FEATURE_DIR}
    , and record Merge-back todos in
    plan.md
    (do not directly modify
    project/*
    in I2)

集成

Integration

上游 / 下游技能:
  • spec-implementation-plan
    - 生成
    {FEATURE_DIR}/implementation/plan.md
    (SSOT)
  • finishing-development
    - 所有任务完成后做开发收尾确认
Upstream / Downstream Skills:
  • spec-implementation-plan
    - Generate
    {FEATURE_DIR}/implementation/plan.md
    (SSOT)
  • finishing-development
    - Perform development finalization confirmation after all tasks are completed