@kood/claude-code 0.4.1 → 0.5.0
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 +53 -7
- package/package.json +2 -1
- package/templates/.claude/PARALLEL_AGENTS.md +737 -0
- package/templates/.claude/agents/analyst.md +416 -0
- package/templates/.claude/agents/architect.md +569 -0
- package/templates/.claude/agents/code-reviewer.md +132 -133
- package/templates/.claude/agents/dependency-manager.md +93 -94
- package/templates/.claude/agents/deployment-validator.md +64 -65
- package/templates/.claude/agents/designer.md +655 -0
- package/templates/.claude/agents/document-writer.md +500 -0
- package/templates/.claude/agents/explore.md +499 -0
- package/templates/.claude/agents/git-operator.md +74 -75
- package/templates/.claude/agents/implementation-executor.md +138 -109
- package/templates/.claude/agents/ko-to-en-translator.md +18 -22
- package/templates/.claude/agents/lint-fixer.md +250 -93
- package/templates/.claude/agents/planner.md +356 -0
- package/templates/.claude/agents/refactor-advisor.md +135 -136
- package/templates/.claude/commands/bug-fix.md +296 -207
- package/templates/.claude/commands/git-all.md +199 -46
- package/templates/.claude/commands/git-session.md +113 -57
- package/templates/.claude/commands/lint-fix.md +219 -153
- package/templates/.claude/commands/lint-init.md +113 -76
- package/templates/.claude/commands/pre-deploy.md +190 -124
- package/templates/.claude/commands/refactor.md +407 -162
- package/templates/.claude/commands/version-update.md +138 -37
- package/templates/.claude/instructions/context-engineering/ANTHROPIC_CONTEXT_ENGINEERING.md +178 -0
- package/templates/.claude/instructions/context-engineering/references/claude-4x.md +215 -0
- package/templates/.claude/instructions/context-engineering/references/core-principles.md +137 -0
- package/templates/.claude/instructions/context-engineering/references/examples.md +351 -0
- package/templates/.claude/instructions/context-engineering/references/techniques.md +162 -0
- package/templates/.claude/instructions/parallel-agent-execution.md +874 -0
- package/templates/.claude/skills/docs-creator/AGENTS.md +238 -0
- package/templates/.claude/{commands/docs-creator.md → skills/docs-creator/SKILL.md} +61 -75
- package/templates/.claude/skills/docs-refactor/AGENTS.md +270 -0
- package/templates/.claude/{commands/docs-refactor.md → skills/docs-refactor/SKILL.md} +30 -44
- package/templates/.claude/skills/execute/SKILL.md +451 -0
- package/templates/.claude/skills/figma-to-code/AGENTS.md +287 -0
- package/templates/.claude/skills/figma-to-code/SKILL.md +225 -225
- package/templates/.claude/skills/figma-to-code/references/design-tokens.md +75 -73
- package/templates/.claude/skills/figma-to-code/references/figma-mcp-tools.md +73 -73
- package/templates/.claude/skills/figma-to-code/references/layout-mapping.md +104 -104
- package/templates/.claude/skills/figma-to-code/references/responsive-design.md +99 -99
- package/templates/.claude/skills/figma-to-code/references/verification.md +91 -91
- package/templates/.claude/skills/global-uiux-design/AGENTS.md +317 -0
- package/templates/.claude/skills/global-uiux-design/SKILL.md +738 -0
- package/templates/.claude/skills/global-uiux-design/references/accessibility.md +401 -0
- package/templates/.claude/skills/global-uiux-design/references/color-system.md +275 -0
- package/templates/.claude/skills/global-uiux-design/references/design-philosophy.md +206 -0
- package/templates/.claude/skills/global-uiux-design/references/design-systems.md +446 -0
- package/templates/.claude/skills/korea-uiux-design/AGENTS.md +307 -0
- package/templates/.claude/skills/korea-uiux-design/SKILL.md +170 -0
- package/templates/.claude/skills/nextjs-react-best-practices/AGENTS.md +95 -116
- package/templates/.claude/skills/nextjs-react-best-practices/SKILL.md +134 -152
- package/templates/.claude/skills/nextjs-react-best-practices/rules/advanced-event-handler-refs.md +6 -6
- package/templates/.claude/skills/nextjs-react-best-practices/rules/advanced-use-latest.md +5 -5
- package/templates/.claude/skills/nextjs-react-best-practices/rules/async-api-routes.md +5 -5
- package/templates/.claude/skills/nextjs-react-best-practices/rules/async-defer-await.md +22 -22
- package/templates/.claude/skills/nextjs-react-best-practices/rules/async-dependencies.md +5 -5
- package/templates/.claude/skills/nextjs-react-best-practices/rules/async-parallel.md +4 -4
- package/templates/.claude/skills/nextjs-react-best-practices/rules/async-suspense-boundaries.md +21 -21
- package/templates/.claude/skills/nextjs-react-best-practices/rules/bundle-barrel-imports.md +18 -18
- package/templates/.claude/skills/nextjs-react-best-practices/rules/bundle-conditional.md +4 -4
- package/templates/.claude/skills/nextjs-react-best-practices/rules/bundle-defer-third-party.md +4 -4
- package/templates/.claude/skills/nextjs-react-best-practices/rules/bundle-dynamic-imports.md +4 -4
- package/templates/.claude/skills/nextjs-react-best-practices/rules/bundle-preload.md +5 -5
- package/templates/.claude/skills/nextjs-react-best-practices/rules/client-event-listeners.md +9 -9
- package/templates/.claude/skills/nextjs-react-best-practices/rules/client-swr-dedup.md +7 -7
- package/templates/.claude/skills/nextjs-react-best-practices/rules/js-batch-dom-css.md +13 -13
- package/templates/.claude/skills/nextjs-react-best-practices/rules/js-cache-function-results.md +14 -14
- package/templates/.claude/skills/nextjs-react-best-practices/rules/js-cache-property-access.md +4 -4
- package/templates/.claude/skills/nextjs-react-best-practices/rules/js-cache-storage.md +10 -10
- package/templates/.claude/skills/nextjs-react-best-practices/rules/js-combine-iterations.md +4 -4
- package/templates/.claude/skills/nextjs-react-best-practices/rules/js-early-exit.md +7 -7
- package/templates/.claude/skills/nextjs-react-best-practices/rules/js-hoist-regexp.md +6 -6
- package/templates/.claude/skills/nextjs-react-best-practices/rules/js-index-maps.md +6 -6
- package/templates/.claude/skills/nextjs-react-best-practices/rules/js-length-check-first.md +14 -14
- package/templates/.claude/skills/nextjs-react-best-practices/rules/js-min-max-loop.md +16 -16
- package/templates/.claude/skills/nextjs-react-best-practices/rules/js-set-map-lookups.md +4 -4
- package/templates/.claude/skills/nextjs-react-best-practices/rules/js-tosorted-immutable.md +17 -17
- package/templates/.claude/skills/nextjs-react-best-practices/rules/rendering-activity.md +4 -4
- package/templates/.claude/skills/nextjs-react-best-practices/rules/rendering-animate-svg-wrapper.md +11 -11
- package/templates/.claude/skills/nextjs-react-best-practices/rules/rendering-conditional-render.md +8 -8
- package/templates/.claude/skills/nextjs-react-best-practices/rules/rendering-content-visibility.md +4 -4
- package/templates/.claude/skills/nextjs-react-best-practices/rules/rendering-hoist-jsx.md +6 -6
- package/templates/.claude/skills/nextjs-react-best-practices/rules/rendering-hydration-no-flicker.md +14 -14
- package/templates/.claude/skills/nextjs-react-best-practices/rules/rendering-svg-precision.md +5 -5
- package/templates/.claude/skills/nextjs-react-best-practices/rules/rerender-defer-reads.md +4 -4
- package/templates/.claude/skills/nextjs-react-best-practices/rules/rerender-dependencies.md +7 -7
- package/templates/.claude/skills/nextjs-react-best-practices/rules/rerender-derived-state.md +5 -5
- package/templates/.claude/skills/nextjs-react-best-practices/rules/rerender-functional-setstate.md +34 -34
- package/templates/.claude/skills/nextjs-react-best-practices/rules/rerender-lazy-state-init.md +15 -15
- package/templates/.claude/skills/nextjs-react-best-practices/rules/rerender-memo.md +5 -5
- package/templates/.claude/skills/nextjs-react-best-practices/rules/rerender-transitions.md +4 -4
- package/templates/.claude/skills/nextjs-react-best-practices/rules/server-after-nonblocking.md +24 -24
- package/templates/.claude/skills/nextjs-react-best-practices/rules/server-cache-lru.md +10 -10
- package/templates/.claude/skills/nextjs-react-best-practices/rules/server-cache-react.md +4 -4
- package/templates/.claude/skills/nextjs-react-best-practices/rules/server-parallel-fetching.md +5 -5
- package/templates/.claude/skills/nextjs-react-best-practices/rules/server-serialization.md +6 -6
- package/templates/.claude/skills/plan/SKILL.md +594 -0
- package/templates/.claude/skills/prd/SKILL.md +496 -0
- package/templates/.claude/skills/ralph/AGENTS.md +393 -0
- package/templates/.claude/skills/ralph/SKILL.md +1035 -0
- package/templates/.claude/skills/tanstack-start-react-best-practices/AGENTS.md +100 -121
- package/templates/.claude/skills/tanstack-start-react-best-practices/SKILL.md +139 -157
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/async-defer-await.md +22 -22
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/async-dependencies.md +5 -5
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/async-loader.md +7 -7
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/async-parallel.md +4 -4
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/bundle-barrel-imports.md +18 -18
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/bundle-conditional.md +4 -4
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/bundle-defer-third-party.md +4 -4
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/bundle-lazy-routes.md +12 -12
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/bundle-preload.md +5 -5
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/client-event-listeners.md +9 -9
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/client-tanstack-query.md +12 -12
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-batch-dom-css.md +13 -13
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-cache-function-results.md +14 -14
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-cache-property-access.md +4 -4
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-cache-storage.md +10 -10
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-combine-iterations.md +4 -4
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-early-exit.md +7 -7
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-hoist-regexp.md +6 -6
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-index-maps.md +6 -6
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-length-check-first.md +14 -14
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-min-max-loop.md +16 -16
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-set-map-lookups.md +4 -4
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-tosorted-immutable.md +17 -17
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rendering-animate-svg-wrapper.md +11 -11
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rendering-conditional-render.md +8 -8
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rendering-content-visibility.md +4 -4
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rendering-hoist-jsx.md +6 -6
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rendering-svg-precision.md +5 -5
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rerender-defer-reads.md +4 -4
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rerender-dependencies.md +7 -7
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rerender-derived-state.md +5 -5
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rerender-functional-setstate.md +34 -34
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rerender-lazy-state-init.md +15 -15
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rerender-memo.md +5 -5
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rerender-transitions.md +4 -4
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/server-cache-lru.md +12 -12
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/server-deferred-data.md +14 -14
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/server-parallel-fetching.md +9 -9
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/server-serialization.md +6 -6
- package/templates/.claude/commands/agent-creator.md +0 -370
- package/templates/.claude/commands/command-creator.md +0 -524
- package/templates/.claude/commands/execute.md +0 -469
- package/templates/.claude/commands/git.md +0 -98
- package/templates/.claude/commands/plan.md +0 -526
- package/templates/.claude/commands/prd.md +0 -629
|
@@ -1,526 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: 개발 진행 방법 검토 및 옵션 제시. ultrathink + sequential thinking 3-7 필수. 코드 수정 없이 계획만.
|
|
3
|
-
allowed-tools: Read, Glob, Grep, Bash(git:*, ast-grep:*), Task, Write, mcp__sequential-thinking__sequentialthinking
|
|
4
|
-
argument-hint: <feature to develop or problem to solve>
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
<critical_instruction>
|
|
8
|
-
|
|
9
|
-
**CRITICAL: 사용자와의 모든 커뮤니케이션은 반드시 한국어로 작성하세요.**
|
|
10
|
-
|
|
11
|
-
- 내부 사고와 분석은 영어로 해도 됨
|
|
12
|
-
- 설명, 요약, 보고서, 피드백 등 사용자에게 전달하는 모든 내용은 반드시 한국어
|
|
13
|
-
- 사용자가 영어로 말하더라도 답변은 한국어로
|
|
14
|
-
- 진행 상황 업데이트와 상태 보고는 반드시 한국어
|
|
15
|
-
|
|
16
|
-
이 규칙은 절대적이며 예외가 없습니다.
|
|
17
|
-
|
|
18
|
-
</critical_instruction>
|
|
19
|
-
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
# Plan Command
|
|
24
|
-
|
|
25
|
-
> Review development approach and present 2-3 options with pros/cons.
|
|
26
|
-
|
|
27
|
-
**Planning target**: $ARGUMENTS
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
<argument_validation>
|
|
32
|
-
|
|
33
|
-
## Verify ARGUMENT is provided
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
No $ARGUMENTS → Ask immediately:
|
|
37
|
-
|
|
38
|
-
"What should we plan? Please be specific.
|
|
39
|
-
|
|
40
|
-
Examples:
|
|
41
|
-
- Add new feature
|
|
42
|
-
- Fix bug
|
|
43
|
-
- Refactor
|
|
44
|
-
- Change architecture"
|
|
45
|
-
|
|
46
|
-
$ARGUMENTS provided → Proceed to next step
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
</argument_validation>
|
|
50
|
-
|
|
51
|
-
---
|
|
52
|
-
|
|
53
|
-
<workflow>
|
|
54
|
-
|
|
55
|
-
## Execution Flow
|
|
56
|
-
|
|
57
|
-
| Step | Task | Tool |
|
|
58
|
-
|------|------|------|
|
|
59
|
-
| 1. Validate input | Verify ARGUMENT, ask if missing | - |
|
|
60
|
-
| 2. Judge complexity | Determine analysis scope with Sequential Thinking | sequentialthinking (step 1) |
|
|
61
|
-
| 3. Explore codebase | Understand current state, explore related files | Task (Explore) + Read/Grep |
|
|
62
|
-
| 4. Derive options | Generate 4-5 possible approaches → select 2-3 main | sequentialthinking (steps 2-6) |
|
|
63
|
-
| 5. Present options | Present pros/cons, impact scope, recommendation | - |
|
|
64
|
-
| 6. User selection & document generation | Wait for option selection, then generate plan document | Write |
|
|
65
|
-
|
|
66
|
-
</workflow>
|
|
67
|
-
|
|
68
|
-
---
|
|
69
|
-
|
|
70
|
-
<agent_usage>
|
|
71
|
-
|
|
72
|
-
## @refactor-advisor Agent Usage
|
|
73
|
-
|
|
74
|
-
**When to use:**
|
|
75
|
-
- Establish refactoring plan
|
|
76
|
-
- Code quality improvement needed
|
|
77
|
-
- Reduce complexity, remove duplication
|
|
78
|
-
|
|
79
|
-
**How to call:**
|
|
80
|
-
```bash
|
|
81
|
-
@refactor-advisor
|
|
82
|
-
# or natural language
|
|
83
|
-
"Create refactoring plan for this code"
|
|
84
|
-
"Analyze code improvements"
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
**Benefits:**
|
|
88
|
-
- Auto-analyze complexity, duplication, patterns
|
|
89
|
-
- Derive improvements with Sequential Thinking (3-5 steps)
|
|
90
|
-
- Prioritized refactoring plan (High/Medium/Low)
|
|
91
|
-
- Concrete Before/After code examples
|
|
92
|
-
- Propose incremental change stages
|
|
93
|
-
|
|
94
|
-
**Analysis areas:**
|
|
95
|
-
- Complexity (function length, nesting depth)
|
|
96
|
-
- Duplication (identical/similar code)
|
|
97
|
-
- Naming (variable/function names)
|
|
98
|
-
- Structure (files/modules)
|
|
99
|
-
- Patterns (anti-patterns)
|
|
100
|
-
- Types (remove any)
|
|
101
|
-
|
|
102
|
-
**Difference from plan command:**
|
|
103
|
-
- plan: New feature/architecture change planning
|
|
104
|
-
- @refactor-advisor: Existing code improvement planning (no feature change)
|
|
105
|
-
|
|
106
|
-
**After refactoring execution:**
|
|
107
|
-
```bash
|
|
108
|
-
# 1. Refactoring plan
|
|
109
|
-
@refactor-advisor
|
|
110
|
-
|
|
111
|
-
# 2. After plan approval, implement
|
|
112
|
-
@implementation-executor
|
|
113
|
-
|
|
114
|
-
# 3. Validation
|
|
115
|
-
@deployment-validator
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
</agent_usage>
|
|
119
|
-
|
|
120
|
-
---
|
|
121
|
-
|
|
122
|
-
<thinking_strategy>
|
|
123
|
-
|
|
124
|
-
## Sequential Thinking Guide
|
|
125
|
-
|
|
126
|
-
### Judge complexity (thought 1)
|
|
127
|
-
|
|
128
|
-
```
|
|
129
|
-
thought 1: Judge complexity
|
|
130
|
-
- Impact scope: number of files, modules
|
|
131
|
-
- Dependencies: external libraries, system integration
|
|
132
|
-
- Risk: impact on existing features, rollback possibility
|
|
133
|
-
- Technical difficulty: new patterns, unknown areas
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
### Strategy by complexity
|
|
137
|
-
|
|
138
|
-
| Complexity | Thoughts | Criteria | Pattern |
|
|
139
|
-
|------------|----------|----------|---------|
|
|
140
|
-
| **Simple** | 3 | 1-2 files, clear changes | Judge complexity → current state → derive options |
|
|
141
|
-
| **Medium** | 5 | 3-5 files, logic changes | Judge complexity → current state → explore approaches → compare options → recommendation |
|
|
142
|
-
| **Complex** | 7+ | multiple modules, architecture change | Judge complexity → deep analysis → constraints → approaches → compare → detailed analysis → recommendation |
|
|
143
|
-
|
|
144
|
-
### Medium complexity pattern (5 steps)
|
|
145
|
-
|
|
146
|
-
```
|
|
147
|
-
thought 1: Judge complexity and determine analysis scope
|
|
148
|
-
thought 2: Analyze current state (code, architecture, constraints)
|
|
149
|
-
thought 3: Enumerate possible approaches (4-5)
|
|
150
|
-
thought 4: Select 3 main options and analyze pros/cons
|
|
151
|
-
thought 5: Finalize options and derive recommendation
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
### Complex case pattern (7 steps)
|
|
155
|
-
|
|
156
|
-
```
|
|
157
|
-
thought 1: Judge complexity
|
|
158
|
-
thought 2: Deep analysis of current state
|
|
159
|
-
thought 3: Summarize technical constraints and requirements
|
|
160
|
-
thought 4: Explore possible approaches
|
|
161
|
-
thought 5: Comparative analysis of each approach
|
|
162
|
-
thought 6: Select 3 options and detailed pros/cons
|
|
163
|
-
thought 7: Recommendation and rationale
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
### Key principles
|
|
167
|
-
|
|
168
|
-
```text
|
|
169
|
-
✅ Output thinking process to actually think
|
|
170
|
-
✅ Estimate high if complexity uncertain (can expand 5→7)
|
|
171
|
-
✅ Concrete analysis needed per thought (no abstract descriptions)
|
|
172
|
-
✅ Revise previous thoughts with isRevision if needed
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
</thinking_strategy>
|
|
176
|
-
|
|
177
|
-
---
|
|
178
|
-
|
|
179
|
-
<codebase_exploration>
|
|
180
|
-
|
|
181
|
-
## Task Subagent Usage
|
|
182
|
-
|
|
183
|
-
### Subagent selection
|
|
184
|
-
|
|
185
|
-
| subagent_type | Purpose | Example |
|
|
186
|
-
|---------------|---------|---------|
|
|
187
|
-
| **Explore** | Understand codebase structure, explore related files | "Analyze current auth structure" |
|
|
188
|
-
| **Plan** | Establish implementation strategy, step-by-step planning | "Create migration plan" |
|
|
189
|
-
| **general-purpose** | Complex analysis, multi-system correlation | "Analyze dependencies between modules" |
|
|
190
|
-
|
|
191
|
-
### Task call patterns
|
|
192
|
-
|
|
193
|
-
**Single exploration:**
|
|
194
|
-
|
|
195
|
-
```typescript
|
|
196
|
-
Task({
|
|
197
|
-
subagent_type: 'Explore',
|
|
198
|
-
description: 'Analyze current auth structure',
|
|
199
|
-
prompt: `
|
|
200
|
-
Understand current authentication-related code structure.
|
|
201
|
-
- Libraries in use
|
|
202
|
-
- Session management approach
|
|
203
|
-
- Files needing modification
|
|
204
|
-
`
|
|
205
|
-
})
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
**Parallel exploration (complex cases):**
|
|
209
|
-
|
|
210
|
-
```typescript
|
|
211
|
-
// Multiple Task calls in single message
|
|
212
|
-
Task({
|
|
213
|
-
subagent_type: 'Explore',
|
|
214
|
-
prompt: 'Analyze frontend auth structure'
|
|
215
|
-
})
|
|
216
|
-
|
|
217
|
-
Task({
|
|
218
|
-
subagent_type: 'Explore',
|
|
219
|
-
prompt: 'Analyze backend API auth endpoints'
|
|
220
|
-
})
|
|
221
|
-
|
|
222
|
-
Task({
|
|
223
|
-
subagent_type: 'Explore',
|
|
224
|
-
prompt: 'Analyze database session schema'
|
|
225
|
-
})
|
|
226
|
-
|
|
227
|
-
// → Combine results then organize options
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
### Exploration checklist
|
|
231
|
-
|
|
232
|
-
```text
|
|
233
|
-
✅ Understand current implementation approach
|
|
234
|
-
✅ Libraries/framework versions in use
|
|
235
|
-
✅ Related file and directory locations
|
|
236
|
-
✅ Dependencies and related modules
|
|
237
|
-
✅ Existing constraints (security, performance, compatibility)
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
</codebase_exploration>
|
|
241
|
-
|
|
242
|
-
---
|
|
243
|
-
|
|
244
|
-
<option_presentation>
|
|
245
|
-
|
|
246
|
-
## Option presentation format
|
|
247
|
-
|
|
248
|
-
### Present 3 options (standard)
|
|
249
|
-
|
|
250
|
-
```markdown
|
|
251
|
-
## Analysis Results
|
|
252
|
-
|
|
253
|
-
### Option 1: [Option name] (Recommended)
|
|
254
|
-
|
|
255
|
-
**Approach:**
|
|
256
|
-
- Description 1
|
|
257
|
-
- Description 2
|
|
258
|
-
|
|
259
|
-
| Pros | Cons |
|
|
260
|
-
|------|------|
|
|
261
|
-
| Pro 1 | Con 1 |
|
|
262
|
-
| Pro 2 | Con 2 |
|
|
263
|
-
|
|
264
|
-
**Impact scope:**
|
|
265
|
-
- Files: `src/auth/`, `src/api/`
|
|
266
|
-
- Expected change size: Medium
|
|
267
|
-
- Risk: Low
|
|
268
|
-
|
|
269
|
-
---
|
|
270
|
-
|
|
271
|
-
### Option 2: [Option name]
|
|
272
|
-
|
|
273
|
-
**Approach:**
|
|
274
|
-
...
|
|
275
|
-
|
|
276
|
-
| Pros | Cons |
|
|
277
|
-
|------|------|
|
|
278
|
-
| ... | ... |
|
|
279
|
-
|
|
280
|
-
**Impact scope:**
|
|
281
|
-
...
|
|
282
|
-
|
|
283
|
-
---
|
|
284
|
-
|
|
285
|
-
### Option 3: [Option name]
|
|
286
|
-
|
|
287
|
-
**Approach:**
|
|
288
|
-
...
|
|
289
|
-
|
|
290
|
-
---
|
|
291
|
-
|
|
292
|
-
## Recommendation and rationale
|
|
293
|
-
|
|
294
|
-
I recommend Option 1.
|
|
295
|
-
- Rationale 1
|
|
296
|
-
- Rationale 2
|
|
297
|
-
|
|
298
|
-
Which option would you choose? (1/2/3)
|
|
299
|
-
```
|
|
300
|
-
|
|
301
|
-
### Present 2 options (when choices are clear)
|
|
302
|
-
|
|
303
|
-
```markdown
|
|
304
|
-
## Analysis Results
|
|
305
|
-
|
|
306
|
-
There are two approaches:
|
|
307
|
-
|
|
308
|
-
### Option A: [Option name]
|
|
309
|
-
...
|
|
310
|
-
|
|
311
|
-
### Option B: [Option name]
|
|
312
|
-
...
|
|
313
|
-
|
|
314
|
-
Which option would you choose? (A/B)
|
|
315
|
-
```
|
|
316
|
-
|
|
317
|
-
</option_presentation>
|
|
318
|
-
|
|
319
|
-
---
|
|
320
|
-
|
|
321
|
-
<document_generation>
|
|
322
|
-
|
|
323
|
-
## Document generation
|
|
324
|
-
|
|
325
|
-
### Automatic document creation
|
|
326
|
-
|
|
327
|
-
After user selects an option, automatically create a plan document at `.claude/plans/[feature-name].md`.
|
|
328
|
-
|
|
329
|
-
```
|
|
330
|
-
You selected Option [N].
|
|
331
|
-
|
|
332
|
-
Creating plan document at .claude/plans/[feature-name].md...
|
|
333
|
-
```
|
|
334
|
-
|
|
335
|
-
### Plan document template
|
|
336
|
-
|
|
337
|
-
**File location:** `.claude/plans/[feature-name].md`
|
|
338
|
-
|
|
339
|
-
```markdown
|
|
340
|
-
# [Feature name] Implementation Plan
|
|
341
|
-
|
|
342
|
-
## Overview
|
|
343
|
-
|
|
344
|
-
**Goal:** [What will be achieved]
|
|
345
|
-
**Selected approach:** [Option N]
|
|
346
|
-
**Expected impact scope:** [Files/modules list]
|
|
347
|
-
|
|
348
|
-
## Current state
|
|
349
|
-
|
|
350
|
-
- Current structure description
|
|
351
|
-
- Related code location
|
|
352
|
-
- Existing constraints
|
|
353
|
-
|
|
354
|
-
## Implementation stages
|
|
355
|
-
|
|
356
|
-
### Stage 1: [Stage name]
|
|
357
|
-
|
|
358
|
-
**Tasks:**
|
|
359
|
-
- [ ] Task 1
|
|
360
|
-
- [ ] Task 2
|
|
361
|
-
|
|
362
|
-
**Changed files:**
|
|
363
|
-
- `src/file1.ts`
|
|
364
|
-
- `src/file2.ts`
|
|
365
|
-
|
|
366
|
-
### Stage 2: [Stage name]
|
|
367
|
-
|
|
368
|
-
**Tasks:**
|
|
369
|
-
- [ ] Task 3
|
|
370
|
-
|
|
371
|
-
**Changed files:**
|
|
372
|
-
- `src/file3.ts`
|
|
373
|
-
|
|
374
|
-
### Stage 3: [Stage name]
|
|
375
|
-
...
|
|
376
|
-
|
|
377
|
-
## Considerations
|
|
378
|
-
|
|
379
|
-
### Risks
|
|
380
|
-
|
|
381
|
-
| Risk | Mitigation |
|
|
382
|
-
|------|-----------|
|
|
383
|
-
| Risk 1 | Plan 1 |
|
|
384
|
-
| Risk 2 | Plan 2 |
|
|
385
|
-
|
|
386
|
-
### Dependencies
|
|
387
|
-
|
|
388
|
-
- External libraries: [List]
|
|
389
|
-
- Other systems: [List]
|
|
390
|
-
|
|
391
|
-
### Rollback plan
|
|
392
|
-
|
|
393
|
-
How to rollback if issues occur.
|
|
394
|
-
|
|
395
|
-
## Validation methods
|
|
396
|
-
|
|
397
|
-
- Test item 1
|
|
398
|
-
- Test item 2
|
|
399
|
-
- Integration test
|
|
400
|
-
|
|
401
|
-
## References
|
|
402
|
-
|
|
403
|
-
- Related document links
|
|
404
|
-
- Reference materials
|
|
405
|
-
```
|
|
406
|
-
|
|
407
|
-
</document_generation>
|
|
408
|
-
|
|
409
|
-
---
|
|
410
|
-
|
|
411
|
-
<validation>
|
|
412
|
-
|
|
413
|
-
## Validation checklist
|
|
414
|
-
|
|
415
|
-
Before execution:
|
|
416
|
-
|
|
417
|
-
```text
|
|
418
|
-
✅ Verify ARGUMENT (ask if missing)
|
|
419
|
-
✅ Sequential Thinking minimum 3 steps
|
|
420
|
-
✅ Explore codebase with Task (Explore)
|
|
421
|
-
✅ Minimum 2 options, recommended 3
|
|
422
|
-
✅ List pros/cons for each option
|
|
423
|
-
✅ Present impact scope and estimated work
|
|
424
|
-
```
|
|
425
|
-
|
|
426
|
-
Absolutely forbidden:
|
|
427
|
-
|
|
428
|
-
```text
|
|
429
|
-
❌ Start analysis without ARGUMENT
|
|
430
|
-
❌ Use Edit tool (code modification forbidden)
|
|
431
|
-
❌ Sequential Thinking less than 3 steps
|
|
432
|
-
❌ Present only 1 option
|
|
433
|
-
❌ Suggest options by guessing without code exploration
|
|
434
|
-
❌ Start implementation without user choice
|
|
435
|
-
❌ List options without pros/cons
|
|
436
|
-
```
|
|
437
|
-
|
|
438
|
-
</validation>
|
|
439
|
-
|
|
440
|
-
---
|
|
441
|
-
|
|
442
|
-
<examples>
|
|
443
|
-
|
|
444
|
-
## Real-world examples
|
|
445
|
-
|
|
446
|
-
### Example 1: Change auth system
|
|
447
|
-
|
|
448
|
-
```bash
|
|
449
|
-
User: /plan Change user authentication from JWT to session-based
|
|
450
|
-
|
|
451
|
-
1. Sequential Thinking (7 steps):
|
|
452
|
-
thought 1: "Auth system change - high complexity, multiple module impact"
|
|
453
|
-
thought 2: "Current JWT implementation analysis: src/auth/jwt.ts, token validation middleware"
|
|
454
|
-
thought 3: "Constraints: maintain existing user sessions, Redis/DB choice"
|
|
455
|
-
thought 4: "Approaches: incremental migration, full replacement, hybrid"
|
|
456
|
-
thought 5: "Incremental has low risk, hybrid high complexity"
|
|
457
|
-
thought 6: "Select 3 options and analyze pros/cons"
|
|
458
|
-
thought 7: "Recommend incremental migration - easy rollback, step-by-step validation"
|
|
459
|
-
|
|
460
|
-
2. Task exploration:
|
|
461
|
-
Task (Explore): "Analyze current JWT auth implementation"
|
|
462
|
-
→ Understand src/auth/, src/middleware/, API endpoints
|
|
463
|
-
|
|
464
|
-
3. Present options:
|
|
465
|
-
Option 1: Incremental migration (Recommended)
|
|
466
|
-
- Pro: Easy rollback, low risk
|
|
467
|
-
- Con: Longer implementation time
|
|
468
|
-
|
|
469
|
-
Option 2: Full replacement
|
|
470
|
-
- Pro: Clean structure
|
|
471
|
-
- Con: High risk
|
|
472
|
-
|
|
473
|
-
Option 3: Hybrid approach
|
|
474
|
-
- Pro: Flexibility
|
|
475
|
-
- Con: Increased complexity
|
|
476
|
-
|
|
477
|
-
4. User choice: 1
|
|
478
|
-
|
|
479
|
-
5. Automatically create .claude/plans/session-auth.md
|
|
480
|
-
```
|
|
481
|
-
|
|
482
|
-
### Example 2: Add real-time notifications
|
|
483
|
-
|
|
484
|
-
```bash
|
|
485
|
-
User: /plan Add real-time notification feature
|
|
486
|
-
|
|
487
|
-
1. Sequential Thinking (5 steps):
|
|
488
|
-
thought 1: "Real-time notifications - medium complexity, new feature"
|
|
489
|
-
thought 2: "Current communication: REST API, no polling"
|
|
490
|
-
thought 3: "Approaches: WebSocket, SSE, Long Polling, Firebase"
|
|
491
|
-
thought 4: "WebSocket bidirectional, SSE unidirectional but simpler"
|
|
492
|
-
thought 5: "Recommend WebSocket, polling inefficient"
|
|
493
|
-
|
|
494
|
-
2. Task exploration:
|
|
495
|
-
Task (Explore): "Analyze current API structure and client communication"
|
|
496
|
-
|
|
497
|
-
3. Options:
|
|
498
|
-
Option 1: WebSocket (Recommended)
|
|
499
|
-
Option 2: Server-Sent Events
|
|
500
|
-
Option 3: Short Polling
|
|
501
|
-
|
|
502
|
-
4. After user selection, automatically create plan document
|
|
503
|
-
```
|
|
504
|
-
|
|
505
|
-
### Example 3: Simple refactoring
|
|
506
|
-
|
|
507
|
-
```bash
|
|
508
|
-
User: /plan Convert utils functions to TypeScript
|
|
509
|
-
|
|
510
|
-
1. Sequential Thinking (3 steps):
|
|
511
|
-
thought 1: "Simple refactoring - simple, 1-2 files"
|
|
512
|
-
thought 2: "Need to analyze current utils.js"
|
|
513
|
-
thought 3: "Type definition → conversion → test validation"
|
|
514
|
-
|
|
515
|
-
2. Task exploration:
|
|
516
|
-
Read: src/utils.js
|
|
517
|
-
Grep: search utils usages
|
|
518
|
-
|
|
519
|
-
3. Options:
|
|
520
|
-
Option A: Incremental conversion (per file)
|
|
521
|
-
Option B: Batch conversion
|
|
522
|
-
|
|
523
|
-
4. After user choice → create plan document → implement
|
|
524
|
-
```
|
|
525
|
-
|
|
526
|
-
</examples>
|