@kood/claude-code 0.5.1 → 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.
Files changed (88) hide show
  1. package/dist/index.js +604 -261
  2. package/package.json +1 -1
  3. package/templates/.claude/agents/analyst.md +6 -14
  4. package/templates/.claude/agents/architect.md +6 -14
  5. package/templates/.claude/agents/code-reviewer.md +8 -14
  6. package/templates/.claude/agents/dependency-manager.md +8 -14
  7. package/templates/.claude/agents/deployment-validator.md +8 -14
  8. package/templates/.claude/agents/designer.md +8 -0
  9. package/templates/.claude/agents/document-writer.md +75 -316
  10. package/templates/.claude/agents/explore.md +8 -3
  11. package/templates/.claude/agents/git-operator.md +63 -17
  12. package/templates/.claude/agents/implementation-executor.md +14 -37
  13. package/templates/.claude/agents/ko-to-en-translator.md +8 -13
  14. package/templates/.claude/agents/lint-fixer.md +8 -172
  15. package/templates/.claude/agents/planner.md +6 -14
  16. package/templates/.claude/agents/refactor-advisor.md +8 -14
  17. package/templates/.claude/commands/git-all.md +3 -167
  18. package/templates/.claude/commands/git-session.md +3 -71
  19. package/templates/.claude/commands/lint-fix.md +119 -82
  20. package/templates/.claude/commands/lint-init.md +2 -54
  21. package/templates/.claude/commands/pre-deploy.md +143 -82
  22. package/templates/.claude/commands/version-update.md +171 -66
  23. package/templates/.claude/instructions/agent-patterns/agent-coordination.md +208 -0
  24. package/templates/.claude/instructions/agent-patterns/index.md +264 -0
  25. package/templates/.claude/instructions/agent-patterns/model-routing.md +167 -0
  26. package/templates/.claude/instructions/agent-patterns/parallel-execution.md +91 -0
  27. package/templates/.claude/instructions/agent-patterns/read-parallelization.md +106 -0
  28. package/templates/.claude/instructions/document-templates/ralph-templates.md +71 -0
  29. package/templates/.claude/instructions/index.md +350 -0
  30. package/templates/.claude/instructions/multi-agent/agent-roster.md +811 -0
  31. package/templates/.claude/{PARALLEL_AGENTS.md → instructions/multi-agent/coordination-guide.md} +27 -336
  32. package/templates/.claude/instructions/{parallel-agent-execution.md → multi-agent/execution-patterns.md} +127 -438
  33. package/templates/.claude/instructions/multi-agent/index.md +282 -0
  34. package/templates/.claude/instructions/multi-agent/performance-optimization.md +456 -0
  35. package/templates/.claude/instructions/tech-stack/design-standards.md +282 -0
  36. package/templates/.claude/instructions/tech-stack/index.md +70 -0
  37. package/templates/.claude/instructions/tech-stack/prisma-patterns.md +352 -0
  38. package/templates/.claude/instructions/tech-stack/tanstack-patterns.md +275 -0
  39. package/templates/.claude/instructions/validation/forbidden-patterns.md +281 -0
  40. package/templates/.claude/instructions/validation/index.md +32 -0
  41. package/templates/.claude/instructions/validation/required-behaviors.md +331 -0
  42. package/templates/.claude/instructions/validation/verification-checklist.md +318 -0
  43. package/templates/.claude/instructions/workflow-patterns/index.md +18 -0
  44. package/templates/.claude/instructions/workflow-patterns/phase-based-workflow.md +250 -0
  45. package/templates/.claude/instructions/workflow-patterns/sequential-thinking.md +217 -0
  46. package/templates/.claude/instructions/workflow-patterns/todowrite-pattern.md +215 -0
  47. package/templates/.claude/skills/bug-fix/SKILL.md +972 -0
  48. package/templates/.claude/skills/docs-creator/AGENTS.md +54 -173
  49. package/templates/.claude/skills/docs-creator/SKILL.md +146 -254
  50. package/templates/.claude/skills/docs-refactor/AGENTS.md +61 -187
  51. package/templates/.claude/skills/docs-refactor/SKILL.md +84 -315
  52. package/templates/.claude/skills/execute/SKILL.md +454 -154
  53. package/templates/.claude/skills/figma-to-code/AGENTS.md +4 -1
  54. package/templates/.claude/skills/figma-to-code/SKILL.md +306 -0
  55. package/templates/.claude/skills/global-uiux-design/AGENTS.md +4 -1
  56. package/templates/.claude/skills/global-uiux-design/SKILL.md +455 -125
  57. package/templates/.claude/skills/korea-uiux-design/AGENTS.md +4 -1
  58. package/templates/.claude/skills/korea-uiux-design/SKILL.md +461 -116
  59. package/templates/.claude/skills/nextjs-react-best-practices/SKILL.md +177 -0
  60. package/templates/.claude/skills/plan/SKILL.md +1157 -87
  61. package/templates/.claude/skills/prd/SKILL.md +367 -66
  62. package/templates/.claude/skills/ralph/AGENTS.md +4 -1
  63. package/templates/.claude/skills/ralph/SKILL.md +100 -14
  64. package/templates/.claude/skills/refactor/AGENTS.md +269 -0
  65. package/templates/.claude/skills/refactor/SKILL.md +1572 -0
  66. package/templates/.claude/skills/stitch-design/README.md +34 -0
  67. package/templates/.claude/skills/stitch-design/SKILL.md +213 -0
  68. package/templates/.claude/skills/stitch-design/examples/DESIGN.md +154 -0
  69. package/templates/.claude/skills/stitch-loop/README.md +54 -0
  70. package/templates/.claude/skills/stitch-loop/SKILL.md +316 -0
  71. package/templates/.claude/skills/stitch-loop/examples/SITE.md +73 -0
  72. package/templates/.claude/skills/stitch-loop/examples/next-prompt.md +25 -0
  73. package/templates/.claude/skills/stitch-loop/resources/baton-schema.md +61 -0
  74. package/templates/.claude/skills/stitch-loop/resources/site-template.md +104 -0
  75. package/templates/.claude/skills/stitch-react/README.md +36 -0
  76. package/templates/.claude/skills/stitch-react/SKILL.md +323 -0
  77. package/templates/.claude/skills/stitch-react/examples/gold-standard-card.tsx +88 -0
  78. package/templates/.claude/skills/stitch-react/package-lock.json +231 -0
  79. package/templates/.claude/skills/stitch-react/package.json +16 -0
  80. package/templates/.claude/skills/stitch-react/resources/architecture-checklist.md +15 -0
  81. package/templates/.claude/skills/stitch-react/resources/component-template.tsx +37 -0
  82. package/templates/.claude/skills/stitch-react/resources/stitch-api-reference.md +14 -0
  83. package/templates/.claude/skills/stitch-react/resources/style-guide.json +24 -0
  84. package/templates/.claude/skills/stitch-react/scripts/fetch-stitch.sh +30 -0
  85. package/templates/.claude/skills/stitch-react/scripts/validate.js +77 -0
  86. package/templates/.claude/skills/tanstack-start-react-best-practices/SKILL.md +149 -0
  87. package/templates/.claude/commands/bug-fix.md +0 -510
  88. package/templates/.claude/commands/refactor.md +0 -788
