@su-record/vibe 2.0.11 → 2.2.1

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 (60) hide show
  1. package/.claude/settings.json +1 -1
  2. package/.claude/settings.local.json +5 -1
  3. package/{.vibe → .claude/vibe}/rules/quality/bdd-contract-testing.md +1 -1
  4. package/{.vibe → .claude/vibe}/setup.sh +1 -1
  5. package/CLAUDE.md +16 -6
  6. package/README.md +33 -15
  7. package/dist/cli/index.d.ts.map +1 -1
  8. package/dist/cli/index.js +100 -56
  9. package/dist/cli/index.js.map +1 -1
  10. package/dist/tools/reasoning/applyReasoningFramework.js +1 -1
  11. package/package.json +1 -2
  12. package/templates/feature-template.md +1 -1
  13. package/.claude/agents/explorer.md +0 -48
  14. package/.claude/agents/implementer.md +0 -53
  15. package/.claude/agents/research/best-practices-agent.md +0 -139
  16. package/.claude/agents/research/codebase-patterns-agent.md +0 -147
  17. package/.claude/agents/research/framework-docs-agent.md +0 -181
  18. package/.claude/agents/research/security-advisory-agent.md +0 -167
  19. package/.claude/agents/review/architecture-reviewer.md +0 -107
  20. package/.claude/agents/review/complexity-reviewer.md +0 -116
  21. package/.claude/agents/review/data-integrity-reviewer.md +0 -88
  22. package/.claude/agents/review/git-history-reviewer.md +0 -103
  23. package/.claude/agents/review/performance-reviewer.md +0 -86
  24. package/.claude/agents/review/python-reviewer.md +0 -152
  25. package/.claude/agents/review/rails-reviewer.md +0 -139
  26. package/.claude/agents/review/react-reviewer.md +0 -144
  27. package/.claude/agents/review/security-reviewer.md +0 -80
  28. package/.claude/agents/review/simplicity-reviewer.md +0 -140
  29. package/.claude/agents/review/test-coverage-reviewer.md +0 -116
  30. package/.claude/agents/review/typescript-reviewer.md +0 -127
  31. package/.claude/agents/searcher.md +0 -54
  32. package/.claude/agents/simplifier.md +0 -119
  33. package/.claude/agents/tester.md +0 -49
  34. package/.claude/commands/vibe.analyze.md +0 -239
  35. package/.claude/commands/vibe.compound.md +0 -261
  36. package/.claude/commands/vibe.continue.md +0 -88
  37. package/.claude/commands/vibe.diagram.md +0 -178
  38. package/.claude/commands/vibe.e2e.md +0 -266
  39. package/.claude/commands/vibe.reason.md +0 -306
  40. package/.claude/commands/vibe.review.md +0 -324
  41. package/.claude/commands/vibe.run.md +0 -760
  42. package/.claude/commands/vibe.spec.md +0 -383
  43. package/.claude/commands/vibe.tool.md +0 -153
  44. package/.claude/commands/vibe.ui.md +0 -137
  45. package/.claude/commands/vibe.verify.md +0 -238
  46. package/.claude/skills/git-worktree.md +0 -178
  47. package/.claude/skills/priority-todos.md +0 -236
  48. /package/{.vibe → .claude/vibe}/config.json +0 -0
  49. /package/{.vibe → .claude/vibe}/constitution.md +0 -0
  50. /package/{.vibe → .claude/vibe}/rules/core/communication-guide.md +0 -0
  51. /package/{.vibe → .claude/vibe}/rules/core/development-philosophy.md +0 -0
  52. /package/{.vibe → .claude/vibe}/rules/core/quick-start.md +0 -0
  53. /package/{.vibe → .claude/vibe}/rules/quality/checklist.md +0 -0
  54. /package/{.vibe → .claude/vibe}/rules/quality/testing-strategy.md +0 -0
  55. /package/{.vibe → .claude/vibe}/rules/standards/anti-patterns.md +0 -0
  56. /package/{.vibe → .claude/vibe}/rules/standards/code-structure.md +0 -0
  57. /package/{.vibe → .claude/vibe}/rules/standards/complexity-metrics.md +0 -0
  58. /package/{.vibe → .claude/vibe}/rules/standards/naming-conventions.md +0 -0
  59. /package/{.vibe → .claude/vibe}/rules/tools/mcp-hi-ai-guide.md +0 -0
  60. /package/{.vibe → .claude/vibe}/rules/tools/mcp-workflow.md +0 -0
