@su-record/vibe 0.1.7 → 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.
@@ -20,10 +20,11 @@ SPEC 문서를 분석하여 기술 구현 계획(PLAN)을 작성합니다.
20
20
  ## Process
21
21
 
22
22
  1. **SPEC 문서 읽기**: `.vibe/specs/{기능명}.md` 분석
23
- 2. **프로젝트 컨텍스트 파악**:
23
+ 2. **Feature 파일 읽기**: `.vibe/features/{기능명}.feature` 확인 (BDD)
24
+ 3. **프로젝트 컨텍스트 파악**:
24
25
  - `CLAUDE.md` 읽기 (기술 스택 확인)
25
26
  - `package.json` / `pyproject.toml` / `pubspec.yaml` 확인
26
- 3. **PLAN 문서 작성**: 15개 섹션 포함
27
+ 4. **PLAN 문서 작성**: 15개 섹션 포함
27
28
  - 기술 스택 선정 (기존 스택 재사용 우선)
28
29
  - 아키텍처 설계
29
30
  - API 설계
@@ -33,13 +34,17 @@ SPEC 문서를 분석하여 기술 구현 계획(PLAN)을 작성합니다.
33
34
  - 성능 최적화
34
35
  - 에러 처리
35
36
  - 모니터링 및 로깅
36
- - 테스트 전략
37
+ - **테스트 전략 (BDD/Contract Testing 포함)**
38
+ - BDD 도구 선정 (pytest-bdd, behave, cucumber 등)
39
+ - Contract Testing 도구 (Pact, Spring Cloud Contract 등)
40
+ - Feature 파일과 SPEC 매핑
41
+ - API Contract 스키마 정의
37
42
  - 배포 전략
38
43
  - 비용 예측
39
44
  - 마일스톤 (Phase별)
40
45
  - 리스크 및 완화 방안
41
46
  - 다음 단계
42
- 4. **품질 검증**: 기술 선택 근거, 비용, 일정 현실성
47
+ 5. **품질 검증**: 기술 선택 근거, 비용, 일정 현실성, BDD 테스트 전략 타당성
43
48
 
44
49
  ## Agent
45
50
 
@@ -48,6 +53,7 @@ SPEC 문서를 분석하여 기술 구현 계획(PLAN)을 작성합니다.
48
53
  ## Input
49
54
 
50
55
  - `.vibe/specs/{기능명}.md` (SPEC 문서)
56
+ - `.vibe/features/{기능명}.feature` (BDD Feature 파일)
51
57
  - `CLAUDE.md` (프로젝트 기술 스택)
52
58
 
53
59
  ## Output
@@ -46,7 +46,10 @@ TASKS 문서의 특정 Task를 읽고 구현 가이드를 생성한 후, 실제
46
46
  - Backend Python Expert: `~/.vibe/agents/backend-python-expert.md`
47
47
  - Frontend Flutter Expert: `~/.vibe/agents/frontend-flutter-expert.md`
48
48
  - TRUST 5 원칙 준수:
49
- - Test-first (Contract Testing)
49
+ - **Test-first (BDD/Contract Testing 우선)**
50
+ - Contract 파일 먼저 작성 (Provider/Consumer)
51
+ - BDD Step Definitions 작성
52
+ - Unit Tests 작성
50
53
  - Readable (명확한 코드)
51
54
  - Unified (일관된 스타일)
52
55
  - Secured (보안 고려)
@@ -66,16 +69,19 @@ TASKS 문서의 특정 Task를 읽고 구현 가이드를 생성한 후, 실제
66
69
 
67
70
  | Task | Agent |
68
71
  |------|-------|
69
- | Task 1-1 ~ 1-8 (Backend) | Backend Python Expert |
70
- | Task 2-1 ~ 2-8 (Frontend) | Frontend Flutter Expert |
72
+ | Task 1-1 ~ 1-9 (Backend + Contract Provider) | Backend Python Expert |
73
+ | Task 2-1 ~ 2-9 (Frontend + Contract Consumer) | Frontend Flutter Expert |
71
74
  | Task 3-1 ~ 3-2 (FCM Backend) | Backend Python Expert |
72
- | Task 3-3 (E2E Test) | QA / Frontend Flutter Expert |
75
+ | Task 3-3 (BDD Step Definitions) | QA / Backend/Frontend Expert |
76
+ | Task 3-4 (Contract Verification) | QA |
77
+ | Task 3-5 (E2E Test) | QA / Frontend Flutter Expert |
73
78
 
74
79
  ## Input
75
80
 
76
81
  - `.vibe/tasks/{기능명}.md` (TASKS 문서)
77
82
  - `.vibe/plans/{기능명}.md` (PLAN 참고)
78
83
  - `.vibe/specs/{기능명}.md` (SPEC 참고)
