@su-record/vibe 2.6.16 → 2.6.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/CLAUDE.md +681 -681
  2. package/LICENSE +21 -21
  3. package/README.md +235 -203
  4. package/agents/architect-low.md +41 -41
  5. package/agents/architect-medium.md +59 -59
  6. package/agents/architect.md +80 -80
  7. package/agents/build-error-resolver.md +115 -115
  8. package/agents/compounder.md +261 -261
  9. package/agents/diagrammer.md +178 -178
  10. package/agents/e2e-tester.md +266 -266
  11. package/agents/explorer-low.md +42 -42
  12. package/agents/explorer-medium.md +59 -59
  13. package/agents/explorer.md +48 -48
  14. package/agents/implementer-low.md +43 -43
  15. package/agents/implementer-medium.md +52 -52
  16. package/agents/implementer.md +54 -54
  17. package/agents/refactor-cleaner.md +143 -143
  18. package/agents/research/best-practices-agent.md +199 -199
  19. package/agents/research/codebase-patterns-agent.md +157 -157
  20. package/agents/research/framework-docs-agent.md +188 -188
  21. package/agents/research/security-advisory-agent.md +213 -213
  22. package/agents/review/architecture-reviewer.md +107 -107
  23. package/agents/review/complexity-reviewer.md +116 -116
  24. package/agents/review/data-integrity-reviewer.md +88 -88
  25. package/agents/review/git-history-reviewer.md +103 -103
  26. package/agents/review/performance-reviewer.md +86 -86
  27. package/agents/review/python-reviewer.md +150 -150
  28. package/agents/review/rails-reviewer.md +139 -139
  29. package/agents/review/react-reviewer.md +144 -144
  30. package/agents/review/security-reviewer.md +80 -80
  31. package/agents/review/simplicity-reviewer.md +140 -140
  32. package/agents/review/test-coverage-reviewer.md +116 -116
  33. package/agents/review/typescript-reviewer.md +127 -127
  34. package/agents/searcher.md +54 -54
  35. package/agents/simplifier.md +120 -120
  36. package/agents/tester.md +49 -49
  37. package/agents/ui-previewer.md +268 -268
  38. package/commands/vibe.analyze.md +356 -356
  39. package/commands/vibe.reason.md +329 -329
  40. package/commands/vibe.review.md +412 -412
  41. package/commands/vibe.run.md +1266 -1266
  42. package/commands/vibe.spec.md +1054 -1054
  43. package/commands/vibe.spec.review.md +319 -319
  44. package/commands/vibe.trace.md +161 -161
  45. package/commands/vibe.utils.md +376 -376
  46. package/commands/vibe.verify.md +375 -375
  47. package/dist/cli/collaborator.js +52 -52
  48. package/dist/cli/detect.js +32 -32
  49. package/dist/cli/hud.js +20 -20
  50. package/dist/cli/index.d.ts.map +1 -1
  51. package/dist/cli/index.js +120 -118
  52. package/dist/cli/index.js.map +1 -1
  53. package/dist/cli/llm.js +144 -144
  54. package/dist/cli/postinstall.d.ts +1 -0
  55. package/dist/cli/postinstall.d.ts.map +1 -1
  56. package/dist/cli/postinstall.js +859 -859
  57. package/dist/cli/postinstall.js.map +1 -1
  58. package/dist/cli/setup/ProjectSetup.d.ts +2 -2
  59. package/dist/cli/setup/ProjectSetup.d.ts.map +1 -1
  60. package/dist/cli/setup/ProjectSetup.js +51 -17
  61. package/dist/cli/setup/ProjectSetup.js.map +1 -1
  62. package/dist/lib/DeepInit.js +24 -24
  63. package/dist/lib/IterationTracker.js +11 -11
  64. package/dist/lib/PythonParser.js +108 -108
  65. package/dist/lib/ReviewRace.js +96 -96
  66. package/dist/lib/SkillFrontmatter.js +28 -28
  67. package/dist/lib/SkillQualityGate.js +9 -9
  68. package/dist/lib/SkillRepository.js +159 -159
  69. package/dist/lib/UltraQA.js +77 -77
  70. package/dist/lib/gemini-api.js +5 -5
  71. package/dist/lib/gpt-api.js +4 -4
  72. package/dist/lib/memory/KnowledgeGraph.js +4 -4
  73. package/dist/lib/memory/MemorySearch.js +20 -20
  74. package/dist/lib/memory/MemoryStorage.js +64 -64
  75. package/dist/orchestrator/AgentManager.js +12 -12
  76. package/dist/orchestrator/MultiLlmResearch.js +8 -8
  77. package/dist/orchestrator/SmartRouter.js +11 -11
  78. package/dist/orchestrator/SwarmOrchestrator.d.ts +144 -0
  79. package/dist/orchestrator/SwarmOrchestrator.d.ts.map +1 -0
  80. package/dist/orchestrator/SwarmOrchestrator.js +361 -0
  81. package/dist/orchestrator/SwarmOrchestrator.js.map +1 -0
  82. package/dist/orchestrator/SwarmOrchestrator.test.d.ts +5 -0
  83. package/dist/orchestrator/SwarmOrchestrator.test.d.ts.map +1 -0
  84. package/dist/orchestrator/SwarmOrchestrator.test.js +95 -0
  85. package/dist/orchestrator/SwarmOrchestrator.test.js.map +1 -0
  86. package/dist/orchestrator/index.d.ts +2 -0
  87. package/dist/orchestrator/index.d.ts.map +1 -1
  88. package/dist/orchestrator/index.js +2 -0
  89. package/dist/orchestrator/index.js.map +1 -1
  90. package/dist/orchestrator/parallelResearch.js +24 -24
  91. package/dist/tools/convention/analyzeComplexity.test.js +115 -115
  92. package/dist/tools/convention/validateCodeQuality.test.js +104 -104
  93. package/dist/tools/spec/prdParser.test.js +171 -171
  94. package/dist/tools/spec/specGenerator.js +169 -169
  95. package/dist/tools/spec/traceabilityMatrix.js +64 -64
  96. package/dist/tools/spec/traceabilityMatrix.test.js +28 -28
  97. package/hooks/hooks.json +222 -222
  98. package/hooks/scripts/code-check.js +22 -22
  99. package/hooks/scripts/code-review.js +22 -22
  100. package/hooks/scripts/complexity.js +22 -22
  101. package/hooks/scripts/compound.js +23 -23
  102. package/hooks/scripts/context-save.js +33 -33
  103. package/hooks/scripts/gemini-ui-gen.js +281 -281
  104. package/hooks/scripts/generate-brand-assets.js +474 -474
  105. package/hooks/scripts/hud-multiline.js +262 -262
  106. package/hooks/scripts/hud-status.js +291 -291
  107. package/hooks/scripts/keyword-detector.js +214 -214
  108. package/hooks/scripts/llm-orchestrate.js +171 -171
  109. package/hooks/scripts/post-edit.js +97 -97
  110. package/hooks/scripts/post-tool-verify.js +210 -210
  111. package/hooks/scripts/pre-tool-guard.js +125 -125
  112. package/hooks/scripts/recall.js +22 -22
  113. package/hooks/scripts/session-start.js +30 -30
  114. package/hooks/scripts/skill-injector.js +191 -191
  115. package/hooks/scripts/utils.js +97 -97
  116. package/languages/csharp-unity.md +515 -515
  117. package/languages/gdscript-godot.md +470 -470
  118. package/languages/ruby-rails.md +489 -489
  119. package/languages/typescript-angular.md +433 -433
  120. package/languages/typescript-astro.md +416 -416
  121. package/languages/typescript-electron.md +406 -406
  122. package/languages/typescript-nestjs.md +524 -524
  123. package/languages/typescript-svelte.md +407 -407
  124. package/languages/typescript-tauri.md +365 -365
  125. package/package.json +84 -84
  126. package/skills/brand-assets.md +141 -141
  127. package/skills/commerce-patterns.md +361 -361
  128. package/skills/context7-usage.md +102 -102
  129. package/skills/e2e-commerce.md +304 -304
  130. package/skills/frontend-design.md +92 -92
  131. package/skills/git-worktree.md +181 -181
  132. package/skills/parallel-research.md +77 -77
  133. package/skills/priority-todos.md +239 -239
  134. package/skills/seo-checklist.md +244 -244
  135. package/skills/tool-fallback.md +190 -190
  136. package/skills/vibe-capabilities.md +161 -161
  137. package/vibe/constitution.md +227 -227
  138. package/vibe/rules/core/communication-guide.md +98 -98
  139. package/vibe/rules/core/development-philosophy.md +52 -52
  140. package/vibe/rules/core/quick-start.md +102 -102
  141. package/vibe/rules/quality/bdd-contract-testing.md +393 -393
  142. package/vibe/rules/quality/checklist.md +276 -276
  143. package/vibe/rules/quality/testing-strategy.md +440 -440
  144. package/vibe/rules/standards/anti-patterns.md +541 -541
  145. package/vibe/rules/standards/code-structure.md +291 -291
  146. package/vibe/rules/standards/complexity-metrics.md +313 -313
  147. package/vibe/rules/standards/naming-conventions.md +198 -198
  148. package/vibe/setup.sh +31 -31
  149. package/vibe/templates/constitution-template.md +252 -252
  150. package/vibe/templates/contract-backend-template.md +526 -526
  151. package/vibe/templates/contract-frontend-template.md +599 -599
  152. package/vibe/templates/feature-template.md +96 -96
  153. package/vibe/templates/spec-template.md +221 -221
  154. package/dist/cli/mcp.d.ts +0 -49
  155. package/dist/cli/mcp.d.ts.map +0 -1
  156. package/dist/cli/mcp.js +0 -169
  157. package/dist/cli/mcp.js.map +0 -1
  158. package/dist/lib/gemini-mcp.d.ts +0 -10
  159. package/dist/lib/gemini-mcp.d.ts.map +0 -1
  160. package/dist/lib/gemini-mcp.js +0 -353
  161. package/dist/lib/gemini-mcp.js.map +0 -1
  162. package/dist/lib/gpt-mcp.d.ts +0 -10
  163. package/dist/lib/gpt-mcp.d.ts.map +0 -1
  164. package/dist/lib/gpt-mcp.js +0 -352
  165. package/dist/lib/gpt-mcp.js.map +0 -1
  166. package/dist/tools/analytics/getUsageAnalytics.d.ts +0 -10
  167. package/dist/tools/analytics/getUsageAnalytics.d.ts.map +0 -1
  168. package/dist/tools/analytics/getUsageAnalytics.js +0 -246
  169. package/dist/tools/analytics/getUsageAnalytics.js.map +0 -1
  170. package/dist/tools/analytics/index.d.ts +0 -5
  171. package/dist/tools/analytics/index.d.ts.map +0 -1
  172. package/dist/tools/analytics/index.js +0 -5
  173. package/dist/tools/analytics/index.js.map +0 -1
  174. package/dist/tools/convention/getCodingGuide.d.ts +0 -7
  175. package/dist/tools/convention/getCodingGuide.d.ts.map +0 -1
  176. package/dist/tools/convention/getCodingGuide.js +0 -69
  177. package/dist/tools/convention/getCodingGuide.js.map +0 -1
  178. package/dist/tools/planning/analyzeRequirements.d.ts +0 -9
  179. package/dist/tools/planning/analyzeRequirements.d.ts.map +0 -1
  180. package/dist/tools/planning/analyzeRequirements.js +0 -171
  181. package/dist/tools/planning/analyzeRequirements.js.map +0 -1
  182. package/dist/tools/planning/createUserStories.d.ts +0 -9
  183. package/dist/tools/planning/createUserStories.d.ts.map +0 -1
  184. package/dist/tools/planning/createUserStories.js +0 -124
  185. package/dist/tools/planning/createUserStories.js.map +0 -1
  186. package/dist/tools/planning/featureRoadmap.d.ts +0 -10
  187. package/dist/tools/planning/featureRoadmap.d.ts.map +0 -1
  188. package/dist/tools/planning/featureRoadmap.js +0 -207
  189. package/dist/tools/planning/featureRoadmap.js.map +0 -1
  190. package/dist/tools/planning/generatePrd.d.ts +0 -11
  191. package/dist/tools/planning/generatePrd.d.ts.map +0 -1
  192. package/dist/tools/planning/generatePrd.js +0 -161
  193. package/dist/tools/planning/generatePrd.js.map +0 -1
  194. package/dist/tools/planning/index.d.ts +0 -8
  195. package/dist/tools/planning/index.d.ts.map +0 -1
  196. package/dist/tools/planning/index.js +0 -8
  197. package/dist/tools/planning/index.js.map +0 -1
  198. package/dist/tools/prompt/analyzePrompt.d.ts +0 -7
  199. package/dist/tools/prompt/analyzePrompt.d.ts.map +0 -1
  200. package/dist/tools/prompt/analyzePrompt.js +0 -150
  201. package/dist/tools/prompt/analyzePrompt.js.map +0 -1
  202. package/dist/tools/prompt/enhancePrompt.d.ts +0 -8
  203. package/dist/tools/prompt/enhancePrompt.d.ts.map +0 -1
  204. package/dist/tools/prompt/enhancePrompt.js +0 -110
  205. package/dist/tools/prompt/enhancePrompt.js.map +0 -1
  206. package/dist/tools/prompt/enhancePromptGemini.d.ts +0 -8
  207. package/dist/tools/prompt/enhancePromptGemini.d.ts.map +0 -1
  208. package/dist/tools/prompt/enhancePromptGemini.js +0 -332
  209. package/dist/tools/prompt/enhancePromptGemini.js.map +0 -1
  210. package/dist/tools/prompt/index.d.ts +0 -7
  211. package/dist/tools/prompt/index.d.ts.map +0 -1
  212. package/dist/tools/prompt/index.js +0 -7
  213. package/dist/tools/prompt/index.js.map +0 -1
  214. package/dist/tools/reasoning/applyReasoningFramework.d.ts +0 -8
  215. package/dist/tools/reasoning/applyReasoningFramework.d.ts.map +0 -1
  216. package/dist/tools/reasoning/applyReasoningFramework.js +0 -266
  217. package/dist/tools/reasoning/applyReasoningFramework.js.map +0 -1
  218. package/dist/tools/reasoning/index.d.ts +0 -5
  219. package/dist/tools/reasoning/index.d.ts.map +0 -1
  220. package/dist/tools/reasoning/index.js +0 -5
  221. package/dist/tools/reasoning/index.js.map +0 -1
  222. package/dist/tools/thinking/analyzeProblem.d.ts +0 -7
  223. package/dist/tools/thinking/analyzeProblem.d.ts.map +0 -1
  224. package/dist/tools/thinking/analyzeProblem.js +0 -55
  225. package/dist/tools/thinking/analyzeProblem.js.map +0 -1
  226. package/dist/tools/thinking/breakDownProblem.d.ts +0 -8
  227. package/dist/tools/thinking/breakDownProblem.d.ts.map +0 -1
  228. package/dist/tools/thinking/breakDownProblem.js +0 -145
  229. package/dist/tools/thinking/breakDownProblem.js.map +0 -1
  230. package/dist/tools/thinking/createThinkingChain.d.ts +0 -7
  231. package/dist/tools/thinking/createThinkingChain.d.ts.map +0 -1
  232. package/dist/tools/thinking/createThinkingChain.js +0 -44
  233. package/dist/tools/thinking/createThinkingChain.js.map +0 -1
  234. package/dist/tools/thinking/formatAsPlan.d.ts +0 -9
  235. package/dist/tools/thinking/formatAsPlan.d.ts.map +0 -1
  236. package/dist/tools/thinking/formatAsPlan.js +0 -78
  237. package/dist/tools/thinking/formatAsPlan.js.map +0 -1
  238. package/dist/tools/thinking/index.d.ts +0 -10
  239. package/dist/tools/thinking/index.d.ts.map +0 -1
  240. package/dist/tools/thinking/index.js +0 -10
  241. package/dist/tools/thinking/index.js.map +0 -1
  242. package/dist/tools/thinking/stepByStepAnalysis.d.ts +0 -8
  243. package/dist/tools/thinking/stepByStepAnalysis.d.ts.map +0 -1
  244. package/dist/tools/thinking/stepByStepAnalysis.js +0 -63
  245. package/dist/tools/thinking/stepByStepAnalysis.js.map +0 -1
  246. package/dist/tools/thinking/thinkAloudProcess.d.ts +0 -8
  247. package/dist/tools/thinking/thinkAloudProcess.d.ts.map +0 -1
  248. package/dist/tools/thinking/thinkAloudProcess.js +0 -80
  249. package/dist/tools/thinking/thinkAloudProcess.js.map +0 -1