@@ -1,6 +1,18 @@
1
+ ---
2
+ name: execute
3
+ description: 계획 또는 작업을 Sequential Thinking으로 분석하여 즉시 구현. 옵션 제시 없이 바로 실행.
4
+ user-invocable: true
5
+ ---
6
+
7
+ @../../instructions/workflow-patterns/sequential-thinking.md
8
+ @../../instructions/agent-patterns/parallel-execution.md
9
+ @../../instructions/agent-patterns/model-routing.md
10
+ @../../instructions/validation/forbidden-patterns.md
11
+ @../../instructions/validation/required-behaviors.md
12
+
1
13
  # Execute Skill
2
14
 
3
- > 계획 실행 또는 간단한 작업을 즉시 구현하는 스킬. 옵션 제시 없이 최적 방법으로 바로 실행.
15
+ > 계획 또는 작업을 Sequential Thinking으로 분석하여 즉시 구현. 옵션 제시 없이 바로 실행.
4
16
 
5
17
  ---
6
18
 
@@ -30,251 +42,425 @@
30
42
 
31
43
  ## 병렬 Agent 실행
32
44
 
33
- **목적:** 독립적인 작업을 여러 Agent가 동시에 실행하여 생산성 향상.
45
+ ### Recommended Agents
34
46
 