@@ -1,239 +0,0 @@
1
- ---
2
- description: Analyze project or specific feature/module
3
- argument-hint: "feature-name" or --code or --deps or --arch (optional)
4
- ---
5
-
6
- # /vibe.analyze
7
-
8
- Analyze project or specific feature/module.
9
-
10
- ## Usage
11
-
12
- ```
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
- ```
19
-
20
- ## ⚠️ Context Reset
21
-
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
-
26
- ---
27
-
28
- ## Mode 1: Feature/Module Analysis (`/vibe.analyze "feature-name"`)
29
-
30
- ### Goal
31
-
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
-
37
- ### Process
38
-
39
- #### 1. Request Analysis
40
-
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
-
46
- #### 2. Understand Project Structure
47
-
48
- Read `CLAUDE.md`, `package.json`, `pyproject.toml`, etc. to identify tech stack:
49
-
50
- **Backend:**
51
- - FastAPI/Django: `app/api/`, `app/services/`, `app/models/`
52
- - Express/NestJS: `src/controllers/`, `src/services/`, `src/models/`
53
-
54
- **Frontend:**
55
- - React/Next.js: `src/components/`, `src/pages/`, `src/hooks/`
56
- - Flutter: `lib/screens/`, `lib/services/`, `lib/providers/`
57
-
58
- #### 3. Explore Related Code
59
-
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
-
66
- #### 4. Flow Analysis
67
-
68
- **API Flow:**
69
- - Endpoint URL and HTTP method
70
- - Request/response schema
71
- - Authentication/authorization requirements
72
-
73
- **Business Logic:**
74
- - Core methods and roles
75
- - Validation rules
76
- - External service integrations
77
-
78
- **Data Flow:**
79
- - Related tables/models
80
- - Relationships (1:N, N:M)
81
- - Key query patterns
82
-
83
- #### 5. Output Analysis Results
84
-
85
- ```markdown
86
- ## 📊 [feature-name] Analysis Results
87
-
88
- ### Overview
89
- - **Feature description**: [one-line summary]
90
- - **Implementation status**: [Complete/In progress/Not implemented]
91
- - **Related files**: N files
92
-
93
- ### Structure
94
-
95
- #### API Endpoints
96
- | Method | Path | Description | Auth |
97
- |--------|------|-------------|------|
98
- | POST | /api/v1/auth/login | Login | - |
99
-
100
- #### Core Services
101
- - `auth_service.py`: Authentication logic
102
- - `login()`: Login processing
103
- - `verify_token()`: Token verification
104
-
105
- #### Data Models
106
- - `User`: User table
107
- - Key fields: id, email, password_hash
108
- - Relationships: Session (1:N)
109
-
110
- ### Flow Diagram
111
- [Text-based flow description]
112
-
113
- ### Reference File List
114
- - src/api/auth/router.py:L10-50
115
- - src/services/auth_service.py:L1-100
116
- ```
117
-
118
- #### 6. Check Development Rules
119
-
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
-
125
- Output any rule violations found.
126
-
127
- #### 7. Complete
128
-
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
-
134
- ---
135
-
136
- ## Mode 2: Project Quality Analysis (no option or --code/--deps/--arch)
137
-
138
- ### Analysis Scope
139
-
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
-
145
- ### MCP Tool Usage
146
-
147
- Based on `@su-record/hi-ai`:
148
-
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
-
154
- #### Dependency Analysis (--deps)
155
- - Read `package.json` / `pyproject.toml` / `pubspec.yaml`
156
- - Analyze version conflicts, security vulnerabilities, packages needing updates
157
-
158
- #### Architecture Analysis (--arch)
159
- - `find_symbol`: Find core modules
160
- - `find_references`: Identify module dependencies
161
- - Detect circular dependencies, layer violations
162
-
163
- ### Analysis Report
164
-
165
- `.vibe/reports/analysis-{date}.md`:
166
-
167
- ```markdown
168
- # Project Analysis Report
169
-
170
- ## Overview
171
- - Analysis date: 2025-01-06 12:00
172
- - Analysis scope: Full
173
-
174
- ## Code Quality (85/100)
175
- - Average complexity: 8.2 (good)
176
- - High complexity files: 3
177
-
178
- ## Dependencies (92/100)
179
- - Total packages: 42
180
- - Updates needed: 3
181
-
182
- ## Architecture (78/100)
183
- - Circular dependencies: 2 found
184
- - Layer violations: 1
185
-
186
- ## Improvement Suggestions
187
- 1. Refactor service.py
188
- 2. Apply lodash security patch
189
- ```
190
-
191
- ---
192
-
193
- ## Example
194
-
195
- ### Feature Analysis
196
- ```
197
- User: /vibe.analyze "login"
198
-
199
- Claude: Analyzing login related code...
200
-
201
- [Exploring code with Glob, Grep, Read tools]
202
-
203
- 📊 Login Analysis Results
204
-
205
- ### Overview
206
- - Feature description: JWT-based user authentication
207
- - Implementation status: Complete
208
- - Related files: 8
209
-
210
- ### API Endpoints
211
- | POST | /api/v1/auth/login | Login | - |
212
- | POST | /api/v1/auth/refresh | Token refresh | Required |
213
-
214
- [Analysis continues...]
215
-
216
- What would you like me to help with?
217
- - Refactoring
218
- - Add new feature
219
- - Bug fix
220
- ```
221
-
222
- ### Quality Analysis
223
- ```
224
- User: /vibe.analyze --code
225
-
226
- Claude: Starting code quality analysis...
227
-
228
- 📊 Code Quality Score: 85/100 (B+)
229
-
230
- **Key findings:**
231
- - High complexity: src/service.py (CC: 15)
232
-
233
- **Improvement suggestions:**
234
- 1. Split src/service.py into 3 modules
235
- ```
236
-
237
- ---
238
-
239
- ARGUMENTS: $ARGUMENTS
@@ -1,261 +0,0 @@
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
- .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 `.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
- │ 📄 .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: .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 .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": ".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
- .vibe/solutions/
253
-
254
-
255
- Future problem?
256
- Auto-suggest!
257
- ```
258
-
259
- ---
260
-
261
- ARGUMENTS: $ARGUMENTS
@@ -1,88 +0,0 @@
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
- ```