build
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesebuild — implement spec
build — 实现规格说明
Single-thread native plan→execute. You are main Claude. No swarm.
采用原生单线程的规划→执行流程。你是主Claude,无集群(swarm)。
LOAD
加载(LOAD)
- Read . If missing → tell user to invoke the spec skill first. Stop.
SPEC.md - Read once if not loaded.
FORMAT.md - Parse invocation args:
- → that task only
§T.n - → lowest-numbered row with status
--nextor.~ - or empty → every
--allrow in §T order.
- 读取文件。若文件缺失→告知用户先调用spec技能。停止操作。
SPEC.md - 若未加载过,则读取一次。
FORMAT.md - 解析调用参数:
- → 仅处理该任务
§T.n - → 处理状态为
--next或.的编号最小的任务行~ - 或无参数 → 按§T顺序处理所有状态为
--all的任务行.
PLAN
规划(PLAN)
Native plan mode. For chosen task(s):
- Cite every §V invariant that applies. Plan must respect all.
- Cite every §I interface touched. Plan must preserve shape.
- List files to create / edit.
- List tests to add or update (one per invariant touched).
- Name verification command (test, build, lint).
Show plan. Wait for user OK unless auto mode.
原生规划模式。针对选定的任务:
- 引用所有适用的§V约束。规划必须遵守所有约束。
- 引用所有涉及的§I接口。规划必须保留接口结构。
- 列出需要创建/编辑的文件。
- 列出需要添加或更新的测试(每个涉及的约束对应一个测试)。
- 指定验证命令(测试、构建、代码检查)。
展示规划方案。除非处于自动模式,否则需等待用户确认。
EXECUTE
执行(EXECUTE)
Per task in order:
- Flip §T.n status cell →
.. Just write to SPEC.md.~ - Edit code per plan.
- Run verification command.
- Pass → flip →
~. Next task.x - Fail → invoke backprop skill. Do NOT retry blindly.
按顺序处理每个任务:
- 将§T.n的状态单元格从改为
.。仅写入SPEC.md文件。~ - 按照规划方案编辑代码。
- 运行验证命令。
- 通过 → 将改为
~。处理下一个任务。x - 失败 → 调用backprop技能。切勿盲目重试。
FAIL → BACKPROP
失败→反向传播(BACKPROP)
On test/build failure:
- Read failure output.
- Ask: is failure (a) my code bug, (b) spec wrong, or (c) unspecified edge case?
- If (a) → fix code, re-run. No spec change.
- If (b) or (c) → invoke spec skill with first, let it update §V and §B, then resume build against updated spec.
bug: <cause>
Rule: never silently fix root-cause without considering backprop. §B is the memory that stops recurrence.
测试/构建失败时:
- 读取失败输出。
- 询问:失败原因是(a)我的代码错误,(b)规格说明有误,还是(c)未明确的边缘情况?
- 若为(a) → 修复代码,重新运行。不修改规格说明。
- 若为(b)或(c) → 先调用spec技能并传入,待其更新§V和§B后,再基于更新后的规格说明继续构建。
bug: <原因>
规则:永远不要在未考虑反向传播的情况下悄悄修复根本原因。§B是防止问题再次发生的记忆模块。
WRITE POLICY
写入策略(WRITE POLICY)
- Only flip §T status. No other SPEC.md edits from build.
- Other spec edits → invoke spec skill.
- Commit after each §T completes. Message: + §V cites.
T<n>: <goal line>
- 仅修改§T的状态。构建过程中不得对SPEC.md进行其他编辑。
- 其他规格说明编辑→调用spec技能。
- 完成每个§T任务后提交。提交信息:+ §V引用内容。
T<n>: <目标行>
VERIFICATION
验证(VERIFICATION)
Task only if:
x- Verification command exits 0.
- New test(s) added per plan.
- No §V invariant regressed (run full test suite at end).
仅当满足以下条件时,任务标记为:
x- 验证命令退出码为0。
- 已按照规划添加新测试。
- 无§V约束被违反(最后运行完整测试套件)。
NON-GOALS
非目标(NON-GOALS)
- No sub-agents. No parallel workers. Main thread only.
- No progress dashboards. is the dashboard.
cat SPEC.md | grep §T - No speculative work beyond chosen task scope.
- 无子Agent。无并行工作线程。仅主线程运行。
- 无进度仪表盘。即为仪表盘。
cat SPEC.md | grep §T - 不得进行超出选定任务范围的推测性工作。