@su-record/vibe 2.4.56 → 2.4.57

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 (44) hide show
  1. package/CLAUDE.md +7 -18
  2. package/agents/compounder.md +1 -1
  3. package/agents/implementer.md +2 -1
  4. package/agents/simplifier.md +2 -1
  5. package/commands/vibe.run.md +4 -1
  6. package/commands/vibe.spec.md +56 -3
  7. package/dist/cli/index.d.ts.map +1 -1
  8. package/dist/cli/index.js +0 -4
  9. package/dist/cli/index.js.map +1 -1
  10. package/dist/cli/postinstall.js +32 -1
  11. package/dist/cli/postinstall.js.map +1 -1
  12. package/dist/cli/setup.d.ts +18 -4
  13. package/dist/cli/setup.d.ts.map +1 -1
  14. package/dist/cli/setup.js +87 -27
  15. package/dist/cli/setup.js.map +1 -1
  16. package/dist/cli/types.d.ts +6 -0
  17. package/dist/cli/types.d.ts.map +1 -1
  18. package/languages/csharp-unity.md +516 -0
  19. package/languages/gdscript-godot.md +470 -0
  20. package/languages/ruby-rails.md +489 -0
  21. package/languages/typescript-angular.md +433 -0
  22. package/languages/typescript-astro.md +416 -0
  23. package/languages/typescript-electron.md +407 -0
  24. package/languages/typescript-nestjs.md +524 -0
  25. package/languages/typescript-svelte.md +407 -0
  26. package/languages/typescript-tauri.md +366 -0
  27. package/package.json +1 -1
  28. package/skills/vibe-capabilities.md +1 -1
  29. package/vibe/constitution.md +130 -97
  30. package/vibe/rules/core/communication-guide.md +50 -56
  31. package/vibe/rules/core/development-philosophy.md +35 -36
  32. package/vibe/rules/core/quick-start.md +66 -85
  33. package/vibe/rules/quality/bdd-contract-testing.md +94 -89
  34. package/vibe/rules/quality/checklist.md +132 -132
  35. package/vibe/rules/quality/testing-strategy.md +132 -129
  36. package/vibe/rules/standards/anti-patterns.md +74 -74
  37. package/vibe/rules/standards/code-structure.md +44 -44
  38. package/vibe/rules/standards/complexity-metrics.md +63 -62
  39. package/vibe/rules/standards/naming-conventions.md +72 -72
  40. package/vibe/templates/constitution-template.md +153 -95
  41. package/vibe/templates/contract-backend-template.md +41 -32
  42. package/vibe/templates/contract-frontend-template.md +35 -30
  43. package/vibe/templates/feature-template.md +33 -33
  44. package/vibe/templates/spec-template.md +118 -96
@@ -1,66 +1,66 @@
1
1
  # BDD + Contract Testing Guide
2
2
 
3
- **AI 주도 개발에 최적화된 테스팅 전략**
3
+ **Testing strategy optimized for AI-driven development**
4
4
 
5
5
  ---
6
6
 
7
- ## 개요
7
+ ## Overview
8
8
 
9
- BDD (Behavior-Driven Development) Contract Testing **AI 에이전트가 요구사항을 정확히 이해하고 검증 가능한 코드를 생성**하는 데 필수적입니다.
9
+ BDD (Behavior-Driven Development) and Contract Testing are essential for **AI agents to accurately understand requirements and generate verifiable code**.
10
10
 
11
- ### AI 주도 개발에 유용한가?
11
+ ### Why is it useful for AI-driven development?
12
12
 
13
- 1. **명확한 입출력 계약** → AI 정확히 구현 가능
14
- 2. **자동 검증**AI 생성 코드의 품질 즉시 확인
15
- 3. **회귀 방지** → AI 수정이 기존 기능을 깨뜨리지 않음
16
- 4. **문서화 자동화**테스트가 실행 가능한 명세
13
+ 1. **Clear input/output contracts** → AI can implement accurately
14
+ 2. **Automated verification**Immediately verify AI-generated code quality
15
+ 3. **Regression prevention** → AI modifications don't break existing functionality
16
+ 4. **Automated documentation**Tests serve as executable specifications
17
17
 
18
18
  ---
19
19
 
20
20
  ## Workflow
21
21
 
