@su-record/vibe 2.3.0 → 2.3.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/settings.json +35 -35
- package/.claude/settings.local.json +24 -25
- package/.claude/vibe/constitution.md +184 -184
- package/.claude/vibe/rules/core/communication-guide.md +104 -104
- package/.claude/vibe/rules/core/development-philosophy.md +52 -52
- package/.claude/vibe/rules/core/quick-start.md +120 -120
- package/.claude/vibe/rules/languages/dart-flutter.md +509 -509
- package/.claude/vibe/rules/languages/go.md +396 -396
- package/.claude/vibe/rules/languages/java-spring.md +586 -586
- package/.claude/vibe/rules/languages/kotlin-android.md +491 -491
- package/.claude/vibe/rules/languages/python-django.md +371 -371
- package/.claude/vibe/rules/languages/python-fastapi.md +386 -386
- package/.claude/vibe/rules/languages/rust.md +425 -425
- package/.claude/vibe/rules/languages/swift-ios.md +516 -516
- package/.claude/vibe/rules/languages/typescript-nextjs.md +441 -441
- package/.claude/vibe/rules/languages/typescript-node.md +375 -375
- package/.claude/vibe/rules/languages/typescript-nuxt.md +521 -521
- package/.claude/vibe/rules/languages/typescript-react-native.md +446 -446
- package/.claude/vibe/rules/languages/typescript-react.md +525 -525
- package/.claude/vibe/rules/languages/typescript-vue.md +353 -353
- package/.claude/vibe/rules/quality/bdd-contract-testing.md +388 -388
- package/.claude/vibe/rules/quality/checklist.md +276 -276
- package/.claude/vibe/rules/quality/testing-strategy.md +437 -437
- package/.claude/vibe/rules/standards/anti-patterns.md +369 -369
- package/.claude/vibe/rules/standards/code-structure.md +291 -291
- package/.claude/vibe/rules/standards/complexity-metrics.md +312 -312
- package/.claude/vibe/rules/standards/naming-conventions.md +198 -198
- package/.claude/vibe/setup.sh +31 -31
- package/.claude/vibe/templates/constitution-template.md +184 -184
- package/.claude/vibe/templates/contract-backend-template.md +517 -517
- package/.claude/vibe/templates/contract-frontend-template.md +594 -594
- package/.claude/vibe/templates/feature-template.md +96 -96
- package/.claude/vibe/templates/spec-template.md +199 -199
- package/CLAUDE.md +345 -323
- package/LICENSE +21 -21
- package/README.md +744 -724
- package/agents/compounder.md +261 -261
- package/agents/diagrammer.md +178 -178
- package/agents/e2e-tester.md +266 -266
- package/agents/explorer.md +48 -48
- package/agents/implementer.md +53 -53
- package/agents/research/best-practices-agent.md +139 -139
- package/agents/research/codebase-patterns-agent.md +147 -147
- package/agents/research/framework-docs-agent.md +181 -181
- package/agents/research/security-advisory-agent.md +167 -167
- package/agents/review/architecture-reviewer.md +107 -107
- package/agents/review/complexity-reviewer.md +116 -116
- package/agents/review/data-integrity-reviewer.md +88 -88
- package/agents/review/git-history-reviewer.md +103 -103
- package/agents/review/performance-reviewer.md +86 -86
- package/agents/review/python-reviewer.md +152 -152
- package/agents/review/rails-reviewer.md +139 -139
- package/agents/review/react-reviewer.md +144 -144
- package/agents/review/security-reviewer.md +80 -80
- package/agents/review/simplicity-reviewer.md +140 -140
- package/agents/review/test-coverage-reviewer.md +116 -116
- package/agents/review/typescript-reviewer.md +127 -127
- package/agents/searcher.md +54 -54
- package/agents/simplifier.md +119 -119
- package/agents/tester.md +49 -49
- package/agents/ui-previewer.md +137 -137
- package/commands/vibe.analyze.md +245 -180
- package/commands/vibe.reason.md +223 -183
- package/commands/vibe.review.md +200 -136
- package/commands/vibe.run.md +838 -836
- package/commands/vibe.spec.md +419 -383
- package/commands/vibe.utils.md +101 -101
- package/commands/vibe.verify.md +282 -241
- package/dist/cli/index.js +385 -385
- package/dist/lib/MemoryManager.d.ts.map +1 -1
- package/dist/lib/MemoryManager.js +119 -114
- package/dist/lib/MemoryManager.js.map +1 -1
- package/dist/lib/PythonParser.js +108 -108
- package/dist/lib/gemini-mcp.js +15 -15
- package/dist/lib/gemini-oauth.js +35 -35
- package/dist/lib/gpt-mcp.js +17 -17
- package/dist/lib/gpt-oauth.js +44 -44
- package/dist/tools/analytics/getUsageAnalytics.js +12 -12
- package/dist/tools/index.d.ts +50 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +61 -0
- package/dist/tools/index.js.map +1 -0
- 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/hooks/hooks.json +121 -103
- package/package.json +73 -69
- package/skills/git-worktree.md +178 -178
- package/skills/priority-todos.md +236 -236
package/commands/vibe.spec.md
CHANGED
|
@@ -1,383 +1,419 @@
|
|
|
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 `.claude/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 `.claude/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
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
-
|
|
74
|
-
- **
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
81
|
-
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
│
|
|
98
|
-
│
|
|
99
|
-
│
|
|
100
|
-
│
|
|
101
|
-
│
|
|
102
|
-
│
|
|
103
|
-
│
|
|
104
|
-
│
|
|
105
|
-
│
|
|
106
|
-
│
|
|
107
|
-
│
|
|
108
|
-
│
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
-
|
|
139
|
-
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
-
|
|
151
|
-
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
- `src/
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
-
|
|
182
|
-
-
|
|
183
|
-
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
- `path/to/new/file.
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
- `npm
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
- [ ] {verifiable criterion
|
|
204
|
-
- [ ]
|
|
205
|
-
- [ ]
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
**
|
|
227
|
-
**
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
| **
|
|
259
|
-
| **
|
|
260
|
-
| **
|
|
261
|
-
| **
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
- ⚠️ "
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
- ⚠️
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
- `.claude/vibe/
|
|
303
|
-
-
|
|
304
|
-
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
- ⚠️
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
- ⚠️
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
📄 .claude/vibe/
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
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 `.claude/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 `.claude/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
|
+
- **Use `findSymbol` tool** to locate relevant existing implementations
|
|
66
|
+
|
|
67
|
+
**New project** (`vibe init <project-name>`):
|
|
68
|
+
- Suggest tech stack (2-3 options)
|
|
69
|
+
|
|
70
|
+
### 2. Collect Requirements via Conversation
|
|
71
|
+
|
|
72
|
+
**Principles:**
|
|
73
|
+
- Ask **one question at a time**
|
|
74
|
+
- Present options **with numbers** + "Feel free to describe in your own words"
|
|
75
|
+
- **Natural conversation** without fixed order
|
|
76
|
+
|
|
77
|
+
**Required confirmations:**
|
|
78
|
+
- Purpose (Why): Why is it needed?
|
|
79
|
+
- User (Who): Who will use it?
|
|
80
|
+
- Feature scope (What): What features are needed?
|
|
81
|
+
- Tech stack: Confirm existing stack or suggest new
|
|
82
|
+
- Design reference: UI/UX to reference
|
|
83
|
+
|
|
84
|
+
### 3. Parallel Research (v2.1.0) - Run AFTER requirements confirmed
|
|
85
|
+
|
|
86
|
+
**⚠️ IMPORTANT: Research starts ONLY after requirements are confirmed via Q&A**
|
|
87
|
+
|
|
88
|
+
Requirements confirmed when:
|
|
89
|
+
- Feature type decided (e.g., "passkey authentication")
|
|
90
|
+
- Tech stack confirmed (e.g., "React + Supabase")
|
|
91
|
+
- Core requirements collected
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
95
|
+
│ 🔍 PARALLEL RESEARCH AGENTS (After requirements confirmed) │
|
|
96
|
+
├─────────────────────────────────────────────────────────────────┤
|
|
97
|
+
│ │
|
|
98
|
+
│ Task 1: best-practices-agent │
|
|
99
|
+
│ └── Best practices for [confirmed feature] + [confirmed stack] │
|
|
100
|
+
│ │
|
|
101
|
+
│ Task 2: framework-docs-agent │
|
|
102
|
+
│ └── Latest docs for [confirmed stack] (via context7) │
|
|
103
|
+
│ │
|
|
104
|
+
│ Task 3: codebase-patterns-agent │
|
|
105
|
+
│ └── Analyze similar patterns in existing codebase │
|
|
106
|
+
│ │
|
|
107
|
+
│ Task 4: security-advisory-agent │
|
|
108
|
+
│ └── Security advisories for [confirmed feature] │
|
|
109
|
+
│ │
|
|
110
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
**Execution (ALL in parallel):**
|
|
114
|
+
```
|
|
115
|
+
# Generate specific prompts based on confirmed requirements
|
|
116
|
+
Task(model: "haiku", subagent_type: "Explore",
|
|
117
|
+
prompt: "Research best practices for [passkey auth] with [React + Supabase]")
|
|
118
|
+
Task(model: "haiku", subagent_type: "Explore",
|
|
119
|
+
prompt: "Get Supabase Auth + WebAuthn docs from context7")
|
|
120
|
+
Task(model: "haiku", subagent_type: "Explore",
|
|
121
|
+
prompt: "Find existing auth patterns in this codebase")
|
|
122
|
+
Task(model: "haiku", subagent_type: "Explore",
|
|
123
|
+
prompt: "Check OWASP WebAuthn security guidelines")
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**Research results are reflected in SPEC's Context section.**
|
|
127
|
+
|
|
128
|
+
### 4. Write SPEC Document (PTCF Structure)
|
|
129
|
+
|
|
130
|
+
Create `.claude/vibe/specs/{feature-name}.md`:
|
|
131
|
+
|
|
132
|
+
```markdown
|
|
133
|
+
# SPEC: {feature-name}
|
|
134
|
+
|
|
135
|
+
## Persona
|
|
136
|
+
<role>
|
|
137
|
+
Define AI role and expertise for implementation
|
|
138
|
+
- Senior developer on the project
|
|
139
|
+
- Follow existing code patterns
|
|
140
|
+
- Write testable code
|
|
141
|
+
</role>
|
|
142
|
+
|
|
143
|
+
## Context
|
|
144
|
+
<context>
|
|
145
|
+
### Background
|
|
146
|
+
- Why this feature is needed
|
|
147
|
+
- Who will use it
|
|
148
|
+
|
|
149
|
+
### Tech Stack
|
|
150
|
+
- Backend: {technology}
|
|
151
|
+
- Frontend: {technology}
|
|
152
|
+
- Database: {technology}
|
|
153
|
+
|
|
154
|
+
### Related Code
|
|
155
|
+
- `src/xxx/`: Existing implementation to reference
|
|
156
|
+
- `src/yyy/`: Files to modify
|
|
157
|
+
|
|
158
|
+
### Design Reference
|
|
159
|
+
- {Reference app/service}
|
|
160
|
+
</context>
|
|
161
|
+
|
|
162
|
+
## Task
|
|
163
|
+
<task>
|
|
164
|
+
### Phase 1: {phase-name}
|
|
165
|
+
1. [ ] {specific task}
|
|
166
|
+
- File: `path/to/file`
|
|
167
|
+
- Verify: `command`
|
|
168
|
+
2. [ ] {specific task}
|
|
169
|
+
|
|
170
|
+
### Phase 2: {phase-name}
|
|
171
|
+
1. [ ] {specific task}
|
|
172
|
+
2. [ ] {specific task}
|
|
173
|
+
|
|
174
|
+
### Phase 3: Testing and Verification
|
|
175
|
+
1. [ ] Unit Tests
|
|
176
|
+
2. [ ] Integration Tests
|
|
177
|
+
</task>
|
|
178
|
+
|
|
179
|
+
## Constraints
|
|
180
|
+
<constraints>
|
|
181
|
+
- Follow existing code patterns
|
|
182
|
+
- Localize error messages
|
|
183
|
+
- Separate configuration via environment variables
|
|
184
|
+
- {other constraints}
|
|
185
|
+
</constraints>
|
|
186
|
+
|
|
187
|
+
## Output Format
|
|
188
|
+
<output_format>
|
|
189
|
+
### Files to Create
|
|
190
|
+
- `path/to/new/file.ts`
|
|
191
|
+
- `path/to/new/file.test.ts`
|
|
192
|
+
|
|
193
|
+
### Files to Modify
|
|
194
|
+
- `path/to/existing/file.ts`
|
|
195
|
+
|
|
196
|
+
### Verification Commands
|
|
197
|
+
- `npm test`
|
|
198
|
+
- `npm run build`
|
|
199
|
+
</output_format>
|
|
200
|
+
|
|
201
|
+
## Acceptance Criteria
|
|
202
|
+
<acceptance>
|
|
203
|
+
- [ ] {verifiable criterion 1}
|
|
204
|
+
- [ ] {verifiable criterion 2}
|
|
205
|
+
- [ ] All tests pass
|
|
206
|
+
- [ ] Build succeeds
|
|
207
|
+
</acceptance>
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### 5. Create Feature File (BDD) - Required
|
|
211
|
+
|
|
212
|
+
**Must** create `.claude/vibe/features/{feature-name}.feature` file.
|
|
213
|
+
|
|
214
|
+
**Creation rules:**
|
|
215
|
+
1. Convert each SPEC Acceptance Criteria → one Scenario
|
|
216
|
+
2. Include Happy Path (normal case) + Edge Case (exception case)
|
|
217
|
+
3. Follow Given-When-Then format
|
|
218
|
+
|
|
219
|
+
**Feature structure:**
|
|
220
|
+
```markdown
|
|
221
|
+
# Feature: {feature-name}
|
|
222
|
+
|
|
223
|
+
**SPEC**: `.claude/vibe/specs/{feature-name}.md`
|
|
224
|
+
|
|
225
|
+
## User Story
|
|
226
|
+
**As a** {user}
|
|
227
|
+
**I want** {feature}
|
|
228
|
+
**So that** {value}
|
|
229
|
+
|
|
230
|
+
## Scenarios
|
|
231
|
+
|
|
232
|
+
### Scenario 1: {Happy Path}
|
|
233
|
+
\`\`\`gherkin
|
|
234
|
+
Scenario: {title}
|
|
235
|
+
Given {precondition}
|
|
236
|
+
When {action}
|
|
237
|
+
Then {result}
|
|
238
|
+
\`\`\`
|
|
239
|
+
**Verification**: SPEC AC #1
|
|
240
|
+
|
|
241
|
+
### Scenario 2: {Edge Case}
|
|
242
|
+
...
|
|
243
|
+
|
|
244
|
+
## Coverage
|
|
245
|
+
| Scenario | SPEC AC | Status |
|
|
246
|
+
|----------|---------|--------|
|
|
247
|
+
| 1 | AC-1 | ⬜ |
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
### 6. Ambiguity Scan - Required
|
|
251
|
+
|
|
252
|
+
After creating SPEC draft, **must perform systematic ambiguity check**.
|
|
253
|
+
|
|
254
|
+
**Check categories:**
|
|
255
|
+
|
|
256
|
+
| Category | Check Items |
|
|
257
|
+
|----------|-------------|
|
|
258
|
+
| **Functional Scope** | Missing features, unclear behavior definitions |
|
|
259
|
+
| **Data Model** | Undefined entities, unclear relationships |
|
|
260
|
+
| **Non-Functional** | Missing performance requirements, security considerations |
|
|
261
|
+
| **Edge Cases** | Boundary conditions, error handling scenarios |
|
|
262
|
+
| **Integration Points** | External system integration, API contracts |
|
|
263
|
+
|
|
264
|
+
**Check process:**
|
|
265
|
+
|
|
266
|
+
```
|
|
267
|
+
1. Create SPEC draft
|
|
268
|
+
↓
|
|
269
|
+
2. Scan by category for ambiguity
|
|
270
|
+
↓
|
|
271
|
+
3. Present list of found ambiguities
|
|
272
|
+
↓
|
|
273
|
+
4. Request user clarification
|
|
274
|
+
↓
|
|
275
|
+
5. Refine SPEC
|
|
276
|
+
↓
|
|
277
|
+
6. Re-check (until 0 ambiguities)
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
**Ambiguity output format:**
|
|
281
|
+
|
|
282
|
+
```markdown
|
|
283
|
+
## 🔍 Ambiguity Scan Results
|
|
284
|
+
|
|
285
|
+
### Functional Scope
|
|
286
|
+
- ⚠️ "Login failure behavior" not defined
|
|
287
|
+
- ⚠️ "Session expiration handling" unclear
|
|
288
|
+
|
|
289
|
+
### Edge Cases
|
|
290
|
+
- ⚠️ Concurrent login permission undefined
|
|
291
|
+
- ⚠️ No password retry limit specified
|
|
292
|
+
|
|
293
|
+
Please clarify the above items.
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
### 7. Quality Validation
|
|
297
|
+
|
|
298
|
+
Self-evaluate against `.claude/vibe/rules/quality/checklist.md` (0-100 score)
|
|
299
|
+
|
|
300
|
+
## Output
|
|
301
|
+
|
|
302
|
+
- `.claude/vibe/specs/{feature-name}.md` - PTCF structured SPEC
|
|
303
|
+
- `.claude/vibe/features/{feature-name}.feature` - BDD Feature file
|
|
304
|
+
- Ambiguity scan results (0 ambiguities confirmed)
|
|
305
|
+
- Quality score and improvement suggestions
|
|
306
|
+
|
|
307
|
+
## Example
|
|
308
|
+
|
|
309
|
+
```
|
|
310
|
+
User: /vibe.spec "brick-game"
|
|
311
|
+
|
|
312
|
+
Claude:
|
|
313
|
+
You're making a brick game! What style are you thinking of?
|
|
314
|
+
|
|
315
|
+
1. Classic Breakout style
|
|
316
|
+
2. Arkanoid (with power-up items)
|
|
317
|
+
3. Custom style with special gameplay
|
|
318
|
+
|
|
319
|
+
Feel free to describe in your own words.
|
|
320
|
+
|
|
321
|
+
User: 1
|
|
322
|
+
|
|
323
|
+
Claude: What platform will it run on?
|
|
324
|
+
|
|
325
|
+
1. Web (browser)
|
|
326
|
+
2. Mobile (iOS/Android)
|
|
327
|
+
3. Desktop
|
|
328
|
+
|
|
329
|
+
User: 1
|
|
330
|
+
|
|
331
|
+
Claude:
|
|
332
|
+
Here are tech stack suggestions for web game development:
|
|
333
|
+
|
|
334
|
+
1. **Phaser.js** (Recommended) - Game framework with built-in physics engine
|
|
335
|
+
2. **Canvas + JavaScript** - Lightweight with fine control
|
|
336
|
+
3. **PixiJS + Matter.js** - High-performance rendering
|
|
337
|
+
|
|
338
|
+
User: 1
|
|
339
|
+
|
|
340
|
+
Claude: What design style?
|
|
341
|
+
|
|
342
|
+
1. Retro pixel (Atari Breakout)
|
|
343
|
+
2. Neon graphics (Arkanoid)
|
|
344
|
+
3. Modern 3D effects
|
|
345
|
+
|
|
346
|
+
User: 2
|
|
347
|
+
|
|
348
|
+
[Conversation continues...]
|
|
349
|
+
|
|
350
|
+
Claude: SPEC draft created. Running ambiguity scan.
|
|
351
|
+
|
|
352
|
+
## 🔍 Ambiguity Scan Results
|
|
353
|
+
|
|
354
|
+
### Functional Scope
|
|
355
|
+
- ⚠️ Game over condition not defined (ball drop vs lives system)
|
|
356
|
+
- ⚠️ Stage clear condition unclear
|
|
357
|
+
|
|
358
|
+
### Edge Cases
|
|
359
|
+
- ⚠️ Ball reflection angle when hitting paddle edge
|
|
360
|
+
- ⚠️ Multiple brick collision handling
|
|
361
|
+
|
|
362
|
+
Please clarify the above items.
|
|
363
|
+
|
|
364
|
+
User: 3 lives, clear when all bricks destroyed, edge reflects at 45 degrees
|
|
365
|
+
|
|
366
|
+
Claude: Thank you. SPEC has been refined.
|
|
367
|
+
|
|
368
|
+
🔍 Re-check result: 0 ambiguities
|
|
369
|
+
|
|
370
|
+
✅ SPEC document complete!
|
|
371
|
+
📄 .claude/vibe/specs/brick-game.md (PTCF structure)
|
|
372
|
+
📄 .claude/vibe/features/brick-game.feature
|
|
373
|
+
📊 Quality score: 92/100 (A)
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
## Vibe Tools (Semantic Analysis & Memory)
|
|
377
|
+
|
|
378
|
+
### Tool Invocation
|
|
379
|
+
All tools are called via:
|
|
380
|
+
```bash
|
|
381
|
+
node -e "import('@su-record/vibe/tools').then(t => t.TOOL_NAME({...args}).then(r => console.log(r.content[0].text)))"
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
### Recommended Tools for SPEC Creation
|
|
385
|
+
|
|
386
|
+
| Tool | Purpose | When to Use |
|
|
387
|
+
|------|---------|-------------|
|
|
388
|
+
| `findSymbol` | Find symbol definitions | Locate existing implementations to reference |
|
|
389
|
+
| `findReferences` | Find all references | Understand how existing code is used |
|
|
390
|
+
| `analyzeComplexity` | Code complexity analysis | Evaluate complexity of code to modify |
|
|
391
|
+
| `saveMemory` | Save important decisions | Store confirmed requirements, design decisions |
|
|
392
|
+
| `recallMemory` | Recall saved memory | Retrieve previous project decisions |
|
|
393
|
+
|
|
394
|
+
### Example Tool Usage in SPEC Creation
|
|
395
|
+
|
|
396
|
+
**1. Find existing auth implementation:**
|
|
397
|
+
```bash
|
|
398
|
+
node -e "import('@su-record/vibe/tools').then(t => t.findSymbol({symbolName: 'login', searchPath: 'src/'}).then(r => console.log(r.content[0].text)))"
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
**2. Save confirmed requirements:**
|
|
402
|
+
```bash
|
|
403
|
+
node -e "import('@su-record/vibe/tools').then(t => t.saveMemory({key: 'brick-game-requirements', value: 'Platform: Web, Stack: Phaser.js, Style: Neon', category: 'spec', projectPath: process.cwd()}).then(r => console.log(r.content[0].text)))"
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
**3. Recall previous decisions:**
|
|
407
|
+
```bash
|
|
408
|
+
node -e "import('@su-record/vibe/tools').then(t => t.recallMemory({key: 'brick-game-requirements', projectPath: process.cwd()}).then(r => console.log(r.content[0].text)))"
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
## Next Step
|
|
412
|
+
|
|
413
|
+
```
|
|
414
|
+
/vibe.run "brick-game"
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
---
|
|
418
|
+
|
|
419
|
+
ARGUMENTS: $ARGUMENTS
|