@su-record/vibe 2.6.18 → 2.6.19
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.md +79 -607
- package/README.md +62 -61
- package/commands/vibe.run.md +37 -0
- package/commands/vibe.spec.review.md +54 -1
- package/dist/cli/postinstall.d.ts +0 -6
- package/dist/cli/postinstall.d.ts.map +1 -1
- package/dist/cli/postinstall.js +18 -0
- package/dist/cli/postinstall.js.map +1 -1
- package/dist/lib/ProgressTracker.d.ts +5 -0
- package/dist/lib/ProgressTracker.d.ts.map +1 -1
- package/dist/lib/ProgressTracker.js +56 -0
- package/dist/lib/ProgressTracker.js.map +1 -1
- package/dist/orchestrator/PhasePipeline.d.ts +2 -0
- package/dist/orchestrator/PhasePipeline.d.ts.map +1 -1
- package/dist/orchestrator/PhasePipeline.js +34 -0
- package/dist/orchestrator/PhasePipeline.js.map +1 -1
- package/hooks/hooks.json +1 -108
- package/hooks/scripts/prompt-dispatcher.js +161 -0
- package/package.json +1 -1
package/CLAUDE.md
CHANGED
|
@@ -11,671 +11,143 @@ SPEC-driven AI Coding Framework (Claude Code Exclusive)
|
|
|
11
11
|
Follow these standards when writing code. See `~/.claude/vibe/rules/` (global) for detailed rules.
|
|
12
12
|
|
|
13
13
|
### Core Principles
|
|
14
|
+
|
|
14
15
|
- **Modify only requested scope** - Don't touch unrelated code
|
|
15
16
|
- **Preserve existing style** - Follow project conventions
|
|
16
17
|
- **Keep working code** - No unnecessary refactoring
|
|
17
18
|
- **Respect user interrupts** - If user interrupts (Ctrl+C/Escape) and sends a new message, the previous task is CANCELLED. Do NOT resume or continue interrupted work. Respond ONLY to the new message.
|
|
18
19
|
|
|
19
20
|
### Code Complexity Limits
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
|
|
|
21
|
+
|
|
22
|
+
| Metric | Limit |
|
|
23
|
+
|----------------------|----------------------------------------------|
|
|
24
|
+
| Function length | ≤30 lines (recommended), ≤50 lines (allowed) |
|
|
25
|
+
| Nesting depth | ≤3 levels |
|
|
26
|
+
| Parameters | ≤5 |
|
|
27
|
+
| Cyclomatic complexity | ≤10 |
|
|
26
28
|
|
|
27
29
|
### TypeScript Rules
|
|
28
|
-
|
|
29
|
-
- No `
|
|
30
|
-
- No
|
|
31
|
-
-
|
|
30
|
+
|
|
31
|
+
- No `any` → `unknown` + type guards
|
|
32
|
+
- No `as any` → proper interfaces
|
|
33
|
+
- No `@ts-ignore`
|
|
34
|
+
- Explicit return types
|
|
32
35
|
|
|
33
36
|
### Error Handling Required
|
|
37
|
+
|
|
34
38
|
- try-catch or error state required
|
|
35
39
|
- Loading state handling
|
|
36
40
|
- User-friendly error messages
|
|
37
41
|
|
|
38
42
|
### Forbidden Patterns
|
|
39
|
-
|
|
40
|
-
- No
|
|
41
|
-
- No
|
|
43
|
+
|
|
44
|
+
- No console.log in commits
|
|
45
|
+
- No hardcoded strings/numbers
|
|
46
|
+
- No commented-out code
|
|
42
47
|
- No incomplete code without TODO
|
|
43
48
|
|
|
44
49
|
## Workflow
|
|
45
50
|
|
|
46
|
-
```
|
|
51
|
+
```text
|
|
47
52
|
/vibe.spec → /new → /vibe.spec.review → /vibe.run → /vibe.trace → (auto) code review → ✅ Done
|
|
48
|
-
↑
|
|
49
|
-
Coverage check (v2.6)
|
|
50
53
|
```
|
|
51
54
|
|
|
52
|
-
**Flow:**
|
|
53
|
-
|
|
54
55
|
1. `/vibe.spec` - Write SPEC (requirements + research + draft)
|
|
55
56
|
2. `/new` - Start new session (clean context)
|
|
56
57
|
3. `/vibe.spec.review` - GPT/Gemini review (3-round mandatory)
|
|
57
58
|
4. `/vibe.run` - Implementation + Gemini review
|
|
58
|
-
5. **(auto)** 13+ agent parallel review
|
|
59
|
-
6. **(auto)** P1/P2 issue auto-fix
|
|
60
|
-
|
|
61
|
-
## Plan Mode vs VIBE (Workflow Selection)
|
|
62
|
-
|
|
63
|
-
**Offer choice to user on development requests:**
|
|
59
|
+
5. **(auto)** 13+ agent parallel review + P1/P2 auto-fix
|
|
64
60
|
|
|
65
|
-
|
|
66
|
-
|-----------|-------------|
|
|
67
|
-
| Simple changes (1-2 files) | Plan Mode |
|
|
68
|
-
| Complex features (3+ files, research/verification needed) | `/vibe.spec` |
|
|
61
|
+
## Plan Mode vs VIBE
|
|
69
62
|
|
|
70
|
-
|
|
|
71
|
-
|
|
72
|
-
|
|
|
73
|
-
|
|
|
74
|
-
| Research | None | 4 parallel agents |
|
|
75
|
-
| Verification | None | `/vibe.verify` against SPEC |
|
|
76
|
-
| History | Not trackable | Git version control |
|
|
63
|
+
| Task Size | Recommended |
|
|
64
|
+
|------------------------------|--------------|
|
|
65
|
+
| Simple changes (1-2 files) | Plan Mode |
|
|
66
|
+
| Complex features (3+ files) | `/vibe.spec` |
|
|
77
67
|
|
|
78
|
-
**
|
|
79
|
-
- After `/vibe.analyze` or `/vibe.review` with dev/modify request → **Ask user for workflow choice**
|
|
80
|
-
- User chooses VIBE → Wait for `/vibe.spec`
|
|
81
|
-
- User chooses Plan Mode → Proceed with EnterPlanMode
|
|
68
|
+
After `/vibe.analyze` or `/vibe.review` with dev request → **Ask user for workflow choice**
|
|
82
69
|
|
|
83
|
-
## ULTRAWORK Mode
|
|
70
|
+
## ULTRAWORK Mode
|
|
84
71
|
|
|
85
|
-
Include `ultrawork` or `ulw` keyword
|
|
86
|
-
|
|
87
|
-
```bash
|
|
88
|
-
/vibe.run "feature-name" ultrawork # All optimizations auto-enabled
|
|
89
|
-
/vibe.run "feature-name" ulw # Same (shorthand)
|
|
90
|
-
```
|
|
72
|
+
Include `ultrawork` or `ulw` keyword for maximum performance:
|
|
91
73
|
|
|
92
|
-
**Activated Features:**
|
|
93
74
|
- Parallel sub-agent exploration (3+ concurrent)
|
|
94
|
-
-
|
|
95
|
-
- **Phase pipelining** - Remove wait time between Phases
|
|
75
|
+
- Background agents + Phase pipelining
|
|
96
76
|
- Boulder Loop (auto-continue until all Phases complete)
|
|
97
|
-
- Auto-retry on error (max 3
|
|
98
|
-
- Auto-compress/save at 70%+ context
|
|
99
|
-
- Continuous execution without confirmation between Phases
|
|
100
|
-
|
|
101
|
-
**Speed Comparison:**
|
|
102
|
-
|
|
103
|
-
| Mode | Per Phase | 5 Phases |
|
|
104
|
-
|------|-----------|----------|
|
|
105
|
-
| Sequential | ~2min | ~10min |
|
|
106
|
-
| Parallel Exploration | ~1.5min | ~7.5min |
|
|
107
|
-
| **ULTRAWORK Pipeline** | **~1min** | **~5min** |
|
|
77
|
+
- Auto-retry on error (max 3), Auto-save at 70%+ context
|
|
108
78
|
|
|
109
79
|
## Commands
|
|
110
80
|
|
|
111
|
-
| Command
|
|
112
|
-
|
|
113
|
-
| `/vibe.spec "
|
|
114
|
-
| `/vibe.spec.review "
|
|
115
|
-
| `/vibe.run "
|
|
116
|
-
| `/vibe.run "
|
|
117
|
-
| `/vibe.verify "
|
|
118
|
-
| `/vibe.review`
|
|
119
|
-
| `/vibe.
|
|
120
|
-
| `/vibe.
|
|
121
|
-
| `/vibe.
|
|
122
|
-
| `/vibe.utils --
|
|
123
|
-
| `/vibe.utils --
|
|
124
|
-
| `/vibe.utils --
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
const result = await askUserQuick.login('my-login');
|
|
137
|
-
|
|
138
|
-
// Custom categories
|
|
139
|
-
const result = await askUser({
|
|
140
|
-
featureName: 'dashboard',
|
|
141
|
-
categories: ['authentication', 'security', 'session'],
|
|
142
|
-
});
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
**Available categories:**
|
|
146
|
-
| Category | Questions |
|
|
147
|
-
|----------|-----------|
|
|
148
|
-
| `authentication` | Auth method, MFA |
|
|
149
|
-
| `security` | Password policy, rate limit |
|
|
150
|
-
| `session` | Duration, concurrent login |
|
|
151
|
-
| `data_model` | Profile fields |
|
|
152
|
-
| `performance` | Response time targets |
|
|
153
|
-
| `integration` | External services |
|
|
154
|
-
|
|
155
|
-
**When to use:**
|
|
156
|
-
- ✅ Critical: auth, security, session → `askUser`
|
|
157
|
-
- ❌ Exploratory: scope, style → Natural conversation
|
|
158
|
-
- ⚠️ ultrawork mode: skipped (uses defaults)
|
|
159
|
-
|
|
160
|
-
### Fire-and-Forget Background Manager
|
|
161
|
-
|
|
162
|
-
Launch background agents without blocking, with automatic concurrency control:
|
|
163
|
-
|
|
164
|
-
```typescript
|
|
165
|
-
import { launch, poll, cancel, getStats } from '@su-record/vibe/orchestrator';
|
|
166
|
-
|
|
167
|
-
// Fire-and-forget - returns immediately (<100ms)
|
|
168
|
-
const { taskId } = launch({
|
|
169
|
-
prompt: 'Analyze codebase',
|
|
170
|
-
agentName: 'analyzer',
|
|
171
|
-
model: 'claude-sonnet-4-5',
|
|
172
|
-
});
|
|
173
|
-
|
|
174
|
-
// Poll for result later
|
|
175
|
-
const result = await poll(taskId);
|
|
176
|
-
|
|
177
|
-
// Check queue stats
|
|
178
|
-
const stats = getStats();
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
**Concurrency limits:**
|
|
182
|
-
|
|
183
|
-
| Model | Limit |
|
|
184
|
-
|-------|-------|
|
|
185
|
-
| claude-opus-4 | 3 |
|
|
186
|
-
| claude-sonnet-4-5 | 5 |
|
|
187
|
-
| claude-haiku-* | 8 |
|
|
188
|
-
|
|
189
|
-
**Error types:**
|
|
190
|
-
- `QueueOverflowError`: Queue at capacity (100 tasks max)
|
|
191
|
-
- `TaskTimeoutError`: Task exceeded 3 minutes
|
|
192
|
-
- `PipelineTimeoutError`: Pipeline exceeded 10 minutes
|
|
193
|
-
- `AgentExecutionError`: Agent execution failed
|
|
194
|
-
|
|
195
|
-
### Phase Pipelining
|
|
196
|
-
|
|
197
|
-
Remove wait time between phases with background preparation:
|
|
198
|
-
|
|
199
|
-
```typescript
|
|
200
|
-
import { PhasePipeline, createStage, createUltraworkPipeline } from '@su-record/vibe/orchestrator';
|
|
201
|
-
|
|
202
|
-
const pipeline = createUltraworkPipeline('my-feature', [
|
|
203
|
-
createStage('Setup', async (ctx) => { /* ... */ }),
|
|
204
|
-
createStage('Core', async (ctx) => { /* ... */ }),
|
|
205
|
-
createStage('Test', async (ctx) => { /* ... */ }),
|
|
206
|
-
]);
|
|
207
|
-
|
|
208
|
-
const result = await pipeline.execute();
|
|
209
|
-
// Next phase preparation happens during current phase execution!
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
### PRD-to-SPEC Automation
|
|
213
|
-
|
|
214
|
-
Generate SPEC documents from PRD (Product Requirements Document):
|
|
215
|
-
|
|
216
|
-
```typescript
|
|
217
|
-
import { parsePRD, generateSpecFromPRD } from '@su-record/vibe/tools';
|
|
218
|
-
|
|
219
|
-
// Parse PRD document
|
|
220
|
-
const prd = parsePRD(prdContent, 'login');
|
|
221
|
-
|
|
222
|
-
// Generate SPEC
|
|
223
|
-
const spec = generateSpecFromPRD(prd, {
|
|
224
|
-
techStack: { frontend: 'React', backend: 'Node.js' },
|
|
225
|
-
});
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
**Supported PRD formats:**
|
|
229
|
-
- Markdown with `## Requirements` sections
|
|
230
|
-
- YAML frontmatter with `requirements:` array
|
|
231
|
-
- Mixed format
|
|
232
|
-
|
|
233
|
-
### Requirements Traceability Matrix (/vibe.trace)
|
|
234
|
-
|
|
235
|
-
Track requirements coverage across SPEC → Feature → Test:
|
|
236
|
-
|
|
237
|
-
```bash
|
|
238
|
-
/vibe.trace "login" # Generate RTM
|
|
239
|
-
/vibe.trace "login" --html # HTML output
|
|
240
|
-
/vibe.trace "login" --save # Save to file
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
```typescript
|
|
244
|
-
import { generateTraceabilityMatrix, formatMatrixAsMarkdown } from '@su-record/vibe/tools';
|
|
245
|
-
|
|
246
|
-
const matrix = generateTraceabilityMatrix('login');
|
|
247
|
-
const markdown = formatMatrixAsMarkdown(matrix);
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
**Coverage levels:**
|
|
251
|
-
| Level | Meaning |
|
|
252
|
-
|-------|---------|
|
|
253
|
-
| Full (✅) | SPEC + Feature + Test all mapped |
|
|
254
|
-
| Partial (⚠️) | Missing one or more mappings |
|
|
255
|
-
| None (❌) | Only in SPEC |
|
|
256
|
-
|
|
257
|
-
### SPEC Versioning
|
|
258
|
-
|
|
259
|
-
Git-integrated version control for SPEC documents:
|
|
260
|
-
|
|
261
|
-
```typescript
|
|
262
|
-
import { bumpSpecVersion, createGitTag, generateChangelog } from '@su-record/vibe/tools';
|
|
263
|
-
|
|
264
|
-
// Bump version (major/minor/patch)
|
|
265
|
-
const newVersion = bumpSpecVersion(specPath, 'minor', [
|
|
266
|
-
{ type: 'added', description: 'New login feature' },
|
|
267
|
-
]);
|
|
268
|
-
|
|
269
|
-
// Create git tag
|
|
270
|
-
createGitTag('login', newVersion.version);
|
|
271
|
-
|
|
272
|
-
// Generate changelog
|
|
273
|
-
const changelog = generateChangelog(versionHistory);
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
## Previous Features (v2.5.15)
|
|
277
|
-
|
|
278
|
-
### Rule Build System
|
|
279
|
-
|
|
280
|
-
Compile individual rule files into consolidated AGENTS.md:
|
|
281
|
-
|
|
282
|
-
```typescript
|
|
283
|
-
import { buildRulesDocument, extractTestCasesFromDir } from '@su-record/vibe/tools';
|
|
284
|
-
|
|
285
|
-
// Build rules from directory
|
|
286
|
-
await buildRulesDocument('./rules', './AGENTS.md', {
|
|
287
|
-
version: '1.0.0',
|
|
288
|
-
title: 'Code Quality Rules',
|
|
289
|
-
abstract: 'Guidelines for code quality',
|
|
290
|
-
});
|
|
291
|
-
|
|
292
|
-
// Extract test cases for LLM evaluation
|
|
293
|
-
await extractTestCasesFromDir('./rules', './test-cases.json');
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
**Rule file structure:**
|
|
297
|
-
```markdown
|
|
298
|
-
---
|
|
299
|
-
title: Rule Title
|
|
300
|
-
impact: CRITICAL
|
|
301
|
-
tags: security, performance
|
|
302
|
-
---
|
|
303
|
-
|
|
304
|
-
## Rule Title
|
|
305
|
-
|
|
306
|
-
Explanation of the rule.
|
|
307
|
-
|
|
308
|
-
**Incorrect:**
|
|
309
|
-
\`\`\`typescript
|
|
310
|
-
// Bad code
|
|
311
|
-
\`\`\`
|
|
312
|
-
|
|
313
|
-
**Correct:**
|
|
314
|
-
\`\`\`typescript
|
|
315
|
-
// Good code
|
|
316
|
-
\`\`\`
|
|
317
|
-
```
|
|
318
|
-
|
|
319
|
-
### Impact-Based Classification
|
|
320
|
-
|
|
321
|
-
Rules are classified by impact level:
|
|
322
|
-
|
|
323
|
-
| Level | Color | Priority |
|
|
324
|
-
|-------|-------|----------|
|
|
325
|
-
| CRITICAL | 🔴 Red | 0 (highest) |
|
|
326
|
-
| HIGH | 🟡 Yellow | 1 |
|
|
327
|
-
| MEDIUM-HIGH | 🟡 Yellow | 2 |
|
|
328
|
-
| MEDIUM | 🔵 Cyan | 3 |
|
|
329
|
-
| LOW-MEDIUM | 🔵 Cyan | 4 |
|
|
330
|
-
| LOW | 🟢 Green | 5 |
|
|
331
|
-
|
|
332
|
-
### Framework Auto-Detection
|
|
333
|
-
|
|
334
|
-
Automatically detect project framework from package.json:
|
|
335
|
-
|
|
336
|
-
```typescript
|
|
337
|
-
import { detectFramework, getFrameworkRecommendations } from '@su-record/vibe/tools';
|
|
338
|
-
|
|
339
|
-
const result = await detectFramework('./my-project');
|
|
340
|
-
// { framework: { id: 'nextjs', name: 'Next.js', category: 'fullstack' }, ... }
|
|
341
|
-
|
|
342
|
-
const recs = getFrameworkRecommendations(result.framework);
|
|
343
|
-
// { reviewers: ['react-reviewer'], rules: ['react-*'], features: ['ssr'] }
|
|
344
|
-
```
|
|
345
|
-
|
|
346
|
-
**Supported frameworks (40+):**
|
|
347
|
-
- Fullstack: Next.js, Remix, Nuxt, SvelteKit, Astro, RedwoodJS
|
|
348
|
-
- Frontend: React, Vue, Svelte, Angular, Preact
|
|
349
|
-
- Backend: NestJS, Express, Fastify, Hono, Elysia
|
|
350
|
-
- Docs: Docusaurus, VitePress, Eleventy
|
|
351
|
-
|
|
352
|
-
### Test Case Extraction
|
|
353
|
-
|
|
354
|
-
Extract good/bad examples from rules for LLM evaluation:
|
|
355
|
-
|
|
356
|
-
```typescript
|
|
357
|
-
import { extractTestCases, validateRule } from '@su-record/vibe/tools';
|
|
358
|
-
|
|
359
|
-
const testCases = extractTestCases(rules);
|
|
360
|
-
// [{ ruleId: '1.1', type: 'bad', code: '...', ... }]
|
|
361
|
-
|
|
362
|
-
const validation = validateRule(rule);
|
|
363
|
-
// { valid: true, errors: [] }
|
|
364
|
-
```
|
|
365
|
-
|
|
366
|
-
## Previous Features (v2.5.7-v2.5.11)
|
|
367
|
-
|
|
368
|
-
### Intelligent Model Routing
|
|
369
|
-
|
|
370
|
-
Automatic model selection based on task complexity:
|
|
371
|
-
|
|
372
|
-
| Complexity | Model | When |
|
|
373
|
-
|------------|-------|------|
|
|
374
|
-
| Low (0-7) | Haiku | Simple fixes, searches |
|
|
375
|
-
| Medium (8-19) | Sonnet | Standard features, 3-5 files |
|
|
376
|
-
| High (20+) | Opus | Architecture, security, 6+ files |
|
|
377
|
-
|
|
378
|
-
### Agent Tier System
|
|
379
|
-
|
|
380
|
-
Cost-optimized agent variants:
|
|
381
|
-
|
|
382
|
-
| Agent | Low | Medium | High |
|
|
383
|
-
|-------|-----|--------|------|
|
|
384
|
-
| explorer | explorer-low | explorer-medium | explorer |
|
|
385
|
-
| implementer | implementer-low | implementer-medium | implementer |
|
|
386
|
-
| architect | architect-low | architect-medium | architect |
|
|
387
|
-
|
|
388
|
-
### Magic Keywords
|
|
389
|
-
|
|
390
|
-
| Keyword | Effect |
|
|
391
|
-
|---------|--------|
|
|
392
|
-
| `ultrawork` / `ulw` | Parallel + auto-continue + Ralph Loop |
|
|
393
|
-
| `ralph` | **Ralph Loop**: Iterate until 100% complete (no scope reduction) |
|
|
394
|
-
| `ralplan` | Iterative planning + persistence |
|
|
395
|
-
| `verify` | Strict verification mode |
|
|
396
|
-
| `quick` | Fast mode, minimal verification |
|
|
397
|
-
|
|
398
|
-
**Combinations supported:** `ralph ultrawork`, `ralph verify`, etc.
|
|
399
|
-
|
|
400
|
-
**Ralph Loop** (from [ghuntley.com/ralph](https://ghuntley.com/ralph)):
|
|
401
|
-
|
|
402
|
-
- Compares ORIGINAL request vs current implementation
|
|
403
|
-
- Lists ALL missing items explicitly
|
|
404
|
-
- Iterates until 100% complete (max 5 iterations)
|
|
405
|
-
- **ZERO tolerance for scope reduction** - Never say "basic version" or "simplified"
|
|
406
|
-
|
|
407
|
-
### Skill Quality Gate
|
|
408
|
-
|
|
409
|
-
Memory saves are validated for quality:
|
|
410
|
-
|
|
411
|
-
- Rejects generic/searchable information
|
|
412
|
-
- Requires context, specificity, actionability
|
|
413
|
-
- Suggests principle format: "When X, do Y because Z"
|
|
414
|
-
|
|
415
|
-
### HUD Status (Real-time)
|
|
416
|
-
|
|
417
|
-
```bash
|
|
418
|
-
node hooks/scripts/hud-status.js show full
|
|
419
|
-
node hooks/scripts/hud-status.js start ultrawork "feature"
|
|
420
|
-
node hooks/scripts/hud-status.js phase 2 5 "Implementing core"
|
|
421
|
-
```
|
|
422
|
-
|
|
423
|
-
### Pre/Post Tool Hooks
|
|
424
|
-
|
|
425
|
-
- **PreToolUse**: Validates dangerous commands before execution
|
|
426
|
-
- **PostToolUse**: Provides error recovery hints
|
|
427
|
-
|
|
428
|
-
### Orchestrate Workflow
|
|
429
|
-
|
|
430
|
-
Intent Gate → Codebase Assessment → Delegation → Verification pattern:
|
|
431
|
-
|
|
432
|
-
```typescript
|
|
433
|
-
import { checkIntentGate, assessCodebase, createDelegationPlan } from '@su-record/vibe/tools';
|
|
434
|
-
```
|
|
435
|
-
|
|
436
|
-
### UltraQA (5-Cycle Autonomous QA)
|
|
437
|
-
|
|
438
|
-
```
|
|
439
|
-
Test/Build/Lint → Fail → Architect Diagnosis → Executor Fix → Repeat (max 5)
|
|
440
|
-
```
|
|
441
|
-
|
|
442
|
-
Exit conditions: All pass, Max cycles, Same failure 3x
|
|
443
|
-
|
|
444
|
-
### DeepInit (Hierarchical AGENTS.md)
|
|
445
|
-
|
|
446
|
-
```
|
|
447
|
-
project/
|
|
448
|
-
├── AGENTS.md ← Root
|
|
449
|
-
├── src/
|
|
450
|
-
│ └── AGENTS.md ← <!-- Parent: ../AGENTS.md -->
|
|
451
|
-
```
|
|
452
|
-
|
|
453
|
-
### Skill Frontmatter System
|
|
454
|
-
|
|
455
|
-
```yaml
|
|
456
|
-
---
|
|
457
|
-
name: my-skill
|
|
458
|
-
model: sonnet
|
|
459
|
-
triggers: [keyword1, keyword2]
|
|
460
|
-
---
|
|
461
|
-
```
|
|
462
|
-
|
|
463
|
-
### Trigger-Based Skill Injection
|
|
464
|
-
|
|
465
|
-
Skills in `~/.claude/vibe/skills/` or `.claude/vibe/skills/` auto-inject on keyword match.
|
|
466
|
-
|
|
467
|
-
### Multi-Line HUD
|
|
468
|
-
|
|
469
|
-
```bash
|
|
470
|
-
node hooks/scripts/hud-multiline.js multi # Tree view
|
|
471
|
-
node hooks/scripts/hud-multiline.js compact # 2-line view
|
|
472
|
-
node hooks/scripts/hud-multiline.js single # 1-line view
|
|
473
|
-
```
|
|
474
|
-
|
|
475
|
-
### Parallel Code Review (/vibe.review)
|
|
476
|
-
|
|
477
|
-
13+ specialized agents review code simultaneously:
|
|
478
|
-
|
|
479
|
-
- Security: security-reviewer, data-integrity-reviewer
|
|
480
|
-
- Performance: performance-reviewer, complexity-reviewer
|
|
481
|
-
- Architecture: architecture-reviewer, simplicity-reviewer
|
|
482
|
-
- Language-Specific: python, typescript, rails, react reviewers
|
|
483
|
-
- Context: git-history, test-coverage reviewers
|
|
484
|
-
|
|
485
|
-
**Priority System:**
|
|
486
|
-
- 🔴 P1 (Critical): Blocks merge
|
|
487
|
-
- 🟡 P2 (Important): Fix recommended
|
|
488
|
-
- 🔵 P3 (Nice-to-have): Backlog
|
|
489
|
-
|
|
490
|
-
### E2E Testing (/vibe.utils --e2e)
|
|
491
|
-
|
|
492
|
-
Playwright-based automated testing:
|
|
493
|
-
|
|
494
|
-
```bash
|
|
495
|
-
/vibe.utils --e2e "login flow" # Scenario test
|
|
496
|
-
/vibe.utils --e2e --visual # Visual regression test
|
|
497
|
-
/vibe.utils --e2e --record # Video recording
|
|
498
|
-
```
|
|
499
|
-
|
|
500
|
-
### Enhanced Research Agents
|
|
501
|
-
|
|
502
|
-
4 parallel research agents run **after requirements confirmed** during `/vibe.spec`:
|
|
503
|
-
|
|
504
|
-
| Agent | Role |
|
|
505
|
-
|-------|------|
|
|
506
|
-
| best-practices-agent | Best practices for confirmed feature+stack |
|
|
507
|
-
| framework-docs-agent | Latest docs for confirmed stack (context7) |
|
|
508
|
-
| codebase-patterns-agent | Analyze existing similar patterns |
|
|
509
|
-
| security-advisory-agent | Security advisory for confirmed feature |
|
|
81
|
+
| Command | Description |
|
|
82
|
+
|------------------------------|-----------------------------------|
|
|
83
|
+
| `/vibe.spec "name"` | Write SPEC (PTCF) + parallel research |
|
|
84
|
+
| `/vibe.spec.review "name"` | GPT/Gemini review (new session) |
|
|
85
|
+
| `/vibe.run "name"` | Execute implementation |
|
|
86
|
+
| `/vibe.run "name" ultrawork` | Maximum performance mode |
|
|
87
|
+
| `/vibe.verify "name"` | Verification against SPEC |
|
|
88
|
+
| `/vibe.review` | 13+ agent parallel code review |
|
|
89
|
+
| `/vibe.trace "name"` | Requirements traceability matrix |
|
|
90
|
+
| `/vibe.reason "problem"` | Systematic reasoning |
|
|
91
|
+
| `/vibe.analyze` | Project analysis |
|
|
92
|
+
| `/vibe.utils --e2e` | E2E testing (Playwright) |
|
|
93
|
+
| `/vibe.utils --diagram` | Generate diagrams |
|
|
94
|
+
| `/vibe.utils --ui "desc"` | UI preview |
|
|
95
|
+
| `/vibe.utils --continue` | Session restore |
|
|
96
|
+
|
|
97
|
+
## Magic Keywords
|
|
98
|
+
|
|
99
|
+
| Keyword | Effect |
|
|
100
|
+
|----------------------|-----------------------------------------------|
|
|
101
|
+
| `ultrawork` / `ulw` | Parallel + auto-continue + Ralph Loop |
|
|
102
|
+
| `ralph` | Iterate until 100% complete (no scope reduction) |
|
|
103
|
+
| `ralplan` | Iterative planning + persistence |
|
|
104
|
+
| `verify` | Strict verification mode |
|
|
105
|
+
| `quick` | Fast mode, minimal verification |
|
|
510
106
|
|
|
511
107
|
## PTCF Structure
|
|
512
108
|
|
|
513
|
-
SPEC documents
|
|
514
|
-
|
|
515
|
-
```
|
|
516
|
-
<role> AI role definition
|
|
517
|
-
<context> Background, tech stack, related code
|
|
518
|
-
<task> Phase-by-phase task list
|
|
519
|
-
<constraints> Constraints
|
|
520
|
-
<output_format> Files to create/modify
|
|
521
|
-
<acceptance> Verification criteria
|
|
522
|
-
```
|
|
109
|
+
SPEC documents use: `<role>` `<context>` `<task>` `<constraints>` `<output_format>` `<acceptance>`
|
|
523
110
|
|
|
524
111
|
## Built-in Tools
|
|
525
112
|
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
| `
|
|
530
|
-
| `
|
|
531
|
-
| `
|
|
532
|
-
| `
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
| Tool | Purpose |
|
|
536
|
-
|------|---------|
|
|
537
|
-
| `vibe_start_session` | Start session (restore previous context) |
|
|
538
|
-
| `vibe_auto_save_context` | Save current state |
|
|
539
|
-
| `vibe_save_memory` | Save important decisions |
|
|
113
|
+
| Tool | Purpose |
|
|
114
|
+
|-------------------------------|----------------------------------|
|
|
115
|
+
| `vibe_find_symbol` | Find symbol definitions |
|
|
116
|
+
| `vibe_find_references` | Find references |
|
|
117
|
+
| `vibe_analyze_complexity` | Analyze complexity |
|
|
118
|
+
| `vibe_validate_code_quality` | Validate quality |
|
|
119
|
+
| `vibe_start_session` | Restore previous session context |
|
|
120
|
+
| `vibe_auto_save_context` | Save current state |
|
|
121
|
+
| `vibe_save_memory` | Save important decisions |
|
|
540
122
|
|
|
541
123
|
## Agents
|
|
542
124
|
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
.claude/agents/review/
|
|
546
|
-
├── security-reviewer.md # Security vulnerabilities
|
|
547
|
-
├── performance-reviewer.md # Performance bottlenecks
|
|
548
|
-
├── architecture-reviewer.md # Architecture violations
|
|
549
|
-
├── complexity-reviewer.md # Complexity exceeded
|
|
550
|
-
├── simplicity-reviewer.md # Over-abstraction
|
|
551
|
-
├── data-integrity-reviewer.md # Data integrity
|
|
552
|
-
├── test-coverage-reviewer.md # Missing tests
|
|
553
|
-
├── git-history-reviewer.md # Risk patterns
|
|
554
|
-
├── python-reviewer.md # Python specialist
|
|
555
|
-
├── typescript-reviewer.md # TypeScript specialist
|
|
556
|
-
├── rails-reviewer.md # Rails specialist
|
|
557
|
-
└── react-reviewer.md # React specialist
|
|
558
|
-
```
|
|
559
|
-
|
|
560
|
-
### Research Agents (4)
|
|
561
|
-
```
|
|
562
|
-
.claude/agents/research/
|
|
563
|
-
├── best-practices-agent.md # Best practices
|
|
564
|
-
├── framework-docs-agent.md # Framework docs
|
|
565
|
-
├── codebase-patterns-agent.md # Code pattern analysis
|
|
566
|
-
└── security-advisory-agent.md # Security advisory
|
|
567
|
-
```
|
|
568
|
-
|
|
569
|
-
## Skills
|
|
570
|
-
|
|
571
|
-
### Git Worktree
|
|
572
|
-
```bash
|
|
573
|
-
# Isolated environment for PR review
|
|
574
|
-
git worktree add ../review-123 origin/pr/123
|
|
575
|
-
cd ../review-123 && npm test
|
|
576
|
-
git worktree remove ../review-123
|
|
577
|
-
```
|
|
578
|
-
|
|
579
|
-
### Priority Todos
|
|
580
|
-
```
|
|
581
|
-
.claude/vibe/todos/
|
|
582
|
-
├── P1-security-sql-injection.md # 🔴 Blocks merge
|
|
583
|
-
├── P2-perf-n1-query.md # 🟡 Fix recommended
|
|
584
|
-
└── P3-style-extract-helper.md # 🔵 Backlog
|
|
585
|
-
```
|
|
125
|
+
- **Review (12)**: security, performance, architecture, complexity, simplicity, data-integrity, test-coverage, git-history, python, typescript, rails, react reviewers → `.claude/agents/review/`
|
|
126
|
+
- **Research (4)**: best-practices, framework-docs, codebase-patterns, security-advisory → `.claude/agents/research/`
|
|
586
127
|
|
|
587
|
-
## Context Management
|
|
128
|
+
## Context Management
|
|
588
129
|
|
|
589
130
|
### Model Selection
|
|
590
|
-
- **Exploration/Search**: Haiku (sub-agent default)
|
|
591
|
-
- **Implementation/Debugging**: Sonnet
|
|
592
|
-
- **Architecture/Complex logic**: Opus
|
|
593
|
-
|
|
594
|
-
### At 70%+ Context (⚠️ Important)
|
|
595
|
-
```
|
|
596
|
-
❌ Don't use /compact (risk of information loss/distortion)
|
|
597
|
-
✅ save_memory to store important decisions → /new for new session
|
|
598
|
-
```
|
|
599
|
-
|
|
600
|
-
vibe maintains context across sessions with its own memory system:
|
|
601
|
-
1. `save_memory` - Explicitly save important decisions
|
|
602
|
-
2. `/new` - Start new session
|
|
603
|
-
3. `start_session` - Auto-restore previous session
|
|
604
131
|
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
/vibe.utils --continue
|
|
609
|
-
```
|
|
610
|
-
This command calls `vibe_start_session` to restore previous context from project memory.
|
|
132
|
+
- **Exploration/Search**: Haiku
|
|
133
|
+
- **Implementation**: Sonnet
|
|
134
|
+
- **Architecture**: Opus
|
|
611
135
|
|
|
612
|
-
###
|
|
613
|
-
- `/rewind` - Revert to previous point
|
|
614
|
-
- `/context` - Check current usage
|
|
136
|
+
### At 70%+ Context
|
|
615
137
|
|
|
616
|
-
|
|
617
|
-
Use
|
|
618
|
-
|
|
619
|
-
"Search React 19 use() hook with context7"
|
|
620
|
-
```
|
|
138
|
+
- Do NOT use `/compact` (information loss risk)
|
|
139
|
+
- Use `save_memory` → `/new` for new session
|
|
140
|
+
- Restore with `/vibe.utils --continue`
|
|
621
141
|
|
|
622
142
|
## Documentation Guidelines
|
|
623
143
|
|
|
624
|
-
|
|
625
|
-
-
|
|
626
|
-
- Use alternatives:
|
|
627
|
-
- Mermaid diagrams (GitHub/Notion supported)
|
|
628
|
-
- Markdown tables
|
|
629
|
-
- Indentation + separators
|
|
630
|
-
|
|
631
|
-
### Preferred Formats
|
|
632
|
-
| Purpose | Recommended |
|
|
633
|
-
|---------|-------------|
|
|
634
|
-
| Flowcharts | Mermaid flowchart |
|
|
635
|
-
| Structure/Hierarchy | Indented lists |
|
|
636
|
-
| Comparisons/Lists | Markdown tables |
|
|
637
|
-
| Sequences | Mermaid sequenceDiagram |
|
|
144
|
+
- Avoid ASCII boxes → Use Mermaid diagrams, Markdown tables, or indented lists
|
|
145
|
+
- Flowcharts → Mermaid | Structure → Indented lists | Comparisons → Tables
|
|
638
146
|
|
|
639
147
|
## Git Commit Rules
|
|
640
148
|
|
|
641
|
-
**Must include:**
|
|
642
|
-
- `.claude/vibe/specs/`, `.claude/vibe/features/`, `.claude/vibe/todos/` (project docs)
|
|
643
|
-
- `.claude/vibe/config.json`, `.claude/vibe/constitution.md` (project config)
|
|
644
|
-
- `CLAUDE.md`
|
|
645
|
-
|
|
646
|
-
**Exclude (globally installed):**
|
|
647
|
-
- `~/.claude/vibe/rules/`, `~/.claude/vibe/languages/`, `~/.claude/vibe/templates/` (global)
|
|
648
|
-
- `~/.claude/commands/`, `~/.claude/agents/`, `~/.claude/skills/` (global)
|
|
649
|
-
- `.claude/settings.local.json` (personal settings)
|
|
650
|
-
|
|
651
|
-
## Getting Started
|
|
652
|
-
|
|
653
|
-
```bash
|
|
654
|
-
vibe init
|
|
655
|
-
/vibe.spec "login feature"
|
|
656
|
-
```
|
|
657
|
-
|
|
658
|
-
## Full Workflow
|
|
659
|
-
|
|
660
|
-
```mermaid
|
|
661
|
-
flowchart TD
|
|
662
|
-
A["/vibe.spec"] --> B["(auto) SPEC review"]
|
|
663
|
-
B --> C["SPEC auto-enhancement"]
|
|
664
|
-
C --> D["/vibe.run ultrawork"]
|
|
665
|
-
D --> E["Gemini code review"]
|
|
666
|
-
E --> F["(auto) 13+ Agent Review"]
|
|
667
|
-
F --> G{"P1/P2 issues?"}
|
|
668
|
-
G -->|Yes| H["(auto) Auto-Fix"]
|
|
669
|
-
H --> I["✅ Done"]
|
|
670
|
-
G -->|No| I
|
|
671
|
-
```
|
|
149
|
+
**Must include:** `.claude/vibe/specs/`, `.claude/vibe/features/`, `.claude/vibe/todos/`, `.claude/vibe/config.json`, `CLAUDE.md`
|
|
672
150
|
|
|
673
|
-
|
|
674
|
-
|------|-------------|------------|
|
|
675
|
-
| 1. `/vibe.spec` | Collect requirements + Generate SPEC | Manual start |
|
|
676
|
-
| 2. SPEC review | Gemini reviews SPEC + Auto-apply | ✅ Auto |
|
|
677
|
-
| 3. `/vibe.run` | Implementation + Gemini review | Manual start |
|
|
678
|
-
| 4. Agent Review | 13+ agent parallel review | ✅ Auto |
|
|
679
|
-
| 5. Auto-Fix | P1/P2 issue auto-fix | ✅ Auto |
|
|
151
|
+
**Exclude:** `~/.claude/vibe/rules/`, `~/.claude/commands/`, `~/.claude/agents/`, `~/.claude/skills/`, `.claude/settings.local.json`
|
|
680
152
|
|
|
681
153
|
<!-- VIBE:END -->
|