22
22
  ```
23
- SPEC 작성 (요구사항)
23
+ Write SPEC (Requirements)
24
24
 
25
- Feature 파일 생성 (Gherkin)
25
+ Generate Feature file (Gherkin)
26
26
 
27
- Contract 테스트 생성 (API 스키마)
27
+ Generate Contract tests (API schema)
28
28
 
29
- 테스트 실행 (Red)
29
+ Run tests (Red)
30
30
 
31
- AI 에이전트 구현
31
+ AI agent implementation
32
32
 
33
- 테스트 실행 (Green)
33
+ Run tests (Green)
34
34
 
35
- 리팩토링
35
+ Refactoring
36
36
 
37
- 테스트 재실행 (Green 유지)
37
+ Run tests again (Stay Green)
38
38
  ```
39
39
 
40
40
  ---
41
41
 
42
42
  ## 1. BDD (Behavior-Driven Development)
43
43
 
44
- ### Gherkin 문법
44
+ ### Gherkin Syntax
45
45
 
46
46
  ```gherkin
47
- Feature: 사용자 로그인
48
- As a 사용자
49
- I want to 로그인하고 싶다
50
- So that 개인화된 서비스를 이용할 있다
51
-
52
- Scenario: 유효한 credentials로 로그인 성공
53
- Given 사용자가 "test@example.com" "password123"으로 등록되어 있다
54
- When "test@example.com" "password123"으로 로그인을 시도한다
55
- Then 로그인에 성공한다
56
- And JWT 토큰을 받는다
57
- And 화면으로 리디렉션된다
58
-
59
- Scenario: 잘못된 비밀번호로 로그인 실패
60
- Given 사용자가 "test@example.com"으로 등록되어 있다
61
- When "test@example.com" "wrong-password"로 로그인을 시도한다
62
- Then 로그인에 실패한다
63
- And "Invalid credentials" 에러 메시지를 받는다
47
+ Feature: User Login
48
+ As a user
49
+ I want to login
50
+ So that I can access personalized services
51
+
52
+ Scenario: Successful login with valid credentials
53
+ Given user is registered with "test@example.com" and "password123"
54
+ When login is attempted with "test@example.com" and "password123"
55
+ Then login succeeds
56
+ And receives JWT token
57
+ And redirected to home screen
58
+
59
+ Scenario: Failed login with wrong password
60
+ Given user is registered with "test@example.com"
61
+ When login is attempted with "test@example.com" and "wrong-password"
62
+ Then login fails
63
+ And receives "Invalid credentials" error message
64
64
  ```
65
65
 
66
66
  ### Step Definitions (Python)
@@ -70,19 +70,19 @@ from pytest_bdd import scenarios, given, when, then, parsers
70
70
 
71
71
  scenarios('features/login.feature')
72
72
 
73
- @given(parsers.parse('사용자가 "{email}" "{password}"로 등록되어 있다'))
73
+ @given(parsers.parse('user is registered with "{email}" and "{password}"'))
74
74
  def user_exists(context, email, password):
75
75
  context.user = create_user(email=email, password=password)
76
76
 
77
- @when(parsers.parse('"{email}" "{password}"로 로그인을 시도한다'))
77
+ @when(parsers.parse('login is attempted with "{email}" and "{password}"'))
78
78
  def attempt_login(context, email, password):
79
79
  context.response = login(email=email, password=password)
80
80
 
81
- @then('로그인에 성공한다')
81
+ @then('login succeeds')
82
82
  def login_succeeds(context):
83
83
  assert context.response.status_code == 200
84
84
 
85
- @then('JWT 토큰을 받는다')
85
+ @then('receives JWT token')
86
86
  def receives_token(context):
87
87
  assert 'access_token' in context.response.json()
88
88
  ```
@@ -91,7 +91,7 @@ def receives_token(context):
91
91
 
92
92
  ## 2. Contract Testing
93
93
 
94
- ### API 계약 정의
94
+ ### API Contract Definition
95
95
 
96
96
  ```json
97
97
  {
@@ -118,7 +118,7 @@ def receives_token(context):
118
118
  }
119
119
  ```
120
120
 
121
- ### Contract 테스트 (Python)
121
+ ### Contract Test (Python)
122
122
 
123
123
  ```python
124
124
  import pytest
@@ -143,7 +143,7 @@ RESPONSE_SCHEMA = {
143
143
  }
144
144
 
145
145
  def test_login_response_contract():
