@rpamis/comet 0.3.7 → 0.3.8

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.
Files changed (86) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +559 -539
  3. package/assets/manifest.json +41 -34
  4. package/assets/skills/comet/SKILL.md +282 -329
  5. package/assets/skills/comet/reference/auto-transition.md +27 -0
  6. package/assets/skills/comet/reference/comet-yaml-fields.md +68 -0
  7. package/assets/skills/comet/reference/context-recovery.md +35 -0
  8. package/assets/skills/comet/reference/debug-gate.md +17 -0
  9. package/assets/skills/comet/reference/decision-point.md +20 -0
  10. package/assets/skills/comet/reference/file-structure.md +28 -0
  11. package/assets/skills/comet/reference/subagent-dispatch.md +113 -0
  12. package/assets/skills/comet/rules/comet-phase-guard.en.md +99 -0
  13. package/assets/skills/comet/rules/comet-phase-guard.md +99 -90
  14. package/assets/skills/comet/scripts/comet-state.sh +62 -0
  15. package/assets/skills/comet-archive/SKILL.md +100 -106
  16. package/assets/skills/comet-build/SKILL.md +304 -316
  17. package/assets/skills/comet-design/SKILL.md +263 -272
  18. package/assets/skills/comet-hotfix/SKILL.md +204 -211
  19. package/assets/skills/comet-open/SKILL.md +203 -186
  20. package/assets/skills/comet-tweak/SKILL.md +180 -179
  21. package/assets/skills/comet-verify/SKILL.md +234 -240
  22. package/assets/skills-zh/comet/SKILL.md +269 -332
  23. package/assets/skills-zh/comet/reference/auto-transition.md +27 -0
  24. package/assets/skills-zh/comet/reference/comet-yaml-fields.md +68 -0
  25. package/assets/skills-zh/comet/reference/context-recovery.md +35 -0
  26. package/assets/skills-zh/comet/reference/debug-gate.md +17 -0
  27. package/assets/skills-zh/comet/reference/decision-point.md +20 -0
  28. package/assets/skills-zh/comet/reference/file-structure.md +28 -0
  29. package/assets/skills-zh/comet/reference/subagent-dispatch.md +113 -0
  30. package/assets/skills-zh/comet-archive/SKILL.md +100 -106
  31. package/assets/skills-zh/comet-build/SKILL.md +304 -316
  32. package/assets/skills-zh/comet-design/SKILL.md +264 -273
  33. package/assets/skills-zh/comet-hotfix/SKILL.md +200 -207
  34. package/assets/skills-zh/comet-open/SKILL.md +203 -186
  35. package/assets/skills-zh/comet-tweak/SKILL.md +176 -175
  36. package/assets/skills-zh/comet-verify/SKILL.md +232 -238
  37. package/bin/comet.js +3 -3
  38. package/dist/cli/index.js +19 -0
  39. package/dist/cli/index.js.map +1 -1
  40. package/dist/commands/init.d.ts.map +1 -1
  41. package/dist/commands/init.js +8 -8
  42. package/dist/commands/init.js.map +1 -1
  43. package/dist/commands/uninstall.d.ts +9 -0
  44. package/dist/commands/uninstall.d.ts.map +1 -0
  45. package/dist/commands/uninstall.js +113 -0
  46. package/dist/commands/uninstall.js.map +1 -0
  47. package/dist/commands/update.d.ts +1 -1
  48. package/dist/commands/update.d.ts.map +1 -1
  49. package/dist/commands/update.js +65 -36
  50. package/dist/commands/update.js.map +1 -1
  51. package/dist/core/codegraph.d.ts +2 -7
  52. package/dist/core/codegraph.d.ts.map +1 -1
  53. package/dist/core/codegraph.js +4 -37
  54. package/dist/core/codegraph.js.map +1 -1
  55. package/dist/core/detect.d.ts +8 -1
  56. package/dist/core/detect.d.ts.map +1 -1
  57. package/dist/core/detect.js +41 -2
  58. package/dist/core/detect.js.map +1 -1
  59. package/dist/core/openspec.d.ts +1 -1
  60. package/dist/core/openspec.d.ts.map +1 -1
  61. package/dist/core/openspec.js +40 -17
  62. package/dist/core/openspec.js.map +1 -1
  63. package/dist/core/platforms.d.ts.map +1 -1
  64. package/dist/core/platforms.js +14 -1
  65. package/dist/core/platforms.js.map +1 -1
  66. package/dist/core/skills.d.ts +3 -1
  67. package/dist/core/skills.d.ts.map +1 -1
  68. package/dist/core/skills.js +142 -65
  69. package/dist/core/skills.js.map +1 -1
  70. package/dist/core/superpowers.d.ts.map +1 -1
  71. package/dist/core/superpowers.js +1 -0
  72. package/dist/core/superpowers.js.map +1 -1
  73. package/dist/core/uninstall.d.ts +28 -0
  74. package/dist/core/uninstall.d.ts.map +1 -0
  75. package/dist/core/uninstall.js +421 -0
  76. package/dist/core/uninstall.js.map +1 -0
  77. package/dist/core/version.d.ts +31 -0
  78. package/dist/core/version.d.ts.map +1 -0
  79. package/dist/core/version.js +111 -0
  80. package/dist/core/version.js.map +1 -0
  81. package/dist/utils/file-system.d.ts +23 -0
  82. package/dist/utils/file-system.d.ts.map +1 -1
  83. package/dist/utils/file-system.js +100 -5
  84. package/dist/utils/file-system.js.map +1 -1
  85. package/package.json +69 -64
  86. package/scripts/postinstall.js +44 -44
