@su-record/vibe 2.7.16 → 2.7.18

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.
Files changed (249) hide show
  1. package/.env.example +37 -37
  2. package/CLAUDE.md +153 -134
  3. package/LICENSE +21 -21
  4. package/README.md +449 -449
  5. package/agents/architect-low.md +41 -41
  6. package/agents/architect-medium.md +59 -59
  7. package/agents/architect.md +80 -80
  8. package/agents/build-error-resolver.md +115 -115
  9. package/agents/compounder.md +261 -261
  10. package/agents/diagrammer.md +178 -178
  11. package/agents/docs/api-documenter.md +99 -99
  12. package/agents/docs/changelog-writer.md +93 -93
  13. package/agents/e2e-tester.md +294 -294
  14. package/agents/explorer-low.md +42 -42
  15. package/agents/explorer-medium.md +59 -59
  16. package/agents/explorer.md +48 -48
  17. package/agents/implementer-low.md +43 -43
  18. package/agents/implementer-medium.md +52 -52
  19. package/agents/implementer.md +54 -54
  20. package/agents/junior-mentor.md +141 -141
  21. package/agents/planning/requirements-analyst.md +84 -84
  22. package/agents/planning/ux-advisor.md +83 -83
  23. package/agents/qa/acceptance-tester.md +86 -86
  24. package/agents/qa/edge-case-finder.md +93 -93
  25. package/agents/refactor-cleaner.md +143 -143
  26. package/agents/research/best-practices-agent.md +199 -199
  27. package/agents/research/codebase-patterns-agent.md +157 -157
  28. package/agents/research/framework-docs-agent.md +188 -188
  29. package/agents/research/security-advisory-agent.md +213 -213
  30. package/agents/review/architecture-reviewer.md +107 -107
  31. package/agents/review/complexity-reviewer.md +116 -116
  32. package/agents/review/data-integrity-reviewer.md +88 -88
  33. package/agents/review/git-history-reviewer.md +103 -103
  34. package/agents/review/performance-reviewer.md +86 -86
  35. package/agents/review/python-reviewer.md +150 -150
  36. package/agents/review/rails-reviewer.md +139 -139
  37. package/agents/review/react-reviewer.md +144 -144
  38. package/agents/review/security-reviewer.md +80 -80
  39. package/agents/review/simplicity-reviewer.md +140 -140
  40. package/agents/review/test-coverage-reviewer.md +116 -116
  41. package/agents/review/typescript-reviewer.md +127 -127
  42. package/agents/searcher.md +54 -54
  43. package/agents/simplifier.md +120 -120
  44. package/agents/tester.md +49 -49
  45. package/agents/ui/ui-a11y-auditor.md +93 -93
  46. package/agents/ui/ui-antipattern-detector.md +94 -94
  47. package/agents/ui/ui-dataviz-advisor.md +69 -69
  48. package/agents/ui/ui-design-system-gen.md +57 -57
  49. package/agents/ui/ui-industry-analyzer.md +49 -49
  50. package/agents/ui/ui-layout-architect.md +65 -65
  51. package/agents/ui/ui-stack-implementer.md +68 -68
  52. package/agents/ui/ux-compliance-reviewer.md +81 -81
  53. package/agents/ui-previewer.md +258 -258
  54. package/commands/vibe.analyze.md +379 -379
  55. package/commands/vibe.review.md +607 -607
  56. package/commands/vibe.run.md +2124 -2124
  57. package/commands/vibe.spec.md +1195 -1195
  58. package/commands/vibe.spec.review.md +569 -569
  59. package/commands/vibe.utils.md +413 -413
  60. package/commands/vibe.verify.md +484 -484
  61. package/dist/cli/collaborator.js +52 -52
  62. package/dist/cli/commands/evolution.js +12 -12
  63. package/dist/cli/commands/info.js +51 -51
  64. package/dist/cli/commands/init.js +5 -5
  65. package/dist/cli/commands/remove.js +14 -14
  66. package/dist/cli/commands/sentinel.js +27 -27
  67. package/dist/cli/commands/skills.js +5 -5
  68. package/dist/cli/commands/slack.js +10 -10
  69. package/dist/cli/commands/telegram.js +12 -12
  70. package/dist/cli/commands/upgrade.d.ts +3 -3
  71. package/dist/cli/commands/upgrade.d.ts.map +1 -1
  72. package/dist/cli/commands/upgrade.js +24 -3
  73. package/dist/cli/commands/upgrade.js.map +1 -1
  74. package/dist/cli/detect.js +32 -32
  75. package/dist/cli/index.js +51 -51
  76. package/dist/cli/llm/claude-commands.js +16 -16
  77. package/dist/cli/llm/config.js +18 -18
  78. package/dist/cli/llm/gemini-commands.js +16 -16
  79. package/dist/cli/llm/gpt-commands.js +19 -19
  80. package/dist/cli/llm/help.js +21 -21
  81. package/dist/cli/postinstall/cursor-agents.js +32 -32
  82. package/dist/cli/postinstall/cursor-rules.js +83 -83
  83. package/dist/cli/postinstall/cursor-skills.js +743 -743
  84. package/dist/cli/setup/Provisioner.js +42 -42
  85. package/dist/infra/lib/DeepInit.js +24 -24
  86. package/dist/infra/lib/IterationTracker.js +11 -11
  87. package/dist/infra/lib/PythonParser.js +108 -108
  88. package/dist/infra/lib/ReviewRace.js +96 -96
  89. package/dist/infra/lib/SkillFrontmatter.js +28 -28
  90. package/dist/infra/lib/SkillQualityGate.js +9 -9
  91. package/dist/infra/lib/SkillRepository.js +159 -159
  92. package/dist/infra/lib/UltraQA.js +99 -99
  93. package/dist/infra/lib/autonomy/AuditStore.js +41 -41
  94. package/dist/infra/lib/autonomy/ConfirmationStore.js +30 -30
  95. package/dist/infra/lib/autonomy/EventOutbox.js +38 -38
  96. package/dist/infra/lib/autonomy/PolicyEngine.js +18 -18
  97. package/dist/infra/lib/autonomy/SecuritySentinel.js +1 -1
  98. package/dist/infra/lib/autonomy/SuggestionStore.js +33 -33
  99. package/dist/infra/lib/embedding/VectorStore.js +22 -22
  100. package/dist/infra/lib/evolution/AgentAnalyzer.js +10 -10
  101. package/dist/infra/lib/evolution/DescriptionOptimizer.js +21 -21
  102. package/dist/infra/lib/evolution/GenerationRegistry.js +36 -36
  103. package/dist/infra/lib/evolution/InsightStore.js +90 -90
  104. package/dist/infra/lib/evolution/RollbackManager.js +5 -5
  105. package/dist/infra/lib/evolution/SkillBenchmark.js +23 -23
  106. package/dist/infra/lib/evolution/SkillEvalRunner.js +50 -50
  107. package/dist/infra/lib/evolution/SkillGapDetector.js +10 -10
  108. package/dist/infra/lib/evolution/UsageTracker.js +28 -28
  109. package/dist/infra/lib/gemini/orchestration.js +5 -5
  110. package/dist/infra/lib/gpt/orchestration.js +4 -4
  111. package/dist/infra/lib/memory/KnowledgeGraph.js +4 -4
  112. package/dist/infra/lib/memory/MemorySearch.js +57 -57
  113. package/dist/infra/lib/memory/MemoryStorage.js +181 -181
  114. package/dist/infra/lib/memory/ObservationStore.js +28 -28
  115. package/dist/infra/lib/memory/ReflectionStore.js +30 -30
  116. package/dist/infra/lib/memory/SessionRAGRetriever.js +7 -7
  117. package/dist/infra/lib/memory/SessionRAGStore.js +225 -225
  118. package/dist/infra/lib/memory/SessionSummarizer.js +9 -9
  119. package/dist/infra/lib/telemetry/SkillTelemetry.d.ts +52 -0
  120. package/dist/infra/lib/telemetry/SkillTelemetry.d.ts.map +1 -0
  121. package/dist/infra/lib/telemetry/SkillTelemetry.js +117 -0
  122. package/dist/infra/lib/telemetry/SkillTelemetry.js.map +1 -0
  123. package/dist/infra/lib/telemetry/SkillTelemetry.test.d.ts +2 -0
  124. package/dist/infra/lib/telemetry/SkillTelemetry.test.d.ts.map +1 -0
  125. package/dist/infra/lib/telemetry/SkillTelemetry.test.js +91 -0
  126. package/dist/infra/lib/telemetry/SkillTelemetry.test.js.map +1 -0
  127. package/dist/infra/orchestrator/AgentManager.js +12 -12
  128. package/dist/infra/orchestrator/AgentRegistry.js +65 -65
  129. package/dist/infra/orchestrator/MultiLlmResearch.js +8 -8
  130. package/dist/infra/orchestrator/SwarmOrchestrator.test.js +16 -16
  131. package/dist/infra/orchestrator/parallelResearch.js +24 -24
  132. package/dist/test-helpers/index.d.ts +36 -0
  133. package/dist/test-helpers/index.d.ts.map +1 -0
  134. package/dist/test-helpers/index.js +85 -0
  135. package/dist/test-helpers/index.js.map +1 -0
  136. package/dist/test-helpers/index.test.d.ts +2 -0
  137. package/dist/test-helpers/index.test.d.ts.map +1 -0
  138. package/dist/test-helpers/index.test.js +92 -0
  139. package/dist/test-helpers/index.test.js.map +1 -0
  140. package/dist/tools/convention/analyzeComplexity.test.js +115 -115
  141. package/dist/tools/convention/validateCodeQuality.test.js +104 -104
  142. package/dist/tools/memory/createMemoryTimeline.js +10 -10
  143. package/dist/tools/memory/getMemoryGraph.js +12 -12
  144. package/dist/tools/memory/getSessionContext.js +9 -9
  145. package/dist/tools/memory/linkMemories.js +14 -14
  146. package/dist/tools/memory/listMemories.js +4 -4
  147. package/dist/tools/memory/recallMemory.js +4 -4
  148. package/dist/tools/memory/saveMemory.js +4 -4
  149. package/dist/tools/memory/searchMemoriesAdvanced.js +23 -23
  150. package/dist/tools/semantic/analyzeDependencyGraph.js +12 -12
  151. package/dist/tools/semantic/astGrep.test.js +6 -6
  152. package/dist/tools/spec/prdParser.test.js +171 -171
  153. package/dist/tools/spec/specGenerator.js +169 -169
  154. package/dist/tools/spec/traceabilityMatrix.js +64 -64
  155. package/dist/tools/spec/traceabilityMatrix.test.js +28 -28
  156. package/hooks/gemini-hooks.json +73 -73
  157. package/hooks/hooks.json +137 -137
  158. package/hooks/scripts/code-check.js +77 -77
  159. package/hooks/scripts/context-save.js +212 -212
  160. package/hooks/scripts/hud-status.js +291 -291
  161. package/hooks/scripts/keyword-detector.js +214 -214
  162. package/hooks/scripts/llm-orchestrate.js +475 -475
  163. package/hooks/scripts/post-edit.js +32 -32
  164. package/hooks/scripts/pre-tool-guard.js +125 -125
  165. package/hooks/scripts/prompt-dispatcher.js +185 -185
  166. package/hooks/scripts/sentinel-guard.js +104 -104
  167. package/hooks/scripts/session-start.js +106 -106
  168. package/hooks/scripts/stop-notify.js +209 -209
  169. package/hooks/scripts/utils.js +100 -100
  170. package/languages/csharp-unity.md +515 -515
  171. package/languages/gdscript-godot.md +470 -470
  172. package/languages/ruby-rails.md +489 -489
  173. package/languages/typescript-angular.md +433 -433
  174. package/languages/typescript-astro.md +416 -416
  175. package/languages/typescript-electron.md +406 -406
  176. package/languages/typescript-nestjs.md +524 -524
  177. package/languages/typescript-svelte.md +407 -407
  178. package/languages/typescript-tauri.md +365 -365
  179. package/package.json +123 -121
  180. package/skills/agents-md/SKILL.md +120 -120
  181. package/skills/arch-guard/SKILL.md +180 -180
  182. package/skills/brand-assets/SKILL.md +146 -146
  183. package/skills/capability-loop/SKILL.md +167 -167
  184. package/skills/characterization-test/SKILL.md +206 -206
  185. package/skills/commerce-patterns/SKILL.md +63 -63
  186. package/skills/commit-push-pr/SKILL.md +75 -75
  187. package/skills/context7-usage/SKILL.md +105 -105
  188. package/skills/core-capabilities/SKILL.md +13 -13
  189. package/skills/e2e-commerce/SKILL.md +61 -61
  190. package/skills/exec-plan/SKILL.md +147 -147
  191. package/skills/frontend-design/SKILL.md +12 -12
  192. package/skills/git-worktree/SKILL.md +72 -72
  193. package/skills/handoff/SKILL.md +109 -109
  194. package/skills/parallel-research/SKILL.md +87 -87
  195. package/skills/priority-todos/SKILL.md +63 -63
  196. package/skills/seo-checklist/SKILL.md +57 -57
  197. package/skills/techdebt/SKILL.md +122 -122
  198. package/skills/tool-fallback/SKILL.md +103 -103
  199. package/skills/typescript-advanced-types/SKILL.md +66 -66
  200. package/skills/ui-ux-pro-max/SKILL.md +221 -221
  201. package/skills/vercel-react-best-practices/SKILL.md +59 -59
  202. package/skills/video-production/SKILL.md +51 -51
  203. package/vibe/config.json +29 -29
  204. package/vibe/constitution.md +227 -227
  205. package/vibe/rules/principles/communication-guide.md +98 -98
  206. package/vibe/rules/principles/development-philosophy.md +52 -52
  207. package/vibe/rules/principles/quick-start.md +102 -102
  208. package/vibe/rules/quality/bdd-contract-testing.md +393 -393
  209. package/vibe/rules/quality/checklist.md +276 -276
  210. package/vibe/rules/quality/performance.md +236 -236
  211. package/vibe/rules/quality/testing-strategy.md +440 -440
  212. package/vibe/rules/standards/anti-patterns.md +541 -541
  213. package/vibe/rules/standards/code-structure.md +291 -291
  214. package/vibe/rules/standards/complexity-metrics.md +313 -313
  215. package/vibe/rules/standards/git-workflow.md +237 -237
  216. package/vibe/rules/standards/naming-conventions.md +198 -198
  217. package/vibe/rules/standards/security.md +305 -305
  218. package/vibe/rules/writing/document-style.md +74 -74
  219. package/vibe/setup.sh +31 -31
  220. package/vibe/templates/constitution-template.md +252 -252
  221. package/vibe/templates/contract-backend-template.md +526 -526
  222. package/vibe/templates/contract-frontend-template.md +599 -599
  223. package/vibe/templates/feature-template.md +96 -96
  224. package/vibe/templates/spec-template.md +221 -221
  225. package/vibe/ui-ux-data/charts.csv +26 -26
  226. package/vibe/ui-ux-data/colors.csv +97 -97
  227. package/vibe/ui-ux-data/icons.csv +101 -101
  228. package/vibe/ui-ux-data/landing.csv +31 -31
  229. package/vibe/ui-ux-data/products.csv +96 -96
  230. package/vibe/ui-ux-data/react-performance.csv +45 -45
  231. package/vibe/ui-ux-data/stacks/astro.csv +54 -54
  232. package/vibe/ui-ux-data/stacks/flutter.csv +53 -53
  233. package/vibe/ui-ux-data/stacks/html-tailwind.csv +56 -56
  234. package/vibe/ui-ux-data/stacks/jetpack-compose.csv +53 -53
  235. package/vibe/ui-ux-data/stacks/nextjs.csv +53 -53
  236. package/vibe/ui-ux-data/stacks/nuxt-ui.csv +51 -51
  237. package/vibe/ui-ux-data/stacks/nuxtjs.csv +59 -59
  238. package/vibe/ui-ux-data/stacks/react-native.csv +52 -52
  239. package/vibe/ui-ux-data/stacks/react.csv +54 -54
  240. package/vibe/ui-ux-data/stacks/shadcn.csv +61 -61
  241. package/vibe/ui-ux-data/stacks/svelte.csv +54 -54
  242. package/vibe/ui-ux-data/stacks/swiftui.csv +51 -51
  243. package/vibe/ui-ux-data/stacks/vue.csv +50 -50
  244. package/vibe/ui-ux-data/styles.csv +68 -68
  245. package/vibe/ui-ux-data/typography.csv +57 -57
  246. package/vibe/ui-ux-data/ui-reasoning.csv +101 -101
  247. package/vibe/ui-ux-data/ux-guidelines.csv +99 -99
  248. package/vibe/ui-ux-data/version.json +31 -31
  249. package/vibe/ui-ux-data/web-interface.csv +31 -31
