@rpamis/comet 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,152 +1,154 @@
1
- ---
2
- name: comet-tweak
3
- description: "Comet 预设路径:非 bug 的小改动(tweak)。跳过 brainstorming 和完整 plan,直接 open → lightweight build → light verify → archive。适用于文案、配置、文档或 prompt 的局部优化。"
4
- ---
5
-
6
- # Comet 预设路径:Tweak
7
-
8
- Tweak Comet 五阶段能力的预设工作流,不是独立的平行流程。它复用 openbuildverifyarchive 能力,仅跳过 brainstorming 和完整 plan
9
-
10
- 适用于非 bug 的小范围变更,例如文案调整、配置调整、文档或 prompt 的局部优化。
11
-
12
- **适用条件**(必须全部满足):
13
- 1. 不新增 capability
14
- 2. 不改变架构
15
- 3. 不涉及接口变化
16
- 4. 通常不超过 3 tasks、5 个文件
17
-
18
- **不适用**:如变更过程中发现需要 capability、架构或接口调整,应升级为完整 `/comet` 流程。
19
-
20
- ---
21
-
22
- ## 流程(preset workflow4 阶段)
23
-
24
- ### 0. 入口状态验证(Entry Check
25
-
26
- 在执行任何操作之前,验证当前状态:
27
-
28
- **检查清单:**
29
- 1. `openspec/changes/<name>/` 目录不存在,或目录存在但 `.comet.yaml` 不存在(无冲突)
30
-
31
- **验证方式:**
32
- - `test -d openspec/changes/<name>` 检查目录
33
- - 如目录存在,`test -f openspec/changes/<name>/.comet.yaml` 检查配置文件
34
- - `.comet.yaml` 已存在,读取 `phase` 检查是否为未完成的 tweak
35
-
36
- **失败输出(有冲突):**
37
- ```
38
- [HARD STOP] Entry check failed for comet-tweak
39
- Expected: openspec/changes/<name>/.comet.yaml does not exist (new change)
40
- Actual: .comet.yaml exists with phase=<实际值>
41
- Suggestion: Pick a different change name, or check if an existing tweak is in progress.
42
- ```
43
-
44
- 验证通过后才进入流程步骤。
45
-
46
- 执行链路:open → lightweight build → light verify → archiveTweak 为每个阶段提供默认决策:精简开启、轻量构建、轻量验证、验证通过后归档。
47
-
48
- ### 1. 快速开启(preset open
49
-
50
- 复用 Comet open 能力创建 change,但使用 tweak 默认值:不执行 `openspec-explore` 长探索,直接进入精简 change 创建。
51
-
52
- **立即执行:** 使用 Skill 工具加载 `openspec-new-change` 技能。禁止跳过此步骤。
53
-
54
- 技能加载后,按其指引创建精简版产物:
55
- - `proposal.md` — 变更动机 + 目标 + 范围
56
- - `design.md` — 简短实现说明(无需方案对比)
57
- - `tasks.md` — 不超过 3 个任务
58
- - **无需 delta spec**(除非变更改变了已有 spec 的验收场景;一旦需要 delta spec,升级为完整 `/comet`)
59
-
60
- `openspec/changes/<name>/` 下创建独立的 `.comet.yaml` 文件:
61
-
62
- ```yaml
63
- workflow: tweak
64
- phase: build
65
- design_doc: null
66
- plan: null
67
- build_mode: direct
68
- verify_mode: light
69
- verify_result: pending
70
- verified_at: null
71
- archived: false
72
- ```
73
-
74
- 【写入验证】创建完成后必须验证:
75
- cat openspec/changes/<name>/.comet.yaml
76
- 确认 workflow 行的值为 "tweak"
77
- 确认 phase 行的值为 "build"
78
- 确认 design_doc 行的值为 "null"
79
- 确认 plan 行的值为 "null"
80
- 确认 build_mode 行的值为 "direct"
81
- 确认 verify_mode 行的值为 "light"
82
- 确认 verify_result 行的值为 "pending"
83
- 确认 verified_at 行的值为 "null"
84
- 确认 archived 行的值为 "false"
85
- 如任一字段不匹配,重试写入后再次验证。最多重试 2 次,仍失败则报告错误并终止。
86
-
87
- ### 2. 轻量构建(preset build)
88
-
89
- 使用 tweak 默认值:`build_mode: direct`。跳过 `superpowers:brainstorming` 和 `superpowers:writing-plans`。
90
-
91
- **立即执行:** tasks.md 逐个执行任务:
92
-
93
- 1. 读取 `openspec/changes/<name>/tasks.md`,获取未完成任务列表
94
- 2. 对每个未完成任务:
95
- - 根据任务描述修改目标文件
96
- - 运行 `mvn spotless:apply` 格式化
97
- - 运行相关测试确认通过
98
- - tasks.md 中对应 `- [ ]` 勾选为 `- [x]`
99
- - 提交代码,commit message 格式:`tweak: <简述变更>`
100
- 3. 全部任务完成后进入验证
101
-
102
- ### 3. 轻量验证(preset verify)
103
-
104
- 复用 `/comet-verify`。Tweak 必须保持轻量验证条件:≤ 3 tasks、≤ 5 files、无 delta spec、无新 capability。
105
-
106
- **立即执行:** 使用 Skill 工具加载 `comet-verify` 技能。禁止跳过此步骤。
107
-
108
- 如规模评估进入完整验证路径,停止 tweak,升级为完整 `/comet`。
109
-
110
- 验证通过后,按 `/comet-verify` 的规则将 `.comet.yaml` `verify_result` 记录为 `pass`,归档前不得跳过该状态。
111
-
112
- ### 4. 归档(preset archive)
113
-
114
- 复用 `/comet-archive`。归档前必须满足 `.comet.yaml` `verify_result: pass`。
115
-
116
- **立即执行:** 使用 Skill 工具加载 `comet-archive` 技能进行归档。禁止跳过此步骤。
117
-
118
- ---
119
-
120
- ## 连续执行模式
121
-
122
- <IMPORTANT>
123
- Tweak 流程为 **一次性连续执行**。调用 `/comet-tweak` 后,agent 必须自动走完全部 4 个阶段,中间不停顿等待用户输入(除非遇到升级条件需要用户确认)。
124
-
125
- 执行顺序:快速开启 轻量构建 轻量验证 归档 完成
126
-
127
- 每个阶段完成后立即进入下一阶段,无需用户再次输入。阶段内部仍必须按上文要求调用对应 Comet/OpenSpec/Superpowers skill。
128
- </IMPORTANT>
129
-
130
- ---
131
-
132
- ## 升级条件
133
-
134
- 执行过程中出现以下情况时,停止 tweak 流程,升级为完整 `/comet`:
135
-
136
- 1. 需要新增 capability
137
- 2. 需要架构调整
138
- 3. 需要接口变化
139
- 4. 影响范围扩大到 > 5 个文件
140
- 5. 任务数超过 3
141
- 6. 需要 delta spec
142
-
143
- 升级方式:在当前 change 基础上补充 Design Doc(执行 `/comet-design`),后续正常走完整流程。
144
-
145
- ---
146
-
147
- ## 退出条件
148
-
149
- - 小改动已完成,测试通过
150
- - change 已归档
151
- - 未新增 capability、架构调整或接口变化
152
- - **阶段守卫**:build → verify 前运行 `bash $COMET_GUARD <change-name> build`,verify → archive 前运行 `bash $COMET_GUARD <change-name> verify`
1
+ ---
2
+ name: comet-tweak
3
+ description: "Comet preset path: Non-bug small changes (tweak). Skip brainstorming and full plan, directly open → lightweight build → light verify → archive. Applicable for copy, configuration, documentation or prompt local optimization."
4
+ ---
5
+
6
+ # Comet Preset Path: Tweak
7
+
8
+ Tweak is a preset workflow of Comet's five-phase capabilities, not a separate parallel process. It reuses open, build, verify, archive capabilities, only skipping brainstorming and full plan.
9
+
10
+ Applicable for small-scale non-bug changes, such as copy adjustments, configuration adjustments, documentation or prompt local optimization.
11
+
12
+ **Applicable conditions** (all must be met):
13
+ 1. No new capability
14
+ 2. No architecture changes
15
+ 3. No interface changes involved
16
+ 4. Usually not exceeding 3 tasks, 5 files
17
+
18
+ **Not applicable**: If change process discovers need for capability, architecture, or interface adjustments, should upgrade to full `/comet` workflow.
19
+
20
+ ---
21
+
22
+ ## Process (preset workflow, 4 phases)
23
+
24
+ ### 0. Entry State Verification (Entry Check)
25
+
26
+ Before performing any operations, verify current state:
27
+
28
+ **Checklist:**
29
+ 1. `openspec/changes/<name>/` directory does not exist, or directory exists but `.comet.yaml` does not exist (no conflict)
30
+
31
+ **Verification method:**
32
+ - `test -d openspec/changes/<name>` to check directory
33
+ - If directory exists, `test -f openspec/changes/<name>/.comet.yaml` to check config file
34
+ - If `.comet.yaml` exists, read `phase` to check if it's an incomplete tweak
35
+
36
+ **Failure output (has conflict):**
37
+ ```
38
+ [HARD STOP] Entry check failed for comet-tweak
39
+ Expected: openspec/changes/<name>/.comet.yaml does not exist (new change)
40
+ Actual: .comet.yaml exists with phase=<actual-value>
41
+ Suggestion: Pick a different change name, or check if an existing tweak is in progress.
42
+ ```
43
+
44
+ Proceed to process steps only after verification passes.
45
+
46
+ Execution chain: open → lightweight build → light verify → archive. Tweak provides default decisions for each phase: streamlined open, lightweight build, lightweight verification, archive after verification passes.
47
+
48
+ ### 1. Quick Open (preset open)
49
+
50
+ Reuse Comet open capability to create change, but use tweak defaults: do not execute `openspec-explore` long exploration, directly enter streamlined change creation.
51
+
52
+ **Immediately execute:** Use the Skill tool to load the `openspec-new-change` skill. Skipping this step is prohibited.
53
+
54
+ After the skill loads, follow its guidance to create streamlined artifacts:
55
+ - `proposal.md` — change motivation + goals + scope
56
+ - `design.md` — brief implementation description (no solution comparison needed)
57
+ - `tasks.md` — not exceeding 3 tasks
58
+ - **No delta spec needed** (unless change changes existing spec acceptance scenarios; once delta spec needed, upgrade to full `/comet`)
59
+
60
+ Create independent `.comet.yaml` file under `openspec/changes/<name>/`:
61
+
62
+ ```yaml
63
+ workflow: tweak
64
+ phase: build
65
+ design_doc: null
66
+ plan: null
67
+ build_mode: direct
68
+ isolation: branch
69
+ verify_mode: light
70
+ verify_result: pending
71
+ verified_at: null
72
+ archived: false
73
+ ```
74
+
75
+ 【Write verification】After creation completion, must verify:
76
+ cat openspec/changes/<name>/.comet.yaml
77
+ Confirm workflow line value is "tweak"
78
+ Confirm phase line value is "build"
79
+ Confirm design_doc line value is "null"
80
+ Confirm plan line value is "null"
81
+ Confirm build_mode line value is "direct"
82
+ Confirm isolation line value is "branch"
83
+ Confirm verify_mode line value is "light"
84
+ Confirm verify_result line value is "pending"
85
+ Confirm verified_at line value is "null"
86
+ Confirm archived line value is "false"
87
+ If any field does not match, retry write then verify again. Maximum 2 retries, report error and terminate if still fails.
88
+
89
+ ### 2. Lightweight Build (preset build)
90
+
91
+ Use tweak defaults: `build_mode: direct`. Skip `superpowers:brainstorming` and `superpowers:writing-plans`.
92
+
93
+ **Immediately execute:** Execute tasks one by one according to tasks.md:
94
+
95
+ 1. Read `openspec/changes/<name>/tasks.md`, get incomplete task list
96
+ 2. For each incomplete task:
97
+ - Modify target file according to task description
98
+ - Run `mvn spotless:apply` to format
99
+ - Run related tests to confirm pass
100
+ - Check corresponding `- [ ]` to `- [x]` in tasks.md
101
+ - Commit code, commit message format: `tweak: <brief change description>`
102
+ 3. After all tasks complete, enter verification
103
+
104
+ ### 3. Lightweight Verification (preset verify)
105
+
106
+ Reuse `/comet-verify`. Tweak must maintain lightweight verification conditions: ≤ 3 tasks, ≤ 5 files, no delta spec, no new capability.
107
+
108
+ **Immediately execute:** Use the Skill tool to load the `comet-verify` skill. Skipping this step is prohibited.
109
+
110
+ If scale assessment enters full verification path, stop tweak, upgrade to full `/comet`.
111
+
112
+ After verification passes, record `.comet.yaml` `verify_result` as `pass` according to `/comet-verify` rules, must not skip this status before archiving.
113
+
114
+ ### 4. Archive (preset archive)
115
+
116
+ Reuse `/comet-archive`. Must satisfy `verify_result: pass` in `.comet.yaml` before archiving.
117
+
118
+ **Immediately execute:** Use the Skill tool to load the `comet-archive` skill to archive. Skipping this step is prohibited.
119
+
120
+ ---
121
+
122
+ ## Continuous Execution Mode
123
+
124
+ <IMPORTANT>
125
+ Tweak workflow is **one-time continuous execution**. After invoking `/comet-tweak`, agent must automatically complete all 4 phases, without pausing to wait for user input mid-way (unless encountering upgrade conditions requiring user confirmation).
126
+
127
+ Execution order: quick open → lightweight build → lightweight verification → archive → complete
128
+
129
+ After each phase completes, immediately enter next phase, no need for user input again. Within each phase, must still call corresponding Comet/OpenSpec/Superpowers skill according to above requirements.
130
+ </IMPORTANT>
131
+
132
+ ---
133
+
134
+ ## Upgrade Conditions
135
+
136
+ When the following situations occur during execution, stop tweak workflow, upgrade to full `/comet`:
137
+
138
+ 1. Need new capability
139
+ 2. Need architecture adjustments
140
+ 3. Need interface changes
141
+ 4. Impact scope expands to > 5 files
142
+ 5. Task count exceeds 3
143
+ 6. Need delta spec
144
+
145
+ Upgrade method: On current change basis, supplement Design Doc (execute `/comet-design`), then proceed normally with full workflow.
146
+
147
+ ---
148
+
149
+ ## Exit Conditions
150
+
151
+ - Small change completed, tests pass
152
+ - Change archived
153
+ - No new capability, architecture adjustments, or interface changes
154
+ - **Phase guard**: Before build → verify run `bash $COMET_GUARD <change-name> build`, before verify → archive run `bash $COMET_GUARD <change-name> verify`
@@ -1,164 +1,164 @@
1
- ---
2
- name: comet-verify
3
- description: "Comet 阶段 4:验证与收尾。用 /comet-verify 调用。验证实现符合设计,处理开发分支。"
4
- ---
5
-
6
- # Comet 阶段 4:验证与收尾(Verify
7
-
8
- ## 前置条件
9
-
10
- - 代码已提交(阶段 3 完成)
11
- - tasks.md 全部任务已完成
12
-
13
- ## 步骤
14
-
15
- ### 0. 入口状态验证(Entry Check
16
-
17
- 在执行任何操作之前,读取并验证当前状态:
18
-
19
- **检查清单:**
20
- 1. `openspec/changes/<name>/.comet.yaml` 存在
21
- 2. `phase` 字段的值为 `"verify"`
22
- 3. `verify_result` 字段为 `"pending"` null(尚未验证通过)
23
-
24
- **验证方式:**
25
- - `cat openspec/changes/<name>/.comet.yaml` 读取全部字段
26
- - `verify_result` 已是 `"pass"`,说明此 change 已验证过
27
-
28
- **失败输出:**
29
- ```
30
- [HARD STOP] Entry check failed for comet-verify
31
- Expected: phase=verify, verify_result=pending|null
32
- Actual: phase=<实际值>, verify_result=<实际值>
33
- Suggestion: Run comet-build first, or this change was already verified.
34
- ```
35
-
36
- 验证通过后才进入步骤 1
37
-
38
- ### 1. 改动规模评估
39
-
40
- 根据以下指标判定改动规模:
41
-
42
- | 指标 | 小(轻量验证) | 大(完整验证) |
43
- |------|---------------|---------------|
44
- | tasks.md 任务数 | ≤ 3 | > 3 |
45
- | 变更文件数(git diff --stat | ≤ 5 | > 5 |
46
- | 是否有 delta spec | | |
47
- | 是否新增 capability | | |
48
-
49
- **判定规则**:任一指标命中"" → 完整验证。全部命中"" → 轻量验证。
50
-
51
- 判定完成后,在 `openspec/changes/<name>/.comet.yaml` 中记录实际验证模式。`verify_mode` 只允许以下值之一:
52
-
53
- - `light`
54
- - `full`
55
-
56
- Few-shot 示例:
57
-
58
- ```yaml
59
- # 全部指标命中“小”
60
- phase: verify
61
- verify_mode: light
62
- verify_result: pending
63
- ```
64
-
65
- ```yaml
66
- # 任一指标命中”大”
67
- phase: verify
68
- verify_mode: full
69
- verify_result: pending
70
- ```
71
-
72
- 【写入验证】更新完成后必须验证:
73
- cat openspec/changes/<name>/.comet.yaml
74
- 确认 verify_mode 行的值为 “<light full>”
75
- 如不匹配,重试写入后再次验证。最多重试 2 次,仍失败则报告错误并终止。
76
-
77
- ### 2a. 轻量验证(小改动)
78
-
79
- 当规模评估结果为""时,跳过 `openspec-verify-change`,直接执行以下检查:
80
-
81
- 1. tasks.md 全部任务已完成 `[x]`
82
- 2. 改动文件与 tasks.md 描述一致(`git diff --stat` 对照 tasks 内容)
83
- 3. 编译通过(Maven 项目先执行 `mvn spotless:apply`,再执行 `mvn compile` 或等效命令)
84
- 4. 相关测试通过
85
- 5. 无明显安全问题(无硬编码密钥、无新增 unsafe 操作)
86
-
87
- **通过标准**:5 项全部 OK,无 CRITICAL 问题。
88
-
89
- **报告格式**:简表列出 5 项检查结果 + PASS/FAIL
90
-
91
- **跳过项**(不在轻量验证中检查):
92
- - spec scenario 覆盖率
93
- - design doc 一致性深度比对
94
- - code pattern consistency 建议
95
- - delta spec design doc 漂移检测
96
-
97
- ### 2b. 完整验证(大改动)
98
-
99
- 当规模评估结果为""时:
100
-
101
- **立即执行:** 使用 Skill 工具加载 `openspec-verify-change` 技能。禁止跳过此步骤。
102
-
103
- 技能加载后,按其指引验证。检查项:
104
- 1. tasks.md 全部任务已完成(`[x]`)
105
- 2. 实现符合 design.md 设计决策
106
- 3. 实现符合 brainstorming 设计文档
107
- 4. 能力规格场景全部通过
108
- 5. proposal.md 目标已满足
109
- 6. delta spec design doc 无矛盾(若 Build 阶段有增量修改 spec,检查 design doc 是否有对应记录)
110
- 7. `docs/superpowers/specs/` 关联的设计文档可定位(文件存在且与当前 change 相关)
111
-
112
- 验证不通过时:报告缺失项,返回阶段 3 补充(调用 `/comet-build`)。
113
-
114
- **Spec 漂移处理**:
115
- - 若检查项 6 发现矛盾(delta spec 有内容但 design doc 未体现),提示用户:
116
- - 选项 A:在 design doc 追加 "Implementation Divergence" 节记录偏差原因
117
- - 选项 B:回退到 Build 阶段,补充 brainstorming 更新 design doc
118
- - 选项 C:确认偏差可接受,继续验证(归档时 design doc 将标记为 `superseded-by-main-spec`)
119
-
120
- ### 3. 收尾(Superpowers
121
-
122
- **立即执行:** 使用 Skill 工具加载 `superpowers:finishing-a-development-branch` 技能。禁止跳过此步骤。
123
-
124
- `superpowers:finishing-a-development-branch` 不可用,停止流程并提示安装或启用 Superpowers 技能,不要用普通对话替代该步骤。
125
-
126
- 技能加载后,按其指引收尾。分支处理选项:
127
- 1. 本地合并到主分支
128
- 2. 推送并创建 PR
129
- 3. 保持分支(稍后处理)
130
- 4. 丢弃工作
131
-
132
- **确认项**:
133
- - Maven 测试或构建命令前已执行 `mvn spotless:apply`
134
- - 全部测试通过
135
- - 无遗留的 spotless 格式问题
136
- - 无硬编码密钥或安全问题
137
-
138
- ## 退出条件
139
-
140
- - 验证报告通过
141
- - 分支已处理
142
- - `.comet.yaml` `verify_result` 已记录为 `pass`
143
- - **阶段守卫**:运行 `bash $COMET_GUARD <change-name> verify`,全部 PASS 后才允许流转
144
-
145
- 退出前在 `.comet.yaml` 中合并更新以下字段(保留其他字段不变):
146
-
147
- ```yaml
148
- phase: archive
149
- verify_result: pass
150
- verified_at: YYYY-MM-DD
151
- ```
152
-
153
- 【写入验证】更新完成后必须验证:
154
- cat openspec/changes/<name>/.comet.yaml
155
- 确认 phase 行的值为 "archive"
156
- 确认 verify_result 行的值为 "pass"
157
- 确认 verified_at 行的值非空(格式为 YYYY-MM-DD
158
- 如任一字段不匹配,重试写入后再次验证。最多重试 2 次,仍失败则报告错误并终止。
159
-
160
- ## 自动流转
161
-
162
- 退出条件满足后,**无需等待用户再次输入**,直接执行下一阶段:
163
-
164
- > **REQUIRED NEXT SKILL:** 调用 `comet-archive` skill 进入归档阶段。
1
+ ---
2
+ name: comet-verify
3
+ description: "Comet Phase 4: Verify and Complete. Invoke with /comet-verify. Verify implementation matches design, handle development branch."
4
+ ---
5
+
6
+ # Comet Phase 4: Verify and Complete (Verify)
7
+
8
+ ## Prerequisites
9
+
10
+ - Code has been committed (Phase 3 complete)
11
+ - All tasks in tasks.md are complete
12
+
13
+ ## Steps
14
+
15
+ ### 0. Entry State Verification (Entry Check)
16
+
17
+ Before performing any operations, read and verify the current state:
18
+
19
+ **Checklist:**
20
+ 1. `openspec/changes/<name>/.comet.yaml` exists
21
+ 2. `phase` field value is `"verify"`
22
+ 3. `verify_result` field is `"pending"` or null (not yet verified)
23
+
24
+ **Verification method:**
25
+ - `cat openspec/changes/<name>/.comet.yaml` to read all fields
26
+ - If `verify_result` is already `"pass"`, this change has already been verified
27
+
28
+ **Failure output:**
29
+ ```
30
+ [HARD STOP] Entry check failed for comet-verify
31
+ Expected: phase=verify, verify_result=pending|null
32
+ Actual: phase=<actual-value>, verify_result=<actual-value>
33
+ Suggestion: Run comet-build first, or this change was already verified.
34
+ ```
35
+
36
+ Proceed to Step 1 only after verification passes.
37
+
38
+ ### 1. Change Scale Assessment
39
+
40
+ Determine change scale based on the following metrics:
41
+
42
+ | Metric | Small (lightweight verification) | Large (full verification) |
43
+ |------|-------------------------------|--------------------------|
44
+ | tasks.md task count | ≤ 3 | > 3 |
45
+ | Changed file count (git diff --stat) | ≤ 5 | > 5 |
46
+ | Has delta spec | No | Yes |
47
+ | New capability added | No | Yes |
48
+
49
+ **Decision rule**: Any metric hitting "large" → full verification. All hitting "small" → lightweight verification.
50
+
51
+ After determination, record actual verification mode in `openspec/changes/<name>/.comet.yaml`. `verify_mode` only allows one of the following values:
52
+
53
+ - `light`
54
+ - `full`
55
+
56
+ Few-shot examples:
57
+
58
+ ```yaml
59
+ # All metrics hit "small"
60
+ phase: verify
61
+ verify_mode: light
62
+ verify_result: pending
63
+ ```
64
+
65
+ ```yaml
66
+ # Any metric hits "large"
67
+ phase: verify
68
+ verify_mode: full
69
+ verify_result: pending
70
+ ```
71
+
72
+ 【Write verification】After update completion, must verify:
73
+ cat openspec/changes/<name>/.comet.yaml
74
+ Confirm verify_mode line value is "<light or full>"
75
+ If not matching, retry write then verify again. Maximum 2 retries, report error and terminate if still fails.
76
+
77
+ ### 2a. Lightweight Verification (Small Changes)
78
+
79
+ When scale assessment result is "small", skip `openspec-verify-change`, directly execute the following checks:
80
+
81
+ 1. All tasks in tasks.md completed `[x]`
82
+ 2. Changed files consistent with tasks.md description (`git diff --stat`对照 tasks content)
83
+ 3. Build passes (for Maven projects, first execute `mvn spotless:apply`, then execute `mvn compile` or equivalent command)
84
+ 4. Related tests pass
85
+ 5. No obvious security issues (no hardcoded secrets, no new unsafe operations)
86
+
87
+ **Pass standard**: All 5 items OK, no CRITICAL issues.
88
+
89
+ **Report format**: Brief table listing 5 check results + PASS/FAIL.
90
+
91
+ **Skipped items** (not checked in lightweight verification):
92
+ - spec scenario coverage
93
+ - design doc consistency deep comparison
94
+ - code pattern consistency recommendations
95
+ - delta spec and design doc drift detection
96
+
97
+ ### 2b. Full Verification (Large Changes)
98
+
99
+ When scale assessment result is "large":
100
+
101
+ **Immediately execute:** Use the Skill tool to load the `openspec-verify-change` skill. Skipping this step is prohibited.
102
+
103
+ After the skill loads, follow its guidance to verify. Check items:
104
+ 1. All tasks in tasks.md completed (`[x]`)
105
+ 2. Implementation matches design.md design decisions
106
+ 3. Implementation matches brainstorming design document
107
+ 4. All capability specification scenarios pass
108
+ 5. proposal.md goals satisfied
109
+ 6. No contradiction between delta spec and design doc (if Build phase had incremental spec modifications, check if design doc has corresponding records)
110
+ 7. `docs/superpowers/specs/` associated design document can be located (file exists and relates to current change)
111
+
112
+ When verification fails: report missing items, return to Phase 3 to supplement (invoke `/comet-build`).
113
+
114
+ **Spec drift handling**:
115
+ - If check item 6 finds contradiction (delta spec has content but design doc doesn't reflect it), prompt user:
116
+ - Option A: Append "Implementation Divergence" section to design doc recording deviation reason
117
+ - Option B: Roll back to Build phase, supplement brainstorming to update design doc
118
+ - Option C: Confirm deviation acceptable, continue verification (design doc will be marked as `superseded-by-main-spec` during archiving)
119
+
120
+ ### 3. Completion (Superpowers)
121
+
122
+ **Immediately execute:** Use the Skill tool to load the `superpowers:finishing-a-development-branch` skill. Skipping this step is prohibited.
123
+
124
+ If `superpowers:finishing-a-development-branch` is unavailable, stop the process and prompt to install or enable Superpowers skills. Do not substitute this step with normal conversation.
125
+
126
+ After the skill loads, follow its guidance to complete. Branch handling options:
127
+ 1. Local merge to main branch
128
+ 2. Push and create PR
129
+ 3. Keep branch (handle later)
130
+ 4. Discard work
131
+
132
+ **Confirmation items**:
133
+ - Maven test or build commands have executed `mvn spotless:apply`
134
+ - All tests pass
135
+ - No remaining spotless formatting issues
136
+ - No hardcoded secrets or security issues
137
+
138
+ ## Exit Conditions
139
+
140
+ - Verification report passed
141
+ - Branch handled
142
+ - `.comet.yaml` `verify_result` recorded as `pass`
143
+ - **Phase guard**: Run `bash $COMET_GUARD <change-name> verify`, allow transition only after all PASS
144
+
145
+ Before exit, merge and update the following fields in `.comet.yaml` (keep other fields unchanged):
146
+
147
+ ```yaml
148
+ phase: archive
149
+ verify_result: pass
150
+ verified_at: YYYY-MM-DD
151
+ ```
152
+
153
+ 【Write verification】After update completion, must verify:
154
+ cat openspec/changes/<name>/.comet.yaml
155
+ Confirm phase line value is "archive"
156
+ Confirm verify_result line value is "pass"
157
+ Confirm verified_at line value is non-empty (format YYYY-MM-DD)
158
+ If any field does not match, retry write then verify again. Maximum 2 retries, report error and terminate if still fails.
159
+
160
+ ## Automatic Transition
161
+
162
+ After exit conditions are met, **proceed immediately to the next phase without waiting for user input**:
163
+
164
+ > **REQUIRED NEXT SKILL:** Invoke `comet-archive` skill to enter the archiving phase.