@su-record/vibe 2.2.2 → 2.2.4

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 (81) hide show
  1. package/.claude/settings.json +152 -152
  2. package/.claude/vibe/constitution.md +184 -184
  3. package/.claude/vibe/rules/core/communication-guide.md +104 -104
  4. package/.claude/vibe/rules/core/development-philosophy.md +52 -52
  5. package/.claude/vibe/rules/core/quick-start.md +120 -120
  6. package/.claude/vibe/rules/quality/bdd-contract-testing.md +388 -388
  7. package/.claude/vibe/rules/quality/checklist.md +276 -276
  8. package/.claude/vibe/rules/quality/testing-strategy.md +437 -437
  9. package/.claude/vibe/rules/standards/anti-patterns.md +369 -369
  10. package/.claude/vibe/rules/standards/code-structure.md +291 -291
  11. package/.claude/vibe/rules/standards/complexity-metrics.md +312 -312
  12. package/.claude/vibe/rules/standards/naming-conventions.md +198 -198
  13. package/.claude/vibe/setup.sh +31 -31
  14. package/CLAUDE.md +323 -323
  15. package/LICENSE +21 -21
  16. package/README.md +724 -721
  17. package/agents/explorer.md +48 -0
  18. package/agents/implementer.md +53 -0
  19. package/agents/research/best-practices-agent.md +139 -0
  20. package/agents/research/codebase-patterns-agent.md +147 -0
  21. package/agents/research/framework-docs-agent.md +181 -0
  22. package/agents/research/security-advisory-agent.md +167 -0
  23. package/agents/review/architecture-reviewer.md +107 -0
  24. package/agents/review/complexity-reviewer.md +116 -0
  25. package/agents/review/data-integrity-reviewer.md +88 -0
  26. package/agents/review/git-history-reviewer.md +103 -0
  27. package/agents/review/performance-reviewer.md +86 -0
  28. package/agents/review/python-reviewer.md +152 -0
  29. package/agents/review/rails-reviewer.md +139 -0
  30. package/agents/review/react-reviewer.md +144 -0
  31. package/agents/review/security-reviewer.md +80 -0
  32. package/agents/review/simplicity-reviewer.md +140 -0
  33. package/agents/review/test-coverage-reviewer.md +116 -0
  34. package/agents/review/typescript-reviewer.md +127 -0
  35. package/agents/searcher.md +54 -0
  36. package/agents/simplifier.md +119 -0
  37. package/agents/tester.md +49 -0
  38. package/commands/vibe.analyze.md +239 -0
  39. package/commands/vibe.compound.md +261 -0
  40. package/commands/vibe.continue.md +88 -0
  41. package/commands/vibe.diagram.md +178 -0
  42. package/commands/vibe.e2e.md +266 -0
  43. package/commands/vibe.reason.md +306 -0
  44. package/commands/vibe.review.md +324 -0
  45. package/commands/vibe.run.md +836 -0
  46. package/commands/vibe.setup.md +97 -0
  47. package/commands/vibe.spec.md +383 -0
  48. package/commands/vibe.ui.md +137 -0
  49. package/commands/vibe.verify.md +238 -0
  50. package/dist/cli/index.js +395 -395
  51. package/dist/cli/index.js.map +1 -1
  52. package/dist/lib/MemoryManager.js +92 -92
  53. package/dist/lib/PythonParser.js +108 -108
  54. package/dist/lib/gemini-mcp.js +15 -15
  55. package/dist/lib/gemini-oauth.js +35 -35
  56. package/dist/lib/gpt-mcp.js +17 -17
  57. package/dist/lib/gpt-oauth.js +44 -44
  58. package/dist/tools/analytics/getUsageAnalytics.js +12 -12
  59. package/dist/tools/memory/createMemoryTimeline.js +10 -10
  60. package/dist/tools/memory/getMemoryGraph.js +12 -12
  61. package/dist/tools/memory/getSessionContext.js +9 -9
  62. package/dist/tools/memory/linkMemories.js +14 -14
  63. package/dist/tools/memory/listMemories.js +4 -4
  64. package/dist/tools/memory/recallMemory.js +4 -4
  65. package/dist/tools/memory/saveMemory.js +4 -4
  66. package/dist/tools/memory/searchMemoriesAdvanced.js +22 -22
  67. package/dist/tools/planning/generatePrd.js +46 -46
  68. package/dist/tools/prompt/enhancePromptGemini.js +160 -160
  69. package/dist/tools/reasoning/applyReasoningFramework.js +56 -56
  70. package/dist/tools/semantic/analyzeDependencyGraph.js +12 -12
  71. package/package.json +69 -66
  72. package/skills/git-worktree.md +178 -0
  73. package/skills/priority-todos.md +236 -0
  74. package/templates/constitution-template.md +184 -184
  75. package/templates/contract-backend-template.md +517 -517
  76. package/templates/contract-frontend-template.md +594 -594
  77. package/templates/feature-template.md +96 -96
  78. package/templates/hooks-template.json +103 -103
  79. package/templates/spec-template.md +199 -199
  80. package/.claude/vibe/rules/tools/mcp-hi-ai-guide.md +0 -665
  81. package/.claude/vibe/rules/tools/mcp-workflow.md +0 -51
