@su-record/vibe 0.1.4 β†’ 0.2.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.
package/README.md CHANGED
@@ -15,6 +15,7 @@ Transform natural language requirements into production-ready code through struc
15
15
 
16
16
  - **Claude Code Optimized**: Built specifically for Claude Code with native slash commands and MCP integration
17
17
  - **SPEC-driven Development**: Structured Q&A process using EARS (Easy Approach to Requirements Syntax)
18
+ - **BDD + Contract Testing**: AI-optimized testing with Gherkin features and API contract validation (🚧 v0.2.0)
18
19
  - **Automated Planning**: Generate technical implementation plans with architecture, cost analysis, and timeline
19
20
  - **Task Decomposition**: Break down features into phase-based, dependency-aware tasks
20
21
  - **Powered by @su-record/hi-ai**: 38 MCP tools combining skills and hi-ai for code analysis, quality validation, and insights
@@ -30,87 +31,75 @@ npm install -g @su-record/vibe
30
31
  ```
31
32
 
32
33
  This installs:
33
- - Vibe CLI commands
34
+ - Vibe CLI (for initialization only)
34
35
  - @su-record/hi-ai MCP server (38 development tools)
36
+ - Agents, Skills, Templates for Claude Code
37
+
38
+ ⚠️ **Important**: Vibe is a **Claude Code-exclusive** framework. Terminal commands are limited to `init` only. All development commands are available as **slash commands** within Claude Code.
35
39
 
36
40
  ---
37
41
 
38
42
  ## Quick Start
39
43
 
44
+ ### 1. Initialize Project (Terminal)
45
+
40
46
  ```bash
41
- # Initialize project (registers MCP server for this project)
47
+ # Option 1: Initialize in existing project
42
48
  vibe init
43
49
 
