@su-record/vibe 2.1.0 → 2.2.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 +1 -1
- package/.claude/settings.local.json +5 -1
- package/{.vibe → .claude/vibe}/rules/quality/bdd-contract-testing.md +1 -1
- package/{.vibe → .claude/vibe}/setup.sh +1 -1
- package/CLAUDE.md +16 -6
- package/README.md +33 -15
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +100 -56
- package/dist/cli/index.js.map +1 -1
- package/dist/tools/reasoning/applyReasoningFramework.js +1 -1
- package/package.json +1 -2
- package/templates/feature-template.md +1 -1
- package/.claude/agents/explorer.md +0 -48
- package/.claude/agents/implementer.md +0 -53
- package/.claude/agents/research/best-practices-agent.md +0 -139
- package/.claude/agents/research/codebase-patterns-agent.md +0 -147
- package/.claude/agents/research/framework-docs-agent.md +0 -181
- package/.claude/agents/research/security-advisory-agent.md +0 -167
- package/.claude/agents/review/architecture-reviewer.md +0 -107
- package/.claude/agents/review/complexity-reviewer.md +0 -116
- package/.claude/agents/review/data-integrity-reviewer.md +0 -88
- package/.claude/agents/review/git-history-reviewer.md +0 -103
- package/.claude/agents/review/performance-reviewer.md +0 -86
- package/.claude/agents/review/python-reviewer.md +0 -152
- package/.claude/agents/review/rails-reviewer.md +0 -139
- package/.claude/agents/review/react-reviewer.md +0 -144
- package/.claude/agents/review/security-reviewer.md +0 -80
- package/.claude/agents/review/simplicity-reviewer.md +0 -140
- package/.claude/agents/review/test-coverage-reviewer.md +0 -116
- package/.claude/agents/review/typescript-reviewer.md +0 -127
- package/.claude/agents/searcher.md +0 -54
- package/.claude/agents/simplifier.md +0 -119
- package/.claude/agents/tester.md +0 -49
- package/.claude/commands/vibe.analyze.md +0 -239
- package/.claude/commands/vibe.compound.md +0 -261
- package/.claude/commands/vibe.continue.md +0 -88
- package/.claude/commands/vibe.diagram.md +0 -178
- package/.claude/commands/vibe.e2e.md +0 -266
- package/.claude/commands/vibe.reason.md +0 -306
- package/.claude/commands/vibe.review.md +0 -324
- package/.claude/commands/vibe.run.md +0 -760
- package/.claude/commands/vibe.spec.md +0 -383
- package/.claude/commands/vibe.tool.md +0 -153
- package/.claude/commands/vibe.ui.md +0 -137
- package/.claude/commands/vibe.verify.md +0 -238
- package/.claude/skills/git-worktree.md +0 -178
- package/.claude/skills/priority-todos.md +0 -236
- /package/{.vibe → .claude/vibe}/config.json +0 -0
- /package/{.vibe → .claude/vibe}/constitution.md +0 -0
- /package/{.vibe → .claude/vibe}/rules/core/communication-guide.md +0 -0
- /package/{.vibe → .claude/vibe}/rules/core/development-philosophy.md +0 -0
- /package/{.vibe → .claude/vibe}/rules/core/quick-start.md +0 -0
- /package/{.vibe → .claude/vibe}/rules/quality/checklist.md +0 -0
- /package/{.vibe → .claude/vibe}/rules/quality/testing-strategy.md +0 -0
- /package/{.vibe → .claude/vibe}/rules/standards/anti-patterns.md +0 -0
- /package/{.vibe → .claude/vibe}/rules/standards/code-structure.md +0 -0
- /package/{.vibe → .claude/vibe}/rules/standards/complexity-metrics.md +0 -0
- /package/{.vibe → .claude/vibe}/rules/standards/naming-conventions.md +0 -0
- /package/{.vibe → .claude/vibe}/rules/tools/mcp-hi-ai-guide.md +0 -0
- /package/{.vibe → .claude/vibe}/rules/tools/mcp-workflow.md +0 -0
|
@@ -1,80 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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,127 +0,0 @@
|
|
|
1
|
-
# TypeScript Reviewer Agent
|
|
2
|
-
|
|
3
|
-
TypeScript 코드 전문 리뷰 에이전트
|
|
4
|
-
|
|
5
|
-
## Role
|
|
6
|
-
|
|
7
|
-
- 타입 안전성 검증
|
|
8
|
-
- ESLint/Prettier 규칙 준수
|
|
9
|
-
- 모던 TS 패턴 제안
|
|
10
|
-
- React/Node.js 베스트 프랙티스
|
|
11
|
-
|
|
12
|
-
## Model
|
|
13
|
-
|
|
14
|
-
**Haiku** (inherit) - 빠른 병렬 실행
|
|
15
|
-
|
|
16
|
-
## Checklist
|
|
17
|
-
|
|
18
|
-
### Type Safety
|
|
19
|
-
- [ ] `any` 타입 사용 최소화?
|
|
20
|
-
- [ ] 타입 가드 적절히 사용?
|
|
21
|
-
- [ ] `unknown` 대신 `any`?
|
|
22
|
-
- [ ] 유니온 타입 narrowing?
|
|
23
|
-
- [ ] 제네릭 적절히 활용?
|
|
24
|
-
|
|
25
|
-
### Strict Mode
|
|
26
|
-
- [ ] strictNullChecks 준수?
|
|
27
|
-
- [ ] noImplicitAny 준수?
|
|
28
|
-
- [ ] optional chaining (?.) 활용?
|
|
29
|
-
- [ ] nullish coalescing (??) 활용?
|
|
30
|
-
|
|
31
|
-
### Modern Patterns
|
|
32
|
-
- [ ] const assertion (as const)?
|
|
33
|
-
- [ ] satisfies 연산자?
|
|
34
|
-
- [ ] Template literal types?
|
|
35
|
-
- [ ] Discriminated unions?
|
|
36
|
-
|
|
37
|
-
### Error Handling
|
|
38
|
-
- [ ] 에러 타입 정의?
|
|
39
|
-
- [ ] Result/Either 패턴?
|
|
40
|
-
- [ ] async 에러 처리?
|
|
41
|
-
- [ ] 사용자 친화적 에러 메시지?
|
|
42
|
-
|
|
43
|
-
### Imports/Exports
|
|
44
|
-
- [ ] 배럴 exports 사용?
|
|
45
|
-
- [ ] 순환 의존성 없음?
|
|
46
|
-
- [ ] 타입 전용 import (import type)?
|
|
47
|
-
- [ ] 사용하지 않는 import?
|
|
48
|
-
|
|
49
|
-
### Performance
|
|
50
|
-
- [ ] 불필요한 리렌더링?
|
|
51
|
-
- [ ] 메모이제이션 (useMemo, useCallback)?
|
|
52
|
-
- [ ] 번들 사이즈 영향?
|
|
53
|
-
- [ ] 동적 import 활용?
|
|
54
|
-
|
|
55
|
-
## Framework Specific
|
|
56
|
-
|
|
57
|
-
### React
|
|
58
|
-
- [ ] 훅 규칙 준수 (Rules of Hooks)?
|
|
59
|
-
- [ ] 의존성 배열 완전?
|
|
60
|
-
- [ ] key prop 적절?
|
|
61
|
-
- [ ] 컴포넌트 분리 적절?
|
|
62
|
-
- [ ] 상태 관리 적절?
|
|
63
|
-
|
|
64
|
-
### Node.js/Express
|
|
65
|
-
- [ ] async 에러 미들웨어?
|
|
66
|
-
- [ ] 입력 검증 (zod, joi)?
|
|
67
|
-
- [ ] 환경 변수 타입 안전?
|
|
68
|
-
- [ ] 로깅 적절?
|
|
69
|
-
|
|
70
|
-
### Next.js
|
|
71
|
-
- [ ] App Router 패턴?
|
|
72
|
-
- [ ] Server/Client 컴포넌트 구분?
|
|
73
|
-
- [ ] 메타데이터 설정?
|
|
74
|
-
- [ ] 이미지 최적화?
|
|
75
|
-
|
|
76
|
-
## Output Format
|
|
77
|
-
|
|
78
|
-
```markdown
|
|
79
|
-
## 📘 TypeScript Review
|
|
80
|
-
|
|
81
|
-
### 🔴 P1 Critical
|
|
82
|
-
1. **Unsafe Type Assertion**
|
|
83
|
-
- 📍 Location: src/api/user.ts:42
|
|
84
|
-
```typescript
|
|
85
|
-
// Bad
|
|
86
|
-
const user = data as User; // No runtime check
|
|
87
|
-
|
|
88
|
-
// Good
|
|
89
|
-
const user = userSchema.parse(data); // Runtime validation
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
### 🟡 P2 Important
|
|
93
|
-
2. **Missing Type Guard**
|
|
94
|
-
- 📍 Location: src/utils/parse.ts:23
|
|
95
|
-
```typescript
|
|
96
|
-
// Before
|
|
97
|
-
if (response.type === 'success') {
|
|
98
|
-
// response still has union type
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
// After
|
|
102
|
-
function isSuccess(r: Response): r is SuccessResponse {
|
|
103
|
-
return r.type === 'success';
|
|
104
|
-
}
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
### 🔵 P3 Suggestions
|
|
108
|
-
3. **Use satisfies for Type Checking**
|
|
109
|
-
- 📍 Location: src/config/routes.ts:5
|
|
110
|
-
```typescript
|
|
111
|
-
// Before
|
|
112
|
-
const routes: Routes = { ... };
|
|
113
|
-
|
|
114
|
-
// After (preserves literal types)
|
|
115
|
-
const routes = { ... } satisfies Routes;
|
|
116
|
-
```
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
## Usage
|
|
120
|
-
|
|
121
|
-
```
|
|
122
|
-
Task(
|
|
123
|
-
model: "haiku",
|
|
124
|
-
subagent_type: "Explore",
|
|
125
|
-
prompt: "TypeScript review for [files]. Check type safety, React patterns."
|
|
126
|
-
)
|
|
127
|
-
```
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
# Searcher Agent
|
|
2
|
-
|
|
3
|
-
Web search specialist sub-agent.
|
|
4
|
-
|
|
5
|
-
## Role
|
|
6
|
-
|
|
7
|
-
- Search latest tech information
|
|
8
|
-
- Search error/bug solutions
|
|
9
|
-
- Search library usage
|
|
10
|
-
- Research best practices
|
|
11
|
-
|
|
12
|
-
## Model
|
|
13
|
-
|
|
14
|
-
- **With GPT integration**: Use GPT (mcp__vibe-gpt__search)
|
|
15
|
-
- **Default**: Haiku 4.5 + WebSearch
|
|
16
|
-
|
|
17
|
-
## Usage
|
|
18
|
-
|
|
19
|
-
```
|
|
20
|
-
# With GPT integration
|
|
21
|
-
mcp__vibe-gpt__search("React 19 changes")
|
|
22
|
-
|
|
23
|
-
# Default (Haiku + WebSearch)
|
|
24
|
-
Task(model: "haiku", prompt: "Search React 19 changes")
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Tools
|
|
28
|
-
|
|
29
|
-
- WebSearch - Web search (default)
|
|
30
|
-
- WebFetch - Fetch page content
|
|
31
|
-
- mcp__vibe-gpt__* - GPT search (when integrated)
|
|
32
|
-
|
|
33
|
-
## Process
|
|
34
|
-
|
|
35
|
-
1. Optimize search query
|
|
36
|
-
2. Search via WebSearch
|
|
37
|
-
3. WebFetch relevant pages
|
|
38
|
-
4. Summarize key information
|
|
39
|
-
5. Return with sources
|
|
40
|
-
|
|
41
|
-
## Output
|
|
42
|
-
|
|
43
|
-
```markdown
|
|
44
|
-
## Search Results
|
|
45
|
-
|
|
46
|
-
### Key Findings
|
|
47
|
-
- Server Components now default
|
|
48
|
-
- use() hook simplifies Promise handling
|
|
49
|
-
- Actions API improves form handling
|
|
50
|
-
|
|
51
|
-
### Sources
|
|
52
|
-
- [React Official Blog](https://react.dev/blog)
|
|
53
|
-
- [React 19 Release Notes](https://github.com/facebook/react/releases)
|
|
54
|
-
```
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
# Code Simplifier Agent
|
|
2
|
-
|
|
3
|
-
Sub-agent that automatically validates and corrects code quality rules.
|
|
4
|
-
|
|
5
|
-
## Trigger
|
|
6
|
-
|
|
7
|
-
Automatically executed after `Write`, `Edit` operations via PostToolUse Hook.
|
|
8
|
-
|
|
9
|
-
## Rules Reference
|
|
10
|
-
|
|
11
|
-
**Validation criteria (`.vibe/rules/`):**
|
|
12
|
-
|
|
13
|
-
### Required Rules
|
|
14
|
-
- `core/development-philosophy.md` - Surgical precision
|
|
15
|
-
- `core/quick-start.md` - DRY, SRP, YAGNI
|
|
16
|
-
- `quality/checklist.md` - Quality checklist
|
|
17
|
-
|
|
18
|
-
### Complexity Standards
|
|
19
|
-
- `standards/complexity-metrics.md`:
|
|
20
|
-
- Cyclomatic complexity ≤ 10
|
|
21
|
-
- Function length ≤ 20 lines
|
|
22
|
-
- Nesting depth ≤ 3 levels
|
|
23
|
-
- Parameters ≤ 5
|
|
24
|
-
- Component JSX ≤ 50 lines
|
|
25
|
-
|
|
26
|
-
### Anti-patterns
|
|
27
|
-
- `standards/anti-patterns.md` - Patterns to avoid
|
|
28
|
-
|
|
29
|
-
## Process
|
|
30
|
-
|
|
31
|
-
### 1. Analyze Changed Files
|
|
32
|
-
|
|
33
|
-
```
|
|
34
|
-
Check list of modified files
|
|
35
|
-
Analyze changes in each file
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
### 2. Rule Validation
|
|
39
|
-
|
|
40
|
-
```typescript
|
|
41
|
-
const checks = {
|
|
42
|
-
// Complexity
|
|
43
|
-
cyclomaticComplexity: '≤ 10',
|
|
44
|
-
functionLength: '≤ 20 lines',
|
|
45
|
-
nestingDepth: '≤ 3 levels',
|
|
46
|
-
parameterCount: '≤ 5',
|
|
47
|
-
|
|
48
|
-
// Code Quality
|
|
49
|
-
noAnyType: true,
|
|
50
|
-
noMagicNumbers: true,
|
|
51
|
-
singleResponsibility: true,
|
|
52
|
-
|
|
53
|
-
// Style
|
|
54
|
-
consistentNaming: true,
|
|
55
|
-
};
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
### 3. Auto-correction (when possible)
|
|
59
|
-
|
|
60
|
-
- Long function → Suggest splitting
|
|
61
|
-
- Deep nesting → Early return pattern
|
|
62
|
-
- Magic numbers → Extract constants
|
|
63
|
-
- any type → Type inference/explicit typing
|
|
64
|
-
|
|
65
|
-
### 4. Report Results
|
|
66
|
-
|
|
67
|
-
```
|
|
68
|
-
✅ Quality check passed (Score: 95/100)
|
|
69
|
-
|
|
70
|
-
or
|
|
71
|
-
|
|
72
|
-
⚠️ Improvements needed:
|
|
73
|
-
- src/utils/helper.ts:15 - Function 25 lines (limit: 20)
|
|
74
|
-
- src/components/Form.tsx:42 - Nesting 4 levels (limit: 3)
|
|
75
|
-
|
|
76
|
-
🔧 Auto-corrected:
|
|
77
|
-
- 3 magic numbers → Converted to constants
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
## Quick Check
|
|
81
|
-
|
|
82
|
-
```
|
|
83
|
-
✅ Modified only requested scope?
|
|
84
|
-
✅ No any types?
|
|
85
|
-
✅ Functions ≤ 20 lines?
|
|
86
|
-
✅ Nesting ≤ 3 levels?
|
|
87
|
-
✅ Error handling included?
|
|
88
|
-
✅ Magic numbers extracted to constants?
|
|
89
|
-
✅ Tests written?
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
## Grade
|
|
93
|
-
|
|
94
|
-
| Grade | Score | Action |
|
|
95
|
-
|-------|-------|--------|
|
|
96
|
-
| A+ | 95-100 | Pass |
|
|
97
|
-
| A | 90-94 | Pass |
|
|
98
|
-
| B+ | 85-89 | Show warning |
|
|
99
|
-
| B | 80-84 | Recommend improvement |
|
|
100
|
-
| C | 70-79 | Needs improvement |
|
|
101
|
-
| F | < 70 | Correction required |
|
|
102
|
-
|
|
103
|
-
## Usage
|
|
104
|
-
|
|
105
|
-
This agent is not called directly.
|
|
106
|
-
It runs automatically via PostToolUse Hook in `settings.json`.
|
|
107
|
-
|
|
108
|
-
```json
|
|
109
|
-
{
|
|
110
|
-
"hooks": {
|
|
111
|
-
"PostToolUse": [
|
|
112
|
-
{
|
|
113
|
-
"tools": ["Write", "Edit"],
|
|
114
|
-
"command": "claude --agent simplifier"
|
|
115
|
-
}
|
|
116
|
-
]
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
```
|
package/.claude/agents/tester.md
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
# Tester Agent (Haiku 4.5)
|
|
2
|
-
|
|
3
|
-
Test writing specialist sub-agent.
|
|
4
|
-
|
|
5
|
-
## Role
|
|
6
|
-
|
|
7
|
-
- Test code writing
|
|
8
|
-
- BDD Feature-based testing
|
|
9
|
-
- Edge case validation
|
|
10
|
-
- Test execution
|
|
11
|
-
|
|
12
|
-
## Model
|
|
13
|
-
|
|
14
|
-
**Haiku 4.5** - Fast test generation
|
|
15
|
-
|
|
16
|
-
## Usage
|
|
17
|
-
|
|
18
|
-
Call via Task tool:
|
|
19
|
-
```
|
|
20
|
-
Task(model: "haiku", prompt: "Write tests for the implemented code")
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Process
|
|
24
|
-
|
|
25
|
-
1. Check `.vibe/features/{feature-name}.feature`
|
|
26
|
-
2. Analyze implemented code
|
|
27
|
-
3. Write test cases
|
|
28
|
-
4. Run tests
|
|
29
|
-
5. Return results
|
|
30
|
-
|
|
31
|
-
## Output
|
|
32
|
-
|
|
33
|
-
```markdown
|
|
34
|
-
## Test Results
|
|
35
|
-
|
|
36
|
-
### Generated Tests
|
|
37
|
-
- src/__tests__/LoginForm.test.tsx
|
|
38
|
-
- src/__tests__/useLogin.test.ts
|
|
39
|
-
|
|
40
|
-
### Coverage
|
|
41
|
-
- Statements: 85%
|
|
42
|
-
- Branches: 80%
|
|
43
|
-
- Functions: 90%
|
|
44
|
-
|
|
45
|
-
### Execution Results
|
|
46
|
-
✅ 12 passed
|
|
47
|
-
⏭️ 0 skipped
|
|
48
|
-
❌ 0 failed
|
|
49
|
-
```
|