@rpamis/comet 0.4.0-beta.4 → 0.4.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +5 -1
  3. package/assets/manifest.json +1 -1
  4. package/assets/skills/comet/SKILL.md +30 -28
  5. package/assets/skills/comet/reference/auto-transition.md +1 -1
  6. package/assets/skills/comet/reference/comet-yaml-fields.md +6 -4
  7. package/assets/skills/comet/reference/context-recovery.md +2 -2
  8. package/assets/skills/comet/reference/decision-point.md +11 -0
  9. package/assets/skills/comet/reference/subagent-dispatch.md +6 -5
  10. package/assets/skills/comet/rules/comet-phase-guard.en.md +23 -28
  11. package/assets/skills/comet/rules/comet-phase-guard.md +22 -28
  12. package/assets/skills/comet/scripts/comet-runtime.mjs +185 -56
  13. package/assets/skills/comet-any/SKILL.md +1 -1
  14. package/assets/skills/comet-any/reference/authored-zone-example.md +10 -5
  15. package/assets/skills/comet-any/reference/subagents/pause-points-author.md +14 -11
  16. package/assets/skills/comet-any/reference/subagents/skill-reviewer.md +2 -0
  17. package/assets/skills/comet-any/reference/subagents/workflow-entry-author.md +5 -4
  18. package/assets/skills/comet-archive/SKILL.md +34 -13
  19. package/assets/skills/comet-build/SKILL.md +23 -21
  20. package/assets/skills/comet-design/SKILL.md +23 -22
  21. package/assets/skills/comet-hotfix/SKILL.md +35 -34
  22. package/assets/skills/comet-open/SKILL.md +97 -58
  23. package/assets/skills/comet-tweak/SKILL.md +21 -18
  24. package/assets/skills/comet-verify/SKILL.md +35 -59
  25. package/assets/skills-zh/comet/SKILL.md +30 -28
  26. package/assets/skills-zh/comet/reference/auto-transition.md +1 -1
  27. package/assets/skills-zh/comet/reference/comet-yaml-fields.md +6 -4
  28. package/assets/skills-zh/comet/reference/context-recovery.md +2 -2
  29. package/assets/skills-zh/comet/reference/decision-point.md +11 -0
  30. package/assets/skills-zh/comet/reference/subagent-dispatch.md +6 -5
  31. package/assets/skills-zh/comet-any/SKILL.md +1 -1
  32. package/assets/skills-zh/comet-any/reference/authored-zone-example.md +10 -5
  33. package/assets/skills-zh/comet-any/reference/subagents/pause-points-author.md +14 -12
  34. package/assets/skills-zh/comet-any/reference/subagents/skill-reviewer.md +2 -0
  35. package/assets/skills-zh/comet-any/reference/subagents/workflow-entry-author.md +5 -4
  36. package/assets/skills-zh/comet-archive/SKILL.md +34 -13
  37. package/assets/skills-zh/comet-build/SKILL.md +23 -21
  38. package/assets/skills-zh/comet-design/SKILL.md +23 -22
  39. package/assets/skills-zh/comet-hotfix/SKILL.md +34 -33
  40. package/assets/skills-zh/comet-open/SKILL.md +96 -57
  41. package/assets/skills-zh/comet-tweak/SKILL.md +20 -17
  42. package/assets/skills-zh/comet-verify/SKILL.md +35 -59
  43. package/dist/app/commands/doctor.d.ts.map +1 -1
  44. package/dist/app/commands/doctor.js +62 -15
  45. package/dist/app/commands/doctor.js.map +1 -1
  46. package/dist/app/commands/init.d.ts +1 -1
  47. package/dist/app/commands/init.d.ts.map +1 -1
  48. package/dist/app/commands/init.js +58 -14
  49. package/dist/app/commands/init.js.map +1 -1
  50. package/dist/app/commands/uninstall.d.ts +3 -0
  51. package/dist/app/commands/uninstall.d.ts.map +1 -1
  52. package/dist/app/commands/uninstall.js +70 -36
  53. package/dist/app/commands/uninstall.js.map +1 -1
  54. package/dist/app/commands/update.d.ts.map +1 -1
  55. package/dist/app/commands/update.js +213 -34
  56. package/dist/app/commands/update.js.map +1 -1
  57. package/dist/domains/bundle/bundle-platform.d.ts +1 -0
  58. package/dist/domains/bundle/bundle-platform.d.ts.map +1 -1
  59. package/dist/domains/bundle/bundle-platform.js +6 -2
  60. package/dist/domains/bundle/bundle-platform.js.map +1 -1
  61. package/dist/domains/comet-classic/classic-guard.d.ts.map +1 -1
  62. package/dist/domains/comet-classic/classic-guard.js +15 -11
  63. package/dist/domains/comet-classic/classic-guard.js.map +1 -1
  64. package/dist/domains/comet-classic/classic-hook-guard.d.ts.map +1 -1
  65. package/dist/domains/comet-classic/classic-hook-guard.js +113 -19
  66. package/dist/domains/comet-classic/classic-hook-guard.js.map +1 -1
  67. package/dist/domains/comet-classic/classic-resolver.js +1 -1
  68. package/dist/domains/comet-classic/classic-resolver.js.map +1 -1
  69. package/dist/domains/comet-classic/classic-state-command.d.ts.map +1 -1
  70. package/dist/domains/comet-classic/classic-state-command.js +22 -13
  71. package/dist/domains/comet-classic/classic-state-command.js.map +1 -1
  72. package/dist/domains/comet-classic/classic-state.d.ts +3 -2
  73. package/dist/domains/comet-classic/classic-state.d.ts.map +1 -1
  74. package/dist/domains/comet-classic/classic-state.js +13 -1
  75. package/dist/domains/comet-classic/classic-state.js.map +1 -1
  76. package/dist/domains/comet-classic/classic-transitions.d.ts.map +1 -1
  77. package/dist/domains/comet-classic/classic-transitions.js +16 -2
  78. package/dist/domains/comet-classic/classic-transitions.js.map +1 -1
  79. package/dist/domains/comet-classic/classic-validate-command.d.ts.map +1 -1
  80. package/dist/domains/comet-classic/classic-validate-command.js +7 -1
  81. package/dist/domains/comet-classic/classic-validate-command.js.map +1 -1
  82. package/dist/domains/dashboard/web/assets/_commonjsHelpers-CqkleIqs.js +1 -0
  83. package/dist/domains/dashboard/web/assets/arc-TGVUG2WN.js +1 -0
  84. package/dist/domains/dashboard/web/assets/architectureDiagram-3BPJPVTR-ASHmiHoP.js +36 -0
  85. package/dist/domains/dashboard/web/assets/blockDiagram-GPEHLZMM-CwASxBKe.js +132 -0
  86. package/dist/domains/dashboard/web/assets/c4Diagram-AAUBKEIU-BU8z_WNk.js +10 -0
  87. package/dist/domains/dashboard/web/assets/channel-kp6Ng2JJ.js +1 -0
  88. package/dist/domains/dashboard/web/assets/chunk-2J33WTMH-CBGlUx4_.js +1 -0
  89. package/dist/domains/dashboard/web/assets/chunk-4BX2VUAB-CS-iGcFz.js +1 -0
  90. package/dist/domains/dashboard/web/assets/chunk-55IACEB6-BUtCVJat.js +1 -0
  91. package/dist/domains/dashboard/web/assets/chunk-727SXJPM-C94tj_pf.js +206 -0
  92. package/dist/domains/dashboard/web/assets/chunk-AQP2D5EJ-BFOKcpdG.js +231 -0
  93. package/dist/domains/dashboard/web/assets/chunk-FMBD7UC4-Dmx8B-st.js +15 -0
  94. package/dist/domains/dashboard/web/assets/chunk-ND2GUHAM-DYV00CNn.js +1 -0
  95. package/dist/domains/dashboard/web/assets/chunk-QZHKN3VN-DMJJyQnw.js +1 -0
  96. package/dist/domains/dashboard/web/assets/classDiagram-4FO5ZUOK-yBDjgMY_.js +1 -0
  97. package/dist/domains/dashboard/web/assets/classDiagram-v2-Q7XG4LA2-yBDjgMY_.js +1 -0
  98. package/dist/domains/dashboard/web/assets/cose-bilkent-S5V4N54A-P4nE2rea.js +1 -0
  99. package/dist/domains/dashboard/web/assets/cynefin-VYW2F7L2-C-R1HXDv.js +166 -0
  100. package/dist/domains/dashboard/web/assets/cytoscape.esm-D3_iZ_3b.js +321 -0
  101. package/dist/domains/dashboard/web/assets/dagre-BM42HDAG-BH8d-C9z.js +4 -0
  102. package/dist/domains/dashboard/web/assets/defaultLocale-DX6XiGOO.js +1 -0
  103. package/dist/domains/dashboard/web/assets/diagram-2AECGRRQ-DpXTgQIH.js +43 -0
  104. package/dist/domains/dashboard/web/assets/diagram-5GNKFQAL-DSiFJzSw.js +10 -0
  105. package/dist/domains/dashboard/web/assets/diagram-KO2AKTUF-DULMkben.js +3 -0
  106. package/dist/domains/dashboard/web/assets/diagram-LMA3HP47-Pi8m_NO9.js +24 -0
  107. package/dist/domains/dashboard/web/assets/diagram-OG6HWLK6-BSe6bCWm.js +24 -0
  108. package/dist/domains/dashboard/web/assets/erDiagram-TEJ5UH35-zb-FEcbq.js +85 -0
  109. package/dist/domains/dashboard/web/assets/flowDiagram-I6XJVG4X-Dr-Gk0z2.js +162 -0
  110. package/dist/domains/dashboard/web/assets/ganttDiagram-6RSMTGT7-qs6Zb2A6.js +292 -0
  111. package/dist/domains/dashboard/web/assets/gitGraphDiagram-PVQCEYII-BQ314orT.js +106 -0
  112. package/dist/domains/dashboard/web/assets/graph--OzhPTMs.js +1 -0
  113. package/dist/domains/dashboard/web/assets/index-BLAfkNTu.css +1 -0
  114. package/dist/domains/dashboard/web/assets/index-DlSYK56b.js +139 -0
  115. package/dist/domains/dashboard/web/assets/index-DtLUOcAW.js +24 -0
  116. package/dist/domains/dashboard/web/assets/index-QO0z6F4w.js +10 -0
  117. package/dist/domains/dashboard/web/assets/infoDiagram-5YYISTIA-O0bQp98A.js +2 -0
  118. package/dist/domains/dashboard/web/assets/init-Gi6I4Gst.js +1 -0
  119. package/dist/domains/dashboard/web/assets/ishikawaDiagram-YF4QCWOH-BPC7wbKh.js +70 -0
  120. package/dist/domains/dashboard/web/assets/journeyDiagram-JHISSGLW-ohViOd4b.js +139 -0
  121. package/dist/domains/dashboard/web/assets/kanban-definition-UN3LZRKU-CHleNdbG.js +89 -0
  122. package/dist/domains/dashboard/web/assets/katex-HP8lGamR.js +257 -0
  123. package/dist/domains/dashboard/web/assets/layout-SsrduOYp.js +1 -0
  124. package/dist/domains/dashboard/web/assets/linear-CyqiW--Q.js +1 -0
  125. package/dist/domains/dashboard/web/assets/marked.esm-DECB3bxB.js +64 -0
  126. package/dist/domains/dashboard/web/assets/mermaid.core-qS9XvtaK.js +301 -0
  127. package/dist/domains/dashboard/web/assets/mindmap-definition-RKZ34NQL-oaGkqO9l.js +96 -0
  128. package/dist/domains/dashboard/web/assets/ordinal-Cboi1Yqb.js +1 -0
  129. package/dist/domains/dashboard/web/assets/pieDiagram-4H26LBE5-CPcB-AFh.js +30 -0
  130. package/dist/domains/dashboard/web/assets/purify.es-VaSPOPhr.js +3 -0
  131. package/dist/domains/dashboard/web/assets/quadrantDiagram-W4KKPZXB-LFy52Qtj.js +7 -0
  132. package/dist/domains/dashboard/web/assets/requirementDiagram-4Y6WPE33-BdjeaYP_.js +84 -0
  133. package/dist/domains/dashboard/web/assets/sankeyDiagram-5OEKKPKP-DDJ4styL.js +40 -0
  134. package/dist/domains/dashboard/web/assets/sequenceDiagram-3UESZ5HK-BL5bFNoz.js +162 -0
  135. package/dist/domains/dashboard/web/assets/stateDiagram-AJRCARHV-BNUfikui.js +1 -0
  136. package/dist/domains/dashboard/web/assets/stateDiagram-v2-BHNVJYJU-DGrsmWts.js +1 -0
  137. package/dist/domains/dashboard/web/assets/timeline-definition-PNZ67QCA--ps2uu6L.js +120 -0
  138. package/dist/domains/dashboard/web/assets/vennDiagram-CIIHVFJN-C2q8q26c.js +34 -0
  139. package/dist/domains/dashboard/web/assets/wardleyDiagram-YWT4CUSO-BUH9gXqd.js +78 -0
  140. package/dist/domains/dashboard/web/assets/xychartDiagram-2RQKCTM6-B-DielEy.js +7 -0
  141. package/dist/domains/dashboard/web/index.html +16 -16
  142. package/dist/domains/factory/package.d.ts.map +1 -1
  143. package/dist/domains/factory/package.js +20 -6
  144. package/dist/domains/factory/package.js.map +1 -1
  145. package/dist/domains/integrations/openspec.d.ts +4 -1
  146. package/dist/domains/integrations/openspec.d.ts.map +1 -1
  147. package/dist/domains/integrations/openspec.js +56 -4
  148. package/dist/domains/integrations/openspec.js.map +1 -1
  149. package/dist/domains/skill/json-object.d.ts +13 -0
  150. package/dist/domains/skill/json-object.d.ts.map +1 -0
  151. package/dist/domains/skill/json-object.js +24 -0
  152. package/dist/domains/skill/json-object.js.map +1 -0
  153. package/dist/domains/skill/platform-inspect.d.ts +9 -0
  154. package/dist/domains/skill/platform-inspect.d.ts.map +1 -0
  155. package/dist/domains/skill/platform-inspect.js +149 -0
  156. package/dist/domains/skill/platform-inspect.js.map +1 -0
  157. package/dist/domains/skill/platform-install.d.ts +16 -6
  158. package/dist/domains/skill/platform-install.d.ts.map +1 -1
  159. package/dist/domains/skill/platform-install.js +277 -144
  160. package/dist/domains/skill/platform-install.js.map +1 -1
  161. package/dist/domains/skill/uninstall.d.ts.map +1 -1
  162. package/dist/domains/skill/uninstall.js +204 -141
  163. package/dist/domains/skill/uninstall.js.map +1 -1
  164. package/dist/platform/fs/file-system.d.ts +3 -3
  165. package/dist/platform/fs/file-system.d.ts.map +1 -1
  166. package/dist/platform/fs/file-system.js +21 -11
  167. package/dist/platform/fs/file-system.js.map +1 -1
  168. package/dist/platform/install/platforms.d.ts +4 -0
  169. package/dist/platform/install/platforms.d.ts.map +1 -1
  170. package/dist/platform/install/platforms.js +2 -0
  171. package/dist/platform/install/platforms.js.map +1 -1
  172. package/dist/platform/install/project-registry.d.ts +1 -0
  173. package/dist/platform/install/project-registry.d.ts.map +1 -1
  174. package/dist/platform/install/project-registry.js +9 -1
  175. package/dist/platform/install/project-registry.js.map +1 -1
  176. package/dist/platform/install/skill-root-owner.d.ts +15 -0
  177. package/dist/platform/install/skill-root-owner.d.ts.map +1 -0
  178. package/dist/platform/install/skill-root-owner.js +68 -0
  179. package/dist/platform/install/skill-root-owner.js.map +1 -0
  180. package/package.json +6 -1
  181. package/dist/domains/dashboard/web/assets/index-CIvN-PL8.js +0 -22
  182. package/dist/domains/dashboard/web/assets/index-DcyRPBnT.css +0 -1
  183. package/eval/.env +0 -28
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: comet-hotfix
3
- description: "Use when the user wants to fix an existing behavior bug without adding capability or needing full design; also use when resuming hotfix workflow."
3
+ description: "Use only when explicitly invoked as /comet-hotfix or routed by the root Comet skill/runtime to the hotfix preset; fix an existing behavior bug, not an ordinary unmanaged bugfix."
4
4
  ---
