@su-record/vibe 2.5.20 → 2.6.0

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