@kood/claude-code 0.5.1 → 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.
Files changed (66) hide show
  1. package/dist/index.js +163 -28
  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 +6 -14
  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/index.md +350 -0
  29. package/templates/.claude/instructions/multi-agent/agent-roster.md +811 -0
  30. package/templates/.claude/{PARALLEL_AGENTS.md → instructions/multi-agent/coordination-guide.md} +27 -336
  31. package/templates/.claude/instructions/{parallel-agent-execution.md → multi-agent/execution-patterns.md} +127 -438
  32. package/templates/.claude/instructions/multi-agent/index.md +282 -0
  33. package/templates/.claude/instructions/multi-agent/performance-optimization.md +456 -0
  34. package/templates/.claude/instructions/tech-stack/design-standards.md +282 -0
  35. package/templates/.claude/instructions/tech-stack/index.md +70 -0
  36. package/templates/.claude/instructions/tech-stack/prisma-patterns.md +352 -0
  37. package/templates/.claude/instructions/tech-stack/tanstack-patterns.md +275 -0
  38. package/templates/.claude/instructions/validation/forbidden-patterns.md +281 -0
  39. package/templates/.claude/instructions/validation/index.md +32 -0
  40. package/templates/.claude/instructions/validation/required-behaviors.md +331 -0
  41. package/templates/.claude/instructions/validation/verification-checklist.md +318 -0
  42. package/templates/.claude/instructions/workflow-patterns/index.md +18 -0
  43. package/templates/.claude/instructions/workflow-patterns/phase-based-workflow.md +250 -0
  44. package/templates/.claude/instructions/workflow-patterns/sequential-thinking.md +217 -0
  45. package/templates/.claude/instructions/workflow-patterns/todowrite-pattern.md +215 -0
  46. package/templates/.claude/skills/bug-fix/SKILL.md +972 -0
  47. package/templates/.claude/skills/docs-creator/AGENTS.md +4 -1
  48. package/templates/.claude/skills/docs-creator/SKILL.md +258 -0
  49. package/templates/.claude/skills/docs-refactor/AGENTS.md +4 -1
  50. package/templates/.claude/skills/docs-refactor/SKILL.md +145 -0
  51. package/templates/.claude/skills/execute/SKILL.md +15 -242
  52. package/templates/.claude/skills/figma-to-code/AGENTS.md +4 -1
  53. package/templates/.claude/skills/figma-to-code/SKILL.md +306 -0
  54. package/templates/.claude/skills/global-uiux-design/AGENTS.md +4 -1
  55. package/templates/.claude/skills/global-uiux-design/SKILL.md +455 -125
  56. package/templates/.claude/skills/korea-uiux-design/AGENTS.md +4 -1
  57. package/templates/.claude/skills/korea-uiux-design/SKILL.md +461 -116
  58. package/templates/.claude/skills/nextjs-react-best-practices/SKILL.md +177 -0
  59. package/templates/.claude/skills/plan/SKILL.md +1102 -98
  60. package/templates/.claude/skills/prd/SKILL.md +367 -66
  61. package/templates/.claude/skills/ralph/AGENTS.md +4 -1
  62. package/templates/.claude/skills/ralph/SKILL.md +83 -0
  63. package/templates/.claude/skills/refactor/SKILL.md +1214 -0
  64. package/templates/.claude/skills/tanstack-start-react-best-practices/SKILL.md +149 -0
  65. package/templates/.claude/commands/bug-fix.md +0 -510
  66. package/templates/.claude/commands/refactor.md +0 -788
@@ -6,19 +6,29 @@
6
6
 
7
7
  <overview>
8
8
 
9
- ## 핵심 원칙
9
+ ## 목적 및 개요
10
10
 
11
11
  **Goal:** 독립적인 작업을 동시에 처리하여 대기 시간 최소화, 처리량 극대화, 비용 절감.
12
12
 
13
13
  **Performance:** 순차 실행 → 병렬 실행으로 5-15배 성능 향상.