44
- # Create specification through guided Q&A
45
- vibe spec "push notification settings"
50
+ # Option 2: Create new project
51
+ vibe init my-new-project
52
+ cd my-new-project
53
+ ```
46
54
 
47
- # Generate technical plan
48
- vibe plan "push notification settings"
55
+ This will:
56
+ - Register MCP server for the project directory
57
+ - Create `.vibe/` folder structure
58
+ - Install agents, skills, and templates
49
59
 
50
- # Decompose into tasks
51
- vibe tasks "push notification settings"
60
+ ### 2. Use Slash Commands (Claude Code)
52
61
 
53
- # Implement tasks
54
- vibe run "Task 1-1"
62
+ Open Claude Code in your project directory and use slash commands:
55
63
 
56
- # Verify implementation
57
- vibe verify "push notification settings"
64
+ ```
65
+ /vibe.spec "push notification settings"
66
+ /vibe.plan "push notification settings"
67
+ /vibe.tasks "push notification settings"
68
+ /vibe.run "Task 1-1"
69
+ /vibe.verify "push notification settings"
58
70
  ```
59
71
 
60
72
  ---
61
73
 
62
74
  ## Command Reference
63
75
 
64
- ### Core Workflow Commands
76
+ ### Terminal Commands (Initialization Only)
65
77
 
66
78
  | Command | Description | Example |
67
79
  |---------|-------------|---------|
68
80
  | `vibe init` | Initialize Vibe in current project | `vibe init` |
69
- | `vibe spec <name>` | Create SPEC through 6-question Q&A | `vibe spec "user authentication"` |
70
- | `vibe plan <name>` | Generate technical implementation plan | `vibe plan "user authentication"` |
71
- | `vibe tasks <name>` | Break down into executable tasks | `vibe tasks "user authentication"` |
72
- | `vibe run <task>` | Execute specific task with auto-generated guide | `vibe run "Task 1-1"` |
73
- | `vibe run --phase <N>` | Execute all tasks in phase N | `vibe run --phase 1` |
74
- | `vibe run --all` | Execute all tasks sequentially | `vibe run --all` |
75
- | `vibe verify <name>` | Verify implementation against SPEC | `vibe verify "user authentication"` |
81
+ | `vibe init <name>` | Create new project with Vibe | `vibe init my-app` |
82
+ | `vibe help` | Show help message | `vibe help` |
83
+
84
+ ### Claude Code Slash Commands (Development)
76
85
 
77
- ### Analysis & Tools
86
+ #### Core Workflow
78
87
 
79
88
  | Command | Description | Example |
80
89
  |---------|-------------|---------|
81
- | `vibe analyze` | Comprehensive project analysis | `vibe analyze` |
82
- | `vibe analyze --code` | Code quality and complexity analysis | `vibe analyze --code` |
83
- | `vibe analyze --deps` | Dependency and security audit | `vibe analyze --deps` |
84
- | `vibe analyze --arch` | Architecture and coupling analysis | `vibe analyze --arch` |
85
- | `vibe ui <description>` | Generate ASCII UI mockup | `vibe ui "login form"` |
86
- | `vibe diagram` | Generate architecture diagram (Mermaid) | `vibe diagram` |
87
- | `vibe diagram --er` | Generate ERD diagram | `vibe diagram --er` |
88
- | `vibe diagram --flow` | Generate flowchart | `vibe diagram --flow` |
89
-
90
- ### Utility Commands
91
-
92
- | Command | Description |
93
- |---------|-------------|
94
- | `vibe agents` | List available AI agents |
95
- | `vibe skills` | List installed skill modules |
96
- | `vibe help` | Show command help |
90
+ | `/vibe.spec <name>` | Create SPEC through natural conversation (auto-detects project type, suggests tech stack & design) | `/vibe.spec "user authentication"` |
91
+ | `/vibe.plan <name>` | Generate technical implementation plan | `/vibe.plan "user authentication"` |
92
+ | `/vibe.tasks <name>` | Break down into executable tasks | `/vibe.tasks "user authentication"` |
93
+ | `/vibe.run <task>` | Execute specific task with auto-generated guide | `/vibe.run "Task 1-1"` |
94
+ | `/vibe.verify <name>` | Verify implementation against SPEC | `/vibe.verify "user authentication"` |
97
95
 
98
- ---
99
-
100
- ## Slash Commands (Claude Code)
96
+ #### Analysis & Tools
101
97
 
102
- Use these commands directly in Claude Code:
103
-
104
- | Command | Description |
105
- |---------|-------------|
106
- | `/vibe.spec "feature"` | Create specification |
107
- | `/vibe.plan "feature"` | Generate plan |
108
- | `/vibe.tasks "feature"` | Generate tasks |
109
- | `/vibe.run "Task 1-1"` | Execute task |
110
- | `/vibe.verify "feature"` | Verify implementation |
111
- | `/vibe.analyze` | Analyze project |
112
- | `/vibe.ui "description"` | Preview UI |
113
- | `/vibe.diagram --er` | Generate diagram |
98
+ | Command | Description | Example |
99
+ |---------|-------------|---------|
100
+ | `/vibe.analyze` | Comprehensive project analysis | `/vibe.analyze` |
101
+ | `/vibe.ui <description>` | Generate ASCII UI mockup | `/vibe.ui "login form"` |
102
+ | `/vibe.diagram --er` | Generate diagrams (architecture, ERD, flow) | `/vibe.diagram --er` |
114
103
 
115
104
  ---
116
105
 
@@ -246,71 +235,145 @@ Vibe uses EARS (Easy Approach to Requirements Syntax):
246
235
 
247
236
  ## Workflow Example
248
237
 
249
- ### 1. Create Specification
238
+ ### 1. Initialize Project (Terminal)
250
239
 
251
240
  ```bash
