@su-record/vibe 2.6.20 → 2.6.22
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/commands/vibe.spec.review.md +71 -32
- package/package.json +1 -1
|
@@ -13,8 +13,8 @@ Review and enhance SPEC with GPT/Gemini cross-validation.
|
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
**Prerequisites:**
|
|
16
|
-
- SPEC file exists: `.claude/vibe/specs/{feature-name}.
|
|
17
|
-
- Feature file exists: `.claude/vibe/features/{feature-name}.feature`
|
|
16
|
+
- SPEC file exists: `.claude/vibe/specs/{feature-name}.md` (single) or `.claude/vibe/specs/{feature-name}/_index.md` (split)
|
|
17
|
+
- Feature file exists: `.claude/vibe/features/{feature-name}.feature` (single) or `.claude/vibe/features/{feature-name}/_index.feature` (split)
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
@@ -34,13 +34,25 @@ Review and enhance SPEC with GPT/Gemini cross-validation.
|
|
|
34
34
|
|
|
35
35
|
## Step 1: Load SPEC Files
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
Detect SPEC structure (single file or split folder) and read files:
|
|
38
38
|
|
|
39
|
+
**Single file structure:**
|
|
39
40
|
```
|
|
40
|
-
.claude/vibe/specs/{feature-name}.
|
|
41
|
+
.claude/vibe/specs/{feature-name}.md
|
|
41
42
|
.claude/vibe/features/{feature-name}.feature
|
|
42
43
|
```
|
|
43
44
|
|
|
45
|
+
**Split folder structure:**
|
|
46
|
+
```
|
|
47
|
+
.claude/vibe/specs/{feature-name}/_index.md (+ phase files)
|
|
48
|
+
.claude/vibe/features/{feature-name}/_index.feature (+ phase files)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**Detection logic:**
|
|
52
|
+
1. Check if `.claude/vibe/specs/{feature-name}/` directory exists → Split mode
|
|
53
|
+
2. Otherwise check `.claude/vibe/specs/{feature-name}.md` → Single mode
|
|
54
|
+
3. If neither exists → Error
|
|
55
|
+
|
|
44
56
|
**Output:**
|
|
45
57
|
```
|
|
46
58
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
@@ -48,8 +60,9 @@ Read the existing SPEC and Feature files:
|
|
|
48
60
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
49
61
|
|
|
50
62
|
Loading files...
|
|
51
|
-
|
|
52
|
-
✅
|
|
63
|
+
Mode: {single|split}
|
|
64
|
+
✅ SPEC: .claude/vibe/specs/{feature-name}.md (or _index.md + N phase files)
|
|
65
|
+
✅ Feature: .claude/vibe/features/{feature-name}.feature (or _index.feature + N phase files)
|
|
53
66
|
|
|
54
67
|
Extracted info:
|
|
55
68
|
- Feature: {feature description}
|
|
@@ -152,48 +165,60 @@ Score: 96/100 ✅ PASSED
|
|
|
152
165
|
|
|
153
166
|
## Step 3: Race Review (GPT + Gemini Cross-Validation) - 3 Rounds (v2.6.9)
|
|
154
167
|
|
|
155
|
-
|
|
168
|
+
**🚨🚨🚨 CRITICAL: YOU MUST EXECUTE ALL 3 ROUNDS. DO NOT SKIP THIS STEP. 🚨🚨🚨**
|
|
169
|
+
|
|
170
|
+
**🚨 ABSOLUTE RULES FOR RACE REVIEW:**
|
|
171
|
+
|
|
172
|
+
1. **YOU MUST** use the Bash tool to call `raceReview` via `node -e`
|
|
173
|
+
2. **DO NOT** skip GPT/Gemini calls
|
|
174
|
+
3. **DO NOT** simulate or fake review results
|
|
175
|
+
4. **YOU MUST** run all 3 rounds sequentially (each round uses updated SPEC)
|
|
156
176
|
|
|
157
177
|
> Race Mode reviews SPEC with both GPT and Gemini in parallel, then cross-validates findings for higher confidence.
|
|
158
178
|
|
|
159
|
-
### 3.1
|
|
179
|
+
### 3.1 Review Loop (3 Rounds)
|
|
180
|
+
|
|
181
|
+
**For EACH round (1, 2, 3), execute this Bash command:**
|
|
182
|
+
|
|
183
|
+
Replace `[SPEC_CONTENT]` with the actual SPEC file content (escaped for JSON), `[FEATURE_NAME]` with the feature name, `[STACK]` with tech stack, and `[N]` with round number.
|
|
160
184
|
|
|
161
185
|
```bash
|
|
162
|
-
|
|
163
|
-
node -e "import('@su-record/vibe/tools').then(t => t.raceReview({reviewType: 'general', code: '[SPEC content]', context: 'SPEC review round N/3'}).then(r => console.log(t.formatRaceResult(r))))"
|
|
186
|
+
node -e "import('@su-record/vibe/tools').then(async t => { const result = await t.raceReview({reviewType: 'general', code: \`[SPEC_CONTENT]\`, context: 'SPEC review for [FEATURE_NAME]. Stack: [STACK]. Round [N]/3.'}); console.log(t.formatRaceResult(result)); }).catch(e => console.error('Race review failed:', e.message))"
|
|
164
187
|
```
|
|
165
188
|
|
|
166
|
-
|
|
189
|
+
**🚨 MANDATORY: Use the Bash tool to run the above command for EACH round.**
|
|
190
|
+
|
|
191
|
+
- Round 1: Run → Read results → Apply fixes to SPEC → Update SPEC file
|
|
192
|
+
- Round 2: Run with updated SPEC → Read results → Apply fixes → Update SPEC file
|
|
193
|
+
- Round 3: Run with final SPEC → Confirm no issues remain
|
|
167
194
|
|
|
168
|
-
|
|
195
|
+
**If the `node -e` command fails** (e.g., module not found), use the fallback method:
|
|
169
196
|
|
|
170
|
-
**
|
|
197
|
+
**Fallback: Direct llm-orchestrate.js calls (run BOTH in parallel via Bash):**
|
|
171
198
|
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
console.log(t.formatRaceResult(result));
|
|
181
|
-
});
|
|
199
|
+
```bash
|
|
200
|
+
VIBE_SCRIPTS="$(node -p "process.env.APPDATA || require('os').homedir() + '/.config'")/vibe/hooks/scripts"
|
|
201
|
+
|
|
202
|
+
# GPT review (Bash tool call 1)
|
|
203
|
+
node "$VIBE_SCRIPTS/llm-orchestrate.js" gpt orchestrate-json "Review this SPEC for completeness, specificity, testability, security, and performance. Find issues. Return JSON: {issues: [{id, title, description, severity, suggestion}]}. SPEC content: [SPEC_CONTENT]"
|
|
204
|
+
|
|
205
|
+
# Gemini review (Bash tool call 2 - run in parallel)
|
|
206
|
+
node "$VIBE_SCRIPTS/llm-orchestrate.js" gemini orchestrate-json "Review this SPEC for completeness, specificity, testability, security, and performance. Find issues. Return JSON: {issues: [{id, title, description, severity, suggestion}]}. SPEC content: [SPEC_CONTENT]"
|
|
182
207
|
```
|
|
183
208
|
|
|
184
|
-
|
|
209
|
+
### 3.2 Cross-Validation Rules
|
|
185
210
|
|
|
186
211
|
| Agreement | Priority | Action |
|
|
187
212
|
|-----------|----------|--------|
|
|
188
|
-
| Both agree (100%) | P1 | Auto-apply immediately |
|
|
189
|
-
| One model (50%) | P2 | Auto-apply with note |
|
|
213
|
+
| Both GPT + Gemini agree (100%) | P1 | Auto-apply immediately |
|
|
214
|
+
| One model only (50%) | P2 | Auto-apply with note |
|
|
190
215
|
|
|
191
216
|
**After each round:**
|
|
192
217
|
|
|
193
218
|
1. Cross-validate findings (issues found by both → P1, single model → P2)
|
|
194
219
|
2. Merge feedback with confidence scores
|
|
195
|
-
3. Auto-apply P1/P2 improvements to SPEC and Feature files
|
|
196
|
-
4. Continue to next round
|
|
220
|
+
3. Auto-apply P1/P2 improvements to SPEC and Feature files (use Edit tool)
|
|
221
|
+
4. Continue to next round with updated SPEC content
|
|
197
222
|
|
|
198
223
|
**Output format:**
|
|
199
224
|
```
|
|
@@ -262,8 +287,8 @@ Review Rounds: 3/3 ✅
|
|
|
262
287
|
Total Improvements: 4
|
|
263
288
|
|
|
264
289
|
Updated files:
|
|
265
|
-
📋 .claude/vibe/specs/{feature-name}.
|
|
266
|
-
📋 .claude/vibe/features/{feature-name}.feature
|
|
290
|
+
📋 .claude/vibe/specs/{feature-name}.md (or split folder)
|
|
291
|
+
📋 .claude/vibe/features/{feature-name}.feature (or split folder)
|
|
267
292
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
268
293
|
```
|
|
269
294
|
|
|
@@ -334,7 +359,8 @@ After all review rounds, present the finalized SPEC to the user in a readable fo
|
|
|
334
359
|
```
|
|
335
360
|
❌ ERROR: SPEC file not found
|
|
336
361
|
|
|
337
|
-
Expected: .claude/vibe/specs/{feature-name}.
|
|
362
|
+
Expected (single): .claude/vibe/specs/{feature-name}.md
|
|
363
|
+
Expected (split): .claude/vibe/specs/{feature-name}/_index.md
|
|
338
364
|
|
|
339
365
|
Please run /vibe.spec "{feature-name}" first to create the SPEC.
|
|
340
366
|
```
|
|
@@ -343,7 +369,8 @@ Please run /vibe.spec "{feature-name}" first to create the SPEC.
|
|
|
343
369
|
```
|
|
344
370
|
❌ ERROR: Feature file not found
|
|
345
371
|
|
|
346
|
-
Expected: .claude/vibe/features/{feature-name}.feature
|
|
372
|
+
Expected (single): .claude/vibe/features/{feature-name}.feature
|
|
373
|
+
Expected (split): .claude/vibe/features/{feature-name}/_index.feature
|
|
347
374
|
|
|
348
375
|
Please run /vibe.spec "{feature-name}" first to create the Feature file.
|
|
349
376
|
```
|
|
@@ -370,3 +397,15 @@ For faster iteration (1 round only):
|
|
|
370
397
|
---
|
|
371
398
|
|
|
372
399
|
ARGUMENTS: $ARGUMENTS
|
|
400
|
+
|
|
401
|
+
**File Detection (execute before Step 1):**
|
|
402
|
+
|
|
403
|
+
```
|
|
404
|
+
Feature name: $ARGUMENTS
|
|
405
|
+
|
|
406
|
+
1. Check split folder: .claude/vibe/specs/$ARGUMENTS/_index.md
|
|
407
|
+
- If exists → Split mode (read all files in folder)
|
|
408
|
+
2. Check single file: .claude/vibe/specs/$ARGUMENTS.md
|
|
409
|
+
- If exists → Single mode
|
|
410
|
+
3. Neither exists → Show error with both expected paths
|
|
411
|
+
```
|