14
14
 
15
+ ### 사용 시점
16
+
17
+ | 상황 | 설명 | 예상 효과 |
18
+ |------|------|----------|
19
+ | **독립적인 작업** | 서로 의존하지 않는 여러 작업 | 대기 시간 → 동시 실행 시간 |
20
+ | **여러 파일 수정** | 다른 파일 동시 작업 | 순차 작업 → 병렬 처리 |
21
+ | **탐색 + 구현** | 코드베이스 분석 + 기능 구현 | 별도 컨텍스트 활용 |
22
+ | **다중 도메인** | API + UI + 문서 동시 작업 | 전문 에이전트 활용 |
23
+ | **배치 처리** | 여러 아이템 동일 작업 | 토큰 70-90% 절감 |
24
+
15
25
  </overview>
16
26
 
17
27
  ---
18
28
 
19
29
  <core_principles>
20
30
 
21
- ## 3대 원칙
31
+ ## 3대 핵심 원칙
22
32
 
23
33
  | 원칙 | 실행 방법 | 기대 효과 |
24
34
  |------|----------|----------|
@@ -26,7 +36,8 @@
26
36
  | **BACKGROUND** | 10개 이상 작업 시 `run_in_background=true` | 대기 시간 제거 |
27
37
  | **DELEGATE** | 전문 에이전트에게 즉시 위임 | 컨텍스트 격리, 품질 향상 |
28
38
 