252
- $ vibe spec "push notification settings"
241
+ $ vibe init
242
+ πŸ”§ MCP μ„œλ²„ 확인 쀑...
243
+ βœ… vibe MCP μ„œλ²„ 등둝 μ™„λ£Œ
244
+ βœ… vibe μ΄ˆκΈ°ν™” μ™„λ£Œ!
245
+
246
+ μƒμ„±λœ ꡬ쑰:
247
+ .vibe/
248
+ β”œβ”€β”€ config.json
249
+ β”œβ”€β”€ constitution.md
250
+ β”œβ”€β”€ specs/ # SPEC documents (EARS format)
251
+ β”œβ”€β”€ features/ # BDD Feature files (Gherkin)
252
+ β”œβ”€β”€ plans/ # Technical plans
253
+ └── tasks/ # Task breakdowns
254
+ ```
255
+
256
+ ### 2. Create Specification (Claude Code)
253
257
 
254
- Q1. Why: Reduce app churn from excessive notifications
255
- Q2. Who: All users (100k+ DAU)
256
- Q3. What: 6-category notification toggle system
257
- Q4. How: P95 < 500ms, Redis caching, rate limiting
258
- Q5. When: 3 days (24 hours development time)
259
- Q6. With What: FastAPI + Flutter + PostgreSQL + FCM
258
+ **Note**: Examples shown in English. Claude responds in the language set in `.vibe/config.json` (default: Korean).
260
259
 
261
- βœ… Created: .vibe/specs/push-notification-settings.md
262
260
  ```
261
+ User: /vibe.spec "push notification settings"
263
262
 
264
- ### 2. Generate Plan
263
+ Claude (Specification Agent):
264
+ [Analyzing source code]
265
+ - Backend: Python (FastAPI)
266
+ - Frontend: Flutter 3.24+
267
+ - Database: PostgreSQL 17
265
268
 
266
- ```bash
267
- $ vibe plan "push notification settings"
269
+ Existing project detected! Is this tech stack correct?
270
+
271
+ User: Yes
272
+
273
+ Claude:
274
+ What types of notifications do you want to manage?
275
+
276
+ User: Comments, likes, follows, announcements, events, marketing
277
+
278
+ Claude:
279
+ Do you need just ON/OFF toggle for each category, or detailed settings too?
280
+
281
+ 1. ON/OFF only
282
+ 2. Detailed settings (time, frequency, etc.)
283
+ 3. Both
284
+
285
+ Or you can describe directly.
286
+
287
+ User: 1
288
+
289
+ Claude:
290
+ Which push notification service would you like to use?
291
+
292
+ 1. Firebase Cloud Messaging (FCM) - Free, easy Flutter integration
293
+ 2. OneSignal - Multi-platform, dashboard
294
+ 3. Custom implementation
295
+
296
+ Or you can describe directly.
297
+
298
+ User: We're already using FCM
299
+
300
+ Claude:
301
+ Great! Which design reference would you like to follow?
302
+
303
+ 1. iOS Settings > Notifications (toggle + grouping)
304
+ 2. Slack notification settings (category-based)
305
+ 3. Twitter notification settings (simple list)
306
+
307
+ Or you can describe directly.
308
+
309
+ User: 1
310
+
311
+ ...
312
+
313
+ βœ… SPEC document created!
314
+ πŸ“„ .vibe/specs/push-notification-settings.md
315
+ πŸ“„ .vibe/features/push-notification-settings.feature (BDD scenarios)
316
+ ```
317
+
318
+ ### 3. Generate Plan (Claude Code)
319
+
320
+ ```
321
+ User: /vibe.plan "push notification settings"
322
+
323
+ Claude (Planning Agent):
324
+ SPEC을 λΆ„μ„ν•˜μ—¬ 기술 κ³„νšμ„ μž‘μ„±ν•˜κ² μŠ΅λ‹ˆλ‹€.
268
325
 
269
- βœ… Created: .vibe/plans/push-notification-settings.md
326
+ βœ… PLAN λ¬Έμ„œ μž‘μ„± μ™„λ£Œ!
327
+ πŸ“„ .vibe/plans/push-notification-settings.md
270
328
 
271
329
  Summary:
272
330
  - 3 Phases: Backend β†’ Frontend β†’ FCM Integration
273
- - Timeline: 24 hours (3 days)
331
+ - Timeline: 28 hours (3.5 days)
274
332
  - Cost: +$0.50/month (Redis + FCM)
275
- - Stack Reuse: 100% existing infrastructure
333
+ - Testing: BDD (pytest-bdd) + Contract Testing (Pact)
276
334
  ```
277
335
 
278
- ### 3. Decompose Tasks
336
+ ### 4. Decompose Tasks (Claude Code)
279
337
 
