@su-record/vibe 2.3.0 โ 2.3.2
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 -35
- package/.claude/settings.local.json +24 -25
- package/.claude/vibe/constitution.md +184 -184
- package/.claude/vibe/rules/core/communication-guide.md +104 -104
- package/.claude/vibe/rules/core/development-philosophy.md +52 -52
- package/.claude/vibe/rules/core/quick-start.md +120 -120
- package/.claude/vibe/rules/languages/dart-flutter.md +509 -509
- package/.claude/vibe/rules/languages/go.md +396 -396
- package/.claude/vibe/rules/languages/java-spring.md +586 -586
- package/.claude/vibe/rules/languages/kotlin-android.md +491 -491
- package/.claude/vibe/rules/languages/python-django.md +371 -371
- package/.claude/vibe/rules/languages/python-fastapi.md +386 -386
- package/.claude/vibe/rules/languages/rust.md +425 -425
- package/.claude/vibe/rules/languages/swift-ios.md +516 -516
- package/.claude/vibe/rules/languages/typescript-nextjs.md +441 -441
- package/.claude/vibe/rules/languages/typescript-node.md +375 -375
- package/.claude/vibe/rules/languages/typescript-nuxt.md +521 -521
- package/.claude/vibe/rules/languages/typescript-react-native.md +446 -446
- package/.claude/vibe/rules/languages/typescript-react.md +525 -525
- package/.claude/vibe/rules/languages/typescript-vue.md +353 -353
- package/.claude/vibe/rules/quality/bdd-contract-testing.md +388 -388
- package/.claude/vibe/rules/quality/checklist.md +276 -276
- package/.claude/vibe/rules/quality/testing-strategy.md +437 -437
- package/.claude/vibe/rules/standards/anti-patterns.md +369 -369
- package/.claude/vibe/rules/standards/code-structure.md +291 -291
- package/.claude/vibe/rules/standards/complexity-metrics.md +312 -312
- package/.claude/vibe/rules/standards/naming-conventions.md +198 -198
- package/.claude/vibe/setup.sh +31 -31
- package/.claude/vibe/templates/constitution-template.md +184 -184
- package/.claude/vibe/templates/contract-backend-template.md +517 -517
- package/.claude/vibe/templates/contract-frontend-template.md +594 -594
- package/.claude/vibe/templates/feature-template.md +96 -96
- package/.claude/vibe/templates/spec-template.md +199 -199
- package/CLAUDE.md +345 -323
- package/LICENSE +21 -21
- package/README.md +744 -724
- package/agents/compounder.md +261 -261
- package/agents/diagrammer.md +178 -178
- package/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/agents/ui-previewer.md +137 -137
- package/commands/vibe.analyze.md +245 -180
- package/commands/vibe.reason.md +223 -183
- package/commands/vibe.review.md +200 -136
- package/commands/vibe.run.md +838 -836
- package/commands/vibe.spec.md +419 -383
- package/commands/vibe.utils.md +101 -101
- package/commands/vibe.verify.md +282 -241
- package/dist/cli/index.js +385 -385
- package/dist/lib/MemoryManager.d.ts.map +1 -1
- package/dist/lib/MemoryManager.js +119 -114
- package/dist/lib/MemoryManager.js.map +1 -1
- 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/index.d.ts +50 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +61 -0
- package/dist/tools/index.js.map +1 -0
- 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/hooks/hooks.json +121 -103
- package/package.json +73 -69
- package/skills/git-worktree.md +178 -178
- package/skills/priority-todos.md +236 -236
|
@@ -1,107 +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
|
-
```
|
|
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 +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
|
-
```
|
|
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
|
+
```
|
|
@@ -1,88 +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
|
-
```
|
|
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
|
+
```
|