29
- **핵심 룰:**
39
+ ### 핵심 룰
40
+
30
41
  ```typescript
31
42
  // ❌ 순차 실행 (느림)
32
43
  Task(...) // 60초 대기
@@ -49,238 +60,48 @@ Task(...) // 동시 호출
49
60
 
50
61
  **원칙:** 작업 복잡도에 따라 모델 선택, 비용 최적화.
51
62
 
63
+ ### 복잡도별 모델 선택
64
+
52
65
  | 복잡도 | 모델 | 작업 예시 | 비용 | 속도 |
53
66
  |--------|------|----------|------|------|
54
67
  | **LOW** | haiku | 파일 읽기, 정의 조회, 간단한 탐색 | 💰 | ⚡⚡⚡ |
55
68
  | **MEDIUM** | sonnet | 기능 구현, 버그 수정, 리팩토링 | 💰💰 | ⚡⚡ |
56
69
  | **HIGH** | opus | 아키텍처 설계, 복잡한 디버깅, 보안 | 💰💰💰 | ⚡ |
57
70
 
58
- **모델 명시 예시:**
59
- ```typescript
60
- Task(subagent_type="explore", model="haiku", ...) // 빠르고 저렴
61
- Task(subagent_type="implementation-executor", model="sonnet", ...)
62
- Task(subagent_type="planner", model="opus", ...) // 복잡하지만 정확
63
- ```
71
+ ### 에이전트별 권장 모델
64
72
 
65
- </model_routing>
66
-
67
- ---
68
-
69
- <agent_roster>
70
-
71
- ## 에이전트 목록
72
-
73
- ### 계획 및 분석
74
-
75
- | 에이전트 | 모델 | 용도 | 병렬 가능 |
76
- |---------|------|------|----------|
73
+ | 에이전트 | 권장 모델 | 용도 | 병렬 가능 |
74
+ |---------|----------|------|----------|
77
75
  | **planner** | opus | 작업 계획 수립, 인터뷰, .claude/plans/ 생성 | ❌ (조정자) |
78
76
  | **analyst** | sonnet | 데이터 분석, 패턴 발견 | ✅ |
79
77
  | **architect** | opus | 아키텍처 설계, 시스템 디자인 | ❌ (의사결정) |
80
-
81
- ### 탐색 및 조사
82
-
83
- | 에이전트 | 모델 | 용도 | 병렬 가능 |
84
- |---------|------|------|----------|
85
78
  | **explore** | haiku | 코드베이스 빠른 탐색, 파일/패턴 검색 | ✅ |
86
-
87
- ### 구현
88
-
89
- | 에이전트 | 모델 | 용도 | 병렬 가능 |
90
- |---------|------|------|----------|
91
79
  | **implementation-executor** | sonnet | 즉시 구현, 옵션 제시 없이 최적 방법 실행 | ✅ |
92
80
  | **designer** | sonnet/opus | UI/UX 구현, 컴포넌트 작성 | ✅ |
93
-
94
- ### 검증 및 수정
95
-
96
- | 에이전트 | 모델 | 용도 | 병렬 가능 |
97
- |---------|------|------|----------|
98
81
  | **deployment-validator** | sonnet | typecheck/lint/build 검증 | ❌ (순차) |
99
82
  | **lint-fixer** | sonnet | tsc/eslint 에러 자동 수정 | ✅ |
100
83
  | **code-reviewer** | opus | 코드 리뷰, 보안/성능 검토 | ✅ |
101
-
102
- ### 문서 및 유틸
103
-
104
- | 에이전트 | 모델 | 용도 | 병렬 가능 |
105
- |---------|------|------|----------|
106
84
  | **document-writer** | haiku/sonnet | 문서 작성, 주석, README | ✅ |
107
85
  | **ko-to-en-translator** | sonnet | 한글 → 영어 번역 (커밋 메시지) | ✅ |
108
-
109
- ### Git 및 배포
110
-
111
- | 에이전트 | 모델 | 용도 | 병렬 가능 |
112
- |---------|------|------|----------|
113
86
  | **git-operator** | sonnet | Git 작업 (commit, branch, merge) | ❌ (순차) |
114
87
  | **dependency-manager** | sonnet | package.json 의존성 관리 | ❌ (의존성) |
115
-
116
- ### 고급
117
-
118
- | 에이전트 | 모델 | 용도 | 병렬 가능 |
119
- |---------|------|------|----------|
120
88
  | **refactor-advisor** | opus | 리팩토링 전략 제안 | ❌ (의사결정) |
121
89
 
122
- </agent_roster>
123
-
124
- ---
125
-
126
- <coordination_patterns>
127
-
128
- ## 조정 패턴
129
-
130
- ### 패턴 1: 서브에이전트 패턴 (Subagents)
131
-
132
- **특징:** 메인 에이전트가 컨텍스트 유지, 서브에이전트는 stateless.
133
-
134
- ```typescript
135
- // 메인 에이전트: 전체 흐름 조정
136
- // 서브에이전트 1: API 구현
137
- Task(subagent_type="implementation-executor", model="sonnet",
138
- prompt="User API 엔드포인트 구현")
139
-
140
- // 서브에이전트 2: UI 구현 (동시 실행)
141
- Task(subagent_type="designer", model="sonnet",
142
- prompt="User Profile UI 구현")
143
-
144
- // 서브에이전트 3: 테스트 작성 (동시 실행)
145
- Task(subagent_type="implementation-executor", model="sonnet",
146
- prompt="API 통합 테스트 작성")
147
- ```
148
-
149
- **장점:**
150
- - 컨텍스트 격리 (재귀 위임 방지)
151
- - 병렬 실행 (독립적인 작업)
152
- - 재사용 가능 (전문화된 에이전트)
153
-
154
- ---
155
-
156
- ### 패턴 2: 순차 파이프라인 (Sequential Pipeline)
157
-
158
- **용도:** 단계별 의존성 있는 작업.
159
-
160
- ```typescript
161
- // Step 1: 분석 (haiku)
162
- Task(subagent_type="explore", model="haiku",
163
- prompt="기존 인증 로직 분석")
164
-
165
- // Step 2: 구현 (sonnet) - Step 1 결과 필요
166
- Task(subagent_type="implementation-executor", model="sonnet",
167
- prompt="분석 결과 바탕으로 새 인증 로직 구현")
168
-
169
- // Step 3: 검증 (sonnet) - Step 2 완료 필요
170
- Task(subagent_type="deployment-validator", model="sonnet",
171
- prompt="typecheck/lint/build 검증")
172
- ```
173
-
174
- **주의:** 순차 실행은 의존성이 명확할 때만 사용.
175
-
176
- ---
177
-
178
- ### 패턴 3: 라우터 패턴 (Router)
179
-
180
- **정의:** 중앙 에이전트가 작업 분석 후 전문 에이전트에게 라우팅.
181
-
182
- ```typescript
183
- // 작업 분석
184
- const taskType = analyzeTask(userRequest)
185
-
186
- // 조건부 라우팅
187
- if (taskType === "frontend") {
188
- Task(subagent_type="designer", model="sonnet", ...)
189
- } else if (taskType === "backend") {
190
- Task(subagent_type="implementation-executor", model="sonnet", ...)
191
- } else if (taskType === "documentation") {
192
- Task(subagent_type="document-writer", model="haiku", ...)
193
- }
194
- ```
195
-
196
- **활용:** 복잡한 요청을 도메인별로 자동 분배.
197
-
198
- ---
199
-
200
- ### 패턴 4: Fan-Out Fan-In
201
-
202
- **정의:** 하나의 작업을 여러 하위 작업으로 분산(Fan-Out) → 결과 수집 및 통합(Fan-In).
203
-
204
- ```typescript
205
- // Fan-Out: 여러 컴포넌트 동시 구현
206
- Task(subagent_type="designer", model="sonnet",
207
- prompt="Header 컴포넌트 구현")
208
- Task(subagent_type="designer", model="sonnet",
209
- prompt="Footer 컴포넌트 구현")
210
- Task(subagent_type="designer", model="sonnet",
211
- prompt="Sidebar 컴포넌트 구현")
212
-
213
- // Fan-In: 결과 수집 후 통합
214
- Read("components/Header.tsx")
215
- Read("components/Footer.tsx")
216
- Read("components/Sidebar.tsx")
217
- // → Layout.tsx에 통합
218
- ```
219
-
220
- **활용 사례:**
221
- - 여러 API 엔드포인트 동시 호출
222
- - 다중 컴포넌트 병렬 구현
223
- - 배치 데이터 처리
224
-
225
- ---
226
-
227
- ### 패턴 5: 계층적 위임 (Hierarchical Delegation)
228
-
229
- **구조:** 메인 에이전트 → 계획 + 조정, 서브 에이전트 → 실행.
230
-
231
- ```typescript
232
- // 메인 에이전트: 계획 수립
233
- Task(subagent_type="planner", model="opus",
234
- prompt="전체 아키텍처 설계 및 작업 분해")
235
-
236
- // 서브 에이전트: 병렬 실행
237
- Task(subagent_type="implementation-executor", model="sonnet",
238
- prompt="Auth 모듈 구현")
239
- Task(subagent_type="implementation-executor", model="sonnet",
240
- prompt="User 모듈 구현")
241
- Task(subagent_type="implementation-executor", model="sonnet",
242
- prompt="Post 모듈 구현")
243
- ```
244
-
245
- **장점:**
246
- - 컨텍스트 격리 (각 에이전트 독립 컨텍스트)
247
- - 전문화 (도메인별 최적화)
248
- - 재시도 용이 (실패 시 해당 에이전트만 재실행)
249
-
250
- ---
251
-
252
- ### 패턴 6: 배치 처리 (Batching)
253
-
254
- **원리:** 유사 작업을 묶어서 컨텍스트 공유, 토큰 70-90% 절감.
90
+ **모델 명시 예시:**
255
91
 
256
92
  ```typescript