84
+ - `.vibe/features/{기능명}.feature` (BDD Feature 파일 - Contract Test 매핑용)
79
85
 
80
86
  ## Output
81
87
 
@@ -109,8 +115,8 @@ TASKS 문서의 특정 Task를 읽고 구현 가이드를 생성한 후, 실제
109
115
  ```
110
116
 
111
117
  **동작:**
112
- - Phase 1의 8개 Task 순차 실행
113
- - Task 1-1 → 1-2 → ... → 1-8
118
+ - Phase 1의 9개 Task 순차 실행
119
+ - Task 1-1 → 1-2 → ... → 1-9 (Contract Provider 포함)
114
120
  - 각 Task마다 의존성 확인 후 실행
115
121
 
116
122
  ### 전체 실행
@@ -120,9 +126,10 @@ TASKS 문서의 특정 Task를 읽고 구현 가이드를 생성한 후, 실제
120
126
  ```
121
127
 
122
128
  **동작:**
123
- - 의존성 그래프에 따라 19개 Task 순차 실행
124
- - Phase 1 (8개) → Phase 2 (8개) → Phase 3 (3개)
125
- - 예상 시간: 24시간
129
+ - 의존성 그래프에 따라 23개 Task 순차 실행
130
+ - Phase 1 (9개) → Phase 2 (9개) → Phase 3 (5개)
131
+ - BDD/Contract Testing 포함
132
+ - 예상 시간: 28시간
126
133
 
127
134
  ## Verification
128
135
 
@@ -70,7 +70,13 @@ SPEC 문서를 작성합니다 (Specification Agent).
70
70
 
71
71
  3. **SPEC 문서 작성**: `.vibe/specs/{기능명}.md` 생성 (EARS 형식)
72
72
 
73
- 4. **품질 검증**: TRUST 5 기준 자체 평가
73
+ 4. **Gherkin Feature 파일 생성** (BDD):
74
+ - `.vibe/features/{기능명}.feature` 생성
75
+ - SPEC의 각 요구사항(REQ-XXX)을 Scenario로 변환
76
+ - Given-When-Then 형식으로 작성
77
+ - Acceptance Criteria를 테스트 케이스로 변환
78
+
79
+ 5. **품질 검증**: TRUST 5 기준 자체 평가
74
80
 
75
81
  ## Agent
76
82
 
@@ -79,6 +85,7 @@ SPEC 문서를 작성합니다 (Specification Agent).
79
85
  ## Output
80
86
 
81
87
  - `.vibe/specs/{기능명}.md` - SPEC 문서 (EARS 형식)
88
+ - `.vibe/features/{기능명}.feature` - Gherkin Feature 파일 (BDD)
82
89
  - 품질 점수 (0-100점)
83
90
  - 개선 제안 사항
84
91
 
@@ -20,11 +20,12 @@ PLAN 문서를 분석하여 Phase별 구체적인 작업 목록(TASKS)을 생성
20
20
  ## Process
21
21
 
22
22
  1. **PLAN 문서 읽기**: `.vibe/plans/{기능명}.md` 분석
23
- 2. **Phase별 Task 분해**:
24
- - Phase 1: Backend 개발 (DB, API, Service, Repository, Tests)
25
- - Phase 2: Frontend 개발 (Model, Service, Proviber, UI, Tests)
26
- - Phase 3: 통합 테스트 (FCM, E2E)
27
- 3. **각 Task마다 정의**:
23
+ 2. **Feature 파일 읽기**: `.vibe/features/{기능명}.feature` 확인 (BDD Scenarios)
24
+ 3. **Phase Task 분해**:
25
+ - Phase 1: Backend 개발 (DB, API, Service, Repository, Unit Tests, **Contract Provider**)
26
+ - Phase 2: Frontend 개발 (Model, Service, Provider, UI, Unit Tests, **Contract Consumer**)
27
+ - Phase 3: 통합 테스트 (FCM, E2E, **BDD Step Definitions**, **Contract Verification**)
28
+ 4. **각 Task마다 정의**:
28
29
  - 상태 (⬜ 대기 / 🟡 진행 중 / ✅ 완료)
29
30
  - 담당 Agent
30
31
  - 예상 시간
@@ -44,6 +45,7 @@ PLAN 문서를 분석하여 Phase별 구체적인 작업 목록(TASKS)을 생성
44
45
 
45
46
  - `.vibe/plans/{기능명}.md` (PLAN 문서)
46
47
  - `.vibe/specs/{기능명}.md` (SPEC 문서)
48
+ - `.vibe/features/{기능명}.feature` (BDD Feature 파일)
47
49
 
48
50
  ## Output
49
51
 
