@su-record/vibe 0.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.
Files changed (88) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +448 -0
  3. package/agents/backend-python-expert.md +453 -0
  4. package/agents/database-postgres-expert.md +538 -0
  5. package/agents/frontend-flutter-expert.md +487 -0
  6. package/agents/frontend-react-expert.md +424 -0
  7. package/agents/quality-reviewer.md +542 -0
  8. package/agents/specification-agent.md +505 -0
  9. package/bin/sutory +332 -0
  10. package/bin/vibe +338 -0
  11. package/mcp/dist/__tests__/complexity.test.js +126 -0
  12. package/mcp/dist/__tests__/memory.test.js +120 -0
  13. package/mcp/dist/__tests__/python-dart-complexity.test.js +146 -0
  14. package/mcp/dist/index.js +230 -0
  15. package/mcp/dist/lib/ContextCompressor.js +305 -0
  16. package/mcp/dist/lib/MemoryManager.js +334 -0
  17. package/mcp/dist/lib/ProjectCache.js +126 -0
  18. package/mcp/dist/lib/PythonParser.js +241 -0
  19. package/mcp/dist/tools/browser/browserPool.js +76 -0
  20. package/mcp/dist/tools/browser/browserUtils.js +135 -0
  21. package/mcp/dist/tools/browser/inspectNetworkRequests.js +140 -0
  22. package/mcp/dist/tools/browser/monitorConsoleLogs.js +97 -0
  23. package/mcp/dist/tools/convention/analyzeComplexity.js +248 -0
  24. package/mcp/dist/tools/convention/applyQualityRules.js +102 -0
  25. package/mcp/dist/tools/convention/checkCouplingCohesion.js +233 -0
  26. package/mcp/dist/tools/convention/complexityMetrics.js +133 -0
  27. package/mcp/dist/tools/convention/dartComplexity.js +117 -0
  28. package/mcp/dist/tools/convention/getCodingGuide.js +64 -0
  29. package/mcp/dist/tools/convention/languageDetector.js +50 -0
  30. package/mcp/dist/tools/convention/pythonComplexity.js +109 -0
  31. package/mcp/dist/tools/convention/suggestImprovements.js +257 -0
  32. package/mcp/dist/tools/convention/validateCodeQuality.js +177 -0
  33. package/mcp/dist/tools/memory/autoSaveContext.js +79 -0
  34. package/mcp/dist/tools/memory/database.js +123 -0
  35. package/mcp/dist/tools/memory/deleteMemory.js +39 -0
  36. package/mcp/dist/tools/memory/listMemories.js +38 -0
  37. package/mcp/dist/tools/memory/memoryConfig.js +27 -0
  38. package/mcp/dist/tools/memory/memorySQLite.js +138 -0
  39. package/mcp/dist/tools/memory/memoryUtils.js +34 -0
  40. package/mcp/dist/tools/memory/migrate.js +113 -0
  41. package/mcp/dist/tools/memory/prioritizeMemory.js +109 -0
  42. package/mcp/dist/tools/memory/recallMemory.js +40 -0
  43. package/mcp/dist/tools/memory/restoreSessionContext.js +69 -0
  44. package/mcp/dist/tools/memory/saveMemory.js +34 -0
  45. package/mcp/dist/tools/memory/searchMemories.js +37 -0
  46. package/mcp/dist/tools/memory/startSession.js +100 -0
  47. package/mcp/dist/tools/memory/updateMemory.js +46 -0
  48. package/mcp/dist/tools/planning/analyzeRequirements.js +166 -0
  49. package/mcp/dist/tools/planning/createUserStories.js +119 -0
  50. package/mcp/dist/tools/planning/featureRoadmap.js +202 -0
  51. package/mcp/dist/tools/planning/generatePrd.js +156 -0
  52. package/mcp/dist/tools/prompt/analyzePrompt.js +145 -0
  53. package/mcp/dist/tools/prompt/enhancePrompt.js +105 -0
  54. package/mcp/dist/tools/semantic/findReferences.js +195 -0
  55. package/mcp/dist/tools/semantic/findSymbol.js +200 -0
  56. package/mcp/dist/tools/thinking/analyzeProblem.js +50 -0
  57. package/mcp/dist/tools/thinking/breakDownProblem.js +140 -0
  58. package/mcp/dist/tools/thinking/createThinkingChain.js +39 -0
  59. package/mcp/dist/tools/thinking/formatAsPlan.js +73 -0
  60. package/mcp/dist/tools/thinking/stepByStepAnalysis.js +58 -0
  61. package/mcp/dist/tools/thinking/thinkAloudProcess.js +75 -0
  62. package/mcp/dist/tools/time/getCurrentTime.js +61 -0
  63. package/mcp/dist/tools/ui/previewUiAscii.js +232 -0
  64. package/mcp/dist/types/tool.js +2 -0
  65. package/mcp/package.json +53 -0
  66. package/package.json +49 -0
  67. package/scripts/install-mcp.js +48 -0
  68. package/scripts/install.sh +70 -0
  69. package/skills/core/communication-guide.md +104 -0
  70. package/skills/core/development-philosophy.md +53 -0
  71. package/skills/core/quick-start.md +121 -0
  72. package/skills/languages/dart-flutter.md +509 -0
  73. package/skills/languages/python-fastapi.md +386 -0
  74. package/skills/languages/typescript-nextjs.md +441 -0
  75. package/skills/languages/typescript-react-native.md +446 -0
  76. package/skills/languages/typescript-react.md +525 -0
  77. package/skills/quality/checklist.md +276 -0
  78. package/skills/quality/testing-strategy.md +437 -0
  79. package/skills/standards/anti-patterns.md +369 -0
  80. package/skills/standards/code-structure.md +291 -0
  81. package/skills/standards/complexity-metrics.md +312 -0
  82. package/skills/standards/naming-conventions.md +198 -0
  83. package/skills/tools/mcp-hi-ai-guide.md +665 -0
  84. package/skills/tools/mcp-workflow.md +51 -0
  85. package/templates/constitution-template.md +193 -0
  86. package/templates/plan-template.md +237 -0
  87. package/templates/spec-template.md +142 -0
  88. package/templates/tasks-template.md +132 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 grove
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,448 @@
1
+ # Vibe
2
+
3
+ **SPEC-driven AI coding framework with integrated MCP tooling**
4
+
5
+ Transform natural language requirements into production-ready code through structured specification, planning, and task decomposition.
6
+
7
+ [![npm version](https://img.shields.io/npm/v/@su-record/vibe.svg)](https://www.npmjs.com/package/@su-record/vibe)
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
9
+
10
+ ---
11
+
12
+ ## Features
13
+
14
+ - **SPEC-driven Development**: Structured Q&A process using EARS (Easy Approach to Requirements Syntax)
15
+ - **Automated Planning**: Generate technical implementation plans with architecture, cost analysis, and timeline
16
+ - **Task Decomposition**: Break down features into phase-based, dependency-aware tasks
17
+ - **MCP Integration**: 38 built-in tools for code analysis, quality validation, and project insights
18
+ - **Multi-language Support**: English and Korean interface
19
+ - **AI Agent System**: 7 specialized agents for different tech stacks
20
+
21
+ ---
22
+
23
+ ## Installation
24
+
25
+ ```bash
26
+ npm install -g @su-record/vibe
27
+ ```
28
+
29
+ This automatically:
30
+ - Installs the Vibe CLI
31
+ - Registers the MCP server with 38 development tools
32
+ - Enables slash commands for Claude Code
33
+
34
+ ---
35
+
36
+ ## Quick Start
37
+
38
+ ```bash
39
+ # Initialize project
40
+ vibe init
41
+
42
+ # Create specification through guided Q&A
43
+ vibe spec "push notification settings"
44
+
45
+ # Generate technical plan
46
+ vibe plan "push notification settings"
47
+
48
+ # Decompose into tasks
49
+ vibe tasks "push notification settings"
50
+
51
+ # Implement tasks
52
+ vibe run "Task 1-1"
53
+
54
+ # Verify implementation
55
+ vibe verify "push notification settings"
56
+ ```
57
+
58
+ ---
59
+
60
+ ## Command Reference
61
+
62
+ ### Core Workflow Commands
63
+
64
+ | Command | Description | Example |
65
+ |---------|-------------|---------|
66
+ | `vibe init` | Initialize Vibe in current project | `vibe init` |
67
+ | `vibe spec <name>` | Create SPEC through 6-question Q&A | `vibe spec "user authentication"` |
68
+ | `vibe plan <name>` | Generate technical implementation plan | `vibe plan "user authentication"` |
69
+ | `vibe tasks <name>` | Break down into executable tasks | `vibe tasks "user authentication"` |
70
+ | `vibe run <task>` | Execute specific task with auto-generated guide | `vibe run "Task 1-1"` |
71
+ | `vibe run --phase <N>` | Execute all tasks in phase N | `vibe run --phase 1` |
72
+ | `vibe run --all` | Execute all tasks sequentially | `vibe run --all` |
73
+ | `vibe verify <name>` | Verify implementation against SPEC | `vibe verify "user authentication"` |
74
+
75
+ ### Analysis & Tools
76
+
77
+ | Command | Description | Example |
78
+ |---------|-------------|---------|
79
+ | `vibe analyze` | Comprehensive project analysis | `vibe analyze` |
80
+ | `vibe analyze --code` | Code quality and complexity analysis | `vibe analyze --code` |
81
+ | `vibe analyze --deps` | Dependency and security audit | `vibe analyze --deps` |
82
+ | `vibe analyze --arch` | Architecture and coupling analysis | `vibe analyze --arch` |
83
+ | `vibe ui <description>` | Generate ASCII UI mockup | `vibe ui "login form"` |
84
+ | `vibe diagram` | Generate architecture diagram (Mermaid) | `vibe diagram` |
85
+ | `vibe diagram --er` | Generate ERD diagram | `vibe diagram --er` |
86
+ | `vibe diagram --flow` | Generate flowchart | `vibe diagram --flow` |
87
+
88
+ ### Utility Commands
89
+
90
+ | Command | Description |
91
+ |---------|-------------|
92
+ | `vibe agents` | List available AI agents |
93
+ | `vibe skills` | List installed skill modules |
94
+ | `vibe help` | Show command help |
95
+
96
+ ---
97
+
98
+ ## Slash Commands (Claude Code)
99
+
100
+ Use these commands directly in Claude Code:
101
+
102
+ | Command | Description |
103
+ |---------|-------------|
104
+ | `/vibe.spec "feature"` | Create specification |
105
+ | `/vibe.plan "feature"` | Generate plan |
106
+ | `/vibe.tasks "feature"` | Generate tasks |
107
+ | `/vibe.run "Task 1-1"` | Execute task |
108
+ | `/vibe.verify "feature"` | Verify implementation |
109
+ | `/vibe.analyze` | Analyze project |
110
+ | `/vibe.ui "description"` | Preview UI |
111
+ | `/vibe.diagram --er` | Generate diagram |
112
+
113
+ ---
114
+
115
+ ## Project Structure
116
+
117
+ ```
118
+ your-project/
119
+ ├── .vibe/
120
+ │ ├── config.json # Configuration (language, agents, MCP)
121
+ │ ├── constitution.md # Project development principles
122
+ │ ├── specs/ # SPEC documents (EARS format)
123
+ │ ├── plans/ # Technical implementation plans
124
+ │ ├── tasks/ # Phase-based task breakdowns
125
+ │ ├── guides/ # Auto-generated implementation guides
126
+ │ ├── reports/ # Analysis and verification reports
127
+ │ └── diagrams/ # Generated diagrams (Mermaid)
128
+ └── CLAUDE.md # Tech stack documentation (recommended)
129
+ ```
130
+
131
+ ---
132
+
133
+ ## MCP Integration
134
+
135
+ Vibe includes 38 MCP tools across multiple categories:
136
+
137
+ ### Code Analysis
138
+ - `analyze_complexity` - Cyclomatic and cognitive complexity metrics
139
+ - `validate_code_quality` - Code quality scoring and recommendations
140
+ - `check_coupling_cohesion` - Module coupling and cohesion analysis
141
+
142
+ ### Project Intelligence
143
+ - `find_symbol` - Locate function/class definitions
144
+ - `find_references` - Find all usages of symbols
145
+
146
+ ### Thinking & Planning
147
+ - `create_thinking_chain` - Generate step-by-step reasoning
148
+ - `step_by_step_analysis` - Detailed problem breakdown
149
+ - `analyze_problem` - Structured problem analysis
150
+
151
+ ### Quality & Standards
152
+ - `apply_quality_rules` - Apply coding standards
153
+ - `suggest_improvements` - Code improvement recommendations
154
+
155
+ ### UI & Design
156
+ - `preview_ui_ascii` - Generate ASCII UI mockups
157
+
158
+ ### Memory & Context
159
+ - `save_memory` - Store project context
160
+ - `recall_memory` - Retrieve stored information
161
+ - `auto_save_context` - Automatic context checkpointing
162
+
163
+ **Verify MCP server:**
164
+ ```bash
165
+ claude mcp list
166
+ # vibe: node /path/to/vibe/mcp/dist/index.js - ✓ Connected
167
+ ```
168
+
169
+ ---
170
+
171
+ ## Configuration
172
+
173
+ ### .vibe/config.json
174
+
175
+ ```json
176
+ {
177
+ "language": "ko",
178
+ "agents": {
179
+ "default": "backend-python-expert"
180
+ },
181
+ "mcp": {
182
+ "enabled": true,
183
+ "servers": ["vibe"]
184
+ }
185
+ }
186
+ ```
187
+
188
+ ### CLAUDE.md (Recommended)
189
+
190
+ Place this file in your project root to enable automatic tech stack detection:
191
+
192
+ ```markdown
193
+ # CLAUDE.md
194
+
195
+ ## Tech Stack
196
+
197
+ ### Backend
198
+ - Framework: FastAPI 0.104+
199
+ - Database: PostgreSQL 17
200
+ - Cache: Redis 7.2
201
+
202
+ ### Frontend
203
+ - Framework: Flutter 3.24+
204
+ - State Management: Provider
205
+ ```
206
+
207
+ ---
208
+
209
+ ## Specification Format
210
+
211
+ Vibe uses EARS (Easy Approach to Requirements Syntax):
212
+
213
+ ```markdown
214
+ # SPEC: Feature Name
215
+
216
+ ## Metadata
217
+ - Created: 2025-01-17
218
+ - Priority: HIGH
219
+ - Language: en
220
+
221
+ ## Requirements
222
+
223
+ ### REQ-001: Requirement Title
224
+ **WHEN** user performs action X
225
+ **THEN** system SHALL perform Y
226
+
227
+ #### Acceptance Criteria
228
+ - [ ] Criterion 1
229
+ - [ ] Criterion 2
230
+ - [ ] Criterion 3
231
+
232
+ ### REQ-002: Another Requirement
233
+ **WHERE** condition A exists
234
+ **AND** condition B is true
235
+ **THEN** system SHALL perform Z
236
+ ```
237
+
238
+ ---
239
+
240
+ ## AI Agents
241
+
242
+ | Agent | Specialization | Tech Stack |
243
+ |-------|----------------|------------|
244
+ | Specification Agent | Requirements gathering through 6-question framework | Language-agnostic |
245
+ | Planning Agent | Technical architecture and cost analysis | Cross-stack |
246
+ | Task Agent | Phase-based task decomposition | Cross-stack |
247
+ | Backend Python Expert | Python/FastAPI implementation | Python 3.11+, FastAPI, SQLAlchemy |
248
+ | Frontend Flutter Expert | Flutter/Dart implementation | Flutter 3.24+, Dart 3.5+ |
249
+ | Frontend React Expert | React/Next.js implementation | React 18+, Next.js 14+ |
250
+ | Database PostgreSQL Expert | PostgreSQL/PostGIS design | PostgreSQL 17, PostGIS 3.4+ |
251
+ | Quality Reviewer | Code review and quality validation | Multi-language |
252
+
253
+ ---
254
+
255
+ ## Workflow Example
256
+
257
+ ### 1. Create Specification
258
+
259
+ ```bash
260
+ $ vibe spec "push notification settings"
261
+
262
+ Q1. Why: Reduce app churn from excessive notifications
263
+ Q2. Who: All users (100k+ DAU)
264
+ Q3. What: 6-category notification toggle system
265
+ Q4. How: P95 < 500ms, Redis caching, rate limiting
266
+ Q5. When: 3 days (24 hours development time)
267
+ Q6. With What: FastAPI + Flutter + PostgreSQL + FCM
268
+
269
+ ✅ Created: .vibe/specs/push-notification-settings.md
270
+ ```
271
+
272
+ ### 2. Generate Plan
273
+
274
+ ```bash
275
+ $ vibe plan "push notification settings"
276
+
277
+ ✅ Created: .vibe/plans/push-notification-settings.md
278
+
279
+ Summary:
280
+ - 3 Phases: Backend → Frontend → FCM Integration
281
+ - Timeline: 24 hours (3 days)
282
+ - Cost: +$0.50/month (Redis + FCM)
283
+ - Stack Reuse: 100% existing infrastructure
284
+ ```
285
+
286
+ ### 3. Decompose Tasks
287
+
288
+ ```bash
289
+ $ vibe tasks "push notification settings"
290
+
291
+ ✅ Created: .vibe/tasks/push-notification-settings.md
292
+
293
+ Task Breakdown:
294
+ - Total: 19 tasks
295
+ - Phase 1 (Backend): 8 tasks
296
+ - Phase 2 (Frontend): 8 tasks
297
+ - Phase 3 (FCM): 3 tasks
298
+ - Dependency graph included
299
+ ```
300
+
301
+ ### 4. Execute Tasks
302
+
303
+ ```bash
304
+ $ vibe run "Task 1-1"
305
+
306
+ Executing: Task 1-1 - Database Migration
307
+
308
+ Steps:
309
+ 1. Read task details from .vibe/tasks/push-notification-settings.md
310
+ 2. Generate implementation guide: .vibe/guides/task-1-1.md
311
+ 3. Execute: Create migration file with 6 columns
312
+ 4. Verify: Run `alembic upgrade head`
313
+ 5. Update status: ⬜ → ✅
314
+
315
+ ✅ Task 1-1 completed
316
+ ```
317
+
318
+ ### 5. Code Analysis
319
+
320
+ ```bash
321
+ $ vibe analyze --code
322
+
323
+ 📊 Code Quality Report
324
+
325
+ Overall Score: 85/100 (B+)
326
+
327
+ Findings:
328
+ - High complexity: src/service.py (CC: 15)
329
+ - Low cohesion: src/utils.py (0.3)
330
+ - Strong coupling: Controller ↔ Service (0.8)
331
+
332
+ Recommendations:
333
+ 1. Refactor src/service.py into 3 modules
334
+ 2. Apply Dependency Injection pattern
335
+ 3. Extract unrelated utilities from src/utils.py
336
+
337
+ Report saved: .vibe/reports/analysis-2025-11-17.md
338
+ ```
339
+
340
+ ### 6. UI Mockup
341
+
342
+ ```bash
343
+ $ vibe ui "login form with email, password, and submit button"
344
+
345
+ ┌─────────────────────────────────────────┐
346
+ │ Welcome Back │
347
+ ├─────────────────────────────────────────┤
348
+ │ │
349
+ │ ┌─────────────────────┐ │
350
+ │ Email: │ │ │
351
+ │ └─────────────────────┘ │
352
+ │ │
353
+ │ ┌─────────────────────┐ │
354
+ │ Pass: │ •••••••••••• │ │
355
+ │ └─────────────────────┘ │
356
+ │ │
357
+ │ ┌─────────────────────┐ │
358
+ │ │ Sign In │ │
359
+ │ └─────────────────────┘ │
360
+ │ │
361
+ └─────────────────────────────────────────┘
362
+
363
+ Required Components:
364
+ - Header.tsx (Welcome message)
365
+ - EmailInput.tsx (Email field)
366
+ - PasswordInput.tsx (Password field with masking)
367
+ - Button.tsx (Submit button)
368
+ - LoginForm.tsx (Form container)
369
+ ```
370
+
371
+ ---
372
+
373
+ ## Best Practices
374
+
375
+ ### 1. Document Your Tech Stack
376
+
377
+ Create `CLAUDE.md` in your project root to enable automatic tech stack detection and prevent technology drift.
378
+
379
+ ### 2. Execute Phase by Phase
380
+
381
+ Instead of `--all`, execute and verify each phase independently:
382
+
383
+ ```bash
384
+ vibe run --phase 1 # Backend development
385
+ # Verify, test, commit
386
+
387
+ vibe run --phase 2 # Frontend development
388
+ # Verify, test, commit
389
+
390
+ vibe run --phase 3 # Integration
391
+ # Verify, test, commit
392
+ ```
393
+
394
+ ### 3. Validate Acceptance Criteria
395
+
396
+ Each task includes acceptance criteria. Ensure all criteria pass before marking tasks complete.
397
+
398
+ ### 4. Leverage MCP Tools
399
+
400
+ Use analysis commands before refactoring:
401
+
402
+ ```bash
403
+ vibe analyze --code # Identify complexity hotspots
404
+ vibe analyze --deps # Check for outdated/vulnerable packages
405
+ vibe analyze --arch # Detect circular dependencies
406
+ ```
407
+
408
+ ---
409
+
410
+ ## Requirements
411
+
412
+ - **Node.js**: 18.0.0 or higher
413
+ - **npm**: 7.0.0 or higher
414
+ - **Claude Code**: Required for slash commands
415
+
416
+ ---
417
+
418
+ ## Contributing
419
+
420
+ Contributions are welcome! Please read our contributing guidelines before submitting pull requests.
421
+
422
+ ---
423
+
424
+ ## License
425
+
426
+ MIT License - see [LICENSE](LICENSE) file for details
427
+
428
+ ---
429
+
430
+ ## Links
431
+
432
+ - **Repository**: [github.com/su-record/vibe](https://github.com/su-record/vibe)
433
+ - **Issues**: [GitHub Issues](https://github.com/su-record/vibe/issues)
434
+ - **MCP Server**: [@su-record/hi-ai](https://github.com/su-record/hi-ai)
435
+ - **Documentation**: [Full Documentation](https://github.com/su-record/vibe/wiki)
436
+
437
+ ---
438
+
439
+ ## Support
440
+
441
+ For questions and support:
442
+ - Open an issue on GitHub
443
+ - Check the documentation wiki
444
+ - Review existing discussions
445
+
446
+ ---
447
+
448
+ **Built with ❤️ by the Vibe team**