@su-record/vibe 2.2.2 → 2.2.3

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 (81) hide show
  1. package/.claude/settings.json +152 -152
  2. package/.claude/vibe/constitution.md +184 -184
  3. package/.claude/vibe/rules/core/communication-guide.md +104 -104
  4. package/.claude/vibe/rules/core/development-philosophy.md +52 -52
  5. package/.claude/vibe/rules/core/quick-start.md +120 -120
  6. package/.claude/vibe/rules/quality/bdd-contract-testing.md +388 -388
  7. package/.claude/vibe/rules/quality/checklist.md +276 -276
  8. package/.claude/vibe/rules/quality/testing-strategy.md +437 -437
  9. package/.claude/vibe/rules/standards/anti-patterns.md +369 -369
  10. package/.claude/vibe/rules/standards/code-structure.md +291 -291
  11. package/.claude/vibe/rules/standards/complexity-metrics.md +312 -312
  12. package/.claude/vibe/rules/standards/naming-conventions.md +198 -198
  13. package/.claude/vibe/setup.sh +31 -31
  14. package/CLAUDE.md +323 -323
  15. package/LICENSE +21 -21
  16. package/README.md +724 -721
  17. package/agents/explorer.md +48 -0
  18. package/agents/implementer.md +53 -0
  19. package/agents/research/best-practices-agent.md +139 -0
  20. package/agents/research/codebase-patterns-agent.md +147 -0
  21. package/agents/research/framework-docs-agent.md +181 -0
  22. package/agents/research/security-advisory-agent.md +167 -0
  23. package/agents/review/architecture-reviewer.md +107 -0
  24. package/agents/review/complexity-reviewer.md +116 -0
  25. package/agents/review/data-integrity-reviewer.md +88 -0
  26. package/agents/review/git-history-reviewer.md +103 -0
  27. package/agents/review/performance-reviewer.md +86 -0
  28. package/agents/review/python-reviewer.md +152 -0
  29. package/agents/review/rails-reviewer.md +139 -0
  30. package/agents/review/react-reviewer.md +144 -0
  31. package/agents/review/security-reviewer.md +80 -0
  32. package/agents/review/simplicity-reviewer.md +140 -0
  33. package/agents/review/test-coverage-reviewer.md +116 -0
  34. package/agents/review/typescript-reviewer.md +127 -0
  35. package/agents/searcher.md +54 -0
  36. package/agents/simplifier.md +119 -0
  37. package/agents/tester.md +49 -0
  38. package/commands/vibe.analyze.md +239 -0
  39. package/commands/vibe.compound.md +261 -0
  40. package/commands/vibe.continue.md +88 -0
  41. package/commands/vibe.diagram.md +178 -0
  42. package/commands/vibe.e2e.md +266 -0
  43. package/commands/vibe.reason.md +306 -0
  44. package/commands/vibe.review.md +324 -0
  45. package/commands/vibe.run.md +836 -0
  46. package/commands/vibe.setup.md +97 -0
  47. package/commands/vibe.spec.md +383 -0
  48. package/commands/vibe.ui.md +137 -0
  49. package/commands/vibe.verify.md +238 -0
  50. package/dist/cli/index.js +389 -389
  51. package/dist/cli/index.js.map +1 -1
  52. package/dist/lib/MemoryManager.js +92 -92
  53. package/dist/lib/PythonParser.js +108 -108
  54. package/dist/lib/gemini-mcp.js +15 -15
  55. package/dist/lib/gemini-oauth.js +35 -35
  56. package/dist/lib/gpt-mcp.js +17 -17
  57. package/dist/lib/gpt-oauth.js +44 -44
  58. package/dist/tools/analytics/getUsageAnalytics.js +12 -12
  59. package/dist/tools/memory/createMemoryTimeline.js +10 -10
  60. package/dist/tools/memory/getMemoryGraph.js +12 -12
  61. package/dist/tools/memory/getSessionContext.js +9 -9
  62. package/dist/tools/memory/linkMemories.js +14 -14
  63. package/dist/tools/memory/listMemories.js +4 -4
  64. package/dist/tools/memory/recallMemory.js +4 -4
  65. package/dist/tools/memory/saveMemory.js +4 -4
  66. package/dist/tools/memory/searchMemoriesAdvanced.js +22 -22
  67. package/dist/tools/planning/generatePrd.js +46 -46
  68. package/dist/tools/prompt/enhancePromptGemini.js +160 -160
  69. package/dist/tools/reasoning/applyReasoningFramework.js +56 -56
  70. package/dist/tools/semantic/analyzeDependencyGraph.js +12 -12
  71. package/package.json +69 -66
  72. package/skills/git-worktree.md +178 -0
  73. package/skills/priority-todos.md +236 -0
  74. package/templates/constitution-template.md +184 -184
  75. package/templates/contract-backend-template.md +517 -517
  76. package/templates/contract-frontend-template.md +594 -594
  77. package/templates/feature-template.md +96 -96
  78. package/templates/hooks-template.json +103 -103
  79. package/templates/spec-template.md +199 -199
  80. package/.claude/vibe/rules/tools/mcp-hi-ai-guide.md +0 -665
  81. package/.claude/vibe/rules/tools/mcp-workflow.md +0 -51
