@rpamis/comet 0.1.7 → 0.2.0

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 (67) hide show
  1. package/README.md +45 -13
  2. package/assets/manifest.json +2 -0
  3. package/assets/skills/comet/SKILL.md +214 -219
  4. package/assets/skills/comet/scripts/comet-archive.sh +8 -2
  5. package/assets/skills/comet/scripts/comet-guard.sh +32 -22
  6. package/assets/skills/comet/scripts/comet-state.sh +496 -0
  7. package/assets/skills/comet-archive/SKILL.md +6 -19
  8. package/assets/skills/comet-build/SKILL.md +16 -23
  9. package/assets/skills/comet-design/SKILL.md +7 -23
  10. package/assets/skills/comet-hotfix/SKILL.md +136 -167
  11. package/assets/skills/comet-open/SKILL.md +9 -31
  12. package/assets/skills/comet-tweak/SKILL.md +122 -154
  13. package/assets/skills/comet-verify/SKILL.md +11 -33
  14. package/assets/skills-zh/comet/SKILL.md +87 -92
  15. package/assets/skills-zh/comet-archive/SKILL.md +63 -76
  16. package/assets/skills-zh/comet-build/SKILL.md +153 -160
  17. package/assets/skills-zh/comet-design/SKILL.md +91 -107
  18. package/assets/skills-zh/comet-hotfix/SKILL.md +18 -49
  19. package/assets/skills-zh/comet-open/SKILL.md +70 -92
  20. package/assets/skills-zh/comet-tweak/SKILL.md +19 -51
  21. package/assets/skills-zh/comet-verify/SKILL.md +114 -136
  22. package/dist/cli/index.js +28 -1
  23. package/dist/cli/index.js.map +1 -1
  24. package/dist/commands/doctor.d.ts +6 -0
  25. package/dist/commands/doctor.d.ts.map +1 -0
  26. package/dist/commands/doctor.js +168 -0
  27. package/dist/commands/doctor.js.map +1 -0
  28. package/dist/commands/init.d.ts +9 -0
  29. package/dist/commands/init.d.ts.map +1 -0
  30. package/dist/commands/init.js +183 -0
  31. package/dist/commands/init.js.map +1 -0
  32. package/dist/commands/status.d.ts +6 -0
  33. package/dist/commands/status.d.ts.map +1 -0
  34. package/dist/commands/status.js +89 -0
  35. package/dist/commands/status.js.map +1 -0
  36. package/dist/commands/update.d.ts +8 -0
  37. package/dist/commands/update.d.ts.map +1 -0
  38. package/dist/commands/update.js +47 -0
  39. package/dist/commands/update.js.map +1 -0
  40. package/dist/core/detect.d.ts +8 -0
  41. package/dist/core/detect.d.ts.map +1 -0
  42. package/dist/core/detect.js +73 -0
  43. package/dist/core/detect.js.map +1 -0
  44. package/dist/core/openspec.d.ts +5 -0
  45. package/dist/core/openspec.d.ts.map +1 -0
  46. package/dist/core/openspec.js +58 -0
  47. package/dist/core/openspec.js.map +1 -0
  48. package/dist/core/platforms.d.ts.map +1 -1
  49. package/dist/core/platforms.js +6 -1
  50. package/dist/core/platforms.js.map +1 -1
  51. package/dist/core/skills.d.ts +22 -0
  52. package/dist/core/skills.d.ts.map +1 -0
  53. package/dist/core/skills.js +59 -0
  54. package/dist/core/skills.js.map +1 -0
  55. package/dist/core/superpowers.d.ts +5 -0
  56. package/dist/core/superpowers.d.ts.map +1 -0
  57. package/dist/core/superpowers.js +60 -0
  58. package/dist/core/superpowers.js.map +1 -0
  59. package/dist/core/types.d.ts +2 -0
  60. package/dist/core/types.d.ts.map +1 -0
  61. package/dist/core/types.js +2 -0
  62. package/dist/core/types.js.map +1 -0
  63. package/package.json +61 -50
  64. package/dist/core/init.d.ts +0 -14
  65. package/dist/core/init.d.ts.map +0 -1
  66. package/dist/core/init.js +0 -492
  67. package/dist/core/init.js.map +0 -1
