@rpamis/comet 0.3.6 → 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 (95) hide show
  1. package/README.md +575 -443
  2. package/assets/manifest.json +41 -24
  3. package/assets/skills/comet/SKILL.md +282 -301
  4. package/assets/skills/comet/reference/auto-transition.md +27 -0
  5. package/assets/skills/comet/reference/comet-yaml-fields.md +68 -0
  6. package/assets/skills/comet/reference/context-recovery.md +35 -0
  7. package/assets/skills/comet/reference/debug-gate.md +17 -0
  8. package/assets/skills/comet/reference/decision-point.md +20 -0
  9. package/assets/skills/comet/reference/dirty-worktree.md +1 -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 -0
  14. package/assets/skills/comet/scripts/comet-archive.sh +71 -55
  15. package/assets/skills/comet/scripts/comet-guard.sh +174 -18
  16. package/assets/skills/comet/scripts/comet-handoff.sh +133 -6
  17. package/assets/skills/comet/scripts/comet-hook-guard.sh +260 -0
  18. package/assets/skills/comet/scripts/comet-state.sh +362 -25
  19. package/assets/skills/comet/scripts/comet-yaml-validate.sh +24 -1
  20. package/assets/skills/comet-archive/SKILL.md +100 -73
  21. package/assets/skills/comet-build/SKILL.md +304 -221
  22. package/assets/skills/comet-design/SKILL.md +263 -166
  23. package/assets/skills/comet-hotfix/SKILL.md +204 -169
  24. package/assets/skills/comet-open/SKILL.md +203 -113
  25. package/assets/skills/comet-tweak/SKILL.md +180 -154
  26. package/assets/skills/comet-verify/SKILL.md +234 -201
  27. package/assets/skills-zh/comet/SKILL.md +269 -301
  28. package/assets/skills-zh/comet/reference/auto-transition.md +27 -0
  29. package/assets/skills-zh/comet/reference/comet-yaml-fields.md +68 -0
  30. package/assets/skills-zh/comet/reference/context-recovery.md +35 -0
  31. package/assets/skills-zh/comet/reference/debug-gate.md +17 -0
  32. package/assets/skills-zh/comet/reference/decision-point.md +20 -0
  33. package/assets/skills-zh/comet/reference/dirty-worktree.md +2 -1
  34. package/assets/skills-zh/comet/reference/file-structure.md +28 -0
  35. package/assets/skills-zh/comet/reference/subagent-dispatch.md +113 -0
  36. package/assets/skills-zh/comet-archive/SKILL.md +100 -73
  37. package/assets/skills-zh/comet-build/SKILL.md +304 -221
  38. package/assets/skills-zh/comet-design/SKILL.md +264 -166
  39. package/assets/skills-zh/comet-hotfix/SKILL.md +200 -169
  40. package/assets/skills-zh/comet-open/SKILL.md +203 -113
  41. package/assets/skills-zh/comet-tweak/SKILL.md +176 -154
  42. package/assets/skills-zh/comet-verify/SKILL.md +232 -201
  43. package/dist/cli/index.js +19 -0
  44. package/dist/cli/index.js.map +1 -1
  45. package/dist/commands/doctor.d.ts.map +1 -1
  46. package/dist/commands/doctor.js +22 -0
  47. package/dist/commands/doctor.js.map +1 -1
  48. package/dist/commands/init.d.ts +5 -1
  49. package/dist/commands/init.d.ts.map +1 -1
  50. package/dist/commands/init.js +64 -9
  51. package/dist/commands/init.js.map +1 -1
  52. package/dist/commands/uninstall.d.ts +9 -0
  53. package/dist/commands/uninstall.d.ts.map +1 -0
  54. package/dist/commands/uninstall.js +113 -0
  55. package/dist/commands/uninstall.js.map +1 -0
  56. package/dist/commands/update.d.ts +1 -1
  57. package/dist/commands/update.d.ts.map +1 -1
  58. package/dist/commands/update.js +120 -32
  59. package/dist/commands/update.js.map +1 -1
  60. package/dist/core/codegraph.d.ts +4 -0
  61. package/dist/core/codegraph.d.ts.map +1 -0
  62. package/dist/core/codegraph.js +63 -0
  63. package/dist/core/codegraph.js.map +1 -0
  64. package/dist/core/detect.d.ts +8 -1
  65. package/dist/core/detect.d.ts.map +1 -1
  66. package/dist/core/detect.js +41 -2
  67. package/dist/core/detect.js.map +1 -1
  68. package/dist/core/openspec.d.ts +1 -1
  69. package/dist/core/openspec.d.ts.map +1 -1
  70. package/dist/core/openspec.js +40 -17
  71. package/dist/core/openspec.js.map +1 -1
  72. package/dist/core/platforms.d.ts +10 -0
  73. package/dist/core/platforms.d.ts.map +1 -1
  74. package/dist/core/platforms.js +177 -16
  75. package/dist/core/platforms.js.map +1 -1
  76. package/dist/core/skills.d.ts +36 -1
  77. package/dist/core/skills.d.ts.map +1 -1
  78. package/dist/core/skills.js +451 -15
  79. package/dist/core/skills.js.map +1 -1
  80. package/dist/core/superpowers.d.ts.map +1 -1
  81. package/dist/core/superpowers.js +1 -0
  82. package/dist/core/superpowers.js.map +1 -1
  83. package/dist/core/uninstall.d.ts +28 -0
  84. package/dist/core/uninstall.d.ts.map +1 -0
  85. package/dist/core/uninstall.js +421 -0
  86. package/dist/core/uninstall.js.map +1 -0
  87. package/dist/core/version.d.ts +31 -0
  88. package/dist/core/version.d.ts.map +1 -0
  89. package/dist/core/version.js +111 -0
  90. package/dist/core/version.js.map +1 -0
  91. package/dist/utils/file-system.d.ts +23 -0
  92. package/dist/utils/file-system.d.ts.map +1 -1
  93. package/dist/utils/file-system.js +100 -5
  94. package/dist/utils/file-system.js.map +1 -1
  95. package/package.json +69 -62
