@su-record/vibe 2.2.2 → 2.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.json +152 -152
- package/.claude/vibe/constitution.md +184 -184
- package/.claude/vibe/rules/core/communication-guide.md +104 -104
- package/.claude/vibe/rules/core/development-philosophy.md +52 -52
- package/.claude/vibe/rules/core/quick-start.md +120 -120
- package/.claude/vibe/rules/quality/bdd-contract-testing.md +388 -388
- package/.claude/vibe/rules/quality/checklist.md +276 -276
- package/.claude/vibe/rules/quality/testing-strategy.md +437 -437
- package/.claude/vibe/rules/standards/anti-patterns.md +369 -369
- package/.claude/vibe/rules/standards/code-structure.md +291 -291
- package/.claude/vibe/rules/standards/complexity-metrics.md +312 -312
- package/.claude/vibe/rules/standards/naming-conventions.md +198 -198
- package/.claude/vibe/setup.sh +31 -31
- package/CLAUDE.md +323 -323
- package/LICENSE +21 -21
- package/README.md +724 -721
- package/agents/explorer.md +48 -0
- package/agents/implementer.md +53 -0
- package/agents/research/best-practices-agent.md +139 -0
- package/agents/research/codebase-patterns-agent.md +147 -0
- package/agents/research/framework-docs-agent.md +181 -0
- package/agents/research/security-advisory-agent.md +167 -0
- package/agents/review/architecture-reviewer.md +107 -0
- package/agents/review/complexity-reviewer.md +116 -0
- package/agents/review/data-integrity-reviewer.md +88 -0
- package/agents/review/git-history-reviewer.md +103 -0
- package/agents/review/performance-reviewer.md +86 -0
- package/agents/review/python-reviewer.md +152 -0
- package/agents/review/rails-reviewer.md +139 -0
- package/agents/review/react-reviewer.md +144 -0
- package/agents/review/security-reviewer.md +80 -0
- package/agents/review/simplicity-reviewer.md +140 -0
- package/agents/review/test-coverage-reviewer.md +116 -0
- package/agents/review/typescript-reviewer.md +127 -0
- package/agents/searcher.md +54 -0
- package/agents/simplifier.md +119 -0
- package/agents/tester.md +49 -0
- package/commands/vibe.analyze.md +239 -0
- package/commands/vibe.compound.md +261 -0
- package/commands/vibe.continue.md +88 -0
- package/commands/vibe.diagram.md +178 -0
- package/commands/vibe.e2e.md +266 -0
- package/commands/vibe.reason.md +306 -0
- package/commands/vibe.review.md +324 -0
- package/commands/vibe.run.md +836 -0
- package/commands/vibe.setup.md +97 -0
- package/commands/vibe.spec.md +383 -0
- package/commands/vibe.ui.md +137 -0
- package/commands/vibe.verify.md +238 -0
- package/dist/cli/index.js +389 -389
- package/dist/cli/index.js.map +1 -1
- package/dist/lib/MemoryManager.js +92 -92
- package/dist/lib/PythonParser.js +108 -108
- package/dist/lib/gemini-mcp.js +15 -15
- package/dist/lib/gemini-oauth.js +35 -35
- package/dist/lib/gpt-mcp.js +17 -17
- package/dist/lib/gpt-oauth.js +44 -44
- package/dist/tools/analytics/getUsageAnalytics.js +12 -12
- package/dist/tools/memory/createMemoryTimeline.js +10 -10
- package/dist/tools/memory/getMemoryGraph.js +12 -12
- package/dist/tools/memory/getSessionContext.js +9 -9
- package/dist/tools/memory/linkMemories.js +14 -14
- package/dist/tools/memory/listMemories.js +4 -4
- package/dist/tools/memory/recallMemory.js +4 -4
- package/dist/tools/memory/saveMemory.js +4 -4
- package/dist/tools/memory/searchMemoriesAdvanced.js +22 -22
- package/dist/tools/planning/generatePrd.js +46 -46
- package/dist/tools/prompt/enhancePromptGemini.js +160 -160
- package/dist/tools/reasoning/applyReasoningFramework.js +56 -56
- package/dist/tools/semantic/analyzeDependencyGraph.js +12 -12
- package/package.json +69 -66
- package/skills/git-worktree.md +178 -0
- package/skills/priority-todos.md +236 -0
- package/templates/constitution-template.md +184 -184
- package/templates/contract-backend-template.md +517 -517
- package/templates/contract-frontend-template.md +594 -594
- package/templates/feature-template.md +96 -96
- package/templates/hooks-template.json +103 -103
- package/templates/spec-template.md +199 -199
- package/.claude/vibe/rules/tools/mcp-hi-ai-guide.md +0 -665
- package/.claude/vibe/rules/tools/mcp-workflow.md +0 -51
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Multi-agent parallel code review with priority-based findings
|
|
3
|
+
argument-hint: "PR number, branch name, or file path"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /vibe.review
|
|
7
|
+
|
|
8
|
+
**Parallel Agent Code Review** - 13+ specialists review simultaneously
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
/vibe.review # Review current branch
|
|
14
|
+
/vibe.review PR#123 # Review specific PR
|
|
15
|
+
/vibe.review feature/login # Review specific branch
|
|
16
|
+
/vibe.review src/api/ # Review specific path
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Core Principle
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
23
|
+
│ All experts review simultaneously = Fast & Thorough │
|
|
24
|
+
│ │
|
|
25
|
+
│ 🔴 P1 (Critical): Blocks merge - MUST fix │
|
|
26
|
+
│ 🟡 P2 (Important): Should fix - Before merge │
|
|
27
|
+
│ 🔵 P3 (Nice-to-have): Enhancement - When time permits │
|
|
28
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Process
|
|
32
|
+
|
|
33
|
+
### Phase 1: Tech Stack Detection & Target Analysis
|
|
34
|
+
|
|
35
|
+
**Detect project tech stack FIRST before launching reviewers:**
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
📋 Tech Stack Detection
|
|
39
|
+
├── Read package.json → TypeScript, React, Node.js
|
|
40
|
+
├── Read pyproject.toml → Python, FastAPI, Django
|
|
41
|
+
├── Read Gemfile → Ruby, Rails
|
|
42
|
+
├── Read pubspec.yaml → Flutter, Dart
|
|
43
|
+
├── Read go.mod → Go
|
|
44
|
+
├── Read CLAUDE.md → Explicit tech stack declaration
|
|
45
|
+
└── Analyze file extensions in changed files
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**Detection Logic:**
|
|
49
|
+
```javascript
|
|
50
|
+
// Stack detection from project files
|
|
51
|
+
const stack = {
|
|
52
|
+
typescript: hasFile("package.json") && (hasDep("typescript") || hasFile("tsconfig.json")),
|
|
53
|
+
react: hasDep("react") || hasDep("next"),
|
|
54
|
+
python: hasFile("pyproject.toml") || hasFile("requirements.txt"),
|
|
55
|
+
rails: hasFile("Gemfile") && hasDep("rails"),
|
|
56
|
+
go: hasFile("go.mod"),
|
|
57
|
+
flutter: hasFile("pubspec.yaml")
|
|
58
|
+
};
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**Changed Files Analysis:**
|
|
62
|
+
```
|
|
63
|
+
git diff --name-only HEAD~1
|
|
64
|
+
├── src/components/*.tsx → React reviewer needed
|
|
65
|
+
├── app/api/*.py → Python reviewer needed
|
|
66
|
+
├── app/models/*.rb → Rails reviewer needed
|
|
67
|
+
└── No .ts files → Skip TypeScript reviewer
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Phase 2: Parallel Agent Review (STACK-AWARE)
|
|
71
|
+
|
|
72
|
+
**Launch ONLY relevant agents based on detected stack!**
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
76
|
+
│ 🚀 PARALLEL AGENT LAUNCH (Stack-Aware Selection) │
|
|
77
|
+
├─────────────────────────────────────────────────────────────────┤
|
|
78
|
+
│ │
|
|
79
|
+
│ ✅ ALWAYS RUN (Core Reviewers) │
|
|
80
|
+
│ ├── security-reviewer # OWASP Top 10, vulnerabilities │
|
|
81
|
+
│ ├── data-integrity-reviewer # Data validation, constraints │
|
|
82
|
+
│ ├── performance-reviewer # N+1 queries, memory leaks │
|
|
83
|
+
│ ├── architecture-reviewer # Layer violations, cycles │
|
|
84
|
+
│ ├── complexity-reviewer # Cyclomatic complexity, length │
|
|
85
|
+
│ ├── simplicity-reviewer # Over-abstraction, dead code │
|
|
86
|
+
│ ├── git-history-reviewer # Churn files, risk patterns │
|
|
87
|
+
│ └── test-coverage-reviewer # Missing tests, edge cases │
|
|
88
|
+
│ │
|
|
89
|
+
│ 🔍 CONDITIONAL (Based on Detected Stack) │
|
|
90
|
+
│ ├── python-reviewer # IF: .py files in diff │
|
|
91
|
+
│ ├── typescript-reviewer # IF: .ts/.tsx files OR tsconfig │
|
|
92
|
+
│ ├── rails-reviewer # IF: Gemfile has rails │
|
|
93
|
+
│ └── react-reviewer # IF: package.json has react │
|
|
94
|
+
│ │
|
|
95
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**Stack-Aware Agent Invocation:**
|
|
99
|
+
```javascript
|
|
100
|
+
// Core reviewers (ALWAYS)
|
|
101
|
+
const coreAgents = [
|
|
102
|
+
"security-reviewer",
|
|
103
|
+
"data-integrity-reviewer",
|
|
104
|
+
"performance-reviewer",
|
|
105
|
+
"architecture-reviewer",
|
|
106
|
+
"complexity-reviewer",
|
|
107
|
+
"simplicity-reviewer",
|
|
108
|
+
"git-history-reviewer",
|
|
109
|
+
"test-coverage-reviewer"
|
|
110
|
+
];
|
|
111
|
+
|
|
112
|
+
// Language reviewers (CONDITIONAL)
|
|
113
|
+
const languageAgents = [];
|
|
114
|
+
if (stack.python || changedFiles.some(f => f.endsWith('.py'))) {
|
|
115
|
+
languageAgents.push("python-reviewer");
|
|
116
|
+
}
|
|
117
|
+
if (stack.typescript || changedFiles.some(f => f.match(/\.tsx?$/))) {
|
|
118
|
+
languageAgents.push("typescript-reviewer");
|
|
119
|
+
}
|
|
120
|
+
if (stack.react) {
|
|
121
|
+
languageAgents.push("react-reviewer");
|
|
122
|
+
}
|
|
123
|
+
if (stack.rails) {
|
|
124
|
+
languageAgents.push("rails-reviewer");
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// Launch ALL selected agents in parallel
|
|
128
|
+
const allAgents = [...coreAgents, ...languageAgents];
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
**Example Output:**
|
|
132
|
+
```
|
|
133
|
+
📦 Detected Stack: TypeScript + React + Node.js
|
|
134
|
+
📄 Changed Files: 12 (.tsx: 8, .ts: 3, .json: 1)
|
|
135
|
+
|
|
136
|
+
🚀 Launching 10 agents (8 core + 2 language-specific):
|
|
137
|
+
✅ security-reviewer
|
|
138
|
+
✅ data-integrity-reviewer
|
|
139
|
+
✅ performance-reviewer
|
|
140
|
+
✅ architecture-reviewer
|
|
141
|
+
✅ complexity-reviewer
|
|
142
|
+
✅ simplicity-reviewer
|
|
143
|
+
✅ git-history-reviewer
|
|
144
|
+
✅ test-coverage-reviewer
|
|
145
|
+
✅ typescript-reviewer ← Detected: tsconfig.json
|
|
146
|
+
✅ react-reviewer ← Detected: react in package.json
|
|
147
|
+
⏭️ python-reviewer ← Skipped: No Python files
|
|
148
|
+
⏭️ rails-reviewer ← Skipped: No Gemfile
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Phase 3: Ultra-Thinking Deep Analysis
|
|
152
|
+
|
|
153
|
+
Deep analysis after agent results:
|
|
154
|
+
|
|
155
|
+
```markdown
|
|
156
|
+
## Deep Analysis Dimensions
|
|
157
|
+
|
|
158
|
+
1. **System Context**
|
|
159
|
+
- Component interactions
|
|
160
|
+
- Data flow
|
|
161
|
+
- External dependencies
|
|
162
|
+
|
|
163
|
+
2. **Stakeholder Perspectives**
|
|
164
|
+
- Developers: Maintainability
|
|
165
|
+
- Ops: Deployment risk
|
|
166
|
+
- Security: Vulnerabilities
|
|
167
|
+
- Business: Impact
|
|
168
|
+
|
|
169
|
+
3. **Edge Cases & Failure Scenarios**
|
|
170
|
+
- Race conditions
|
|
171
|
+
- Resource exhaustion
|
|
172
|
+
- Network failures
|
|
173
|
+
- Malicious input
|
|
174
|
+
|
|
175
|
+
4. **Multiple Angles**
|
|
176
|
+
- Technical excellence
|
|
177
|
+
- Business value
|
|
178
|
+
- Risk management
|
|
179
|
+
- Team dynamics
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Phase 4: Findings Synthesis
|
|
183
|
+
|
|
184
|
+
```
|
|
185
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
186
|
+
│ 📊 REVIEW FINDINGS │
|
|
187
|
+
├─────────────────────────────────────────────────────────────────┤
|
|
188
|
+
│ │
|
|
189
|
+
│ 🔴 P1 CRITICAL (Blocks Merge) - 2 issues │
|
|
190
|
+
│ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ │
|
|
191
|
+
│ 1. [SECURITY] SQL Injection in user query │
|
|
192
|
+
│ 📍 src/api/users.py:42 │
|
|
193
|
+
│ 💡 Use parameterized queries │
|
|
194
|
+
│ │
|
|
195
|
+
│ 2. [DATA] Missing transaction rollback │
|
|
196
|
+
│ 📍 src/services/payment.py:128 │
|
|
197
|
+
│ 💡 Wrap in try/except with rollback │
|
|
198
|
+
│ │
|
|
199
|
+
│ 🟡 P2 IMPORTANT (Should Fix) - 5 issues │
|
|
200
|
+
│ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ │
|
|
201
|
+
│ 3. [PERF] N+1 query in user list │
|
|
202
|
+
│ 4. [ARCH] Circular dependency detected │
|
|
203
|
+
│ 5. [TEST] Missing edge case tests │
|
|
204
|
+
│ ... │
|
|
205
|
+
│ │
|
|
206
|
+
│ 🔵 P3 NICE-TO-HAVE (Enhancement) - 3 issues │
|
|
207
|
+
│ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ │
|
|
208
|
+
│ 8. [STYLE] Consider extracting helper function │
|
|
209
|
+
│ ... │
|
|
210
|
+
│ │
|
|
211
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### Phase 5: Todo File Creation
|
|
215
|
+
|
|
216
|
+
Save findings to `.claude/vibe/todos/`:
|
|
217
|
+
|
|
218
|
+
```markdown
|
|
219
|
+
## File Naming Convention
|
|
220
|
+
|
|
221
|
+
{priority}-{category}-{short-desc}.md
|
|
222
|
+
|
|
223
|
+
Examples:
|
|
224
|
+
- P1-security-sql-injection.md
|
|
225
|
+
- P2-perf-n1-query.md
|
|
226
|
+
- P3-style-extract-helper.md
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
**Todo File Format:**
|
|
230
|
+
```markdown
|
|
231
|
+
# [P1] SQL Injection Vulnerability
|
|
232
|
+
|
|
233
|
+
## Summary
|
|
234
|
+
User input directly concatenated in SQL query
|
|
235
|
+
|
|
236
|
+
## Location
|
|
237
|
+
- File: src/api/users.py
|
|
238
|
+
- Line: 42
|
|
239
|
+
- Function: get_user_by_email()
|
|
240
|
+
|
|
241
|
+
## Current Code
|
|
242
|
+
```python
|
|
243
|
+
query = f"SELECT * FROM users WHERE email = '{email}'"
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
## Suggested Fix
|
|
247
|
+
```python
|
|
248
|
+
query = "SELECT * FROM users WHERE email = %s"
|
|
249
|
+
cursor.execute(query, (email,))
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
## References
|
|
253
|
+
- OWASP SQL Injection: https://owasp.org/...
|
|
254
|
+
- Project DB Guide: docs/database.md
|
|
255
|
+
|
|
256
|
+
## Status
|
|
257
|
+
- [ ] Fix implemented
|
|
258
|
+
- [ ] Tests added
|
|
259
|
+
- [ ] Review approved
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
### Phase 6: Optional E2E Testing
|
|
263
|
+
|
|
264
|
+
```
|
|
265
|
+
Suggest E2E tests based on project type:
|
|
266
|
+
├── Web: /vibe.e2e (Playwright)
|
|
267
|
+
├── iOS: Xcode Test
|
|
268
|
+
├── Android: Espresso
|
|
269
|
+
└── API: Contract Test
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
## Output
|
|
273
|
+
|
|
274
|
+
```
|
|
275
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
276
|
+
│ 📊 CODE REVIEW SUMMARY │
|
|
277
|
+
│ PR #123: Add user authentication │
|
|
278
|
+
├─────────────────────────────────────────────────────────────────┤
|
|
279
|
+
│ │
|
|
280
|
+
│ Reviewers: 13 agents | Duration: 45s │
|
|
281
|
+
│ │
|
|
282
|
+
│ 📈 Score: 72/100 (Needs Work) │
|
|
283
|
+
│ │
|
|
284
|
+
│ Issues Found: │
|
|
285
|
+
│ ├── 🔴 P1 Critical: 2 (BLOCKS MERGE) │
|
|
286
|
+
│ ├── 🟡 P2 Important: 5 │
|
|
287
|
+
│ └── 🔵 P3 Nice-to-have: 3 │
|
|
288
|
+
│ │
|
|
289
|
+
│ By Category: │
|
|
290
|
+
│ ├── Security: 2 │
|
|
291
|
+
│ ├── Performance: 3 │
|
|
292
|
+
│ ├── Architecture: 1 │
|
|
293
|
+
│ ├── Testing: 2 │
|
|
294
|
+
│ └── Style: 2 │
|
|
295
|
+
│ │
|
|
296
|
+
│ 📁 Todos created: .claude/vibe/todos/ (10 files) │
|
|
297
|
+
│ │
|
|
298
|
+
│ ❌ MERGE BLOCKED - Fix P1 issues first │
|
|
299
|
+
│ │
|
|
300
|
+
│ Next Steps: │
|
|
301
|
+
│ 1. Fix P1-security-sql-injection.md │
|
|
302
|
+
│ 2. Fix P1-data-transaction-rollback.md │
|
|
303
|
+
│ 3. Re-run: /vibe.review │
|
|
304
|
+
│ │
|
|
305
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
## Priority Guidelines
|
|
309
|
+
|
|
310
|
+
| Priority | Criteria | Action |
|
|
311
|
+
|----------|----------|--------|
|
|
312
|
+
| 🔴 P1 | Security vulnerabilities, data loss, crashes | Block merge, fix immediately |
|
|
313
|
+
| 🟡 P2 | Performance issues, architecture violations, missing tests | Fix before merge |
|
|
314
|
+
| 🔵 P3 | Style, refactoring suggestions, documentation | Add to backlog |
|
|
315
|
+
|
|
316
|
+
## Related Commands
|
|
317
|
+
|
|
318
|
+
- `/vibe.e2e` - Run E2E tests
|
|
319
|
+
- `/vibe.compound` - Document solutions
|
|
320
|
+
- `/vibe.verify` - SPEC-based verification
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
ARGUMENTS: $ARGUMENTS
|