cmd-speckit-implement

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

/speckit.implement

/speckit.implement

Agent skill wrapper for the Claude command
/speckit.implement
.
When the original command text references
{{INPUT}}
,
$1
, or named arguments, map them from the user's current request.
Claude命令
/speckit.implement
的Agent技能封装。
当原始命令文本引用
{{INPUT}}
$1
或命名参数时,从用户当前请求中映射对应内容。

Command Instructions

命令说明

Execute the implementation plan for a feature by working through
tasks.md
phase by phase, using TDD where applicable.
通过逐步执行
tasks.md
中的内容来完成功能的实现计划,适用情况下采用TDD方式。

Steps

步骤

  1. Locate artifacts:
    • If input names a feature, directory, or phase number, parse it.
    • Load required:
      tasks.md
      ,
      plan.md
      . Load optional:
      data-model.md
      ,
      contracts/
      ,
      research.md
      .
    • Load
      .specify/memory/constitution.md
      .
    • Set
      FEATURE_DIR
      to the feature directory.
  2. Check checklists: Scan
    FEATURE_DIR/checklists/
    for any uncompleted items (
    - [ ]
    ). If found, report them and ask: "There are incomplete checklist items. Proceed anyway?" Stop if the user declines.
  3. Determine starting phase:
    • If a phase number was provided in input, start there.
    • Otherwise start from Phase 1.
    • Skip phases where all tasks are already marked
      [x]
      .
  4. Execute each phase:
    • Announce the phase name and task count before starting.
    • For tasks marked
      [P]
      (parallelizable): execute them concurrently.
    • For tasks without
      [P]
      : execute in listed order.
    • For each task:
      • Write tests first (TDD), then implement the minimum code to satisfy the task.
      • Mark the task
        [x]
        in
        tasks.md
        immediately after completion.
      • Run available test and lint commands to verify no regressions.
    • If a non-parallelizable task fails, stop and report. Do not proceed to the next task until resolved.
  5. Validate completion after all phases:
    • All tasks in
      tasks.md
      are marked
      [x]
      .
    • All functional requirements from
      spec.md
      are addressed.
    • Tests pass and no new lint errors.
  6. Report: Tasks completed, any skipped tasks with reasons, test results summary.
Next step: Run
/speckit.taskstoissues
to track remaining work as GitHub issues, or commit and open a PR.
{{INPUT}}
  1. 定位工件:
    • 如果输入指定了功能、目录或阶段编号,解析该输入。
    • 加载必需文件:
      tasks.md
      plan.md
      。加载可选文件:
      data-model.md
      contracts/
      research.md
    • 加载
      .specify/memory/constitution.md
    • 设置
      FEATURE_DIR
      为功能目录。
  2. 检查检查清单: 扫描
    FEATURE_DIR/checklists/
    中的未完成项(
    - [ ]
    )。如果发现未完成项,报告并询问:"存在未完成的检查清单项。是否仍要继续?"若用户拒绝则停止执行。
  3. 确定起始阶段:
    • 如果输入中提供了阶段编号,从该阶段开始。
    • 否则从第1阶段开始。
    • 跳过所有任务已标记为
      [x]
      的阶段。
  4. 执行每个阶段:
    • 开始前宣布阶段名称和任务数量。
    • 对于标记为
      [P]
      (可并行执行)的任务:并发执行。
    • 对于未标记
      [P]
      的任务:按列出的顺序执行。
    • 针对每个任务:
      • 先编写测试(TDD),然后实现满足任务要求的最简代码。
      • 任务完成后立即在
        tasks.md
        中将其标记为
        [x]
      • 运行可用的测试和代码检查命令,验证没有回归问题。
    • 如果某个非并行任务执行失败,停止并报告。问题解决前不要继续执行下一个任务。
  5. 完成后验证(所有阶段完成后):
    • tasks.md
      中的所有任务均标记为
      [x]
    • spec.md
      中的所有功能需求均已处理。
    • 测试通过且无新的代码检查错误。
  6. 报告: 已完成的任务、任何跳过的任务及原因、测试结果摘要。
下一步: 运行
/speckit.taskstoissues
将剩余工作跟踪为GitHub issues,或提交代码并打开PR。
{{INPUT}}