257
- // 개별 처리 (비효율)
258
- Edit("file1.ts", ...) // 컨텍스트 전송
259
- Edit("file2.ts", ...) // 컨텍스트 재전송
260
- Edit("file3.ts", ...) // 컨텍스트 재전송
261
-
262
- // ✅ 배치 처리 (효율)
263
- Task(subagent_type="implementation-executor", model="sonnet",
264
- prompt=`다음 파일들에 동일한 수정 적용:
265
- - file1.ts
266
- - file2.ts
267
- - file3.ts
268
-
269
- 수정 내용: [공통 규칙]`)
93
+ Task(subagent_type="explore", model="haiku", ...) // 빠르고 저렴
94
+ Task(subagent_type="implementation-executor", model="sonnet", ...)
95
+ Task(subagent_type="planner", model="opus", ...) // 복잡하지만 정확
270
96
  ```
271
97
 
272
- **적용 기준:**
273
- - 10개 이상 유사 작업
274
- - 공통 컨텍스트 공유 가능
275
- - 순서 무관
276
-
277
- </coordination_patterns>
98
+ </model_routing>
278
99
 
279
100
  ---
280
101
 
281
102
  <context_preservation>
282
103
 
283
- ## 컨텍스트 보존
104
+ ## 컨텍스트 보존 전략
284
105
 
285
106
  ### 문제: 병렬 실행 시 컨텍스트 손실
286
107
 
@@ -406,6 +227,7 @@ Task(subagent_type="document-writer", model="haiku",
406
227
  | **Circuit Breaker** | 반복 실패 시 중단 | 3회 실패 시 대안 에이전트 |
407
228
  | **Redundancy** | 중요 작업 중복 실행 | 동일 작업 여러 에이전트 |
408
229
  | **Graceful Degradation** | 부분 실패 허용 | 핵심 작업 우선 완료 |
230
+ | **Monitoring** | 상태 추적 | TaskList, 로그 파일 |
409
231
 
410
232
  ### 패턴 1: 실패 격리
411
233
 
@@ -498,120 +320,6 @@ Write(".claude/logs/failures.md", `
498
320
 
