@su-record/vibe 2.4.72 → 2.4.76

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 (164) hide show
  1. package/CLAUDE.md +216 -215
  2. package/README.md +4 -4
  3. package/agents/research/best-practices-agent.md +13 -13
  4. package/agents/research/codebase-patterns-agent.md +33 -33
  5. package/agents/research/framework-docs-agent.md +23 -23
  6. package/agents/research/security-advisory-agent.md +29 -29
  7. package/agents/review/architecture-reviewer.md +31 -31
  8. package/agents/review/complexity-reviewer.md +21 -21
  9. package/agents/review/data-integrity-reviewer.md +29 -29
  10. package/agents/review/git-history-reviewer.md +24 -24
  11. package/agents/review/performance-reviewer.md +29 -29
  12. package/agents/review/python-reviewer.md +53 -53
  13. package/agents/review/rails-reviewer.md +40 -40
  14. package/agents/review/react-reviewer.md +40 -40
  15. package/agents/review/security-reviewer.md +29 -29
  16. package/agents/review/simplicity-reviewer.md +24 -24
  17. package/agents/review/test-coverage-reviewer.md +31 -31
  18. package/agents/review/typescript-reviewer.md +41 -41
  19. package/commands/vibe.analyze.md +103 -7
  20. package/commands/vibe.reason.md +106 -0
  21. package/commands/vibe.review.md +123 -38
  22. package/commands/vibe.run.md +286 -223
  23. package/commands/vibe.spec.md +425 -186
  24. package/commands/vibe.utils.md +104 -3
  25. package/commands/vibe.verify.md +179 -86
  26. package/dist/cli/detect.js +40 -40
  27. package/dist/cli/detect.js.map +1 -1
  28. package/dist/cli/index.d.ts +1 -1
  29. package/dist/cli/index.js +1 -1
  30. package/dist/cli/llm.js +5 -5
  31. package/dist/cli/llm.js.map +1 -1
  32. package/dist/cli/setup.js +3 -3
  33. package/dist/cli/setup.js.map +1 -1
  34. package/dist/lib/ContextCompressor.js +1 -1
  35. package/dist/lib/ContextCompressor.js.map +1 -1
  36. package/dist/lib/MemoryManager.d.ts +13 -155
  37. package/dist/lib/MemoryManager.d.ts.map +1 -1
  38. package/dist/lib/MemoryManager.js +52 -617
  39. package/dist/lib/MemoryManager.js.map +1 -1
  40. package/dist/lib/gemini-api.js +12 -12
  41. package/dist/lib/gemini-api.js.map +1 -1
  42. package/dist/lib/gemini-oauth.js +22 -22
  43. package/dist/lib/gemini-oauth.js.map +1 -1
  44. package/dist/lib/gemini-storage.js +3 -3
  45. package/dist/lib/gemini-storage.js.map +1 -1
  46. package/dist/lib/gpt-api.js +11 -11
  47. package/dist/lib/gpt-api.js.map +1 -1
  48. package/dist/lib/gpt-oauth.js +28 -28
  49. package/dist/lib/gpt-oauth.js.map +1 -1
  50. package/dist/lib/gpt-storage.js +3 -3
  51. package/dist/lib/gpt-storage.js.map +1 -1
  52. package/dist/lib/memory/KnowledgeGraph.d.ts +34 -0
  53. package/dist/lib/memory/KnowledgeGraph.d.ts.map +1 -0
  54. package/dist/lib/memory/KnowledgeGraph.js +216 -0
  55. package/dist/lib/memory/KnowledgeGraph.js.map +1 -0
  56. package/dist/lib/memory/KnowledgeGraph.test.d.ts +2 -0
  57. package/dist/lib/memory/KnowledgeGraph.test.d.ts.map +1 -0
  58. package/dist/lib/memory/KnowledgeGraph.test.js +189 -0
  59. package/dist/lib/memory/KnowledgeGraph.test.js.map +1 -0
  60. package/dist/lib/memory/MemorySearch.d.ts +25 -0
  61. package/dist/lib/memory/MemorySearch.d.ts.map +1 -0
  62. package/dist/lib/memory/MemorySearch.js +85 -0
  63. package/dist/lib/memory/MemorySearch.js.map +1 -0
  64. package/dist/lib/memory/MemorySearch.test.d.ts +2 -0
  65. package/dist/lib/memory/MemorySearch.test.d.ts.map +1 -0
  66. package/dist/lib/memory/MemorySearch.test.js +149 -0
  67. package/dist/lib/memory/MemorySearch.test.js.map +1 -0
  68. package/dist/lib/memory/MemoryStorage.d.ts +77 -0
  69. package/dist/lib/memory/MemoryStorage.d.ts.map +1 -0
  70. package/dist/lib/memory/MemoryStorage.js +278 -0
  71. package/dist/lib/memory/MemoryStorage.js.map +1 -0
  72. package/dist/lib/memory/MemoryStorage.test.d.ts +2 -0
  73. package/dist/lib/memory/MemoryStorage.test.d.ts.map +1 -0
  74. package/dist/lib/memory/MemoryStorage.test.js +198 -0
  75. package/dist/lib/memory/MemoryStorage.test.js.map +1 -0
  76. package/dist/lib/memory/index.d.ts +4 -0
  77. package/dist/lib/memory/index.d.ts.map +1 -0
  78. package/dist/lib/memory/index.js +8 -0
  79. package/dist/lib/memory/index.js.map +1 -0
  80. package/dist/orchestrator/orchestrator.d.ts.map +1 -1
  81. package/dist/orchestrator/orchestrator.js +4 -6
  82. package/dist/orchestrator/orchestrator.js.map +1 -1
  83. package/dist/tools/convention/analyzeComplexity.d.ts +3 -1
  84. package/dist/tools/convention/analyzeComplexity.d.ts.map +1 -1
  85. package/dist/tools/convention/analyzeComplexity.js +102 -4
  86. package/dist/tools/convention/analyzeComplexity.js.map +1 -1
  87. package/dist/tools/convention/analyzeComplexity.test.d.ts +2 -0
  88. package/dist/tools/convention/analyzeComplexity.test.d.ts.map +1 -0
  89. package/dist/tools/convention/analyzeComplexity.test.js +207 -0
  90. package/dist/tools/convention/analyzeComplexity.test.js.map +1 -0
  91. package/dist/tools/convention/applyQualityRules.js +1 -1
  92. package/dist/tools/convention/applyQualityRules.js.map +1 -1
  93. package/dist/tools/convention/checkCouplingCohesion.js +2 -2
  94. package/dist/tools/convention/checkCouplingCohesion.js.map +1 -1
  95. package/dist/tools/convention/suggestImprovements.js +1 -1
  96. package/dist/tools/convention/suggestImprovements.js.map +1 -1
  97. package/dist/tools/convention/validateCodeQuality.d.ts +3 -1
  98. package/dist/tools/convention/validateCodeQuality.d.ts.map +1 -1
  99. package/dist/tools/convention/validateCodeQuality.js +145 -2
  100. package/dist/tools/convention/validateCodeQuality.js.map +1 -1
  101. package/dist/tools/convention/validateCodeQuality.test.d.ts +2 -0
  102. package/dist/tools/convention/validateCodeQuality.test.d.ts.map +1 -0
  103. package/dist/tools/convention/validateCodeQuality.test.js +230 -0
  104. package/dist/tools/convention/validateCodeQuality.test.js.map +1 -0
  105. package/dist/tools/memory/autoSaveContext.js +1 -1
  106. package/dist/tools/memory/autoSaveContext.js.map +1 -1
  107. package/dist/tools/memory/createMemoryTimeline.js +27 -27
  108. package/dist/tools/memory/createMemoryTimeline.js.map +1 -1
  109. package/dist/tools/memory/deleteMemory.js +1 -1
  110. package/dist/tools/memory/deleteMemory.js.map +1 -1
  111. package/dist/tools/memory/getMemoryGraph.js +24 -24
  112. package/dist/tools/memory/getMemoryGraph.js.map +1 -1
  113. package/dist/tools/memory/getSessionContext.js +36 -36
  114. package/dist/tools/memory/getSessionContext.js.map +1 -1
  115. package/dist/tools/memory/linkMemories.js +21 -21
  116. package/dist/tools/memory/linkMemories.js.map +1 -1
  117. package/dist/tools/memory/prioritizeMemory.js +1 -1
  118. package/dist/tools/memory/prioritizeMemory.js.map +1 -1
  119. package/dist/tools/memory/restoreSessionContext.js +1 -1
  120. package/dist/tools/memory/restoreSessionContext.js.map +1 -1
  121. package/dist/tools/memory/searchMemories.js +1 -1
  122. package/dist/tools/memory/searchMemories.js.map +1 -1
  123. package/dist/tools/memory/searchMemoriesAdvanced.js +42 -42
  124. package/dist/tools/memory/searchMemoriesAdvanced.js.map +1 -1
  125. package/dist/tools/memory/startSession.js +2 -2
  126. package/dist/tools/memory/startSession.js.map +1 -1
  127. package/dist/tools/memory/updateMemory.js +1 -1
  128. package/dist/tools/memory/updateMemory.js.map +1 -1
  129. package/dist/tools/semantic/analyzeDependencyGraph.js +38 -38
  130. package/dist/tools/semantic/analyzeDependencyGraph.js.map +1 -1
  131. package/dist/tools/semantic/findReferences.js +1 -1
  132. package/dist/tools/semantic/findReferences.js.map +1 -1
  133. package/dist/tools/semantic/findSymbol.js +1 -1
  134. package/dist/tools/semantic/findSymbol.js.map +1 -1
  135. package/dist/tools/time/getCurrentTime.js +1 -1
  136. package/dist/tools/time/getCurrentTime.js.map +1 -1
  137. package/dist/tools/ui/previewUiAscii.js +2 -2
  138. package/dist/tools/ui/previewUiAscii.js.map +1 -1
  139. package/hooks/hooks.json +11 -2
  140. package/hooks/scripts/llm-orchestrate.js +1 -1
  141. package/hooks/scripts/utils.js +31 -6
  142. package/languages/csharp-unity.md +82 -83
  143. package/languages/dart-flutter.md +89 -88
  144. package/languages/go.md +76 -75
  145. package/languages/java-spring.md +85 -84
  146. package/languages/kotlin-android.md +64 -63
  147. package/languages/python-django.md +83 -82
  148. package/languages/python-fastapi.md +82 -81
  149. package/languages/rust.md +75 -74
  150. package/languages/swift-ios.md +73 -72
  151. package/languages/typescript-electron.md +70 -71
  152. package/languages/typescript-nextjs.md +93 -92
  153. package/languages/typescript-node.md +64 -63
  154. package/languages/typescript-nuxt.md +113 -112
  155. package/languages/typescript-react-native.md +82 -81
  156. package/languages/typescript-react.md +76 -75
  157. package/languages/typescript-tauri.md +74 -75
  158. package/languages/typescript-vue.md +73 -72
  159. package/package.json +1 -1
  160. package/skills/git-worktree.md +25 -25
  161. package/skills/multi-llm-orchestration.md +4 -6
  162. package/skills/priority-todos.md +39 -39
  163. package/skills/vibe-capabilities.md +2 -2
  164. package/vibe/config.json +2 -2