280
- ```bash
281
- $ vibe tasks "push notification settings"
338
+ ```
339
+ User: /vibe.tasks "push notification settings"
340
+
341
+ Claude (Task Agent):
342
+ PLAN을 기반으둜 Taskλ₯Ό μƒμ„±ν•˜κ² μŠ΅λ‹ˆλ‹€.
282
343
 
283
- βœ… Created: .vibe/tasks/push-notification-settings.md
344
+ βœ… TASKS λ¬Έμ„œ μž‘μ„± μ™„λ£Œ!
345
+ πŸ“„ .vibe/tasks/push-notification-settings.md
284
346
 
285
347
  Task Breakdown:
286
- - Total: 19 tasks
287
- - Phase 1 (Backend): 8 tasks
288
- - Phase 2 (Frontend): 8 tasks
289
- - Phase 3 (FCM): 3 tasks
290
- - Dependency graph included
348
+ - Total: 23 tasks
349
+ - Phase 1 (Backend): 9 tasks (includes Contract Provider)
350
+ - Phase 2 (Frontend): 9 tasks (includes Contract Consumer)
351
+ - Phase 3 (Integration): 5 tasks (includes BDD Steps + Contract Verification)
291
352
  ```
292
353
 
293
- ### 4. Execute Tasks
354
+ ### 5. Execute Tasks (Claude Code)
294
355
 
295
- ```bash
296
- $ vibe run "Task 1-1"
356
+ ```
357
+ User: /vibe.run "Task 1-1"
297
358
 
298
- Executing: Task 1-1 - Database Migration
359
+ Claude:
360
+ Task 1-1 - Database Migration을 μ‹€ν–‰ν•˜κ² μŠ΅λ‹ˆλ‹€.
299
361
 
300
- Steps:
301
- 1. Read task details from .vibe/tasks/push-notification-settings.md
302
- 2. Generate implementation guide: .vibe/guides/task-1-1.md
303
- 3. Execute: Create migration file with 6 columns
304
- 4. Verify: Run `alembic upgrade head`
305
- 5. Update status: ⬜ β†’ βœ…
362
+ 1. κ΅¬ν˜„ κ°€μ΄λ“œ 생성 (.vibe/guides/task-1-1.md)
363
+ 2. Migration 파일 생성
364
+ 3. Acceptance Criteria 검증
365
+ 4. Task μƒνƒœ μ—…λ°μ΄νŠΈ
306
366
 
307
367
  βœ… Task 1-1 completed
308
368
  ```
309
369
 
310
- ### 5. Code Analysis
370
+ ### 6. Code Analysis (Claude Code)
311
371
 
312
- ```bash
313
- $ vibe analyze --code
372
+ ```
373
+ User: /vibe.analyze
374
+
375
+ Claude:
376
+ ν”„λ‘œμ νŠΈ 전체λ₯Ό λΆ„μ„ν•˜κ² μŠ΅λ‹ˆλ‹€.
314
377
 
315
378
  πŸ“Š Code Quality Report
316
379
 
@@ -325,15 +388,14 @@ Recommendations:
325
388
  1. Refactor src/service.py into 3 modules
326
389
  2. Apply Dependency Injection pattern
327
390
  3. Extract unrelated utilities from src/utils.py
