/comet-verify 会运行 tests 和 build commands,检查 implementation 是否匹配 design,产出并保存 verification report,然后询问你如何处理 feature branch。在 report 存在且 branch 已处理前,任何内容都不会推进到 archive;guard 会将二者作为 hard prerequisites 强制执行。
Trigger
直接运行/comet-verify,或在 tasks.md 中所有 tasks 已勾选时让 /comet 自动分发。OpenSpec 和 Superpowers 都会参与此 phase。
Owner
OpenSpec 和 Superpowers 共同负责 — OpenSpec 的openspec-verify-change skill 负责较大 changes 的 full spec-coverage verification;Superpowers 的 finishing-a-development-branch skill 负责 branch lifecycle。Lightweight verification(小变更)会 inline 运行,不加载外部 skill。
会发生什么
Scale assessment 决定 verification mode
AI 会运行 scale assessment,统计 tasks、delta specs 和 changed files,以判断这是 lightweight(小变更)还是 full verification。结果会作为
verify_mode 写入 .comet.yaml。如果每个 task 都单独提交,AI 还会检查 base-ref commit range,以更准确地了解 change scope。运行 tests 和 build commands
AI 会执行项目的 build 和 test commands。它会先从
.comet.yaml 读取 verify_command 和 build_command;如果二者都未设置,则回退到 auto-detection(npm run build、Maven、Cargo 等)。失败命令的输出会作为 evidence 打印。- Lightweight verification 检查:所有 tasks 完成、changed files 匹配 task descriptions、build 通过、tests 通过、无明显 security issues(hardcoded keys、不安全操作)。
- Full verification 额外加载
openspec-verify-change并检查:implementation vs.design.mdhigh-level decisions、implementation vs. Design Doc(technical RFC)、所有 delta spec acceptance scenarios 通过、proposal.mdgoals 满足,以及 delta spec 和 Design Doc 一致。
产出并保存 verification report
Verification conclusions 会写入
docs/superpowers/reports/YYYY-MM-DD-<change-name>-verify.md report file。该路径会作为 verification_report 记录在 .comet.yaml 中。此文件必须真实存在于磁盘上;guard 检查的是路径,而不只是字段值。你选择如何处理 branch(blocking pause)
AI 会加载 Superpowers
finishing-a-development-branch skill,并展示 branch-handling options。你必须明确选择,AI 不会根据推荐或当前 branch state 替你选择:- 本地 merge 到 main branch
- Push 并创建 PR
- 保留 branch(稍后处理)
- 丢弃 work
branch_status: handled 才会写入 .comet.yaml。Verify Result Values
.comet.yaml 中的 verify_result 字段反映当前 verification state:
| Value | 含义 |
|---|---|
pending | Verification 尚未完成(build 后的初始状态) |
pass | 所有 verification checks 均通过,且 guard 已确认 evidence |
fail | Verification 失败;workflow 已回滚到 phase: build 进行修复 |
Verification Failure Handling
Required Evidence
记录verify-pass 前,guard 会强制两个 conditions 作为 hard prerequisites:
verification_report必须指向记录路径上真实存在的文件branch_status: handled必须设置在.comet.yaml中
Spec Drift Handling
如果 full verification 发现 delta spec 在 Phase 3 中被修改,但 Design Doc 没有反映这些 changes,AI 会暂停并要求你从三个选项中选择:| Option | 操作 |
|---|---|
| A — Document the divergence | 向 Design Doc 追加 “Implementation Divergence” section,说明 implementation drift 的原因。这是 verify-phase artifact,不会重新触发 dirty-worktree checks。 |
| B — Fix the Design Doc | 回滚到 build phase;Superpowers brainstorming skill 会更新 Design Doc 和 delta spec,以反映实际 implementation。 |
| C — Accept the deviation | 确认 drift 可接受并继续。Archive 期间,Design Doc 会被标记为 superseded-by-main-spec。 |
Context Compaction Recovery
Verify phase 可能触发 context compaction,尤其是在大型 changes 的 full verification 期间。若要恢复,请运行:verify_result 已是 pass 且 branch_status 是 handled,recovery action 会直接引导你运行 guard 进行 transition。