@@ -1,56 +1,56 @@
1
1
  # Test Coverage Reviewer Agent
2
2
 
3
- 테스트 커버리지 전문 리뷰 에이전트
3
+ <!-- Test Coverage Expert Review Agent -->
4
4
 
5
5
  ## Role
6
6
 
7
- - 테스트 누락 탐지
8
- - 엣지 케이스 식별
9
- - 테스트 품질 평가
10
- - 모킹 전략 검토
7
+ - Missing test detection
8
+ - Edge case identification
9
+ - Test quality evaluation
10
+ - Mocking strategy review
11
11
 
12
12
  ## Model
13
13
 
14
- **Haiku** (inherit) - 빠른 병렬 실행
14
+ **Haiku** (inherit) - Fast parallel execution
15
15
 
16
16
  ## Checklist
17
17
 
18
18
  ### Coverage Gaps
19
- - [ ] 코드에 테스트 존재?
20
- - [ ] 분기 커버리지 충분?
21
- - [ ] 에러 경로 테스트?
22
- - [ ] 경계값 테스트?
19
+ - [ ] Tests exist for new code?
20
+ - [ ] Branch coverage sufficient?
21
+ - [ ] Error paths tested?
22
+ - [ ] Boundary values tested?
23
23
 
24
24
  ### Edge Cases