499
321
  ---
500
322
 
501
- <examples>
502
-
503
- ## 실전 예제
504
-
505
- ### 예제 1: 풀스택 기능 구현
506
-
507
- ```typescript
508
- // 목표: User Profile 기능 구현 (API + UI + 테스트)
509
-
510
- // ✅ 병렬 실행
511
- Task(subagent_type="implementation-executor", model="sonnet",
512
- prompt=`User Profile API 구현
513
-
514
- - GET /profile: 프로필 조회
515
- - PUT /profile: 프로필 수정
516
- - 인증 필수
517
- - Prisma User 모델 사용`)
518
-
519
- Task(subagent_type="designer", model="sonnet",
520
- prompt=`User Profile UI 구현
521
-
522
- - 프로필 조회 화면
523
- - 수정 폼
524
- - TanStack Query 사용
525
- - Tailwind 스타일`)
526
-
527
- Task(subagent_type="implementation-executor", model="sonnet",
528
- prompt=`User Profile 통합 테스트 작성
529
-
530
- - API 테스트
531
- - UI 테스트
532
- - E2E 시나리오`)
533
- ```
534
-
535
- **예상 시간:**
536
- - 순차 실행: 180초 (60 + 60 + 60)
537
- - 병렬 실행: 60초 (가장 긴 작업)
538
- - 개선: 3배 향상
539
-
540
- ---
541
-
542
- ### 예제 2: 대규모 리팩토링
543
-
544
- ```typescript
545
- // 목표: 10개 파일 동일 패턴으로 리팩토링
546
-
547
- // ❌ 순차 실행 (비효율)
548
- Edit("file1.ts", ...)
549
- Edit("file2.ts", ...)
550
- // ... (10번 반복)
551
-
552
- // ✅ 배치 처리 (효율)
553
- Task(subagent_type="implementation-executor", model="sonnet",
554
- prompt=`다음 파일들 리팩토링:
555
-
556
- 파일 목록:
557
- - file1.ts ~ file10.ts
558
-
559
- 공통 규칙:
560
- 1. const 함수 → arrow function
561
- 2. any → unknown
562
- 3. 명시적 return type 추가
563
-
564
- 패턴:
565
- ❌ function fn() { ... }
566
- ✅ const fn = (): ReturnType => { ... }`)
567
- ```
568
-
569
- **예상 효과:**
570
- - 토큰 사용: 70-90% 절감
571
- - 실행 시간: 단축
572
- - 일관성: 향상
573
-
574
- ---
575
-
576
- ### 예제 3: 멀티 스테이지 파이프라인
577
-
578
- ```typescript
579
- // Phase 1: 탐색 (병렬)
580
- Task(subagent_type="explore", model="haiku",
581
- prompt="프로젝트 구조 분석")
582
- Task(subagent_type="explore", model="haiku",
583
- prompt="기존 인증 로직 위치")
584
- Task(subagent_type="explore", model="haiku",
585
- prompt="테스트 구조 파악")
586
-
587
- // Phase 2: 구현 (병렬)
588
- Task(subagent_type="implementation-executor", model="sonnet",
589
- prompt="새 인증 로직 구현")
590
- Task(subagent_type="implementation-executor", model="sonnet",
591
- prompt="미들웨어 구현")
592
- Task(subagent_type="implementation-executor", model="sonnet",
593
- prompt="테스트 작성")
594
-
595
- // Phase 3: 검증 (순차)
596
- Task(subagent_type="deployment-validator", model="sonnet",
597
- prompt="typecheck/lint/build 전체 검증")
598
-
599
- // Phase 4: 리뷰 (병렬)
600
- Task(subagent_type="code-reviewer", model="opus",
601
- prompt="보안 검토")
602
- Task(subagent_type="code-reviewer", model="opus",
603
- prompt="성능 검토")
604
- ```
605
-
606
- **구조:**
607
- 1. Phase 1, 2, 4: 병렬 실행 (독립 작업)
608
- 2. Phase 3: 순차 실행 (의존성)
609
- 3. 모델 최적화 (haiku → sonnet → opus)
610
-
611
- </examples>
612
-
613
- ---
614
-
615
323
  <best_practices>
