@su-record/vibe 1.1.8 → 1.1.10
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/agents/explorer.md +21 -21
- package/.claude/agents/implementer.md +24 -24
- package/.claude/agents/searcher.md +26 -26
- package/.claude/agents/simplifier.md +52 -53
- package/.claude/agents/tester.md +17 -17
- package/.claude/commands/vibe.analyze.md +138 -138
- package/.claude/commands/vibe.diagram.md +48 -48
- package/.claude/commands/vibe.reason.md +174 -174
- package/.claude/commands/vibe.run.md +169 -169
- package/.claude/commands/vibe.spec.md +192 -124
- package/.claude/commands/vibe.ui.md +38 -38
- package/.claude/commands/vibe.verify.md +77 -77
- package/package.json +1 -1
- package/templates/hooks-template.json +5 -5
|
@@ -5,293 +5,293 @@ argument-hint: "problem description"
|
|
|
5
5
|
|
|
6
6
|
# /vibe.reason
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Apply 9-step reasoning framework to complex problems (Reasoning Agent).
|
|
9
9
|
|
|
10
10
|
## Usage
|
|
11
11
|
|
|
12
12
|
```
|
|
13
|
-
/vibe.reason "
|
|
13
|
+
/vibe.reason "problem description"
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## Description
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Use systematic 9-step reasoning framework to logically analyze complex problems and derive optimal solutions.
|
|
19
19
|
|
|
20
20
|
## When to Use
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
Use in situations like:
|
|
23
23
|
|
|
24
|
-
1.
|
|
25
|
-
-
|
|
26
|
-
-
|
|
24
|
+
1. **Complex bug debugging**
|
|
25
|
+
- Root cause unclear
|
|
26
|
+
- Need to systematically verify multiple hypotheses
|
|
27
27
|
|
|
28
|
-
2.
|
|
29
|
-
-
|
|
30
|
-
-
|
|
28
|
+
2. **Architecture design decisions**
|
|
29
|
+
- Need to choose optimal option among several
|
|
30
|
+
- Need to comprehensively evaluate constraints and risks
|
|
31
31
|
|
|
32
|
-
3.
|
|
33
|
-
-
|
|
34
|
-
-
|
|
32
|
+
3. **Performance optimization**
|
|
33
|
+
- Bottleneck may be in multiple places
|
|
34
|
+
- Need step-by-step optimization strategy
|
|
35
35
|
|
|
36
|
-
4.
|
|
37
|
-
-
|
|
38
|
-
-
|
|
36
|
+
4. **Refactoring planning**
|
|
37
|
+
- Need to systematically analyze legacy code complexity
|
|
38
|
+
- Need gradual refactoring strategy
|
|
39
39
|
|
|
40
|
-
5.
|
|
41
|
-
-
|
|
42
|
-
-
|
|
40
|
+
5. **Requirements analysis**
|
|
41
|
+
- Need to reconcile conflicting requirements
|
|
42
|
+
- Need to discover missing requirements
|
|
43
43
|
|
|
44
44
|
## Process
|
|
45
45
|
|
|
46
|
-
### 1.
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
|
|
51
|
-
### 2.
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
|
|
56
|
-
### 3.
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
|
|
61
|
-
### 4.
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
|
|
66
|
-
### 5.
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
|
|
72
|
-
### 6.
|
|
73
|
-
-
|
|
74
|
-
-
|
|
75
|
-
-
|
|
76
|
-
|
|
77
|
-
### 7.
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
81
|
-
|
|
82
|
-
### 8.
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
|
|
87
|
-
### 9.
|
|
88
|
-
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
46
|
+
### 1. Logical Dependencies and Constraints
|
|
47
|
+
- Check policies, rules, prerequisites
|
|
48
|
+
- Optimize task order (identify dependencies)
|
|
49
|
+
- Apply user constraints first
|
|
50
|
+
|
|
51
|
+
### 2. Risk Assessment
|
|
52
|
+
- Analyze action consequences
|
|
53
|
+
- Check rollback possibility
|
|
54
|
+
- Review compatibility, security, performance risks
|
|
55
|
+
|
|
56
|
+
### 3. Inductive Reasoning and Hypothesis Exploration
|
|
57
|
+
- Generate hypotheses about root cause
|
|
58
|
+
- Prioritize by likelihood
|
|
59
|
+
- Present verification method for each hypothesis
|
|
60
|
+
|
|
61
|
+
### 4. Result Evaluation and Adaptability
|
|
62
|
+
- Modify plan based on observations
|
|
63
|
+
- Generate new hypothesis when disproved
|
|
64
|
+
- Determine backtracking need
|
|
65
|
+
|
|
66
|
+
### 5. Information Availability
|
|
67
|
+
- Identify all available tools
|
|
68
|
+
- Reference relevant policy/rule documents
|
|
69
|
+
- Restore previous context
|
|
70
|
+
- Distinguish items needing user confirmation
|
|
71
|
+
|
|
72
|
+
### 6. Precision and Evidence
|
|
73
|
+
- Cite exact source when referencing policies
|
|
74
|
+
- Include filename:line when referencing code
|
|
75
|
+
- Provide exact metric numbers
|
|
76
|
+
|
|
77
|
+
### 7. Completeness
|
|
78
|
+
- Integrate all requirements, options, preferences
|
|
79
|
+
- Avoid premature conclusions
|
|
80
|
+
- Explore multiple alternatives
|
|
81
|
+
|
|
82
|
+
### 8. Persistence and Patience
|
|
83
|
+
- Intelligently retry temporary errors
|
|
84
|
+
- Solve problems through strategy changes
|
|
85
|
+
- Continue until all reasoning steps complete
|
|
86
|
+
|
|
87
|
+
### 9. Response Suppression
|
|
88
|
+
- Act only after reasoning complete
|
|
89
|
+
- Document reasoning process for complex decisions
|
|
90
|
+
- Ensure safety through step-by-step execution
|
|
91
91
|
|
|
92
92
|
## MCP Tools Integration
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
This command automatically uses these MCP tools:
|
|
95
95
|
|
|
96
|
-
- **apply_reasoning_framework**: 9
|
|
97
|
-
- **create_thinking_chain**:
|
|
98
|
-
- **analyze_problem**:
|
|
99
|
-
- **step_by_step_analysis**:
|
|
100
|
-
- **recall_memory**:
|
|
101
|
-
- **find_symbol / find_references**:
|
|
96
|
+
- **apply_reasoning_framework**: Apply 9-step reasoning framework
|
|
97
|
+
- **create_thinking_chain**: Create sequential thinking chain
|
|
98
|
+
- **analyze_problem**: Analyze problem root cause
|
|
99
|
+
- **step_by_step_analysis**: Detailed step-by-step analysis
|
|
100
|
+
- **recall_memory**: Restore previous context
|
|
101
|
+
- **find_symbol / find_references**: Identify code dependencies
|
|
102
102
|
|
|
103
103
|
## Output Format
|
|
104
104
|
|
|
105
105
|
```markdown
|
|
106
|
-
#
|
|
106
|
+
# Reasoning Framework Analysis
|
|
107
107
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
108
|
+
**Problem**: [problem description]
|
|
109
|
+
**Context**: [relevant information]
|
|
110
|
+
**Steps Applied**: 9/9
|
|
111
111
|
|
|
112
112
|
---
|
|
113
113
|
|
|
114
|
-
## 1.
|
|
114
|
+
## 1. Logical Dependencies and Constraints
|
|
115
115
|
|
|
116
|
-
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
-
|
|
120
|
-
-
|
|
116
|
+
**Key Questions**:
|
|
117
|
+
- What policies or required rules apply?
|
|
118
|
+
- Should task order be rearranged?
|
|
119
|
+
- Required prerequisites or information?
|
|
120
|
+
- Explicit user constraints?
|
|
121
121
|
|
|
122
|
-
|
|
123
|
-
[
|
|
122
|
+
**Constraint Analysis**:
|
|
123
|
+
[analysis content]
|
|
124
124
|
|
|
125
125
|
---
|
|
126
126
|
|
|
127
|
-
## 2.
|
|
127
|
+
## 2. Risk Assessment
|
|
128
128
|
|
|
129
129
|
...
|
|
130
130
|
|
|
131
131
|
---
|
|
132
132
|
|
|
133
|
-
##
|
|
133
|
+
## Summary
|
|
134
134
|
|
|
135
|
-
[
|
|
135
|
+
[Overall reasoning results summary and recommendations]
|
|
136
136
|
```
|
|
137
137
|
|
|
138
138
|
## Examples
|
|
139
139
|
|
|
140
|
-
### Example 1:
|
|
140
|
+
### Example 1: Complex Bug Debugging
|
|
141
141
|
|
|
142
142
|
```
|
|
143
|
-
|
|
143
|
+
User: /vibe.reason "After user login, profile page intermittently returns 500 error. Log shows 'TypeError: Cannot read property id of undefined'"
|
|
144
144
|
|
|
145
|
-
AI:
|
|
145
|
+
AI: Analyzing this problem with 9-step reasoning framework.
|
|
146
146
|
|
|
147
|
-
#
|
|
147
|
+
# Reasoning Framework Analysis
|
|
148
148
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
**Problem**: Intermittent 500 error on profile page after login (TypeError: Cannot read property 'id' of undefined)
|
|
150
|
+
**Context**: Intermittent occurrence, happens after successful login
|
|
151
|
+
**Steps Applied**: 9/9
|
|
152
152
|
|
|
153
153
|
---
|
|
154
154
|
|
|
155
|
-
## 1.
|
|
155
|
+
## 1. Logical Dependencies and Constraints
|
|
156
156
|
|
|
157
|
-
|
|
158
|
-
-
|
|
159
|
-
-
|
|
160
|
-
-
|
|
161
|
-
-
|
|
157
|
+
**Constraint Analysis**:
|
|
158
|
+
- Policy/Rules: Need to check auth/authz system policies
|
|
159
|
+
- Task Order: Verify login → session creation → profile fetch order
|
|
160
|
+
- Prerequisites: Need to identify error reproduction conditions
|
|
161
|
+
- User Constraints: Production environment limits debugging tools
|
|
162
162
|
|
|
163
163
|
---
|
|
164
164
|
|
|
165
|
-
## 2.
|
|
165
|
+
## 2. Risk Assessment
|
|
166
166
|
|
|
167
|
-
|
|
168
|
-
-
|
|
169
|
-
-
|
|
170
|
-
-
|
|
171
|
-
-
|
|
172
|
-
-
|
|
167
|
+
**Risk Assessment**:
|
|
168
|
+
- Task type: Debugging (medium risk - logging low risk, DB changes high risk)
|
|
169
|
+
- Rollback possibility: Adding logs easy to rollback
|
|
170
|
+
- Compatibility risk: Session structure changes affect existing users
|
|
171
|
+
- Security risk: Excessive logging may expose sensitive info
|
|
172
|
+
- Performance risk: Additional logging minimal impact
|
|
173
173
|
|
|
174
174
|
---
|
|
175
175
|
|
|
176
|
-
## 3.
|
|
176
|
+
## 3. Inductive Reasoning and Hypothesis Exploration
|
|
177
177
|
|
|
178
|
-
|
|
179
|
-
1.
|
|
180
|
-
-
|
|
181
|
-
-
|
|
178
|
+
**Hypothesis Generation**:
|
|
179
|
+
1. **Hypothesis 1: Incomplete session data** (Likelihood: High)
|
|
180
|
+
- Evidence: Intermittent = timing issue or data consistency problem
|
|
181
|
+
- Verification: Add logging to session save logic, check Redis connection
|
|
182
182
|
|
|
183
|
-
2.
|
|
184
|
-
-
|
|
185
|
-
-
|
|
183
|
+
2. **Hypothesis 2: Async processing order issue** (Likelihood: Medium)
|
|
184
|
+
- Evidence: undefined = accessing data before load
|
|
185
|
+
- Verification: Check Promise chain in profile API, check for missing await
|
|
186
186
|
|
|
187
|
-
3.
|
|
188
|
-
-
|
|
189
|
-
-
|
|
187
|
+
3. **Hypothesis 3: DB query returns null** (Likelihood: Low)
|
|
188
|
+
- Evidence: User info fetch fails only under certain conditions
|
|
189
|
+
- Verification: Check profile query logs, review foreign key constraints
|
|
190
190
|
|
|
191
|
-
|
|
191
|
+
**Priority**: Verify in order of likelihood, don't completely rule out low probability
|
|
192
192
|
|
|
193
193
|
---
|
|
194
194
|
|
|
195
|
-
[
|
|
195
|
+
[Additional steps 4-9 analysis...]
|
|
196
196
|
|
|
197
197
|
---
|
|
198
198
|
|
|
199
|
-
##
|
|
199
|
+
## Summary
|
|
200
200
|
|
|
201
|
-
|
|
201
|
+
Analyzed profile page 500 error after login through 9-step reasoning framework.
|
|
202
202
|
|
|
203
|
-
|
|
204
|
-
-
|
|
205
|
-
-
|
|
203
|
+
**Key Findings**:
|
|
204
|
+
- Most likely cause: Incomplete session data (Redis connection issue or session save timing)
|
|
205
|
+
- Verification priority: 1) Add session save logic logging → 2) Review async processing → 3) Check DB queries
|
|
206
206
|
|
|
207
|
-
|
|
208
|
-
1.
|
|
209
|
-
2.
|
|
210
|
-
3.
|
|
207
|
+
**Recommended Actions**:
|
|
208
|
+
1. Immediate: Add detailed logging to session save/fetch (low risk)
|
|
209
|
+
2. Short-term: Code review async processing (Promise, await check)
|
|
210
|
+
3. Medium-term: Strengthen session store monitoring (Redis connection, memory)
|
|
211
211
|
|
|
212
|
-
|
|
213
|
-
|
|
212
|
+
**Next Steps**:
|
|
213
|
+
Check `profile_controller.ts` → Add try-catch and logging to session processing logic → Identify reproduction conditions
|
|
214
214
|
```
|
|
215
215
|
|
|
216
|
-
### Example 2:
|
|
216
|
+
### Example 2: Architecture Design Decision
|
|
217
217
|
|
|
218
218
|
```
|
|
219
|
-
|
|
219
|
+
User: /vibe.reason "Want to add real-time notification feature. Should I use WebSocket, SSE, or Long Polling?"
|
|
220
220
|
|
|
221
|
-
AI: [
|
|
221
|
+
AI: [Systematically analyze constraints, risks, pros/cons of each option through 9-step framework, recommend optimal choice for project situation]
|
|
222
222
|
```
|
|
223
223
|
|
|
224
224
|
## Integration with Other Commands
|
|
225
225
|
|
|
226
|
-
### /vibe.spec
|
|
226
|
+
### With /vibe.spec
|
|
227
227
|
|
|
228
228
|
```
|
|
229
|
-
# 1.
|
|
230
|
-
/vibe.spec "
|
|
229
|
+
# 1. Collect requirements
|
|
230
|
+
/vibe.spec "real-time notifications"
|
|
231
231
|
|
|
232
|
-
# 2.
|
|
233
|
-
/vibe.reason "
|
|
232
|
+
# 2. When technical decision needed
|
|
233
|
+
/vibe.reason "Choosing WebSocket vs SSE vs Long Polling for real-time notifications"
|
|
234
234
|
|
|
235
|
-
# 3. SPEC
|
|
236
|
-
/vibe.plan "
|
|
235
|
+
# 3. Update SPEC document and create plan
|
|
236
|
+
/vibe.plan "real-time notifications"
|
|
237
237
|
```
|
|
238
238
|
|
|
239
|
-
### /vibe.analyze
|
|
239
|
+
### With /vibe.analyze
|
|
240
240
|
|
|
241
241
|
```
|
|
242
|
-
# 1.
|
|
242
|
+
# 1. Discover issue through code analysis
|
|
243
243
|
/vibe.analyze --code
|
|
244
244
|
|
|
245
|
-
# 2.
|
|
246
|
-
/vibe.reason "users_service.py
|
|
245
|
+
# 2. Analyze discovered issue with reasoning framework
|
|
246
|
+
/vibe.reason "Refactoring strategy to reduce users_service.py Cyclomatic Complexity from 15 to under 10"
|
|
247
247
|
|
|
248
|
-
# 3.
|
|
248
|
+
# 3. Execute refactoring
|
|
249
249
|
/vibe.run "Task: Refactor users_service.py"
|
|
250
250
|
```
|
|
251
251
|
|
|
252
252
|
## Agent Configuration
|
|
253
253
|
|
|
254
|
-
|
|
254
|
+
This command uses `~/.claude/agents/reasoning-agent.md`.
|
|
255
255
|
|
|
256
|
-
|
|
257
|
-
-
|
|
258
|
-
-
|
|
259
|
-
-
|
|
256
|
+
**Agent Role**:
|
|
257
|
+
- Systematic reasoning and problem-solving expert
|
|
258
|
+
- Logically analyze complex problems
|
|
259
|
+
- Derive optimal solutions considering all relevant factors
|
|
260
260
|
|
|
261
|
-
|
|
262
|
-
- 9
|
|
263
|
-
-
|
|
264
|
-
-
|
|
265
|
-
-
|
|
261
|
+
**Agent Features**:
|
|
262
|
+
- Apply 9-step reasoning framework
|
|
263
|
+
- Hypothesis-based approach
|
|
264
|
+
- Risk assessment and mitigation strategies
|
|
265
|
+
- Precise evidence and source citation
|
|
266
266
|
|
|
267
267
|
## Best Practices
|
|
268
268
|
|
|
269
|
-
1.
|
|
270
|
-
- ❌ "
|
|
271
|
-
- ✅ "
|
|
269
|
+
1. **Describe problem specifically**
|
|
270
|
+
- ❌ "There's a bug"
|
|
271
|
+
- ✅ "After login, profile page intermittently returns 500 error. Error log: TypeError: Cannot read property 'id' of undefined"
|
|
272
272
|
|
|
273
|
-
2.
|
|
274
|
-
-
|
|
275
|
-
-
|
|
276
|
-
-
|
|
273
|
+
2. **Include context**
|
|
274
|
+
- Occurrence conditions (always? intermittent? specific conditions only?)
|
|
275
|
+
- Relevant tech stack
|
|
276
|
+
- Solutions already tried
|
|
277
277
|
|
|
278
|
-
3.
|
|
279
|
-
-
|
|
280
|
-
-
|
|
278
|
+
3. **Save reasoning results to memory**
|
|
279
|
+
- For complex problems, save reasoning results with `save_memory`
|
|
280
|
+
- Reference later with `recall_memory`
|
|
281
281
|
|
|
282
|
-
4.
|
|
283
|
-
-
|
|
284
|
-
-
|
|
282
|
+
4. **Verify step by step**
|
|
283
|
+
- Verify hypotheses suggested by reasoning framework in order
|
|
284
|
+
- Feedback each verification result to agent
|
|
285
285
|
|
|
286
|
-
5.
|
|
287
|
-
- `/vibe.analyze
|
|
286
|
+
5. **Combine with other commands**
|
|
287
|
+
- `/vibe.analyze` to understand situation → `/vibe.reason` to analyze solution → `/vibe.run` to execute
|
|
288
288
|
|
|
289
289
|
## Notes
|
|
290
290
|
|
|
291
|
-
-
|
|
292
|
-
-
|
|
293
|
-
-
|
|
294
|
-
- MCP
|
|
291
|
+
- This command is specialized for complex problems. For simple tasks, direct requests are more efficient.
|
|
292
|
+
- Reasoning process may take time; allow sufficient time.
|
|
293
|
+
- Reasoning results are recommendations; final decision is user's.
|
|
294
|
+
- Automatically uses MCP tools, so hi-ai server must be connected.
|
|
295
295
|
|
|
296
296
|
## Related
|
|
297
297
|
|