25
- - [ ] null/undefined 처리?
26
- - [ ] 배열/객체?
27
- - [ ] 최대/최소값?
28
- - [ ] 특수 문자?
29
- - [ ] 동시성 시나리오?
25
+ - [ ] null/undefined handling?
26
+ - [ ] Empty arrays/objects?
27
+ - [ ] Maximum/minimum values?
28
+ - [ ] Special characters?
29
+ - [ ] Concurrency scenarios?
30
30
 
31
31
  ### Test Quality
32
- - [ ] 테스트 독립성?
33
- - [ ] 의미 있는 어설션?
34
- - [ ] 테스트 이름 명확?
35
- - [ ] AAA 패턴 (Arrange-Act-Assert)?
32
+ - [ ] Test independence?
33
+ - [ ] Meaningful assertions?
34
+ - [ ] Test names clear?
35
+ - [ ] AAA pattern (Arrange-Act-Assert)?
36
36
 
37
37
  ### Mocking
38
- - [ ] 외부 의존성 모킹?
39
- - [ ] 과도한 모킹 금지?
40
- - [ ] 모킹 현실성?
41
- - [ ] 테스트 더블 적절?
38
+ - [ ] External dependencies mocked?
39
+ - [ ] No excessive mocking?
40
+ - [ ] Mock realism?
41
+ - [ ] Test doubles appropriate?
42
42
 
43
43
  ### Integration
44
- - [ ] 통합 테스트 존재?
45
- - [ ] API 계약 테스트?
46
- - [ ] 데이터베이스 테스트?
47
- - [ ] E2E 시나리오?
44
+ - [ ] Integration tests exist?
45
+ - [ ] API contract tests?
46
+ - [ ] Database tests?
47
+ - [ ] E2E scenarios?
48
48
 
49
49
  ### Flakiness
50
- - [ ] 시간 의존성?
51
- - [ ] 랜덤 데이터?
52
- - [ ] 외부 서비스 의존?
53
- - [ ] 비동기 처리?
50
+ - [ ] Time dependency?
51
+ - [ ] Random data?
52
+ - [ ] External service dependency?
53
+ - [ ] Async handling?
54
54
 
55
55
  ## Output Format
56
56
 
@@ -1,77 +1,77 @@
1
1
  # TypeScript Reviewer Agent
2
2
 
3
- TypeScript 코드 전문 리뷰 에이전트
3
+ <!-- TypeScript Code Expert Review Agent -->
4
4
 
5
5
  ## Role
6
6
 