@@ -14,30 +14,14 @@ description: "Comet Phase 2: Deep Design. Invoke with /comet-design. Produce Des
14
14
 
15
15
  ### 0. Entry State Verification (Entry Check)
16
16
 
17
- Before performing any operations, read and verify the current state:
18
-
19
- **Checklist:**
20
- 1. `openspec/changes/<name>/.comet.yaml` exists
21
- 2. `phase` field value is `"design"`
22
- 3. `workflow` field value is `"full"`
23
- 4. `design_doc` field is `null` or empty
24
- 5. `openspec/changes/<name>/proposal.md` exists and is non-empty
25
- 6. `openspec/changes/<name>/design.md` exists and is non-empty
26
- 7. `openspec/changes/<name>/tasks.md` exists and is non-empty
27
-
28
- **Verification method:**
29
- - `cat openspec/changes/<name>/.comet.yaml` to read all fields
30
- - Check checklist items one by one
31
-
32
- **Failure output:**
33
- ```
34
- [HARD STOP] Entry check failed for comet-design
35
- Expected: phase=design, design_doc=<empty/null>, workflow=full
36
- Actual: phase=<actual-value>, design_doc=<actual-value>, workflow=<actual-value>
37
- Suggestion: Run comet-open first, or check if .comet.yaml was modified out of sequence.
17
+ Execute entry verification:
18
+
19
+ ```bash
20
+ COMET_STATE="${COMET_STATE:-$(find . -path '*/comet/scripts/comet-state.sh' -type f -print -quit)}"
21
+ bash "$COMET_STATE" check <name> design
38
22
  ```
39
23
 
40
- Proceed to Step 1 only after verification passes.
24
+ Proceed to Step 1 after verification passes. The script outputs specific failure reasons when verification fails.
41
25
 
42
26
  ### 1a. Read Existing Context
43
27
 
@@ -70,7 +54,7 @@ Record design_doc path, then run guard to auto-transition:
70
54
 
71
55
  ```bash
72
56
  # Record design_doc path
73
- sed -i 's|^design_doc:.*|design_doc: docs/superpowers/specs/YYYY-MM-DD-topic-design.md|' openspec/changes/<name>/.comet.yaml
57
+ bash "$COMET_STATE" set <name> design_doc docs/superpowers/specs/YYYY-MM-DD-topic-design.md
74
58
 
75
59
  # Auto-transition to next phase
76
60
  bash $COMET_GUARD <change-name> design --apply
