implement
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseImplement
实施
Goal
目标
- All changes applied and committed.
- Verification pass.
- 所有变更已应用并提交。
- 验证通过。
Prerequisites
前提条件
- Input already specifies exact code changes, not vague requirements.
- 输入已明确指定具体的代码变更,而非模糊需求。
Input
输入
- : ordered implementation stages (see the
Stagesshape). Each stage MAY carryStagestag(s).id - (optional): a stage may carry a
fixup modeoriginating commit to fix up instead of committing fresh.fixup-of
- :有序的实施阶段(参见
Stages结构)。每个阶段可携带Stages标签。id - (可选):某个阶段可携带
fixup mode源提交,用于修正而非新建提交。fixup-of
Steps
步骤
Step 1: Execute Plan
步骤1:执行计划
- Follow the from the plan in order.
Stages - Within each stage:
- Apply the stage's code changes, lint/format, and verify against immediate scope.
- Commit changes - if the stage is tagged for fixup mode, commit as instead of a plain commit.
git commit --fixup <originating-commit>
- 按计划中的顺序执行。
Stages - 在每个阶段内:
- 应用该阶段的代码变更,进行lint/格式化,并针对当前范围进行验证。
- 提交变更 - 如果阶段标记为fixup模式,则使用提交,而非普通提交。
git commit --fixup <originating-commit>
Step 2: Verify
步骤2:验证
- Check all changes committed, each stage as a separate commit.
- Run relevant static checks.
- Run relevant runtime tests.
- Validate against Success Criteria if provided.
- 检查所有变更是否已提交,每个阶段对应一个独立提交。
- 运行相关静态检查。
- 运行相关运行时测试。
- 如果提供了成功标准,则进行验证。
Step 3: Handle Deviations
步骤3:处理偏差
If Step 2 checks passed, skip this step.
When an unexpected deviation occurs:
- Assess the deviation and determine the root cause.
- Confirm it implies a simple fix. If it's suspected to be a significant change of the initial plan, or the same check has now failed 3 times in a row, stop and ask the user how to proceed.
- Apply and commit the fix as against the offending Stage's own commit from Step 1 (never the fixup-mode originating commit, even if the Stage itself was committed in fixup mode), then
git commit --fixup <hash>once done.git rebase --autosquash <commit before Step 1's first Stage commit> - Return to Step 2 and re-run - repeat until all pass.
No Stage ends in a failed or skipped state.
如果步骤2的检查通过,则跳过此步骤。
当出现意外偏差时:
- 评估偏差并确定根本原因。
- 确认是否只需简单修复。如果怀疑需要对初始计划进行重大变更,或同一检查已连续失败3次,请停止并询问用户如何继续。
- 以的方式针对步骤1中对应问题阶段的提交应用并提交修复(即使该阶段本身是以fixup模式提交的,也绝不能针对fixup模式的源提交),完成后执行
git commit --fixup <hash>。git rebase --autosquash <步骤1中第一个阶段提交之前的提交> - 返回步骤2重新运行 - 重复此过程直至所有检查通过。
任何阶段都不能以失败或跳过状态结束。
Output
输出
Markdown format:
- Commits: per input , its
Stagetag(s) (if any), commit hash(es), message(s), affected files.id - Deviations: Unexpected changes from original plan and how they were resolved. Each entry echoes the (s) carried by the
id.Stage - Verification Results: Stages, commits, quality checks status. Entries echo the (s) of the stages they cover, if tagged.
id
Markdown格式:
- 提交记录:对应输入的每个,包含其
Stage标签(如有)、提交哈希、提交信息、受影响文件。id - 偏差记录:与原始计划不符的意外变更及其解决方式。每条记录需关联对应的
Stage。id - 验证结果:阶段、提交、质量检查状态。条目需关联其所覆盖阶段的(如有标签)。
id