7
- - 타입 안전성 검증
8
- - ESLint/Prettier 규칙 준수
9
- - 모던 TS 패턴 제안
10
- - React/Node.js 베스트 프랙티스
7
+ - Type safety verification
8
+ - ESLint/Prettier rule compliance
9
+ - Modern TS pattern suggestions
10
+ - React/Node.js best practices
11
11
 
12
12
  ## Model
13
13
 
14
- **Haiku** (inherit) - 빠른 병렬 실행
14
+ **Haiku** (inherit) - Fast parallel execution
15
15
 
16
16
  ## Checklist
17
17
 
18
18
  ### Type Safety
19
- - [ ] `any` 타입 사용 최소화?
20
- - [ ] 타입 가드 적절히 사용?
21
- - [ ] `unknown` 대신 `any`?
22
- - [ ] 유니온 타입 narrowing?
23
- - [ ] 제네릭 적절히 활용?
19
+ - [ ] `any` type usage minimized?
20
+ - [ ] Type guards used appropriately?
21
+ - [ ] `unknown` instead of `any`?
22
+ - [ ] Union type narrowing?
23
+ - [ ] Generics utilized appropriately?
24
24
 
25
25
  ### Strict Mode
26
- - [ ] strictNullChecks 준수?
27
- - [ ] noImplicitAny 준수?
28
- - [ ] optional chaining (?.) 활용?
29
- - [ ] nullish coalescing (??) 활용?
26
+ - [ ] strictNullChecks compliant?
27
+ - [ ] noImplicitAny compliant?
28
+ - [ ] Optional chaining (?.) utilized?
29
+ - [ ] Nullish coalescing (??) utilized?
30
30
 
31
31
  ### Modern Patterns
32
32
  - [ ] const assertion (as const)?
33
- - [ ] satisfies 연산자?
33
+ - [ ] satisfies operator?
34
34
  - [ ] Template literal types?
35
35
  - [ ] Discriminated unions?
36
36
 
37
37
  ### Error Handling
38
- - [ ] 에러 타입 정의?
39
- - [ ] Result/Either 패턴?
40
- - [ ] async 에러 처리?
41
- - [ ] 사용자 친화적 에러 메시지?
38
+ - [ ] Error types defined?
39
+ - [ ] Result/Either pattern?
40
+ - [ ] Async error handling?
41
+ - [ ] User-friendly error messages?
42
42
 
43
43
  ### Imports/Exports
44
- - [ ] 배럴 exports 사용?
45
- - [ ] 순환 의존성 없음?
46
- - [ ] 타입 전용 import (import type)?
47
- - [ ] 사용하지 않는 import?
44
+ - [ ] Barrel exports used?
45
+ - [ ] No circular dependencies?
46
+ - [ ] Type-only import (import type)?
47
+ - [ ] Unused imports?
48
48
 
49
49
  ### Performance
50
- - [ ] 불필요한 리렌더링?
51
- - [ ] 메모이제이션 (useMemo, useCallback)?
52
- - [ ] 번들 사이즈 영향?
53
- - [ ] 동적 import 활용?
50
+ - [ ] Unnecessary re-renders?
51
+ - [ ] Memoization (useMemo, useCallback)?
52
+ - [ ] Bundle size impact?
53
+ - [ ] Dynamic import utilized?
54
54
 
55
55
  ## Framework Specific
56
56
 
57
57
  ### React
58
- - [ ] 훅 규칙 준수 (Rules of Hooks)?
59
- - [ ] 의존성 배열 완전?
60
- - [ ] key prop 적절?
61
- - [ ] 컴포넌트 분리 적절?
62
- - [ ] 상태 관리 적절?
58
+ - [ ] Rules of Hooks followed?
59
+ - [ ] Dependency array complete?
60
+ - [ ] Key prop appropriate?
61
+ - [ ] Component separation appropriate?
62
+ - [ ] State management appropriate?
63
63
 
64
64
  ### Node.js/Express
65
- - [ ] async 에러 미들웨어?
66
- - [ ] 입력 검증 (zod, joi)?
67
- - [ ] 환경 변수 타입 안전?
68
- - [ ] 로깅 적절?
65
+ - [ ] Async error middleware?
66
+ - [ ] Input validation (zod, joi)?
67
+ - [ ] Environment variables type-safe?
68
+ - [ ] Logging appropriate?
69
69
 
70
70
  ### Next.js
71
- - [ ] App Router 패턴?
72
- - [ ] Server/Client 컴포넌트 구분?
73
- - [ ] 메타데이터 설정?
74
- - [ ] 이미지 최적화?
71
+ - [ ] App Router patterns?
72
+ - [ ] Server/Client component distinction?
73
+ - [ ] Metadata configuration?
74
+ - [ ] Image optimization?
75
75
 
76
76
  ## Output Format
77
77
 
