@rpamis/comet 0.1.8 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -5
- package/assets/manifest.json +2 -0
- package/assets/skills/comet/SKILL.md +214 -219
- package/assets/skills/comet/scripts/comet-state.sh +1 -0
- package/assets/skills/comet-archive/SKILL.md +2 -2
- package/assets/skills/comet-build/SKILL.md +1 -1
- package/assets/skills/comet-design/SKILL.md +1 -1
- package/assets/skills/comet-hotfix/SKILL.md +136 -133
- package/assets/skills/comet-open/SKILL.md +1 -1
- package/assets/skills/comet-tweak/SKILL.md +122 -120
- package/assets/skills/comet-verify/SKILL.md +2 -4
- package/assets/skills-zh/comet/SKILL.md +87 -98
- 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-hotfix/SKILL.md +10 -7
- package/assets/skills-zh/comet-open/SKILL.md +70 -70
- package/assets/skills-zh/comet-tweak/SKILL.md +11 -9
- package/assets/skills-zh/comet-verify/SKILL.md +114 -116
- package/dist/cli/index.js +28 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/doctor.d.ts +6 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +168 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/init.d.ts +9 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +183 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/status.d.ts +6 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +89 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/update.d.ts +8 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +47 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/core/detect.d.ts +8 -0
- package/dist/core/detect.d.ts.map +1 -0
- package/dist/core/detect.js +73 -0
- package/dist/core/detect.js.map +1 -0
- package/dist/core/openspec.d.ts +5 -0
- package/dist/core/openspec.d.ts.map +1 -0
- package/dist/core/openspec.js +58 -0
- package/dist/core/openspec.js.map +1 -0
- package/dist/core/platforms.d.ts.map +1 -1
- package/dist/core/platforms.js +6 -1
- package/dist/core/platforms.js.map +1 -1
- package/dist/core/skills.d.ts +22 -0
- package/dist/core/skills.d.ts.map +1 -0
- package/dist/core/skills.js +59 -0
- package/dist/core/skills.js.map +1 -0
- package/dist/core/superpowers.d.ts +5 -0
- package/dist/core/superpowers.d.ts.map +1 -0
- package/dist/core/superpowers.js +60 -0
- package/dist/core/superpowers.js.map +1 -0
- package/dist/core/types.d.ts +2 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +2 -0
- package/dist/core/types.js.map +1 -0
- package/package.json +61 -50
- package/dist/core/init.d.ts +0 -14
- package/dist/core/init.d.ts.map +0 -1
- package/dist/core/init.js +0 -492
- package/dist/core/init.js.map +0 -1
package/README.md
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝ ╚═╝
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
+
> 中文版:[README-zh.md](README-zh.md)
|
|
13
|
+
|
|
12
14
|
**OpenSpec + Superpowers dual-star development workflow** — one command from idea to archive.
|
|
13
15
|
|
|
14
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.
|
|
@@ -41,6 +43,9 @@ comet init
|
|
|
41
43
|
| Command | Description |
|
|
42
44
|
|---------|-------------|
|
|
43
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 |
|
|
44
49
|
| `comet --help` | Show help |
|
|
45
50
|
| `comet --version` | Show version |
|
|
46
51
|
|
|
@@ -51,6 +56,15 @@ comet init
|
|
|
51
56
|
| `--yes` | Non-interactive mode, auto-select detected platforms |
|
|
52
57
|
| `--skip-existing` | Skip already installed components |
|
|
53
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`)|
|
|
54
68
|
|
|
55
69
|
## Supported Platforms
|
|
56
70
|
|
|
@@ -112,14 +126,14 @@ Development methodology: brainstorming, TDD, subagent-driven development, code r
|
|
|
112
126
|
```
|
|
113
127
|
/comet
|
|
114
128
|
↓ auto-detect
|
|
115
|
-
/comet-open
|
|
116
|
-
|
|
129
|
+
/comet-open --> /comet-design --> /comet-build --> /comet-verify --> /comet-archive
|
|
130
|
+
(OpenSpec) (Superpowers) (Superpowers) (Both) (OpenSpec)
|
|
117
131
|
|
|
118
132
|
/comet-hotfix (preset path, skips brainstorming)
|
|
119
|
-
open
|
|
133
|
+
open --> build --> verify --> archive
|
|
120
134
|
|
|
121
135
|
/comet-tweak (preset path, skips brainstorming and full plan)
|
|
122
|
-
open
|
|
136
|
+
open --> lightweight build --> light verify --> archive
|
|
123
137
|
```
|
|
124
138
|
|
|
125
139
|
### Five Phases
|
|
@@ -233,8 +247,14 @@ pnpm dev
|
|
|
233
247
|
# Build
|
|
234
248
|
pnpm build
|
|
235
249
|
|
|
236
|
-
# Test
|
|
250
|
+
# Test (unit + coverage)
|
|
237
251
|
pnpm test
|
|
252
|
+
pnpm test:coverage
|
|
253
|
+
pnpm test:shell # bats shell tests
|
|
254
|
+
|
|
255
|
+
# Lint & format
|
|
256
|
+
pnpm lint
|
|
257
|
+
pnpm format
|
|
238
258
|
```
|
|
239
259
|
|
|
240
260
|
See [CHANGELOG.md](CHANGELOG.md) for version history and updates.
|
package/assets/manifest.json
CHANGED
|
@@ -1,219 +1,214 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: comet
|
|
3
|
-
description: "Comet — OpenSpec + Superpowers dual-star development workflow. Start with /comet for automatic phase detection and dispatch to subcommands. Five phases: open → design → build → verify → archive."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Comet — OpenSpec + Superpowers Dual-Star Development Workflow
|
|
7
|
-
|
|
8
|
-
OpenSpec and Superpowers orbit the same goal like a binary star system. OpenSpec handles WHAT, Superpowers handles HOW.
|
|
9
|
-
|
|
10
|
-
```
|
|
11
|
-
OpenSpec handles WHAT — outline, proposal, spec lifecycle, archive
|
|
12
|
-
Superpowers handles HOW — technical design, planning, execution, closing
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
**Core principle: brainstorming cannot be skipped. Every change must undergo deep design (except hotfix and tweak presets).**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
1
|
|
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
|
-
6. **Classify incremental updates** — Small edits, medium brainstorming, large new changes
|
|
216
|
-
7. **Plan must associate with change** — File header contains `change:` and `design-doc:` metadata
|
|
217
|
-
8. **Archive closure** — design doc and plan must mark `archived-with` status
|
|
218
|
-
9. **Modifying existing features** — Just open a new change; brainstorming reads existing specs as context naturally
|
|
219
|
-
10. **Preset has limits** — Switch to full workflow promptly when hotfix/tweak meet upgrade conditions
|
|
1
|
+
---
|
|
2
|
+
name: comet
|
|
3
|
+
description: "Comet — OpenSpec + Superpowers dual-star development workflow. Start with /comet for automatic phase detection and dispatch to subcommands. Five phases: open → design → build → verify → archive."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Comet — OpenSpec + Superpowers Dual-Star Development Workflow
|
|
7
|
+
|
|
8
|
+
OpenSpec and Superpowers orbit the same goal like a binary star system. OpenSpec handles WHAT, Superpowers handles HOW.
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
OpenSpec handles WHAT — outline, proposal, spec lifecycle, archive
|
|
12
|
+
Superpowers handles HOW — technical design, planning, execution, closing
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
**Core principle: brainstorming cannot be skipped. Every change must undergo deep design (except hotfix and tweak presets).**
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Decision Core
|
|
20
|
+
|
|
21
|
+
Agents need only read this section for decision-making. Refer to the Reference Appendix as needed.
|
|
22
|
+
|
|
23
|
+
### Automatic Phase Detection
|
|
24
|
+
|
|
25
|
+
**Step 0: Active Change Discovery**
|
|
26
|
+
|
|
27
|
+
1. Run `openspec list --json` to get all active changes
|
|
28
|
+
2. For each change, check `docs/superpowers/specs/` and `docs/superpowers/plans/` for associated files to determine phase and progress
|
|
29
|
+
|
|
30
|
+
| Situation | Action |
|
|
31
|
+
|-----------|--------|
|
|
32
|
+
| No active change | → Invoke `/comet-open` |
|
|
33
|
+
| Exactly 1 active change | → Auto-select, enter Step 1 |
|
|
34
|
+
| Multiple active changes | → List for user selection |
|
|
35
|
+
|
|
36
|
+
**Preset detection**:
|
|
37
|
+
- User describes as bug fix / hotfix + meets hotfix conditions → directly invoke `/comet-hotfix`
|
|
38
|
+
- User describes as copy, config, docs, prompt or small non-bug adjustment + meets tweak conditions → directly invoke `/comet-tweak`
|
|
39
|
+
|
|
40
|
+
**Step 1: Read `.comet.yaml` state metadata**
|
|
41
|
+
|
|
42
|
+
Prefer reading `openspec/changes/<name>/.comet.yaml`. If not available, fall back to `openspec status --change "<name>" --json`, `tasks.md`, and `docs/superpowers/` file checks.
|
|
43
|
+
|
|
44
|
+
**Step 2: Phase Determination** (check in order, first match wins)
|
|
45
|
+
|
|
46
|
+
1. `archived: true` or change moved to archive → Workflow complete
|
|
47
|
+
2. `verify_result: pass` and `archived` is not `true` → Invoke `/comet-archive`
|
|
48
|
+
3. `phase: verify` or tasks.md all checked → Invoke `/comet-verify`
|
|
49
|
+
4. `phase: build` or has Design Doc but plan/execution incomplete → Invoke `/comet-build`
|
|
50
|
+
5. `phase: design` or has change but no Design Doc → Invoke `/comet-design`
|
|
51
|
+
6. No active change or state undeterminable → Invoke `/comet-open`
|
|
52
|
+
|
|
53
|
+
If metadata conflicts with file state, use verifiable file state as source of truth and correct `.comet.yaml` before continuing.
|
|
54
|
+
|
|
55
|
+
### Preset Upgrade Criteria
|
|
56
|
+
|
|
57
|
+
**hotfix → full** (upgrade if any condition met):
|
|
58
|
+
- Change involves **3+ files**
|
|
59
|
+
- Architecture changes (new modules, new interfaces, new dependencies)
|
|
60
|
+
- Database schema changes
|
|
61
|
+
- Fix introduces new public API
|
|
62
|
+
- Fix scope exceeds a single function/module
|
|
63
|
+
|
|
64
|
+
**tweak → full** (upgrade if any condition met):
|
|
65
|
+
- Change involves **5+ files**
|
|
66
|
+
- Cross-module coordination required
|
|
67
|
+
- **5+** new test cases needed
|
|
68
|
+
- Config item additions or deletions (not value changes)
|
|
69
|
+
|
|
70
|
+
### Error Handling Quick Reference
|
|
71
|
+
|
|
72
|
+
| Scenario | Handling |
|
|
73
|
+
|----------|----------|
|
|
74
|
+
| `openspec list --json` fails | Check if openspec is installed, prompt user to run `openspec init` |
|
|
75
|
+
| Sub-skill unavailable | Stop workflow, prompt to install or enable the corresponding skill |
|
|
76
|
+
| `.comet.yaml` malformed or missing | Use file state as source of truth, correct with `bash $COMET_STATE set` then continue |
|
|
77
|
+
| Maven compile/test fails | Return to build phase for fixes, do not enter verify |
|
|
78
|
+
| Incomplete change directory structure | Fill missing files according to `comet-open` artifact requirements |
|
|
79
|
+
|
|
80
|
+
### Phase Transitions
|
|
81
|
+
|
|
82
|
+
<IMPORTANT>
|
|
83
|
+
A single `/comet` invocation starts from the detected phase and advances to the next phase when exit conditions are met.
|
|
84
|
+
|
|
85
|
+
Flow chain: open → design → build → verify → archive
|
|
86
|
+
|
|
87
|
+
Nodes requiring user participation:
|
|
88
|
+
1. Confirm design approach during brainstorming
|
|
89
|
+
2. Select execution mode during build phase
|
|
90
|
+
3. Decide to fix or accept deviation when verify fails
|
|
91
|
+
4. Choose branch handling method for finishing-branch
|
|
92
|
+
5. Encounter upgrade conditions (hotfix/tweak → full workflow)
|
|
93
|
+
|
|
94
|
+
Agents should not skip these decision points; other unambiguous phase transitions can proceed automatically.
|
|
95
|
+
</IMPORTANT>
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Subcommand Quick Reference
|
|
100
|
+
|
|
101
|
+
| Command | Phase | Owner | Artifacts |
|
|
102
|
+
|---------|-------|-------|-----------|
|
|
103
|
+
| `/comet-open` | 1. Open | OpenSpec | proposal.md, design.md, tasks.md |
|
|
104
|
+
| `/comet-design` | 2. Deep Design | Superpowers | Design Doc, delta spec |
|
|
105
|
+
| `/comet-build` | 3. Plan and Build | Superpowers | Implementation plan, code commits |
|
|
106
|
+
| `/comet-verify` | 4. Verify and Close | Both | Verification report, branch handling |
|
|
107
|
+
| `/comet-archive` | 5. Archive | OpenSpec | delta→main spec sync, design doc markup, archive |
|
|
108
|
+
| `/comet-hotfix` | Preset path | Both | Quick fix (skip brainstorming) |
|
|
109
|
+
| `/comet-tweak` | Preset path | Both | Small change (skip brainstorming and full plan) |
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
/comet
|
|
113
|
+
↓ Auto-detect
|
|
114
|
+
/comet-open ──→ /comet-design ──→ /comet-build ──→ /comet-verify ──→ /comet-archive
|
|
115
|
+
(OpenSpec) (Superpowers) (Superpowers) (Both) (OpenSpec)
|
|
116
|
+
|
|
117
|
+
/comet-hotfix (preset, skip brainstorming)
|
|
118
|
+
open ──→ build ──→ verify ──→ archive
|
|
119
|
+
↑ If upgrade triggered → supplement Design Doc → return to full workflow
|
|
120
|
+
|
|
121
|
+
/comet-tweak (preset, skip brainstorming and full plan)
|
|
122
|
+
open ──→ lightweight build ──→ light verify ──→ archive
|
|
123
|
+
↑ If upgrade triggered → supplement Design Doc → return to full workflow
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Reference Appendix
|
|
129
|
+
|
|
130
|
+
### .comet.yaml Field Reference
|
|
131
|
+
|
|
132
|
+
```yaml
|
|
133
|
+
workflow: full
|
|
134
|
+
phase: build
|
|
135
|
+
design_doc: docs/superpowers/specs/YYYY-MM-DD-topic-design.md
|
|
136
|
+
plan: docs/superpowers/plans/YYYY-MM-DD-feature.md
|
|
137
|
+
build_mode: subagent-driven-development
|
|
138
|
+
isolation: branch
|
|
139
|
+
verify_mode: light
|
|
140
|
+
verify_result: pending
|
|
141
|
+
verified_at: null
|
|
142
|
+
archived: false
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
| Field | Meaning |
|
|
146
|
+
|-------|---------|
|
|
147
|
+
| `workflow` | `full`, `hotfix`, or `tweak` |
|
|
148
|
+
| `phase` | Current phase: `open`, `design`, `build`, `verify`, `archive` |
|
|
149
|
+
| `design_doc` | Associated Superpowers Design Doc path, can be empty |
|
|
150
|
+
| `plan` | Associated Superpowers Plan path, can be empty |
|
|
151
|
+
| `build_mode` | Selected execution mode, can be empty |
|
|
152
|
+
| `isolation` | `branch` or `worktree`, workspace isolation method, defaults to `branch` |
|
|
153
|
+
| `verify_mode` | `light` or `full`, can be empty |
|
|
154
|
+
| `verify_result` | `pending`, `pass`, or `fail` |
|
|
155
|
+
| `verified_at` | Verification pass time, can be empty |
|
|
156
|
+
| `archived` | Whether change is archived |
|
|
157
|
+
|
|
158
|
+
### Script Location
|
|
159
|
+
|
|
160
|
+
Comet scripts are distributed in `comet/scripts/`. **Do not hardcode paths** — locate once, cache in env vars:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
COMET_GUARD="${COMET_GUARD:-$(find . -path '*/comet/scripts/comet-guard.sh' -type f -print -quit)}"
|
|
164
|
+
COMET_STATE="${COMET_STATE:-$(find . -path '*/comet/scripts/comet-state.sh' -type f -print -quit)}"
|
|
165
|
+
COMET_ARCHIVE="${COMET_ARCHIVE:-$(find . -path '*/comet/scripts/comet-archive.sh' -type f -print -quit)}"
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
**Auto state update**: Guard supports `--apply` flag, automatically updating `.comet.yaml` state fields after checks pass:
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
bash "$COMET_GUARD" <change-name> <phase> --apply
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
**Archive script**: Complete all archive steps in one command:
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
bash "$COMET_ARCHIVE" <change-name>
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
After loading comet, agents should run the three variable assignments above once, then reuse `$COMET_GUARD`, `$COMET_STATE`, `$COMET_ARCHIVE` throughout the session.
|
|
181
|
+
|
|
182
|
+
### File Structure
|
|
183
|
+
|
|
184
|
+
```
|
|
185
|
+
openspec/ # OpenSpec — WHAT
|
|
186
|
+
├── config.yaml
|
|
187
|
+
├── changes/
|
|
188
|
+
│ ├── <name>/ # Active change
|
|
189
|
+
│ │ ├── .openspec.yaml
|
|
190
|
+
│ │ ├── .comet.yaml
|
|
191
|
+
│ │ ├── proposal.md # Why + What
|
|
192
|
+
│ │ ├── design.md # High-level architecture decisions
|
|
193
|
+
│ │ ├── specs/<capability>/spec.md # Delta capability spec
|
|
194
|
+
│ │ └── tasks.md # Task checklist
|
|
195
|
+
│ └── archive/YYYY-MM-DD-<name>/ # Archived
|
|
196
|
+
└── specs/<capability>/spec.md # Main specs (overwritten from delta at archive)
|
|
197
|
+
|
|
198
|
+
docs/superpowers/ # Superpowers — HOW
|
|
199
|
+
├── specs/YYYY-MM-DD-<topic>-design.md # Design doc (technical RFC, mark status at archive)
|
|
200
|
+
└── plans/YYYY-MM-DD-<feature>.md # Implementation plan (file header contains change association metadata)
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### Best Practices
|
|
204
|
+
|
|
205
|
+
1. **brainstorming cannot be skipped** — Every change must undergo deep design (except hotfix and tweak)
|
|
206
|
+
2. **delta spec is a living document** — Freely modify during phase 3, sync at archive
|
|
207
|
+
3. **Keep tasks.md in sync** — Check off each completed task
|
|
208
|
+
4. **Commit frequently** — One commit per task, message reflects design intent
|
|
209
|
+
5. **Verify before archive** — Execute `/comet-archive` only after `/comet-verify` passes
|
|
210
|
+
6. **Classify incremental updates** — Small edits, medium brainstorming, large new changes
|
|
211
|
+
7. **Plan must associate with change** — File header contains `change:` and `design-doc:` metadata
|
|
212
|
+
8. **Archive closure** — design doc and plan must mark `archived-with` status
|
|
213
|
+
9. **Modifying existing features** — Just open a new change
|
|
214
|
+
10. **Preset has limits** — Switch to full workflow promptly when hotfix/tweak meet upgrade conditions
|
|
@@ -18,7 +18,7 @@ description: "Comet Phase 5: Archive. Invoke with /comet-archive. Sync delta spe
|
|
|
18
18
|
Execute entry verification:
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
|
-
COMET_STATE
|
|
21
|
+
COMET_STATE="${COMET_STATE:-$(find . -path '*/comet/scripts/comet-state.sh' -type f -print -quit)}"
|
|
22
22
|
bash "$COMET_STATE" check <name> archive
|
|
23
23
|
```
|
|
24
24
|
|
|
@@ -29,7 +29,7 @@ Proceed to Step 1 after verification passes. The script outputs specific failure
|
|
|
29
29
|
Run the archive script to automatically complete all steps:
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
|
-
COMET_ARCHIVE
|
|
32
|
+
COMET_ARCHIVE="${COMET_ARCHIVE:-$(find . -path '*/comet/scripts/comet-archive.sh' -type f -print -quit)}"
|
|
33
33
|
bash "$COMET_ARCHIVE" "<change-name>"
|
|
34
34
|
```
|
|
35
35
|
|
|
@@ -17,7 +17,7 @@ description: "Comet Phase 3: Plan and Build. Invoke with /comet-build. Create pl
|
|
|
17
17
|
Execute entry verification:
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
|
-
COMET_STATE
|
|
20
|
+
COMET_STATE="${COMET_STATE:-$(find . -path '*/comet/scripts/comet-state.sh' -type f -print -quit)}"
|
|
21
21
|
bash "$COMET_STATE" check <name> build
|
|
22
22
|
```
|
|
23
23
|
|
|
@@ -17,7 +17,7 @@ description: "Comet Phase 2: Deep Design. Invoke with /comet-design. Produce Des
|
|
|
17
17
|
Execute entry verification:
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
|
-
COMET_STATE
|
|
20
|
+
COMET_STATE="${COMET_STATE:-$(find . -path '*/comet/scripts/comet-state.sh' -type f -print -quit)}"
|
|
21
21
|
bash "$COMET_STATE" check <name> design
|
|
22
22
|
```
|
|
23
23
|
|