35
- ### 권장 Agents
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 |
36
54
 
37
- | Agent | Model | 용도 |
38
- |-------|-------|------|
39
- | @implementation-executor | haiku/sonnet/opus | 작업 구현 |
40
- | @designer | sonnet | UI/UX 작업 |
41
- | @document-writer | haiku | 문서화 |
42
- | @code-reviewer | haiku | 구현 후 검증 |
55
+ ---
43
56
 
44
- ### Model Routing
57
+ ### Parallel Execution Patterns
45
58
 
46
- | 복잡도 | Model | 작업 예시 |
47
- |--------|-------|----------|
48
- | **LOW** | haiku | 파일 수정, 설정 변경, 문서화 |
49
- | **MEDIUM** | sonnet | 기능 추가, 컴포넌트 구현 |
50
- | **HIGH** | opus | 아키텍처 변경, 다중 파일 리팩토링 |
59
+ ### Read 도구 병렬화
51
60
 
52
- ### 병렬 실행 패턴
61
+ **프로젝트 분석 시 파일 병렬 읽기:**
53
62
 
54
- **독립적 기능 병렬 구현:**
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 에이전트 활용:**
55
77
 
56
78
  ```typescript
57
- // 독립적인 API 엔드포인트를 각각 구현
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
+ // 프론트엔드 + 백엔드 동시 구현
58
94
  Task({
59
95
  subagent_type: 'implementation-executor',
60
96
  model: 'sonnet',
61
- prompt: 'User API 엔드포인트 구현 (GET /users, POST /users, PATCH /users/:id)'
97
+ prompt: '프론트엔드 프로필 편집 UI 구현 (폼, 검증, 에러 처리)'
62
98
  })
63
99
 
64
100
  Task({
65
101
  subagent_type: 'implementation-executor',
66
102
  model: 'sonnet',
67
- prompt: 'Product API 엔드포인트 구현 (GET /products, POST /products, DELETE /products/:id)'
103
+ prompt: '백엔드 프로필 업데이트 API 구현 (Server Function, Prisma)'
104
+ })
105
+
106
+ Task({
107
+ subagent_type: 'document-writer',
108
+ model: 'haiku',
109
+ prompt: 'API 문서 및 컴포넌트 가이드 작성'
68
110
  })
69
111
  ```
70
112
 
71
- **구현 + 문서화 병렬:**
113
+ **2. 독립 모듈 병렬 구현**
114
+
115
+ 독립적인 모듈/컴포넌트를 각각 구현할 때:
72
116
 
73
117
  ```typescript
74
- // 구현과 문서화 동시 진행
118
+ // 여러 컴포넌트 동시 구현
75
119
  Task({
76
120
  subagent_type: 'implementation-executor',
77
121
  model: 'sonnet',
78
- prompt: 'Payment 통합 (Stripe API 연동, 결제 처리 로직)'
122
+ prompt: 'User 프로필 카드 컴포넌트 구현'
79
123
  })
80
124
 
81
125
  Task({
82
- subagent_type: 'document-writer',
83
- model: 'haiku',
84
- prompt: 'Payment API 문서 작성 (엔드포인트, 요청/응답 스키마, 에러 코드)'
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 통계 대시보드 컴포넌트 구현'
85
135
  })
86
136
  ```