@@ -136,17 +136,17 @@ After analysis:
136
136
  ```
137
137
  ## Next Steps
138
138
 
139
- 개발을 진행하려면 워크플로우를 선택하세요:
139
+ Choose a workflow to proceed with development:
140
140
 
141
- | 작업 규모 | 권장 방식 |
141
+ | Task Scope | Recommended Approach |
142
142
  |----------|----------|
143
- | 간단한 수정 (1-2 파일) | Plan Mode |
144
- | 복잡한 기능 (3+ 파일, 리서치/검증 필요) | /vibe.spec |
143
+ | Simple fix (1-2 files) | Plan Mode |
144
+ | Complex feature (3+ files, research/verification needed) | /vibe.spec |
145
145
 
146
- 1. `/vibe.spec "feature-name"` - VIBE 워크플로우 (병렬 리서치 + SPEC 검증)
147
- 2. Plan Mode - 빠른 구현 (간단한 작업용)
146
+ 1. `/vibe.spec "feature-name"` - VIBE workflow (parallel research + SPEC verification)
147
+ 2. Plan Mode - Quick implementation (for simple tasks)
148
148
 
149
- 어떤 방식으로 진행할까요?
149
+ Which approach would you like to use?
150
150
  ```
151
151
 
152
152
  3. Wait for user's choice before proceeding
@@ -257,4 +257,100 @@ node -e "import('@su-record/vibe/tools').then(t => t.saveMemory({key: 'analysis-
257
257
 
258
258
  ---
259
259
 
260
+ ## Quality Gate (Mandatory)
261
+
262
+ ### Analysis Quality Checklist
263
+
264
+ Before completing analysis, ALL items must be checked:
265
+
266
+ | Category | Check Item | Weight |
267
+ |----------|------------|--------|
268
+ | **Completeness** | All related files identified | 20% |
269
+ | **Completeness** | All API endpoints documented | 15% |
270
+ | **Completeness** | All data models mapped | 15% |
271
+ | **Accuracy** | File paths verified to exist | 10% |
272
+ | **Accuracy** | Line numbers accurate | 10% |
273
+ | **Depth** | Business logic explained | 10% |
274
+ | **Depth** | Dependencies mapped | 10% |
275
+ | **Actionability** | Next steps clearly defined | 10% |
276
+
277
+ ### Analysis Score Calculation
278
+
279
+ ```
280
+ Score = Σ(checked items × weight) / 100
281
+
282
+ Grades:
283
+ - 95-100: ✅ EXCELLENT - Comprehensive analysis
284
+ - 85-94: ✅ GOOD - Ready for development
285
+ - 70-84: ⚠️ FAIR - Needs more exploration
286
+ - 0-69: ❌ POOR - Incomplete, re-analyze
287
+ ```
288
+
289
+ ### Analysis Depth Levels
290
+
291
+ | Level | Scope | Output |
292
+ |-------|-------|--------|
293
+ | **L1: Surface** | File names, basic structure | File list only |
294
+ | **L2: Structure** | Functions, classes, imports | Structure map |
295
+ | **L3: Logic** | Business logic, data flow | Flow diagrams |
296
+ | **L4: Deep** | Edge cases, dependencies, risks | Full analysis |
297
+
298
+ **Minimum required: L3 for feature analysis, L2 for project overview**
299
+
300
+ ### Analysis Output Requirements
301
+
302
+ Every analysis MUST include:
303
+
304
+ 1. **Overview Section**
305
+ - Feature description (1 sentence)
306
+ - Implementation status (Complete/In progress/Not implemented)
307
+ - Related file count
308
+
309
+ 2. **Structure Section**
310
+ - API endpoints table (Method, Path, Description, Auth)
311
+ - Core services list with key methods
312
+ - Data models with fields and relationships
313
+
314
+ 3. **Reference File List**
315
+ - Absolute or relative paths
316
+ - Line number ranges for key sections
317
+ - Brief description per file
318
+
319
+ 4. **Next Steps**
320
+ - Workflow choice prompt (Plan Mode vs VIBE)
321
+ - Specific action items if applicable
322
+
323
+ ### Forbidden Incomplete Patterns
324
+
325
+ | Pattern | Issue | Required Fix |
326
+ |---------|-------|--------------|
327
+ | "and more..." | Incomplete list | List all items |
328
+ | "etc." | Vague scope | Be specific |
329
+ | "related files" without list | Missing details | Provide file paths |
330
+ | Missing line numbers | Hard to navigate | Add `:L10-50` format |
331
+ | No auth info on endpoints | Security gap | Always specify auth |
332
+
333
+ ### Code Quality Analysis Thresholds
334
+
335
+ When running `--code` analysis:
336
+
337
+ | Metric | Good | Warning | Critical |
338
+ |--------|------|---------|----------|
339
+ | Avg Complexity | ≤10 | 11-15 | >15 |
340
+ | Max Function Length | ≤30 | 31-50 | >50 |
341
+ | High Complexity Files | 0 | 1-3 | >3 |
342
+ | Circular Dependencies | 0 | 1 | >1 |
343
+
344
+ ### Dependency Analysis Thresholds
345
+
346
+ When running `--deps` analysis:
347
+
348
+ | Metric | Good | Warning | Critical |
349
+ |--------|------|---------|----------|
350
+ | Outdated Packages | 0-3 | 4-10 | >10 |
351
+ | Security Vulnerabilities | 0 | 1-2 (low) | Any high/critical |
352
+ | Major Version Behind | 0 | 1-2 | >2 |
353
+
354
+ ---
355
+
260
356
  ARGUMENTS: $ARGUMENTS
