@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,154 +1,180 @@
1
- ---
2
- name: comet-tweak
3
- description: "Comet preset path: Non-bug small changes (tweak). Skip brainstorming and full plan, directly open → lightweight build → light verify → archive. Applicable for copy, configuration, documentation or prompt local optimization."
4
- ---
5
-
6
- # Comet Preset Path: Tweak
7
-
8
- Tweak is a preset workflow of Comet's five-phase capabilities, not an independent parallel process. It reuses open, build, verify, archive capabilities, only skipping brainstorming and full plan.
9
-
10
- Applicable for non-bug small scope changes, such as copy adjustment, configuration adjustment, documentation or prompt local optimization.
11
-
12
- **Applicable conditions** (all must be met):
13
- 1. No new capability
14
- 2. No architecture changes
15
- 3. No interface changes
16
- 4. Typically no more than 3 tasks, 4 files
17
-
18
- **Not applicable**: If change process discovers need for capability, architecture or interface adjustments, should upgrade to full `/comet` workflow.
19
-
20
- ---
21
-
22
- ## Process (preset workflow, 4 phases)
23
-
24
- Execution chain: open → lightweight build → light verify → archive. Tweak provides default decisions for each phase: streamlined open, lightweight build, lightweight verification, archive after verification passes.
25
-
26
- Locate Comet scripts before starting:
27
-
28
- ```bash
29
- COMET_ENV="${COMET_ENV:-$(find . "$HOME"/.*/skills "$HOME/.config" "$HOME/.gemini" -path '*/comet/scripts/comet-env.sh' -type f -print -quit 2>/dev/null)}"
30
- if [ -z "$COMET_ENV" ]; then
31
- echo "ERROR: comet-env.sh not found. Ensure the comet skill is installed." >&2
32
- return 1
33
- fi
34
- . "$COMET_ENV"
35
- ```
36
-
37
- ### 1. Quick Open (preset open)
38
-
39
- Reuse Comet open capability to create change, but use tweak defaults: do not execute `openspec-explore` long exploration, directly enter streamlined change creation.
40
-
41
- **Immediately execute:** Use the Skill tool to load the `openspec-new-change` skill. Skipping this step is prohibited.
42
-
43
- After the skill loads, follow its guidance to create streamlined artifacts:
44
- - `proposal.md` — change motivation + goals + scope
45
- - `design.md` brief implementation description (no solution comparison needed)
46
- - `tasks.md` — no more than 3 tasks
47
- - **No delta spec needed** (unless change modifies existing spec acceptance scenarios; once delta spec is needed, upgrade to full `/comet`)
48
-
49
- Initialize Comet state file:
50
-
51
- ```bash
52
- "$COMET_BASH" "$COMET_STATE" init <name> tweak
53
- ```
54
-
55
- Verify initialized state:
56
-
57
- ```bash
58
- "$COMET_BASH" "$COMET_STATE" check <name> open
59
- ```
60
-
61
- Run phase guard to transition open → build:
62
-
63
- ```bash
64
- "$COMET_BASH" "$COMET_GUARD" <change-name> open --apply
65
- ```
66
-
67
- ### 2. Lightweight Build (preset build)
68
-
69
- Use tweak defaults: `build_mode: direct`. Skip Superpowers `brainstorming` and `writing-plans`.
70
-
71
- Before continuing or starting changes, handle uncommitted changes through `comet/reference/dirty-worktree.md`. If attribution shows scope exceeds tweak, handle it through this file's "Upgrade Conditions".
72
-
73
- **Immediately execute:** Execute tasks one by one according to tasks.md:
74
-
75
- 1. Read `openspec/changes/<name>/tasks.md`, get incomplete task list
76
- 2. For each incomplete task:
77
- - Modify target files according to task description
78
- - Run project formatter (e.g., `mvn spotless:apply`, `npm run format`)
79
- - Run related tests to confirm pass
80
- - Check corresponding `- [ ]` to `- [x]` in tasks.md
81
- - Commit code, commit message format: `tweak: <brief change description>`
82
- 3. After all tasks complete, explicitly run relevant project tests and build commands
83
- 4. Run phase guard to transition build → verify:
84
-
85
- ```bash
86
- "$COMET_BASH" "$COMET_GUARD" <change-name> build --apply
87
- ```
88
-
89
- State automatically updates to `phase: verify`, `verify_result: pending`, then enter verification.
90
-
91
- ### 3. Lightweight Verification (preset verify)
92
-
93
- Reuse `/comet-verify`. Tweak must maintain lightweight verification conditions: 3 tasks, ≤ 4 files, no delta spec, no new capability.
94
-
95
- **Immediately execute:** Use the Skill tool to load the `comet-verify` skill. Skipping this step is prohibited.
96
-
97
- If scale assessment enters full verification path, stop tweak, handle per upgrade conditions blocking confirmation.
98
-
99
- After verification passes, record `.comet.yaml` `verify_result` as `pass` according to `/comet-verify` rules, must not skip this status before archiving.
100
-
101
- ### 4. Archive (preset archive)
102
-
103
- Reuse `/comet-archive`. Must satisfy `verify_result: pass` in `.comet.yaml` before archiving.
104
-
105
- **Immediately execute:** Use the Skill tool to load the `comet-archive` skill to archive. Skipping this step is prohibited.
106
-
107
- ---
108
-
109
- ## Continuous Execution Mode
110
-
111
- <IMPORTANT>
112
- 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. But the following situations must pause and wait for user confirmation:
113
-
114
- 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
115
- 2. verify phase (comet-verify) verification-failure and branch-handling decisions
116
-
117
- Execution order: quick open → lightweight build → lightweight verification → archive → complete
118
-
119
- After each phase completes, immediately enter next phase. 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.
120
- </IMPORTANT>
121
-
122
- ---
123
-
124
- ## Upgrade Conditions
125
-
126
- Upgrade to full `/comet` when **any** of the following conditions are met:
127
-
128
- | Condition | Explanation |
129
- |-----------|-------------|
130
- | Change involves **5+ files** | Exceeds small change scope |
131
- | Cross-module coordination required | Requires cross-component coordination |
132
- | **5+** new test cases needed | Change complexity rising |
133
- | Config item additions or deletions | Config changes beyond value modifications |
134
- | New capability needed | Exceeds local optimization |
135
- | Delta spec needed | Affects existing specs |
136
-
137
- 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.
138
-
139
- After user confirms upgrade, **must first update the workflow field** before entering full flow:
140
-
141
- ```bash
142
- "$COMET_BASH" "$COMET_STATE" set <name> workflow full
143
- ```
144
-
145
- 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 tweak and report that current change has exceeded tweak scope.
146
-
147
- ---
148
-
149
- ## Exit Conditions
150
-
151
- - Small change completed, tests pass
152
- - Change archived
153
- - No new capability, architecture adjustments or interface changes
154
- - **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-tweak
3
+ description: "Comet preset path: Non-bug small changes (tweak). Skip brainstorming and full plan, directly open → lightweight build → light verify → archive. Applicable for copy, configuration, documentation or prompt local optimization."
4
+ ---
5
+
6
+ # Comet Preset Path: Tweak
7
+
8
+ Tweak is a preset workflow of Comet's five-phase capabilities, not an independent parallel process. It reuses open, build, verify, archive capabilities, only skipping brainstorming and full plan.
9
+
10
+ Applicable for non-bug small scope changes, such as copy adjustment, configuration adjustment, documentation or prompt local optimization.
11
+
12
+ **Applicable conditions** (all must be met):
13
+ 1. No new capability
14
+ 2. No architecture changes
15
+ 3. No interface changes
16
+ 4. Typically no more than 3 tasks (file count constraint see upgrade conditions below)
17
+
18
+ **Not applicable**: If change process discovers need for capability, architecture or interface adjustments, should upgrade to full `/comet` workflow.
19
+
20
+ ---
21
+
22
+ ## Process (preset workflow, 4 phases)
23
+
24
+ ### 0. Output Language Constraint
25
+
26
+ Streamlined OpenSpec artifacts must use the language of the user request that triggered this workflow.
27
+
28
+ Execution chain: open → lightweight build → light verify → archive. Tweak provides default decisions for each phase: streamlined open, lightweight build, lightweight verification, and final archive confirmation after verification passes.
29
+
30
+ Locate Comet scripts before starting:
31
+
32
+ ```bash
33
+ COMET_ENV="${COMET_ENV:-$(find . "$HOME"/.*/skills "$HOME/.config" "$HOME/.gemini" -path '*/comet/scripts/comet-env.sh' -type f -print -quit 2>/dev/null)}"
34
+ if [ -z "$COMET_ENV" ]; then
35
+ echo "ERROR: comet-env.sh not found. Ensure the comet skill is installed." >&2
36
+ return 1
37
+ fi
38
+ . "$COMET_ENV"
39
+ ```
40
+
41
+ ### 1. Quick Open (preset open)
42
+
43
+ Reuse Comet open capability to create change, but use tweak defaults: do not execute `openspec-explore` long exploration, directly enter streamlined change creation.
44
+
45
+ **Immediately execute:** Use the Skill tool to load the `openspec-new-change` skill. Skipping this step is prohibited.
46
+
47
+ After the skill loads, follow its guidance to create streamlined artifacts:
48
+ - `proposal.md` — change motivation + goals + scope
49
+ - `design.md` brief implementation description (no solution comparison needed)
50
+ - `tasks.md` — no more than 3 tasks
51
+ - **No delta spec needed** (unless change modifies existing spec acceptance scenarios; once delta spec is needed, upgrade to full `/comet`)
52
+
53
+ Initialize Comet state file:
54
+
55
+ ```bash
56
+ "$COMET_BASH" "$COMET_STATE" init <name> tweak
57
+ ```
58
+
59
+ Verify initialized state:
60
+
61
+ ```bash
62
+ "$COMET_BASH" "$COMET_STATE" check <name> open
63
+ ```
64
+
65
+ Run phase guard to transition open → build:
66
+
67
+ ```bash
68
+ "$COMET_BASH" "$COMET_GUARD" <change-name> open --apply
69
+ ```
70
+
71
+ ### 2. Lightweight Build (preset build)
72
+
73
+ Use tweak defaults: `build_mode: direct`. Skip Superpowers `brainstorming` and `writing-plans`.
74
+
75
+ Before continuing or starting changes, handle uncommitted changes through `comet/reference/dirty-worktree.md`. If attribution shows scope exceeds tweak, handle it through this file's "Upgrade Conditions".
76
+
77
+ **Immediately execute:** Execute tasks one by one according to tasks.md:
78
+
79
+ 1. Read `openspec/changes/<name>/tasks.md`, get incomplete task list
80
+ 2. For each incomplete task:
81
+ - Modify target files according to task description
82
+ - Run project formatter (e.g., `mvn spotless:apply`, `npm run format`)
83
+ - Run related tests to confirm pass
84
+ - Check corresponding `- [ ]` to `- [x]` in tasks.md
85
+ - Commit code, commit message format: `tweak: <brief change description>`
86
+ 3. After all tasks complete, explicitly run relevant project tests and build commands
87
+ 4. Run phase guard to transition build → verify:
88
+
89
+ ```bash
90
+ "$COMET_BASH" "$COMET_GUARD" <change-name> build --apply
91
+ ```
92
+
93
+ State automatically updates to `phase: verify`, `verify_result: pending`, then enter verification.
94
+
95
+ During tweak execution, whenever running programs, tests, builds, or manual verification results in crashes, abnormal behavior, test failures, or build failures, you must use the Skill tool to load the Superpowers `systematic-debugging` skill. Do not propose or implement source code fixes before completing root cause investigation.
96
+
97
+ For specific investigation, minimal failing test, fix verification, and keeping the current change verification loop, follow `comet/reference/debug-gate.md`.
98
+
99
+ ### 3. Lightweight Verification (preset verify)
100
+
101
+ Reuse `/comet-verify`. Tweak must maintain lightweight verification conditions: ≤ 3 tasks, ≤ 4 files, no delta spec, no new capability.
102
+
103
+ **Immediately execute:** Use the Skill tool to load the `comet-verify` skill. Skipping this step is prohibited.
104
+
105
+ If scale assessment enters full verification path, stop tweak, handle per upgrade conditions blocking confirmation.
106
+
107
+ 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.
108
+
109
+ ### 4. Archive (preset archive)
110
+
111
+ Reuse `/comet-archive`. Must satisfy `verify_result: pass` in `.comet.yaml` before archiving, and wait for `/comet-archive`'s final archive confirmation.
112
+
113
+ **Immediately execute:** Use the Skill tool to load the `comet-archive` skill to archive. Skipping this step is prohibited.
114
+
115
+ ---
116
+
117
+ ## Continuous Execution Mode
118
+
119
+ <IMPORTANT>
120
+ 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.
121
+
122
+ 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.
123
+
124
+ The following situations must pause and wait for user confirmation:
125
+
126
+ 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
127
+ 2. verify phase (comet-verify) verification-failure and branch-handling decisions
128
+ 3. Final archive confirmation (before comet-archive runs the archive script)
129
+
130
+ Execution order: quick open lightweight build lightweight verification → archive → complete
131
+
132
+ After each phase completes, immediately enter next phase. 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.
133
+ </IMPORTANT>
134
+
135
+ ---
136
+
137
+ ## Upgrade Conditions
138
+
139
+ Upgrade to full `/comet` when **any** of the following conditions are met:
140
+
141
+ | Condition | Explanation |
142
+ |-----------|-------------|
143
+ | Change involves **5+ files** | Exceeds small change scope |
144
+ | Cross-module coordination required | Requires cross-component coordination |
145
+ | **5+** new test cases needed | Change complexity rising |
146
+ | Config item additions or deletions | Config changes beyond value modifications |
147
+ | New capability needed | Exceeds local optimization |
148
+ | Delta spec needed | Affects existing specs |
149
+
150
+ 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.
151
+
152
+ After user confirms upgrade, **must first update the workflow and phase fields** before entering full flow:
153
+
154
+ ```bash
155
+ "$COMET_BASH" "$COMET_STATE" set <name> workflow full
156
+ "$COMET_BASH" "$COMET_STATE" set <name> phase design
157
+ ```
158
+
159
+ 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 tweak and report that current change has exceeded tweak scope.
160
+
161
+ ---
162
+
163
+ ## Exit Conditions
164
+
165
+ - Small change completed, tests pass
166
+ - Change archived
167
+ - No new capability, architecture adjustments or interface changes
168
+ - **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`
169
+
170
+ ## Automatic Handoff to Next Phase
171
+
172
+ Follow `comet/reference/auto-transition.md`. Key command:
173
+
174
+ ```bash
175
+ "$COMET_BASH" "$COMET_STATE" next <name>
176
+ ```
177
+
178
+ - `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`)
179
+ - `NEXT: manual` → do not invoke the next skill; prompt user to manually run `/<SKILL>` per `HINT`
180
+ - `NEXT: done` → workflow is complete, no further action needed