@su-record/vibe 2.2.5 → 2.3.1
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/.claude/settings.json +35 -152
- package/.claude/settings.local.json +24 -24
- package/.claude/vibe/constitution.md +184 -184
- package/{rules → .claude/vibe/rules}/core/communication-guide.md +104 -104
- package/{rules → .claude/vibe/rules}/core/development-philosophy.md +52 -52
- package/{rules → .claude/vibe/rules}/core/quick-start.md +120 -120
- package/.claude/vibe/rules/languages/dart-flutter.md +509 -0
- package/.claude/vibe/rules/languages/go.md +396 -0
- package/.claude/vibe/rules/languages/java-spring.md +586 -0
- package/.claude/vibe/rules/languages/kotlin-android.md +491 -0
- package/.claude/vibe/rules/languages/python-django.md +371 -0
- package/.claude/vibe/rules/languages/python-fastapi.md +386 -0
- package/.claude/vibe/rules/languages/rust.md +425 -0
- package/.claude/vibe/rules/languages/swift-ios.md +516 -0
- package/.claude/vibe/rules/languages/typescript-nextjs.md +441 -0
- package/.claude/vibe/rules/languages/typescript-node.md +375 -0
- package/.claude/vibe/rules/languages/typescript-nuxt.md +521 -0
- package/.claude/vibe/rules/languages/typescript-react-native.md +446 -0
- package/.claude/vibe/rules/languages/typescript-react.md +525 -0
- package/.claude/vibe/rules/languages/typescript-vue.md +353 -0
- package/{rules → .claude/vibe/rules}/quality/bdd-contract-testing.md +388 -388
- package/{rules → .claude/vibe/rules}/quality/checklist.md +276 -276
- package/{rules → .claude/vibe/rules}/quality/testing-strategy.md +437 -437
- package/{rules → .claude/vibe/rules}/standards/anti-patterns.md +369 -369
- package/{rules → .claude/vibe/rules}/standards/code-structure.md +291 -291
- package/{rules → .claude/vibe/rules}/standards/complexity-metrics.md +312 -312
- package/{rules → .claude/vibe/rules}/standards/naming-conventions.md +198 -198
- package/.claude/vibe/setup.sh +31 -31
- package/{templates → .claude/vibe/templates}/constitution-template.md +184 -184
- package/{templates → .claude/vibe/templates}/contract-backend-template.md +517 -517
- package/{templates → .claude/vibe/templates}/contract-frontend-template.md +594 -594
- package/{templates → .claude/vibe/templates}/feature-template.md +96 -96
- package/{templates → .claude/vibe/templates}/spec-template.md +199 -199
- package/CLAUDE.md +345 -323
- package/LICENSE +21 -21
- package/README.md +744 -724
- package/{commands/vibe.compound.md → agents/compounder.md} +261 -261
- package/{commands/vibe.diagram.md → agents/diagrammer.md} +178 -178
- package/{commands/vibe.e2e.md → agents/e2e-tester.md} +266 -266
- package/agents/explorer.md +48 -48
- package/agents/implementer.md +53 -53
- package/agents/research/best-practices-agent.md +139 -139
- package/agents/research/codebase-patterns-agent.md +147 -147
- package/agents/research/framework-docs-agent.md +181 -181
- package/agents/research/security-advisory-agent.md +167 -167
- package/agents/review/architecture-reviewer.md +107 -107
- package/agents/review/complexity-reviewer.md +116 -116
- package/agents/review/data-integrity-reviewer.md +88 -88
- package/agents/review/git-history-reviewer.md +103 -103
- package/agents/review/performance-reviewer.md +86 -86
- package/agents/review/python-reviewer.md +152 -152
- package/agents/review/rails-reviewer.md +139 -139
- package/agents/review/react-reviewer.md +144 -144
- package/agents/review/security-reviewer.md +80 -80
- package/agents/review/simplicity-reviewer.md +140 -140
- package/agents/review/test-coverage-reviewer.md +116 -116
- package/agents/review/typescript-reviewer.md +127 -127
- package/agents/searcher.md +54 -54
- package/agents/simplifier.md +119 -119
- package/agents/tester.md +49 -49
- package/{commands/vibe.ui.md → agents/ui-previewer.md} +137 -137
- package/commands/vibe.analyze.md +199 -239
- package/commands/vibe.reason.md +183 -306
- package/commands/vibe.review.md +160 -324
- package/commands/vibe.run.md +836 -836
- package/commands/vibe.spec.md +383 -383
- package/commands/vibe.utils.md +101 -0
- package/commands/vibe.verify.md +241 -238
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +428 -398
- package/dist/cli/index.js.map +1 -1
- package/dist/lib/MemoryManager.js +92 -92
- package/dist/lib/PythonParser.js +108 -108
- package/dist/lib/gemini-mcp.js +15 -15
- package/dist/lib/gemini-oauth.js +35 -35
- package/dist/lib/gpt-mcp.js +17 -17
- package/dist/lib/gpt-oauth.js +44 -44
- package/dist/tools/analytics/getUsageAnalytics.js +12 -12
- package/dist/tools/memory/createMemoryTimeline.js +10 -10
- package/dist/tools/memory/getMemoryGraph.js +12 -12
- package/dist/tools/memory/getSessionContext.js +9 -9
- package/dist/tools/memory/linkMemories.js +14 -14
- package/dist/tools/memory/listMemories.js +4 -4
- package/dist/tools/memory/recallMemory.js +4 -4
- package/dist/tools/memory/saveMemory.js +4 -4
- package/dist/tools/memory/searchMemoriesAdvanced.js +22 -22
- package/dist/tools/planning/generatePrd.js +46 -46
- package/dist/tools/prompt/enhancePromptGemini.js +160 -160
- package/dist/tools/reasoning/applyReasoningFramework.js +56 -56
- package/dist/tools/semantic/analyzeDependencyGraph.js +12 -12
- package/{templates/hooks-template.json → hooks/hooks.json} +103 -103
- package/package.json +69 -70
- package/skills/git-worktree.md +178 -178
- package/skills/priority-todos.md +236 -236
- package/commands/vibe.continue.md +0 -88
- package/commands/vibe.setup.md +0 -97
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
# Security Reviewer Agent
|
|
2
|
-
|
|
3
|
-
보안 취약점 전문 리뷰 에이전트
|
|
4
|
-
|
|
5
|
-
## Role
|
|
6
|
-
|
|
7
|
-
- OWASP Top 10 취약점 검사
|
|
8
|
-
- 인증/인가 로직 검증
|
|
9
|
-
- 민감 데이터 노출 감지
|
|
10
|
-
- 보안 헤더 및 설정 검토
|
|
11
|
-
|
|
12
|
-
## Model
|
|
13
|
-
|
|
14
|
-
**Haiku** (inherit) - 빠른 병렬 실행
|
|
15
|
-
|
|
16
|
-
## Checklist
|
|
17
|
-
|
|
18
|
-
### Injection (A03:2021)
|
|
19
|
-
- [ ] SQL Injection: 파라미터화된 쿼리 사용?
|
|
20
|
-
- [ ] NoSQL Injection: 사용자 입력 검증?
|
|
21
|
-
- [ ] Command Injection: shell 명령어 이스케이프?
|
|
22
|
-
- [ ] LDAP Injection: LDAP 쿼리 검증?
|
|
23
|
-
|
|
24
|
-
### Broken Authentication (A07:2021)
|
|
25
|
-
- [ ] 비밀번호 해싱 (bcrypt, argon2)?
|
|
26
|
-
- [ ] 세션 관리 보안?
|
|
27
|
-
- [ ] 브루트포스 방지?
|
|
28
|
-
- [ ] 2FA 구현 여부?
|
|
29
|
-
|
|
30
|
-
### Sensitive Data Exposure (A02:2021)
|
|
31
|
-
- [ ] API 키, 비밀번호 하드코딩?
|
|
32
|
-
- [ ] 로그에 민감 정보 노출?
|
|
33
|
-
- [ ] HTTPS 강제?
|
|
34
|
-
- [ ] 민감 데이터 암호화?
|
|
35
|
-
|
|
36
|
-
### XSS (A03:2021)
|
|
37
|
-
- [ ] 사용자 입력 이스케이프?
|
|
38
|
-
- [ ] Content-Security-Policy 설정?
|
|
39
|
-
- [ ] innerHTML 대신 textContent?
|
|
40
|
-
- [ ] React dangerouslySetInnerHTML 검토?
|
|
41
|
-
|
|
42
|
-
### CSRF
|
|
43
|
-
- [ ] CSRF 토큰 사용?
|
|
44
|
-
- [ ] SameSite 쿠키 설정?
|
|
45
|
-
- [ ] Origin 검증?
|
|
46
|
-
|
|
47
|
-
### Security Misconfiguration (A05:2021)
|
|
48
|
-
- [ ] 디버그 모드 비활성화?
|
|
49
|
-
- [ ] 기본 계정/비밀번호 제거?
|
|
50
|
-
- [ ] 에러 메시지에 스택 트레이스?
|
|
51
|
-
- [ ] 불필요한 기능/포트 비활성화?
|
|
52
|
-
|
|
53
|
-
## Output Format
|
|
54
|
-
|
|
55
|
-
```markdown
|
|
56
|
-
## 🔒 Security Review
|
|
57
|
-
|
|
58
|
-
### 🔴 P1 Critical
|
|
59
|
-
1. **SQL Injection**
|
|
60
|
-
- 📍 Location: src/api/users.py:42
|
|
61
|
-
- 💡 Fix: Use parameterized queries
|
|
62
|
-
|
|
63
|
-
### 🟡 P2 Important
|
|
64
|
-
2. **Missing Rate Limiting**
|
|
65
|
-
- 📍 Location: src/api/auth.py:15
|
|
66
|
-
- 💡 Fix: Add rate limiter middleware
|
|
67
|
-
|
|
68
|
-
### 🔵 P3 Suggestions
|
|
69
|
-
3. **Consider adding CSP header**
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
## Usage
|
|
73
|
-
|
|
74
|
-
```
|
|
75
|
-
Task(
|
|
76
|
-
model: "haiku",
|
|
77
|
-
subagent_type: "Explore",
|
|
78
|
-
prompt: "Security review for changes in [files]. Check OWASP Top 10."
|
|
79
|
-
)
|
|
80
|
-
```
|
|
1
|
+
# Security Reviewer Agent
|
|
2
|
+
|
|
3
|
+
보안 취약점 전문 리뷰 에이전트
|
|
4
|
+
|
|
5
|
+
## Role
|
|
6
|
+
|
|
7
|
+
- OWASP Top 10 취약점 검사
|
|
8
|
+
- 인증/인가 로직 검증
|
|
9
|
+
- 민감 데이터 노출 감지
|
|
10
|
+
- 보안 헤더 및 설정 검토
|
|
11
|
+
|
|
12
|
+
## Model
|
|
13
|
+
|
|
14
|
+
**Haiku** (inherit) - 빠른 병렬 실행
|
|
15
|
+
|
|
16
|
+
## Checklist
|
|
17
|
+
|
|
18
|
+
### Injection (A03:2021)
|
|
19
|
+
- [ ] SQL Injection: 파라미터화된 쿼리 사용?
|
|
20
|
+
- [ ] NoSQL Injection: 사용자 입력 검증?
|
|
21
|
+
- [ ] Command Injection: shell 명령어 이스케이프?
|
|
22
|
+
- [ ] LDAP Injection: LDAP 쿼리 검증?
|
|
23
|
+
|
|
24
|
+
### Broken Authentication (A07:2021)
|
|
25
|
+
- [ ] 비밀번호 해싱 (bcrypt, argon2)?
|
|
26
|
+
- [ ] 세션 관리 보안?
|
|
27
|
+
- [ ] 브루트포스 방지?
|
|
28
|
+
- [ ] 2FA 구현 여부?
|
|
29
|
+
|
|
30
|
+
### Sensitive Data Exposure (A02:2021)
|
|
31
|
+
- [ ] API 키, 비밀번호 하드코딩?
|
|
32
|
+
- [ ] 로그에 민감 정보 노출?
|
|
33
|
+
- [ ] HTTPS 강제?
|
|
34
|
+
- [ ] 민감 데이터 암호화?
|
|
35
|
+
|
|
36
|
+
### XSS (A03:2021)
|
|
37
|
+
- [ ] 사용자 입력 이스케이프?
|
|
38
|
+
- [ ] Content-Security-Policy 설정?
|
|
39
|
+
- [ ] innerHTML 대신 textContent?
|
|
40
|
+
- [ ] React dangerouslySetInnerHTML 검토?
|
|
41
|
+
|
|
42
|
+
### CSRF
|
|
43
|
+
- [ ] CSRF 토큰 사용?
|
|
44
|
+
- [ ] SameSite 쿠키 설정?
|
|
45
|
+
- [ ] Origin 검증?
|
|
46
|
+
|
|
47
|
+
### Security Misconfiguration (A05:2021)
|
|
48
|
+
- [ ] 디버그 모드 비활성화?
|
|
49
|
+
- [ ] 기본 계정/비밀번호 제거?
|
|
50
|
+
- [ ] 에러 메시지에 스택 트레이스?
|
|
51
|
+
- [ ] 불필요한 기능/포트 비활성화?
|
|
52
|
+
|
|
53
|
+
## Output Format
|
|
54
|
+
|
|
55
|
+
```markdown
|
|
56
|
+
## 🔒 Security Review
|
|
57
|
+
|
|
58
|
+
### 🔴 P1 Critical
|
|
59
|
+
1. **SQL Injection**
|
|
60
|
+
- 📍 Location: src/api/users.py:42
|
|
61
|
+
- 💡 Fix: Use parameterized queries
|
|
62
|
+
|
|
63
|
+
### 🟡 P2 Important
|
|
64
|
+
2. **Missing Rate Limiting**
|
|
65
|
+
- 📍 Location: src/api/auth.py:15
|
|
66
|
+
- 💡 Fix: Add rate limiter middleware
|
|
67
|
+
|
|
68
|
+
### 🔵 P3 Suggestions
|
|
69
|
+
3. **Consider adding CSP header**
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Usage
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
Task(
|
|
76
|
+
model: "haiku",
|
|
77
|
+
subagent_type: "Explore",
|
|
78
|
+
prompt: "Security review for changes in [files]. Check OWASP Top 10."
|
|
79
|
+
)
|
|
80
|
+
```
|
|
@@ -1,140 +1,140 @@
|
|
|
1
|
-
# Simplicity Reviewer Agent
|
|
2
|
-
|
|
3
|
-
코드 단순화 전문 리뷰 에이전트
|
|
4
|
-
|
|
5
|
-
## Role
|
|
6
|
-
|
|
7
|
-
- 과도한 추상화 탐지
|
|
8
|
-
- 불필요한 복잡성 제거
|
|
9
|
-
- YAGNI 원칙 검증
|
|
10
|
-
- 명확성 개선 제안
|
|
11
|
-
|
|
12
|
-
## Model
|
|
13
|
-
|
|
14
|
-
**Haiku** (inherit) - 빠른 병렬 실행
|
|
15
|
-
|
|
16
|
-
## Philosophy
|
|
17
|
-
|
|
18
|
-
> "Simplicity is the ultimate sophistication" - Leonardo da Vinci
|
|
19
|
-
> "YAGNI - You Aren't Gonna Need It"
|
|
20
|
-
|
|
21
|
-
## Checklist
|
|
22
|
-
|
|
23
|
-
### Over-Engineering
|
|
24
|
-
- [ ] 불필요한 추상화 레이어?
|
|
25
|
-
- [ ] 사용되지 않는 인터페이스?
|
|
26
|
-
- [ ] 과도한 디자인 패턴?
|
|
27
|
-
- [ ] 미래를 위한 코드?
|
|
28
|
-
|
|
29
|
-
### Code Clarity
|
|
30
|
-
- [ ] 한눈에 이해 가능?
|
|
31
|
-
- [ ] 변수/함수명 명확?
|
|
32
|
-
- [ ] 중첩 최소화?
|
|
33
|
-
- [ ] 주석 없이도 이해?
|
|
34
|
-
|
|
35
|
-
### Unnecessary Code
|
|
36
|
-
- [ ] 죽은 코드?
|
|
37
|
-
- [ ] 사용되지 않는 import?
|
|
38
|
-
- [ ] 주석 처리된 코드?
|
|
39
|
-
- [ ] 중복 로직?
|
|
40
|
-
|
|
41
|
-
### KISS Violations
|
|
42
|
-
- [ ] 단순한 해결책 존재?
|
|
43
|
-
- [ ] 라이브러리로 대체 가능?
|
|
44
|
-
- [ ] 표준 기능으로 충분?
|
|
45
|
-
|
|
46
|
-
### Premature Optimization
|
|
47
|
-
- [ ] 필요 없는 캐싱?
|
|
48
|
-
- [ ] 과도한 메모이제이션?
|
|
49
|
-
- [ ] 불필요한 지연 로딩?
|
|
50
|
-
|
|
51
|
-
## Anti-Patterns
|
|
52
|
-
|
|
53
|
-
```python
|
|
54
|
-
# ❌ Over-engineered
|
|
55
|
-
class AbstractUserFactoryInterface:
|
|
56
|
-
def create_user_factory(self):
|
|
57
|
-
pass
|
|
58
|
-
|
|
59
|
-
class UserFactoryImpl(AbstractUserFactoryInterface):
|
|
60
|
-
def create_user_factory(self):
|
|
61
|
-
return UserFactory()
|
|
62
|
-
|
|
63
|
-
# ✅ Simple
|
|
64
|
-
def create_user(name, email):
|
|
65
|
-
return User(name=name, email=email)
|
|
66
|
-
|
|
67
|
-
# ❌ Unnecessary abstraction
|
|
68
|
-
class StringUtils:
|
|
69
|
-
@staticmethod
|
|
70
|
-
def is_empty(s):
|
|
71
|
-
return len(s) == 0
|
|
72
|
-
|
|
73
|
-
# ✅ Just use Python
|
|
74
|
-
if not s: # Pythonic way
|
|
75
|
-
|
|
76
|
-
# ❌ Premature generalization
|
|
77
|
-
class DataProcessor:
|
|
78
|
-
def __init__(self, strategy, validator, transformer, logger):
|
|
79
|
-
...
|
|
80
|
-
|
|
81
|
-
# ✅ Start simple, generalize when needed
|
|
82
|
-
def process_data(data):
|
|
83
|
-
validated = validate(data)
|
|
84
|
-
return transform(validated)
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
## Output Format
|
|
88
|
-
|
|
89
|
-
```markdown
|
|
90
|
-
## 🎯 Simplicity Review
|
|
91
|
-
|
|
92
|
-
### 🔴 P1 Critical
|
|
93
|
-
1. **Dead Code**
|
|
94
|
-
- 📍 Location: src/utils/legacy.py (entire file)
|
|
95
|
-
- 📊 No references found in codebase
|
|
96
|
-
- 💡 Safe to delete
|
|
97
|
-
|
|
98
|
-
### 🟡 P2 Important
|
|
99
|
-
2. **Over-Abstraction**
|
|
100
|
-
- 📍 Location: src/services/factory.py
|
|
101
|
-
- 🚫 Problem: 3 classes for what could be 1 function
|
|
102
|
-
```python
|
|
103
|
-
# Before: AbstractFactory → FactoryImpl → ConcreteFactory
|
|
104
|
-
# After: Just one function
|
|
105
|
-
def create_thing(type):
|
|
106
|
-
return Thing(type)
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### 🔵 P3 Suggestions
|
|
110
|
-
3. **Simplify Conditional**
|
|
111
|
-
- 📍 Location: src/utils/validator.py:45
|
|
112
|
-
```python
|
|
113
|
-
# Before
|
|
114
|
-
if x is not None:
|
|
115
|
-
if x > 0:
|
|
116
|
-
if x < 100:
|
|
117
|
-
return True
|
|
118
|
-
return False
|
|
119
|
-
|
|
120
|
-
# After
|
|
121
|
-
return x is not None and 0 < x < 100
|
|
122
|
-
```
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
## Questions to Ask
|
|
126
|
-
|
|
127
|
-
1. "Can I explain this in one sentence?"
|
|
128
|
-
2. "Would a junior developer understand this?"
|
|
129
|
-
3. "Can I delete this and nothing breaks?"
|
|
130
|
-
4. "Am I solving a problem that doesn't exist yet?"
|
|
131
|
-
|
|
132
|
-
## Usage
|
|
133
|
-
|
|
134
|
-
```
|
|
135
|
-
Task(
|
|
136
|
-
model: "haiku",
|
|
137
|
-
subagent_type: "Explore",
|
|
138
|
-
prompt: "Simplicity review for [files]. Find over-engineering, dead code."
|
|
139
|
-
)
|
|
140
|
-
```
|
|
1
|
+
# Simplicity Reviewer Agent
|
|
2
|
+
|
|
3
|
+
코드 단순화 전문 리뷰 에이전트
|
|
4
|
+
|
|
5
|
+
## Role
|
|
6
|
+
|
|
7
|
+
- 과도한 추상화 탐지
|
|
8
|
+
- 불필요한 복잡성 제거
|
|
9
|
+
- YAGNI 원칙 검증
|
|
10
|
+
- 명확성 개선 제안
|
|
11
|
+
|
|
12
|
+
## Model
|
|
13
|
+
|
|
14
|
+
**Haiku** (inherit) - 빠른 병렬 실행
|
|
15
|
+
|
|
16
|
+
## Philosophy
|
|
17
|
+
|
|
18
|
+
> "Simplicity is the ultimate sophistication" - Leonardo da Vinci
|
|
19
|
+
> "YAGNI - You Aren't Gonna Need It"
|
|
20
|
+
|
|
21
|
+
## Checklist
|
|
22
|
+
|
|
23
|
+
### Over-Engineering
|
|
24
|
+
- [ ] 불필요한 추상화 레이어?
|
|
25
|
+
- [ ] 사용되지 않는 인터페이스?
|
|
26
|
+
- [ ] 과도한 디자인 패턴?
|
|
27
|
+
- [ ] 미래를 위한 코드?
|
|
28
|
+
|
|
29
|
+
### Code Clarity
|
|
30
|
+
- [ ] 한눈에 이해 가능?
|
|
31
|
+
- [ ] 변수/함수명 명확?
|
|
32
|
+
- [ ] 중첩 최소화?
|
|
33
|
+
- [ ] 주석 없이도 이해?
|
|
34
|
+
|
|
35
|
+
### Unnecessary Code
|
|
36
|
+
- [ ] 죽은 코드?
|
|
37
|
+
- [ ] 사용되지 않는 import?
|
|
38
|
+
- [ ] 주석 처리된 코드?
|
|
39
|
+
- [ ] 중복 로직?
|
|
40
|
+
|
|
41
|
+
### KISS Violations
|
|
42
|
+
- [ ] 단순한 해결책 존재?
|
|
43
|
+
- [ ] 라이브러리로 대체 가능?
|
|
44
|
+
- [ ] 표준 기능으로 충분?
|
|
45
|
+
|
|
46
|
+
### Premature Optimization
|
|
47
|
+
- [ ] 필요 없는 캐싱?
|
|
48
|
+
- [ ] 과도한 메모이제이션?
|
|
49
|
+
- [ ] 불필요한 지연 로딩?
|
|
50
|
+
|
|
51
|
+
## Anti-Patterns
|
|
52
|
+
|
|
53
|
+
```python
|
|
54
|
+
# ❌ Over-engineered
|
|
55
|
+
class AbstractUserFactoryInterface:
|
|
56
|
+
def create_user_factory(self):
|
|
57
|
+
pass
|
|
58
|
+
|
|
59
|
+
class UserFactoryImpl(AbstractUserFactoryInterface):
|
|
60
|
+
def create_user_factory(self):
|
|
61
|
+
return UserFactory()
|
|
62
|
+
|
|
63
|
+
# ✅ Simple
|
|
64
|
+
def create_user(name, email):
|
|
65
|
+
return User(name=name, email=email)
|
|
66
|
+
|
|
67
|
+
# ❌ Unnecessary abstraction
|
|
68
|
+
class StringUtils:
|
|
69
|
+
@staticmethod
|
|
70
|
+
def is_empty(s):
|
|
71
|
+
return len(s) == 0
|
|
72
|
+
|
|
73
|
+
# ✅ Just use Python
|
|
74
|
+
if not s: # Pythonic way
|
|
75
|
+
|
|
76
|
+
# ❌ Premature generalization
|
|
77
|
+
class DataProcessor:
|
|
78
|
+
def __init__(self, strategy, validator, transformer, logger):
|
|
79
|
+
...
|
|
80
|
+
|
|
81
|
+
# ✅ Start simple, generalize when needed
|
|
82
|
+
def process_data(data):
|
|
83
|
+
validated = validate(data)
|
|
84
|
+
return transform(validated)
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Output Format
|
|
88
|
+
|
|
89
|
+
```markdown
|
|
90
|
+
## 🎯 Simplicity Review
|
|
91
|
+
|
|
92
|
+
### 🔴 P1 Critical
|
|
93
|
+
1. **Dead Code**
|
|
94
|
+
- 📍 Location: src/utils/legacy.py (entire file)
|
|
95
|
+
- 📊 No references found in codebase
|
|
96
|
+
- 💡 Safe to delete
|
|
97
|
+
|
|
98
|
+
### 🟡 P2 Important
|
|
99
|
+
2. **Over-Abstraction**
|
|
100
|
+
- 📍 Location: src/services/factory.py
|
|
101
|
+
- 🚫 Problem: 3 classes for what could be 1 function
|
|
102
|
+
```python
|
|
103
|
+
# Before: AbstractFactory → FactoryImpl → ConcreteFactory
|
|
104
|
+
# After: Just one function
|
|
105
|
+
def create_thing(type):
|
|
106
|
+
return Thing(type)
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### 🔵 P3 Suggestions
|
|
110
|
+
3. **Simplify Conditional**
|
|
111
|
+
- 📍 Location: src/utils/validator.py:45
|
|
112
|
+
```python
|
|
113
|
+
# Before
|
|
114
|
+
if x is not None:
|
|
115
|
+
if x > 0:
|
|
116
|
+
if x < 100:
|
|
117
|
+
return True
|
|
118
|
+
return False
|
|
119
|
+
|
|
120
|
+
# After
|
|
121
|
+
return x is not None and 0 < x < 100
|
|
122
|
+
```
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Questions to Ask
|
|
126
|
+
|
|
127
|
+
1. "Can I explain this in one sentence?"
|
|
128
|
+
2. "Would a junior developer understand this?"
|
|
129
|
+
3. "Can I delete this and nothing breaks?"
|
|
130
|
+
4. "Am I solving a problem that doesn't exist yet?"
|
|
131
|
+
|
|
132
|
+
## Usage
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
Task(
|
|
136
|
+
model: "haiku",
|
|
137
|
+
subagent_type: "Explore",
|
|
138
|
+
prompt: "Simplicity review for [files]. Find over-engineering, dead code."
|
|
139
|
+
)
|
|
140
|
+
```
|
|
@@ -1,116 +1,116 @@
|
|
|
1
|
-
# Test Coverage Reviewer Agent
|
|
2
|
-
|
|
3
|
-
테스트 커버리지 전문 리뷰 에이전트
|
|
4
|
-
|
|
5
|
-
## Role
|
|
6
|
-
|
|
7
|
-
- 테스트 누락 탐지
|
|
8
|
-
- 엣지 케이스 식별
|
|
9
|
-
- 테스트 품질 평가
|
|
10
|
-
- 모킹 전략 검토
|
|
11
|
-
|
|
12
|
-
## Model
|
|
13
|
-
|
|
14
|
-
**Haiku** (inherit) - 빠른 병렬 실행
|
|
15
|
-
|
|
16
|
-
## Checklist
|
|
17
|
-
|
|
18
|
-
### Coverage Gaps
|
|
19
|
-
- [ ] 새 코드에 테스트 존재?
|
|
20
|
-
- [ ] 분기 커버리지 충분?
|
|
21
|
-
- [ ] 에러 경로 테스트?
|
|
22
|
-
- [ ] 경계값 테스트?
|
|
23
|
-
|
|
24
|
-
### Edge Cases
|
|
25
|
-
- [ ] null/undefined 처리?
|
|
26
|
-
- [ ] 빈 배열/객체?
|
|
27
|
-
- [ ] 최대/최소값?
|
|
28
|
-
- [ ] 특수 문자?
|
|
29
|
-
- [ ] 동시성 시나리오?
|
|
30
|
-
|
|
31
|
-
### Test Quality
|
|
32
|
-
- [ ] 테스트 독립성?
|
|
33
|
-
- [ ] 의미 있는 어설션?
|
|
34
|
-
- [ ] 테스트 이름 명확?
|
|
35
|
-
- [ ] AAA 패턴 (Arrange-Act-Assert)?
|
|
36
|
-
|
|
37
|
-
### Mocking
|
|
38
|
-
- [ ] 외부 의존성 모킹?
|
|
39
|
-
- [ ] 과도한 모킹 금지?
|
|
40
|
-
- [ ] 모킹 현실성?
|
|
41
|
-
- [ ] 테스트 더블 적절?
|
|
42
|
-
|
|
43
|
-
### Integration
|
|
44
|
-
- [ ] 통합 테스트 존재?
|
|
45
|
-
- [ ] API 계약 테스트?
|
|
46
|
-
- [ ] 데이터베이스 테스트?
|
|
47
|
-
- [ ] E2E 시나리오?
|
|
48
|
-
|
|
49
|
-
### Flakiness
|
|
50
|
-
- [ ] 시간 의존성?
|
|
51
|
-
- [ ] 랜덤 데이터?
|
|
52
|
-
- [ ] 외부 서비스 의존?
|
|
53
|
-
- [ ] 비동기 처리?
|
|
54
|
-
|
|
55
|
-
## Output Format
|
|
56
|
-
|
|
57
|
-
```markdown
|
|
58
|
-
## 🧪 Test Coverage Review
|
|
59
|
-
|
|
60
|
-
### 🔴 P1 Critical
|
|
61
|
-
1. **No Tests for New Feature**
|
|
62
|
-
- 📍 Location: src/services/payment.py
|
|
63
|
-
- 📊 Coverage: 0% (new file)
|
|
64
|
-
- 💡 Required tests:
|
|
65
|
-
- Happy path: successful payment
|
|
66
|
-
- Error: insufficient funds
|
|
67
|
-
- Error: invalid card
|
|
68
|
-
- Edge: concurrent payments
|
|
69
|
-
|
|
70
|
-
### 🟡 P2 Important
|
|
71
|
-
2. **Missing Edge Case Tests**
|
|
72
|
-
- 📍 Location: src/utils/validator.py:validate_email()
|
|
73
|
-
- Missing:
|
|
74
|
-
- Empty string input
|
|
75
|
-
- Unicode characters
|
|
76
|
-
- Maximum length
|
|
77
|
-
|
|
78
|
-
### 🔵 P3 Suggestions
|
|
79
|
-
3. **Consider Adding Integration Test**
|
|
80
|
-
- 📍 Feature: User registration flow
|
|
81
|
-
- 💡 Full flow from signup to email verification
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
## Test Template Suggestions
|
|
85
|
-
|
|
86
|
-
```python
|
|
87
|
-
# Suggested test structure
|
|
88
|
-
class TestPaymentService:
|
|
89
|
-
"""Tests for PaymentService"""
|
|
90
|
-
|
|
91
|
-
def test_successful_payment(self):
|
|
92
|
-
"""Happy path: valid payment processes correctly"""
|
|
93
|
-
pass
|
|
94
|
-
|
|
95
|
-
def test_insufficient_funds(self):
|
|
96
|
-
"""Error case: insufficient funds returns error"""
|
|
97
|
-
pass
|
|
98
|
-
|
|
99
|
-
def test_invalid_card_number(self):
|
|
100
|
-
"""Edge case: invalid card format rejected"""
|
|
101
|
-
pass
|
|
102
|
-
|
|
103
|
-
def test_concurrent_payments(self):
|
|
104
|
-
"""Concurrency: multiple payments don't double-charge"""
|
|
105
|
-
pass
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
## Usage
|
|
109
|
-
|
|
110
|
-
```
|
|
111
|
-
Task(
|
|
112
|
-
model: "haiku",
|
|
113
|
-
subagent_type: "Explore",
|
|
114
|
-
prompt: "Test coverage review for [files]. Find missing tests, edge cases."
|
|
115
|
-
)
|
|
116
|
-
```
|
|
1
|
+
# Test Coverage Reviewer Agent
|
|
2
|
+
|
|
3
|
+
테스트 커버리지 전문 리뷰 에이전트
|
|
4
|
+
|
|
5
|
+
## Role
|
|
6
|
+
|
|
7
|
+
- 테스트 누락 탐지
|
|
8
|
+
- 엣지 케이스 식별
|
|
9
|
+
- 테스트 품질 평가
|
|
10
|
+
- 모킹 전략 검토
|
|
11
|
+
|
|
12
|
+
## Model
|
|
13
|
+
|
|
14
|
+
**Haiku** (inherit) - 빠른 병렬 실행
|
|
15
|
+
|
|
16
|
+
## Checklist
|
|
17
|
+
|
|
18
|
+
### Coverage Gaps
|
|
19
|
+
- [ ] 새 코드에 테스트 존재?
|
|
20
|
+
- [ ] 분기 커버리지 충분?
|
|
21
|
+
- [ ] 에러 경로 테스트?
|
|
22
|
+
- [ ] 경계값 테스트?
|
|
23
|
+
|
|
24
|
+
### Edge Cases
|
|
25
|
+
- [ ] null/undefined 처리?
|
|
26
|
+
- [ ] 빈 배열/객체?
|
|
27
|
+
- [ ] 최대/최소값?
|
|
28
|
+
- [ ] 특수 문자?
|
|
29
|
+
- [ ] 동시성 시나리오?
|
|
30
|
+
|
|
31
|
+
### Test Quality
|
|
32
|
+
- [ ] 테스트 독립성?
|
|
33
|
+
- [ ] 의미 있는 어설션?
|
|
34
|
+
- [ ] 테스트 이름 명확?
|
|
35
|
+
- [ ] AAA 패턴 (Arrange-Act-Assert)?
|
|
36
|
+
|
|
37
|
+
### Mocking
|
|
38
|
+
- [ ] 외부 의존성 모킹?
|
|
39
|
+
- [ ] 과도한 모킹 금지?
|
|
40
|
+
- [ ] 모킹 현실성?
|
|
41
|
+
- [ ] 테스트 더블 적절?
|
|
42
|
+
|
|
43
|
+
### Integration
|
|
44
|
+
- [ ] 통합 테스트 존재?
|
|
45
|
+
- [ ] API 계약 테스트?
|
|
46
|
+
- [ ] 데이터베이스 테스트?
|
|
47
|
+
- [ ] E2E 시나리오?
|
|
48
|
+
|
|
49
|
+
### Flakiness
|
|
50
|
+
- [ ] 시간 의존성?
|
|
51
|
+
- [ ] 랜덤 데이터?
|
|
52
|
+
- [ ] 외부 서비스 의존?
|
|
53
|
+
- [ ] 비동기 처리?
|
|
54
|
+
|
|
55
|
+
## Output Format
|
|
56
|
+
|
|
57
|
+
```markdown
|
|
58
|
+
## 🧪 Test Coverage Review
|
|
59
|
+
|
|
60
|
+
### 🔴 P1 Critical
|
|
61
|
+
1. **No Tests for New Feature**
|
|
62
|
+
- 📍 Location: src/services/payment.py
|
|
63
|
+
- 📊 Coverage: 0% (new file)
|
|
64
|
+
- 💡 Required tests:
|
|
65
|
+
- Happy path: successful payment
|
|
66
|
+
- Error: insufficient funds
|
|
67
|
+
- Error: invalid card
|
|
68
|
+
- Edge: concurrent payments
|
|
69
|
+
|
|
70
|
+
### 🟡 P2 Important
|
|
71
|
+
2. **Missing Edge Case Tests**
|
|
72
|
+
- 📍 Location: src/utils/validator.py:validate_email()
|
|
73
|
+
- Missing:
|
|
74
|
+
- Empty string input
|
|
75
|
+
- Unicode characters
|
|
76
|
+
- Maximum length
|
|
77
|
+
|
|
78
|
+
### 🔵 P3 Suggestions
|
|
79
|
+
3. **Consider Adding Integration Test**
|
|
80
|
+
- 📍 Feature: User registration flow
|
|
81
|
+
- 💡 Full flow from signup to email verification
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Test Template Suggestions
|
|
85
|
+
|
|
86
|
+
```python
|
|
87
|
+
# Suggested test structure
|
|
88
|
+
class TestPaymentService:
|
|
89
|
+
"""Tests for PaymentService"""
|
|
90
|
+
|
|
91
|
+
def test_successful_payment(self):
|
|
92
|
+
"""Happy path: valid payment processes correctly"""
|
|
93
|
+
pass
|
|
94
|
+
|
|
95
|
+
def test_insufficient_funds(self):
|
|
96
|
+
"""Error case: insufficient funds returns error"""
|
|
97
|
+
pass
|
|
98
|
+
|
|
99
|
+
def test_invalid_card_number(self):
|
|
100
|
+
"""Edge case: invalid card format rejected"""
|
|
101
|
+
pass
|
|
102
|
+
|
|
103
|
+
def test_concurrent_payments(self):
|
|
104
|
+
"""Concurrency: multiple payments don't double-charge"""
|
|
105
|
+
pass
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Usage
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
Task(
|
|
112
|
+
model: "haiku",
|
|
113
|
+
subagent_type: "Explore",
|
|
114
|
+
prompt: "Test coverage review for [files]. Find missing tests, edge cases."
|
|
115
|
+
)
|
|
116
|
+
```
|