@@ -220,4 +220,110 @@ node -e "import('@su-record/vibe/tools').then(t => t.saveMemory({key: 'hypothesi
220
220
 
221
221
  ---
222
222
 
223
+ ## Quality Gate (Mandatory)
224
+
225
+ ### Reasoning Quality Checklist
226
+
227
+ Before completing reasoning analysis, ALL steps must be verified:
228
+
229
+ | Step | Check Item | Weight |
230
+ |------|------------|--------|
231
+ | **Step 1** | Logical dependencies and constraints identified | 10% |
232
+ | **Step 2** | Risk assessment completed with rollback plan | 10% |
233
+ | **Step 3** | At least 3 hypotheses generated with likelihood | 15% |
234
+ | **Step 4** | Verification method defined for each hypothesis | 10% |
235
+ | **Step 5** | All available tools and resources listed | 10% |
236
+ | **Step 6** | Evidence cited with exact sources | 15% |
237
+ | **Step 7** | All alternatives explored | 10% |
238
+ | **Step 8** | Error handling strategy defined | 10% |
239
+ | **Step 9** | Action plan documented before execution | 10% |
240
+
241
+ ### Reasoning Score Calculation
242
+
243
+ ```
244
+ Score = (completed_steps / 9) × 100
245
+
246
+ Grades:
247
+ - 9/9 (100%): ✅ THOROUGH - Ready to act
248
+ - 7-8/9 (78-89%): ⚠️ ADEQUATE - Minor gaps
249
+ - 5-6/9 (56-67%): ❌ INCOMPLETE - More analysis needed
250
+ - <5/9 (<56%): ❌ INSUFFICIENT - Start over
251
+ ```
252
+
253
+ ### Hypothesis Quality Standards
254
+
255
+ Each hypothesis MUST include:
256
+
257
+ | Component | Requirement | Example |
258
+ |-----------|-------------|---------|
259
+ | **Description** | Clear, testable statement | "Session data is incomplete due to race condition" |
260
+ | **Likelihood** | High/Medium/Low with justification | "High - intermittent = timing issue" |
261
+ | **Evidence** | Supporting observations | "Error only on concurrent logins" |
262
+ | **Verification** | Specific test method | "Add logging to session.save()" |
263
+ | **Disproof criteria** | What would rule it out | "Logs show complete data every time" |
264
+
265
+ ### Minimum Hypothesis Count
266
+
267
+ | Problem Complexity | Minimum Hypotheses |
268
+ |--------------------|-------------------|
269
+ | Simple (single component) | 2 |
270
+ | Medium (cross-component) | 3 |
271
+ | Complex (system-wide) | 5 |
272
+
273
+ ### Evidence Standards
274
+
275
+ All claims MUST include:
276
+
277
+ | Evidence Type | Required Format |
278
+ |---------------|-----------------|
279
+ | Code reference | `filename.ts:L42` |
280
+ | Log/metric | Exact value with timestamp |
281
+ | Documentation | Document name + section |
282
+ | Prior knowledge | Memory key or conversation reference |
283
+
284
+ ### Risk Assessment Matrix
285
+
286
+ | Risk Level | Rollback Required | Approval Required |
287
+ |------------|-------------------|-------------------|
288
+ | **Low** | Optional | No |
289
+ | **Medium** | Yes, automated | No |
290
+ | **High** | Yes, tested | User confirmation |
291
+ | **Critical** | Yes, verified | User + backup plan |
292
+
293
+ ### Forbidden Reasoning Patterns
294
+
295
+ | Pattern | Issue | Required Fix |
296
+ |---------|-------|--------------|
297
+ | "Probably X" without evidence | Unsubstantiated claim | Add supporting evidence |
298
+ | Single hypothesis | Tunnel vision | Generate alternatives |
299
+ | Skipping risk assessment | Dangerous changes | Always assess risk |
300
+ | "I think" without verification | Assumption | Verify before claiming |
301
+ | Acting before reasoning complete | Premature action | Complete all 9 steps |
302
+
303
+ ### Reasoning Output Requirements
304
+
305
+ Every reasoning analysis MUST include:
306
+
307
+ 1. **Problem Statement**
308
+ - Clear description
309
+ - Context and constraints
310
+ - Steps applied count (X/9)
311
+
312
+ 2. **Hypothesis Table**
313
+ - Ranked by likelihood
314
+ - All 5 components per hypothesis
315
+ - Verification status
316
+
317
+ 3. **Risk Assessment**
318
+ - Risk level classification
319
+ - Rollback possibility
320
+ - Approval requirements
321
+
322
+ 4. **Recommended Actions**
323
+ - Immediate (low risk, high confidence)
324
+ - Short-term (medium priority)
325
+ - Long-term (systemic fix)
326
+
327
+ ---
328
+
223
329
  ARGUMENTS: $ARGUMENTS
@@ -101,35 +101,35 @@ P3 NICE-TO-HAVE (Enhancement) - N issues
101
101
 
102
102
  ### Phase 5: Auto-Fix (P1/P2)
103
103
 
