@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 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
- ## Install
19
-
20
- ```bash
21
- npm install -g @rpamis/comet
22
- ```
23
-
24
- ## Quick Start
25
-
26
- ```bash
27
- cd your-project
28
- comet init
29
- ```
30
-
31
- `comet init` will:
32
-
33
- 1. Prompt you to select AI platforms (auto-detects existing configs)
34
- 2. Choose install scope: project-level (current directory) or global (home directory)
35
- 3. Select language for Comet skills: English or 中文
36
- 4. Install [OpenSpec](https://github.com/Fission-AI/OpenSpec) skills
37
- 5. Install [Superpowers](https://github.com/obra/superpowers) skills
38
- 6. Deploy Comet skills (in your chosen language) to selected platforms
39
- 7. Create `docs/superpowers/specs/` and `docs/superpowers/plans/` working directories
40
-
41
- ## Commands
42
-
43
- | Command | Description |
44
- |---------|-------------|
45
- | `comet init [path]` | Initialize Comet workflow |
46
- | `comet status [path]` | Show active changes and workflow status |
47
- | `comet doctor [path]` | Diagnose Comet installation health |
48
- | `comet update [path]` | Update comet skills to latest version |
49
- | `comet --help` | Show help |
50
- | `comet --version` | Show version |
51
-
52
- ### init Options
53
-
54
- | Option | Description |
55
- |--------|-------------|
56
- | `--yes` | Non-interactive mode, auto-select detected platforms |
57
- | `--skip-existing` | Skip already installed components |
58
- | `--overwrite` | Overwrite already installed components |
59
- | `--json` | Output structured JSON |
60
-
61
- ### status / doctor / update Options
62
-
63
- | Option | Applies to | Description |
64
- |--------|-----------|-------------|
65
- | `--json` | `status`, `doctor` | Output structured JSON |
66
- | `--language <lang>` | `update` | Language for skills (`en`, `zh`) |
67
- | `--scope <scope>` | `update` | Install scope (`global`, `project`)|
68
-
69
- ## Supported Platforms
70
-
71
- `comet init` supports 28 AI coding platforms:
72
-
73
- | Platform | Skills Dir | Platform | Skills Dir |
74
- |----------|-----------|----------|-----------|
75
- | Claude Code | `.claude/` | Cursor | `.cursor/` |
76
- | Codex | `.codex/` | OpenCode | `.opencode/` |
77
- | Windsurf | `.windsurf/` | Cline | `.cline/` |
78
- | RooCode | `.roo/` | Continue | `.continue/` |
79
- | GitHub Copilot | `.github/` | Gemini CLI | `.gemini/` |
80
- | Amazon Q Developer | `.amazonq/` | Qwen Code | `.qwen/` |
81
- | Kilo Code | `.kilocode/` | Auggie | `.augment/` |
82
- | Kiro | `.kiro/` | Lingma | `.lingma/` |
83
- | Junie | `.junie/` | CodeBuddy | `.codebuddy/` |
84
- | CoStrict | `.cospec/` | Crush | `.crush/` |
85
- | Factory Droid | `.factory/` | iFlow | `.iflow/` |
86
- | Pi | `.pi/` | Qoder | `.qoder/` |
87
- | Antigravity | `.agent/` | Bob Shell | `.bob/` |
88
- | ForgeCode | `.forge/` | Trae | `.trae/` |
89
-
90
- ## Skills
91
-
92
- After `comet init`, three groups of skills are installed to the selected platform's `skills/` directory:
93
-
94
- ### Comet Skills
95
-
96
- | Skill | Description |
97
- |-------|-------------|
98
- | `/comet` | Main entry auto-detects phase and dispatches to sub-commands |
99
- | `/comet-open` | Phase 1: Open a change (proposal, design, task breakdown) |
100
- | `/comet-design` | Phase 2: Deep design (brainstorming, Design Doc) |
101
- | `/comet-build` | Phase 3: Plan and build (implementation plan, code commits) |
102
- | `/comet-verify` | Phase 4: Verify and finish (testing, verification report) |
103
- | `/comet-archive` | Phase 5: Archive (delta spec sync, status annotation) |
104
- | `/comet-hotfix` | Preset: Quick bug fix (skips brainstorming) |
105
- | `/comet-tweak` | Preset: Small change (skips brainstorming and full plan) |
106
-
107
- ### Guard & Automation Scripts
108
-
109
- | Script | Purpose |
110
- |--------|---------|
111
- | `comet-guard.sh` | Phase transition guard validates exit conditions, `--apply` auto-updates `.comet.yaml` |
112
- | `comet-archive.sh` | One-command archive validates state, syncs specs, moves to archive, updates status |
113
- | `comet-yaml-validate.sh` | Schema validator validates `.comet.yaml` structure and field values |
114
- | `comet-state.sh` | Unified state management init/set/get/check/scale, agents' exclusive YAML interface |
115
-
116
- ### OpenSpec Skills
117
-
118
- Spec lifecycle management: propose, explore, sync, verify, archive, and more.
119
-
120
- ### Superpowers Skills
121
-
122
- Development methodology: brainstorming, TDD, subagent-driven development, code review, plan writing, and more.
123
-
124
- ## Workflow
125
-
126
- ```
127
- /comet
128
- auto-detect
129
- /comet-open --> /comet-design --> /comet-build --> /comet-verify --> /comet-archive
130
- (OpenSpec) (Superpowers) (Superpowers) (Both) (OpenSpec)
131
-
132
- /comet-hotfix (preset path, skips brainstorming)
133
- open --> build --> verify --> archive
134
-
135
- /comet-tweak (preset path, skips brainstorming and full plan)
136
- open --> lightweight build --> light verify --> archive
137
- ```
138
-
139
- ### Five Phases
140
-
141
- | Phase | Command | Owner | Artifacts |
142
- |-------|---------|-------|-----------|
143
- | 1. Open | `/comet-open` | OpenSpec | proposal.md, design.md, tasks.md |
144
- | 2. Deep Design | `/comet-design` | Superpowers | Design Doc, delta spec |
145
- | 3. Plan & Build | `/comet-build` | Superpowers | Implementation plan, code commits |
146
- | 4. Verify & Finish | `/comet-verify` | Both | Verification report, branch handling |
147
- | 5. Archive | `/comet-archive` | OpenSpec | delta→main spec sync, archive |
148
-
149
- ### Core Principles
150
-
151
- - **Brainstorming is non-skippable** — every change must go through deep design (except hotfix/tweak)
152
- - **Delta specs are living documents** — freely editable during Phase 3, synced at archive
153
- - **Keep tasks.md in sync** — check off each task as completed
154
- - **Commit frequently** — one commit per task, message reflects design intent
155
- - **Verify before archive** — `/comet-verify` must pass before `/comet-archive`
156
-
157
- ### State Management
158
-
159
- Comet uses a decoupled state architecture with separate YAML files:
160
-
161
- | File | Owner | Purpose |
162
- |------|-------|---------|
163
- | `.openspec.yaml` | OpenSpec | Spec lifecycle, change metadata |
164
- | `.comet.yaml` | Comet | Workflow phase, execution mode, verification status |
165
-
166
- **Key Fields in `.comet.yaml`:**
167
- - `workflow`: `full`, `hotfix`, or `tweak`
168
- - `phase`: `design`, `build`, `verify`, `archive`
169
- - `design_doc`: Path to Superpowers Design Doc
170
- - `plan`: Path to implementation plan
171
- - `build_mode`: `subagent-driven-development`, `executing-plans`, or `direct`
172
- - `isolation`: `branch` or `worktree`, workspace isolation method
173
- - `verify_mode`: `light` or `full`
174
- - `verify_result`: `pending`, `pass`, or `fail`
175
- - `archived`: Boolean indicating if change is archived
176
-
177
- ### Reliability Features
178
-
179
- Comet ensures agent execution reliability through automated state transitions:
180
-
181
- 1. **Entry Verification** — Each phase validates preconditions before execution
182
- - Checks file existence, state consistency, and phase transitions
183
- - Outputs `[HARD STOP]` with actionable suggestions if validation fails
184
-
185
- 2. **Automated State Transitions** — `comet-guard.sh --apply` updates `.comet.yaml` automatically
186
- - All phase transitions (design build verify → archive) use `guard --apply`
187
- - No manual state editing required — eliminates write-verification errors
188
- - `comet-state.sh` is the agents' exclusive interface for state operations
189
- - Guard and archive scripts use `comet-state.sh` internally for state management
190
-
191
- 3. **Schema Validation** `comet-yaml-validate.sh` ensures data integrity
192
- - Validates required fields (10 fields)
193
- - Validates enum values (7 enum types)
194
- - Validates referenced file paths exist
195
- - Detects unknown/typos fields
196
-
197
- 4. **Archive Automation** — `comet-archive.sh` handles the full archive flow in one command
198
- - Validates entry state, syncs delta specs to main specs
199
- - Annotates design doc and plan frontmatter
200
- - Moves change to archive directory and updates `archived: true`
201
- - Supports `--dry-run` for preview
202
-
203
- **Security**: Path traversal protection on all change name inputs
204
-
205
- ## Project Structure
206
-
207
- ```
208
- your-project/
209
- ├── .claude/skills/ # Platform skills dir (Comet + OpenSpec + Superpowers)
210
- │ ├── comet/SKILL.md
211
- │ │ └── scripts/
212
- │ │ ├── comet-guard.sh # Phase transition guard (--apply auto-updates state)
213
- │ │ ├── comet-archive.sh # One-command archive automation
214
- │ │ ├── comet-yaml-validate.sh # Schema validator
215
- │ └── comet-state.sh # Unified state management (init/set/get/check/scale)
216
- ├── comet-*/SKILL.md
217
- │ ├── openspec-*/SKILL.md
218
- │ └── brainstorming/SKILL.md
219
- ├── openspec/ # OpenSpec WHAT
220
- ├── config.yaml
221
- └── changes/
222
- │ └── <name>/
223
- │ ├── .openspec.yaml # OpenSpec state
224
- │ ├── .comet.yaml # Comet workflow state (decoupled)
225
- │ ├── proposal.md
226
- │ ├── design.md
227
- │ ├── specs/<capability>/spec.md
228
- │ └── tasks.md
229
- └── docs/superpowers/ # Superpowers — HOW
230
- ├── specs/ # Design documents
231
- └── plans/ # Implementation plans
232
- ```
233
-
234
- ## Development
235
-
236
- ```bash
237
- # Clone
238
- git clone https://github.com/rpamis/comet
239
- cd comet
240
-
241
- # Install dependencies
242
- pnpm install
243
-
244
- # Dev mode (watch)
245
- pnpm dev
246
-
247
- # Build
248
- pnpm build
249
-
250
- # Test (unit + coverage)
251
- pnpm test
252
- pnpm test:coverage
253
- pnpm test:shell # bats shell tests
254
-
255
- # Lint & format
256
- pnpm lint
257
- pnpm format
258
- ```
259
-
260
- See [CHANGELOG.md](CHANGELOG.md) for version history and updates.
261
-
262
- ## Security
263
-
264
- - Pre-publish scan for API keys, secrets, tokens, and private keys
265
- - `.npmignore` prevents source code and config files from entering the npm package
266
- - `.gitignore` covers secrets, credentials, IDE configs, and more
267
-
268
- ## License
269
-
270
- MIT
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