87
137
 
88
- **UI + API + 문서 병렬:**
138
+ **3. 기능 + 테스트 + 문서 병렬**
139
+
140
+ 기능 구현과 테스트, 문서화를 동시에 처리:
89
141
 
90
142
  ```typescript
91
- // 전체 기능을 역할별로 분산
143
+ // 기능, 테스트, 문서 동시 작업
92
144
  Task({
93
- subagent_type: 'designer',
145
+ subagent_type: 'implementation-executor',
94
146
  model: 'sonnet',
95
- prompt: 'User Profile UI 구현 (프로필 편집 폼, 프로필 카드, 반응형 디자인)'
147
+ prompt: '실시간 알림 기능 구현 (WebSocket 서버 + 클라이언트 )'
96
148
  })
97
149
 
98
150
  Task({
99
151
  subagent_type: 'implementation-executor',
100
152
  model: 'sonnet',
101
- prompt: 'User API 구현 (GET /users/:id, PATCH /users/:id, 이미지 업로드)'
153
+ prompt: '알림 기능 테스트 작성 (unit + integration)'
102
154
  })
103
155
 
104
156
  Task({
105
157
  subagent_type: 'document-writer',
106
158
  model: 'haiku',
107
- prompt: 'User API 문서 및 컴포넌트 사용 가이드 작성'
159
+ prompt: '알림 API 문서 및 사용 가이드 작성'
108
160
  })
109
161
  ```
110
162
 
111
- **구현 검증:**
163
+ **4. 리팩토링 병렬화**
164
+
165
+ 독립적인 모듈을 각각 리팩토링:
112
166
 
113
167
  ```typescript
114
- // 구현 완료 후 코드 리뷰
168
+ // 여러 모듈 동시 리팩토링
115
169
  Task({
116
170
  subagent_type: 'implementation-executor',
117
171
  model: 'sonnet',
118
- prompt: 'Authentication 리팩토링 (Better Auth 마이그레이션)'
172
+ prompt: 'User 모듈 리팩토링 (타입 안정성, 복잡도 감소)'
119
173
  })
120
174
 
121
- // 구현 완료 대기 후
122
175
  Task({
123
- subagent_type: 'code-reviewer',
124
- model: 'haiku',
125
- prompt: '보안 점검 (인증/인가 로직, XSS/CSRF 방어, 민감 정보 노출)'
176
+ subagent_type: 'implementation-executor',
177
+ model: 'sonnet',
178
+ prompt: 'Payment 모듈 리팩토링 (에러 핸들링 개선)'
126
179
  })
127
- ```
128
180
 
129
- ### 병렬 실행 시 주의
130
-
131
- ```text
132
- 독립적인 작업만 병렬 실행 (의존성 없음)
133
- ✅ Model 복잡도에 맞게 선택 (haiku/sonnet/opus)
134
- ✅ 각 Agent는 Sequential Thinking으로 자율 실행
135
- ✅ 결과 취합 후 통합 검증 (테스트, 빌드)
136
-
137
- ❌ 의존성 있는 작업은 순차 실행 (A 완료 → B 시작)
138
- ❌ 동일 파일 동시 수정 금지
139
- ❌ 과도한 병렬화 (3-4개 이상 → 관리 복잡)
181
+ Task({
182
+ subagent_type: 'implementation-executor',
183
+ model: 'haiku',
184
+ prompt: 'Notification 모듈 리팩토링 (템플릿 구조화)'
185
+ })
140
186
  ```
141
187
 
142
- ### 실전 예시
188
+ **5. 탐색 + 분석 병렬**
143
189
 
144
- **간단한 작업 (haiku):**
190
+ 코드베이스를 여러 관점에서 동시 분석:
145
191
 