104
- **자동 수정 가능한 이슈는 바로 해결:**
104
+ **Auto-fixable issues are resolved immediately:**
105
105
 
106
106
  ```
107
- 🔧 AUTO-FIX 시작...
107
+ 🔧 AUTO-FIX Starting...
108
108
 
109
109
  P1 Critical:
110
- 1. [SECURITY] SQL Injection → parameterized query 수정
111
- 2. [DATA] Transaction rollback 누락 → try-finally 추가
110
+ 1. [SECURITY] SQL Injection → Fixed with parameterized query ✅
111
+ 2. [DATA] Missing transaction rollback → Added try-finally ✅
112
112
 
113
113
  P2 Important:
114
- 3. [PERF] N+1 query → select_related 추가
115
- 4. [ARCH] Circular dependency → 의존성 분리
116
- 5. [TEST] Missing edge case → 테스트 추가
114
+ 3. [PERF] N+1 query → Added select_related ✅
115
+ 4. [ARCH] Circular dependency → Separated dependencies
116
+ 5. [TEST] Missing edge case → Added test
117
117
 
118
- 🔍 재검증 중...
119
- 빌드 성공
120
- 테스트 통과
118
+ 🔍 Re-validating...
119
+ Build successful
120
+ Tests passed
121
121
 
122
- ✅ 5 이슈 자동 수정 완료!
122
+ ✅ 5 issues auto-fixed!
123
123
  ```
124
124
 
125
- **자동 수정 불가능한 경우:**
126
- - 아키텍처 대규모 변경 필요
127
- - 비즈니스 로직 결정 필요
128
- - 사용자 확인 필요한 경우
125
+ **Cases that cannot be auto-fixed:**
126
+ - Requires large-scale architecture changes
127
+ - Requires business logic decisions
128
+ - Requires user confirmation
129
129
 
130
- Phase 6에서 수동 처리 안내
130
+ Manual handling instructions in Phase 6
131
131
 
132
- ### Phase 6: Todo File Creation (수동 처리 필요 항목)
132
+ ### Phase 6: Todo File Creation (Items Requiring Manual Handling)
133
133
 
134
134
  Save **remaining** findings to `.claude/vibe/todos/`:
135
135
 
@@ -137,8 +137,8 @@ Save **remaining** findings to `.claude/vibe/todos/`:
137
137
  {priority}-{category}-{short-desc}.md
138
138
 
139
139
  Examples:
140
- - P2-arch-large-refactor.md (자동 수정 불가)
141
- - P3-style-extract-helper.md (백로그)
140
+ - P2-arch-large-refactor.md (Cannot be auto-fixed)
141
+ - P3-style-extract-helper.md (Backlog)
142
142
  ```
143
143
 
144
144
  ## Output
@@ -149,12 +149,12 @@ PR #123: Add user authentication
149
149
 
150
150
  Reviewers: 13 agents | Duration: 45s
151
151
 
152
- Score: 92/100 (Good) ← 자동 수정 후 점수
152
+ Score: 92/100 (Good) ← Score after auto-fix
153
153
 
154
154
  Issues Found:
155
- - P1 Critical: 2 → 0 (✅ 자동 수정)
156
- - P2 Important: 5 → 1 (✅ 4 자동 수정)
157
- - P3 Nice-to-have: 3 (백로그)
155
+ - P1 Critical: 2 → 0 (✅ Auto-fixed)
156
+ - P2 Important: 5 → 1 (✅ 4 auto-fixed)
157
+ - P3 Nice-to-have: 3 (Backlog)
158
158
 
159
159
  Auto-Fixed: 6 issues
160
160
  - [SECURITY] SQL Injection ✅
@@ -164,32 +164,32 @@ Auto-Fixed: 6 issues
164
164
  - [PERF] Unnecessary loop ✅
165
165
  - [TEST] Missing edge case ✅
166
166
 
167
- Remaining (수동 처리 필요):
168
- - P2-arch-large-refactor.md (아키텍처 결정 필요)
169
- - P3-style-extract-helper.md (백로그)
170
- - P3-docs-add-readme.md (백로그)
167
+ Remaining (Manual handling required):
168
+ - P2-arch-large-refactor.md (Architecture decision required)
169
+ - P3-style-extract-helper.md (Backlog)
170
+ - P3-docs-add-readme.md (Backlog)
171
171
 
172
- ✅ MERGE READY (P1/P2 해결됨)
172
+ ✅ MERGE READY (P1/P2 resolved)
173
173
  ```
174
174
 
175
- ### Phase 7: Guide to Fix Workflow (수동 처리 항목)
175
+ ### Phase 7: Guide to Fix Workflow (Manual Handling Items)
176
176
 
177
- **남은 이슈 처리 워크플로우 선택:**
177
+ **Choose workflow when handling remaining issues:**
178
178
 