@@ -59,9 +61,13 @@ PLAN 문서를 분석하여 Phase별 구체적인 작업 목록(TASKS)을 생성
59
61
  ```
60
62
 
61
63
  **결과:**
62
- - 19개 Task (Phase 1: 8개, Phase 2: 8개, Phase 3: 3개)
64
+ - 23개 Task (Phase 1: 9개, Phase 2: 9개, Phase 3: 5개)
65
+ - **Phase 1:** DB, API, Service, Repository, Unit Tests, **Contract Provider 정의**
66
+ - **Phase 2:** Model, Service, Provider, UI, Unit Tests, **Contract Consumer 정의**
67
+ - **Phase 3:** FCM, E2E, **BDD Step Definitions**, **Contract Verification**
63
68
  - 의존성 그래프 포함
64
69
  - 각 Task별 Acceptance Criteria
70
+ - BDD Scenarios와 매핑된 Contract Test Tasks
65
71
 
66
72
  ## Next Step
67
73
 
@@ -20,19 +20,28 @@ SPEC 문서의 모든 요구사항(REQ-001~N)과 비기능 요구사항(NFR)을
20
20
  ## Process
21
21
 
22
22
  1. **SPEC 문서 읽기**: `.vibe/specs/{기능명}.md`
23
- 2. **TASKS 문서 확인**: 모든 Task가 ✅ 완료 상태인지 확인
24
- 3. **요구사항별 검증**:
23
+ 2. **Feature 파일 읽기**: `.vibe/features/{기능명}.feature` (BDD Scenarios)
24
+ 3. **TASKS 문서 확인**: 모든 Task가 ✅ 완료 상태인지 확인
25
+ 4. **BDD Scenarios 검증**:
26
+ - Feature 파일의 모든 Scenario 실행
27
+ - Given-When-Then 각 단계 검증
28
+ - Step Definitions 실행 결과 확인
29
+ 5. **Contract Testing 검증**:
30
+ - Provider Contract 검증 (Backend)
31
+ - Consumer Contract 검증 (Frontend)
32
+ - Contract 일치 여부 확인 (Pact Broker)
33
+ 6. **요구사항별 검증**:
25
34
  - REQ-001: 6개 알림 카테고리 정의 → DB 스키마 확인
26
35
  - REQ-002: 설정 저장 (P95 < 500ms) → 성능 테스트
27
36
  - REQ-003: 설정 조회 (P95 < 300ms) → 성능 테스트
28
37
  - REQ-004: 알림 필터링 동작 → 통합 테스트
29
38
  - REQ-005: 기본 설정 생성 → 유닛 테스트
30
39
  - REQ-006: UI 피드백 → 위젯 테스트
31
- 4. **비기능 요구사항 검증**:
40
+ 7. **비기능 요구사항 검증**:
32
41
  - 성능 (Performance): Locust로 부하 테스트
33
42
  - 보안 (Security): JWT 인증 확인
34
43
  - 접근성 (Accessibility): WCAG AA 기준
35
- 5. **검증 리포트 생성**: `.vibe/reports/{기능명}-verification.md`
44
+ 8. **검증 리포트 생성**: `.vibe/reports/{기능명}-verification.md`
36
45
 
37
46
  ## Agent
38
47
 
@@ -41,8 +50,11 @@ Quality Reviewer Agent
41
50
  ## Input
42
51
 
43
52
  - `.vibe/specs/{기능명}.md` (SPEC 문서)
53
+ - `.vibe/features/{기능명}.feature` (BDD Feature 파일)
44
54
  - `.vibe/tasks/{기능명}.md` (TASKS 문서)
45
55
  - 구현된 코드 (backend/, frontend/)
56
+ - BDD Step Definitions (tests/steps/, test/bdd/)
57
+ - Contract 파일 (pacts/, contracts/)
46
58
 
47
59
  ## Output
48
60
 
@@ -76,6 +88,8 @@ Quality Reviewer Agent
76
88
  - [ ] Trackable: Logging, Monitoring
77
89
 
78
90
  ### Tests
91
+ - [ ] **BDD Scenarios 모두 통과** (pytest-bdd, behave, cucumber)
92
+ - [ ] **Contract Tests 모두 통과** (Pact, Spring Cloud Contract)
79
93
  - [ ] 유닛 테스트 커버리지 > 80%
80
94
  - [ ] 통합 테스트 통과
81
95
  - [ ] E2E 테스트 통과 (실제 푸시 수신)
@@ -97,6 +111,17 @@ Quality Reviewer Agent
97
111
  - **실패**: 0개
98
112
  - **품질 점수**: 95/100 (A+)
99
113
 
114
+ ## BDD Scenarios (5/5 통과)
115
+ ✅ Scenario 1: 알림 설정 조회
116
+ ✅ Scenario 2: 알림 카테고리 활성화
117
+ ✅ Scenario 3: 알림 카테고리 비활성화
118
+ ✅ Scenario 4: 기본 설정 생성
119
+ ✅ Scenario 5: 설정 저장 응답 시간 검증
120
+
121
+ ## Contract Tests (2/2 통과)
122
+ ✅ Provider Contract: Backend API 스키마 검증
123
+ ✅ Consumer Contract: Frontend 호출 규약 검증
124
+
100
125
  ## Functional Requirements (6/6 통과)
101
126
  ✅ REQ-001: 6개 알림 카테고리 정의
102
127
  ✅ REQ-002: 설정 저장 (P95: 420ms < 500ms)
@@ -6,7 +6,12 @@
6
6
  "Bash(sed:*)",
7
7
  "Bash(git add:*)",
8
8
  "Bash(git commit:*)",
9
- "Bash(npm publish:*)"
9
+ "Bash(npm publish:*)",
10
+ "Bash(git push:*)",
11
+ "Bash(npm pack)",
12
+ "Bash(npm install:*)",
13
+ "Read(//private/tmp/test-vibe-bdd/.vibe/**)",
14
+ "Read(//private/tmp/test-vibe-bdd/.claude/commands/**)"
10
15
  ],
11
16
  "deny": [],
12
17
  "ask": []
package/README.md CHANGED
@@ -247,9 +247,10 @@ $ vibe init
247
247
  .vibe/
248
248
  ├── config.json
249
249
  ├── constitution.md
250
- ├── specs/
251
- ├── plans/
252
- └── tasks/
250
+ ├── specs/ # SPEC documents (EARS format)
251
+ ├── features/ # BDD Feature files (Gherkin)
252
+ ├── plans/ # Technical plans
253
+ └── tasks/ # Task breakdowns
253
254
  ```