146
- """로그인 응답이 계약을 준수하는지 검증"""
146
+ """Verify login response adheres to contract"""
147
147
  response = client.post("/api/auth/login", json={
148
148
  "email": "test@example.com",
149
149
  "password": "password123"
@@ -151,56 +151,60 @@ def test_login_response_contract():
151
151
 
152
152
  assert response.status_code == 200
153
153
 
154
- # 응답 스키마 검증
154
+ # Validate response schema
155
155
  validate(instance=response.json(), schema=RESPONSE_SCHEMA)
156
156
 
157
- # JWT 토큰 형식 검증
157
+ # Validate JWT token format
158
158
  token = response.json()["access_token"]
159
- assert len(token.split('.')) == 3 # JWT 3 부분으로 구성
159
+ assert len(token.split('.')) == 3 # JWT has 3 parts
160
160
  ```
161
161
 
162
162
  ---
163
163
 
164
- ## 3. AI 에이전트 활용
164
+ ## 3. AI Agent Utilization
165
165
 
166
- ### SPEC → Feature 자동 생성
166
+ ### SPEC → Feature Auto-generation
167
167
 
168
- AI 에이전트가 SPEC Acceptance Criteria Gherkin Scenario로 자동 변환:
168
+ AI agent automatically converts SPEC Acceptance Criteria to Gherkin Scenarios:
169
169
 
170
170
  **SPEC**:
171
+
171
172
  ```markdown
172
- ### REQ-001: 사용자 로그인
173
- **WHEN** 유효한 credentials로 로그인
174
- **THEN** JWT 토큰을 받는다
173
+ ### REQ-001: User Login
174
+ **WHEN** login with valid credentials
175
+ **THEN** receive JWT token
175
176
 
176
177
  #### Acceptance Criteria
177
- - [ ] 이메일과 비밀번호로 로그인 가능
178
- - [ ] access_token refresh_token 반환
179
- - [ ] 잘못된 credentials 400 에러
178
+ - [ ] Login with email and password
179
+ - [ ] Return access_token and refresh_token
180
+ - [ ] Invalid credentials return 400 error
180
181
  ```
181
182
 
182
183
  **Generated Feature**:
184
+
183
185
  ```gherkin
184
- Scenario: 유효한 credentials로 로그인 성공
185
- Given 사용자가 등록되어 있다
186
- When 유효한 이메일과 비밀번호로 로그인한다
187
- Then JWT access_token을 받는다
188
- And JWT refresh_token을 받는다
186
+ Scenario: Successful login with valid credentials
187
+ Given user is registered
188
+ When login with valid email and password
189
+ Then receive JWT access_token
190
+ And receive JWT refresh_token
189
191
  ```
190
192
 
191
- ### API 스키마 → Contract 자동 생성
193
+ ### API Schema → Contract Auto-generation
192
194
 
193
- AI 에이전트가 SPEC API 계약을 Contract 테스트로 자동 변환:
195
+ AI agent automatically converts SPEC API contracts to Contract tests:
194
196
 
195
197
  **SPEC**:
198
+
196
199
  ```markdown
197
- ### Endpoint: 로그인
200
+ ### Endpoint: Login
198
201
  POST /api/auth/login
199
202
  Request: { email, password }
200
203
  Response: { access_token, refresh_token, user }
201
204
  ```
202
205
 
203
206
  **Generated Contract Test**:
207
+
204
208
  ```python
205
209
  def test_login_contract():
206
210
  response = client.post("/api/auth/login", json=valid_credentials)
@@ -210,34 +214,34 @@ def test_login_contract():
210
214
 
211
215
  ---
212
216
 
213
- ## 4. Vibe 명령어
217
+ ## 4. Vibe Commands
214
218
 
215
- ### Feature 파일 생성
219
+ ### Generate Feature File
216
220
 
217
221
  ```bash
218
222
  vibe feature "user login"
219
- # → .claude/vibe/features/user-login.feature 생성
223
+ # → Creates .claude/vibe/features/user-login.feature
220
224
  ```
221
225
 
222
- ### Contract 테스트 생성
226
+ ### Generate Contract Test
223
227
 
224
228
  ```bash
225
229
  vibe contract "user login"
226
- # → tests/contract/test_user_login_contract.py 생성
230
+ # → Creates tests/contract/test_user_login_contract.py
227
231
  ```
228
232
 
229
- ### 테스트 실행
233
+ ### Run Tests
230
234
 
231
235
  ```bash
232
236
  vibe test "user login"
233
- # → BDD + Contract 테스트 실행
237
+ # → Runs BDD + Contract tests
234
238
  ```
235
239
 
236
- ### 검증
240
+ ### Verify
237
241
 
238
242
  ```bash
239
243
  vibe verify "user login"
240
- # → SPEC Acceptance Criteria 100% 충족 확인
244
+ # → Confirms 100% SPEC Acceptance Criteria met
241
245
  ```
242
246
 
243
247
  ---
@@ -246,18 +250,18 @@ vibe verify "user login"
246
250
 
247
251
  ### ✅ DO
248
252
 
249
- 1. **SPEC 먼저 작성** → Feature → Contract → 구현
250
- 2. **Given-When-Then** 명확히 분리
251
- 3. **계약은 구체적으로** (타입, 형식, 제약 명시)
252
- 4. **독립적인 시나리오** (순서 무관하게 실행 가능)
253
- 5. **에러 케이스 포함** (Happy path + Sad path)
253
+ 1. **Write SPEC first** → Feature → Contract → Implementation
254
+ 2. **Clearly separate Given-When-Then**
255
+ 3. **Be specific with contracts** (specify types, formats, constraints)
256
+ 4. **Independent scenarios** (can run in any order)
257
+ 5. **Include error cases** (Happy path + Sad path)
254
258
 
255
259
  ### ❌ DON'T
256
260
 
257
- 1. **구현 세부사항 노출 금지** (Step Definitions에만 위치)
258
- 2. **UI 테스트와 혼동 금지** (BDD 비즈니스 로직)
259
- 3. **과도한 Background 금지** (중복 제거만)
260
- 4. **계약 위반 허용 금지** (스키마 변경 버전 )
261
+ 1. **Don't expose implementation details** (keep in Step Definitions only)
262
+ 2. **Don't confuse with UI testing** (BDD is for business logic)
263
+ 3. **Don't overuse Background** (only for deduplication)
264
+ 4. **Don't allow contract violations** (version up on schema changes)
261
265
 
262
266
  ---
263
267
 
@@ -305,7 +309,7 @@ jobs:
305
309
  ### Python (FastAPI)
306
310
 
307
311
  ```bash
308
- # 프로젝트 구조
312
+ # Project structure
309
313
  project/
310
314
  ├── tests/
311
315
  │ ├── features/ # Gherkin feature files
@@ -319,7 +323,7 @@ project/
319
323
  ### Flutter (Dart)
320
324
 
321
325
  ```bash
322
- # 프로젝트 구조
326
+ # Project structure
323
327
  project/
324
328
  ├── integration_test/
325
329
  │ ├── features/ # Gherkin feature files
@@ -334,7 +338,7 @@ project/
334
338
  ### React (TypeScript)
335
339
 
336
340
  ```bash
337
- # 프로젝트 구조
341
+ # Project structure
338
342
  project/
339
343
  ├── tests/
340
344
  │ ├── features/ # Gherkin feature files
@@ -373,16 +377,17 @@ project/
373
377
 
374
378
  ## Summary
375
379
 
376
- BDD + Contract Testing **AI 에이전트가 SPEC을 정확히 구현하고 자동 검증**할 있게 합니다:
380
+ BDD + Contract Testing enables **AI agents to accurately implement SPECs and automatically verify**:
381
+
382
+ 1. **Clear requirements** → Express business language with Gherkin
383
+ 2. **Contract-based development** → Independent Frontend/Backend development with API schema
384
+ 3. **Automated verification** → Immediately verify AI-generated code quality
385
+ 4. **Regression prevention** → Protect existing functionality
377
386
 
378
- 1. **명확한 요구사항** → Gherkin으로 비즈니스 언어 표현
379
- 2. **계약 기반 개발** → API 스키마로 Frontend/Backend 독립 개발
380
- 3. **자동화된 검증** → AI 생성 코드 품질 즉시 확인
381
- 4. **회귀 방지** → 기존 기능 보호
387
+ **Usage in Vibe**:
382
388
 
383
- **Vibe에서 사용**:
384
389
  ```bash
385
390
  vibe spec "feature" → vibe feature "feature" → vibe contract "feature" → vibe run
386
391
  ```
387
392
 
388
- **Test-First → AI 구현 → Verify → Done** 🎉
393
+ **Test-First → AI Implementation → Verify → Done** 🎉