179
179
  ```
180
180
  ## Fix Workflow
181
181
 
182
- 발견된 이슈를 수정하려면 워크플로우를 선택하세요:
182
+ Choose a workflow to fix the discovered issues:
183
183
 
184
- | 작업 규모 | 권장 방식 |
185
- |----------|----------|
186
- | 간단한 수정 (1-2 파일) | Plan Mode |
187
- | 복잡한 수정 (3+ 파일, 검증 필요) | /vibe.spec |
184
+ | Task Scale | Recommended Approach |
185
+ |------------|---------------------|
186
+ | Simple fix (1-2 files) | Plan Mode |
187
+ | Complex fix (3+ files, validation needed) | /vibe.spec |
188
188
 
189
- 1. `/vibe.spec "fix: issue-name"` - VIBE 워크플로우 (SPEC 검증 + 재리뷰)
190
- 2. Plan Mode - 빠른 수정 (간단한 작업용)
189
+ 1. `/vibe.spec "fix: issue-name"` - VIBE workflow (SPEC validation + re-review)
190
+ 2. Plan Mode - Quick fix (for simple tasks)
191
191
 
192
- 어떤 방식으로 진행할까요?
192
+ Which approach would you like to proceed with?
193
193
  ```
194
194
 
195
195
  - Wait for user's choice before proceeding
@@ -238,4 +238,89 @@ node -e "import('@su-record/vibe/tools').then(t => t.saveMemory({key: 'review-pr
238
238
 
239
239
  ---
240
240
 
241
+ ## Quality Gate (Mandatory)
242
+
243
+ ### Review Quality Checklist
244
+
245
+ Before completing review, ALL items must be verified:
246
+
247
+ | Category | Check Item | Weight |
248
+ |----------|------------|--------|
249
+ | **Security** | OWASP Top 10 vulnerabilities scanned | 20% |
250
+ | **Security** | Authentication/authorization verified | 10% |
251
+ | **Security** | Sensitive data exposure checked | 10% |
252
+ | **Performance** | N+1 queries detected and flagged | 10% |
253
+ | **Performance** | Memory leaks checked | 5% |
254
+ | **Architecture** | Layer violations detected | 10% |
255
+ | **Architecture** | Circular dependencies checked | 5% |
256
+ | **Code Quality** | Complexity limits enforced | 10% |
257
+ | **Code Quality** | Forbidden patterns detected | 10% |
258
+ | **Testing** | Test coverage gaps identified | 5% |
259
+ | **Documentation** | Public API documentation checked | 5% |
260
+
261
+ ### Review Score Calculation
262
+
263
+ ```
264
+ Score = 100 - (P1 × 20) - (P2 × 5) - (P3 × 1)
265
+
266
+ Grades:
267
+ - 95-100: ✅ EXCELLENT - Merge ready
268
+ - 85-94: ✅ GOOD - Minor fixes recommended
269
+ - 70-84: ⚠️ FAIR - Must fix P2 issues
270
+ - 0-69: ❌ POOR - Block merge, fix P1/P2
271
+ ```
272
+
273
+ ### Merge Decision Matrix
274
+
275
+ | P1 Count | P2 Count | Decision |
276
+ |----------|----------|----------|
277
+ | 0 | 0-2 | ✅ MERGE READY |
278
+ | 0 | 3+ | ⚠️ FIX P2 FIRST |
279
+ | 1+ | Any | ❌ BLOCKED |
280
+
281
+ ### Auto-Fix Capability Matrix
282
+
283
+ | Issue Type | Auto-Fixable | Method |
284
+ |------------|--------------|--------|
285
+ | SQL Injection | ✅ Yes | Parameterized query |
286
+ | Missing transaction | ✅ Yes | Add try-finally |
287
+ | N+1 query | ✅ Yes | Add eager loading |
288
+ | Circular dependency | ⚠️ Partial | Suggest restructure |
289
+ | Missing tests | ✅ Yes | Generate test skeleton |
290
+ | Hardcoded secrets | ❌ No | Flag for manual review |
291
+ | Architecture violation | ❌ No | Suggest refactoring plan |
292
+
293
+ ### Forbidden Patterns (P1 Critical)
294
+
295
+ | Pattern | Risk Level | Detection Method |
296
+ |---------|------------|------------------|
297
+ | Hardcoded credentials | Critical | Regex + entropy scan |
298
+ | SQL string concatenation | Critical | AST analysis |
299
+ | `eval()` or `exec()` | Critical | AST analysis |
300
+ | Disabled CSRF protection | Critical | Config scan |
301
+ | Debug mode in production | Critical | Config scan |
302
+ | Unvalidated redirects | High | URL pattern scan |
303
+
304
+ ### Review Output Requirements
305
+
306
+ Every review MUST produce:
307
+
308
+ 1. **Summary Statistics**
309
+ - Total issues by priority (P1/P2/P3)
310
+ - Auto-fixed count
311
+ - Remaining manual fixes
312
+
313
+ 2. **Detailed Findings**
314
+ - File path and line number
315
+ - Issue description
316
+ - Recommended fix
317
+ - Auto-fix status (applied/pending/manual)
318
+
319
+ 3. **Quality Score**
320
+ - Numerical score (0-100)
321
+ - Grade (EXCELLENT/GOOD/FAIR/POOR)
322
+ - Merge recommendation
323
+
324
+ ---
325
+
241
326
  ARGUMENTS: $ARGUMENTS