@rpamis/comet 0.2.1 → 0.2.3
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.
- package/LICENSE +21 -21
- package/README.md +313 -270
- package/assets/manifest.json +21 -21
- package/assets/skills/comet/scripts/comet-archive.sh +258 -258
- package/assets/skills/comet/scripts/comet-guard.sh +255 -255
- package/assets/skills/comet/scripts/comet-state.sh +497 -497
- package/assets/skills/comet/scripts/comet-yaml-validate.sh +132 -132
- package/assets/skills/comet-archive/SKILL.md +63 -63
- package/assets/skills/comet-build/SKILL.md +153 -153
- package/assets/skills/comet-design/SKILL.md +91 -91
- package/assets/skills/comet-open/SKILL.md +70 -70
- package/assets/skills/comet-verify/SKILL.md +114 -114
- package/assets/skills-zh/comet-archive/SKILL.md +63 -63
- package/assets/skills-zh/comet-build/SKILL.md +153 -153
- package/assets/skills-zh/comet-design/SKILL.md +91 -91
- package/assets/skills-zh/comet-open/SKILL.md +70 -70
- package/assets/skills-zh/comet-verify/SKILL.md +114 -114
- package/bin/comet.js +3 -3
- package/dist/cli/index.js +10 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/core/detect.d.ts +6 -1
- package/dist/core/detect.d.ts.map +1 -1
- package/dist/core/detect.js +29 -1
- package/dist/core/detect.js.map +1 -1
- package/package.json +62 -62
- package/scripts/postinstall.js +44 -44
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 rpamis
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 rpamis
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,270 +1,313 @@
|
|
|
1
|
-
# @rpamis/comet
|
|
2
|
-
|
|
3
|
-
```
|
|
4
|
-
██████╗ ██████╗ ███╗ ███╗███████╗████████╗
|
|
5
|
-
██╔════╝██╔═══██╗████╗ ████║██╔════╝╚══██╔══╝
|
|
6
|
-
██║ ██║ ██║██╔████╔██║█████╗ ██║
|
|
7
|
-
██║ ██║ ██║██║╚██╔╝██║██╔══╝ ██║
|
|
8
|
-
╚██████╗╚██████╔╝██║ ╚═╝ ██║███████╗ ██║
|
|
9
|
-
╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝ ╚═╝
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
> 中文版:[README-zh.md](README-zh.md)
|
|
13
|
-
|
|
14
|
-
**OpenSpec + Superpowers dual-star development workflow** — one command from idea to archive.
|
|
15
|
-
|
|
16
|
-
OpenSpec handles **WHAT** (outlines, proposals, spec lifecycle, archiving). Superpowers handles **HOW** (technical design, planning, execution, wrap-up). Comet chains both into a five-phase automated pipeline.
|
|
17
|
-
|
|
18
|
-
##
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
|
74
|
-
|
|
75
|
-
|
|
|
76
|
-
|
|
|
77
|
-
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
|
82
|
-
|
|
83
|
-
|
|
|
84
|
-
|
|
|
85
|
-
|
|
|
86
|
-
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
|
101
|
-
|
|
102
|
-
|
|
|
103
|
-
|
|
|
104
|
-
|
|
|
105
|
-
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
|
110
|
-
|
|
111
|
-
|
|
|
112
|
-
|
|
|
113
|
-
|
|
|
114
|
-
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
(
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
#
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
1
|
+
# @rpamis/comet
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
██████╗ ██████╗ ███╗ ███╗███████╗████████╗
|
|
5
|
+
██╔════╝██╔═══██╗████╗ ████║██╔════╝╚══██╔══╝
|
|
6
|
+
██║ ██║ ██║██╔████╔██║█████╗ ██║
|
|
7
|
+
██║ ██║ ██║██║╚██╔╝██║██╔══╝ ██║
|
|
8
|
+
╚██████╗╚██████╔╝██║ ╚═╝ ██║███████╗ ██║
|
|
9
|
+
╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝ ╚═╝
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
> 中文版:[README-zh.md](README-zh.md)
|
|
13
|
+
|
|
14
|
+
**OpenSpec + Superpowers dual-star development workflow** — one command from idea to archive.
|
|
15
|
+
|
|
16
|
+
OpenSpec handles **WHAT** (outlines, proposals, spec lifecycle, archiving). Superpowers handles **HOW** (technical design, planning, execution, wrap-up). Comet chains both into a five-phase automated pipeline.
|
|
17
|
+
|
|
18
|
+
## Why Comet
|
|
19
|
+
|
|
20
|
+
OpenSpec excels at managing requirements, creating proposals, managing Spec lifecycles, and archiving, but its proposals and tasks lack the detail of Superpowers brainstorming.
|
|
21
|
+
|
|
22
|
+
Superpowers generates Spec documents after brainstorming, but these documents typically lack stateful design — after completing requirements, Specs only have tasks checked off in the document, and Agents even forget to check them off. This causes the Agent to re-examine documents and project code to verify on resumption, wasting many tokens.
|
|
23
|
+
|
|
24
|
+
**Comet combines the strengths of both**, integrating the core workflow into 5 phases
|
|
25
|
+
|
|
26
|
+
The main entry `/comet` supports current Spec state detection, suitable for long tasks — after completing and closing CC midway, just `/comet continue` and Comet will automatically read the active Spec (lists multiple for selection), dynamically identify which phase is currently executing, and continue.
|
|
27
|
+
|
|
28
|
+
## Install
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npm install -g @rpamis/comet
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Quick Start
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
cd your-project
|
|
38
|
+
comet init
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
`comet init` will:
|
|
42
|
+
|
|
43
|
+
1. Prompt you to select AI platforms (auto-detects existing configs)
|
|
44
|
+
2. Choose install scope: project-level (current directory) or global (home directory)
|
|
45
|
+
3. Select language for Comet skills: English or 中文
|
|
46
|
+
4. Install [OpenSpec](https://github.com/Fission-AI/OpenSpec) skills
|
|
47
|
+
5. Install [Superpowers](https://github.com/obra/superpowers) skills
|
|
48
|
+
6. Deploy Comet skills (in your chosen language) to selected platforms
|
|
49
|
+
7. Create `docs/superpowers/specs/` and `docs/superpowers/plans/` working directories
|
|
50
|
+
|
|
51
|
+
## Screenshots
|
|
52
|
+
|
|
53
|
+
<p align="center">
|
|
54
|
+
<img src="img/select-platform.png" alt="Platform Selection" width="600">
|
|
55
|
+
</p>
|
|
56
|
+
<p align="center">Supports Chinese & English Skill distribution, 28 AI Coding platforms</p>
|
|
57
|
+
|
|
58
|
+
<p align="center">
|
|
59
|
+
<img src="img/init.png" alt="Initialization" width="600">
|
|
60
|
+
</p>
|
|
61
|
+
<p align="center">Auto-install OpenSpec & Superpowers, one-click dev environment setup</p>
|
|
62
|
+
|
|
63
|
+
<p align="center">
|
|
64
|
+
<img src="img/skill-comet.png" alt="Skill Execution" width="600">
|
|
65
|
+
</p>
|
|
66
|
+
<p align="center">Multi-phase Skill entry, auto-detects current Spec stage, auto-triggers core flow, manual review at key nodes</p>
|
|
67
|
+
|
|
68
|
+
## Commands
|
|
69
|
+
|
|
70
|
+
| Command | Description |
|
|
71
|
+
|---------|-------------|
|
|
72
|
+
| `comet init [path]` | Initialize Comet workflow |
|
|
73
|
+
| `comet status [path]` | Show active changes and workflow status |
|
|
74
|
+
| `comet doctor [path]` | Diagnose Comet installation health |
|
|
75
|
+
| `comet update [path]` | Update comet skills to latest version |
|
|
76
|
+
| `comet --help` | Show help |
|
|
77
|
+
| `comet --version` | Show version |
|
|
78
|
+
|
|
79
|
+
### init Options
|
|
80
|
+
|
|
81
|
+
| Option | Description |
|
|
82
|
+
|--------|-------------|
|
|
83
|
+
| `--yes` | Non-interactive mode, auto-select detected platforms |
|
|
84
|
+
| `--skip-existing` | Skip already installed components |
|
|
85
|
+
| `--overwrite` | Overwrite already installed components |
|
|
86
|
+
| `--json` | Output structured JSON |
|
|
87
|
+
|
|
88
|
+
### status / doctor / update Options
|
|
89
|
+
|
|
90
|
+
| Option | Applies to | Description |
|
|
91
|
+
|--------|-----------|-------------|
|
|
92
|
+
| `--json` | `status`, `doctor` | Output structured JSON |
|
|
93
|
+
| `--language <lang>` | `update` | Language for skills (`en`, `zh`) |
|
|
94
|
+
| `--scope <scope>` | `update` | Install scope (`global`, `project`)|
|
|
95
|
+
|
|
96
|
+
## Supported Platforms
|
|
97
|
+
|
|
98
|
+
`comet init` supports 28 AI coding platforms:
|
|
99
|
+
|
|
100
|
+
| Platform | Skills Dir | Platform | Skills Dir |
|
|
101
|
+
|----------|-----------|----------|-----------|
|
|
102
|
+
| Claude Code | `.claude/` | Cursor | `.cursor/` |
|
|
103
|
+
| Codex | `.codex/` | OpenCode | `.opencode/` |
|
|
104
|
+
| Windsurf | `.windsurf/` | Cline | `.cline/` |
|
|
105
|
+
| RooCode | `.roo/` | Continue | `.continue/` |
|
|
106
|
+
| GitHub Copilot | `.github/` | Gemini CLI | `.gemini/` |
|
|
107
|
+
| Amazon Q Developer | `.amazonq/` | Qwen Code | `.qwen/` |
|
|
108
|
+
| Kilo Code | `.kilocode/` | Auggie | `.augment/` |
|
|
109
|
+
| Kiro | `.kiro/` | Lingma | `.lingma/` |
|
|
110
|
+
| Junie | `.junie/` | CodeBuddy | `.codebuddy/` |
|
|
111
|
+
| CoStrict | `.cospec/` | Crush | `.crush/` |
|
|
112
|
+
| Factory Droid | `.factory/` | iFlow | `.iflow/` |
|
|
113
|
+
| Pi | `.pi/` | Qoder | `.qoder/` |
|
|
114
|
+
| Antigravity | `.agent/` | Bob Shell | `.bob/` |
|
|
115
|
+
| ForgeCode | `.forge/` | Trae | `.trae/` |
|
|
116
|
+
|
|
117
|
+
## Skills
|
|
118
|
+
|
|
119
|
+
After `comet init`, three groups of skills are installed to the selected platform's `skills/` directory:
|
|
120
|
+
|
|
121
|
+
### Comet Skills
|
|
122
|
+
|
|
123
|
+
| Skill | Description |
|
|
124
|
+
|-------|-------------|
|
|
125
|
+
| `/comet` | Main entry — auto-detects phase and dispatches to sub-commands |
|
|
126
|
+
| `/comet-open` | Phase 1: Open a change (proposal, design, task breakdown) |
|
|
127
|
+
| `/comet-design` | Phase 2: Deep design (brainstorming, Design Doc) |
|
|
128
|
+
| `/comet-build` | Phase 3: Plan and build (implementation plan, code commits) |
|
|
129
|
+
| `/comet-verify` | Phase 4: Verify and finish (testing, verification report) |
|
|
130
|
+
| `/comet-archive` | Phase 5: Archive (delta spec sync, status annotation) |
|
|
131
|
+
| `/comet-hotfix` | Preset: Quick bug fix (skips brainstorming) |
|
|
132
|
+
| `/comet-tweak` | Preset: Small change (skips brainstorming and full plan) |
|
|
133
|
+
|
|
134
|
+
### Guard & Automation Scripts
|
|
135
|
+
|
|
136
|
+
| Script | Purpose |
|
|
137
|
+
|--------|---------|
|
|
138
|
+
| `comet-guard.sh` | Phase transition guard — validates exit conditions, `--apply` auto-updates `.comet.yaml` |
|
|
139
|
+
| `comet-archive.sh` | One-command archive — validates state, syncs specs, moves to archive, updates status |
|
|
140
|
+
| `comet-yaml-validate.sh` | Schema validator — validates `.comet.yaml` structure and field values |
|
|
141
|
+
| `comet-state.sh` | Unified state management — init/set/get/check/scale, agents' exclusive YAML interface |
|
|
142
|
+
|
|
143
|
+
### OpenSpec Skills
|
|
144
|
+
|
|
145
|
+
Spec lifecycle management: propose, explore, sync, verify, archive, and more.
|
|
146
|
+
|
|
147
|
+
### Superpowers Skills
|
|
148
|
+
|
|
149
|
+
Development methodology: brainstorming, TDD, subagent-driven development, code review, plan writing, and more.
|
|
150
|
+
|
|
151
|
+
## Workflow
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
/comet
|
|
155
|
+
↓ auto-detect
|
|
156
|
+
/comet-open --> /comet-design --> /comet-build --> /comet-verify --> /comet-archive
|
|
157
|
+
(OpenSpec) (Superpowers) (Superpowers) (Both) (OpenSpec)
|
|
158
|
+
|
|
159
|
+
/comet-hotfix (preset path, skips brainstorming)
|
|
160
|
+
open --> build --> verify --> archive
|
|
161
|
+
|
|
162
|
+
/comet-tweak (preset path, skips brainstorming and full plan)
|
|
163
|
+
open --> lightweight build --> light verify --> archive
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Five Phases
|
|
167
|
+
|
|
168
|
+
| Phase | Command | Owner | Artifacts |
|
|
169
|
+
|-------|---------|-------|-----------|
|
|
170
|
+
| 1. Open | `/comet-open` | OpenSpec | proposal.md, design.md, tasks.md |
|
|
171
|
+
| 2. Deep Design | `/comet-design` | Superpowers | Design Doc, delta spec |
|
|
172
|
+
| 3. Plan & Build | `/comet-build` | Superpowers | Implementation plan, code commits |
|
|
173
|
+
| 4. Verify & Finish | `/comet-verify` | Both | Verification report, branch handling |
|
|
174
|
+
| 5. Archive | `/comet-archive` | OpenSpec | delta→main spec sync, archive |
|
|
175
|
+
|
|
176
|
+
### Core Principles
|
|
177
|
+
|
|
178
|
+
- **Brainstorming is non-skippable** — every change must go through deep design (except hotfix/tweak)
|
|
179
|
+
- **Delta specs are living documents** — freely editable during Phase 3, synced at archive
|
|
180
|
+
- **Keep tasks.md in sync** — check off each task as completed
|
|
181
|
+
- **Commit frequently** — one commit per task, message reflects design intent
|
|
182
|
+
- **Verify before archive** — `/comet-verify` must pass before `/comet-archive`
|
|
183
|
+
|
|
184
|
+
### State Management
|
|
185
|
+
|
|
186
|
+
Comet uses a decoupled state architecture with separate YAML files:
|
|
187
|
+
|
|
188
|
+
| File | Owner | Purpose |
|
|
189
|
+
|------|-------|---------|
|
|
190
|
+
| `.openspec.yaml` | OpenSpec | Spec lifecycle, change metadata |
|
|
191
|
+
| `.comet.yaml` | Comet | Workflow phase, execution mode, verification status |
|
|
192
|
+
|
|
193
|
+
**Key Fields in `.comet.yaml`:**
|
|
194
|
+
|
|
195
|
+
```yaml
|
|
196
|
+
workflow: full
|
|
197
|
+
phase: build
|
|
198
|
+
design_doc: docs/superpowers/specs/YYYY-MM-DD-topic-design.md
|
|
199
|
+
plan: docs/superpowers/plans/YYYY-MM-DD-feature.md
|
|
200
|
+
build_mode: subagent-driven-development
|
|
201
|
+
isolation: branch
|
|
202
|
+
verify_mode: light
|
|
203
|
+
verify_result: pending
|
|
204
|
+
verified_at: null
|
|
205
|
+
archived: false
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
All states and execution phases are updated via scripts, and **each phase verifies that tasks are truly completed before exiting — conditions are met before the phase exits and state is updated**. Compared to recording complex state management mechanisms in Skills, the script approach strongly guarantees the reliability of core state transitions, correctness of YAML files, and convenience of breakpoint recovery — Agents only need to use Comet's built-in commands to read state and know the current Spec's situation.
|
|
209
|
+
|
|
210
|
+
### Reliability Features
|
|
211
|
+
|
|
212
|
+
Comet ensures agent execution reliability through automated state transitions:
|
|
213
|
+
|
|
214
|
+
1. **Entry Verification** — Each phase validates preconditions before execution
|
|
215
|
+
- Checks file existence, state consistency, and phase transitions
|
|
216
|
+
- Outputs `[HARD STOP]` with actionable suggestions if validation fails
|
|
217
|
+
|
|
218
|
+
2. **Automated State Transitions** — `comet-guard.sh --apply` updates `.comet.yaml` automatically
|
|
219
|
+
- All phase transitions (design → build → verify → archive) use `guard --apply`
|
|
220
|
+
- No manual state editing required — eliminates write-verification errors
|
|
221
|
+
- `comet-state.sh` is the agents' exclusive interface for state operations
|
|
222
|
+
- Guard and archive scripts use `comet-state.sh` internally for state management
|
|
223
|
+
|
|
224
|
+
3. **Schema Validation** — `comet-yaml-validate.sh` ensures data integrity
|
|
225
|
+
- Validates required fields (10 fields)
|
|
226
|
+
- Validates enum values (7 enum types)
|
|
227
|
+
- Validates referenced file paths exist
|
|
228
|
+
- Detects unknown/typos fields
|
|
229
|
+
|
|
230
|
+
4. **Archive Automation** — `comet-archive.sh` handles the full archive flow in one command
|
|
231
|
+
- Validates entry state, syncs delta specs to main specs
|
|
232
|
+
- Annotates design doc and plan frontmatter
|
|
233
|
+
- Moves change to archive directory and updates `archived: true`
|
|
234
|
+
- Supports `--dry-run` for preview
|
|
235
|
+
|
|
236
|
+
**Security**: Path traversal protection on all change name inputs
|
|
237
|
+
|
|
238
|
+
## Project Structure
|
|
239
|
+
|
|
240
|
+
```
|
|
241
|
+
your-project/
|
|
242
|
+
├── .claude/skills/ # Platform skills dir (Comet + OpenSpec + Superpowers)
|
|
243
|
+
│ ├── comet/SKILL.md
|
|
244
|
+
│ │ └── scripts/
|
|
245
|
+
│ │ ├── comet-guard.sh # Phase transition guard (--apply auto-updates state)
|
|
246
|
+
│ │ ├── comet-archive.sh # One-command archive automation
|
|
247
|
+
│ │ ├── comet-yaml-validate.sh # Schema validator
|
|
248
|
+
│ │ └── comet-state.sh # Unified state management (init/set/get/check/scale)
|
|
249
|
+
│ ├── comet-*/SKILL.md
|
|
250
|
+
│ ├── openspec-*/SKILL.md
|
|
251
|
+
│ └── brainstorming/SKILL.md
|
|
252
|
+
├── openspec/ # OpenSpec — WHAT
|
|
253
|
+
│ ├── config.yaml
|
|
254
|
+
│ └── changes/
|
|
255
|
+
│ └── <name>/
|
|
256
|
+
│ ├── .openspec.yaml # OpenSpec state
|
|
257
|
+
│ ├── .comet.yaml # Comet workflow state (decoupled)
|
|
258
|
+
│ ├── proposal.md
|
|
259
|
+
│ ├── design.md
|
|
260
|
+
│ ├── specs/<capability>/spec.md
|
|
261
|
+
│ └── tasks.md
|
|
262
|
+
└── docs/superpowers/ # Superpowers — HOW
|
|
263
|
+
├── specs/ # Design documents
|
|
264
|
+
└── plans/ # Implementation plans
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
## What You'll Learn
|
|
268
|
+
|
|
269
|
+
Many excellent Skill projects exist in the current Skill market, but they generally have preference issues — users may only like some features. For example, when using both OpenSpec and Superpowers, one might only use OpenSpec's Spec management capabilities, but prefer Superpowers' TDD-driven approach for coding.
|
|
270
|
+
|
|
271
|
+
Long-term Skill users know these capabilities can be freely combined, but exactly how to do so still requires real practice. The Comet project can serve as a reference:
|
|
272
|
+
|
|
273
|
+
- **How to reliably trigger nested Skills** — Not letting the Agent rely on document descriptions to perform "look-alike Skill trigger" operations (like writing files based on Skill descriptions), but truly triggering Skills (key feature: Skill trigger prints on CC). Comet will trigger many capabilities from OpenSpec and Superpowers — how is this Prompt written?
|
|
274
|
+
|
|
275
|
+
- **How to make combined Skills multi-phase auto-flow** — Not relying on manual intervention. Comet's 5-phase flow automatically triggers Skills for core processes except necessary user selections, while the **state machine mechanism** also ensures state transition reliability.
|
|
276
|
+
|
|
277
|
+
## Development
|
|
278
|
+
|
|
279
|
+
```bash
|
|
280
|
+
# Clone
|
|
281
|
+
git clone https://github.com/rpamis/comet
|
|
282
|
+
cd comet
|
|
283
|
+
|
|
284
|
+
# Install dependencies
|
|
285
|
+
pnpm install
|
|
286
|
+
|
|
287
|
+
# Dev mode (watch)
|
|
288
|
+
pnpm dev
|
|
289
|
+
|
|
290
|
+
# Build
|
|
291
|
+
pnpm build
|
|
292
|
+
|
|
293
|
+
# Test (unit + coverage)
|
|
294
|
+
pnpm test
|
|
295
|
+
pnpm test:coverage
|
|
296
|
+
pnpm test:shell # bats shell tests
|
|
297
|
+
|
|
298
|
+
# Lint & format
|
|
299
|
+
pnpm lint
|
|
300
|
+
pnpm format
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
See [CHANGELOG.md](CHANGELOG.md) for version history and updates.
|
|
304
|
+
|
|
305
|
+
## Security
|
|
306
|
+
|
|
307
|
+
- Pre-publish scan for API keys, secrets, tokens, and private keys
|
|
308
|
+
- `.npmignore` prevents source code and config files from entering the npm package
|
|
309
|
+
- `.gitignore` covers secrets, credentials, IDE configs, and more
|
|
310
|
+
|
|
311
|
+
## License
|
|
312
|
+
|
|
313
|
+
MIT
|