@rpamis/comet 0.3.7 → 0.3.9
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.
- package/LICENSE +21 -21
- package/README.md +557 -539
- package/assets/manifest.json +41 -34
- package/assets/skills/comet/SKILL.md +282 -329
- package/assets/skills/comet/reference/auto-transition.md +27 -0
- package/assets/skills/comet/reference/comet-yaml-fields.md +68 -0
- package/assets/skills/comet/reference/context-recovery.md +35 -0
- package/assets/skills/comet/reference/debug-gate.md +17 -0
- package/assets/skills/comet/reference/decision-point.md +20 -0
- package/assets/skills/comet/reference/dirty-worktree.md +59 -59
- package/assets/skills/comet/reference/file-structure.md +28 -0
- package/assets/skills/comet/reference/subagent-dispatch.md +113 -0
- package/assets/skills/comet/rules/comet-phase-guard.en.md +123 -0
- package/assets/skills/comet/rules/comet-phase-guard.md +125 -90
- package/assets/skills/comet/scripts/comet-guard.sh +27 -1
- package/assets/skills/comet/scripts/comet-hook-guard.sh +121 -45
- package/assets/skills/comet/scripts/comet-state.sh +162 -7
- package/assets/skills/comet/scripts/comet-yaml-validate.sh +3 -1
- package/assets/skills/comet-archive/SKILL.md +100 -106
- package/assets/skills/comet-build/SKILL.md +304 -316
- package/assets/skills/comet-design/SKILL.md +263 -272
- package/assets/skills/comet-hotfix/SKILL.md +204 -211
- package/assets/skills/comet-open/SKILL.md +220 -186
- package/assets/skills/comet-tweak/SKILL.md +180 -179
- package/assets/skills/comet-verify/SKILL.md +234 -240
- package/assets/skills-zh/comet/SKILL.md +269 -332
- package/assets/skills-zh/comet/reference/auto-transition.md +27 -0
- package/assets/skills-zh/comet/reference/comet-yaml-fields.md +71 -0
- package/assets/skills-zh/comet/reference/context-recovery.md +35 -0
- package/assets/skills-zh/comet/reference/debug-gate.md +17 -0
- package/assets/skills-zh/comet/reference/decision-point.md +20 -0
- package/assets/skills-zh/comet/reference/dirty-worktree.md +59 -59
- package/assets/skills-zh/comet/reference/file-structure.md +28 -0
- package/assets/skills-zh/comet/reference/subagent-dispatch.md +120 -0
- package/assets/skills-zh/comet-archive/SKILL.md +100 -106
- package/assets/skills-zh/comet-build/SKILL.md +317 -316
- package/assets/skills-zh/comet-design/SKILL.md +264 -273
- package/assets/skills-zh/comet-hotfix/SKILL.md +200 -207
- package/assets/skills-zh/comet-open/SKILL.md +220 -186
- package/assets/skills-zh/comet-tweak/SKILL.md +176 -175
- package/assets/skills-zh/comet-verify/SKILL.md +232 -238
- package/bin/comet.js +3 -3
- package/dist/cli/index.js +21 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +5 -1
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/i18n.d.ts +4 -0
- package/dist/commands/i18n.d.ts.map +1 -0
- package/dist/commands/i18n.js +154 -0
- package/dist/commands/i18n.js.map +1 -0
- package/dist/commands/init.d.ts +3 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +127 -75
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/uninstall.d.ts +9 -0
- package/dist/commands/uninstall.d.ts.map +1 -0
- package/dist/commands/uninstall.js +132 -0
- package/dist/commands/uninstall.js.map +1 -0
- package/dist/commands/update.d.ts +3 -2
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +105 -68
- package/dist/commands/update.js.map +1 -1
- package/dist/core/codegraph.d.ts +4 -7
- package/dist/core/codegraph.d.ts.map +1 -1
- package/dist/core/codegraph.js +63 -41
- package/dist/core/codegraph.js.map +1 -1
- package/dist/core/detect.d.ts +13 -1
- package/dist/core/detect.d.ts.map +1 -1
- package/dist/core/detect.js +68 -12
- package/dist/core/detect.js.map +1 -1
- package/dist/core/openspec.d.ts +2 -2
- package/dist/core/openspec.d.ts.map +1 -1
- package/dist/core/openspec.js +51 -22
- package/dist/core/openspec.js.map +1 -1
- package/dist/core/platforms.d.ts.map +1 -1
- package/dist/core/platforms.js +14 -1
- package/dist/core/platforms.js.map +1 -1
- package/dist/core/skills.d.ts +3 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +151 -66
- package/dist/core/skills.js.map +1 -1
- package/dist/core/superpowers.d.ts +1 -1
- package/dist/core/superpowers.d.ts.map +1 -1
- package/dist/core/superpowers.js +5 -1
- package/dist/core/superpowers.js.map +1 -1
- package/dist/core/uninstall.d.ts +28 -0
- package/dist/core/uninstall.d.ts.map +1 -0
- package/dist/core/uninstall.js +421 -0
- package/dist/core/uninstall.js.map +1 -0
- package/dist/core/version.d.ts +31 -0
- package/dist/core/version.d.ts.map +1 -0
- package/dist/core/version.js +111 -0
- package/dist/core/version.js.map +1 -0
- package/dist/utils/file-system.d.ts +23 -0
- package/dist/utils/file-system.d.ts.map +1 -1
- package/dist/utils/file-system.js +100 -5
- package/dist/utils/file-system.js.map +1 -1
- package/package.json +69 -64
- package/scripts/postinstall.js +44 -44
|
@@ -1,186 +1,220 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: comet-open
|
|
3
|
-
description: "Comet Phase 1: Open. Invoke with /comet-open. Explore ideas through OpenSpec, confirm requirements clarification, then create change structure (proposal + design + tasks)."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Comet Phase 1: Open
|
|
7
|
-
|
|
8
|
-
## Prerequisites
|
|
9
|
-
|
|
10
|
-
- No active change, or user wants to create a new change
|
|
11
|
-
|
|
12
|
-
## Steps
|
|
13
|
-
|
|
14
|
-
### 0. Output Language Constraint
|
|
15
|
-
|
|
16
|
-
Every prompt and artifact request passed to OpenSpec must include the output-language constraint: use the language of the user request that triggered this workflow. When resuming an existing change with a clear dominant artifact language, preserve that language unless the user explicitly asks to switch.
|
|
17
|
-
|
|
18
|
-
### 1. Explore Ideas and Clarify Requirements
|
|
19
|
-
|
|
20
|
-
**Immediately execute:** Use the Skill tool to load the `openspec-explore` skill. Skipping this step is prohibited.
|
|
21
|
-
|
|
22
|
-
After the skill loads, explore the problem space following its guidance, but do not treat one Q&A turn as sufficient clarification. You must continue asking, align with the user, and form a clarification summary covering:
|
|
23
|
-
- Goals: the problem the user truly wants to solve and the expected outcome
|
|
24
|
-
- Non-goals: what is explicitly out of scope for this change
|
|
25
|
-
- Scope boundaries: included/excluded modules, users, platforms, or data
|
|
26
|
-
- Key unknowns: unresolved assumptions, risks, or dependencies
|
|
27
|
-
- Draft acceptance scenarios: at least the core success scenario and important boundary scenarios
|
|
28
|
-
|
|
29
|
-
The clarification summary must include: goals, non-goals, scope boundaries, key unknowns, and draft acceptance scenarios.
|
|
30
|
-
|
|
31
|
-
### 1a. PRD Split Preflight (Blocking Point)
|
|
32
|
-
|
|
33
|
-
When the user input is a large PRD, roadmap, complete product plan, or the clarification summary shows multiple independent capabilities, modules, user journeys, or milestones, must evaluate whether it should be split into multiple changes before creating OpenSpec artifacts.
|
|
34
|
-
|
|
35
|
-
The split preflight must be based on clarified information and output a proposed split list. Each proposed split item must include:
|
|
36
|
-
- Suggested change name
|
|
37
|
-
- Goals and scope boundaries
|
|
38
|
-
- Explicit non-goals
|
|
39
|
-
- Dependencies or recommended execution order
|
|
40
|
-
- Core acceptance scenarios
|
|
41
|
-
|
|
42
|
-
Recommend splitting when any condition applies:
|
|
43
|
-
- The PRD contains multiple capabilities that can be independently designed, built, verified, and archived
|
|
44
|
-
- Multiple modules or user journeys are involved, and part of them can be delivered independently
|
|
45
|
-
- Clear phased milestones exist
|
|
46
|
-
- The work is expected to produce multiple delta specs or more than 3 large tasks
|
|
47
|
-
- Failure or delay in one part should not block other parts from entering later phases
|
|
48
|
-
|
|
49
|
-
When splitting is recommended, must
|
|
50
|
-
|
|
51
|
-
The user choices must include:
|
|
52
|
-
- "Create multiple OpenSpec changes" — create independent changes from the proposed split
|
|
53
|
-
- "Keep everything as one change" — continue the single-change flow and record the reason for not splitting in proposal/design/tasks
|
|
54
|
-
- "Adjust the split plan before continuing" — after the user describes the adjustment, output the revised proposed split list and ask for confirmation again
|
|
55
|
-
|
|
56
|
-
Every accepted split item must be created as an independent change through `/comet-open`, not by calling `/opsx:new` directly. `/comet-open` creates both OpenSpec artifacts and `.comet.yaml`, ensuring each change enters the Comet state machine.
|
|
57
|
-
|
|
58
|
-
Must not create proposal.md, design.md, or tasks.md before the user completes the PRD split choice. If the user chooses to create multiple changes, the current `/comet-open` invocation only completes split confirmation and coordination, then enters `/comet-open` for each split item in the user-confirmed order.
|
|
59
|
-
|
|
60
|
-
In batch split mode, entering `/comet-open` for each split item must explicitly mark it as a "confirmed split item" and carry that split item's goals, scope, non-goals, and acceptance scenarios. Confirmed split items skip the PRD split preflight by default, unless the split item itself still clearly contains multiple independent capabilities.
|
|
61
|
-
|
|
62
|
-
In batch split mode, a single split item must not auto-advance to `/comet-design` after completing the open phase. After splitting is complete, must pause and ask the user which change to start; after the user chooses, advance only that change into `/comet-design`, while other changes remain active and can be resumed later through `/comet`.
|
|
63
|
-
|
|
64
|
-
Minimal resume rule: do not add a dedicated batch state file. On resume, first check already-created active changes; split items that already exist and contain `.comet.yaml` must not be created again, while uncreated split items continue through `/comet-open` according to the user-confirmed split list. If the confirmed split list cannot be recovered from the conversation, must ask the user to confirm the split list again before continuing.
|
|
65
|
-
|
|
66
|
-
### 1b. Requirements Clarification Completion Confirmation (Blocking Point)
|
|
67
|
-
|
|
68
|
-
Before creating OpenSpec artifacts, must
|
|
69
|
-
|
|
70
|
-
When pausing, present the clarification summary: goals, non-goals, scope boundaries, key unknowns, and draft acceptance scenarios.
|
|
71
|
-
|
|
72
|
-
Must not create proposal.md, design.md, or tasks.md before the user confirms requirements clarification is complete, and must not use the Skill tool to load the `openspec-propose` skill to generate all artifacts in one pass.
|
|
73
|
-
|
|
74
|
-
###
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
openspec
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
The
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
-
|
|
185
|
-
|
|
186
|
-
|
|
1
|
+
---
|
|
2
|
+
name: comet-open
|
|
3
|
+
description: "Comet Phase 1: Open. Invoke with /comet-open. Explore ideas through OpenSpec, confirm requirements clarification, then create change structure (proposal + design + tasks)."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Comet Phase 1: Open
|
|
7
|
+
|
|
8
|
+
## Prerequisites
|
|
9
|
+
|
|
10
|
+
- No active change, or user wants to create a new change
|
|
11
|
+
|
|
12
|
+
## Steps
|
|
13
|
+
|
|
14
|
+
### 0. Output Language Constraint
|
|
15
|
+
|
|
16
|
+
Every prompt and artifact request passed to OpenSpec must include the output-language constraint: use the language of the user request that triggered this workflow. When resuming an existing change with a clear dominant artifact language, preserve that language unless the user explicitly asks to switch.
|
|
17
|
+
|
|
18
|
+
### 1. Explore Ideas and Clarify Requirements
|
|
19
|
+
|
|
20
|
+
**Immediately execute:** Use the Skill tool to load the `openspec-explore` skill. Skipping this step is prohibited.
|
|
21
|
+
|
|
22
|
+
After the skill loads, explore the problem space following its guidance, but do not treat one Q&A turn as sufficient clarification. You must continue asking, align with the user, and form a clarification summary covering:
|
|
23
|
+
- Goals: the problem the user truly wants to solve and the expected outcome
|
|
24
|
+
- Non-goals: what is explicitly out of scope for this change
|
|
25
|
+
- Scope boundaries: included/excluded modules, users, platforms, or data
|
|
26
|
+
- Key unknowns: unresolved assumptions, risks, or dependencies
|
|
27
|
+
- Draft acceptance scenarios: at least the core success scenario and important boundary scenarios
|
|
28
|
+
|
|
29
|
+
The clarification summary must include: goals, non-goals, scope boundaries, key unknowns, and draft acceptance scenarios.
|
|
30
|
+
|
|
31
|
+
### 1a. PRD Split Preflight (Blocking Point)
|
|
32
|
+
|
|
33
|
+
When the user input is a large PRD, roadmap, complete product plan, or the clarification summary shows multiple independent capabilities, modules, user journeys, or milestones, must evaluate whether it should be split into multiple changes before creating OpenSpec artifacts.
|
|
34
|
+
|
|
35
|
+
The split preflight must be based on clarified information and output a proposed split list. Each proposed split item must include:
|
|
36
|
+
- Suggested change name
|
|
37
|
+
- Goals and scope boundaries
|
|
38
|
+
- Explicit non-goals
|
|
39
|
+
- Dependencies or recommended execution order
|
|
40
|
+
- Core acceptance scenarios
|
|
41
|
+
|
|
42
|
+
Recommend splitting when any condition applies:
|
|
43
|
+
- The PRD contains multiple capabilities that can be independently designed, built, verified, and archived
|
|
44
|
+
- Multiple modules or user journeys are involved, and part of them can be delivered independently
|
|
45
|
+
- Clear phased milestones exist
|
|
46
|
+
- The work is expected to produce multiple delta specs or more than 3 large tasks
|
|
47
|
+
- Failure or delay in one part should not block other parts from entering later phases
|
|
48
|
+
|
|
49
|
+
When splitting is recommended, must follow the `comet/reference/decision-point.md` protocol to pause and wait for the user's choice.
|
|
50
|
+
|
|
51
|
+
The user choices must include:
|
|
52
|
+
- "Create multiple OpenSpec changes" — create independent changes from the proposed split
|
|
53
|
+
- "Keep everything as one change" — continue the single-change flow and record the reason for not splitting in proposal/design/tasks
|
|
54
|
+
- "Adjust the split plan before continuing" — after the user describes the adjustment, output the revised proposed split list and ask for confirmation again
|
|
55
|
+
|
|
56
|
+
Every accepted split item must be created as an independent change through `/comet-open`, not by calling `/opsx:new` directly. `/comet-open` creates both OpenSpec artifacts and `.comet.yaml`, ensuring each change enters the Comet state machine.
|
|
57
|
+
|
|
58
|
+
Must not create proposal.md, design.md, or tasks.md before the user completes the PRD split choice. If the user chooses to create multiple changes, the current `/comet-open` invocation only completes split confirmation and coordination, then enters `/comet-open` for each split item in the user-confirmed order.
|
|
59
|
+
|
|
60
|
+
In batch split mode, entering `/comet-open` for each split item must explicitly mark it as a "confirmed split item" and carry that split item's goals, scope, non-goals, and acceptance scenarios. Confirmed split items skip the PRD split preflight by default, unless the split item itself still clearly contains multiple independent capabilities.
|
|
61
|
+
|
|
62
|
+
In batch split mode, a single split item must not auto-advance to `/comet-design` after completing the open phase. After splitting is complete, must pause and ask the user which change to start; after the user chooses, advance only that change into `/comet-design`, while other changes remain active and can be resumed later through `/comet`.
|
|
63
|
+
|
|
64
|
+
Minimal resume rule: do not add a dedicated batch state file. On resume, first check already-created active changes; split items that already exist and contain `.comet.yaml` must not be created again, while uncreated split items continue through `/comet-open` according to the user-confirmed split list. If the confirmed split list cannot be recovered from the conversation, must ask the user to confirm the split list again before continuing.
|
|
65
|
+
|
|
66
|
+
### 1b. Requirements Clarification Completion Confirmation (Blocking Point)
|
|
67
|
+
|
|
68
|
+
Before creating OpenSpec artifacts, must follow the `comet/reference/decision-point.md` protocol to pause and wait for the user to confirm requirements clarification is complete.
|
|
69
|
+
|
|
70
|
+
When pausing, present the clarification summary: goals, non-goals, scope boundaries, key unknowns, and draft acceptance scenarios.
|
|
71
|
+
|
|
72
|
+
Must not create proposal.md, design.md, or tasks.md before the user confirms requirements clarification is complete, and must not use the Skill tool to load the `openspec-propose` skill to generate all artifacts in one pass.
|
|
73
|
+
|
|
74
|
+
### 1c. Change Name Confirmation (Blocking Point)
|
|
75
|
+
|
|
76
|
+
Before creating the change directory (`openspec new change`), must follow the `comet/reference/decision-point.md` protocol to pause and let the user decide the change name. Must not auto-generate or silently infer the change name.
|
|
77
|
+
|
|
78
|
+
OpenSpec change names must be **kebab-case English** (lowercase letters, digits, hyphens; e.g. `refine-requirements-doc`). Chinese or other non-conforming names are invalid.
|
|
79
|
+
|
|
80
|
+
When pausing, present:
|
|
81
|
+
- **2-3 recommended kebab-case English names** derived from the confirmed clarification summary, each with a one-line description of the scope it implies
|
|
82
|
+
- An explicit option for the user to **enter their own name**
|
|
83
|
+
- A note that **if the user enters Chinese (or any non-kebab-case text), it will be converted into a compliant kebab-case English name**, and the converted result must be shown back to the user for confirmation before use
|
|
84
|
+
|
|
85
|
+
The decision options must include:
|
|
86
|
+
- Pick one of the recommended names
|
|
87
|
+
- "Enter a custom name" — accept the user's input; if it is already valid kebab-case English, use it directly; if it is Chinese or otherwise non-conforming, convert it to compliant kebab-case English and show the converted name for confirmation before continuing
|
|
88
|
+
|
|
89
|
+
Must not run `openspec new change` or create `.comet.yaml` before the user confirms the final change name. If the chosen/converted name collides with an existing change, report the collision and ask the user to choose another name.
|
|
90
|
+
|
|
91
|
+
### 2. Create Change Structure + Initialize State
|
|
92
|
+
|
|
93
|
+
**Immediately execute:** Use the Skill tool to load the `openspec-new-change` skill. Skipping this step is prohibited.
|
|
94
|
+
|
|
95
|
+
Full `/comet` workflow must not use the Skill tool to load the `openspec-propose` skill by default; only load it when the user explicitly requests generating the proposal and artifacts in one pass.
|
|
96
|
+
|
|
97
|
+
After the skill loads, follow its guidance to create the change skeleton, but override its "STOP and wait for user direction" behavior when a confirmed clarification summary from Step 1b is already available in the conversation context.
|
|
98
|
+
|
|
99
|
+
If the user has already confirmed a clarification summary (Step 1b), use that summary directly to populate artifact content. If no clarification summary exists (edge case), fall back to the skill's default behavior of asking the user.
|
|
100
|
+
|
|
101
|
+
After the change skeleton is created, generate `proposal`, `design`, and `tasks` one by one using the standard artifact loop:
|
|
102
|
+
|
|
103
|
+
**Standard Artifact Loop** (for each `artifact-id`: `proposal` → `design` → `tasks`):
|
|
104
|
+
|
|
105
|
+
1. Refresh status: `openspec status --change "<name>" --json`
|
|
106
|
+
2. Fetch artifact instructions:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
openspec instructions proposal --change "<name>" --json
|
|
110
|
+
openspec instructions design --change "<name>" --json
|
|
111
|
+
openspec instructions tasks --change "<name>" --json
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
3. For the returned JSON instruction payload, you must:
|
|
115
|
+
- Read every completed dependency artifact listed in `dependencies`
|
|
116
|
+
- Use `template` as the artifact structure
|
|
117
|
+
- Follow `instruction` guidance
|
|
118
|
+
- Apply `context` and `rules` as constraints — **must not copy them into the artifact content**
|
|
119
|
+
- Write to `resolvedOutputPath`
|
|
120
|
+
- Verify the output file exists and is non-empty
|
|
121
|
+
4. After creating each artifact, re-run `openspec status --change "<name>" --json` to confirm status before continuing to the next artifact
|
|
122
|
+
|
|
123
|
+
**Failure handling**: If `openspec instructions` fails, returns invalid JSON, reports unmet `dependencies`, or does not provide a usable `resolvedOutputPath`, must immediately stop artifact creation and report the OpenSpec error. Must not fall back to hard-coded artifact prose because that would silently bypass project rules.
|
|
124
|
+
|
|
125
|
+
**Naming and scope guard**: Change name must be the kebab-case English name confirmed by the user in Step 1c — must not auto-generate, infer, or use a non-kebab-case (e.g. Chinese) name. Change scope must match the user's description — must not expand or narrow it independently.
|
|
126
|
+
|
|
127
|
+
Confirm the following artifacts have been created:
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
openspec/changes/<name>/
|
|
131
|
+
├── .openspec.yaml
|
|
132
|
+
├── .comet.yaml
|
|
133
|
+
├── proposal.md # Why + What: problem, goals, scope
|
|
134
|
+
├── design.md # How (high-level): architecture decisions, approach selection
|
|
135
|
+
└── tasks.md # Task checklist (checkboxes)
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Create `.comet.yaml` state file:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
COMET_ENV="${COMET_ENV:-$(find . "$HOME"/.*/skills "$HOME/.config" "$HOME/.gemini" -path '*/comet/scripts/comet-env.sh' -type f -print -quit 2>/dev/null)}"
|
|
142
|
+
if [ -z "$COMET_ENV" ]; then
|
|
143
|
+
echo "ERROR: comet-env.sh not found. Ensure the comet skill is installed." >&2
|
|
144
|
+
return 1
|
|
145
|
+
fi
|
|
146
|
+
. "$COMET_ENV"
|
|
147
|
+
|
|
148
|
+
if [ -z "$COMET_STATE" ] || [ -z "$COMET_GUARD" ]; then
|
|
149
|
+
echo "ERROR: Comet scripts not found. Ensure the comet skill is installed." >&2
|
|
150
|
+
return 1
|
|
151
|
+
fi
|
|
152
|
+
|
|
153
|
+
"$COMET_BASH" "$COMET_STATE" init <name> full
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### 3. Entry State Verification
|
|
157
|
+
|
|
158
|
+
Verify state machine has been correctly initialized:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
"$COMET_BASH" "$COMET_STATE" check <name> open
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Proceed to Step 4 after verification passes. The script outputs specific failure reasons when verification fails.
|
|
165
|
+
|
|
166
|
+
**Idempotency**: All open phase operations can be safely re-executed. If `.comet.yaml` is already at `phase: open` and all three artifact files exist, skip completed steps and continue from the first missing step.
|
|
167
|
+
|
|
168
|
+
### 4. Content Completeness Check
|
|
169
|
+
|
|
170
|
+
Confirm the three documents have complete content:
|
|
171
|
+
- **proposal.md**: problem background, goals, scope, non-goals
|
|
172
|
+
- **design.md**: high-level architecture decisions, approach selection, data flow
|
|
173
|
+
- **tasks.md**: task list, each task has a clear description
|
|
174
|
+
|
|
175
|
+
**File existence verification**: Confirm all three file paths exist and are non-empty. If any file is missing or empty, must not enter Step 5 or execute phase guard — return to creation step to fill the gap.
|
|
176
|
+
|
|
177
|
+
### 5. User Review and Confirmation (Blocking Point)
|
|
178
|
+
|
|
179
|
+
After the three documents are created and content completeness check passes, **must follow the `comet/reference/decision-point.md` protocol to pause and wait for user confirmation**. Must not execute phase guard or auto-transition before user confirmation.
|
|
180
|
+
|
|
181
|
+
The user confirmation question must be presented as a single-select question with the following summary and options:
|
|
182
|
+
|
|
183
|
+
**Summary content**:
|
|
184
|
+
- **proposal.md**: problem background, goals, scope
|
|
185
|
+
- **design.md**: high-level architecture decisions, approach selection
|
|
186
|
+
- **tasks.md**: task count and key task descriptions
|
|
187
|
+
|
|
188
|
+
**Options**:
|
|
189
|
+
- "Confirm, proceed to next phase" — artifacts meet expectations, execute phase guard transition
|
|
190
|
+
- "Needs adjustment" — include adjustment notes, modify and re-request confirmation
|
|
191
|
+
|
|
192
|
+
After user selects "Confirm", proceed to exit conditions. When user selects "Needs adjustment", modify the corresponding files per their notes, then request confirmation again.
|
|
193
|
+
|
|
194
|
+
## Exit Conditions
|
|
195
|
+
|
|
196
|
+
- proposal.md, design.md, tasks.md all created with complete content
|
|
197
|
+
- **User has confirmed** proposal, design, tasks content meets expectations
|
|
198
|
+
- **Phase guard**: Run `"$COMET_BASH" "$COMET_GUARD" <change-name> open --apply`; after all PASS, auto-transitions to next phase
|
|
199
|
+
|
|
200
|
+
Must use `--apply` before exit, otherwise `.comet.yaml` remains at `phase: open` and the next phase entry check will fail.
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
"$COMET_BASH" "$COMET_GUARD" <change-name> open --apply
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Full workflow auto-transitions to `phase: design`; hotfix/tweak presets auto-transition to `phase: build`.
|
|
207
|
+
|
|
208
|
+
## Automatic Handoff to Next Phase
|
|
209
|
+
|
|
210
|
+
Follow `comet/reference/auto-transition.md`. Key command:
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
"$COMET_BASH" "$COMET_STATE" next <change-name>
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
- `NEXT: auto` → invoke the skill pointed to by `SKILL` to enter the next phase
|
|
217
|
+
- `NEXT: manual` → do not invoke the next skill; prompt user to run `/<SKILL>` manually
|
|
218
|
+
- `NEXT: done` → workflow is complete, no further action needed
|
|
219
|
+
|
|
220
|
+
hotfix/tweak presets are controlled by their corresponding preset skill (phase goes directly to build); their `next` returns the corresponding preset skill.
|