5
5
 
6
6
  # Comet Preset Path: Hotfix
@@ -20,7 +20,7 @@ Quick bug fix workflow: open → build → verify → archive. Skip brainstormin
20
20
 
21
21
  ### 0. Output Language Constraint
22
22
 
23
- Streamlined OpenSpec artifacts must use the configured Comet artifact language. Before `.comet.yaml` exists, read `language` from project `.comet/config.yaml`, then fall back to global `~/.comet/config.yaml`; after initialization, use `"$COMET_BASH" "$COMET_STATE" get <name> language`.
23
+ Streamlined OpenSpec artifacts must use the configured Comet artifact language. Before `.comet.yaml` exists, read `language` from project `.comet/config.yaml`, then fall back to global `~/.comet/config.yaml`; after initialization, use `comet state get <name> language`.
24
24
 
25
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
26
 
@@ -34,52 +34,54 @@ Reuse Comet open capability to create change, but use hotfix defaults: do not ex
34
34
 
35
35
  **Immediately execute:** Use the Skill tool to load the `openspec-new-change` skill. Skipping this step is prohibited.
36
36
 
37
- After the skill loads, follow its guidance to create streamlined artifacts:
38
- - `proposal.md` — problem description + root cause analysis + fix goal (no solution comparison needed)
39
- - `design.md` — fix solution (one is enough, no multi-solution comparison needed)
40
- - `tasks.md` — fix task list
41
- - **No delta spec needed** (unless fix changes existing spec acceptance scenarios)
42
-
43
- Initialize Comet state file:
37
+ After the skill loads, create the change skeleton first, then immediately initialize recoverable state and bind the current change:
44
38
 
