@rpamis/comet 0.3.6 → 0.3.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 +575 -443
- package/assets/manifest.json +41 -24
- package/assets/skills/comet/SKILL.md +282 -301
- package/assets/skills/comet/reference/auto-transition.md +27 -0
- package/assets/skills/comet/reference/comet-yaml-fields.md +68 -0
- package/assets/skills/comet/reference/context-recovery.md +35 -0
- package/assets/skills/comet/reference/debug-gate.md +17 -0
- package/assets/skills/comet/reference/decision-point.md +20 -0
- package/assets/skills/comet/reference/dirty-worktree.md +1 -0
- package/assets/skills/comet/reference/file-structure.md +28 -0
- package/assets/skills/comet/reference/subagent-dispatch.md +113 -0
- package/assets/skills/comet/rules/comet-phase-guard.en.md +99 -0
- package/assets/skills/comet/rules/comet-phase-guard.md +99 -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 +362 -25
- package/assets/skills/comet/scripts/comet-yaml-validate.sh +24 -1
- package/assets/skills/comet-archive/SKILL.md +100 -73
- package/assets/skills/comet-build/SKILL.md +304 -221
- package/assets/skills/comet-design/SKILL.md +263 -166
- package/assets/skills/comet-hotfix/SKILL.md +204 -169
- package/assets/skills/comet-open/SKILL.md +203 -113
- package/assets/skills/comet-tweak/SKILL.md +180 -154
- package/assets/skills/comet-verify/SKILL.md +234 -201
- package/assets/skills-zh/comet/SKILL.md +269 -301
- package/assets/skills-zh/comet/reference/auto-transition.md +27 -0
- package/assets/skills-zh/comet/reference/comet-yaml-fields.md +68 -0
- package/assets/skills-zh/comet/reference/context-recovery.md +35 -0
- package/assets/skills-zh/comet/reference/debug-gate.md +17 -0
- package/assets/skills-zh/comet/reference/decision-point.md +20 -0
- package/assets/skills-zh/comet/reference/dirty-worktree.md +2 -1
- package/assets/skills-zh/comet/reference/file-structure.md +28 -0
- package/assets/skills-zh/comet/reference/subagent-dispatch.md +113 -0
- package/assets/skills-zh/comet-archive/SKILL.md +100 -73
- package/assets/skills-zh/comet-build/SKILL.md +304 -221
- package/assets/skills-zh/comet-design/SKILL.md +264 -166
- package/assets/skills-zh/comet-hotfix/SKILL.md +200 -169
- package/assets/skills-zh/comet-open/SKILL.md +203 -113
- package/assets/skills-zh/comet-tweak/SKILL.md +176 -154
- package/assets/skills-zh/comet-verify/SKILL.md +232 -201
- package/dist/cli/index.js +19 -0
- package/dist/cli/index.js.map +1 -1
- 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/uninstall.d.ts +9 -0
- package/dist/commands/uninstall.d.ts.map +1 -0
- package/dist/commands/uninstall.js +113 -0
- package/dist/commands/uninstall.js.map +1 -0
- package/dist/commands/update.d.ts +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +120 -32
- package/dist/commands/update.js.map +1 -1
- package/dist/core/codegraph.d.ts +4 -0
- package/dist/core/codegraph.d.ts.map +1 -0
- package/dist/core/codegraph.js +63 -0
- package/dist/core/codegraph.js.map +1 -0
- package/dist/core/detect.d.ts +8 -1
- package/dist/core/detect.d.ts.map +1 -1
- package/dist/core/detect.js +41 -2
- package/dist/core/detect.js.map +1 -1
- package/dist/core/openspec.d.ts +1 -1
- package/dist/core/openspec.d.ts.map +1 -1
- package/dist/core/openspec.js +40 -17
- package/dist/core/openspec.js.map +1 -1
- package/dist/core/platforms.d.ts +10 -0
- package/dist/core/platforms.d.ts.map +1 -1
- package/dist/core/platforms.js +177 -16
- package/dist/core/platforms.js.map +1 -1
- package/dist/core/skills.d.ts +36 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +451 -15
- package/dist/core/skills.js.map +1 -1
- package/dist/core/superpowers.d.ts.map +1 -1
- package/dist/core/superpowers.js +1 -0
- package/dist/core/superpowers.js.map +1 -1
- package/dist/core/uninstall.d.ts +28 -0
- package/dist/core/uninstall.d.ts.map +1 -0
- package/dist/core/uninstall.js +421 -0
- package/dist/core/uninstall.js.map +1 -0
- package/dist/core/version.d.ts +31 -0
- package/dist/core/version.d.ts.map +1 -0
- package/dist/core/version.js +111 -0
- package/dist/core/version.js.map +1 -0
- package/dist/utils/file-system.d.ts +23 -0
- package/dist/utils/file-system.d.ts.map +1 -1
- package/dist/utils/file-system.js +100 -5
- package/dist/utils/file-system.js.map +1 -1
- package/package.json +69 -62
|
@@ -1,201 +1,234 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: comet-verify
|
|
3
|
-
description: "Comet Phase 4: Verify and Close. Invoke with /comet-verify. Verify implementation matches design, handle development branch."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Comet Phase 4: Verify and Close (Verify)
|
|
7
|
-
|
|
8
|
-
## Prerequisites
|
|
9
|
-
|
|
10
|
-
- Code committed (Phase 3 complete)
|
|
11
|
-
- All tasks.md tasks completed
|
|
12
|
-
|
|
13
|
-
## Steps
|
|
14
|
-
|
|
15
|
-
###
|
|
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
|
-
|
|
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
|
-
```bash
|
|
100
|
-
|
|
101
|
-
"$COMET_BASH" "$
|
|
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
|
-
"$COMET_BASH" "$COMET_STATE"
|
|
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
|
-
"$COMET_BASH" "$COMET_STATE"
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
1
|
+
---
|
|
2
|
+
name: comet-verify
|
|
3
|
+
description: "Comet Phase 4: Verify and Close. Invoke with /comet-verify. Verify implementation matches design, handle development branch."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Comet Phase 4: Verify and Close (Verify)
|
|
7
|
+
|
|
8
|
+
## Prerequisites
|
|
9
|
+
|
|
10
|
+
- Code committed (Phase 3 complete)
|
|
11
|
+
- All tasks.md tasks completed
|
|
12
|
+
|
|
13
|
+
## Steps
|
|
14
|
+
|
|
15
|
+
### 0a. Output Language Constraint
|
|
16
|
+
|
|
17
|
+
Verification reports and branch-handling notes must use the language of the user request that triggered this workflow.
|
|
18
|
+
|
|
19
|
+
### 0b. Entry State Verification (Entry Check)
|
|
20
|
+
|
|
21
|
+
Execute entry verification:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
COMET_ENV="${COMET_ENV:-$(find . "$HOME"/.*/skills "$HOME/.config" "$HOME/.gemini" -path '*/comet/scripts/comet-env.sh' -type f -print -quit 2>/dev/null)}"
|
|
25
|
+
if [ -z "$COMET_ENV" ]; then
|
|
26
|
+
echo "ERROR: comet-env.sh not found. Ensure the comet skill is installed." >&2
|
|
27
|
+
return 1
|
|
28
|
+
fi
|
|
29
|
+
. "$COMET_ENV"
|
|
30
|
+
"$COMET_BASH" "$COMET_STATE" check <change-name> verify
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Proceed to Step 1 after verification passes. The script outputs specific failure reasons when verification fails.
|
|
34
|
+
|
|
35
|
+
**Idempotency**: All verify phase checks can be safely re-executed. If `verify_result` is already `pass` and `branch_status` is `handled`, verification is complete — execute guard to transition. If `verify_result` is `pending`, start verification from the beginning.
|
|
36
|
+
|
|
37
|
+
### 1. Scale Assessment
|
|
38
|
+
|
|
39
|
+
Execute scale assessment:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
"$COMET_BASH" "$COMET_STATE" scale <change-name>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The script automatically counts tasks, delta spec count, changed file count, determines light or full verification mode, and sets the verify_mode field. Decision rule (any condition triggers full): tasks > 3, delta spec capabilities > 1, changed files > 4.
|
|
46
|
+
|
|
47
|
+
Before verification begins, handle uncommitted changes through `comet/reference/dirty-worktree.md` protocol. Verify phase special handling:
|
|
48
|
+
|
|
49
|
+
1. If dirty diff belongs to current change and involves implementation, tests, tasks, delta spec, or design doc changes, do not fix or commit directly in verify phase; report failures and enter Step 1b verification failure decision blocking point
|
|
50
|
+
2. If dirty diff is only verify phase artifacts (e.g., verification report draft, branch handling records), may continue and record state in verify phase
|
|
51
|
+
3. If dirty diff shows implementation but tasks.md not checked, treat as build state lag; report failures and enter Step 1b, let user decide to roll back for fix or accept deviation
|
|
52
|
+
|
|
53
|
+
Only after user chooses fix, allow rollback to build phase:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# Execute only after user confirms fix
|
|
57
|
+
"$COMET_BASH" "$COMET_STATE" transition <change-name> verify-fail
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Note: When verify-fail rolls back to build, `branch_status` is not reset. If branch handling was already completed during the first verify attempt, skip the branch handling step on re-verify and keep the existing `branch_status: handled`.
|
|
61
|
+
|
|
62
|
+
Note: If every task in build phase was committed, the script's file count based on working tree diff may underestimate change scale. In this case, must read plan file header `base-ref` and verify with commit range:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
PLAN=$("$COMET_BASH" "$COMET_STATE" get <change-name> plan)
|
|
66
|
+
BASE_REF=$(grep '^base-ref:' "$PLAN" 2>/dev/null | head -1 | sed 's/^base-ref: *//')
|
|
67
|
+
git diff --stat "$BASE_REF"...HEAD
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
If commit range shows changes exceed lightweight threshold (> 4 files, cross-module coordination, or delta spec spans more than 1 capability), manually set to full verification:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
"$COMET_BASH" "$COMET_STATE" set <change-name> verify_mode full
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**Override mechanism**: If the agent or user believes the automated assessment is inappropriate, override at any time with `"$COMET_BASH" "$COMET_STATE" set <change-name> verify_mode <light|full>`.
|
|
77
|
+
|
|
78
|
+
### 1b. Verification Failure Decision (Blocking Point)
|
|
79
|
+
|
|
80
|
+
When verification does not pass, **must follow the `comet/reference/decision-point.md` protocol to pause and wait for the user to decide whether to fix or accept the deviation**. Must not automatically run `"$COMET_BASH" "$COMET_STATE" transition <change-name> verify-fail`, nor automatically invoke `/comet-build`.
|
|
81
|
+
|
|
82
|
+
When pausing, must list:
|
|
83
|
+
- Failed items
|
|
84
|
+
- Whether CRITICAL or IMPORTANT (build failure, test failure, security issues, core acceptance scenario failure, lightweight code review correctness/security/edge-case issue)
|
|
85
|
+
- Recommended handling approach
|
|
86
|
+
|
|
87
|
+
**Uncertainty principle**: When severity is unclear, downgrade (SUGGESTION > WARNING > CRITICAL). Only use CRITICAL for build failures, test failures, and security issues; ambiguous or uncertain issues should be WARNING or SUGGESTION.
|
|
88
|
+
|
|
89
|
+
After user selection, continue as follows:
|
|
90
|
+
- **Fix all**: Run `"$COMET_BASH" "$COMET_STATE" transition <change-name> verify-fail`, then invoke `/comet-build` to fix
|
|
91
|
+
- **Handle item by item**: CRITICAL or IMPORTANT failures must be fixed; WARNING/SUGGESTION failures may choose to accept deviation, but must record acceptance reason and impact scope in verification report. If any CRITICAL or IMPORTANT failure exists, skipping fix to accept all is not allowed
|
|
92
|
+
|
|
93
|
+
**Retry limit**: After 3 consecutive verify-fail cycles, on the 4th failure the agent must not automatically choose to continue fixing; **must use the current platform's available user input/confirmation mechanism to pause** with only two options: "Accept all deviations and record" or "Continue fixing", for the user to explicitly decide.
|
|
94
|
+
|
|
95
|
+
### 2. Artifact Context Loading (Hash On-Demand Read)
|
|
96
|
+
|
|
97
|
+
When verification needs to read OpenSpec artifacts, first check whether they have changed since the design phase:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
RECORDED_HASH=$("$COMET_BASH" "$COMET_STATE" get <change-name> handoff_hash)
|
|
101
|
+
CURRENT_HASH=$("$COMET_BASH" "$COMET_HANDOFF" <change-name> --hash-only 2>/dev/null || echo "")
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
- If `RECORDED_HASH` = `CURRENT_HASH` and both are non-empty and neither is `null`: OpenSpec artifacts are unchanged. **tasks.md does not need to be re-read in full** (use `grep -c '\- \[ \]' tasks.md` to confirm completion count). proposal.md, design.md, and delta specs must still be read for comparison checks.
|
|
105
|
+
- If `RECORDED_HASH` is empty, is `null`, or differs from `CURRENT_HASH`: artifacts have changed or hash was never recorded. Read all required files in full normally.
|
|
106
|
+
|
|
107
|
+
This optimization only skips re-reading tasks.md in full. proposal.md and design.md contain the full context needed for verification checks and must not be skipped due to hash match.
|
|
108
|
+
|
|
109
|
+
**Immediately execute:** Use the Skill tool to load the Superpowers `verification-before-completion` skill. Skipping this step is prohibited.
|
|
110
|
+
|
|
111
|
+
After the skill loads, follow the `verify_mode` branch:
|
|
112
|
+
|
|
113
|
+
### 2a. Lightweight Verification (Small Changes)
|
|
114
|
+
|
|
115
|
+
Run these 6 checks:
|
|
116
|
+
|
|
117
|
+
1. All tasks.md tasks completed `[x]`
|
|
118
|
+
2. Changed files match tasks.md descriptions (`git diff --stat` / `git diff --cached --stat` / `git diff --stat <base-ref>...HEAD` compared against tasks content)
|
|
119
|
+
3. Build passes (run project-specific build command, e.g., `npm run build`, `mvn compile`, `cargo build`, etc.)
|
|
120
|
+
4. Related tests pass
|
|
121
|
+
5. No obvious security issues (no hardcoded keys, no new unsafe operations)
|
|
122
|
+
6. Lightweight code review passes: use the Skill tool to load the Superpowers `requesting-code-review` skill and request a lightweight review that checks only correctness, security, and edge cases
|
|
123
|
+
|
|
124
|
+
The lightweight code review input should be limited to this change's diff, tasks.md, and necessary test results; the review scope covers implementation correctness, security risk, and edge cases only, and does not perform spec coverage, Design Doc consistency, or drift checks. If the review finds CRITICAL or IMPORTANT issues, treat verification as failed and enter Step 1b.
|
|
125
|
+
|
|
126
|
+
**Pass criteria**: All 6 items OK, no CRITICAL or IMPORTANT issues.
|
|
127
|
+
|
|
128
|
+
**When not passing**: Report failures, enter Step 1b verification failure decision blocking point. Only after user confirms fix, execute the following command to record failure and roll back to build phase, then invoke `/comet-build` to fix:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
# Execute only after user confirms fix
|
|
132
|
+
"$COMET_BASH" "$COMET_STATE" transition <change-name> verify-fail
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**Report format**: Brief table listing 6 check results + PASS/FAIL.
|
|
136
|
+
|
|
137
|
+
**Skipped items** (not checked in lightweight verification):
|
|
138
|
+
- spec scenario coverage
|
|
139
|
+
- design doc consistency deep comparison
|
|
140
|
+
- code pattern consistency suggestions that do not affect correctness, security, or edge cases
|
|
141
|
+
- delta spec and design doc drift detection
|
|
142
|
+
|
|
143
|
+
### 2b. Full Verification (Large Changes)
|
|
144
|
+
|
|
145
|
+
When scale assessment result is "large":
|
|
146
|
+
|
|
147
|
+
**Immediately execute:** Use the Skill tool to load the `openspec-verify-change` skill. Skipping this step is prohibited.
|
|
148
|
+
|
|
149
|
+
After the skill loads, follow its guidance to verify. Check items:
|
|
150
|
+
1. All tasks.md tasks completed (`[x]`)
|
|
151
|
+
2. Implementation matches `openspec/changes/<name>/design.md` high-level design decisions
|
|
152
|
+
3. Implementation matches Design Doc (technical design documents under `docs/superpowers/specs/`)
|
|
153
|
+
4. All capability spec scenarios pass
|
|
154
|
+
5. proposal.md goals are satisfied
|
|
155
|
+
6. No contradictions between delta spec and design doc (if Build phase had incremental spec modifications, check if design doc has corresponding records)
|
|
156
|
+
7. Associated design documents under `docs/superpowers/specs/` are locatable (file exists and is related to current change)
|
|
157
|
+
|
|
158
|
+
When verification does not pass: report missing items, enter Step 1b verification failure decision blocking point. Only after user confirms fix, execute the following command to record failure and roll back to build phase, then invoke `/comet-build` to supplement:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
# Execute only after user confirms fix
|
|
162
|
+
"$COMET_BASH" "$COMET_STATE" transition <change-name> verify-fail
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**Spec Drift Handling** (user decision point):
|
|
166
|
+
- If check item 6 finds contradictions (delta spec has content but design doc does not reflect it), **must use the current platform's available user input/confirmation mechanism as a single-select question to pause and wait for the user to choose the handling method**; must not select automatically. Options:
|
|
167
|
+
- Option A: Append "Implementation Divergence" section to design doc recording deviation reason. Option A is a verify phase allowed artifact; after writing, must not re-trigger Step 1b dirty-worktree decision due to that design doc change
|
|
168
|
+
- Option B: After user selects B, run `"$COMET_BASH" "$COMET_STATE" transition <change-name> verify-fail`, then invoke `/comet-build`; `/comet-build`'s Spec Incremental Update rules will load the Superpowers `brainstorming` skill to update Design Doc + delta spec
|
|
169
|
+
- Option C: Confirm deviation is acceptable, continue verification (design doc will be marked as `superseded-by-main-spec` during archiving)
|
|
170
|
+
|
|
171
|
+
### 3. Finishing (Superpowers)
|
|
172
|
+
|
|
173
|
+
**Immediately execute:** Use the Skill tool to load the Superpowers `finishing-a-development-branch` skill. Skipping this step is prohibited.
|
|
174
|
+
|
|
175
|
+
If the Superpowers `finishing-a-development-branch` skill is unavailable, stop the process and prompt to install or enable Superpowers skills. Do not substitute this step with normal conversation.
|
|
176
|
+
|
|
177
|
+
After the skill loads, follow its guidance to finish. Branch handling options:
|
|
178
|
+
1. Merge to main branch locally
|
|
179
|
+
2. Push and create PR
|
|
180
|
+
3. Keep branch (handle later)
|
|
181
|
+
4. Discard work
|
|
182
|
+
|
|
183
|
+
This is a user decision point. **Must follow the `comet/reference/decision-point.md` protocol to pause and wait for the user to choose branch handling method**. Must not select based on recommendations, defaults, or current branch status. Only after the user completes selection and the corresponding operation finishes, may `branch_status: handled` be written.
|
|
184
|
+
|
|
185
|
+
**Confirmation items**:
|
|
186
|
+
- All tests pass
|
|
187
|
+
- No hardcoded keys or security issues
|
|
188
|
+
|
|
189
|
+
### 4. Record Verification Evidence
|
|
190
|
+
|
|
191
|
+
Verification report must be saved to disk and recorded in `.comet.yaml`; after branch handling completes, state fields must also be written. Do not manually set `verify_result: pass`; use guard for auto-transition.
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
mkdir -p docs/superpowers/reports
|
|
195
|
+
# Write verification conclusions to report file, e.g.:
|
|
196
|
+
# docs/superpowers/reports/YYYY-MM-DD-<change-name>-verify.md
|
|
197
|
+
|
|
198
|
+
"$COMET_BASH" "$COMET_STATE" set <change-name> verification_report docs/superpowers/reports/YYYY-MM-DD-<change-name>-verify.md
|
|
199
|
+
"$COMET_BASH" "$COMET_STATE" set <change-name> branch_status handled
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
## Exit Conditions
|
|
203
|
+
|
|
204
|
+
- Verification report passed
|
|
205
|
+
- Branch handled
|
|
206
|
+
- `verification_report` in `.comet.yaml` points to an existing verification report file
|
|
207
|
+
- `branch_status: handled` in `.comet.yaml`
|
|
208
|
+
- **Phase guard**: Run `"$COMET_BASH" "$COMET_GUARD" <change-name> verify --apply`; after all PASS, auto-transitions to `phase: archive` through `comet-state transition verify-pass`
|
|
209
|
+
|
|
210
|
+
After both verification and branch handling are complete, run guard for auto-transition:
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
"$COMET_BASH" "$COMET_GUARD" <change-name> verify --apply
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
State file auto-updates to `phase: archive`, `verify_result: pass`, `verified_at: YYYY-MM-DD`.
|
|
217
|
+
|
|
218
|
+
## Automatic Handoff to Next Phase
|
|
219
|
+
|
|
220
|
+
Follow `comet/reference/auto-transition.md`. Key command:
|
|
221
|
+
|
|
222
|
+
```bash
|
|
223
|
+
"$COMET_BASH" "$COMET_STATE" next <change-name>
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
- `NEXT: auto` → invoke the skill pointed to by `SKILL` to enter the next phase
|
|
227
|
+
- `NEXT: manual` → do not invoke the next skill; prompt user to run `/<SKILL>` manually
|
|
228
|
+
- `NEXT: done` → workflow is complete, no further action needed
|
|
229
|
+
|
|
230
|
+
Note: after `comet-archive` starts, it must first execute the final archive confirmation blocking point and wait for the user to explicitly choose "Confirm archive" before running the archive script. Must not automatically archive just because verification passed.
|
|
231
|
+
|
|
232
|
+
## Context Compression Recovery
|
|
233
|
+
|
|
234
|
+
Follow `comet/reference/context-recovery.md` with phase set to `verify`.
|