@kood/claude-code 0.5.3 → 0.5.4
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 +548 -340
- package/package.json +1 -1
- package/templates/.claude/agents/document-writer.md +71 -304
- package/templates/.claude/instructions/agent-patterns/index.md +7 -7
- package/templates/.claude/instructions/document-templates/ralph-templates.md +71 -0
- package/templates/.claude/instructions/index.md +14 -14
- package/templates/.claude/instructions/multi-agent/agent-roster.md +14 -14
- package/templates/.claude/instructions/multi-agent/index.md +4 -4
- package/templates/.claude/skills/docs-creator/AGENTS.md +54 -176
- package/templates/.claude/skills/docs-creator/SKILL.md +97 -463
- package/templates/.claude/skills/docs-refactor/AGENTS.md +61 -190
- package/templates/.claude/skills/docs-refactor/SKILL.md +66 -442
- package/templates/.claude/skills/execute/SKILL.md +540 -13
- package/templates/.claude/skills/plan/SKILL.md +83 -17
- package/templates/.claude/skills/ralph/SKILL.md +17 -14
- package/templates/.claude/skills/refactor/AGENTS.md +269 -0
- package/templates/.claude/skills/refactor/SKILL.md +424 -66
- package/templates/.claude/skills/stitch-design/README.md +34 -0
- package/templates/.claude/skills/stitch-design/SKILL.md +213 -0
- package/templates/.claude/skills/stitch-design/examples/DESIGN.md +154 -0
- package/templates/.claude/skills/stitch-loop/README.md +54 -0
- package/templates/.claude/skills/stitch-loop/SKILL.md +316 -0
- package/templates/.claude/skills/stitch-loop/examples/SITE.md +73 -0
- package/templates/.claude/skills/stitch-loop/examples/next-prompt.md +25 -0
- package/templates/.claude/skills/stitch-loop/resources/baton-schema.md +61 -0
- package/templates/.claude/skills/stitch-loop/resources/site-template.md +104 -0
- package/templates/.claude/skills/stitch-react/README.md +36 -0
- package/templates/.claude/skills/stitch-react/SKILL.md +323 -0
- package/templates/.claude/skills/stitch-react/examples/gold-standard-card.tsx +88 -0
- package/templates/.claude/skills/stitch-react/package-lock.json +231 -0
- package/templates/.claude/skills/stitch-react/package.json +16 -0
- package/templates/.claude/skills/stitch-react/resources/architecture-checklist.md +15 -0
- package/templates/.claude/skills/stitch-react/resources/component-template.tsx +37 -0
- package/templates/.claude/skills/stitch-react/resources/stitch-api-reference.md +14 -0
- package/templates/.claude/skills/stitch-react/resources/style-guide.json +24 -0
- package/templates/.claude/skills/stitch-react/scripts/fetch-stitch.sh +30 -0
- package/templates/.claude/skills/stitch-react/scripts/validate.js +77 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: execute
|
|
3
|
-
description: 계획
|
|
3
|
+
description: 계획 또는 작업을 Sequential Thinking으로 분석하여 즉시 구현. 옵션 제시 없이 바로 실행.
|
|
4
4
|
user-invocable: true
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -12,7 +12,7 @@ user-invocable: true
|
|
|
12
12
|
|
|
13
13
|
# Execute Skill
|
|
14
14
|
|
|
15
|
-
> 계획
|
|
15
|
+
> 계획 또는 작업을 Sequential Thinking으로 분석하여 즉시 구현. 옵션 제시 없이 바로 실행.
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
@@ -38,6 +38,402 @@ user-invocable: true
|
|
|
38
38
|
|
|
39
39
|
---
|
|
40
40
|
|
|
41
|
+
<parallel_agent_execution>
|
|
42
|
+
|
|
43
|
+
## 병렬 Agent 실행
|
|
44
|
+
|
|
45
|
+
### Recommended Agents
|
|
46
|
+
|
|
47
|
+
| Agent | Model | 용도 | 복잡도 |
|
|
48
|
+
|-------|-------|------|--------|
|
|
49
|
+
| **@implementation-executor** | sonnet | 즉시 구현, 독립 모듈 개발 | MEDIUM-HIGH |
|
|
50
|
+
| **@explore** | haiku/sonnet | 코드베이스 탐색, 구조 파악 | LOW-MEDIUM |
|
|
51
|
+
| **@architect** | sonnet/opus | 아키텍처 분석, 설계 검토 (READ-ONLY) | MEDIUM-HIGH |
|
|
52
|
+
| **@analyst** | sonnet | 요구사항 분석, 기술 조사, 가정 검증 | MEDIUM |
|
|
53
|
+
| **@document-writer** | haiku | 문서 작성 (README, API 문서) | LOW-MEDIUM |
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
### Parallel Execution Patterns
|
|
58
|
+
|
|
59
|
+
### Read 도구 병렬화
|
|
60
|
+
|
|
61
|
+
**프로젝트 분석 시 파일 병렬 읽기:**
|
|
62
|
+
|
|
63
|
+
```typescript
|
|
64
|
+
// ❌ 순차 읽기 (느림)
|
|
65
|
+
Read({ file_path: "src/file1.ts" })
|
|
66
|
+
// 대기...
|
|
67
|
+
Read({ file_path: "src/file2.ts" })
|
|
68
|
+
|
|
69
|
+
// ✅ 병렬 읽기 (빠름)
|
|
70
|
+
Read({ file_path: "src/file1.ts" })
|
|
71
|
+
Read({ file_path: "src/file2.ts" })
|
|
72
|
+
Read({ file_path: "src/file3.ts" })
|
|
73
|
+
Read({ file_path: "docs/api.md" })
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**복잡한 탐색은 explore 에이전트 활용:**
|
|
77
|
+
|
|
78
|
+
```typescript
|
|
79
|
+
// 여러 영역 동시 탐색
|
|
80
|
+
Task(subagent_type="explore", model="haiku",
|
|
81
|
+
prompt="영역 1 파일 구조 및 패턴 분석")
|
|
82
|
+
Task(subagent_type="explore", model="haiku",
|
|
83
|
+
prompt="영역 2 의존성 및 관계 분석")
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
**1. 탐색 + 구현 병렬**
|
|
89
|
+
|
|
90
|
+
복잡한 시스템에서 여러 영역을 동시에 구현할 때 사용:
|
|
91
|
+
|
|
92
|
+
```typescript
|
|
93
|
+
// 프론트엔드 + 백엔드 동시 구현
|
|
94
|
+
Task({
|
|
95
|
+
subagent_type: 'implementation-executor',
|
|
96
|
+
model: 'sonnet',
|
|
97
|
+
prompt: '프론트엔드 프로필 편집 UI 구현 (폼, 검증, 에러 처리)'
|
|
98
|
+
})
|
|
99
|
+
|
|
100
|
+
Task({
|
|
101
|
+
subagent_type: 'implementation-executor',
|
|
102
|
+
model: 'sonnet',
|
|
103
|
+
prompt: '백엔드 프로필 업데이트 API 구현 (Server Function, Prisma)'
|
|
104
|
+
})
|
|
105
|
+
|
|
106
|
+
Task({
|
|
107
|
+
subagent_type: 'document-writer',
|
|
108
|
+
model: 'haiku',
|
|
109
|
+
prompt: 'API 문서 및 컴포넌트 가이드 작성'
|
|
110
|
+
})
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
**2. 독립 모듈 병렬 구현**
|
|
114
|
+
|
|
115
|
+
독립적인 모듈/컴포넌트를 각각 구현할 때:
|
|
116
|
+
|
|
117
|
+
```typescript
|
|
118
|
+
// 여러 컴포넌트 동시 구현
|
|
119
|
+
Task({
|
|
120
|
+
subagent_type: 'implementation-executor',
|
|
121
|
+
model: 'sonnet',
|
|
122
|
+
prompt: 'User 프로필 카드 컴포넌트 구현'
|
|
123
|
+
})
|
|
124
|
+
|
|
125
|
+
Task({
|
|
126
|
+
subagent_type: 'implementation-executor',
|
|
127
|
+
model: 'sonnet',
|
|
128
|
+
prompt: 'User 설정 모달 컴포넌트 구현'
|
|
129
|
+
})
|
|
130
|
+
|
|
131
|
+
Task({
|
|
132
|
+
subagent_type: 'implementation-executor',
|
|
133
|
+
model: 'sonnet',
|
|
134
|
+
prompt: 'User 통계 대시보드 컴포넌트 구현'
|
|
135
|
+
})
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
**3. 기능 + 테스트 + 문서 병렬**
|
|
139
|
+
|
|
140
|
+
기능 구현과 테스트, 문서화를 동시에 처리:
|
|
141
|
+
|
|
142
|
+
```typescript
|
|
143
|
+
// 기능, 테스트, 문서 동시 작업
|
|
144
|
+
Task({
|
|
145
|
+
subagent_type: 'implementation-executor',
|
|
146
|
+
model: 'sonnet',
|
|
147
|
+
prompt: '실시간 알림 기능 구현 (WebSocket 서버 + 클라이언트 훅)'
|
|
148
|
+
})
|
|
149
|
+
|
|
150
|
+
Task({
|
|
151
|
+
subagent_type: 'implementation-executor',
|
|
152
|
+
model: 'sonnet',
|
|
153
|
+
prompt: '알림 기능 테스트 작성 (unit + integration)'
|
|
154
|
+
})
|
|
155
|
+
|
|
156
|
+
Task({
|
|
157
|
+
subagent_type: 'document-writer',
|
|
158
|
+
model: 'haiku',
|
|
159
|
+
prompt: '알림 API 문서 및 사용 가이드 작성'
|
|
160
|
+
})
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
**4. 리팩토링 병렬화**
|
|
164
|
+
|
|
165
|
+
독립적인 모듈을 각각 리팩토링:
|
|
166
|
+
|
|
167
|
+
```typescript
|
|
168
|
+
// 여러 모듈 동시 리팩토링
|
|
169
|
+
Task({
|
|
170
|
+
subagent_type: 'implementation-executor',
|
|
171
|
+
model: 'sonnet',
|
|
172
|
+
prompt: 'User 모듈 리팩토링 (타입 안정성, 복잡도 감소)'
|
|
173
|
+
})
|
|
174
|
+
|
|
175
|
+
Task({
|
|
176
|
+
subagent_type: 'implementation-executor',
|
|
177
|
+
model: 'sonnet',
|
|
178
|
+
prompt: 'Payment 모듈 리팩토링 (에러 핸들링 개선)'
|
|
179
|
+
})
|
|
180
|
+
|
|
181
|
+
Task({
|
|
182
|
+
subagent_type: 'implementation-executor',
|
|
183
|
+
model: 'haiku',
|
|
184
|
+
prompt: 'Notification 모듈 리팩토링 (템플릿 구조화)'
|
|
185
|
+
})
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
**5. 탐색 + 분석 병렬**
|
|
189
|
+
|
|
190
|
+
코드베이스를 여러 관점에서 동시 분석:
|
|
191
|
+
|
|
192
|
+
```typescript
|
|
193
|
+
// 여러 영역 동시 탐색 및 분석
|
|
194
|
+
Task({
|
|
195
|
+
subagent_type: 'explore',
|
|
196
|
+
model: 'haiku',
|
|
197
|
+
prompt: '인증 관련 파일 구조 및 패턴 분석'
|
|
198
|
+
})
|
|
199
|
+
|
|
200
|
+
Task({
|
|
201
|
+
subagent_type: 'architect',
|
|
202
|
+
model: 'sonnet',
|
|
203
|
+
prompt: '현재 인증 아키텍처 평가 및 개선점 도출'
|
|
204
|
+
})
|
|
205
|
+
|
|
206
|
+
Task({
|
|
207
|
+
subagent_type: 'analyst',
|
|
208
|
+
model: 'sonnet',
|
|
209
|
+
prompt: '인증 보안 취약점 분석 및 완화 방안'
|
|
210
|
+
})
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
### Model Routing
|
|
216
|
+
|
|
217
|
+
| 복잡도 | 조건 | 권장 Model | Agent | 예시 |
|
|
218
|
+
|--------|------|-----------|-------|------|
|
|
219
|
+
| **LOW** | 단순 구현, 파일 1-2개 | haiku | implementation-executor | 스타일 변경, 간단한 컴포넌트 |
|
|
220
|
+
| **MEDIUM** | 일반 구현, 파일 3-5개 | sonnet | implementation-executor | 기능 추가, 리팩토링 |
|
|
221
|
+
| **HIGH** | 복잡한 구현, 아키텍처 변경 | opus | implementation-executor | 시스템 재설계, 대규모 변경 |
|
|
222
|
+
|
|
223
|
+
**Model 선택 가이드:**
|
|
224
|
+
|
|
225
|
+
```text
|
|
226
|
+
✅ haiku:
|
|
227
|
+
- 간단한 구현, 1-2 파일 수정
|
|
228
|
+
- 스타일 변경, 설정 업데이트
|
|
229
|
+
- 병렬 실행 시 비용 최적화
|
|
230
|
+
|
|
231
|
+
✅ sonnet:
|
|
232
|
+
- 일반 기능 구현, 3-5 파일
|
|
233
|
+
- 리팩토링, 버그 수정
|
|
234
|
+
- 균형잡힌 품질/비용
|
|
235
|
+
|
|
236
|
+
✅ opus:
|
|
237
|
+
- 복잡한 기능, 아키텍처 변경
|
|
238
|
+
- 대규모 리팩토링
|
|
239
|
+
- 최고 품질 필요 시
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
**Agent별 모델 추천:**
|
|
243
|
+
|
|
244
|
+
| Agent | 기본 모델 | 복잡한 경우 | 이유 |
|
|
245
|
+
|-------|----------|------------|------|
|
|
246
|
+
| **implementation-executor** | sonnet | opus | 일반 구현은 sonnet, 복잡한 경우 opus |
|
|
247
|
+
| **explore** | haiku | sonnet | 탐색은 빠르게, 복잡한 분석은 sonnet |
|
|
248
|
+
| **analyst** | sonnet | opus | 일반 조사는 sonnet, 전략적 결정은 opus |
|
|
249
|
+
| **architect** | sonnet | opus | 일반 분석은 sonnet, 설계는 opus |
|
|
250
|
+
| **document-writer** | haiku | sonnet | 문서는 haiku, 복잡한 기술 문서는 sonnet |
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
### Practical Examples
|
|
255
|
+
|
|
256
|
+
**예시 1: 프로필 기능 구현 (탐색 + 구현 병렬)**
|
|
257
|
+
|
|
258
|
+
```typescript
|
|
259
|
+
// 1단계: 현재 상태 탐색 (병렬)
|
|
260
|
+
Task({
|
|
261
|
+
subagent_type: 'explore',
|
|
262
|
+
model: 'haiku',
|
|
263
|
+
description: '프로필 UI 분석',
|
|
264
|
+
prompt: '프로필 관련 컴포넌트, 라우트 분석'
|
|
265
|
+
})
|
|
266
|
+
|
|
267
|
+
Task({
|
|
268
|
+
subagent_type: 'explore',
|
|
269
|
+
model: 'haiku',
|
|
270
|
+
description: '프로필 API 분석',
|
|
271
|
+
prompt: 'User 관련 Server Function, DB 스키마 분석'
|
|
272
|
+
})
|
|
273
|
+
|
|
274
|
+
// 2단계: 기능 구현 (병렬)
|
|
275
|
+
Task({
|
|
276
|
+
subagent_type: 'implementation-executor',
|
|
277
|
+
model: 'sonnet',
|
|
278
|
+
description: '프론트엔드 구현',
|
|
279
|
+
prompt: `
|
|
280
|
+
프로필 편집 기능 구현:
|
|
281
|
+
- EditProfileForm 컴포넌트
|
|
282
|
+
- Zod 검증 스키마
|
|
283
|
+
- TanStack Query 훅
|
|
284
|
+
`
|
|
285
|
+
})
|
|
286
|
+
|
|
287
|
+
Task({
|
|
288
|
+
subagent_type: 'implementation-executor',
|
|
289
|
+
model: 'sonnet',
|
|
290
|
+
description: '백엔드 구현',
|
|
291
|
+
prompt: `
|
|
292
|
+
프로필 업데이트 API 구현:
|
|
293
|
+
- updateProfile Server Function
|
|
294
|
+
- Prisma 쿼리
|
|
295
|
+
- 미들웨어 (인증)
|
|
296
|
+
`
|
|
297
|
+
})
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
**예시 2: 실시간 기능 구현 (기능 + 테스트 + 문서 병렬)**
|
|
301
|
+
|
|
302
|
+
```typescript
|
|
303
|
+
// 기능, 테스트, 문서 동시 작업
|
|
304
|
+
Task({
|
|
305
|
+
subagent_type: 'implementation-executor',
|
|
306
|
+
model: 'sonnet',
|
|
307
|
+
description: '실시간 알림 구현',
|
|
308
|
+
prompt: `
|
|
309
|
+
실시간 알림 기능:
|
|
310
|
+
- Socket.io 서버 설정
|
|
311
|
+
- useNotifications 훅
|
|
312
|
+
- NotificationBell 컴포넌트
|
|
313
|
+
`
|
|
314
|
+
})
|
|
315
|
+
|
|
316
|
+
Task({
|
|
317
|
+
subagent_type: 'implementation-executor',
|
|
318
|
+
model: 'sonnet',
|
|
319
|
+
description: '테스트 작성',
|
|
320
|
+
prompt: `
|
|
321
|
+
알림 기능 테스트:
|
|
322
|
+
- WebSocket 연결 테스트
|
|
323
|
+
- 알림 수신 테스트
|
|
324
|
+
- UI 통합 테스트
|
|
325
|
+
`
|
|
326
|
+
})
|
|
327
|
+
|
|
328
|
+
Task({
|
|
329
|
+
subagent_type: 'document-writer',
|
|
330
|
+
model: 'haiku',
|
|
331
|
+
description: 'API 문서 작성',
|
|
332
|
+
prompt: `
|
|
333
|
+
알림 API 문서:
|
|
334
|
+
- WebSocket 이벤트 목록
|
|
335
|
+
- 클라이언트 사용 예시
|
|
336
|
+
- 에러 처리 가이드
|
|
337
|
+
`
|
|
338
|
+
})
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
**예시 3: 대규모 리팩토링 (모듈별 병렬)**
|
|
342
|
+
|
|
343
|
+
```typescript
|
|
344
|
+
// 여러 모듈 동시 리팩토링
|
|
345
|
+
Task({
|
|
346
|
+
subagent_type: 'implementation-executor',
|
|
347
|
+
model: 'sonnet',
|
|
348
|
+
description: 'User 모듈 리팩토링',
|
|
349
|
+
prompt: `
|
|
350
|
+
User 모듈 개선:
|
|
351
|
+
- 복잡도 감소 (함수 분리)
|
|
352
|
+
- 타입 안정성 향상
|
|
353
|
+
- 테스트 커버리지 증대
|
|
354
|
+
`
|
|
355
|
+
})
|
|
356
|
+
|
|
357
|
+
Task({
|
|
358
|
+
subagent_type: 'implementation-executor',
|
|
359
|
+
model: 'sonnet',
|
|
360
|
+
description: 'Payment 모듈 리팩토링',
|
|
361
|
+
prompt: `
|
|
362
|
+
Payment 모듈 개선:
|
|
363
|
+
- 트랜잭션 안정성
|
|
364
|
+
- 에러 핸들링 개선
|
|
365
|
+
- 로깅 강화
|
|
366
|
+
`
|
|
367
|
+
})
|
|
368
|
+
|
|
369
|
+
Task({
|
|
370
|
+
subagent_type: 'implementation-executor',
|
|
371
|
+
model: 'haiku',
|
|
372
|
+
description: 'Notification 모듈 리팩토링',
|
|
373
|
+
prompt: `
|
|
374
|
+
Notification 모듈 개선:
|
|
375
|
+
- 템플릿 구조화
|
|
376
|
+
- 다국어 지원
|
|
377
|
+
- 전송 실패 재시도
|
|
378
|
+
`
|
|
379
|
+
})
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
---
|
|
383
|
+
|
|
384
|
+
### 병렬 실행 시 고려사항
|
|
385
|
+
|
|
386
|
+
```text
|
|
387
|
+
✅ DO:
|
|
388
|
+
- 독립적인 작업만 병렬 실행 (의존성 없는 경우)
|
|
389
|
+
- 결과 통합 후 검증 수행
|
|
390
|
+
- 모델 선택 시 복잡도 고려 (haiku/sonnet/opus)
|
|
391
|
+
- 병렬 실행 수는 3-5개 권장 (너무 많으면 복잡)
|
|
392
|
+
- 각 에이전트에게 명확한 범위 전달
|
|
393
|
+
|
|
394
|
+
❌ DON'T:
|
|
395
|
+
- 순차 의존성이 있는 작업 병렬화 금지
|
|
396
|
+
- 결과 통합 없이 개별 결과만 사용
|
|
397
|
+
- 모든 작업에 opus 사용 (비용/시간 낭비)
|
|
398
|
+
- 병렬 실행 수 너무 많음 (5개 초과)
|
|
399
|
+
- 같은 파일을 여러 에이전트가 동시 수정
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
---
|
|
403
|
+
|
|
404
|
+
### 병렬 에이전트 체크리스트
|
|
405
|
+
|
|
406
|
+
구현 전 확인:
|
|
407
|
+
|
|
408
|
+
```text
|
|
409
|
+
✅ 탐색 단계
|
|
410
|
+
[ ] 여러 영역 동시 탐색 가능? → explore (haiku) 병렬 실행
|
|
411
|
+
[ ] 요구사항 불명확? → analyst (sonnet) 병렬 분석
|
|
412
|
+
|
|
413
|
+
✅ 구현 단계
|
|
414
|
+
[ ] 독립 모듈 구현 가능? → implementation-executor (sonnet) 병렬
|
|
415
|
+
[ ] 프론트엔드 + 백엔드? → 각각 병렬 구현
|
|
416
|
+
[ ] 기능 + 테스트 + 문서? → 동시 작업
|
|
417
|
+
|
|
418
|
+
✅ 리팩토링 단계
|
|
419
|
+
[ ] 여러 모듈 리팩토링? → implementation-executor 병렬
|
|
420
|
+
[ ] 독립적인 개선 작업? → 병렬 실행
|
|
421
|
+
|
|
422
|
+
✅ 모델 선택
|
|
423
|
+
[ ] 복잡도 LOW → haiku
|
|
424
|
+
[ ] 복잡도 MEDIUM → sonnet
|
|
425
|
+
[ ] 복잡도 HIGH → opus
|
|
426
|
+
|
|
427
|
+
✅ 병렬 실행 수
|
|
428
|
+
[ ] 3-5개 권장
|
|
429
|
+
[ ] 독립성 확인
|
|
430
|
+
[ ] 결과 통합 계획
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
</parallel_agent_execution>
|
|
434
|
+
|
|
435
|
+
---
|
|
436
|
+
|
|
41
437
|
<workflow>
|
|
42
438
|
|
|
43
439
|
## 실행 흐름
|
|
@@ -45,9 +441,25 @@ user-invocable: true
|
|
|
45
441
|
| 단계 | 작업 | 도구 |
|
|
46
442
|
|------|------|------|
|
|
47
443
|
| 1. 복잡도 판단 | Sequential Thinking으로 분석 범위 결정 | sequentialthinking (2-5단계) |
|
|
48
|
-
| 2. 코드베이스 탐색 | 현재 상태 파악, 관련 파일 탐색 | Task (Explore) + Read/Grep |
|
|
49
|
-
| 3. 최적 접근법 결정 | 가능한 방법 분석 → 최선 선택 | sequentialthinking |
|
|
50
|
-
| 4. 즉시 구현 | TodoWrite → 단계별 구현 → 검증 | Edit/Write + TodoWrite |
|
|
444
|
+
| 2. 코드베이스 탐색 | 현재 상태 파악, 관련 파일 탐색 | Task (Explore) 병렬 + Read/Grep |
|
|
445
|
+
| 3. 최적 접근법 결정 | 가능한 방법 분석 → 최선 선택 (내부적으로) | sequentialthinking |
|
|
446
|
+
| 4. 즉시 구현 | TodoWrite → 단계별 구현 (병렬 가능) → 검증 | Task 병렬 + Edit/Write + TodoWrite |
|
|
447
|
+
|
|
448
|
+
### Agent 선택 기준
|
|
449
|
+
|
|
450
|
+
| 복잡도 | 조건 | 사용 Agent |
|
|
451
|
+
|--------|------|-----------|
|
|
452
|
+
| **매우 복잡** | 다중 시스템, 아키텍처 변경, 불확실성 높음 | Task (implementation-executor) 병렬 위임 |
|
|
453
|
+
| **복잡/보통** | 명확한 범위, 3-10 파일 | 직접 처리 (Task Explore 활용) + 병렬 구현 |
|
|
454
|
+
| **간단** | 1-2 파일, 명확한 변경 | 직접 처리 |
|
|
455
|
+
|
|
456
|
+
### Sequential Thinking 가이드
|
|
457
|
+
|
|
458
|
+
| 복잡도 | 사고 횟수 | 판단 기준 | 사고 패턴 |
|
|
459
|
+
|--------|----------|----------|----------|
|
|
460
|
+
| **간단** | 2 | 1-2 파일, 명확한 변경 | 복잡도 판단 → 즉시 구현 |
|
|
461
|
+
| **보통** | 4 | 3-5 파일, 로직 변경 | 복잡도 판단 → 현재 상태 → 접근 방식 → 구현 |
|
|
462
|
+
| **복잡** | 5+ | 다중 모듈, 아키텍처 변경 | 복잡도 판단 → 심층 분석 → 접근 방식 → 병렬 전략 → 구현 |
|
|
51
463
|
|
|
52
464
|
</workflow>
|
|
53
465
|
|
|
@@ -170,29 +582,111 @@ Task (Explore): "현재 서버 구조 및 클라이언트 통신 방식"
|
|
|
170
582
|
git commit -m "feat: 실시간 알림 기능 추가 (WebSocket)"
|
|
171
583
|
```
|
|
172
584
|
|
|
173
|
-
### 예시 4: 병렬 Agent 실행
|
|
585
|
+
### 예시 4: 병렬 Agent 실행 (프론트엔드 + 백엔드)
|
|
174
586
|
|
|
175
|
-
```
|
|
176
|
-
|
|
587
|
+
```bash
|
|
588
|
+
# 사용자: 사용자 프로필 기능 전체 구현
|
|
589
|
+
|
|
590
|
+
# Sequential Thinking (5단계)
|
|
591
|
+
thought 1: "프로필 기능 - 복잡, 프론트엔드 + 백엔드 + 문서"
|
|
592
|
+
thought 2: "현재 프로필 관련 구조 없음 → 새로 구현"
|
|
593
|
+
thought 3: "접근 방식: 프론트엔드 (UI + 폼) + 백엔드 (API + DB)"
|
|
594
|
+
thought 4: "병렬 실행 가능: 프론트엔드와 백엔드 독립적"
|
|
595
|
+
thought 5: "3개 에이전트 병렬: UI, API, 문서"
|
|
596
|
+
|
|
597
|
+
# Task 탐색
|
|
598
|
+
Task (Explore): "현재 User 관련 구조 및 패턴 분석"
|
|
599
|
+
→ src/routes/, src/functions/user.ts 파악
|
|
600
|
+
|
|
601
|
+
# 병렬 구현 (3개 에이전트)
|
|
177
602
|
Task({
|
|
178
603
|
subagent_type: 'implementation-executor',
|
|
179
604
|
model: 'sonnet',
|
|
180
|
-
|
|
605
|
+
description: '프론트엔드 구현',
|
|
606
|
+
prompt: `
|
|
607
|
+
프로필 편집 UI 구현:
|
|
608
|
+
- src/routes/profile/-components/EditProfileForm.tsx
|
|
609
|
+
- Zod 검증 스키마
|
|
610
|
+
- TanStack Query 훅
|
|
611
|
+
`
|
|
181
612
|
})
|
|
182
613
|
|
|
183
614
|
Task({
|
|
184
615
|
subagent_type: 'implementation-executor',
|
|
185
616
|
model: 'sonnet',
|
|
186
|
-
|
|
617
|
+
description: '백엔드 구현',
|
|
618
|
+
prompt: `
|
|
619
|
+
프로필 업데이트 API 구현:
|
|
620
|
+
- src/functions/user.ts (updateProfile)
|
|
621
|
+
- Prisma 쿼리
|
|
622
|
+
- 인증 미들웨어
|
|
623
|
+
`
|
|
187
624
|
})
|
|
188
625
|
|
|
189
626
|
Task({
|
|
190
627
|
subagent_type: 'document-writer',
|
|
191
628
|
model: 'haiku',
|
|
192
|
-
|
|
629
|
+
description: 'API 문서 작성',
|
|
630
|
+
prompt: 'updateProfile API 문서 및 컴포넌트 사용 가이드'
|
|
193
631
|
})
|
|
194
632
|
|
|
195
|
-
|
|
633
|
+
# 모든 에이전트 완료 후 통합 검증
|
|
634
|
+
→ 프론트엔드 + 백엔드 통합 테스트
|
|
635
|
+
→ 커밋: "feat: 사용자 프로필 편집 기능 추가"
|
|
636
|
+
```
|
|
637
|
+
|
|
638
|
+
### 예시 5: 대규모 리팩토링 (모듈별 병렬)
|
|
639
|
+
|
|
640
|
+
```bash
|
|
641
|
+
# 사용자: User, Payment, Notification 모듈 리팩토링
|
|
642
|
+
|
|
643
|
+
# Sequential Thinking (5단계)
|
|
644
|
+
thought 1: "3개 모듈 리팩토링 - 매우 복잡"
|
|
645
|
+
thought 2: "각 모듈 독립적 → 병렬 실행 가능"
|
|
646
|
+
thought 3: "복잡도: User (높음), Payment (높음), Notification (보통)"
|
|
647
|
+
thought 4: "모델 선택: User/Payment (sonnet), Notification (haiku)"
|
|
648
|
+
thought 5: "병렬 실행 후 통합 검증"
|
|
649
|
+
|
|
650
|
+
# 병렬 리팩토링 (3개 에이전트)
|
|
651
|
+
Task({
|
|
652
|
+
subagent_type: 'implementation-executor',
|
|
653
|
+
model: 'sonnet',
|
|
654
|
+
description: 'User 모듈 리팩토링',
|
|
655
|
+
prompt: `
|
|
656
|
+
User 모듈 개선:
|
|
657
|
+
- 복잡도 감소 (함수 분리)
|
|
658
|
+
- 타입 안정성 향상
|
|
659
|
+
- 테스트 커버리지 증대
|
|
660
|
+
`
|
|
661
|
+
})
|
|
662
|
+
|
|
663
|
+
Task({
|
|
664
|
+
subagent_type: 'implementation-executor',
|
|
665
|
+
model: 'sonnet',
|
|
666
|
+
description: 'Payment 모듈 리팩토링',
|
|
667
|
+
prompt: `
|
|
668
|
+
Payment 모듈 개선:
|
|
669
|
+
- 트랜잭션 안정성
|
|
670
|
+
- 에러 핸들링 개선
|
|
671
|
+
- 로깅 강화
|
|
672
|
+
`
|
|
673
|
+
})
|
|
674
|
+
|
|
675
|
+
Task({
|
|
676
|
+
subagent_type: 'implementation-executor',
|
|
677
|
+
model: 'haiku',
|
|
678
|
+
description: 'Notification 모듈 리팩토링',
|
|
679
|
+
prompt: `
|
|
680
|
+
Notification 모듈 개선:
|
|
681
|
+
- 템플릿 구조화
|
|
682
|
+
- 다국어 지원
|
|
683
|
+
- 전송 실패 재시도
|
|
684
|
+
`
|
|
685
|
+
})
|
|
686
|
+
|
|
687
|
+
# 모든 에이전트 완료 후 통합 검증
|
|
688
|
+
→ 전체 테스트 실행
|
|
689
|
+
→ 커밋: "refactor: User/Payment/Notification 모듈 개선"
|
|
196
690
|
```
|
|
197
691
|
|
|
198
692
|
</examples>
|
|
@@ -211,14 +705,47 @@ Task({
|
|
|
211
705
|
✅ 단계별 구현 및 검증
|
|
212
706
|
✅ 병렬 실행 가능 시 Agent 위임
|
|
213
707
|
✅ 적절한 모델 선택 (haiku/sonnet/opus)
|
|
708
|
+
✅ 독립적인 작업은 병렬 실행 (3-5개 권장)
|
|
709
|
+
✅ 병렬 실행 시 독립성 확인
|
|
710
|
+
✅ 결과 통합 후 검증 수행
|
|
214
711
|
```
|
|
215
712
|
|
|
216
|
-
##
|
|
713
|
+
## 금지 사항
|
|
217
714
|
|
|
218
715
|
```text
|
|
219
716
|
❌ 옵션 제시 후 사용자 선택 대기 (바로 실행)
|
|
220
717
|
❌ TodoWrite 없이 복잡한 작업 수행
|
|
221
718
|
❌ 단계별 검증 없이 일괄 구현
|
|
719
|
+
❌ 순차 의존성이 있는 작업을 병렬 실행
|
|
720
|
+
❌ 같은 파일을 여러 에이전트가 동시 수정
|
|
721
|
+
❌ 병렬 실행 수 5개 초과
|
|
722
|
+
❌ 결과 통합 없이 개별 결과만 사용
|
|
723
|
+
```
|
|
724
|
+
|
|
725
|
+
## 병렬 실행 체크리스트
|
|
726
|
+
|
|
727
|
+
구현 전 확인:
|
|
728
|
+
|
|
729
|
+
```text
|
|
730
|
+
✅ 병렬 실행 가능성
|
|
731
|
+
[ ] 독립적인 모듈/컴포넌트 구현?
|
|
732
|
+
[ ] 프론트엔드 + 백엔드 분리 가능?
|
|
733
|
+
[ ] 기능 + 테스트 + 문서 동시 작업?
|
|
734
|
+
|
|
735
|
+
✅ 의존성 확인
|
|
736
|
+
[ ] 각 작업이 독립적으로 완료 가능?
|
|
737
|
+
[ ] 같은 파일을 여러 에이전트가 수정하지 않는가?
|
|
738
|
+
[ ] 순차 실행이 필요한 단계는 없는가?
|
|
739
|
+
|
|
740
|
+
✅ 모델 선택
|
|
741
|
+
[ ] 복잡도 LOW → haiku
|
|
742
|
+
[ ] 복잡도 MEDIUM → sonnet
|
|
743
|
+
[ ] 복잡도 HIGH → opus
|
|
744
|
+
|
|
745
|
+
✅ 병렬 실행 수
|
|
746
|
+
[ ] 3-5개 권장 (초과 시 복잡도 증가)
|
|
747
|
+
[ ] 각 에이전트에 명확한 범위 전달
|
|
748
|
+
[ ] 결과 통합 계획 수립
|
|
222
749
|
```
|
|
223
750
|
|
|
224
751
|
</validation>
|