@kood/claude-code 0.3.7 → 0.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/templates/.claude/agents/code-reviewer.md +138 -123
- package/templates/.claude/agents/dependency-manager.md +99 -84
- package/templates/.claude/agents/deployment-validator.md +70 -55
- package/templates/.claude/agents/git-operator.md +78 -63
- package/templates/.claude/agents/implementation-executor.md +109 -94
- package/templates/.claude/agents/ko-to-en-translator.md +74 -0
- package/templates/.claude/agents/lint-fixer.md +93 -78
- package/templates/.claude/agents/refactor-advisor.md +136 -121
- package/templates/.claude/commands/agent-creator.md +199 -184
- package/templates/.claude/commands/bug-fix.md +207 -192
- package/templates/.claude/commands/command-creator.md +69 -53
- package/templates/.claude/commands/docs-creator.md +72 -56
- package/templates/.claude/commands/docs-refactor.md +41 -25
- package/templates/.claude/commands/execute.md +27 -11
- package/templates/.claude/commands/git-all.md +46 -31
- package/templates/.claude/commands/git-session.md +57 -41
- package/templates/.claude/commands/git.md +49 -33
- package/templates/.claude/commands/lint-fix.md +153 -137
- package/templates/.claude/commands/lint-init.md +76 -60
- package/templates/.claude/commands/plan.md +275 -259
- package/templates/.claude/commands/prd.md +39 -23
- package/templates/.claude/commands/pre-deploy.md +124 -108
- package/templates/.claude/commands/refactor.md +162 -146
- package/templates/.claude/commands/version-update.md +32 -16
- package/templates/hono/CLAUDE.md +28 -27
- package/templates/hono/docs/architecture.md +24 -24
- package/templates/hono/docs/deployment/cloudflare.md +18 -18
- package/templates/hono/docs/deployment/docker.md +13 -13
- package/templates/hono/docs/deployment/index.md +19 -19
- package/templates/hono/docs/deployment/railway.md +32 -32
- package/templates/hono/docs/deployment/vercel.md +29 -29
- package/templates/hono/docs/guides/conventions.md +57 -57
- package/templates/hono/docs/guides/env-setup.md +47 -47
- package/templates/hono/docs/guides/getting-started.md +27 -27
- package/templates/hono/docs/library/hono/error-handling.md +11 -11
- package/templates/hono/docs/library/hono/index.md +4 -4
- package/templates/hono/docs/library/hono/middleware.md +18 -18
- package/templates/hono/docs/library/hono/rpc.md +7 -7
- package/templates/hono/docs/library/hono/validation.md +6 -6
- package/templates/hono/docs/library/prisma/cloudflare-d1.md +29 -29
- package/templates/hono/docs/library/prisma/config.md +16 -16
- package/templates/hono/docs/library/prisma/index.md +32 -32
- package/templates/hono/docs/library/t3-env/index.md +22 -22
- package/templates/hono/docs/library/zod/index.md +31 -31
- package/templates/nextjs/CLAUDE.md +54 -51
- package/templates/nextjs/docs/architecture.md +812 -0
- package/templates/nextjs/docs/design.md +183 -183
- package/templates/nextjs/docs/guides/conventions.md +86 -86
- package/templates/nextjs/docs/guides/getting-started.md +28 -28
- package/templates/nextjs/docs/guides/routes.md +32 -32
- package/templates/nextjs/docs/library/better-auth/index.md +70 -70
- package/templates/nextjs/docs/library/nextjs/app-router.md +43 -43
- package/templates/nextjs/docs/library/nextjs/caching.md +73 -73
- package/templates/nextjs/docs/library/nextjs/index.md +51 -51
- package/templates/nextjs/docs/library/nextjs/middleware.md +41 -41
- package/templates/nextjs/docs/library/nextjs/route-handlers.md +31 -31
- package/templates/nextjs/docs/library/nextjs/server-actions.md +34 -34
- package/templates/nextjs/docs/library/prisma/cloudflare-d1.md +20 -20
- package/templates/nextjs/docs/library/prisma/config.md +18 -18
- package/templates/nextjs/docs/library/prisma/crud.md +17 -17
- package/templates/nextjs/docs/library/prisma/index.md +18 -18
- package/templates/nextjs/docs/library/prisma/relations.md +16 -16
- package/templates/nextjs/docs/library/prisma/schema.md +23 -23
- package/templates/nextjs/docs/library/prisma/setup.md +6 -6
- package/templates/nextjs/docs/library/prisma/transactions.md +10 -10
- package/templates/nextjs/docs/library/tanstack-query/index.md +6 -6
- package/templates/nextjs/docs/library/tanstack-query/invalidation.md +20 -20
- package/templates/nextjs/docs/library/tanstack-query/optimistic-updates.md +4 -4
- package/templates/nextjs/docs/library/tanstack-query/use-mutation.md +15 -15
- package/templates/nextjs/docs/library/tanstack-query/use-query.md +22 -22
- package/templates/nextjs/docs/library/zod/complex-types.md +11 -11
- package/templates/nextjs/docs/library/zod/index.md +8 -8
- package/templates/nextjs/docs/library/zod/transforms.md +11 -11
- package/templates/nextjs/docs/library/zod/validation.md +9 -9
- package/templates/npx/CLAUDE.md +38 -37
- package/templates/npx/docs/library/commander/index.md +12 -12
- package/templates/npx/docs/library/fs-extra/index.md +9 -9
- package/templates/npx/docs/library/prompts/index.md +3 -3
- package/templates/npx/docs/references/patterns.md +12 -12
- package/templates/tanstack-start/CLAUDE.md +54 -53
- package/templates/tanstack-start/docs/architecture.md +128 -128
- package/templates/tanstack-start/docs/design.md +169 -169
- package/templates/tanstack-start/docs/guides/conventions.md +43 -43
- package/templates/tanstack-start/docs/guides/env-setup.md +35 -35
- package/templates/tanstack-start/docs/guides/getting-started.md +19 -19
- package/templates/tanstack-start/docs/guides/hooks.md +45 -45
- package/templates/tanstack-start/docs/guides/routes.md +54 -54
- package/templates/tanstack-start/docs/guides/services.md +45 -45
- package/templates/tanstack-start/docs/library/better-auth/index.md +68 -68
- package/templates/tanstack-start/docs/library/prisma/cloudflare-d1.md +19 -19
- package/templates/tanstack-start/docs/library/prisma/config.md +16 -16
- package/templates/tanstack-start/docs/library/prisma/crud.md +17 -17
- package/templates/tanstack-start/docs/library/prisma/index.md +17 -17
- package/templates/tanstack-start/docs/library/prisma/relations.md +16 -16
- package/templates/tanstack-start/docs/library/prisma/schema.md +23 -23
- package/templates/tanstack-start/docs/library/prisma/setup.md +6 -6
- package/templates/tanstack-start/docs/library/prisma/transactions.md +10 -10
- package/templates/tanstack-start/docs/library/t3-env/index.md +21 -160
- package/templates/tanstack-start/docs/library/tanstack-query/index.md +6 -6
- package/templates/tanstack-start/docs/library/tanstack-query/invalidation.md +19 -19
- package/templates/tanstack-start/docs/library/tanstack-query/optimistic-updates.md +4 -4
- package/templates/tanstack-start/docs/library/tanstack-query/use-mutation.md +14 -14
- package/templates/tanstack-start/docs/library/tanstack-query/use-query.md +21 -21
- package/templates/tanstack-start/docs/library/tanstack-router/error-handling.md +9 -9
- package/templates/tanstack-start/docs/library/tanstack-router/hooks.md +11 -11
- package/templates/tanstack-start/docs/library/tanstack-router/index.md +18 -18
- package/templates/tanstack-start/docs/library/tanstack-router/navigation.md +17 -17
- package/templates/tanstack-start/docs/library/tanstack-router/route-context.md +5 -5
- package/templates/tanstack-start/docs/library/tanstack-router/search-params.md +10 -10
- package/templates/tanstack-start/docs/library/tanstack-start/auth-patterns.md +8 -8
- package/templates/tanstack-start/docs/library/tanstack-start/index.md +15 -15
- package/templates/tanstack-start/docs/library/tanstack-start/middleware.md +9 -9
- package/templates/tanstack-start/docs/library/tanstack-start/routing.md +6 -6
- package/templates/tanstack-start/docs/library/tanstack-start/server-functions.md +18 -18
- package/templates/tanstack-start/docs/library/tanstack-start/setup.md +4 -4
- package/templates/tanstack-start/docs/library/zod/complex-types.md +11 -11
- package/templates/tanstack-start/docs/library/zod/index.md +8 -8
- package/templates/tanstack-start/docs/library/zod/transforms.md +11 -11
- package/templates/tanstack-start/docs/library/zod/validation.md +9 -9
|
@@ -1,33 +1,48 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: 버그 원인 분석 및 수정. sequential thinking 3-5 + Task (Explore) 필수.
|
|
3
3
|
allowed-tools: Read, Grep, Glob, Task, Edit, Bash(npm:*, yarn:*), mcp__sequential-thinking__sequentialthinking
|
|
4
|
-
argument-hint:
|
|
4
|
+
argument-hint: <bug description or error message>
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<critical_instruction>
|
|
8
|
+
|
|
9
|
+
**CRITICAL: 사용자와의 모든 커뮤니케이션은 반드시 한국어로 작성하세요.**
|
|
10
|
+
|
|
11
|
+
- 내부 사고와 분석은 영어로 해도 됨
|
|
12
|
+
- 설명, 요약, 보고서, 피드백 등 사용자에게 전달하는 모든 내용은 반드시 한국어
|
|
13
|
+
- 사용자가 영어로 말하더라도 답변은 한국어로
|
|
14
|
+
- 진행 상황 업데이트와 상태 보고는 반드시 한국어
|
|
15
|
+
|
|
16
|
+
이 규칙은 절대적이며 예외가 없습니다.
|
|
17
|
+
|
|
18
|
+
</critical_instruction>
|
|
19
|
+
|
|
5
20
|
---
|
|
6
21
|
|
|
7
22
|
# Bug Fix Command
|
|
8
23
|
|
|
9
|
-
>
|
|
24
|
+
> Command for bug cause analysis, fix option presentation, and implementation.
|
|
10
25
|
|
|
11
|
-
|
|
26
|
+
**Bug Target**: $ARGUMENTS
|
|
12
27
|
|
|
13
28
|
---
|
|
14
29
|
|
|
15
30
|
<argument_validation>
|
|
16
31
|
|
|
17
|
-
## ARGUMENT
|
|
32
|
+
## ARGUMENT Verification Required
|
|
18
33
|
|
|
19
34
|
```
|
|
20
|
-
$ARGUMENTS
|
|
35
|
+
No $ARGUMENTS → Ask immediately:
|
|
21
36
|
|
|
22
|
-
"
|
|
37
|
+
"What bug needs fixing? Please provide details.
|
|
23
38
|
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
39
|
+
Examples:
|
|
40
|
+
- Error message and location
|
|
41
|
+
- Expected vs actual behavior
|
|
42
|
+
- How to reproduce
|
|
43
|
+
- Relevant file paths"
|
|
29
44
|
|
|
30
|
-
$ARGUMENTS
|
|
45
|
+
Has $ARGUMENTS → Proceed to next step
|
|
31
46
|
```
|
|
32
47
|
|
|
33
48
|
</argument_validation>
|
|
@@ -36,19 +51,19 @@ $ARGUMENTS 있음 → 다음 단계 진행
|
|
|
36
51
|
|
|
37
52
|
<workflow>
|
|
38
53
|
|
|
39
|
-
##
|
|
54
|
+
## Execution Flow
|
|
40
55
|
|
|
41
|
-
|
|
|
56
|
+
| Step | Task | Tool |
|
|
42
57
|
|------|------|------|
|
|
43
|
-
| 1.
|
|
44
|
-
| 2.
|
|
45
|
-
| 3.
|
|
46
|
-
| 4.
|
|
47
|
-
| 5.
|
|
48
|
-
| 6.
|
|
49
|
-
| 7.
|
|
50
|
-
| 8.
|
|
51
|
-
| 9.
|
|
58
|
+
| 1. Input Verify | Validate ARGUMENT, ask if missing | - |
|
|
59
|
+
| 2. Complexity Judge | Determine analysis scope with Sequential Thinking | sequentialthinking (step 1) |
|
|
60
|
+
| 3. Reproduce Bug | Reproduce error, identify related files | Read/Grep/Glob |
|
|
61
|
+
| 4. Analyze Cause | Explore related code with Task (Explore) | Task (Explore) |
|
|
62
|
+
| 5. Derive Options | Generate 2-3 fix methods | sequentialthinking (steps 2-4) |
|
|
63
|
+
| 6. Present Options | Show pros/cons and impact scope | - |
|
|
64
|
+
| 7. User Choice | Wait for user to select fix method | - |
|
|
65
|
+
| 8. Implement | Fix code with selected method | Edit |
|
|
66
|
+
| 9. Verify | Run tests, confirm build | Bash |
|
|
52
67
|
|
|
53
68
|
</workflow>
|
|
54
69
|
|
|
@@ -56,43 +71,43 @@ $ARGUMENTS 있음 → 다음 단계 진행
|
|
|
56
71
|
|
|
57
72
|
<thinking_strategy>
|
|
58
73
|
|
|
59
|
-
## Sequential Thinking
|
|
74
|
+
## Sequential Thinking Guide
|
|
60
75
|
|
|
61
|
-
###
|
|
76
|
+
### Complexity Judgment (thought 1)
|
|
62
77
|
|
|
63
78
|
```
|
|
64
|
-
thought 1:
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
79
|
+
thought 1: Complexity judgment
|
|
80
|
+
- Error type: syntax/runtime/logic/type
|
|
81
|
+
- Impact scope: single file vs multiple files
|
|
82
|
+
- Dependencies: external libraries, API integration
|
|
83
|
+
- Reproducibility: always vs intermittent
|
|
69
84
|
```
|
|
70
85
|
|
|
71
|
-
###
|
|
86
|
+
### Complexity Strategy
|
|
72
87
|
|
|
73
|
-
|
|
|
74
|
-
|
|
75
|
-
|
|
|
76
|
-
|
|
|
77
|
-
|
|
|
88
|
+
| Complexity | Thoughts | Criteria | Pattern |
|
|
89
|
+
|------------|----------|----------|---------|
|
|
90
|
+
| **Simple** | 3 | Clear error, 1-2 files | Judge → Analyze cause → Fix method |
|
|
91
|
+
| **Normal** | 5 | Logic error, 3-5 files | Judge → Reproduce → Analyze → Compare options → Recommend |
|
|
92
|
+
| **Complex** | 7+ | Intermittent error, multi-module | Judge → Try reproduce → Deep analyze → Explore options → Compare → Recommend |
|
|
78
93
|
|
|
79
|
-
###
|
|
94
|
+
### Normal Complexity Pattern (5 steps)
|
|
80
95
|
|
|
81
96
|
```
|
|
82
|
-
thought 1:
|
|
83
|
-
thought 2:
|
|
84
|
-
thought 3:
|
|
85
|
-
thought 4:
|
|
86
|
-
thought 5:
|
|
97
|
+
thought 1: Complexity judgment and analysis scope
|
|
98
|
+
thought 2: Bug reproduction and error message analysis
|
|
99
|
+
thought 3: Related code exploration and cause identification
|
|
100
|
+
thought 4: Compare 2-3 fix methods
|
|
101
|
+
thought 5: Final recommendation and rationale
|
|
87
102
|
```
|
|
88
103
|
|
|
89
|
-
###
|
|
104
|
+
### Core Principles
|
|
90
105
|
|
|
91
106
|
```text
|
|
92
|
-
✅
|
|
93
|
-
✅
|
|
94
|
-
✅
|
|
95
|
-
✅
|
|
107
|
+
✅ Output thinking process for actual thinking to happen
|
|
108
|
+
✅ Judge high when uncertain (expandable 3→5)
|
|
109
|
+
✅ Concrete analysis required in each thought (no abstract)
|
|
110
|
+
✅ Use isRevision to modify previous thought if needed
|
|
96
111
|
```
|
|
97
112
|
|
|
98
113
|
</thinking_strategy>
|
|
@@ -101,65 +116,65 @@ thought 5: 최종 추천안 및 근거
|
|
|
101
116
|
|
|
102
117
|
<exploration>
|
|
103
118
|
|
|
104
|
-
## Task (Explore)
|
|
119
|
+
## Task (Explore) Usage
|
|
105
120
|
|
|
106
|
-
###
|
|
121
|
+
### Exploration Strategy
|
|
107
122
|
|
|
108
|
-
|
|
|
109
|
-
|
|
110
|
-
|
|
|
111
|
-
|
|
|
112
|
-
|
|
|
113
|
-
| **API
|
|
123
|
+
| Bug Type | Explore Target | Prompt Example |
|
|
124
|
+
|----------|-----------------|-----------------|
|
|
125
|
+
| **Type Error** | Type definition, usage | "Find type X definition and usage files" |
|
|
126
|
+
| **Runtime Error** | Function call chain | "Find function Y call path and related files" |
|
|
127
|
+
| **Logic Error** | State management, data flow | "Find where state Z changes and its impact" |
|
|
128
|
+
| **API Error** | Endpoint, request/response | "Find API /path related code structure" |
|
|
114
129
|
|
|
115
|
-
### Task
|
|
130
|
+
### Task Invocation Pattern
|
|
116
131
|
|
|
117
|
-
|
|
132
|
+
**Single Exploration:**
|
|
118
133
|
|
|
119
134
|
```typescript
|
|
120
135
|
Task({
|
|
121
136
|
subagent_type: 'Explore',
|
|
122
|
-
description: '
|
|
137
|
+
description: 'Explore error-related code',
|
|
123
138
|
prompt: `
|
|
124
|
-
|
|
125
|
-
-
|
|
126
|
-
-
|
|
127
|
-
-
|
|
128
|
-
-
|
|
139
|
+
Understand error-related code structure:
|
|
140
|
+
- Exact location where error occurs
|
|
141
|
+
- Related functions/components
|
|
142
|
+
- Dependent modules/libraries
|
|
143
|
+
- Recent change history (git blame)
|
|
129
144
|
`
|
|
130
145
|
})
|
|
131
146
|
```
|
|
132
147
|
|
|
133
|
-
|
|
148
|
+
**Parallel Exploration (complex cases):**
|
|
134
149
|
|
|
135
150
|
```typescript
|
|
136
|
-
//
|
|
151
|
+
// Multiple Task calls in single message
|
|
137
152
|
Task({
|
|
138
153
|
subagent_type: 'Explore',
|
|
139
|
-
prompt: '
|
|
154
|
+
prompt: 'Analyze frontend error component'
|
|
140
155
|
})
|
|
141
156
|
|
|
142
157
|
Task({
|
|
143
158
|
subagent_type: 'Explore',
|
|
144
|
-
prompt: '
|
|
159
|
+
prompt: 'Analyze backend API endpoint'
|
|
145
160
|
})
|
|
146
161
|
|
|
147
162
|
Task({
|
|
148
163
|
subagent_type: 'Explore',
|
|
149
|
-
prompt: '
|
|
164
|
+
prompt: 'Analyze type definitions and interfaces'
|
|
150
165
|
})
|
|
151
166
|
|
|
152
|
-
// →
|
|
167
|
+
// → Collect results and identify cause
|
|
153
168
|
```
|
|
154
169
|
|
|
155
|
-
###
|
|
170
|
+
### Exploration Checklist
|
|
156
171
|
|
|
157
172
|
```text
|
|
158
|
-
✅
|
|
159
|
-
✅
|
|
160
|
-
✅
|
|
161
|
-
✅
|
|
162
|
-
✅
|
|
173
|
+
✅ Exact error location
|
|
174
|
+
✅ Related functions/classes/components
|
|
175
|
+
✅ Data flow and state changes
|
|
176
|
+
✅ External dependencies (libraries, APIs)
|
|
177
|
+
✅ Recent changes (git log/blame)
|
|
163
178
|
```
|
|
164
179
|
|
|
165
180
|
</exploration>
|
|
@@ -168,70 +183,70 @@ Task({
|
|
|
168
183
|
|
|
169
184
|
<option_presentation>
|
|
170
185
|
|
|
171
|
-
##
|
|
186
|
+
## Option Presentation Format
|
|
172
187
|
|
|
173
|
-
###
|
|
188
|
+
### Present 2-3 Options
|
|
174
189
|
|
|
175
190
|
```markdown
|
|
176
|
-
##
|
|
191
|
+
## Bug Analysis Results
|
|
177
192
|
|
|
178
|
-
|
|
193
|
+
**Cause:** [Cause explanation]
|
|
179
194
|
|
|
180
|
-
|
|
195
|
+
**Impact Scope:** [File and module list]
|
|
181
196
|
|
|
182
197
|
---
|
|
183
198
|
|
|
184
|
-
###
|
|
199
|
+
### Option 1: [Fix Method] (Recommended)
|
|
185
200
|
|
|
186
|
-
|
|
187
|
-
-
|
|
188
|
-
-
|
|
201
|
+
**Fix Content:**
|
|
202
|
+
- Change 1
|
|
203
|
+
- Change 2
|
|
189
204
|
|
|
190
|
-
|
|
|
205
|
+
| Pros | Cons |
|
|
191
206
|
|------|------|
|
|
192
|
-
|
|
|
193
|
-
|
|
|
207
|
+
| Pro 1 | Con 1 |
|
|
208
|
+
| Pro 2 | Con 2 |
|
|
194
209
|
|
|
195
|
-
|
|
210
|
+
**Files to Fix:**
|
|
196
211
|
- `src/file1.ts:line`
|
|
197
212
|
- `src/file2.ts:line`
|
|
198
213
|
|
|
199
|
-
|
|
214
|
+
**Risk:** Low
|
|
200
215
|
|
|
201
216
|
---
|
|
202
217
|
|
|
203
|
-
###
|
|
218
|
+
### Option 2: [Fix Method]
|
|
204
219
|
|
|
205
|
-
|
|
220
|
+
**Fix Content:**
|
|
206
221
|
...
|
|
207
222
|
|
|
208
|
-
|
|
|
223
|
+
| Pros | Cons |
|
|
209
224
|
|------|------|
|
|
210
225
|
| ... | ... |
|
|
211
226
|
|
|
212
|
-
|
|
227
|
+
**Files to Fix:**
|
|
213
228
|
...
|
|
214
229
|
|
|
215
|
-
|
|
230
|
+
**Risk:** Medium
|
|
216
231
|
|
|
217
232
|
---
|
|
218
233
|
|
|
219
|
-
###
|
|
234
|
+
### Option 3: [Fix Method] (Temporary)
|
|
220
235
|
|
|
221
|
-
|
|
236
|
+
**Fix Content:**
|
|
222
237
|
...
|
|
223
238
|
|
|
224
|
-
|
|
239
|
+
**Risk:** High (not root cause fix)
|
|
225
240
|
|
|
226
241
|
---
|
|
227
242
|
|
|
228
|
-
##
|
|
243
|
+
## Recommendation and Rationale
|
|
229
244
|
|
|
230
|
-
|
|
231
|
-
-
|
|
232
|
-
-
|
|
245
|
+
Recommend Option 1.
|
|
246
|
+
- Rationale 1
|
|
247
|
+
- Rationale 2
|
|
233
248
|
|
|
234
|
-
|
|
249
|
+
Which option to use? (1/2/3)
|
|
235
250
|
```
|
|
236
251
|
|
|
237
252
|
</option_presentation>
|
|
@@ -240,43 +255,43 @@ Task({
|
|
|
240
255
|
|
|
241
256
|
<implementation>
|
|
242
257
|
|
|
243
|
-
##
|
|
258
|
+
## Implementation Guide
|
|
244
259
|
|
|
245
|
-
###
|
|
260
|
+
### Fix Steps
|
|
246
261
|
|
|
247
262
|
```
|
|
248
|
-
1.
|
|
249
|
-
2.
|
|
250
|
-
3.
|
|
251
|
-
4.
|
|
252
|
-
5.
|
|
263
|
+
1. Wait for user option selection
|
|
264
|
+
2. Fix code with Edit tool
|
|
265
|
+
3. Explain changes
|
|
266
|
+
4. Run tests/build (optional)
|
|
267
|
+
5. Verify results
|
|
253
268
|
```
|
|
254
269
|
|
|
255
|
-
###
|
|
270
|
+
### Post-Fix Verification
|
|
256
271
|
|
|
257
272
|
```bash
|
|
258
|
-
#
|
|
273
|
+
# Type check
|
|
259
274
|
npm run typecheck
|
|
260
|
-
#
|
|
275
|
+
# Or
|
|
261
276
|
tsc --noEmit
|
|
262
277
|
|
|
263
|
-
#
|
|
278
|
+
# Run tests
|
|
264
279
|
npm test
|
|
265
|
-
#
|
|
266
|
-
npm test --
|
|
280
|
+
# Or
|
|
281
|
+
npm test -- <related test file>
|
|
267
282
|
|
|
268
|
-
#
|
|
283
|
+
# Verify build
|
|
269
284
|
npm run build
|
|
270
285
|
```
|
|
271
286
|
|
|
272
|
-
###
|
|
287
|
+
### Verification Checklist
|
|
273
288
|
|
|
274
289
|
```text
|
|
275
|
-
✅
|
|
276
|
-
✅
|
|
277
|
-
✅
|
|
278
|
-
✅
|
|
279
|
-
✅
|
|
290
|
+
✅ Error resolved
|
|
291
|
+
✅ Existing functionality intact
|
|
292
|
+
✅ No type errors
|
|
293
|
+
✅ Tests pass
|
|
294
|
+
✅ Build succeeds
|
|
280
295
|
```
|
|
281
296
|
|
|
282
297
|
</implementation>
|
|
@@ -285,30 +300,30 @@ npm run build
|
|
|
285
300
|
|
|
286
301
|
<validation>
|
|
287
302
|
|
|
288
|
-
##
|
|
303
|
+
## Validation Checklist
|
|
289
304
|
|
|
290
|
-
|
|
305
|
+
Before execution:
|
|
291
306
|
|
|
292
307
|
```text
|
|
293
|
-
✅ ARGUMENT
|
|
294
|
-
✅ Sequential Thinking
|
|
295
|
-
✅ Task (Explore)
|
|
296
|
-
✅
|
|
297
|
-
✅
|
|
298
|
-
✅
|
|
299
|
-
✅
|
|
308
|
+
✅ Verify ARGUMENT (ask if missing)
|
|
309
|
+
✅ Sequential Thinking minimum 3 steps
|
|
310
|
+
✅ Code exploration with Task (Explore)
|
|
311
|
+
✅ Cause analysis clear
|
|
312
|
+
✅ Minimum 2 options, recommend 3
|
|
313
|
+
✅ Specify pros/cons for each option
|
|
314
|
+
✅ Specify file location to fix (include line)
|
|
300
315
|
```
|
|
301
316
|
|
|
302
|
-
|
|
317
|
+
Absolute prohibitions:
|
|
303
318
|
|
|
304
319
|
```text
|
|
305
|
-
❌
|
|
306
|
-
❌ Sequential Thinking
|
|
307
|
-
❌
|
|
308
|
-
❌
|
|
309
|
-
❌
|
|
310
|
-
❌
|
|
311
|
-
❌
|
|
320
|
+
❌ Start analysis without ARGUMENT
|
|
321
|
+
❌ Less than 3 Sequential Thinking steps
|
|
322
|
+
❌ Fix by guess without code exploration
|
|
323
|
+
❌ Present only 1 option
|
|
324
|
+
❌ Start fixing without user choice
|
|
325
|
+
❌ Skip verification after fix
|
|
326
|
+
❌ List fix methods without pros/cons
|
|
312
327
|
```
|
|
313
328
|
|
|
314
329
|
</validation>
|
|
@@ -317,90 +332,90 @@ npm run build
|
|
|
317
332
|
|
|
318
333
|
<examples>
|
|
319
334
|
|
|
320
|
-
##
|
|
335
|
+
## Real-world Examples
|
|
321
336
|
|
|
322
|
-
###
|
|
337
|
+
### Example 1: Type Error
|
|
323
338
|
|
|
324
339
|
```bash
|
|
325
|
-
|
|
340
|
+
User: /bug-fix Property 'name' does not exist on type 'User'
|
|
326
341
|
|
|
327
|
-
1. Sequential Thinking (3
|
|
328
|
-
thought 1: "
|
|
329
|
-
thought 2: "User
|
|
330
|
-
thought 3: "
|
|
342
|
+
1. Sequential Thinking (3 steps):
|
|
343
|
+
thought 1: "Type error - simple, check User type definition"
|
|
344
|
+
thought 2: "Need to explore User type and usage locations"
|
|
345
|
+
thought 3: "2 options: modify type definition vs modify usage"
|
|
331
346
|
|
|
332
|
-
2. Task
|
|
333
|
-
Task (Explore): "User
|
|
334
|
-
→ src/types/user.ts, src/components/UserProfile.tsx
|
|
347
|
+
2. Task Exploration:
|
|
348
|
+
Task (Explore): "Find User type definition location and usage files"
|
|
349
|
+
→ Identified src/types/user.ts, src/components/UserProfile.tsx
|
|
335
350
|
|
|
336
|
-
3.
|
|
337
|
-
|
|
351
|
+
3. Cause Analysis:
|
|
352
|
+
name property missing from User type
|
|
338
353
|
|
|
339
|
-
4.
|
|
340
|
-
|
|
341
|
-
-
|
|
342
|
-
-
|
|
354
|
+
4. Option Presentation:
|
|
355
|
+
Option 1: Add name property to User type (Recommended)
|
|
356
|
+
- Pro: Root cause fix
|
|
357
|
+
- Con: None
|
|
343
358
|
|
|
344
|
-
|
|
345
|
-
-
|
|
346
|
-
-
|
|
359
|
+
Option 2: Remove name from usage
|
|
360
|
+
- Pro: Quick fix
|
|
361
|
+
- Con: Feature loss
|
|
347
362
|
|
|
348
|
-
5.
|
|
363
|
+
5. User Selection: 1
|
|
349
364
|
|
|
350
365
|
6. Edit:
|
|
351
366
|
src/types/user.ts:3
|
|
352
367
|
+ name: string;
|
|
353
368
|
|
|
354
|
-
7.
|
|
355
|
-
npm run typecheck →
|
|
369
|
+
7. Verification:
|
|
370
|
+
npm run typecheck → Success
|
|
356
371
|
```
|
|
357
372
|
|
|
358
|
-
###
|
|
373
|
+
### Example 2: Runtime Error
|
|
359
374
|
|
|
360
375
|
```bash
|
|
361
|
-
|
|
376
|
+
User: /bug-fix Cannot read property 'data' of undefined
|
|
362
377
|
|
|
363
|
-
1. Sequential Thinking (5
|
|
364
|
-
thought 1: "
|
|
365
|
-
thought 2: "
|
|
366
|
-
thought 3: "
|
|
367
|
-
thought 4: "
|
|
368
|
-
thought 5: "optional chaining
|
|
378
|
+
1. Sequential Thinking (5 steps):
|
|
379
|
+
thought 1: "Runtime error - normal complexity, missing null check"
|
|
380
|
+
thought 2: "Need to identify error location, check stack trace"
|
|
381
|
+
thought 3: "Explore related code: API calls, data access patterns"
|
|
382
|
+
thought 4: "Fix methods: optional chaining, null check, init"
|
|
383
|
+
thought 5: "Recommend optional chaining - concise and safe"
|
|
369
384
|
|
|
370
|
-
2. Task
|
|
371
|
-
Task (Explore): "
|
|
372
|
-
→ src/hooks/useUserData.ts:15, API
|
|
385
|
+
2. Task Exploration:
|
|
386
|
+
Task (Explore): "Analyze error code and data flow"
|
|
387
|
+
→ Found src/hooks/useUserData.ts:15, missing API response check
|
|
373
388
|
|
|
374
|
-
3.
|
|
375
|
-
|
|
389
|
+
3. Cause Analysis:
|
|
390
|
+
response is undefined when API call fails
|
|
376
391
|
|
|
377
|
-
4.
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
392
|
+
4. Options:
|
|
393
|
+
Option 1: Use optional chaining (Recommended)
|
|
394
|
+
Option 2: Null check with if statement
|
|
395
|
+
Option 3: Wrap with try-catch
|
|
381
396
|
|
|
382
|
-
5.
|
|
397
|
+
5. After selection → Implementation → Verification
|
|
383
398
|
```
|
|
384
399
|
|
|
385
|
-
###
|
|
400
|
+
### Example 3: Logic Error
|
|
386
401
|
|
|
387
402
|
```bash
|
|
388
|
-
|
|
403
|
+
User: /bug-fix User list showing duplicates
|
|
389
404
|
|
|
390
|
-
1. Sequential Thinking (5
|
|
391
|
-
thought 1: "
|
|
392
|
-
thought 2: "
|
|
393
|
-
thought 3: "
|
|
394
|
-
thought 4: "
|
|
395
|
-
thought 5: "useEffect
|
|
405
|
+
1. Sequential Thinking (5 steps):
|
|
406
|
+
thought 1: "Logic error - normal complexity, state management issue"
|
|
407
|
+
thought 2: "Suspect duplicate rerender or data fetch"
|
|
408
|
+
thought 3: "Explore related component and state management code"
|
|
409
|
+
thought 4: "Options: fix useEffect dependencies, add duplicate logic"
|
|
410
|
+
thought 5: "Recommend useEffect dependency fix"
|
|
396
411
|
|
|
397
|
-
2. Task
|
|
398
|
-
Task (Explore): "
|
|
399
|
-
→ UserList.tsx, useEffect
|
|
412
|
+
2. Task Exploration:
|
|
413
|
+
Task (Explore): "Analyze user list render and state management"
|
|
414
|
+
→ Found UserList.tsx, useEffect dependency array issue
|
|
400
415
|
|
|
401
|
-
3.
|
|
416
|
+
3. Cause: useEffect missing dependency, fetching every render
|
|
402
417
|
|
|
403
|
-
4.
|
|
418
|
+
4. Option presentation → Selection → Implementation → Verification
|
|
404
419
|
```
|
|
405
420
|
|
|
406
421
|
</examples>
|