@kood/claude-code 0.6.0 → 0.6.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/dist/index.js +1 -1
- package/package.json +1 -1
- package/templates/.claude/instructions/agent-patterns/delegation-patterns.md +389 -0
- package/templates/.claude/instructions/context-optimization/phase-based-execution.md +410 -0
- package/templates/.claude/instructions/context-optimization/redundant-exploration-prevention.md +646 -0
- package/templates/.claude/instructions/context-optimization/sub-agent-distribution.md +476 -0
- package/templates/.claude/instructions/glossary.md +48 -0
- package/templates/.claude/instructions/project-context-template.md +453 -0
- package/templates/.claude/instructions/skill-integration.md +90 -0
- package/templates/.claude/instructions/sourcing/reliable-search.md +411 -0
- package/templates/.claude/instructions/validation/forbidden-patterns.md +47 -0
- package/templates/.claude/instructions/validation/required-behaviors.md +120 -0
- package/templates/.claude/instructions/validation/scope-completeness.md +367 -0
- package/templates/.claude/instructions/workflow-patterns/todowrite-pattern.md +2 -0
- package/templates/.claude/skills/brainstorm/SKILL.md +110 -644
- package/templates/.claude/skills/bug-fix/SKILL.md +9 -137
- package/templates/.claude/skills/docs-fetch/CLAUDE.md +3 -0
- package/templates/.claude/skills/docs-fetch/SKILL.md +458 -0
- package/templates/.claude/skills/elon-musk/CLAUDE.md +3 -0
- package/templates/.claude/skills/elon-musk/SKILL.md +367 -0
- package/templates/.claude/skills/execute/SKILL.md +18 -397
- package/templates/.claude/skills/plan/SKILL.md +12 -986
- package/templates/.claude/skills/prd/SKILL.md +225 -586
- package/templates/.claude/skills/prd/references/ai-native-prd.md +116 -0
- package/templates/.claude/skills/prd/references/anti-patterns.md +82 -0
- package/templates/.claude/skills/prd/references/frameworks.md +216 -0
- package/templates/.claude/skills/prd/references/pm-leaders.md +106 -0
- package/templates/.claude/skills/prd/references/trends-2026.md +157 -0
- package/templates/.claude/skills/ralph/SKILL.md +15 -497
- package/templates/.claude/skills/refactor/SKILL.md +11 -655
- package/templates/.claude/skills/research/SKILL.md +257 -0
- package/templates/.claude/skills/research/report-template.md +88 -0
|
@@ -0,0 +1,476 @@
|
|
|
1
|
+
# Sub-Agent Distribution (서브 에이전트 컨텍스트 분산)
|
|
2
|
+
|
|
3
|
+
**목적**: Task 에이전트 활용으로 컨텍스트를 분산하고 효율적으로 관리
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 핵심 문제
|
|
8
|
+
|
|
9
|
+
### Usage Report 분석 결과
|
|
10
|
+
|
|
11
|
+
| 문제 | 빈도 | 원인 |
|
|
12
|
+
|------|------|------|
|
|
13
|
+
| **Rate Limiting** | 8건 | 단일 에이전트 과도한 작업 |
|
|
14
|
+
| **Context Window Exceeded** | 3건 | 메인 에이전트에 모든 탐색 결과 축적 |
|
|
15
|
+
| **컨텍스트 소진** | 반복 | 전체 파일 읽기 + 상세 분석 누적 |
|
|
16
|
+
|
|
17
|
+
### 핵심 원칙
|
|
18
|
+
|
|
19
|
+
**"각 에이전트는 독립적인 컨텍스트를 보유하며, 압축된 결과만 전달한다"**
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
❌ Main Agent
|
|
23
|
+
└─ Read 20 files (전체 탐색 수행)
|
|
24
|
+
└─ 컨텍스트 누적 → Context Window Exceeded
|
|
25
|
+
|
|
26
|
+
✅ Main Agent
|
|
27
|
+
├─ Task(explore) → 압축 결과 수신
|
|
28
|
+
├─ Task(implementation) → 실행
|
|
29
|
+
└─ Task(verifier) → 검증 결과 수신
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## 에이전트 컨텍스트 분산 원칙
|
|
35
|
+
|
|
36
|
+
### 원칙 1: 독립 컨텍스트 보유
|
|
37
|
+
|
|
38
|
+
| 에이전트 | 컨텍스트 | 메인으로 전달 |
|
|
39
|
+
|---------|----------|-------------|
|
|
40
|
+
| **Analyzer** | 전체 코드베이스 탐색 | 핵심 파일 3-5개 + 요약 |
|
|
41
|
+
| **Transformer** | 변경 대상 파일만 | 변경 완료 확인 |
|
|
42
|
+
| **Verifier** | 검증 결과만 | ✅/❌ + 에러 요약 |
|
|
43
|
+
|
|
44
|
+
### 원칙 2: 압축된 정보만 전달
|
|
45
|
+
|
|
46
|
+
```typescript
|
|
47
|
+
// ❌ 금지: 전체 탐색 결과 전달
|
|
48
|
+
Task(subagent_type="explore", model="haiku",
|
|
49
|
+
prompt="프론트엔드 인증 구조 분석")
|
|
50
|
+
// → 결과: 50개 파일 목록 + 전체 코드 구조 (2000줄)
|
|
51
|
+
// → 메인 에이전트: 2000줄 수신 → 컨텍스트 소진
|
|
52
|
+
|
|
53
|
+
// ✅ 올바름: 압축된 결과 요청
|
|
54
|
+
Task(subagent_type="explore", model="haiku",
|
|
55
|
+
prompt=`프론트엔드 인증 구조 분석
|
|
56
|
+
|
|
57
|
+
결과 형식:
|
|
58
|
+
1. 핵심 파일 3개 (경로만)
|
|
59
|
+
2. 아키텍처 요약 (500자 이내)
|
|
60
|
+
3. 주요 이슈 (3개 이내)`)
|
|
61
|
+
// → 결과: 핵심 정보만 (100줄)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### 원칙 3: 재탐색 금지
|
|
65
|
+
|
|
66
|
+
```typescript
|
|
67
|
+
// ❌ 금지: 에이전트 결과 무시 후 재탐색
|
|
68
|
+
Task(subagent_type="explore", ...)
|
|
69
|
+
// → 결과: "인증 관련 파일 3개: auth.ts, login.ts, middleware.ts"
|
|
70
|
+
Read("src/auth.ts") // 재탐색 금지!
|
|
71
|
+
Read("src/login.ts")
|
|
72
|
+
Read("src/middleware.ts")
|
|
73
|
+
|
|
74
|
+
// ✅ 올바름: 에이전트 결과 직접 활용
|
|
75
|
+
Task(subagent_type="explore", ...)
|
|
76
|
+
// → 결과: "인증 관련 파일 3개: auth.ts, login.ts, middleware.ts"
|
|
77
|
+
Task(subagent_type="implementation-executor",
|
|
78
|
+
prompt=`auth.ts, login.ts, middleware.ts 수정
|
|
79
|
+
(에이전트가 파일 읽기)`)
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## DAG 기반 에이전트 파이프라인
|
|
85
|
+
|
|
86
|
+
### 기본 파이프라인
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
Analyzer Agent (explore/analyst)
|
|
90
|
+
↓
|
|
91
|
+
압축된 분석 결과
|
|
92
|
+
(핵심 파일 3-5개, 아키텍처 요약 500자)
|
|
93
|
+
↓
|
|
94
|
+
Transformer Agent (implementation-executor)
|
|
95
|
+
↓
|
|
96
|
+
변경 완료 확인
|
|
97
|
+
(수정된 파일 목록만)
|
|
98
|
+
↓
|
|
99
|
+
Verifier Agent (deployment-validator/code-reviewer)
|
|
100
|
+
↓
|
|
101
|
+
검증 결과
|
|
102
|
+
(✅/❌ + 에러 요약)
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### 병렬 파이프라인 (풀스택)
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
Main Agent
|
|
109
|
+
├─ Analyzer 1 (백엔드) → 압축 결과 A
|
|
110
|
+
├─ Analyzer 2 (프론트) → 압축 결과 B
|
|
111
|
+
├─ Analyzer 3 (DB) → 압축 결과 C
|
|
112
|
+
↓
|
|
113
|
+
결과 A + B + C 통합 (500줄 이내)
|
|
114
|
+
↓
|
|
115
|
+
├─ Transformer 1 (백엔드)
|
|
116
|
+
├─ Transformer 2 (프론트)
|
|
117
|
+
├─ Transformer 3 (DB)
|
|
118
|
+
↓
|
|
119
|
+
├─ Verifier 1 (보안)
|
|
120
|
+
├─ Verifier 2 (성능)
|
|
121
|
+
└─ Verifier 3 (빌드)
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## 에이전트별 역할 분리
|
|
127
|
+
|
|
128
|
+
### Analyzer (explore/analyst)
|
|
129
|
+
|
|
130
|
+
**역할:** 코드베이스 탐색 → 핵심 정보만 추출
|
|
131
|
+
|
|
132
|
+
```typescript
|
|
133
|
+
Task(subagent_type="explore", model="haiku",
|
|
134
|
+
prompt=`인증 관련 코드 분석
|
|
135
|
+
|
|
136
|
+
출력 형식:
|
|
137
|
+
1. 핵심 파일 (최대 5개)
|
|
138
|
+
- 경로
|
|
139
|
+
- 역할 (1줄)
|
|
140
|
+
2. 아키텍처 요약 (500자 이내)
|
|
141
|
+
3. 주요 이슈 (최대 3개)
|
|
142
|
+
|
|
143
|
+
불필요한 정보 제외:
|
|
144
|
+
- 전체 코드 내용
|
|
145
|
+
- 모든 파일 목록
|
|
146
|
+
- 상세한 함수 분석`)
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
**컨텍스트 절약:**
|
|
150
|
+
- 전체 탐색: 2000줄
|
|
151
|
+
- 압축 결과: 100줄
|
|
152
|
+
- 절감: 95%
|
|
153
|
+
|
|
154
|
+
### Transformer (implementation-executor)
|
|
155
|
+
|
|
156
|
+
**역할:** 실제 변경 수행 (Analyzer 결과 기반)
|
|
157
|
+
|
|
158
|
+
```typescript
|
|
159
|
+
Task(subagent_type="implementation-executor", model="sonnet",
|
|
160
|
+
prompt=`Analyzer 결과 기반 구현
|
|
161
|
+
|
|
162
|
+
분석 결과:
|
|
163
|
+
- auth.ts: 인증 로직
|
|
164
|
+
- login.ts: 로그인 UI
|
|
165
|
+
- middleware.ts: 인증 미들웨어
|
|
166
|
+
|
|
167
|
+
작업:
|
|
168
|
+
JWT 토큰 갱신 로직 추가
|
|
169
|
+
|
|
170
|
+
출력 형식:
|
|
171
|
+
1. 수정된 파일 목록
|
|
172
|
+
2. 주요 변경 사항 (3줄 이내)`)
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**컨텍스트 절약:**
|
|
176
|
+
- 파일 자체 읽기 (컨텍스트 내부)
|
|
177
|
+
- 메인에는 변경 확인만 전달 (20줄)
|
|
178
|
+
|
|
179
|
+
### Verifier (deployment-validator/code-reviewer)
|
|
180
|
+
|
|
181
|
+
**역할:** 검증 및 피드백
|
|
182
|
+
|
|
183
|
+
```typescript
|
|
184
|
+
Task(subagent_type="deployment-validator", model="sonnet",
|
|
185
|
+
prompt=`변경 사항 검증
|
|
186
|
+
|
|
187
|
+
출력 형식:
|
|
188
|
+
1. 결과: ✅/❌
|
|
189
|
+
2. 에러 요약 (있는 경우만, 최대 5개)
|
|
190
|
+
3. 해결 방법 (1줄 이내)
|
|
191
|
+
|
|
192
|
+
불필요한 정보 제외:
|
|
193
|
+
- 전체 빌드 로그
|
|
194
|
+
- 모든 테스트 결과
|
|
195
|
+
- 상세 스택트레이스`)
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
**컨텍스트 절약:**
|
|
199
|
+
- 전체 빌드 로그: 5000줄
|
|
200
|
+
- 압축 결과: 50줄
|
|
201
|
+
- 절감: 99%
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## 압축된 결과 형식
|
|
206
|
+
|
|
207
|
+
### 형식 1: 파일 인벤토리
|
|
208
|
+
|
|
209
|
+
```markdown
|
|
210
|
+
## 인증 관련 파일
|
|
211
|
+
|
|
212
|
+
| 파일 | 역할 | 우선순위 |
|
|
213
|
+
|------|------|---------|
|
|
214
|
+
| auth.ts | JWT 토큰 발급 | HIGH |
|
|
215
|
+
| login.ts | 로그인 UI | MEDIUM |
|
|
216
|
+
| middleware.ts | 인증 미들웨어 | HIGH |
|
|
217
|
+
|
|
218
|
+
**아키텍처 요약:**
|
|
219
|
+
JWT 기반 인증. 토큰은 auth.ts에서 발급, middleware.ts에서 검증.
|
|
220
|
+
|
|
221
|
+
**주요 이슈:**
|
|
222
|
+
1. 토큰 갱신 로직 없음
|
|
223
|
+
2. 에러 처리 미흡
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### 형식 2: 검증 결과
|
|
227
|
+
|
|
228
|
+
```markdown
|
|
229
|
+
## 검증 결과
|
|
230
|
+
|
|
231
|
+
**결과:** ❌ 실패
|
|
232
|
+
|
|
233
|
+
**에러 요약:**
|
|
234
|
+
1. TypeScript: auth.ts:45 - Type 'string | undefined'
|
|
235
|
+
2. ESLint: login.ts:12 - Unused variable 'user'
|
|
236
|
+
|
|
237
|
+
**해결:**
|
|
238
|
+
1. auth.ts:45 → Optional chaining 추가
|
|
239
|
+
2. login.ts:12 → 변수 제거
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### 형식 3: 변경 확인
|
|
243
|
+
|
|
244
|
+
```markdown
|
|
245
|
+
## 변경 완료
|
|
246
|
+
|
|
247
|
+
**수정된 파일:**
|
|
248
|
+
- auth.ts
|
|
249
|
+
- middleware.ts
|
|
250
|
+
|
|
251
|
+
**주요 변경:**
|
|
252
|
+
- JWT 토큰 갱신 로직 추가
|
|
253
|
+
- 만료 시간 검증 개선
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## 병렬 연구 에이전트 패턴 (Research Swarm)
|
|
259
|
+
|
|
260
|
+
### 패턴: 3-5개 Researcher 병렬 실행
|
|
261
|
+
|
|
262
|
+
```typescript
|
|
263
|
+
// 각 researcher가 다른 측면 조사
|
|
264
|
+
Task(subagent_type="researcher", model="sonnet",
|
|
265
|
+
prompt=`WebSocket 성능 조사 (2026)
|
|
266
|
+
|
|
267
|
+
출력 파일: .claude/research/websocket-performance.md
|
|
268
|
+
형식:
|
|
269
|
+
- 핵심 요약 (200자)
|
|
270
|
+
- 주요 지표 3개
|
|
271
|
+
- 참고 링크 3개`)
|
|
272
|
+
|
|
273
|
+
Task(subagent_type="researcher", model="sonnet",
|
|
274
|
+
prompt=`SSE 성능 조사 (2026)
|
|
275
|
+
|
|
276
|
+
출력 파일: .claude/research/sse-performance.md
|
|
277
|
+
형식:
|
|
278
|
+
- 핵심 요약 (200자)
|
|
279
|
+
- 주요 지표 3개
|
|
280
|
+
- 참고 링크 3개`)
|
|
281
|
+
|
|
282
|
+
Task(subagent_type="researcher", model="sonnet",
|
|
283
|
+
prompt=`WebRTC 성능 조사 (2026)
|
|
284
|
+
|
|
285
|
+
출력 파일: .claude/research/webrtc-performance.md
|
|
286
|
+
형식:
|
|
287
|
+
- 핵심 요약 (200자)
|
|
288
|
+
- 주요 지표 3개
|
|
289
|
+
- 참고 링크 3개`)
|
|
290
|
+
|
|
291
|
+
// 메인 에이전트: 요약 파일만 읽음
|
|
292
|
+
Read(".claude/research/websocket-performance.md") // 20줄
|
|
293
|
+
Read(".claude/research/sse-performance.md") // 20줄
|
|
294
|
+
Read(".claude/research/webrtc-performance.md") // 20줄
|
|
295
|
+
// → 총 60줄 (개별 조사 결과 수천 줄 vs 요약 60줄)
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
### 결과 통합
|
|
299
|
+
|
|
300
|
+
```typescript
|
|
301
|
+
// 통합 결과
|
|
302
|
+
Write(".claude/research/realtime-comparison.md", `
|
|
303
|
+
# 실시간 통신 기술 비교
|
|
304
|
+
|
|
305
|
+
| 기술 | 성능 | 복잡도 | 추천 |
|
|
306
|
+
|------|------|--------|------|
|
|
307
|
+
| WebSocket | 높음 | 중간 | ✅ |
|
|
308
|
+
| SSE | 중간 | 낮음 | ⚠️ |
|
|
309
|
+
| WebRTC | 매우 높음 | 높음 | ❌ |
|
|
310
|
+
|
|
311
|
+
**결정:** WebSocket 채택
|
|
312
|
+
`)
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
---
|
|
316
|
+
|
|
317
|
+
## 컨텍스트 절약 예시
|
|
318
|
+
|
|
319
|
+
### 예시 1: 인증 구조 분석
|
|
320
|
+
|
|
321
|
+
```typescript
|
|
322
|
+
// ❌ 메인 에이전트가 직접 탐색 (컨텍스트 소모)
|
|
323
|
+
Glob("**/auth*.ts") // 20개 파일
|
|
324
|
+
Read("src/auth.ts")
|
|
325
|
+
Read("src/middleware/auth.ts")
|
|
326
|
+
Read("src/utils/auth.ts")
|
|
327
|
+
Read("src/routes/login.ts")
|
|
328
|
+
// ... (20개 파일 읽기)
|
|
329
|
+
// 컨텍스트: 10,000줄 소모
|
|
330
|
+
|
|
331
|
+
// ✅ 에이전트에 탐색 위임 + 압축 결과만 수신
|
|
332
|
+
Task(subagent_type="explore", model="haiku",
|
|
333
|
+
prompt=`인증 관련 파일 분석
|
|
334
|
+
|
|
335
|
+
결과 형식:
|
|
336
|
+
- 핵심 파일 3개 (경로 + 역할)
|
|
337
|
+
- 아키텍처 요약 500자 이내`)
|
|
338
|
+
// → 결과: 100줄
|
|
339
|
+
// 컨텍스트: 100줄 (99% 절감)
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
### 예시 2: 풀스택 기능 구현
|
|
343
|
+
|
|
344
|
+
```typescript
|
|
345
|
+
// ❌ 메인 에이전트가 모든 영역 탐색
|
|
346
|
+
Read("backend/api/...") // 50개 파일
|
|
347
|
+
Read("frontend/pages/...") // 30개 파일
|
|
348
|
+
Read("db/schema/...") // 10개 파일
|
|
349
|
+
// 컨텍스트: 20,000줄 소모 → Context Window Exceeded
|
|
350
|
+
|
|
351
|
+
// ✅ 영역별 에이전트 병렬 위임
|
|
352
|
+
Task(subagent_type="explore", model="haiku",
|
|
353
|
+
prompt="백엔드 API 구조 분석 → 핵심 파일 3개 + 요약 500자")
|
|
354
|
+
Task(subagent_type="explore", model="haiku",
|
|
355
|
+
prompt="프론트엔드 UI 구조 분석 → 핵심 파일 3개 + 요약 500자")
|
|
356
|
+
Task(subagent_type="explore", model="haiku",
|
|
357
|
+
prompt="DB 스키마 분석 → 핵심 테이블 3개 + 요약 500자")
|
|
358
|
+
// → 각각 100줄씩, 총 300줄
|
|
359
|
+
// 컨텍스트: 300줄 (98.5% 절감)
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
### 예시 3: 대규모 리팩토링
|
|
363
|
+
|
|
364
|
+
```typescript
|
|
365
|
+
// ❌ 메인 에이전트가 모든 파일 읽기 + 수정
|
|
366
|
+
Glob("**/*.ts") // 500개 파일
|
|
367
|
+
Read(...) // 100개 파일 읽기
|
|
368
|
+
Edit(...) // 50개 파일 수정
|
|
369
|
+
// 컨텍스트: 50,000줄 → Rate Limiting
|
|
370
|
+
|
|
371
|
+
// ✅ 배치별 에이전트 위임
|
|
372
|
+
Task(subagent_type="implementation-executor", model="sonnet",
|
|
373
|
+
prompt=`파일 1-10: any → unknown 변환
|
|
374
|
+
|
|
375
|
+
출력: 변경 완료 확인 (10줄 이내)`)
|
|
376
|
+
Task(subagent_type="implementation-executor", model="sonnet",
|
|
377
|
+
prompt=`파일 11-20: any → unknown 변환
|
|
378
|
+
|
|
379
|
+
출력: 변경 완료 확인 (10줄 이내)`)
|
|
380
|
+
// ... (5개 배치 병렬 실행)
|
|
381
|
+
// → 각각 10줄씩, 총 50줄
|
|
382
|
+
// 컨텍스트: 50줄 (99.9% 절감)
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
---
|
|
386
|
+
|
|
387
|
+
## 에이전트 결과 활용
|
|
388
|
+
|
|
389
|
+
### 규칙 1: 에이전트 결과 직접 참조
|
|
390
|
+
|
|
391
|
+
```typescript
|
|
392
|
+
// ✅ 올바름: 에이전트 결과 기반 작업
|
|
393
|
+
Task(subagent_type="explore", ...)
|
|
394
|
+
// → 결과: "핵심 파일: auth.ts, login.ts, middleware.ts"
|
|
395
|
+
|
|
396
|
+
Task(subagent_type="implementation-executor",
|
|
397
|
+
prompt=`auth.ts, login.ts, middleware.ts 수정
|
|
398
|
+
(에이전트 결과 기반, 재탐색 불필요)`)
|
|
399
|
+
|
|
400
|
+
// ❌ 금지: 결과 무시 후 재탐색
|
|
401
|
+
Task(subagent_type="explore", ...)
|
|
402
|
+
// → 결과 무시
|
|
403
|
+
Read("auth.ts") // 재탐색 금지!
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
### 규칙 2: 파일로 저장하여 다음 Phase에서 활용
|
|
407
|
+
|
|
408
|
+
```typescript
|
|
409
|
+
// Phase 1: 분석 (에이전트)
|
|
410
|
+
Task(subagent_type="analyst", model="sonnet",
|
|
411
|
+
prompt=`요구사항 분석
|
|
412
|
+
|
|
413
|
+
결과 파일: .claude/analysis/requirements.md`)
|
|
414
|
+
|
|
415
|
+
// Phase 2: 구현 (다음 세션)
|
|
416
|
+
Read(".claude/analysis/requirements.md") // 100줄
|
|
417
|
+
// → 전체 분석 과정 재수행 불필요
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
### 규칙 3: 의사결정은 요약 기반
|
|
421
|
+
|
|
422
|
+
```typescript
|
|
423
|
+
// ✅ 올바름: 요약 기반 결정
|
|
424
|
+
Task(subagent_type="explore", ...)
|
|
425
|
+
// → 결과: "WebSocket 추천, SSE 차선책"
|
|
426
|
+
// 결정: WebSocket 채택
|
|
427
|
+
|
|
428
|
+
// ❌ 금지: 전체 조사 재수행
|
|
429
|
+
Read("external/websocket-docs.html") // 10,000줄
|
|
430
|
+
Read("external/sse-docs.html") // 8,000줄
|
|
431
|
+
// → 에이전트 결과 무시
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
---
|
|
435
|
+
|
|
436
|
+
## 체크리스트
|
|
437
|
+
|
|
438
|
+
### 작업 시작 전 확인
|
|
439
|
+
|
|
440
|
+
```
|
|
441
|
+
[ ] 탐색/분석 필요? → explore/analyst 에이전트 위임
|
|
442
|
+
[ ] 결과 형식 명시? → 압축된 형식 (500자 이내)
|
|
443
|
+
[ ] 병렬 실행 가능? → 여러 에이전트 동시 호출
|
|
444
|
+
[ ] 결과 파일로 저장? → .claude/analysis/ 활용
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
### 작업 중 확인
|
|
448
|
+
|
|
449
|
+
```
|
|
450
|
+
[ ] 에이전트 결과 재탐색? → 금지!
|
|
451
|
+
[ ] 전체 로그 출력? → 요약만 출력
|
|
452
|
+
[ ] 메인 컨텍스트 크기? → 500줄 이하 유지
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
### 작업 완료 후 확인
|
|
456
|
+
|
|
457
|
+
```
|
|
458
|
+
[ ] Context Window Exceeded 발생? → 에이전트 위임 증가
|
|
459
|
+
[ ] Rate Limiting 발생? → 배치 크기 축소
|
|
460
|
+
[ ] 컨텍스트 절감? → 90% 이상 목표
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
---
|
|
464
|
+
|
|
465
|
+
## 핵심 요약
|
|
466
|
+
|
|
467
|
+
| 원칙 | 설명 | 효과 |
|
|
468
|
+
|------|------|------|
|
|
469
|
+
| **독립 컨텍스트** | 각 에이전트가 별도 컨텍스트 보유 | 메인 에이전트 부담 감소 |
|
|
470
|
+
| **압축 전달** | 핵심 정보만 메인으로 전달 | 95-99% 컨텍스트 절감 |
|
|
471
|
+
| **DAG 파이프라인** | Analyzer → Transformer → Verifier | 명확한 흐름, 재사용 |
|
|
472
|
+
| **병렬 연구** | 3-5개 researcher 동시 실행 | 시간 단축, 컨텍스트 격리 |
|
|
473
|
+
| **결과 직접 활용** | 에이전트 결과 재탐색 금지 | 중복 작업 제거 |
|
|
474
|
+
| **파일 저장** | 분석 결과 파일로 보존 | 다음 Phase 재사용 |
|
|
475
|
+
|
|
476
|
+
**"Each produce compressed artifacts, eliminating the context exhaustion"**
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Glossary - 용어 통일 규칙
|
|
2
|
+
|
|
3
|
+
Claude Code 템플릿에서 사용하는 공식 용어 정의
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 용어 통일 규칙
|
|
8
|
+
|
|
9
|
+
| 공식 용어 | 의미 | 금지 대체어 | 예시 |
|
|
10
|
+
|-----------|------|------------|------|
|
|
11
|
+
| **Task 에이전트** | Task 도구로 실행하는 서브 에이전트 | subagent, 서브태스크, delegation | `Task(subagent_type="planner", ...)` |
|
|
12
|
+
| **TaskCreate** | 작업 목록 생성 도구 (현재 API) | TodoWrite (레거시) | `TaskCreate(subject="...", description="...")` |
|
|
13
|
+
| **TaskUpdate** | 작업 상태 업데이트 도구 (현재 API) | TodoUpdate (레거시) | `TaskUpdate(taskId="1", status="completed")` |
|
|
14
|
+
| **Phase** | 워크플로우의 대단계 (Phase 1-4) | Stage | ralph: Phase 1 (작업 실행) |
|
|
15
|
+
| **Step** | Phase 내 세부 단계 | - | Phase 1, Step 3: 파일 읽기 |
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 레거시 용어
|
|
20
|
+
|
|
21
|
+
| 레거시 용어 | 현재 API | 마이그레이션 일자 |
|
|
22
|
+
|------------|---------|-----------------|
|
|
23
|
+
| TodoWrite | TaskCreate | 2026-01 |
|
|
24
|
+
| TodoUpdate | TaskUpdate | 2026-01 |
|
|
25
|
+
| subagent | Task 에이전트 | - |
|
|
26
|
+
|
|
27
|
+
**참고:** 기존 문서에서 TodoWrite/TodoUpdate를 발견하면 TaskCreate/TaskUpdate로 교체
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 스킬 용어
|
|
32
|
+
|
|
33
|
+
| 용어 | 의미 |
|
|
34
|
+
|------|------|
|
|
35
|
+
| **user-invocable skill** | 사용자가 직접 호출 가능한 스킬 (예: /plan, /ralph) |
|
|
36
|
+
| **스킬 체이닝** | 스킬 간 연결 (brainstorm → research → prd → plan → execute) |
|
|
37
|
+
| **고유 패턴** | 각 스킬만의 특화된 실행 패턴 (예: ralph의 무한 루프) |
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## 에이전트 관련 용어
|
|
42
|
+
|
|
43
|
+
| 용어 | 의미 |
|
|
44
|
+
|------|------|
|
|
45
|
+
| **병렬 실행** | 여러 Task 에이전트를 동시에 실행 (독립적인 작업) |
|
|
46
|
+
| **순차 실행** | Task 에이전트를 하나씩 실행 (의존성 있는 작업) |
|
|
47
|
+
| **모델 라우팅** | 작업 복잡도에 따라 haiku/sonnet/opus 선택 |
|
|
48
|
+
| **에이전트 위임** | 작업을 Task 에이전트에게 맡김 |
|