@kood/claude-code 0.5.0 → 0.5.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.
- package/dist/index.js +179 -33
- package/package.json +1 -1
- package/templates/.claude/agents/analyst.md +6 -14
- package/templates/.claude/agents/architect.md +6 -14
- package/templates/.claude/agents/code-reviewer.md +8 -14
- package/templates/.claude/agents/dependency-manager.md +8 -14
- package/templates/.claude/agents/deployment-validator.md +8 -14
- package/templates/.claude/agents/designer.md +8 -0
- package/templates/.claude/agents/document-writer.md +6 -14
- package/templates/.claude/agents/explore.md +8 -3
- package/templates/.claude/agents/git-operator.md +63 -17
- package/templates/.claude/agents/implementation-executor.md +14 -37
- package/templates/.claude/agents/ko-to-en-translator.md +8 -13
- package/templates/.claude/agents/lint-fixer.md +8 -172
- package/templates/.claude/agents/planner.md +6 -14
- package/templates/.claude/agents/refactor-advisor.md +8 -14
- package/templates/.claude/commands/git-all.md +3 -167
- package/templates/.claude/commands/git-session.md +3 -71
- package/templates/.claude/commands/lint-fix.md +119 -82
- package/templates/.claude/commands/lint-init.md +2 -54
- package/templates/.claude/commands/pre-deploy.md +143 -82
- package/templates/.claude/commands/version-update.md +171 -66
- package/templates/.claude/instructions/agent-patterns/agent-coordination.md +208 -0
- package/templates/.claude/instructions/agent-patterns/index.md +264 -0
- package/templates/.claude/instructions/agent-patterns/model-routing.md +167 -0
- package/templates/.claude/instructions/agent-patterns/parallel-execution.md +91 -0
- package/templates/.claude/instructions/agent-patterns/read-parallelization.md +106 -0
- package/templates/.claude/instructions/index.md +350 -0
- package/templates/.claude/instructions/multi-agent/agent-roster.md +811 -0
- package/templates/.claude/{PARALLEL_AGENTS.md → instructions/multi-agent/coordination-guide.md} +27 -336
- package/templates/.claude/instructions/{parallel-agent-execution.md → multi-agent/execution-patterns.md} +127 -438
- package/templates/.claude/instructions/multi-agent/index.md +282 -0
- package/templates/.claude/instructions/multi-agent/performance-optimization.md +456 -0
- package/templates/.claude/instructions/tech-stack/design-standards.md +282 -0
- package/templates/.claude/instructions/tech-stack/index.md +70 -0
- package/templates/.claude/instructions/tech-stack/prisma-patterns.md +352 -0
- package/templates/.claude/instructions/tech-stack/tanstack-patterns.md +275 -0
- package/templates/.claude/instructions/validation/forbidden-patterns.md +281 -0
- package/templates/.claude/instructions/validation/index.md +32 -0
- package/templates/.claude/instructions/validation/required-behaviors.md +331 -0
- package/templates/.claude/instructions/validation/verification-checklist.md +318 -0
- package/templates/.claude/instructions/workflow-patterns/index.md +18 -0
- package/templates/.claude/instructions/workflow-patterns/phase-based-workflow.md +250 -0
- package/templates/.claude/instructions/workflow-patterns/sequential-thinking.md +217 -0
- package/templates/.claude/instructions/workflow-patterns/todowrite-pattern.md +215 -0
- package/templates/.claude/skills/bug-fix/SKILL.md +972 -0
- package/templates/.claude/skills/docs-creator/AGENTS.md +4 -1
- package/templates/.claude/skills/docs-creator/SKILL.md +258 -0
- package/templates/.claude/skills/docs-refactor/AGENTS.md +4 -1
- package/templates/.claude/skills/docs-refactor/SKILL.md +145 -0
- package/templates/.claude/skills/execute/SKILL.md +15 -242
- package/templates/.claude/skills/figma-to-code/AGENTS.md +4 -1
- package/templates/.claude/skills/figma-to-code/SKILL.md +306 -0
- package/templates/.claude/skills/global-uiux-design/AGENTS.md +4 -1
- package/templates/.claude/skills/global-uiux-design/SKILL.md +455 -125
- package/templates/.claude/skills/korea-uiux-design/AGENTS.md +4 -1
- package/templates/.claude/skills/korea-uiux-design/SKILL.md +461 -116
- package/templates/.claude/skills/nextjs-react-best-practices/SKILL.md +177 -0
- package/templates/.claude/skills/plan/SKILL.md +1102 -98
- package/templates/.claude/skills/prd/SKILL.md +367 -66
- package/templates/.claude/skills/ralph/AGENTS.md +4 -1
- package/templates/.claude/skills/ralph/SKILL.md +83 -0
- package/templates/.claude/skills/refactor/SKILL.md +1214 -0
- package/templates/.claude/skills/tanstack-start-react-best-practices/SKILL.md +149 -0
- package/templates/.claude/commands/bug-fix.md +0 -510
- package/templates/.claude/commands/refactor.md +0 -788
|
@@ -4,7 +4,8 @@ allowed-tools: Bash, Read, Edit
|
|
|
4
4
|
argument-hint: <new-version | +1 | +minor | +major>
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
@../instructions/
|
|
7
|
+
@../instructions/multi-agent/coordination-guide.md
|
|
8
|
+
@../instructions/multi-agent/execution-patterns.md
|
|
8
9
|
|
|
9
10
|
# Version Update Command
|
|
10
11
|
|
|
@@ -59,92 +60,196 @@ argument-hint: <new-version | +1 | +minor | +major>
|
|
|
59
60
|
|
|
60
61
|
</workflow>
|
|
61
62
|
|
|
62
|
-
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
<parallel_execution_critical>
|
|
63
66
|
|
|
64
|
-
##
|
|
67
|
+
## ⚠️ CRITICAL: 병렬 작업 패턴
|
|
65
68
|
|
|
66
|
-
|
|
67
|
-
|-------|-------|------|
|
|
68
|
-
| @git-operator | haiku | 버전 커밋 및 태그 |
|
|
69
|
-
| @document-writer | haiku | CHANGELOG 작성 |
|
|
70
|
-
| @code-reviewer | haiku | 변경사항 검토 |
|
|
69
|
+
### 병렬 실행 가능 작업
|
|
71
70
|
|
|
72
|
-
|
|
71
|
+
**1. 버전 파일 병렬 탐색:**
|
|
73
72
|
|
|
74
73
|
```typescript
|
|
75
|
-
// ✅
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
prompt: "CHANGELOG.md에 버전 X.X.X 변경사항 추가"
|
|
80
|
-
})
|
|
81
|
-
Task({
|
|
82
|
-
subagent_type: "document-writer",
|
|
83
|
-
model: "haiku",
|
|
84
|
-
prompt: "README.md 버전 정보 업데이트"
|
|
85
|
-
})
|
|
74
|
+
// ✅ 단일 메시지에서 동시 탐색
|
|
75
|
+
Bash({ command: "fd -t f 'package.json' -E node_modules", description: "Find package.json files" })
|
|
76
|
+
Bash({ command: "rg \"\\.version\\(['\\\"]\" --type ts --type js -l", description: "Find version code" })
|
|
77
|
+
```
|
|
86
78
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
Task({
|
|
94
|
-
subagent_type: "document-writer",
|
|
95
|
-
model: "haiku",
|
|
96
|
-
prompt: "CHANGELOG 작성"
|
|
97
|
-
})
|
|
79
|
+
**이렇게 하면:**
|
|
80
|
+
- 2개의 탐색이 동시에 실행됨
|
|
81
|
+
- 총 실행 시간 = max(fd 시간, rg 시간)
|
|
82
|
+
- 순차 실행 대비 약 50% 시간 단축
|
|
83
|
+
|
|
84
|
+
**2. 버전 파일 병렬 읽기:**
|
|
98
85
|
|
|
99
|
-
|
|
100
|
-
//
|
|
101
|
-
|
|
86
|
+
```typescript
|
|
87
|
+
// ✅ 발견된 파일들 동시 읽기
|
|
88
|
+
Read({ file_path: "./package.json" })
|
|
89
|
+
Read({ file_path: "./packages/core/package.json" })
|
|
90
|
+
Read({ file_path: "./packages/core/src/index.ts" })
|
|
102
91
|
```
|
|
103
92
|
|
|
104
|
-
|
|
93
|
+
**3. 문서 작성 병렬:**
|
|
105
94
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
95
|
+
```typescript
|
|
96
|
+
// ✅ CHANGELOG + README 동시 작성
|
|
97
|
+
Task({ subagent_type: 'document-writer', model: 'haiku',
|
|
98
|
+
prompt: 'CHANGELOG.md에 버전 X.X.X 변경사항 추가' })
|
|
99
|
+
Task({ subagent_type: 'document-writer', model: 'haiku',
|
|
100
|
+
prompt: 'README.md 버전 정보 업데이트' })
|
|
101
|
+
```
|
|
111
102
|
|
|
112
|
-
|
|
103
|
+
### 순차 실행 필수 작업
|
|
104
|
+
|
|
105
|
+
**Git 작업은 반드시 순차로 실행:**
|
|
106
|
+
|
|
107
|
+
```typescript
|
|
108
|
+
// ❌ Git 병렬 실행 금지
|
|
109
|
+
Task({ prompt: 'git add [files]' })
|
|
110
|
+
Task({ prompt: 'git commit' }) // 충돌 위험!
|
|
111
|
+
|
|
112
|
+
// ✅ Git 순차 실행
|
|
113
|
+
// 1. git add [files]
|
|
114
|
+
// 2. git commit -m "chore: 버전 X.X.X로 업데이트"
|
|
115
|
+
// 3. git tag vX.X.X
|
|
116
|
+
// 4. git push origin main
|
|
117
|
+
// 5. git push origin vX.X.X
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### 병렬 실행 체크리스트
|
|
121
|
+
|
|
122
|
+
버전 업데이트 전 확인:
|
|
123
|
+
|
|
124
|
+
- [ ] 파일 탐색을 병렬로 실행하는가? (fd + rg 동시)
|
|
125
|
+
- [ ] 발견된 파일들을 병렬로 읽는가?
|
|
126
|
+
- [ ] 문서 작성을 병렬로 진행하는가? (CHANGELOG + README)
|
|
127
|
+
- [ ] Git 작업은 순차로 진행하는가?
|
|
128
|
+
- [ ] 태그 생성 전 커밋이 완료되었는가?
|
|
129
|
+
|
|
130
|
+
**모든 항목이 체크되어야 올바른 버전 업데이트입니다.**
|
|
131
|
+
|
|
132
|
+
### 복잡도별 병렬 패턴
|
|
133
|
+
|
|
134
|
+
**Patch 버전 (+1):**
|
|
135
|
+
```typescript
|
|
136
|
+
// 간단함 → haiku 병렬
|
|
137
|
+
Task({ subagent_type: 'document-writer', model: 'haiku',
|
|
138
|
+
prompt: 'CHANGELOG: 버그 수정 내역' })
|
|
139
|
+
Task({ subagent_type: 'document-writer', model: 'haiku',
|
|
140
|
+
prompt: 'README: 버전 번호 업데이트' })
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**Minor 버전 (+minor):**
|
|
144
|
+
```typescript
|
|
145
|
+
// 중간 → haiku/sonnet 병렬
|
|
146
|
+
Task({ subagent_type: 'document-writer', model: 'sonnet',
|
|
147
|
+
prompt: 'CHANGELOG: 새 기능 문서화' })
|
|
148
|
+
Task({ subagent_type: 'code-reviewer', model: 'haiku',
|
|
149
|
+
prompt: 'API 변경사항 검토' })
|
|
150
|
+
```
|
|
113
151
|
|
|
152
|
+
**Major 버전 (+major):**
|
|
114
153
|
```typescript
|
|
115
|
-
//
|
|
116
|
-
Task({ subagent_type: "document-writer", model: "haiku",
|
|
117
|
-
prompt: "CHANGELOG: 버그 수정 내역 추가" })
|
|
118
|
-
Task({ subagent_type: "git-operator", model: "haiku",
|
|
119
|
-
prompt: "버전 0.1.14 커밋" })
|
|
120
|
-
|
|
121
|
-
// 마이너 버전 (haiku/sonnet 병렬)
|
|
122
|
-
Task({ subagent_type: "document-writer", model: "sonnet",
|
|
123
|
-
prompt: "CHANGELOG: 새 기능 문서화" })
|
|
124
|
-
Task({ subagent_type: "code-reviewer", model: "haiku",
|
|
125
|
-
prompt: "API 변경사항 검토" })
|
|
126
|
-
|
|
127
|
-
// 메이저 버전 (sonnet 순차)
|
|
154
|
+
// 복잡함 → sonnet 순차
|
|
128
155
|
// 1. Breaking changes 분석 (sonnet)
|
|
129
156
|
// 2. 마이그레이션 가이드 작성 (sonnet)
|
|
130
|
-
// 3.
|
|
157
|
+
// 3. 문서화 + 검토 병렬
|
|
158
|
+
// 4. 버전 커밋 (git-operator 순차)
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### 실제 버전 업데이트 워크플로우
|
|
162
|
+
|
|
163
|
+
**Step 1: 병렬 파일 탐색**
|
|
164
|
+
|
|
165
|
+
```typescript
|
|
166
|
+
// 커맨드 시작 시 즉시 병렬 실행
|
|
167
|
+
Bash({
|
|
168
|
+
command: "fd -t f 'package.json' -E node_modules",
|
|
169
|
+
description: "Find all package.json files"
|
|
170
|
+
})
|
|
171
|
+
Bash({
|
|
172
|
+
command: "rg \"\\.version\\(['\\\"]\" --type ts --type js -l",
|
|
173
|
+
description: "Find version code files"
|
|
174
|
+
})
|
|
131
175
|
```
|
|
132
176
|
|
|
133
|
-
|
|
177
|
+
**Step 2: 병렬 파일 읽기**
|
|
178
|
+
|
|
179
|
+
```typescript
|
|
180
|
+
// 발견된 파일들 동시 읽기
|
|
181
|
+
Read({ file_path: "./package.json" })
|
|
182
|
+
Read({ file_path: "./packages/core/package.json" })
|
|
183
|
+
Read({ file_path: "./packages/cli/package.json" })
|
|
184
|
+
Read({ file_path: "./packages/core/src/index.ts" })
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
**Step 3: 새 버전 계산 및 업데이트**
|
|
188
|
+
|
|
189
|
+
- $ARGUMENTS 분석 (+1, +minor, +major, 또는 직접 버전)
|
|
190
|
+
- 모든 파일 Edit로 업데이트
|
|
191
|
+
|
|
192
|
+
**Step 4: 병렬 문서 작성**
|
|
193
|
+
|
|
194
|
+
```typescript
|
|
195
|
+
// 문서 업데이트 동시 진행
|
|
196
|
+
Task({
|
|
197
|
+
subagent_type: 'document-writer',
|
|
198
|
+
model: 'haiku',
|
|
199
|
+
description: 'CHANGELOG 업데이트',
|
|
200
|
+
prompt: 'CHANGELOG.md에 버전 0.5.2 변경사항 추가'
|
|
201
|
+
})
|
|
202
|
+
Task({
|
|
203
|
+
subagent_type: 'document-writer',
|
|
204
|
+
model: 'haiku',
|
|
205
|
+
description: 'README 버전 업데이트',
|
|
206
|
+
prompt: 'README.md 설치 섹션 버전 번호 업데이트'
|
|
207
|
+
})
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
**Step 5: Git 작업 (순차 필수)**
|
|
134
211
|
|
|
135
212
|
```bash
|
|
136
|
-
#
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
# ❌ 병렬 실행 금지
|
|
144
|
-
# Git 작업은 상태 의존성이 있어 순차 실행 필수
|
|
213
|
+
# 반드시 순차로 실행
|
|
214
|
+
git add package.json packages/*/package.json packages/*/src/index.ts
|
|
215
|
+
git commit -m "chore: 버전 0.5.2로 업데이트"
|
|
216
|
+
git tag v0.5.2
|
|
217
|
+
git push origin main
|
|
218
|
+
git push origin v0.5.2
|
|
145
219
|
```
|
|
146
220
|
|
|
147
|
-
|
|
221
|
+
**전체 실행 시간:**
|
|
222
|
+
- 순차: 탐색1(1초) + 탐색2(1초) + 읽기(4초) + 문서1(2초) + 문서2(2초) + git(3초) = 13초
|
|
223
|
+
- 병렬: 탐색(1초) + 읽기(1초) + 문서(2초) + git(3초) = 7초
|
|
224
|
+
- **개선: 46% 시간 단축**
|
|
225
|
+
|
|
226
|
+
**복잡도별 예시:**
|
|
227
|
+
|
|
228
|
+
```typescript
|
|
229
|
+
// Patch (+1): 전체 haiku 병렬
|
|
230
|
+
Task({ subagent_type: 'document-writer', model: 'haiku',
|
|
231
|
+
prompt: 'CHANGELOG: 버그 수정 기록' })
|
|
232
|
+
Task({ subagent_type: 'document-writer', model: 'haiku',
|
|
233
|
+
prompt: 'README: 버전 0.5.2 표시' })
|
|
234
|
+
// → 총 2초 (병렬)
|
|
235
|
+
|
|
236
|
+
// Minor (+minor): haiku/sonnet 병렬
|
|
237
|
+
Task({ subagent_type: 'document-writer', model: 'sonnet',
|
|
238
|
+
prompt: 'CHANGELOG: 새 기능 상세 문서화' })
|
|
239
|
+
Task({ subagent_type: 'code-reviewer', model: 'haiku',
|
|
240
|
+
prompt: 'API 변경사항 영향도 검토' })
|
|
241
|
+
// → 총 3초 (병렬)
|
|
242
|
+
|
|
243
|
+
// Major (+major): sonnet 순차 + 병렬 조합
|
|
244
|
+
// 1. Breaking changes 분석 (sonnet, 5초)
|
|
245
|
+
// 2. 마이그레이션 가이드 + 문서 병렬 (sonnet, 4초)
|
|
246
|
+
// 3. git 작업 (3초)
|
|
247
|
+
// → 총 12초
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
</parallel_execution_critical>
|
|
251
|
+
|
|
252
|
+
---
|
|
148
253
|
|
|
149
254
|
<update_targets>
|
|
150
255
|
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
# Agent Coordination Patterns
|
|
2
|
+
|
|
3
|
+
**목적**: 여러 에이전트 간 효율적인 협업 전략
|
|
4
|
+
|
|
5
|
+
## 에이전트 역할 분류
|
|
6
|
+
|
|
7
|
+
### Tier 1: 계획 및 분석
|
|
8
|
+
| Agent | 모델 | 역할 | READ-ONLY |
|
|
9
|
+
|-------|------|------|-----------|
|
|
10
|
+
| planner | opus | 아키텍처 설계, 계획 검증 | ❌ |
|
|
11
|
+
| analyst | sonnet | 요구사항 분석, 가정 검증 | ✅ |
|
|
12
|
+
| architect | sonnet/opus | 아키텍처 분석, 디버깅 조언 | ✅ |
|
|
13
|
+
|
|
14
|
+
### Tier 2: 실행 및 구현
|
|
15
|
+
| Agent | 모델 | 역할 | READ-ONLY |
|
|
16
|
+
|-------|------|------|-----------|
|
|
17
|
+
| implementation-executor | sonnet | 기능 구현, 버그 수정 | ❌ |
|
|
18
|
+
| designer | sonnet/opus | UI/UX 구현 | ❌ |
|
|
19
|
+
| lint-fixer | sonnet | tsc/eslint 오류 수정 | ❌ |
|
|
20
|
+
|
|
21
|
+
### Tier 3: 검증 및 지원
|
|
22
|
+
| Agent | 모델 | 역할 | READ-ONLY |
|
|
23
|
+
|-------|------|------|-----------|
|
|
24
|
+
| code-reviewer | opus | 코드 품질/보안 검토 | ✅ |
|
|
25
|
+
| deployment-validator | sonnet | typecheck/lint/build 검증 | ❌ |
|
|
26
|
+
| refactor-advisor | sonnet | 리팩토링 조언 | ✅ |
|
|
27
|
+
|
|
28
|
+
### Tier 4: 유틸리티
|
|
29
|
+
| Agent | 모델 | 역할 | READ-ONLY |
|
|
30
|
+
|-------|------|------|-----------|
|
|
31
|
+
| explore | haiku | 코드베이스 탐색 | ✅ |
|
|
32
|
+
| document-writer | haiku/sonnet | 기술 문서 작성 | ❌ |
|
|
33
|
+
| git-operator | haiku | Git 커밋/푸시 | ❌ |
|
|
34
|
+
| dependency-manager | sonnet | 의존성 분석/업데이트 | ❌ |
|
|
35
|
+
| ko-to-en-translator | haiku | 한글→영어 번역 | ❌ |
|
|
36
|
+
|
|
37
|
+
## 협업 패턴
|
|
38
|
+
|
|
39
|
+
### 패턴 1: 계획 → 실행 → 검증
|
|
40
|
+
|
|
41
|
+
```typescript
|
|
42
|
+
// 1. 분석 및 계획 (병렬)
|
|
43
|
+
Task(subagent_type="analyst", model="sonnet",
|
|
44
|
+
prompt="요구사항 분석 및 가정 검증")
|
|
45
|
+
Task(subagent_type="architect", model="opus",
|
|
46
|
+
prompt="아키텍처 분석 및 설계 조언")
|
|
47
|
+
|
|
48
|
+
// 2. 구현 (병렬)
|
|
49
|
+
Task(subagent_type="implementation-executor", model="sonnet",
|
|
50
|
+
prompt="백엔드 API 구현")
|
|
51
|
+
Task(subagent_type="designer", model="sonnet",
|
|
52
|
+
prompt="프론트엔드 UI 구현")
|
|
53
|
+
|
|
54
|
+
// 3. 검증 (병렬)
|
|
55
|
+
Task(subagent_type="code-reviewer", model="opus",
|
|
56
|
+
prompt="보안 및 성능 검토")
|
|
57
|
+
Task(subagent_type="deployment-validator", model="sonnet",
|
|
58
|
+
prompt="빌드 및 타입 검증")
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### 패턴 2: 탐색 → 분석 → 구현
|
|
62
|
+
|
|
63
|
+
```typescript
|
|
64
|
+
// 1. 탐색 (병렬, haiku)
|
|
65
|
+
Task(subagent_type="explore", model="haiku",
|
|
66
|
+
prompt="인증 관련 파일 탐색")
|
|
67
|
+
Task(subagent_type="explore", model="haiku",
|
|
68
|
+
prompt="DB 스키마 분석")
|
|
69
|
+
|
|
70
|
+
// 2. 분석 (순차, sonnet/opus)
|
|
71
|
+
Task(subagent_type="analyst", model="sonnet",
|
|
72
|
+
prompt="현재 구조 분석 및 개선 방향")
|
|
73
|
+
|
|
74
|
+
// 3. 구현 (병렬, sonnet)
|
|
75
|
+
Task(subagent_type="implementation-executor", model="sonnet",
|
|
76
|
+
prompt="개선 사항 적용")
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### 패턴 3: 동시 다발 작업 (풀스택)
|
|
80
|
+
|
|
81
|
+
```typescript
|
|
82
|
+
// 백엔드 + 프론트엔드 + 문서 동시 진행
|
|
83
|
+
Task(subagent_type="implementation-executor", model="sonnet",
|
|
84
|
+
prompt="User API CRUD 구현")
|
|
85
|
+
Task(subagent_type="designer", model="sonnet",
|
|
86
|
+
prompt="User Profile UI 구현")
|
|
87
|
+
Task(subagent_type="document-writer", model="haiku",
|
|
88
|
+
prompt="User API 문서 작성")
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### 패턴 4: 다중 검토 (여러 관점)
|
|
92
|
+
|
|
93
|
+
```typescript
|
|
94
|
+
// 보안 + 성능 + 접근성 동시 검토
|
|
95
|
+
Task(subagent_type="code-reviewer", model="opus",
|
|
96
|
+
prompt="보안 취약점 검토: XSS, SQL Injection, CSRF")
|
|
97
|
+
Task(subagent_type="code-reviewer", model="opus",
|
|
98
|
+
prompt="성능 검토: N+1 쿼리, 불필요한 리렌더")
|
|
99
|
+
Task(subagent_type="code-reviewer", model="opus",
|
|
100
|
+
prompt="접근성 검토: ARIA, 키보드 네비게이션")
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## 병렬 vs 순차 결정
|
|
104
|
+
|
|
105
|
+
| 조건 | 실행 방식 | 이유 |
|
|
106
|
+
|------|----------|------|
|
|
107
|
+
| 독립적인 작업 | ✅ 병렬 | 시간 단축 |
|
|
108
|
+
| 다른 파일/영역 | ✅ 병렬 | 충돌 없음 |
|
|
109
|
+
| 다른 도메인 (백엔드/프론트) | ✅ 병렬 | 완전히 분리 |
|
|
110
|
+
| 순차 의존성 | ❌ 순차 | 이전 결과 필요 |
|
|
111
|
+
| 같은 파일 수정 | ❌ 순차 | 충돌 방지 |
|
|
112
|
+
| Git 작업 | ❌ 순차 | 커밋 순서 중요 |
|
|
113
|
+
|
|
114
|
+
## 에이전트 위임 원칙
|
|
115
|
+
|
|
116
|
+
### 언제 위임하는가
|
|
117
|
+
|
|
118
|
+
- [ ] 작업이 독립적인가?
|
|
119
|
+
- [ ] 새 컨텍스트가 필요한가?
|
|
120
|
+
- [ ] 전문 지식이 필요한가?
|
|
121
|
+
- [ ] 10분 이상 소요될까?
|
|
122
|
+
|
|
123
|
+
**하나라도 Yes → 에이전트 위임**
|
|
124
|
+
|
|
125
|
+
### 위임 금지 케이스
|
|
126
|
+
|
|
127
|
+
- 간단한 파일 읽기 (직접 Read)
|
|
128
|
+
- 1-2줄 수정 (직접 Edit)
|
|
129
|
+
- 즉각적인 Bash 명령어
|
|
130
|
+
|
|
131
|
+
## READ-ONLY 에이전트 활용
|
|
132
|
+
|
|
133
|
+
**READ-ONLY 에이전트**: analyst, architect, code-reviewer, refactor-advisor, explore
|
|
134
|
+
|
|
135
|
+
**특징:**
|
|
136
|
+
- 파일 수정 불가
|
|
137
|
+
- 조언 및 분석만 제공
|
|
138
|
+
- 병렬 실행 안전 (충돌 없음)
|
|
139
|
+
|
|
140
|
+
**활용 패턴:**
|
|
141
|
+
```typescript
|
|
142
|
+
// 여러 READ-ONLY 에이전트 병렬 실행 (안전)
|
|
143
|
+
Task(subagent_type="analyst", model="sonnet", ...)
|
|
144
|
+
Task(subagent_type="architect", model="opus", ...)
|
|
145
|
+
Task(subagent_type="code-reviewer", model="opus", ...)
|
|
146
|
+
Task(subagent_type="explore", model="haiku", ...)
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## 실전 시나리오
|
|
150
|
+
|
|
151
|
+
### 시나리오 1: 새 기능 구현
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
Phase 1: 분석 (병렬)
|
|
155
|
+
├─ analyst: 요구사항 명확화
|
|
156
|
+
├─ architect: 아키텍처 분석
|
|
157
|
+
└─ explore: 관련 코드 탐색
|
|
158
|
+
|
|
159
|
+
Phase 2: 구현 (병렬)
|
|
160
|
+
├─ implementation-executor: 백엔드
|
|
161
|
+
├─ designer: 프론트엔드
|
|
162
|
+
└─ document-writer: 문서
|
|
163
|
+
|
|
164
|
+
Phase 3: 검증 (병렬)
|
|
165
|
+
├─ code-reviewer: 품질 검토
|
|
166
|
+
└─ deployment-validator: 빌드 검증
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### 시나리오 2: 버그 수정
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
Phase 1: 조사 (병렬)
|
|
173
|
+
├─ explore: 버그 관련 코드 탐색
|
|
174
|
+
└─ architect: 원인 분석
|
|
175
|
+
|
|
176
|
+
Phase 2: 수정 (순차)
|
|
177
|
+
└─ implementation-executor: 버그 수정
|
|
178
|
+
|
|
179
|
+
Phase 3: 검증 (순차)
|
|
180
|
+
└─ deployment-validator: 테스트 실행
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### 시나리오 3: 리팩토링
|
|
184
|
+
|
|
185
|
+
```
|
|
186
|
+
Phase 1: 분석 (병렬)
|
|
187
|
+
├─ refactor-advisor: 개선 방향 제시
|
|
188
|
+
├─ code-reviewer: 현재 문제점 식별
|
|
189
|
+
└─ explore: 영향 범위 파악
|
|
190
|
+
|
|
191
|
+
Phase 2: 실행 (순차)
|
|
192
|
+
└─ implementation-executor: 리팩토링
|
|
193
|
+
|
|
194
|
+
Phase 3: 검증 (병렬)
|
|
195
|
+
├─ code-reviewer: 품질 향상 확인
|
|
196
|
+
└─ deployment-validator: 회귀 테스트
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
## 체크리스트
|
|
200
|
+
|
|
201
|
+
작업 시작 전:
|
|
202
|
+
|
|
203
|
+
- [ ] 어떤 에이전트가 필요한가?
|
|
204
|
+
- [ ] 병렬 실행 가능한가?
|
|
205
|
+
- [ ] 적절한 모델 선택했는가?
|
|
206
|
+
- [ ] READ-ONLY 제약 확인했는가?
|
|
207
|
+
|
|
208
|
+
**에이전트 협업으로 시간 단축 + 품질 향상**
|