@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.
Files changed (60) hide show
  1. package/.claude/settings.json +1 -1
  2. package/.claude/settings.local.json +5 -1
  3. package/{.vibe → .claude/vibe}/rules/quality/bdd-contract-testing.md +1 -1
  4. package/{.vibe → .claude/vibe}/setup.sh +1 -1
  5. package/CLAUDE.md +16 -6
  6. package/README.md +33 -15
  7. package/dist/cli/index.d.ts.map +1 -1
  8. package/dist/cli/index.js +100 -56
  9. package/dist/cli/index.js.map +1 -1
  10. package/dist/tools/reasoning/applyReasoningFramework.js +1 -1
  11. package/package.json +1 -2
  12. package/templates/feature-template.md +1 -1
  13. package/.claude/agents/explorer.md +0 -48
  14. package/.claude/agents/implementer.md +0 -53
  15. package/.claude/agents/research/best-practices-agent.md +0 -139
  16. package/.claude/agents/research/codebase-patterns-agent.md +0 -147
  17. package/.claude/agents/research/framework-docs-agent.md +0 -181
  18. package/.claude/agents/research/security-advisory-agent.md +0 -167
  19. package/.claude/agents/review/architecture-reviewer.md +0 -107
  20. package/.claude/agents/review/complexity-reviewer.md +0 -116
  21. package/.claude/agents/review/data-integrity-reviewer.md +0 -88
  22. package/.claude/agents/review/git-history-reviewer.md +0 -103
  23. package/.claude/agents/review/performance-reviewer.md +0 -86
  24. package/.claude/agents/review/python-reviewer.md +0 -152
  25. package/.claude/agents/review/rails-reviewer.md +0 -139
  26. package/.claude/agents/review/react-reviewer.md +0 -144
  27. package/.claude/agents/review/security-reviewer.md +0 -80
  28. package/.claude/agents/review/simplicity-reviewer.md +0 -140
  29. package/.claude/agents/review/test-coverage-reviewer.md +0 -116
  30. package/.claude/agents/review/typescript-reviewer.md +0 -127
  31. package/.claude/agents/searcher.md +0 -54
  32. package/.claude/agents/simplifier.md +0 -119
  33. package/.claude/agents/tester.md +0 -49
  34. package/.claude/commands/vibe.analyze.md +0 -239
  35. package/.claude/commands/vibe.compound.md +0 -261
  36. package/.claude/commands/vibe.continue.md +0 -88
  37. package/.claude/commands/vibe.diagram.md +0 -178
  38. package/.claude/commands/vibe.e2e.md +0 -266
  39. package/.claude/commands/vibe.reason.md +0 -306
  40. package/.claude/commands/vibe.review.md +0 -324
  41. package/.claude/commands/vibe.run.md +0 -760
  42. package/.claude/commands/vibe.spec.md +0 -383
  43. package/.claude/commands/vibe.tool.md +0 -153
  44. package/.claude/commands/vibe.ui.md +0 -137
  45. package/.claude/commands/vibe.verify.md +0 -238
  46. package/.claude/skills/git-worktree.md +0 -178
  47. package/.claude/skills/priority-todos.md +0 -236
  48. /package/{.vibe → .claude/vibe}/config.json +0 -0
  49. /package/{.vibe → .claude/vibe}/constitution.md +0 -0
  50. /package/{.vibe → .claude/vibe}/rules/core/communication-guide.md +0 -0
  51. /package/{.vibe → .claude/vibe}/rules/core/development-philosophy.md +0 -0
  52. /package/{.vibe → .claude/vibe}/rules/core/quick-start.md +0 -0
  53. /package/{.vibe → .claude/vibe}/rules/quality/checklist.md +0 -0
  54. /package/{.vibe → .claude/vibe}/rules/quality/testing-strategy.md +0 -0
  55. /package/{.vibe → .claude/vibe}/rules/standards/anti-patterns.md +0 -0
  56. /package/{.vibe → .claude/vibe}/rules/standards/code-structure.md +0 -0
  57. /package/{.vibe → .claude/vibe}/rules/standards/complexity-metrics.md +0 -0
  58. /package/{.vibe → .claude/vibe}/rules/standards/naming-conventions.md +0 -0
  59. /package/{.vibe → .claude/vibe}/rules/tools/mcp-hi-ai-guide.md +0 -0
  60. /package/{.vibe → .claude/vibe}/rules/tools/mcp-workflow.md +0 -0