@@ -1,211 +1,204 @@
1
- ---
2
- name: comet-hotfix
3
- description: "Comet preset path: Bug fix / hotfix. Skip brainstorming, directly open → build → verify → archive. Applicable for behavior fixes, scenarios not involving new capability design."
4
- ---
5
-
6
- # Comet Preset Path: Hotfix
7
-
8
- Quick bug fix workflow: open → build → verify → archive. Skip brainstorming and full plan, applicable for behavior fixes not involving new capability design.
9
-
10
- **Applicable conditions** (all must be met):
11
- 1. Fix bugs in existing functionality, no new capability
12
- 2. No interface changes or architecture adjustments
13
- 3. Change scope is predictable (usually ≤ 2 files)
14
-
15
- **Not applicable**: If fix process discovers need for architecture adjustments, should upgrade to full `/comet` workflow.
16
-
17
- ---
18
-
19
- ## Process (preset workflow, 6 steps)
20
-
21
- ### 0. Output Language Constraint
22
-
23
- Streamlined OpenSpec artifacts must use the language of the user request that triggered this workflow.
24
-
25
- Execution chain: open → build → root cause check → verify → archive. Hotfix provides default decisions for each phase: streamlined open, direct build, root cause confirmation, scale-based verification, and final archive confirmation after verification passes.
26
-
27
- Locate Comet scripts before starting:
28
-
29
- ```bash
30
- COMET_ENV="${COMET_ENV:-$(find . "$HOME"/.*/skills "$HOME/.config" "$HOME/.gemini" -path '*/comet/scripts/comet-env.sh' -type f -print -quit 2>/dev/null)}"
31
- if [ -z "$COMET_ENV" ]; then
32
- echo "ERROR: comet-env.sh not found. Ensure the comet skill is installed." >&2
33
- return 1
34
- fi
35
- . "$COMET_ENV"
36
- ```
37
-
38
- ### 1. Quick Open (preset open)
39
-
40
- Reuse Comet open capability to create change, but use hotfix defaults: do not execute `openspec-explore` long exploration, directly enter streamlined change creation.
41
-
42
- **Immediately execute:** Use the Skill tool to load the `openspec-new-change` skill. Skipping this step is prohibited.
43
-
44
- After the skill loads, follow its guidance to create streamlined artifacts:
45
- - `proposal.md` — problem description + root cause analysis + fix goal (no solution comparison needed)
46
- - `design.md` — fix solution (one is enough, no multi-solution comparison needed)
47
- - `tasks.md` — fix task list
48
- - **No delta spec needed** (unless fix changes existing spec acceptance scenarios)
49
-
50
- Initialize Comet state file:
51
-
52
- ```bash
53
- "$COMET_BASH" "$COMET_STATE" init <name> hotfix
54
- ```
55
-
56
- Verify initialized state:
57
-
58
- ```bash
59
- "$COMET_BASH" "$COMET_STATE" check <name> open
60
- ```
61
-
62
- Run phase guard to transition open → build:
63
-
64
- ```bash
65
- "$COMET_BASH" "$COMET_GUARD" <change-name> open --apply
66
- ```
67
-
68
- Check `auto_transition` to decide whether to continue:
69
-
70
- ```bash
71
- "$COMET_BASH" "$COMET_STATE" next <name>
72
- ```
73
-
74
- - `NEXT: auto` → continue to Step 2
75
- - `NEXT: manual` → pause, follow `HINT` to prompt user to run `/<SKILL>` manually
76
-
77
- ### 2. Direct Build (preset build)
78
-
79
- Use hotfix defaults: `build_mode: direct`. Skip Superpowers `brainstorming` and `writing-plans` (unless tasks > 3; if exceeds 3 tasks, transfer to `/comet-build`'s plan and execution method selection — note this does NOT trigger full workflow upgrade, only switches execution method).
80
-
81
- Before continuing or starting changes, handle uncommitted changes through `comet/reference/dirty-worktree.md`. If attribution shows the fix scope exceeds hotfix, handle it through this file's "Upgrade Conditions".
82
-
83
- **Immediately execute:** Execute tasks one by one according to tasks.md:
84
-
85
- 1. Read `openspec/changes/<name>/tasks.md`, get incomplete task list
86
- 2. For each incomplete task:
87
- - Modify code according to task description
88
- - Run project formatter (e.g., `mvn spotless:apply`, `npm run format`)
89
- - Run related tests to confirm pass
90
- - Check corresponding `- [ ]` to `- [x]` in tasks.md
91
- - Commit code, commit message format: `fix: <brief fix description>`
92
- 3. After all tasks complete, explicitly run relevant project tests and build commands
93
-
94
- **If fix affects existing spec acceptance scenarios**:
95
- - Create delta spec in `openspec/changes/<name>/specs/<capability>/spec.md`
96
- - Only include `## MODIFIED Requirements` section
97
-
98
- During hotfix execution, whenever a crash, unexpected behavior, test failure, or build failure appears while running the program, tests, build, or manual verification, must use the Skill tool to load the Superpowers `systematic-debugging` skill. Before root-cause investigation is complete, must not propose or implement source-code fixes.
99
-
100
- Handle it using the four-phase `systematic-debugging` flow:
101
- - First reproduce and locate the root cause, read full errors, check recent changes, and trace data flow
102
- - If root cause points to a source bug, first add a minimal failing test that reproduces the crash or unexpected behavior, then modify source code
103
- - After the fix, run that failing test, related tests, and project build/verification commands to confirm all pass
104
- - Keep the test, source fix, and tasks.md checkoff inside the current change; must not replace the current change verification loop by starting a separate "write test cases" change
105
-
106
- ### 3. Root Cause Elimination Check
107
-
108
- **Execute before running build guard**, ensuring the fix actually eliminates the root cause:
109
-
110
- 1. Read bug description and root cause in proposal.md
111
- 2. Search and verify problem code no longer exists
112
- 3. If root cause not eliminated, return to Step 2 to continue fix (still in build phase, no state transition needed)
113
-
114
- **Upgrade conditions**:
115
- - Root cause check reveals deep architecture issues → Stop hotfix, handle per "Upgrade Conditions" section
116
- - Fix requires additional interface changes → Stop hotfix, handle per "Upgrade Conditions" section
117
-
118
- After root cause is confirmed eliminated, run phase guard to transition build → verify:
119
-
120
- ```bash
121
- "$COMET_BASH" "$COMET_GUARD" <change-name> build --apply
122
- ```
123
-
124
- State automatically updates to `phase: verify`, `verify_result: pending`, then enter verification.
125
-
126
- ### 4. Verification (preset verify)
127
-
128
- Reuse `/comet-verify`, with comet-verify's scale assessment deciding lightweight or full verification.
129
-
130
- **Immediately execute:** Use the Skill tool to load the `comet-verify` skill. Skipping this step is prohibited.
131
-
132
- Small-scale hotfixes without delta spec usually meet lightweight verification conditions ( 3 tasks, ≤ 2 files), comet-verify's scale assessment will select lightweight verification path (5 quick checks). If hotfix created delta spec, enter full verification path according to comet-verify's scale assessment rules.
133
-
134
- After verification passes, record `.comet.yaml` `verify_result` as `pass` according to `/comet-verify` rules, must not skip this status before archiving. After verification passes, still enter `/comet-archive`'s final archive confirmation; do not automatically run the archive script.
135
-
136
- ### 5. Archive (preset archive)
137
-
138
- Reuse `/comet-archive`. Must satisfy `verify_result: pass` in `.comet.yaml` before archiving, and wait for `/comet-archive`'s final archive confirmation.
139
-
140
- **Immediately execute:** Use the Skill tool to load the `comet-archive` skill to archive. Skipping this step is prohibited.
141
- If there is delta spec, sync to main spec according to comet-archive rules, and handle associated Design Doc and Plan archiving annotations.
142
-
143
- ---
144
-
145
- ## Continuous Execution Mode
146
-
147
- <IMPORTANT>
148
- Hotfix workflow is **one-time continuous execution**. After invoking `/comet-hotfix`, agent must automatically advance through hotfix steps, without pausing to wait for user input mid-way.
149
-
150
- Exception: when `.comet.yaml` has `auto_transition: false`, after each phase guard advances `phase`, do not auto-invoke the next skill. In this case, use `"$COMET_BASH" "$COMET_STATE" next <name>` output and pause for manual continuation as instructed.
151
-
152
- The following situations must also pause and wait for user confirmation:
153
-
154
- 1. Encountering upgrade conditions (see "Upgrade Conditions" section). **Must use the current platform's available user input/confirmation mechanism to pause and wait for the user to explicitly confirm** upgrading to full workflow
155
- 2. workspace isolation and execution-method selection when tasks exceed 3 and transfer to `/comet-build`
156
- 3. verify phase (comet-verify) verification-failure and branch-handling decisions
157
- 4. Final archive confirmation (before comet-archive runs the archive script)
158
-
159
- Execution order: quick open → direct build → root cause check → verification → archive → complete
160
-
161
- After each step completes, immediately enter next step. Within each phase, must still call corresponding Comet/OpenSpec/Superpowers skill according to above requirements; if the called skill has its own user decision points, follow that skill's rules.
162
- </IMPORTANT>
163
-
164
- ---
165
-
166
- ## Upgrade Conditions
167
-
168
- Upgrade to full `/comet` when **any** of the following conditions are met:
169
-
170
- | Condition | Explanation |
171
- |-----------|-------------|
172
- | Change involves **3+ files** | Exceeds single-point fix scope |
173
- | Architecture changes | New modules, new interfaces, new dependencies |
174
- | Database schema changes | Structural adjustments |
175
- | Introduces new public API | Fix creates new external interface |
176
- | Fix scope exceeds single function/module | Requires coordinated changes |
177
-
178
- When upgrade conditions are met, **must use the current platform's available user input/confirmation mechanism to pause and wait for the user to explicitly confirm** upgrading to the full `/comet` workflow. Do not directly enter `/comet-design`, and do not automatically supplement Design Doc. If the current platform has no structured question tool, ask an upgrade confirmation question in the conversation, stop the workflow, and wait for the user's reply before continuing.
179
-
180
- After user confirms upgrade, **must first update the workflow and phase fields** before entering full flow:
181
-
182
- ```bash
183
- "$COMET_BASH" "$COMET_STATE" set <name> workflow full
184
- "$COMET_BASH" "$COMET_STATE" set <name> phase design
185
- ```
186
-
187
- Then on current change basis, supplement Design Doc: **Immediately use the Skill tool to load the `comet-design` skill**, proceed normally with full workflow. If user does not confirm upgrade, stop hotfix and report that current change has exceeded hotfix scope.
188
-
189
- ---
190
-
191
- ## Exit Conditions
192
-
193
- - Bug fixed, tests pass
194
- - Change archived
195
- - If spec changes, synced to main spec
196
- - **Phase guard**: Before build → verify run `"$COMET_BASH" "$COMET_GUARD" <change-name> build --apply`; before verify → archive follow `/comet-verify` and run `"$COMET_BASH" "$COMET_GUARD" <change-name> verify --apply`
197
-
198
- ## Automatic Handoff to Next Phase
199
-
200
- > **Terminology distinction**: phase guard `--apply` advances the `.comet.yaml` `phase` field. This step **always happens** and is not controlled by `auto_transition`. This section's "automatic handoff" only controls whether to automatically invoke the next skill.
201
-
202
- After each phase guard or state transition advances phase, run:
203
-
204
- ```bash
205
- "$COMET_BASH" "$COMET_STATE" next <name>
206
- ```
207
-
208
- The script determines the next action from `phase`, `workflow`, and `auto_transition`:
209
- - `NEXT: auto` -> invoke the `SKILL` target to continue the hotfix flow (`phase: build` returns `comet-hotfix`, `verify` returns `comet-verify`, `archive` returns `comet-archive`)
210
- - `NEXT: manual` -> do not invoke the next skill; follow `HINT` and ask the user to run `/<SKILL>` manually
211
- - `NEXT: done` -> workflow is complete; no further action needed
1
+ ---
2
+ name: comet-hotfix
3
+ description: "Comet preset path: Bug fix / hotfix. Skip brainstorming, directly open → build → verify → archive. Applicable for behavior fixes, scenarios not involving new capability design."
4
+ ---
5
+
6
+ # Comet Preset Path: Hotfix
7
+
8
+ Quick bug fix workflow: open → build → verify → archive. Skip brainstorming and full plan, applicable for behavior fixes not involving new capability design.
9
+
10
+ **Applicable conditions** (all must be met):
11
+ 1. Fix bugs in existing functionality, no new capability
12
+ 2. No interface changes or architecture adjustments
13
+ 3. Change scope is predictable (usually ≤ 2 files)
14
+
15
+ **Not applicable**: If fix process discovers need for architecture adjustments, should upgrade to full `/comet` workflow.
16
+
17
+ ---
18
+
19
+ ## Process (preset workflow, 6 steps)
20
+
21
+ ### 0. Output Language Constraint
22
+
23
+ Streamlined OpenSpec artifacts must use the language of the user request that triggered this workflow.
24
+
25
+ Execution chain: open → build → root cause check → verify → archive. Hotfix provides default decisions for each phase: streamlined open, direct build, root cause confirmation, scale-based verification, and final archive confirmation after verification passes.
26
+
27
+ Locate Comet scripts before starting:
28
+
29
+ ```bash
30
+ COMET_ENV="${COMET_ENV:-$(find . "$HOME"/.*/skills "$HOME/.config" "$HOME/.gemini" -path '*/comet/scripts/comet-env.sh' -type f -print -quit 2>/dev/null)}"
31
+ if [ -z "$COMET_ENV" ]; then
32
+ echo "ERROR: comet-env.sh not found. Ensure the comet skill is installed." >&2
33
+ return 1
34
+ fi
35
+ . "$COMET_ENV"
36
+ ```
37
+
38
+ ### 1. Quick Open (preset open)
39
+
40
+ Reuse Comet open capability to create change, but use hotfix defaults: do not execute `openspec-explore` long exploration, directly enter streamlined change creation.
41
+
42
+ **Immediately execute:** Use the Skill tool to load the `openspec-new-change` skill. Skipping this step is prohibited.
43
+
44
+ After the skill loads, follow its guidance to create streamlined artifacts:
45
+ - `proposal.md` — problem description + root cause analysis + fix goal (no solution comparison needed)
46
+ - `design.md` — fix solution (one is enough, no multi-solution comparison needed)
47
+ - `tasks.md` — fix task list
48
+ - **No delta spec needed** (unless fix changes existing spec acceptance scenarios)
49
+
50
+ Initialize Comet state file:
51
+
52
+ ```bash
53
+ "$COMET_BASH" "$COMET_STATE" init <name> hotfix
54
+ ```
55
+
56
+ Verify initialized state:
57
+
58
+ ```bash
59
+ "$COMET_BASH" "$COMET_STATE" check <name> open
60
+ ```
61
+
62
+ Run phase guard to transition open → build:
63
+
64
+ ```bash
65
+ "$COMET_BASH" "$COMET_GUARD" <change-name> open --apply
66
+ ```
67
+
68
+ Check `auto_transition` to decide whether to continue:
69
+
70
+ ```bash
71
+ "$COMET_BASH" "$COMET_STATE" next <name>
72
+ ```
73
+
74
+ - `NEXT: auto` → continue to Step 2
75
+ - `NEXT: manual` → pause, follow `HINT` to prompt user to run `/<SKILL>` manually
76
+
77
+ ### 2. Direct Build (preset build)
78
+
79
+ Use hotfix defaults: `build_mode: direct`. Skip Superpowers `brainstorming` and `writing-plans` (unless tasks > 3; if exceeds 3 tasks, transfer to `/comet-build`'s plan and execution method selection — note this does NOT trigger full workflow upgrade, only switches execution method).
80
+
81
+ Before continuing or starting changes, handle uncommitted changes through `comet/reference/dirty-worktree.md`. If attribution shows the fix scope exceeds hotfix, handle it through this file's "Upgrade Conditions".
82
+
83
+ **Immediately execute:** Execute tasks one by one according to tasks.md:
84
+
85
+ 1. Read `openspec/changes/<name>/tasks.md`, get incomplete task list
86
+ 2. For each incomplete task:
87
+ - Modify code according to task description
88
+ - Run project formatter (e.g., `mvn spotless:apply`, `npm run format`)
89
+ - Run related tests to confirm pass
90
+ - Check corresponding `- [ ]` to `- [x]` in tasks.md
91
+ - Commit code, commit message format: `fix: <brief fix description>`
92
+ 3. After all tasks complete, explicitly run relevant project tests and build commands
93
+
94
+ **If fix affects existing spec acceptance scenarios**:
95
+ - Create delta spec in `openspec/changes/<name>/specs/<capability>/spec.md`
96
+ - Only include `## MODIFIED Requirements` section
97
+
98
+ During hotfix execution, whenever a crash, unexpected behavior, test failure, or build failure appears while running the program, tests, build, or manual verification, must use the Skill tool to load the Superpowers `systematic-debugging` skill. Before root-cause investigation is complete, must not propose or implement source-code fixes.
99
+
100
+ For specific investigation, minimal failing test, fix verification, and keeping the current change verification loop, follow `comet/reference/debug-gate.md`.
101
+
102
+ ### 3. Root Cause Elimination Check
103
+
104
+ **Execute before running build guard**, ensuring the fix actually eliminates the root cause:
105
+
106
+ 1. Read bug description and root cause in proposal.md
107
+ 2. Search and verify problem code no longer exists
108
+ 3. If root cause not eliminated, return to Step 2 to continue fix (still in build phase, no state transition needed)
109
+
110
+ **Upgrade conditions**:
111
+ - Root cause check reveals deep architecture issues → Stop hotfix, handle per "Upgrade Conditions" section
112
+ - Fix requires additional interface changes Stop hotfix, handle per "Upgrade Conditions" section
113
+
114
+ After root cause is confirmed eliminated, run phase guard to transition build → verify:
115
+
116
+ ```bash
117
+ "$COMET_BASH" "$COMET_GUARD" <change-name> build --apply
118
+ ```
119
+
120
+ State automatically updates to `phase: verify`, `verify_result: pending`, then enter verification.
121
+
122
+ ### 4. Verification (preset verify)
123
+
124
+ Reuse `/comet-verify`, with comet-verify's scale assessment deciding lightweight or full verification.
125
+
126
+ **Immediately execute:** Use the Skill tool to load the `comet-verify` skill. Skipping this step is prohibited.
127
+
128
+ Small-scale hotfixes without delta spec usually meet lightweight verification conditions (≤ 3 tasks, ≤ 2 files), comet-verify's scale assessment will select the lightweight verification path (6 quick checks, including lightweight code review). If hotfix created delta spec, enter full verification path according to comet-verify's scale assessment rules.
129
+
130
+ After verification passes, record `.comet.yaml` `verify_result` as `pass` according to `/comet-verify` rules, must not skip this status before archiving. After verification passes, still enter `/comet-archive`'s final archive confirmation; do not automatically run the archive script.
131
+
132
+ ### 5. Archive (preset archive)
133
+
134
+ Reuse `/comet-archive`. Must satisfy `verify_result: pass` in `.comet.yaml` before archiving, and wait for `/comet-archive`'s final archive confirmation.
135
+
136
+ **Immediately execute:** Use the Skill tool to load the `comet-archive` skill to archive. Skipping this step is prohibited.
137
+ If there is delta spec, sync to main spec according to comet-archive rules, and handle associated Design Doc and Plan archiving annotations.
138
+
139
+ ---
140
+
141
+ ## Continuous Execution Mode
142
+
143
+ <IMPORTANT>
144
+ Hotfix workflow is **one-time continuous execution**. After invoking `/comet-hotfix`, agent must automatically advance through hotfix steps, without pausing to wait for user input mid-way.
145
+
146
+ Exception: when `.comet.yaml` has `auto_transition: false`, after each phase guard advances `phase`, do not auto-invoke the next skill. In this case, use `"$COMET_BASH" "$COMET_STATE" next <name>` output and pause for manual continuation as instructed.
147
+
148
+ The following situations must also pause and wait for user confirmation:
149
+
150
+ 1. Encountering upgrade conditions (see "Upgrade Conditions" section). **Must use the current platform's available user input/confirmation mechanism to pause and wait for the user to explicitly confirm** upgrading to full workflow
151
+ 2. workspace isolation and execution-method selection when tasks exceed 3 and transfer to `/comet-build`
152
+ 3. verify phase (comet-verify) verification-failure and branch-handling decisions
153
+ 4. Final archive confirmation (before comet-archive runs the archive script)
154
+
155
+ Execution order: quick open direct build root cause check verification → archive → complete
156
+
157
+ After each step completes, immediately enter next step. Within each phase, must still call corresponding Comet/OpenSpec/Superpowers skill according to above requirements; if the called skill has its own user decision points, follow that skill's rules.
158
+ </IMPORTANT>
159
+
160
+ ---
161
+
162
+ ## Upgrade Conditions
163
+
164
+ Upgrade to full `/comet` when **any** of the following conditions are met:
165
+
166
+ | Condition | Explanation |
167
+ |-----------|-------------|
168
+ | Change involves **3+ files** | Exceeds single-point fix scope |
169
+ | Architecture changes | New modules, new interfaces, new dependencies |
170
+ | Database schema changes | Structural adjustments |
171
+ | Introduces new public API | Fix creates new external interface |
172
+ | Fix scope exceeds single function/module | Requires coordinated changes |
173
+
174
+ When upgrade conditions are met, **must follow the `comet/reference/decision-point.md` protocol to pause and wait for the user to explicitly confirm** upgrading to the full `/comet` workflow. Do not directly enter `/comet-design`, and do not automatically supplement Design Doc.
175
+
176
+ After user confirms upgrade, **must first update the workflow and phase fields** before entering full flow:
177
+
178
+ ```bash
179
+ "$COMET_BASH" "$COMET_STATE" set <name> workflow full
180
+ "$COMET_BASH" "$COMET_STATE" set <name> phase design
181
+ ```
182
+
183
+ Then on current change basis, supplement Design Doc: **Immediately use the Skill tool to load the `comet-design` skill**, proceed normally with full workflow. If user does not confirm upgrade, stop hotfix and report that current change has exceeded hotfix scope.
184
+
185
+ ---
186
+
187
+ ## Exit Conditions
188
+
189
+ - Bug fixed, tests pass
190
+ - Change archived
191
+ - If spec changes, synced to main spec
192
+ - **Phase guard**: Before build → verify run `"$COMET_BASH" "$COMET_GUARD" <change-name> build --apply`; before verify → archive follow `/comet-verify` and run `"$COMET_BASH" "$COMET_GUARD" <change-name> verify --apply`
193
+
194
+ ## Automatic Handoff to Next Phase
195
+
196
+ Follow `comet/reference/auto-transition.md`. Key command:
197
+
198
+ ```bash
199
+ "$COMET_BASH" "$COMET_STATE" next <name>
200
+ ```
201
+
202
+ - `NEXT: auto` invoke the skill pointed to by `SKILL` to continue hotfix workflow (`phase: build` returns `comet-hotfix`, `verify` returns `comet-verify`, `archive` returns `comet-archive`)
203
+ - `NEXT: manual` → do not invoke the next skill; prompt user to manually run `/<SKILL>` per `HINT`
204
+ - `NEXT: done` → workflow is complete, no further action needed