@kood/claude-code 0.5.3 → 0.5.4
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 +548 -340
- package/package.json +1 -1
- package/templates/.claude/agents/document-writer.md +71 -304
- package/templates/.claude/instructions/agent-patterns/index.md +7 -7
- package/templates/.claude/instructions/document-templates/ralph-templates.md +71 -0
- package/templates/.claude/instructions/index.md +14 -14
- package/templates/.claude/instructions/multi-agent/agent-roster.md +14 -14
- package/templates/.claude/instructions/multi-agent/index.md +4 -4
- package/templates/.claude/skills/docs-creator/AGENTS.md +54 -176
- package/templates/.claude/skills/docs-creator/SKILL.md +97 -463
- package/templates/.claude/skills/docs-refactor/AGENTS.md +61 -190
- package/templates/.claude/skills/docs-refactor/SKILL.md +66 -442
- package/templates/.claude/skills/execute/SKILL.md +540 -13
- package/templates/.claude/skills/plan/SKILL.md +83 -17
- package/templates/.claude/skills/ralph/SKILL.md +17 -14
- package/templates/.claude/skills/refactor/AGENTS.md +269 -0
- package/templates/.claude/skills/refactor/SKILL.md +424 -66
- package/templates/.claude/skills/stitch-design/README.md +34 -0
- package/templates/.claude/skills/stitch-design/SKILL.md +213 -0
- package/templates/.claude/skills/stitch-design/examples/DESIGN.md +154 -0
- package/templates/.claude/skills/stitch-loop/README.md +54 -0
- package/templates/.claude/skills/stitch-loop/SKILL.md +316 -0
- package/templates/.claude/skills/stitch-loop/examples/SITE.md +73 -0
- package/templates/.claude/skills/stitch-loop/examples/next-prompt.md +25 -0
- package/templates/.claude/skills/stitch-loop/resources/baton-schema.md +61 -0
- package/templates/.claude/skills/stitch-loop/resources/site-template.md +104 -0
- package/templates/.claude/skills/stitch-react/README.md +36 -0
- package/templates/.claude/skills/stitch-react/SKILL.md +323 -0
- package/templates/.claude/skills/stitch-react/examples/gold-standard-card.tsx +88 -0
- package/templates/.claude/skills/stitch-react/package-lock.json +231 -0
- package/templates/.claude/skills/stitch-react/package.json +16 -0
- package/templates/.claude/skills/stitch-react/resources/architecture-checklist.md +15 -0
- package/templates/.claude/skills/stitch-react/resources/component-template.tsx +37 -0
- package/templates/.claude/skills/stitch-react/resources/stitch-api-reference.md +14 -0
- package/templates/.claude/skills/stitch-react/resources/style-guide.json +24 -0
- package/templates/.claude/skills/stitch-react/scripts/fetch-stitch.sh +30 -0
- package/templates/.claude/skills/stitch-react/scripts/validate.js +77 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: docs-creator
|
|
3
|
-
description: Claude Code 문서
|
|
3
|
+
description: Claude Code 문서 작성. CLAUDE.md, SKILL.md, COMMAND.md 효율적 작성.
|
|
4
4
|
metadata:
|
|
5
5
|
author: kood
|
|
6
|
-
version: "
|
|
6
|
+
version: "2.0.0"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
@../../instructions/workflow-patterns/sequential-thinking.md
|
|
@@ -12,12 +12,10 @@ metadata:
|
|
|
12
12
|
|
|
13
13
|
# Docs Creator Skill
|
|
14
14
|
|
|
15
|
-
>
|
|
15
|
+
> Anthropic 가이드라인 기반 고밀도 문서 작성
|
|
16
16
|
|
|
17
17
|
<purpose>
|
|
18
|
-
|
|
19
|
-
**목표:** 고밀도, 실행 가능한, 유지보수 가능한 문서 작성
|
|
20
|
-
|
|
18
|
+
고밀도, 실행 가능, 유지보수 가능한 문서 작성
|
|
21
19
|
</purpose>
|
|
22
20
|
|
|
23
21
|
---
|
|
@@ -26,11 +24,9 @@ metadata:
|
|
|
26
24
|
|
|
27
25
|
| 상황 | 작성 필요 |
|
|
28
26
|
|------|----------|
|
|
29
|
-
| **새 프로젝트** | CLAUDE.md
|
|
30
|
-
| **새 스킬** | SKILL.md
|
|
31
|
-
| **새 커맨드** | COMMAND.md
|
|
32
|
-
| **문서 부재** | 프로젝트 규칙 문서화 |
|
|
33
|
-
| **지식 공유** | 팀 온보딩 가이드 |
|
|
27
|
+
| **새 프로젝트** | CLAUDE.md |
|
|
28
|
+
| **새 스킬** | SKILL.md |
|
|
29
|
+
| **새 커맨드** | COMMAND.md |
|
|
34
30
|
|
|
35
31
|
</trigger_conditions>
|
|
36
32
|
|
|
@@ -38,253 +34,80 @@ metadata:
|
|
|
38
34
|
|
|
39
35
|
<parallel_agent_execution>
|
|
40
36
|
|
|
41
|
-
##
|
|
42
|
-
|
|
43
|
-
**목표:** 독립적인 문서 작업을 동시에 처리하여 작업 시간 최소화, 품질 향상.
|
|
37
|
+
## 핵심 원칙
|
|
44
38
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
|
48
|
-
|
|
49
|
-
| **
|
|
50
|
-
| **DELEGATE** | 전문 에이전트에게 즉시 위임 | 품질 향상, 컨텍스트 격리 |
|
|
51
|
-
| **SMART MODEL** | 작업 복잡도별 모델 선택 | 비용 최적화 |
|
|
39
|
+
| 원칙 | 방법 | 효과 |
|
|
40
|
+
|------|------|------|
|
|
41
|
+
| **PARALLEL** | 단일 메시지 여러 에이전트 호출 | 5-10배 속도 |
|
|
42
|
+
| **DELEGATE** | 전문 에이전트 즉시 위임 | 품질 향상 |
|
|
43
|
+
| **SMART MODEL** | 작업 복잡도별 모델 | 비용 최적화 |
|
|
52
44
|
|
|
53
|
-
**기본 패턴:**
|
|
54
45
|
```typescript
|
|
55
|
-
// ❌ 순차
|
|
56
|
-
Task(...) // 60초
|
|
57
|
-
Task(...) // 60초
|
|
58
|
-
// 총 120초
|
|
46
|
+
// ❌ 순차 (120초)
|
|
47
|
+
Task(...) // 60초
|
|
48
|
+
Task(...) // 60초
|
|
59
49
|
|
|
60
|
-
// ✅ 병렬
|
|
50
|
+
// ✅ 병렬 (60초) - 단일 메시지
|
|
61
51
|
Task(subagent_type="explore", model="haiku", prompt="...")
|
|
62
52
|
Task(subagent_type="document-writer", model="haiku", prompt="...")
|
|
63
|
-
// 총 60초 (가장 긴 작업 기준)
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
---
|
|
67
|
-
|
|
68
|
-
### Phase별 에이전트 활용
|
|
69
|
-
|
|
70
|
-
#### Phase 1: 탐색 + 문서 정의 (병렬)
|
|
71
|
-
|
|
72
|
-
```typescript
|
|
73
|
-
// 탐색: 프로젝트 구조 파악 (haiku, 빠름)
|
|
74
|
-
Task(subagent_type="explore", model="haiku",
|
|
75
|
-
prompt="프로젝트 코드베이스 구조 분석 - 주요 패턴, 라이브러리, 컨벤션 파악")
|
|
76
|
-
|
|
77
|
-
// 분석: 문서 구조 결정 (sonnet, 정확)
|
|
78
|
-
Task(subagent_type="analyst", model="sonnet",
|
|
79
|
-
prompt="CLAUDE.md 작성을 위한 핵심 규칙 추출 - forbidden, required, patterns 식별")
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
**예상 시간:** 60초 (병렬 실행)
|
|
83
|
-
|
|
84
|
-
---
|
|
85
|
-
|
|
86
|
-
#### Phase 2: 병렬 문서 작성
|
|
87
|
-
|
|
88
|
-
```typescript
|
|
89
|
-
// 여러 문서 동시 작성 (haiku/sonnet)
|
|
90
|
-
Task(subagent_type="document-writer", model="haiku",
|
|
91
|
-
prompt=`CLAUDE.md 작성
|
|
92
|
-
- 프로젝트: TanStack Start
|
|
93
|
-
- 포함: forbidden, required, tech_stack, quick_patterns
|
|
94
|
-
- 참조: @docs/library/tanstack-start/index.md`)
|
|
95
|
-
|
|
96
|
-
Task(subagent_type="document-writer", model="haiku",
|
|
97
|
-
prompt=`Git 규칙 문서 작성
|
|
98
|
-
- 파일: .claude/instructions/git-rules.md
|
|
99
|
-
- 포함: 커밋 메시지 규칙, 브랜치 전략`)
|
|
100
|
-
|
|
101
|
-
Task(subagent_type="document-writer", model="sonnet",
|
|
102
|
-
prompt=`Prisma 가이드 작성
|
|
103
|
-
- 파일: docs/library/prisma/index.md
|
|
104
|
-
- 버전: 7.x 특화
|
|
105
|
-
- Multi-file 구조 패턴`)
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
**예상 시간:** 60초 (3개 문서 동시 작성)
|
|
109
|
-
|
|
110
|
-
---
|
|
111
|
-
|
|
112
|
-
#### Phase 3: 검증 (복잡한 경우)
|
|
113
|
-
|
|
114
|
-
```typescript
|
|
115
|
-
// 아키텍처 문서는 Opus로 검토
|
|
116
|
-
Task(subagent_type="architect", model="opus",
|
|
117
|
-
prompt=`작성된 CLAUDE.md 검토
|
|
118
|
-
- XML 구조 올바름
|
|
119
|
-
- 예시 코드 실행 가능
|
|
120
|
-
- 토큰 효율성 (500줄 이하)
|
|
121
|
-
- 버전 명시 확인`)
|
|
122
53
|
```
|
|
123
54
|
|
|
124
|
-
**적용:** 복잡한 아키텍처 문서, 보안/성능 패턴 문서만.
|
|
125
|
-
|
|
126
55
|
---
|
|
127
56
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
| 에이전트 | 모델 | 문서 작업 용도 | 병렬 가능 |
|
|
131
|
-
|---------|------|---------------|----------|
|
|
132
|
-
| **explore** | haiku | 프로젝트 구조 탐색, 기존 패턴 검색 | ✅ |
|
|
133
|
-
| **analyst** | sonnet | 규칙 추출, 문서 구조 결정 | ✅ |
|
|
134
|
-
| **document-writer** | haiku/sonnet | 실제 문서 작성 (CLAUDE.md, SKILL.md) | ✅ |
|
|
135
|
-
| **architect** | opus | 복잡한 아키텍처 문서 검토 | ✅ |
|
|
136
|
-
|
|
137
|
-
---
|
|
57
|
+
## Phase별 활용
|
|
138
58
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
```typescript
|
|
146
|
-
// ❌ 순차 읽기 (느림)
|
|
147
|
-
Read({ file_path: "src/file1.ts" })
|
|
148
|
-
// 대기...
|
|
149
|
-
Read({ file_path: "src/file2.ts" })
|
|
150
|
-
|
|
151
|
-
// ✅ 병렬 읽기 (빠름)
|
|
152
|
-
Read({ file_path: "src/file1.ts" })
|
|
153
|
-
Read({ file_path: "src/file2.ts" })
|
|
154
|
-
Read({ file_path: "src/file3.ts" })
|
|
155
|
-
Read({ file_path: "docs/api.md" })
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
**복잡한 탐색은 explore 에이전트 활용:**
|
|
159
|
-
|
|
160
|
-
```typescript
|
|
161
|
-
// 여러 영역 동시 탐색
|
|
162
|
-
Task(subagent_type="explore", model="haiku",
|
|
163
|
-
prompt="영역 1 파일 구조 및 패턴 분석")
|
|
164
|
-
Task(subagent_type="explore", model="haiku",
|
|
165
|
-
prompt="영역 2 의존성 및 관계 분석")
|
|
166
|
-
```
|
|
59
|
+
| Phase | 작업 | 에이전트 | 모델 | 병렬 |
|
|
60
|
+
|-------|------|---------|------|------|
|
|
61
|
+
| **1** | 구조 파악 | explore | haiku | ✅ |
|
|
62
|
+
| **1** | 규칙 추출 | analyst | sonnet | ✅ |
|
|
63
|
+
| **2** | 문서 작성 | document-writer | haiku/sonnet | ✅ |
|
|
64
|
+
| **3** | 검증 (복잡) | architect | opus | ✅ |
|
|
167
65
|
|
|
168
66
|
---
|
|
169
67
|
|
|
170
|
-
|
|
68
|
+
## 실전 패턴
|
|
171
69
|
|
|
172
|
-
|
|
70
|
+
### 패턴 1: 다중 문서 동시 작성
|
|
173
71
|
|
|
174
72
|
```typescript
|
|
175
|
-
//
|
|
73
|
+
// CLAUDE.md + 3개 라이브러리 가이드 (60초)
|
|
176
74
|
Task(subagent_type="document-writer", model="haiku",
|
|
177
75
|
prompt="CLAUDE.md 작성 - 프로젝트 규칙")
|
|
178
76
|
Task(subagent_type="document-writer", model="haiku",
|
|
179
|
-
prompt="TanStack Start 가이드
|
|
77
|
+
prompt="TanStack Start 가이드")
|
|
180
78
|
Task(subagent_type="document-writer", model="haiku",
|
|
181
|
-
prompt="Prisma 가이드
|
|
79
|
+
prompt="Prisma 가이드")
|
|
182
80
|
Task(subagent_type="document-writer", model="haiku",
|
|
183
|
-
prompt="Zod 가이드
|
|
81
|
+
prompt="Zod 가이드")
|
|
184
82
|
```
|
|
185
83
|
|
|
186
|
-
**효과:**
|
|
187
|
-
- 순차 실행: 240초 (60 × 4)
|
|
188
|
-
- 병렬 실행: 60초
|
|
189
|
-
- **4배 향상**
|
|
84
|
+
**효과:** 순차 240초 → 병렬 60초 (4배)
|
|
190
85
|
|
|
191
86
|
---
|
|
192
87
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
**상황:** 새 라이브러리 문서 작성 (버전/API 조사 필요)
|
|
88
|
+
### 패턴 2: 조사 + 작성 병렬
|
|
196
89
|
|
|
197
90
|
```typescript
|
|
198
|
-
// 탐색과 작성 동시
|
|
91
|
+
// 탐색과 작성 동시
|
|
199
92
|
Task(subagent_type="explore", model="haiku",
|
|
200
|
-
prompt="
|
|
201
|
-
|
|
93
|
+
prompt="프로젝트 React Query 사용 패턴 조사")
|
|
202
94
|
Task(subagent_type="document-writer", model="haiku",
|
|
203
|
-
prompt
|
|
204
|
-
- 기본 구조만 작성 (버전은 나중에 추가)
|
|
205
|
-
- useQuery, useMutation 패턴
|
|
206
|
-
- 에러 처리`)
|
|
207
|
-
|
|
208
|
-
// 탐색 결과 확인 후 버전 정보 추가
|
|
209
|
-
Read(".../react-query-usage.md") // explore 결과
|
|
210
|
-
Edit("docs/library/react-query/index.md", ...) // 버전 정보 추가
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
**효과:**
|
|
214
|
-
- 대기 시간 제거
|
|
215
|
-
- 초안 작성 중 조사 완료
|
|
216
|
-
|
|
217
|
-
---
|
|
95
|
+
prompt="React Query 가이드 초안 (버전 나중 추가)")
|
|
218
96
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
```typescript
|
|
224
|
-
// 공통 조사 (1회만)
|
|
225
|
-
Task(subagent_type="explore", model="haiku",
|
|
226
|
-
prompt="프로젝트의 스킬 패턴 분석 - 기존 SKILL.md 구조")
|
|
227
|
-
|
|
228
|
-
// 병렬 작성 (5개 동시)
|
|
229
|
-
const skills = ["test-runner", "db-migrate", "api-generator", "ui-builder", "deploy"]
|
|
230
|
-
skills.forEach(skill => {
|
|
231
|
-
Task(subagent_type="document-writer", model="haiku",
|
|
232
|
-
prompt=`${skill} 스킬 문서 작성
|
|
233
|
-
- trigger_conditions
|
|
234
|
-
- workflow
|
|
235
|
-
- examples`)
|
|
236
|
-
})
|
|
97
|
+
// 탐색 결과로 버전 정보 추가
|
|
98
|
+
Read(".../react-query-usage.md")
|
|
99
|
+
Edit("docs/library/react-query/index.md", ...)
|
|
237
100
|
```
|
|
238
101
|
|
|
239
|
-
**효과:**
|
|
240
|
-
- 순차: 300초 (60 × 5)
|
|
241
|
-
- 병렬: 60초
|
|
242
|
-
- **5배 향상**
|
|
243
|
-
|
|
244
102
|
---
|
|
245
103
|
|
|
246
104
|
### 모델 라우팅
|
|
247
105
|
|
|
248
|
-
| 복잡도 | 모델 | 문서
|
|
249
|
-
|
|
250
|
-
| **LOW** | haiku |
|
|
251
|
-
| **MEDIUM** | sonnet | CLAUDE.md, 라이브러리 가이드 | 💰💰 |
|
|
252
|
-
| **HIGH** | opus |
|
|
253
|
-
|
|
254
|
-
**선택 기준:**
|
|
255
|
-
```typescript
|
|
256
|
-
// ✅ 간단한 문서 → haiku
|
|
257
|
-
Task(subagent_type="document-writer", model="haiku",
|
|
258
|
-
prompt="Git 커밋 메시지 규칙 문서")
|
|
259
|
-
|
|
260
|
-
// ✅ 일반 가이드 → sonnet
|
|
261
|
-
Task(subagent_type="document-writer", model="sonnet",
|
|
262
|
-
prompt="TanStack Start CLAUDE.md 작성")
|
|
263
|
-
|
|
264
|
-
// ✅ 복잡한 아키텍처 → opus
|
|
265
|
-
Task(subagent_type="architect", model="opus",
|
|
266
|
-
prompt="마이크로서비스 아키텍처 문서 설계 및 검토")
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
---
|
|
270
|
-
|
|
271
|
-
### 체크리스트
|
|
272
|
-
|
|
273
|
-
**병렬 실행 전:**
|
|
274
|
-
- [ ] 독립적인 작업인가? (서로 의존성 없음)
|
|
275
|
-
- [ ] 3개 이상 작업인가? (2개 이하는 순차도 OK)
|
|
276
|
-
- [ ] 각 작업의 복잡도별 모델 선택했는가?
|
|
277
|
-
|
|
278
|
-
**실행 중:**
|
|
279
|
-
- [ ] 단일 메시지에서 여러 Task 호출했는가?
|
|
280
|
-
- [ ] explore는 haiku 사용했는가?
|
|
281
|
-
- [ ] document-writer는 haiku/sonnet 적절히 사용했는가?
|
|
282
|
-
|
|
283
|
-
**실행 후:**
|
|
284
|
-
- [ ] 모든 문서 생성 확인
|
|
285
|
-
- [ ] XML 구조 올바름
|
|
286
|
-
- [ ] 코드 예시 실행 가능
|
|
287
|
-
- [ ] 버전 명시 확인
|
|
106
|
+
| 복잡도 | 모델 | 문서 | 비용 |
|
|
107
|
+
|--------|------|------|------|
|
|
108
|
+
| **LOW** | haiku | 간단 규칙, 반복 패턴 | 💰 |
|
|
109
|
+
| **MEDIUM** | sonnet | CLAUDE.md, 라이브러리 가이드 | 💰💰 |
|
|
110
|
+
| **HIGH** | opus | 아키텍처, 보안/성능 | 💰💰💰 |
|
|
288
111
|
|
|
289
112
|
</parallel_agent_execution>
|
|
290
113
|
|
|
@@ -292,13 +115,13 @@ Task(subagent_type="architect", model="opus",
|
|
|
292
115
|
|
|
293
116
|
<forbidden>
|
|
294
117
|
|
|
295
|
-
| 분류 | 금지
|
|
296
|
-
|
|
297
|
-
| **설명** |
|
|
298
|
-
| **구조** | XML 태그
|
|
299
|
-
| **표현** | 부정형
|
|
300
|
-
| **복잡도** |
|
|
301
|
-
| **강조** |
|
|
118
|
+
| 분류 | 금지 |
|
|
119
|
+
|------|------|
|
|
120
|
+
| **설명** | 장황, 중복, Claude가 아는 것 반복 |
|
|
121
|
+
| **구조** | XML 태그 없음, 모호한 지시 |
|
|
122
|
+
| **표현** | 부정형 (Don't X → Do Y) |
|
|
123
|
+
| **복잡도** | 조건문, 엣지 케이스 나열 |
|
|
124
|
+
| **강조** | CRITICAL/MUST 남발 |
|
|
302
125
|
|
|
303
126
|
</forbidden>
|
|
304
127
|
|
|
@@ -306,13 +129,13 @@ Task(subagent_type="architect", model="opus",
|
|
|
306
129
|
|
|
307
130
|
<required>
|
|
308
131
|
|
|
309
|
-
| 분류 | 필수
|
|
310
|
-
|
|
311
|
-
| **구조** | XML 태그
|
|
312
|
-
| **표현** | 표
|
|
313
|
-
| **예시** |
|
|
314
|
-
| **로딩** | @imports
|
|
315
|
-
| **지시** | 명시적
|
|
132
|
+
| 분류 | 필수 |
|
|
133
|
+
|------|------|
|
|
134
|
+
| **구조** | XML 태그 섹션, 명확한 계층 |
|
|
135
|
+
| **표현** | 표 형식, ✅/❌ 마커 |
|
|
136
|
+
| **예시** | 코드 중심, 복사 가능 |
|
|
137
|
+
| **로딩** | @imports just-in-time |
|
|
138
|
+
| **지시** | 긍정형, 명시적 |
|
|
316
139
|
| **버전** | 라이브러리 버전 명시 |
|
|
317
140
|
|
|
318
141
|
</required>
|
|
@@ -321,17 +144,14 @@ Task(subagent_type="architect", model="opus",
|
|
|
321
144
|
|
|
322
145
|
<document_types>
|
|
323
146
|
|
|
324
|
-
## CLAUDE.md
|
|
325
|
-
|
|
326
|
-
**용도:** 프로젝트별 코딩 규칙, 금지/필수 사항, 빠른 참조
|
|
147
|
+
## CLAUDE.md
|
|
327
148
|
|
|
328
|
-
**구조:**
|
|
329
149
|
```markdown
|
|
330
150
|
# CLAUDE.md - [프로젝트명]
|
|
331
151
|
|
|
332
152
|
<instructions>
|
|
333
|
-
@path/to/common
|
|
334
|
-
@docs/library/[
|
|
153
|
+
@path/to/common.md
|
|
154
|
+
@docs/library/[lib]/index.md
|
|
335
155
|
</instructions>
|
|
336
156
|
|
|
337
157
|
---
|
|
@@ -339,7 +159,7 @@ Task(subagent_type="architect", model="opus",
|
|
|
339
159
|
<forbidden>
|
|
340
160
|
| 분류 | 금지 |
|
|
341
161
|
|------|------|
|
|
342
|
-
| **Git** | AI 표시,
|
|
162
|
+
| **Git** | AI 표시, 이모지 |
|
|
343
163
|
</forbidden>
|
|
344
164
|
|
|
345
165
|
---
|
|
@@ -362,28 +182,25 @@ Task(subagent_type="architect", model="opus",
|
|
|
362
182
|
|
|
363
183
|
<quick_patterns>
|
|
364
184
|
```typescript
|
|
365
|
-
// 복사
|
|
366
|
-
const
|
|
185
|
+
// 복사 가능 패턴
|
|
186
|
+
const fn = (): ReturnType => { ... }
|
|
367
187
|
```
|
|
368
188
|
</quick_patterns>
|
|
369
189
|
```
|
|
370
190
|
|
|
371
191
|
---
|
|
372
192
|
|
|
373
|
-
## SKILL.md
|
|
374
|
-
|
|
375
|
-
**용도:** 특정 작업 자동화 스킬 정의
|
|
193
|
+
## SKILL.md
|
|
376
194
|
|
|
377
|
-
**구조:**
|
|
378
195
|
```markdown
|
|
379
196
|
---
|
|
380
197
|
name: skill-name
|
|
381
|
-
description:
|
|
198
|
+
description: 한 줄 설명
|
|
382
199
|
---
|
|
383
200
|
|
|
384
201
|
<trigger_conditions>
|
|
385
|
-
|
|
|
386
|
-
|
|
202
|
+
| 트리거 | 반응 |
|
|
203
|
+
|--------|------|
|
|
387
204
|
| "키워드" | 즉시 실행 |
|
|
388
205
|
</trigger_conditions>
|
|
389
206
|
|
|
@@ -391,8 +208,8 @@ description: 짧은 설명 (1줄)
|
|
|
391
208
|
|
|
392
209
|
<workflow>
|
|
393
210
|
<step number="1">
|
|
394
|
-
<action
|
|
395
|
-
<tools>Tool1
|
|
211
|
+
<action>작업</action>
|
|
212
|
+
<tools>Tool1</tools>
|
|
396
213
|
</step>
|
|
397
214
|
</workflow>
|
|
398
215
|
|
|
@@ -400,23 +217,20 @@ description: 짧은 설명 (1줄)
|
|
|
400
217
|
|
|
401
218
|
<examples>
|
|
402
219
|
```typescript
|
|
403
|
-
//
|
|
220
|
+
// 실행 가능 코드
|
|
404
221
|
```
|
|
405
222
|
</examples>
|
|
406
223
|
```
|
|
407
224
|
|
|
408
225
|
---
|
|
409
226
|
|
|
410
|
-
## COMMAND.md
|
|
411
|
-
|
|
412
|
-
**용도:** 슬래시 커맨드 정의 (/commit, /review)
|
|
227
|
+
## COMMAND.md
|
|
413
228
|
|
|
414
|
-
**구조:**
|
|
415
229
|
```markdown
|
|
416
230
|
---
|
|
417
231
|
description: 커맨드 설명
|
|
418
|
-
allowed-tools: Read, Edit
|
|
419
|
-
argument-hint:
|
|
232
|
+
allowed-tools: Read, Edit
|
|
233
|
+
argument-hint: <인자>
|
|
420
234
|
---
|
|
421
235
|
|
|
422
236
|
<purpose>
|
|
@@ -432,7 +246,7 @@ argument-hint: <인자 설명>
|
|
|
432
246
|
---
|
|
433
247
|
|
|
434
248
|
<examples>
|
|
435
|
-
✅/❌ 비교
|
|
249
|
+
✅/❌ 비교
|
|
436
250
|
</examples>
|
|
437
251
|
```
|
|
438
252
|
|
|
@@ -440,169 +254,14 @@ argument-hint: <인자 설명>
|
|
|
440
254
|
|
|
441
255
|
---
|
|
442
256
|
|
|
443
|
-
<templates>
|
|
444
|
-
|
|
445
|
-
## Template 1: CLAUDE.md
|
|
446
|
-
|
|
447
|
-
```markdown
|
|
448
|
-
# CLAUDE.md - [프로젝트명]
|
|
449
|
-
|
|
450
|
-
<instructions>
|
|
451
|
-
@.claude/instructions/git-rules.md
|
|
452
|
-
@docs/library/react/index.md
|
|
453
|
-
</instructions>
|
|
454
|
-
|
|
455
|
-
---
|
|
456
|
-
|
|
457
|
-
<forbidden>
|
|
458
|
-
| 분류 | 금지 |
|
|
459
|
-
|------|------|
|
|
460
|
-
| **Git** | AI 표시, 이모지 |
|
|
461
|
-
| **타입** | any (unknown 사용) |
|
|
462
|
-
</forbidden>
|
|
463
|
-
|
|
464
|
-
---
|
|
465
|
-
|
|
466
|
-
<required>
|
|
467
|
-
| 분류 | 필수 |
|
|
468
|
-
|------|------|
|
|
469
|
-
| **함수** | const 선언, 명시적 return type |
|
|
470
|
-
| **Import** | 절대 경로 (@/) |
|
|
471
|
-
</required>
|
|
472
|
-
|
|
473
|
-
---
|
|
474
|
-
|
|
475
|
-
<quick_patterns>
|
|
476
|
-
```typescript
|
|
477
|
-
// ✅ 올바른 패턴
|
|
478
|
-
const fetchUser = async (id: string): Promise<User> => {
|
|
479
|
-
return await prisma.user.findUnique({ where: { id } })
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
// ❌ 잘못된 패턴
|
|
483
|
-
function fetchUser(id) { ... }
|
|
484
|
-
```
|
|
485
|
-
</quick_patterns>
|
|
486
|
-
```
|
|
487
|
-
|
|
488
|
-
---
|
|
489
|
-
|
|
490
|
-
## Template 2: SKILL.md
|
|
491
|
-
|
|
492
|
-
```markdown
|
|
493
|
-
---
|
|
494
|
-
name: test-runner
|
|
495
|
-
description: 테스트 실행 및 실패 수정
|
|
496
|
-
---
|
|
497
|
-
|
|
498
|
-
<trigger_conditions>
|
|
499
|
-
| 트리거 | 반응 |
|
|
500
|
-
|--------|------|
|
|
501
|
-
| 코드 수정 완료 | 자동 실행 |
|
|
502
|
-
| "테스트 실행" | 즉시 실행 |
|
|
503
|
-
</trigger_conditions>
|
|
504
|
-
|
|
505
|
-
---
|
|
506
|
-
|
|
507
|
-
<forbidden>
|
|
508
|
-
| 금지 |
|
|
509
|
-
|------|
|
|
510
|
-
| 테스트 삭제로 통과, 테스트 없이 완료 |
|
|
511
|
-
</forbidden>
|
|
512
|
-
|
|
513
|
-
---
|
|
514
|
-
|
|
515
|
-
<required>
|
|
516
|
-
| 필수 |
|
|
517
|
-
|------|
|
|
518
|
-
| 모든 테스트 통과, 실패 원인 설명 |
|
|
519
|
-
</required>
|
|
520
|
-
|
|
521
|
-
---
|
|
522
|
-
|
|
523
257
|
<workflow>
|
|
524
|
-
<step number="1">
|
|
525
|
-
<action>테스트 실행</action>
|
|
526
|
-
<tools>Bash</tools>
|
|
527
|
-
<command>npm test</command>
|
|
528
|
-
</step>
|
|
529
|
-
|
|
530
|
-
<step number="2">
|
|
531
|
-
<action>실패 분석</action>
|
|
532
|
-
<tools>Read</tools>
|
|
533
|
-
</step>
|
|
534
|
-
|
|
535
|
-
<step number="3">
|
|
536
|
-
<action>코드 수정</action>
|
|
537
|
-
<tools>Edit</tools>
|
|
538
|
-
</step>
|
|
539
|
-
|
|
540
|
-
<step number="4">
|
|
541
|
-
<action>재실행</action>
|
|
542
|
-
<criteria>모든 테스트 통과</criteria>
|
|
543
|
-
</step>
|
|
544
|
-
</workflow>
|
|
545
258
|
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
// ✅ 수정
|
|
554
|
-
const sum = (a: number, b: number) => a + b
|
|
555
|
-
```
|
|
556
|
-
</examples>
|
|
557
|
-
```
|
|
558
|
-
|
|
559
|
-
</templates>
|
|
560
|
-
|
|
561
|
-
---
|
|
562
|
-
|
|
563
|
-
<workflow>
|
|
564
|
-
|
|
565
|
-
<step number="1">
|
|
566
|
-
<action>문서 유형 결정 및 프로젝트 분석</action>
|
|
567
|
-
<output>
|
|
568
|
-
- CLAUDE.md | SKILL.md | COMMAND.md 선택
|
|
569
|
-
- 프로젝트 구조 파악 (Glob, Read)
|
|
570
|
-
- 기존 패턴 식별 (Grep)
|
|
571
|
-
- 라이브러리 버전 확인
|
|
572
|
-
</output>
|
|
573
|
-
</step>
|
|
574
|
-
|
|
575
|
-
<step number="2">
|
|
576
|
-
<action>핵심 규칙 추출</action>
|
|
577
|
-
<priority>
|
|
578
|
-
1. 절대 금지 사항 (forbidden)
|
|
579
|
-
2. 필수 사항 (required)
|
|
580
|
-
3. 일반적 패턴 (patterns)
|
|
581
|
-
</priority>
|
|
582
|
-
</step>
|
|
583
|
-
|
|
584
|
-
<step number="3">
|
|
585
|
-
<action>템플릿 선택 및 작성</action>
|
|
586
|
-
<guidelines>
|
|
587
|
-
- XML 태그로 섹션 구분
|
|
588
|
-
- 표 형식으로 정보 압축
|
|
589
|
-
- 코드 예시 중심
|
|
590
|
-
- @imports로 공통 규칙 분리
|
|
591
|
-
- 버전 명시
|
|
592
|
-
</guidelines>
|
|
593
|
-
</step>
|
|
594
|
-
|
|
595
|
-
<step number="4">
|
|
596
|
-
<action>품질 검증</action>
|
|
597
|
-
<checklist>
|
|
598
|
-
- [ ] 토큰 효율 (500줄 이하)
|
|
599
|
-
- [ ] XML 태그 올바른 중첩
|
|
600
|
-
- [ ] 코드 예시 실행 가능
|
|
601
|
-
- [ ] 긍정형 지시 (Don't → Do)
|
|
602
|
-
- [ ] 버전 명시
|
|
603
|
-
- [ ] ✅/❌ 마커 사용
|
|
604
|
-
</checklist>
|
|
605
|
-
</step>
|
|
259
|
+
| Step | 작업 | 도구 |
|
|
260
|
+
|------|------|------|
|
|
261
|
+
| **1** | 유형 결정, 구조 파악 | Glob, Read |
|
|
262
|
+
| **2** | 규칙 추출 (forbidden → required → patterns) | Grep |
|
|
263
|
+
| **3** | 작성 (XML 태그, 표, 코드, @imports) | Write |
|
|
264
|
+
| **4** | 검증 (체크리스트) | - |
|
|
606
265
|
|
|
607
266
|
</workflow>
|
|
608
267
|
|
|
@@ -610,19 +269,14 @@ const sum = (a: number, b: number) => a + b
|
|
|
610
269
|
|
|
611
270
|
<examples>
|
|
612
271
|
|
|
613
|
-
|
|
272
|
+
## TanStack Start CLAUDE.md
|
|
614
273
|
|
|
615
|
-
**상황:** 새 TanStack Start 프로젝트, Prisma + Zod 사용
|
|
616
|
-
|
|
617
|
-
**작성 결과:**
|
|
618
274
|
```markdown
|
|
619
|
-
# CLAUDE.md - TanStack Start
|
|
275
|
+
# CLAUDE.md - TanStack Start
|
|
620
276
|
|
|
621
277
|
<instructions>
|
|
622
278
|
@.claude/instructions/git-rules.md
|
|
623
279
|
@docs/library/tanstack-start/index.md
|
|
624
|
-
@docs/library/prisma/index.md
|
|
625
|
-
@docs/library/zod/index.md
|
|
626
280
|
</instructions>
|
|
627
281
|
|
|
628
282
|
---
|
|
@@ -631,7 +285,6 @@ const sum = (a: number, b: number) => a + b
|
|
|
631
285
|
| 분류 | 금지 |
|
|
632
286
|
|------|------|
|
|
633
287
|
| **API** | `/api` 라우터 (명시 요청 제외) |
|
|
634
|
-
| **Server Function** | handler 내부 수동 검증/인증 |
|
|
635
288
|
| **타입** | any (unknown 사용) |
|
|
636
289
|
</forbidden>
|
|
637
290
|
|
|
@@ -641,7 +294,6 @@ const sum = (a: number, b: number) => a + b
|
|
|
641
294
|
| 분류 | 필수 |
|
|
642
295
|
|------|------|
|
|
643
296
|
| **Server Function** | POST/PUT → inputValidator + middleware |
|
|
644
|
-
| **클라이언트** | Server Function → TanStack Query |
|
|
645
297
|
| **타입** | 명시적 return type |
|
|
646
298
|
</required>
|
|
647
299
|
|
|
@@ -650,7 +302,6 @@ const sum = (a: number, b: number) => a + b
|
|
|
650
302
|
<tech_stack>
|
|
651
303
|
| 기술 | 버전 | 주의 |
|
|
652
304
|
|------|------|------|
|
|
653
|
-
| TanStack Start | 최신 | File-based routing |
|
|
654
305
|
| Prisma | 7.x | prisma-client, output 필수 |
|
|
655
306
|
| Zod | 4.x | z.email(), z.url() |
|
|
656
307
|
</tech_stack>
|
|
@@ -659,7 +310,7 @@ const sum = (a: number, b: number) => a + b
|
|
|
659
310
|
|
|
660
311
|
<quick_patterns>
|
|
661
312
|
```typescript
|
|
662
|
-
// Server Function
|
|
313
|
+
// Server Function
|
|
663
314
|
export const createUser = createServerFn({ method: 'POST' })
|
|
664
315
|
.middleware([authMiddleware])
|
|
665
316
|
.inputValidator(createUserSchema)
|
|
@@ -670,17 +321,10 @@ const schema = z.object({
|
|
|
670
321
|
email: z.email(),
|
|
671
322
|
website: z.url().optional(),
|
|
672
323
|
})
|
|
673
|
-
|
|
674
|
-
// TanStack Query
|
|
675
|
-
const mutation = useMutation({
|
|
676
|
-
mutationFn: createUser,
|
|
677
|
-
onSuccess: () => queryClient.invalidateQueries({ queryKey: ['users'] }),
|
|
678
|
-
})
|
|
679
324
|
```
|
|
680
325
|
</quick_patterns>
|
|
681
326
|
```
|
|
682
327
|
|
|
683
|
-
|
|
684
328
|
</examples>
|
|
685
329
|
|
|
686
330
|
---
|
|
@@ -689,10 +333,10 @@ const mutation = useMutation({
|
|
|
689
333
|
|
|
690
334
|
| 항목 | 기준 | 검증 |
|
|
691
335
|
|------|------|------|
|
|
692
|
-
|
|
|
693
|
-
| **XML
|
|
694
|
-
|
|
|
695
|
-
| **긍정형** | Don't < 5 |
|
|
336
|
+
| **토큰** | 500줄 이하 | wc -l |
|
|
337
|
+
| **XML** | 올바른 중첩 | 수동 |
|
|
338
|
+
| **예시** | 실행 가능 | 테스트 |
|
|
339
|
+
| **긍정형** | Don't < 5 | grep -c |
|
|
696
340
|
|
|
697
341
|
**체크리스트:**
|
|
698
342
|
- [ ] XML 태그 섹션 구분
|
|
@@ -709,32 +353,22 @@ const mutation = useMutation({
|
|
|
709
353
|
|
|
710
354
|
<best_practices>
|
|
711
355
|
|
|
712
|
-
## 작성 원칙
|
|
713
|
-
|
|
714
356
|
| 원칙 | 방법 |
|
|
715
357
|
|------|------|
|
|
716
|
-
| **Show, Don't Tell** |
|
|
717
|
-
| **High Density** | 1줄당 최대 정보
|
|
718
|
-
| **Copy-Paste Ready** | 바로 사용
|
|
719
|
-
| **Version Explicit** |
|
|
720
|
-
| **Positive Language** |
|
|
358
|
+
| **Show, Don't Tell** | 설명 < 코드 |
|
|
359
|
+
| **High Density** | 1줄당 최대 정보 |
|
|
360
|
+
| **Copy-Paste Ready** | 바로 사용 가능 |
|
|
361
|
+
| **Version Explicit** | 버전 명시 |
|
|
362
|
+
| **Positive Language** | Do X > Don't Y |
|
|
721
363
|
|
|
722
364
|
## 일반적 실수
|
|
723
365
|
|
|
724
366
|
| 실수 | 올바른 방법 |
|
|
725
367
|
|------|------------|
|
|
726
|
-
| 장황한 설명 | 표
|
|
727
|
-
| XML 태그 없음 |
|
|
728
|
-
| 추상적 예시 | 실행
|
|
729
|
-
| 중복 정보 | @imports
|
|
730
|
-
| 버전 누락 |
|
|
731
|
-
|
|
732
|
-
## 문서별 팁
|
|
733
|
-
|
|
734
|
-
| 문서 | 핵심 |
|
|
735
|
-
|------|------|
|
|
736
|
-
| **CLAUDE.md** | @imports 최대 활용, tech_stack 표준화 |
|
|
737
|
-
| **SKILL.md** | trigger_conditions 명확, workflow 코드 중심 |
|
|
738
|
-
| **COMMAND.md** | purpose 간결, workflow 실행 가능 코드 |
|
|
368
|
+
| 장황한 설명 | 표 + 코드 |
|
|
369
|
+
| XML 태그 없음 | 섹션 태그 구분 |
|
|
370
|
+
| 추상적 예시 | 실행 가능 코드 |
|
|
371
|
+
| 중복 정보 | @imports |
|
|
372
|
+
| 버전 누락 | 버전 명시 |
|
|
739
373
|
|
|
740
374
|
</best_practices>
|