45
39
  ```bash
46
- node "$COMET_STATE" init <name> hotfix
40
+ comet state init <name> hotfix
41
+ comet state select <name>
42
+ comet state check <name> open
47
43
  ```
48
44
 
49
- Verify initialized state:
50
-
51
- ```bash
52
- node "$COMET_STATE" check <name> open
53
- ```
45
+ Hotfix defaults to `isolation: current`, truthfully indicating execution in the current workspace. Change it to `branch` or `worktree` only after that workspace is actually created/selected. Then create the streamlined artifacts:
46
+ - `proposal.md` — problem description + root cause analysis + fix goal (no solution comparison needed)
47
+ - `design.md` — fix solution (one is enough, no multi-solution comparison needed)
48
+ - `tasks.md` fix task list
49
+ - **No delta spec needed** (unless fix changes existing spec acceptance scenarios)
54
50
 
55
51
  Run phase guard to transition open → build:
56
52
 
57
53
  ```bash
58
- node "$COMET_GUARD" <change-name> open --apply
54
+ comet guard <change-name> open --apply
59
55
  ```
60
56
 
61
57
  Check `auto_transition` to decide whether to continue:
62
58
 
63
59
  ```bash
64
- node "$COMET_STATE" next <name>
60
+ comet state next <name>
65
61
  ```
66
62
 
67
63
  - `NEXT: auto` → continue to Step 2
68
- - `NEXT: manual` → pause, follow `HINT` to prompt user to run `/<SKILL>` manually
64
+ - `NEXT: manual` → return control with `HINT` and end the current invocation; do not ask whether to continue
69
65
 
70
66
  ### 2. Direct Build (preset build)
71
67
 
72
- Use hotfix defaults: `build_mode: direct`, `review_mode: off` (hotfix/tweak skip review_mode selection the guard does not require it for preset workflows). 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).
68
+ Use hotfix defaults: `build_mode: direct`, `tdd_mode: direct`, `review_mode: off`, and `isolation: current`. Here `direct` skips full planning/TDD orchestration; it never skips reproduction, regression coverage, or verification. Skip Superpowers `brainstorming` and `writing-plans`; **task count alone does not route to `/comet-build`**. Keep larger task lists ordered in the current hotfix and ask about upgrading only when a qualitative-change signal or scope tripwire is hit.
73
69
 
74
70
  Before continuing or starting changes, handle uncommitted changes through `comet/reference/dirty-worktree.md`. If attribution shows a qualitative-change signal or file-count tripwire is hit, handle it through this file's "Upgrade Assessment".
