@kood/claude-code 0.3.6 → 0.3.8
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 +124 -124
- package/templates/.claude/agents/dependency-manager.md +85 -85
- package/templates/.claude/agents/deployment-validator.md +56 -56
- package/templates/.claude/agents/git-operator.md +64 -64
- package/templates/.claude/agents/implementation-executor.md +95 -95
- package/templates/.claude/agents/ko-to-en-translator.md +74 -0
- package/templates/.claude/agents/lint-fixer.md +78 -78
- package/templates/.claude/agents/refactor-advisor.md +122 -122
- package/templates/.claude/commands/agent-creator.md +185 -185
- package/templates/.claude/commands/bug-fix.md +193 -193
- package/templates/.claude/commands/command-creator.md +54 -54
- package/templates/.claude/commands/docs-creator.md +57 -57
- package/templates/.claude/commands/docs-refactor.md +26 -26
- package/templates/.claude/commands/execute.md +12 -12
- package/templates/.claude/commands/git-all.md +32 -32
- package/templates/.claude/commands/git-session.md +42 -42
- package/templates/.claude/commands/git.md +34 -34
- package/templates/.claude/commands/lint-fix.md +138 -138
- package/templates/.claude/commands/lint-init.md +61 -61
- package/templates/.claude/commands/plan.md +260 -260
- package/templates/.claude/commands/prd.md +24 -24
- package/templates/.claude/commands/pre-deploy.md +109 -109
- package/templates/.claude/commands/refactor.md +147 -147
- package/templates/.claude/commands/version-update.md +17 -17
- package/templates/hono/CLAUDE.md +27 -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 +228 -0
- package/templates/nextjs/docs/design.md +558 -0
- package/templates/nextjs/docs/guides/conventions.md +343 -0
- package/templates/nextjs/docs/guides/getting-started.md +367 -0
- package/templates/nextjs/docs/guides/routes.md +342 -0
- package/templates/nextjs/docs/library/better-auth/index.md +541 -0
- package/templates/nextjs/docs/library/nextjs/app-router.md +269 -0
- package/templates/nextjs/docs/library/nextjs/caching.md +351 -0
- package/templates/nextjs/docs/library/nextjs/index.md +291 -0
- package/templates/nextjs/docs/library/nextjs/middleware.md +391 -0
- package/templates/nextjs/docs/library/nextjs/route-handlers.md +382 -0
- package/templates/nextjs/docs/library/nextjs/server-actions.md +366 -0
- package/templates/nextjs/docs/library/prisma/cloudflare-d1.md +76 -0
- package/templates/nextjs/docs/library/prisma/config.md +77 -0
- package/templates/nextjs/docs/library/prisma/crud.md +90 -0
- package/templates/nextjs/docs/library/prisma/index.md +73 -0
- package/templates/nextjs/docs/library/prisma/relations.md +69 -0
- package/templates/nextjs/docs/library/prisma/schema.md +98 -0
- package/templates/nextjs/docs/library/prisma/setup.md +49 -0
- package/templates/nextjs/docs/library/prisma/transactions.md +50 -0
- package/templates/nextjs/docs/library/tanstack-query/index.md +66 -0
- package/templates/nextjs/docs/library/tanstack-query/invalidation.md +54 -0
- package/templates/nextjs/docs/library/tanstack-query/optimistic-updates.md +77 -0
- package/templates/nextjs/docs/library/tanstack-query/use-mutation.md +63 -0
- package/templates/nextjs/docs/library/tanstack-query/use-query.md +70 -0
- package/templates/nextjs/docs/library/zod/complex-types.md +61 -0
- package/templates/nextjs/docs/library/zod/index.md +56 -0
- package/templates/nextjs/docs/library/zod/transforms.md +51 -0
- package/templates/nextjs/docs/library/zod/validation.md +70 -0
- package/templates/npx/CLAUDE.md +37 -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 +53 -49
- 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 +63 -35
- package/templates/tanstack-start/docs/guides/routes.md +61 -42
- 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,34 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: Establish refactoring plan. Prioritize @refactor-advisor. Sequential Thinking 3-7 required. Improvements while maintaining functionality.
|
|
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
7
|
# Refactor Command
|
|
8
8
|
|
|
9
|
-
>
|
|
9
|
+
> Establish refactoring plan for code quality improvement and present execution strategy.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
**Refactoring target**: $ARGUMENTS
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
<argument_validation>
|
|
16
16
|
|
|
17
|
-
## ARGUMENT
|
|
17
|
+
## Verify ARGUMENT is provided
|
|
18
18
|
|
|
19
19
|
```
|
|
20
|
-
$ARGUMENTS
|
|
20
|
+
No $ARGUMENTS → Ask immediately:
|
|
21
21
|
|
|
22
|
-
"
|
|
22
|
+
"What should we refactor? Please be specific.
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
24
|
+
Examples:
|
|
25
|
+
- Improve specific file/module
|
|
26
|
+
- Reduce complexity
|
|
27
|
+
- Remove duplicate code
|
|
28
|
+
- Improve structure
|
|
29
|
+
- Optimize performance"
|
|
30
30
|
|
|
31
|
-
$ARGUMENTS
|
|
31
|
+
$ARGUMENTS provided → Proceed to next step
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
</argument_validation>
|
|
@@ -37,17 +37,17 @@ $ARGUMENTS 있음 → 다음 단계 진행
|
|
|
37
37
|
|
|
38
38
|
<workflow>
|
|
39
39
|
|
|
40
|
-
##
|
|
40
|
+
## Execution Flow
|
|
41
41
|
|
|
42
|
-
|
|
|
42
|
+
| Step | Task | Tool |
|
|
43
43
|
|------|------|------|
|
|
44
|
-
| 1.
|
|
45
|
-
| 2.
|
|
46
|
-
| 3.
|
|
47
|
-
| 4.
|
|
48
|
-
| 5.
|
|
49
|
-
| 6.
|
|
50
|
-
| 7.
|
|
44
|
+
| 1. Validate input | Verify ARGUMENT, ask if missing | - |
|
|
45
|
+
| 2. Judge agent usage | Decide whether to use @refactor-advisor | - |
|
|
46
|
+
| 3. Judge complexity | Determine analysis scope with Sequential Thinking | sequentialthinking (step 1) |
|
|
47
|
+
| 4. Analyze code | Understand current code structure, identify issues | Task (Explore) + Read/Grep |
|
|
48
|
+
| 5. Derive improvement options | Generate 4-5 approaches → select 2-3 main | sequentialthinking (steps 2-6) |
|
|
49
|
+
| 6. Present options | Present pros/cons, impact scope, recommendation | - |
|
|
50
|
+
| 7. Create plan document | Generate refactoring plan when selected | Write |
|
|
51
51
|
|
|
52
52
|
</workflow>
|
|
53
53
|
|
|
@@ -55,46 +55,46 @@ $ARGUMENTS 있음 → 다음 단계 진행
|
|
|
55
55
|
|
|
56
56
|
<agent_priority>
|
|
57
57
|
|
|
58
|
-
## @refactor-advisor Agent
|
|
58
|
+
## Prioritize @refactor-advisor Agent Usage
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
**Basic principle:**
|
|
61
61
|
```
|
|
62
|
-
|
|
62
|
+
Refactoring request → Consider @refactor-advisor first
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
###
|
|
65
|
+
### Usage conditions
|
|
66
66
|
|
|
67
|
-
|
|
|
68
|
-
|
|
69
|
-
|
|
|
70
|
-
|
|
|
71
|
-
|
|
|
67
|
+
| Condition | Description |
|
|
68
|
+
|-----------|-------------|
|
|
69
|
+
| **Code quality improvement** | Improve complexity, duplication, naming, structure |
|
|
70
|
+
| **No feature change** | Maintain behavior, improve code only |
|
|
71
|
+
| **Incremental improvement** | Need step-by-step refactoring plan |
|
|
72
72
|
|
|
73
|
-
### Agent
|
|
73
|
+
### Agent usage flow
|
|
74
74
|
|
|
75
75
|
```
|
|
76
|
-
1. @refactor-advisor
|
|
77
|
-
→
|
|
76
|
+
1. Call @refactor-advisor
|
|
77
|
+
→ Analyze code, derive improvements by priority
|
|
78
78
|
|
|
79
|
-
2.
|
|
80
|
-
→
|
|
79
|
+
2. Organize options based on analysis results
|
|
80
|
+
→ Present 2-3 options to user
|
|
81
81
|
|
|
82
|
-
3.
|
|
83
|
-
→ .claude/plans/refactor-[
|
|
82
|
+
3. Create plan document after selection
|
|
83
|
+
→ .claude/plans/refactor-[name].md
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
###
|
|
86
|
+
### Cases not using agent
|
|
87
87
|
|
|
88
88
|
```
|
|
89
|
-
✅ @refactor-advisor
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
|
|
94
|
-
❌
|
|
95
|
-
-
|
|
96
|
-
-
|
|
97
|
-
-
|
|
89
|
+
✅ Use @refactor-advisor:
|
|
90
|
+
- Improve existing code
|
|
91
|
+
- Reduce complexity/duplication
|
|
92
|
+
- Improve structure
|
|
93
|
+
|
|
94
|
+
❌ Direct handling:
|
|
95
|
+
- Architecture change
|
|
96
|
+
- Refactoring with new feature addition
|
|
97
|
+
- Framework migration
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
</agent_priority>
|
|
@@ -160,28 +160,28 @@ thought 7: 단계별 계획 및 추천안
|
|
|
160
160
|
|
|
161
161
|
<refactoring_areas>
|
|
162
162
|
|
|
163
|
-
##
|
|
163
|
+
## Refactoring areas
|
|
164
164
|
|
|
165
|
-
###
|
|
165
|
+
### Six improvement areas
|
|
166
166
|
|
|
167
|
-
|
|
|
168
|
-
|
|
169
|
-
|
|
|
170
|
-
|
|
|
171
|
-
|
|
|
172
|
-
|
|
|
173
|
-
|
|
|
174
|
-
|
|
|
167
|
+
| Area | Problem | Improvement |
|
|
168
|
+
|------|---------|-------------|
|
|
169
|
+
| **Complexity** | Long functions, deep nesting | Split functions, Early Return |
|
|
170
|
+
| **Duplication** | Identical/similar code repeats | Extract common functions/modules |
|
|
171
|
+
| **Naming** | Unclear variable/function names | Clear intent names |
|
|
172
|
+
| **Structure** | Unclear file/module structure | Separation of concerns, layering |
|
|
173
|
+
| **Patterns** | Using anti-patterns | Apply design patterns |
|
|
174
|
+
| **Types** | Excessive any, type instability | Explicit type definition |
|
|
175
175
|
|
|
176
|
-
###
|
|
176
|
+
### Checklist
|
|
177
177
|
|
|
178
178
|
```text
|
|
179
|
-
✅
|
|
180
|
-
✅
|
|
181
|
-
✅
|
|
182
|
-
✅
|
|
183
|
-
✅
|
|
184
|
-
✅
|
|
179
|
+
✅ Function length: target <= 20 lines
|
|
180
|
+
✅ Nesting depth: target <= 3 levels
|
|
181
|
+
✅ File length: recommended 200-300 lines
|
|
182
|
+
✅ Circular dependencies: eliminate
|
|
183
|
+
✅ Magic numbers: constants
|
|
184
|
+
✅ Comments: only what can't be explained by code
|
|
185
185
|
```
|
|
186
186
|
|
|
187
187
|
</refactoring_areas>
|
|
@@ -289,105 +289,105 @@ thought 7: 단계별 계획 및 추천안
|
|
|
289
289
|
선택해주세요. (Y/N)
|
|
290
290
|
```
|
|
291
291
|
|
|
292
|
-
###
|
|
292
|
+
### Refactoring plan document template
|
|
293
293
|
|
|
294
|
-
|
|
294
|
+
**File location:** `.claude/plans/refactor-[name].md`
|
|
295
295
|
|
|
296
296
|
```markdown
|
|
297
|
-
# [
|
|
297
|
+
# [Module name] Refactoring Plan
|
|
298
298
|
|
|
299
|
-
##
|
|
299
|
+
## Overview
|
|
300
300
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
301
|
+
**Goal:** [What will be improved]
|
|
302
|
+
**Selected approach:** [Option N]
|
|
303
|
+
**Expected impact scope:** [Files/modules list]
|
|
304
304
|
|
|
305
|
-
##
|
|
305
|
+
## Current state
|
|
306
306
|
|
|
307
|
-
###
|
|
307
|
+
### Issues
|
|
308
308
|
|
|
309
|
-
|
|
|
310
|
-
|
|
311
|
-
|
|
|
312
|
-
|
|
|
309
|
+
| Issue | Impact | Priority |
|
|
310
|
+
|-------|--------|----------|
|
|
311
|
+
| Issue 1 | Description | High |
|
|
312
|
+
| Issue 2 | Description | Medium |
|
|
313
313
|
|
|
314
|
-
###
|
|
314
|
+
### Metrics
|
|
315
315
|
|
|
316
|
-
-
|
|
317
|
-
-
|
|
318
|
-
-
|
|
316
|
+
- Complexity: [current value]
|
|
317
|
+
- Duplication rate: [current value]
|
|
318
|
+
- Test coverage: [current value]
|
|
319
319
|
|
|
320
|
-
##
|
|
320
|
+
## Improvement stages
|
|
321
321
|
|
|
322
|
-
### 1
|
|
322
|
+
### Stage 1: [Stage name]
|
|
323
323
|
|
|
324
|
-
|
|
324
|
+
**Goal:** [What will be achieved in this stage]
|
|
325
325
|
|
|
326
|
-
|
|
327
|
-
- [ ]
|
|
328
|
-
- [ ]
|
|
326
|
+
**Tasks:**
|
|
327
|
+
- [ ] Task 1
|
|
328
|
+
- [ ] Task 2
|
|
329
329
|
|
|
330
|
-
|
|
330
|
+
**Changed files:**
|
|
331
331
|
- `src/file1.ts`
|
|
332
332
|
- `src/file2.ts`
|
|
333
333
|
|
|
334
|
-
|
|
335
|
-
-
|
|
336
|
-
-
|
|
334
|
+
**Validation:**
|
|
335
|
+
- Tests pass
|
|
336
|
+
- Build success
|
|
337
337
|
|
|
338
|
-
### 2
|
|
338
|
+
### Stage 2: [Stage name]
|
|
339
339
|
|
|
340
|
-
|
|
340
|
+
**Goal:** [What will be achieved in this stage]
|
|
341
341
|
|
|
342
|
-
|
|
343
|
-
- [ ]
|
|
342
|
+
**Tasks:**
|
|
343
|
+
- [ ] Task 3
|
|
344
344
|
|
|
345
|
-
|
|
345
|
+
**Changed files:**
|
|
346
346
|
- `src/file3.ts`
|
|
347
347
|
|
|
348
|
-
### 3
|
|
348
|
+
### Stage 3: [Stage name]
|
|
349
349
|
...
|
|
350
350
|
|
|
351
|
-
##
|
|
351
|
+
## Expected improvements
|
|
352
352
|
|
|
353
|
-
|
|
|
354
|
-
|
|
355
|
-
|
|
|
356
|
-
|
|
|
357
|
-
|
|
|
353
|
+
| Metric | Before | After | Improvement |
|
|
354
|
+
|--------|--------|-------|------------|
|
|
355
|
+
| Complexity | X | Y | -Z% |
|
|
356
|
+
| Duplication rate | X | Y | -Z% |
|
|
357
|
+
| Code lines | X | Y | -Z% |
|
|
358
358
|
|
|
359
|
-
##
|
|
359
|
+
## Risk management
|
|
360
360
|
|
|
361
|
-
###
|
|
361
|
+
### Risks
|
|
362
362
|
|
|
363
|
-
|
|
|
364
|
-
|
|
365
|
-
|
|
|
366
|
-
|
|
|
363
|
+
| Risk | Impact | Mitigation |
|
|
364
|
+
|------|--------|-----------|
|
|
365
|
+
| Risk 1 | High | Plan 1 |
|
|
366
|
+
| Risk 2 | Medium | Plan 2 |
|
|
367
367
|
|
|
368
|
-
###
|
|
368
|
+
### Rollback plan
|
|
369
369
|
|
|
370
|
-
|
|
371
|
-
1.
|
|
372
|
-
2.
|
|
373
|
-
3.
|
|
370
|
+
If issues occur:
|
|
371
|
+
1. Use stage-by-stage commits
|
|
372
|
+
2. Revert to previous stage
|
|
373
|
+
3. Rerun tests
|
|
374
374
|
|
|
375
|
-
##
|
|
375
|
+
## Validation methods
|
|
376
376
|
|
|
377
|
-
###
|
|
378
|
-
- [ ]
|
|
379
|
-
- [ ]
|
|
380
|
-
- [ ]
|
|
377
|
+
### Functional validation
|
|
378
|
+
- [ ] Verify existing features work
|
|
379
|
+
- [ ] Regression tests pass
|
|
380
|
+
- [ ] Integration tests pass
|
|
381
381
|
|
|
382
|
-
###
|
|
383
|
-
- [ ]
|
|
384
|
-
- [ ]
|
|
385
|
-
- [ ]
|
|
382
|
+
### Quality validation
|
|
383
|
+
- [ ] Verify complexity reduction
|
|
384
|
+
- [ ] Verify duplication removal
|
|
385
|
+
- [ ] Verify type safety
|
|
386
386
|
|
|
387
|
-
##
|
|
387
|
+
## References
|
|
388
388
|
|
|
389
|
-
-
|
|
390
|
-
-
|
|
389
|
+
- Related document links
|
|
390
|
+
- Reference patterns
|
|
391
391
|
```
|
|
392
392
|
|
|
393
393
|
</document_generation>
|
|
@@ -396,32 +396,32 @@ thought 7: 단계별 계획 및 추천안
|
|
|
396
396
|
|
|
397
397
|
<validation>
|
|
398
398
|
|
|
399
|
-
##
|
|
399
|
+
## Validation checklist
|
|
400
400
|
|
|
401
|
-
|
|
401
|
+
Before execution:
|
|
402
402
|
|
|
403
403
|
```text
|
|
404
|
-
✅ ARGUMENT
|
|
405
|
-
✅ @refactor-advisor
|
|
406
|
-
✅ Sequential Thinking
|
|
407
|
-
✅ Task (Explore)
|
|
408
|
-
✅
|
|
409
|
-
✅
|
|
410
|
-
✅
|
|
411
|
-
✅
|
|
404
|
+
✅ Verify ARGUMENT (ask if missing)
|
|
405
|
+
✅ Judge whether to use @refactor-advisor
|
|
406
|
+
✅ Sequential Thinking minimum 3 steps
|
|
407
|
+
✅ Analyze code with Task (Explore)
|
|
408
|
+
✅ Minimum 2 options, recommended 3
|
|
409
|
+
✅ List pros/cons for each option
|
|
410
|
+
✅ Present impact scope and estimated work
|
|
411
|
+
✅ Emphasize principle of maintaining functionality
|
|
412
412
|
```
|
|
413
413
|
|
|
414
|
-
|
|
414
|
+
Absolutely forbidden:
|
|
415
415
|
|
|
416
416
|
```text
|
|
417
|
-
❌
|
|
418
|
-
❌ Edit
|
|
419
|
-
❌ Sequential Thinking 3
|
|
420
|
-
❌
|
|
421
|
-
❌
|
|
422
|
-
❌
|
|
423
|
-
❌
|
|
424
|
-
❌
|
|
417
|
+
❌ Start analysis without ARGUMENT
|
|
418
|
+
❌ Use Edit tool (code modification forbidden)
|
|
419
|
+
❌ Sequential Thinking less than 3 steps
|
|
420
|
+
❌ Present only 1 option
|
|
421
|
+
❌ Suggest options by guessing without code analysis
|
|
422
|
+
❌ Start implementation without user choice
|
|
423
|
+
❌ Include feature changes
|
|
424
|
+
❌ List options without pros/cons
|
|
425
425
|
```
|
|
426
426
|
|
|
427
427
|
</validation>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: Update project version and commit
|
|
3
3
|
allowed-tools: Bash, Read, Edit
|
|
4
4
|
argument-hint: <new-version | +1 | +minor | +major>
|
|
5
5
|
---
|
|
@@ -8,42 +8,42 @@ argument-hint: <new-version | +1 | +minor | +major>
|
|
|
8
8
|
|
|
9
9
|
# Version Update Command
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Update and commit entire project version.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
**Argument**: $ARGUMENTS
|
|
14
14
|
|
|
15
15
|
<version_rules>
|
|
16
16
|
|
|
17
|
-
|
|
|
18
|
-
|
|
17
|
+
| Argument | Action | Example |
|
|
18
|
+
|----------|--------|---------|
|
|
19
19
|
| `+1` | patch +1 | 0.1.13 → 0.1.14 |
|
|
20
20
|
| `+minor` | minor +1 | 0.1.13 → 0.2.0 |
|
|
21
21
|
| `+major` | major +1 | 0.1.13 → 1.0.0 |
|
|
22
|
-
| `x.x.x` |
|
|
22
|
+
| `x.x.x` | Set directly | 0.1.13 → 2.0.0 |
|
|
23
23
|
|
|
24
24
|
</version_rules>
|
|
25
25
|
|
|
26
26
|
<workflow>
|
|
27
27
|
|
|
28
|
-
1.
|
|
28
|
+
1. **Check current version** (parallel read)
|
|
29
29
|
- packages/claude-code/package.json
|
|
30
30
|
- packages/claude-code/src/index.ts
|
|
31
31
|
|
|
32
|
-
2.
|
|
32
|
+
2. **Calculate new version**
|
|
33
33
|
|
|
34
|
-
3.
|
|
34
|
+
3. **Update all files with Edit**
|
|
35
35
|
|
|
36
|
-
4.
|
|
36
|
+
4. **Stage files**
|
|
37
37
|
```bash
|
|
38
38
|
git add packages/claude-code/package.json packages/claude-code/src/index.ts
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
5.
|
|
41
|
+
5. **Commit**
|
|
42
42
|
```bash
|
|
43
|
-
git commit -m "chore:
|
|
43
|
+
git commit -m "chore: Update version to X.X.X"
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
6.
|
|
46
|
+
6. **Verify completion**
|
|
47
47
|
```bash
|
|
48
48
|
git status
|
|
49
49
|
```
|
|
@@ -52,8 +52,8 @@ argument-hint: <new-version | +1 | +minor | +major>
|
|
|
52
52
|
|
|
53
53
|
<update_targets>
|
|
54
54
|
|
|
55
|
-
|
|
|
56
|
-
|
|
55
|
+
| File | Modification location |
|
|
56
|
+
|------|----------------------|
|
|
57
57
|
| `package.json` | `"version": "x.x.x"` |
|
|
58
58
|
| `src/index.ts` | `.version('x.x.x')` |
|
|
59
59
|
|
|
@@ -64,13 +64,13 @@ argument-hint: <new-version | +1 | +minor | +major>
|
|
|
64
64
|
```bash
|
|
65
65
|
/version-update +1
|
|
66
66
|
→ 0.1.13 → 0.1.14
|
|
67
|
-
→ chore:
|
|
67
|
+
→ chore: Update version to 0.1.14
|
|
68
68
|
|
|
69
69
|
/version-update +minor
|
|
70
70
|
→ 0.1.13 → 0.2.0
|
|
71
71
|
|
|
72
72
|
/version-update 2.0.0
|
|
73
|
-
→
|
|
73
|
+
→ Set directly
|
|
74
74
|
```
|
|
75
75
|
|
|
76
76
|
</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,14 @@
|
|
|
28
28
|
|
|
29
29
|
<required>
|
|
30
30
|
|
|
31
|
-
|
|
|
32
|
-
|
|
33
|
-
|
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
| 3+
|
|
37
|
-
| Validation | zValidator, HTTPException
|
|
38
|
-
|
|
|
31
|
+
| Task | Required |
|
|
32
|
+
|------|----------|
|
|
33
|
+
| Before work | Read related docs (API→hono, DB→prisma) |
|
|
34
|
+
| Code search | ast-grep |
|
|
35
|
+
| Complex tasks | Sequential Thinking MCP |
|
|
36
|
+
| 3+ file changes | gemini-review |
|
|
37
|
+
| Validation | zValidator, HTTPException error handling |
|
|
38
|
+
| Code writing | UTF-8, Korean comments per code block, Prisma Multi-File all elements commented |
|
|
39
39
|
|
|
40
40
|
</required>
|
|
41
41
|
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
|
|
44
44
|
<tech_stack>
|
|
45
45
|
|
|
46
|
-
|
|
|
47
|
-
|
|
48
|
-
| Hono |
|
|
46
|
+
| Technology | Version | Notes |
|
|
47
|
+
|------------|---------|-------|
|
|
48
|
+
| Hono | Latest | - |
|
|
49
49
|
| TypeScript | 5.x | strict |
|
|
50
|
-
| Prisma | **7.x** | `prisma-client`, output
|
|
50
|
+
| Prisma | **7.x** | `prisma-client`, output required |
|
|
51
51
|
| Zod | **4.x** | `z.email()`, `z.url()` |
|
|
52
52
|
|
|
53
53
|
</tech_stack>
|
|
@@ -69,23 +69,23 @@ src/
|
|
|
69
69
|
└── types/
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
Common logic → `src/services/`, route-specific logic → individual route files
|
|
73
73
|
</structure>
|
|
74
74
|
|
|
75
75
|
---
|
|
76
76
|
|
|
77
77
|
<conventions>
|
|
78
78
|
|
|
79
|
-
|
|
80
|
-
TypeScript: const
|
|
81
|
-
Import
|
|
79
|
+
File naming: kebab-case
|
|
80
|
+
TypeScript: const declarations, explicit return types, interface (objects)/type (unions), any→unknown
|
|
81
|
+
Import order: external → internal → relative paths → types
|
|
82
82
|
|
|
83
83
|
Prisma Multi-File:
|
|
84
84
|
```
|
|
85
85
|
prisma/schema/
|
|
86
86
|
├── +base.prisma # datasource, generator
|
|
87
|
-
├── +enum.prisma #
|
|
88
|
-
└── [model].prisma #
|
|
87
|
+
├── +enum.prisma # enums
|
|
88
|
+
└── [model].prisma # per-model files (Korean comments!)
|
|
89
89
|
```
|
|
90
90
|
|
|
91
91
|
</conventions>
|
|
@@ -95,7 +95,7 @@ prisma/schema/
|
|
|
95
95
|
<quick_patterns>
|
|
96
96
|
|
|
97
97
|
```typescript
|
|
98
|
-
// App +
|
|
98
|
+
// App + Error handler
|
|
99
99
|
import { Hono } from 'hono'
|
|
100
100
|
import { HTTPException } from 'hono/http-exception'
|
|
101
101
|
|
|
@@ -144,7 +144,7 @@ export const authMiddleware = createMiddleware(async (c, next) => {
|
|
|
144
144
|
await next()
|
|
145
145
|
})
|
|
146
146
|
|
|
147
|
-
//
|
|
147
|
+
// Usage
|
|
148
148
|
app.use('/api/*', authMiddleware)
|
|
149
149
|
```
|
|
150
150
|
|