@rpamis/comet 0.3.6 → 0.3.7
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 +175 -63
- package/assets/manifest.json +11 -1
- package/assets/skills/comet/SKILL.md +44 -16
- package/assets/skills/comet/reference/dirty-worktree.md +1 -0
- package/assets/skills/comet/rules/comet-phase-guard.md +90 -0
- package/assets/skills/comet/scripts/comet-archive.sh +71 -55
- package/assets/skills/comet/scripts/comet-guard.sh +174 -18
- package/assets/skills/comet/scripts/comet-handoff.sh +133 -6
- package/assets/skills/comet/scripts/comet-hook-guard.sh +260 -0
- package/assets/skills/comet/scripts/comet-state.sh +300 -25
- package/assets/skills/comet/scripts/comet-yaml-validate.sh +24 -1
- package/assets/skills/comet-archive/SKILL.md +43 -10
- package/assets/skills/comet-build/SKILL.md +117 -22
- package/assets/skills/comet-design/SKILL.md +119 -13
- package/assets/skills/comet-hotfix/SKILL.md +51 -9
- package/assets/skills/comet-open/SKILL.md +86 -13
- package/assets/skills/comet-tweak/SKILL.md +33 -8
- package/assets/skills/comet-verify/SKILL.md +48 -9
- package/assets/skills-zh/comet/SKILL.md +47 -16
- package/assets/skills-zh/comet/reference/dirty-worktree.md +2 -1
- package/assets/skills-zh/comet-archive/SKILL.md +44 -11
- package/assets/skills-zh/comet-build/SKILL.md +120 -25
- package/assets/skills-zh/comet-design/SKILL.md +123 -16
- package/assets/skills-zh/comet-hotfix/SKILL.md +47 -9
- package/assets/skills-zh/comet-open/SKILL.md +87 -14
- package/assets/skills-zh/comet-tweak/SKILL.md +29 -8
- package/assets/skills-zh/comet-verify/SKILL.md +49 -12
- package/bin/comet.js +3 -3
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +22 -0
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/init.d.ts +5 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +64 -9
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +60 -1
- package/dist/commands/update.js.map +1 -1
- package/dist/core/codegraph.d.ts +9 -0
- package/dist/core/codegraph.d.ts.map +1 -0
- package/dist/core/codegraph.js +96 -0
- package/dist/core/codegraph.js.map +1 -0
- package/dist/core/platforms.d.ts +10 -0
- package/dist/core/platforms.d.ts.map +1 -1
- package/dist/core/platforms.js +163 -15
- package/dist/core/platforms.js.map +1 -1
- package/dist/core/skills.d.ts +34 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +360 -1
- package/dist/core/skills.js.map +1 -1
- package/package.json +3 -1
- 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
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
> 中文版:[README-zh.md](README-zh.md)
|
|
31
31
|
> [Bilibili video](https://www.bilibili.com/video/BV1y4Gi6CEo1/?spm_id_from=333.1387.homepage.video_card.click&vd_source=d22726fe6b108647dbebf1c5d8817377)
|
|
32
|
+
> [DouYin](https://www.douyin.com/search/comet?aid=cd8fcc82-498b-4d59-8860-617deb719412&modal_id=7646429015808936293&type=general)
|
|
32
33
|
|
|
33
34
|
**OpenSpec + Superpowers dual-star development workflow** — one command from idea to archive.
|
|
34
35
|
|
|
@@ -38,37 +39,75 @@ Superpowers handles **HOW** (technical design, planning, execution, wrap-up).
|
|
|
38
39
|
|
|
39
40
|
Comet chains both into a five-phase automated pipeline.
|
|
40
41
|
|
|
42
|
+
> [!IMPORTANT]
|
|
43
|
+
> **0.3.7 Highlights** — One-step [CodeGraph](https://github.com/colbymchenry/codegraph) semantic code indexing (official: cost **↓16%**, tool calls **↓58%**);
|
|
44
|
+
>
|
|
45
|
+
> New **Beta context compression** cutting Build-phase input tokens by **25–30%**;
|
|
46
|
+
> New active context compression mechanism to release context consumed by reading specs and brainstorming, preserving window space for the subsequent Build phase.
|
|
47
|
+
> 6 default-on workflow token optimizations; New `auto_transition` config for automatic or manual phase handoff;
|
|
48
|
+
> Hook+Rule anti-drift phase guard; Optional TDD mode and subagent dispatch confirmation;
|
|
49
|
+
> Large PRD split into multiple changes; Pre-archive confirmation with reopen, verify retry limit, systematic debugging interception, and verification completion check.
|
|
50
|
+
>
|
|
51
|
+
> See [NEWS.md](NEWS.md) for details.
|
|
52
|
+
|
|
41
53
|
## Why Comet
|
|
42
54
|
|
|
43
|
-
OpenSpec excels at managing requirements, creating proposals, managing Spec lifecycles, and archiving, but its proposals
|
|
55
|
+
OpenSpec excels at managing requirements, creating proposals, managing Spec lifecycles, and archiving, but its proposals
|
|
56
|
+
and tasks lack the detail of Superpowers brainstorming.
|
|
44
57
|
|
|
45
|
-
Superpowers generates Spec documents after brainstorming, but these documents typically lack stateful design — after
|
|
58
|
+
Superpowers generates Spec documents after brainstorming, but these documents typically lack stateful design — after
|
|
59
|
+
completing requirements, Specs only have tasks checked off in the document, and Agents even forget to check them off.
|
|
60
|
+
This causes the Agent to re-examine documents and project code to verify on resumption, wasting many tokens.
|
|
46
61
|
|
|
47
62
|
**Comet combines the strengths of both**, integrating the core workflow into 5 phases
|
|
48
63
|
|
|
49
|
-
The main entry `/comet` supports current Spec state detection, suitable for long tasks — after closing your AI coding
|
|
64
|
+
The main entry `/comet` supports current Spec state detection, suitable for long tasks — after closing your AI coding
|
|
65
|
+
session midway, just `/comet` and Comet will automatically read the active Spec (lists multiple for selection),
|
|
66
|
+
dynamically identify which phase is currently executing, and continue.
|
|
50
67
|
|
|
51
|
-
At the same time, Comet provides full Spec lifecycle management. During execution, it links OpenSpec change/spec
|
|
68
|
+
At the same time, Comet provides full Spec lifecycle management. During execution, it links OpenSpec change/spec
|
|
69
|
+
artifacts with Superpowers design and planning documents, then automates handoff, state updates, validation, and archive
|
|
70
|
+
sync so users do not have to repeatedly remind the Agent to keep documents synchronized and connected.
|
|
52
71
|
|
|
53
72
|
## What You'll Learn
|
|
54
73
|
|
|
55
|
-
Many excellent Skill projects exist in the current Skill market, but they generally have preference issues — users may
|
|
74
|
+
Many excellent Skill projects exist in the current Skill market, but they generally have preference issues — users may
|
|
75
|
+
only like some features. For example, when using both OpenSpec and Superpowers, one might only use OpenSpec's Spec
|
|
76
|
+
management capabilities, but prefer Superpowers' TDD-driven approach for coding.
|
|
56
77
|
|
|
57
|
-
Long-term Skill users know these capabilities can be freely combined, but exactly how to do so still requires real
|
|
78
|
+
Long-term Skill users know these capabilities can be freely combined, but exactly how to do so still requires real
|
|
79
|
+
practice. The Comet project can serve as a reference:
|
|
58
80
|
|
|
59
|
-
- **How to reliably trigger nested Skills** — Not letting the Agent rely on document descriptions to perform "look-alike
|
|
81
|
+
- **How to reliably trigger nested Skills** — Not letting the Agent rely on document descriptions to perform "look-alike
|
|
82
|
+
Skill trigger" operations (like writing files based on Skill descriptions), but truly triggering Skills (key feature:
|
|
83
|
+
Skill trigger prints on CC). Comet triggers many capabilities from OpenSpec and Superpowers. How is this Prompt
|
|
84
|
+
written?
|
|
60
85
|
|
|
61
|
-
- **How to make combined Skills flow automatically across phases** — Not relying on manual intervention. Comet's 5-phase
|
|
86
|
+
- **How to make combined Skills flow automatically across phases** — Not relying on manual intervention. Comet's 5-phase
|
|
87
|
+
flow can automatically trigger Skills for the core process except for necessary user choices, while the state machine
|
|
88
|
+
also protects state transition reliability.
|
|
62
89
|
|
|
63
|
-
- **How to turn the Spec lifecycle into a resumable workflow** — Comet links OpenSpec change/spec artifacts with
|
|
90
|
+
- **How to turn the Spec lifecycle into a resumable workflow** — Comet links OpenSpec change/spec artifacts with
|
|
91
|
+
Superpowers design and planning documents, then records phase, execution mode, verification results, and archive
|
|
92
|
+
status in `.comet.yaml`, so the Agent can resume after interruption instead of rereading documents and guessing
|
|
93
|
+
progress.
|
|
64
94
|
|
|
65
|
-
- **How to turn document synchronization from "user reminders" into automation** — Comet puts handoff, state updates,
|
|
95
|
+
- **How to turn document synchronization from "user reminders" into automation** — Comet puts handoff, state updates,
|
|
96
|
+
validation, and archive sync into scripted flows, reducing repeated prompts like "remember to update the design
|
|
97
|
+
doc", "remember to sync the spec", and "remember to archive the change".
|
|
66
98
|
|
|
67
|
-
- **How to design guard conditions that Agents can execute** — Comet does not simply trust the Agent saying "done" at
|
|
99
|
+
- **How to design guard conditions that Agents can execute** — Comet does not simply trust the Agent saying "done" at
|
|
100
|
+
phase exits. Scripts such as `comet-guard.sh`, `comet-yaml-validate.sh`, and `comet-state.sh` check tasks, state
|
|
101
|
+
fields, verification evidence, and archive conditions before allowing the workflow to advance.
|
|
68
102
|
|
|
69
|
-
- **How to distribute and install Skills across platforms** — Comet supports multiple AI coding platforms,
|
|
103
|
+
- **How to distribute and install Skills across platforms** — Comet supports multiple AI coding platforms,
|
|
104
|
+
project/global installation, Chinese/English Skill choices, and platform-specific directory differences such as
|
|
105
|
+
Antigravity using different project-level and global paths. It can be a reference for CLI installers and Skill package
|
|
106
|
+
structure.
|
|
70
107
|
|
|
71
|
-
- **How to turn shell scripts into Agent workflow infrastructure** — Comet's scripts need to work across macOS, Linux,
|
|
108
|
+
- **How to turn shell scripts into Agent workflow infrastructure** — Comet's scripts need to work across macOS, Linux,
|
|
109
|
+
and Windows Git Bash while handling hashes, YAML fields, state machines, and archive flows. It shows how to move
|
|
110
|
+
fragile workflow control out of scattered Prompt text and into testable, reusable tools.
|
|
72
111
|
|
|
73
112
|
## Install
|
|
74
113
|
|
|
@@ -130,14 +169,15 @@ npx skills add rpamis/comet
|
|
|
130
169
|
Initializes OpenSpec, Superpowers, and Comet skills for selected AI coding platforms.
|
|
131
170
|
|
|
132
171
|
| Option | Description |
|
|
133
|
-
|
|
172
|
+
|-------------------|--------------------------------------------------------------------------------|
|
|
134
173
|
| `--yes` | Non-interactive mode, auto-select detected platforms (or all if none detected) |
|
|
135
174
|
| `--scope <scope>` | Install scope: `project` or `global` |
|
|
136
175
|
| `--skip-existing` | Skip already installed components |
|
|
137
176
|
| `--overwrite` | Overwrite already installed components |
|
|
138
177
|
| `--json` | Output structured JSON |
|
|
139
178
|
|
|
140
|
-
When multiple existing components are found on the same platform, interactive init offers one bulk choice: overwrite
|
|
179
|
+
When multiple existing components are found on the same platform, interactive init offers one bulk choice: overwrite
|
|
180
|
+
all, skip all, or choose per component.
|
|
141
181
|
|
|
142
182
|
</details>
|
|
143
183
|
|
|
@@ -147,7 +187,7 @@ When multiple existing components are found on the same platform, interactive in
|
|
|
147
187
|
Displays active changes, task progress, and the recommended next Comet workflow command.
|
|
148
188
|
|
|
149
189
|
| Option | Description |
|
|
150
|
-
|
|
190
|
+
|----------|------------------------------------------|
|
|
151
191
|
| `--json` | Output active changes with `nextCommand` |
|
|
152
192
|
|
|
153
193
|
</details>
|
|
@@ -158,7 +198,7 @@ Displays active changes, task progress, and the recommended next Comet workflow
|
|
|
158
198
|
Checks project/global installation health, working directories, installed skills, scripts, and Comet state files.
|
|
159
199
|
|
|
160
200
|
| Option | Description |
|
|
161
|
-
|
|
201
|
+
|-------------------|-----------------------------------------------------------------|
|
|
162
202
|
| `--json` | Output structured diagnostic results |
|
|
163
203
|
| `--scope <scope>` | Diagnose `auto`, `project`, or `global` scope (default: `auto`) |
|
|
164
204
|
|
|
@@ -170,7 +210,7 @@ Checks project/global installation health, working directories, installed skills
|
|
|
170
210
|
Updates the npm package and refreshes installed Comet skills in detected project/global targets.
|
|
171
211
|
|
|
172
212
|
| Option | Description |
|
|
173
|
-
|
|
213
|
+
|---------------------|-----------------------------------------------|
|
|
174
214
|
| `--json` | Output npm and skill update results as JSON |
|
|
175
215
|
| `--language <lang>` | Override detected skill language (`en`, `zh`) |
|
|
176
216
|
| `--scope <scope>` | Update only `global` or `project` scope |
|
|
@@ -178,7 +218,7 @@ Updates the npm package and refreshes installed Comet skills in detected project
|
|
|
178
218
|
</details>
|
|
179
219
|
|
|
180
220
|
| Command | Description |
|
|
181
|
-
|
|
221
|
+
|-------------------|--------------|
|
|
182
222
|
| `comet --help` | Show help |
|
|
183
223
|
| `comet --version` | Show version |
|
|
184
224
|
|
|
@@ -190,7 +230,7 @@ Updates the npm package and refreshes installed Comet skills in detected project
|
|
|
190
230
|
<summary>View full platform list</summary>
|
|
191
231
|
|
|
192
232
|
| Platform | Skills Dir | Platform | Skills Dir |
|
|
193
|
-
|
|
233
|
+
|--------------------|--------------|------------|---------------|
|
|
194
234
|
| Claude Code | `.claude/` | Cursor | `.cursor/` |
|
|
195
235
|
| Codex | `.codex/` | OpenCode | `.opencode/` |
|
|
196
236
|
| Windsurf | `.windsurf/` | Cline | `.cline/` |
|
|
@@ -208,7 +248,8 @@ Updates the npm package and refreshes installed Comet skills in detected project
|
|
|
208
248
|
|
|
209
249
|
</details>
|
|
210
250
|
|
|
211
|
-
Some platforms use different project and global directories. For example, OpenCode global installs use
|
|
251
|
+
Some platforms use different project and global directories. For example, OpenCode global installs use
|
|
252
|
+
`.config/opencode`, Lingma global installs use `.lingma`, and Antigravity global installs use `.gemini/antigravity`.
|
|
212
253
|
|
|
213
254
|
## Skills
|
|
214
255
|
|
|
@@ -220,7 +261,7 @@ After `comet init`, three groups of skills are installed to the selected platfor
|
|
|
220
261
|
<summary>View Comet skills</summary>
|
|
221
262
|
|
|
222
263
|
| Skill | Description |
|
|
223
|
-
|
|
264
|
+
|------------------|----------------------------------------------------------------|
|
|
224
265
|
| `/comet` | Main entry — auto-detects phase and dispatches to sub-commands |
|
|
225
266
|
| `/comet-open` | Phase 1: Open a change (proposal, design, task breakdown) |
|
|
226
267
|
| `/comet-design` | Phase 2: Deep design (brainstorming, Design Doc) |
|
|
@@ -237,14 +278,15 @@ After `comet init`, three groups of skills are installed to the selected platfor
|
|
|
237
278
|
<details>
|
|
238
279
|
<summary>View script list</summary>
|
|
239
280
|
|
|
240
|
-
| Script | Purpose
|
|
241
|
-
|
|
281
|
+
| Script | Purpose |
|
|
282
|
+
|--------------------------|-----------------------------------------------------------------------------------------------------------------------------------|
|
|
242
283
|
| `comet-env.sh` | Script discovery helper — exports bundled script paths such as `COMET_GUARD`, `COMET_STATE`, `COMET_HANDOFF`, and `COMET_ARCHIVE` |
|
|
243
|
-
| `comet-guard.sh` | Phase transition guard — validates exit conditions, `--apply` auto-updates `.comet.yaml`
|
|
244
|
-
| `comet-handoff.sh` | Design handoff — generates deterministic context packages from OpenSpec artifacts with SHA256 tracing
|
|
245
|
-
| `comet-archive.sh` | One-command archive — validates state, syncs specs, moves to archive, updates status
|
|
246
|
-
| `comet-yaml-validate.sh` | Schema validator — validates `.comet.yaml` structure and field values
|
|
247
|
-
| `comet-
|
|
284
|
+
| `comet-guard.sh` | Phase transition guard — validates exit conditions, `--apply` auto-updates `.comet.yaml` |
|
|
285
|
+
| `comet-handoff.sh` | Design handoff — generates deterministic context packages from OpenSpec artifacts with SHA256 tracing |
|
|
286
|
+
| `comet-archive.sh` | One-command archive — validates state, syncs specs, moves to archive, updates status |
|
|
287
|
+
| `comet-yaml-validate.sh` | Schema validator — validates `.comet.yaml` structure and field values |
|
|
288
|
+
| `comet-hook-guard.sh` | Phase write guard — PreToolUse hook, blocks file writes during open/design/archive phases |
|
|
289
|
+
| `comet-state.sh` | Unified state management — init/set/get/check/scale, agents' exclusive YAML interface |
|
|
248
290
|
|
|
249
291
|
</details>
|
|
250
292
|
|
|
@@ -274,7 +316,7 @@ Development methodology: brainstorming, TDD, subagent-driven development, code r
|
|
|
274
316
|
### Five Phases
|
|
275
317
|
|
|
276
318
|
| Phase | Command | Owner | Artifacts |
|
|
277
|
-
|
|
319
|
+
|--------------------|------------------|-------------|--------------------------------------|
|
|
278
320
|
| 1. Open | `/comet-open` | OpenSpec | proposal.md, design.md, tasks.md |
|
|
279
321
|
| 2. Deep Design | `/comet-design` | Superpowers | Design Doc, delta spec |
|
|
280
322
|
| 3. Plan & Build | `/comet-build` | Superpowers | Implementation plan, code commits |
|
|
@@ -294,11 +336,14 @@ Development methodology: brainstorming, TDD, subagent-driven development, code r
|
|
|
294
336
|
Comet uses a decoupled state architecture with separate YAML files:
|
|
295
337
|
|
|
296
338
|
| File | Owner | Purpose |
|
|
297
|
-
|
|
339
|
+
|------------------|----------|-----------------------------------------------------|
|
|
298
340
|
| `.openspec.yaml` | OpenSpec | Spec lifecycle, change metadata |
|
|
299
341
|
| `.comet.yaml` | Comet | Workflow phase, execution mode, verification status |
|
|
300
342
|
|
|
301
|
-
All states and execution phases are updated via scripts, and each phase verifies that tasks are truly complete before
|
|
343
|
+
All states and execution phases are updated via scripts, and each phase verifies that tasks are truly complete before
|
|
344
|
+
advancing. Compared to storing complex state rules only in Skill text, this script-backed state machine gives Comet more
|
|
345
|
+
reliable phase transitions, correct YAML, and easier breakpoint recovery; agents can read the current Spec situation
|
|
346
|
+
through Comet's built-in commands.
|
|
302
347
|
|
|
303
348
|
<details>
|
|
304
349
|
<summary>View key .comet.yaml fields</summary>
|
|
@@ -307,11 +352,14 @@ All states and execution phases are updated via scripts, and each phase verifies
|
|
|
307
352
|
|
|
308
353
|
```yaml
|
|
309
354
|
workflow: full
|
|
355
|
+
auto_transition: true
|
|
310
356
|
phase: build
|
|
311
357
|
build_mode: subagent-driven-development
|
|
312
358
|
build_pause: null
|
|
313
359
|
isolation: branch
|
|
314
360
|
verify_mode: null
|
|
361
|
+
tdd_mode: null
|
|
362
|
+
subagent_dispatch: null
|
|
315
363
|
design_doc: docs/superpowers/specs/YYYY-MM-DD-topic-design.md
|
|
316
364
|
plan: docs/superpowers/plans/YYYY-MM-DD-feature.md
|
|
317
365
|
verify_result: pending
|
|
@@ -326,7 +374,16 @@ handoff_context: openspec/changes/<name>/.comet/handoff/design-context.json
|
|
|
326
374
|
handoff_hash: <sha256>
|
|
327
375
|
```
|
|
328
376
|
|
|
329
|
-
In full workflow, `build_mode`, `build_pause`, `isolation`,
|
|
377
|
+
In full workflow, `build_mode`, `build_pause`, `isolation`, `verify_mode`, `tdd_mode`, and `subagent_dispatch` may
|
|
378
|
+
temporarily be `null`; `build_mode` and `isolation` must be resolved before `build → verify`. `auto_transition` controls automatic vs manual skill invocation after phase completion — see [AUTO-TRANSITION.md](docs/AUTO-TRANSITION.md). `build_pause` records an internal build-phase pause point:
|
|
379
|
+
`null` means no pause, while `plan-ready` means the plan has been generated and the user paused before choosing
|
|
380
|
+
isolation and execution mode. It is not an execution mode and must not be written into `build_mode`.
|
|
381
|
+
`verification_report` stays `null` until verification writes a report, and `verify-pass` requires that report to exist
|
|
382
|
+
plus `branch_status: handled`. Fields after `archived` in the example are optional or script-derived: `direct_override`
|
|
383
|
+
is only needed for full-workflow direct builds, project commands may be absent unless configured, and
|
|
384
|
+
`handoff_context` / `handoff_hash` are recorded by `comet-handoff.sh` before leaving design. Projects can configure
|
|
385
|
+
`build_command` / `verify_command` in the change or repo root, and guard will run those commands first and print failure
|
|
386
|
+
output.
|
|
330
387
|
|
|
331
388
|
</details>
|
|
332
389
|
|
|
@@ -338,38 +395,38 @@ Comet ensures agent execution reliability through automated state transitions:
|
|
|
338
395
|
<summary>View reliability features</summary>
|
|
339
396
|
|
|
340
397
|
1. **Entry Verification** — Each phase validates preconditions before execution
|
|
341
|
-
|
|
342
|
-
|
|
398
|
+
- Checks file existence, state consistency, and phase transitions
|
|
399
|
+
- Outputs `[HARD STOP]` with actionable suggestions if validation fails
|
|
343
400
|
|
|
344
401
|
2. **Automated State Transitions** — `comet-guard.sh --apply` updates `.comet.yaml` automatically
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
402
|
+
- All phase transitions (open → design/build → verify → archive) use `guard --apply`
|
|
403
|
+
- No manual state editing required — eliminates write-verification errors
|
|
404
|
+
- `comet-state.sh` is the agents' exclusive interface for state operations
|
|
405
|
+
- Guard and archive scripts use `comet-state.sh` internally for state management
|
|
349
406
|
|
|
350
407
|
3. **Schema Validation** — `comet-yaml-validate.sh` ensures data integrity
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
408
|
+
- Validates required and optional fields
|
|
409
|
+
- Validates enum values, including `direct_override`
|
|
410
|
+
- Validates `design_doc`, `plan`, and `handoff_context` paths exist, plus `handoff_hash` format
|
|
411
|
+
- Detects unknown/typos fields
|
|
355
412
|
|
|
356
413
|
4. **Build Decision Enforcement** — Guard and state transitions both block skipped build choices
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
414
|
+
- `isolation` must be `branch` or `worktree`
|
|
415
|
+
- `build_mode` must be selected before leaving build
|
|
416
|
+
- `build_pause: plan-ready` is a recoverable pause after plan generation, not a `build_mode`
|
|
417
|
+
- Full workflow `build_mode: direct` requires `direct_override: true`
|
|
361
418
|
|
|
362
419
|
5. **Verification Evidence** — Guard enforces proof before phase advance
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
420
|
+
- `verify-pass` transition requires `verification_report` pointing to an existing report file
|
|
421
|
+
- `branch_status` must be `handled` before verify can pass
|
|
422
|
+
- Guard checks `verification_report exists` and `branch_status=handled` as hard prerequisites
|
|
423
|
+
- Prevents false phase advances when verification or branch handling was skipped
|
|
367
424
|
|
|
368
425
|
6. **Archive Automation** — `comet-archive.sh` handles the full archive flow in one command
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
426
|
+
- Validates entry state, merges delta specs into main specs through OpenSpec
|
|
427
|
+
- Annotates design doc and plan frontmatter
|
|
428
|
+
- Moves change to archive directory and updates `archived: true`
|
|
429
|
+
- Supports `--dry-run` for preview
|
|
373
430
|
|
|
374
431
|
</details>
|
|
375
432
|
|
|
@@ -377,6 +434,8 @@ Comet ensures agent execution reliability through automated state transitions:
|
|
|
377
434
|
|
|
378
435
|
```
|
|
379
436
|
your-project/
|
|
437
|
+
├── .comet/
|
|
438
|
+
│ └── config.yaml # Project-level global config (context_compression, auto_transition, etc.)
|
|
380
439
|
├── .claude/skills/ # Platform skills dir (Comet + OpenSpec + Superpowers)
|
|
381
440
|
│ ├── comet/SKILL.md
|
|
382
441
|
│ │ └── scripts/
|
|
@@ -385,6 +444,7 @@ your-project/
|
|
|
385
444
|
│ │ ├── comet-handoff.sh # Design handoff (OpenSpec → Superpowers context tracing)
|
|
386
445
|
│ │ ├── comet-archive.sh # One-command archive automation
|
|
387
446
|
│ │ ├── comet-yaml-validate.sh # Schema validator
|
|
447
|
+
│ │ ├── comet-hook-guard.sh # Phase write guard (PreToolUse hook)
|
|
388
448
|
│ │ └── comet-state.sh # Unified state management (init/set/get/check/scale)
|
|
389
449
|
│ ├── comet-*/SKILL.md
|
|
390
450
|
│ ├── openspec-*/SKILL.md
|
|
@@ -404,9 +464,52 @@ your-project/
|
|
|
404
464
|
└── plans/ # Implementation plans
|
|
405
465
|
```
|
|
406
466
|
|
|
467
|
+
<details>
|
|
468
|
+
<summary>Context Compression (Beta)</summary>
|
|
469
|
+
|
|
470
|
+
Comet supports context compression at the Design → Build handoff. When enabled, `comet-handoff.sh` generates a compact
|
|
471
|
+
context package that reduces Build-phase input tokens by **25–30%** without affecting implementation correctness.
|
|
472
|
+
|
|
473
|
+
| Mode | Behavior | Token Savings |
|
|
474
|
+
|--------|------------------------------------------|---------------|
|
|
475
|
+
| `off` | Full Spec excerpts in handoff context | Baseline |
|
|
476
|
+
| `beta` | Design Doc + SHA256 hash references only | ~25–30% |
|
|
477
|
+
|
|
478
|
+
Key findings from benchmark testing:
|
|
479
|
+
|
|
480
|
+
- **Test pass rate**: 100% across all tiers (compression does not affect correctness)
|
|
481
|
+
- **Spec coverage**: 100% (off) vs 95% (beta) — minor edge-case detail loss
|
|
482
|
+
- **Scaling**: Larger tasks yield higher absolute savings (up to 15,000 tokens for large-tier tasks)
|
|
483
|
+
|
|
484
|
+
Enable in `.comet/config.yaml`: `context_compression: beta`
|
|
485
|
+
|
|
486
|
+
See [CONTEXT-COMPRESSION.md](docs/CONTEXT-COMPRESSION.md) for the full benchmark report, compression principles, and
|
|
487
|
+
reproduction steps.
|
|
488
|
+
|
|
489
|
+
</details>
|
|
490
|
+
|
|
491
|
+
<details>
|
|
492
|
+
<summary>Auto Transition</summary>
|
|
493
|
+
|
|
494
|
+
`auto_transition` controls whether Comet automatically invokes the next skill after a phase completes, or pauses for
|
|
495
|
+
manual handoff. Phase advancement itself always happens — this setting only affects skill invocation.
|
|
496
|
+
|
|
497
|
+
| Value | Behavior |
|
|
498
|
+
|--------|----------|
|
|
499
|
+
| `true` | Auto-invoke the next skill after each phase (default) |
|
|
500
|
+
| `false` | Pause after each phase; user manually triggers the next skill |
|
|
501
|
+
|
|
502
|
+
Three-layer configuration with precedence: `COMET_AUTO_TRANSITION` env var > `.comet/config.yaml` (project) > `.comet.yaml` (change).
|
|
503
|
+
|
|
504
|
+
See [AUTO-TRANSITION.md](docs/AUTO-TRANSITION.md) for configuration details, workflow mapping, and FAQ.
|
|
505
|
+
|
|
506
|
+
</details>
|
|
507
|
+
|
|
407
508
|
## Development
|
|
408
509
|
|
|
409
|
-
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, commit
|
|
510
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) | [中文版](CONTRIBUTING-zh.md) for development setup, commit
|
|
511
|
+
conventions, PR process, branch workflow, and guidance for adding platforms,
|
|
512
|
+
skills, scripts, or changelog entries.
|
|
410
513
|
|
|
411
514
|
See [CHANGELOG.md](CHANGELOG.md) for version history and updates.
|
|
412
515
|
|
|
@@ -430,13 +533,22 @@ Track our development progress and upcoming features on the [Comet Roadmap](http
|
|
|
430
533
|
|
|
431
534
|
## Community
|
|
432
535
|
|
|
433
|
-
<
|
|
434
|
-
<
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
</
|
|
438
|
-
|
|
439
|
-
<
|
|
536
|
+
<table align="center">
|
|
537
|
+
<tr>
|
|
538
|
+
<td align="center" width="180">
|
|
539
|
+
<img src="https://github.com/rpamis/comet/blob/master/img/douyin.png" width="120" height="120"><br>
|
|
540
|
+
<b>DouYin (Recommended)</b>
|
|
541
|
+
</td>
|
|
542
|
+
<td align="center" width="180">
|
|
543
|
+
<img src="https://github.com/rpamis/comet/blob/master/img/wechat.jpg" width="120" height="120"><br>
|
|
544
|
+
<b>WeChat</b>
|
|
545
|
+
</td>
|
|
546
|
+
<td align="center" width="180">
|
|
547
|
+
<img src="https://github.com/rpamis/comet/blob/master/img/qq.jpg" width="120" height="120"><br>
|
|
548
|
+
<b>QQ</b>
|
|
549
|
+
</td>
|
|
550
|
+
</tr>
|
|
551
|
+
</table>
|
|
440
552
|
|
|
441
553
|
## Reference
|
|
442
554
|
|
package/assets/manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.3.
|
|
2
|
+
"version": "0.3.3",
|
|
3
3
|
"skills": [
|
|
4
4
|
"comet/SKILL.md",
|
|
5
5
|
"comet/reference/dirty-worktree.md",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"comet/scripts/comet-handoff.sh",
|
|
10
10
|
"comet/scripts/comet-archive.sh",
|
|
11
11
|
"comet/scripts/comet-yaml-validate.sh",
|
|
12
|
+
"comet/scripts/comet-hook-guard.sh",
|
|
12
13
|
"comet-open/SKILL.md",
|
|
13
14
|
"comet-design/SKILL.md",
|
|
14
15
|
"comet-build/SKILL.md",
|
|
@@ -17,6 +18,15 @@
|
|
|
17
18
|
"comet-hotfix/SKILL.md",
|
|
18
19
|
"comet-tweak/SKILL.md"
|
|
19
20
|
],
|
|
21
|
+
"rules": [
|
|
22
|
+
"comet/rules/comet-phase-guard.md"
|
|
23
|
+
],
|
|
24
|
+
"hooks": {
|
|
25
|
+
"comet/scripts/comet-hook-guard.sh": {
|
|
26
|
+
"matcher": "Write|Edit",
|
|
27
|
+
"description": "Block code writes in wrong Comet phase (open/design/archive)"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
20
30
|
"languages": [
|
|
21
31
|
{ "id": "en", "name": "English", "skillsDir": "skills" },
|
|
22
32
|
{ "id": "zh", "name": "中文", "skillsDir": "skills-zh" }
|