75
71
 
76
- **Immediately execute:** Execute tasks one by one according to tasks.md:
72
+ Before implementation, **reproduce the bug and record failing evidence first**:
73
+
74
+ 1. Confirm the reported old behavior with minimal repeatable steps and record the command, input, and actual result
75
+ 2. When automatable, add and run a regression test that fails for this bug; confirm the failure is caused by the bug rather than the environment or test itself
76
+ 3. If automation is temporarily impossible, record why plus repeatable manual failing evidence in the proposal/verification report; never edit code without evidence
77
+
78
+ After RED evidence exists, execute tasks one by one according to tasks.md:
77
79
 
78
80
  1. Read `openspec/changes/<name>/tasks.md`, get incomplete task list
79
81
  2. For each incomplete task:
80
82
  - Modify code according to task description
81
83
  - Run project formatter (e.g., `mvn spotless:apply`, `npm run format`)
82
- - Run related tests to confirm pass
84
+ - First rerun the new failing regression test and confirm it turns green, then run related tests
83
85
  - Check corresponding `- [ ]` to `- [x]` in tasks.md
84
86
  - Commit code, commit message format: `fix: <brief fix description>`
85
87
  3. After all tasks complete, explicitly run relevant project tests and build commands
@@ -107,7 +109,7 @@ For specific investigation, minimal failing test, fix verification, and keeping
107
109
  After root cause is confirmed eliminated, run phase guard to transition build → verify:
108
110
 
109
111
  ```bash
110
- node "$COMET_GUARD" <change-name> build --apply
112
+ comet guard <change-name> build --apply
111
113
  ```
112
114
 
113
115
  State automatically updates to `phase: verify`, `verify_result: pending`, then enter verification.
@@ -118,7 +120,7 @@ Reuse `/comet-verify`, with comet-verify's scale assessment deciding lightweight
118
120
 
119
121
  **Immediately execute:** Use the Skill tool to load the `comet-verify` skill. Skipping this step is prohibited.
120
122
 
121
- Small-scale hotfixes without delta spec usually meet lightweight verification conditions (≤ 3 tasks, changed files below the scale threshold), comet-verify's scale assessment will select the lightweight verification path (6 quick checks; default `review_mode: off` does not dispatch automatic code review). If the user wants to increase review, they can run `node "$COMET_STATE" set <name> review_mode standard` or `thorough` before verification. If hotfix created delta spec, enter full verification path according to comet-verify's scale assessment rules.
123
+ Small-scale hotfixes without delta spec usually meet lightweight verification conditions (≤ 3 tasks, changed files below the scale threshold), comet-verify's scale assessment will select the lightweight verification path (6 quick checks; default `review_mode: off` does not dispatch automatic code review). If the user wants to increase review, they can run `comet state set <name> review_mode standard` or `thorough` before verification. If hotfix created delta spec, enter full verification path according to comet-verify's scale assessment rules.
122
124
 
123
125
  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.
124
126
 
@@ -136,14 +138,13 @@ If there is delta spec, sync to main spec according to comet-archive rules, and
136
138
  <IMPORTANT>
137
139
  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.
138
140
 
139
- 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 `node "$COMET_STATE" next <name>` output and pause for manual continuation as instructed.
141
+ Exception: when `.comet.yaml` has `auto_transition: false`, end the current invocation at each phase boundary and return control with `HINT`; the user may run the next phase later. This is a manual handoff, not a new confirmation point.
140
142
 
141
- The following situations must also pause and wait for user confirmation:
143
+ The following genuine user decisions still pause:
142
144
 
143
145
  1. Encountering an upgrade-assessment signal (see "Upgrade Assessment" section). **Must use the current platform's available user input/confirmation mechanism to pause and wait for the user to explicitly choose**: continue the hotfix flow, or upgrade to the full `/comet` workflow
144
- 2. workspace isolation and execution-method selection when tasks exceed 3 and transfer to `/comet-build`
145
- 3. verify phase (comet-verify) verification-failure and branch-handling decisions
146
- 4. Final archive confirmation (before comet-archive runs the archive script)
146
+ 2. Verify-phase acceptance of WARNING/SUGGESTION deviations, Spec drift handling, or strategy after the automatic repair limit; the first 3 clearly repairable failures close automatically
147
+ 3. Final archive confirmation and the branch-handling decision after the archive commit
147
148
 
148
149
  Execution order: quick open → direct build → root cause check → verification → archive → complete
149
150
 
@@ -154,7 +155,7 @@ After each step completes, immediately enter next step. Within each phase, must
154
155
 
155
156
  ## Upgrade Assessment
156
157
 
157
- Hotfix upgrade assessment only decides whether to move from the preset workflow to full; file count never upgrades automatically, and `comet-state scale` only decides verification weight.
158
+ Hotfix upgrade assessment only decides whether to move from the preset workflow to full; file count never upgrades automatically, and `comet state scale` only decides verification weight.
158
159
 
159
160
  If `/comet` passes an intent frame from the entry, hotfix must recheck `risk_signal` and escalation signals only before build: new capability, public API, schema change, cross-module coordination, or deep architecture work. When any signal matches, enter the existing escalation decision point; do not reimplement entry intent recognition.
160
161
 
@@ -167,10 +168,10 @@ When a qualitative-change signal or file-count tripwire is hit, **must pause und
167
168
  After the user chooses upgrade (option B), use the legal state-machine upgrade channel, a single command that converts the preset workflow to full and rolls back to design:
168
169
 
169
170
  ```bash
170
- node "$COMET_STATE" transition <name> preset-escalate
171
+ comet state transition <name> preset-escalate
171
172
  ```
172
173
 
173
- This command atomically sets `workflow`/`classic_profile` to `full`, rolls `phase` back to `design`, and clears `design_doc` (satisfying comet-design entry requirements). Then add the Design Doc on the current change: **immediately use the Skill tool to load the `comet-design` skill**, then proceed through the normal full workflow.
174
+ This command atomically sets `workflow`/`classic_profile` to `full`, rolls `phase` back to `design`, clears `design_doc`, and clears preset-only `build_mode`, `tdd_mode`, `review_mode`, `isolation`, and `verify_mode`. Then add the Design Doc on the current change: **immediately use the Skill tool to load the `comet-design` skill**. On entering build, run the full joint workflow-configuration decision again.
174
175
 
175
176
  When the user chooses continue (option A), continue the hotfix workflow and record the user's reason for continuing.
176
177
 
@@ -181,16 +182,16 @@ When the user chooses continue (option A), continue the hotfix workflow and reco
181
182
  - Bug fixed, tests pass
182
183
  - Change archived
183
184
  - If spec changes, synced to main spec
184
- - **Phase guard**: Before build → verify run `node "$COMET_GUARD" <change-name> build --apply`; before verify → archive follow `/comet-verify` and run `node "$COMET_GUARD" <change-name> verify --apply`
185
+ - **Phase guard**: Before build → verify run `comet guard <change-name> build --apply`; before verify → archive follow `/comet-verify` and run `comet guard <change-name> verify --apply`
185
186
 
