comet-build
制定计划、实施并验收 Classic 任务。在用户调用 /comet-build,或 Classic Runtime 进入 Build、返回 Build 修复时使用。
- License 许可
- MIT
- 所属仓库
- rpamis/comet
- 最近更新
- 2026-11-15
- Stars
- ★ 3.3k
- Forks
- 314
01 前言 Front Matter
- name
- comet-build
- description
- 制定计划、实施并验收 Classic 任务。在用户调用 /comet-build,或 Classic Runtime 进入 Build、返回 Build 修复时使用。
02 资源文件 2
- 参考文档agents/openai.yaml211 B
- 参考文档reference/compat.md19.6 KB
03 SKILL.md 正文
Comet 阶段 3:计划与构建(Build)
首次进入阶段、交接给新 Agent 或上下文恢复后,读取并执行 任务上下文与产物语言,优先采用当前 continuation 或已领取 Action 的 contextRequest;同一阶段连续执行不重复获取。
收到入口返回的 layout 后,首次接收阶段或绑定变化时执行阶段共用入口,复用仍有效的 layout,无需先额外运行 root show;遇编辑判断时按共用入口加载编辑后续行协议。
SDK Run 路径
先读取并执行普通命令与检查。新旧 Run 均使用平台工具执行普通命令,在原 Run 提交实际检查报告;自动升级不恢复旧检查执行器。阶段准备、用户选择、任务完成和验收要求继续有效。
首次进入当前 SDK 阶段、换 Agent 或恢复上下文时,读取阶段入口与恢复及该参考的当前阶段章节;本会话已有且仍有效时直接复用。下文按当前阶段执行;nextAction.kind 的恢复路由只适用于没有 continuation mode 的旧响应。
优先复用当前有效结果中的 agent.continuation / data.nextAction 与已绑定状态;只有冷恢复、外部状态变化或缺少必要信息时,才运行 comet state next <change-name> --json。data.runtimeFormat 为 sdk 时,只按本节推进 Run;SDK 方法参考的执行策略选项、计划内容要求、实施与审查方法仍适用,状态和证据通过本节命令提交。data.phase 必须为 build。已有有效 layout 与当前配置时直接复用;缺少时运行 comet state check <change-name> build --json;若 nextAction.kind 为 reconcile,运行 comet state check <change-name> build --recover --json 核对原 Action 的结果,在结果明确前不重发外部工作。
先核对有效配置中的 workflow 或当前 nextAction.stepId。tweak.build.* / workflow: tweak:立即执行: 使用 Skill 工具加载 comet-tweak 技能。禁止跳过此步骤。hotfix.build.* / workflow: hotfix:立即执行: 使用 Skill 工具加载 comet-hotfix 技能。禁止跳过此步骤。技能加载后,传入同一 change、工作区、phase、Run revision 和 continuation,从该预设的 SDK Build 步骤继续,不要求 full Design Doc 或完整计划,也不重跑 Open。旧 Run 的原始 Action 仍可能引用 comet-build,同样按此规则路由。已批准升级且当前步骤为 full.build.* 时,执行下列 full 路径。
full.build.configure待执行时,按 SDK 方法参考的 Build 配置说明展示值、含义及确认状态,只补真正缺失、无效或用户要求更改的执行方式、TDD 和审查决定。将已确认的build_mode、tdd_mode、review_mode、subagent_dispatch和需要时的direct_override写入仓库内的临时 JSON;用户已明确选择这份完整配置时,运行comet state propose-build <change-name> --file <configuration-json> --confirmed一次保存提案与批准;尚未决定时运行comet state propose-build <change-name> --file <configuration-json>。仅在仍有待决定 Wait 时,从返回的data.wait.proposalHash保存<proposalHash>,向用户展示实际配置并按 decision-point.md 等待确认。确认或拒绝时运行comet state decide-build <change-name> --proposal-hash <proposalHash> --choice <approved|rejected>;拒绝后从新配置重新提案。恢复已有待决定 Wait 时复用原提案,不重复提问或新建配置 Action。保存批准后简短回显并继续,不再增加一次继续确认。full.build.plan待执行时,按 SDK 方法参考的 Build 章节创建或核对计划。计划引用当前 Design Doc 和 tasks.md,以<!-- comet-task-authority: <classic-task-authority-ref> -->及<!-- comet-task-ref:<task-id> -->映射任务,不能另建 checkbox。运行comet state submit-plan <change-name> --plan <plan-ref>提交计划及证据。只有用户明确要求写完计划暂停时加--pause;恢复plan-readyWait 时,必须等用户明确继续,再用该 Wait 的当前哈希运行comet state continue-plan <change-name> --proposal-hash <proposalHash>。计划或任务要求变化后不复用原批准。full.build.execute待执行时,按 SDK 方法参考的 Build 章节的已选方法实施、做任务级或分段审查并运行相关检查。任务实际完成且审查合格后勾选同一 tasks.md;任务 ID、勾选和协调进度使用共享参考中的state tasks、state task-complete、state checkpoint;这些命令不推进 SDK Run。SDK 不调用旧comet handoff --write。核对计划、任务和工作区后运行comet state complete-build <change-name> --session <builder-execution-ref> --checks <checks-json-file>,由 Run 进入 Verify。实现或计划与已接受证据不一致时先解决具体漂移,不绕过 SDK 校验。
每次推进后,优先使用同次结果的 agent.continuation / data.nextAction;状态仍有效且信息完整时,不重复 next、select 或 check。仅在冷恢复、外部状态变化或缺少必要信息时补读。只有 action 且指向下一阶段时才加载下一 Skill。decision、evidence、reconcile 均先完成当前 Run 的恢复或用户决定。
SDK Build 使用真实的 --session <builder-execution-ref> 关联执行;已经携带时无需再次传入。
Compat 路径
以下旧 Runtime 步骤仅用于 runtimeFormat: compat。必须读取 Compat 操作,按其中当前阶段继续;SDK 不加载该参考。
可选变更说明
Build 收尾和 Verify 展示结果前,先核对项目 .comet/config.yaml 的 change_walkthrough(默认开启;仅显式 false 关闭)。开启时读取并执行变更说明,用共享模板生成或更新同一 walkthrough.html 并给出打开链接;关闭时跳过额外讲解、详细指引和渲染,保留原有摘要。Archive 只随现有材料保存已有页面并提供实际归档链接,不补生成、不新增确认、不为页面更新重跑代码检查。
04 同仓库更多 Skills
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
writing-plans
Use when you have a spec or requirements for a multi-step task, before touching code
verification-before-completion
Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always
using-git-worktrees
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback
test-driven-development
Use when implementing any feature or bugfix, before writing implementation code
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes