@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,161 +1,203 @@
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. Workspace Isolation
72
+
73
+ Plan has been written to the current branch. Before starting execution, choose workspace isolation method:
74
+
75
+ | Option | Method | Description |
76
+ |--------|--------|-------------|
77
+ | A | Create branch | Create a new branch in the current repo, simple and fast |
78
+ | B | Create Worktree | Isolated workspace, fully independent, suitable for parallel development |
79
+
80
+ **Recommendation rules**:
81
+ - Change involves 3 files Recommend A
82
+ - Need parallel development, current branch has uncommitted work Recommend B
83
+
84
+ After user selection, merge and update `isolation` in `openspec/changes/<name>/.comet.yaml` (keep other fields unchanged). `isolation` only allows one of the following values:
85
+
86
+ - `branch`
87
+ - `worktree`
88
+
89
+ Few-shot examples:
90
+
91
+ ```yaml
92
+ # User selects create branch / A
93
+ isolation: branch
94
+ ```
95
+
96
+ ```yaml
97
+ # User selects create worktree / B
98
+ isolation: worktree
99
+ ```
100
+
101
+ 【Write verification】After update completion, must verify:
102
+ cat openspec/changes/<name>/.comet.yaml
103
+ Confirm isolation line value is "<branch or worktree>"
104
+ If not matching, retry write then verify again. Maximum 2 retries, report error and terminate if still fails.
105
+
106
+ **Execute isolation**:
107
+
108
+ - **branch**: Run `git checkout -b <change-name>`, subsequent work on the new branch
109
+ - **worktree**: Invoke `superpowers:using-git-worktrees` skill or use native `EnterWorktree` tool to create isolated workspace
110
+
111
+ After creating isolation, confirm plan file is accessible (naturally accessible with branch method; for worktree method, confirm plan has been committed).
112
+
113
+ ### 4. Select Execution Method
114
+
115
+ Present plan summary to user (task count, involved modules), then ask for execution method:
116
+
117
+ | Option | Skill | Applicable Scenario |
118
+ |------|------|-------------------|
119
+ | A | `superpowers:subagent-driven-development` | Independent tasks, high complexity, requires two-phase review |
120
+ | B | `superpowers:executing-plans` | Simple tasks, no subagent environment, lightweight and fast |
121
+
122
+ **Recommendation rules**:
123
+ - Task count 3 Recommend A
124
+ - Task count 2 and no cross-module dependencies Recommend B
125
+ - From hotfix path Recommend B
126
+
127
+ 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:
128
+
129
+ - `subagent-driven-development`
130
+ - `executing-plans`
131
+ - `direct` (only for hotfix preset use)
132
+
133
+ Few-shot examples:
134
+
135
+ ```yaml
136
+ # User selects robust mode / A
137
+ build_mode: subagent-driven-development
138
+ ```
139
+
140
+ ```yaml
141
+ # User selects fast mode / B
142
+ build_mode: executing-plans
143
+ ```
144
+
145
+ 【Write verification】After update completion, must verify:
146
+ cat openspec/changes/<name>/.comet.yaml
147
+ Confirm build_mode line value is "<subagent-driven-development or executing-plans or direct>"
148
+ If not matching, retry write then verify again. Maximum 2 retries, report error and terminate if still fails.
149
+
150
+ Then, **immediately execute:** Use the Skill tool to load the corresponding skill. Skipping this step is prohibited.
151
+
152
+ 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.
153
+
154
+ After the skill loads, follow its guidance to execute:
155
+ - Execute tasks according to plan
156
+ - Complete tasks.md check (`- [ ]` → `- [x]`)
157
+ - Commit code after each task completion
158
+
159
+ ### 5. Spec Incremental Updates
160
+
161
+ When the initial spec is found incomplete during implementation, handle by scale:
162
+
163
+ | Scale | Trigger Conditions | Approach |
164
+ |------|-------------------|----------|
165
+ | Small | Missing acceptance scenarios, edge cases | Directly edit delta spec + design.md, append tasks.md tasks |
166
+ | Medium | Interface changes, new components, data flow changes | Re-run `superpowers:brainstorming` to update Design Doc + delta spec |
167
+ | Large | Brand-new capability requirements | `/opsx:new` to create independent change |
168
+
169
+ **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.
170
+
171
+ **Principles**:
172
+ - Delta spec is a living document, can be modified at any time during this phase
173
+ - Each update should be committed with commit message explaining the change reason
174
+ - Do not sync to main spec in advance, sync uniformly during archiving
175
+ - If incremental tasks exceed 50% of initial tasks.md total task count, consider splitting into new change
176
+ - For small-scale incremental direct delta spec edits, note in commit message to facilitate design doc drift assessment during archiving
177
+
178
+ ## Exit Conditions
179
+
180
+ - All tasks.md checked
181
+ - Code committed
182
+ - Tests pass
183
+ - `.comet.yaml` `phase` updated to `verify`
184
+ - **Phase guard**: Run `bash $COMET_GUARD <change-name> build`, allow transition only after all PASS
185
+
186
+ Before exit, merge and update the following fields in `.comet.yaml` (keep other fields unchanged):
187
+
188
+ ```yaml
189
+ phase: verify
190
+ verify_result: pending
191
+ ```
192
+
193
+ 【Write verification】After update completion, must verify:
194
+ cat openspec/changes/<name>/.comet.yaml
195
+ Confirm phase line value is "verify"
196
+ Confirm verify_result line value is "pending"
197
+ If any field does not match, retry write then verify again. Maximum 2 retries, report error and terminate if still fails.
198
+
199
+ ## Automatic Transition
200
+
201
+ After exit conditions are met, **proceed immediately to the next phase without waiting for user input**:
202
+
203
+ > **REQUIRED NEXT SKILL:** Invoke `comet-verify` skill to enter the verification and completion phase.
@@ -1,108 +1,108 @@
1
- ---
2
- name: comet-design
3
- description: "Comet 阶段 2:深度设计。用 /comet-design 调用。通过 brainstorming 产出 Design Doc delta spec"
4
- ---
5
-
6
- # Comet 阶段 2:深度设计(Design
7
-
8
- ## 前置条件
9
-
10
- - 活跃 change 已存在(proposal.mddesign.mdtasks.md
11
- - Design Doc(`docs/superpowers/specs/` 下无对应文件)
12
-
13
- ## 步骤
14
-
15
- ### 0. 入口状态验证(Entry Check
16
-
17
- 在执行任何操作之前,读取并验证当前状态:
18
-
19
- **检查清单:**
20
- 1. `openspec/changes/<name>/.comet.yaml` 存在
21
- 2. `phase` 字段的值为 `"design"`
22
- 3. `workflow` 字段的值为 `"full"`
23
- 4. `design_doc` 字段为 `null` 或空
24
- 5. `openspec/changes/<name>/proposal.md` 存在且非空
25
- 6. `openspec/changes/<name>/design.md` 存在且非空
26
- 7. `openspec/changes/<name>/tasks.md` 存在且非空
27
-
28
- **验证方式:**
29
- - `cat openspec/changes/<name>/.comet.yaml` 读取全部字段
30
- - 逐条比对检查清单
31
-
32
- **失败输出:**
33
- ```
34
- [HARD STOP] Entry check failed for comet-design
35
- Expected: phase=design, design_doc=<empty/null>, workflow=full
36
- Actual: phase=<实际值>, design_doc=<实际值>, workflow=<实际值>
37
- Suggestion: Run comet-open first, or check if .comet.yaml was modified out of sequence.
38
- ```
39
-
40
- 验证通过后才进入步骤 1
41
-
42
- ### 1a. 读取已有上下文
43
-
44
- 读取活跃 change 下的 `proposal.md` `design.md`,将核心内容整理为摘要:
45
- - **proposal 摘要**:目标、动机、范围
46
- - **design 摘要**:架构决策、高层设计
47
-
48
- ### 1b. 执行 Brainstorming(带上下文)
49
-
50
- **立即执行:** 使用 Skill 工具加载 `superpowers:brainstorming` 技能,ARGUMENTS 包含:
51
-
52
- ```
53
- Change: <change-name>
54
- Proposal 摘要: <proposal 核心内容>
55
- Design 摘要: <design.md 架构决策>
56
- 跳过上下文探索,直接进入设计提问。
57
- ```
58
-
59
- 禁止跳过此步骤,禁止在未加载该技能的情况下继续。
60
-
61
- `superpowers:brainstorming` 不可用,停止流程并提示安装或启用 Superpowers 技能,不要用普通对话替代该步骤。
62
-
63
- 技能加载后,按其指引产出:
64
- - `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md` — 设计文档(技术 RFC
65
- - `openspec/changes/<name>/specs/<capability>/spec.md` — 能力规格(delta
66
-
67
- ### 2. 更新 Comet 状态
68
-
69
- `openspec/changes/<name>/.comet.yaml` 中合并更新以下字段(保留其他字段不变):
70
-
71
- ```yaml
72
- phase: build
73
- design_doc: docs/superpowers/specs/YYYY-MM-DD-topic-design.md
74
- ```
75
-
76
- 【写入验证】更新完成后必须验证:
77
- cat openspec/changes/<name>/.comet.yaml
78
- 确认 phase 行的值为 "build"
79
- 确认 design_doc 行的值为 "docs/superpowers/specs/YYYY-MM-DD-topic-design.md"
80
- 如任一字段不匹配,重试写入后再次验证。最多重试 2 次,仍失败则报告错误并终止。
81
-
82
- ### 3. Spec 分工
83
-
84
- | Spec 类型 | 归属 | 存放位置 | 定义 |
85
- |-----------|------|---------|------|
86
- | 能力规格 | OpenSpec | `openspec/changes/<name>/specs/` | 系统应该做什么(需求 + 验收场景) |
87
- | 设计文档 | Superpowers | `docs/superpowers/specs/` | 怎么构建(技术架构 + 实现细节) |
88
-
89
- ### 4. 文档层级确认
90
-
91
- ```
92
- proposal.md(阶段 1 → Why + What
93
- design.md(阶段 1OpenSpec高层架构决策
94
- 设计文档(阶段 2Superpowers深度技术设计
95
- 能力规格(阶段 2delta需求 + 验收场景
96
- ```
97
-
98
- ## 退出条件
99
-
100
- - Design Doc 已创建并保存
101
- - 如有新能力则 delta spec 已创建
102
- - **阶段守卫**:运行 `bash $COMET_GUARD <change-name> design`,全部 PASS 后才允许流转
103
-
104
- ## 自动流转
105
-
106
- 退出条件满足后,**无需等待用户再次输入**,直接执行下一阶段:
107
-
108
- > **REQUIRED NEXT SKILL:** 调用 `comet-build` skill 进入计划与构建阶段。
1
+ ---
2
+ name: comet-design
3
+ description: "Comet Phase 2: Deep Design. Invoke with /comet-design. Produce Design Doc and delta spec through brainstorming."
4
+ ---
5
+
6
+ # Comet Phase 2: Deep Design (Design)
7
+
8
+ ## Prerequisites
9
+
10
+ - Active change exists (proposal.md, design.md, tasks.md)
11
+ - No Design Doc (no corresponding file under `docs/superpowers/specs/`)
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 `"design"`
22
+ 3. `workflow` field value is `"full"`
23
+ 4. `design_doc` field is `null` or empty
24
+ 5. `openspec/changes/<name>/proposal.md` exists and is non-empty
25
+ 6. `openspec/changes/<name>/design.md` exists and is non-empty
26
+ 7. `openspec/changes/<name>/tasks.md` exists and is non-empty
27
+
28
+ **Verification method:**
29
+ - `cat openspec/changes/<name>/.comet.yaml` to read all fields
30
+ - Check checklist items one by one
31
+
32
+ **Failure output:**
33
+ ```
34
+ [HARD STOP] Entry check failed for comet-design
35
+ Expected: phase=design, design_doc=<empty/null>, workflow=full
36
+ Actual: phase=<actual-value>, design_doc=<actual-value>, workflow=<actual-value>
37
+ Suggestion: Run comet-open first, or check if .comet.yaml was modified out of sequence.
38
+ ```
39
+
40
+ Proceed to Step 1 only after verification passes.
41
+
42
+ ### 1a. Read Existing Context
43
+
44
+ Read `proposal.md` and `design.md` under the active change, organize core content into summaries:
45
+ - **Proposal summary**: goals, motivation, scope
46
+ - **Design summary**: architectural decisions, high-level design
47
+
48
+ ### 1b. Execute Brainstorming (With Context)
49
+
50
+ **Immediately execute:** Use the Skill tool to load the `superpowers:brainstorming` skill, ARGUMENTS contains:
51
+
52
+ ```
53
+ Change: <change-name>
54
+ Proposal summary: <proposal core content>
55
+ Design summary: <design.md architectural decisions>
56
+ Skip context exploration, proceed directly to design questioning.
57
+ ```
58
+
59
+ Skipping this step is prohibited, and continuing without loading this skill is prohibited.
60
+
61
+ If `superpowers:brainstorming` is unavailable, stop the process and prompt to install or enable Superpowers skills. Do not substitute this step with normal conversation.
62
+
63
+ After the skill loads, follow its guidance to produce:
64
+ - `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md` — design document (technical RFC)
65
+ - `openspec/changes/<name>/specs/<capability>/spec.md` — capability specification (delta)
66
+
67
+ ### 2. Update Comet State
68
+
69
+ Merge and update the following fields in `openspec/changes/<name>/.comet.yaml` (keep other fields unchanged):
70
+
71
+ ```yaml
72
+ phase: build
73
+ design_doc: docs/superpowers/specs/YYYY-MM-DD-topic-design.md
74
+ ```
75
+
76
+ 【Write verification】After update completion, must verify:
77
+ cat openspec/changes/<name>/.comet.yaml
78
+ Confirm phase line value is "build"
79
+ Confirm design_doc line value is "docs/superpowers/specs/YYYY-MM-DD-topic-design.md"
80
+ If any field does not match, retry write then verify again. Maximum 2 retries, report error and terminate if still fails.
81
+
82
+ ### 3. Dual Spec Division of Labor
83
+
84
+ | Spec Type | Belongs To | Location | Definition |
85
+ |-----------|-----------|----------|------------|
86
+ | Capability specification | OpenSpec | `openspec/changes/<name>/specs/` | What the system should do (requirements + acceptance scenarios) |
87
+ | Design document | Superpowers | `docs/superpowers/specs/` | How to build (technical architecture + implementation details) |
88
+
89
+ ### 4. Document Hierarchy Confirmation
90
+
91
+ ```
92
+ proposal.md (Phase 1) → Why + What
93
+ design.md (Phase 1, OpenSpec)High-level architectural decisions
94
+ Design document (Phase 2, Superpowers) Deep technical design
95
+ Capability specification (Phase 2, delta) Requirements + acceptance scenarios
96
+ ```
97
+
98
+ ## Exit Conditions
99
+
100
+ - Design Doc has been created and saved
101
+ - Delta spec has been created if there are new capabilities
102
+ - **Phase guard**: Run `bash $COMET_GUARD <change-name> design`, allow transition only after all PASS
103
+
104
+ ## Automatic Transition
105
+
106
+ After exit conditions are met, **proceed immediately to the next phase without waiting for user input**:
107
+
108
+ > **REQUIRED NEXT SKILL:** Invoke `comet-build` skill to enter the planning and build phase.