616
324
 
617
325
  ## 모범 사례
@@ -706,7 +414,7 @@ Task(subagent_type="implementation-executor", model="sonnet",
706
414
  | **배치 처리** | 유사 작업 묶음 → 토큰 70-90% 절감 |
707
415
  | **모델 라우팅** | haiku (간단), sonnet (일반), opus (복잡) |
708
416
  | **에이전트 위임** | 전문 에이전트 즉시 위임 → 품질 향상 |
709
- | **컨텍스트 보존** | 상태 문서화 + 핸드오프 |
417
+ | **컨텍스트 보존** | 상태 문서화 + 핸드오프 + 컴팩션 |
710
418
  | **에러 처리** | 격리 + 재시도 (3회) + 서킷 브레이커 |
711
419
  | **성능 목표** | 대기 시간 80% 감소, 병렬도 3-10개 |
712
420
 
@@ -718,20 +426,3 @@ Task(subagent_type="implementation-executor", model="sonnet",
718
426
  5. 모니터링 → TaskList, 로그
719
427
 
720
428
  </summary>
721
-
722
- ---
723
-
724
- <references>
725
-
726
- ## 참고 자료
727
-
728
- **관련 문서:**
729
- - `.claude/instructions/parallel-agent-execution.md` - 병렬 실행 상세 가이드
730
- - `.claude/agents/*.md` - 개별 에이전트 스펙
731
-
732
- **외부 자료:**
733
- - [Effective context engineering for AI agents](https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents)
734
- - [Multi-agent research system](https://www.anthropic.com/engineering/multi-agent-research-system)
735
- - [Multi-Agent Design Patterns (Azure)](https://learn.microsoft.com/en-us/azure/architecture/ai-ml/guide/ai-agent-design-patterns)
736
-
737
- </references>