186
187
  ## Automatic Handoff to Next Phase
187
188
 
188
189
  Follow `comet/reference/auto-transition.md`. Key command:
189
190
 
190
191
  ```bash
191
- node "$COMET_STATE" next <name>
192
+ comet state next <name>
192
193
  ```
193
194
 
194
195
  - `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`)
195
- - `NEXT: manual` → do not invoke the next skill; prompt user to manually run `/<SKILL>` per `HINT`
196
+ - `NEXT: manual` → do not invoke the next skill; return control with `HINT`, end the invocation, and do not create another confirmation point
196
197
  - `NEXT: done` → workflow is complete, no further action needed
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: comet-open
3
- description: "Use when Comet needs to create a new OpenSpec change, or an active change is missing proposal/design/tasks/.comet.yaml initialization artifacts."
3
+ description: "Use only when explicitly invoked as /comet-open or routed by the root Comet skill/runtime to the open phase; create or recover an OpenSpec change and its proposal/design/tasks/.comet.yaml artifacts."
4
4
  ---
5
5
 
6
6
  # Comet Phase 1: Open
@@ -13,11 +13,15 @@ description: "Use when Comet needs to create a new OpenSpec change, or an active
13
13
 
14
14
  ### 0. Output Language Constraint
15
15
 
16
- Every prompt and artifact request passed to OpenSpec must include the resolved Comet artifact language, using normalized ids such as `en` or `zh-CN`. Before `.comet.yaml` exists, read `language` from project `.comet/config.yaml`, then fall back to global `~/.comet/config.yaml`; after the change is initialized, use `"$COMET_BASH" "$COMET_STATE" get <name> language`. If no configured language exists, fall back to the current user request language. The generated `proposal.md`, `design.md`, and `tasks.md` must use that language as their main language.
16
+ Every prompt and artifact request passed to OpenSpec must include the resolved Comet artifact language, using normalized ids such as `en` or `zh-CN`. Before `.comet.yaml` exists, read `language` from project `.comet/config.yaml`, then fall back to global `~/.comet/config.yaml`; after the change is initialized, use `comet state get <name> language`. If no configured language exists, fall back to the current user request language. The generated `proposal.md`, `design.md`, and `tasks.md` must use that language as their main language.
17
17
 
18
18
  ### 0a. Current Change Binding
19
19
 
20
- When resuming an existing change, the first state operation must be:
20
+ When resuming an existing change, inspect `openspec/changes/<change-name>/.comet.yaml` first:
21
+
22
+ - If it exists and parses, select the change as the first state operation
23
+ - If it is missing but the change directory is valid, run `comet state init <change-name> full`, then select the change
24
+ - If it is malformed, stop and report the parse error; repair it manually from version control, a backup, or verifiable artifacts before continuing, and never overwrite a damaged file with `state set`
21
25
 
22
26
  ```bash
23
27
  comet state select <change-name>
@@ -25,6 +29,16 @@ comet state select <change-name>
25
29
 
26
30
  When creating a new change, initialize `.comet.yaml` first, then immediately run the same command; never fabricate a selection before state exists.
27
31
 
32
+ ### 0b. OpenSpec Compatibility Check
33
+
34
+ Before any OpenSpec status or instructions command, run:
35
+
36
+ ```bash
37
+ openspec --version
38
+ ```
39
+
40
+ This flow requires **OpenSpec >= 1.5.0**. Stop immediately if the version is older than 1.5.0, cannot be parsed, the command is unavailable, or it exits non-zero. Ask the user to run `npm install -g @fission-ai/openspec@latest` and retry. Never continue with an older CLI that lacks the `applyRequires`, `artifactPaths`, `changeRoot`, or `resolvedOutputPath` contracts.
41
+
28
42
  ### 1. Explore Ideas and Clarify Requirements
29
43
 
30
44
  **Immediately execute:** Use the Skill tool to load the `openspec-explore` skill. Skipping this step is prohibited.
@@ -67,36 +81,44 @@ Every accepted split item must be created as an independent change through `/com
67
81
 
68
82
  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.
69
83
 
84
+ Immediately after the user confirms multiple changes, persist the accepted split to `.comet/batches/<batch-id>.json`. Use a stable kebab-case `batch-id`. The file must record at least `version`, the original goal summary, creation time, the ordered change names, and each item's goals, scope, non-goals, acceptance scenarios, and `pending|open-complete|selected` status. Atomically update it after each item is created or completed. This is a batch orchestration manifest, not a replacement for each change's `.comet.yaml`.
85
+
70
86
  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.
71
87
 