@@ -1,147 +0,0 @@
1
- # Codebase Patterns 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: "Analyze existing patterns in codebase for [feature]. Find similar implementations."
25
- )
26
- ```
27
-
28
- ## Analysis Areas
29
-
30
- ### File Structure
31
- ```
32
- 프로젝트 구조 분석:
33
- ├── 디렉토리 구성
34
- ├── 네이밍 규칙
35
- ├── 모듈 분리 방식
36
- └── 테스트 파일 위치
37
- ```
38
-
39
- ### Code Patterns
40
- ```
41
- 패턴 추출:
42
- ├── 에러 처리 방식
43
- ├── 로깅 패턴
44
- ├── 데이터 검증 방식
45
- ├── API 응답 형식
46
- └── 의존성 주입 방식
47
- ```
48
-
49
- ### Conventions
50
- ```
51
- 컨벤션 분석:
52
- ├── 변수/함수 네이밍
53
- ├── 파일 네이밍
54
- ├── import 순서
55
- ├── 주석 스타일
56
- └── 타입 정의 방식
57
- ```
58
-
59
- ## Output Format
60
-
61
- ```markdown
62
- ## 🔍 Codebase Patterns Analysis
63
-
64
- ### Project Structure
65
-
66
- ```
67
- src/
68
- ├── api/ # REST endpoints
69
- ├── services/ # Business logic
70
- ├── models/ # Data models
71
- ├── utils/ # Helpers
72
- └── tests/ # Mirror structure
73
- ```
74
-
75
- ### Existing Patterns
76
-
77
- 1. **Error Handling Pattern**
78
- ```python
79
- # Found in: src/services/*.py
80
- try:
81
- result = operation()
82
- except SpecificError as e:
83
- logger.error(f"Operation failed: {e}")
84
- raise ServiceError(str(e)) from e
85
- ```
86
-
87
- 2. **API Response Pattern**
88
- ```python
89
- # Found in: src/api/*.py
90
- return {
91
- "success": True,
92
- "data": result,
93
- "meta": {"count": len(result)}
94
- }
95
- ```
96
-
97
- 3. **Service Layer Pattern**
98
- ```python
99
- # Found in: src/services/user_service.py
100
- class UserService:
101
- def __init__(self, db: Database):
102
- self.db = db
103
-
104
- def get_user(self, user_id: int) -> User:
105
- ...
106
- ```
107
-
108
- ### Naming Conventions
109
-
110
- | Type | Convention | Example |
111
- |------|------------|---------|
112
- | Files | snake_case | user_service.py |
113
- | Classes | PascalCase | UserService |
114
- | Functions | snake_case | get_user_by_id |
115
- | Constants | UPPER_CASE | MAX_RETRIES |
116
-
117
- ### Similar Implementations
118
-
119
- For feature "결제 기능":
120
-
121
- | Similar Feature | Location | Relevance |
122
- |-----------------|----------|-----------|
123
- | 주문 처리 | src/services/order.py | 90% |
124
- | 구독 관리 | src/services/subscription.py | 75% |
125
-
126
- ### Recommendations
127
-
128
- Based on existing patterns:
129
- 1. Create `src/services/payment_service.py`
130
- 2. Follow existing error handling pattern
131
- 3. Use existing validation decorators
132
- 4. Reuse `src/utils/api_response.py`
133
- ```
134
-
135
- ## Integration with /vibe.spec
136
-
137
- ```
138
- /vibe.spec "결제 기능"
139
-
140
- → codebase-patterns-agent 실행:
141
- "Find similar payment/transaction code. Extract patterns."
142
-
143
- → 결과를 SPEC에 반영:
144
- - 기존 패턴 따르기
145
- - 유사 코드 참조
146
- - 일관성 유지
147
- ```
@@ -1,181 +0,0 @@
1
- # Framework Docs Research Agent
2
-
3
- 프레임워크 문서 리서치 에이전트
4
-
5
- ## Role
6
-
7
- - 공식 문서 조회
8
- - 최신 API 확인
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 [framework] docs for [feature]. Get latest API, examples."
25
- )
26
- ```
27
-
28
- ## Integration with context7
29
-
30
- context7 MCP 서버 활용:
31
-
32
- ```
33
- resolve-library-id "react" → react
34
- get-library-docs "react" "hooks" → Hook 문서
35
-
36
- resolve-library-id "django" → django
37
- get-library-docs "django" "authentication" → Auth 문서
38
- ```
39
-
40
- ## External LLM Enhancement (Optional)
41
-
42
- **Gemini 활성화 시** 웹 검색 기반 최신 문서 보강:
43
-
44
- ```
45
- Primary: Task(Haiku) + context7
46
-
47
- [Gemini enabled?]
48
- ↓ YES
49
- mcp__vibe-gemini__gemini_chat(
50
- prompt: "[framework] [version] latest API changes and best practices",
51
- systemPrompt: "You are a framework documentation expert. Provide latest API info."
52
- )
53
-
54
- 결과 병합 → SPEC Context 반영
55
- ```
56
-
57
- **활용 시점:**
58
- - context7에서 최신 버전 문서 부재 시
59
- - Breaking changes 확인 필요 시
60
- - 공식 문서 외 실전 패턴 검색 시
61
-
62
- **Gemini 미설정 시:** Primary만으로 정상 작동
63
-
64
- ## Research Areas
65
-
66
- ### Frontend
67
- ```
68
- React:
69
- ├── Hooks API
70
- ├── Server Components
71
- ├── Suspense
72
- └── Concurrent Features
73
-
74
- Next.js:
75
- ├── App Router
76
- ├── Server Actions
77
- ├── Middleware
78
- └── Edge Runtime
79
-
80
- Vue:
81
- ├── Composition API
82
- ├── Reactivity System
83
- └── Pinia
84
- ```
85
-
86
- ### Backend
87
- ```
88
- Django:
89
- ├── Models & ORM
90
- ├── Class-based Views
91
- ├── REST Framework
92
- └── Async Support
93
-
94
- FastAPI:
95
- ├── Path Operations
96
- ├── Dependency Injection
97
- ├── Pydantic Models
98
- └── Background Tasks
99
-
100
- Rails:
101
- ├── ActiveRecord
102
- ├── Action Controllers
103
- ├── Hotwire/Turbo
104
- └── Active Job
105
- ```
106
-
107
- ### Database
108
- ```
109
- PostgreSQL:
110
- ├── Indexes
111
- ├── Partitioning
112
- ├── JSON operations
113
- └── Full-text search
114
-
115
- Redis:
116
- ├── Data structures
117
- ├── Pub/Sub
118
- ├── Lua scripting
119
- └── Cluster mode
120
- ```
121
-
122
- ## Output Format
123
-
124
- ```markdown
125
- ## 📖 Framework Documentation Research
126
-
127
- ### Framework: [framework-name]
128
- ### Version: [version]
129
-
130
- ### Relevant APIs
131
-
132
- 1. **API: useOptimistic (React 19)**
133
- ```tsx
134
- const [optimisticState, addOptimistic] = useOptimistic(
135
- state,
136
- updateFn
137
- );
138
- ```
139
- - Use case: Optimistic UI updates
140
- - Available in: React 19+
141
-
142
- 2. **API: Server Actions (Next.js 14)**
143
- ```tsx
144
- async function submitForm(formData: FormData) {
145
- 'use server';
146
- // Server-side logic
147
- }
148
- ```
149
-
150
- ### Breaking Changes
151
-
152
- | From | To | Change | Migration |
153
- |------|-----|--------|-----------|
154
- | v18 | v19 | useFormStatus location | Import from react-dom |
155
-
156
- ### Official Examples
157
-
158
- - [Example 1](url): Authentication flow
159
- - [Example 2](url): Data fetching
160
-
161
- ### Version Compatibility
162
-
163
- | Package | Min Version | Recommended |
164
- |---------|-------------|-------------|
165
- | Node.js | 18.17 | 20.x |
166
- | React | 18.2 | 19.x |
167
- ```
168
-
169
- ## Integration with /vibe.spec
170
-
171
- ```
172
- /vibe.spec "소셜 로그인"
173
-
174
- → framework-docs-agent 실행:
175
- "Research NextAuth.js v5 for social login. Get Google, GitHub providers."
176
-
177
- → 결과를 SPEC에 반영:
178
- - 최신 API 사용법
179
- - 필수 설정
180
- - 코드 예시
181
- ```
@@ -1,167 +0,0 @@
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
- ```
@@ -1,107 +0,0 @@
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
- ```
@@ -1,116 +0,0 @@
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
- ```