@kood/claude-code 0.6.1 → 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 +75 -672
- package/templates/.claude/skills/bug-fix/SKILL.md +9 -137
- package/templates/.claude/skills/docs-fetch/SKILL.md +64 -232
- package/templates/.claude/skills/elon-musk/SKILL.md +57 -310
- 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 +13 -1
- 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 +20 -23
|
@@ -6,6 +6,8 @@ user-invocable: true
|
|
|
6
6
|
|
|
7
7
|
@../../instructions/workflow-patterns/sequential-thinking.md
|
|
8
8
|
@../../instructions/agent-patterns/read-parallelization.md
|
|
9
|
+
@../../instructions/sourcing/reliable-search.md
|
|
10
|
+
@../../instructions/context-optimization/redundant-exploration-prevention.md
|
|
9
11
|
@../../instructions/validation/forbidden-patterns.md
|
|
10
12
|
@../../instructions/validation/required-behaviors.md
|
|
11
13
|
|
|
@@ -122,6 +124,7 @@ user-invocable: true
|
|
|
122
124
|
|-------|------|-----|--------|------|
|
|
123
125
|
| **explore** | 기존 문서/코드 조사 | haiku | haiku | haiku |
|
|
124
126
|
| **analyst** | 요구사항 분석, 가정 검증 | sonnet | sonnet | opus |
|
|
127
|
+
| **researcher** | 시장/경쟁사/기술 트렌드 외부 조사 | - | sonnet | sonnet |
|
|
125
128
|
| **architect** | 기술 아키텍처 검토 | - | sonnet | opus |
|
|
126
129
|
| **designer** | UI/UX 요구사항 설계 | - | sonnet | opus |
|
|
127
130
|
| **planner** | PRD 구조 설계 | - | - | opus |
|
|
@@ -159,11 +162,20 @@ Task(subagent_type="architect", model="opus", prompt="Engineer 관점 검증:
|
|
|
159
162
|
Task(subagent_type="designer", model="sonnet", prompt="Designer 관점 검증: UX, 접근성")
|
|
160
163
|
```
|
|
161
164
|
|
|
165
|
+
**패턴 4: 시장/경쟁사 외부 조사 (MEDIUM+ 복잡도)**
|
|
166
|
+
```typescript
|
|
167
|
+
// @reliable-search.md 규칙 적용: 현재 연도 포함, 출처 등급 분류
|
|
168
|
+
Task(subagent_type="researcher", model="sonnet",
|
|
169
|
+
prompt="[제품/기능] 시장 트렌드 2026. 검색 시 현재 연도 포함. 출처: URL + 발행일 + 소스유형.")
|
|
170
|
+
Task(subagent_type="researcher", model="sonnet",
|
|
171
|
+
prompt="[제품/기능] 경쟁사/대안 분석 2026. 검색 시 현재 연도 포함. 출처: URL + 발행일 + 소스유형.")
|
|
172
|
+
```
|
|
173
|
+
|
|
162
174
|
### 실행 순서
|
|
163
175
|
|
|
164
176
|
| 단계 | 작업 | 병렬 가능 |
|
|
165
177
|
|------|------|----------|
|
|
166
|
-
| **1** | 조사 (explore) +
|
|
178
|
+
| **1** | 조사 (explore) + 외부 조사 (researcher, @reliable-search.md 적용) | O |
|
|
167
179
|
| **2** | 요구사항 분석 (analyst) + 아키텍처 (architect) | O |
|
|
168
180
|
| **3** | PRD 작성 (document-writer), 섹션별 분할 가능 | O |
|
|
169
181
|
|
|
@@ -8,6 +8,9 @@ user-invocable: true
|
|
|
8
8
|
@../../instructions/workflow-patterns/phase-based-workflow.md
|
|
9
9
|
@../../instructions/agent-patterns/parallel-execution.md
|
|
10
10
|
@../../instructions/agent-patterns/model-routing.md
|
|
11
|
+
@../../instructions/context-optimization/phase-based-execution.md
|
|
12
|
+
@../../instructions/context-optimization/sub-agent-distribution.md
|
|
13
|
+
@../../instructions/validation/scope-completeness.md
|
|
11
14
|
@../../instructions/validation/forbidden-patterns.md
|
|
12
15
|
@../../instructions/validation/required-behaviors.md
|
|
13
16
|
|
|
@@ -387,333 +390,15 @@ Task(
|
|
|
387
390
|
|
|
388
391
|
## ULTRAWORK MODE (자동 활성화)
|
|
389
392
|
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|------|----------|
|
|
394
|
-
| **PARALLEL** | 독립 작업은 단일 메시지에서 동시 Tool 호출 |
|
|
395
|
-
| **READ_PARALLEL** | 독립적인 파일 읽기는 단일 메시지에서 여러 Read 동시 호출 |
|
|
396
|
-
| **EXPLORE_PARALLEL** | 복잡한 탐색은 여러 explore 에이전트 병렬 실행 |
|
|
397
|
-
| **BACKGROUND** | 10개 이상 동시 작업 시 `run_in_background=true` |
|
|
398
|
-
| **DELEGATE** | 전문 에이전트에게 즉시 위임 |
|
|
399
|
-
|
|
400
|
-
### 파일 읽기 및 탐색 병렬화
|
|
401
|
-
|
|
402
|
-
**독립적인 파일 읽기는 반드시 병렬로:**
|
|
403
|
-
|
|
404
|
-
```typescript
|
|
405
|
-
// ❌ 순차 읽기 (느림)
|
|
406
|
-
Read(.claude/skills/skill1.md)
|
|
407
|
-
// 대기...
|
|
408
|
-
Read(.claude/skills/skill2.md)
|
|
409
|
-
// 대기...
|
|
410
|
-
Read(.claude/agents/agent1.md)
|
|
411
|
-
|
|
412
|
-
// ✅ 병렬 읽기 (빠름)
|
|
413
|
-
// 단일 메시지에서 모든 Read 동시 호출
|
|
414
|
-
Read(.claude/skills/skill1.md)
|
|
415
|
-
Read(.claude/skills/skill2.md)
|
|
416
|
-
Read(.claude/agents/agent1.md)
|
|
417
|
-
Read(.claude/agents/agent2.md)
|
|
418
|
-
Read(.claude/agents/agent3.md)
|
|
419
|
-
```
|
|
420
|
-
|
|
421
|
-
**복잡한 탐색은 explore 에이전트 병렬 활용:**
|
|
422
|
-
|
|
423
|
-
```typescript
|
|
424
|
-
// ❌ 직접 순차 탐색 (느림)
|
|
425
|
-
Glob('**/*.prisma')
|
|
426
|
-
// 대기...
|
|
427
|
-
Grep('createServerFn', '**/*.ts')
|
|
428
|
-
// 대기...
|
|
429
|
-
Bash('git log --grep="auth"')
|
|
430
|
-
|
|
431
|
-
// ✅ explore 에이전트 병렬 실행 (빠름)
|
|
432
|
-
Task(subagent_type="explore", model="haiku",
|
|
433
|
-
prompt=".claude/skills/ 디렉토리 모든 파일 탐색 및 구조 분석")
|
|
434
|
-
Task(subagent_type="explore", model="haiku",
|
|
435
|
-
prompt=".claude/agents/ 디렉토리 모든 파일 탐색 및 역할 분석")
|
|
436
|
-
Task(subagent_type="explore", model="haiku",
|
|
437
|
-
prompt="프로젝트 루트 설정 파일 탐색 (package.json, tsconfig.json)")
|
|
438
|
-
```
|
|
439
|
-
|
|
440
|
-
**Sequential Thinking 중 탐색 병렬화:**
|
|
441
|
-
|
|
442
|
-
```typescript
|
|
443
|
-
// Thinking 중 탐색이 필요할 때
|
|
444
|
-
mcp__sequential-thinking(
|
|
445
|
-
thought="파일 구조 파악 필요. explore 에이전트 3개 병렬 호출하여 빠르게 정보 수집",
|
|
446
|
-
nextThoughtNeeded=true
|
|
447
|
-
)
|
|
448
|
-
|
|
449
|
-
// 다음 메시지에서 즉시 병렬 explore 실행
|
|
450
|
-
Task(subagent_type="explore", model="haiku",
|
|
451
|
-
prompt="인증 관련 파일 및 구조 탐색")
|
|
452
|
-
Task(subagent_type="explore", model="haiku",
|
|
453
|
-
prompt="데이터베이스 스키마 및 모델 탐색")
|
|
454
|
-
Task(subagent_type="explore", model="haiku",
|
|
455
|
-
prompt="API 엔드포인트 및 라우팅 탐색")
|
|
456
|
-
|
|
457
|
-
// 다음 Thinking에서 결과 통합
|
|
458
|
-
mcp__sequential-thinking(
|
|
459
|
-
thought="3개 explore 결과 통합: 인증은 middleware/, DB는 prisma/, API는 functions/",
|
|
460
|
-
nextThoughtNeeded=true
|
|
461
|
-
)
|
|
462
|
-
```
|
|
463
|
-
|
|
464
|
-
**파일 읽기 vs explore 에이전트 선택:**
|
|
465
|
-
|
|
466
|
-
| 상황 | 도구 | 이유 |
|
|
467
|
-
|------|------|------|
|
|
468
|
-
| 특정 파일 3-5개 읽기 | Read 병렬 | 빠르고 간단 |
|
|
469
|
-
| 디렉토리 전체 탐색 | explore 에이전트 | 구조 분석 + 요약 |
|
|
470
|
-
| 패턴 검색 + 분석 | explore 에이전트 | 검색 + 해석 통합 |
|
|
471
|
-
| 여러 영역 동시 탐색 | explore 에이전트 병렬 | 독립 컨텍스트 |
|
|
472
|
-
| 10개 이상 파일 읽기 | explore 에이전트 | 컨텍스트 효율 |
|
|
473
|
-
|
|
474
|
-
### Smart Model Routing
|
|
475
|
-
|
|
476
|
-
| 복잡도 | 모델 | 작업 예시 |
|
|
477
|
-
|--------|------|----------|
|
|
478
|
-
| LOW | haiku | 함수 찾기, 정의 조회, 파일 읽기 |
|
|
479
|
-
| MEDIUM | sonnet | 기능 구현, 버그 수정, 리팩토링 |
|
|
480
|
-
| HIGH | opus | 아키텍처 설계, 복잡한 디버깅, 보안 분석 |
|
|
481
|
-
|
|
482
|
-
**에이전트 호출 시 항상 `model` 파라미터 명시:**
|
|
483
|
-
|
|
484
|
-
```typescript
|
|
485
|
-
Task(subagent_type="implementation-executor", model="sonnet", ...)
|
|
486
|
-
Task(subagent_type="planner", model="opus", ...)
|
|
487
|
-
```
|
|
488
|
-
|
|
489
|
-
### 티어별 에이전트
|
|
490
|
-
|
|
491
|
-
| 도메인 | 에이전트 | 권장 모델 | 용도 |
|
|
492
|
-
|--------|---------|----------|------|
|
|
493
|
-
| 계획/분석 | planner | opus | 아키텍처 설계, 검증 |
|
|
494
|
-
| 요구사항 분석 | analyst | sonnet | 계획 전 요구사항 분석, 가정 검증, 엣지 케이스 |
|
|
495
|
-
| 아키텍처 | architect | sonnet/opus | 아키텍처 분석, 디버깅 (READ-ONLY) |
|
|
496
|
-
| 실행 | implementation-executor | sonnet | 기능 구현, 버그 수정 |
|
|
497
|
-
| 탐색 | explore | haiku | 코드베이스 탐색 |
|
|
498
|
-
| 프론트엔드 | designer | sonnet/opus | UI/UX 구현 |
|
|
499
|
-
| 문서 작성 | document-writer | haiku/sonnet | 기술 문서, 상태 문서 관리 |
|
|
500
|
-
| 배포 검증 | deployment-validator | sonnet | typecheck/lint/build |
|
|
501
|
-
| 코드 리뷰 | code-reviewer | opus | 품질 검토 |
|
|
502
|
-
| 린트 수정 | lint-fixer | sonnet | tsc/eslint 오류 수정 |
|
|
503
|
-
| 리팩토링 | refactor-advisor | sonnet | 구조 개선 조언 |
|
|
504
|
-
| Git 작업 | git-operator | haiku | Git 커밋/푸시 |
|
|
505
|
-
| 의존성 관리 | dependency-manager | sonnet | 의존성 분석, 업데이트, 보안 스캔 |
|
|
506
|
-
| 번역 | ko-to-en-translator | haiku | 한글→영어 번역 |
|
|
507
|
-
|
|
508
|
-
### 백그라운드 실행
|
|
509
|
-
|
|
510
|
-
| 작업 유형 | 실행 모드 |
|
|
511
|
-
|----------|----------|
|
|
512
|
-
| 패키지 설치 (`npm install`, `pip install`) | Background |
|
|
513
|
-
| 빌드 (`npm run build`, `tsc`, `make`) | Background |
|
|
514
|
-
| 테스트 스위트 (`npm test`, `pytest`) | Background |
|
|
515
|
-
| Docker 작업 (`docker build`, `docker pull`) | Background |
|
|
516
|
-
| 파일 읽기/쓰기 | Foreground |
|
|
517
|
-
| 간단한 명령어 (`git status`, `ls`) | Foreground |
|
|
518
|
-
|
|
519
|
-
### Agent Delegation (적극 활용)
|
|
520
|
-
|
|
521
|
-
**에이전트에게 위임하는 조건:**
|
|
522
|
-
|
|
523
|
-
| 조건 | 예시 | 위임할 에이전트 |
|
|
524
|
-
|------|------|----------------|
|
|
525
|
-
| 요구사항 불명확 | 가정 검증, 엣지 케이스 분석 | analyst |
|
|
526
|
-
| 아키텍처 조언 필요 | 설계 검토, 패턴 분석 | architect |
|
|
527
|
-
| 독립적인 작업 | 코드 분석 + 리뷰 동시 | implementation-executor + code-reviewer |
|
|
528
|
-
| 새 컨텍스트 필요 | 대규모 코드베이스 탐색 | explore |
|
|
529
|
-
| 전문 지식 필요 | 린트/타입 오류 수정 | lint-fixer |
|
|
530
|
-
| 장기 실행 작업 | 배포 전 전체 검증 | deployment-validator |
|
|
531
|
-
| 병렬 처리 가능 | 여러 파일 동시 수정 | implementation-executor (여러 개) |
|
|
532
|
-
| Git 작업 필요 | 논리적 단위 커밋/푸시 | git-operator |
|
|
533
|
-
| 의존성 문제 | 패키지 업데이트, 보안 스캔 | dependency-manager |
|
|
534
|
-
| 번역 필요 | 한글→영어 문서/코드 번역 | ko-to-en-translator |
|
|
535
|
-
|
|
536
|
-
**에이전트 위임 원칙:**
|
|
537
|
-
|
|
538
|
-
```text
|
|
539
|
-
✅ 독립적인 작업 → 즉시 위임 (병렬 실행)
|
|
540
|
-
✅ 컨텍스트 분리 필요 → 위임
|
|
541
|
-
✅ 전문성 필요 → 해당 도메인 에이전트
|
|
542
|
-
✅ 10분 이상 예상 → 백그라운드 + 에이전트
|
|
543
|
-
|
|
544
|
-
❌ 간단한 파일 읽기 → 직접 실행
|
|
545
|
-
❌ 순차 의존성 → 직접 실행 후 다음 에이전트
|
|
546
|
-
```
|
|
547
|
-
|
|
548
|
-
### Phase별 에이전트 활용
|
|
549
|
-
|
|
550
|
-
| Phase | 작업 | 에이전트 | 모델 | 병렬 실행 |
|
|
551
|
-
|-------|------|---------|------|----------|
|
|
552
|
-
| **1** | 요구사항 분석 | analyst | sonnet | ✅ (독립 분석) |
|
|
553
|
-
| **1** | 아키텍처 분석 | architect | sonnet/opus | ✅ (READ-ONLY) |
|
|
554
|
-
| **1** | 상태 문서 생성 | document-writer | haiku | ✅ (여러 문서) |
|
|
555
|
-
| **1** | 코드베이스 탐색 | explore | haiku | ✅ (여러 영역) |
|
|
556
|
-
| **1** | 기능 구현 | implementation-executor | sonnet | ✅ (독립 기능) |
|
|
557
|
-
| **1** | UI 구현 | designer | sonnet/opus | ✅ (여러 컴포넌트) |
|
|
558
|
-
| **1** | 리팩토링 조언 | refactor-advisor | sonnet | ✅ (READ-ONLY) |
|
|
559
|
-
| **1-4** | 문서 업데이트 | document-writer | haiku | ✅ (Phase 전환 시) |
|
|
560
|
-
| **1-4** | 문서 번역 | ko-to-en-translator | haiku | ✅ (독립 작업) |
|
|
561
|
-
| **2** | 배포 검증 | deployment-validator | sonnet | ❌ (순차) |
|
|
562
|
-
| **2** | 린트 수정 | lint-fixer | sonnet | ❌ (순차) |
|
|
563
|
-
| **2** | 의존성 업데이트 | dependency-manager | sonnet | ❌ (순차) |
|
|
564
|
-
| **3** | 아키텍처 검증 | planner | opus | ❌ (필수) |
|
|
565
|
-
| **3** | 코드 리뷰 | code-reviewer | opus | ✅ (파일별) |
|
|
566
|
-
| **4** | Git 커밋/푸시 | git-operator | haiku | ❌ (순차) |
|
|
567
|
-
|
|
568
|
-
### 병렬 에이전트 실행 패턴
|
|
569
|
-
|
|
570
|
-
**패턴 1: 독립 작업 동시 처리**
|
|
571
|
-
|
|
572
|
-
```typescript
|
|
573
|
-
// ❌ 순차 실행 (느림)
|
|
574
|
-
Task(subagent_type="implementation-executor", model="sonnet", prompt="기능 A 구현")
|
|
575
|
-
// 대기...
|
|
576
|
-
Task(subagent_type="implementation-executor", model="sonnet", prompt="기능 B 구현")
|
|
577
|
-
|
|
578
|
-
// ✅ 병렬 실행 (빠름)
|
|
579
|
-
// 단일 메시지에서 두 Task 호출
|
|
580
|
-
Task(subagent_type="implementation-executor", model="sonnet", prompt="기능 A 구현")
|
|
581
|
-
Task(subagent_type="implementation-executor", model="sonnet", prompt="기능 B 구현")
|
|
582
|
-
```
|
|
583
|
-
|
|
584
|
-
**패턴 2: 도메인별 전문가 활용**
|
|
585
|
-
|
|
586
|
-
```typescript
|
|
587
|
-
// 동시에 실행
|
|
588
|
-
Task(subagent_type="implementation-executor", model="sonnet",
|
|
589
|
-
prompt="API 엔드포인트 구현")
|
|
590
|
-
Task(subagent_type="designer", model="sonnet",
|
|
591
|
-
prompt="UI 컴포넌트 구현")
|
|
592
|
-
Task(subagent_type="code-reviewer", model="opus",
|
|
593
|
-
prompt="코드 리뷰 및 개선사항 도출")
|
|
594
|
-
```
|
|
595
|
-
|
|
596
|
-
**패턴 3: 탐색 + 구현 분리**
|
|
597
|
-
|
|
598
|
-
```typescript
|
|
599
|
-
// Phase 1 시작 시
|
|
600
|
-
Task(subagent_type="explore", model="haiku",
|
|
601
|
-
prompt="프로젝트 구조 및 기존 패턴 분석")
|
|
602
|
-
|
|
603
|
-
// 탐색 결과 기반으로 구현
|
|
604
|
-
Task(subagent_type="implementation-executor", model="sonnet",
|
|
605
|
-
prompt="분석된 패턴에 따라 [기능] 구현")
|
|
606
|
-
```
|
|
607
|
-
|
|
608
|
-
**패턴 4: 문서 병렬 작성 (Ralph 특화)**
|
|
609
|
-
|
|
610
|
-
```typescript
|
|
611
|
-
// Phase 시작/전환 시 여러 문서 동시 업데이트
|
|
612
|
-
Task(subagent_type="document-writer", model="haiku",
|
|
613
|
-
prompt="TASKS.md 업데이트: 요구사항 1, 2 완료 체크")
|
|
614
|
-
Task(subagent_type="document-writer", model="haiku",
|
|
615
|
-
prompt="PROCESS.md 업데이트: Phase 1 → Phase 2 전환 기록")
|
|
616
|
-
Task(subagent_type="document-writer", model="haiku",
|
|
617
|
-
prompt="VERIFICATION.md 업데이트: /pre-deploy 결과 기록")
|
|
618
|
-
```
|
|
619
|
-
|
|
620
|
-
### 에이전트 호출 체크리스트
|
|
621
|
-
|
|
622
|
-
작업 시작 전 확인:
|
|
623
|
-
|
|
624
|
-
- [ ] 이 작업은 독립적인가? → 병렬 에이전트 고려
|
|
625
|
-
- [ ] 새 컨텍스트가 필요한가? → 에이전트 위임
|
|
626
|
-
- [ ] 전문 지식이 필요한가? → 도메인 에이전트 선택
|
|
627
|
-
- [ ] 10분 이상 소요될까? → 백그라운드 + 에이전트
|
|
628
|
-
- [ ] 여러 파일/영역 동시 작업? → 여러 executor 병렬 실행
|
|
629
|
-
|
|
630
|
-
**적극적으로 에이전트 활용. 혼자 하지 말 것.**
|
|
631
|
-
|
|
632
|
-
### 병렬 에이전트 실전 시나리오
|
|
633
|
-
|
|
634
|
-
**시나리오 1: 풀스택 기능 구현**
|
|
635
|
-
|
|
636
|
-
```typescript
|
|
637
|
-
// 사용자 관리 기능 구현 (API + UI + 문서)
|
|
638
|
-
Task(subagent_type="implementation-executor", model="sonnet",
|
|
639
|
-
prompt="User API CRUD 엔드포인트 구현 (src/functions/user.ts)")
|
|
640
|
-
Task(subagent_type="designer", model="sonnet",
|
|
641
|
-
prompt="User Profile UI 컴포넌트 구현 (src/routes/profile/)")
|
|
642
|
-
Task(subagent_type="document-writer", model="haiku",
|
|
643
|
-
prompt="User API 문서 작성 (docs/api/user.md)")
|
|
644
|
-
```
|
|
645
|
-
|
|
646
|
-
**시나리오 2: 여러 독립 기능 동시 구현**
|
|
647
|
-
|
|
648
|
-
```typescript
|
|
649
|
-
// 3개의 독립적인 API 엔드포인트
|
|
650
|
-
Task(subagent_type="implementation-executor", model="sonnet",
|
|
651
|
-
prompt="/api/posts CRUD 구현")
|
|
652
|
-
Task(subagent_type="implementation-executor", model="sonnet",
|
|
653
|
-
prompt="/api/comments CRUD 구현")
|
|
654
|
-
Task(subagent_type="implementation-executor", model="sonnet",
|
|
655
|
-
prompt="/api/likes 구현")
|
|
656
|
-
```
|
|
657
|
-
|
|
658
|
-
**시나리오 3: 코드베이스 다중 영역 탐색**
|
|
659
|
-
|
|
660
|
-
```typescript
|
|
661
|
-
// 프로젝트 초기 분석 시
|
|
662
|
-
Task(subagent_type="explore", model="haiku",
|
|
663
|
-
prompt="인증 구조 분석 (middleware, auth)")
|
|
664
|
-
Task(subagent_type="explore", model="haiku",
|
|
665
|
-
prompt="데이터베이스 스키마 분석 (prisma)")
|
|
666
|
-
Task(subagent_type="explore", model="haiku",
|
|
667
|
-
prompt="라우팅 구조 분석 (routes)")
|
|
668
|
-
```
|
|
669
|
-
|
|
670
|
-
**시나리오 4: 다중 검증**
|
|
671
|
-
|
|
672
|
-
```typescript
|
|
673
|
-
// 코드 완성 후 여러 관점에서 동시 검토
|
|
674
|
-
Task(subagent_type="code-reviewer", model="opus",
|
|
675
|
-
prompt="보안 검토: SQL Injection, XSS, CSRF 취약점")
|
|
676
|
-
Task(subagent_type="code-reviewer", model="opus",
|
|
677
|
-
prompt="성능 검토: N+1 쿼리, 불필요한 리렌더")
|
|
678
|
-
Task(subagent_type="code-reviewer", model="opus",
|
|
679
|
-
prompt="접근성 검토: ARIA, 키보드 네비게이션")
|
|
680
|
-
```
|
|
681
|
-
|
|
682
|
-
**시나리오 5: 문서 병렬 업데이트 (Ralph 특화)**
|
|
683
|
-
|
|
684
|
-
```typescript
|
|
685
|
-
// Phase 전환 시 여러 문서 동시 업데이트
|
|
686
|
-
Task(subagent_type="document-writer", model="haiku",
|
|
687
|
-
prompt="TASKS.md: 요구사항 1-3 완료 체크")
|
|
688
|
-
Task(subagent_type="document-writer", model="haiku",
|
|
689
|
-
prompt="PROCESS.md: Phase 1 완료 → Phase 2 시작 기록")
|
|
690
|
-
Task(subagent_type="document-writer", model="haiku",
|
|
691
|
-
prompt="VERIFICATION.md: 준비 상태로 초기화")
|
|
692
|
-
```
|
|
693
|
-
|
|
694
|
-
**시나리오 6: 계획 수립 전 분석 (analyst + architect)**
|
|
695
|
-
|
|
696
|
-
```typescript
|
|
697
|
-
// 복잡한 기능 구현 전 요구사항 및 아키텍처 분석
|
|
698
|
-
Task(subagent_type="analyst", model="sonnet",
|
|
699
|
-
prompt="사용자 인증 기능 요구사항 분석: 가정 검증, 엣지 케이스 도출")
|
|
700
|
-
Task(subagent_type="architect", model="opus",
|
|
701
|
-
prompt="현재 인증 아키텍처 분석 및 개선 방향 제시")
|
|
702
|
-
Task(subagent_type="explore", model="haiku",
|
|
703
|
-
prompt="기존 인증 구현 코드 탐색 (middleware, session)")
|
|
704
|
-
```
|
|
393
|
+
@../../instructions/agent-patterns/delegation-patterns.md
|
|
394
|
+
@../../instructions/agent-patterns/parallel-execution.md
|
|
395
|
+
@../../instructions/agent-patterns/model-routing.md
|
|
705
396
|
|
|
706
|
-
|
|
397
|
+
### Ralph 고유 실행 규칙
|
|
707
398
|
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
prompt="의존성 분석 및 보안 취약점 스캔 후 업데이트 제안")
|
|
712
|
-
Task(subagent_type="refactor-advisor", model="sonnet",
|
|
713
|
-
prompt="코드베이스 리팩토링 우선순위 분석")
|
|
714
|
-
Task(subagent_type="ko-to-en-translator", model="haiku",
|
|
715
|
-
prompt="한글 주석 및 문서를 영어로 번역 (README.md, CLAUDE.md)")
|
|
716
|
-
```
|
|
399
|
+
- **Phase별 에이전트**: Phase 1(구현) → implementation-executor/designer 병렬, Phase 2(검증) → deployment-validator, Phase 3(Planner 검증) → planner(opus), Phase 4(완료) → document-writer
|
|
400
|
+
- **문서 병렬 작성**: TASKS.md, PROCESS.md, VERIFICATION.md, ITERATION.md를 document-writer 에이전트로 동시 업데이트
|
|
401
|
+
- **백그라운드 실행**: 빌드/테스트는 run_in_background=true, 파일 읽기/쓰기는 foreground
|
|
717
402
|
|
|
718
403
|
</ultrawork_mode>
|
|
719
404
|
|
|
@@ -1080,182 +765,15 @@ Task(
|
|
|
1080
765
|
|
|
1081
766
|
## 멀티 에이전트 실전 예시
|
|
1082
767
|
|
|
1083
|
-
|
|
768
|
+
> 상세 패턴은 @../../instructions/agent-patterns/delegation-patterns.md 참조
|
|
1084
769
|
|
|
1085
|
-
|
|
770
|
+
### Ralph 특화 패턴
|
|
1086
771
|
|
|
1087
|
-
|
|
1088
|
-
// 백엔드 + 프론트엔드 + 문서를 동시에 구현
|
|
1089
|
-
Task(subagent_type="implementation-executor", model="sonnet",
|
|
1090
|
-
prompt=`User 인증 API 구현:
|
|
1091
|
-
- src/functions/auth.ts: login, logout, signup Server Functions
|
|
1092
|
-
- inputValidator로 Zod 스키마 검증
|
|
1093
|
-
- middleware로 세션 체크`)
|
|
1094
|
-
|
|
1095
|
-
Task(subagent_type="designer", model="sonnet",
|
|
1096
|
-
prompt=`로그인/회원가입 UI 구현:
|
|
1097
|
-
- src/routes/login/-components/LoginForm.tsx
|
|
1098
|
-
- src/routes/signup/-components/SignupForm.tsx
|
|
1099
|
-
- TanStack Query로 Server Function 호출`)
|
|
1100
|
-
|
|
1101
|
-
Task(subagent_type="document-writer", model="haiku",
|
|
1102
|
-
prompt=`인증 API 문서 작성:
|
|
1103
|
-
- docs/api/auth.md
|
|
1104
|
-
- 엔드포인트, 파라미터, 응답 형식 기록`)
|
|
1105
|
-
```
|
|
772
|
+
**Phase 1 병렬 구현**: 백엔드(implementation-executor) + 프론트엔드(designer) + 문서(document-writer) 동시 실행
|
|
1106
773
|
|
|
1107
|
-
|
|
774
|
+
**Phase 2 다중 검증**: /pre-deploy 통과 후 code-reviewer 에이전트로 보안/성능/접근성 병렬 검토
|
|
1108
775
|
|
|
1109
|
-
|
|
1110
|
-
// Posts, Comments, Likes 기능을 각각 다른 executor에게
|
|
1111
|
-
Task(subagent_type="implementation-executor", model="sonnet",
|
|
1112
|
-
prompt="Posts CRUD Server Functions 구현 (src/functions/posts.ts)")
|
|
1113
|
-
|
|
1114
|
-
Task(subagent_type="implementation-executor", model="sonnet",
|
|
1115
|
-
prompt="Comments CRUD Server Functions 구현 (src/functions/comments.ts)")
|
|
1116
|
-
|
|
1117
|
-
Task(subagent_type="implementation-executor", model="sonnet",
|
|
1118
|
-
prompt="Likes 토글 Server Function 구현 (src/functions/likes.ts)")
|
|
1119
|
-
|
|
1120
|
-
Task(subagent_type="designer", model="sonnet",
|
|
1121
|
-
prompt="Post 목록/상세 UI 구현 (src/routes/posts/)")
|
|
1122
|
-
```
|
|
1123
|
-
|
|
1124
|
-
**예시 3: 코드베이스 탐색 + 구현 병렬**
|
|
1125
|
-
|
|
1126
|
-
```typescript
|
|
1127
|
-
// 기존 구조 파악과 동시에 문서 작업 시작
|
|
1128
|
-
Task(subagent_type="explore", model="haiku",
|
|
1129
|
-
prompt="기존 인증 구조 분석: middleware, session, auth 관련 파일")
|
|
1130
|
-
|
|
1131
|
-
Task(subagent_type="explore", model="haiku",
|
|
1132
|
-
prompt="Prisma 스키마 분석: User, Session 모델 확인")
|
|
1133
|
-
|
|
1134
|
-
Task(subagent_type="document-writer", model="haiku",
|
|
1135
|
-
prompt="TASKS.md 초기화: 요구사항 체크리스트 작성")
|
|
1136
|
-
|
|
1137
|
-
Task(subagent_type="document-writer", model="haiku",
|
|
1138
|
-
prompt="PROCESS.md 초기화: Phase 1 시작 기록")
|
|
1139
|
-
```
|
|
1140
|
-
|
|
1141
|
-
**예시 4: 계획 수립 전 분석 (analyst + architect + explore)**
|
|
1142
|
-
|
|
1143
|
-
```typescript
|
|
1144
|
-
// 복잡한 기능 구현 전 요구사항과 아키텍처를 먼저 분석
|
|
1145
|
-
Task(subagent_type="analyst", model="sonnet",
|
|
1146
|
-
prompt=`결제 시스템 요구사항 분석:
|
|
1147
|
-
- 놓친 엣지 케이스 식별
|
|
1148
|
-
- 가정 검증 (환불, 부분 결제, 구독 등)
|
|
1149
|
-
- 범위 확장 위험 방지`)
|
|
1150
|
-
|
|
1151
|
-
Task(subagent_type="architect", model="opus",
|
|
1152
|
-
prompt=`결제 아키텍처 분석 및 제안:
|
|
1153
|
-
- 현재 시스템 한계점
|
|
1154
|
-
- 트랜잭션 처리 패턴
|
|
1155
|
-
- 확장성 고려사항`)
|
|
1156
|
-
|
|
1157
|
-
Task(subagent_type="explore", model="haiku",
|
|
1158
|
-
prompt="기존 결제 관련 코드 탐색 및 의존성 파악")
|
|
1159
|
-
```
|
|
1160
|
-
|
|
1161
|
-
### Phase 2: 병렬 검증
|
|
1162
|
-
|
|
1163
|
-
**예시 1: 다중 관점 코드 리뷰**
|
|
1164
|
-
|
|
1165
|
-
```typescript
|
|
1166
|
-
// /pre-deploy 통과 후 여러 측면에서 동시 검토
|
|
1167
|
-
Task(subagent_type="code-reviewer", model="opus",
|
|
1168
|
-
prompt=`보안 검토:
|
|
1169
|
-
- SQL Injection 취약점
|
|
1170
|
-
- XSS 취약점
|
|
1171
|
-
- CSRF 보호 확인
|
|
1172
|
-
- 인증/인가 로직 검증
|
|
1173
|
-
- 민감 정보 노출 체크`)
|
|
1174
|
-
|
|
1175
|
-
Task(subagent_type="code-reviewer", model="opus",
|
|
1176
|
-
prompt=`성능 검토:
|
|
1177
|
-
- N+1 쿼리 문제
|
|
1178
|
-
- 불필요한 리렌더
|
|
1179
|
-
- 메모이제이션 누락
|
|
1180
|
-
- 번들 크기 최적화`)
|
|
1181
|
-
|
|
1182
|
-
Task(subagent_type="code-reviewer", model="opus",
|
|
1183
|
-
prompt=`접근성 검토:
|
|
1184
|
-
- ARIA 속성 적절성
|
|
1185
|
-
- 키보드 네비게이션
|
|
1186
|
-
- 색상 대비 (WCAG AA)
|
|
1187
|
-
- 스크린 리더 호환성`)
|
|
1188
|
-
```
|
|
1189
|
-
|
|
1190
|
-
**예시 2: 검증 + 문서화 병렬**
|
|
1191
|
-
|
|
1192
|
-
```typescript
|
|
1193
|
-
// 코드 리뷰와 동시에 검증 결과 문서화
|
|
1194
|
-
Task(subagent_type="code-reviewer", model="opus",
|
|
1195
|
-
prompt="전체 코드 품질 검토")
|
|
1196
|
-
|
|
1197
|
-
Task(subagent_type="document-writer", model="haiku",
|
|
1198
|
-
prompt="VERIFICATION.md 업데이트: /pre-deploy 결과 기록")
|
|
1199
|
-
|
|
1200
|
-
Task(subagent_type="document-writer", model="haiku",
|
|
1201
|
-
prompt="PROCESS.md 업데이트: Phase 2 진행 상황 기록")
|
|
1202
|
-
```
|
|
1203
|
-
|
|
1204
|
-
**예시 3: 특화 검증**
|
|
1205
|
-
|
|
1206
|
-
```typescript
|
|
1207
|
-
// 특정 영역별 전문 검토
|
|
1208
|
-
Task(subagent_type="code-reviewer", model="opus",
|
|
1209
|
-
prompt="Prisma 스키마 및 쿼리 최적화 검토")
|
|
1210
|
-
|
|
1211
|
-
Task(subagent_type="code-reviewer", model="opus",
|
|
1212
|
-
prompt="TanStack Query 사용 패턴 검토 (캐싱, invalidation)")
|
|
1213
|
-
|
|
1214
|
-
Task(subagent_type="code-reviewer", model="opus",
|
|
1215
|
-
prompt="TypeScript 타입 안정성 검토 (any 사용, 타입 가드)")
|
|
1216
|
-
```
|
|
1217
|
-
|
|
1218
|
-
### 멀티 에이전트 전략
|
|
1219
|
-
|
|
1220
|
-
**언제 병렬 실행하는가:**
|
|
1221
|
-
|
|
1222
|
-
| 조건 | 병렬 실행 | 순차 실행 |
|
|
1223
|
-
|------|----------|----------|
|
|
1224
|
-
| 작업 독립성 | ✅ 독립적 | ❌ 의존성 있음 |
|
|
1225
|
-
| 컨텍스트 | ✅ 분리 가능 | ❌ 공유 필요 |
|
|
1226
|
-
| 결과 활용 | ✅ 개별 활용 | ❌ 다음 작업 입력 |
|
|
1227
|
-
|
|
1228
|
-
**병렬 실행 원칙:**
|
|
1229
|
-
|
|
1230
|
-
```text
|
|
1231
|
-
✅ DO:
|
|
1232
|
-
- API + UI + 문서 동시 구현
|
|
1233
|
-
- 여러 파일/모듈 독립 작업
|
|
1234
|
-
- 다양한 관점의 코드 리뷰
|
|
1235
|
-
- 여러 문서 동시 업데이트
|
|
1236
|
-
- 코드베이스 다중 영역 탐색
|
|
1237
|
-
|
|
1238
|
-
❌ DON'T:
|
|
1239
|
-
- 순차 의존성 있는 작업
|
|
1240
|
-
- 같은 파일 동시 수정
|
|
1241
|
-
- 결과가 다음 작업 입력인 경우
|
|
1242
|
-
```
|
|
1243
|
-
|
|
1244
|
-
**모델 선택 전략:**
|
|
1245
|
-
|
|
1246
|
-
```typescript
|
|
1247
|
-
// 간단한 작업 → haiku (빠르고 저렴)
|
|
1248
|
-
Task(subagent_type="explore", model="haiku", ...)
|
|
1249
|
-
Task(subagent_type="document-writer", model="haiku", ...)
|
|
1250
|
-
|
|
1251
|
-
// 일반 구현 → sonnet (균형)
|
|
1252
|
-
Task(subagent_type="implementation-executor", model="sonnet", ...)
|
|
1253
|
-
Task(subagent_type="designer", model="sonnet", ...)
|
|
1254
|
-
|
|
1255
|
-
// 복잡한 분석/설계 → opus (고품질)
|
|
1256
|
-
Task(subagent_type="planner", model="opus", ...)
|
|
1257
|
-
Task(subagent_type="code-reviewer", model="opus", ...)
|
|
1258
|
-
```
|
|
776
|
+
**문서 병렬 업데이트**: Phase 전환 시 TASKS.md + PROCESS.md + VERIFICATION.md 동시 업데이트
|
|
1259
777
|
|
|
1260
778
|
</multi_agent_examples>
|
|
1261
779
|
|