@su-record/vibe 2.9.2 → 2.9.3

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