72
- 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`.
88
+ In batch split mode, a single split item must not auto-advance to `/comet-design` after completing the open phase.
73
89
 
74
- 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.
90
+ **Batch completion hard check (must not be skipped)**: after every split item completes its own open phase, run the following for each `<name>` in the user-confirmed list:
75
91
 
76
- ### 1b. Requirements Clarification Completion Confirmation (Blocking Point)
92
+ ```bash
93
+ openspec status --change "<name>" --json
94
+ comet state check <name> design
95
+ ```
77
96
 
78
- 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.
97
+ The OpenSpec JSON must satisfy all of these conditions:
98
+ - Resolved `changeRoot` must equal repository-local `openspec/changes/<name>`; stop if it does not, because Classic runtime does not support an external change root
99
+ - The schema must include core artifact ids `proposal`, `design`, and `tasks`; extra artifacts are allowed, but a missing core id is an incompatible schema
100
+ - Every artifact listed in `applyRequires` must be `done` in `artifacts`
101
+ - Concrete outputs in `artifactPaths.<artifact-id>.existingOutputPaths` (or `resolvedOutputPath` from instructions) must exist and be non-empty
102
+ - Treat `isComplete` as diagnostic only; it neither replaces the `applyRequires` implementation-readiness check nor lets optional artifacts block phase advancement
79
103
 
80
- When pausing, present the clarification summary: goals, non-goals, scope boundaries, key unknowns, and draft acceptance scenarios.
104
+ If any split item fails these checks, must not report splitting complete or ask which change to start. Stop and resume `/comet-open` from that change's first `ready` or `blocked` artifact. If OpenSpec passes but Comet state fails, repair `.comet.yaml` initialization or phase, then rerun the checks for the entire batch.
81
105
 
82
- 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.
106
+ Only after every split item passes both CLI checks may you pause and ask which change to start. Mark the chosen item `selected` in the batch manifest, then advance only that change into `/comet-design`; other changes remain active and can be resumed later through `/comet`.
83
107
 
84
- ### 1c. Change Name Confirmation (Blocking Point)
108
+ On resume, read `.comet/batches/<batch-id>.json` first, then run the CLI checks above for already-created active changes. Do not recreate items that fully pass; resume incomplete items from the first `ready` artifact returned by OpenSpec. Create missing items from the persisted manifest. If the manifest is missing or damaged, stop and ask the user to rebuild/confirm it instead of inferring the original batch boundary from directory names.
85
109
 
86
- 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.
110
+ ### 1b. Resolve Requirements and Change Name (Non-blocking by Default)
87
111
 
88
- 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.
112
+ Before creating OpenSpec artifacts, turn Step 1 clarification into a resolved brief containing the goal, non-goals, scope boundaries, key unknowns, and draft acceptance scenarios. Derive one kebab-case English change name that accurately represents that scope.
89
113
 
90
- When pausing, present:
91
- - **2-3 recommended kebab-case English names** derived from the confirmed clarification summary, each with a one-line description of the scope it implies
92
- - An explicit option for the user to **enter their own name**
93
- - 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
114
+ - **Continue directly when scope and naming are both unambiguous**. Do not pause merely to approve a summary or name; final review confirms the change name, scope, and artifacts together
115
+ - If the user supplied a name, normalize it to kebab-case and echo it in the progress update. Do not re-confirm when normalization preserves meaning
116
+ - Reuse a confirmed batch item's persisted summary and name. Re-clarify only when scope drift or missing manifest data is detected
117
+ - Use `comet/reference/decision-point.md` for one joint question only when mutually exclusive choices still change scope or the target change identity. Naming preference alone is not a blocking point
94
118
 
95
- The decision options must include:
96
- - Pick one of the recommended names
97
- - "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
119
+ OpenSpec names must be kebab-case English using lowercase letters, digits, and single hyphens. When a collision exists but the target remains clear, derive a stable non-conflicting name and continue. Ask only when Comet cannot determine whether to reuse the existing change or create a new one.
98
120
 
99
- 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.
121
+ Do not run `openspec new change` or create proposal/design/tasks while the resolved brief or name remains ambiguous. Continue clarification or resolve the genuine user decision before Step 2.
100
122
 
101
123
  ### 2. Create Change Structure + Initialize State
102
124
 
@@ -104,35 +126,50 @@ Must not run `openspec new change` or create `.comet.yaml` before the user confi
104
126
 
105
127
  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.
106
128
 
107
- 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.
129
+ After the skill loads, follow its guidance to create the change skeleton. When Step 1b has produced an unambiguous resolved brief, override its "STOP and wait for user direction" behavior to avoid a duplicate question.
130
+
131
+ Use the Step 1b resolved brief directly to populate artifact content. Fall back to the skill's question flow only when ambiguity remains that would change scope.
132
+
133
+ Immediately after creating the change skeleton, initialize recoverable state instead of waiting until every artifact is generated:
108
134
 
109
- 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.
135
+ ```bash
136
+ comet state init <name> full
137
+ comet state select <name>
138
+ comet state check <name> open
139
+ ```
140
+
141
+ Stop if any command fails. Then run `openspec status --change "<name>" --json` once and perform compatibility preflight:
110
142
 
111
- After the change skeleton is created, generate `proposal`, `design`, and `tasks` one by one using the standard artifact loop:
143
+ - Resolved `changeRoot` must equal repository-local `openspec/changes/<name>`, and `planningHome` (when present) must remain inside the current repository
144
+ - `artifacts` must contain core ids `proposal`, `design`, and `tasks`; extra artifacts are allowed
145
+ - `applyRequires` must be a parseable list of artifact ids and every id must exist in `artifacts`
146
+ - Stop on missing fields, escaping paths, or missing core ids; never fall back to a guessed fixed template
112
147
 
113
- **Standard Artifact Loop** (for each `artifact-id`: `proposal` `design` `tasks`):
148
+ After preflight, generate the implementation-required artifacts from the OpenSpec schema and dependency graph:
114
149
 
115
- 1. Refresh status: `openspec status --change "<name>" --json`
116
- 2. Fetch artifact instructions:
150
+ **OpenSpec status-driven artifact loop**:
151
+
152
+ 1. Run `openspec status --change "<name>" --json` and parse the complete JSON.
153
+ 2. Exit when every item in `applyRequires` is `done`; record `isComplete` as diagnostic only and do not use it as a phase blocker.
154
+ 3. From unfinished `ready` artifacts, prioritize items that advance the `applyRequires` dependency closure and process them in CLI-returned order. Must not hard-code generation order or assume the schema contains only proposal/design/tasks.
155
+ 4. Fetch current instructions for each ready `<artifact-id>`:
117
156
 
118
157
  ```bash
119
- openspec instructions proposal --change "<name>" --json
120
- openspec instructions design --change "<name>" --json
121
- openspec instructions tasks --change "<name>" --json
158
+ openspec instructions <artifact-id> --change "<name>" --json
122
159
  ```
123
160
 
124
- 3. For the returned JSON instruction payload, you must:
161
+ 5. For the returned JSON instruction payload, you must:
125
162
  - Read every completed dependency artifact listed in `dependencies`
126
163
  - Use `template` as the artifact structure
127
164
  - Follow `instruction` guidance
128
- - Apply `context` and `rules` as constraints — **must not copy them into the artifact content**
129
- - Write to `resolvedOutputPath`
130
- - Verify the output file exists and is non-empty
131
- 4. After creating each artifact, re-run `openspec status --change "<name>" --json` to confirm status before continuing to the next artifact
165
+ - Apply `context` and `rules` as constraints — **must not copy them into artifact content**
166
+ - Write to `resolvedOutputPath`; for wildcard outputs, create each concrete file required by the instruction
167
+ - Verify the concrete output files returned by the CLI exist and are non-empty
168
+ 6. Re-run status after creating each artifact and revalidate `changeRoot`, core ids, and `applyRequires`. Do not regenerate items that become `done`; process newly `ready` items in the next loop.
132
169
 
133
- **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.
170
+ **Blocking and failure handling**: if `applyRequires` is incomplete and no ready artifact can advance its dependency closure, report `missingDeps` for the relevant `blocked` artifacts and stop. Do not guess order or skip dependencies. Also stop if status/instructions fails, returns invalid JSON, escapes the repository, or provides no usable `resolvedOutputPath`. Must not fall back to hard-coded artifact prose.
134
171
 
135
- **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.
172
+ **Naming and scope guard**: Use the kebab-case English name resolved in Step 1b; never use a non-kebab-case name. Change scope must match the resolved brief and user request; do not expand or narrow it independently.
136
173
 
137
174
  Confirm the following artifacts have been created:
138
175
 
@@ -145,43 +182,45 @@ openspec/changes/<name>/
145
182
  └── tasks.md # Task checklist (checkboxes)
146
183
  ```
147
184
 
148
- Create `.comet.yaml` state file:
149
-
150
- First locate scripts via `comet/reference/scripts.md`, then initialize state:
151
-
152
- ```bash
153
- node "$COMET_STATE" init <name> full
154
- ```
155
-
156
185
  ### 3. Entry State Verification
157
186
 
158
187
  Verify state machine has been correctly initialized:
159
188
 
160
189
  ```bash
161
- node "$COMET_STATE" check <name> open
190
+ comet state check <name> open
162
191
  ```
