@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,33 +1,33 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: Review development approach and present 2-3 options with pros/cons. Sequential thinking 3-7 required. Plan only, no code changes.
|
|
3
3
|
allowed-tools: Read, Glob, Grep, Bash(git:*, ast-grep:*), Task, Write, mcp__sequential-thinking__sequentialthinking
|
|
4
|
-
argument-hint:
|
|
4
|
+
argument-hint: <feature to develop or problem to solve>
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Plan Command
|
|
8
8
|
|
|
9
|
-
>
|
|
9
|
+
> Review development approach and present 2-3 options with pros/cons.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
**Planning 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 plan? Please be specific.
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
24
|
+
Examples:
|
|
25
|
+
- Add new feature
|
|
26
|
+
- Fix bug
|
|
27
|
+
- Refactor
|
|
28
|
+
- Change architecture"
|
|
29
29
|
|
|
30
|
-
$ARGUMENTS
|
|
30
|
+
$ARGUMENTS provided → Proceed to next step
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
</argument_validation>
|
|
@@ -36,17 +36,17 @@ $ARGUMENTS 있음 → 다음 단계 진행
|
|
|
36
36
|
|
|
37
37
|
<workflow>
|
|
38
38
|
|
|
39
|
-
##
|
|
39
|
+
## Execution Flow
|
|
40
40
|
|
|
41
|
-
|
|
|
41
|
+
| Step | Task | Tool |
|
|
42
42
|
|------|------|------|
|
|
43
|
-
| 1.
|
|
44
|
-
| 2.
|
|
45
|
-
| 3.
|
|
46
|
-
| 4.
|
|
47
|
-
| 5.
|
|
48
|
-
| 6.
|
|
49
|
-
| 7.
|
|
43
|
+
| 1. Validate input | Verify ARGUMENT, ask if missing | - |
|
|
44
|
+
| 2. Judge complexity | Determine analysis scope with Sequential Thinking | sequentialthinking (step 1) |
|
|
45
|
+
| 3. Explore codebase | Understand current state, explore related files | Task (Explore) + Read/Grep |
|
|
46
|
+
| 4. Derive options | Generate 4-5 possible approaches → select 2-3 main | sequentialthinking (steps 2-6) |
|
|
47
|
+
| 5. Present options | Present pros/cons, impact scope, recommendation | - |
|
|
48
|
+
| 6. User selection | Wait for option selection | - |
|
|
49
|
+
| 7. Document generation | Generate plan document when selected | Write |
|
|
50
50
|
|
|
51
51
|
</workflow>
|
|
52
52
|
|
|
@@ -54,49 +54,49 @@ $ARGUMENTS 있음 → 다음 단계 진행
|
|
|
54
54
|
|
|
55
55
|
<agent_usage>
|
|
56
56
|
|
|
57
|
-
## @refactor-advisor Agent
|
|
57
|
+
## @refactor-advisor Agent Usage
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
-
|
|
59
|
+
**When to use:**
|
|
60
|
+
- Establish refactoring plan
|
|
61
|
+
- Code quality improvement needed
|
|
62
|
+
- Reduce complexity, remove duplication
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
**How to call:**
|
|
65
65
|
```bash
|
|
66
66
|
@refactor-advisor
|
|
67
|
-
#
|
|
68
|
-
"
|
|
69
|
-
"
|
|
67
|
+
# or natural language
|
|
68
|
+
"Create refactoring plan for this code"
|
|
69
|
+
"Analyze code improvements"
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
-
|
|
74
|
-
- Sequential Thinking
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
-
|
|
81
|
-
-
|
|
82
|
-
-
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
|
|
87
|
-
**plan command
|
|
88
|
-
- plan:
|
|
89
|
-
- @refactor-advisor:
|
|
90
|
-
|
|
91
|
-
|
|
72
|
+
**Benefits:**
|
|
73
|
+
- Auto-analyze complexity, duplication, patterns
|
|
74
|
+
- Derive improvements with Sequential Thinking (3-5 steps)
|
|
75
|
+
- Prioritized refactoring plan (High/Medium/Low)
|
|
76
|
+
- Concrete Before/After code examples
|
|
77
|
+
- Propose incremental change stages
|
|
78
|
+
|
|
79
|
+
**Analysis areas:**
|
|
80
|
+
- Complexity (function length, nesting depth)
|
|
81
|
+
- Duplication (identical/similar code)
|
|
82
|
+
- Naming (variable/function names)
|
|
83
|
+
- Structure (files/modules)
|
|
84
|
+
- Patterns (anti-patterns)
|
|
85
|
+
- Types (remove any)
|
|
86
|
+
|
|
87
|
+
**Difference from plan command:**
|
|
88
|
+
- plan: New feature/architecture change planning
|
|
89
|
+
- @refactor-advisor: Existing code improvement planning (no feature change)
|
|
90
|
+
|
|
91
|
+
**After refactoring execution:**
|
|
92
92
|
```bash
|
|
93
|
-
# 1.
|
|
93
|
+
# 1. Refactoring plan
|
|
94
94
|
@refactor-advisor
|
|
95
95
|
|
|
96
|
-
# 2.
|
|
96
|
+
# 2. After plan approval, implement
|
|
97
97
|
@implementation-executor
|
|
98
98
|
|
|
99
|
-
# 3.
|
|
99
|
+
# 3. Validation
|
|
100
100
|
@deployment-validator
|
|
101
101
|
```
|
|
102
102
|
|
|
@@ -106,55 +106,55 @@ $ARGUMENTS 있음 → 다음 단계 진행
|
|
|
106
106
|
|
|
107
107
|
<thinking_strategy>
|
|
108
108
|
|
|
109
|
-
## Sequential Thinking
|
|
109
|
+
## Sequential Thinking Guide
|
|
110
110
|
|
|
111
|
-
###
|
|
111
|
+
### Judge complexity (thought 1)
|
|
112
112
|
|
|
113
113
|
```
|
|
114
|
-
thought 1:
|
|
115
|
-
-
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
-
|
|
114
|
+
thought 1: Judge complexity
|
|
115
|
+
- Impact scope: number of files, modules
|
|
116
|
+
- Dependencies: external libraries, system integration
|
|
117
|
+
- Risk: impact on existing features, rollback possibility
|
|
118
|
+
- Technical difficulty: new patterns, unknown areas
|
|
119
119
|
```
|
|
120
120
|
|
|
121
|
-
###
|
|
121
|
+
### Strategy by complexity
|
|
122
122
|
|
|
123
|
-
|
|
|
124
|
-
|
|
125
|
-
|
|
|
126
|
-
|
|
|
127
|
-
|
|
|
123
|
+
| Complexity | Thoughts | Criteria | Pattern |
|
|
124
|
+
|------------|----------|----------|---------|
|
|
125
|
+
| **Simple** | 3 | 1-2 files, clear changes | Judge complexity → current state → derive options |
|
|
126
|
+
| **Medium** | 5 | 3-5 files, logic changes | Judge complexity → current state → explore approaches → compare options → recommendation |
|
|
127
|
+
| **Complex** | 7+ | multiple modules, architecture change | Judge complexity → deep analysis → constraints → approaches → compare → detailed analysis → recommendation |
|
|
128
128
|
|
|
129
|
-
###
|
|
129
|
+
### Medium complexity pattern (5 steps)
|
|
130
130
|
|
|
131
131
|
```
|
|
132
|
-
thought 1:
|
|
133
|
-
thought 2:
|
|
134
|
-
thought 3:
|
|
135
|
-
thought 4:
|
|
136
|
-
thought 5:
|
|
132
|
+
thought 1: Judge complexity and determine analysis scope
|
|
133
|
+
thought 2: Analyze current state (code, architecture, constraints)
|
|
134
|
+
thought 3: Enumerate possible approaches (4-5)
|
|
135
|
+
thought 4: Select 3 main options and analyze pros/cons
|
|
136
|
+
thought 5: Finalize options and derive recommendation
|
|
137
137
|
```
|
|
138
138
|
|
|
139
|
-
###
|
|
139
|
+
### Complex case pattern (7 steps)
|
|
140
140
|
|
|
141
141
|
```
|
|
142
|
-
thought 1:
|
|
143
|
-
thought 2:
|
|
144
|
-
thought 3:
|
|
145
|
-
thought 4:
|
|
146
|
-
thought 5:
|
|
147
|
-
thought 6:
|
|
148
|
-
thought 7:
|
|
142
|
+
thought 1: Judge complexity
|
|
143
|
+
thought 2: Deep analysis of current state
|
|
144
|
+
thought 3: Summarize technical constraints and requirements
|
|
145
|
+
thought 4: Explore possible approaches
|
|
146
|
+
thought 5: Comparative analysis of each approach
|
|
147
|
+
thought 6: Select 3 options and detailed pros/cons
|
|
148
|
+
thought 7: Recommendation and rationale
|
|
149
149
|
```
|
|
150
150
|
|
|
151
|
-
###
|
|
151
|
+
### Key principles
|
|
152
152
|
|
|
153
153
|
```text
|
|
154
|
-
✅
|
|
155
|
-
✅
|
|
156
|
-
✅
|
|
157
|
-
✅
|
|
154
|
+
✅ Output thinking process to actually think
|
|
155
|
+
✅ Estimate high if complexity uncertain (can expand 5→7)
|
|
156
|
+
✅ Concrete analysis needed per thought (no abstract descriptions)
|
|
157
|
+
✅ Revise previous thoughts with isRevision if needed
|
|
158
158
|
```
|
|
159
159
|
|
|
160
160
|
</thinking_strategy>
|
|
@@ -163,63 +163,63 @@ thought 7: 추천안 및 근거
|
|
|
163
163
|
|
|
164
164
|
<codebase_exploration>
|
|
165
165
|
|
|
166
|
-
## Task Subagent
|
|
166
|
+
## Task Subagent Usage
|
|
167
167
|
|
|
168
|
-
### Subagent
|
|
168
|
+
### Subagent selection
|
|
169
169
|
|
|
170
|
-
| subagent_type |
|
|
171
|
-
|
|
172
|
-
| **Explore** |
|
|
173
|
-
| **Plan** |
|
|
174
|
-
| **general-purpose** |
|
|
170
|
+
| subagent_type | Purpose | Example |
|
|
171
|
+
|---------------|---------|---------|
|
|
172
|
+
| **Explore** | Understand codebase structure, explore related files | "Analyze current auth structure" |
|
|
173
|
+
| **Plan** | Establish implementation strategy, step-by-step planning | "Create migration plan" |
|
|
174
|
+
| **general-purpose** | Complex analysis, multi-system correlation | "Analyze dependencies between modules" |
|
|
175
175
|
|
|
176
|
-
### Task
|
|
176
|
+
### Task call patterns
|
|
177
177
|
|
|
178
|
-
|
|
178
|
+
**Single exploration:**
|
|
179
179
|
|
|
180
180
|
```typescript
|
|
181
181
|
Task({
|
|
182
182
|
subagent_type: 'Explore',
|
|
183
|
-
description: '
|
|
183
|
+
description: 'Analyze current auth structure',
|
|
184
184
|
prompt: `
|
|
185
|
-
|
|
186
|
-
-
|
|
187
|
-
-
|
|
188
|
-
-
|
|
185
|
+
Understand current authentication-related code structure.
|
|
186
|
+
- Libraries in use
|
|
187
|
+
- Session management approach
|
|
188
|
+
- Files needing modification
|
|
189
189
|
`
|
|
190
190
|
})
|
|
191
191
|
```
|
|
192
192
|
|
|
193
|
-
|
|
193
|
+
**Parallel exploration (complex cases):**
|
|
194
194
|
|
|
195
195
|
```typescript
|
|
196
|
-
//
|
|
196
|
+
// Multiple Task calls in single message
|
|
197
197
|
Task({
|
|
198
198
|
subagent_type: 'Explore',
|
|
199
|
-
prompt: '
|
|
199
|
+
prompt: 'Analyze frontend auth structure'
|
|
200
200
|
})
|
|
201
201
|
|
|
202
202
|
Task({
|
|
203
203
|
subagent_type: 'Explore',
|
|
204
|
-
prompt: '
|
|
204
|
+
prompt: 'Analyze backend API auth endpoints'
|
|
205
205
|
})
|
|
206
206
|
|
|
207
207
|
Task({
|
|
208
208
|
subagent_type: 'Explore',
|
|
209
|
-
prompt: '
|
|
209
|
+
prompt: 'Analyze database session schema'
|
|
210
210
|
})
|
|
211
211
|
|
|
212
|
-
// →
|
|
212
|
+
// → Combine results then organize options
|
|
213
213
|
```
|
|
214
214
|
|
|
215
|
-
###
|
|
215
|
+
### Exploration checklist
|
|
216
216
|
|
|
217
217
|
```text
|
|
218
|
-
✅
|
|
219
|
-
✅
|
|
220
|
-
✅
|
|
221
|
-
✅
|
|
222
|
-
✅
|
|
218
|
+
✅ Understand current implementation approach
|
|
219
|
+
✅ Libraries/framework versions in use
|
|
220
|
+
✅ Related file and directory locations
|
|
221
|
+
✅ Dependencies and related modules
|
|
222
|
+
✅ Existing constraints (security, performance, compatibility)
|
|
223
223
|
```
|
|
224
224
|
|
|
225
225
|
</codebase_exploration>
|
|
@@ -228,75 +228,75 @@ Task({
|
|
|
228
228
|
|
|
229
229
|
<option_presentation>
|
|
230
230
|
|
|
231
|
-
##
|
|
231
|
+
## Option presentation format
|
|
232
232
|
|
|
233
|
-
###
|
|
233
|
+
### Present 3 options (standard)
|
|
234
234
|
|
|
235
235
|
```markdown
|
|
236
|
-
##
|
|
236
|
+
## Analysis Results
|
|
237
237
|
|
|
238
|
-
###
|
|
238
|
+
### Option 1: [Option name] (Recommended)
|
|
239
239
|
|
|
240
|
-
|
|
241
|
-
-
|
|
242
|
-
-
|
|
240
|
+
**Approach:**
|
|
241
|
+
- Description 1
|
|
242
|
+
- Description 2
|
|
243
243
|
|
|
244
|
-
|
|
|
244
|
+
| Pros | Cons |
|
|
245
245
|
|------|------|
|
|
246
|
-
|
|
|
247
|
-
|
|
|
246
|
+
| Pro 1 | Con 1 |
|
|
247
|
+
| Pro 2 | Con 2 |
|
|
248
248
|
|
|
249
|
-
|
|
250
|
-
-
|
|
251
|
-
-
|
|
252
|
-
-
|
|
249
|
+
**Impact scope:**
|
|
250
|
+
- Files: `src/auth/`, `src/api/`
|
|
251
|
+
- Expected change size: Medium
|
|
252
|
+
- Risk: Low
|
|
253
253
|
|
|
254
254
|
---
|
|
255
255
|
|
|
256
|
-
###
|
|
256
|
+
### Option 2: [Option name]
|
|
257
257
|
|
|
258
|
-
|
|
258
|
+
**Approach:**
|
|
259
259
|
...
|
|
260
260
|
|
|
261
|
-
|
|
|
261
|
+
| Pros | Cons |
|
|
262
262
|
|------|------|
|
|
263
263
|
| ... | ... |
|
|
264
264
|
|
|
265
|
-
|
|
265
|
+
**Impact scope:**
|
|
266
266
|
...
|
|
267
267
|
|
|
268
268
|
---
|
|
269
269
|
|
|
270
|
-
###
|
|
270
|
+
### Option 3: [Option name]
|
|
271
271
|
|
|
272
|
-
|
|
272
|
+
**Approach:**
|
|
273
273
|
...
|
|
274
274
|
|
|
275
275
|
---
|
|
276
276
|
|
|
277
|
-
##
|
|
277
|
+
## Recommendation and rationale
|
|
278
278
|
|
|
279
|
-
|
|
280
|
-
-
|
|
281
|
-
-
|
|
279
|
+
I recommend Option 1.
|
|
280
|
+
- Rationale 1
|
|
281
|
+
- Rationale 2
|
|
282
282
|
|
|
283
|
-
|
|
283
|
+
Which option would you choose? (1/2/3)
|
|
284
284
|
```
|
|
285
285
|
|
|
286
|
-
###
|
|
286
|
+
### Present 2 options (when choices are clear)
|
|
287
287
|
|
|
288
288
|
```markdown
|
|
289
|
-
##
|
|
289
|
+
## Analysis Results
|
|
290
290
|
|
|
291
|
-
|
|
291
|
+
There are two approaches:
|
|
292
292
|
|
|
293
|
-
###
|
|
293
|
+
### Option A: [Option name]
|
|
294
294
|
...
|
|
295
295
|
|
|
296
|
-
###
|
|
296
|
+
### Option B: [Option name]
|
|
297
297
|
...
|
|
298
298
|
|
|
299
|
-
|
|
299
|
+
Which option would you choose? (A/B)
|
|
300
300
|
```
|
|
301
301
|
|
|
302
302
|
</option_presentation>
|
|
@@ -305,90 +305,90 @@ Task({
|
|
|
305
305
|
|
|
306
306
|
<document_generation>
|
|
307
307
|
|
|
308
|
-
##
|
|
308
|
+
## Document generation
|
|
309
309
|
|
|
310
|
-
###
|
|
310
|
+
### Document creation question
|
|
311
311
|
|
|
312
312
|
```
|
|
313
|
-
|
|
313
|
+
You selected Option [N].
|
|
314
314
|
|
|
315
|
-
|
|
316
|
-
- Y: .claude/plans/[
|
|
317
|
-
- N:
|
|
315
|
+
Would you like to create a plan document?
|
|
316
|
+
- Y: Create .claude/plans/[feature-name].md
|
|
317
|
+
- N: Start implementation directly
|
|
318
318
|
|
|
319
|
-
|
|
319
|
+
Please choose. (Y/N)
|
|
320
320
|
```
|
|
321
321
|
|
|
322
|
-
###
|
|
322
|
+
### Plan document template
|
|
323
323
|
|
|
324
|
-
|
|
324
|
+
**File location:** `.claude/plans/[feature-name].md`
|
|
325
325
|
|
|
326
326
|
```markdown
|
|
327
|
-
# [
|
|
327
|
+
# [Feature name] Implementation Plan
|
|
328
328
|
|
|
329
|
-
##
|
|
329
|
+
## Overview
|
|
330
330
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
331
|
+
**Goal:** [What will be achieved]
|
|
332
|
+
**Selected approach:** [Option N]
|
|
333
|
+
**Expected impact scope:** [Files/modules list]
|
|
334
334
|
|
|
335
|
-
##
|
|
335
|
+
## Current state
|
|
336
336
|
|
|
337
|
-
-
|
|
338
|
-
-
|
|
339
|
-
-
|
|
337
|
+
- Current structure description
|
|
338
|
+
- Related code location
|
|
339
|
+
- Existing constraints
|
|
340
340
|
|
|
341
|
-
##
|
|
341
|
+
## Implementation stages
|
|
342
342
|
|
|
343
|
-
### 1
|
|
343
|
+
### Stage 1: [Stage name]
|
|
344
344
|
|
|
345
|
-
|
|
346
|
-
- [ ]
|
|
347
|
-
- [ ]
|
|
345
|
+
**Tasks:**
|
|
346
|
+
- [ ] Task 1
|
|
347
|
+
- [ ] Task 2
|
|
348
348
|
|
|
349
|
-
|
|
349
|
+
**Changed files:**
|
|
350
350
|
- `src/file1.ts`
|
|
351
351
|
- `src/file2.ts`
|
|
352
352
|
|
|
353
|
-
### 2
|
|
353
|
+
### Stage 2: [Stage name]
|
|
354
354
|
|
|
355
|
-
|
|
356
|
-
- [ ]
|
|
355
|
+
**Tasks:**
|
|
356
|
+
- [ ] Task 3
|
|
357
357
|
|
|
358
|
-
|
|
358
|
+
**Changed files:**
|
|
359
359
|
- `src/file3.ts`
|
|
360
360
|
|
|
361
|
-
### 3
|
|
361
|
+
### Stage 3: [Stage name]
|
|
362
362
|
...
|
|
363
363
|
|
|
364
|
-
##
|
|
364
|
+
## Considerations
|
|
365
365
|
|
|
366
|
-
###
|
|
366
|
+
### Risks
|
|
367
367
|
|
|
368
|
-
|
|
|
369
|
-
|
|
370
|
-
|
|
|
371
|
-
|
|
|
368
|
+
| Risk | Mitigation |
|
|
369
|
+
|------|-----------|
|
|
370
|
+
| Risk 1 | Plan 1 |
|
|
371
|
+
| Risk 2 | Plan 2 |
|
|
372
372
|
|
|
373
|
-
###
|
|
373
|
+
### Dependencies
|
|
374
374
|
|
|
375
|
-
-
|
|
376
|
-
-
|
|
375
|
+
- External libraries: [List]
|
|
376
|
+
- Other systems: [List]
|
|
377
377
|
|
|
378
|
-
###
|
|
378
|
+
### Rollback plan
|
|
379
379
|
|
|
380
|
-
|
|
380
|
+
How to rollback if issues occur.
|
|
381
381
|
|
|
382
|
-
##
|
|
382
|
+
## Validation methods
|
|
383
383
|
|
|
384
|
-
-
|
|
385
|
-
-
|
|
386
|
-
-
|
|
384
|
+
- Test item 1
|
|
385
|
+
- Test item 2
|
|
386
|
+
- Integration test
|
|
387
387
|
|
|
388
|
-
##
|
|
388
|
+
## References
|
|
389
389
|
|
|
390
|
-
-
|
|
391
|
-
-
|
|
390
|
+
- Related document links
|
|
391
|
+
- Reference materials
|
|
392
392
|
```
|
|
393
393
|
|
|
394
394
|
</document_generation>
|
|
@@ -397,29 +397,29 @@ Task({
|
|
|
397
397
|
|
|
398
398
|
<validation>
|
|
399
399
|
|
|
400
|
-
##
|
|
400
|
+
## Validation checklist
|
|
401
401
|
|
|
402
|
-
|
|
402
|
+
Before execution:
|
|
403
403
|
|
|
404
404
|
```text
|
|
405
|
-
✅ ARGUMENT
|
|
406
|
-
✅ Sequential Thinking
|
|
407
|
-
✅ Task (Explore)
|
|
408
|
-
✅
|
|
409
|
-
✅
|
|
410
|
-
✅
|
|
405
|
+
✅ Verify ARGUMENT (ask if missing)
|
|
406
|
+
✅ Sequential Thinking minimum 3 steps
|
|
407
|
+
✅ Explore codebase with Task (Explore)
|
|
408
|
+
✅ Minimum 2 options, recommended 3
|
|
409
|
+
✅ List pros/cons for each option
|
|
410
|
+
✅ Present impact scope and estimated work
|
|
411
411
|
```
|
|
412
412
|
|
|
413
|
-
|
|
413
|
+
Absolutely forbidden:
|
|
414
414
|
|
|
415
415
|
```text
|
|
416
|
-
❌
|
|
417
|
-
❌ Edit
|
|
418
|
-
❌ Sequential Thinking 3
|
|
419
|
-
❌
|
|
420
|
-
❌
|
|
421
|
-
❌
|
|
422
|
-
❌
|
|
416
|
+
❌ Start analysis without ARGUMENT
|
|
417
|
+
❌ Use Edit tool (code modification forbidden)
|
|
418
|
+
❌ Sequential Thinking less than 3 steps
|
|
419
|
+
❌ Present only 1 option
|
|
420
|
+
❌ Suggest options by guessing without code exploration
|
|
421
|
+
❌ Start implementation without user choice
|
|
422
|
+
❌ List options without pros/cons
|
|
423
423
|
```
|
|
424
424
|
|
|
425
425
|
</validation>
|
|
@@ -428,88 +428,88 @@ Task({
|
|
|
428
428
|
|
|
429
429
|
<examples>
|
|
430
430
|
|
|
431
|
-
##
|
|
431
|
+
## Real-world examples
|
|
432
432
|
|
|
433
|
-
###
|
|
433
|
+
### Example 1: Change auth system
|
|
434
434
|
|
|
435
435
|
```bash
|
|
436
|
-
|
|
436
|
+
User: /plan Change user authentication from JWT to session-based
|
|
437
437
|
|
|
438
|
-
1. Sequential Thinking (7
|
|
439
|
-
thought 1: "
|
|
440
|
-
thought 2: "
|
|
441
|
-
thought 3: "
|
|
442
|
-
thought 4: "
|
|
443
|
-
thought 5: "
|
|
444
|
-
thought 6: "
|
|
445
|
-
thought 7: "
|
|
438
|
+
1. Sequential Thinking (7 steps):
|
|
439
|
+
thought 1: "Auth system change - high complexity, multiple module impact"
|
|
440
|
+
thought 2: "Current JWT implementation analysis: src/auth/jwt.ts, token validation middleware"
|
|
441
|
+
thought 3: "Constraints: maintain existing user sessions, Redis/DB choice"
|
|
442
|
+
thought 4: "Approaches: incremental migration, full replacement, hybrid"
|
|
443
|
+
thought 5: "Incremental has low risk, hybrid high complexity"
|
|
444
|
+
thought 6: "Select 3 options and analyze pros/cons"
|
|
445
|
+
thought 7: "Recommend incremental migration - easy rollback, step-by-step validation"
|
|
446
446
|
|
|
447
|
-
2. Task
|
|
448
|
-
Task (Explore): "
|
|
449
|
-
→ src/auth/, src/middleware/, API
|
|
447
|
+
2. Task exploration:
|
|
448
|
+
Task (Explore): "Analyze current JWT auth implementation"
|
|
449
|
+
→ Understand src/auth/, src/middleware/, API endpoints
|
|
450
450
|
|
|
451
|
-
3.
|
|
452
|
-
|
|
453
|
-
-
|
|
454
|
-
-
|
|
451
|
+
3. Present options:
|
|
452
|
+
Option 1: Incremental migration (Recommended)
|
|
453
|
+
- Pro: Easy rollback, low risk
|
|
454
|
+
- Con: Longer implementation time
|
|
455
455
|
|
|
456
|
-
|
|
457
|
-
-
|
|
458
|
-
-
|
|
456
|
+
Option 2: Full replacement
|
|
457
|
+
- Pro: Clean structure
|
|
458
|
+
- Con: High risk
|
|
459
459
|
|
|
460
|
-
|
|
461
|
-
-
|
|
462
|
-
-
|
|
460
|
+
Option 3: Hybrid approach
|
|
461
|
+
- Pro: Flexibility
|
|
462
|
+
- Con: Increased complexity
|
|
463
463
|
|
|
464
|
-
4.
|
|
464
|
+
4. User choice: 1
|
|
465
465
|
|
|
466
|
-
5.
|
|
466
|
+
5. Create document question: Y
|
|
467
467
|
|
|
468
|
-
6. .claude/plans/session-auth.md
|
|
468
|
+
6. Create .claude/plans/session-auth.md
|
|
469
469
|
```
|
|
470
470
|
|
|
471
|
-
###
|
|
471
|
+
### Example 2: Add real-time notifications
|
|
472
472
|
|
|
473
473
|
```bash
|
|
474
|
-
|
|
474
|
+
User: /plan Add real-time notification feature
|
|
475
475
|
|
|
476
|
-
1. Sequential Thinking (5
|
|
477
|
-
thought 1: "
|
|
478
|
-
thought 2: "
|
|
479
|
-
thought 3: "
|
|
480
|
-
thought 4: "WebSocket
|
|
481
|
-
thought 5: "WebSocket
|
|
476
|
+
1. Sequential Thinking (5 steps):
|
|
477
|
+
thought 1: "Real-time notifications - medium complexity, new feature"
|
|
478
|
+
thought 2: "Current communication: REST API, no polling"
|
|
479
|
+
thought 3: "Approaches: WebSocket, SSE, Long Polling, Firebase"
|
|
480
|
+
thought 4: "WebSocket bidirectional, SSE unidirectional but simpler"
|
|
481
|
+
thought 5: "Recommend WebSocket, polling inefficient"
|
|
482
482
|
|
|
483
|
-
2. Task
|
|
484
|
-
Task (Explore): "
|
|
483
|
+
2. Task exploration:
|
|
484
|
+
Task (Explore): "Analyze current API structure and client communication"
|
|
485
485
|
|
|
486
|
-
3.
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
486
|
+
3. Options:
|
|
487
|
+
Option 1: WebSocket (Recommended)
|
|
488
|
+
Option 2: Server-Sent Events
|
|
489
|
+
Option 3: Short Polling
|
|
490
490
|
|
|
491
|
-
4.
|
|
491
|
+
4. After selection, create plan document
|
|
492
492
|
```
|
|
493
493
|
|
|
494
|
-
###
|
|
494
|
+
### Example 3: Simple refactoring
|
|
495
495
|
|
|
496
496
|
```bash
|
|
497
|
-
|
|
497
|
+
User: /plan Convert utils functions to TypeScript
|
|
498
498
|
|
|
499
|
-
1. Sequential Thinking (3
|
|
500
|
-
thought 1: "
|
|
501
|
-
thought 2: "
|
|
502
|
-
thought 3: "
|
|
499
|
+
1. Sequential Thinking (3 steps):
|
|
500
|
+
thought 1: "Simple refactoring - simple, 1-2 files"
|
|
501
|
+
thought 2: "Need to analyze current utils.js"
|
|
502
|
+
thought 3: "Type definition → conversion → test validation"
|
|
503
503
|
|
|
504
|
-
2. Task
|
|
504
|
+
2. Task exploration:
|
|
505
505
|
Read: src/utils.js
|
|
506
|
-
Grep: utils
|
|
506
|
+
Grep: search utils usages
|
|
507
507
|
|
|
508
|
-
3.
|
|
509
|
-
|
|
510
|
-
|
|
508
|
+
3. Options:
|
|
509
|
+
Option A: Incremental conversion (per file)
|
|
510
|
+
Option B: Batch conversion
|
|
511
511
|
|
|
512
|
-
4.
|
|
512
|
+
4. After choice → implement (skip document creation if possible)
|
|
513
513
|
```
|
|
514
514
|
|
|
515
515
|
</examples>
|