@@ -0,0 +1,261 @@
1
+ ---
2
+ description: Auto-document solutions for knowledge compounding
3
+ argument-hint: "solution description (optional)"
4
+ ---
5
+
6
+ # /vibe.compound
7
+
8
+ **Knowledge Compounding** - Auto-document solved problems to boost future productivity
9
+
10
+ > "Each solution documented makes future problems easier to solve."
11
+
12
+ ## Usage
13
+
14
+ ```
15
+ /vibe.compound # Auto-detect recent solutions
16
+ /vibe.compound "Redis cache invalidation" # Document specific solution
17
+ ```
18
+
19
+ ## Auto-Triggers
20
+
21
+ Automatically suggested when these patterns detected:
22
+ - "it's fixed", "fixed", "solved", "resolved"
23
+ - After PR merge
24
+ - After `/vibe.verify` passes
25
+
26
+ ## Process
27
+
28
+ ### Phase 1: Solution Extraction
29
+
30
+ Parallel agents analyze the solution:
31
+
32
+ ```
33
+ ┌─────────────────────────────────────────────────────────────────┐
34
+ │ 🔍 PARALLEL SOLUTION ANALYSIS │
35
+ ├─────────────────────────────────────────────────────────────────┤
36
+ │ │
37
+ │ Task 1: problem-analyzer │
38
+ │ ├── Identify original problem │
39
+ │ ├── Symptoms and error messages │
40
+ │ └── Impact scope │
41
+ │ │
42
+ │ Task 2: solution-extractor │
43
+ │ ├── Applied fixes │
44
+ │ ├── Key code changes │
45
+ │ └── Configuration changes │
46
+ │ │
47
+ │ Task 3: root-cause-analyzer │
48
+ │ ├── Root cause identification │
49
+ │ ├── Why it happened │
50
+ │ └── Prevention methods │
51
+ │ │
52
+ │ Task 4: pattern-recognizer │
53
+ │ ├── Similar problem patterns │
54
+ │ ├── Related tech stack │
55
+ │ └── Search keywords │
56
+ │ │
57
+ │ Task 5: category-classifier │
58
+ │ ├── Category classification │
59
+ │ ├── Tag generation │
60
+ │ └── Related doc links │
61
+ │ │
62
+ │ Task 6: code-snippet-extractor │
63
+ │ ├── Before/After code │
64
+ │ ├── Key change highlights │
65
+ │ └── Copy-paste snippets │
66
+ │ │
67
+ │ Task 7: prevention-advisor │
68
+ │ ├── Prevention checklist │
69
+ │ ├── Suggested linter rules │
70
+ │ └── Test case suggestions │
71
+ │ │
72
+ └─────────────────────────────────────────────────────────────────┘
73
+ ```
74
+
75
+ ### Phase 2: Category Classification
76
+
77
+ ```
78
+ .claude/vibe/solutions/
79
+ ├── security/ # Security related
80
+ │ ├── sql-injection-prevention.md
81
+ │ └── xss-sanitization.md
82
+ ├── performance/ # Performance optimization
83
+ │ ├── n1-query-fix.md
84
+ │ └── redis-cache-invalidation.md
85
+ ├── database/ # Database related
86
+ │ ├── migration-rollback.md
87
+ │ └── deadlock-resolution.md
88
+ ├── integration/ # External integrations
89
+ │ ├── stripe-webhook-retry.md
90
+ │ └── aws-s3-timeout.md
91
+ ├── frontend/ # Frontend issues
92
+ │ ├── react-hydration-mismatch.md
93
+ │ └── infinite-scroll-memory.md
94
+ ├── testing/ # Testing related
95
+ │ ├── flaky-test-fix.md
96
+ │ └── mock-timezone.md
97
+ └── deployment/ # Deployment issues
98
+ ├── docker-layer-cache.md
99
+ └── k8s-rolling-update.md
100
+ ```
101
+
102
+ ### Phase 3: Document Generation
103
+
104
+ ```markdown
105
+ # [Solution] Redis Cache Invalidation
106
+
107
+ ## TL;DR
108
+ Added version suffix to Redis cache key to fix invalidation issue
109
+
110
+ ## Problem
111
+ ### Symptoms
112
+ - User profile shows stale data after update
113
+ - Refresh doesn't fix the issue
114
+
115
+ ### Error/Logs
116
+ ```
117
+ Cache hit: user:123 (stale data)
118
+ ```
119
+
120
+ ### Impact Scope
121
+ - User profile page
122
+ - API: GET /api/users/:id
123
+
124
+ ## Root Cause
125
+ Cache key only used user_id, not invalidated on update
126
+
127
+ ```python
128
+ # Before
129
+ cache_key = f"user:{user_id}" # No version
130
+ ```
131
+
132
+ ## Solution
133
+ ### Key Change
134
+ Add updated_at timestamp to cache key
135
+
136
+ ```python
137
+ # After
138
+ cache_key = f"user:{user_id}:v{updated_at.timestamp()}"
139
+ ```
140
+
141
+ ### Changed Files
142
+ - src/services/cache.py:42
143
+ - src/api/users.py:78
144
+
145
+ ## Prevention
146
+ - [ ] Always include version/timestamp in cache keys
147
+ - [ ] Add cache invalidation tests
148
+ - [ ] Linter rule: cache_key pattern check
149
+
150
+ ## Related
151
+ - Similar issue: #234 (Session cache)
152
+ - Docs: docs/caching-strategy.md
153
+ - Tags: #redis #cache #invalidation
154
+
155
+ ## Metadata
156
+ - Resolved: 2026-01-11
157
+ - Time spent: 2 hours
158
+ - Difficulty: Medium
159
+ - Reusability: High
160
+ ```
161
+
162
+ ### Phase 4: Index Update
163
+
164
+ Auto-update `.claude/vibe/solutions/index.md`:
165
+
166
+ ```markdown
167
+ # Solution Index
168
+
169
+ ## Recently Added
170
+ | Date | Category | Title | Tags |
171
+ |------|----------|-------|------|
172
+ | 2026-01-11 | performance | Redis cache invalidation | #redis #cache |
173
+ | 2026-01-10 | security | SQL Injection prevention | #sql #security |
174
+
175
+ ## By Category
176
+ - **Security** (5 solutions)
177
+ - **Performance** (8 solutions)
178
+ - **Database** (4 solutions)
179
+ ...
180
+
181
+ ## Search Keywords
182
+ - redis → performance/redis-cache-invalidation.md
183
+ - n+1 → performance/n1-query-fix.md
184
+ - sql injection → security/sql-injection-prevention.md
185
+ ```
186
+
187
+ ## Auto-Suggestion
188
+
189
+ When similar problem detected:
190
+
191
+ ```
192
+ ┌─────────────────────────────────────────────────────────────────┐
193
+ │ 💡 Similar Solution Found! │
194
+ ├─────────────────────────────────────────────────────────────────┤
195
+ │ │
196
+ │ You're working on: "Cache not updating" │
197
+ │ │
198
+ │ Related solution (85% match): │
199
+ │ 📄 .claude/vibe/solutions/performance/redis-cache-invalidation.md │
200
+ │ │
201
+ │ Key insight: Add version suffix to cache key │
202
+ │ │
203
+ │ Apply this solution? [Y/n] │
204
+ │ │
205
+ └─────────────────────────────────────────────────────────────────┘
206
+ ```
207
+
208
+ ## Output
209
+
210
+ ```
211
+ ┌─────────────────────────────────────────────────────────────────┐
212
+ │ 📚 SOLUTION DOCUMENTED │
213
+ ├─────────────────────────────────────────────────────────────────┤
214
+ │ │
215
+ │ ✅ Created: .claude/vibe/solutions/performance/redis-cache-invalid... │
216
+ │ │
217
+ │ 📊 Knowledge Base Stats: │
218
+ │ ├── Total Solutions: 42 │
219
+ │ ├── This Month: 8 │
220
+ │ └── Most Used Category: performance │
221
+ │ │
222
+ │ 🔗 Similar solutions linked: 2 │
223
+ │ 🏷️ Tags: #redis #cache #invalidation #performance │
224
+ │ │
225
+ │ 💡 Prevention rules added to .claude/vibe/rules/ │
226
+ │ │
227
+ │ "This solution will help future you (or teammates) save hours" │
228
+ │ │
229
+ └─────────────────────────────────────────────────────────────────┘
230
+ ```
231
+
232
+ ## Integration with Memory
233
+
234
+ Auto-invoke `vibe_save_memory`:
235
+
236
+ ```json
237
+ {
238
+ "type": "solution",
239
+ "category": "performance",
240
+ "title": "Redis cache invalidation",
241
+ "keywords": ["redis", "cache", "invalidation"],
242
+ "file": ".claude/vibe/solutions/performance/redis-cache-invalidation.md"
243
+ }
244
+ ```
245
+
246
+ ## Workflow Integration
247
+
248
+ ```
249
+ /vibe.spec → /vibe.run → /vibe.verify → /vibe.compound
250
+
251
+
252
+ .claude/vibe/solutions/
253
+
254
+
255
+ Future problem?
256
+ Auto-suggest!
257
+ ```
258
+
259
+ ---
260
+
261
+ ARGUMENTS: $ARGUMENTS
@@ -0,0 +1,88 @@
1
+ ---
2
+ description: Restore previous session context
3
+ argument-hint: [projectPath]
4
+ ---
5
+
6
+ # /vibe.continue
7
+
8
+ Restore previous session context and continue development.
9
+
10
+ ## Usage
11
+
12
+ ```
13
+ /vibe.continue # Restore context for current directory
14
+ /vibe.continue "/path/to/project" # Restore context for specific project
15
+ ```
16
+
17
+ ## What It Does
18
+
19
+ 1. **Load Project Memories** - Retrieves saved project decisions, patterns, architecture notes
20
+ 2. **Restore Context** - Loads previous session's work state (tasks, blockers, next steps)
21
+ 3. **Load Coding Guides** - Applies project-specific coding standards
22
+
23
+ ## Process
24
+
25
+ ```
26
+ /vibe.continue
27
+ |
28
+ v
29
+ +---------------------------+
30
+ | vibe_start_session |
31
+ | projectPath: $(pwd) |
32
+ +---------------------------+
33
+ |
34
+ v
35
+ +---------------------------+
36
+ | Load: |
37
+ | - Project memories |
38
+ | - Previous context |
39
+ | - Coding guides |
40
+ +---------------------------+
41
+ |
42
+ v
43
+ Ready to continue!
44
+ ```
45
+
46
+ ## Example
47
+
48
+ ```
49
+ User: /vibe.continue
50
+
51
+ Claude:
52
+ Session started.
53
+
54
+ Recent Project Info:
55
+ - project-stack: Next.js 14, TypeScript, Tailwind...
56
+ - auth-decision: Using JWT with refresh tokens...
57
+ - current-feature: Working on login page...
58
+
59
+ Previous Context:
60
+ - HIGH priority from 2024-01-15 14:32
61
+ Task: Implement password validation
62
+ Blockers: Need to decide on complexity rules
63
+
64
+ Active Coding Guides:
65
+ - TypeScript Standards (core): Strict mode, no any...
66
+
67
+ Ready to continue development! What would you like to work on?
68
+ ```
69
+
70
+ ## When to Use
71
+
72
+ - Starting a new Claude Code session
73
+ - After `/new` command
74
+ - Resuming work after a break
75
+ - Switching between projects
76
+
77
+ ## Related Commands
78
+
79
+ - `/vibe.run` - Execute implementation
80
+ - `/vibe.spec` - Create SPEC document
81
+
82
+ ---
83
+
84
+ **Action**: Call `vibe_start_session` with projectPath
85
+
86
+ ```
87
+ vibe_start_session(projectPath: "$ARGUMENTS" || process.cwd())
88
+ ```
@@ -0,0 +1,178 @@
1
+ ---
2
+ description: Generate diagrams (architecture, ERD, flowchart)
3
+ argument-hint: --er or --flow (optional)
4
+ ---
5
+
6
+ # /vibe.diagram
7
+
8
+ Generate diagrams (architecture, ERD, flowchart).
9
+
10
+ ## Usage
11
+
12
+ ```
13
+ /vibe.diagram
14
+ /vibe.diagram --er
15
+ /vibe.diagram --flow
16
+ ```
17
+
18
+ ## Process
19
+
20
+ ### 1. Determine Diagram Type
21
+
22
+ - **Default** (`/vibe.diagram`): Architecture diagram
23
+ - **--er**: ERD (Entity-Relationship Diagram)
24
+ - **--flow**: Flowchart (main processes)
25
+
26
+ ### 2. Project Analysis
27
+
28
+ #### Architecture Diagram
29
+ - Understand project structure (folder structure)
30
+ - Identify major modules and layers
31
+ - Analyze dependency relationships
32
+
33
+ #### ERD
34
+ - Find database schema files
35
+ - `backend/models/`
36
+ - `migrations/`
37
+ - `schema.sql`
38
+ - Identify table relationships
39
+
40
+ #### Flowchart
41
+ - Main business logic flows
42
+ - User action → System response
43
+
44
+ ### 3. Generate Mermaid Code
45
+
46
+ Generate diagram as ASCII art or Mermaid code:
47
+
48
+ #### Architecture Diagram (Mermaid)
49
+
50
+ ```mermaid
51
+ graph TB
52
+ Client[React Frontend]
53
+ API[FastAPI Backend]
54
+ DB[(PostgreSQL)]
55
+ Cache[(Redis)]
56
+
57
+ Client -->|HTTP| API
58
+ API -->|Query| DB
59
+ API -->|Cache| Cache
60
+ ```
61
+
62
+ #### ERD (Mermaid)
63
+
64
+ ```mermaid
65
+ erDiagram
66
+ USER ||--o{ FEED : creates
67
+ USER ||--o{ FOLLOW : follows
68
+ FEED }o--|| RESTAURANT : references
69
+
70
+ USER {
71
+ uuid id PK
72
+ string email
73
+ int tier
74
+ }
75
+ FEED {
76
+ uuid id PK
77
+ uuid user_id FK
78
+ uuid restaurant_id FK
79
+ text content
80
+ }
81
+ ```
82
+
83
+ #### Flowchart (Mermaid)
84
+
85
+ ```mermaid
86
+ flowchart TD
87
+ Start([User writes feed])
88
+ GPS{GPS Auth}
89
+ Vision{Vision API Verify}
90
+ OCR{OCR Auth}
91
+ Save[Save Feed]
92
+
93
+ Start --> GPS
94
+ GPS -->|Within 50m| Vision
95
+ GPS -->|Out of range| Fail
96
+ Vision -->|Food detected| OCR
97
+ Vision -->|Failed| Fail
98
+ OCR -->|Optional| Save
99
+ Save --> End([Complete])
100
+ ```
101
+
102
+ ### 4. Rendering Guide
103
+
104
+ Guide on how to render generated Mermaid code:
105
+
106
+ - **GitHub**: Paste in `.md` file (auto-renders)
107
+ - **VSCode**: Install Mermaid extension
108
+ - **Online**: https://mermaid.live/
109
+
110
+ ## Example
111
+
112
+ ```
113
+ User: /vibe.diagram --er
114
+
115
+ Claude: Generating ERD...
116
+
117
+ Analyzing project...
118
+ - Database schema found: backend/models/
119
+ - Tables: 15
120
+ - Key relationships: USER, FEED, RESTAURANT
121
+
122
+ ✅ ERD generation complete!
123
+
124
+ ```mermaid
125
+ erDiagram
126
+ USER ||--o{ FEED : creates
127
+ USER ||--o{ FOLLOW : "follows/followed_by"
128
+ USER ||--o{ BOOKMARK : bookmarks
129
+ FEED }o--|| RESTAURANT : references
130
+ FEED ||--o{ COMMENT : has
131
+ FEED ||--o{ LIKE : has
132
+
133
+ USER {
134
+ uuid id PK
135
+ string email UK
136
+ string username UK
137
+ int tier
138
+ int points
139
+ timestamp created_at
140
+ }
141
+
142
+ FEED {
143
+ uuid id PK
144
+ uuid user_id FK
145
+ uuid restaurant_id FK
146
+ text content
147
+ geography location
148
+ boolean ocr_verified
149
+ timestamp created_at
150
+ }
151
+
152
+ RESTAURANT {
153
+ uuid id PK
154
+ string name
155
+ geography location
156
+ string category
157
+ timestamp created_at
158
+ }
159
+ ```
160
+
161
+ **Diagram save location:**
162
+ .claude/vibe/diagrams/erd-2025-11-17.md
163
+
164
+ **Rendering options:**
165
+ 1. Push to GitHub (auto-renders)
166
+ 2. Use Mermaid extension in VSCode
167
+ 3. View at https://mermaid.live/
168
+ ```
169
+
170
+ ## Notes
171
+
172
+ - Mermaid is supported in GitHub, GitLab, VSCode, etc.
173
+ - Complex diagrams may need manual adjustments
174
+ - Generated diagrams are saved in `.claude/vibe/diagrams/` folder
175
+
176
+ ---
177
+
178
+ ARGUMENTS: $ARGUMENTS