163
192
 
164
193
  Proceed to Step 4 after verification passes. The script outputs specific failure reasons when verification fails.
165
194
 
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.
195
+ **Idempotent recovery algorithm**: all open phase operations can be safely re-executed. On recovery, process the status in this order:
196
+
197
+ 1. If state is missing, run `comet state init <name> full`; if malformed, stop and repair it instead of overwriting it. Then select the change and run `comet state check <name> open`.
198
+ 2. Run status and revalidate `changeRoot`, core ids, `applyRequires`, `artifacts`, and `missingDeps`.
199
+ 3. `done`: keep the artifact unchanged and do not regenerate it.
200
+ 4. `ready`: fetch its instructions, write the returned output, and immediately rerun status.
201
+ 5. `blocked`: follow `missingDeps` and first complete dependencies in the `applyRequires` closure; never generate a blocked artifact directly.
202
+ 6. Repeat until every item in `applyRequires` is `done`.
203
+
204
+ If the required dependency graph cannot advance, list the relevant blocked artifacts and `missingDeps`, then stop. Directory or fixed-file presence cannot replace the CLI decision; conversely, an optional artifact outside `applyRequires` must not block implementation solely because `isComplete` is false.
167
205
 
168
206
  ### 4. Content Completeness Check
169
207
 
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
208
+ Run status again. Confirm core ids exist, every item in `applyRequires` is `done`, and concrete files in `artifactPaths.<id>.existingOutputPaths` for required artifacts exist and are non-empty. If any condition fails, do not enter Step 5 or execute the phase guard.
174
209
 
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.
210
+ Then check key artifact content: proposal covers problem, goals, scope, and non-goals; design covers high-level decisions and data flow; tasks contains clear work items. If the schema returns specs or other artifacts, check their content against their instructions as well; the fixed three documents must not hide an incomplete schema artifact.
176
211
 
177
212
  ### 5. User Review and Confirmation (Blocking Point)
178
213
 
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.
214
+ After all OpenSpec artifacts are complete and the content check passes, **must follow the `comet/reference/decision-point.md` protocol to pause and wait for user confirmation**. Must not execute the phase guard or auto-transition before user confirmation.
215
+
216
+ The final review confirms the change name, scope, and artifact content together. Do not skip it because Step 1b resolved the brief, and do not add another routine summary/name confirmation before it.
180
217
 
181
218
  The user confirmation question must be presented as a single-select question with the following summary and options:
182
219
 
183
220
  **Summary content**:
221
+ - **Change name and resolved brief**: final name, goal, non-goals, scope boundaries, and key unknowns
184
222
  - **proposal.md**: problem background, goals, scope
223
+ - **specs and other schema artifacts**: capabilities, requirements, and key acceptance scenarios
185
224
  - **design.md**: high-level architecture decisions, approach selection
186
225
  - **tasks.md**: task count and key task descriptions
187
226
 
@@ -193,14 +232,14 @@ After user selects "Confirm", proceed to exit conditions. When user selects "Nee
193
232
 
194
233
  ## Exit Conditions
195
234
 
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 `node "$COMET_GUARD" <change-name> open --apply`; after all PASS, auto-transitions to next phase
235
+ - OpenSpec compatibility preflight passes, every `applyRequires` item is `done`, and required outputs are non-empty
236
+ - **User has confirmed** all OpenSpec artifact content meets expectations
237
+ - **Phase guard**: Run `comet guard <change-name> open --apply`; after all PASS, auto-transitions to next phase
199
238
 
200
239
  Must use `--apply` before exit, otherwise `.comet.yaml` remains at `phase: open` and the next phase entry check will fail.
201
240
 
202
241
  ```bash
203
- node "$COMET_GUARD" <change-name> open --apply
242
+ comet guard <change-name> open --apply
204
243
  ```
205
244
 
206
245
  Full workflow auto-transitions to `phase: design`; hotfix/tweak presets auto-transition to `phase: build`.
@@ -210,11 +249,11 @@ Full workflow auto-transitions to `phase: design`; hotfix/tweak presets auto-tra
210
249
  Follow `comet/reference/auto-transition.md`. Key command:
211
250
 
212
251
  ```bash
213
- node "$COMET_STATE" next <change-name>
252
+ comet state next <change-name>
214
253
  ```
215
254
 
216
255
  - `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
256
+ - `NEXT: manual` → do not invoke the next skill; return control with `HINT`, end the invocation, and do not create another confirmation point
218
257
  - `NEXT: done` → workflow is complete, no further action needed
219
258
 
220
259
  hotfix/tweak presets are controlled by their corresponding preset skill (phase goes directly to build); their `next` returns the corresponding preset skill.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: comet-tweak
3
- description: "Use when the user wants a lightweight or medium change that fits a single OpenSpec change and does not need full design; also use when resuming tweak workflow."
3
+ description: "Use only when explicitly invoked as /comet-tweak or routed by the root Comet skill/runtime to the tweak preset; handle a lightweight or medium change that fits one OpenSpec change."
4
4
  ---
5
5
 
6
6
  # Comet Preset Path: Tweak
@@ -23,7 +23,7 @@ Applicable for OpenSpec-chained lightweight changes, such as configuration adjus
23
23
 
24
24
  ### 0. Output Language Constraint
25
25
 
26
- Streamlined OpenSpec artifacts must use the configured Comet artifact language. Before `.comet.yaml` exists, read `language` from project `.comet/config.yaml`, then fall back to global `~/.comet/config.yaml`; after initialization, use `"$COMET_BASH" "$COMET_STATE" get <name> language`.
26
+ Streamlined OpenSpec artifacts must use the configured Comet artifact language. Before `.comet.yaml` exists, read `language` from project `.comet/config.yaml`, then fall back to global `~/.comet/config.yaml`; after initialization, use `comet state get <name> language`.
27
27
 
28
28
  Execution chain: open → OpenSpec apply → verify → archive. Tweak provides default decisions for each phase: streamlined open, direct build through OpenSpec apply, scale- and delta-spec-driven verification weight, and final archive confirmation after verification passes.
29
29
 
@@ -46,19 +46,22 @@ After the skill loads, follow its guidance to create streamlined artifacts:
46
46
  Initialize Comet state file:
47
47
 
48
48
  ```bash
49
- node "$COMET_STATE" init <name> tweak
49
+ comet state init <name> tweak
50
+ comet state select <name>
50
51
  ```
51
52
 
53
+ Tweak defaults to `isolation: current`, truthfully indicating execution in the current workspace. Change it to `branch` or `worktree` only after that workspace is actually created/selected.
54
+
52
55
  Verify initialized state:
53
56
 
54
57
  ```bash
55
- node "$COMET_STATE" check <name> open
58
+ comet state check <name> open
56
59
  ```
57
60
 
58
61
  Run phase guard to transition open → build:
59
62
 
60
63
  ```bash
