@kood/claude-code 0.5.0 → 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.
- package/dist/index.js +179 -33
- package/package.json +1 -1
- package/templates/.claude/agents/analyst.md +6 -14
- package/templates/.claude/agents/architect.md +6 -14
- package/templates/.claude/agents/code-reviewer.md +8 -14
- package/templates/.claude/agents/dependency-manager.md +8 -14
- package/templates/.claude/agents/deployment-validator.md +8 -14
- package/templates/.claude/agents/designer.md +8 -0
- package/templates/.claude/agents/document-writer.md +6 -14
- package/templates/.claude/agents/explore.md +8 -3
- package/templates/.claude/agents/git-operator.md +63 -17
- package/templates/.claude/agents/implementation-executor.md +14 -37
- package/templates/.claude/agents/ko-to-en-translator.md +8 -13
- package/templates/.claude/agents/lint-fixer.md +8 -172
- package/templates/.claude/agents/planner.md +6 -14
- package/templates/.claude/agents/refactor-advisor.md +8 -14
- package/templates/.claude/commands/git-all.md +3 -167
- package/templates/.claude/commands/git-session.md +3 -71
- package/templates/.claude/commands/lint-fix.md +119 -82
- package/templates/.claude/commands/lint-init.md +2 -54
- package/templates/.claude/commands/pre-deploy.md +143 -82
- package/templates/.claude/commands/version-update.md +171 -66
- package/templates/.claude/instructions/agent-patterns/agent-coordination.md +208 -0
- package/templates/.claude/instructions/agent-patterns/index.md +264 -0
- package/templates/.claude/instructions/agent-patterns/model-routing.md +167 -0
- package/templates/.claude/instructions/agent-patterns/parallel-execution.md +91 -0
- package/templates/.claude/instructions/agent-patterns/read-parallelization.md +106 -0
- package/templates/.claude/instructions/index.md +350 -0
- package/templates/.claude/instructions/multi-agent/agent-roster.md +811 -0
- package/templates/.claude/{PARALLEL_AGENTS.md → instructions/multi-agent/coordination-guide.md} +27 -336
- package/templates/.claude/instructions/{parallel-agent-execution.md → multi-agent/execution-patterns.md} +127 -438
- package/templates/.claude/instructions/multi-agent/index.md +282 -0
- package/templates/.claude/instructions/multi-agent/performance-optimization.md +456 -0
- package/templates/.claude/instructions/tech-stack/design-standards.md +282 -0
- package/templates/.claude/instructions/tech-stack/index.md +70 -0
- package/templates/.claude/instructions/tech-stack/prisma-patterns.md +352 -0
- package/templates/.claude/instructions/tech-stack/tanstack-patterns.md +275 -0
- package/templates/.claude/instructions/validation/forbidden-patterns.md +281 -0
- package/templates/.claude/instructions/validation/index.md +32 -0
- package/templates/.claude/instructions/validation/required-behaviors.md +331 -0
- package/templates/.claude/instructions/validation/verification-checklist.md +318 -0
- package/templates/.claude/instructions/workflow-patterns/index.md +18 -0
- package/templates/.claude/instructions/workflow-patterns/phase-based-workflow.md +250 -0
- package/templates/.claude/instructions/workflow-patterns/sequential-thinking.md +217 -0
- package/templates/.claude/instructions/workflow-patterns/todowrite-pattern.md +215 -0
- package/templates/.claude/skills/bug-fix/SKILL.md +972 -0
- package/templates/.claude/skills/docs-creator/AGENTS.md +4 -1
- package/templates/.claude/skills/docs-creator/SKILL.md +258 -0
- package/templates/.claude/skills/docs-refactor/AGENTS.md +4 -1
- package/templates/.claude/skills/docs-refactor/SKILL.md +145 -0
- package/templates/.claude/skills/execute/SKILL.md +15 -242
- package/templates/.claude/skills/figma-to-code/AGENTS.md +4 -1
- package/templates/.claude/skills/figma-to-code/SKILL.md +306 -0
- package/templates/.claude/skills/global-uiux-design/AGENTS.md +4 -1
- package/templates/.claude/skills/global-uiux-design/SKILL.md +455 -125
- package/templates/.claude/skills/korea-uiux-design/AGENTS.md +4 -1
- package/templates/.claude/skills/korea-uiux-design/SKILL.md +461 -116
- package/templates/.claude/skills/nextjs-react-best-practices/SKILL.md +177 -0
- package/templates/.claude/skills/plan/SKILL.md +1102 -98
- package/templates/.claude/skills/prd/SKILL.md +367 -66
- package/templates/.claude/skills/ralph/AGENTS.md +4 -1
- package/templates/.claude/skills/ralph/SKILL.md +83 -0
- package/templates/.claude/skills/refactor/SKILL.md +1214 -0
- package/templates/.claude/skills/tanstack-start-react-best-practices/SKILL.md +149 -0
- package/templates/.claude/commands/bug-fix.md +0 -510
- package/templates/.claude/commands/refactor.md +0 -788
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
description: 현재 세션에서 수정한 파일만 커밋 후 푸시
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
+
@../instructions/multi-agent/coordination-guide.md
|
|
6
|
+
@../instructions/multi-agent/execution-patterns.md
|
|
7
|
+
|
|
5
8
|
# Git Session Command
|
|
6
9
|
|
|
7
10
|
> @git-operator 에이전트를 사용하여 현재 세션 파일만 선택적으로 커밋하고 푸시.
|
|
@@ -106,74 +109,3 @@ git push
|
|
|
106
109
|
|
|
107
110
|
</example>
|
|
108
111
|
|
|
109
|
-
---
|
|
110
|
-
|
|
111
|
-
<parallel_agent_execution>
|
|
112
|
-
|
|
113
|
-
## Recommended Agents
|
|
114
|
-
|
|
115
|
-
| Agent | Model | Purpose |
|
|
116
|
-
|-------|-------|---------|
|
|
117
|
-
| **@git-operator** | haiku | Git 커밋/푸시 작업 (필수) |
|
|
118
|
-
| **@code-reviewer** | haiku/sonnet | 세션 변경사항 검토 |
|
|
119
|
-
| **@explore** | haiku | 세션 파일 탐색 |
|
|
120
|
-
|
|
121
|
-
---
|
|
122
|
-
|
|
123
|
-
## Parallel Execution Patterns
|
|
124
|
-
|
|
125
|
-
| Pattern | Description |
|
|
126
|
-
|---------|-------------|
|
|
127
|
-
| **검토 + 탐색 병렬** | @code-reviewer와 @explore 동시 실행 |
|
|
128
|
-
| **분석 후 순차 커밋** | 병렬 분석 → 순차 git 작업 |
|
|
129
|
-
|
|
130
|
-
**❌ Git 커밋은 순차 실행:**
|
|
131
|
-
- git-session은 단일 커밋 흐름
|
|
132
|
-
- 병렬화 불필요
|
|
133
|
-
|
|
134
|
-
---
|
|
135
|
-
|
|
136
|
-
## Model Routing
|
|
137
|
-
|
|
138
|
-
| Complexity | Model | Scenario |
|
|
139
|
-
|------------|-------|----------|
|
|
140
|
-
| **LOW** | haiku | 단순 세션 커밋 (1-3 files) |
|
|
141
|
-
| **MEDIUM** | haiku/sonnet | 일반 세션 커밋 (4-10 files) |
|
|
142
|
-
|
|
143
|
-
---
|
|
144
|
-
|
|
145
|
-
## Practical Examples
|
|
146
|
-
|
|
147
|
-
```typescript
|
|
148
|
-
// ✅ 검토 + 탐색 병렬
|
|
149
|
-
Task({
|
|
150
|
-
subagent_type: 'code-reviewer',
|
|
151
|
-
model: 'haiku',
|
|
152
|
-
prompt: '세션 변경사항 검토'
|
|
153
|
-
})
|
|
154
|
-
Task({
|
|
155
|
-
subagent_type: 'explore',
|
|
156
|
-
model: 'haiku',
|
|
157
|
-
prompt: '세션 파일 목록 확인'
|
|
158
|
-
})
|
|
159
|
-
|
|
160
|
-
// 분석 완료 후 순차 커밋
|
|
161
|
-
Task({
|
|
162
|
-
subagent_type: 'git-operator',
|
|
163
|
-
model: 'haiku',
|
|
164
|
-
prompt: `
|
|
165
|
-
세션 커밋 모드:
|
|
166
|
-
- 현재 세션 관련 파일만 선택적 커밋
|
|
167
|
-
- 반드시 푸시 (git push)
|
|
168
|
-
`
|
|
169
|
-
})
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
```typescript
|
|
173
|
-
// ❌ Git 커밋 병렬화 시도
|
|
174
|
-
// git-session은 단일 커밋이므로 병렬화 불필요
|
|
175
|
-
Task({ subagent_type: 'git-operator', prompt: '파일 A 커밋' })
|
|
176
|
-
Task({ subagent_type: 'git-operator', prompt: '파일 B 커밋' }) // 불필요
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
</parallel_agent_execution>
|
|
@@ -4,6 +4,9 @@ allowed-tools: Task
|
|
|
4
4
|
argument-hint: [파일/디렉토리 경로...]
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
@../instructions/multi-agent/coordination-guide.md
|
|
8
|
+
@../instructions/multi-agent/execution-patterns.md
|
|
9
|
+
|
|
7
10
|
# Lint Fix Command
|
|
8
11
|
|
|
9
12
|
> @lint-fixer 에이전트를 사용하여 tsc/eslint 오류를 자동으로 수정.
|
|
@@ -115,88 +118,6 @@ Task({
|
|
|
115
118
|
|
|
116
119
|
---
|
|
117
120
|
|
|
118
|
-
<parallel_agent_execution>
|
|
119
|
-
|
|
120
|
-
## 병렬 에이전트 실행
|
|
121
|
-
|
|
122
|
-
**Recommended Agents:**
|
|
123
|
-
|
|
124
|
-
| Agent | Model | 용도 |
|
|
125
|
-
|-------|-------|------|
|
|
126
|
-
| @lint-fixer | haiku/sonnet | 오류 수정 |
|
|
127
|
-
| @explore | haiku | 관련 파일 탐색 |
|
|
128
|
-
| @code-reviewer | haiku | 수정 후 검증 |
|
|
129
|
-
|
|
130
|
-
**Parallel Execution Patterns:**
|
|
131
|
-
|
|
132
|
-
1. **파일별 병렬 수정:** 각 파일마다 별도 lint-fixer
|
|
133
|
-
2. **오류 타입별 병렬:** 타입 오류와 린트 오류 동시 수정
|
|
134
|
-
3. **수정 + 검증 병렬:** 여러 파일 동시 수정 후 검증
|
|
135
|
-
|
|
136
|
-
**Model Routing:**
|
|
137
|
-
|
|
138
|
-
| 복잡도 | 오류 범위 | 모델 |
|
|
139
|
-
|--------|----------|------|
|
|
140
|
-
| LOW | 단순 오류 (1-5개) | haiku |
|
|
141
|
-
| MEDIUM | 일반 오류 (6-20개) | sonnet |
|
|
142
|
-
| HIGH | 복잡한 오류 (타입 추론) | sonnet/opus |
|
|
143
|
-
|
|
144
|
-
**Practical Examples:**
|
|
145
|
-
|
|
146
|
-
```typescript
|
|
147
|
-
// ✅ 파일별 병렬 수정
|
|
148
|
-
Task({
|
|
149
|
-
subagent_type: 'lint-fixer',
|
|
150
|
-
model: 'haiku',
|
|
151
|
-
prompt: 'src/utils/format.ts 린트 오류 수정'
|
|
152
|
-
})
|
|
153
|
-
Task({
|
|
154
|
-
subagent_type: 'lint-fixer',
|
|
155
|
-
model: 'haiku',
|
|
156
|
-
prompt: 'src/components/Button.tsx 린트 오류 수정'
|
|
157
|
-
})
|
|
158
|
-
|
|
159
|
-
// ✅ 타입 + 린트 병렬
|
|
160
|
-
Task({
|
|
161
|
-
subagent_type: 'lint-fixer',
|
|
162
|
-
model: 'sonnet',
|
|
163
|
-
prompt: '타입 오류 수정'
|
|
164
|
-
})
|
|
165
|
-
Task({
|
|
166
|
-
subagent_type: 'lint-fixer',
|
|
167
|
-
model: 'haiku',
|
|
168
|
-
prompt: 'ESLint 오류 수정'
|
|
169
|
-
})
|
|
170
|
-
|
|
171
|
-
// ✅ 수정 + 검증 병렬
|
|
172
|
-
Task({
|
|
173
|
-
subagent_type: 'lint-fixer',
|
|
174
|
-
model: 'haiku',
|
|
175
|
-
prompt: 'src/utils/*.ts 파일들 린트 오류 수정'
|
|
176
|
-
})
|
|
177
|
-
Task({
|
|
178
|
-
subagent_type: 'code-reviewer',
|
|
179
|
-
model: 'haiku',
|
|
180
|
-
prompt: '수정된 파일들 코드 품질 검증'
|
|
181
|
-
})
|
|
182
|
-
|
|
183
|
-
// ✅ 탐색 + 수정 병렬
|
|
184
|
-
Task({
|
|
185
|
-
subagent_type: 'explore',
|
|
186
|
-
model: 'haiku',
|
|
187
|
-
prompt: '타입 정의 파일 위치 탐색'
|
|
188
|
-
})
|
|
189
|
-
Task({
|
|
190
|
-
subagent_type: 'lint-fixer',
|
|
191
|
-
model: 'sonnet',
|
|
192
|
-
prompt: '타입 오류 수정'
|
|
193
|
-
})
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
</parallel_agent_execution>
|
|
197
|
-
|
|
198
|
-
---
|
|
199
|
-
|
|
200
121
|
<required>
|
|
201
122
|
|
|
202
123
|
| 분류 | 필수 |
|
|
@@ -234,6 +155,122 @@ Task({
|
|
|
234
155
|
|
|
235
156
|
---
|
|
236
157
|
|
|
158
|
+
<parallel_execution_critical>
|
|
159
|
+
|
|
160
|
+
## ⚠️ CRITICAL: 병렬 검사 필수
|
|
161
|
+
|
|
162
|
+
**tsc와 eslint는 반드시 단일 메시지에서 병렬로 실행해야 합니다.**
|
|
163
|
+
|
|
164
|
+
### 올바른 실행 방법
|
|
165
|
+
|
|
166
|
+
```typescript
|
|
167
|
+
// ✅ 단일 메시지에서 2개 Bash 동시 호출
|
|
168
|
+
Bash({ command: "npx tsc --noEmit", description: "TypeScript type check" })
|
|
169
|
+
Bash({ command: "npx eslint .", description: "ESLint check" })
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
**이렇게 하면:**
|
|
173
|
+
- 2개의 검사가 동시에 실행됨
|
|
174
|
+
- 총 실행 시간 = max(tsc 시간, eslint 시간)
|
|
175
|
+
- 순차 실행 대비 약 50% 시간 단축
|
|
176
|
+
|
|
177
|
+
### 잘못된 실행 방법
|
|
178
|
+
|
|
179
|
+
```typescript
|
|
180
|
+
// ❌ 순차 실행 (느림)
|
|
181
|
+
Bash({ command: "npx tsc --noEmit", description: "..." })
|
|
182
|
+
// 대기...
|
|
183
|
+
Bash({ command: "npx eslint .", description: "..." })
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
**이렇게 하면:**
|
|
187
|
+
- tsc 완료 후 eslint 시작
|
|
188
|
+
- 총 실행 시간 = tsc 시간 + eslint 시간
|
|
189
|
+
- 불필요한 대기 시간 발생
|
|
190
|
+
|
|
191
|
+
### 병렬 검사 체크리스트
|
|
192
|
+
|
|
193
|
+
작업 시작 전 확인:
|
|
194
|
+
|
|
195
|
+
- [ ] tsc와 eslint를 단일 메시지에서 호출하는가?
|
|
196
|
+
- [ ] 2개의 Bash 도구를 연속으로 작성했는가?
|
|
197
|
+
- [ ] 중간에 대기나 다른 작업이 없는가?
|
|
198
|
+
|
|
199
|
+
**모든 항목이 체크되어야 올바른 병렬 실행입니다.**
|
|
200
|
+
|
|
201
|
+
### 파일별 병렬 수정 패턴
|
|
202
|
+
|
|
203
|
+
**독립적인 파일의 오류는 병렬 수정 가능:**
|
|
204
|
+
|
|
205
|
+
```typescript
|
|
206
|
+
// ✅ 서로 다른 파일 동시 수정
|
|
207
|
+
Task({ subagent_type: 'lint-fixer', model: 'haiku',
|
|
208
|
+
prompt: 'src/utils/format.ts 린트 오류 수정' })
|
|
209
|
+
Task({ subagent_type: 'lint-fixer', model: 'haiku',
|
|
210
|
+
prompt: 'src/components/Button.tsx 린트 오류 수정' })
|
|
211
|
+
|
|
212
|
+
// ❌ 같은 파일 동시 수정 (충돌 위험)
|
|
213
|
+
Task({ prompt: 'src/utils/format.ts 타입 오류 수정' })
|
|
214
|
+
Task({ prompt: 'src/utils/format.ts 린트 오류 수정' })
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
**규칙:**
|
|
218
|
+
- 독립 파일 → 병렬 수정 가능
|
|
219
|
+
- 동일 파일 → 순차 수정 필수
|
|
220
|
+
- 타입 정의 공유 → 순차 수정 필수
|
|
221
|
+
|
|
222
|
+
### 실제 실행 워크플로우
|
|
223
|
+
|
|
224
|
+
**Step 1: 병렬 검사 (필수)**
|
|
225
|
+
|
|
226
|
+
```typescript
|
|
227
|
+
// 커맨드 시작 시 즉시 실행
|
|
228
|
+
Bash({
|
|
229
|
+
command: "npx tsc --noEmit",
|
|
230
|
+
description: "TypeScript type check"
|
|
231
|
+
})
|
|
232
|
+
Bash({
|
|
233
|
+
command: "npx eslint .",
|
|
234
|
+
description: "ESLint check"
|
|
235
|
+
})
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
**Step 2: 오류 분석 및 그룹핑**
|
|
239
|
+
|
|
240
|
+
- 간단한 오류: 즉시 수정 (Sequential Thinking 불필요)
|
|
241
|
+
- 복잡한 오류: Sequential Thinking 3-5단계로 분석
|
|
242
|
+
|
|
243
|
+
**Step 3: 독립 파일 병렬 수정**
|
|
244
|
+
|
|
245
|
+
```typescript
|
|
246
|
+
// 서로 다른 파일의 간단한 오류
|
|
247
|
+
Edit({ file_path: "src/utils/format.ts", ... }) // 파일 1
|
|
248
|
+
Edit({ file_path: "src/components/Button.tsx", ... }) // 파일 2
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
**Step 4: 재검사**
|
|
252
|
+
|
|
253
|
+
```typescript
|
|
254
|
+
// 수정된 파일들 병렬 재검사
|
|
255
|
+
Bash({
|
|
256
|
+
command: "npx tsc --noEmit src/utils/format.ts",
|
|
257
|
+
description: "Verify format.ts fixes"
|
|
258
|
+
})
|
|
259
|
+
Bash({
|
|
260
|
+
command: "npx tsc --noEmit src/components/Button.tsx",
|
|
261
|
+
description: "Verify Button.tsx fixes"
|
|
262
|
+
})
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
**전체 실행 시간:**
|
|
266
|
+
- 순차: 검사(4초) + 수정1(2초) + 재검사1(1초) + 수정2(2초) + 재검사2(1초) = 10초
|
|
267
|
+
- 병렬: 검사(2초) + 수정1,2 병렬(2초) + 재검사(1초) = 5초
|
|
268
|
+
- **개선: 50% 시간 단축**
|
|
269
|
+
|
|
270
|
+
</parallel_execution_critical>
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
237
274
|
<sequential_thinking>
|
|
238
275
|
|
|
239
276
|
**각 오류마다 필수:**
|
|
@@ -3,7 +3,8 @@ description: 프로젝트 분석 후 ESLint flat config 설정
|
|
|
3
3
|
allowed-tools: Read, Write, Edit, Glob, Bash, mcp__sequential-thinking__sequentialthinking
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
@../instructions/
|
|
6
|
+
@../instructions/multi-agent/coordination-guide.md
|
|
7
|
+
@../instructions/multi-agent/execution-patterns.md
|
|
7
8
|
|
|
8
9
|
# Lint Init Command
|
|
9
10
|
|
|
@@ -256,59 +257,6 @@ npm install -D eslint @eslint/js globals @typescript-eslint/parser @typescript-e
|
|
|
256
257
|
|
|
257
258
|
---
|
|
258
259
|
|
|
259
|
-
<parallel_agent_execution>
|
|
260
|
-
|
|
261
|
-
## 병렬 Agent 실행
|
|
262
|
-
|
|
263
|
-
### Recommended Agents
|
|
264
|
-
|
|
265
|
-
| Agent | Model | 역할 |
|
|
266
|
-
|-------|-------|------|
|
|
267
|
-
| **@implementation-executor** | sonnet | ESLint 설정 구현 |
|
|
268
|
-
| **@explore** | haiku | 프로젝트 구조 탐색 |
|
|
269
|
-
| **@analyst** | sonnet | 프로젝트 패턴 분석 |
|
|
270
|
-
|
|
271
|
-
### Parallel Execution Patterns
|
|
272
|
-
|
|
273
|
-
| 패턴 | 병렬 작업 | 효과 |
|
|
274
|
-
|------|-----------|------|
|
|
275
|
-
| **탐색 + 분석** | explore (haiku) + analyst (sonnet) | 프로젝트 이해 속도 향상 |
|
|
276
|
-
| **설정 + 문서** | implementation-executor + document-writer | 구현과 문서화 동시 진행 |
|
|
277
|
-
|
|
278
|
-
### Model Routing
|
|
279
|
-
|
|
280
|
-
| 복잡도 | 모델 | 조건 |
|
|
281
|
-
|--------|------|------|
|
|
282
|
-
| **LOW** | haiku / sonnet | 기본 JS/TS 프로젝트, 단일 프레임워크 |
|
|
283
|
-
| **MEDIUM** | sonnet | 커스텀 룰 설정, 여러 프레임워크 혼재 |
|
|
284
|
-
| **HIGH** | opus | 복잡한 모노레포, 레거시 마이그레이션 |
|
|
285
|
-
|
|
286
|
-
### Practical Examples
|
|
287
|
-
|
|
288
|
-
```typescript
|
|
289
|
-
// ✅ 탐색 + 분석 병렬
|
|
290
|
-
Task(subagent_type="explore", model="haiku",
|
|
291
|
-
prompt="프로젝트 파일 구조 파악 (package.json, tsconfig.json, src/)")
|
|
292
|
-
|
|
293
|
-
Task(subagent_type="analyst", model="sonnet",
|
|
294
|
-
prompt="코드 패턴 및 스타일 분석 (import 방식, 파일명 컨벤션)")
|
|
295
|
-
|
|
296
|
-
// ✅ 설정 + 문서 병렬
|
|
297
|
-
Task(subagent_type="implementation-executor", model="sonnet",
|
|
298
|
-
prompt="ESLint flat config 생성 (TypeScript + React)")
|
|
299
|
-
|
|
300
|
-
Task(subagent_type="document-writer", model="haiku",
|
|
301
|
-
prompt="린트 설정 가이드 작성 (패키지 설치 명령어, 사용법)")
|
|
302
|
-
|
|
303
|
-
// ✅ 복잡한 마이그레이션
|
|
304
|
-
Task(subagent_type="implementation-executor", model="opus",
|
|
305
|
-
prompt=".eslintrc.json → flat config 변환 (커스텀 룰 200+ 보존)")
|
|
306
|
-
```
|
|
307
|
-
|
|
308
|
-
</parallel_agent_execution>
|
|
309
|
-
|
|
310
|
-
---
|
|
311
|
-
|
|
312
260
|
<validation>
|
|
313
261
|
|
|
314
262
|
## 검증 단계
|
|
@@ -4,6 +4,9 @@ allowed-tools: Bash(tsc:*, npx:*, yarn:*, npm:*, pnpm:*), Read, Edit, mcp__seque
|
|
|
4
4
|
argument-hint: [파일/디렉토리 경로...]
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
@../instructions/multi-agent/coordination-guide.md
|
|
8
|
+
@../instructions/multi-agent/execution-patterns.md
|
|
9
|
+
|
|
7
10
|
# Pre-Deploy Command
|
|
8
11
|
|
|
9
12
|
> 배포 전 typecheck/lint/build를 Sequential Thinking으로 검증하고 수정
|
|
@@ -59,88 +62,6 @@ argument-hint: [파일/디렉토리 경로...]
|
|
|
59
62
|
|
|
60
63
|
---
|
|
61
64
|
|
|
62
|
-
<parallel_agent_execution>
|
|
63
|
-
|
|
64
|
-
## 병렬 Agent 실행
|
|
65
|
-
|
|
66
|
-
**권장 Agent:**
|
|
67
|
-
|
|
68
|
-
| Agent | 모델 | 용도 |
|
|
69
|
-
|-------|------|------|
|
|
70
|
-
| @deployment-validator | sonnet/opus | 전체 검증 자동화 (typecheck + lint + build) |
|
|
71
|
-
| @lint-fixer | haiku/sonnet | 린트 오류 자동 수정 |
|
|
72
|
-
| @code-reviewer | sonnet | 배포 전 코드 품질 리뷰 |
|
|
73
|
-
|
|
74
|
-
**병렬 실행 패턴:**
|
|
75
|
-
|
|
76
|
-
| 작업 유형 | 실행 방식 | 이유 |
|
|
77
|
-
|----------|----------|------|
|
|
78
|
-
| typecheck + lint 검사 | ✅ 병렬 가능 | 읽기 전용, 파일 충돌 없음 |
|
|
79
|
-
| 오류 수정 | ❌ 순차 실행 | 동일 파일 동시 수정 방지 |
|
|
80
|
-
| 검증 + 문서화 | ✅ 병렬 가능 | validator + document-writer 독립적 |
|
|
81
|
-
| build + test | ❌ 순차 실행 | build 완료 후 test 실행 |
|
|
82
|
-
|
|
83
|
-
**모델 라우팅:**
|
|
84
|
-
|
|
85
|
-
| 복잡도 | 모델 | 사용 시나리오 |
|
|
86
|
-
|--------|------|-------------|
|
|
87
|
-
| LOW | haiku | 간단한 린트 오류, 단순 검증 |
|
|
88
|
-
| MEDIUM | sonnet | 일반적인 typecheck/lint 검증, 수정 |
|
|
89
|
-
| HIGH | opus | 복잡한 타입 오류, 아키텍처 영향 분석 |
|
|
90
|
-
|
|
91
|
-
**실전 예시:**
|
|
92
|
-
|
|
93
|
-
```typescript
|
|
94
|
-
// ✅ 병렬 검사 (읽기 전용)
|
|
95
|
-
Task({
|
|
96
|
-
subagent_type: "deployment-validator",
|
|
97
|
-
model: "sonnet",
|
|
98
|
-
prompt: "typecheck 실행 및 검증"
|
|
99
|
-
})
|
|
100
|
-
Task({
|
|
101
|
-
subagent_type: "deployment-validator",
|
|
102
|
-
model: "sonnet",
|
|
103
|
-
prompt: "lint 실행 및 검증"
|
|
104
|
-
})
|
|
105
|
-
|
|
106
|
-
// ✅ 검증 + 문서화 병렬
|
|
107
|
-
Task({
|
|
108
|
-
subagent_type: "deployment-validator",
|
|
109
|
-
model: "sonnet",
|
|
110
|
-
prompt: "배포 전 전체 검증"
|
|
111
|
-
})
|
|
112
|
-
Task({
|
|
113
|
-
subagent_type: "document-writer",
|
|
114
|
-
model: "haiku",
|
|
115
|
-
prompt: "CHANGELOG.md 업데이트"
|
|
116
|
-
})
|
|
117
|
-
|
|
118
|
-
// ❌ 수정 작업은 순차 실행 (충돌 방지)
|
|
119
|
-
// 잘못된 예시:
|
|
120
|
-
Task({ prompt: "src/utils/calc.ts 타입 오류 수정" })
|
|
121
|
-
Task({ prompt: "src/utils/calc.ts 린트 오류 수정" })
|
|
122
|
-
// → 동일 파일 동시 수정으로 충돌 발생
|
|
123
|
-
|
|
124
|
-
// ✅ 올바른 순차 실행:
|
|
125
|
-
// 1. typecheck + lint 병렬 검사
|
|
126
|
-
// 2. 오류 목록 파악
|
|
127
|
-
// 3. 파일별 순차 수정
|
|
128
|
-
// 4. build 실행
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
**Agent 조합 권장:**
|
|
132
|
-
|
|
133
|
-
| 목표 | Agent 조합 | 실행 방식 |
|
|
134
|
-
|------|-----------|----------|
|
|
135
|
-
| 빠른 검증 | @deployment-validator (haiku) | 단독 실행 |
|
|
136
|
-
| 전체 검증 + 수정 | @deployment-validator (sonnet) → @lint-fixer (haiku) | 순차 |
|
|
137
|
-
| 배포 준비 | @deployment-validator (sonnet) + @code-reviewer (sonnet) | 병렬 |
|
|
138
|
-
| 자동화된 CI | @deployment-validator (opus) | 단독 실행 |
|
|
139
|
-
|
|
140
|
-
</parallel_agent_execution>
|
|
141
|
-
|
|
142
|
-
---
|
|
143
|
-
|
|
144
65
|
<required>
|
|
145
66
|
|
|
146
67
|
| 분류 | 필수 |
|
|
@@ -188,6 +109,146 @@ Task({ prompt: "src/utils/calc.ts 린트 오류 수정" })
|
|
|
188
109
|
|
|
189
110
|
---
|
|
190
111
|
|
|
112
|
+
<parallel_execution_critical>
|
|
113
|
+
|
|
114
|
+
## ⚠️ CRITICAL: 병렬 검사 필수
|
|
115
|
+
|
|
116
|
+
**typecheck와 lint는 반드시 단일 메시지에서 병렬로 실행해야 합니다.**
|
|
117
|
+
|
|
118
|
+
### 올바른 실행 방법
|
|
119
|
+
|
|
120
|
+
```typescript
|
|
121
|
+
// ✅ 단일 메시지에서 2개 Bash 동시 호출
|
|
122
|
+
Bash({ command: "npx tsc --noEmit", description: "TypeScript type check" })
|
|
123
|
+
Bash({ command: "npx eslint .", description: "ESLint check" })
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**이렇게 하면:**
|
|
127
|
+
- typecheck와 lint가 동시에 실행됨
|
|
128
|
+
- 총 실행 시간 = max(typecheck 시간, lint 시간)
|
|
129
|
+
- 순차 실행 대비 약 50% 시간 단축
|
|
130
|
+
|
|
131
|
+
### 잘못된 실행 방법
|
|
132
|
+
|
|
133
|
+
```typescript
|
|
134
|
+
// ❌ 순차 실행 (느림)
|
|
135
|
+
Bash({ command: "npx tsc --noEmit", description: "..." })
|
|
136
|
+
// 대기...
|
|
137
|
+
Bash({ command: "npx eslint .", description: "..." })
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**이렇게 하면:**
|
|
141
|
+
- typecheck 완료 후 lint 시작
|
|
142
|
+
- 총 실행 시간 = typecheck 시간 + lint 시간
|
|
143
|
+
- 불필요한 대기 시간 발생
|
|
144
|
+
|
|
145
|
+
### 병렬 검사 체크리스트
|
|
146
|
+
|
|
147
|
+
배포 전 확인:
|
|
148
|
+
|
|
149
|
+
- [ ] typecheck와 lint를 단일 메시지에서 호출하는가?
|
|
150
|
+
- [ ] 2개의 Bash 도구를 연속으로 작성했는가?
|
|
151
|
+
- [ ] 중간에 대기나 분석이 없는가?
|
|
152
|
+
- [ ] 오류 수정은 순차로 진행하는가?
|
|
153
|
+
- [ ] build는 오류 수정 완료 후 실행하는가?
|
|
154
|
+
|
|
155
|
+
**모든 항목이 체크되어야 올바른 배포 준비입니다.**
|
|
156
|
+
|
|
157
|
+
### 검증 + 문서화 병렬 패턴
|
|
158
|
+
|
|
159
|
+
**검증과 문서화는 독립적이므로 병렬 가능:**
|
|
160
|
+
|
|
161
|
+
```typescript
|
|
162
|
+
// ✅ 검증 + 문서 업데이트 병렬
|
|
163
|
+
Task({ subagent_type: 'deployment-validator', model: 'sonnet',
|
|
164
|
+
prompt: 'typecheck + lint + build 전체 검증' })
|
|
165
|
+
Task({ subagent_type: 'document-writer', model: 'haiku',
|
|
166
|
+
prompt: 'CHANGELOG.md 업데이트' })
|
|
167
|
+
|
|
168
|
+
// ✅ 여러 관점의 코드 리뷰 병렬
|
|
169
|
+
Task({ subagent_type: 'code-reviewer', model: 'opus',
|
|
170
|
+
prompt: '보안 검토 (SQL Injection, XSS, CSRF)' })
|
|
171
|
+
Task({ subagent_type: 'code-reviewer', model: 'opus',
|
|
172
|
+
prompt: '성능 검토 (N+1 쿼리, 메모이제이션)' })
|
|
173
|
+
Task({ subagent_type: 'code-reviewer', model: 'opus',
|
|
174
|
+
prompt: '접근성 검토 (ARIA, 키보드 네비게이션)' })
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
**규칙:**
|
|
178
|
+
- 검사 단계 → 병렬 실행
|
|
179
|
+
- 오류 수정 → 순차 실행 (파일 충돌 방지)
|
|
180
|
+
- 검증 + 문서화 → 병렬 가능
|
|
181
|
+
- build → 오류 수정 완료 후
|
|
182
|
+
|
|
183
|
+
### 실제 배포 준비 워크플로우
|
|
184
|
+
|
|
185
|
+
**Step 1: 병렬 검사 (필수)**
|
|
186
|
+
|
|
187
|
+
```typescript
|
|
188
|
+
// 배포 준비 시작 시 즉시 실행
|
|
189
|
+
Bash({
|
|
190
|
+
command: "npx tsc --noEmit",
|
|
191
|
+
description: "TypeScript type check"
|
|
192
|
+
})
|
|
193
|
+
Bash({
|
|
194
|
+
command: "npx eslint .",
|
|
195
|
+
description: "ESLint check"
|
|
196
|
+
})
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
**Step 2: 오류 수정 (순차)**
|
|
200
|
+
|
|
201
|
+
- 오류가 있으면 하나씩 수정
|
|
202
|
+
- 각 수정 후 해당 파일만 재검사
|
|
203
|
+
|
|
204
|
+
**Step 3: 전체 재검사**
|
|
205
|
+
|
|
206
|
+
```typescript
|
|
207
|
+
// 모든 수정 완료 후 전체 검사
|
|
208
|
+
Bash({
|
|
209
|
+
command: "npx tsc --noEmit",
|
|
210
|
+
description: "Final type check"
|
|
211
|
+
})
|
|
212
|
+
Bash({
|
|
213
|
+
command: "npx eslint .",
|
|
214
|
+
description: "Final lint check"
|
|
215
|
+
})
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
**Step 4: Build**
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
npm run build # 또는 yarn build, pnpm build
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
**Step 5: 검증 + 문서화 (병렬)**
|
|
225
|
+
|
|
226
|
+
```typescript
|
|
227
|
+
// build 성공 후 병렬 작업
|
|
228
|
+
Task({
|
|
229
|
+
subagent_type: 'code-reviewer',
|
|
230
|
+
model: 'opus',
|
|
231
|
+
description: '배포 전 최종 코드 리뷰',
|
|
232
|
+
prompt: '보안, 성능, 접근성 종합 검토'
|
|
233
|
+
})
|
|
234
|
+
Task({
|
|
235
|
+
subagent_type: 'document-writer',
|
|
236
|
+
model: 'haiku',
|
|
237
|
+
description: 'CHANGELOG 업데이트',
|
|
238
|
+
prompt: '배포 버전 변경사항 문서화'
|
|
239
|
+
})
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
**전체 실행 시간:**
|
|
243
|
+
- 순차: 검사1(3초) + 검사2(2초) + 수정(5초) + 재검사1(3초) + 재검사2(2초) + build(10초) = 25초
|
|
244
|
+
- 병렬: 검사(3초) + 수정(5초) + 재검사(3초) + build(10초) = 21초
|
|
245
|
+
- **개선: 16% 시간 단축** (검사 단계만 병렬화 시)
|
|
246
|
+
- 검증+문서화까지 병렬화 시 추가 30% 단축 가능
|
|
247
|
+
|
|
248
|
+
</parallel_execution_critical>
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
191
252
|
<sequential_thinking>
|
|
192
253
|
|
|
193
254
|
**각 오류마다 필수:**
|