@kood/claude-code 0.6.7 → 0.7.0
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/package.json +1 -1
- package/templates/.claude/agents/analyst.md +5 -0
- package/templates/.claude/agents/architect.md +5 -0
- package/templates/.claude/agents/build-fixer.md +1 -0
- package/templates/.claude/agents/code-reviewer.md +1 -0
- package/templates/.claude/agents/critic.md +4 -0
- package/templates/.claude/agents/deep-executor.md +1 -0
- package/templates/.claude/agents/dependency-manager.md +2 -0
- package/templates/.claude/agents/deployment-validator.md +2 -0
- package/templates/.claude/agents/designer.md +2 -0
- package/templates/.claude/agents/document-writer.md +3 -0
- package/templates/.claude/agents/explore.md +1 -0
- package/templates/.claude/agents/git-operator.md +2 -0
- package/templates/.claude/agents/implementation-executor.md +2 -0
- package/templates/.claude/agents/ko-to-en-translator.md +3 -0
- package/templates/.claude/agents/lint-fixer.md +2 -0
- package/templates/.claude/agents/planner.md +3 -0
- package/templates/.claude/agents/pm.md +349 -0
- package/templates/.claude/agents/qa-tester.md +1 -0
- package/templates/.claude/agents/refactor-advisor.md +4 -0
- package/templates/.claude/agents/researcher.md +1 -0
- package/templates/.claude/agents/scientist.md +1 -0
- package/templates/.claude/agents/security-reviewer.md +1 -0
- package/templates/.claude/agents/tdd-guide.md +1 -0
- package/templates/.claude/agents/vision.md +1 -0
- package/templates/.claude/instructions/agent-patterns/agent-teams-usage.md +376 -0
- package/templates/.claude/scripts/agent-teams/check-availability.sh +238 -0
- package/templates/.claude/scripts/agent-teams/setup-tmux.sh +125 -0
- package/templates/.claude/skills/agent-teams-setup/SKILL.md +460 -0
- package/templates/.claude/skills/brainstorm/SKILL.md +1 -0
- package/templates/.claude/skills/bug-fix/SKILL.md +1 -0
- package/templates/.claude/skills/crawler/SKILL.md +2 -0
- package/templates/.claude/skills/docs-creator/SKILL.md +1 -0
- package/templates/.claude/skills/docs-fetch/SKILL.md +1 -0
- package/templates/.claude/skills/docs-refactor/SKILL.md +1 -0
- package/templates/.claude/skills/elon-musk/SKILL.md +1 -0
- package/templates/.claude/skills/execute/SKILL.md +1 -0
- package/templates/.claude/skills/feedback/SKILL.md +1 -0
- package/templates/.claude/skills/figma-to-code/SKILL.md +1 -0
- package/templates/.claude/skills/genius-thinking/SKILL.md +1 -0
- package/templates/.claude/skills/global-uiux-design/SKILL.md +1 -0
- package/templates/.claude/skills/korea-uiux-design/SKILL.md +1 -0
- package/templates/.claude/skills/nextjs-react-best-practices/SKILL.md +1 -0
- package/templates/.claude/skills/plan/SKILL.md +1 -0
- package/templates/.claude/skills/prd/SKILL.md +1 -0
- package/templates/.claude/skills/project-optimizer/SKILL.md +1 -0
- package/templates/.claude/skills/ralph/SKILL.md +1 -0
- package/templates/.claude/skills/refactor/SKILL.md +1 -0
- package/templates/.claude/skills/research/SKILL.md +1 -0
- package/templates/.claude/skills/sql-optimizer/SKILL.md +1 -0
- package/templates/.claude/skills/startup-validator/SKILL.md +1 -0
- package/templates/.claude/skills/tanstack-start-react-best-practices/SKILL.md +1 -0
- package/templates/.claude/skills/tauri-react-best-practices/SKILL.md +1 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Agent Teams용 tmux 환경 세팅
|
|
3
|
+
# Usage: .claude/scripts/agent-teams/setup-tmux.sh
|
|
4
|
+
|
|
5
|
+
set -e
|
|
6
|
+
|
|
7
|
+
# Colors
|
|
8
|
+
RED='\033[0;31m'
|
|
9
|
+
GREEN='\033[0;32m'
|
|
10
|
+
YELLOW='\033[0;33m'
|
|
11
|
+
BLUE='\033[0;34m'
|
|
12
|
+
NC='\033[0m'
|
|
13
|
+
|
|
14
|
+
echo -e "${BLUE}=== Agent Teams tmux 환경 세팅 ===${NC}"
|
|
15
|
+
echo ""
|
|
16
|
+
|
|
17
|
+
# tmux 설치 확인
|
|
18
|
+
if ! command -v tmux &> /dev/null; then
|
|
19
|
+
echo -e "${RED}✗ tmux가 설치되어 있지 않습니다.${NC}"
|
|
20
|
+
echo ""
|
|
21
|
+
echo "설치 방법:"
|
|
22
|
+
echo " macOS: brew install tmux"
|
|
23
|
+
echo " Ubuntu/Debian: sudo apt install tmux"
|
|
24
|
+
echo " Fedora: sudo dnf install tmux"
|
|
25
|
+
exit 1
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
TMUX_VERSION=$(tmux -V 2>/dev/null | head -1)
|
|
29
|
+
echo -e "${GREEN}✓${NC} tmux 설치 확인: $TMUX_VERSION"
|
|
30
|
+
|
|
31
|
+
# iTerm2 확인 및 it2 CLI 설치 안내
|
|
32
|
+
if [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then
|
|
33
|
+
echo -e "${GREEN}✓${NC} iTerm2 감지됨"
|
|
34
|
+
|
|
35
|
+
if ! command -v it2 &> /dev/null; then
|
|
36
|
+
echo -e "${YELLOW}!${NC} it2 CLI 미설치 (split-pane 모드에 필요)"
|
|
37
|
+
echo ""
|
|
38
|
+
echo "설치하시겠습니까? (y/n)"
|
|
39
|
+
read -r answer
|
|
40
|
+
if [[ "$answer" == "y" ]]; then
|
|
41
|
+
if command -v brew &> /dev/null; then
|
|
42
|
+
brew install mkusaka/it2/it2
|
|
43
|
+
echo -e "${GREEN}✓${NC} it2 CLI 설치 완료"
|
|
44
|
+
else
|
|
45
|
+
echo -e "${RED}✗${NC} Homebrew가 필요합니다."
|
|
46
|
+
echo " 설치: /bin/bash -c \"\$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\""
|
|
47
|
+
fi
|
|
48
|
+
fi
|
|
49
|
+
else
|
|
50
|
+
echo -e "${GREEN}✓${NC} it2 CLI 설치됨"
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
echo ""
|
|
54
|
+
echo -e "${BLUE}iTerm2 Python API 활성화 필요:${NC}"
|
|
55
|
+
echo " iTerm2 → Settings → General → Magic → Enable Python API"
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
# settings.json에 teammateMode 설정
|
|
59
|
+
echo ""
|
|
60
|
+
echo -e "${BLUE}teammateMode 설정${NC}"
|
|
61
|
+
echo ""
|
|
62
|
+
echo "옵션:"
|
|
63
|
+
echo " 1. auto (기본값) - tmux 세션 내부면 split-pane, 아니면 in-process"
|
|
64
|
+
echo " 2. tmux - 항상 split-pane 모드 (tmux 또는 iTerm2 필요)"
|
|
65
|
+
echo " 3. in-process - 항상 in-process 모드"
|
|
66
|
+
echo ""
|
|
67
|
+
echo "선택 (1/2/3, Enter=auto):"
|
|
68
|
+
read -r mode_choice
|
|
69
|
+
|
|
70
|
+
case "$mode_choice" in
|
|
71
|
+
2)
|
|
72
|
+
TEAMMATE_MODE="tmux"
|
|
73
|
+
;;
|
|
74
|
+
3)
|
|
75
|
+
TEAMMATE_MODE="in-process"
|
|
76
|
+
;;
|
|
77
|
+
*)
|
|
78
|
+
TEAMMATE_MODE="auto"
|
|
79
|
+
;;
|
|
80
|
+
esac
|
|
81
|
+
|
|
82
|
+
# settings.json 업데이트
|
|
83
|
+
SETTINGS_FILE="$HOME/.claude/settings.json"
|
|
84
|
+
|
|
85
|
+
if [[ -f "$SETTINGS_FILE" ]]; then
|
|
86
|
+
# 기존 파일이 있으면 teammateMode 추가/업데이트
|
|
87
|
+
if grep -q '"teammateMode"' "$SETTINGS_FILE"; then
|
|
88
|
+
# 이미 있으면 업데이트
|
|
89
|
+
if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
90
|
+
sed -i '' "s/\"teammateMode\"[[:space:]]*:[[:space:]]*\"[^\"]*\"/\"teammateMode\": \"$TEAMMATE_MODE\"/" "$SETTINGS_FILE"
|
|
91
|
+
else
|
|
92
|
+
sed -i "s/\"teammateMode\"[[:space:]]*:[[:space:]]*\"[^\"]*\"/\"teammateMode\": \"$TEAMMATE_MODE\"/" "$SETTINGS_FILE"
|
|
93
|
+
fi
|
|
94
|
+
else
|
|
95
|
+
# 없으면 추가 (첫 번째 { 뒤에 추가)
|
|
96
|
+
if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
97
|
+
sed -i '' "s/{/{\"teammateMode\": \"$TEAMMATE_MODE\",/" "$SETTINGS_FILE"
|
|
98
|
+
else
|
|
99
|
+
sed -i "s/{/{\"teammateMode\": \"$TEAMMATE_MODE\",/" "$SETTINGS_FILE"
|
|
100
|
+
fi
|
|
101
|
+
fi
|
|
102
|
+
echo -e "${GREEN}✓${NC} ~/.claude/settings.json 업데이트: teammateMode = $TEAMMATE_MODE"
|
|
103
|
+
else
|
|
104
|
+
# 파일이 없으면 생성
|
|
105
|
+
mkdir -p "$HOME/.claude"
|
|
106
|
+
echo "{\"teammateMode\": \"$TEAMMATE_MODE\"}" > "$SETTINGS_FILE"
|
|
107
|
+
echo -e "${GREEN}✓${NC} ~/.claude/settings.json 생성: teammateMode = $TEAMMATE_MODE"
|
|
108
|
+
fi
|
|
109
|
+
|
|
110
|
+
# tmux 세션 시작 안내
|
|
111
|
+
echo ""
|
|
112
|
+
echo -e "${BLUE}=== 세팅 완료 ===${NC}"
|
|
113
|
+
echo ""
|
|
114
|
+
echo "Agent Teams split-pane 모드 사용법:"
|
|
115
|
+
echo ""
|
|
116
|
+
echo " 1. tmux 세션 시작:"
|
|
117
|
+
echo " tmux new -s claude"
|
|
118
|
+
echo ""
|
|
119
|
+
echo " 2. Claude Code 실행:"
|
|
120
|
+
echo " claude"
|
|
121
|
+
echo ""
|
|
122
|
+
echo " 3. 또는 iTerm2에서:"
|
|
123
|
+
echo " tmux -CC"
|
|
124
|
+
echo ""
|
|
125
|
+
echo -e "${GREEN}✓ 세팅 완료${NC}"
|
|
@@ -0,0 +1,460 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent-teams-setup
|
|
3
|
+
description: 프로젝트에 Agent Teams 환경 구성. 에이전트 디렉토리, 환경변수, 기본 페르소나 생성.
|
|
4
|
+
user-invocable: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
@../../instructions/validation/forbidden-patterns.md
|
|
8
|
+
@../../instructions/validation/required-behaviors.md
|
|
9
|
+
|
|
10
|
+
# Agent Teams Setup Skill
|
|
11
|
+
|
|
12
|
+
> Claude Code Agent Teams 환경을 프로젝트에 구성
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
<when_to_use>
|
|
17
|
+
|
|
18
|
+
| 상황 | 설명 |
|
|
19
|
+
|------|------|
|
|
20
|
+
| **새 프로젝트** | Agent Teams 처음 도입 |
|
|
21
|
+
| **팀 확장** | 기존 에이전트에 새 역할 추가 |
|
|
22
|
+
| **패턴 적용** | 특정 협업 패턴 구성 (리뷰, 파이프라인) |
|
|
23
|
+
|
|
24
|
+
</when_to_use>
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
<architecture>
|
|
29
|
+
|
|
30
|
+
## Agent Teams 아키텍처
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
┌─────────────────────────────────────────────────────────┐
|
|
34
|
+
│ Team Lead │
|
|
35
|
+
│ - 전체 조율 및 의사결정 │
|
|
36
|
+
│ - TeamCreate로 팀 생성 │
|
|
37
|
+
│ - SendMessage로 팀원 관리 │
|
|
38
|
+
└─────────────────────┬───────────────────────────────────┘
|
|
39
|
+
│ spawnTeam / broadcast / write
|
|
40
|
+
▼
|
|
41
|
+
┌─────────────────────────────────────────────────────────┐
|
|
42
|
+
│ Shared Task List │
|
|
43
|
+
│ - TaskCreate/TaskUpdate로 작업 관리 │
|
|
44
|
+
│ - blockedBy, addBlocks로 의존성 관리 │
|
|
45
|
+
└─────────────────────────────────────────────────────────┘
|
|
46
|
+
│ │ │
|
|
47
|
+
▼ ▼ ▼
|
|
48
|
+
┌──────────┐ ┌──────────┐ ┌──────────┐
|
|
49
|
+
│ Teammate │ │ Teammate │ │ Teammate │
|
|
50
|
+
│ Alpha │◄───────►│ Beta │◄───────►│ Gamma │
|
|
51
|
+
└──────────┘ Inbox └──────────┘ Inbox └──────────┘
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**핵심 구성요소:**
|
|
55
|
+
|
|
56
|
+
| 구성요소 | 위치 | 설명 |
|
|
57
|
+
|---------|------|------|
|
|
58
|
+
| **에이전트 정의** | `.claude/agents/*.md` | YAML frontmatter + Markdown |
|
|
59
|
+
| **팀 설정** | `~/.claude/teams/{name}/` | 팀 config, inbox |
|
|
60
|
+
| **작업 목록** | `~/.claude/tasks/{name}/` | 공유 Task List |
|
|
61
|
+
| **환경변수** | `settings.json` | `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` |
|
|
62
|
+
|
|
63
|
+
</architecture>
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
<frontmatter_spec>
|
|
68
|
+
|
|
69
|
+
## Persona Frontmatter 필드 (2026-02 기준)
|
|
70
|
+
|
|
71
|
+
| 필드 | 필수 | 설명 | 예시 |
|
|
72
|
+
|------|------|------|------|
|
|
73
|
+
| `name` | ✅ | 고유 식별자 (소문자+하이픈) | `security-auditor` |
|
|
74
|
+
| `description` | ✅ | 위임 판단용 설명 | `보안 취약점 분석 전문` |
|
|
75
|
+
| `tools` | ❌ | 허용 도구 배열 | `Read, Grep, Glob` |
|
|
76
|
+
| `disallowedTools` | ❌ | 차단 도구 배열 | `Write, Edit` |
|
|
77
|
+
| `model` | ❌ | `opus` \| `sonnet` \| `haiku` \| `inherit` | `sonnet` |
|
|
78
|
+
| `permissionMode` | ❌ | `default` \| `acceptEdits` \| `delegate` \| `dontAsk` \| `bypassPermissions` \| `plan` | `default` |
|
|
79
|
+
| `maxTurns` | ❌ | 최대 에이전틱 턴 수 | `50` |
|
|
80
|
+
| `memory` | ❌ | `user` \| `project` \| `local` | `project` |
|
|
81
|
+
| `skills` | ❌ | 로드할 스킬 배열 | `security-analysis` |
|
|
82
|
+
| `mcpServers` | ❌ | MCP 서버 목록 | `slack` |
|
|
83
|
+
| `hooks` | ❌ | 라이프사이클 훅 | (구조화된 배열) |
|
|
84
|
+
|
|
85
|
+
**주의사항:**
|
|
86
|
+
- `model`: 전체 ID (`claude-opus-4-6`) 아닌 **별칭** (`opus`) 사용
|
|
87
|
+
- `memory`: 객체가 아닌 **단일 문자열**
|
|
88
|
+
- `hooks`: 문자열 경로가 아닌 **구조화된 배열**
|
|
89
|
+
|
|
90
|
+
</frontmatter_spec>
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
<workflow>
|
|
95
|
+
|
|
96
|
+
## 셋업 워크플로우
|
|
97
|
+
|
|
98
|
+
| Step | 작업 | 도구 |
|
|
99
|
+
|------|------|------|
|
|
100
|
+
| **1. 환경 확인** | 기존 `.claude/agents/` 확인, 설정 파일 확인 | Glob, Read |
|
|
101
|
+
| **2. 환경변수 설정** | `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` 추가 | Edit |
|
|
102
|
+
| **3. 디렉토리 생성** | `.claude/agents/` 생성 | Bash |
|
|
103
|
+
| **4. 기본 에이전트 생성** | 역할별 페르소나 파일 생성 | Write |
|
|
104
|
+
| **5. 검증** | 프론트매터 형식 검증 | Grep |
|
|
105
|
+
|
|
106
|
+
</workflow>
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
<agent_templates>
|
|
111
|
+
|
|
112
|
+
## 기본 에이전트 템플릿
|
|
113
|
+
|
|
114
|
+
### 1. Explore (탐색)
|
|
115
|
+
|
|
116
|
+
```yaml
|
|
117
|
+
---
|
|
118
|
+
name: explore
|
|
119
|
+
description: 코드베이스 빠른 탐색. 파일/코드 패턴 검색, 구현 위치 파악.
|
|
120
|
+
tools: Read, Glob, Grep, Bash
|
|
121
|
+
disallowedTools:
|
|
122
|
+
- Write
|
|
123
|
+
- Edit
|
|
124
|
+
model: haiku
|
|
125
|
+
permissionMode: default
|
|
126
|
+
maxTurns: 20
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
# Explore Agent
|
|
130
|
+
|
|
131
|
+
코드베이스 탐색 전문가. 파일과 코드를 빠르게 찾아 정확한 정보 제공.
|
|
132
|
+
|
|
133
|
+
<workflow>
|
|
134
|
+
1. 의도 분석 (요청의 실제 의미 파악)
|
|
135
|
+
2. 병렬 도구 실행 (3개 이상 동시)
|
|
136
|
+
3. 결과 종합 및 정확한 위치 제공
|
|
137
|
+
</workflow>
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### 2. Planner (계획)
|
|
141
|
+
|
|
142
|
+
```yaml
|
|
143
|
+
---
|
|
144
|
+
name: planner
|
|
145
|
+
description: 전략적 작업 계획 수립. 구현 전 인터뷰-조사-계획. 코드 작성 없이 계획만.
|
|
146
|
+
tools: Read, Write, Edit, Glob, Grep, Task, AskUserQuestion
|
|
147
|
+
model: opus
|
|
148
|
+
permissionMode: plan
|
|
149
|
+
maxTurns: 50
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
# Planner Agent
|
|
153
|
+
|
|
154
|
+
전략적 계획 수립 전문가. **구현 없이 계획만 수립**.
|
|
155
|
+
|
|
156
|
+
<workflow>
|
|
157
|
+
1. 발견 인터뷰 (요구사항 파악)
|
|
158
|
+
2. 코드베이스 조사 (explore 위임)
|
|
159
|
+
3. 계획 작성 (.claude/plans/*.md)
|
|
160
|
+
4. 사용자 확인 대기
|
|
161
|
+
</workflow>
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### 3. Implementer (구현)
|
|
165
|
+
|
|
166
|
+
```yaml
|
|
167
|
+
---
|
|
168
|
+
name: implementer
|
|
169
|
+
description: 계획/작업을 즉시 구현. Sequential Thinking으로 분석 후 실행.
|
|
170
|
+
tools: Read, Write, Edit, Grep, Glob, Task, Bash
|
|
171
|
+
model: sonnet
|
|
172
|
+
permissionMode: default
|
|
173
|
+
maxTurns: 100
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
# Implementer Agent
|
|
177
|
+
|
|
178
|
+
구현 전문가. 옵션 제시 없이 최적 방법으로 즉시 구현.
|
|
179
|
+
|
|
180
|
+
<workflow>
|
|
181
|
+
1. Sequential Thinking으로 복잡도 판단
|
|
182
|
+
2. Task(Explore)로 코드베이스 탐색
|
|
183
|
+
3. 최적 접근법 내부적으로 결정
|
|
184
|
+
4. 단계별 구현 및 검증
|
|
185
|
+
</workflow>
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### 4. Reviewer (검토)
|
|
189
|
+
|
|
190
|
+
```yaml
|
|
191
|
+
---
|
|
192
|
+
name: reviewer
|
|
193
|
+
description: 코드 품질, 보안, 유지보수성 검토. git diff 기반 변경사항 분석.
|
|
194
|
+
tools: Read, Grep, Glob, Bash
|
|
195
|
+
disallowedTools:
|
|
196
|
+
- Write
|
|
197
|
+
- Edit
|
|
198
|
+
model: sonnet
|
|
199
|
+
permissionMode: default
|
|
200
|
+
maxTurns: 30
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
# Reviewer Agent
|
|
204
|
+
|
|
205
|
+
시니어 코드 리뷰어. 높은 기준 유지, 건설적 피드백 제공.
|
|
206
|
+
|
|
207
|
+
<workflow>
|
|
208
|
+
1. git diff로 변경사항 확인
|
|
209
|
+
2. 코드 품질/보안/성능 분석
|
|
210
|
+
3. 구체적 피드백 (파일:라인 참조)
|
|
211
|
+
4. 승인/수정 요청 결정
|
|
212
|
+
</workflow>
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### 5. Tester (테스트)
|
|
216
|
+
|
|
217
|
+
```yaml
|
|
218
|
+
---
|
|
219
|
+
name: tester
|
|
220
|
+
description: 테스트 작성 및 실행. TDD 사이클, 80%+ 커버리지 목표.
|
|
221
|
+
tools: Read, Write, Edit, Bash, Glob
|
|
222
|
+
model: sonnet
|
|
223
|
+
permissionMode: default
|
|
224
|
+
maxTurns: 50
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
# Tester Agent
|
|
228
|
+
|
|
229
|
+
테스트 전문가. Red-Green-Refactor 사이클, 높은 커버리지 보장.
|
|
230
|
+
|
|
231
|
+
<workflow>
|
|
232
|
+
1. 테스트 대상 분석
|
|
233
|
+
2. 테스트 케이스 작성 (엣지 케이스 포함)
|
|
234
|
+
3. 테스트 실행 및 검증
|
|
235
|
+
4. 커버리지 확인
|
|
236
|
+
</workflow>
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
</agent_templates>
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
<team_patterns>
|
|
244
|
+
|
|
245
|
+
## 팀 구성 패턴
|
|
246
|
+
|
|
247
|
+
### 패턴 1: 병렬 전문가 리뷰
|
|
248
|
+
|
|
249
|
+
```
|
|
250
|
+
Code Change
|
|
251
|
+
│
|
|
252
|
+
├──► Security Expert
|
|
253
|
+
├──► Performance Expert
|
|
254
|
+
└──► Testing Expert
|
|
255
|
+
│
|
|
256
|
+
▼
|
|
257
|
+
Team Lead (종합 판정)
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
**적용:** PR 리뷰 자동화
|
|
261
|
+
|
|
262
|
+
### 패턴 2: 순차 파이프라인
|
|
263
|
+
|
|
264
|
+
```
|
|
265
|
+
Research → Plan → Implement → Test → Review → Deploy
|
|
266
|
+
│ │ │ │ │ │
|
|
267
|
+
[Task 1] → [Task 2] → [Task 3] → [Task 4] → [Task 5]
|
|
268
|
+
blockedBy blockedBy blockedBy blockedBy
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
**적용:** 신규 기능 개발
|
|
272
|
+
|
|
273
|
+
### 패턴 3: Cross-Layer 협업
|
|
274
|
+
|
|
275
|
+
```
|
|
276
|
+
┌── Frontend (React) ──┐
|
|
277
|
+
API Spec ─┼── Backend (Node.js) ─┼─► Integration Test
|
|
278
|
+
└── Test Agent ────────┘
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
**적용:** 풀스택 기능 구현
|
|
282
|
+
|
|
283
|
+
### 패턴 4: 경쟁적 가설 검증
|
|
284
|
+
|
|
285
|
+
```
|
|
286
|
+
┌── Conservative Analyst
|
|
287
|
+
├── Innovative Analyst
|
|
288
|
+
Lead ┼── Pragmatic Analyst
|
|
289
|
+
├── Devil's Advocate
|
|
290
|
+
└── Synthesizer (종합)
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
**적용:** 복잡한 버그 조사, 아키텍처 결정
|
|
294
|
+
|
|
295
|
+
</team_patterns>
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
<model_routing>
|
|
300
|
+
|
|
301
|
+
## 모델 라우팅
|
|
302
|
+
|
|
303
|
+
| 복잡도 | 모델 | 대표 역할 | 비용 |
|
|
304
|
+
|--------|------|----------|------|
|
|
305
|
+
| **LOW** | haiku | explore, document-writer | 💰 |
|
|
306
|
+
| **MEDIUM** | sonnet | implementer, reviewer, tester | 💰💰 |
|
|
307
|
+
| **HIGH** | opus | planner, architect, security | 💰💰💰 |
|
|
308
|
+
|
|
309
|
+
**비용 최적화:**
|
|
310
|
+
- 탐색 작업 → haiku (빠르고 저렴)
|
|
311
|
+
- 구현/검토 → sonnet (균형)
|
|
312
|
+
- 전략/보안 → opus (최고 품질)
|
|
313
|
+
|
|
314
|
+
</model_routing>
|
|
315
|
+
|
|
316
|
+
---
|
|
317
|
+
|
|
318
|
+
<examples>
|
|
319
|
+
|
|
320
|
+
## 셋업 예시
|
|
321
|
+
|
|
322
|
+
### 새 프로젝트 셋업
|
|
323
|
+
|
|
324
|
+
```bash
|
|
325
|
+
/agent-teams-setup
|
|
326
|
+
|
|
327
|
+
# 1. 환경변수 설정
|
|
328
|
+
# ~/.claude/settings.json에 추가:
|
|
329
|
+
{
|
|
330
|
+
"env": {
|
|
331
|
+
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
# 2. 디렉토리 생성
|
|
336
|
+
mkdir -p .claude/agents
|
|
337
|
+
|
|
338
|
+
# 3. 기본 에이전트 생성
|
|
339
|
+
# - .claude/agents/explore.md
|
|
340
|
+
# - .claude/agents/planner.md
|
|
341
|
+
# - .claude/agents/implementer.md
|
|
342
|
+
# - .claude/agents/reviewer.md
|
|
343
|
+
# - .claude/agents/tester.md
|
|
344
|
+
|
|
345
|
+
# 4. 검증
|
|
346
|
+
grep -r "^name:" .claude/agents/
|
|
347
|
+
grep -r "^model:" .claude/agents/
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
### 특정 패턴 셋업
|
|
351
|
+
|
|
352
|
+
```bash
|
|
353
|
+
/agent-teams-setup 병렬 리뷰 패턴
|
|
354
|
+
|
|
355
|
+
# 리뷰 전문가 팀 생성
|
|
356
|
+
# - .claude/agents/security-reviewer.md
|
|
357
|
+
# - .claude/agents/performance-reviewer.md
|
|
358
|
+
# - .claude/agents/testing-reviewer.md
|
|
359
|
+
# - .claude/agents/review-lead.md
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
### 기존 프로젝트 확장
|
|
363
|
+
|
|
364
|
+
```bash
|
|
365
|
+
/agent-teams-setup 보안 에이전트 추가
|
|
366
|
+
|
|
367
|
+
# .claude/agents/security-auditor.md 생성
|
|
368
|
+
---
|
|
369
|
+
name: security-auditor
|
|
370
|
+
description: 보안 취약점 분석 전문. OWASP Top 10, 시크릿 노출, 입력 검증.
|
|
371
|
+
tools: Read, Grep, Glob, Bash
|
|
372
|
+
disallowedTools:
|
|
373
|
+
- Write
|
|
374
|
+
- Edit
|
|
375
|
+
model: opus
|
|
376
|
+
permissionMode: default
|
|
377
|
+
maxTurns: 30
|
|
378
|
+
---
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
</examples>
|
|
382
|
+
|
|
383
|
+
---
|
|
384
|
+
|
|
385
|
+
<validation>
|
|
386
|
+
|
|
387
|
+
## 셋업 체크리스트
|
|
388
|
+
|
|
389
|
+
```text
|
|
390
|
+
□ Phase 1: 환경 구성
|
|
391
|
+
□ CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 설정
|
|
392
|
+
□ .claude/agents/ 디렉토리 생성
|
|
393
|
+
□ settings.json 업데이트
|
|
394
|
+
|
|
395
|
+
□ Phase 2: 기본 에이전트
|
|
396
|
+
□ explore (탐색) - haiku, READ-ONLY
|
|
397
|
+
□ planner (계획) - opus, plan 모드
|
|
398
|
+
□ implementer (구현) - sonnet
|
|
399
|
+
□ reviewer (검토) - sonnet, READ-ONLY
|
|
400
|
+
□ tester (테스트) - sonnet
|
|
401
|
+
|
|
402
|
+
□ Phase 3: Frontmatter 검증
|
|
403
|
+
□ name: 소문자+하이픈
|
|
404
|
+
□ description: 필수
|
|
405
|
+
□ model: opus/sonnet/haiku (별칭)
|
|
406
|
+
□ permissionMode: 유효한 값
|
|
407
|
+
□ maxTurns: 역할에 맞는 값
|
|
408
|
+
□ disallowedTools: READ-ONLY 에이전트에 Write, Edit 차단
|
|
409
|
+
|
|
410
|
+
□ Phase 4: 팀 패턴 (선택)
|
|
411
|
+
□ 병렬 리뷰 패턴
|
|
412
|
+
□ 순차 파이프라인
|
|
413
|
+
□ Cross-Layer 협업
|
|
414
|
+
□ 경쟁적 가설 검증
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
## 금지 사항
|
|
418
|
+
|
|
419
|
+
| 금지 | 이유 |
|
|
420
|
+
|------|------|
|
|
421
|
+
| 전체 모델 ID 사용 | `claude-opus-4-6` → `opus` |
|
|
422
|
+
| memory 객체 사용 | 단일 문자열만 허용 |
|
|
423
|
+
| hooks 문자열 경로 | 구조화된 배열 필요 |
|
|
424
|
+
| permissionMode: strict | 존재하지 않는 값 |
|
|
425
|
+
|
|
426
|
+
</validation>
|
|
427
|
+
|
|
428
|
+
---
|
|
429
|
+
|
|
430
|
+
<cost_considerations>
|
|
431
|
+
|
|
432
|
+
## 비용 고려사항
|
|
433
|
+
|
|
434
|
+
| 방식 | 시간당 비용 | 적합 작업 |
|
|
435
|
+
|------|-----------|----------|
|
|
436
|
+
| **직접 처리** | $5-20 | 단순 수정 |
|
|
437
|
+
| **Subagent** | $20-100 | 탐색, 단일 위임 |
|
|
438
|
+
| **Agent Teams** | $50-150 | 복잡한 병렬 협업 |
|
|
439
|
+
|
|
440
|
+
**비용 최적화 전략:**
|
|
441
|
+
- 모델 티어링: 탐색=Haiku, 분석=Sonnet, 구현=Opus
|
|
442
|
+
- Task 그래뉼래리티: 2-4시간 단위로 분할
|
|
443
|
+
- 조기 종료: maxTurns 설정, 작업 완료 시 즉시 종료
|
|
444
|
+
- 컨텍스트 공유: 공통 정보는 공유 메모리에
|
|
445
|
+
|
|
446
|
+
</cost_considerations>
|
|
447
|
+
|
|
448
|
+
---
|
|
449
|
+
|
|
450
|
+
<references>
|
|
451
|
+
|
|
452
|
+
## 참고자료
|
|
453
|
+
|
|
454
|
+
| 제목 | URL |
|
|
455
|
+
|------|-----|
|
|
456
|
+
| Agent Teams 공식 문서 | https://code.claude.com/docs/en/agent-teams |
|
|
457
|
+
| Sub-agents 공식 문서 | https://code.claude.com/docs/en/sub-agents |
|
|
458
|
+
| Claude Opus 4.6 발표 | https://www.anthropic.com/news/claude-opus-4-6 |
|
|
459
|
+
|
|
460
|
+
</references>
|
|
@@ -7,6 +7,7 @@ user-invocable: true
|
|
|
7
7
|
@../../instructions/workflow-patterns/sequential-thinking.md
|
|
8
8
|
@../../instructions/agent-patterns/parallel-execution.md
|
|
9
9
|
@../../instructions/agent-patterns/model-routing.md
|
|
10
|
+
@../../instructions/agent-patterns/agent-teams-usage.md
|
|
10
11
|
@../../instructions/sourcing/reliable-search.md
|
|
11
12
|
@../../instructions/context-optimization/redundant-exploration-prevention.md
|
|
12
13
|
@../../instructions/validation/forbidden-patterns.md
|
|
@@ -7,6 +7,7 @@ user-invocable: true
|
|
|
7
7
|
@../../instructions/workflow-patterns/sequential-thinking.md
|
|
8
8
|
@../../instructions/agent-patterns/parallel-execution.md
|
|
9
9
|
@../../instructions/agent-patterns/model-routing.md
|
|
10
|
+
@../../instructions/agent-patterns/agent-teams-usage.md
|
|
10
11
|
@../../instructions/sourcing/reliable-search.md
|
|
11
12
|
@../../instructions/context-optimization/redundant-exploration-prevention.md
|
|
12
13
|
@../../instructions/validation/scope-completeness.md
|
|
@@ -10,6 +10,7 @@ user-invocable: true
|
|
|
10
10
|
@../../instructions/workflow-patterns/sequential-thinking.md
|
|
11
11
|
@../../instructions/agent-patterns/parallel-execution.md
|
|
12
12
|
@../../instructions/agent-patterns/model-routing.md
|
|
13
|
+
@../../instructions/agent-patterns/agent-teams-usage.md
|
|
13
14
|
@../../instructions/validation/forbidden-patterns.md
|
|
14
15
|
@../../instructions/validation/required-behaviors.md
|
|
15
16
|
@../../instructions/sourcing/reliable-search.md
|
|
@@ -7,6 +7,7 @@ user-invocable: true
|
|
|
7
7
|
@../../instructions/workflow-patterns/sequential-thinking.md
|
|
8
8
|
@../../instructions/agent-patterns/parallel-execution.md
|
|
9
9
|
@../../instructions/agent-patterns/model-routing.md
|
|
10
|
+
@../../instructions/agent-patterns/agent-teams-usage.md
|
|
10
11
|
@../../instructions/sourcing/reliable-search.md
|
|
11
12
|
@../../instructions/validation/forbidden-patterns.md
|
|
12
13
|
@../../instructions/validation/required-behaviors.md
|
|
@@ -7,6 +7,7 @@ user-invocable: true
|
|
|
7
7
|
@../../instructions/workflow-patterns/sequential-thinking.md
|
|
8
8
|
@../../instructions/agent-patterns/parallel-execution.md
|
|
9
9
|
@../../instructions/agent-patterns/model-routing.md
|
|
10
|
+
@../../instructions/agent-patterns/agent-teams-usage.md
|
|
10
11
|
@../../instructions/context-optimization/phase-based-execution.md
|
|
11
12
|
@../../instructions/context-optimization/sub-agent-distribution.md
|
|
12
13
|
@../../instructions/validation/scope-completeness.md
|
|
@@ -7,6 +7,7 @@ user-invocable: true
|
|
|
7
7
|
@../../instructions/workflow-patterns/sequential-thinking.md
|
|
8
8
|
@../../instructions/agent-patterns/parallel-execution.md
|
|
9
9
|
@../../instructions/agent-patterns/model-routing.md
|
|
10
|
+
@../../instructions/agent-patterns/agent-teams-usage.md
|
|
10
11
|
@../../instructions/validation/forbidden-patterns.md
|
|
11
12
|
@../../instructions/validation/required-behaviors.md
|
|
12
13
|
|
|
@@ -7,6 +7,7 @@ user-invocable: true
|
|
|
7
7
|
@../../instructions/workflow-patterns/sequential-thinking.md
|
|
8
8
|
@../../instructions/agent-patterns/parallel-execution.md
|
|
9
9
|
@../../instructions/agent-patterns/model-routing.md
|
|
10
|
+
@../../instructions/agent-patterns/agent-teams-usage.md
|
|
10
11
|
@../../instructions/validation/forbidden-patterns.md
|
|
11
12
|
@../../instructions/validation/required-behaviors.md
|
|
12
13
|
|