@@ -1,167 +1,136 @@
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
- Hotfix is a preset workflow of Comet's five-phase capabilities, not a separate parallel process. It reuses open, build, verify, archive capabilities, only skipping brainstorming and full plan.
9
-
10
- Applicable for bug fixes, hotfixes, small-scale behavior corrections. Does not involve new capability design, does not require deep brainstorming.
11
-
12
- **Applicable conditions** (all must be met):
13
- 1. Fix bugs in existing functionality, no new capability
14
- 2. No interface changes or architecture adjustments
15
- 3. Change scope is predictable (usually < 5 files)
16
-
17
- **Not applicable**: If fix process discovers need for architecture adjustments, should upgrade to full `/comet` workflow.
18
-
19
- ---
20
-
21
- ## Process (preset workflow, 4 phases)
22
-
23
- ### 0. Entry State Verification (Entry Check)
24
-
25
- Before performing any operations, verify current state:
26
-
27
- **Checklist:**
28
- 1. `openspec/changes/<name>/` directory does not exist, or directory exists but `.comet.yaml` does not exist (no conflict)
29
-
30
- **Verification method:**
31
- - `test -d openspec/changes/<name>` to check directory
32
- - If directory exists, `test -f openspec/changes/<name>/.comet.yaml` to check config file
33
- - If `.comet.yaml` exists, read `phase` to check if it's an incomplete hotfix
34
-
35
- **Failure output (has conflict):**
36
- ```
37
- [HARD STOP] Entry check failed for comet-hotfix
38
- Expected: openspec/changes/<name>/.comet.yaml does not exist (new change)
39
- Actual: .comet.yaml exists with phase=<actual-value>
40
- Suggestion: Pick a different change name, or check if an existing hotfix is in progress.
41
- ```
42
-
43
- Proceed to process steps only after verification passes.
44
-
45
- Execution chain: open → build → verify → archive. Hotfix provides default decisions for each phase: streamlined open, direct build, scale-based verification, archive after verification passes.
46
-
47
- ### 1. Quick Open (preset open)
48
-
49
- Reuse Comet open capability to create change, but use hotfix defaults: do not execute `openspec-explore` long exploration, directly enter streamlined change creation.
50
-
51
- **Immediately execute:** Use the Skill tool to load the `openspec-new-change` skill. Skipping this step is prohibited.
52
-
53
- After the skill loads, follow its guidance to create streamlined artifacts:
54
- - `proposal.md` problem description + root cause analysis + fix goal (no solution comparison needed)
55
- - `design.md` — fix solution (one is enough, no multi-solution comparison needed)
56
- - `tasks.md` fix task list
57
- - **No delta spec needed** (unless fix changes existing spec acceptance scenarios)
58
-
59
- Create independent `.comet.yaml` file under `openspec/changes/<name>/`:
60
-
61
- ```yaml
62
- workflow: hotfix
63
- phase: build
64
- design_doc: null
65
- plan: null
66
- build_mode: direct
67
- isolation: branch
68
- verify_mode: light
69
- verify_result: pending
70
- verified_at: null
71
- archived: false
72
- ```
73
-
74
- 【Write verification】After creation completion, must verify:
75
- cat openspec/changes/<name>/.comet.yaml
76
- Confirm workflow line value is "hotfix"
77
- Confirm phase line value is "build"
78
- Confirm design_doc line value is "null"
79
- Confirm plan line value is "null"
80
- Confirm build_mode line value is "direct"
81
- Confirm isolation line value is "branch"
82
- Confirm verify_mode line value is "light"
83
- Confirm verify_result line value is "pending"
84
- Confirm verified_at line value is "null"
85
- Confirm archived line value is "false"
86
- If any field does not match, retry write then verify again. Maximum 2 retries, report error and terminate if still fails.
87
-
88
- ### 2. Direct Build (preset build)
89
-
90
- Use hotfix defaults: `build_mode: direct`. Skip `superpowers:brainstorming` and `superpowers:writing-plans` (unless tasks > 3; if exceeds 3 tasks, transfer to `/comet-build`'s plan and execution method selection).
91
-
92
- **Immediately execute:** Execute tasks one by one according to tasks.md:
93
-
94
- 1. Read `openspec/changes/<name>/tasks.md`, get incomplete task list
95
- 2. For each incomplete task:
96
- - Modify code according to task description
97
- - Run `mvn spotless:apply` to format
98
- - Run related tests to confirm pass
99
- - Check corresponding `- [ ]` to `- [x]` in tasks.md
100
- - Commit code, commit message format: `fix: <brief fix description>`
101
- 3. After all tasks complete, enter verification
102
-
103
- **If fix affects existing spec acceptance scenarios**:
104
- - Create delta spec in `openspec/changes/<name>/specs/<capability>/spec.md`
105
- - Only include `## MODIFIED Requirements` section
106
-
107
- ### 3. Verification (preset verify)
108
-
109
- Reuse `/comet-verify`, with comet-verify's scale assessment deciding lightweight or full verification.
110
-
111
- **Immediately execute:** Use the Skill tool to load the `comet-verify` skill. Skipping this step is prohibited.
112
-
113
- Small-scale hotfixes without delta spec usually meet lightweight verification conditions (≤ 3 tasks, ≤ 5 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.
114
-
115
- **Additional Hotfix-Exclusive Checks** (execute after comet-verify lightweight verification passes):
116
-
117
- 1. **Root cause elimination**: Compare proposal.md's root cause analysis, confirm problem code eliminated
118
- - Read bug description and root cause in proposal.md
119
- - Search and verify problem code no longer exists
120
- - If root cause not eliminated, return to Step 2 to continue fix
121
-
122
- **Verification phase upgrade conditions**:
123
- - Regression testing reveals deep architecture issues → Stop hotfix, upgrade to `/comet`
124
- - Fix requires additional interface changes Stop hotfix, upgrade to `/comet`
125
-
126
- After verification passes, record `.comet.yaml` `verify_result` as `pass` according to `/comet-verify` rules, must not skip this status before archiving.
127
-
128
- ### 4. Archive (preset archive)
129
-
130
- Reuse `/comet-archive`. Must satisfy `verify_result: pass` in `.comet.yaml` before archiving.
131
-
132
- **Immediately execute:** Use the Skill tool to load the `comet-archive` skill to archive. Skipping this step is prohibited.
133
- If there is delta spec, sync to main spec according to comet-archive rules, and handle associated Design Doc and Plan archiving annotations.
134
-
135
- ---
136
-
137
- ## Continuous Execution Mode
138
-
139
- <IMPORTANT>
140
- Hotfix workflow is **one-time continuous execution**. After invoking `/comet-hotfix`, agent must automatically complete all 4 phases, without pausing to wait for user input mid-way (unless encountering upgrade conditions requiring user confirmation).
141
-
142
- Execution order: quick open → direct build → verification → archive → complete
143
-
144
- After each phase completes, immediately enter next phase, no need for user input again. Within each phase, must still call corresponding Comet/OpenSpec/Superpowers skill according to above requirements.
145
- </IMPORTANT>
146
-
147
- ---
148
-
149
- ## Upgrade Conditions
150
-
151
- When the following situations occur during fix process, stop hotfix workflow, upgrade to full `/comet`:
152
-
153
- 1. Root cause discovered involves architecture defects
154
- 2. Fix requires new interfaces or components
155
- 3. Impact scope expands to > 10 files
156
- 4. Needs new capability spec
157
-
158
- Upgrade method: On current change basis, supplement Design Doc (execute `/comet-design`), then proceed normally with full workflow.
159
-
160
- ---
161
-
162
- ## Exit Conditions
163
-
164
- - Bug fixed, tests pass
165
- - Change archived
166
- - If spec changes, synced to main spec
167
- - **Phase guard**: Before build → verify run `bash $COMET_GUARD <change-name> build`, before verify → archive run `bash $COMET_GUARD <change-name> verify`
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
+ Hotfix is a preset workflow of Comet's five-phase capabilities, not a separate parallel process. It reuses open, build, verify, archive capabilities, only skipping brainstorming and full plan.
9
+
10
+ Applicable for bug fixes, hotfixes, small-scale behavior corrections. Does not involve new capability design, does not require deep brainstorming.
11
+
12
+ **Applicable conditions** (all must be met):
13
+ 1. Fix bugs in existing functionality, no new capability
14
+ 2. No interface changes or architecture adjustments
15
+ 3. Change scope is predictable (usually < 5 files)
16
+
17
+ **Not applicable**: If fix process discovers need for architecture adjustments, should upgrade to full `/comet` workflow.
18
+
19
+ ---
20
+
21
+ ## Process (preset workflow, 4 phases)
22
+
23
+ ### 0. Entry State Verification (Entry Check)
24
+
25
+ Execute entry verification:
26
+
27
+ ```bash
28
+ COMET_STATE="${COMET_STATE:-$(find . -path '*/comet/scripts/comet-state.sh' -type f -print -quit)}"
29
+ bash "$COMET_STATE" check <name> open
30
+ ```
31
+
32
+ Proceed to process steps after verification passes. The script outputs specific failure reasons when verification fails.
33
+
34
+ Execution chain: open → build → verify → archive. Hotfix provides default decisions for each phase: streamlined open, direct build, scale-based verification, archive after verification passes.
35
+
36
+ ### 1. Quick Open (preset open)
37
+
38
+ Reuse Comet open capability to create change, but use hotfix defaults: do not execute `openspec-explore` long exploration, directly enter streamlined change creation.
39
+
40
+ **Immediately execute:** Use the Skill tool to load the `openspec-new-change` skill. Skipping this step is prohibited.
41
+
42
+ After the skill loads, follow its guidance to create streamlined artifacts:
43
+ - `proposal.md` problem description + root cause analysis + fix goal (no solution comparison needed)
44
+ - `design.md` — fix solution (one is enough, no multi-solution comparison needed)
45
+ - `tasks.md` fix task list
46
+ - **No delta spec needed** (unless fix changes existing spec acceptance scenarios)
47
+
48
+ Initialize Comet state file:
49
+
50
+ ```bash
51
+ bash "$COMET_STATE" init <name> hotfix
52
+ ```
53
+
54
+ ### 2. Direct Build (preset build)
55
+
56
+ Use hotfix defaults: `build_mode: direct`. Skip `superpowers:brainstorming` and `superpowers:writing-plans` (unless tasks > 3; if exceeds 3 tasks, transfer to `/comet-build`'s plan and execution method selection).
57
+
58
+ **Immediately execute:** Execute tasks one by one according to tasks.md:
59
+
60
+ 1. Read `openspec/changes/<name>/tasks.md`, get incomplete task list
61
+ 2. For each incomplete task:
62
+ - Modify code according to task description
63
+ - Run project formatter (e.g., `mvn spotless:apply`, `npm run format`)
64
+ - Run related tests to confirm pass
65
+ - Check corresponding `- [ ]` to `- [x]` in tasks.md
66
+ - Commit code, commit message format: `fix: <brief fix description>`
67
+ 3. After all tasks complete, enter verification
68
+
69
+ **If fix affects existing spec acceptance scenarios**:
70
+ - Create delta spec in `openspec/changes/<name>/specs/<capability>/spec.md`
71
+ - Only include `## MODIFIED Requirements` section
72
+
73
+ ### 3. Verification (preset verify)
74
+
75
+ Reuse `/comet-verify`, with comet-verify's scale assessment deciding lightweight or full verification.
76
+
77
+ **Immediately execute:** Use the Skill tool to load the `comet-verify` skill. Skipping this step is prohibited.
78
+
79
+ Small-scale hotfixes without delta spec usually meet lightweight verification conditions (≤ 3 tasks, ≤ 5 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.
80
+
81
+ **Additional Hotfix-Exclusive Checks** (execute after comet-verify lightweight verification passes):
82
+
83
+ 1. **Root cause elimination**: Compare proposal.md's root cause analysis, confirm problem code eliminated
84
+ - Read bug description and root cause in proposal.md
85
+ - Search and verify problem code no longer exists
86
+ - If root cause not eliminated, return to Step 2 to continue fix
87
+
88
+ **Verification phase upgrade conditions**:
89
+ - Regression testing reveals deep architecture issues → Stop hotfix, upgrade to `/comet`
90
+ - Fix requires additional interface changes Stop hotfix, upgrade to `/comet`
91
+
92
+ After verification passes, record `.comet.yaml` `verify_result` as `pass` according to `/comet-verify` rules, must not skip this status before archiving.
93
+
94
+ ### 4. Archive (preset archive)
95
+
96
+ Reuse `/comet-archive`. Must satisfy `verify_result: pass` in `.comet.yaml` before archiving.
97
+
98
+ **Immediately execute:** Use the Skill tool to load the `comet-archive` skill to archive. Skipping this step is prohibited.
99
+ If there is delta spec, sync to main spec according to comet-archive rules, and handle associated Design Doc and Plan archiving annotations.
100
+
101
+ ---
102
+
103
+ ## Continuous Execution Mode
104
+
105
+ <IMPORTANT>
106
+ Hotfix workflow is **one-time continuous execution**. After invoking `/comet-hotfix`, agent must automatically complete all 4 phases, without pausing to wait for user input mid-way (unless encountering upgrade conditions requiring user confirmation).
107
+
108
+ Execution order: quick open → direct build → verification → archive → complete
109
+
110
+ After each phase completes, immediately enter next phase, no need for user input again. Within each phase, must still call corresponding Comet/OpenSpec/Superpowers skill according to above requirements.
111
+ </IMPORTANT>
112
+
113
+ ---
114
+
115
+ ## Upgrade Conditions
116
+
117
+ Upgrade to full `/comet` when **any** of the following conditions are met:
118
+
119
+ | Condition | Explanation |
120
+ |-----------|-------------|
121
+ | Change involves **3+ files** | Exceeds single-point fix scope |
122
+ | Architecture changes | New modules, new interfaces, new dependencies |
123
+ | Database schema changes | Structural adjustments |
124
+ | Introduces new public API | Fix creates new external interface |
125
+ | Fix scope exceeds single function/module | Requires coordinated changes |
126
+
127
+ Upgrade method: On current change basis, supplement Design Doc (execute `/comet-design`), then proceed normally with full workflow.
128
+
129
+ ---
130
+
131
+ ## Exit Conditions
132
+
133
+ - Bug fixed, tests pass
134
+ - Change archived
135
+ - If spec changes, synced to main spec
136
+ - **Phase guard**: Before build → verify run `bash $COMET_GUARD <change-name> build`, before verify → archive run `bash $COMET_GUARD <change-name> verify`
@@ -13,28 +13,14 @@ description: "Comet Phase 1: Open. Invoke with /comet-open. Explore ideas throug
13
13
 
14
14
  ### 0. Entry State Verification (Entry Check)
15
15
 
16
- Before performing any operations, read and verify the current state:
16
+ Execute entry verification:
17
17
 
18
- **Checklist:**
19
- 1. `openspec/changes/<name>/` directory exists (created by openspec-new-change)
20
- 2. `openspec/changes/<name>/.comet.yaml` file does not exist (not yet initialized)
21
- 3. `openspec/changes/<name>/proposal.md` exists and is non-empty
22
- 4. `openspec/changes/<name>/design.md` exists and is non-empty
23
- 5. `openspec/changes/<name>/tasks.md` exists and is non-empty
24
-
25
- **Verification method:**
26
- - Read the above paths to confirm existence/non-existence
27
- - If `.comet.yaml` already exists, read its `phase` field: if phase is not empty, output `[HARD STOP]` and prompt that there may already be an active change
28
-
29
- **Failure output:**
30
- ```
31
- [HARD STOP] Entry check failed for comet-open
32
- Expected: .comet.yaml does not exist, proposal.md + design.md + tasks.md exist
33
- Actual: phase=<actual-value>, design_doc=<actual-value> (or file does not exist)
34
- Suggestion: Check if another change with the same name is already active.
18
+ ```bash
19
+ COMET_STATE="${COMET_STATE:-$(find . -path '*/comet/scripts/comet-state.sh' -type f -print -quit)}"
20
+ bash "$COMET_STATE" check <name> open
35
21
  ```
36
22
 
37
- Proceed to Step 1 only after verification passes.
23
+ Proceed to Step 1 after verification passes. The script outputs specific failure reasons when verification fails.
38
24
 
39
25
  ### 1. Explore Idea
40
26
 
@@ -59,18 +45,10 @@ openspec/changes/<name>/
59
45
 
60
46
  ### 3. Initialize Comet State
61
47
 
62
- Create an independent `.comet.yaml` file under `openspec/changes/<name>/`:
63
-
64
- ```yaml
65
- workflow: full
66
- phase: design
67
- design_doc: null
68
- plan: null
69
- build_mode: null
70
- verify_mode: null
71
- verify_result: pending
72
- verified_at: null
73
- archived: false
48
+ Initialize Comet state file:
49
+
50
+ ```bash
51
+ bash "$COMET_STATE" init <name> full
74
52
  ```
75
53
 
76
54
  ### 4. Content Completeness Check