@@ -1,169 +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, 5 steps)
20
-
21
- 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, archive after verification passes.
22
-
23
- Locate Comet scripts before starting:
24
-
25
- ```bash
26
- COMET_ENV="${COMET_ENV:-$(find . "$HOME"/.*/skills "$HOME/.config" "$HOME/.gemini" -path '*/comet/scripts/comet-env.sh' -type f -print -quit 2>/dev/null)}"
27
- if [ -z "$COMET_ENV" ]; then
28
- echo "ERROR: comet-env.sh not found. Ensure the comet skill is installed." >&2
29
- return 1
30
- fi
31
- . "$COMET_ENV"
32
- ```
33
-
34
- ### 1. Quick Open (preset open)
35
-
36
- Reuse Comet open capability to create change, but use hotfix defaults: do not execute `openspec-explore` long exploration, directly enter streamlined change creation.
37
-
38
- **Immediately execute:** Use the Skill tool to load the `openspec-new-change` skill. Skipping this step is prohibited.
39
-
40
- After the skill loads, follow its guidance to create streamlined artifacts:
41
- - `proposal.md` — problem description + root cause analysis + fix goal (no solution comparison needed)
42
- - `design.md` fix solution (one is enough, no multi-solution comparison needed)
43
- - `tasks.md` — fix task list
44
- - **No delta spec needed** (unless fix changes existing spec acceptance scenarios)
45
-
46
- Initialize Comet state file:
47
-
48
- ```bash
49
- "$COMET_BASH" "$COMET_STATE" init <name> hotfix
50
- ```
51
-
52
- Verify initialized state:
53
-
54
- ```bash
55
- "$COMET_BASH" "$COMET_STATE" check <name> open
56
- ```
57
-
58
- Run phase guard to transition open → build:
59
-
60
- ```bash
61
- "$COMET_BASH" "$COMET_GUARD" <change-name> open --apply
62
- ```
63
-
64
- ### 2. Direct Build (preset build)
65
-
66
- 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).
67
-
68
- 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".
69
-
70
- **Immediately execute:** Execute tasks one by one according to tasks.md:
71
-
72
- 1. Read `openspec/changes/<name>/tasks.md`, get incomplete task list
73
- 2. For each incomplete task:
74
- - Modify code according to task description
75
- - Run project formatter (e.g., `mvn spotless:apply`, `npm run format`)
76
- - Run related tests to confirm pass
77
- - Check corresponding `- [ ]` to `- [x]` in tasks.md
78
- - Commit code, commit message format: `fix: <brief fix description>`
79
- 3. After all tasks complete, explicitly run relevant project tests and build commands
80
-
81
- **If fix affects existing spec acceptance scenarios**:
82
- - Create delta spec in `openspec/changes/<name>/specs/<capability>/spec.md`
83
- - Only include `## MODIFIED Requirements` section
84
-
85
- ### 3. Root Cause Elimination Check
86
-
87
- **Execute before running build guard**, ensuring the fix actually eliminates the root cause:
88
-
89
- 1. Read bug description and root cause in proposal.md
90
- 2. Search and verify problem code no longer exists
91
- 3. If root cause not eliminated, return to Step 2 to continue fix (still in build phase, no state transition needed)
92
-
93
- **Upgrade conditions**:
94
- - Root cause check reveals deep architecture issues → Stop hotfix, handle per "Upgrade Conditions" section
95
- - Fix requires additional interface changes → Stop hotfix, handle per "Upgrade Conditions" section
96
-
97
- After root cause is confirmed eliminated, run phase guard to transition build → verify:
98
-
99
- ```bash
100
- "$COMET_BASH" "$COMET_GUARD" <change-name> build --apply
101
- ```
102
-
103
- State automatically updates to `phase: verify`, `verify_result: pending`, then enter verification.
104
-
105
- ### 4. Verification (preset verify)
106
-
107
- Reuse `/comet-verify`, with comet-verify's scale assessment deciding lightweight or full verification.
108
-
109
- **Immediately execute:** Use the Skill tool to load the `comet-verify` skill. Skipping this step is prohibited.
110
-
111
- 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.
112
-
113
- After verification passes, record `.comet.yaml` `verify_result` as `pass` according to `/comet-verify` rules, must not skip this status before archiving.
114
-
115
- ### 5. Archive (preset archive)
116
-
117
- Reuse `/comet-archive`. Must satisfy `verify_result: pass` in `.comet.yaml` before archiving.
118
-
119
- **Immediately execute:** Use the Skill tool to load the `comet-archive` skill to archive. Skipping this step is prohibited.
120
- If there is delta spec, sync to main spec according to comet-archive rules, and handle associated Design Doc and Plan archiving annotations.
121
-
122
- ---
123
-
124
- ## Continuous Execution Mode
125
-
126
- <IMPORTANT>
127
- 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. But the following situations must pause and wait for user confirmation:
128
-
129
- 1. Encountering upgrade conditions (see "Upgrade Conditions" section). **Must use the AskUserQuestion tool to pause and wait for the user to explicitly confirm** upgrading to full workflow
130
- 2. workspace isolation and execution-method selection when tasks exceed 3 and transfer to `/comet-build`
131
- 3. verify phase (comet-verify) verification-failure and branch-handling decisions
132
-
133
- Execution order: quick open → direct build → root cause check → verification → archive → complete
134
-
135
- 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.
136
- </IMPORTANT>
137
-
138
- ---
139
-
140
- ## Upgrade Conditions
141
-
142
- Upgrade to full `/comet` when **any** of the following conditions are met:
143
-
144
- | Condition | Explanation |
145
- |-----------|-------------|
146
- | Change involves **3+ files** | Exceeds single-point fix scope |
147
- | Architecture changes | New modules, new interfaces, new dependencies |
148
- | Database schema changes | Structural adjustments |
149
- | Introduces new public API | Fix creates new external interface |
150
- | Fix scope exceeds single function/module | Requires coordinated changes |
151
-
152
- When upgrade conditions are met, **must use the AskUserQuestion tool 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. Must not just output a text prompt and then continue executing.
153
-
154
- After user confirms upgrade, **must first update the workflow field** before entering full flow:
155
-
156
- ```bash
157
- "$COMET_BASH" "$COMET_STATE" set <name> workflow full
158
- ```
159
-
160
- 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.
161
-
162
- ---
163
-
164
- ## Exit Conditions
165
-
166
- - Bug fixed, tests pass
167
- - Change archived
168
- - If spec changes, synced to main spec
169
- - **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`
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