328
-
329
- Report saved: .vibe/reports/analysis-2025-11-17.md
330
391
  ```
331
392
 
332
- ### 6. UI Mockup
393
+ ### 7. UI Mockup (Claude Code)
333
394
 
334
- ```bash
335
- $ vibe ui "login form with email, password, and submit button"
395
+ ```
396
+ User: /vibe.ui "login form"
336
397
 
398
+ Claude:
337
399
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
338
400
  β”‚ Welcome Back β”‚
339
401
  β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
@@ -353,11 +415,61 @@ $ vibe ui "login form with email, password, and submit button"
353
415
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
354
416
 
355
417
  Required Components:
356
- - Header.tsx (Welcome message)
357
- - EmailInput.tsx (Email field)
358
- - PasswordInput.tsx (Password field with masking)
359
- - Button.tsx (Submit button)
360
- - LoginForm.tsx (Form container)
418
+ - EmailInput.tsx, PasswordInput.tsx, Button.tsx
419
+ ```
420
+
421
+ ---
422
+
423
+ ## BDD & Contract Testing Workflow
424
+
425
+ Vibe integrates BDD (Behavior-Driven Development) and Contract Testing throughout the development lifecycle:
426
+
427
+ ### Workflow Overview
428
+
429
+ ```
430
+ /vibe.spec "feature"
431
+ ↓ Generates SPEC (EARS) + Feature file (Gherkin)
432
+
433
+ /vibe.plan "feature"
434
+ ↓ Analyzes Feature file, selects BDD tools (pytest-bdd, Pact, etc.)
435
+
436
+ /vibe.tasks "feature"
437
+ ↓ Creates Contract Testing tasks (Provider, Consumer, Verification)
438
+
439
+ /vibe.run "Task X-Y"
440
+ ↓ Implements test-first (Contract β†’ Step Definitions β†’ Code)
441
+
442
+ /vibe.verify "feature"
443
+ ↓ Validates BDD Scenarios + Contract Tests
444
+ ```
445
+
446
+ ### Generated Files
447
+
448
+ - **`.vibe/features/{feature}.feature`** - Gherkin scenarios (Given-When-Then)
449
+ - **`tests/steps/`** - BDD step definitions
450
+ - **`pacts/` or `contracts/`** - Contract test files (Provider/Consumer)
451
+
452
+ ### Testing Tools by Language
453
+
454
+ | Language | BDD Tool | Contract Testing |
455
+ |----------|----------|------------------|
456
+ | Python | pytest-bdd, behave | Pact Python |
457
+ | JavaScript/TS | cucumber, jest-cucumber | Pact JS |
458
+ | Java/Kotlin | Cucumber JVM | Pact JVM, Spring Cloud Contract |
459
+ | Dart/Flutter | gherkin, flutter_gherkin | Pact Dart |
460
+
461
+ ### Example Feature File
462
+
463
+ ```gherkin
464
+ Feature: Push Notification Settings
465
+
466
+ Scenario: User enables comment notifications
467
+ Given the user is logged in
468
+ And the notification settings page is displayed
469
+ When the user toggles "Comments" notification to ON
470
+ Then the setting should be saved successfully
471
+ And the API should return status 200
472
+ And the response time should be less than 500ms
361
473
  ```
362
474
 
363
475
  ---
@@ -370,16 +482,16 @@ Create `CLAUDE.md` in your project root to enable automatic tech stack detection
370
482
 
371
483
  ### 2. Execute Phase by Phase
372
484
 
373
- Instead of `--all`, execute and verify each phase independently:
485
+ Execute and verify each phase independently in Claude Code:
374
486
 
375
- ```bash
376
- vibe run --phase 1 # Backend development
487
+ ```
488
+ /vibe.run --phase 1 # Backend development
377
489
  # Verify, test, commit
378
490
 
379
- vibe run --phase 2 # Frontend development
491
+ /vibe.run --phase 2 # Frontend development
380
492
  # Verify, test, commit
381
493
 
382
- vibe run --phase 3 # Integration
494
+ /vibe.run --phase 3 # Integration
383
495
  # Verify, test, commit
384
496
  ```
385
497
 
@@ -389,12 +501,12 @@ Each task includes acceptance criteria. Ensure all criteria pass before marking
389
501
 
390
502
  ### 4. Leverage MCP Tools
391
503
 
392
- Use analysis commands before refactoring:
504
+ Use analysis commands in Claude Code before refactoring:
393
505
 
394
- ```bash
395
- vibe analyze --code # Identify complexity hotspots
396
- vibe analyze --deps # Check for outdated/vulnerable packages
397
- vibe analyze --arch # Detect circular dependencies
506
+ ```
507
+ /vibe.analyze --code # Identify complexity hotspots
508
+ /vibe.analyze --deps # Check for outdated/vulnerable packages
509
+ /vibe.analyze --arch # Detect circular dependencies
398
510
  ```
399
511
 
400
512
  ---