@@ -1,484 +1,484 @@
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
- ## File Reading Policy (Mandatory)
24
-
25
- - **SPEC/Feature 파일**: 반드시 `Read` 도구로 전체 파일을 읽을 것 (Grep 금지)
26
- - **소스코드 파일**: 검증 대상 파일은 반드시 `Read` 도구로 전체 읽은 후 검증할 것
27
- - **Grep 사용 제한**: 파일 위치 탐색(어떤 파일에 있는지 찾기)에만 사용. 파일 내용 파악에는 반드시 Read 사용
28
- - **시나리오 검증 시**: Given/When/Then 각 단계의 구현 코드를 Read로 전체 읽어 확인할 것. Grep 매칭만으로 "구현됨"이라 판단 금지
29
- - **부분 읽기 금지**: Grep 결과의 주변 몇 줄만 보고 판단하지 말 것. 전체 맥락을 파악해야 정확한 검증 가능
30
-
31
- ## Core Principles
32
-
33
- ```
34
- ┌─────────────────────────────────────────────────────────────────┐
35
- │ What non-developers need to know │
36
- │ │
37
- │ ✅ Scenarios: 4/4 passed │
38
- │ 📈 Quality Score: 94/100 │
39
- │ │
40
- │ Just look at this. The system handles the rest. │
41
- └─────────────────────────────────────────────────────────────────┘
42
- ```
43
-
44
- ## Process
45
-
46
- ### 1. Load Feature File
47
-
48
- **Search order (check BOTH file AND folder):**
49
-
50
- ```
51
- Step 1: Check if SPLIT structure exists (folder)
52
- 📁 .claude/vibe/features/{feature-name}/ → Folder with _index.feature + phase files
53
- 📁 .claude/vibe/specs/{feature-name}/ → Folder with _index.md + phase files
54
-
55
- Step 2: If no folder, check single file
56
- 📄 .claude/vibe/features/{feature-name}.feature → Single Feature file
57
- 📄 .claude/vibe/specs/{feature-name}.md → Single SPEC file
58
-
59
- Step 3: If neither exists → Error
60
- ```
61
-
62
- **Split structure (folder) detected:**
63
- ```
64
- 📁 .claude/vibe/features/{feature-name}/
65
- ├── _index.feature → Master Feature (read first for scenario overview)
66
- ├── phase-1-{name}.feature → Phase 1 scenarios
67
- ├── phase-2-{name}.feature → Phase 2 scenarios
68
- └── ...
69
-
70
- 📁 .claude/vibe/specs/{feature-name}/
71
- ├── _index.md → Master SPEC (read first for overview)
72
- ├── phase-1-{name}.md → Phase 1 SPEC
73
- └── ...
74
-
75
- → Load _index files first, then verify phase by phase
76
- ```
77
-
78
- **Single file detected:**
79
- ```
80
- 📄 .claude/vibe/features/{feature-name}.feature → Scenario list
81
- 📄 .claude/vibe/specs/{feature-name}.md → Verification criteria (reference)
82
- ```
83
-
84
- **Error if NEITHER file NOR folder found:**
85
- ```
86
- ❌ Feature file not found. Searched:
87
- - .claude/vibe/features/{feature-name}/ (folder)
88
- - .claude/vibe/features/{feature-name}.feature (file)
89
-
90
- Run /vibe.spec "{feature-name}" first.
91
- ```
92
-
93
- ### 2. Scenario-by-Scenario Verification
94
-
95
- Automatic verification for each scenario:
96
-
97
- ```
98
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
99
- 🔍 Scenario 1/4: Valid login success
100
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
101
-
102
- Given: User is registered
103
- → Verify: User creation API exists? ✅
104
- → Verify: Test user data available? ✅
105
-
106
- When: Login with valid email and password
107
- → Verify: POST /login endpoint exists? ✅
108
- → Verify: Request handling logic exists? ✅
109
-
110
- Then: Login success + JWT token returned
111
- → Verify: Success response code 200? ✅
112
- → Verify: JWT token included? ✅
113
-
114
- ✅ Scenario 1 passed!
115
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
116
- ```
117
-
118
- ### 3. Verification Methods (PARALLEL — run all applicable at once)
119
-
120
- > **Run these as parallel sub-agents, not sequentially in main session.**
121
- > Each method returns pass/fail summary (~200 tokens) instead of bloating main context.
122
-
123
- | Method | Agent | Condition |
124
- |--------|-------|-----------|
125
- | **Test Execution** | `Task(Bash, "npm test")` | When test files exist |
126
- | **Build Verification** | `Task(Bash, "npm run build")` | When build script exists |
127
- | **Type Check** | `Task(subagent_type="typescript-reviewer")` | TypeScript projects |
128
- | **Code Analysis** | `Task(subagent_type="explorer-low")` | Always (verify logic against SPEC) |
129
- | **E2E Closed Loop** | `Task(subagent_type="e2e-tester")` | `--e2e` flag or UI scenarios |
130
-
131
- ```text
132
- # Launch ALL applicable methods in ONE message (parallel)
133
- Task(Bash, command="npm run build && echo BUILD_OK || echo BUILD_FAIL")
134
- Task(Bash, command="npm test -- --reporter=verbose 2>&1 | tail -20")
135
- Task(subagent_type="explorer-low", prompt="Verify [scenario] Given/When/Then against code...")
136
- ```
137
-
138
- ### 3.1. E2E Closed Loop Verification (`--e2e`)
139
-
140
- **AI가 직접 브라우저를 조작하여 시나리오를 검증하고, 실패 시 자동 수정 후 재검증한다.**
141
-
142
- ```
143
- 구현 → E2E 검증 → 실패 → 수정 → 재검증 → ... → 통과
144
- ↑_____________________________________↓
145
- Closed Loop: 사람 개입 없이 AI가 완주
146
- ```
147
-
148
- **Browser Tool Priority (토큰 효율 순):**
149
-
150
- | Priority | Tool | 토큰/액션 | 사용 조건 |
151
- |----------|------|----------|----------|
152
- | 1st | Agent Browser (접근성 트리) | ~6-20 chars | MCP 사용 가능 시 |
153
- | 2nd | Playwright Test Runner | pass/fail만 | 테스트 코드 실행 |
154
- | 3rd | Playwright MCP (DOM) | ~12,000+ chars | 최후 수단 |
155
-
156
- **Closed Loop 실행 흐름:**
157
-
158
- ```
159
- For each UI scenario in Feature file:
160
- 1. [Browser] Navigate → Find elements → Interact → Assert
161
- 2. PASS → Next scenario
162
- 3. FAIL → Collect evidence (screenshot, console errors)
163
- → Root cause analysis
164
- → Fix code (Read full file first, then edit)
165
- → Re-run ONLY failed scenario (max 3 retries)
166
- 4. 3x FAIL → Report as manual fix needed
167
- ```
168
-
169
- **핵심 원칙: 검증이 가벼워야 루프가 충분히 돈다.**
170
- - 접근성 트리 기반: `button "Sign In"` = 15 chars
171
- - DOM 기반: `div class="nav-wrapper mx-4 flex..."` = 200+ chars
172
- - 전자를 사용해야 시나리오 50개도 한 세션에서 검증 가능
173
-
174
- ### 4. Quality Report (Auto-generated)
175
-
176
- ```
177
- ┌─────────────────────────────────────────────────────────────────┐
178
- │ 📊 VERIFICATION REPORT: login │
179
- ├─────────────────────────────────────────────────────────────────┤
180
- │ │
181
- │ ✅ Scenarios: 4/4 passed (100%) │
182
- │ │
183
- │ ┌───────────────────────────────────────────────────────────┐ │
184
- │ │ # │ Scenario │ Given │ When │ Then │ Status │ │
185
- │ │───│───────────────────────│───────│──────│──────│────────│ │
186
- │ │ 1 │ Valid login success │ ✅ │ ✅ │ ✅ │ ✅ │ │
187
- │ │ 2 │ Invalid password error│ ✅ │ ✅ │ ✅ │ ✅ │ │
188
- │ │ 3 │ Email format validation│ ✅ │ ✅ │ ✅ │ ✅ │ │
189
- │ │ 4 │ Forgot password link │ ✅ │ ✅ │ ✅ │ ✅ │ │
190
- │ └───────────────────────────────────────────────────────────┘ │
191
- │ │
192
- │ 📈 Quality Score: 94/100 │
193
- │ │
194
- │ ┌─────────────────────────────────────────────────────────┐ │
195
- │ │ Item │ Result│ Details │ │
196
- │ │───────────────────│───────│─────────────────────────────│ │
197
- │ │ Build │ ✅ │ Success │ │
198
- │ │ Tests │ ✅ │ 12/12 passed │ │
199
- │ │ Type Check │ ✅ │ 0 errors │ │
200
- │ │ Complexity │ ✅ │ All functions ≤30 lines │ │
201
- │ │ Code Coverage │ ⚠️ │ 78% (target: 80%) │ │
202
- │ └─────────────────────────────────────────────────────────┘ │
203
- │ │
204
- │ 📋 Recommendations: │
205
- │ - Need 2% more code coverage (auth.service.ts line 45-52) │
206
- │ │
207
- │ ⏱️ Started: {start_time} │
208
- │ ⏱️ Completed: {getCurrentTime 결과} │
209
- │ │
210
- └─────────────────────────────────────────────────────────────────┘
211
- ```
212
-
213
- ### Failure Report
214
-
215
- ```
216
- ┌─────────────────────────────────────────────────────────────────┐
217
- │ 📊 VERIFICATION REPORT: login │
218
- ├─────────────────────────────────────────────────────────────────┤
219
- │ │
220
- │ ❌ Scenarios: 3/4 passed (75%) │
221
- │ │
222
- │ ┌───────────────────────────────────────────────────────────┐ │
223
- │ │ # │ Scenario │ Given │ When │ Then │ Status │ │
224
- │ │───│───────────────────────│───────│──────│──────│────────│ │
225
- │ │ 1 │ Valid login success │ ✅ │ ✅ │ ✅ │ ✅ │ │
226
- │ │ 2 │ Invalid password error│ ✅ │ ✅ │ ✅ │ ✅ │ │
227
- │ │ 3 │ Email format validation│ ✅ │ ✅ │ ✅ │ ✅ │ │
228
- │ │ 4 │ Forgot password link │ ✅ │ ❌ │ - │ ❌ │ │
229
- │ └───────────────────────────────────────────────────────────┘ │
230
- │ │
231
- │ ❌ Failure Details: │
232
- │ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ │
233
- │ Scenario 4: Forgot password link │
234
- │ │
235
- │ When: Click "Forgot password" │
236
- │ ❌ Issue: Link not implemented │
237
- │ 📍 Location: LoginForm.tsx line 42 │
238
- │ 💡 Fix: Need to add "Forgot password" link │
239
- │ │
240
- │ 🔧 Auto-fix command: /vibe.run "login" --fix │
241
- │ │
242
- └─────────────────────────────────────────────────────────────────┘
243
- ```
244
-
245
- ## Input
246
-
247
- - `.claude/vibe/features/{feature-name}.feature` or `.claude/vibe/features/{feature-name}/` - BDD scenarios
248
- - `.claude/vibe/specs/{feature-name}.md` or `.claude/vibe/specs/{feature-name}/` - SPEC document (reference)
249
- - Implemented source code
250
-
251
- ## Output
252
-
253
- - Verification result report (terminal output)
254
- - Passed/failed scenario list
255
- - Items needing fixes
256
-
257
- ## Example
258
-
259
- ```
260
- User: /vibe.verify "login"
261
-
262
- Claude:
263
- 📄 Loading Feature: .claude/vibe/features/login.feature
264
- 🔍 Starting verification...
265
-
266
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
267
- 🔍 Scenario 1/4: Valid login success
268
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
269
- ✅ Given: User registered - OK
270
- ✅ When: Login attempt - OK
271
- ✅ Then: JWT token returned - OK
272
- ✅ Passed!
273
-
274
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
275
- 🔍 Scenario 2/4: Invalid password error
276
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
277
- ✅ Given: OK
278
- ✅ When: OK
279
- ✅ Then: OK
280
- ✅ Passed!
281
-
282
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
283
- 🔍 Scenario 3/4: Email format validation
284
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
285
- ✅ Given: OK
286
- ✅ When: OK
287
- ✅ Then: OK
288
- ✅ Passed!
289
-
290
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
291
- 🔍 Scenario 4/4: Forgot password link
292
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
293
- ✅ Given: OK
294
- ❌ When: "Forgot password" link - missing
295
- - Then: (skipped)
296
- ❌ Failed!
297
-
298
- ┌─────────────────────────────────────────────────────────────────┐
299
- │ 📊 VERIFICATION REPORT: login │
300
- ├─────────────────────────────────────────────────────────────────┤
301
- │ │
302
- │ ❌ Scenarios: 3/4 passed (75%) │
303
- │ │
304
- │ | # | Scenario | Status | │
305
- │ |---|───────────────────────|────────| │
306
- │ | 1 | Valid login success | ✅ | │
307
- │ | 2 | Invalid password error| ✅ | │
308
- │ | 3 | Email format validation| ✅ | │
309
- │ | 4 | Forgot password link | ❌ | │
310
- │ │
311
- │ 📈 Quality Score: 75/100 │
312
- │ │
313
- │ ❌ Fixes needed: │
314
- │ - Scenario 4: Add "Forgot password" link in LoginForm.tsx │
315
- │ │
316
- │ 🔧 Auto-fix: /vibe.run "login" --fix │
317
- │ │
318
- └─────────────────────────────────────────────────────────────────┘
319
- ```
320
-
321
- ## Core Tools (Code Analysis & Quality)
322
-
323
- ### Tool Invocation
324
-
325
- All tools are called via:
326
-
327
- ```bash
328
- node -e "import('{{VIBE_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)))"
329
- ```
330
-
331
- ### Recommended Tools for Verification
332
-
333
- | Tool | Purpose | When to Use |
334
- |------|---------|-------------|
335
- | `validateCodeQuality` | Code quality validation | Check complexity, style violations |
336
- | `analyzeComplexity` | Complexity analysis | Verify function length, nesting depth |
337
- | `findSymbol` | Find implementations | Verify feature implementation exists |
338
- | `findReferences` | Find usages | Check if all references are correct |
339
-
340
- ### Example Tool Usage in Verification
341
-
342
- **1. Validate code quality:**
343
-
344
- ```bash
345
- node -e "import('{{VIBE_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)))"
346
- ```
347
-
348
- **2. Analyze complexity of implementation:**
349
-
350
- ```bash
351
- node -e "import('{{VIBE_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)))"
352
- ```
353
-
354
- **3. Find implemented feature:**
355
-
356
- ```bash
357
- node -e "import('{{VIBE_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)))"
358
- ```
359
-
360
- ## Next Step
361
-
362
- On verification pass:
363
-
364
- ```
365
- Complete! Proceed to next feature.
366
- ```
367
-
368
- On verification fail:
369
-
370
- ```
371
- /vibe.run "feature-name" --fix # Fix failed scenarios
372
- ```
373
-
374
- ---
375
-
376
- ## Quality Gate (Mandatory)
377
-
378
- ### Verification Quality Checklist
379
-
380
- Before marking verification complete, ALL items must pass:
381
-
382
- | Category | Check Item | Weight |
383
- |----------|------------|--------|
384
- | **Scenario Coverage** | All scenarios from feature file tested | 25% |
385
- | **Given Verification** | All preconditions validated | 15% |
386
- | **When Verification** | All actions executable | 15% |
387
- | **Then Verification** | All expected outcomes confirmed | 20% |
388
- | **Build Status** | Project builds without errors | 10% |
389
- | **Test Status** | All existing tests pass | 10% |
390
- | **Type Check** | No TypeScript/type errors | 5% |
391
-
392
- ### Verification Score Calculation
393
-
394
- ```
395
- Score = (passed_scenarios / total_scenarios) × 100
396
-
397
- Grades:
398
- - 100%: ✅ PERFECT - All scenarios pass
399
- - 90-99%: ⚠️ ALMOST - Minor gaps, review needed
400
- - 70-89%: ❌ INCOMPLETE - Significant gaps
401
- - 0-69%: ❌ FAILED - Major implementation missing
402
- ```
403
-
404
- ### Pass/Fail Criteria
405
-
406
- | Metric | Pass Threshold | Action on Fail |
407
- |--------|----------------|----------------|
408
- | Scenario pass rate | 100% | Run `/vibe.run --fix` |
409
- | Build status | Success | Fix build errors first |
410
- | Test pass rate | 100% | Fix failing tests |
411
- | Type check | 0 errors | Fix type errors |
412
-
413
- ### Verification Methods Matrix
414
-
415
- | Method | Trigger Condition | What It Checks |
416
- |--------|-------------------|----------------|
417
- | **Code Analysis** | Always | Implementation exists |
418
- | **Test Execution** | Test files exist | Logic correctness |
419
- | **Build Verification** | Build script exists | Compilation success |
420
- | **Type Check** | tsconfig.json exists | Type safety |
421
- | **Lint Check** | ESLint config exists | Code style |
422
-
423
- ### Scenario Verification Depth
424
-
425
- For each scenario, verify at THREE levels:
426
-
427
- | Level | Verification | Example |
428
- |-------|--------------|---------|
429
- | **L1: Existence** | Code/function exists | `login()` function defined |
430
- | **L2: Logic** | Implementation is correct | Validates email format |
431
- | **L3: Integration** | Works with other components | Returns valid JWT |
432
-
433
- ### Auto-Fix Triggers
434
-
435
- | Verification Failure | Auto-Fix Action |
436
- |----------------------|-----------------|
437
- | Missing implementation | Generate skeleton from scenario |
438
- | Test failure | Analyze and suggest fix |
439
- | Build error | Show error location |
440
- | Type error | Suggest type annotations |
441
-
442
- ### Failure Escalation (max 3 retries)
443
-
444
- ```
445
- Auto-fix attempt 1 → Re-verify
446
- ❌ Still failing?
447
- Auto-fix attempt 2 → Re-verify
448
- ❌ Still failing?
449
- Auto-fix attempt 3 → Re-verify
450
- ❌ Still failing?
451
- → STOP. Do NOT retry further.
452
- → Record failure in .claude/vibe/todos/verify-failure-{scenario}.md
453
- → Report to user: "Scenario X failed after 3 attempts. Manual review needed."
454
- → Continue to next scenario (don't block entire verification)
455
- ```
456
-
457
- ### Verification Report Requirements
458
-
459
- Every verification MUST produce:
460
-
461
- 1. **Scenario Summary Table**
462
- - Scenario name
463
- - Given/When/Then status (✅/❌)
464
- - Overall status
465
-
466
- 2. **Quality Metrics**
467
- - Build status
468
- - Test pass count
469
- - Type error count
470
- - Code coverage percentage
471
-
472
- 3. **Failure Details** (if any)
473
- - Exact failure point (Given/When/Then)
474
- - Expected vs actual
475
- - File path and line number
476
- - Suggested fix command
477
-
478
- 4. **Recommendations**
479
- - Specific files to modify
480
- - Auto-fix command if available
481
-
482
- ---
483
-
484
- 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
+ ## File Reading Policy (Mandatory)
24
+
25
+ - **SPEC/Feature 파일**: 반드시 `Read` 도구로 전체 파일을 읽을 것 (Grep 금지)
26
+ - **소스코드 파일**: 검증 대상 파일은 반드시 `Read` 도구로 전체 읽은 후 검증할 것
27
+ - **Grep 사용 제한**: 파일 위치 탐색(어떤 파일에 있는지 찾기)에만 사용. 파일 내용 파악에는 반드시 Read 사용
28
+ - **시나리오 검증 시**: Given/When/Then 각 단계의 구현 코드를 Read로 전체 읽어 확인할 것. Grep 매칭만으로 "구현됨"이라 판단 금지
29
+ - **부분 읽기 금지**: Grep 결과의 주변 몇 줄만 보고 판단하지 말 것. 전체 맥락을 파악해야 정확한 검증 가능
30
+
31
+ ## Core Principles
32
+
33
+ ```
34
+ ┌─────────────────────────────────────────────────────────────────┐
35
+ │ What non-developers need to know │
36
+ │ │
37
+ │ ✅ Scenarios: 4/4 passed │
38
+ │ 📈 Quality Score: 94/100 │
39
+ │ │
40
+ │ Just look at this. The system handles the rest. │
41
+ └─────────────────────────────────────────────────────────────────┘
42
+ ```
43
+
44
+ ## Process
45
+
46
+ ### 1. Load Feature File
47
+
48
+ **Search order (check BOTH file AND folder):**
49
+
50
+ ```
51
+ Step 1: Check if SPLIT structure exists (folder)
52
+ 📁 .claude/vibe/features/{feature-name}/ → Folder with _index.feature + phase files
53
+ 📁 .claude/vibe/specs/{feature-name}/ → Folder with _index.md + phase files
54
+
55
+ Step 2: If no folder, check single file
56
+ 📄 .claude/vibe/features/{feature-name}.feature → Single Feature file
57
+ 📄 .claude/vibe/specs/{feature-name}.md → Single SPEC file
58
+
59
+ Step 3: If neither exists → Error
60
+ ```
61
+
62
+ **Split structure (folder) detected:**
63
+ ```
64
+ 📁 .claude/vibe/features/{feature-name}/
65
+ ├── _index.feature → Master Feature (read first for scenario overview)
66
+ ├── phase-1-{name}.feature → Phase 1 scenarios
67
+ ├── phase-2-{name}.feature → Phase 2 scenarios
68
+ └── ...
69
+
70
+ 📁 .claude/vibe/specs/{feature-name}/
71
+ ├── _index.md → Master SPEC (read first for overview)
72
+ ├── phase-1-{name}.md → Phase 1 SPEC
73
+ └── ...
74
+
75
+ → Load _index files first, then verify phase by phase
76
+ ```
77
+
78
+ **Single file detected:**
79
+ ```
80
+ 📄 .claude/vibe/features/{feature-name}.feature → Scenario list
81
+ 📄 .claude/vibe/specs/{feature-name}.md → Verification criteria (reference)
82
+ ```
83
+
84
+ **Error if NEITHER file NOR folder found:**
85
+ ```
86
+ ❌ Feature file not found. Searched:
87
+ - .claude/vibe/features/{feature-name}/ (folder)
88
+ - .claude/vibe/features/{feature-name}.feature (file)
89
+
90
+ Run /vibe.spec "{feature-name}" first.
91
+ ```
92
+
93
+ ### 2. Scenario-by-Scenario Verification
94
+
95
+ Automatic verification for each scenario:
96
+
97
+ ```
98
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
99
+ 🔍 Scenario 1/4: Valid login success
100
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
101
+
102
+ Given: User is registered
103
+ → Verify: User creation API exists? ✅
104
+ → Verify: Test user data available? ✅
105
+
106
+ When: Login with valid email and password
107
+ → Verify: POST /login endpoint exists? ✅
108
+ → Verify: Request handling logic exists? ✅
109
+
110
+ Then: Login success + JWT token returned
111
+ → Verify: Success response code 200? ✅
112
+ → Verify: JWT token included? ✅
113
+
114
+ ✅ Scenario 1 passed!
115
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
116
+ ```
117
+
118
+ ### 3. Verification Methods (PARALLEL — run all applicable at once)
119
+
120
+ > **Run these as parallel sub-agents, not sequentially in main session.**
121
+ > Each method returns pass/fail summary (~200 tokens) instead of bloating main context.
122
+
123
+ | Method | Agent | Condition |
124
+ |--------|-------|-----------|
125
+ | **Test Execution** | `Task(Bash, "npm test")` | When test files exist |
126
+ | **Build Verification** | `Task(Bash, "npm run build")` | When build script exists |
127
+ | **Type Check** | `Task(subagent_type="typescript-reviewer")` | TypeScript projects |
128
+ | **Code Analysis** | `Task(subagent_type="explorer-low")` | Always (verify logic against SPEC) |
129
+ | **E2E Closed Loop** | `Task(subagent_type="e2e-tester")` | `--e2e` flag or UI scenarios |
130
+
131
+ ```text
132
+ # Launch ALL applicable methods in ONE message (parallel)
133
+ Task(Bash, command="npm run build && echo BUILD_OK || echo BUILD_FAIL")
134
+ Task(Bash, command="npm test -- --reporter=verbose 2>&1 | tail -20")
135
+ Task(subagent_type="explorer-low", prompt="Verify [scenario] Given/When/Then against code...")
136
+ ```
137
+
138
+ ### 3.1. E2E Closed Loop Verification (`--e2e`)
139
+
140
+ **AI가 직접 브라우저를 조작하여 시나리오를 검증하고, 실패 시 자동 수정 후 재검증한다.**
141
+
142
+ ```
143
+ 구현 → E2E 검증 → 실패 → 수정 → 재검증 → ... → 통과
144
+ ↑_____________________________________↓
145
+ Closed Loop: 사람 개입 없이 AI가 완주
146
+ ```
147
+
148
+ **Browser Tool Priority (토큰 효율 순):**
149
+
150
+ | Priority | Tool | 토큰/액션 | 사용 조건 |
151
+ |----------|------|----------|----------|
152
+ | 1st | Agent Browser (접근성 트리) | ~6-20 chars | MCP 사용 가능 시 |
153
+ | 2nd | Playwright Test Runner | pass/fail만 | 테스트 코드 실행 |
154
+ | 3rd | Playwright MCP (DOM) | ~12,000+ chars | 최후 수단 |
155
+
156
+ **Closed Loop 실행 흐름:**
157
+
158
+ ```
159
+ For each UI scenario in Feature file:
160
+ 1. [Browser] Navigate → Find elements → Interact → Assert
161
+ 2. PASS → Next scenario
162
+ 3. FAIL → Collect evidence (screenshot, console errors)
163
+ → Root cause analysis
164
+ → Fix code (Read full file first, then edit)
165
+ → Re-run ONLY failed scenario (max 3 retries)
166
+ 4. 3x FAIL → Report as manual fix needed
167
+ ```
168
+
169
+ **핵심 원칙: 검증이 가벼워야 루프가 충분히 돈다.**
170
+ - 접근성 트리 기반: `button "Sign In"` = 15 chars
171
+ - DOM 기반: `div class="nav-wrapper mx-4 flex..."` = 200+ chars
172
+ - 전자를 사용해야 시나리오 50개도 한 세션에서 검증 가능
173
+
174
+ ### 4. Quality Report (Auto-generated)
175
+
176
+ ```
177
+ ┌─────────────────────────────────────────────────────────────────┐
178
+ │ 📊 VERIFICATION REPORT: login │
179
+ ├─────────────────────────────────────────────────────────────────┤
180
+ │ │
181
+ │ ✅ Scenarios: 4/4 passed (100%) │
182
+ │ │
183
+ │ ┌───────────────────────────────────────────────────────────┐ │
184
+ │ │ # │ Scenario │ Given │ When │ Then │ Status │ │
185
+ │ │───│───────────────────────│───────│──────│──────│────────│ │
186
+ │ │ 1 │ Valid login success │ ✅ │ ✅ │ ✅ │ ✅ │ │
187
+ │ │ 2 │ Invalid password error│ ✅ │ ✅ │ ✅ │ ✅ │ │
188
+ │ │ 3 │ Email format validation│ ✅ │ ✅ │ ✅ │ ✅ │ │
189
+ │ │ 4 │ Forgot password link │ ✅ │ ✅ │ ✅ │ ✅ │ │
190
+ │ └───────────────────────────────────────────────────────────┘ │
191
+ │ │
192
+ │ 📈 Quality Score: 94/100 │
193
+ │ │
194
+ │ ┌─────────────────────────────────────────────────────────┐ │
195
+ │ │ Item │ Result│ Details │ │
196
+ │ │───────────────────│───────│─────────────────────────────│ │
197
+ │ │ Build │ ✅ │ Success │ │
198
+ │ │ Tests │ ✅ │ 12/12 passed │ │
199
+ │ │ Type Check │ ✅ │ 0 errors │ │
200
+ │ │ Complexity │ ✅ │ All functions ≤30 lines │ │
201
+ │ │ Code Coverage │ ⚠️ │ 78% (target: 80%) │ │
202
+ │ └─────────────────────────────────────────────────────────┘ │
203
+ │ │
204
+ │ 📋 Recommendations: │
205
+ │ - Need 2% more code coverage (auth.service.ts line 45-52) │
206
+ │ │
207
+ │ ⏱️ Started: {start_time} │
208
+ │ ⏱️ Completed: {getCurrentTime 결과} │
209
+ │ │
210
+ └─────────────────────────────────────────────────────────────────┘
211
+ ```
212
+
213
+ ### Failure Report
214
+
215
+ ```
216
+ ┌─────────────────────────────────────────────────────────────────┐
217
+ │ 📊 VERIFICATION REPORT: login │
218
+ ├─────────────────────────────────────────────────────────────────┤
219
+ │ │
220
+ │ ❌ Scenarios: 3/4 passed (75%) │
221
+ │ │
222
+ │ ┌───────────────────────────────────────────────────────────┐ │
223
+ │ │ # │ Scenario │ Given │ When │ Then │ Status │ │
224
+ │ │───│───────────────────────│───────│──────│──────│────────│ │
225
+ │ │ 1 │ Valid login success │ ✅ │ ✅ │ ✅ │ ✅ │ │
226
+ │ │ 2 │ Invalid password error│ ✅ │ ✅ │ ✅ │ ✅ │ │
227
+ │ │ 3 │ Email format validation│ ✅ │ ✅ │ ✅ │ ✅ │ │
228
+ │ │ 4 │ Forgot password link │ ✅ │ ❌ │ - │ ❌ │ │
229
+ │ └───────────────────────────────────────────────────────────┘ │
230
+ │ │
231
+ │ ❌ Failure Details: │
232
+ │ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ │
233
+ │ Scenario 4: Forgot password link │
234
+ │ │
235
+ │ When: Click "Forgot password" │
236
+ │ ❌ Issue: Link not implemented │
237
+ │ 📍 Location: LoginForm.tsx line 42 │
238
+ │ 💡 Fix: Need to add "Forgot password" link │
239
+ │ │
240
+ │ 🔧 Auto-fix command: /vibe.run "login" --fix │
241
+ │ │
242
+ └─────────────────────────────────────────────────────────────────┘
243
+ ```
244
+
245
+ ## Input
246
+
247
+ - `.claude/vibe/features/{feature-name}.feature` or `.claude/vibe/features/{feature-name}/` - BDD scenarios
248
+ - `.claude/vibe/specs/{feature-name}.md` or `.claude/vibe/specs/{feature-name}/` - SPEC document (reference)
249
+ - Implemented source code
250
+
251
+ ## Output
252
+
253
+ - Verification result report (terminal output)
254
+ - Passed/failed scenario list
255
+ - Items needing fixes
256
+
257
+ ## Example
258
+
259
+ ```
260
+ User: /vibe.verify "login"
261
+
262
+ Claude:
263
+ 📄 Loading Feature: .claude/vibe/features/login.feature
264
+ 🔍 Starting verification...
265
+
266
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
267
+ 🔍 Scenario 1/4: Valid login success
268
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
269
+ ✅ Given: User registered - OK
270
+ ✅ When: Login attempt - OK
271
+ ✅ Then: JWT token returned - OK
272
+ ✅ Passed!
273
+
274
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
275
+ 🔍 Scenario 2/4: Invalid password error
276
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
277
+ ✅ Given: OK
278
+ ✅ When: OK
279
+ ✅ Then: OK
280
+ ✅ Passed!
281
+
282
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
283
+ 🔍 Scenario 3/4: Email format validation
284
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
285
+ ✅ Given: OK
286
+ ✅ When: OK
287
+ ✅ Then: OK
288
+ ✅ Passed!
289
+
290
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
291
+ 🔍 Scenario 4/4: Forgot password link
292
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
293
+ ✅ Given: OK
294
+ ❌ When: "Forgot password" link - missing
295
+ - Then: (skipped)
296
+ ❌ Failed!
297
+
298
+ ┌─────────────────────────────────────────────────────────────────┐
299
+ │ 📊 VERIFICATION REPORT: login │
300
+ ├─────────────────────────────────────────────────────────────────┤
301
+ │ │
302
+ │ ❌ Scenarios: 3/4 passed (75%) │
303
+ │ │
304
+ │ | # | Scenario | Status | │
305
+ │ |---|───────────────────────|────────| │
306
+ │ | 1 | Valid login success | ✅ | │
307
+ │ | 2 | Invalid password error| ✅ | │
308
+ │ | 3 | Email format validation| ✅ | │
309
+ │ | 4 | Forgot password link | ❌ | │
310
+ │ │
311
+ │ 📈 Quality Score: 75/100 │
312
+ │ │
313
+ │ ❌ Fixes needed: │
314
+ │ - Scenario 4: Add "Forgot password" link in LoginForm.tsx │
315
+ │ │
316
+ │ 🔧 Auto-fix: /vibe.run "login" --fix │
317
+ │ │
318
+ └─────────────────────────────────────────────────────────────────┘
319
+ ```
320
+
321
+ ## Core Tools (Code Analysis & Quality)
322
+
323
+ ### Tool Invocation
324
+
325
+ All tools are called via:
326
+
327
+ ```bash
328
+ node -e "import('{{VIBE_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)))"
329
+ ```
330
+
331
+ ### Recommended Tools for Verification
332
+
333
+ | Tool | Purpose | When to Use |
334
+ |------|---------|-------------|
335
+ | `validateCodeQuality` | Code quality validation | Check complexity, style violations |
336
+ | `analyzeComplexity` | Complexity analysis | Verify function length, nesting depth |
337
+ | `findSymbol` | Find implementations | Verify feature implementation exists |
338
+ | `findReferences` | Find usages | Check if all references are correct |
339
+
340
+ ### Example Tool Usage in Verification
341
+
342
+ **1. Validate code quality:**
343
+
344
+ ```bash
345
+ node -e "import('{{VIBE_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)))"
346
+ ```
347
+
348
+ **2. Analyze complexity of implementation:**
349
+
350
+ ```bash
351
+ node -e "import('{{VIBE_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)))"
352
+ ```
353
+
354
+ **3. Find implemented feature:**
355
+
356
+ ```bash
357
+ node -e "import('{{VIBE_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)))"
358
+ ```
359
+
360
+ ## Next Step
361
+
362
+ On verification pass:
363
+
364
+ ```
365
+ Complete! Proceed to next feature.
366
+ ```
367
+
368
+ On verification fail:
369
+
370
+ ```
371
+ /vibe.run "feature-name" --fix # Fix failed scenarios
372
+ ```
373
+
374
+ ---
375
+
376
+ ## Quality Gate (Mandatory)
377
+
378
+ ### Verification Quality Checklist
379
+
380
+ Before marking verification complete, ALL items must pass:
381
+
382
+ | Category | Check Item | Weight |
383
+ |----------|------------|--------|
384
+ | **Scenario Coverage** | All scenarios from feature file tested | 25% |
385
+ | **Given Verification** | All preconditions validated | 15% |
386
+ | **When Verification** | All actions executable | 15% |
387
+ | **Then Verification** | All expected outcomes confirmed | 20% |
388
+ | **Build Status** | Project builds without errors | 10% |
389
+ | **Test Status** | All existing tests pass | 10% |
390
+ | **Type Check** | No TypeScript/type errors | 5% |
391
+
392
+ ### Verification Score Calculation
393
+
394
+ ```
395
+ Score = (passed_scenarios / total_scenarios) × 100
396
+
397
+ Grades:
398
+ - 100%: ✅ PERFECT - All scenarios pass
399
+ - 90-99%: ⚠️ ALMOST - Minor gaps, review needed
400
+ - 70-89%: ❌ INCOMPLETE - Significant gaps
401
+ - 0-69%: ❌ FAILED - Major implementation missing
402
+ ```
403
+
404
+ ### Pass/Fail Criteria
405
+
406
+ | Metric | Pass Threshold | Action on Fail |
407
+ |--------|----------------|----------------|
408
+ | Scenario pass rate | 100% | Run `/vibe.run --fix` |
409
+ | Build status | Success | Fix build errors first |
410
+ | Test pass rate | 100% | Fix failing tests |
411
+ | Type check | 0 errors | Fix type errors |
412
+
413
+ ### Verification Methods Matrix
414
+
415
+ | Method | Trigger Condition | What It Checks |
416
+ |--------|-------------------|----------------|
417
+ | **Code Analysis** | Always | Implementation exists |
418
+ | **Test Execution** | Test files exist | Logic correctness |
419
+ | **Build Verification** | Build script exists | Compilation success |
420
+ | **Type Check** | tsconfig.json exists | Type safety |
421
+ | **Lint Check** | ESLint config exists | Code style |
422
+
423
+ ### Scenario Verification Depth
424
+
425
+ For each scenario, verify at THREE levels:
426
+
427
+ | Level | Verification | Example |
428
+ |-------|--------------|---------|
429
+ | **L1: Existence** | Code/function exists | `login()` function defined |
430
+ | **L2: Logic** | Implementation is correct | Validates email format |
431
+ | **L3: Integration** | Works with other components | Returns valid JWT |
432
+
433
+ ### Auto-Fix Triggers
434
+
435
+ | Verification Failure | Auto-Fix Action |
436
+ |----------------------|-----------------|
437
+ | Missing implementation | Generate skeleton from scenario |
438
+ | Test failure | Analyze and suggest fix |
439
+ | Build error | Show error location |
440
+ | Type error | Suggest type annotations |
441
+
442
+ ### Failure Escalation (max 3 retries)
443
+
444
+ ```
445
+ Auto-fix attempt 1 → Re-verify
446
+ ❌ Still failing?
447
+ Auto-fix attempt 2 → Re-verify
448
+ ❌ Still failing?
449
+ Auto-fix attempt 3 → Re-verify
450
+ ❌ Still failing?
451
+ → STOP. Do NOT retry further.
452
+ → Record failure in .claude/vibe/todos/verify-failure-{scenario}.md
453
+ → Report to user: "Scenario X failed after 3 attempts. Manual review needed."
454
+ → Continue to next scenario (don't block entire verification)
455
+ ```
456
+
457
+ ### Verification Report Requirements
458
+
459
+ Every verification MUST produce:
460
+
461
+ 1. **Scenario Summary Table**
462
+ - Scenario name
463
+ - Given/When/Then status (✅/❌)
464
+ - Overall status
465
+
466
+ 2. **Quality Metrics**
467
+ - Build status
468
+ - Test pass count
469
+ - Type error count
470
+ - Code coverage percentage
471
+
472
+ 3. **Failure Details** (if any)
473
+ - Exact failure point (Given/When/Then)
474
+ - Expected vs actual
475
+ - File path and line number
476
+ - Suggested fix command
477
+
478
+ 4. **Recommendations**
479
+ - Specific files to modify
480
+ - Auto-fix command if available
481
+
482
+ ---
483
+
484
+ ARGUMENTS: $ARGUMENTS