@su-record/vibe 2.0.0 → 2.0.2
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/.claude/agents/explorer.md +48 -48
- package/.claude/agents/implementer.md +53 -53
- package/.claude/agents/searcher.md +54 -54
- package/.claude/agents/simplifier.md +119 -119
- package/.claude/agents/tester.md +49 -49
- package/.claude/commands/vibe.analyze.md +239 -239
- package/.claude/commands/vibe.continue.md +88 -88
- package/.claude/commands/vibe.diagram.md +178 -178
- package/.claude/commands/vibe.reason.md +306 -306
- package/.claude/commands/vibe.run.md +760 -760
- package/.claude/commands/vibe.spec.md +339 -339
- package/.claude/commands/vibe.tool.md +153 -153
- package/.claude/commands/vibe.ui.md +137 -137
- package/.claude/commands/vibe.verify.md +238 -238
- package/.claude/settings.json +152 -152
- package/.claude/settings.local.json +4 -57
- package/.vibe/config.json +9 -0
- package/.vibe/constitution.md +184 -184
- package/.vibe/rules/core/communication-guide.md +104 -104
- package/.vibe/rules/core/development-philosophy.md +52 -52
- package/.vibe/rules/core/quick-start.md +120 -120
- package/.vibe/rules/quality/bdd-contract-testing.md +388 -388
- package/.vibe/rules/quality/checklist.md +276 -276
- package/.vibe/rules/quality/testing-strategy.md +437 -437
- package/.vibe/rules/standards/anti-patterns.md +369 -369
- package/.vibe/rules/standards/code-structure.md +291 -291
- package/.vibe/rules/standards/complexity-metrics.md +312 -312
- package/.vibe/rules/standards/naming-conventions.md +198 -198
- package/.vibe/rules/tools/mcp-hi-ai-guide.md +665 -665
- package/.vibe/rules/tools/mcp-workflow.md +51 -51
- package/.vibe/setup.sh +31 -31
- package/CLAUDE.md +122 -122
- package/LICENSE +21 -21
- package/README.md +568 -568
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +391 -406
- package/dist/cli/index.js.map +1 -1
- package/dist/lib/MemoryManager.js +92 -92
- package/dist/lib/PythonParser.js +108 -108
- package/dist/lib/gemini-mcp.js +15 -15
- package/dist/lib/gemini-oauth.d.ts.map +1 -1
- package/dist/lib/gemini-oauth.js +41 -38
- package/dist/lib/gemini-oauth.js.map +1 -1
- package/dist/lib/gpt-mcp.js +17 -17
- package/dist/lib/gpt-oauth.d.ts.map +1 -1
- package/dist/lib/gpt-oauth.js +50 -45
- package/dist/lib/gpt-oauth.js.map +1 -1
- package/dist/tools/analytics/getUsageAnalytics.js +12 -12
- package/dist/tools/memory/createMemoryTimeline.js +10 -10
- package/dist/tools/memory/getMemoryGraph.js +12 -12
- package/dist/tools/memory/getSessionContext.js +9 -9
- package/dist/tools/memory/linkMemories.js +14 -14
- package/dist/tools/memory/listMemories.js +4 -4
- package/dist/tools/memory/recallMemory.js +4 -4
- package/dist/tools/memory/saveMemory.js +4 -4
- package/dist/tools/memory/searchMemoriesAdvanced.js +22 -22
- package/dist/tools/planning/generatePrd.js +46 -46
- package/dist/tools/prompt/enhancePromptGemini.js +160 -160
- package/dist/tools/reasoning/applyReasoningFramework.js +56 -56
- package/dist/tools/semantic/analyzeDependencyGraph.js +12 -12
- package/package.json +67 -67
- package/templates/constitution-template.md +184 -184
- package/templates/contract-backend-template.md +517 -517
- package/templates/contract-frontend-template.md +594 -594
- package/templates/feature-template.md +96 -96
- package/templates/hooks-template.json +103 -103
- package/templates/spec-template.md +199 -199
- package/dist/lib/vibe-mcp.d.ts.map +0 -1
- package/dist/lib/vibe-mcp.js.map +0 -1
|
@@ -1,339 +1,339 @@
|
|
|
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"
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
## Rules Reference
|
|
17
|
-
|
|
18
|
-
**Must follow `.vibe/rules/`:**
|
|
19
|
-
- `core/development-philosophy.md` - Surgical precision, simplicity
|
|
20
|
-
- `core/quick-start.md` - Korean first, DRY, SRP
|
|
21
|
-
- `core/communication-guide.md` - Communication principles
|
|
22
|
-
|
|
23
|
-
## Description
|
|
24
|
-
|
|
25
|
-
Collect requirements through conversation with the user and create an **AI-executable PTCF structured SPEC document**.
|
|
26
|
-
|
|
27
|
-
> **PTCF**: Persona, Task, Context, Format - Google Gemini prompt optimization framework
|
|
28
|
-
|
|
29
|
-
## External LLM Integration (Optional)
|
|
30
|
-
|
|
31
|
-
When external LLMs are enabled in `.vibe/config.json`, automatically utilize during SPEC creation:
|
|
32
|
-
|
|
33
|
-
```
|
|
34
|
-
/vibe.spec "complex feature"
|
|
35
|
-
↓
|
|
36
|
-
[Claude Opus] Create SPEC draft
|
|
37
|
-
↓
|
|
38
|
-
[GPT enabled?] → Cross-review design via MCP(vibe-gpt)
|
|
39
|
-
↓
|
|
40
|
-
[Gemini enabled?] → UI/UX consultation via MCP(vibe-gemini)
|
|
41
|
-
↓
|
|
42
|
-
[Claude] Finalize SPEC
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
| External LLM | Role | When Used |
|
|
46
|
-
|--------------|------|-----------|
|
|
47
|
-
| GPT 5.2 | Architecture/design review | After SPEC draft completion |
|
|
48
|
-
| Gemini 3 | UI/UX consultation | During design reference discussion |
|
|
49
|
-
|
|
50
|
-
**Activation:**
|
|
51
|
-
```bash
|
|
52
|
-
vibe gpt <api-key> # Enable GPT
|
|
53
|
-
vibe gemini <api-key> # Enable Gemini
|
|
54
|
-
vibe status # Check current settings
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
## Process
|
|
58
|
-
|
|
59
|
-
### 1. Project Analysis
|
|
60
|
-
|
|
61
|
-
**Existing project** (`vibe init`):
|
|
62
|
-
- Source code analysis: `package.json`, `pyproject.toml`, `pubspec.yaml`, `go.mod`, etc.
|
|
63
|
-
- Reference `CLAUDE.md` file (tech stack)
|
|
64
|
-
- Infer framework from file structure
|
|
65
|
-
|
|
66
|
-
**New project** (`vibe init <project-name>`):
|
|
67
|
-
- Suggest tech stack (2-3 options)
|
|
68
|
-
|
|
69
|
-
### 2. Collect Requirements via Conversation
|
|
70
|
-
|
|
71
|
-
**Principles:**
|
|
72
|
-
- Ask **one question at a time**
|
|
73
|
-
- Present options **with numbers** + "Feel free to describe in your own words"
|
|
74
|
-
- **Natural conversation** without fixed order
|
|
75
|
-
|
|
76
|
-
**Required confirmations:**
|
|
77
|
-
- Purpose (Why): Why is it needed?
|
|
78
|
-
- User (Who): Who will use it?
|
|
79
|
-
- Feature scope (What): What features are needed?
|
|
80
|
-
- Tech stack: Confirm existing stack or suggest new
|
|
81
|
-
- Design reference: UI/UX to reference
|
|
82
|
-
|
|
83
|
-
### 3. Write SPEC Document (PTCF Structure)
|
|
84
|
-
|
|
85
|
-
Create `.vibe/specs/{feature-name}.md`:
|
|
86
|
-
|
|
87
|
-
```markdown
|
|
88
|
-
# SPEC: {feature-name}
|
|
89
|
-
|
|
90
|
-
## Persona
|
|
91
|
-
<role>
|
|
92
|
-
Define AI role and expertise for implementation
|
|
93
|
-
- Senior developer on the project
|
|
94
|
-
- Follow existing code patterns
|
|
95
|
-
- Write testable code
|
|
96
|
-
</role>
|
|
97
|
-
|
|
98
|
-
## Context
|
|
99
|
-
<context>
|
|
100
|
-
### Background
|
|
101
|
-
- Why this feature is needed
|
|
102
|
-
- Who will use it
|
|
103
|
-
|
|
104
|
-
### Tech Stack
|
|
105
|
-
- Backend: {technology}
|
|
106
|
-
- Frontend: {technology}
|
|
107
|
-
- Database: {technology}
|
|
108
|
-
|
|
109
|
-
### Related Code
|
|
110
|
-
- `src/xxx/`: Existing implementation to reference
|
|
111
|
-
- `src/yyy/`: Files to modify
|
|
112
|
-
|
|
113
|
-
### Design Reference
|
|
114
|
-
- {Reference app/service}
|
|
115
|
-
</context>
|
|
116
|
-
|
|
117
|
-
## Task
|
|
118
|
-
<task>
|
|
119
|
-
### Phase 1: {phase-name}
|
|
120
|
-
1. [ ] {specific task}
|
|
121
|
-
- File: `path/to/file`
|
|
122
|
-
- Verify: `command`
|
|
123
|
-
2. [ ] {specific task}
|
|
124
|
-
|
|
125
|
-
### Phase 2: {phase-name}
|
|
126
|
-
1. [ ] {specific task}
|
|
127
|
-
2. [ ] {specific task}
|
|
128
|
-
|
|
129
|
-
### Phase 3: Testing and Verification
|
|
130
|
-
1. [ ] Unit Tests
|
|
131
|
-
2. [ ] Integration Tests
|
|
132
|
-
</task>
|
|
133
|
-
|
|
134
|
-
## Constraints
|
|
135
|
-
<constraints>
|
|
136
|
-
- Follow existing code patterns
|
|
137
|
-
- Localize error messages
|
|
138
|
-
- Separate configuration via environment variables
|
|
139
|
-
- {other constraints}
|
|
140
|
-
</constraints>
|
|
141
|
-
|
|
142
|
-
## Output Format
|
|
143
|
-
<output_format>
|
|
144
|
-
### Files to Create
|
|
145
|
-
- `path/to/new/file.ts`
|
|
146
|
-
- `path/to/new/file.test.ts`
|
|
147
|
-
|
|
148
|
-
### Files to Modify
|
|
149
|
-
- `path/to/existing/file.ts`
|
|
150
|
-
|
|
151
|
-
### Verification Commands
|
|
152
|
-
- `npm test`
|
|
153
|
-
- `npm run build`
|
|
154
|
-
</output_format>
|
|
155
|
-
|
|
156
|
-
## Acceptance Criteria
|
|
157
|
-
<acceptance>
|
|
158
|
-
- [ ] {verifiable criterion 1}
|
|
159
|
-
- [ ] {verifiable criterion 2}
|
|
160
|
-
- [ ] All tests pass
|
|
161
|
-
- [ ] Build succeeds
|
|
162
|
-
</acceptance>
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
### 4. Create Feature File (BDD) - Required
|
|
166
|
-
|
|
167
|
-
**Must** create `.vibe/features/{feature-name}.feature` file.
|
|
168
|
-
|
|
169
|
-
**Creation rules:**
|
|
170
|
-
1. Convert each SPEC Acceptance Criteria → one Scenario
|
|
171
|
-
2. Include Happy Path (normal case) + Edge Case (exception case)
|
|
172
|
-
3. Follow Given-When-Then format
|
|
173
|
-
|
|
174
|
-
**Feature structure:**
|
|
175
|
-
```markdown
|
|
176
|
-
# Feature: {feature-name}
|
|
177
|
-
|
|
178
|
-
**SPEC**: `.vibe/specs/{feature-name}.md`
|
|
179
|
-
|
|
180
|
-
## User Story
|
|
181
|
-
**As a** {user}
|
|
182
|
-
**I want** {feature}
|
|
183
|
-
**So that** {value}
|
|
184
|
-
|
|
185
|
-
## Scenarios
|
|
186
|
-
|
|
187
|
-
### Scenario 1: {Happy Path}
|
|
188
|
-
\`\`\`gherkin
|
|
189
|
-
Scenario: {title}
|
|
190
|
-
Given {precondition}
|
|
191
|
-
When {action}
|
|
192
|
-
Then {result}
|
|
193
|
-
\`\`\`
|
|
194
|
-
**Verification**: SPEC AC #1
|
|
195
|
-
|
|
196
|
-
### Scenario 2: {Edge Case}
|
|
197
|
-
...
|
|
198
|
-
|
|
199
|
-
## Coverage
|
|
200
|
-
| Scenario | SPEC AC | Status |
|
|
201
|
-
|----------|---------|--------|
|
|
202
|
-
| 1 | AC-1 | ⬜ |
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
### 5. Ambiguity Scan - Required
|
|
206
|
-
|
|
207
|
-
After creating SPEC draft, **must perform systematic ambiguity check**.
|
|
208
|
-
|
|
209
|
-
**Check categories:**
|
|
210
|
-
|
|
211
|
-
| Category | Check Items |
|
|
212
|
-
|----------|-------------|
|
|
213
|
-
| **Functional Scope** | Missing features, unclear behavior definitions |
|
|
214
|
-
| **Data Model** | Undefined entities, unclear relationships |
|
|
215
|
-
| **Non-Functional** | Missing performance requirements, security considerations |
|
|
216
|
-
| **Edge Cases** | Boundary conditions, error handling scenarios |
|
|
217
|
-
| **Integration Points** | External system integration, API contracts |
|
|
218
|
-
|
|
219
|
-
**Check process:**
|
|
220
|
-
|
|
221
|
-
```
|
|
222
|
-
1. Create SPEC draft
|
|
223
|
-
↓
|
|
224
|
-
2. Scan by category for ambiguity
|
|
225
|
-
↓
|
|
226
|
-
3. Present list of found ambiguities
|
|
227
|
-
↓
|
|
228
|
-
4. Request user clarification
|
|
229
|
-
↓
|
|
230
|
-
5. Refine SPEC
|
|
231
|
-
↓
|
|
232
|
-
6. Re-check (until 0 ambiguities)
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
**Ambiguity output format:**
|
|
236
|
-
|
|
237
|
-
```markdown
|
|
238
|
-
## 🔍 Ambiguity Scan Results
|
|
239
|
-
|
|
240
|
-
### Functional Scope
|
|
241
|
-
- ⚠️ "Login failure behavior" not defined
|
|
242
|
-
- ⚠️ "Session expiration handling" unclear
|
|
243
|
-
|
|
244
|
-
### Edge Cases
|
|
245
|
-
- ⚠️ Concurrent login permission undefined
|
|
246
|
-
- ⚠️ No password retry limit specified
|
|
247
|
-
|
|
248
|
-
Please clarify the above items.
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
### 6. Quality Validation
|
|
252
|
-
|
|
253
|
-
Self-evaluate against `.vibe/rules/quality/checklist.md` (0-100 score)
|
|
254
|
-
|
|
255
|
-
## Output
|
|
256
|
-
|
|
257
|
-
- `.vibe/specs/{feature-name}.md` - PTCF structured SPEC
|
|
258
|
-
- `.vibe/features/{feature-name}.feature` - BDD Feature file
|
|
259
|
-
- Ambiguity scan results (0 ambiguities confirmed)
|
|
260
|
-
- Quality score and improvement suggestions
|
|
261
|
-
|
|
262
|
-
## Example
|
|
263
|
-
|
|
264
|
-
```
|
|
265
|
-
User: /vibe.spec "brick-game"
|
|
266
|
-
|
|
267
|
-
Claude:
|
|
268
|
-
You're making a brick game! What style are you thinking of?
|
|
269
|
-
|
|
270
|
-
1. Classic Breakout style
|
|
271
|
-
2. Arkanoid (with power-up items)
|
|
272
|
-
3. Custom style with special gameplay
|
|
273
|
-
|
|
274
|
-
Feel free to describe in your own words.
|
|
275
|
-
|
|
276
|
-
User: 1
|
|
277
|
-
|
|
278
|
-
Claude: What platform will it run on?
|
|
279
|
-
|
|
280
|
-
1. Web (browser)
|
|
281
|
-
2. Mobile (iOS/Android)
|
|
282
|
-
3. Desktop
|
|
283
|
-
|
|
284
|
-
User: 1
|
|
285
|
-
|
|
286
|
-
Claude:
|
|
287
|
-
Here are tech stack suggestions for web game development:
|
|
288
|
-
|
|
289
|
-
1. **Phaser.js** (Recommended) - Game framework with built-in physics engine
|
|
290
|
-
2. **Canvas + JavaScript** - Lightweight with fine control
|
|
291
|
-
3. **PixiJS + Matter.js** - High-performance rendering
|
|
292
|
-
|
|
293
|
-
User: 1
|
|
294
|
-
|
|
295
|
-
Claude: What design style?
|
|
296
|
-
|
|
297
|
-
1. Retro pixel (Atari Breakout)
|
|
298
|
-
2. Neon graphics (Arkanoid)
|
|
299
|
-
3. Modern 3D effects
|
|
300
|
-
|
|
301
|
-
User: 2
|
|
302
|
-
|
|
303
|
-
[Conversation continues...]
|
|
304
|
-
|
|
305
|
-
Claude: SPEC draft created. Running ambiguity scan.
|
|
306
|
-
|
|
307
|
-
## 🔍 Ambiguity Scan Results
|
|
308
|
-
|
|
309
|
-
### Functional Scope
|
|
310
|
-
- ⚠️ Game over condition not defined (ball drop vs lives system)
|
|
311
|
-
- ⚠️ Stage clear condition unclear
|
|
312
|
-
|
|
313
|
-
### Edge Cases
|
|
314
|
-
- ⚠️ Ball reflection angle when hitting paddle edge
|
|
315
|
-
- ⚠️ Multiple brick collision handling
|
|
316
|
-
|
|
317
|
-
Please clarify the above items.
|
|
318
|
-
|
|
319
|
-
User: 3 lives, clear when all bricks destroyed, edge reflects at 45 degrees
|
|
320
|
-
|
|
321
|
-
Claude: Thank you. SPEC has been refined.
|
|
322
|
-
|
|
323
|
-
🔍 Re-check result: 0 ambiguities
|
|
324
|
-
|
|
325
|
-
✅ SPEC document complete!
|
|
326
|
-
📄 .vibe/specs/brick-game.md (PTCF structure)
|
|
327
|
-
📄 .vibe/features/brick-game.feature
|
|
328
|
-
📊 Quality score: 92/100 (A)
|
|
329
|
-
```
|
|
330
|
-
|
|
331
|
-
## Next Step
|
|
332
|
-
|
|
333
|
-
```
|
|
334
|
-
/vibe.run "brick-game"
|
|
335
|
-
```
|
|
336
|
-
|
|
337
|
-
---
|
|
338
|
-
|
|
339
|
-
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"
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Rules Reference
|
|
17
|
+
|
|
18
|
+
**Must follow `.vibe/rules/`:**
|
|
19
|
+
- `core/development-philosophy.md` - Surgical precision, simplicity
|
|
20
|
+
- `core/quick-start.md` - Korean first, DRY, SRP
|
|
21
|
+
- `core/communication-guide.md` - Communication principles
|
|
22
|
+
|
|
23
|
+
## Description
|
|
24
|
+
|
|
25
|
+
Collect requirements through conversation with the user and create an **AI-executable PTCF structured SPEC document**.
|
|
26
|
+
|
|
27
|
+
> **PTCF**: Persona, Task, Context, Format - Google Gemini prompt optimization framework
|
|
28
|
+
|
|
29
|
+
## External LLM Integration (Optional)
|
|
30
|
+
|
|
31
|
+
When external LLMs are enabled in `.vibe/config.json`, automatically utilize during SPEC creation:
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
/vibe.spec "complex feature"
|
|
35
|
+
↓
|
|
36
|
+
[Claude Opus] Create SPEC draft
|
|
37
|
+
↓
|
|
38
|
+
[GPT enabled?] → Cross-review design via MCP(vibe-gpt)
|
|
39
|
+
↓
|
|
40
|
+
[Gemini enabled?] → UI/UX consultation via MCP(vibe-gemini)
|
|
41
|
+
↓
|
|
42
|
+
[Claude] Finalize SPEC
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
| External LLM | Role | When Used |
|
|
46
|
+
|--------------|------|-----------|
|
|
47
|
+
| GPT 5.2 | Architecture/design review | After SPEC draft completion |
|
|
48
|
+
| Gemini 3 | UI/UX consultation | During design reference discussion |
|
|
49
|
+
|
|
50
|
+
**Activation:**
|
|
51
|
+
```bash
|
|
52
|
+
vibe gpt <api-key> # Enable GPT
|
|
53
|
+
vibe gemini <api-key> # Enable Gemini
|
|
54
|
+
vibe status # Check current settings
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Process
|
|
58
|
+
|
|
59
|
+
### 1. Project Analysis
|
|
60
|
+
|
|
61
|
+
**Existing project** (`vibe init`):
|
|
62
|
+
- Source code analysis: `package.json`, `pyproject.toml`, `pubspec.yaml`, `go.mod`, etc.
|
|
63
|
+
- Reference `CLAUDE.md` file (tech stack)
|
|
64
|
+
- Infer framework from file structure
|
|
65
|
+
|
|
66
|
+
**New project** (`vibe init <project-name>`):
|
|
67
|
+
- Suggest tech stack (2-3 options)
|
|
68
|
+
|
|
69
|
+
### 2. Collect Requirements via Conversation
|
|
70
|
+
|
|
71
|
+
**Principles:**
|
|
72
|
+
- Ask **one question at a time**
|
|
73
|
+
- Present options **with numbers** + "Feel free to describe in your own words"
|
|
74
|
+
- **Natural conversation** without fixed order
|
|
75
|
+
|
|
76
|
+
**Required confirmations:**
|
|
77
|
+
- Purpose (Why): Why is it needed?
|
|
78
|
+
- User (Who): Who will use it?
|
|
79
|
+
- Feature scope (What): What features are needed?
|
|
80
|
+
- Tech stack: Confirm existing stack or suggest new
|
|
81
|
+
- Design reference: UI/UX to reference
|
|
82
|
+
|
|
83
|
+
### 3. Write SPEC Document (PTCF Structure)
|
|
84
|
+
|
|
85
|
+
Create `.vibe/specs/{feature-name}.md`:
|
|
86
|
+
|
|
87
|
+
```markdown
|
|
88
|
+
# SPEC: {feature-name}
|
|
89
|
+
|
|
90
|
+
## Persona
|
|
91
|
+
<role>
|
|
92
|
+
Define AI role and expertise for implementation
|
|
93
|
+
- Senior developer on the project
|
|
94
|
+
- Follow existing code patterns
|
|
95
|
+
- Write testable code
|
|
96
|
+
</role>
|
|
97
|
+
|
|
98
|
+
## Context
|
|
99
|
+
<context>
|
|
100
|
+
### Background
|
|
101
|
+
- Why this feature is needed
|
|
102
|
+
- Who will use it
|
|
103
|
+
|
|
104
|
+
### Tech Stack
|
|
105
|
+
- Backend: {technology}
|
|
106
|
+
- Frontend: {technology}
|
|
107
|
+
- Database: {technology}
|
|
108
|
+
|
|
109
|
+
### Related Code
|
|
110
|
+
- `src/xxx/`: Existing implementation to reference
|
|
111
|
+
- `src/yyy/`: Files to modify
|
|
112
|
+
|
|
113
|
+
### Design Reference
|
|
114
|
+
- {Reference app/service}
|
|
115
|
+
</context>
|
|
116
|
+
|
|
117
|
+
## Task
|
|
118
|
+
<task>
|
|
119
|
+
### Phase 1: {phase-name}
|
|
120
|
+
1. [ ] {specific task}
|
|
121
|
+
- File: `path/to/file`
|
|
122
|
+
- Verify: `command`
|
|
123
|
+
2. [ ] {specific task}
|
|
124
|
+
|
|
125
|
+
### Phase 2: {phase-name}
|
|
126
|
+
1. [ ] {specific task}
|
|
127
|
+
2. [ ] {specific task}
|
|
128
|
+
|
|
129
|
+
### Phase 3: Testing and Verification
|
|
130
|
+
1. [ ] Unit Tests
|
|
131
|
+
2. [ ] Integration Tests
|
|
132
|
+
</task>
|
|
133
|
+
|
|
134
|
+
## Constraints
|
|
135
|
+
<constraints>
|
|
136
|
+
- Follow existing code patterns
|
|
137
|
+
- Localize error messages
|
|
138
|
+
- Separate configuration via environment variables
|
|
139
|
+
- {other constraints}
|
|
140
|
+
</constraints>
|
|
141
|
+
|
|
142
|
+
## Output Format
|
|
143
|
+
<output_format>
|
|
144
|
+
### Files to Create
|
|
145
|
+
- `path/to/new/file.ts`
|
|
146
|
+
- `path/to/new/file.test.ts`
|
|
147
|
+
|
|
148
|
+
### Files to Modify
|
|
149
|
+
- `path/to/existing/file.ts`
|
|
150
|
+
|
|
151
|
+
### Verification Commands
|
|
152
|
+
- `npm test`
|
|
153
|
+
- `npm run build`
|
|
154
|
+
</output_format>
|
|
155
|
+
|
|
156
|
+
## Acceptance Criteria
|
|
157
|
+
<acceptance>
|
|
158
|
+
- [ ] {verifiable criterion 1}
|
|
159
|
+
- [ ] {verifiable criterion 2}
|
|
160
|
+
- [ ] All tests pass
|
|
161
|
+
- [ ] Build succeeds
|
|
162
|
+
</acceptance>
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### 4. Create Feature File (BDD) - Required
|
|
166
|
+
|
|
167
|
+
**Must** create `.vibe/features/{feature-name}.feature` file.
|
|
168
|
+
|
|
169
|
+
**Creation rules:**
|
|
170
|
+
1. Convert each SPEC Acceptance Criteria → one Scenario
|
|
171
|
+
2. Include Happy Path (normal case) + Edge Case (exception case)
|
|
172
|
+
3. Follow Given-When-Then format
|
|
173
|
+
|
|
174
|
+
**Feature structure:**
|
|
175
|
+
```markdown
|
|
176
|
+
# Feature: {feature-name}
|
|
177
|
+
|
|
178
|
+
**SPEC**: `.vibe/specs/{feature-name}.md`
|
|
179
|
+
|
|
180
|
+
## User Story
|
|
181
|
+
**As a** {user}
|
|
182
|
+
**I want** {feature}
|
|
183
|
+
**So that** {value}
|
|
184
|
+
|
|
185
|
+
## Scenarios
|
|
186
|
+
|
|
187
|
+
### Scenario 1: {Happy Path}
|
|
188
|
+
\`\`\`gherkin
|
|
189
|
+
Scenario: {title}
|
|
190
|
+
Given {precondition}
|
|
191
|
+
When {action}
|
|
192
|
+
Then {result}
|
|
193
|
+
\`\`\`
|
|
194
|
+
**Verification**: SPEC AC #1
|
|
195
|
+
|
|
196
|
+
### Scenario 2: {Edge Case}
|
|
197
|
+
...
|
|
198
|
+
|
|
199
|
+
## Coverage
|
|
200
|
+
| Scenario | SPEC AC | Status |
|
|
201
|
+
|----------|---------|--------|
|
|
202
|
+
| 1 | AC-1 | ⬜ |
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### 5. Ambiguity Scan - Required
|
|
206
|
+
|
|
207
|
+
After creating SPEC draft, **must perform systematic ambiguity check**.
|
|
208
|
+
|
|
209
|
+
**Check categories:**
|
|
210
|
+
|
|
211
|
+
| Category | Check Items |
|
|
212
|
+
|----------|-------------|
|
|
213
|
+
| **Functional Scope** | Missing features, unclear behavior definitions |
|
|
214
|
+
| **Data Model** | Undefined entities, unclear relationships |
|
|
215
|
+
| **Non-Functional** | Missing performance requirements, security considerations |
|
|
216
|
+
| **Edge Cases** | Boundary conditions, error handling scenarios |
|
|
217
|
+
| **Integration Points** | External system integration, API contracts |
|
|
218
|
+
|
|
219
|
+
**Check process:**
|
|
220
|
+
|
|
221
|
+
```
|
|
222
|
+
1. Create SPEC draft
|
|
223
|
+
↓
|
|
224
|
+
2. Scan by category for ambiguity
|
|
225
|
+
↓
|
|
226
|
+
3. Present list of found ambiguities
|
|
227
|
+
↓
|
|
228
|
+
4. Request user clarification
|
|
229
|
+
↓
|
|
230
|
+
5. Refine SPEC
|
|
231
|
+
↓
|
|
232
|
+
6. Re-check (until 0 ambiguities)
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
**Ambiguity output format:**
|
|
236
|
+
|
|
237
|
+
```markdown
|
|
238
|
+
## 🔍 Ambiguity Scan Results
|
|
239
|
+
|
|
240
|
+
### Functional Scope
|
|
241
|
+
- ⚠️ "Login failure behavior" not defined
|
|
242
|
+
- ⚠️ "Session expiration handling" unclear
|
|
243
|
+
|
|
244
|
+
### Edge Cases
|
|
245
|
+
- ⚠️ Concurrent login permission undefined
|
|
246
|
+
- ⚠️ No password retry limit specified
|
|
247
|
+
|
|
248
|
+
Please clarify the above items.
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### 6. Quality Validation
|
|
252
|
+
|
|
253
|
+
Self-evaluate against `.vibe/rules/quality/checklist.md` (0-100 score)
|
|
254
|
+
|
|
255
|
+
## Output
|
|
256
|
+
|
|
257
|
+
- `.vibe/specs/{feature-name}.md` - PTCF structured SPEC
|
|
258
|
+
- `.vibe/features/{feature-name}.feature` - BDD Feature file
|
|
259
|
+
- Ambiguity scan results (0 ambiguities confirmed)
|
|
260
|
+
- Quality score and improvement suggestions
|
|
261
|
+
|
|
262
|
+
## Example
|
|
263
|
+
|
|
264
|
+
```
|
|
265
|
+
User: /vibe.spec "brick-game"
|
|
266
|
+
|
|
267
|
+
Claude:
|
|
268
|
+
You're making a brick game! What style are you thinking of?
|
|
269
|
+
|
|
270
|
+
1. Classic Breakout style
|
|
271
|
+
2. Arkanoid (with power-up items)
|
|
272
|
+
3. Custom style with special gameplay
|
|
273
|
+
|
|
274
|
+
Feel free to describe in your own words.
|
|
275
|
+
|
|
276
|
+
User: 1
|
|
277
|
+
|
|
278
|
+
Claude: What platform will it run on?
|
|
279
|
+
|
|
280
|
+
1. Web (browser)
|
|
281
|
+
2. Mobile (iOS/Android)
|
|
282
|
+
3. Desktop
|
|
283
|
+
|
|
284
|
+
User: 1
|
|
285
|
+
|
|
286
|
+
Claude:
|
|
287
|
+
Here are tech stack suggestions for web game development:
|
|
288
|
+
|
|
289
|
+
1. **Phaser.js** (Recommended) - Game framework with built-in physics engine
|
|
290
|
+
2. **Canvas + JavaScript** - Lightweight with fine control
|
|
291
|
+
3. **PixiJS + Matter.js** - High-performance rendering
|
|
292
|
+
|
|
293
|
+
User: 1
|
|
294
|
+
|
|
295
|
+
Claude: What design style?
|
|
296
|
+
|
|
297
|
+
1. Retro pixel (Atari Breakout)
|
|
298
|
+
2. Neon graphics (Arkanoid)
|
|
299
|
+
3. Modern 3D effects
|
|
300
|
+
|
|
301
|
+
User: 2
|
|
302
|
+
|
|
303
|
+
[Conversation continues...]
|
|
304
|
+
|
|
305
|
+
Claude: SPEC draft created. Running ambiguity scan.
|
|
306
|
+
|
|
307
|
+
## 🔍 Ambiguity Scan Results
|
|
308
|
+
|
|
309
|
+
### Functional Scope
|
|
310
|
+
- ⚠️ Game over condition not defined (ball drop vs lives system)
|
|
311
|
+
- ⚠️ Stage clear condition unclear
|
|
312
|
+
|
|
313
|
+
### Edge Cases
|
|
314
|
+
- ⚠️ Ball reflection angle when hitting paddle edge
|
|
315
|
+
- ⚠️ Multiple brick collision handling
|
|
316
|
+
|
|
317
|
+
Please clarify the above items.
|
|
318
|
+
|
|
319
|
+
User: 3 lives, clear when all bricks destroyed, edge reflects at 45 degrees
|
|
320
|
+
|
|
321
|
+
Claude: Thank you. SPEC has been refined.
|
|
322
|
+
|
|
323
|
+
🔍 Re-check result: 0 ambiguities
|
|
324
|
+
|
|
325
|
+
✅ SPEC document complete!
|
|
326
|
+
📄 .vibe/specs/brick-game.md (PTCF structure)
|
|
327
|
+
📄 .vibe/features/brick-game.feature
|
|
328
|
+
📊 Quality score: 92/100 (A)
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
## Next Step
|
|
332
|
+
|
|
333
|
+
```
|
|
334
|
+
/vibe.run "brick-game"
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
---
|
|
338
|
+
|
|
339
|
+
ARGUMENTS: $ARGUMENTS
|