spec-kit-implement
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSpec Kit Implement
Spec Kit 落地执行
Execute approved feature tasks in dependency order and keep status accurate.
tasks.md按照依赖顺序执行已获批的功能任务,并保持的状态准确。
tasks.mdWhen to Use
适用场景
- exists and you need to execute it phase-by-phase to deliver the feature.
tasks.md - Implementation work has started, but task sequencing, checklist gates, or progress tracking is inconsistent.
- You need deterministic execution behavior before handoff or release readiness checks.
- 已存在,且你需要分阶段执行它以交付功能。
tasks.md - 实现工作已启动,但任务排序、检查清单关卡或进度跟踪存在不一致。
- 在移交或发布就绪检查前,你需要确定的执行行为。
When Not to Use
不适用场景
- does not exist yet (
tasks.mdfirst).spec-kit-tasks - You are still writing or revising requirements/design artifacts (,
spec-kit-specify,spec-kit-clarify).spec-kit-plan - You need read-only consistency analysis rather than execution ().
spec-kit-analyze - You need coordinated artifact remediation after gaps are discovered ().
spec-kit-reconcile
- 尚未创建(需先使用
tasks.md)。spec-kit-tasks - 你仍在编写或修订需求/设计文档(需使用、
spec-kit-specify、spec-kit-clarify)。spec-kit-plan - 你仅需要只读一致性分析而非执行操作(需使用)。
spec-kit-analyze - 发现缺口后需要协调文档修复(需使用)。
spec-kit-reconcile
Router Fit
流程定位
- Primary route from after
spec-kit.spec-kit-tasks - Requires planning + task artifacts for the active feature branch.
- Routes execution-discovered artifact drift to .
spec-kit-reconcile
- 是在
spec-kit之后的主要流程分支。spec-kit-tasks - 需要当前功能分支的规划+任务文档。
- 将执行过程中发现的文档偏差导向。
spec-kit-reconcile
Preconditions
前置条件
- Run from repository root (or a subdirectory inside it).
- Active feature context resolves to a single directory.
specs/<feature>/ - reflects the current approved
tasks.md.plan.md
- 从仓库根目录(或其内部子目录)运行。
- 当前功能上下文可解析到单个目录。
specs/<feature>/ - 与当前获批的
tasks.md保持一致。plan.md
Workflow
工作流
-
Resolve feature artifacts and enforce implementation gate:
- Run exactly once.
scripts/check-prerequisites.sh --json --require-tasks --include-tasks - Parse and
FEATURE_DIR.AVAILABLE_DOCS - Derive:
TASKS = FEATURE_DIR/tasks.mdIMPL_PLAN = FEATURE_DIR/plan.md
- If prerequisites fail:
- missing : stop and route to
tasks.mdspec-kit-tasks - missing : stop and route to
plan.mdspec-kit-plan
- missing
- Run
-
Enforce checklist gate when checklists exist:
- If exists, scan all checklist files.
FEATURE_DIR/checklists/ - If any unchecked items remain, stop and ask whether to proceed anyway.
- Continue only after explicit user approval.
- If
-
Load execution context:
- Required: ,
tasks.md.plan.md - Optional (when present): ,
data-model.md,contracts/,research.md.quickstart.md - Use these artifacts as source of truth; do not invent scope beyond them.
- Required:
-
Verify ignore-file coverage for active tooling:
- Check relevant ignore files (,
.gitignore,.dockerignore,.eslintignore, etc.)..prettierignore - Add only missing critical patterns; preserve existing user/project conventions.
- Check relevant ignore files (
-
Parseinto an execution plan before running tasks:
tasks.md- Extract phase boundaries and phase intent (setup/foundational, user-story phases, polish).
- Extract per-task fields: task ID, description, file path, marker, and optional
[P]label.[US#] - Build dependency order from task IDs, phase ordering, and explicit sequencing notes.
- Treat this parsed structure as execution truth for progress and failure handling.
-
Execute tasks in phase order:
- Respect ordering and dependency constraints from .
tasks.md - Run tasks in parallel only when there is no file overlap or dependency coupling.
[P] - Follow tests-before-implementation ordering where test tasks exist.
- Complete each phase before moving to the next:
- setup/foundational work first,
- then user-story phases in priority order,
- polish and cross-cutting validation last.
- Respect ordering and dependency constraints from
-
Track progress and failures continuously:
- After each completed task, mark it in
[X]immediately.tasks.md - Halt on critical sequential task failures and report the blocking context.
- For parallel batches, keep successful items moving and report failed tasks with next actions.
- After each completed task, mark it
-
Run completion checks:
- All required tasks are complete.
- Implementation aligns with /
spec.mdintent.plan.md - Required tests/validation pass per project constraints.
- If gaps remain (for example missing wiring, acceptance mismatch, integration drift), route to with a concrete gap report.
spec-kit-reconcile
-
Report implementation result:
- Absolute path to .
tasks.md - Completed vs remaining task counts.
- Checklist gate outcome (if used).
- Final status and recommended next step.
- Absolute path to
-
解析功能文档并强制执行实现关卡:
- 精确运行一次。
scripts/check-prerequisites.sh --json --require-tasks --include-tasks - 解析和
FEATURE_DIR。AVAILABLE_DOCS - 推导:
TASKS = FEATURE_DIR/tasks.mdIMPL_PLAN = FEATURE_DIR/plan.md
- 若前置条件不满足:
- 缺少:终止流程并导向
tasks.mdspec-kit-tasks - 缺少:终止流程并导向
plan.mdspec-kit-plan
- 缺少
- 精确运行一次
-
当存在检查清单时强制执行检查关卡:
- 若存在,扫描所有检查清单文件。
FEATURE_DIR/checklists/ - 若存在未勾选的项,终止流程并询问是否继续。
- 仅在获得用户明确批准后继续。
- 若
-
加载执行上下文:
- 必填:、
tasks.md。plan.md - 可选(若存在):、
data-model.md、contracts/、research.md。quickstart.md - 将这些文档作为唯一可信来源,不得超出其范围扩展内容。
- 必填:
-
验证当前工具的忽略文件覆盖情况:
- 检查相关忽略文件(、
.gitignore、.dockerignore、.eslintignore等)。.prettierignore - 仅添加缺失的关键规则;保留现有用户/项目约定。
- 检查相关忽略文件(
-
在运行任务前将解析为执行计划:
tasks.md- 提取阶段边界和阶段目标(准备/基础工作、用户故事阶段、优化阶段)。
- 提取每个任务的字段:任务ID、描述、文件路径、标记及可选的
[P]标签。[US#] - 根据任务ID、阶段顺序和明确的顺序说明构建依赖顺序。
- 将此解析后的结构作为进度跟踪和故障处理的执行依据。
-
按阶段顺序执行任务:
- 遵循中的顺序和依赖约束。
tasks.md - 仅当任务不存在文件重叠或依赖耦合时,才并行运行它们。
[P] - 若存在测试任务,遵循先测试后实现的顺序。
- 完成当前阶段后再进入下一阶段:
- 先完成准备/基础工作,
- 然后按优先级顺序执行用户故事阶段,
- 最后进行优化和跨领域验证。
- 遵循
-
持续跟踪进度和故障:
- 完成每个任务后,立即在中将其标记为
tasks.md。[X] - 遇到关键顺序任务失败时暂停,并报告阻塞上下文。
- 对于并行批次,继续推进成功项,并报告失败任务及后续操作建议。
- 完成每个任务后,立即在
-
运行完成检查:
- 所有必填任务均已完成。
- 实现内容与/
spec.md的目标一致。plan.md - 符合项目约束的必填测试/验证已通过。
- 若仍存在缺口(例如缺少关联逻辑、验收标准不匹配、集成偏差),则生成具体缺口报告并导向。
spec-kit-reconcile
-
报告实现结果:
- 的绝对路径。
tasks.md - 已完成与剩余任务的数量统计。
- 检查清单关卡的结果(若使用)。
- 最终状态及推荐的下一步操作。
Output
输出
- Updated completion state for the active feature.
tasks.md - Implementation progress summary with blockers/failures (if any).
- Final readiness signal for post-implementation verification/review.
- 更新当前功能的完成状态。
tasks.md - 包含阻塞点/故障(若有)的实现进度摘要。
- 用于实现后验证/评审的最终就绪信号。
Key Rules
核心规则
- Treat ordering as execution truth.
tasks.md - Never mark a task before its work and validations are complete.
[X] - Do not run tasks concurrently when they touch the same files or dependent resources.
[P] - Stop and reroute when prerequisite artifacts are missing or invalid.
- Do not patch spec/plan/tasks ad hoc during execution; use for structured remediation.
spec-kit-reconcile
- 将中的顺序作为执行依据。
tasks.md - 在任务工作和验证完成前,绝不能将任务标记为。
[X] - 当任务涉及相同文件或依赖资源时,不得并发运行。
[P] - 当前置文档缺失或无效时,终止流程并重新导向对应环节。
- 执行过程中不得临时修改spec/plan/tasks文档;需使用进行结构化修复。
spec-kit-reconcile
Common Mistakes
常见错误
- Starting implementation with stale or missing .
tasks.md - Skipping checklist acknowledgment when unresolved checklist items exist.
- Forgetting immediate updates in
[X], causing drift between reality and artifact state.tasks.md - Running tasks together despite file/dependency conflicts.
[P] - Continuing past critical sequential failures instead of stopping and reporting.
- Editing /
spec.md/plan.mdinformally during implementation instead of routing remediation throughtasks.md.spec-kit-reconcile
- 使用过时或缺失的启动实现工作。
tasks.md - 存在未解决的检查清单项时跳过确认步骤。
- 忘记立即更新中的
tasks.md标记,导致实际状态与文档状态偏差。[X] - 尽管存在文件/依赖冲突,仍并行运行任务。
[P] - 遇到关键顺序任务失败时未停止并报告,而是继续推进。
- 实现过程中非正式修改/
spec.md/plan.md,未通过tasks.md进行修复。spec-kit-reconcile
References
参考资料
- for implementation execution logic workflow
references/spec-kit-implement-flow.dot - for overall context of how the implementation fits into the Spec Kit process.
references/spec-kit-workflow.dot scripts/check-prerequisites.shhttps://github.com/github/spec-kit/blob/9111699cd27879e3e6301651a03e502ecb6dd65d/templates/commands/implement.md
- :实现执行逻辑工作流
references/spec-kit-implement-flow.dot - :实现环节在Spec Kit整体流程中的上下文
references/spec-kit-workflow.dot scripts/check-prerequisites.shhttps://github.com/github/spec-kit/blob/9111699cd27879e3e6301651a03e502ecb6dd65d/templates/commands/implement.md