@kood/claude-code 0.3.7 → 0.3.9
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/agents/code-reviewer.md +138 -123
- package/templates/.claude/agents/dependency-manager.md +99 -84
- package/templates/.claude/agents/deployment-validator.md +70 -55
- package/templates/.claude/agents/git-operator.md +78 -63
- package/templates/.claude/agents/implementation-executor.md +109 -94
- package/templates/.claude/agents/ko-to-en-translator.md +74 -0
- package/templates/.claude/agents/lint-fixer.md +93 -78
- package/templates/.claude/agents/refactor-advisor.md +136 -121
- package/templates/.claude/commands/agent-creator.md +199 -184
- package/templates/.claude/commands/bug-fix.md +207 -192
- package/templates/.claude/commands/command-creator.md +69 -53
- package/templates/.claude/commands/docs-creator.md +72 -56
- package/templates/.claude/commands/docs-refactor.md +41 -25
- package/templates/.claude/commands/execute.md +27 -11
- package/templates/.claude/commands/git-all.md +46 -31
- package/templates/.claude/commands/git-session.md +57 -41
- package/templates/.claude/commands/git.md +49 -33
- package/templates/.claude/commands/lint-fix.md +153 -137
- package/templates/.claude/commands/lint-init.md +76 -60
- package/templates/.claude/commands/plan.md +275 -259
- package/templates/.claude/commands/prd.md +39 -23
- package/templates/.claude/commands/pre-deploy.md +124 -108
- package/templates/.claude/commands/refactor.md +162 -146
- package/templates/.claude/commands/version-update.md +32 -16
- package/templates/hono/CLAUDE.md +28 -27
- package/templates/hono/docs/architecture.md +24 -24
- package/templates/hono/docs/deployment/cloudflare.md +18 -18
- package/templates/hono/docs/deployment/docker.md +13 -13
- package/templates/hono/docs/deployment/index.md +19 -19
- package/templates/hono/docs/deployment/railway.md +32 -32
- package/templates/hono/docs/deployment/vercel.md +29 -29
- package/templates/hono/docs/guides/conventions.md +57 -57
- package/templates/hono/docs/guides/env-setup.md +47 -47
- package/templates/hono/docs/guides/getting-started.md +27 -27
- package/templates/hono/docs/library/hono/error-handling.md +11 -11
- package/templates/hono/docs/library/hono/index.md +4 -4
- package/templates/hono/docs/library/hono/middleware.md +18 -18
- package/templates/hono/docs/library/hono/rpc.md +7 -7
- package/templates/hono/docs/library/hono/validation.md +6 -6
- package/templates/hono/docs/library/prisma/cloudflare-d1.md +29 -29
- package/templates/hono/docs/library/prisma/config.md +16 -16
- package/templates/hono/docs/library/prisma/index.md +32 -32
- package/templates/hono/docs/library/t3-env/index.md +22 -22
- package/templates/hono/docs/library/zod/index.md +31 -31
- package/templates/nextjs/CLAUDE.md +54 -51
- package/templates/nextjs/docs/architecture.md +812 -0
- package/templates/nextjs/docs/design.md +183 -183
- package/templates/nextjs/docs/guides/conventions.md +86 -86
- package/templates/nextjs/docs/guides/getting-started.md +28 -28
- package/templates/nextjs/docs/guides/routes.md +32 -32
- package/templates/nextjs/docs/library/better-auth/index.md +70 -70
- package/templates/nextjs/docs/library/nextjs/app-router.md +43 -43
- package/templates/nextjs/docs/library/nextjs/caching.md +73 -73
- package/templates/nextjs/docs/library/nextjs/index.md +51 -51
- package/templates/nextjs/docs/library/nextjs/middleware.md +41 -41
- package/templates/nextjs/docs/library/nextjs/route-handlers.md +31 -31
- package/templates/nextjs/docs/library/nextjs/server-actions.md +34 -34
- package/templates/nextjs/docs/library/prisma/cloudflare-d1.md +20 -20
- package/templates/nextjs/docs/library/prisma/config.md +18 -18
- package/templates/nextjs/docs/library/prisma/crud.md +17 -17
- package/templates/nextjs/docs/library/prisma/index.md +18 -18
- package/templates/nextjs/docs/library/prisma/relations.md +16 -16
- package/templates/nextjs/docs/library/prisma/schema.md +23 -23
- package/templates/nextjs/docs/library/prisma/setup.md +6 -6
- package/templates/nextjs/docs/library/prisma/transactions.md +10 -10
- package/templates/nextjs/docs/library/tanstack-query/index.md +6 -6
- package/templates/nextjs/docs/library/tanstack-query/invalidation.md +20 -20
- package/templates/nextjs/docs/library/tanstack-query/optimistic-updates.md +4 -4
- package/templates/nextjs/docs/library/tanstack-query/use-mutation.md +15 -15
- package/templates/nextjs/docs/library/tanstack-query/use-query.md +22 -22
- package/templates/nextjs/docs/library/zod/complex-types.md +11 -11
- package/templates/nextjs/docs/library/zod/index.md +8 -8
- package/templates/nextjs/docs/library/zod/transforms.md +11 -11
- package/templates/nextjs/docs/library/zod/validation.md +9 -9
- package/templates/npx/CLAUDE.md +38 -37
- package/templates/npx/docs/library/commander/index.md +12 -12
- package/templates/npx/docs/library/fs-extra/index.md +9 -9
- package/templates/npx/docs/library/prompts/index.md +3 -3
- package/templates/npx/docs/references/patterns.md +12 -12
- package/templates/tanstack-start/CLAUDE.md +54 -53
- package/templates/tanstack-start/docs/architecture.md +128 -128
- package/templates/tanstack-start/docs/design.md +169 -169
- package/templates/tanstack-start/docs/guides/conventions.md +43 -43
- package/templates/tanstack-start/docs/guides/env-setup.md +35 -35
- package/templates/tanstack-start/docs/guides/getting-started.md +19 -19
- package/templates/tanstack-start/docs/guides/hooks.md +45 -45
- package/templates/tanstack-start/docs/guides/routes.md +54 -54
- package/templates/tanstack-start/docs/guides/services.md +45 -45
- package/templates/tanstack-start/docs/library/better-auth/index.md +68 -68
- package/templates/tanstack-start/docs/library/prisma/cloudflare-d1.md +19 -19
- package/templates/tanstack-start/docs/library/prisma/config.md +16 -16
- package/templates/tanstack-start/docs/library/prisma/crud.md +17 -17
- package/templates/tanstack-start/docs/library/prisma/index.md +17 -17
- package/templates/tanstack-start/docs/library/prisma/relations.md +16 -16
- package/templates/tanstack-start/docs/library/prisma/schema.md +23 -23
- package/templates/tanstack-start/docs/library/prisma/setup.md +6 -6
- package/templates/tanstack-start/docs/library/prisma/transactions.md +10 -10
- package/templates/tanstack-start/docs/library/t3-env/index.md +21 -160
- package/templates/tanstack-start/docs/library/tanstack-query/index.md +6 -6
- package/templates/tanstack-start/docs/library/tanstack-query/invalidation.md +19 -19
- package/templates/tanstack-start/docs/library/tanstack-query/optimistic-updates.md +4 -4
- package/templates/tanstack-start/docs/library/tanstack-query/use-mutation.md +14 -14
- package/templates/tanstack-start/docs/library/tanstack-query/use-query.md +21 -21
- package/templates/tanstack-start/docs/library/tanstack-router/error-handling.md +9 -9
- package/templates/tanstack-start/docs/library/tanstack-router/hooks.md +11 -11
- package/templates/tanstack-start/docs/library/tanstack-router/index.md +18 -18
- package/templates/tanstack-start/docs/library/tanstack-router/navigation.md +17 -17
- package/templates/tanstack-start/docs/library/tanstack-router/route-context.md +5 -5
- package/templates/tanstack-start/docs/library/tanstack-router/search-params.md +10 -10
- package/templates/tanstack-start/docs/library/tanstack-start/auth-patterns.md +8 -8
- package/templates/tanstack-start/docs/library/tanstack-start/index.md +15 -15
- package/templates/tanstack-start/docs/library/tanstack-start/middleware.md +9 -9
- package/templates/tanstack-start/docs/library/tanstack-start/routing.md +6 -6
- package/templates/tanstack-start/docs/library/tanstack-start/server-functions.md +18 -18
- package/templates/tanstack-start/docs/library/tanstack-start/setup.md +4 -4
- package/templates/tanstack-start/docs/library/zod/complex-types.md +11 -11
- package/templates/tanstack-start/docs/library/zod/index.md +8 -8
- package/templates/tanstack-start/docs/library/zod/transforms.md +11 -11
- package/templates/tanstack-start/docs/library/zod/validation.md +9 -9
|
@@ -1,34 +1,50 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: 코드 리팩토링 계획 수립. @refactor-advisor 우선 활용. Sequential Thinking 3-7 필수. 기능 유지하며 개선만.
|
|
3
3
|
allowed-tools: Read, Glob, Grep, Bash(git:*, ast-grep:*), Task, Write, mcp__sequential-thinking__sequentialthinking
|
|
4
|
-
argument-hint:
|
|
4
|
+
argument-hint: <target file/module or improvement goal>
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
<critical_instruction>
|
|
8
|
+
|
|
9
|
+
**CRITICAL: 사용자와의 모든 커뮤니케이션은 반드시 한국어로 작성하세요.**
|
|
10
|
+
|
|
11
|
+
- 내부 사고와 분석은 영어로 해도 됨
|
|
12
|
+
- 설명, 요약, 보고서, 피드백 등 사용자에게 전달하는 모든 내용은 반드시 한국어
|
|
13
|
+
- 사용자가 영어로 말하더라도 답변은 한국어로
|
|
14
|
+
- 진행 상황 업데이트와 상태 보고는 반드시 한국어
|
|
15
|
+
|
|
16
|
+
이 규칙은 절대적이며 예외가 없습니다.
|
|
17
|
+
|
|
18
|
+
</critical_instruction>
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
|
|
7
23
|
# Refactor Command
|
|
8
24
|
|
|
9
|
-
>
|
|
25
|
+
> Establish refactoring plan for code quality improvement and present execution strategy.
|
|
10
26
|
|
|
11
|
-
|
|
27
|
+
**Refactoring target**: $ARGUMENTS
|
|
12
28
|
|
|
13
29
|
---
|
|
14
30
|
|
|
15
31
|
<argument_validation>
|
|
16
32
|
|
|
17
|
-
## ARGUMENT
|
|
33
|
+
## Verify ARGUMENT is provided
|
|
18
34
|
|
|
19
35
|
```
|
|
20
|
-
$ARGUMENTS
|
|
36
|
+
No $ARGUMENTS → Ask immediately:
|
|
21
37
|
|
|
22
|
-
"
|
|
38
|
+
"What should we refactor? Please be specific.
|
|
23
39
|
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
40
|
+
Examples:
|
|
41
|
+
- Improve specific file/module
|
|
42
|
+
- Reduce complexity
|
|
43
|
+
- Remove duplicate code
|
|
44
|
+
- Improve structure
|
|
45
|
+
- Optimize performance"
|
|
30
46
|
|
|
31
|
-
$ARGUMENTS
|
|
47
|
+
$ARGUMENTS provided → Proceed to next step
|
|
32
48
|
```
|
|
33
49
|
|
|
34
50
|
</argument_validation>
|
|
@@ -37,17 +53,17 @@ $ARGUMENTS 있음 → 다음 단계 진행
|
|
|
37
53
|
|
|
38
54
|
<workflow>
|
|
39
55
|
|
|
40
|
-
##
|
|
56
|
+
## Execution Flow
|
|
41
57
|
|
|
42
|
-
|
|
|
58
|
+
| Step | Task | Tool |
|
|
43
59
|
|------|------|------|
|
|
44
|
-
| 1.
|
|
45
|
-
| 2.
|
|
46
|
-
| 3.
|
|
47
|
-
| 4.
|
|
48
|
-
| 5.
|
|
49
|
-
| 6.
|
|
50
|
-
| 7.
|
|
60
|
+
| 1. Validate input | Verify ARGUMENT, ask if missing | - |
|
|
61
|
+
| 2. Judge agent usage | Decide whether to use @refactor-advisor | - |
|
|
62
|
+
| 3. Judge complexity | Determine analysis scope with Sequential Thinking | sequentialthinking (step 1) |
|
|
63
|
+
| 4. Analyze code | Understand current code structure, identify issues | Task (Explore) + Read/Grep |
|
|
64
|
+
| 5. Derive improvement options | Generate 4-5 approaches → select 2-3 main | sequentialthinking (steps 2-6) |
|
|
65
|
+
| 6. Present options | Present pros/cons, impact scope, recommendation | - |
|
|
66
|
+
| 7. Create plan document | Generate refactoring plan when selected | Write |
|
|
51
67
|
|
|
52
68
|
</workflow>
|
|
53
69
|
|
|
@@ -55,46 +71,46 @@ $ARGUMENTS 있음 → 다음 단계 진행
|
|
|
55
71
|
|
|
56
72
|
<agent_priority>
|
|
57
73
|
|
|
58
|
-
## @refactor-advisor Agent
|
|
74
|
+
## Prioritize @refactor-advisor Agent Usage
|
|
59
75
|
|
|
60
|
-
|
|
76
|
+
**Basic principle:**
|
|
61
77
|
```
|
|
62
|
-
|
|
78
|
+
Refactoring request → Consider @refactor-advisor first
|
|
63
79
|
```
|
|
64
80
|
|
|
65
|
-
###
|
|
81
|
+
### Usage conditions
|
|
66
82
|
|
|
67
|
-
|
|
|
68
|
-
|
|
69
|
-
|
|
|
70
|
-
|
|
|
71
|
-
|
|
|
83
|
+
| Condition | Description |
|
|
84
|
+
|-----------|-------------|
|
|
85
|
+
| **Code quality improvement** | Improve complexity, duplication, naming, structure |
|
|
86
|
+
| **No feature change** | Maintain behavior, improve code only |
|
|
87
|
+
| **Incremental improvement** | Need step-by-step refactoring plan |
|
|
72
88
|
|
|
73
|
-
### Agent
|
|
89
|
+
### Agent usage flow
|
|
74
90
|
|
|
75
91
|
```
|
|
76
|
-
1. @refactor-advisor
|
|
77
|
-
→
|
|
92
|
+
1. Call @refactor-advisor
|
|
93
|
+
→ Analyze code, derive improvements by priority
|
|
78
94
|
|
|
79
|
-
2.
|
|
80
|
-
→
|
|
95
|
+
2. Organize options based on analysis results
|
|
96
|
+
→ Present 2-3 options to user
|
|
81
97
|
|
|
82
|
-
3.
|
|
83
|
-
→ .claude/plans/refactor-[
|
|
98
|
+
3. Create plan document after selection
|
|
99
|
+
→ .claude/plans/refactor-[name].md
|
|
84
100
|
```
|
|
85
101
|
|
|
86
|
-
###
|
|
102
|
+
### Cases not using agent
|
|
87
103
|
|
|
88
104
|
```
|
|
89
|
-
✅ @refactor-advisor
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
|
|
94
|
-
❌
|
|
95
|
-
-
|
|
96
|
-
-
|
|
97
|
-
-
|
|
105
|
+
✅ Use @refactor-advisor:
|
|
106
|
+
- Improve existing code
|
|
107
|
+
- Reduce complexity/duplication
|
|
108
|
+
- Improve structure
|
|
109
|
+
|
|
110
|
+
❌ Direct handling:
|
|
111
|
+
- Architecture change
|
|
112
|
+
- Refactoring with new feature addition
|
|
113
|
+
- Framework migration
|
|
98
114
|
```
|
|
99
115
|
|
|
100
116
|
</agent_priority>
|
|
@@ -160,28 +176,28 @@ thought 7: 단계별 계획 및 추천안
|
|
|
160
176
|
|
|
161
177
|
<refactoring_areas>
|
|
162
178
|
|
|
163
|
-
##
|
|
179
|
+
## Refactoring areas
|
|
164
180
|
|
|
165
|
-
###
|
|
181
|
+
### Six improvement areas
|
|
166
182
|
|
|
167
|
-
|
|
|
168
|
-
|
|
169
|
-
|
|
|
170
|
-
|
|
|
171
|
-
|
|
|
172
|
-
|
|
|
173
|
-
|
|
|
174
|
-
|
|
|
183
|
+
| Area | Problem | Improvement |
|
|
184
|
+
|------|---------|-------------|
|
|
185
|
+
| **Complexity** | Long functions, deep nesting | Split functions, Early Return |
|
|
186
|
+
| **Duplication** | Identical/similar code repeats | Extract common functions/modules |
|
|
187
|
+
| **Naming** | Unclear variable/function names | Clear intent names |
|
|
188
|
+
| **Structure** | Unclear file/module structure | Separation of concerns, layering |
|
|
189
|
+
| **Patterns** | Using anti-patterns | Apply design patterns |
|
|
190
|
+
| **Types** | Excessive any, type instability | Explicit type definition |
|
|
175
191
|
|
|
176
|
-
###
|
|
192
|
+
### Checklist
|
|
177
193
|
|
|
178
194
|
```text
|
|
179
|
-
✅
|
|
180
|
-
✅
|
|
181
|
-
✅
|
|
182
|
-
✅
|
|
183
|
-
✅
|
|
184
|
-
✅
|
|
195
|
+
✅ Function length: target <= 20 lines
|
|
196
|
+
✅ Nesting depth: target <= 3 levels
|
|
197
|
+
✅ File length: recommended 200-300 lines
|
|
198
|
+
✅ Circular dependencies: eliminate
|
|
199
|
+
✅ Magic numbers: constants
|
|
200
|
+
✅ Comments: only what can't be explained by code
|
|
185
201
|
```
|
|
186
202
|
|
|
187
203
|
</refactoring_areas>
|
|
@@ -289,105 +305,105 @@ thought 7: 단계별 계획 및 추천안
|
|
|
289
305
|
선택해주세요. (Y/N)
|
|
290
306
|
```
|
|
291
307
|
|
|
292
|
-
###
|
|
308
|
+
### Refactoring plan document template
|
|
293
309
|
|
|
294
|
-
|
|
310
|
+
**File location:** `.claude/plans/refactor-[name].md`
|
|
295
311
|
|
|
296
312
|
```markdown
|
|
297
|
-
# [
|
|
313
|
+
# [Module name] Refactoring Plan
|
|
298
314
|
|
|
299
|
-
##
|
|
315
|
+
## Overview
|
|
300
316
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
317
|
+
**Goal:** [What will be improved]
|
|
318
|
+
**Selected approach:** [Option N]
|
|
319
|
+
**Expected impact scope:** [Files/modules list]
|
|
304
320
|
|
|
305
|
-
##
|
|
321
|
+
## Current state
|
|
306
322
|
|
|
307
|
-
###
|
|
323
|
+
### Issues
|
|
308
324
|
|
|
309
|
-
|
|
|
310
|
-
|
|
311
|
-
|
|
|
312
|
-
|
|
|
325
|
+
| Issue | Impact | Priority |
|
|
326
|
+
|-------|--------|----------|
|
|
327
|
+
| Issue 1 | Description | High |
|
|
328
|
+
| Issue 2 | Description | Medium |
|
|
313
329
|
|
|
314
|
-
###
|
|
330
|
+
### Metrics
|
|
315
331
|
|
|
316
|
-
-
|
|
317
|
-
-
|
|
318
|
-
-
|
|
332
|
+
- Complexity: [current value]
|
|
333
|
+
- Duplication rate: [current value]
|
|
334
|
+
- Test coverage: [current value]
|
|
319
335
|
|
|
320
|
-
##
|
|
336
|
+
## Improvement stages
|
|
321
337
|
|
|
322
|
-
### 1
|
|
338
|
+
### Stage 1: [Stage name]
|
|
323
339
|
|
|
324
|
-
|
|
340
|
+
**Goal:** [What will be achieved in this stage]
|
|
325
341
|
|
|
326
|
-
|
|
327
|
-
- [ ]
|
|
328
|
-
- [ ]
|
|
342
|
+
**Tasks:**
|
|
343
|
+
- [ ] Task 1
|
|
344
|
+
- [ ] Task 2
|
|
329
345
|
|
|
330
|
-
|
|
346
|
+
**Changed files:**
|
|
331
347
|
- `src/file1.ts`
|
|
332
348
|
- `src/file2.ts`
|
|
333
349
|
|
|
334
|
-
|
|
335
|
-
-
|
|
336
|
-
-
|
|
350
|
+
**Validation:**
|
|
351
|
+
- Tests pass
|
|
352
|
+
- Build success
|
|
337
353
|
|
|
338
|
-
### 2
|
|
354
|
+
### Stage 2: [Stage name]
|
|
339
355
|
|
|
340
|
-
|
|
356
|
+
**Goal:** [What will be achieved in this stage]
|
|
341
357
|
|
|
342
|
-
|
|
343
|
-
- [ ]
|
|
358
|
+
**Tasks:**
|
|
359
|
+
- [ ] Task 3
|
|
344
360
|
|
|
345
|
-
|
|
361
|
+
**Changed files:**
|
|
346
362
|
- `src/file3.ts`
|
|
347
363
|
|
|
348
|
-
### 3
|
|
364
|
+
### Stage 3: [Stage name]
|
|
349
365
|
...
|
|
350
366
|
|
|
351
|
-
##
|
|
367
|
+
## Expected improvements
|
|
352
368
|
|
|
353
|
-
|
|
|
354
|
-
|
|
355
|
-
|
|
|
356
|
-
|
|
|
357
|
-
|
|
|
369
|
+
| Metric | Before | After | Improvement |
|
|
370
|
+
|--------|--------|-------|------------|
|
|
371
|
+
| Complexity | X | Y | -Z% |
|
|
372
|
+
| Duplication rate | X | Y | -Z% |
|
|
373
|
+
| Code lines | X | Y | -Z% |
|
|
358
374
|
|
|
359
|
-
##
|
|
375
|
+
## Risk management
|
|
360
376
|
|
|
361
|
-
###
|
|
377
|
+
### Risks
|
|
362
378
|
|
|
363
|
-
|
|
|
364
|
-
|
|
365
|
-
|
|
|
366
|
-
|
|
|
379
|
+
| Risk | Impact | Mitigation |
|
|
380
|
+
|------|--------|-----------|
|
|
381
|
+
| Risk 1 | High | Plan 1 |
|
|
382
|
+
| Risk 2 | Medium | Plan 2 |
|
|
367
383
|
|
|
368
|
-
###
|
|
384
|
+
### Rollback plan
|
|
369
385
|
|
|
370
|
-
|
|
371
|
-
1.
|
|
372
|
-
2.
|
|
373
|
-
3.
|
|
386
|
+
If issues occur:
|
|
387
|
+
1. Use stage-by-stage commits
|
|
388
|
+
2. Revert to previous stage
|
|
389
|
+
3. Rerun tests
|
|
374
390
|
|
|
375
|
-
##
|
|
391
|
+
## Validation methods
|
|
376
392
|
|
|
377
|
-
###
|
|
378
|
-
- [ ]
|
|
379
|
-
- [ ]
|
|
380
|
-
- [ ]
|
|
393
|
+
### Functional validation
|
|
394
|
+
- [ ] Verify existing features work
|
|
395
|
+
- [ ] Regression tests pass
|
|
396
|
+
- [ ] Integration tests pass
|
|
381
397
|
|
|
382
|
-
###
|
|
383
|
-
- [ ]
|
|
384
|
-
- [ ]
|
|
385
|
-
- [ ]
|
|
398
|
+
### Quality validation
|
|
399
|
+
- [ ] Verify complexity reduction
|
|
400
|
+
- [ ] Verify duplication removal
|
|
401
|
+
- [ ] Verify type safety
|
|
386
402
|
|
|
387
|
-
##
|
|
403
|
+
## References
|
|
388
404
|
|
|
389
|
-
-
|
|
390
|
-
-
|
|
405
|
+
- Related document links
|
|
406
|
+
- Reference patterns
|
|
391
407
|
```
|
|
392
408
|
|
|
393
409
|
</document_generation>
|
|
@@ -396,32 +412,32 @@ thought 7: 단계별 계획 및 추천안
|
|
|
396
412
|
|
|
397
413
|
<validation>
|
|
398
414
|
|
|
399
|
-
##
|
|
415
|
+
## Validation checklist
|
|
400
416
|
|
|
401
|
-
|
|
417
|
+
Before execution:
|
|
402
418
|
|
|
403
419
|
```text
|
|
404
|
-
✅ ARGUMENT
|
|
405
|
-
✅ @refactor-advisor
|
|
406
|
-
✅ Sequential Thinking
|
|
407
|
-
✅ Task (Explore)
|
|
408
|
-
✅
|
|
409
|
-
✅
|
|
410
|
-
✅
|
|
411
|
-
✅
|
|
420
|
+
✅ Verify ARGUMENT (ask if missing)
|
|
421
|
+
✅ Judge whether to use @refactor-advisor
|
|
422
|
+
✅ Sequential Thinking minimum 3 steps
|
|
423
|
+
✅ Analyze code with Task (Explore)
|
|
424
|
+
✅ Minimum 2 options, recommended 3
|
|
425
|
+
✅ List pros/cons for each option
|
|
426
|
+
✅ Present impact scope and estimated work
|
|
427
|
+
✅ Emphasize principle of maintaining functionality
|
|
412
428
|
```
|
|
413
429
|
|
|
414
|
-
|
|
430
|
+
Absolutely forbidden:
|
|
415
431
|
|
|
416
432
|
```text
|
|
417
|
-
❌
|
|
418
|
-
❌ Edit
|
|
419
|
-
❌ Sequential Thinking 3
|
|
420
|
-
❌
|
|
421
|
-
❌
|
|
422
|
-
❌
|
|
423
|
-
❌
|
|
424
|
-
❌
|
|
433
|
+
❌ Start analysis without ARGUMENT
|
|
434
|
+
❌ Use Edit tool (code modification forbidden)
|
|
435
|
+
❌ Sequential Thinking less than 3 steps
|
|
436
|
+
❌ Present only 1 option
|
|
437
|
+
❌ Suggest options by guessing without code analysis
|
|
438
|
+
❌ Start implementation without user choice
|
|
439
|
+
❌ Include feature changes
|
|
440
|
+
❌ List options without pros/cons
|
|
425
441
|
```
|
|
426
442
|
|
|
427
443
|
</validation>
|
|
@@ -4,46 +4,62 @@ allowed-tools: Bash, Read, Edit
|
|
|
4
4
|
argument-hint: <new-version | +1 | +minor | +major>
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
<critical_instruction>
|
|
8
|
+
|
|
9
|
+
**CRITICAL: 사용자와의 모든 커뮤니케이션은 반드시 한국어로 작성하세요.**
|
|
10
|
+
|
|
11
|
+
- 내부 사고와 분석은 영어로 해도 됨
|
|
12
|
+
- 설명, 요약, 보고서, 피드백 등 사용자에게 전달하는 모든 내용은 반드시 한국어
|
|
13
|
+
- 사용자가 영어로 말하더라도 답변은 한국어로
|
|
14
|
+
- 진행 상황 업데이트와 상태 보고는 반드시 한국어
|
|
15
|
+
|
|
16
|
+
이 규칙은 절대적이며 예외가 없습니다.
|
|
17
|
+
|
|
18
|
+
</critical_instruction>
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
|
|
7
23
|
@../instructions/git-rules.md
|
|
8
24
|
|
|
9
25
|
# Version Update Command
|
|
10
26
|
|
|
11
|
-
|
|
27
|
+
Update and commit entire project version.
|
|
12
28
|
|
|
13
|
-
|
|
29
|
+
**Argument**: $ARGUMENTS
|
|
14
30
|
|
|
15
31
|
<version_rules>
|
|
16
32
|
|
|
17
|
-
|
|
|
18
|
-
|
|
33
|
+
| Argument | Action | Example |
|
|
34
|
+
|----------|--------|---------|
|
|
19
35
|
| `+1` | patch +1 | 0.1.13 → 0.1.14 |
|
|
20
36
|
| `+minor` | minor +1 | 0.1.13 → 0.2.0 |
|
|
21
37
|
| `+major` | major +1 | 0.1.13 → 1.0.0 |
|
|
22
|
-
| `x.x.x` |
|
|
38
|
+
| `x.x.x` | Set directly | 0.1.13 → 2.0.0 |
|
|
23
39
|
|
|
24
40
|
</version_rules>
|
|
25
41
|
|
|
26
42
|
<workflow>
|
|
27
43
|
|
|
28
|
-
1.
|
|
44
|
+
1. **Check current version** (parallel read)
|
|
29
45
|
- packages/claude-code/package.json
|
|
30
46
|
- packages/claude-code/src/index.ts
|
|
31
47
|
|
|
32
|
-
2.
|
|
48
|
+
2. **Calculate new version**
|
|
33
49
|
|
|
34
|
-
3.
|
|
50
|
+
3. **Update all files with Edit**
|
|
35
51
|
|
|
36
|
-
4.
|
|
52
|
+
4. **Stage files**
|
|
37
53
|
```bash
|
|
38
54
|
git add packages/claude-code/package.json packages/claude-code/src/index.ts
|
|
39
55
|
```
|
|
40
56
|
|
|
41
|
-
5.
|
|
57
|
+
5. **Commit**
|
|
42
58
|
```bash
|
|
43
|
-
git commit -m "chore:
|
|
59
|
+
git commit -m "chore: Update version to X.X.X"
|
|
44
60
|
```
|
|
45
61
|
|
|
46
|
-
6.
|
|
62
|
+
6. **Verify completion**
|
|
47
63
|
```bash
|
|
48
64
|
git status
|
|
49
65
|
```
|
|
@@ -52,8 +68,8 @@ argument-hint: <new-version | +1 | +minor | +major>
|
|
|
52
68
|
|
|
53
69
|
<update_targets>
|
|
54
70
|
|
|
55
|
-
|
|
|
56
|
-
|
|
71
|
+
| File | Modification location |
|
|
72
|
+
|------|----------------------|
|
|
57
73
|
| `package.json` | `"version": "x.x.x"` |
|
|
58
74
|
| `src/index.ts` | `.version('x.x.x')` |
|
|
59
75
|
|
|
@@ -64,13 +80,13 @@ argument-hint: <new-version | +1 | +minor | +major>
|
|
|
64
80
|
```bash
|
|
65
81
|
/version-update +1
|
|
66
82
|
→ 0.1.13 → 0.1.14
|
|
67
|
-
→ chore:
|
|
83
|
+
→ chore: Update version to 0.1.14
|
|
68
84
|
|
|
69
85
|
/version-update +minor
|
|
70
86
|
→ 0.1.13 → 0.2.0
|
|
71
87
|
|
|
72
88
|
/version-update 2.0.0
|
|
73
|
-
→
|
|
89
|
+
→ Set directly
|
|
74
90
|
```
|
|
75
91
|
|
|
76
92
|
</examples>
|
package/templates/hono/CLAUDE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# CLAUDE.md - Hono
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Ultra-lightweight framework based on Web Standards
|
|
4
4
|
|
|
5
5
|
<instructions>
|
|
6
6
|
@../../commands/git.md
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
|
|
16
16
|
<forbidden>
|
|
17
17
|
|
|
18
|
-
|
|
|
19
|
-
|
|
20
|
-
| **Git** | `Generated with Claude Code`, `🤖`, `Co-Authored-By:`,
|
|
21
|
-
| **Prisma** | `db push/migrate/generate
|
|
22
|
-
| **API** |
|
|
23
|
-
|
|
|
18
|
+
| Category | Prohibited |
|
|
19
|
+
|----------|------------|
|
|
20
|
+
| **Git** | `Generated with Claude Code`, `🤖`, `Co-Authored-By:`, multi-line commits, emojis |
|
|
21
|
+
| **Prisma** | Auto-run `db push/migrate/generate`, arbitrary schema changes |
|
|
22
|
+
| **API** | Manual validation/auth in handlers, throwing generic Error |
|
|
23
|
+
| **Search** | grep, rg, find |
|
|
24
24
|
|
|
25
25
|
</forbidden>
|
|
26
26
|
|
|
@@ -28,14 +28,15 @@
|
|
|
28
28
|
|
|
29
29
|
<required>
|
|
30
30
|
|
|
31
|
-
|
|
|
32
|
-
|
|
33
|
-
|
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
|
|
|
31
|
+
| Task | Required |
|
|
32
|
+
|------|----------|
|
|
33
|
+
| Before work | Read related docs (API→hono, DB→prisma) |
|
|
34
|
+
| Document search | serena mcp (document indexing/search, context length optimization) |
|
|
35
|
+
| Code search | ast-grep |
|
|
36
|
+
| Complex tasks | Sequential Thinking MCP |
|
|
37
|
+
| 3+ file changes | gemini-review |
|
|
38
|
+
| Validation | zValidator, HTTPException error handling |
|
|
39
|
+
| Code writing | UTF-8, Korean comments per code block, Prisma Multi-File all elements commented |
|
|
39
40
|
|
|
40
41
|
</required>
|
|
41
42
|
|
|
@@ -43,11 +44,11 @@
|
|
|
43
44
|
|
|
44
45
|
<tech_stack>
|
|
45
46
|
|
|
46
|
-
|
|
|
47
|
-
|
|
48
|
-
| Hono |
|
|
47
|
+
| Technology | Version | Notes |
|
|
48
|
+
|------------|---------|-------|
|
|
49
|
+
| Hono | Latest | - |
|
|
49
50
|
| TypeScript | 5.x | strict |
|
|
50
|
-
| Prisma | **7.x** | `prisma-client`, output
|
|
51
|
+
| Prisma | **7.x** | `prisma-client`, output required |
|
|
51
52
|
| Zod | **4.x** | `z.email()`, `z.url()` |
|
|
52
53
|
|
|
53
54
|
</tech_stack>
|
|
@@ -69,23 +70,23 @@ src/
|
|
|
69
70
|
└── types/
|
|
70
71
|
```
|
|
71
72
|
|
|
72
|
-
|
|
73
|
+
Common logic → `src/services/`, route-specific logic → individual route files
|
|
73
74
|
</structure>
|
|
74
75
|
|
|
75
76
|
---
|
|
76
77
|
|
|
77
78
|
<conventions>
|
|
78
79
|
|
|
79
|
-
|
|
80
|
-
TypeScript: const
|
|
81
|
-
Import
|
|
80
|
+
File naming: kebab-case
|
|
81
|
+
TypeScript: const declarations, explicit return types, interface (objects)/type (unions), any→unknown
|
|
82
|
+
Import order: external → internal → relative paths → types
|
|
82
83
|
|
|
83
84
|
Prisma Multi-File:
|
|
84
85
|
```
|
|
85
86
|
prisma/schema/
|
|
86
87
|
├── +base.prisma # datasource, generator
|
|
87
|
-
├── +enum.prisma #
|
|
88
|
-
└── [model].prisma #
|
|
88
|
+
├── +enum.prisma # enums
|
|
89
|
+
└── [model].prisma # per-model files (Korean comments!)
|
|
89
90
|
```
|
|
90
91
|
|
|
91
92
|
</conventions>
|
|
@@ -95,7 +96,7 @@ prisma/schema/
|
|
|
95
96
|
<quick_patterns>
|
|
96
97
|
|
|
97
98
|
```typescript
|
|
98
|
-
// App +
|
|
99
|
+
// App + Error handler
|
|
99
100
|
import { Hono } from 'hono'
|
|
100
101
|
import { HTTPException } from 'hono/http-exception'
|
|
101
102
|
|
|
@@ -144,7 +145,7 @@ export const authMiddleware = createMiddleware(async (c, next) => {
|
|
|
144
145
|
await next()
|
|
145
146
|
})
|
|
146
147
|
|
|
147
|
-
//
|
|
148
|
+
// Usage
|
|
148
149
|
app.use('/api/*', authMiddleware)
|
|
149
150
|
```
|
|
150
151
|
|