146
192
  ```typescript
147
- // 설정 파일 수정 + 문서화
148
- Task({ subagent_type: 'implementation-executor', model: 'haiku',
149
- prompt: 'ESLint 설정 업데이트 (.eslintrc.json)' })
150
- Task({ subagent_type: 'document-writer', model: 'haiku',
151
- prompt: 'Linting 규칙 문서화 (docs/linting.md)' })
152
- ```
193
+ // 여러 영역 동시 탐색 및 분석
194
+ Task({
195
+ subagent_type: 'explore',
196
+ model: 'haiku',
197
+ prompt: '인증 관련 파일 구조 및 패턴 분석'
198
+ })
153
199
 
154
- **보통 작업 (sonnet):**
200
+ Task({
201
+ subagent_type: 'architect',
202
+ model: 'sonnet',
203
+ prompt: '현재 인증 아키텍처 평가 및 개선점 도출'
204
+ })
155
205
 
156
- ```typescript
157
- // 독립적인 컴포넌트 구현
158
- Task({ subagent_type: 'designer', model: 'sonnet',
159
- prompt: 'Header 컴포넌트 (로고, 네비게이션, 사용자 메뉴)' })
160
- Task({ subagent_type: 'designer', model: 'sonnet',
161
- prompt: 'Footer 컴포넌트 (링크, 소셜 미디어, 저작권)' })
206
+ Task({
207
+ subagent_type: 'analyst',
208
+ model: 'sonnet',
209
+ prompt: '인증 보안 취약점 분석 완화 방안'
210
+ })
162
211
  ```
163
212
 
164
- **복잡한 작업 (opus):**
213
+ ---
165
214
 
166
- ```typescript
167
- // 아키텍처 변경
168
- Task({ subagent_type: 'implementation-executor', model: 'opus',
169
- prompt: 'Monorepo 구조 변경 (apps/, packages/ 분리, Turborepo)' })
170
- ```
215
+ ### Model Routing
171
216
 
172
- </parallel_agent_execution>
217
+ | 복잡도 | 조건 | 권장 Model | Agent | 예시 |
218
+ |--------|------|-----------|-------|------|
219
+ | **LOW** | 단순 구현, 파일 1-2개 | haiku | implementation-executor | 스타일 변경, 간단한 컴포넌트 |
220
+ | **MEDIUM** | 일반 구현, 파일 3-5개 | sonnet | implementation-executor | 기능 추가, 리팩토링 |
221
+ | **HIGH** | 복잡한 구현, 아키텍처 변경 | opus | implementation-executor | 시스템 재설계, 대규모 변경 |
173
222
 
174
- ---
223
+ **Model 선택 가이드:**
175
224
 
176
- <workflow>
225
+ ```text
226
+ ✅ haiku:
227
+ - 간단한 구현, 1-2 파일 수정
228
+ - 스타일 변경, 설정 업데이트
229
+ - 병렬 실행 시 비용 최적화
230
+
231
+ ✅ sonnet:
232
+ - 일반 기능 구현, 3-5 파일
233
+ - 리팩토링, 버그 수정
234
+ - 균형잡힌 품질/비용
235
+
236
+ ✅ opus:
237
+ - 복잡한 기능, 아키텍처 변경
238
+ - 대규모 리팩토링
239
+ - 최고 품질 필요 시
240
+ ```
177
241
 
178
- ## 실행 흐름
242
+ **Agent별 모델 추천:**
179
243
 
180
- | 단계 | 작업 | 도구 |
181
- |------|------|------|
182
- | 1. 복잡도 판단 | Sequential Thinking으로 분석 범위 결정 | sequentialthinking (2-5단계) |
183
- | 2. 코드베이스 탐색 | 현재 상태 파악, 관련 파일 탐색 | Task (Explore) + Read/Grep |
184
- | 3. 최적 접근법 결정 | 가능한 방법 분석 최선 선택 | sequentialthinking |
185
- | 4. 즉시 구현 | TodoWrite 단계별 구현 검증 | Edit/Write + TodoWrite |
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 |
186
251
 
