@su-record/vibe 2.6.42 → 2.6.43
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/.env +1 -1
- package/commands/vibe.analyze.md +373 -373
- package/commands/vibe.reason.md +333 -333
- package/commands/vibe.review.md +555 -555
- package/commands/vibe.run.md +1922 -1922
- package/commands/vibe.spec.md +1195 -1195
- package/commands/vibe.trace.md +209 -209
- package/commands/vibe.verify.md +414 -414
- package/dist/cli/postinstall/inline-skills.js +1 -1
- package/dist/cli/postinstall/inline-skills.js.map +1 -1
- package/dist/cli/setup/GlobalInstaller.d.ts +7 -0
- package/dist/cli/setup/GlobalInstaller.d.ts.map +1 -1
- package/dist/cli/setup/GlobalInstaller.js +45 -0
- package/dist/cli/setup/GlobalInstaller.js.map +1 -1
- package/dist/infra/lib/SkillRepository.d.ts.map +1 -1
- package/dist/infra/lib/SkillRepository.js +5 -4
- package/dist/infra/lib/SkillRepository.js.map +1 -1
- package/package.json +1 -1
- package/skills/core-capabilities/SKILL.md +164 -164
- package/skills/parallel-research/SKILL.md +80 -80
package/commands/vibe.verify.md
CHANGED
|
@@ -1,414 +1,414 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Verify implementation against SPEC requirements
|
|
3
|
-
argument-hint: "feature name"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# /vibe.verify
|
|
7
|
-
|
|
8
|
-
**Automated Quality Verification** - Making quality trustworthy even for non-developers.
|
|
9
|
-
|
|
10
|
-
> All scenarios passed = Quality assured
|
|
11
|
-
|
|
12
|
-
## Usage
|
|
13
|
-
|
|
14
|
-
```
|
|
15
|
-
/vibe.verify "feature-name" # SPEC-based verification
|
|
16
|
-
/vibe.verify --e2e "feature-name" # E2E browser test (agents/e2e-tester.md)
|
|
17
|
-
/vibe.verify --e2e --visual # Visual regression test
|
|
18
|
-
/vibe.verify --e2e --record # Video recording
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
> **⏱️ Timer**: Call `getCurrentTime` tool at the START. Record the result as `{start_time}`.
|
|
22
|
-
|
|
23
|
-
## Core Principles
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
┌─────────────────────────────────────────────────────────────────┐
|
|
27
|
-
│ What non-developers need to know │
|
|
28
|
-
│ │
|
|
29
|
-
│ ✅ Scenarios: 4/4 passed │
|
|
30
|
-
│ 📈 Quality Score: 94/100 │
|
|
31
|
-
│ │
|
|
32
|
-
│ Just look at this. The system handles the rest. │
|
|
33
|
-
└─────────────────────────────────────────────────────────────────┘
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## Process
|
|
37
|
-
|
|
38
|
-
### 1. Load Feature File
|
|
39
|
-
|
|
40
|
-
**Search order (check BOTH file AND folder):**
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
Step 1: Check if SPLIT structure exists (folder)
|
|
44
|
-
📁 .claude/vibe/features/{feature-name}/ → Folder with _index.feature + phase files
|
|
45
|
-
📁 .claude/vibe/specs/{feature-name}/ → Folder with _index.md + phase files
|
|
46
|
-
|
|
47
|
-
Step 2: If no folder, check single file
|
|
48
|
-
📄 .claude/vibe/features/{feature-name}.feature → Single Feature file
|
|
49
|
-
📄 .claude/vibe/specs/{feature-name}.md → Single SPEC file
|
|
50
|
-
|
|
51
|
-
Step 3: If neither exists → Error
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
**Split structure (folder) detected:**
|
|
55
|
-
```
|
|
56
|
-
📁 .claude/vibe/features/{feature-name}/
|
|
57
|
-
├── _index.feature → Master Feature (read first for scenario overview)
|
|
58
|
-
├── phase-1-{name}.feature → Phase 1 scenarios
|
|
59
|
-
├── phase-2-{name}.feature → Phase 2 scenarios
|
|
60
|
-
└── ...
|
|
61
|
-
|
|
62
|
-
📁 .claude/vibe/specs/{feature-name}/
|
|
63
|
-
├── _index.md → Master SPEC (read first for overview)
|
|
64
|
-
├── phase-1-{name}.md → Phase 1 SPEC
|
|
65
|
-
└── ...
|
|
66
|
-
|
|
67
|
-
→ Load _index files first, then verify phase by phase
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
**Single file detected:**
|
|
71
|
-
```
|
|
72
|
-
📄 .claude/vibe/features/{feature-name}.feature → Scenario list
|
|
73
|
-
📄 .claude/vibe/specs/{feature-name}.md → Verification criteria (reference)
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
**Error if NEITHER file NOR folder found:**
|
|
77
|
-
```
|
|
78
|
-
❌ Feature file not found. Searched:
|
|
79
|
-
- .claude/vibe/features/{feature-name}/ (folder)
|
|
80
|
-
- .claude/vibe/features/{feature-name}.feature (file)
|
|
81
|
-
|
|
82
|
-
Run /vibe.spec "{feature-name}" first.
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
### 2. Scenario-by-Scenario Verification
|
|
86
|
-
|
|
87
|
-
Automatic verification for each scenario:
|
|
88
|
-
|
|
89
|
-
```
|
|
90
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
91
|
-
🔍 Scenario 1/4: Valid login success
|
|
92
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
93
|
-
|
|
94
|
-
Given: User is registered
|
|
95
|
-
→ Verify: User creation API exists? ✅
|
|
96
|
-
→ Verify: Test user data available? ✅
|
|
97
|
-
|
|
98
|
-
When: Login with valid email and password
|
|
99
|
-
→ Verify: POST /login endpoint exists? ✅
|
|
100
|
-
→ Verify: Request handling logic exists? ✅
|
|
101
|
-
|
|
102
|
-
Then: Login success + JWT token returned
|
|
103
|
-
→ Verify: Success response code 200? ✅
|
|
104
|
-
→ Verify: JWT token included? ✅
|
|
105
|
-
|
|
106
|
-
✅ Scenario 1 passed!
|
|
107
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
### 3. Verification Methods (Auto-selected)
|
|
111
|
-
|
|
112
|
-
| Method | Condition | Verification Content |
|
|
113
|
-
|--------|-----------|---------------------|
|
|
114
|
-
| **Test Execution** | When test files exist | Run `npm test`, `pytest`, etc. |
|
|
115
|
-
| **Code Analysis** | Always | Check implementation, verify logic |
|
|
116
|
-
| **Build Verification** | When build script exists | Check for compile errors |
|
|
117
|
-
| **Type Check** | TypeScript, etc. | Check for type errors |
|
|
118
|
-
|
|
119
|
-
### 4. Quality Report (Auto-generated)
|
|
120
|
-
|
|
121
|
-
```
|
|
122
|
-
┌─────────────────────────────────────────────────────────────────┐
|
|
123
|
-
│ 📊 VERIFICATION REPORT: login │
|
|
124
|
-
├─────────────────────────────────────────────────────────────────┤
|
|
125
|
-
│ │
|
|
126
|
-
│ ✅ Scenarios: 4/4 passed (100%) │
|
|
127
|
-
│ │
|
|
128
|
-
│ ┌───────────────────────────────────────────────────────────┐ │
|
|
129
|
-
│ │ # │ Scenario │ Given │ When │ Then │ Status │ │
|
|
130
|
-
│ │───│───────────────────────│───────│──────│──────│────────│ │
|
|
131
|
-
│ │ 1 │ Valid login success │ ✅ │ ✅ │ ✅ │ ✅ │ │
|
|
132
|
-
│ │ 2 │ Invalid password error│ ✅ │ ✅ │ ✅ │ ✅ │ │
|
|
133
|
-
│ │ 3 │ Email format validation│ ✅ │ ✅ │ ✅ │ ✅ │ │
|
|
134
|
-
│ │ 4 │ Forgot password link │ ✅ │ ✅ │ ✅ │ ✅ │ │
|
|
135
|
-
│ └───────────────────────────────────────────────────────────┘ │
|
|
136
|
-
│ │
|
|
137
|
-
│ 📈 Quality Score: 94/100 │
|
|
138
|
-
│ │
|
|
139
|
-
│ ┌─────────────────────────────────────────────────────────┐ │
|
|
140
|
-
│ │ Item │ Result│ Details │ │
|
|
141
|
-
│ │───────────────────│───────│─────────────────────────────│ │
|
|
142
|
-
│ │ Build │ ✅ │ Success │ │
|
|
143
|
-
│ │ Tests │ ✅ │ 12/12 passed │ │
|
|
144
|
-
│ │ Type Check │ ✅ │ 0 errors │ │
|
|
145
|
-
│ │ Complexity │ ✅ │ All functions ≤30 lines │ │
|
|
146
|
-
│ │ Code Coverage │ ⚠️ │ 78% (target: 80%) │ │
|
|
147
|
-
│ └─────────────────────────────────────────────────────────┘ │
|
|
148
|
-
│ │
|
|
149
|
-
│ 📋 Recommendations: │
|
|
150
|
-
│ - Need 2% more code coverage (auth.service.ts line 45-52) │
|
|
151
|
-
│ │
|
|
152
|
-
│ ⏱️ Started: {start_time} │
|
|
153
|
-
│ ⏱️ Completed: {getCurrentTime 결과} │
|
|
154
|
-
│ │
|
|
155
|
-
└─────────────────────────────────────────────────────────────────┘
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
### Failure Report
|
|
159
|
-
|
|
160
|
-
```
|
|
161
|
-
┌─────────────────────────────────────────────────────────────────┐
|
|
162
|
-
│ 📊 VERIFICATION REPORT: login │
|
|
163
|
-
├─────────────────────────────────────────────────────────────────┤
|
|
164
|
-
│ │
|
|
165
|
-
│ ❌ Scenarios: 3/4 passed (75%) │
|
|
166
|
-
│ │
|
|
167
|
-
│ ┌───────────────────────────────────────────────────────────┐ │
|
|
168
|
-
│ │ # │ Scenario │ Given │ When │ Then │ Status │ │
|
|
169
|
-
│ │───│───────────────────────│───────│──────│──────│────────│ │
|
|
170
|
-
│ │ 1 │ Valid login success │ ✅ │ ✅ │ ✅ │ ✅ │ │
|
|
171
|
-
│ │ 2 │ Invalid password error│ ✅ │ ✅ │ ✅ │ ✅ │ │
|
|
172
|
-
│ │ 3 │ Email format validation│ ✅ │ ✅ │ ✅ │ ✅ │ │
|
|
173
|
-
│ │ 4 │ Forgot password link │ ✅ │ ❌ │ - │ ❌ │ │
|
|
174
|
-
│ └───────────────────────────────────────────────────────────┘ │
|
|
175
|
-
│ │
|
|
176
|
-
│ ❌ Failure Details: │
|
|
177
|
-
│ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ │
|
|
178
|
-
│ Scenario 4: Forgot password link │
|
|
179
|
-
│ │
|
|
180
|
-
│ When: Click "Forgot password" │
|
|
181
|
-
│ ❌ Issue: Link not implemented │
|
|
182
|
-
│ 📍 Location: LoginForm.tsx line 42 │
|
|
183
|
-
│ 💡 Fix: Need to add "Forgot password" link │
|
|
184
|
-
│ │
|
|
185
|
-
│ 🔧 Auto-fix command: /vibe.run "login" --fix │
|
|
186
|
-
│ │
|
|
187
|
-
└─────────────────────────────────────────────────────────────────┘
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
## Input
|
|
191
|
-
|
|
192
|
-
- `.claude/vibe/features/{feature-name}.feature` or `.claude/vibe/features/{feature-name}/` - BDD scenarios
|
|
193
|
-
- `.claude/vibe/specs/{feature-name}.md` or `.claude/vibe/specs/{feature-name}/` - SPEC document (reference)
|
|
194
|
-
- Implemented source code
|
|
195
|
-
|
|
196
|
-
## Output
|
|
197
|
-
|
|
198
|
-
- Verification result report (terminal output)
|
|
199
|
-
- Passed/failed scenario list
|
|
200
|
-
- Items needing fixes
|
|
201
|
-
|
|
202
|
-
## Example
|
|
203
|
-
|
|
204
|
-
```
|
|
205
|
-
User: /vibe.verify "login"
|
|
206
|
-
|
|
207
|
-
Claude:
|
|
208
|
-
📄 Loading Feature: .claude/vibe/features/login.feature
|
|
209
|
-
🔍 Starting verification...
|
|
210
|
-
|
|
211
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
212
|
-
🔍 Scenario 1/4: Valid login success
|
|
213
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
214
|
-
✅ Given: User registered - OK
|
|
215
|
-
✅ When: Login attempt - OK
|
|
216
|
-
✅ Then: JWT token returned - OK
|
|
217
|
-
✅ Passed!
|
|
218
|
-
|
|
219
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
220
|
-
🔍 Scenario 2/4: Invalid password error
|
|
221
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
222
|
-
✅ Given: OK
|
|
223
|
-
✅ When: OK
|
|
224
|
-
✅ Then: OK
|
|
225
|
-
✅ Passed!
|
|
226
|
-
|
|
227
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
228
|
-
🔍 Scenario 3/4: Email format validation
|
|
229
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
230
|
-
✅ Given: OK
|
|
231
|
-
✅ When: OK
|
|
232
|
-
✅ Then: OK
|
|
233
|
-
✅ Passed!
|
|
234
|
-
|
|
235
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
236
|
-
🔍 Scenario 4/4: Forgot password link
|
|
237
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
238
|
-
✅ Given: OK
|
|
239
|
-
❌ When: "Forgot password" link - missing
|
|
240
|
-
- Then: (skipped)
|
|
241
|
-
❌ Failed!
|
|
242
|
-
|
|
243
|
-
┌─────────────────────────────────────────────────────────────────┐
|
|
244
|
-
│ 📊 VERIFICATION REPORT: login │
|
|
245
|
-
├─────────────────────────────────────────────────────────────────┤
|
|
246
|
-
│ │
|
|
247
|
-
│ ❌ Scenarios: 3/4 passed (75%) │
|
|
248
|
-
│ │
|
|
249
|
-
│ | # | Scenario | Status | │
|
|
250
|
-
│ |---|───────────────────────|────────| │
|
|
251
|
-
│ | 1 | Valid login success | ✅ | │
|
|
252
|
-
│ | 2 | Invalid password error| ✅ | │
|
|
253
|
-
│ | 3 | Email format validation| ✅ | │
|
|
254
|
-
│ | 4 | Forgot password link | ❌ | │
|
|
255
|
-
│ │
|
|
256
|
-
│ 📈 Quality Score: 75/100 │
|
|
257
|
-
│ │
|
|
258
|
-
│ ❌ Fixes needed: │
|
|
259
|
-
│ - Scenario 4: Add "Forgot password" link in LoginForm.tsx │
|
|
260
|
-
│ │
|
|
261
|
-
│ 🔧 Auto-fix: /vibe.run "login" --fix │
|
|
262
|
-
│ │
|
|
263
|
-
└─────────────────────────────────────────────────────────────────┘
|
|
264
|
-
```
|
|
265
|
-
|
|
266
|
-
## Core Tools (Code Analysis & Quality)
|
|
267
|
-
|
|
268
|
-
### Tool Invocation
|
|
269
|
-
|
|
270
|
-
All tools are called via:
|
|
271
|
-
|
|
272
|
-
```bash
|
|
273
|
-
node -e "import('
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
### Recommended Tools for Verification
|
|
277
|
-
|
|
278
|
-
| Tool | Purpose | When to Use |
|
|
279
|
-
|------|---------|-------------|
|
|
280
|
-
| `validateCodeQuality` | Code quality validation | Check complexity, style violations |
|
|
281
|
-
| `analyzeComplexity` | Complexity analysis | Verify function length, nesting depth |
|
|
282
|
-
| `findSymbol` | Find implementations | Verify feature implementation exists |
|
|
283
|
-
| `findReferences` | Find usages | Check if all references are correct |
|
|
284
|
-
|
|
285
|
-
### Example Tool Usage in Verification
|
|
286
|
-
|
|
287
|
-
**1. Validate code quality:**
|
|
288
|
-
|
|
289
|
-
```bash
|
|
290
|
-
node -e "import('
|
|
291
|
-
```
|
|
292
|
-
|
|
293
|
-
**2. Analyze complexity of implementation:**
|
|
294
|
-
|
|
295
|
-
```bash
|
|
296
|
-
node -e "import('
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
**3. Find implemented feature:**
|
|
300
|
-
|
|
301
|
-
```bash
|
|
302
|
-
node -e "import('
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
## Next Step
|
|
306
|
-
|
|
307
|
-
On verification pass:
|
|
308
|
-
|
|
309
|
-
```
|
|
310
|
-
Complete! Proceed to next feature.
|
|
311
|
-
```
|
|
312
|
-
|
|
313
|
-
On verification fail:
|
|
314
|
-
|
|
315
|
-
```
|
|
316
|
-
/vibe.run "feature-name" --fix # Fix failed scenarios
|
|
317
|
-
```
|
|
318
|
-
|
|
319
|
-
---
|
|
320
|
-
|
|
321
|
-
## Quality Gate (Mandatory)
|
|
322
|
-
|
|
323
|
-
### Verification Quality Checklist
|
|
324
|
-
|
|
325
|
-
Before marking verification complete, ALL items must pass:
|
|
326
|
-
|
|
327
|
-
| Category | Check Item | Weight |
|
|
328
|
-
|----------|------------|--------|
|
|
329
|
-
| **Scenario Coverage** | All scenarios from feature file tested | 25% |
|
|
330
|
-
| **Given Verification** | All preconditions validated | 15% |
|
|
331
|
-
| **When Verification** | All actions executable | 15% |
|
|
332
|
-
| **Then Verification** | All expected outcomes confirmed | 20% |
|
|
333
|
-
| **Build Status** | Project builds without errors | 10% |
|
|
334
|
-
| **Test Status** | All existing tests pass | 10% |
|
|
335
|
-
| **Type Check** | No TypeScript/type errors | 5% |
|
|
336
|
-
|
|
337
|
-
### Verification Score Calculation
|
|
338
|
-
|
|
339
|
-
```
|
|
340
|
-
Score = (passed_scenarios / total_scenarios) × 100
|
|
341
|
-
|
|
342
|
-
Grades:
|
|
343
|
-
- 100%: ✅ PERFECT - All scenarios pass
|
|
344
|
-
- 90-99%: ⚠️ ALMOST - Minor gaps, review needed
|
|
345
|
-
- 70-89%: ❌ INCOMPLETE - Significant gaps
|
|
346
|
-
- 0-69%: ❌ FAILED - Major implementation missing
|
|
347
|
-
```
|
|
348
|
-
|
|
349
|
-
### Pass/Fail Criteria
|
|
350
|
-
|
|
351
|
-
| Metric | Pass Threshold | Action on Fail |
|
|
352
|
-
|--------|----------------|----------------|
|
|
353
|
-
| Scenario pass rate | 100% | Run `/vibe.run --fix` |
|
|
354
|
-
| Build status | Success | Fix build errors first |
|
|
355
|
-
| Test pass rate | 100% | Fix failing tests |
|
|
356
|
-
| Type check | 0 errors | Fix type errors |
|
|
357
|
-
|
|
358
|
-
### Verification Methods Matrix
|
|
359
|
-
|
|
360
|
-
| Method | Trigger Condition | What It Checks |
|
|
361
|
-
|--------|-------------------|----------------|
|
|
362
|
-
| **Code Analysis** | Always | Implementation exists |
|
|
363
|
-
| **Test Execution** | Test files exist | Logic correctness |
|
|
364
|
-
| **Build Verification** | Build script exists | Compilation success |
|
|
365
|
-
| **Type Check** | tsconfig.json exists | Type safety |
|
|
366
|
-
| **Lint Check** | ESLint config exists | Code style |
|
|
367
|
-
|
|
368
|
-
### Scenario Verification Depth
|
|
369
|
-
|
|
370
|
-
For each scenario, verify at THREE levels:
|
|
371
|
-
|
|
372
|
-
| Level | Verification | Example |
|
|
373
|
-
|-------|--------------|---------|
|
|
374
|
-
| **L1: Existence** | Code/function exists | `login()` function defined |
|
|
375
|
-
| **L2: Logic** | Implementation is correct | Validates email format |
|
|
376
|
-
| **L3: Integration** | Works with other components | Returns valid JWT |
|
|
377
|
-
|
|
378
|
-
### Auto-Fix Triggers
|
|
379
|
-
|
|
380
|
-
| Verification Failure | Auto-Fix Action |
|
|
381
|
-
|----------------------|-----------------|
|
|
382
|
-
| Missing implementation | Generate skeleton from scenario |
|
|
383
|
-
| Test failure | Analyze and suggest fix |
|
|
384
|
-
| Build error | Show error location |
|
|
385
|
-
| Type error | Suggest type annotations |
|
|
386
|
-
|
|
387
|
-
### Verification Report Requirements
|
|
388
|
-
|
|
389
|
-
Every verification MUST produce:
|
|
390
|
-
|
|
391
|
-
1. **Scenario Summary Table**
|
|
392
|
-
- Scenario name
|
|
393
|
-
- Given/When/Then status (✅/❌)
|
|
394
|
-
- Overall status
|
|
395
|
-
|
|
396
|
-
2. **Quality Metrics**
|
|
397
|
-
- Build status
|
|
398
|
-
- Test pass count
|
|
399
|
-
- Type error count
|
|
400
|
-
- Code coverage percentage
|
|
401
|
-
|
|
402
|
-
3. **Failure Details** (if any)
|
|
403
|
-
- Exact failure point (Given/When/Then)
|
|
404
|
-
- Expected vs actual
|
|
405
|
-
- File path and line number
|
|
406
|
-
- Suggested fix command
|
|
407
|
-
|
|
408
|
-
4. **Recommendations**
|
|
409
|
-
- Specific files to modify
|
|
410
|
-
- Auto-fix command if available
|
|
411
|
-
|
|
412
|
-
---
|
|
413
|
-
|
|
414
|
-
ARGUMENTS: $ARGUMENTS
|
|
1
|
+
---
|
|
2
|
+
description: Verify implementation against SPEC requirements
|
|
3
|
+
argument-hint: "feature name"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /vibe.verify
|
|
7
|
+
|
|
8
|
+
**Automated Quality Verification** - Making quality trustworthy even for non-developers.
|
|
9
|
+
|
|
10
|
+
> All scenarios passed = Quality assured
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
/vibe.verify "feature-name" # SPEC-based verification
|
|
16
|
+
/vibe.verify --e2e "feature-name" # E2E browser test (agents/e2e-tester.md)
|
|
17
|
+
/vibe.verify --e2e --visual # Visual regression test
|
|
18
|
+
/vibe.verify --e2e --record # Video recording
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
> **⏱️ Timer**: Call `getCurrentTime` tool at the START. Record the result as `{start_time}`.
|
|
22
|
+
|
|
23
|
+
## Core Principles
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
27
|
+
│ What non-developers need to know │
|
|
28
|
+
│ │
|
|
29
|
+
│ ✅ Scenarios: 4/4 passed │
|
|
30
|
+
│ 📈 Quality Score: 94/100 │
|
|
31
|
+
│ │
|
|
32
|
+
│ Just look at this. The system handles the rest. │
|
|
33
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Process
|
|
37
|
+
|
|
38
|
+
### 1. Load Feature File
|
|
39
|
+
|
|
40
|
+
**Search order (check BOTH file AND folder):**
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
Step 1: Check if SPLIT structure exists (folder)
|
|
44
|
+
📁 .claude/vibe/features/{feature-name}/ → Folder with _index.feature + phase files
|
|
45
|
+
📁 .claude/vibe/specs/{feature-name}/ → Folder with _index.md + phase files
|
|
46
|
+
|
|
47
|
+
Step 2: If no folder, check single file
|
|
48
|
+
📄 .claude/vibe/features/{feature-name}.feature → Single Feature file
|
|
49
|
+
📄 .claude/vibe/specs/{feature-name}.md → Single SPEC file
|
|
50
|
+
|
|
51
|
+
Step 3: If neither exists → Error
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**Split structure (folder) detected:**
|
|
55
|
+
```
|
|
56
|
+
📁 .claude/vibe/features/{feature-name}/
|
|
57
|
+
├── _index.feature → Master Feature (read first for scenario overview)
|
|
58
|
+
├── phase-1-{name}.feature → Phase 1 scenarios
|
|
59
|
+
├── phase-2-{name}.feature → Phase 2 scenarios
|
|
60
|
+
└── ...
|
|
61
|
+
|
|
62
|
+
📁 .claude/vibe/specs/{feature-name}/
|
|
63
|
+
├── _index.md → Master SPEC (read first for overview)
|
|
64
|
+
├── phase-1-{name}.md → Phase 1 SPEC
|
|
65
|
+
└── ...
|
|
66
|
+
|
|
67
|
+
→ Load _index files first, then verify phase by phase
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**Single file detected:**
|
|
71
|
+
```
|
|
72
|
+
📄 .claude/vibe/features/{feature-name}.feature → Scenario list
|
|
73
|
+
📄 .claude/vibe/specs/{feature-name}.md → Verification criteria (reference)
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**Error if NEITHER file NOR folder found:**
|
|
77
|
+
```
|
|
78
|
+
❌ Feature file not found. Searched:
|
|
79
|
+
- .claude/vibe/features/{feature-name}/ (folder)
|
|
80
|
+
- .claude/vibe/features/{feature-name}.feature (file)
|
|
81
|
+
|
|
82
|
+
Run /vibe.spec "{feature-name}" first.
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### 2. Scenario-by-Scenario Verification
|
|
86
|
+
|
|
87
|
+
Automatic verification for each scenario:
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
91
|
+
🔍 Scenario 1/4: Valid login success
|
|
92
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
93
|
+
|
|
94
|
+
Given: User is registered
|
|
95
|
+
→ Verify: User creation API exists? ✅
|
|
96
|
+
→ Verify: Test user data available? ✅
|
|
97
|
+
|
|
98
|
+
When: Login with valid email and password
|
|
99
|
+
→ Verify: POST /login endpoint exists? ✅
|
|
100
|
+
→ Verify: Request handling logic exists? ✅
|
|
101
|
+
|
|
102
|
+
Then: Login success + JWT token returned
|
|
103
|
+
→ Verify: Success response code 200? ✅
|
|
104
|
+
→ Verify: JWT token included? ✅
|
|
105
|
+
|
|
106
|
+
✅ Scenario 1 passed!
|
|
107
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### 3. Verification Methods (Auto-selected)
|
|
111
|
+
|
|
112
|
+
| Method | Condition | Verification Content |
|
|
113
|
+
|--------|-----------|---------------------|
|
|
114
|
+
| **Test Execution** | When test files exist | Run `npm test`, `pytest`, etc. |
|
|
115
|
+
| **Code Analysis** | Always | Check implementation, verify logic |
|
|
116
|
+
| **Build Verification** | When build script exists | Check for compile errors |
|
|
117
|
+
| **Type Check** | TypeScript, etc. | Check for type errors |
|
|
118
|
+
|
|
119
|
+
### 4. Quality Report (Auto-generated)
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
123
|
+
│ 📊 VERIFICATION REPORT: login │
|
|
124
|
+
├─────────────────────────────────────────────────────────────────┤
|
|
125
|
+
│ │
|
|
126
|
+
│ ✅ Scenarios: 4/4 passed (100%) │
|
|
127
|
+
│ │
|
|
128
|
+
│ ┌───────────────────────────────────────────────────────────┐ │
|
|
129
|
+
│ │ # │ Scenario │ Given │ When │ Then │ Status │ │
|
|
130
|
+
│ │───│───────────────────────│───────│──────│──────│────────│ │
|
|
131
|
+
│ │ 1 │ Valid login success │ ✅ │ ✅ │ ✅ │ ✅ │ │
|
|
132
|
+
│ │ 2 │ Invalid password error│ ✅ │ ✅ │ ✅ │ ✅ │ │
|
|
133
|
+
│ │ 3 │ Email format validation│ ✅ │ ✅ │ ✅ │ ✅ │ │
|
|
134
|
+
│ │ 4 │ Forgot password link │ ✅ │ ✅ │ ✅ │ ✅ │ │
|
|
135
|
+
│ └───────────────────────────────────────────────────────────┘ │
|
|
136
|
+
│ │
|
|
137
|
+
│ 📈 Quality Score: 94/100 │
|
|
138
|
+
│ │
|
|
139
|
+
│ ┌─────────────────────────────────────────────────────────┐ │
|
|
140
|
+
│ │ Item │ Result│ Details │ │
|
|
141
|
+
│ │───────────────────│───────│─────────────────────────────│ │
|
|
142
|
+
│ │ Build │ ✅ │ Success │ │
|
|
143
|
+
│ │ Tests │ ✅ │ 12/12 passed │ │
|
|
144
|
+
│ │ Type Check │ ✅ │ 0 errors │ │
|
|
145
|
+
│ │ Complexity │ ✅ │ All functions ≤30 lines │ │
|
|
146
|
+
│ │ Code Coverage │ ⚠️ │ 78% (target: 80%) │ │
|
|
147
|
+
│ └─────────────────────────────────────────────────────────┘ │
|
|
148
|
+
│ │
|
|
149
|
+
│ 📋 Recommendations: │
|
|
150
|
+
│ - Need 2% more code coverage (auth.service.ts line 45-52) │
|
|
151
|
+
│ │
|
|
152
|
+
│ ⏱️ Started: {start_time} │
|
|
153
|
+
│ ⏱️ Completed: {getCurrentTime 결과} │
|
|
154
|
+
│ │
|
|
155
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Failure Report
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
162
|
+
│ 📊 VERIFICATION REPORT: login │
|
|
163
|
+
├─────────────────────────────────────────────────────────────────┤
|
|
164
|
+
│ │
|
|
165
|
+
│ ❌ Scenarios: 3/4 passed (75%) │
|
|
166
|
+
│ │
|
|
167
|
+
│ ┌───────────────────────────────────────────────────────────┐ │
|
|
168
|
+
│ │ # │ Scenario │ Given │ When │ Then │ Status │ │
|
|
169
|
+
│ │───│───────────────────────│───────│──────│──────│────────│ │
|
|
170
|
+
│ │ 1 │ Valid login success │ ✅ │ ✅ │ ✅ │ ✅ │ │
|
|
171
|
+
│ │ 2 │ Invalid password error│ ✅ │ ✅ │ ✅ │ ✅ │ │
|
|
172
|
+
│ │ 3 │ Email format validation│ ✅ │ ✅ │ ✅ │ ✅ │ │
|
|
173
|
+
│ │ 4 │ Forgot password link │ ✅ │ ❌ │ - │ ❌ │ │
|
|
174
|
+
│ └───────────────────────────────────────────────────────────┘ │
|
|
175
|
+
│ │
|
|
176
|
+
│ ❌ Failure Details: │
|
|
177
|
+
│ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ │
|
|
178
|
+
│ Scenario 4: Forgot password link │
|
|
179
|
+
│ │
|
|
180
|
+
│ When: Click "Forgot password" │
|
|
181
|
+
│ ❌ Issue: Link not implemented │
|
|
182
|
+
│ 📍 Location: LoginForm.tsx line 42 │
|
|
183
|
+
│ 💡 Fix: Need to add "Forgot password" link │
|
|
184
|
+
│ │
|
|
185
|
+
│ 🔧 Auto-fix command: /vibe.run "login" --fix │
|
|
186
|
+
│ │
|
|
187
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## Input
|
|
191
|
+
|
|
192
|
+
- `.claude/vibe/features/{feature-name}.feature` or `.claude/vibe/features/{feature-name}/` - BDD scenarios
|
|
193
|
+
- `.claude/vibe/specs/{feature-name}.md` or `.claude/vibe/specs/{feature-name}/` - SPEC document (reference)
|
|
194
|
+
- Implemented source code
|
|
195
|
+
|
|
196
|
+
## Output
|
|
197
|
+
|
|
198
|
+
- Verification result report (terminal output)
|
|
199
|
+
- Passed/failed scenario list
|
|
200
|
+
- Items needing fixes
|
|
201
|
+
|
|
202
|
+
## Example
|
|
203
|
+
|
|
204
|
+
```
|
|
205
|
+
User: /vibe.verify "login"
|
|
206
|
+
|
|
207
|
+
Claude:
|
|
208
|
+
📄 Loading Feature: .claude/vibe/features/login.feature
|
|
209
|
+
🔍 Starting verification...
|
|
210
|
+
|
|
211
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
212
|
+
🔍 Scenario 1/4: Valid login success
|
|
213
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
214
|
+
✅ Given: User registered - OK
|
|
215
|
+
✅ When: Login attempt - OK
|
|
216
|
+
✅ Then: JWT token returned - OK
|
|
217
|
+
✅ Passed!
|
|
218
|
+
|
|
219
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
220
|
+
🔍 Scenario 2/4: Invalid password error
|
|
221
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
222
|
+
✅ Given: OK
|
|
223
|
+
✅ When: OK
|
|
224
|
+
✅ Then: OK
|
|
225
|
+
✅ Passed!
|
|
226
|
+
|
|
227
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
228
|
+
🔍 Scenario 3/4: Email format validation
|
|
229
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
230
|
+
✅ Given: OK
|
|
231
|
+
✅ When: OK
|
|
232
|
+
✅ Then: OK
|
|
233
|
+
✅ Passed!
|
|
234
|
+
|
|
235
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
236
|
+
🔍 Scenario 4/4: Forgot password link
|
|
237
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
238
|
+
✅ Given: OK
|
|
239
|
+
❌ When: "Forgot password" link - missing
|
|
240
|
+
- Then: (skipped)
|
|
241
|
+
❌ Failed!
|
|
242
|
+
|
|
243
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
244
|
+
│ 📊 VERIFICATION REPORT: login │
|
|
245
|
+
├─────────────────────────────────────────────────────────────────┤
|
|
246
|
+
│ │
|
|
247
|
+
│ ❌ Scenarios: 3/4 passed (75%) │
|
|
248
|
+
│ │
|
|
249
|
+
│ | # | Scenario | Status | │
|
|
250
|
+
│ |---|───────────────────────|────────| │
|
|
251
|
+
│ | 1 | Valid login success | ✅ | │
|
|
252
|
+
│ | 2 | Invalid password error| ✅ | │
|
|
253
|
+
│ | 3 | Email format validation| ✅ | │
|
|
254
|
+
│ | 4 | Forgot password link | ❌ | │
|
|
255
|
+
│ │
|
|
256
|
+
│ 📈 Quality Score: 75/100 │
|
|
257
|
+
│ │
|
|
258
|
+
│ ❌ Fixes needed: │
|
|
259
|
+
│ - Scenario 4: Add "Forgot password" link in LoginForm.tsx │
|
|
260
|
+
│ │
|
|
261
|
+
│ 🔧 Auto-fix: /vibe.run "login" --fix │
|
|
262
|
+
│ │
|
|
263
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
## Core Tools (Code Analysis & Quality)
|
|
267
|
+
|
|
268
|
+
### Tool Invocation
|
|
269
|
+
|
|
270
|
+
All tools are called via:
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
node -e "import('{{CORE_PATH_URL}}/node_modules/@su-record/vibe/dist/tools/index.js').then(t => t.TOOL_NAME({...args}).then(r => console.log(r.content[0].text)))"
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
### Recommended Tools for Verification
|
|
277
|
+
|
|
278
|
+
| Tool | Purpose | When to Use |
|
|
279
|
+
|------|---------|-------------|
|
|
280
|
+
| `validateCodeQuality` | Code quality validation | Check complexity, style violations |
|
|
281
|
+
| `analyzeComplexity` | Complexity analysis | Verify function length, nesting depth |
|
|
282
|
+
| `findSymbol` | Find implementations | Verify feature implementation exists |
|
|
283
|
+
| `findReferences` | Find usages | Check if all references are correct |
|
|
284
|
+
|
|
285
|
+
### Example Tool Usage in Verification
|
|
286
|
+
|
|
287
|
+
**1. Validate code quality:**
|
|
288
|
+
|
|
289
|
+
```bash
|
|
290
|
+
node -e "import('{{CORE_PATH_URL}}/node_modules/@su-record/vibe/dist/tools/index.js').then(t => t.validateCodeQuality({targetPath: 'src/auth/', projectPath: process.cwd()}).then(r => console.log(r.content[0].text)))"
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
**2. Analyze complexity of implementation:**
|
|
294
|
+
|
|
295
|
+
```bash
|
|
296
|
+
node -e "import('{{CORE_PATH_URL}}/node_modules/@su-record/vibe/dist/tools/index.js').then(t => t.analyzeComplexity({targetPath: 'src/auth/login.ts', projectPath: process.cwd()}).then(r => console.log(r.content[0].text)))"
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
**3. Find implemented feature:**
|
|
300
|
+
|
|
301
|
+
```bash
|
|
302
|
+
node -e "import('{{CORE_PATH_URL}}/node_modules/@su-record/vibe/dist/tools/index.js').then(t => t.findSymbol({symbolName: 'handleLogin', searchPath: 'src/'}).then(r => console.log(r.content[0].text)))"
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
## Next Step
|
|
306
|
+
|
|
307
|
+
On verification pass:
|
|
308
|
+
|
|
309
|
+
```
|
|
310
|
+
Complete! Proceed to next feature.
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
On verification fail:
|
|
314
|
+
|
|
315
|
+
```
|
|
316
|
+
/vibe.run "feature-name" --fix # Fix failed scenarios
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
---
|
|
320
|
+
|
|
321
|
+
## Quality Gate (Mandatory)
|
|
322
|
+
|
|
323
|
+
### Verification Quality Checklist
|
|
324
|
+
|
|
325
|
+
Before marking verification complete, ALL items must pass:
|
|
326
|
+
|
|
327
|
+
| Category | Check Item | Weight |
|
|
328
|
+
|----------|------------|--------|
|
|
329
|
+
| **Scenario Coverage** | All scenarios from feature file tested | 25% |
|
|
330
|
+
| **Given Verification** | All preconditions validated | 15% |
|
|
331
|
+
| **When Verification** | All actions executable | 15% |
|
|
332
|
+
| **Then Verification** | All expected outcomes confirmed | 20% |
|
|
333
|
+
| **Build Status** | Project builds without errors | 10% |
|
|
334
|
+
| **Test Status** | All existing tests pass | 10% |
|
|
335
|
+
| **Type Check** | No TypeScript/type errors | 5% |
|
|
336
|
+
|
|
337
|
+
### Verification Score Calculation
|
|
338
|
+
|
|
339
|
+
```
|
|
340
|
+
Score = (passed_scenarios / total_scenarios) × 100
|
|
341
|
+
|
|
342
|
+
Grades:
|
|
343
|
+
- 100%: ✅ PERFECT - All scenarios pass
|
|
344
|
+
- 90-99%: ⚠️ ALMOST - Minor gaps, review needed
|
|
345
|
+
- 70-89%: ❌ INCOMPLETE - Significant gaps
|
|
346
|
+
- 0-69%: ❌ FAILED - Major implementation missing
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
### Pass/Fail Criteria
|
|
350
|
+
|
|
351
|
+
| Metric | Pass Threshold | Action on Fail |
|
|
352
|
+
|--------|----------------|----------------|
|
|
353
|
+
| Scenario pass rate | 100% | Run `/vibe.run --fix` |
|
|
354
|
+
| Build status | Success | Fix build errors first |
|
|
355
|
+
| Test pass rate | 100% | Fix failing tests |
|
|
356
|
+
| Type check | 0 errors | Fix type errors |
|
|
357
|
+
|
|
358
|
+
### Verification Methods Matrix
|
|
359
|
+
|
|
360
|
+
| Method | Trigger Condition | What It Checks |
|
|
361
|
+
|--------|-------------------|----------------|
|
|
362
|
+
| **Code Analysis** | Always | Implementation exists |
|
|
363
|
+
| **Test Execution** | Test files exist | Logic correctness |
|
|
364
|
+
| **Build Verification** | Build script exists | Compilation success |
|
|
365
|
+
| **Type Check** | tsconfig.json exists | Type safety |
|
|
366
|
+
| **Lint Check** | ESLint config exists | Code style |
|
|
367
|
+
|
|
368
|
+
### Scenario Verification Depth
|
|
369
|
+
|
|
370
|
+
For each scenario, verify at THREE levels:
|
|
371
|
+
|
|
372
|
+
| Level | Verification | Example |
|
|
373
|
+
|-------|--------------|---------|
|
|
374
|
+
| **L1: Existence** | Code/function exists | `login()` function defined |
|
|
375
|
+
| **L2: Logic** | Implementation is correct | Validates email format |
|
|
376
|
+
| **L3: Integration** | Works with other components | Returns valid JWT |
|
|
377
|
+
|
|
378
|
+
### Auto-Fix Triggers
|
|
379
|
+
|
|
380
|
+
| Verification Failure | Auto-Fix Action |
|
|
381
|
+
|----------------------|-----------------|
|
|
382
|
+
| Missing implementation | Generate skeleton from scenario |
|
|
383
|
+
| Test failure | Analyze and suggest fix |
|
|
384
|
+
| Build error | Show error location |
|
|
385
|
+
| Type error | Suggest type annotations |
|
|
386
|
+
|
|
387
|
+
### Verification Report Requirements
|
|
388
|
+
|
|
389
|
+
Every verification MUST produce:
|
|
390
|
+
|
|
391
|
+
1. **Scenario Summary Table**
|
|
392
|
+
- Scenario name
|
|
393
|
+
- Given/When/Then status (✅/❌)
|
|
394
|
+
- Overall status
|
|
395
|
+
|
|
396
|
+
2. **Quality Metrics**
|
|
397
|
+
- Build status
|
|
398
|
+
- Test pass count
|
|
399
|
+
- Type error count
|
|
400
|
+
- Code coverage percentage
|
|
401
|
+
|
|
402
|
+
3. **Failure Details** (if any)
|
|
403
|
+
- Exact failure point (Given/When/Then)
|
|
404
|
+
- Expected vs actual
|
|
405
|
+
- File path and line number
|
|
406
|
+
- Suggested fix command
|
|
407
|
+
|
|
408
|
+
4. **Recommendations**
|
|
409
|
+
- Specific files to modify
|
|
410
|
+
- Auto-fix command if available
|
|
411
|
+
|
|
412
|
+
---
|
|
413
|
+
|
|
414
|
+
ARGUMENTS: $ARGUMENTS
|