@rpamis/comet 0.1.6 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -11
- package/assets/skills/comet/SKILL.md +16 -3
- package/assets/skills/comet/scripts/comet-archive.sh +258 -0
- package/assets/skills/comet/scripts/comet-guard.sh +51 -1
- package/assets/skills/comet/scripts/comet-state.sh +495 -0
- package/assets/skills/comet-archive/SKILL.md +21 -109
- package/assets/skills/comet-build/SKILL.md +23 -73
- package/assets/skills/comet-design/SKILL.md +14 -31
- package/assets/skills/comet-hotfix/SKILL.md +9 -43
- package/assets/skills/comet-open/SKILL.md +8 -61
- package/assets/skills/comet-tweak/SKILL.md +9 -43
- package/assets/skills/comet-verify/SKILL.md +13 -61
- package/assets/skills-zh/comet/SKILL.md +23 -4
- package/assets/skills-zh/comet-archive/SKILL.md +21 -109
- package/assets/skills-zh/comet-build/SKILL.md +23 -73
- package/assets/skills-zh/comet-design/SKILL.md +14 -31
- package/assets/skills-zh/comet-hotfix/SKILL.md +9 -43
- package/assets/skills-zh/comet-open/SKILL.md +8 -61
- package/assets/skills-zh/comet-tweak/SKILL.md +9 -43
- package/assets/skills-zh/comet-verify/SKILL.md +13 -61
- package/package.json +1 -1
|
@@ -14,29 +14,14 @@ description: "Comet Phase 3: Plan and Build. Invoke with /comet-build. Create pl
|
|
|
14
14
|
|
|
15
15
|
### 0. Entry State Verification (Entry Check)
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Execute entry verification:
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
3. `design_doc` field is non-null and non-empty
|
|
23
|
-
4. File referenced by `design_doc` exists (e.g., `docs/superpowers/specs/YYYY-MM-DD-topic-design.md`)
|
|
24
|
-
5. `openspec/changes/<name>/proposal.md` exists and is non-empty
|
|
25
|
-
6. `openspec/changes/<name>/tasks.md` exists and is non-empty
|
|
26
|
-
|
|
27
|
-
**Verification method:**
|
|
28
|
-
- `cat openspec/changes/<name>/.comet.yaml` to read all fields
|
|
29
|
-
- Use `ls` or `test -f` to confirm design_doc file exists
|
|
30
|
-
|
|
31
|
-
**Failure output:**
|
|
32
|
-
```
|
|
33
|
-
[HARD STOP] Entry check failed for comet-build
|
|
34
|
-
Expected: phase=build, design_doc=<path> exists
|
|
35
|
-
Actual: phase=<actual-value>, design_doc=<actual-value or file does not exist>
|
|
36
|
-
Suggestion: Run comet-design first, or verify design_doc file exists.
|
|
19
|
+
```bash
|
|
20
|
+
COMET_STATE=$(find . -path '*/comet/scripts/comet-state.sh' -type f -print -quit)
|
|
21
|
+
bash "$COMET_STATE" check <name> build
|
|
37
22
|
```
|
|
38
23
|
|
|
39
|
-
Proceed to Step 1
|
|
24
|
+
Proceed to Step 1 after verification passes. The script outputs specific failure reasons when verification fails.
|
|
40
25
|
|
|
41
26
|
### 1. Create Plan
|
|
42
27
|
|
|
@@ -56,17 +41,13 @@ design-doc: docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md
|
|
|
56
41
|
|
|
57
42
|
### 2. Update Plan Status
|
|
58
43
|
|
|
59
|
-
|
|
44
|
+
Record plan path:
|
|
60
45
|
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
plan: docs/superpowers/plans/YYYY-MM-DD-feature.md
|
|
46
|
+
```bash
|
|
47
|
+
bash "$COMET_STATE" set <name> plan docs/superpowers/plans/YYYY-MM-DD-feature.md
|
|
64
48
|
```
|
|
65
49
|
|
|
66
|
-
|
|
67
|
-
cat openspec/changes/<name>/.comet.yaml
|
|
68
|
-
Confirm plan line value is "docs/superpowers/plans/YYYY-MM-DD-feature.md"
|
|
69
|
-
If not matching, retry write then verify again. Maximum 2 retries, report error and terminate if still fails.
|
|
50
|
+
No manual phase update needed — guard auto-transitions when exit conditions are met.
|
|
70
51
|
|
|
71
52
|
### 3. Workspace Isolation
|
|
72
53
|
|
|
@@ -81,27 +62,14 @@ Plan has been written to the current branch. Before starting execution, choose w
|
|
|
81
62
|
- Change involves ≤ 3 files → Recommend A
|
|
82
63
|
- Need parallel development, current branch has uncommitted work → Recommend B
|
|
83
64
|
|
|
84
|
-
After user selection,
|
|
85
|
-
|
|
86
|
-
- `branch`
|
|
87
|
-
- `worktree`
|
|
65
|
+
After user selection, update `isolation` field. `isolation` only allows one of the following values:
|
|
88
66
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
```yaml
|
|
92
|
-
# User selects create branch / A
|
|
93
|
-
isolation: branch
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
```yaml
|
|
97
|
-
# User selects create worktree / B
|
|
98
|
-
isolation: worktree
|
|
67
|
+
```bash
|
|
68
|
+
bash "$COMET_STATE" set <name> isolation <value>
|
|
99
69
|
```
|
|
100
70
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
Confirm isolation line value is "<branch or worktree>"
|
|
104
|
-
If not matching, retry write then verify again. Maximum 2 retries, report error and terminate if still fails.
|
|
71
|
+
- `branch`
|
|
72
|
+
- `worktree`
|
|
105
73
|
|
|
106
74
|
**Execute isolation**:
|
|
107
75
|
|
|
@@ -124,29 +92,16 @@ Present plan summary to user (task count, involved modules), then ask for execut
|
|
|
124
92
|
- Task count ≤ 2 and no cross-module dependencies → Recommend B
|
|
125
93
|
- From hotfix path → Recommend B
|
|
126
94
|
|
|
127
|
-
After user selection,
|
|
95
|
+
After user selection, update `build_mode` field. `build_mode` only allows one of the following values:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
bash "$COMET_STATE" set <name> build_mode <value>
|
|
99
|
+
```
|
|
128
100
|
|
|
129
101
|
- `subagent-driven-development`
|
|
130
102
|
- `executing-plans`
|
|
131
103
|
- `direct` (only for hotfix preset use)
|
|
132
104
|
|
|
133
|
-
Few-shot examples:
|
|
134
|
-
|
|
135
|
-
```yaml
|
|
136
|
-
# User selects robust mode / A
|
|
137
|
-
build_mode: subagent-driven-development
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
```yaml
|
|
141
|
-
# User selects fast mode / B
|
|
142
|
-
build_mode: executing-plans
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
【Write verification】After update completion, must verify:
|
|
146
|
-
cat openspec/changes/<name>/.comet.yaml
|
|
147
|
-
Confirm build_mode line value is "<subagent-driven-development or executing-plans or direct>"
|
|
148
|
-
If not matching, retry write then verify again. Maximum 2 retries, report error and terminate if still fails.
|
|
149
|
-
|
|
150
105
|
Then, **immediately execute:** Use the Skill tool to load the corresponding skill. Skipping this step is prohibited.
|
|
151
106
|
|
|
152
107
|
If the selected Superpowers skill is unavailable, stop the process and prompt to install or enable the corresponding skill. Do not substitute this step with normal conversation.
|
|
@@ -183,18 +138,13 @@ When the initial spec is found incomplete during implementation, handle by scale
|
|
|
183
138
|
- `.comet.yaml` `phase` updated to `verify`
|
|
184
139
|
- **Phase guard**: Run `bash $COMET_GUARD <change-name> build`, allow transition only after all PASS
|
|
185
140
|
|
|
186
|
-
Before exit,
|
|
141
|
+
Before exit, run guard to auto-transition:
|
|
187
142
|
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
verify_result: pending
|
|
143
|
+
```bash
|
|
144
|
+
bash $COMET_GUARD <change-name> build --apply
|
|
191
145
|
```
|
|
192
146
|
|
|
193
|
-
|
|
194
|
-
cat openspec/changes/<name>/.comet.yaml
|
|
195
|
-
Confirm phase line value is "verify"
|
|
196
|
-
Confirm verify_result line value is "pending"
|
|
197
|
-
If any field does not match, retry write then verify again. Maximum 2 retries, report error and terminate if still fails.
|
|
147
|
+
State file is automatically updated to `phase: verify`, `verify_result: pending`.
|
|
198
148
|
|
|
199
149
|
## Automatic Transition
|
|
200
150
|
|
|
@@ -14,30 +14,14 @@ description: "Comet Phase 2: Deep Design. Invoke with /comet-design. Produce Des
|
|
|
14
14
|
|
|
15
15
|
### 0. Entry State Verification (Entry Check)
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
3. `workflow` field value is `"full"`
|
|
23
|
-
4. `design_doc` field is `null` or empty
|
|
24
|
-
5. `openspec/changes/<name>/proposal.md` exists and is non-empty
|
|
25
|
-
6. `openspec/changes/<name>/design.md` exists and is non-empty
|
|
26
|
-
7. `openspec/changes/<name>/tasks.md` exists and is non-empty
|
|
27
|
-
|
|
28
|
-
**Verification method:**
|
|
29
|
-
- `cat openspec/changes/<name>/.comet.yaml` to read all fields
|
|
30
|
-
- Check checklist items one by one
|
|
31
|
-
|
|
32
|
-
**Failure output:**
|
|
33
|
-
```
|
|
34
|
-
[HARD STOP] Entry check failed for comet-design
|
|
35
|
-
Expected: phase=design, design_doc=<empty/null>, workflow=full
|
|
36
|
-
Actual: phase=<actual-value>, design_doc=<actual-value>, workflow=<actual-value>
|
|
37
|
-
Suggestion: Run comet-open first, or check if .comet.yaml was modified out of sequence.
|
|
17
|
+
Execute entry verification:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
COMET_STATE=$(find . -path '*/comet/scripts/comet-state.sh' -type f -print -quit)
|
|
21
|
+
bash "$COMET_STATE" check <name> design
|
|
38
22
|
```
|
|
39
23
|
|
|
40
|
-
Proceed to Step 1
|
|
24
|
+
Proceed to Step 1 after verification passes. The script outputs specific failure reasons when verification fails.
|
|
41
25
|
|
|
42
26
|
### 1a. Read Existing Context
|
|
43
27
|
|
|
@@ -66,18 +50,17 @@ After the skill loads, follow its guidance to produce:
|
|
|
66
50
|
|
|
67
51
|
### 2. Update Comet State
|
|
68
52
|
|
|
69
|
-
|
|
53
|
+
Record design_doc path, then run guard to auto-transition:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# Record design_doc path
|
|
57
|
+
bash "$COMET_STATE" set <name> design_doc docs/superpowers/specs/YYYY-MM-DD-topic-design.md
|
|
70
58
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
design_doc: docs/superpowers/specs/YYYY-MM-DD-topic-design.md
|
|
59
|
+
# Auto-transition to next phase
|
|
60
|
+
bash $COMET_GUARD <change-name> design --apply
|
|
74
61
|
```
|
|
75
62
|
|
|
76
|
-
|
|
77
|
-
cat openspec/changes/<name>/.comet.yaml
|
|
78
|
-
Confirm phase line value is "build"
|
|
79
|
-
Confirm design_doc line value is "docs/superpowers/specs/YYYY-MM-DD-topic-design.md"
|
|
80
|
-
If any field does not match, retry write then verify again. Maximum 2 retries, report error and terminate if still fails.
|
|
63
|
+
State file is updated automatically. No manual editing of other fields required.
|
|
81
64
|
|
|
82
65
|
### 3. Dual Spec Division of Labor
|
|
83
66
|
|
|
@@ -22,25 +22,14 @@ Applicable for bug fixes, hotfixes, small-scale behavior corrections. Does not i
|
|
|
22
22
|
|
|
23
23
|
### 0. Entry State Verification (Entry Check)
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
Execute entry verification:
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
**Verification method:**
|
|
31
|
-
- `test -d openspec/changes/<name>` to check directory
|
|
32
|
-
- If directory exists, `test -f openspec/changes/<name>/.comet.yaml` to check config file
|
|
33
|
-
- If `.comet.yaml` exists, read `phase` to check if it's an incomplete hotfix
|
|
34
|
-
|
|
35
|
-
**Failure output (has conflict):**
|
|
36
|
-
```
|
|
37
|
-
[HARD STOP] Entry check failed for comet-hotfix
|
|
38
|
-
Expected: openspec/changes/<name>/.comet.yaml does not exist (new change)
|
|
39
|
-
Actual: .comet.yaml exists with phase=<actual-value>
|
|
40
|
-
Suggestion: Pick a different change name, or check if an existing hotfix is in progress.
|
|
27
|
+
```bash
|
|
28
|
+
COMET_STATE=$(find . -path '*/comet/scripts/comet-state.sh' -type f -print -quit)
|
|
29
|
+
bash "$COMET_STATE" check <name> open
|
|
41
30
|
```
|
|
42
31
|
|
|
43
|
-
Proceed to process steps
|
|
32
|
+
Proceed to process steps after verification passes. The script outputs specific failure reasons when verification fails.
|
|
44
33
|
|
|
45
34
|
Execution chain: open → build → verify → archive. Hotfix provides default decisions for each phase: streamlined open, direct build, scale-based verification, archive after verification passes.
|
|
46
35
|
|
|
@@ -56,34 +45,11 @@ After the skill loads, follow its guidance to create streamlined artifacts:
|
|
|
56
45
|
- `tasks.md` — fix task list
|
|
57
46
|
- **No delta spec needed** (unless fix changes existing spec acceptance scenarios)
|
|
58
47
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
```yaml
|
|
62
|
-
workflow: hotfix
|
|
63
|
-
phase: build
|
|
64
|
-
design_doc: null
|
|
65
|
-
plan: null
|
|
66
|
-
build_mode: direct
|
|
67
|
-
isolation: branch
|
|
68
|
-
verify_mode: light
|
|
69
|
-
verify_result: pending
|
|
70
|
-
verified_at: null
|
|
71
|
-
archived: false
|
|
72
|
-
```
|
|
48
|
+
Initialize Comet state file:
|
|
73
49
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
Confirm phase line value is "build"
|
|
78
|
-
Confirm design_doc line value is "null"
|
|
79
|
-
Confirm plan line value is "null"
|
|
80
|
-
Confirm build_mode line value is "direct"
|
|
81
|
-
Confirm isolation line value is "branch"
|
|
82
|
-
Confirm verify_mode line value is "light"
|
|
83
|
-
Confirm verify_result line value is "pending"
|
|
84
|
-
Confirm verified_at line value is "null"
|
|
85
|
-
Confirm archived line value is "false"
|
|
86
|
-
If any field does not match, retry write then verify again. Maximum 2 retries, report error and terminate if still fails.
|
|
50
|
+
```bash
|
|
51
|
+
bash "$COMET_STATE" init <name> hotfix
|
|
52
|
+
```
|
|
87
53
|
|
|
88
54
|
### 2. Direct Build (preset build)
|
|
89
55
|
|
|
@@ -13,28 +13,14 @@ description: "Comet Phase 1: Open. Invoke with /comet-open. Explore ideas throug
|
|
|
13
13
|
|
|
14
14
|
### 0. Entry State Verification (Entry Check)
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Execute entry verification:
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
3. `openspec/changes/<name>/proposal.md` exists and is non-empty
|
|
22
|
-
4. `openspec/changes/<name>/design.md` exists and is non-empty
|
|
23
|
-
5. `openspec/changes/<name>/tasks.md` exists and is non-empty
|
|
24
|
-
|
|
25
|
-
**Verification method:**
|
|
26
|
-
- Read the above paths to confirm existence/non-existence
|
|
27
|
-
- If `.comet.yaml` already exists, read its `phase` field: if phase is not empty, output `[HARD STOP]` and prompt that there may already be an active change
|
|
28
|
-
|
|
29
|
-
**Failure output:**
|
|
30
|
-
```
|
|
31
|
-
[HARD STOP] Entry check failed for comet-open
|
|
32
|
-
Expected: .comet.yaml does not exist, proposal.md + design.md + tasks.md exist
|
|
33
|
-
Actual: phase=<actual-value>, design_doc=<actual-value> (or file does not exist)
|
|
34
|
-
Suggestion: Check if another change with the same name is already active.
|
|
18
|
+
```bash
|
|
19
|
+
COMET_STATE=$(find . -path '*/comet/scripts/comet-state.sh' -type f -print -quit)
|
|
20
|
+
bash "$COMET_STATE" check <name> open
|
|
35
21
|
```
|
|
36
22
|
|
|
37
|
-
Proceed to Step 1
|
|
23
|
+
Proceed to Step 1 after verification passes. The script outputs specific failure reasons when verification fails.
|
|
38
24
|
|
|
39
25
|
### 1. Explore Idea
|
|
40
26
|
|
|
@@ -57,53 +43,14 @@ openspec/changes/<name>/
|
|
|
57
43
|
└── tasks.md # Task checklist (checkboxes)
|
|
58
44
|
```
|
|
59
45
|
|
|
60
|
-
###
|
|
61
|
-
|
|
62
|
-
**Trigger condition:** proposal.md mentions modifying an existing capability, or user explicitly requests incremental modification.
|
|
63
|
-
|
|
64
|
-
**Applicable scenario:** Incremental modification to archived functionality (not a brand-new capability).
|
|
46
|
+
### 3. Initialize Comet State
|
|
65
47
|
|
|
66
|
-
|
|
67
|
-
1. Check if `openspec/specs/<capability>/spec.md` main spec already exists
|
|
68
|
-
2. If it exists, copy the main spec as a delta spec baseline:
|
|
48
|
+
Initialize Comet state file:
|
|
69
49
|
|
|
70
50
|
```bash
|
|
71
|
-
|
|
72
|
-
cp openspec/specs/<capability>/spec.md openspec/changes/<name>/specs/<capability>/spec.md
|
|
51
|
+
bash "$COMET_STATE" init <name> full
|
|
73
52
|
```
|
|
74
53
|
|
|
75
|
-
3. In the copied delta spec, organize changes in delta format (`## ADDED`, `## MODIFIED`, `## REMOVED`)
|
|
76
|
-
4. Note in proposal.md: `based on existing capability: <capability-name>`
|
|
77
|
-
|
|
78
|
-
### 3. Initialize Comet State
|
|
79
|
-
|
|
80
|
-
Create an independent `.comet.yaml` file under `openspec/changes/<name>/`:
|
|
81
|
-
|
|
82
|
-
```yaml
|
|
83
|
-
workflow: full
|
|
84
|
-
phase: design
|
|
85
|
-
design_doc: null
|
|
86
|
-
plan: null
|
|
87
|
-
build_mode: null
|
|
88
|
-
verify_mode: null
|
|
89
|
-
verify_result: pending
|
|
90
|
-
verified_at: null
|
|
91
|
-
archived: false
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
【Write verification】After creation, must verify:
|
|
95
|
-
cat openspec/changes/<name>/.comet.yaml
|
|
96
|
-
Confirm workflow line value is "full"
|
|
97
|
-
Confirm phase line value is "design"
|
|
98
|
-
Confirm design_doc line value is "null"
|
|
99
|
-
Confirm plan line value is "null"
|
|
100
|
-
Confirm build_mode line value is "null"
|
|
101
|
-
Confirm verify_mode line value is "null"
|
|
102
|
-
Confirm verify_result line value is "pending"
|
|
103
|
-
Confirm verified_at line value is "null"
|
|
104
|
-
Confirm archived line value is "false"
|
|
105
|
-
If any field does not match, retry write then verify again. Maximum 2 retries, report error and terminate if still fails.
|
|
106
|
-
|
|
107
54
|
### 4. Content Completeness Check
|
|
108
55
|
|
|
109
56
|
Confirm the three documents have complete content:
|
|
@@ -23,25 +23,14 @@ Applicable for small-scale non-bug changes, such as copy adjustments, configurat
|
|
|
23
23
|
|
|
24
24
|
### 0. Entry State Verification (Entry Check)
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
Execute entry verification:
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
**Verification method:**
|
|
32
|
-
- `test -d openspec/changes/<name>` to check directory
|
|
33
|
-
- If directory exists, `test -f openspec/changes/<name>/.comet.yaml` to check config file
|
|
34
|
-
- If `.comet.yaml` exists, read `phase` to check if it's an incomplete tweak
|
|
35
|
-
|
|
36
|
-
**Failure output (has conflict):**
|
|
37
|
-
```
|
|
38
|
-
[HARD STOP] Entry check failed for comet-tweak
|
|
39
|
-
Expected: openspec/changes/<name>/.comet.yaml does not exist (new change)
|
|
40
|
-
Actual: .comet.yaml exists with phase=<actual-value>
|
|
41
|
-
Suggestion: Pick a different change name, or check if an existing tweak is in progress.
|
|
28
|
+
```bash
|
|
29
|
+
COMET_STATE=$(find . -path '*/comet/scripts/comet-state.sh' -type f -print -quit)
|
|
30
|
+
bash "$COMET_STATE" check <name> open
|
|
42
31
|
```
|
|
43
32
|
|
|
44
|
-
Proceed to process steps
|
|
33
|
+
Proceed to process steps after verification passes. The script outputs specific failure reasons when verification fails.
|
|
45
34
|
|
|
46
35
|
Execution chain: open → lightweight build → light verify → archive. Tweak provides default decisions for each phase: streamlined open, lightweight build, lightweight verification, archive after verification passes.
|
|
47
36
|
|
|
@@ -57,34 +46,11 @@ After the skill loads, follow its guidance to create streamlined artifacts:
|
|
|
57
46
|
- `tasks.md` — not exceeding 3 tasks
|
|
58
47
|
- **No delta spec needed** (unless change changes existing spec acceptance scenarios; once delta spec needed, upgrade to full `/comet`)
|
|
59
48
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
```yaml
|
|
63
|
-
workflow: tweak
|
|
64
|
-
phase: build
|
|
65
|
-
design_doc: null
|
|
66
|
-
plan: null
|
|
67
|
-
build_mode: direct
|
|
68
|
-
isolation: branch
|
|
69
|
-
verify_mode: light
|
|
70
|
-
verify_result: pending
|
|
71
|
-
verified_at: null
|
|
72
|
-
archived: false
|
|
73
|
-
```
|
|
49
|
+
Initialize Comet state file:
|
|
74
50
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
Confirm phase line value is "build"
|
|
79
|
-
Confirm design_doc line value is "null"
|
|
80
|
-
Confirm plan line value is "null"
|
|
81
|
-
Confirm build_mode line value is "direct"
|
|
82
|
-
Confirm isolation line value is "branch"
|
|
83
|
-
Confirm verify_mode line value is "light"
|
|
84
|
-
Confirm verify_result line value is "pending"
|
|
85
|
-
Confirm verified_at line value is "null"
|
|
86
|
-
Confirm archived line value is "false"
|
|
87
|
-
If any field does not match, retry write then verify again. Maximum 2 retries, report error and terminate if still fails.
|
|
51
|
+
```bash
|
|
52
|
+
bash "$COMET_STATE" init <name> tweak
|
|
53
|
+
```
|
|
88
54
|
|
|
89
55
|
### 2. Lightweight Build (preset build)
|
|
90
56
|
|
|
@@ -14,65 +14,24 @@ description: "Comet Phase 4: Verify and Complete. Invoke with /comet-verify. Ver
|
|
|
14
14
|
|
|
15
15
|
### 0. Entry State Verification (Entry Check)
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Execute entry verification:
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
3. `verify_result` field is `"pending"` or null (not yet verified)
|
|
23
|
-
|
|
24
|
-
**Verification method:**
|
|
25
|
-
- `cat openspec/changes/<name>/.comet.yaml` to read all fields
|
|
26
|
-
- If `verify_result` is already `"pass"`, this change has already been verified
|
|
27
|
-
|
|
28
|
-
**Failure output:**
|
|
29
|
-
```
|
|
30
|
-
[HARD STOP] Entry check failed for comet-verify
|
|
31
|
-
Expected: phase=verify, verify_result=pending|null
|
|
32
|
-
Actual: phase=<actual-value>, verify_result=<actual-value>
|
|
33
|
-
Suggestion: Run comet-build first, or this change was already verified.
|
|
19
|
+
```bash
|
|
20
|
+
COMET_STATE=$(find . -path '*/comet/scripts/comet-state.sh' -type f -print -quit)
|
|
21
|
+
bash "$COMET_STATE" check <name> verify
|
|
34
22
|
```
|
|
35
23
|
|
|
36
|
-
Proceed to Step 1
|
|
24
|
+
Proceed to Step 1 after verification passes. The script outputs specific failure reasons when verification fails.
|
|
37
25
|
|
|
38
26
|
### 1. Change Scale Assessment
|
|
39
27
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
| Metric | Small (lightweight verification) | Large (full verification) |
|
|
43
|
-
|------|-------------------------------|--------------------------|
|
|
44
|
-
| tasks.md task count | ≤ 3 | > 3 |
|
|
45
|
-
| Changed file count (git diff --stat) | ≤ 5 | > 5 |
|
|
46
|
-
| Has delta spec | No | Yes |
|
|
47
|
-
| New capability added | No | Yes |
|
|
48
|
-
|
|
49
|
-
**Decision rule**: Any metric hitting "large" → full verification. All hitting "small" → lightweight verification.
|
|
50
|
-
|
|
51
|
-
After determination, record actual verification mode in `openspec/changes/<name>/.comet.yaml`. `verify_mode` only allows one of the following values:
|
|
52
|
-
|
|
53
|
-
- `light`
|
|
54
|
-
- `full`
|
|
55
|
-
|
|
56
|
-
Few-shot examples:
|
|
57
|
-
|
|
58
|
-
```yaml
|
|
59
|
-
# All metrics hit "small"
|
|
60
|
-
phase: verify
|
|
61
|
-
verify_mode: light
|
|
62
|
-
verify_result: pending
|
|
63
|
-
```
|
|
28
|
+
Execute scale assessment:
|
|
64
29
|
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
phase: verify
|
|
68
|
-
verify_mode: full
|
|
69
|
-
verify_result: pending
|
|
30
|
+
```bash
|
|
31
|
+
bash "$COMET_STATE" scale <name>
|
|
70
32
|
```
|
|
71
33
|
|
|
72
|
-
|
|
73
|
-
cat openspec/changes/<name>/.comet.yaml
|
|
74
|
-
Confirm verify_mode line value is "<light or full>"
|
|
75
|
-
If not matching, retry write then verify again. Maximum 2 retries, report error and terminate if still fails.
|
|
34
|
+
Script automatically counts tasks, delta specs, and changed files to determine whether to use light or full verification mode, and sets the verify_mode field.
|
|
76
35
|
|
|
77
36
|
### 2a. Lightweight Verification (Small Changes)
|
|
78
37
|
|
|
@@ -142,20 +101,13 @@ After the skill loads, follow its guidance to complete. Branch handling options:
|
|
|
142
101
|
- `.comet.yaml` `verify_result` recorded as `pass`
|
|
143
102
|
- **Phase guard**: Run `bash $COMET_GUARD <change-name> verify`, allow transition only after all PASS
|
|
144
103
|
|
|
145
|
-
Before exit,
|
|
104
|
+
Before exit, run guard to auto-transition:
|
|
146
105
|
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
verify_result: pass
|
|
150
|
-
verified_at: YYYY-MM-DD
|
|
106
|
+
```bash
|
|
107
|
+
bash $COMET_GUARD <change-name> verify --apply
|
|
151
108
|
```
|
|
152
109
|
|
|
153
|
-
|
|
154
|
-
cat openspec/changes/<name>/.comet.yaml
|
|
155
|
-
Confirm phase line value is "archive"
|
|
156
|
-
Confirm verify_result line value is "pass"
|
|
157
|
-
Confirm verified_at line value is non-empty (format YYYY-MM-DD)
|
|
158
|
-
If any field does not match, retry write then verify again. Maximum 2 retries, report error and terminate if still fails.
|
|
110
|
+
State file is automatically updated to `phase: archive`, `verify_result: pass`, `verified_at: YYYY-MM-DD`.
|
|
159
111
|
|
|
160
112
|
## Automatic Transition
|
|
161
113
|
|
|
@@ -151,7 +151,7 @@ archived: false
|
|
|
151
151
|
|------|---------|
|
|
152
152
|
| `openspec list --json` 失败 | 检查 openspec 是否已安装,提示用户运行 `openspec init` |
|
|
153
153
|
| 子 skill 不可用(如 `superpowers:brainstorming`) | 停止流程,提示安装或启用对应 skill |
|
|
154
|
-
| `.comet.yaml` 格式异常或缺失 | 以文件状态为准(tasks.md、docs/superpowers
|
|
154
|
+
| `.comet.yaml` 格式异常或缺失 | 以文件状态为准(tasks.md、docs/superpowers/),使用 `bash $COMET_STATE set <name> <field> <value>` 修正元数据后继续 |
|
|
155
155
|
| Maven 编译/测试失败 | 返回 build 阶段修复,不进入 verify |
|
|
156
156
|
| change 目录结构不完整 | 按 `comet-open` 的产物要求补齐缺失文件 |
|
|
157
157
|
|
|
@@ -161,7 +161,7 @@ archived: false
|
|
|
161
161
|
|
|
162
162
|
### 脚本定位
|
|
163
163
|
|
|
164
|
-
Comet 阶段守卫脚本 `comet-guard.sh` 随 skill 包分发,位于 `comet/scripts/` 目录。
|
|
164
|
+
Comet 阶段守卫脚本 `comet-guard.sh` 和归档脚本 `comet-archive.sh` 随 skill 包分发,位于 `comet/scripts/` 目录。
|
|
165
165
|
**不硬编码平台路径**,运行时通过以下命令自定位:
|
|
166
166
|
|
|
167
167
|
```bash
|
|
@@ -169,6 +169,25 @@ COMET_GUARD=$(find . -path '*/comet/scripts/comet-guard.sh' -type f -print -quit
|
|
|
169
169
|
bash "$COMET_GUARD" <change-name> <phase>
|
|
170
170
|
```
|
|
171
171
|
|
|
172
|
+
**状态管理脚本**:`comet-state.sh` 提供 init/set/get/check/scale 五个子命令,统一管理状态文件字段:
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
COMET_STATE=$(find . -path '*/comet/scripts/comet-state.sh' -type f -print -quit)
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
**自动状态更新**:guard 支持 `--apply` 参数,验证通过后自动更新 `.comet.yaml` 状态字段:
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
bash "$COMET_GUARD" <change-name> <phase> --apply
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
**归档脚本**:一键完成归档全部步骤:
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
COMET_ARCHIVE=$(find . -path '*/comet/scripts/comet-archive.sh' -type f -print -quit)
|
|
188
|
+
bash "$COMET_ARCHIVE" <change-name>
|
|
189
|
+
```
|
|
190
|
+
|
|
172
191
|
后续文档中 `bash $COMET_GUARD <change> <phase>` 均指此命令。加载 comet 后,agent 应在 shell 环境中缓存 `COMET_GUARD` 路径,避免重复 `find`。
|
|
173
192
|
|
|
174
193
|
### 文件结构
|
|
@@ -185,7 +204,7 @@ openspec/ # OpenSpec — WHAT
|
|
|
185
204
|
│ │ ├── specs/<capability>/spec.md # Delta 能力规格
|
|
186
205
|
│ │ └── tasks.md # 任务清单
|
|
187
206
|
│ └── archive/YYYY-MM-DD-<name>/ # 已归档
|
|
188
|
-
└── specs/<capability>/spec.md # 主 specs(归档时从 delta
|
|
207
|
+
└── specs/<capability>/spec.md # 主 specs(归档时从 delta 覆盖)
|
|
189
208
|
|
|
190
209
|
docs/superpowers/ # Superpowers — HOW
|
|
191
210
|
├── specs/YYYY-MM-DD-<topic>-design.md # 设计文档(技术 RFC,归档时标注状态)
|
|
@@ -202,5 +221,5 @@ docs/superpowers/ # Superpowers — HOW
|
|
|
202
221
|
6. **增量更新分级** — 小编辑、中重 brainstorming、大新 change
|
|
203
222
|
7. **Plan 必须关联 change** — 文件头包含 `change:` 和 `design-doc:` 元数据
|
|
204
223
|
8. **归档闭环** — design doc 和 plan 必须标注 `archived-with` 状态
|
|
205
|
-
9. **增量修改已有功能** —
|
|
224
|
+
9. **增量修改已有功能** — 直接 open 新 change,brainstorming 会读取已有 main spec 作为上下文
|
|
206
225
|
10. **Preset 有上限** — hotfix/tweak 满足升级条件时及时切换到完整流程
|