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