@su-record/vibe 2.0.10 → 2.1.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.
@@ -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 `.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: .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
@@ -80,7 +80,51 @@ vibe status # Check current settings
80
80
  - Tech stack: Confirm existing stack or suggest new
81
81
  - Design reference: UI/UX to reference
82
82
 
83
- ### 3. Write SPEC Document (PTCF Structure)
83
+ ### 3. Parallel Research (v2.1.0) - Run AFTER requirements confirmed
84
+
85
+ **⚠️ IMPORTANT: Research starts ONLY after requirements are confirmed via Q&A**
86
+
87
+ Requirements confirmed when:
88
+ - Feature type decided (e.g., "passkey authentication")
89
+ - Tech stack confirmed (e.g., "React + Supabase")
90
+ - Core requirements collected
91
+
92
+ ```
93
+ ┌─────────────────────────────────────────────────────────────────┐
94
+ │ 🔍 PARALLEL RESEARCH AGENTS (After requirements confirmed) │
95
+ ├─────────────────────────────────────────────────────────────────┤
96
+ │ │
97
+ │ Task 1: best-practices-agent │
98
+ │ └── Best practices for [confirmed feature] + [confirmed stack] │
99
+ │ │
100
+ │ Task 2: framework-docs-agent │
101
+ │ └── Latest docs for [confirmed stack] (via context7) │
102
+ │ │
103
+ │ Task 3: codebase-patterns-agent │
104
+ │ └── Analyze similar patterns in existing codebase │
105
+ │ │
106
+ │ Task 4: security-advisory-agent │
107
+ │ └── Security advisories for [confirmed feature] │
108
+ │ │
109
+ └─────────────────────────────────────────────────────────────────┘
110
+ ```
111
+
112
+ **Execution (ALL in parallel):**
113
+ ```
114
+ # Generate specific prompts based on confirmed requirements
115
+ Task(model: "haiku", subagent_type: "Explore",
116
+ prompt: "Research best practices for [passkey auth] with [React + Supabase]")
117
+ Task(model: "haiku", subagent_type: "Explore",
118
+ prompt: "Get Supabase Auth + WebAuthn docs from context7")
119
+ Task(model: "haiku", subagent_type: "Explore",
120
+ prompt: "Find existing auth patterns in this codebase")
121
+ Task(model: "haiku", subagent_type: "Explore",
122
+ prompt: "Check OWASP WebAuthn security guidelines")
123
+ ```
124
+
125
+ **Research results are reflected in SPEC's Context section.**
126
+
127
+ ### 4. Write SPEC Document (PTCF Structure)
84
128
 
85
129
  Create `.vibe/specs/{feature-name}.md`:
86
130
 
@@ -162,7 +206,7 @@ Define AI role and expertise for implementation
162
206
  </acceptance>
163
207
  ```
164
208
 
165
- ### 4. Create Feature File (BDD) - Required
209
+ ### 5. Create Feature File (BDD) - Required
166
210
 
167
211
  **Must** create `.vibe/features/{feature-name}.feature` file.
168
212
 
@@ -202,7 +246,7 @@ Scenario: {title}
202
246
  | 1 | AC-1 | ⬜ |
203
247
  ```
204
248
 
205
- ### 5. Ambiguity Scan - Required
249
+ ### 6. Ambiguity Scan - Required
206
250
 
207
251
  After creating SPEC draft, **must perform systematic ambiguity check**.
208
252
 
@@ -248,7 +292,7 @@ After creating SPEC draft, **must perform systematic ambiguity check**.
248
292
  Please clarify the above items.
249
293
  ```
250
294
 
251
- ### 6. Quality Validation
295
+ ### 7. Quality Validation
252
296
 
253
297
  Self-evaluate against `.vibe/rules/quality/checklist.md` (0-100 score)
254
298