187
- ### Sequential Thinking 가이드
252
+ ---
188
253
 
189
- **복잡도별 전략:**
254
+ ### Practical Examples
190
255
 
191
- | 복잡도 | 사고 횟수 | 판단 기준 | 사고 패턴 |
192
- |--------|----------|----------|----------|
193
- | **간단** | 2 | 1개 파일, 명확한 변경 | 복잡도 판단 → 즉시 구현 |
194
- | **보통** | 3-4 | 2-3개 파일, 로직 추가 | 복잡도 판단 → 현재 상태 → 접근 방식 → 구현 |
195
- | **복잡** | 5+ | 다중 모듈, 아키텍처 변경 | 복잡도 판단 → 심층 분석 → 접근 방식 → 상세 계획 → 단계별 구현 |
256
+ **예시 1: 프로필 기능 구현 (탐색 + 구현 병렬)**
196
257
 
197
- **보통 복잡도 패턴 (3-4단계):**
258
+ ```typescript
259
+ // 1단계: 현재 상태 탐색 (병렬)
260
+ Task({
261
+ subagent_type: 'explore',
262
+ model: 'haiku',
263
+ description: '프로필 UI 분석',
264
+ prompt: '프로필 관련 컴포넌트, 라우트 분석'
265
+ })
198
266
 
199
- ```
200
- thought 1: 복잡도 판단 및 분석 범위 결정
201
- thought 2: 현재 상태 분석 (코드, 아키텍처)
202
- thought 3: 최적 접근 방식 선택 및 구현 계획
203
- thought 4: 단계별 구현 순서 확정
204
- ```
267
+ Task({
268
+ subagent_type: 'explore',
269
+ model: 'haiku',
270
+ description: '프로필 API 분석',
271
+ prompt: 'User 관련 Server Function, DB 스키마 분석'
272
+ })
205
273
 
206
- **복잡한 경우 패턴 (5단계):**
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
+ })
207
286
 
208
- ```
209
- thought 1: 복잡도 판단
210
- thought 2: 현재 상태 심층 분석
211
- thought 3: 가능한 접근 방식 탐색 및 최선 선택
212
- thought 4: 상세 구현 계획 수립
213
- thought 5: 단계별 실행 순서 및 검증 방법
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
+ })
214
298
  ```
215
299
 
216
- ### Task Subagent 활용
300
+ **예시 2: 실시간 기능 구현 (기능 + 테스트 + 문서 병렬)**
217
301
 
218
- | subagent_type | 용도 | 예시 |
219
- |---------------|------|------|
220
- | **Explore** | 코드베이스 구조 파악, 관련 파일 탐색 | "현재 인증 구조 분석" |
221
- | **general-purpose** | 복잡한 분석, 다중 시스템 연관 | "여러 모듈 간 의존성 분석" |
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
+ })
222
315
 
223
- **단일 탐색:**
316
+ Task({
317
+ subagent_type: 'implementation-executor',
318
+ model: 'sonnet',
319
+ description: '테스트 작성',
320
+ prompt: `
321
+ 알림 기능 테스트:
322
+ - WebSocket 연결 테스트
323
+ - 알림 수신 테스트
324
+ - UI 통합 테스트
325
+ `
326
+ })
224
327
 
225
- ```typescript
226
328
  Task({
227
- subagent_type: 'Explore',
228
- description: '현재 인증 구조 분석',
329
+ subagent_type: 'document-writer',
330
+ model: 'haiku',
331
+ description: 'API 문서 작성',
229
332
  prompt: `
230
- 현재 인증 관련 코드 구조 파악.
231
- - 사용 중인 라이브러리
232
- - 세션 관리 방식
233
- - 수정이 필요한 파일 목록
333
+ 알림 API 문서:
334
+ - WebSocket 이벤트 목록
335
+ - 클라이언트 사용 예시
336
+ - 에러 처리 가이드
234
337
  `
235
338
  })