254
255
 
255
256
  ### 2. Create Specification (Claude Code)
@@ -311,6 +312,7 @@ User: 1
311
312
 
312
313
  ✅ SPEC document created!
313
314
  📄 .vibe/specs/push-notification-settings.md
315
+ 📄 .vibe/features/push-notification-settings.feature (BDD scenarios)
314
316
  ```
315
317
 
316
318
  ### 3. Generate Plan (Claude Code)
@@ -326,8 +328,9 @@ SPEC을 분석하여 기술 계획을 작성하겠습니다.
326
328
 
327
329
  Summary:
328
330
  - 3 Phases: Backend → Frontend → FCM Integration
329
- - Timeline: 24 hours (3 days)
331
+ - Timeline: 28 hours (3.5 days)
330
332
  - Cost: +$0.50/month (Redis + FCM)
333
+ - Testing: BDD (pytest-bdd) + Contract Testing (Pact)
331
334
  ```
332
335
 
333
336
  ### 4. Decompose Tasks (Claude Code)
@@ -342,10 +345,10 @@ PLAN을 기반으로 Task를 생성하겠습니다.
342
345
  📄 .vibe/tasks/push-notification-settings.md
343
346
 
344
347
  Task Breakdown:
345
- - Total: 19 tasks
346
- - Phase 1 (Backend): 8 tasks
347
- - Phase 2 (Frontend): 8 tasks
348
- - Phase 3 (FCM): 3 tasks
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)
349
352
  ```
350
353
 
351
354
  ### 5. Execute Tasks (Claude Code)
@@ -417,6 +420,60 @@ Required Components:
417
420
 
418
421
  ---
419
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
473
+ ```
474
+
475
+ ---
476
+
420
477
  ## Best Practices
421
478
 
422
479
  ### 1. Document Your Tech Stack
package/bin/vibe CHANGED
@@ -106,6 +106,7 @@ function init(projectName) {
106
106
  // 폴더 생성
107
107
  fs.mkdirSync(vibeDir);
108
108
  fs.mkdirSync(path.join(vibeDir, 'specs'));
109
+ fs.mkdirSync(path.join(vibeDir, 'features'));
109
110
  fs.mkdirSync(path.join(vibeDir, 'plans'));
110
111
  fs.mkdirSync(path.join(vibeDir, 'tasks'));
111
112
 
@@ -169,6 +170,7 @@ ${isNewProject ? `프로젝트 위치:
169
170
  ├── config.json # 프로젝트 설정 (언어: 한국어)
170
171
  ├── constitution.md # 프로젝트 원칙
171
172
  ├── specs/ # SPEC 문서들
173
+ ├── features/ # BDD Feature 파일들 (Gherkin)
172
174
  ├── plans/ # 기술 계획들
173
175
  └── tasks/ # 작업 목록들
174
176
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@su-record/vibe",
3
- "version": "0.1.7",
3
+ "version": "0.2.0",
4
4
  "description": "Vibe - Claude Code exclusive SPEC-driven AI coding framework",
5
5
  "main": "cli/index.js",
6
6
  "bin": {