@rpamis/comet 0.1.4 → 0.1.5

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,151 +1,151 @@
1
- ---
2
- name: comet-archive
3
- description: "Comet 阶段 5:归档。用 /comet-archive 调用。同步 delta spec 到主 spec,归档 change"
4
- ---
5
-
6
- # Comet 阶段 5:归档(Archive
7
-
8
- ## 前置条件
9
-
10
- - 验证已通过(阶段 4 完成)
11
- - 分支已处理
12
- - `openspec/changes/<name>/.comet.yaml` 中 `verify_result: pass`
13
-
14
- ## 步骤
15
-
16
- ### 0. 入口状态验证(Entry Check
17
-
18
- 在执行任何操作之前,读取并验证当前状态:
19
-
20
- **检查清单:**
21
- 1. `openspec/changes/<name>/.comet.yaml` 存在
22
- 2. `phase` 字段的值为 `"archive"`
23
- 3. `verify_result` 字段的值为 `"pass"`
24
- 4. `archived` 字段为 `"false"` null(尚未归档)
25
-
26
- **验证方式:**
27
- - `cat openspec/changes/<name>/.comet.yaml` 读取全部字段
28
- - `verify_result` 不是 `"pass"`,必须先完成验证
29
-
30
- **失败输出:**
31
- ```
32
- [HARD STOP] Entry check failed for comet-archive
33
- Expected: phase=archive, verify_result=pass, archived=false|null
34
- Actual: phase=<实际值>, verify_result=<实际值>, archived=<实际值>
35
- Suggestion: Run comet-verify first, or this change was already archived.
36
- ```
37
-
38
- 验证通过后才进入步骤 1
39
-
40
- ### 1. 执行归档
41
-
42
- 归档前如 `verify_result` 不是 `pass`,停止归档并返回 `/comet-verify`。
43
-
44
- **立即执行:** 使用 Skill 工具加载 `openspec-archive-change` 技能。禁止跳过此步骤。
45
-
46
- 技能加载后,按其指引归档。自动检查:
47
- 1. artifact 完成状态(proposaldesignspecstasks
48
- 2. 所有任务已标记 `[x]`
49
- 3. delta specs 同步状态
50
-
51
- ### 1b. 移动 Comet 状态文件
52
-
53
- `openspec-archive-change` 不感知 `.comet.yaml`,因此 Comet 需要在 OpenSpec 归档完成后自行移动该文件:
54
-
55
- ```bash
56
- mv openspec/changes/<name>/.comet.yaml openspec/changes/archive/YYYY-MM-DD-<name>/.comet.yaml
57
- ```
58
-
59
- 【写入验证】移动完成后必须验证:
60
- test -f openspec/changes/archive/YYYY-MM-DD-<name>/.comet.yaml
61
- 确认归档目录中 .comet.yaml 存在
62
- 如文件不在预期位置,检查 mv 命令是否成功执行。
63
-
64
- ### 2. Delta Spec 同步
65
-
66
- 归档时将 delta specs 同步到主 specs
67
-
68
- ```
69
- openspec/changes/<name>/specs/<capability>/spec.md
70
- 同步
71
- openspec/specs/<capability>/spec.md ← spec(持久化)
72
- ```
73
-
74
- ### 3. Design Doc & Plan 处理
75
-
76
- 归档时同步处理 `docs/superpowers/` 下的关联文件。若目标文件已有 YAML frontmatter,将归档字段合并到现有 frontmatter;若没有 frontmatter,才新建一组 frontmatter
77
-
78
- **3a. Design Doc 一致性标注**
79
-
80
- 查找 `docs/superpowers/specs/` 中与当前 change 关联的设计文档:
81
- - 对比 delta spec 最终版与 design doc 内容
82
- - 如有偏差(实施过程中 spec 发生了增量修改),在 design doc YAML frontmatter 中设置以下元数据:
83
-
84
- ```yaml
85
- ---
86
- archived-with: YYYY-MM-DD-<name>
87
- status: superseded-by-main-spec
88
- implementation-notes: |
89
- <简述实施过程中偏离原设计的关键变化>
90
- ---
91
- ```
92
-
93
- - 如完全一致,仅设置:
94
-
95
- ```yaml
96
- ---
97
- archived-with: YYYY-MM-DD-<name>
98
- status: final
99
- ---
100
- ```
101
-
102
- **3b. Plan 关联标注**
103
-
104
- 查找 `docs/superpowers/plans/` 中与当前 change 关联的实施计划,在 YAML frontmatter 中设置相同的 `archived-with` 元数据。
105
-
106
- ### 4. 归档目录
107
-
108
- change 移入归档目录:
109
-
110
- ```
111
- openspec/changes/archive/YYYY-MM-DD-<name>/
112
- ├── .openspec.yaml
113
- ├── .comet.yaml
114
- ├── proposal.md
115
- ├── design.md
116
- ├── specs/<capability>/spec.md
117
- └── tasks.md
118
- ```
119
-
120
- ### 5. 生命周期闭环
121
-
122
- Spec 生命周期在此完成:
123
- ```
124
- brainstorming → delta spec → 实施(增量修改)→ 验证 spec 同步 → design doc 标注归档
125
- ```
126
-
127
- ## 退出条件
128
-
129
- - change 已归档(从活跃列表移除)
130
- - specs 已更新(delta → main 同步完成)
131
- - 关联 design doc 已标注归档状态
132
- - 关联 plan 已标注归档状态
133
- - `.comet.yaml` `archived` 已记录为 `true`
134
- - **阶段守卫**:运行 `bash $COMET_GUARD <change-name> archive`,全部 PASS 后确认归档完整
135
-
136
- 归档完成后,在归档目录的 `.comet.yaml` 中更新:
137
-
138
- ```yaml
139
- phase: archive
140
- archived: true
141
- ```
142
-
143
- 【写入验证】更新完成后必须验证:
144
- cat openspec/changes/archive/YYYY-MM-DD-<name>/.comet.yaml
145
- 确认 phase 行的值为 "archive"
146
- 确认 archived 行的值为 "true"
147
- 如任一字段不匹配,重试写入后再次验证。最多重试 2 次,仍失败则报告错误并终止。
148
-
149
- ## 完成
150
-
151
- Comet 流程全部完成。如需开始新工作,调用 `/comet` `/comet-open`。
1
+ ---
2
+ name: comet-archive
3
+ description: "Comet Phase 5: Archive. Invoke with /comet-archive. Sync delta spec to main spec, archive change."
4
+ ---
5
+
6
+ # Comet Phase 5: Archive (Archive)
7
+
8
+ ## Prerequisites
9
+
10
+ - Verification passed (Phase 4 complete)
11
+ - Branch handled
12
+ - `verify_result: pass` in `openspec/changes/<name>/.comet.yaml`
13
+
14
+ ## Steps
15
+
16
+ ### 0. Entry State Verification (Entry Check)
17
+
18
+ Before performing any operations, read and verify the current state:
19
+
20
+ **Checklist:**
21
+ 1. `openspec/changes/<name>/.comet.yaml` exists
22
+ 2. `phase` field value is `"archive"`
23
+ 3. `verify_result` field value is `"pass"`
24
+ 4. `archived` field is `"false"` or null (not yet archived)
25
+
26
+ **Verification method:**
27
+ - `cat openspec/changes/<name>/.comet.yaml` to read all fields
28
+ - If `verify_result` is not `"pass"`, must complete verification first
29
+
30
+ **Failure output:**
31
+ ```
32
+ [HARD STOP] Entry check failed for comet-archive
33
+ Expected: phase=archive, verify_result=pass, archived=false|null
34
+ Actual: phase=<actual-value>, verify_result=<actual-value>, archived=<actual-value>
35
+ Suggestion: Run comet-verify first, or this change was already archived.
36
+ ```
37
+
38
+ Proceed to Step 1 only after verification passes.
39
+
40
+ ### 1. Execute Archive
41
+
42
+ Before archiving, if `verify_result` is not `pass`, stop archiving and return to `/comet-verify`.
43
+
44
+ **Immediately execute:** Use the Skill tool to load the `openspec-archive-change` skill. Skipping this step is prohibited.
45
+
46
+ After the skill loads, follow its guidance to archive. Automatic checks:
47
+ 1. Artifact completion status (proposal, design, specs, tasks)
48
+ 2. All tasks marked `[x]`
49
+ 3. Delta specs sync status
50
+
51
+ ### 1b. Move Comet State File
52
+
53
+ `openspec-archive-change` is not aware of `.comet.yaml`, so Comet needs to move this file itself after OpenSpec archiving completes:
54
+
55
+ ```bash
56
+ mv openspec/changes/<name>/.comet.yaml openspec/changes/archive/YYYY-MM-DD-<name>/.comet.yaml
57
+ ```
58
+
59
+ 【Write verification】After move completion, must verify:
60
+ test -f openspec/changes/archive/YYYY-MM-DD-<name>/.comet.yaml
61
+ Confirm .comet.yaml exists in archive directory
62
+ If file is not at expected location, check if mv command executed successfully.
63
+
64
+ ### 2. Delta Spec Sync
65
+
66
+ Sync delta specs to main specs during archiving:
67
+
68
+ ```
69
+ openspec/changes/<name>/specs/<capability>/spec.md
70
+ sync
71
+ openspec/specs/<capability>/spec.md ← main spec (persistent)
72
+ ```
73
+
74
+ ### 3. Design Doc & Plan Handling
75
+
76
+ Handle associated files under `docs/superpowers/` during archiving. If target file already has YAML frontmatter, merge archive fields into existing frontmatter; if no frontmatter, create new frontmatter.
77
+
78
+ **3a. Design Doc Consistency Annotation**
79
+
80
+ Find design documents associated with current change in `docs/superpowers/specs/`:
81
+ - Compare delta spec final version with design doc content
82
+ - If there are discrepancies (incremental spec modifications during implementation), set the following metadata in design doc's YAML frontmatter:
83
+
84
+ ```yaml
85
+ ---
86
+ archived-with: YYYY-MM-DD-<name>
87
+ status: superseded-by-main-spec
88
+ implementation-notes: |
89
+ <briefly describe key changes deviating from original design during implementation>
90
+ ---
91
+ ```
92
+
93
+ - If completely consistent, only set:
94
+
95
+ ```yaml
96
+ ---
97
+ archived-with: YYYY-MM-DD-<name>
98
+ status: final
99
+ ---
100
+ ```
101
+
102
+ **3b. Plan Association Annotation**
103
+
104
+ Find implementation plans associated with current change in `docs/superpowers/plans/`, set the same `archived-with` metadata in YAML frontmatter.
105
+
106
+ ### 4. Archive Directory
107
+
108
+ Change moves to archive directory:
109
+
110
+ ```
111
+ openspec/changes/archive/YYYY-MM-DD-<name>/
112
+ ├── .openspec.yaml
113
+ ├── .comet.yaml
114
+ ├── proposal.md
115
+ ├── design.md
116
+ ├── specs/<capability>/spec.md
117
+ └── tasks.md
118
+ ```
119
+
120
+ ### 5. Lifecycle Closed Loop
121
+
122
+ Spec lifecycle completes here:
123
+ ```
124
+ brainstorming → delta spec → implementation (incremental modifications) verification → main spec sync → design doc annotationarchive
125
+ ```
126
+
127
+ ## Exit Conditions
128
+
129
+ - Change archived (removed from active list)
130
+ - Main specs updated (delta → main sync complete)
131
+ - Associated design doc annotated with archive status
132
+ - Associated plan annotated with archive status
133
+ - `.comet.yaml` `archived` recorded as `true`
134
+ - **Phase guard**: Run `bash $COMET_GUARD <change-name> archive`, confirm archive complete after all PASS
135
+
136
+ After archiving completes, update `.comet.yaml` in archive directory:
137
+
138
+ ```yaml
139
+ phase: archive
140
+ archived: true
141
+ ```
142
+
143
+ 【Write verification】After update completion, must verify:
144
+ cat openspec/changes/archive/YYYY-MM-DD-<name>/.comet.yaml
145
+ Confirm phase line value is "archive"
146
+ Confirm archived line value is "true"
147
+ If any field does not match, retry write then verify again. Maximum 2 retries, report error and terminate if still fails.
148
+
149
+ ## Complete
150
+
151
+ Comet workflow complete. To start new work, invoke `/comet` or `/comet-open`.
@@ -1,161 +1,161 @@
1
- ---
2
- name: comet-build
3
- description: "Comet 阶段 3:计划与构建。用 /comet-build 调用。制定计划并通过 subagent-driven-development 执行实施。"
4
- ---
5
-
6
- # Comet 阶段 3:计划与构建(Build
7
-
8
- ## 前置条件
9
-
10
- - Design Doc 已创建(阶段 2 完成)
11
- - 活跃 change 存在
12
-
13
- ## 步骤
14
-
15
- ### 0. 入口状态验证(Entry Check
16
-
17
- 在执行任何操作之前,读取并验证当前状态:
18
-
19
- **检查清单:**
20
- 1. `openspec/changes/<name>/.comet.yaml` 存在
21
- 2. `phase` 字段的值为 `"build"`
22
- 3. `design_doc` 字段非 null 且非空
23
- 4. `design_doc` 引用的文件存在(例如 `docs/superpowers/specs/YYYY-MM-DD-topic-design.md`)
24
- 5. `openspec/changes/<name>/proposal.md` 存在且非空
25
- 6. `openspec/changes/<name>/tasks.md` 存在且非空
26
-
27
- **验证方式:**
28
- - `cat openspec/changes/<name>/.comet.yaml` 读取全部字段
29
- - `ls` `test -f` 确认 design_doc 文件存在
30
-
31
- **失败输出:**
32
- ```
33
- [HARD STOP] Entry check failed for comet-build
34
- Expected: phase=build, design_doc=<path> exists
35
- Actual: phase=<实际值>, design_doc=<实际值或文件不存在>
36
- Suggestion: Run comet-design first, or verify design_doc file exists.
37
- ```
38
-
39
- 验证通过后才进入步骤 1
40
-
41
- ### 1. 制定计划
42
-
43
- **立即执行:** 使用 Skill 工具加载 `superpowers:writing-plans` 技能。禁止跳过此步骤。
44
-
45
- 技能加载后,按其指引制定计划。计划要求:
46
- - 保存至 `docs/superpowers/plans/YYYY-MM-DD-<feature>.md`
47
- - 引用设计文档,拆分为可执行任务
48
- - **Plan 文件头必须包含关联元数据**:
49
-
50
- ```yaml
51
- ---
52
- change: <openspec-change-name>
53
- design-doc: docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md
54
- ---
55
- ```
56
-
57
- ### 2. 更新计划状态
58
-
59
- `openspec/changes/<name>/.comet.yaml` 中合并更新以下字段(保留其他字段不变):
60
-
61
- ```yaml
62
- phase: build
63
- plan: docs/superpowers/plans/YYYY-MM-DD-feature.md
64
- ```
65
-
66
- 【写入验证】更新完成后必须验证:
67
- cat openspec/changes/<name>/.comet.yaml
68
- 确认 plan 行的值为 "docs/superpowers/plans/YYYY-MM-DD-feature.md"
69
- 如不匹配,重试写入后再次验证。最多重试 2 次,仍失败则报告错误并终止。
70
-
71
- ### 3. 选择执行方式
72
-
73
- 向用户展示计划摘要(任务数、涉及模块),然后询问执行方式:
74
-
75
- | 选项 | 技能 | 适用场景 |
76
- |------|------|---------|
77
- | A | `superpowers:subagent-driven-development` | 任务独立、复杂度高、需要双阶段审查 |
78
- | B | `superpowers:executing-plans` | 任务简单、无子agent环境、轻量快速 |
79
-
80
- **推荐规则**:
81
- - 任务数 ≥ 3 → 推荐 A
82
- - 任务数 ≤ 2 且无跨模块依赖推荐 B
83
- - 来自 hotfix 路径推荐 B
84
-
85
- 用户选择后,在 `openspec/changes/<name>/.comet.yaml` 中合并更新 `build_mode`(保留其他字段不变)。`build_mode` 只允许以下值之一:
86
-
87
- - `subagent-driven-development`
88
- - `executing-plans`
89
- - `direct`(仅 hotfix preset 使用)
90
-
91
- Few-shot 示例:
92
-
93
- ```yaml
94
- # 用户选择稳健模式 / A
95
- build_mode: subagent-driven-development
96
- ```
97
-
98
- ```yaml
99
- # 用户选择快速模式 / B
100
- build_mode: executing-plans
101
- ```
102
-
103
- 【写入验证】更新完成后必须验证:
104
- cat openspec/changes/<name>/.comet.yaml
105
- 确认 build_mode 行的值为 "<subagent-driven-development executing-plans direct>"
106
- 如不匹配,重试写入后再次验证。最多重试 2 次,仍失败则报告错误并终止。
107
-
108
- 然后,**立即执行:** 使用 Skill 工具加载对应技能。禁止跳过此步骤。
109
-
110
- 如所选 Superpowers 技能不可用,停止流程并提示安装或启用对应技能,不要用普通对话替代该步骤。
111
-
112
- 技能加载后,按其指引执行:
113
- - 按计划执行任务
114
- - 完成 tasks.md 勾选(`- [ ]` → `- [x]`)
115
- - 每个任务完成后提交代码
116
-
117
- ### 4. Spec 增量更新
118
-
119
- 实施过程中发现初版 spec 不完整时,按变更规模分级处理:
120
-
121
- | 规模 | 触发条件 | 做法 |
122
- |------|---------|------|
123
- | | 遗漏验收场景、边界条件 | 直接编辑 delta spec + design.md,追加 tasks.md 任务 |
124
- | | 接口变更、新增组件、数据流变化 | 重新 `superpowers:brainstorming` 更新 Design Doc + delta spec |
125
- | | 全新 capability 需求 | `/opsx:new` 创建独立 change |
126
-
127
- **50% 阈值判定**:以 tasks.md 初始任务总数为基准,若新增任务数超过该总数的一半,视为超出原计划范围,应考虑拆分为新 change
128
-
129
- **原则**:
130
- - delta spec 是活文档,本阶段期间随时可修改
131
- - 每次更新应提交,commit message 说明变更原因
132
- - 不提前同步到 main spec,归档时统一同步
133
- - 如增量任务超过原 tasks.md 初始任务总数 50%,考虑拆分为新 change
134
- - 小规模增量直接改 delta spec 时,应在 commit message 中注明,便于归档时判断 design doc 漂移
135
-
136
- ## 退出条件
137
-
138
- - tasks.md 全部勾选
139
- - 代码已提交
140
- - 测试通过
141
- - `.comet.yaml` `phase` 已更新为 `verify`
142
- - **阶段守卫**:运行 `bash $COMET_GUARD <change-name> build`,全部 PASS 后才允许流转
143
-
144
- 退出前在 `.comet.yaml` 中合并更新以下字段(保留其他字段不变):
145
-
146
- ```yaml
147
- phase: verify
148
- verify_result: pending
149
- ```
150
-
151
- 【写入验证】更新完成后必须验证:
152
- cat openspec/changes/<name>/.comet.yaml
153
- 确认 phase 行的值为 "verify"
154
- 确认 verify_result 行的值为 "pending"
155
- 如任一字段不匹配,重试写入后再次验证。最多重试 2 次,仍失败则报告错误并终止。
156
-
157
- ## 自动流转
158
-
159
- 退出条件满足后,**无需等待用户再次输入**,直接执行下一阶段:
160
-
161
- > **REQUIRED NEXT SKILL:** 调用 `comet-verify` skill 进入验证与收尾阶段。
1
+ ---
2
+ name: comet-build
3
+ description: "Comet Phase 3: Plan and Build. Invoke with /comet-build. Create plans and execute implementation through subagent-driven-development."
4
+ ---
5
+
6
+ # Comet Phase 3: Plan and Build (Build)
7
+
8
+ ## Prerequisites
9
+
10
+ - Design Doc has been created (Phase 2 complete)
11
+ - Active change exists
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 `"build"`
22
+ 3. `design_doc` field is non-null and non-empty
23
+ 4. File referenced by `design_doc` exists (e.g., `docs/superpowers/specs/YYYY-MM-DD-topic-design.md`)
24
+ 5. `openspec/changes/<name>/proposal.md` exists and is non-empty
25
+ 6. `openspec/changes/<name>/tasks.md` exists and is non-empty
26
+
27
+ **Verification method:**
28
+ - `cat openspec/changes/<name>/.comet.yaml` to read all fields
29
+ - Use `ls` or `test -f` to confirm design_doc file exists
30
+
31
+ **Failure output:**
32
+ ```
33
+ [HARD STOP] Entry check failed for comet-build
34
+ Expected: phase=build, design_doc=<path> exists
35
+ Actual: phase=<actual-value>, design_doc=<actual-value or file does not exist>
36
+ Suggestion: Run comet-design first, or verify design_doc file exists.
37
+ ```
38
+
39
+ Proceed to Step 1 only after verification passes.
40
+
41
+ ### 1. Create Plan
42
+
43
+ **Immediately execute:** Use the Skill tool to load the `superpowers:writing-plans` skill. Skipping this step is prohibited.
44
+
45
+ After the skill loads, follow its guidance to create a plan. Plan requirements:
46
+ - Save to `docs/superpowers/plans/YYYY-MM-DD-<feature>.md`
47
+ - Reference design document, break down into executable tasks
48
+ - **Plan file header must contain associated metadata**:
49
+
50
+ ```yaml
51
+ ---
52
+ change: <openspec-change-name>
53
+ design-doc: docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md
54
+ ---
55
+ ```
56
+
57
+ ### 2. Update Plan Status
58
+
59
+ Merge and update the following fields in `openspec/changes/<name>/.comet.yaml` (keep other fields unchanged):
60
+
61
+ ```yaml
62
+ phase: build
63
+ plan: docs/superpowers/plans/YYYY-MM-DD-feature.md
64
+ ```
65
+
66
+ 【Write verification】After update completion, must verify:
67
+ cat openspec/changes/<name>/.comet.yaml
68
+ Confirm plan line value is "docs/superpowers/plans/YYYY-MM-DD-feature.md"
69
+ If not matching, retry write then verify again. Maximum 2 retries, report error and terminate if still fails.
70
+
71
+ ### 3. Select Execution Method
72
+
73
+ Present plan summary to user (task count, involved modules), then ask for execution method:
74
+
75
+ | Option | Skill | Applicable Scenario |
76
+ |------|------|-------------------|
77
+ | A | `superpowers:subagent-driven-development` | Independent tasks, high complexity, requires two-phase review |
78
+ | B | `superpowers:executing-plans` | Simple tasks, no subagent environment, lightweight and fast |
79
+
80
+ **Recommendation rules**:
81
+ - Task count ≥ 3 → Recommend A
82
+ - Task count ≤ 2 and no cross-module dependencies Recommend B
83
+ - From hotfix pathRecommend B
84
+
85
+ After user selection, merge and update `build_mode` in `openspec/changes/<name>/.comet.yaml` (keep other fields unchanged). `build_mode` only allows one of the following values:
86
+
87
+ - `subagent-driven-development`
88
+ - `executing-plans`
89
+ - `direct` (only for hotfix preset use)
90
+
91
+ Few-shot examples:
92
+
93
+ ```yaml
94
+ # User selects robust mode / A
95
+ build_mode: subagent-driven-development
96
+ ```
97
+
98
+ ```yaml
99
+ # User selects fast mode / B
100
+ build_mode: executing-plans
101
+ ```
102
+
103
+ 【Write verification】After update completion, must verify:
104
+ cat openspec/changes/<name>/.comet.yaml
105
+ Confirm build_mode line value is "<subagent-driven-development or executing-plans or direct>"
106
+ If not matching, retry write then verify again. Maximum 2 retries, report error and terminate if still fails.
107
+
108
+ Then, **immediately execute:** Use the Skill tool to load the corresponding skill. Skipping this step is prohibited.
109
+
110
+ If the selected Superpowers skill is unavailable, stop the process and prompt to install or enable the corresponding skill. Do not substitute this step with normal conversation.
111
+
112
+ After the skill loads, follow its guidance to execute:
113
+ - Execute tasks according to plan
114
+ - Complete tasks.md check (`- [ ]` → `- [x]`)
115
+ - Commit code after each task completion
116
+
117
+ ### 4. Spec Incremental Updates
118
+
119
+ When the initial spec is found incomplete during implementation, handle by scale:
120
+
121
+ | Scale | Trigger Conditions | Approach |
122
+ |------|-------------------|----------|
123
+ | Small | Missing acceptance scenarios, edge cases | Directly edit delta spec + design.md, append tasks.md tasks |
124
+ | Medium | Interface changes, new components, data flow changes | Re-run `superpowers:brainstorming` to update Design Doc + delta spec |
125
+ | Large | Brand-new capability requirements | `/opsx:new` to create independent change |
126
+
127
+ **50% Threshold Determination**: Using initial task count in tasks.md as baseline, if new tasks exceed half of that total, it's considered outside original plan scope, should consider splitting into new change.
128
+
129
+ **Principles**:
130
+ - Delta spec is a living document, can be modified at any time during this phase
131
+ - Each update should be committed with commit message explaining the change reason
132
+ - Do not sync to main spec in advance, sync uniformly during archiving
133
+ - If incremental tasks exceed 50% of initial tasks.md total task count, consider splitting into new change
134
+ - For small-scale incremental direct delta spec edits, note in commit message to facilitate design doc drift assessment during archiving
135
+
136
+ ## Exit Conditions
137
+
138
+ - All tasks.md checked
139
+ - Code committed
140
+ - Tests pass
141
+ - `.comet.yaml` `phase` updated to `verify`
142
+ - **Phase guard**: Run `bash $COMET_GUARD <change-name> build`, allow transition only after all PASS
143
+
144
+ Before exit, merge and update the following fields in `.comet.yaml` (keep other fields unchanged):
145
+
146
+ ```yaml
147
+ phase: verify
148
+ verify_result: pending
149
+ ```
150
+
151
+ 【Write verification】After update completion, must verify:
152
+ cat openspec/changes/<name>/.comet.yaml
153
+ Confirm phase line value is "verify"
154
+ Confirm verify_result line value is "pending"
155
+ If any field does not match, retry write then verify again. Maximum 2 retries, report error and terminate if still fails.
156
+
157
+ ## Automatic Transition
158
+
159
+ After exit conditions are met, **proceed immediately to the next phase without waiting for user input**:
160
+
161
+ > **REQUIRED NEXT SKILL:** Invoke `comet-verify` skill to enter the verification and completion phase.