@su-record/vibe 1.1.9 → 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 +160 -160
- 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
|
@@ -1,237 +1,237 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Analyze project or specific feature/module
|
|
3
|
-
argument-hint: "
|
|
3
|
+
argument-hint: "feature-name" or --code or --deps or --arch (optional)
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# /vibe.analyze
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Analyze project or specific feature/module.
|
|
9
9
|
|
|
10
10
|
## Usage
|
|
11
11
|
|
|
12
12
|
```
|
|
13
|
-
/vibe.analyze #
|
|
14
|
-
/vibe.analyze "
|
|
15
|
-
/vibe.analyze --code #
|
|
16
|
-
/vibe.analyze --deps #
|
|
17
|
-
/vibe.analyze --arch #
|
|
13
|
+
/vibe.analyze # Full project quality analysis
|
|
14
|
+
/vibe.analyze "login" # Login related code exploration + context collection
|
|
15
|
+
/vibe.analyze --code # Code quality analysis only
|
|
16
|
+
/vibe.analyze --deps # Dependency analysis only
|
|
17
|
+
/vibe.analyze --arch # Architecture analysis only
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
## ⚠️
|
|
20
|
+
## ⚠️ Context Reset
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
22
|
+
**When this command runs, previous conversation is ignored.**
|
|
23
|
+
- Explore and analyze code from scratch like new session
|
|
24
|
+
- Base conversation only on newly collected information from this analysis
|
|
25
25
|
|
|
26
26
|
---
|
|
27
27
|
|
|
28
|
-
## Mode 1:
|
|
28
|
+
## Mode 1: Feature/Module Analysis (`/vibe.analyze "feature-name"`)
|
|
29
29
|
|
|
30
|
-
###
|
|
30
|
+
### Goal
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
1.
|
|
34
|
-
2.
|
|
35
|
-
3.
|
|
32
|
+
**Explore all source code** related to user's requested feature/module and **analyze flow** to:
|
|
33
|
+
1. Understand current implementation status
|
|
34
|
+
2. Understand code structure and dependencies
|
|
35
|
+
3. Build context for immediate response to future development/modification requests
|
|
36
36
|
|
|
37
37
|
### Process
|
|
38
38
|
|
|
39
|
-
#### 1.
|
|
39
|
+
#### 1. Request Analysis
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
41
|
+
Extract key keywords from user request:
|
|
42
|
+
- Feature name (e.g., login, feed, payment)
|
|
43
|
+
- Action (e.g., create, read, update, delete)
|
|
44
|
+
- Scope (e.g., backend only, frontend only, full)
|
|
45
45
|
|
|
46
|
-
#### 2.
|
|
46
|
+
#### 2. Understand Project Structure
|
|
47
47
|
|
|
48
|
-
`CLAUDE.md`, `package.json`, `pyproject.toml
|
|
48
|
+
Read `CLAUDE.md`, `package.json`, `pyproject.toml`, etc. to identify tech stack:
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
**Backend:**
|
|
51
51
|
- FastAPI/Django: `app/api/`, `app/services/`, `app/models/`
|
|
52
52
|
- Express/NestJS: `src/controllers/`, `src/services/`, `src/models/`
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
**Frontend:**
|
|
55
55
|
- React/Next.js: `src/components/`, `src/pages/`, `src/hooks/`
|
|
56
56
|
- Flutter: `lib/screens/`, `lib/services/`, `lib/providers/`
|
|
57
57
|
|
|
58
|
-
#### 3.
|
|
58
|
+
#### 3. Explore Related Code
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
1. **Glob
|
|
62
|
-
2. **Grep
|
|
63
|
-
3. **Read
|
|
64
|
-
4.
|
|
60
|
+
**Exploration strategy:**
|
|
61
|
+
1. **Glob** to collect related file list
|
|
62
|
+
2. **Grep** to locate code by keyword
|
|
63
|
+
3. **Read** to analyze key files in detail
|
|
64
|
+
4. If needed, **Task (Explore)** agent for parallel exploration
|
|
65
65
|
|
|
66
|
-
#### 4.
|
|
66
|
+
#### 4. Flow Analysis
|
|
67
67
|
|
|
68
|
-
**API
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
-
|
|
68
|
+
**API Flow:**
|
|
69
|
+
- Endpoint URL and HTTP method
|
|
70
|
+
- Request/response schema
|
|
71
|
+
- Authentication/authorization requirements
|
|
72
72
|
|
|
73
|
-
|
|
74
|
-
-
|
|
75
|
-
-
|
|
76
|
-
-
|
|
73
|
+
**Business Logic:**
|
|
74
|
+
- Core methods and roles
|
|
75
|
+
- Validation rules
|
|
76
|
+
- External service integrations
|
|
77
77
|
|
|
78
|
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
81
|
-
-
|
|
78
|
+
**Data Flow:**
|
|
79
|
+
- Related tables/models
|
|
80
|
+
- Relationships (1:N, N:M)
|
|
81
|
+
- Key query patterns
|
|
82
82
|
|
|
83
|
-
#### 5.
|
|
83
|
+
#### 5. Output Analysis Results
|
|
84
84
|
|
|
85
85
|
```markdown
|
|
86
|
-
## 📊 [
|
|
86
|
+
## 📊 [feature-name] Analysis Results
|
|
87
87
|
|
|
88
|
-
###
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
88
|
+
### Overview
|
|
89
|
+
- **Feature description**: [one-line summary]
|
|
90
|
+
- **Implementation status**: [Complete/In progress/Not implemented]
|
|
91
|
+
- **Related files**: N files
|
|
92
92
|
|
|
93
|
-
###
|
|
93
|
+
### Structure
|
|
94
94
|
|
|
95
|
-
#### API
|
|
96
|
-
|
|
|
97
|
-
|
|
98
|
-
| POST | /api/v1/auth/login |
|
|
95
|
+
#### API Endpoints
|
|
96
|
+
| Method | Path | Description | Auth |
|
|
97
|
+
|--------|------|-------------|------|
|
|
98
|
+
| POST | /api/v1/auth/login | Login | - |
|
|
99
99
|
|
|
100
|
-
####
|
|
101
|
-
- `auth_service.py`:
|
|
102
|
-
- `login()`:
|
|
103
|
-
- `verify_token()`:
|
|
100
|
+
#### Core Services
|
|
101
|
+
- `auth_service.py`: Authentication logic
|
|
102
|
+
- `login()`: Login processing
|
|
103
|
+
- `verify_token()`: Token verification
|
|
104
104
|
|
|
105
|
-
####
|
|
106
|
-
- `User`:
|
|
107
|
-
-
|
|
108
|
-
-
|
|
105
|
+
#### Data Models
|
|
106
|
+
- `User`: User table
|
|
107
|
+
- Key fields: id, email, password_hash
|
|
108
|
+
- Relationships: Session (1:N)
|
|
109
109
|
|
|
110
|
-
###
|
|
111
|
-
[
|
|
110
|
+
### Flow Diagram
|
|
111
|
+
[Text-based flow description]
|
|
112
112
|
|
|
113
|
-
###
|
|
113
|
+
### Reference File List
|
|
114
114
|
- src/api/auth/router.py:L10-50
|
|
115
115
|
- src/services/auth_service.py:L1-100
|
|
116
116
|
```
|
|
117
117
|
|
|
118
|
-
#### 6.
|
|
118
|
+
#### 6. Check Development Rules
|
|
119
119
|
|
|
120
|
-
`.vibe/rules
|
|
121
|
-
- `core/quick-start.md` - 5
|
|
122
|
-
- `standards/complexity-metrics.md` -
|
|
123
|
-
- `quality/checklist.md` -
|
|
120
|
+
Load related rules from `.vibe/rules/`:
|
|
121
|
+
- `core/quick-start.md` - 5 core principles
|
|
122
|
+
- `standards/complexity-metrics.md` - Complexity standards
|
|
123
|
+
- `quality/checklist.md` - Quality checklist
|
|
124
124
|
|
|
125
|
-
|
|
125
|
+
Output any rule violations found.
|
|
126
126
|
|
|
127
|
-
#### 7.
|
|
127
|
+
#### 7. Complete
|
|
128
128
|
|
|
129
|
-
|
|
130
|
-
1.
|
|
131
|
-
2. "
|
|
132
|
-
3.
|
|
129
|
+
After analysis:
|
|
130
|
+
1. Output analysis summary
|
|
131
|
+
2. Ask "What would you like me to help with?"
|
|
132
|
+
3. Use collected context for subsequent development/modification requests
|
|
133
133
|
|
|
134
134
|
---
|
|
135
135
|
|
|
136
|
-
## Mode 2:
|
|
136
|
+
## Mode 2: Project Quality Analysis (no option or --code/--deps/--arch)
|
|
137
137
|
|
|
138
|
-
###
|
|
138
|
+
### Analysis Scope
|
|
139
139
|
|
|
140
|
-
-
|
|
141
|
-
- **--code**:
|
|
142
|
-
- **--deps**:
|
|
143
|
-
- **--arch**:
|
|
140
|
+
- **Default** (`/vibe.analyze`): Full analysis (code + dependencies + architecture)
|
|
141
|
+
- **--code**: Code quality analysis only
|
|
142
|
+
- **--deps**: Dependency analysis only
|
|
143
|
+
- **--arch**: Architecture analysis only
|
|
144
144
|
|
|
145
|
-
### MCP
|
|
145
|
+
### MCP Tool Usage
|
|
146
146
|
|
|
147
|
-
`@su-record/hi-ai
|
|
147
|
+
Based on `@su-record/hi-ai`:
|
|
148
148
|
|
|
149
|
-
####
|
|
150
|
-
- `analyze_complexity`:
|
|
151
|
-
- `validate_code_quality`:
|
|
152
|
-
- `check_coupling_cohesion`:
|
|
149
|
+
#### Code Quality Analysis (--code)
|
|
150
|
+
- `analyze_complexity`: Complexity analysis
|
|
151
|
+
- `validate_code_quality`: Code quality validation
|
|
152
|
+
- `check_coupling_cohesion`: Coupling/cohesion check
|
|
153
153
|
|
|
154
|
-
####
|
|
155
|
-
- `package.json` / `pyproject.toml` / `pubspec.yaml`
|
|
156
|
-
-
|
|
154
|
+
#### Dependency Analysis (--deps)
|
|
155
|
+
- Read `package.json` / `pyproject.toml` / `pubspec.yaml`
|
|
156
|
+
- Analyze version conflicts, security vulnerabilities, packages needing updates
|
|
157
157
|
|
|
158
|
-
####
|
|
159
|
-
- `find_symbol`:
|
|
160
|
-
- `find_references`:
|
|
161
|
-
-
|
|
158
|
+
#### Architecture Analysis (--arch)
|
|
159
|
+
- `find_symbol`: Find core modules
|
|
160
|
+
- `find_references`: Identify module dependencies
|
|
161
|
+
- Detect circular dependencies, layer violations
|
|
162
162
|
|
|
163
|
-
###
|
|
163
|
+
### Analysis Report
|
|
164
164
|
|
|
165
165
|
`.vibe/reports/analysis-{date}.md`:
|
|
166
166
|
|
|
167
167
|
```markdown
|
|
168
|
-
#
|
|
168
|
+
# Project Analysis Report
|
|
169
169
|
|
|
170
|
-
##
|
|
171
|
-
-
|
|
172
|
-
-
|
|
170
|
+
## Overview
|
|
171
|
+
- Analysis date: 2025-01-06 12:00
|
|
172
|
+
- Analysis scope: Full
|
|
173
173
|
|
|
174
|
-
##
|
|
175
|
-
-
|
|
176
|
-
-
|
|
174
|
+
## Code Quality (85/100)
|
|
175
|
+
- Average complexity: 8.2 (good)
|
|
176
|
+
- High complexity files: 3
|
|
177
177
|
|
|
178
|
-
##
|
|
179
|
-
-
|
|
180
|
-
-
|
|
178
|
+
## Dependencies (92/100)
|
|
179
|
+
- Total packages: 42
|
|
180
|
+
- Updates needed: 3
|
|
181
181
|
|
|
182
|
-
##
|
|
183
|
-
-
|
|
184
|
-
-
|
|
182
|
+
## Architecture (78/100)
|
|
183
|
+
- Circular dependencies: 2 found
|
|
184
|
+
- Layer violations: 1
|
|
185
185
|
|
|
186
|
-
##
|
|
187
|
-
1. service.py
|
|
188
|
-
2. lodash
|
|
186
|
+
## Improvement Suggestions
|
|
187
|
+
1. Refactor service.py
|
|
188
|
+
2. Apply lodash security patch
|
|
189
189
|
```
|
|
190
190
|
|
|
191
191
|
---
|
|
192
192
|
|
|
193
193
|
## Example
|
|
194
194
|
|
|
195
|
-
###
|
|
195
|
+
### Feature Analysis
|
|
196
196
|
```
|
|
197
|
-
User: /vibe.analyze "
|
|
197
|
+
User: /vibe.analyze "login"
|
|
198
198
|
|
|
199
|
-
Claude:
|
|
199
|
+
Claude: Analyzing login related code...
|
|
200
200
|
|
|
201
|
-
[Glob, Grep, Read
|
|
201
|
+
[Exploring code with Glob, Grep, Read tools]
|
|
202
202
|
|
|
203
|
-
📊
|
|
203
|
+
📊 Login Analysis Results
|
|
204
204
|
|
|
205
|
-
###
|
|
206
|
-
-
|
|
207
|
-
-
|
|
208
|
-
-
|
|
205
|
+
### Overview
|
|
206
|
+
- Feature description: JWT-based user authentication
|
|
207
|
+
- Implementation status: Complete
|
|
208
|
+
- Related files: 8
|
|
209
209
|
|
|
210
|
-
### API
|
|
211
|
-
| POST | /api/v1/auth/login |
|
|
212
|
-
| POST | /api/v1/auth/refresh |
|
|
210
|
+
### API Endpoints
|
|
211
|
+
| POST | /api/v1/auth/login | Login | - |
|
|
212
|
+
| POST | /api/v1/auth/refresh | Token refresh | Required |
|
|
213
213
|
|
|
214
|
-
[
|
|
214
|
+
[Analysis continues...]
|
|
215
215
|
|
|
216
|
-
|
|
217
|
-
-
|
|
218
|
-
-
|
|
219
|
-
-
|
|
216
|
+
What would you like me to help with?
|
|
217
|
+
- Refactoring
|
|
218
|
+
- Add new feature
|
|
219
|
+
- Bug fix
|
|
220
220
|
```
|
|
221
221
|
|
|
222
|
-
###
|
|
222
|
+
### Quality Analysis
|
|
223
223
|
```
|
|
224
224
|
User: /vibe.analyze --code
|
|
225
225
|
|
|
226
|
-
Claude:
|
|
226
|
+
Claude: Starting code quality analysis...
|
|
227
227
|
|
|
228
|
-
📊
|
|
228
|
+
📊 Code Quality Score: 85/100 (B+)
|
|
229
229
|
|
|
230
|
-
|
|
231
|
-
-
|
|
230
|
+
**Key findings:**
|
|
231
|
+
- High complexity: src/service.py (CC: 15)
|
|
232
232
|
|
|
233
|
-
|
|
234
|
-
1. src/service.py
|
|
233
|
+
**Improvement suggestions:**
|
|
234
|
+
1. Split src/service.py into 3 modules
|
|
235
235
|
```
|
|
236
236
|
|
|
237
237
|
---
|
|
@@ -5,7 +5,7 @@ argument-hint: --er or --flow (optional)
|
|
|
5
5
|
|
|
6
6
|
# /vibe.diagram
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Generate diagrams (architecture, ERD, flowchart).
|
|
9
9
|
|
|
10
10
|
## Usage
|
|
11
11
|
|
|
@@ -17,35 +17,35 @@ argument-hint: --er or --flow (optional)
|
|
|
17
17
|
|
|
18
18
|
## Process
|
|
19
19
|
|
|
20
|
-
### 1.
|
|
20
|
+
### 1. Determine Diagram Type
|
|
21
21
|
|
|
22
|
-
-
|
|
22
|
+
- **Default** (`/vibe.diagram`): Architecture diagram
|
|
23
23
|
- **--er**: ERD (Entity-Relationship Diagram)
|
|
24
|
-
- **--flow**:
|
|
24
|
+
- **--flow**: Flowchart (main processes)
|
|
25
25
|
|
|
26
|
-
### 2.
|
|
26
|
+
### 2. Project Analysis
|
|
27
27
|
|
|
28
|
-
####
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
28
|
+
#### Architecture Diagram
|
|
29
|
+
- Understand project structure (folder structure)
|
|
30
|
+
- Identify major modules and layers
|
|
31
|
+
- Analyze dependency relationships
|
|
32
32
|
|
|
33
33
|
#### ERD
|
|
34
|
-
-
|
|
34
|
+
- Find database schema files
|
|
35
35
|
- `backend/models/`
|
|
36
36
|
- `migrations/`
|
|
37
37
|
- `schema.sql`
|
|
38
|
-
-
|
|
38
|
+
- Identify table relationships
|
|
39
39
|
|
|
40
|
-
####
|
|
41
|
-
-
|
|
42
|
-
-
|
|
40
|
+
#### Flowchart
|
|
41
|
+
- Main business logic flows
|
|
42
|
+
- User action → System response
|
|
43
43
|
|
|
44
|
-
### 3. Mermaid
|
|
44
|
+
### 3. Generate Mermaid Code
|
|
45
45
|
|
|
46
|
-
ASCII
|
|
46
|
+
Generate diagram as ASCII art or Mermaid code:
|
|
47
47
|
|
|
48
|
-
####
|
|
48
|
+
#### Architecture Diagram (Mermaid)
|
|
49
49
|
|
|
50
50
|
```mermaid
|
|
51
51
|
graph TB
|
|
@@ -80,46 +80,46 @@ erDiagram
|
|
|
80
80
|
}
|
|
81
81
|
```
|
|
82
82
|
|
|
83
|
-
####
|
|
83
|
+
#### Flowchart (Mermaid)
|
|
84
84
|
|
|
85
85
|
```mermaid
|
|
86
86
|
flowchart TD
|
|
87
|
-
Start([
|
|
88
|
-
GPS{GPS
|
|
89
|
-
Vision{Vision API
|
|
90
|
-
OCR{OCR
|
|
91
|
-
Save[
|
|
87
|
+
Start([User writes feed])
|
|
88
|
+
GPS{GPS Auth}
|
|
89
|
+
Vision{Vision API Verify}
|
|
90
|
+
OCR{OCR Auth}
|
|
91
|
+
Save[Save Feed]
|
|
92
92
|
|
|
93
93
|
Start --> GPS
|
|
94
|
-
GPS -->|50m
|
|
95
|
-
GPS
|
|
96
|
-
Vision
|
|
97
|
-
Vision
|
|
98
|
-
OCR
|
|
99
|
-
Save --> End([
|
|
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
100
|
```
|
|
101
101
|
|
|
102
|
-
### 4.
|
|
102
|
+
### 4. Rendering Guide
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
Guide on how to render generated Mermaid code:
|
|
105
105
|
|
|
106
|
-
- **GitHub**: `.md`
|
|
107
|
-
- **VSCode**: Mermaid
|
|
108
|
-
-
|
|
106
|
+
- **GitHub**: Paste in `.md` file (auto-renders)
|
|
107
|
+
- **VSCode**: Install Mermaid extension
|
|
108
|
+
- **Online**: https://mermaid.live/
|
|
109
109
|
|
|
110
110
|
## Example
|
|
111
111
|
|
|
112
112
|
```
|
|
113
113
|
User: /vibe.diagram --er
|
|
114
114
|
|
|
115
|
-
Claude: ERD
|
|
115
|
+
Claude: Generating ERD...
|
|
116
116
|
|
|
117
|
-
|
|
118
|
-
-
|
|
119
|
-
-
|
|
120
|
-
-
|
|
117
|
+
Analyzing project...
|
|
118
|
+
- Database schema found: backend/models/
|
|
119
|
+
- Tables: 15
|
|
120
|
+
- Key relationships: USER, FEED, RESTAURANT
|
|
121
121
|
|
|
122
|
-
✅ ERD
|
|
122
|
+
✅ ERD generation complete!
|
|
123
123
|
|
|
124
124
|
```mermaid
|
|
125
125
|
erDiagram
|
|
@@ -158,20 +158,20 @@ erDiagram
|
|
|
158
158
|
}
|
|
159
159
|
```
|
|
160
160
|
|
|
161
|
-
|
|
161
|
+
**Diagram save location:**
|
|
162
162
|
.vibe/diagrams/erd-2025-11-17.md
|
|
163
163
|
|
|
164
|
-
|
|
165
|
-
1. GitHub
|
|
166
|
-
2.
|
|
167
|
-
3. https://mermaid.live/
|
|
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
168
|
```
|
|
169
169
|
|
|
170
170
|
## Notes
|
|
171
171
|
|
|
172
|
-
- Mermaid
|
|
173
|
-
-
|
|
174
|
-
-
|
|
172
|
+
- Mermaid is supported in GitHub, GitLab, VSCode, etc.
|
|
173
|
+
- Complex diagrams may need manual adjustments
|
|
174
|
+
- Generated diagrams are saved in `.vibe/diagrams/` folder
|
|
175
175
|
|
|
176
176
|
---
|
|
177
177
|
|