61
- node "$COMET_GUARD" <change-name> open --apply
64
+ comet guard <change-name> open --apply
62
65
  ```
63
66
 
64
67
  ### 2. OpenSpec Apply Build (tweak-only preset build)
@@ -95,7 +98,7 @@ For specific investigation, minimal failing test, fix verification, and keeping
95
98
  7. Run phase guard to transition build → verify:
96
99
 
97
100
  ```bash
98
- node "$COMET_GUARD" <change-name> build --apply
101
+ comet guard <change-name> build --apply
99
102
  ```
100
103
 
101
104
  State automatically updates to `phase: verify`, `verify_result: pending`, then enter verification.
@@ -109,10 +112,10 @@ Reuse `/comet-verify`; let comet-verify's scale assessment decide lightweight or
109
112
  **Delta-spec verification routing**: tweak accepts delta spec as a normal artifact. If this change created a delta spec, explicitly set full verification mode before entering comet-verify, to run OpenSpec-native verification (`openspec-verify-change`) covering delta-spec consistency:
110
113
 
111
114
  ```bash
112
- node "$COMET_STATE" set <change-name> verify_mode full
115
+ comet state set <change-name> verify_mode full
113
116
  ```
114
117
 
115
- A tweak without delta spec usually meets lightweight verification conditions (≤ 3 tasks, changed files below the scale threshold); comet-verify's scale assessment selects the lightweight verification path (6 quick checks). If the user wants to add review, run `node "$COMET_STATE" set <name> review_mode standard` or `thorough` before verification.
118
+ A tweak without delta spec usually meets lightweight verification conditions (≤ 3 tasks, changed files below the scale threshold); comet-verify's scale assessment selects the lightweight verification path (6 quick checks). If the user wants to add review, run `comet state set <name> review_mode standard` or `thorough` before verification.
116
119
 
117
120
  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.
118
121
 
@@ -129,13 +132,13 @@ Reuse `/comet-archive`. Must satisfy `verify_result: pass` in `.comet.yaml` befo
129
132
  <IMPORTANT>
130
133
  Tweak workflow is **one-time continuous execution**. After invoking `/comet-tweak`, agent must automatically advance through tweak steps, without pausing to wait for user input mid-way.
131
134
 
132
- 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 `node "$COMET_STATE" next <name>` output and pause for manual continuation as instructed.
135
+ Exception: when `.comet.yaml` has `auto_transition: false`, end the current invocation at each phase boundary and return control with `HINT`; the user may run the next phase later. This is a manual handoff, not a new confirmation point.
133
136
 
134
- The following situations must pause and wait for user confirmation:
137
+ The following genuine user decisions still pause:
135
138
 
136
139
  1. Encountering an upgrade-assessment signal (see "Upgrade Assessment" section). **Must use the current platform's available user input/confirmation mechanism to pause and wait for the user to explicitly choose**: continue the tweak lightweight flow, or upgrade to the full `/comet` workflow
137
- 2. verify phase (comet-verify) verification-failure and branch-handling decisions
138
- 3. Final archive confirmation (before comet-archive runs the archive script)
140
+ 2. Verify-phase acceptance of WARNING/SUGGESTION deviations, Spec drift handling, or strategy after the automatic repair limit; the first 3 clearly repairable failures close automatically
141
+ 3. Final archive confirmation and the branch-handling decision after the archive commit
139
142
 
140
143
  Execution order: quick open → build (with upgrade assessment) → verification → archive → complete
141
144
 
@@ -146,7 +149,7 @@ After each phase completes, immediately enter next phase. Within each phase, mus
146
149
 
147
150
  ## Upgrade Assessment
148
151
 
149
- Tweak upgrade assessment only decides whether to move from the lightweight preset to full; delta spec alone is not an upgrade reason, file count never upgrades automatically, and `comet-state scale` only decides verification weight.
152
+ Tweak upgrade assessment only decides whether to move from the lightweight preset to full; delta spec alone is not an upgrade reason, file count never upgrades automatically, and `comet state scale` only decides verification weight.
150
153
 
151
154
  If `/comet` passes an intent frame from the entry, tweak must recheck `risk_signal` and escalation signals only before build: new capability, public API, schema change, cross-module coordination, or deep architecture work. When any signal matches, enter the existing escalation decision point. Delta spec remains a normal tweak artifact and must not trigger escalation by itself; do not reimplement entry intent recognition.
152
155
 
@@ -159,10 +162,10 @@ When a qualitative-change signal or file-count tripwire is hit, **must pause und
159
162
  After the user chooses upgrade (option B), use the legal state-machine upgrade channel, a single command that converts the preset workflow to full and rolls back to design:
160
163
 
161
164
  ```bash
162
- node "$COMET_STATE" transition <name> preset-escalate
165
+ comet state transition <name> preset-escalate
163
166
  ```
164
167
 
165
- This command atomically sets `workflow`/`classic_profile` to `full`, rolls `phase` back to `design`, and clears `design_doc` (satisfying comet-design entry requirements). Then add the Design Doc on the current change: **immediately use the Skill tool to load the `comet-design` skill**, then proceed through the normal full workflow.
168
+ This command atomically sets `workflow`/`classic_profile` to `full`, rolls `phase` back to `design`, clears `design_doc`, and clears preset-only `build_mode`, `tdd_mode`, `review_mode`, `isolation`, and `verify_mode`. Then add the Design Doc on the current change: **immediately use the Skill tool to load the `comet-design` skill**. On entering build, run the full joint workflow-configuration decision again.
166
169
 
167
170
  When the user chooses continue (option A), continue the tweak workflow and record the user's reason for continuing.
168
171
 
@@ -173,16 +176,16 @@ When the user chooses continue (option A), continue the tweak workflow and recor
173
176
  - Change completed, tests pass
174
177
  - Change archived
175
178
  - If spec changed, synced to main spec
176
- - **Phase guard**: Before build → verify run `node "$COMET_GUARD" <change-name> build --apply`; before verify → archive follow `/comet-verify` and run `node "$COMET_GUARD" <change-name> verify --apply`
179
+ - **Phase guard**: Before build → verify run `comet guard <change-name> build --apply`; before verify → archive follow `/comet-verify` and run `comet guard <change-name> verify --apply`
177
180
 
178
181
  ## Automatic Handoff to Next Phase
179
182
 
180
183
  Follow `comet/reference/auto-transition.md`. Key command:
181
184
 
182
185
  ```bash
183
- node "$COMET_STATE" next <name>
186
+ comet state next <name>
184
187
  ```
185
188
 
186
189
  - `NEXT: auto` → invoke the skill pointed to by `SKILL` to continue tweak workflow (`phase: build` returns `comet-tweak`, `verify` returns `comet-verify`, `archive` returns `comet-archive`)
187
- - `NEXT: manual` → do not invoke the next skill; prompt user to manually run `/<SKILL>` per `HINT`
190
+ - `NEXT: manual` → do not invoke the next skill; return control with `HINT`, end the invocation, and do not create another confirmation point
188
191
  - `NEXT: done` → workflow is complete, no further action needed