@@ -1,1054 +1,1054 @@
1
- ---
2
- description: Create SPEC document with Specification Agent
3
- argument-hint: "feature name"
4
- ---
5
-
6
- # /vibe.spec
7
-
8
- Create a SPEC document (Specification Agent).
9
-
10
- ## Usage
11
-
12
- ```
13
- /vibe.spec "feature-name" # Conversation mode (requirements gathering)
14
- /vibe.spec "feature-name" ultrawork # Auto: SPEC → Review → Implementation
15
- /vibe.spec "docs/login-prd.md" # File path input (auto-detected)
16
- /vibe.spec + 📎 file attachment # Use attached file
17
- ```
18
-
19
- ### ultrawork Mode
20
-
21
- When `ultrawork` (or `ulw`) is included, automatically chains:
22
-
23
- ```
24
- /vibe.spec "feature" ultrawork
25
-
26
- [1] SPEC Creation (this command)
27
-
28
- [2] Auto: /vibe.spec.review "{feature}"
29
-
30
- [3] Auto: /vibe.run "{feature}" ultrawork
31
- ```
32
-
33
- **No manual intervention between steps.**
34
-
35
- ## Input Mode Detection (Auto-detect)
36
-
37
- **Input priority:**
38
-
39
- ```
40
- 1. Attachment exists? → Use attached file
41
- 2. Argument is file path? (existence check) → Read file
42
- 3. Otherwise → Conversation mode (start with feature name)
43
- ```
44
-
45
- | Input | Result |
46
- |-------|--------|
47
- | 📎 Attached file | → Analyze attached file |
48
- | File path (exists) | → Read file (Read tool) |
49
- | Feature name | → Start conversation mode |
50
-
51
- **All supported files:**
52
- - Text: `.md`, `.txt`, `.rst`, `.html`, `.json`, `.yaml`, etc.
53
- - Documents: `.pdf` (page-by-page analysis)
54
- - Images: `.png`, `.jpg`, `.jpeg`, `.gif`, `.webp`, `.svg`, etc.
55
- - Notebooks: `.ipynb` (Jupyter)
56
- - **All formats Claude can read**
57
-
58
- **File input mode flow:**
59
-
60
- ```
61
- /vibe.spec "docs/login-prd.md"
62
-
63
- 📄 File loaded: docs/login-prd.md (2.3KB)
64
-
65
- 📋 Parsed requirements:
66
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
67
- Feature: Login
68
- - Email/password login
69
- - Social login (Google, Apple)
70
- - Password recovery
71
- - Auto login persistence
72
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
73
-
74
- ❓ Additional confirmation needed:
75
- 1. Session expiration time? (default: 24 hours)
76
- 2. Allow concurrent login?
77
- 3. Confirm tech stack? (current: React + Supabase)
78
-
79
- User: 1 hour, disallow, confirm
80
-
81
- ✅ Requirements confirmed → Run research → Generate SPEC → Review
82
- ```
83
-
84
- **Supported file formats:**
85
-
86
- | Format | Extension | Purpose |
87
- |--------|-----------|---------|
88
- | Markdown | `.md` | PRD, planning docs, README |
89
- | Text | `.txt` | Requirements list |
90
- | PDF | `.pdf` | Planning docs, design documents |
91
- | Image | `.png`, `.jpg`, `.jpeg`, `.webp` | Wireframes, UI design, screenshots |
92
-
93
- **Image input example:**
94
- ```
95
- /vibe.spec "designs/login-wireframe.png"
96
-
97
- 🖼️ Image analysis: designs/login-wireframe.png
98
-
99
- 📋 Detected UI elements:
100
- - Email input field
101
- - Password input field
102
- - "Login" button
103
- - "Forgot password" link
104
- - Social login buttons (Google, Apple)
105
-
106
- ❓ Confirmation needed:
107
- 1. Feature name? (e.g., "login")
108
- 2. Additional requirements?
109
-
110
- → Generate SPEC
111
- ```
112
-
113
- ## Rules Reference
114
-
115
- **Must follow `~/.claude/vibe/rules/` (global):**
116
- - `core/development-philosophy.md` - Surgical precision, simplicity
117
- - `core/quick-start.md` - Korean first, DRY, SRP
118
- - `core/communication-guide.md` - Communication principles
119
-
120
- ## Description
121
-
122
- Collect requirements through conversation with the user and create an **AI-executable PTCF structured SPEC document**.
123
-
124
- > **PTCF**: Persona, Task, Context, Format - Google Gemini prompt optimization framework
125
-
126
- ## External LLM Integration (GPT/Gemini)
127
-
128
- When GPT/Gemini are enabled, they are automatically utilized during SPEC creation:
129
-
130
- ```
131
- /vibe.spec "feature"
132
-
133
- [Claude] Draft SPEC
134
-
135
- [Parallel Research] GPT + Gemini + Claude agents (8 parallel)
136
-
137
- [SPEC Review] GPT + Gemini parallel review
138
-
139
- [Claude] Finalize SPEC
140
- ```
141
-
142
- **Setup:**
143
- ```bash
144
- vibe gpt auth # Enable GPT (OAuth)
145
- vibe gemini auth # Enable Gemini (OAuth)
146
- vibe status # Check current settings
147
- ```
148
-
149
- ## Process
150
-
151
- ### 0. Git Branch Setup (MANDATORY - Execute First!)
152
-
153
- > ⚠️ **CRITICAL: You MUST execute this step FIRST before anything else!**
154
- > This is NOT optional documentation - you must RUN these git commands.
155
-
156
- **Step 0 is BLOCKING - do not proceed to Step 1 until branch is ready.**
157
-
158
- **Execute these commands using Bash tool:**
159
-
160
- ```bash
161
- # 1. Check current branch
162
- git branch --show-current
163
- ```
164
-
165
- **Then based on result:**
166
-
167
- | Current Branch | Action |
168
- |----------------|--------|
169
- | `main` or `master` | **MUST** create feature branch: `git checkout -b feature/{feature-name}` |
170
- | `feature/*` | Ask user: "Continue on this branch or create new?" |
171
- | Other | Ask user to confirm |
172
-
173
- **Example execution:**
174
-
175
- ```
176
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
177
- 🌿 GIT BRANCH SETUP
178
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
179
-
180
- Current branch: main
181
-
182
- Creating feature branch...
183
- $ git checkout -b feature/login-page
184
-
185
- ✅ Switched to new branch: feature/login-page
186
-
187
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
188
- ```
189
-
190
- **Branch naming rules:**
191
- - Convert to lowercase: `Login Page` → `login-page`
192
- - Replace spaces with hyphens
193
- - Prefix with `feature/`
194
- - Example: `feature/passkey-auth`, `feature/dark-mode`
195
-
196
- ### 1. Project Analysis
197
-
198
- **Existing project** (`vibe init`):
199
- - Source code analysis: `package.json`, `pyproject.toml`, `pubspec.yaml`, `go.mod`, etc.
200
- - Reference `CLAUDE.md` file (tech stack)
201
- - Infer framework from file structure
202
- - **Use `findSymbol` tool** to locate relevant existing implementations
203
-
204
- **New project** (`vibe init <project-name>`):
205
- - Suggest tech stack (2-3 options)
206
-
207
- ### 2. Collect Requirements via Conversation
208
-
209
- **Principles:**
210
- - Ask **one question at a time**
211
- - Present options **with numbers** + "Feel free to describe in your own words"
212
- - **Natural conversation** without fixed order
213
-
214
- **Required confirmations:**
215
- - Purpose (Why): Why is it needed?
216
- - User (Who): Who will use it?
217
- - Feature scope (What): What features are needed?
218
- - Tech stack: Confirm existing stack or suggest new
219
- - Design reference: UI/UX to reference
220
-
221
- ### 2.1 Critical Requirements Confirmation (askUser) - v2.6.1
222
-
223
- **🚨 IMPORTANT: Use `askUser` tool for CRITICAL requirements that must not be missed**
224
-
225
- After initial conversation, use the structured `askUser` tool for:
226
- - 🔐 Authentication: method, MFA, password policy
227
- - 🛡️ Security: rate limiting, session management
228
- - ⏱️ Session: duration, concurrent login policy
229
- - 📊 Data Model: required fields, relationships
230
-
231
- **When to use askUser vs conversation:**
232
-
233
- | Scenario | Method |
234
- |----------|--------|
235
- | Exploratory (feature scope, style) | Natural conversation |
236
- | **Critical** (auth, security, session) | `askUser` tool |
237
- | Optional (performance, integration) | Natural conversation |
238
-
239
- **Usage:**
240
-
241
- ```typescript
242
- import { askUser, askUserQuick } from '@su-record/vibe/tools';
243
-
244
- // Quick helper for common scenarios
245
- const result = await askUserQuick.login('my-login-feature');
246
- console.log(result.content[0].text);
247
-
248
- // Custom categories
249
- const result = await askUser({
250
- featureName: 'user-dashboard',
251
- categories: ['authentication', 'security', 'session', 'data_model'],
252
- context: 'Building a user dashboard with role-based access',
253
- });
254
- ```
255
-
256
- **Available categories:**
257
- - `authentication`: 인증 방식, MFA
258
- - `security`: 비밀번호 정책, 속도 제한
259
- - `session`: 세션 만료, 동시 로그인
260
- - `data_model`: 사용자 프로필 필드
261
- - `performance`: 응답 시간 목표
262
- - `integration`: 외부 서비스 연동
263
-
264
- **Example output:**
265
-
266
- ```
267
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
268
- 📋 요구사항 확인
269
- Feature: login
270
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
271
-
272
- ## 🔐 인증
273
-
274
- ### 🔐 Q-AUTHENTICATION-001
275
-
276
- **어떤 인증 방식을 지원할까요?**
277
- (복수 선택 가능)
278
-
279
- 1. **이메일/비밀번호** ✓
280
- 2. **Google 소셜 로그인**
281
- 3. **Apple 소셜 로그인**
282
- ...
283
-
284
- **필수**
285
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
286
- 총 6개 질문 (필수: 4개)
287
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
288
- ```
289
-
290
- **Response parsing:**
291
-
292
- ```typescript
293
- import { parseUserResponse } from '@su-record/vibe/tools';
294
-
295
- // User responds: "1, 2, 4" (선택한 옵션 번호)
296
- const response = parseUserResponse(question, "1, 2, 4");
297
- // { questionId: "Q-AUTH-001", value: ["email_password", "social_google", "passkey"], timestamp: "..." }
298
- ```
299
-
300
- **ultrawork mode:**
301
- - askUser is **skipped** in ultrawork mode
302
- - Uses default values from templates automatically
303
-
304
- ### 2.5. Reference Documents via config.json (MANDATORY after tech stack confirmed)
305
-
306
- **🚨 CRITICAL: Read config.json references IMMEDIATELY after tech stack is confirmed**
307
-
308
- Reference documents are automatically generated in `config.json` based on the stack detected during `vibe init`:
309
-
310
- ```json
311
- // .claude/vibe/config.json
312
- {
313
- "language": "ko",
314
- "stacks": [
315
- { "type": "typescript-react", "path": "package.json" }
316
- ],
317
- "references": {
318
- "rules": [
319
- "~/.claude/vibe/rules/code-quality.md",
320
- "~/.claude/vibe/rules/error-handling.md",
321
- "~/.claude/vibe/rules/security.md"
322
- ],
323
- "languages": [
324
- "~/.claude/vibe/languages/typescript-react.md"
325
- ],
326
- "templates": [
327
- "~/.claude/vibe/templates/spec-template.md",
328
- "~/.claude/vibe/templates/feature-template.md",
329
- "~/.claude/vibe/templates/constitution-template.md"
330
- ]
331
- }
332
- }
333
- ```
334
-
335
- **Workflow:**
336
-
337
- 1. Read `.claude/vibe/config.json`
338
- 2. Extract `references.languages[]` paths
339
- 3. Read each language document for stack-specific guidelines
340
-
341
- **Example:**
342
- ```bash
343
- # 1. Check references in config.json
344
- Read .claude/vibe/config.json
345
-
346
- # 2. Reference documents specified in references.languages
347
- Read ~/.claude/vibe/languages/typescript-react.md
348
- ```
349
-
350
- **Important:**
351
-
352
- - No manual mapping needed - config.json contains all reference paths
353
- - `config.json.references` is automatically referenced when running `/vibe.run`
354
- - Not copied to project (referenced from global package)
355
-
356
- ### 3. Parallel Research (v2.5.0) - MANDATORY AFTER requirements confirmed
357
-
358
- **🚨🚨🚨 ABSOLUTE RULES FOR RESEARCH PHASE 🚨🚨🚨**
359
-
360
- **STOP! Before doing ANY research, read this carefully:**
361
-
362
- 1. **DO NOT** use Task tool to spawn research agents
363
- 2. **DO NOT** use context7 MCP directly for research
364
- 3. **DO NOT** use WebSearch tool directly for research
365
- 4. **YOU MUST** use Bash tool to call llm-orchestrate.js directly
366
-
367
- **🚨🚨🚨 CRITICAL: NO FILE CREATION DURING RESEARCH 🚨🚨🚨**
368
-
369
- 5. **DO NOT** create any files in project root during research
370
- 6. **DO NOT** create SECURITY_*.md, RESEARCH_*.md, SUMMARY_*.md files
371
- 7. **DO NOT** use Write tool during research phase
372
- 8. **ALL research results** must be returned as text output only
373
- 9. **Files are ONLY created** in Step 4 (SPEC) and Step 5 (Feature) in `.claude/vibe/` directory
374
-
375
- **When to trigger:**
376
- 1. ✅ Feature type decided (e.g., "passkey authentication")
377
- 2. ✅ Tech stack confirmed (e.g., "React + Supabase")
378
- 3. ✅ Language guide copied (step 2.5)
379
- 4. ✅ Core requirements collected
380
-
381
- **→ IMMEDIATELY run these 4 Bash commands IN PARALLEL (all at once):**
382
-
383
- **🚨 MANDATORY: Copy the EXACT path below. DO NOT modify or use alternative paths.**
384
-
385
- ```bash
386
- # Cross-platform path (works on Windows/macOS/Linux)
387
- # ⚠️ COPY THIS EXACTLY - DO NOT USE ~/.claude/ or any other path!
388
- VIBE_SCRIPTS="$(node -p "process.env.APPDATA || require('os').homedir() + '/.config'")/vibe/hooks/scripts"
389
-
390
- # 1. GPT: Best practices
391
- node "$VIBE_SCRIPTS/llm-orchestrate.js" gpt orchestrate-json "Best practices for [FEATURE] with [STACK]. Focus: architecture patterns, code conventions. Return JSON: {patterns: [], antiPatterns: [], libraries: []}"
392
-
393
- # 2. GPT: Security
394
- node "$VIBE_SCRIPTS/llm-orchestrate.js" gpt orchestrate-json "Security vulnerabilities for [FEATURE] with [STACK]. Focus: CVE database, known exploits. Return JSON: {vulnerabilities: [], mitigations: [], checklist: []}"
395
-
396
- # 3. Gemini: Best practices
397
- node "$VIBE_SCRIPTS/llm-orchestrate.js" gemini orchestrate-json "Best practices for [FEATURE] with [STACK]. Focus: latest trends, framework updates. Return JSON: {patterns: [], antiPatterns: [], libraries: []}"
398
-
399
- # 4. Gemini: Security
400
- node "$VIBE_SCRIPTS/llm-orchestrate.js" gemini orchestrate-json "Security advisories for [FEATURE] with [STACK]. Focus: latest patches, recent incidents. Return JSON: {advisories: [], patches: [], incidents: []}"
401
- ```
402
-
403
- **Concrete example - run all 4 in parallel:**
404
- ```bash
405
- # GPT best practices
406
- node "$(node -p "process.env.APPDATA || require('os').homedir() + '/.config'")/vibe/hooks/scripts/llm-orchestrate.js" gpt orchestrate-json "Best practices for passkey authentication with React, Supabase. Focus: architecture patterns, code conventions. Return JSON: {patterns: [], antiPatterns: [], libraries: []}"
407
-
408
- # GPT security
409
- node "$(node -p "process.env.APPDATA || require('os').homedir() + '/.config'")/vibe/hooks/scripts/llm-orchestrate.js" gpt orchestrate-json "Security vulnerabilities for passkey authentication with React, Supabase. Focus: CVE database, known exploits. Return JSON: {vulnerabilities: [], mitigations: [], checklist: []}"
410
-
411
- # Gemini best practices
412
- node "$(node -p "process.env.APPDATA || require('os').homedir() + '/.config'")/vibe/hooks/scripts/llm-orchestrate.js" gemini orchestrate-json "Best practices for passkey authentication with React, Supabase. Focus: latest trends, framework updates. Return JSON: {patterns: [], antiPatterns: [], libraries: []}"
413
-
414
- # Gemini security
415
- node "$(node -p "process.env.APPDATA || require('os').homedir() + '/.config'")/vibe/hooks/scripts/llm-orchestrate.js" gemini orchestrate-json "Security advisories for passkey authentication with React, Supabase. Focus: latest patches, recent incidents. Return JSON: {advisories: [], patches: [], incidents: []}"
416
- ```
417
-
418
- **ALSO run Claude research agents in parallel using Task tool:**
419
-
420
- | Claude Agent | Role | Source |
421
- |--------------|------|--------|
422
- | `best-practices-agent` | Best practices for [feature] + [stack] | WebSearch |
423
- | `framework-docs-agent` | Latest docs via context7 | context7 MCP |
424
- | `codebase-patterns-agent` | Similar patterns in existing codebase | Glob, Grep |
425
- | `security-advisory-agent` | Security advisories for [feature] | WebSearch |
426
-
427
- **Total: 4 GPT/Gemini calls (Bash) + 4 Claude agents (Task) = 8 parallel research tasks**
428
-
429
- **🚨 GPT/Gemini MUST be called via Bash with llm-orchestrate.js! 🚨**
430
-
431
- #### 3.1 Result Merge Rules
432
-
433
- | Area | Merge Strategy |
434
- |------|----------------|
435
- | Best Practices | Deduplicate, keep most detailed |
436
- | Security | ALL included (no dedup for safety) |
437
- | Libraries | Consensus recommendations |
438
-
439
- **IMPORTANT:**
440
- - ❌ DO NOT skip research step
441
- - ❌ DO NOT ask user "should I run research?"
442
- - ✅ ALWAYS run after requirements confirmed
443
- - ✅ Show "Running parallel research (Claude + GPT + Gemini)..." message
444
- - ✅ Include all agent + LLM results in SPEC Context
445
- - ✅ Run all 4 Bash LLM calls in parallel + 4 Task agents in parallel
446
-
447
- **Research results are reflected in SPEC's Context section.**
448
-
449
- ### 4. Write SPEC Document (PTCF Structure)
450
-
451
- #### 4.0 Large Scope Detection & Auto-Split (MANDATORY)
452
-
453
- **🚨 CRITICAL: Automatically split SPEC when scope is large**
454
-
455
- **❌ DO NOT ask user for confirmation - auto-split silently**
456
-
457
- **Detection criteria (ANY triggers split):**
458
-
459
- | Criteria | Threshold |
460
- |----------|-----------|
461
- | Phases | 5+ phases |
462
- | Files to create | 15+ files |
463
- | Platforms | 2+ platforms |
464
- | Major features | 4+ distinct features |
465
-
466
- **Auto-split output (SPEC + Feature files must match):**
467
-
468
- ```
469
- .claude/vibe/specs/{feature-name}/
470
- ├── _index.md # Master SPEC
471
- ├── phase-1-setup.md
472
- ├── phase-2-core.md
473
- └── ...
474
-
475
- .claude/vibe/features/{feature-name}/
476
- ├── _index.feature # Master Feature
477
- ├── phase-1-setup.feature
478
- ├── phase-2-core.feature
479
- └── ...
480
- ```
481
-
482
- **🚨 CRITICAL: Each SPEC phase file MUST have a matching Feature file**
483
-
484
- **Master SPEC (`_index.md`):**
485
-
486
- ```markdown
487
- # SPEC: {feature-name} (Master)
488
-
489
- ## Overview
490
- - Total phases: N
491
- - Dependencies: [list]
492
-
493
- ## Sub-SPECs
494
-
495
- | Order | SPEC File | Feature File | Status |
496
- |-------|-----------|--------------|--------|
497
- | 1 | phase-1-setup.md | phase-1-setup.feature | ⬜ |
498
- | 2 | phase-2-core.md | phase-2-core.feature | ⬜ |
499
-
500
- ## Shared Context
501
- - Tech Stack: [all phases]
502
- - Constraints: [all phases]
503
- ```
504
-
505
- **Master Feature (`_index.feature`):**
506
-
507
- ```markdown
508
- # Feature: {feature-name} (Master)
509
-
510
- **Master SPEC**: `.claude/vibe/specs/{feature-name}/_index.md`
511
-
512
- ## Sub-Features
513
-
514
- | Order | Feature File | SPEC File | Status |
515
- |-------|--------------|-----------|--------|
516
- | 1 | phase-1-setup.feature | phase-1-setup.md | ⬜ |
517
- | 2 | phase-2-core.feature | phase-2-core.md | ⬜ |
518
-
519
- ## Overall User Story
520
- **As a** {user}
521
- **I want** {complete feature}
522
- **So that** {value}
523
- ```
524
-
525
- **Small scope (default):**
526
-
527
- Create `.claude/vibe/specs/{feature-name}.md`:
528
-
529
- ```markdown
530
- ---
531
- status: pending
532
- currentPhase: 0
533
- totalPhases: 3
534
- createdAt: {ISO-timestamp}
535
- lastUpdated: {ISO-timestamp}
536
- ---
537
-
538
- # SPEC: {feature-name}
539
-
540
- ## Persona
541
- <role>
542
- Define AI role and expertise for implementation
543
- - Senior developer on the project
544
- - Follow existing code patterns
545
- - Write testable code
546
- </role>
547
-
548
- ## Context
549
- <context>
550
- ### Background
551
- - Why this feature is needed
552
- - Who will use it
553
-
554
- ### Tech Stack
555
- - Backend: {technology}
556
- - Frontend: {technology}
557
- - Database: {technology}
558
-
559
- ### Related Code
560
- - `src/xxx/`: Existing implementation to reference
561
- - `src/yyy/`: Files to modify
562
-
563
- ### Design Reference
564
- - {Reference app/service}
565
- </context>
566
-
567
- ## Task
568
- <task>
569
- ### Phase 1: {phase-name}
570
- 1. [ ] {specific task}
571
- - File: `path/to/file`
572
- - Verify: `command`
573
- 2. [ ] {specific task}
574
-
575
- ### Phase 2: {phase-name}
576
- 1. [ ] {specific task}
577
- 2. [ ] {specific task}
578
-
579
- ### Phase 3: Testing and Verification
580
- 1. [ ] Unit Tests
581
- 2. [ ] Integration Tests
582
- </task>
583
-
584
- ## Constraints
585
- <constraints>
586
- - Follow existing code patterns
587
- - Localize error messages
588
- - Separate configuration via environment variables
589
- - {other constraints}
590
- </constraints>
591
-
592
- ## Output Format
593
- <output_format>
594
- ### Files to Create
595
- - `path/to/new/file.ts`
596
- - `path/to/new/file.test.ts`
597
-
598
- ### Files to Modify
599
- - `path/to/existing/file.ts`
600
-
601
- ### Verification Commands
602
- - `npm test`
603
- - `npm run build`
604
- </output_format>
605
-
606
- ## Acceptance Criteria
607
- <acceptance>
608
- - [ ] {verifiable criterion 1}
609
- - [ ] {verifiable criterion 2}
610
- - [ ] All tests pass
611
- - [ ] Build succeeds
612
- </acceptance>
613
- ```
614
-
615
- ### 5. Create Feature File (BDD) - Required
616
-
617
- **🚨 CRITICAL: Feature files MUST match SPEC file structure**
618
-
619
- | SPEC Structure | Feature Structure |
620
- |----------------|-------------------|
621
- | Single file (`{feature}.md`) | Single file (`{feature}.feature`) |
622
- | Split (`{feature}/_index.md` + phases) | Split (`{feature}/_index.feature` + phases) |
623
-
624
- #### 5.1 Single File (Small Scope)
625
-
626
- Create `.claude/vibe/features/{feature-name}.feature`:
627
-
628
- **Creation rules:**
629
- 1. Convert each SPEC Acceptance Criteria → one Scenario
630
- 2. Include Happy Path (normal case) + Edge Case (exception case)
631
- 3. Follow Given-When-Then format
632
-
633
- ```markdown
634
- # Feature: {feature-name}
635
-
636
- **SPEC**: `.claude/vibe/specs/{feature-name}.md`
637
-
638
- ## User Story
639
- **As a** {user}
640
- **I want** {feature}
641
- **So that** {value}
642
-
643
- ## Scenarios
644
-
645
- ### Scenario 1: {Happy Path}
646
- \`\`\`gherkin
647
- Scenario: {title}
648
- Given {precondition}
649
- When {action}
650
- Then {result}
651
- \`\`\`
652
- **Verification**: SPEC AC #1
653
-
654
- ### Scenario 2: {Edge Case}
655
- ...
656
-
657
- ## Coverage
658
- | Scenario | SPEC AC | Status |
659
- |----------|---------|--------|
660
- | 1 | AC-1 | ⬜ |
661
- ```
662
-
663
- #### 5.2 Split Files (Large Scope)
664
-
665
- When SPEC is split into phases, Feature files MUST also be split:
666
-
667
- ```
668
- .claude/vibe/features/{feature-name}/
669
- ├── _index.feature # Master: links to all phase features
670
- ├── phase-1-setup.feature # Scenarios for phase-1-setup.md
671
- ├── phase-2-core.feature # Scenarios for phase-2-core.md
672
- └── ...
673
- ```
674
-
675
- **Phase Feature file structure:**
676
-
677
- ```markdown
678
- # Feature: {feature-name} - Phase {N}: {phase-name}
679
-
680
- **SPEC**: `.claude/vibe/specs/{feature-name}/phase-{N}-{name}.md`
681
- **Master Feature**: `.claude/vibe/features/{feature-name}/_index.feature`
682
-
683
- ## User Story (Phase Scope)
684
- **As a** {user}
685
- **I want** {phase-specific feature}
686
- **So that** {phase-specific value}
687
-
688
- ## Scenarios
689
-
690
- ### Scenario 1: {Phase Happy Path}
691
- ...
692
-
693
- ## Coverage
694
- | Scenario | SPEC AC | Status |
695
- |----------|---------|--------|
696
- | 1 | Phase {N} AC-1 | ⬜ |
697
- ```
698
-
699
- ### 6. Ambiguity Scan - Required
700
-
701
- After creating SPEC draft, **must perform systematic ambiguity check**.
702
-
703
- #### 6.1 Mandatory Check Categories
704
-
705
- | Category | Check Items | Red Flags |
706
- |----------|-------------|-----------|
707
- | **Functional Scope** | Missing features, unclear behavior | "etc.", "other", "if needed" |
708
- | **Data Model** | Undefined entities, relationships | Undefined types, missing fields |
709
- | **Non-Functional** | Performance, security requirements | Performance requirements without numbers |
710
- | **Edge Cases** | Boundary conditions, errors | 0 failure scenarios |
711
- | **Integration Points** | External APIs, contracts | API version/endpoint undefined |
712
- | **User Input** | Validation rules, limits | Input limits not specified |
713
- | **State Management** | State transitions, persistence | Missing state diagram |
714
-
715
- #### 6.2 Forbidden Ambiguous Terms
716
-
717
- If the following terms exist in SPEC, **clarification is mandatory**:
718
-
719
- | Forbidden Term | Replacement Method |
720
- |----------------|-------------------|
721
- | "appropriately", "properly" | Provide specific criteria (e.g., "within 3 seconds") |
722
- | "quickly", "rapidly" | Specify with numbers (e.g., "under 100ms") |
723
- | "various", "multiple" | List specific items |
724
- | "etc.", "other" | Specify complete list or limit scope |
725
- | "if needed", "depending on situation" | Specify conditions (e.g., "when credits < 10") |
726
- | "later", "in the future" | Explicitly exclude from current scope |
727
-
728
- #### 6.3 Check Process
729
-
730
- ```
731
- 1. Write SPEC draft
732
-
733
- 2. Auto-scan for forbidden terms
734
-
735
- 3. Review checklist by category
736
-
737
- 4. List discovered ambiguities
738
-
739
- 5. Auto-fixable items → Fix immediately
740
- Needs user confirmation → Ask question
741
-
742
- 6. Re-verify (repeat until 0 ambiguities)
743
- ```
744
-
745
- #### 6.4 Auto-Fix for Common Ambiguities
746
-
747
- | Ambiguity Type | Auto-Fix Method |
748
- |----------------|-----------------|
749
- | Timeout undefined | Apply default 30 seconds |
750
- | Retry count undefined | Apply default 3 retries |
751
- | Pagination undefined | Apply default 20 items/page |
752
- | Input length undefined | Text 500 chars, password 8-64 chars |
753
- | File size undefined | Image 5MB, video 100MB |
754
-
755
- #### 6.5 Ambiguity Output Format
756
-
757
- ```markdown
758
- ## 🔍 Ambiguity Scan Results
759
-
760
- ### Found Issues: 3
761
-
762
- #### 1. Functional Scope
763
- - ⚠️ "Login failure behavior" not defined
764
- → **Auto-fix**: Apply 5-minute lockout after 3 failures
765
- - ⚠️ "Session expiration handling" unclear
766
- → **Question**: Session expiration time? (30min/1hour/24hours)
767
-
768
- #### 2. Edge Cases
769
- - ⚠️ Concurrent login permission undefined
770
- → **Question**: Allow concurrent login? (Y/N)
771
-
772
- ### Auto-fixed: 1
773
- ### Needs clarification: 2
774
- ```
775
-
776
- ### 7. Quality Validation (Self-Check)
777
-
778
- **Must perform self-quality check after SPEC completion**
779
-
780
- #### 7.1 Quality Checklist (Required Items)
781
-
782
- | Category | Check Item | Weight |
783
- |----------|------------|--------|
784
- | **Completeness** | All user flows included in Task | 15% |
785
- | **Completeness** | All ACs converted to Feature scenarios | 10% |
786
- | **Clarity** | No ambiguous terms (e.g., "appropriately", "quickly") | 10% |
787
- | **Clarity** | All numbers/limits specified (e.g., "max 500 chars") | 10% |
788
- | **Testability** | All ACs are auto-testable | 10% |
789
- | **Security** | Authentication/authorization requirements defined | 10% |
790
- | **Security** | Sensitive data handling method specified | 5% |
791
- | **Error Handling** | Major failure scenarios defined | 10% |
792
- | **Error Handling** | User error messages specified | 5% |
793
- | **Performance** | Response time/throughput targets specified | 5% |
794
- | **Edge Cases** | Boundary condition handling defined | 5% |
795
- | **Dependencies** | External systems/APIs specified | 5% |
796
-
797
- #### 7.2 Quality Score Calculation
798
-
799
- ```
800
- Score = Σ(Check item met × Weight) / 100
801
-
802
- Grades:
803
- - 95-100: ✅ EXCELLENT - Ready to start implementation
804
- - 90-94: ⚠️ GOOD - Minor improvements required before implementation
805
- - 80-89: ⚠️ FAIR - Significant improvements required
806
- - 0-79: ❌ POOR - Rewrite required
807
- ```
808
-
809
- #### 7.3 Quality Gate (Auto-verification)
810
-
811
- **Minimum 95 points required to complete SPEC draft**
812
-
813
- ```
814
- SPEC writing complete
815
-
816
- [Calculate Quality Score]
817
-
818
- Score < 95? → Show missing items → Attempt auto-fix → Re-evaluate
819
-
820
- Score ≥ 95 → SPEC Draft Complete → Handoff to /vibe.spec.review
821
- ```
822
-
823
- #### 7.4 Auto-Fix for Low Score
824
-
825
- If score is below 95, attempt automatic fixes:
826
-
827
- | Missing Item | Auto-Fix Method |
828
- |--------------|-----------------|
829
- | Missing AC | Auto-generate AC based on Task |
830
- | Numbers not specified | Apply project defaults (e.g., timeout 30s) |
831
- | Missing error handling | Add common error scenarios |
832
- | Missing performance targets | Apply industry standard criteria |
833
-
834
- ### 8. SPEC Draft Complete - Handoff to Review
835
-
836
- **🚨 IMPORTANT: GPT/Gemini review is now a SEPARATE command**
837
-
838
- After SPEC draft is complete (score ≥ 95):
839
-
840
- **If `ultrawork` mode:**
841
- - ❌ DO NOT show handoff message
842
- - ❌ DO NOT ask for confirmation
843
- - ✅ Immediately proceed to `/vibe.spec.review "{feature-name}"`
844
- - ✅ After review passes, immediately proceed to `/vibe.run "{feature-name}" ultrawork`
845
-
846
- **If normal mode:**
847
- Output the handoff message:
848
-
849
- ```
850
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
851
- ✅ SPEC DRAFT COMPLETE: {feature-name}
852
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
853
-
854
- 📋 SPEC: .claude/vibe/specs/{feature-name}.md
855
- 📋 Feature: .claude/vibe/features/{feature-name}.feature
856
- 📊 Quality Score: {score}/100
857
-
858
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
859
- ⚠️ NEXT STEP: Run SPEC review
860
-
861
- Option 1 (same session):
862
- /vibe.spec.review "{feature-name}"
863
-
864
- Option 2 (recommended for large context):
865
- /new → /vibe.spec.review "{feature-name}"
866
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
867
- ```
868
-
869
- **Tip:** New session recommended when context > 50% to ensure review accuracy
870
-
871
- ## Output (MANDATORY File Creation)
872
-
873
- **🚨 CRITICAL: Files MUST be created in these EXACT paths. NO exceptions.**
874
-
875
- ### Small Scope (Single File)
876
-
877
- | File | Path | When |
878
- |------|------|------|
879
- | SPEC | `.claude/vibe/specs/{feature-name}.md` | After quality validation (Step 7) |
880
- | Feature | `.claude/vibe/features/{feature-name}.feature` | Immediately after SPEC |
881
-
882
- ### Large Scope (Split Files)
883
-
884
- | File | Path | When |
885
- |------|------|------|
886
- | Master SPEC | `.claude/vibe/specs/{feature-name}/_index.md` | After quality validation |
887
- | Phase SPEC | `.claude/vibe/specs/{feature-name}/phase-{N}-{name}.md` | Per phase |
888
- | Master Feature | `.claude/vibe/features/{feature-name}/_index.feature` | After Master SPEC |
889
- | Phase Feature | `.claude/vibe/features/{feature-name}/phase-{N}-{name}.feature` | Per phase SPEC |
890
-
891
- **❌ FORBIDDEN:**
892
-
893
- - Creating files in project root (e.g., `feature-name.md`)
894
- - Creating files outside `.claude/vibe/` directory
895
- - Skipping file creation
896
- - Using different file names than feature-name
897
- - Creating split SPEC without matching split Feature files
898
-
899
- **✅ REQUIRED:**
900
-
901
- - Use Write tool to create files
902
- - Verify directories exist (create if needed)
903
- - Confirm file creation in response
904
- - **Each SPEC file must have a matching Feature file**
905
-
906
- ### File Creation Template
907
-
908
- **Single file:**
909
- ```
910
- 1. Write .claude/vibe/specs/{feature-name}.md
911
- 2. Write .claude/vibe/features/{feature-name}.feature
912
- 3. Confirm: "✅ Created: specs/{feature-name}.md + features/{feature-name}.feature"
913
- ```
914
-
915
- **Split files:**
916
- ```
917
- 1. Write .claude/vibe/specs/{feature-name}/_index.md
918
- 2. Write .claude/vibe/specs/{feature-name}/phase-1-setup.md
919
- 3. Write .claude/vibe/specs/{feature-name}/phase-2-core.md
920
- 4. Write .claude/vibe/features/{feature-name}/_index.feature
921
- 5. Write .claude/vibe/features/{feature-name}/phase-1-setup.feature
922
- 6. Write .claude/vibe/features/{feature-name}/phase-2-core.feature
923
- 7. Confirm: "✅ Created: {N} SPEC files + {N} Feature files"
924
- ```
925
-
926
- ## Example
927
-
928
- ```
929
- User: /vibe.spec "brick-game"
930
-
931
- Claude:
932
- You're making a brick game! What style are you thinking of?
933
-
934
- 1. Classic Breakout style
935
- 2. Arkanoid (with power-up items)
936
- 3. Custom style with special gameplay
937
-
938
- Feel free to describe in your own words.
939
-
940
- User: 1
941
-
942
- Claude: What platform will it run on?
943
-
944
- 1. Web (browser)
945
- 2. Mobile (iOS/Android)
946
- 3. Desktop
947
-
948
- User: 1
949
-
950
- Claude:
951
- Here are tech stack suggestions for web game development:
952
-
953
- 1. **Phaser.js** (Recommended) - Game framework with built-in physics engine
954
- 2. **Canvas + JavaScript** - Lightweight with fine control
955
- 3. **PixiJS + Matter.js** - High-performance rendering
956
-
957
- User: 1
958
-
959
- Claude: What design style?
960
-
961
- 1. Retro pixel (Atari Breakout)
962
- 2. Neon graphics (Arkanoid)
963
- 3. Modern 3D effects
964
-
965
- User: 2
966
-
967
- [Conversation continues...]
968
-
969
- Claude: SPEC draft created. Running ambiguity scan.
970
-
971
- ## 🔍 Ambiguity Scan Results
972
-
973
- ### Functional Scope
974
- - ⚠️ Game over condition not defined (ball drop vs lives system)
975
- - ⚠️ Stage clear condition unclear
976
-
977
- ### Edge Cases
978
- - ⚠️ Ball reflection angle when hitting paddle edge
979
- - ⚠️ Multiple brick collision handling
980
-
981
- Please clarify the above items.
982
-
983
- User: 3 lives, clear when all bricks destroyed, edge reflects at 45 degrees
984
-
985
- Claude: Thank you. SPEC has been refined.
986
-
987
- 🔍 Re-check result: 0 ambiguities
988
- 📊 Quality score: 92/100 (A)
989
-
990
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
991
- 🔍 SPEC REVIEW (Gemini)
992
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
993
-
994
- 📤 Sending SPEC...
995
- 📝 Gemini feedback:
996
- 1. [Edge] Ball speed increase logic undefined
997
- 2. [Security] Need score manipulation prevention
998
-
999
- ✅ 2 improvements auto-applied
1000
- 🔍 Re-verifying... ✅ Passed
1001
-
1002
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1003
- ✅ SPEC Complete!
1004
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1005
-
1006
- 📄 .claude/vibe/specs/brick-game.md (PTCF structure)
1007
- 📄 .claude/vibe/features/brick-game.feature
1008
- 📊 Quality score: 95/100 (A) ← Improved after review
1009
- ```
1010
-
1011
- ## Vibe Tools (Semantic Analysis & Memory)
1012
-
1013
- ### Tool Invocation
1014
- All tools are called via:
1015
- ```bash
1016
- node -e "import('@su-record/vibe/tools').then(t => t.TOOL_NAME({...args}).then(r => console.log(r.content[0].text)))"
1017
- ```
1018
-
1019
- ### Recommended Tools for SPEC Creation
1020
-
1021
- | Tool | Purpose | When to Use |
1022
- |------|---------|-------------|
1023
- | `findSymbol` | Find symbol definitions | Locate existing implementations to reference |
1024
- | `findReferences` | Find all references | Understand how existing code is used |
1025
- | `analyzeComplexity` | Code complexity analysis | Evaluate complexity of code to modify |
1026
- | `saveMemory` | Save important decisions | Store confirmed requirements, design decisions |
1027
- | `recallMemory` | Recall saved memory | Retrieve previous project decisions |
1028
-
1029
- ### Example Tool Usage in SPEC Creation
1030
-
1031
- **1. Find existing auth implementation:**
1032
- ```bash
1033
- node -e "import('@su-record/vibe/tools').then(t => t.findSymbol({symbolName: 'login', searchPath: 'src/'}).then(r => console.log(r.content[0].text)))"
1034
- ```
1035
-
1036
- **2. Save confirmed requirements:**
1037
- ```bash
1038
- node -e "import('@su-record/vibe/tools').then(t => t.saveMemory({key: 'brick-game-requirements', value: 'Platform: Web, Stack: Phaser.js, Style: Neon', category: 'spec', projectPath: process.cwd()}).then(r => console.log(r.content[0].text)))"
1039
- ```
1040
-
1041
- **3. Recall previous decisions:**
1042
- ```bash
1043
- node -e "import('@su-record/vibe/tools').then(t => t.recallMemory({key: 'brick-game-requirements', projectPath: process.cwd()}).then(r => console.log(r.content[0].text)))"
1044
- ```
1045
-
1046
- ## Next Step
1047
-
1048
- ```
1049
- /vibe.run "brick-game"
1050
- ```
1051
-
1052
- ---
1053
-
1054
- ARGUMENTS: $ARGUMENTS
1
+ ---
2
+ description: Create SPEC document with Specification Agent
3
+ argument-hint: "feature name"
4
+ ---
5
+
6
+ # /vibe.spec
7
+
8
+ Create a SPEC document (Specification Agent).
9
+
10
+ ## Usage
11
+
12
+ ```
13
+ /vibe.spec "feature-name" # Conversation mode (requirements gathering)
14
+ /vibe.spec "feature-name" ultrawork # Auto: SPEC → Review → Implementation
15
+ /vibe.spec "docs/login-prd.md" # File path input (auto-detected)
16
+ /vibe.spec + 📎 file attachment # Use attached file
17
+ ```
18
+
19
+ ### ultrawork Mode
20
+
21
+ When `ultrawork` (or `ulw`) is included, automatically chains:
22
+
23
+ ```
24
+ /vibe.spec "feature" ultrawork
25
+
26
+ [1] SPEC Creation (this command)
27
+
28
+ [2] Auto: /vibe.spec.review "{feature}"
29
+
30
+ [3] Auto: /vibe.run "{feature}" ultrawork
31
+ ```
32
+
33
+ **No manual intervention between steps.**
34
+
35
+ ## Input Mode Detection (Auto-detect)
36
+
37
+ **Input priority:**
38
+
39
+ ```
40
+ 1. Attachment exists? → Use attached file
41
+ 2. Argument is file path? (existence check) → Read file
42
+ 3. Otherwise → Conversation mode (start with feature name)
43
+ ```
44
+
45
+ | Input | Result |
46
+ |-------|--------|
47
+ | 📎 Attached file | → Analyze attached file |
48
+ | File path (exists) | → Read file (Read tool) |
49
+ | Feature name | → Start conversation mode |
50
+
51
+ **All supported files:**
52
+ - Text: `.md`, `.txt`, `.rst`, `.html`, `.json`, `.yaml`, etc.
53
+ - Documents: `.pdf` (page-by-page analysis)
54
+ - Images: `.png`, `.jpg`, `.jpeg`, `.gif`, `.webp`, `.svg`, etc.
55
+ - Notebooks: `.ipynb` (Jupyter)
56
+ - **All formats Claude can read**
57
+
58
+ **File input mode flow:**
59
+
60
+ ```
61
+ /vibe.spec "docs/login-prd.md"
62
+
63
+ 📄 File loaded: docs/login-prd.md (2.3KB)
64
+
65
+ 📋 Parsed requirements:
66
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
67
+ Feature: Login
68
+ - Email/password login
69
+ - Social login (Google, Apple)
70
+ - Password recovery
71
+ - Auto login persistence
72
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
73
+
74
+ ❓ Additional confirmation needed:
75
+ 1. Session expiration time? (default: 24 hours)
76
+ 2. Allow concurrent login?
77
+ 3. Confirm tech stack? (current: React + Supabase)
78
+
79
+ User: 1 hour, disallow, confirm
80
+
81
+ ✅ Requirements confirmed → Run research → Generate SPEC → Review
82
+ ```
83
+
84
+ **Supported file formats:**
85
+
86
+ | Format | Extension | Purpose |
87
+ |--------|-----------|---------|
88
+ | Markdown | `.md` | PRD, planning docs, README |
89
+ | Text | `.txt` | Requirements list |
90
+ | PDF | `.pdf` | Planning docs, design documents |
91
+ | Image | `.png`, `.jpg`, `.jpeg`, `.webp` | Wireframes, UI design, screenshots |
92
+
93
+ **Image input example:**
94
+ ```
95
+ /vibe.spec "designs/login-wireframe.png"
96
+
97
+ 🖼️ Image analysis: designs/login-wireframe.png
98
+
99
+ 📋 Detected UI elements:
100
+ - Email input field
101
+ - Password input field
102
+ - "Login" button
103
+ - "Forgot password" link
104
+ - Social login buttons (Google, Apple)
105
+
106
+ ❓ Confirmation needed:
107
+ 1. Feature name? (e.g., "login")
108
+ 2. Additional requirements?
109
+
110
+ → Generate SPEC
111
+ ```
112
+
113
+ ## Rules Reference
114
+
115
+ **Must follow `~/.claude/vibe/rules/` (global):**
116
+ - `core/development-philosophy.md` - Surgical precision, simplicity
117
+ - `core/quick-start.md` - Korean first, DRY, SRP
118
+ - `core/communication-guide.md` - Communication principles
119
+
120
+ ## Description
121
+
122
+ Collect requirements through conversation with the user and create an **AI-executable PTCF structured SPEC document**.
123
+
124
+ > **PTCF**: Persona, Task, Context, Format - Google Gemini prompt optimization framework
125
+
126
+ ## External LLM Integration (GPT/Gemini)
127
+
128
+ When GPT/Gemini are enabled, they are automatically utilized during SPEC creation:
129
+
130
+ ```
131
+ /vibe.spec "feature"
132
+
133
+ [Claude] Draft SPEC
134
+
135
+ [Parallel Research] GPT + Gemini + Claude agents (8 parallel)
136
+
137
+ [SPEC Review] GPT + Gemini parallel review
138
+
139
+ [Claude] Finalize SPEC
140
+ ```
141
+
142
+ **Setup:**
143
+ ```bash
144
+ vibe gpt auth # Enable GPT (OAuth)
145
+ vibe gemini auth # Enable Gemini (OAuth)
146
+ vibe status # Check current settings
147
+ ```
148
+
149
+ ## Process
150
+
151
+ ### 0. Git Branch Setup (MANDATORY - Execute First!)
152
+
153
+ > ⚠️ **CRITICAL: You MUST execute this step FIRST before anything else!**
154
+ > This is NOT optional documentation - you must RUN these git commands.
155
+
156
+ **Step 0 is BLOCKING - do not proceed to Step 1 until branch is ready.**
157
+
158
+ **Execute these commands using Bash tool:**
159
+
160
+ ```bash
161
+ # 1. Check current branch
162
+ git branch --show-current
163
+ ```
164
+
165
+ **Then based on result:**
166
+
167
+ | Current Branch | Action |
168
+ |----------------|--------|
169
+ | `main` or `master` | **MUST** create feature branch: `git checkout -b feature/{feature-name}` |
170
+ | `feature/*` | Ask user: "Continue on this branch or create new?" |
171
+ | Other | Ask user to confirm |
172
+
173
+ **Example execution:**
174
+
175
+ ```
176
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
177
+ 🌿 GIT BRANCH SETUP
178
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
179
+
180
+ Current branch: main
181
+
182
+ Creating feature branch...
183
+ $ git checkout -b feature/login-page
184
+
185
+ ✅ Switched to new branch: feature/login-page
186
+
187
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
188
+ ```
189
+
190
+ **Branch naming rules:**
191
+ - Convert to lowercase: `Login Page` → `login-page`
192
+ - Replace spaces with hyphens
193
+ - Prefix with `feature/`
194
+ - Example: `feature/passkey-auth`, `feature/dark-mode`
195
+
196
+ ### 1. Project Analysis
197
+
198
+ **Existing project** (`vibe init`):
199
+ - Source code analysis: `package.json`, `pyproject.toml`, `pubspec.yaml`, `go.mod`, etc.
200
+ - Reference `CLAUDE.md` file (tech stack)
201
+ - Infer framework from file structure
202
+ - **Use `findSymbol` tool** to locate relevant existing implementations
203
+
204
+ **New project** (`vibe init <project-name>`):
205
+ - Suggest tech stack (2-3 options)
206
+
207
+ ### 2. Collect Requirements via Conversation
208
+
209
+ **Principles:**
210
+ - Ask **one question at a time**
211
+ - Present options **with numbers** + "Feel free to describe in your own words"
212
+ - **Natural conversation** without fixed order
213
+
214
+ **Required confirmations:**
215
+ - Purpose (Why): Why is it needed?
216
+ - User (Who): Who will use it?
217
+ - Feature scope (What): What features are needed?
218
+ - Tech stack: Confirm existing stack or suggest new
219
+ - Design reference: UI/UX to reference
220
+
221
+ ### 2.1 Critical Requirements Confirmation (askUser) - v2.6.1
222
+
223
+ **🚨 IMPORTANT: Use `askUser` tool for CRITICAL requirements that must not be missed**
224
+
225
+ After initial conversation, use the structured `askUser` tool for:
226
+ - 🔐 Authentication: method, MFA, password policy
227
+ - 🛡️ Security: rate limiting, session management
228
+ - ⏱️ Session: duration, concurrent login policy
229
+ - 📊 Data Model: required fields, relationships
230
+
231
+ **When to use askUser vs conversation:**
232
+
233
+ | Scenario | Method |
234
+ |----------|--------|
235
+ | Exploratory (feature scope, style) | Natural conversation |
236
+ | **Critical** (auth, security, session) | `askUser` tool |
237
+ | Optional (performance, integration) | Natural conversation |
238
+
239
+ **Usage:**
240
+
241
+ ```typescript
242
+ import { askUser, askUserQuick } from '@su-record/vibe/tools';
243
+
244
+ // Quick helper for common scenarios
245
+ const result = await askUserQuick.login('my-login-feature');
246
+ console.log(result.content[0].text);
247
+
248
+ // Custom categories
249
+ const result = await askUser({
250
+ featureName: 'user-dashboard',
251
+ categories: ['authentication', 'security', 'session', 'data_model'],
252
+ context: 'Building a user dashboard with role-based access',
253
+ });
254
+ ```
255
+
256
+ **Available categories:**
257
+ - `authentication`: 인증 방식, MFA
258
+ - `security`: 비밀번호 정책, 속도 제한
259
+ - `session`: 세션 만료, 동시 로그인
260
+ - `data_model`: 사용자 프로필 필드
261
+ - `performance`: 응답 시간 목표
262
+ - `integration`: 외부 서비스 연동
263
+
264
+ **Example output:**
265
+
266
+ ```
267
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
268
+ 📋 요구사항 확인
269
+ Feature: login
270
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
271
+
272
+ ## 🔐 인증
273
+
274
+ ### 🔐 Q-AUTHENTICATION-001
275
+
276
+ **어떤 인증 방식을 지원할까요?**
277
+ (복수 선택 가능)
278
+
279
+ 1. **이메일/비밀번호** ✓
280
+ 2. **Google 소셜 로그인**
281
+ 3. **Apple 소셜 로그인**
282
+ ...
283
+
284
+ **필수**
285
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
286
+ 총 6개 질문 (필수: 4개)
287
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
288
+ ```
289
+
290
+ **Response parsing:**
291
+
292
+ ```typescript
293
+ import { parseUserResponse } from '@su-record/vibe/tools';
294
+
295
+ // User responds: "1, 2, 4" (선택한 옵션 번호)
296
+ const response = parseUserResponse(question, "1, 2, 4");
297
+ // { questionId: "Q-AUTH-001", value: ["email_password", "social_google", "passkey"], timestamp: "..." }
298
+ ```
299
+
300
+ **ultrawork mode:**
301
+ - askUser is **skipped** in ultrawork mode
302
+ - Uses default values from templates automatically
303
+
304
+ ### 2.5. Reference Documents via config.json (MANDATORY after tech stack confirmed)
305
+
306
+ **🚨 CRITICAL: Read config.json references IMMEDIATELY after tech stack is confirmed**
307
+
308
+ Reference documents are automatically generated in `config.json` based on the stack detected during `vibe init`:
309
+
310
+ ```json
311
+ // .claude/vibe/config.json
312
+ {
313
+ "language": "ko",
314
+ "stacks": [
315
+ { "type": "typescript-react", "path": "package.json" }
316
+ ],
317
+ "references": {
318
+ "rules": [
319
+ "~/.claude/vibe/rules/code-quality.md",
320
+ "~/.claude/vibe/rules/error-handling.md",
321
+ "~/.claude/vibe/rules/security.md"
322
+ ],
323
+ "languages": [
324
+ "~/.claude/vibe/languages/typescript-react.md"
325
+ ],
326
+ "templates": [
327
+ "~/.claude/vibe/templates/spec-template.md",
328
+ "~/.claude/vibe/templates/feature-template.md",
329
+ "~/.claude/vibe/templates/constitution-template.md"
330
+ ]
331
+ }
332
+ }
333
+ ```
334
+
335
+ **Workflow:**
336
+
337
+ 1. Read `.claude/vibe/config.json`
338
+ 2. Extract `references.languages[]` paths
339
+ 3. Read each language document for stack-specific guidelines
340
+
341
+ **Example:**
342
+ ```bash
343
+ # 1. Check references in config.json
344
+ Read .claude/vibe/config.json
345
+
346
+ # 2. Reference documents specified in references.languages
347
+ Read ~/.claude/vibe/languages/typescript-react.md
348
+ ```
349
+
350
+ **Important:**
351
+
352
+ - No manual mapping needed - config.json contains all reference paths
353
+ - `config.json.references` is automatically referenced when running `/vibe.run`
354
+ - Not copied to project (referenced from global package)
355
+
356
+ ### 3. Parallel Research (v2.5.0) - MANDATORY AFTER requirements confirmed
357
+
358
+ **🚨🚨🚨 ABSOLUTE RULES FOR RESEARCH PHASE 🚨🚨🚨**
359
+
360
+ **STOP! Before doing ANY research, read this carefully:**
361
+
362
+ 1. **DO NOT** use Task tool to spawn research agents
363
+ 2. **DO NOT** use context7 MCP directly for research
364
+ 3. **DO NOT** use WebSearch tool directly for research
365
+ 4. **YOU MUST** use Bash tool to call llm-orchestrate.js directly
366
+
367
+ **🚨🚨🚨 CRITICAL: NO FILE CREATION DURING RESEARCH 🚨🚨🚨**
368
+
369
+ 5. **DO NOT** create any files in project root during research
370
+ 6. **DO NOT** create SECURITY_*.md, RESEARCH_*.md, SUMMARY_*.md files
371
+ 7. **DO NOT** use Write tool during research phase
372
+ 8. **ALL research results** must be returned as text output only
373
+ 9. **Files are ONLY created** in Step 4 (SPEC) and Step 5 (Feature) in `.claude/vibe/` directory
374
+
375
+ **When to trigger:**
376
+ 1. ✅ Feature type decided (e.g., "passkey authentication")
377
+ 2. ✅ Tech stack confirmed (e.g., "React + Supabase")
378
+ 3. ✅ Language guide copied (step 2.5)
379
+ 4. ✅ Core requirements collected
380
+
381
+ **→ IMMEDIATELY run these 4 Bash commands IN PARALLEL (all at once):**
382
+
383
+ **🚨 MANDATORY: Copy the EXACT path below. DO NOT modify or use alternative paths.**
384
+
385
+ ```bash
386
+ # Cross-platform path (works on Windows/macOS/Linux)
387
+ # ⚠️ COPY THIS EXACTLY - DO NOT USE ~/.claude/ or any other path!
388
+ VIBE_SCRIPTS="$(node -p "process.env.APPDATA || require('os').homedir() + '/.config'")/vibe/hooks/scripts"
389
+
390
+ # 1. GPT: Best practices
391
+ node "$VIBE_SCRIPTS/llm-orchestrate.js" gpt orchestrate-json "Best practices for [FEATURE] with [STACK]. Focus: architecture patterns, code conventions. Return JSON: {patterns: [], antiPatterns: [], libraries: []}"
392
+
393
+ # 2. GPT: Security
394
+ node "$VIBE_SCRIPTS/llm-orchestrate.js" gpt orchestrate-json "Security vulnerabilities for [FEATURE] with [STACK]. Focus: CVE database, known exploits. Return JSON: {vulnerabilities: [], mitigations: [], checklist: []}"
395
+
396
+ # 3. Gemini: Best practices
397
+ node "$VIBE_SCRIPTS/llm-orchestrate.js" gemini orchestrate-json "Best practices for [FEATURE] with [STACK]. Focus: latest trends, framework updates. Return JSON: {patterns: [], antiPatterns: [], libraries: []}"
398
+
399
+ # 4. Gemini: Security
400
+ node "$VIBE_SCRIPTS/llm-orchestrate.js" gemini orchestrate-json "Security advisories for [FEATURE] with [STACK]. Focus: latest patches, recent incidents. Return JSON: {advisories: [], patches: [], incidents: []}"
401
+ ```
402
+
403
+ **Concrete example - run all 4 in parallel:**
404
+ ```bash
405
+ # GPT best practices
406
+ node "$(node -p "process.env.APPDATA || require('os').homedir() + '/.config'")/vibe/hooks/scripts/llm-orchestrate.js" gpt orchestrate-json "Best practices for passkey authentication with React, Supabase. Focus: architecture patterns, code conventions. Return JSON: {patterns: [], antiPatterns: [], libraries: []}"
407
+
408
+ # GPT security
409
+ node "$(node -p "process.env.APPDATA || require('os').homedir() + '/.config'")/vibe/hooks/scripts/llm-orchestrate.js" gpt orchestrate-json "Security vulnerabilities for passkey authentication with React, Supabase. Focus: CVE database, known exploits. Return JSON: {vulnerabilities: [], mitigations: [], checklist: []}"
410
+
411
+ # Gemini best practices
412
+ node "$(node -p "process.env.APPDATA || require('os').homedir() + '/.config'")/vibe/hooks/scripts/llm-orchestrate.js" gemini orchestrate-json "Best practices for passkey authentication with React, Supabase. Focus: latest trends, framework updates. Return JSON: {patterns: [], antiPatterns: [], libraries: []}"
413
+
414
+ # Gemini security
415
+ node "$(node -p "process.env.APPDATA || require('os').homedir() + '/.config'")/vibe/hooks/scripts/llm-orchestrate.js" gemini orchestrate-json "Security advisories for passkey authentication with React, Supabase. Focus: latest patches, recent incidents. Return JSON: {advisories: [], patches: [], incidents: []}"
416
+ ```
417
+
418
+ **ALSO run Claude research agents in parallel using Task tool:**
419
+
420
+ | Claude Agent | Role | Source |
421
+ |--------------|------|--------|
422
+ | `best-practices-agent` | Best practices for [feature] + [stack] | WebSearch |
423
+ | `framework-docs-agent` | Latest docs via context7 | context7 MCP |
424
+ | `codebase-patterns-agent` | Similar patterns in existing codebase | Glob, Grep |
425
+ | `security-advisory-agent` | Security advisories for [feature] | WebSearch |
426
+
427
+ **Total: 4 GPT/Gemini calls (Bash) + 4 Claude agents (Task) = 8 parallel research tasks**
428
+
429
+ **🚨 GPT/Gemini MUST be called via Bash with llm-orchestrate.js! 🚨**
430
+
431
+ #### 3.1 Result Merge Rules
432
+
433
+ | Area | Merge Strategy |
434
+ |------|----------------|
435
+ | Best Practices | Deduplicate, keep most detailed |
436
+ | Security | ALL included (no dedup for safety) |
437
+ | Libraries | Consensus recommendations |
438
+
439
+ **IMPORTANT:**
440
+ - ❌ DO NOT skip research step
441
+ - ❌ DO NOT ask user "should I run research?"
442
+ - ✅ ALWAYS run after requirements confirmed
443
+ - ✅ Show "Running parallel research (Claude + GPT + Gemini)..." message
444
+ - ✅ Include all agent + LLM results in SPEC Context
445
+ - ✅ Run all 4 Bash LLM calls in parallel + 4 Task agents in parallel
446
+
447
+ **Research results are reflected in SPEC's Context section.**
448
+
449
+ ### 4. Write SPEC Document (PTCF Structure)
450
+
451
+ #### 4.0 Large Scope Detection & Auto-Split (MANDATORY)
452
+
453
+ **🚨 CRITICAL: Automatically split SPEC when scope is large**
454
+
455
+ **❌ DO NOT ask user for confirmation - auto-split silently**
456
+
457
+ **Detection criteria (ANY triggers split):**
458
+
459
+ | Criteria | Threshold |
460
+ |----------|-----------|
461
+ | Phases | 5+ phases |
462
+ | Files to create | 15+ files |
463
+ | Platforms | 2+ platforms |
464
+ | Major features | 4+ distinct features |
465
+
466
+ **Auto-split output (SPEC + Feature files must match):**
467
+
468
+ ```
469
+ .claude/vibe/specs/{feature-name}/
470
+ ├── _index.md # Master SPEC
471
+ ├── phase-1-setup.md
472
+ ├── phase-2-core.md
473
+ └── ...
474
+
475
+ .claude/vibe/features/{feature-name}/
476
+ ├── _index.feature # Master Feature
477
+ ├── phase-1-setup.feature
478
+ ├── phase-2-core.feature
479
+ └── ...
480
+ ```
481
+
482
+ **🚨 CRITICAL: Each SPEC phase file MUST have a matching Feature file**
483
+
484
+ **Master SPEC (`_index.md`):**
485
+
486
+ ```markdown
487
+ # SPEC: {feature-name} (Master)
488
+
489
+ ## Overview
490
+ - Total phases: N
491
+ - Dependencies: [list]
492
+
493
+ ## Sub-SPECs
494
+
495
+ | Order | SPEC File | Feature File | Status |
496
+ |-------|-----------|--------------|--------|
497
+ | 1 | phase-1-setup.md | phase-1-setup.feature | ⬜ |
498
+ | 2 | phase-2-core.md | phase-2-core.feature | ⬜ |
499
+
500
+ ## Shared Context
501
+ - Tech Stack: [all phases]
502
+ - Constraints: [all phases]
503
+ ```
504
+
505
+ **Master Feature (`_index.feature`):**
506
+
507
+ ```markdown
508
+ # Feature: {feature-name} (Master)
509
+
510
+ **Master SPEC**: `.claude/vibe/specs/{feature-name}/_index.md`
511
+
512
+ ## Sub-Features
513
+
514
+ | Order | Feature File | SPEC File | Status |
515
+ |-------|--------------|-----------|--------|
516
+ | 1 | phase-1-setup.feature | phase-1-setup.md | ⬜ |
517
+ | 2 | phase-2-core.feature | phase-2-core.md | ⬜ |
518
+
519
+ ## Overall User Story
520
+ **As a** {user}
521
+ **I want** {complete feature}
522
+ **So that** {value}
523
+ ```
524
+
525
+ **Small scope (default):**
526
+
527
+ Create `.claude/vibe/specs/{feature-name}.md`:
528
+
529
+ ```markdown
530
+ ---
531
+ status: pending
532
+ currentPhase: 0
533
+ totalPhases: 3
534
+ createdAt: {ISO-timestamp}
535
+ lastUpdated: {ISO-timestamp}
536
+ ---
537
+
538
+ # SPEC: {feature-name}
539
+
540
+ ## Persona
541
+ <role>
542
+ Define AI role and expertise for implementation
543
+ - Senior developer on the project
544
+ - Follow existing code patterns
545
+ - Write testable code
546
+ </role>
547
+
548
+ ## Context
549
+ <context>
550
+ ### Background
551
+ - Why this feature is needed
552
+ - Who will use it
553
+
554
+ ### Tech Stack
555
+ - Backend: {technology}
556
+ - Frontend: {technology}
557
+ - Database: {technology}
558
+
559
+ ### Related Code
560
+ - `src/xxx/`: Existing implementation to reference
561
+ - `src/yyy/`: Files to modify
562
+
563
+ ### Design Reference
564
+ - {Reference app/service}
565
+ </context>
566
+
567
+ ## Task
568
+ <task>
569
+ ### Phase 1: {phase-name}
570
+ 1. [ ] {specific task}
571
+ - File: `path/to/file`
572
+ - Verify: `command`
573
+ 2. [ ] {specific task}
574
+
575
+ ### Phase 2: {phase-name}
576
+ 1. [ ] {specific task}
577
+ 2. [ ] {specific task}
578
+
579
+ ### Phase 3: Testing and Verification
580
+ 1. [ ] Unit Tests
581
+ 2. [ ] Integration Tests
582
+ </task>
583
+
584
+ ## Constraints
585
+ <constraints>
586
+ - Follow existing code patterns
587
+ - Localize error messages
588
+ - Separate configuration via environment variables
589
+ - {other constraints}
590
+ </constraints>
591
+
592
+ ## Output Format
593
+ <output_format>
594
+ ### Files to Create
595
+ - `path/to/new/file.ts`
596
+ - `path/to/new/file.test.ts`
597
+
598
+ ### Files to Modify
599
+ - `path/to/existing/file.ts`
600
+
601
+ ### Verification Commands
602
+ - `npm test`
603
+ - `npm run build`
604
+ </output_format>
605
+
606
+ ## Acceptance Criteria
607
+ <acceptance>
608
+ - [ ] {verifiable criterion 1}
609
+ - [ ] {verifiable criterion 2}
610
+ - [ ] All tests pass
611
+ - [ ] Build succeeds
612
+ </acceptance>
613
+ ```
614
+
615
+ ### 5. Create Feature File (BDD) - Required
616
+
617
+ **🚨 CRITICAL: Feature files MUST match SPEC file structure**
618
+
619
+ | SPEC Structure | Feature Structure |
620
+ |----------------|-------------------|
621
+ | Single file (`{feature}.md`) | Single file (`{feature}.feature`) |
622
+ | Split (`{feature}/_index.md` + phases) | Split (`{feature}/_index.feature` + phases) |
623
+
624
+ #### 5.1 Single File (Small Scope)
625
+
626
+ Create `.claude/vibe/features/{feature-name}.feature`:
627
+
628
+ **Creation rules:**
629
+ 1. Convert each SPEC Acceptance Criteria → one Scenario
630
+ 2. Include Happy Path (normal case) + Edge Case (exception case)
631
+ 3. Follow Given-When-Then format
632
+
633
+ ```markdown
634
+ # Feature: {feature-name}
635
+
636
+ **SPEC**: `.claude/vibe/specs/{feature-name}.md`
637
+
638
+ ## User Story
639
+ **As a** {user}
640
+ **I want** {feature}
641
+ **So that** {value}
642
+
643
+ ## Scenarios
644
+
645
+ ### Scenario 1: {Happy Path}
646
+ \`\`\`gherkin
647
+ Scenario: {title}
648
+ Given {precondition}
649
+ When {action}
650
+ Then {result}
651
+ \`\`\`
652
+ **Verification**: SPEC AC #1
653
+
654
+ ### Scenario 2: {Edge Case}
655
+ ...
656
+
657
+ ## Coverage
658
+ | Scenario | SPEC AC | Status |
659
+ |----------|---------|--------|
660
+ | 1 | AC-1 | ⬜ |
661
+ ```
662
+
663
+ #### 5.2 Split Files (Large Scope)
664
+
665
+ When SPEC is split into phases, Feature files MUST also be split:
666
+
667
+ ```
668
+ .claude/vibe/features/{feature-name}/
669
+ ├── _index.feature # Master: links to all phase features
670
+ ├── phase-1-setup.feature # Scenarios for phase-1-setup.md
671
+ ├── phase-2-core.feature # Scenarios for phase-2-core.md
672
+ └── ...
673
+ ```
674
+
675
+ **Phase Feature file structure:**
676
+
677
+ ```markdown
678
+ # Feature: {feature-name} - Phase {N}: {phase-name}
679
+
680
+ **SPEC**: `.claude/vibe/specs/{feature-name}/phase-{N}-{name}.md`
681
+ **Master Feature**: `.claude/vibe/features/{feature-name}/_index.feature`
682
+
683
+ ## User Story (Phase Scope)
684
+ **As a** {user}
685
+ **I want** {phase-specific feature}
686
+ **So that** {phase-specific value}
687
+
688
+ ## Scenarios
689
+
690
+ ### Scenario 1: {Phase Happy Path}
691
+ ...
692
+
693
+ ## Coverage
694
+ | Scenario | SPEC AC | Status |
695
+ |----------|---------|--------|
696
+ | 1 | Phase {N} AC-1 | ⬜ |
697
+ ```
698
+
699
+ ### 6. Ambiguity Scan - Required
700
+
701
+ After creating SPEC draft, **must perform systematic ambiguity check**.
702
+
703
+ #### 6.1 Mandatory Check Categories
704
+
705
+ | Category | Check Items | Red Flags |
706
+ |----------|-------------|-----------|
707
+ | **Functional Scope** | Missing features, unclear behavior | "etc.", "other", "if needed" |
708
+ | **Data Model** | Undefined entities, relationships | Undefined types, missing fields |
709
+ | **Non-Functional** | Performance, security requirements | Performance requirements without numbers |
710
+ | **Edge Cases** | Boundary conditions, errors | 0 failure scenarios |
711
+ | **Integration Points** | External APIs, contracts | API version/endpoint undefined |
712
+ | **User Input** | Validation rules, limits | Input limits not specified |
713
+ | **State Management** | State transitions, persistence | Missing state diagram |
714
+
715
+ #### 6.2 Forbidden Ambiguous Terms
716
+
717
+ If the following terms exist in SPEC, **clarification is mandatory**:
718
+
719
+ | Forbidden Term | Replacement Method |
720
+ |----------------|-------------------|
721
+ | "appropriately", "properly" | Provide specific criteria (e.g., "within 3 seconds") |
722
+ | "quickly", "rapidly" | Specify with numbers (e.g., "under 100ms") |
723
+ | "various", "multiple" | List specific items |
724
+ | "etc.", "other" | Specify complete list or limit scope |
725
+ | "if needed", "depending on situation" | Specify conditions (e.g., "when credits < 10") |
726
+ | "later", "in the future" | Explicitly exclude from current scope |
727
+
728
+ #### 6.3 Check Process
729
+
730
+ ```
731
+ 1. Write SPEC draft
732
+
733
+ 2. Auto-scan for forbidden terms
734
+
735
+ 3. Review checklist by category
736
+
737
+ 4. List discovered ambiguities
738
+
739
+ 5. Auto-fixable items → Fix immediately
740
+ Needs user confirmation → Ask question
741
+
742
+ 6. Re-verify (repeat until 0 ambiguities)
743
+ ```
744
+
745
+ #### 6.4 Auto-Fix for Common Ambiguities
746
+
747
+ | Ambiguity Type | Auto-Fix Method |
748
+ |----------------|-----------------|
749
+ | Timeout undefined | Apply default 30 seconds |
750
+ | Retry count undefined | Apply default 3 retries |
751
+ | Pagination undefined | Apply default 20 items/page |
752
+ | Input length undefined | Text 500 chars, password 8-64 chars |
753
+ | File size undefined | Image 5MB, video 100MB |
754
+
755
+ #### 6.5 Ambiguity Output Format
756
+
757
+ ```markdown
758
+ ## 🔍 Ambiguity Scan Results
759
+
760
+ ### Found Issues: 3
761
+
762
+ #### 1. Functional Scope
763
+ - ⚠️ "Login failure behavior" not defined
764
+ → **Auto-fix**: Apply 5-minute lockout after 3 failures
765
+ - ⚠️ "Session expiration handling" unclear
766
+ → **Question**: Session expiration time? (30min/1hour/24hours)
767
+
768
+ #### 2. Edge Cases
769
+ - ⚠️ Concurrent login permission undefined
770
+ → **Question**: Allow concurrent login? (Y/N)
771
+
772
+ ### Auto-fixed: 1
773
+ ### Needs clarification: 2
774
+ ```
775
+
776
+ ### 7. Quality Validation (Self-Check)
777
+
778
+ **Must perform self-quality check after SPEC completion**
779
+
780
+ #### 7.1 Quality Checklist (Required Items)
781
+
782
+ | Category | Check Item | Weight |
783
+ |----------|------------|--------|
784
+ | **Completeness** | All user flows included in Task | 15% |
785
+ | **Completeness** | All ACs converted to Feature scenarios | 10% |
786
+ | **Clarity** | No ambiguous terms (e.g., "appropriately", "quickly") | 10% |
787
+ | **Clarity** | All numbers/limits specified (e.g., "max 500 chars") | 10% |
788
+ | **Testability** | All ACs are auto-testable | 10% |
789
+ | **Security** | Authentication/authorization requirements defined | 10% |
790
+ | **Security** | Sensitive data handling method specified | 5% |
791
+ | **Error Handling** | Major failure scenarios defined | 10% |
792
+ | **Error Handling** | User error messages specified | 5% |
793
+ | **Performance** | Response time/throughput targets specified | 5% |
794
+ | **Edge Cases** | Boundary condition handling defined | 5% |
795
+ | **Dependencies** | External systems/APIs specified | 5% |
796
+
797
+ #### 7.2 Quality Score Calculation
798
+
799
+ ```
800
+ Score = Σ(Check item met × Weight) / 100
801
+
802
+ Grades:
803
+ - 95-100: ✅ EXCELLENT - Ready to start implementation
804
+ - 90-94: ⚠️ GOOD - Minor improvements required before implementation
805
+ - 80-89: ⚠️ FAIR - Significant improvements required
806
+ - 0-79: ❌ POOR - Rewrite required
807
+ ```
808
+
809
+ #### 7.3 Quality Gate (Auto-verification)
810
+
811
+ **Minimum 95 points required to complete SPEC draft**
812
+
813
+ ```
814
+ SPEC writing complete
815
+
816
+ [Calculate Quality Score]
817
+
818
+ Score < 95? → Show missing items → Attempt auto-fix → Re-evaluate
819
+
820
+ Score ≥ 95 → SPEC Draft Complete → Handoff to /vibe.spec.review
821
+ ```
822
+
823
+ #### 7.4 Auto-Fix for Low Score
824
+
825
+ If score is below 95, attempt automatic fixes:
826
+
827
+ | Missing Item | Auto-Fix Method |
828
+ |--------------|-----------------|
829
+ | Missing AC | Auto-generate AC based on Task |
830
+ | Numbers not specified | Apply project defaults (e.g., timeout 30s) |
831
+ | Missing error handling | Add common error scenarios |
832
+ | Missing performance targets | Apply industry standard criteria |
833
+
834
+ ### 8. SPEC Draft Complete - Handoff to Review
835
+
836
+ **🚨 IMPORTANT: GPT/Gemini review is now a SEPARATE command**
837
+
838
+ After SPEC draft is complete (score ≥ 95):
839
+
840
+ **If `ultrawork` mode:**
841
+ - ❌ DO NOT show handoff message
842
+ - ❌ DO NOT ask for confirmation
843
+ - ✅ Immediately proceed to `/vibe.spec.review "{feature-name}"`
844
+ - ✅ After review passes, immediately proceed to `/vibe.run "{feature-name}" ultrawork`
845
+
846
+ **If normal mode:**
847
+ Output the handoff message:
848
+
849
+ ```
850
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
851
+ ✅ SPEC DRAFT COMPLETE: {feature-name}
852
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
853
+
854
+ 📋 SPEC: .claude/vibe/specs/{feature-name}.md
855
+ 📋 Feature: .claude/vibe/features/{feature-name}.feature
856
+ 📊 Quality Score: {score}/100
857
+
858
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
859
+ ⚠️ NEXT STEP: Run SPEC review
860
+
861
+ Option 1 (same session):
862
+ /vibe.spec.review "{feature-name}"
863
+
864
+ Option 2 (recommended for large context):
865
+ /new → /vibe.spec.review "{feature-name}"
866
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
867
+ ```
868
+
869
+ **Tip:** New session recommended when context > 50% to ensure review accuracy
870
+
871
+ ## Output (MANDATORY File Creation)
872
+
873
+ **🚨 CRITICAL: Files MUST be created in these EXACT paths. NO exceptions.**
874
+
875
+ ### Small Scope (Single File)
876
+
877
+ | File | Path | When |
878
+ |------|------|------|
879
+ | SPEC | `.claude/vibe/specs/{feature-name}.md` | After quality validation (Step 7) |
880
+ | Feature | `.claude/vibe/features/{feature-name}.feature` | Immediately after SPEC |
881
+
882
+ ### Large Scope (Split Files)
883
+
884
+ | File | Path | When |
885
+ |------|------|------|
886
+ | Master SPEC | `.claude/vibe/specs/{feature-name}/_index.md` | After quality validation |
887
+ | Phase SPEC | `.claude/vibe/specs/{feature-name}/phase-{N}-{name}.md` | Per phase |
888
+ | Master Feature | `.claude/vibe/features/{feature-name}/_index.feature` | After Master SPEC |
889
+ | Phase Feature | `.claude/vibe/features/{feature-name}/phase-{N}-{name}.feature` | Per phase SPEC |
890
+
891
+ **❌ FORBIDDEN:**
892
+
893
+ - Creating files in project root (e.g., `feature-name.md`)
894
+ - Creating files outside `.claude/vibe/` directory
895
+ - Skipping file creation
896
+ - Using different file names than feature-name
897
+ - Creating split SPEC without matching split Feature files
898
+
899
+ **✅ REQUIRED:**
900
+
901
+ - Use Write tool to create files
902
+ - Verify directories exist (create if needed)
903
+ - Confirm file creation in response
904
+ - **Each SPEC file must have a matching Feature file**
905
+
906
+ ### File Creation Template
907
+
908
+ **Single file:**
909
+ ```
910
+ 1. Write .claude/vibe/specs/{feature-name}.md
911
+ 2. Write .claude/vibe/features/{feature-name}.feature
912
+ 3. Confirm: "✅ Created: specs/{feature-name}.md + features/{feature-name}.feature"
913
+ ```
914
+
915
+ **Split files:**
916
+ ```
917
+ 1. Write .claude/vibe/specs/{feature-name}/_index.md
918
+ 2. Write .claude/vibe/specs/{feature-name}/phase-1-setup.md
919
+ 3. Write .claude/vibe/specs/{feature-name}/phase-2-core.md
920
+ 4. Write .claude/vibe/features/{feature-name}/_index.feature
921
+ 5. Write .claude/vibe/features/{feature-name}/phase-1-setup.feature
922
+ 6. Write .claude/vibe/features/{feature-name}/phase-2-core.feature
923
+ 7. Confirm: "✅ Created: {N} SPEC files + {N} Feature files"
924
+ ```
925
+
926
+ ## Example
927
+
928
+ ```
929
+ User: /vibe.spec "brick-game"
930
+
931
+ Claude:
932
+ You're making a brick game! What style are you thinking of?
933
+
934
+ 1. Classic Breakout style
935
+ 2. Arkanoid (with power-up items)
936
+ 3. Custom style with special gameplay
937
+
938
+ Feel free to describe in your own words.
939
+
940
+ User: 1
941
+
942
+ Claude: What platform will it run on?
943
+
944
+ 1. Web (browser)
945
+ 2. Mobile (iOS/Android)
946
+ 3. Desktop
947
+
948
+ User: 1
949
+
950
+ Claude:
951
+ Here are tech stack suggestions for web game development:
952
+
953
+ 1. **Phaser.js** (Recommended) - Game framework with built-in physics engine
954
+ 2. **Canvas + JavaScript** - Lightweight with fine control
955
+ 3. **PixiJS + Matter.js** - High-performance rendering
956
+
957
+ User: 1
958
+
959
+ Claude: What design style?
960
+
961
+ 1. Retro pixel (Atari Breakout)
962
+ 2. Neon graphics (Arkanoid)
963
+ 3. Modern 3D effects
964
+
965
+ User: 2
966
+
967
+ [Conversation continues...]
968
+
969
+ Claude: SPEC draft created. Running ambiguity scan.
970
+
971
+ ## 🔍 Ambiguity Scan Results
972
+
973
+ ### Functional Scope
974
+ - ⚠️ Game over condition not defined (ball drop vs lives system)
975
+ - ⚠️ Stage clear condition unclear
976
+
977
+ ### Edge Cases
978
+ - ⚠️ Ball reflection angle when hitting paddle edge
979
+ - ⚠️ Multiple brick collision handling
980
+
981
+ Please clarify the above items.
982
+
983
+ User: 3 lives, clear when all bricks destroyed, edge reflects at 45 degrees
984
+
985
+ Claude: Thank you. SPEC has been refined.
986
+
987
+ 🔍 Re-check result: 0 ambiguities
988
+ 📊 Quality score: 92/100 (A)
989
+
990
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
991
+ 🔍 SPEC REVIEW (Gemini)
992
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
993
+
994
+ 📤 Sending SPEC...
995
+ 📝 Gemini feedback:
996
+ 1. [Edge] Ball speed increase logic undefined
997
+ 2. [Security] Need score manipulation prevention
998
+
999
+ ✅ 2 improvements auto-applied
1000
+ 🔍 Re-verifying... ✅ Passed
1001
+
1002
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1003
+ ✅ SPEC Complete!
1004
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1005
+
1006
+ 📄 .claude/vibe/specs/brick-game.md (PTCF structure)
1007
+ 📄 .claude/vibe/features/brick-game.feature
1008
+ 📊 Quality score: 95/100 (A) ← Improved after review
1009
+ ```
1010
+
1011
+ ## Vibe Tools (Semantic Analysis & Memory)
1012
+
1013
+ ### Tool Invocation
1014
+ All tools are called via:
1015
+ ```bash
1016
+ node -e "import('@su-record/vibe/tools').then(t => t.TOOL_NAME({...args}).then(r => console.log(r.content[0].text)))"
1017
+ ```
1018
+
1019
+ ### Recommended Tools for SPEC Creation
1020
+
1021
+ | Tool | Purpose | When to Use |
1022
+ |------|---------|-------------|
1023
+ | `findSymbol` | Find symbol definitions | Locate existing implementations to reference |
1024
+ | `findReferences` | Find all references | Understand how existing code is used |
1025
+ | `analyzeComplexity` | Code complexity analysis | Evaluate complexity of code to modify |
1026
+ | `saveMemory` | Save important decisions | Store confirmed requirements, design decisions |
1027
+ | `recallMemory` | Recall saved memory | Retrieve previous project decisions |
1028
+
1029
+ ### Example Tool Usage in SPEC Creation
1030
+
1031
+ **1. Find existing auth implementation:**
1032
+ ```bash
1033
+ node -e "import('@su-record/vibe/tools').then(t => t.findSymbol({symbolName: 'login', searchPath: 'src/'}).then(r => console.log(r.content[0].text)))"
1034
+ ```
1035
+
1036
+ **2. Save confirmed requirements:**
1037
+ ```bash
1038
+ node -e "import('@su-record/vibe/tools').then(t => t.saveMemory({key: 'brick-game-requirements', value: 'Platform: Web, Stack: Phaser.js, Style: Neon', category: 'spec', projectPath: process.cwd()}).then(r => console.log(r.content[0].text)))"
1039
+ ```
1040
+
1041
+ **3. Recall previous decisions:**
1042
+ ```bash
1043
+ node -e "import('@su-record/vibe/tools').then(t => t.recallMemory({key: 'brick-game-requirements', projectPath: process.cwd()}).then(r => console.log(r.content[0].text)))"
1044
+ ```
1045
+
1046
+ ## Next Step
1047
+
1048
+ ```
1049
+ /vibe.run "brick-game"
1050
+ ```
1051
+
1052
+ ---
1053
+
1054
+ ARGUMENTS: $ARGUMENTS