@@ -0,0 +1,167 @@
1
+ # Security Advisory Research Agent
2
+
3
+ 보안 권고 리서치 에이전트
4
+
5
+ ## Role
6
+
7
+ - 보안 취약점 조회
8
+ - 패키지 보안 검사
9
+ - 보안 베스트 프랙티스
10
+ - 규정 준수 확인
11
+
12
+ ## Model
13
+
14
+ **Haiku** (inherit) - 빠른 리서치
15
+
16
+ ## Usage
17
+
18
+ `/vibe.spec` 실행 시 자동으로 병렬 호출됨
19
+
20
+ ```
21
+ Task(
22
+ model: "haiku",
23
+ subagent_type: "Explore",
24
+ prompt: "Research security advisories for [feature]. Check OWASP, CVEs."
25
+ )
26
+ ```
27
+
28
+ ## Research Areas
29
+
30
+ ### OWASP Top 10 (2021)
31
+ ```
32
+ A01: Broken Access Control
33
+ A02: Cryptographic Failures
34
+ A03: Injection
35
+ A04: Insecure Design
36
+ A05: Security Misconfiguration
37
+ A06: Vulnerable Components
38
+ A07: Authentication Failures
39
+ A08: Software Integrity Failures
40
+ A09: Logging Failures
41
+ A10: SSRF
42
+ ```
43
+
44
+ ### Package Security
45
+ ```
46
+ npm audit
47
+ pip-audit
48
+ bundler-audit
49
+ safety check (Python)
50
+ ```
51
+
52
+ ### Compliance
53
+ ```
54
+ GDPR:
55
+ ├── 데이터 최소화
56
+ ├── 동의 관리
57
+ ├── 삭제권
58
+ └── 데이터 이전
59
+
60
+ PCI-DSS:
61
+ ├── 카드 데이터 암호화
62
+ ├── 접근 제어
63
+ ├── 로깅
64
+ └── 취약점 관리
65
+ ```
66
+
67
+ ## Output Format
68
+
69
+ ```markdown
70
+ ## 🔐 Security Advisory Research
71
+
72
+ ### Feature: [feature-name]
73
+
74
+ ### Relevant Security Considerations
75
+
76
+ 1. **OWASP A03: Injection**
77
+ - Risk: SQL/NoSQL injection
78
+ - Mitigation:
79
+ - Use parameterized queries
80
+ - Validate all user input
81
+ - Use ORM safely
82
+
83
+ 2. **OWASP A07: Authentication Failures**
84
+ - Risk: Credential stuffing, weak passwords
85
+ - Mitigation:
86
+ - Rate limiting
87
+ - Strong password policy
88
+ - MFA support
89
+
90
+ ### Known Vulnerabilities
91
+
92
+ | Package | Version | CVE | Severity | Fix |
93
+ |---------|---------|-----|----------|-----|
94
+ | lodash | <4.17.21 | CVE-2021-23337 | High | Upgrade |
95
+ | axios | <0.21.1 | CVE-2020-28168 | Medium | Upgrade |
96
+
97
+ ### Security Checklist
98
+
99
+ - [ ] Input validation on all user inputs
100
+ - [ ] Output encoding for XSS prevention
101
+ - [ ] Parameterized queries for SQL
102
+ - [ ] HTTPS enforced
103
+ - [ ] Sensitive data encrypted at rest
104
+ - [ ] Proper error handling (no stack traces)
105
+ - [ ] Rate limiting implemented
106
+ - [ ] CSRF protection enabled
107
+ - [ ] Security headers configured
108
+
109
+ ### Compliance Requirements
110
+
111
+ For [payment feature]:
112
+ - [ ] PCI-DSS: Never store CVV
113
+ - [ ] PCI-DSS: Encrypt card numbers
114
+ - [ ] GDPR: User consent for data processing
115
+
116
+ ### Recommended Security Libraries
117
+
118
+ | Purpose | Library | Notes |
119
+ |---------|---------|-------|
120
+ | Password Hashing | bcrypt/argon2 | Use high work factor |
121
+ | JWT | jose | Well-maintained |
122
+ | Input Validation | zod/pydantic | Type-safe |
123
+ | Rate Limiting | express-rate-limit | Configurable |
124
+
125
+ ### References
126
+
127
+ - OWASP Cheat Sheets: [url]
128
+ - CWE Database: [url]
129
+ ```
130
+
131
+ ## External LLM Enhancement (Optional)
132
+
133
+ **GPT 활성화 시** CVE/보안 취약점 DB 지식 보강:
134
+
135
+ ```text
136
+ Primary: Task(Haiku) + OWASP/CVE 검색
137
+
138
+ [GPT enabled?]
139
+ ↓ YES
140
+ mcp__vibe-gpt__gpt_chat(
141
+ prompt: "Security vulnerabilities for [feature]. Check recent CVEs, OWASP risks.",
142
+ systemPrompt: "You are a security expert. Provide CVE details and mitigations."
143
+ )
144
+
145
+ 결과 병합 → SPEC Constraints 반영
146
+ ```
147
+
148
+ **활용 시점:**
149
+ - 최신 CVE 정보 필요 시
150
+ - 특정 라이브러리 취약점 확인 시
151
+ - 규정 준수(PCI-DSS, GDPR) 상세 검토 시
152
+
153
+ **GPT 미설정 시:** Primary만으로 정상 작동
154
+
155
+ ## Integration with /vibe.spec
156
+
157
+ ```text
158
+ /vibe.spec "결제 기능"
159
+
160
+ → security-advisory-agent 실행:
161
+ "Research security for payment processing. Check PCI-DSS, OWASP."
162
+
163
+ → 결과를 SPEC에 반영:
164
+ - 보안 요구사항
165
+ - 필수 체크리스트
166
+ - 규정 준수 항목
167
+ ```
@@ -0,0 +1,107 @@
1
+ # Architecture Reviewer Agent
2
+
3
+ 아키텍처 설계 전문 리뷰 에이전트
4
+
5
+ ## Role
6
+
7
+ - 레이어 위반 감지
8
+ - 순환 의존성 탐지
9
+ - SOLID 원칙 검증
10
+ - 패턴 일관성 검사
11
+
12
+ ## Model
13
+
14
+ **Haiku** (inherit) - 빠른 병렬 실행
15
+
16
+ ## Checklist
17
+
18
+ ### Layer Violations
19
+ - [ ] Controller에서 직접 DB 접근?
20
+ - [ ] Service에서 HTTP 응답 생성?
21
+ - [ ] Model에서 비즈니스 로직?
22
+ - [ ] Util에서 외부 의존성?
23
+
24
+ ### Circular Dependencies
25
+ - [ ] 모듈 간 순환 import?
26
+ - [ ] 서비스 간 상호 참조?
27
+ - [ ] 패키지 간 순환?
28
+
29
+ ### SOLID Principles
30
+ - [ ] Single Responsibility: 하나의 역할?
31
+ - [ ] Open/Closed: 확장에 열림?
32
+ - [ ] Liskov Substitution: 대체 가능?
33
+ - [ ] Interface Segregation: 인터페이스 분리?
34
+ - [ ] Dependency Inversion: 추상화 의존?
35
+
36
+ ### Consistency
37
+ - [ ] 기존 패턴과 일치?
38
+ - [ ] 네이밍 컨벤션 준수?
39
+ - [ ] 디렉토리 구조 일관성?
40
+ - [ ] 에러 처리 패턴?
41
+
42
+ ### Coupling & Cohesion
43
+ - [ ] 느슨한 결합?
44
+ - [ ] 높은 응집도?
45
+ - [ ] 의존성 주입 사용?
46
+ - [ ] 인터페이스 정의?
47
+
48
+ ### Scalability
49
+ - [ ] 상태 관리 적절?
50
+ - [ ] 수평 확장 가능?
51
+ - [ ] 병목점 존재?
52
+ - [ ] 캐시 레이어?
53
+
54
+ ## Output Format
55
+
56
+ ```markdown
57
+ ## 🏗️ Architecture Review
58
+
59
+ ### 🔴 P1 Critical
60
+ 1. **Circular Dependency Detected**
61
+ - 📍 Location:
62
+ - src/services/user.py → src/services/order.py
63
+ - src/services/order.py → src/services/user.py
64
+ - 💡 Fix: Extract shared logic to src/services/common.py
65
+
66
+ ### 🟡 P2 Important
67
+ 2. **Layer Violation**
68
+ - 📍 Location: src/controllers/api.py:45
69
+ - 🚫 Controller directly accessing database
70
+ - 💡 Fix: Move to service layer
71
+
72
+ ### 🔵 P3 Suggestions
73
+ 3. **Consider Dependency Injection**
74
+ - 📍 Location: src/services/payment.py
75
+ - 💡 Inject PaymentGateway instead of importing
76
+ ```
77
+
78
+ ## Dependency Graph
79
+
80
+ 필요시 의존성 그래프 생성:
81
+
82
+ ```
83
+ ┌─────────────┐ ┌─────────────┐
84
+ │ Controller │────▶│ Service │
85
+ └─────────────┘ └─────────────┘
86
+
87
+
88
+ ┌─────────────┐
89
+ │ Repository │
90
+ └─────────────┘
91
+
92
+ ❌ Violation │
93
+
94
+ ┌─────────────┐
95
+ │ Database │
96
+ └─────────────┘
97
+ ```
98
+
99
+ ## Usage
100
+
101
+ ```
102
+ Task(
103
+ model: "haiku",
104
+ subagent_type: "Explore",
105
+ prompt: "Architecture review for [files]. Check layers, dependencies, SOLID."
106
+ )
107
+ ```
@@ -0,0 +1,116 @@
1
+ # Complexity Reviewer Agent
2
+
3
+ 코드 복잡도 전문 리뷰 에이전트
4
+
5
+ ## Role
6
+
7
+ - Cyclomatic complexity 검사
8
+ - 함수/클래스 길이 제한
9
+ - 중첩 깊이 분석
10
+ - 인지적 복잡도 평가
11
+
12
+ ## Model
13
+
14
+ **Haiku** (inherit) - 빠른 병렬 실행
15
+
16
+ ## Metrics & Thresholds
17
+
18
+ ### Function Level
19
+ | Metric | Good | Warning | Critical |
20
+ |--------|------|---------|----------|
21
+ | Lines | ≤20 | 21-40 | >40 |
22
+ | Cyclomatic | ≤10 | 11-15 | >15 |
23
+ | Parameters | ≤4 | 5-6 | >6 |
24
+ | Nesting | ≤3 | 4 | >4 |
25
+
26
+ ### Class Level
27
+ | Metric | Good | Warning | Critical |
28
+ |--------|------|---------|----------|
29
+ | Lines | ≤200 | 201-400 | >400 |
30
+ | Methods | ≤10 | 11-15 | >15 |
31
+ | Dependencies | ≤5 | 6-8 | >8 |
32
+
33
+ ### File Level
34
+ | Metric | Good | Warning | Critical |
35
+ |--------|------|---------|----------|
36
+ | Lines | ≤300 | 301-500 | >500 |
37
+ | Functions | ≤15 | 16-25 | >25 |
38
+ | Imports | ≤15 | 16-20 | >20 |
39
+
40
+ ## Checklist
41
+
42
+ ### Cognitive Load
43
+ - [ ] 함수 이름이 동작을 명확히 설명?
44
+ - [ ] 조건문이 너무 복잡?
45
+ - [ ] 매직 넘버/스트링 사용?
46
+ - [ ] 주석 없이 이해 가능?
47
+
48
+ ### Refactoring Signals
49
+ - [ ] 중복 코드 블록?
50
+ - [ ] 긴 파라미터 리스트?
51
+ - [ ] Feature envy (다른 클래스 메서드 과다 호출)?
52
+ - [ ] God class/function?
53
+
54
+ ### Simplification Opportunities
55
+ - [ ] Early return 적용 가능?
56
+ - [ ] Guard clause 사용 가능?
57
+ - [ ] 삼항 연산자로 단순화?
58
+ - [ ] 헬퍼 함수 추출?
59
+
60
+ ## Output Format
61
+
62
+ ```markdown
63
+ ## 🧮 Complexity Review
64
+
65
+ ### 🔴 P1 Critical
66
+ 1. **Function Too Complex**
67
+ - 📍 Location: src/services/order.py:process_order()
68
+ - 📊 Metrics:
69
+ - Lines: 85 (limit: 40)
70
+ - Cyclomatic: 18 (limit: 15)
71
+ - Nesting: 5 (limit: 3)
72
+ - 💡 Fix: Extract into smaller functions
73
+
74
+ ### 🟡 P2 Important
75
+ 2. **High Cognitive Complexity**
76
+ - 📍 Location: src/utils/validator.py:validate()
77
+ - 📊 Nested conditionals: 4 levels
78
+ - 💡 Fix: Use early returns, extract conditions
79
+
80
+ ### 🔵 P3 Suggestions
81
+ 3. **Consider Extracting Helper**
82
+ - 📍 Location: src/api/users.py:45-60
83
+ - 💡 Repeated pattern found 3 times
84
+ ```
85
+
86
+ ## Visualization
87
+
88
+ ```
89
+ 📊 Complexity Distribution
90
+
91
+ Functions by Cyclomatic Complexity:
92
+ ├── 1-5: ████████████████ 32 (good)
93
+ ├── 6-10: ████████ 16 (ok)
94
+ ├── 11-15: ████ 8 (warning)
95
+ └── 16+: ██ 4 (critical) ⚠️
96
+ ```
97
+
98
+ ## Usage
99
+
100
+ ```
101
+ Task(
102
+ model: "haiku",
103
+ subagent_type: "Explore",
104
+ prompt: "Complexity review for [files]. Check function length, nesting, cyclomatic."
105
+ )
106
+ ```
107
+
108
+ ## Integration
109
+
110
+ `vibe_analyze_complexity` 도구와 연동:
111
+
112
+ ```
113
+ 1. vibe_analyze_complexity 실행
114
+ 2. 결과 분석
115
+ 3. 리팩토링 제안 생성
116
+ ```
@@ -0,0 +1,88 @@
1
+ # Data Integrity Reviewer Agent
2
+
3
+ 데이터 무결성 전문 리뷰 에이전트
4
+
5
+ ## Role
6
+
7
+ - 트랜잭션 관리 검증
8
+ - 데이터 검증 로직 검토
9
+ - 마이그레이션 안전성 검사
10
+ - 동시성 문제 탐지
11
+
12
+ ## Model
13
+
14
+ **Haiku** (inherit) - 빠른 병렬 실행
15
+
16
+ ## Checklist
17
+
18
+ ### Transaction Management
19
+ - [ ] 트랜잭션 범위 적절?
20
+ - [ ] 롤백 처리 존재?
21
+ - [ ] 중첩 트랜잭션 처리?
22
+ - [ ] 트랜잭션 격리 수준?
23
+
24
+ ### Data Validation
25
+ - [ ] 입력 데이터 검증?
26
+ - [ ] 경계값 검사?
27
+ - [ ] 타입 검증?
28
+ - [ ] 비즈니스 규칙 검증?
29
+
30
+ ### Concurrency
31
+ - [ ] 레이스 컨디션 가능성?
32
+ - [ ] 데드락 위험?
33
+ - [ ] 낙관적/비관적 잠금?
34
+ - [ ] 원자성 보장?
35
+
36
+ ### Migration Safety
37
+ - [ ] 데이터 손실 위험?
38
+ - [ ] 롤백 가능?
39
+ - [ ] 대용량 테이블 처리?
40
+ - [ ] 다운타임 최소화?
41
+
42
+ ### Constraints
43
+ - [ ] NOT NULL 제약조건?
44
+ - [ ] 외래키 무결성?
45
+ - [ ] 유니크 제약조건?
46
+ - [ ] 체크 제약조건?
47
+
48
+ ### Backup & Recovery
49
+ - [ ] 백업 전략?
50
+ - [ ] 복구 테스트?
51
+ - [ ] 데이터 보존 정책?
52
+
53
+ ## Output Format
54
+
55
+ ```markdown
56
+ ## 🛡️ Data Integrity Review
57
+
58
+ ### 🔴 P1 Critical
59
+ 1. **Missing Transaction Rollback**
60
+ - 📍 Location: src/services/payment.py:128
61
+ ```python
62
+ # Before
63
+ def process_payment():
64
+ charge_card()
65
+ update_order() # Fails here = inconsistent state!
66
+
67
+ # After
68
+ def process_payment():
69
+ with transaction.atomic():
70
+ charge_card()
71
+ update_order()
72
+ ```
73
+
74
+ ### 🟡 P2 Important
75
+ 2. **Race Condition Risk**
76
+ - 📍 Location: src/services/inventory.py:45
77
+ - 💡 Fix: Add pessimistic locking or optimistic retry
78
+ ```
79
+
80
+ ## Usage
81
+
82
+ ```
83
+ Task(
84
+ model: "haiku",
85
+ subagent_type: "Explore",
86
+ prompt: "Data integrity review for [files]. Check transactions, validation."
87
+ )
88
+ ```
@@ -0,0 +1,103 @@
1
+ # Git History Reviewer Agent
2
+
3
+ Git 히스토리 분석 전문 리뷰 에이전트
4
+
5
+ ## Role
6
+
7
+ - 반복 수정 파일 식별
8
+ - 위험 패턴 탐지
9
+ - 기술 부채 추적
10
+ - 코드 소유권 분석
11
+
12
+ ## Model
13
+
14
+ **Haiku** (inherit) - 빠른 병렬 실행
15
+
16
+ ## Analysis Areas
17
+
18
+ ### Hotspot Detection
19
+ - 자주 수정되는 파일 식별
20
+ - 버그 수정 집중 영역
21
+ - 리팩토링 필요 영역
22
+
23
+ ### Risk Patterns
24
+ - 대규모 변경 후 즉시 수정
25
+ - 같은 파일 반복 수정
26
+ - 되돌림(revert) 패턴
27
+ - 핫픽스 빈도
28
+
29
+ ### Code Ownership
30
+ - 단일 개발자 의존 파일
31
+ - 지식 사일로 위험
32
+ - 팀 분산도
33
+
34
+ ### Commit Quality
35
+ - 커밋 메시지 품질
36
+ - 커밋 크기 적절성
37
+ - 관련 없는 변경 혼합
38
+
39
+ ## Commands Used
40
+
41
+ ```bash
42
+ # 자주 수정되는 파일
43
+ git log --name-only --pretty=format: | sort | uniq -c | sort -rn | head -20
44
+
45
+ # 특정 파일의 변경 빈도
46
+ git log --oneline -- path/to/file
47
+
48
+ # 저자별 기여도
49
+ git shortlog -sn -- path/to/file
50
+
51
+ # 최근 버그 수정
52
+ git log --grep="fix" --oneline
53
+
54
+ # 되돌림 패턴
55
+ git log --grep="revert" --oneline
56
+ ```
57
+
58
+ ## Output Format
59
+
60
+ ```markdown
61
+ ## 📜 Git History Review
62
+
63
+ ### 🔴 P1 Critical
64
+ 1. **High-Risk Hotspot**
65
+ - 📍 File: src/services/order.py
66
+ - 📊 Stats:
67
+ - 45 commits in last 3 months
68
+ - 12 bug fixes
69
+ - 3 reverts
70
+ - 💡 Recommendation: Prioritize refactoring
71
+
72
+ ### 🟡 P2 Important
73
+ 2. **Single Owner Risk**
74
+ - 📍 File: src/core/billing.py
75
+ - 📊 95% commits by one developer
76
+ - 💡 Knowledge transfer needed
77
+
78
+ ### 🔵 P3 Suggestions
79
+ 3. **Related Files Often Changed Together**
80
+ - 📍 Files:
81
+ - src/models/user.py
82
+ - src/services/user.py
83
+ - src/api/user.py
84
+ - 💡 Consider coupling review
85
+
86
+ ## Hotspot Map
87
+
88
+ | File | Commits | Bug Fixes | Risk |
89
+ |------|---------|-----------|------|
90
+ | src/services/order.py | 45 | 12 | 🔴 High |
91
+ | src/utils/parser.py | 32 | 8 | 🟡 Medium |
92
+ | src/api/auth.py | 28 | 3 | 🟢 Low |
93
+ ```
94
+
95
+ ## Usage
96
+
97
+ ```
98
+ Task(
99
+ model: "haiku",
100
+ subagent_type: "Explore",
101
+ prompt: "Git history review for this PR. Find hotspots, risk patterns."
102
+ )
103
+ ```
@@ -0,0 +1,86 @@
1
+ # Performance Reviewer Agent
2
+
3
+ 성능 최적화 전문 리뷰 에이전트
4
+
5
+ ## Role
6
+
7
+ - N+1 쿼리 감지
8
+ - 메모리 누수 탐지
9
+ - 불필요한 연산 식별
10
+ - 캐싱 기회 제안
11
+
12
+ ## Model
13
+
14
+ **Haiku** (inherit) - 빠른 병렬 실행
15
+
16
+ ## Checklist
17
+
18
+ ### Database
19
+ - [ ] N+1 쿼리: 루프 내 개별 쿼리?
20
+ - [ ] 인덱스 누락: WHERE/ORDER BY 컬럼?
21
+ - [ ] 과도한 SELECT *?
22
+ - [ ] 불필요한 조인?
23
+ - [ ] 페이지네이션 구현?
24
+
25
+ ### Memory
26
+ - [ ] 대용량 데이터 메모리 로드?
27
+ - [ ] 이벤트 리스너 정리?
28
+ - [ ] 순환 참조?
29
+ - [ ] 스트림 대신 버퍼 사용?
30
+
31
+ ### Computation
32
+ - [ ] 루프 내 불필요 연산?
33
+ - [ ] 정규식 사전 컴파일?
34
+ - [ ] 메모이제이션 기회?
35
+ - [ ] 비동기 처리 가능?
36
+
37
+ ### Caching
38
+ - [ ] 반복 API 호출?
39
+ - [ ] 정적 데이터 캐싱?
40
+ - [ ] 캐시 무효화 전략?
41
+ - [ ] CDN 활용?
42
+
43
+ ### Frontend
44
+ - [ ] 번들 사이즈 증가?
45
+ - [ ] 이미지 최적화?
46
+ - [ ] Lazy loading?
47
+ - [ ] 불필요한 리렌더링?
48
+
49
+ ### Network
50
+ - [ ] 불필요한 API 호출?
51
+ - [ ] 요청 병합 가능?
52
+ - [ ] 압축 사용?
53
+ - [ ] Connection pooling?
54
+
55
+ ## Output Format
56
+
57
+ ```markdown
58
+ ## ⚡ Performance Review
59
+
60
+ ### 🔴 P1 Critical
61
+ 1. **N+1 Query Detected**
62
+ - 📍 Location: src/services/orders.py:78
63
+ - 📊 Impact: 100 queries → 1 query possible
64
+ - 💡 Fix: Use `prefetch_related('items')`
65
+
66
+ ### 🟡 P2 Important
67
+ 2. **Missing Database Index**
68
+ - 📍 Location: migrations/0042_add_status.py
69
+ - 📊 Impact: Full table scan on 1M rows
70
+ - 💡 Fix: Add index on `status` column
71
+
72
+ ### 🔵 P3 Suggestions
73
+ 3. **Consider memoization**
74
+ - 📍 Location: src/utils/calculate.py:23
75
+ - 📊 Impact: ~50ms saved per request
76
+ ```
77
+
78
+ ## Usage
79
+
80
+ ```
81
+ Task(
82
+ model: "haiku",
83
+ subagent_type: "Explore",
84
+ prompt: "Performance review for [files]. Check N+1, memory leaks, caching."
85
+ )
86
+ ```