236
339
  ```
237
340
 
238
- **병렬 탐색 (복잡한 경우):**
341
+ **예시 3: 대규모 리팩토링 (모듈별 병렬)**
239
342
 
240
343
  ```typescript
241
- Task({ subagent_type: 'Explore', prompt: '프론트엔드 인증 구조 분석' })
242
- Task({ subagent_type: 'Explore', prompt: '백엔드 API 인증 엔드포인트 분석' })
243
- Task({ subagent_type: 'Explore', prompt: '데이터베이스 세션 스키마 분석' })
244
- ```
344
+ // 여러 모듈 동시 리팩토링
345
+ Task({
346
+ subagent_type: 'implementation-executor',
347
+ model: 'sonnet',
348
+ description: 'User 모듈 리팩토링',
349
+ prompt: `
350
+ User 모듈 개선:
351
+ - 복잡도 감소 (함수 분리)
352
+ - 타입 안정성 향상
353
+ - 테스트 커버리지 증대
354
+ `
355
+ })
245
356
 
246
- ### TodoWrite 활용
357
+ Task({
358
+ subagent_type: 'implementation-executor',
359
+ model: 'sonnet',
360
+ description: 'Payment 모듈 리팩토링',
361
+ prompt: `
362
+ Payment 모듈 개선:
363
+ - 트랜잭션 안정성
364
+ - 에러 핸들링 개선
365
+ - 로깅 강화
366
+ `
367
+ })
247
368
 
248
- **복잡도별 사용:**
369
+ Task({
370
+ subagent_type: 'implementation-executor',
371
+ model: 'haiku',
372
+ description: 'Notification 모듈 리팩토링',
373
+ prompt: `
374
+ Notification 모듈 개선:
375
+ - 템플릿 구조화
376
+ - 다국어 지원
377
+ - 전송 실패 재시도
378
+ `
379
+ })
380
+ ```
249
381
 
250
- | 복잡도 | TodoWrite | 이유 |
251
- |--------|----------|------|
252
- | **간단** | 선택적 | 1-2개 파일, 명확한 작업 |
253
- | **보통** | 필수 | 3-5개 파일, 여러 단계 |
254
- | **복잡** | 필수 | 다중 모듈, 단계별 추적 필수 |
382
+ ---
255
383
 
256
- **TodoWrite 패턴:**
384
+ ### 병렬 실행 시 고려사항
257
385
 
258
- ```typescript
259
- TodoWrite({
260
- todos: [
261
- { content: '현재 구조 분석', status: 'in_progress', activeForm: '현재 구조 분석 중' },
262
- { content: 'API 엔드포인트 구현', status: 'pending', activeForm: 'API 엔드포인트 구현 중' },
263
- { content: '프론트엔드 통합', status: 'pending', activeForm: '프론트엔드 통합 중' },
264
- { content: '테스트 실행', status: 'pending', activeForm: '테스트 실행 중' },
265
- ]
266
- })
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
+ - 같은 파일을 여러 에이전트가 동시 수정
267
400
  ```
268
401
 
269
- ### 단계별 구현 원칙
402
+ ---
403
+
404
+ ### 병렬 에이전트 체크리스트
405
+
406
+ 구현 전 확인:
270
407
 
271
408
  ```text
272
- 번에 하나씩: 한 작업 완료 → 다음 작업
273
- 즉시 완료 표시: 작업 완료 바로 completed
274
- 검증 진행: 단계 완료 동작 확인
275
- ✅ 에러 처리: 실패 시 원인 분석 → 수정 → 재시도
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
+ [ ] 결과 통합 계획
276
431
  ```
277
432
 
