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