433
+ </parallel_agent_execution>
434
+
435
+ ---
436
+
437
+ <workflow>
438
+
439
+ ## 실행 흐름
440
+
441
+ | 단계 | 작업 | 도구 |
442
+ |------|------|------|
443
+ | 1. 복잡도 판단 | Sequential Thinking으로 분석 범위 결정 | sequentialthinking (2-5단계) |
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+ | 다중 모듈, 아키텍처 변경 | 복잡도 판단 → 심층 분석 → 접근 방식 → 병렬 전략 → 구현 |
463
+
278
464
  </workflow>
279
465
 
280
466
  ---
@@ -396,29 +582,111 @@ Task (Explore): "현재 서버 구조 및 클라이언트 통신 방식"
396
582
  git commit -m "feat: 실시간 알림 기능 추가 (WebSocket)"
397
583
  ```
398
584
 
399
- ### 예시 4: 병렬 Agent 실행
585
+ ### 예시 4: 병렬 Agent 실행 (프론트엔드 + 백엔드)
400
586
 
401
- ```typescript
402
- // 독립적인 기능을 병렬로 구현
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개 에이전트)
403
602
  Task({
404
603
  subagent_type: 'implementation-executor',
405
604
  model: 'sonnet',
406
- prompt: 'User Profile UI 구현 (프로필 편집 폼, 프로필 카드)'
605
+ description: '프론트엔드 구현',
606
+ prompt: `
607
+ 프로필 편집 UI 구현:
608
+ - src/routes/profile/-components/EditProfileForm.tsx
609
+ - Zod 검증 스키마
610
+ - TanStack Query 훅
611
+ `
407
612
  })
408
613
 
409
614
  Task({
410
615
  subagent_type: 'implementation-executor',
411
616
  model: 'sonnet',
412
- prompt: 'User API 구현 (GET /users/:id, PATCH /users/:id)'
617
+ description: '백엔드 구현',
618
+ prompt: `
619
+ 프로필 업데이트 API 구현:
620
+ - src/functions/user.ts (updateProfile)
621
+ - Prisma 쿼리
622
+ - 인증 미들웨어
623
+ `
413
624
  })
414
625
 
415
626
  Task({
416
627
  subagent_type: 'document-writer',
417
628
  model: 'haiku',
418
- prompt: 'User API 문서 및 컴포넌트 가이드 작성'
629
+ description: 'API 문서 작성',
630
+ prompt: 'updateProfile API 문서 및 컴포넌트 사용 가이드'
631
+ })
632
+
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
+ `
419
685
  })
420
686
 
421
- // 모든 작업 완료 후 통합 검증
687
+ # 모든 에이전트 완료 후 통합 검증
688
+ → 전체 테스트 실행
689
+ → 커밋: "refactor: User/Payment/Notification 모듈 개선"
422
690
  ```
423
691
 
424
692
  </examples>
@@ -435,17 +703,49 @@ Task({
435
703
  ✅ 최적 접근법 내부적으로 결정
436
704
  ✅ TodoWrite로 구현 단계 추적 (보통 이상)
437
705
  ✅ 단계별 구현 및 검증
706
+ ✅ 병렬 실행 가능 시 Agent 위임
707
+ ✅ 적절한 모델 선택 (haiku/sonnet/opus)
708
+ ✅ 독립적인 작업은 병렬 실행 (3-5개 권장)
709
+ ✅ 병렬 실행 시 독립성 확인
710
+ ✅ 결과 통합 후 검증 수행
438
711
  ```
439
712
 
440
- ## 절대 금지
713
+ ## 금지 사항
441
714
 
442
715
  ```text
443
- ❌ Sequential Thinking 2단계 미만
444
- ❌ 코드 탐색 없이 추측으로 구현
445
716
  ❌ 옵션 제시 후 사용자 선택 대기 (바로 실행)
446
717
  ❌ TodoWrite 없이 복잡한 작업 수행
447
718
  ❌ 단계별 검증 없이 일괄 구현
448
- 테스트 실패 상태로 커밋
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
+ [ ] 결과 통합 계획 수립
449
749
  ```
450
750
 
451
751
  </validation>