@kood/claude-code 0.3.7 → 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 +51 -51
- 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 +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 -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,33 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: Analyze bug cause and fix. Sequential thinking 3-5 + Task (Explore) required.
|
|
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
5
|
---
|
|
6
6
|
|
|
7
7
|
# Bug Fix Command
|
|
8
8
|
|
|
9
|
-
>
|
|
9
|
+
> Command for bug cause analysis, fix option presentation, and implementation.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
**Bug Target**: $ARGUMENTS
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
<argument_validation>
|
|
16
16
|
|
|
17
|
-
## ARGUMENT
|
|
17
|
+
## ARGUMENT Verification Required
|
|
18
18
|
|
|
19
19
|
```
|
|
20
|
-
$ARGUMENTS
|
|
20
|
+
No $ARGUMENTS → Ask immediately:
|
|
21
21
|
|
|
22
|
-
"
|
|
22
|
+
"What bug needs fixing? Please provide details.
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
24
|
+
Examples:
|
|
25
|
+
- Error message and location
|
|
26
|
+
- Expected vs actual behavior
|
|
27
|
+
- How to reproduce
|
|
28
|
+
- Relevant file paths"
|
|
29
29
|
|
|
30
|
-
$ARGUMENTS
|
|
30
|
+
Has $ARGUMENTS → Proceed to next step
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
</argument_validation>
|
|
@@ -36,19 +36,19 @@ $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.
|
|
50
|
-
| 8.
|
|
51
|
-
| 9.
|
|
43
|
+
| 1. Input Verify | Validate ARGUMENT, ask if missing | - |
|
|
44
|
+
| 2. Complexity Judge | Determine analysis scope with Sequential Thinking | sequentialthinking (step 1) |
|
|
45
|
+
| 3. Reproduce Bug | Reproduce error, identify related files | Read/Grep/Glob |
|
|
46
|
+
| 4. Analyze Cause | Explore related code with Task (Explore) | Task (Explore) |
|
|
47
|
+
| 5. Derive Options | Generate 2-3 fix methods | sequentialthinking (steps 2-4) |
|
|
48
|
+
| 6. Present Options | Show pros/cons and impact scope | - |
|
|
49
|
+
| 7. User Choice | Wait for user to select fix method | - |
|
|
50
|
+
| 8. Implement | Fix code with selected method | Edit |
|
|
51
|
+
| 9. Verify | Run tests, confirm build | Bash |
|
|
52
52
|
|
|
53
53
|
</workflow>
|
|
54
54
|
|
|
@@ -56,43 +56,43 @@ $ARGUMENTS 있음 → 다음 단계 진행
|
|
|
56
56
|
|
|
57
57
|
<thinking_strategy>
|
|
58
58
|
|
|
59
|
-
## Sequential Thinking
|
|
59
|
+
## Sequential Thinking Guide
|
|
60
60
|
|
|
61
|
-
###
|
|
61
|
+
### Complexity Judgment (thought 1)
|
|
62
62
|
|
|
63
63
|
```
|
|
64
|
-
thought 1:
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
64
|
+
thought 1: Complexity judgment
|
|
65
|
+
- Error type: syntax/runtime/logic/type
|
|
66
|
+
- Impact scope: single file vs multiple files
|
|
67
|
+
- Dependencies: external libraries, API integration
|
|
68
|
+
- Reproducibility: always vs intermittent
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
###
|
|
71
|
+
### Complexity Strategy
|
|
72
72
|
|
|
73
|
-
|
|
|
74
|
-
|
|
75
|
-
|
|
|
76
|
-
|
|
|
77
|
-
|
|
|
73
|
+
| Complexity | Thoughts | Criteria | Pattern |
|
|
74
|
+
|------------|----------|----------|---------|
|
|
75
|
+
| **Simple** | 3 | Clear error, 1-2 files | Judge → Analyze cause → Fix method |
|
|
76
|
+
| **Normal** | 5 | Logic error, 3-5 files | Judge → Reproduce → Analyze → Compare options → Recommend |
|
|
77
|
+
| **Complex** | 7+ | Intermittent error, multi-module | Judge → Try reproduce → Deep analyze → Explore options → Compare → Recommend |
|
|
78
78
|
|
|
79
|
-
###
|
|
79
|
+
### Normal Complexity Pattern (5 steps)
|
|
80
80
|
|
|
81
81
|
```
|
|
82
|
-
thought 1:
|
|
83
|
-
thought 2:
|
|
84
|
-
thought 3:
|
|
85
|
-
thought 4:
|
|
86
|
-
thought 5:
|
|
82
|
+
thought 1: Complexity judgment and analysis scope
|
|
83
|
+
thought 2: Bug reproduction and error message analysis
|
|
84
|
+
thought 3: Related code exploration and cause identification
|
|
85
|
+
thought 4: Compare 2-3 fix methods
|
|
86
|
+
thought 5: Final recommendation and rationale
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
###
|
|
89
|
+
### Core Principles
|
|
90
90
|
|
|
91
91
|
```text
|
|
92
|
-
✅
|
|
93
|
-
✅
|
|
94
|
-
✅
|
|
95
|
-
✅
|
|
92
|
+
✅ Output thinking process for actual thinking to happen
|
|
93
|
+
✅ Judge high when uncertain (expandable 3→5)
|
|
94
|
+
✅ Concrete analysis required in each thought (no abstract)
|
|
95
|
+
✅ Use isRevision to modify previous thought if needed
|
|
96
96
|
```
|
|
97
97
|
|
|
98
98
|
</thinking_strategy>
|
|
@@ -101,65 +101,65 @@ thought 5: 최종 추천안 및 근거
|
|
|
101
101
|
|
|
102
102
|
<exploration>
|
|
103
103
|
|
|
104
|
-
## Task (Explore)
|
|
104
|
+
## Task (Explore) Usage
|
|
105
105
|
|
|
106
|
-
###
|
|
106
|
+
### Exploration Strategy
|
|
107
107
|
|
|
108
|
-
|
|
|
109
|
-
|
|
110
|
-
|
|
|
111
|
-
|
|
|
112
|
-
|
|
|
113
|
-
| **API
|
|
108
|
+
| Bug Type | Explore Target | Prompt Example |
|
|
109
|
+
|----------|-----------------|-----------------|
|
|
110
|
+
| **Type Error** | Type definition, usage | "Find type X definition and usage files" |
|
|
111
|
+
| **Runtime Error** | Function call chain | "Find function Y call path and related files" |
|
|
112
|
+
| **Logic Error** | State management, data flow | "Find where state Z changes and its impact" |
|
|
113
|
+
| **API Error** | Endpoint, request/response | "Find API /path related code structure" |
|
|
114
114
|
|
|
115
|
-
### Task
|
|
115
|
+
### Task Invocation Pattern
|
|
116
116
|
|
|
117
|
-
|
|
117
|
+
**Single Exploration:**
|
|
118
118
|
|
|
119
119
|
```typescript
|
|
120
120
|
Task({
|
|
121
121
|
subagent_type: 'Explore',
|
|
122
|
-
description: '
|
|
122
|
+
description: 'Explore error-related code',
|
|
123
123
|
prompt: `
|
|
124
|
-
|
|
125
|
-
-
|
|
126
|
-
-
|
|
127
|
-
-
|
|
128
|
-
-
|
|
124
|
+
Understand error-related code structure:
|
|
125
|
+
- Exact location where error occurs
|
|
126
|
+
- Related functions/components
|
|
127
|
+
- Dependent modules/libraries
|
|
128
|
+
- Recent change history (git blame)
|
|
129
129
|
`
|
|
130
130
|
})
|
|
131
131
|
```
|
|
132
132
|
|
|
133
|
-
|
|
133
|
+
**Parallel Exploration (complex cases):**
|
|
134
134
|
|
|
135
135
|
```typescript
|
|
136
|
-
//
|
|
136
|
+
// Multiple Task calls in single message
|
|
137
137
|
Task({
|
|
138
138
|
subagent_type: 'Explore',
|
|
139
|
-
prompt: '
|
|
139
|
+
prompt: 'Analyze frontend error component'
|
|
140
140
|
})
|
|
141
141
|
|
|
142
142
|
Task({
|
|
143
143
|
subagent_type: 'Explore',
|
|
144
|
-
prompt: '
|
|
144
|
+
prompt: 'Analyze backend API endpoint'
|
|
145
145
|
})
|
|
146
146
|
|
|
147
147
|
Task({
|
|
148
148
|
subagent_type: 'Explore',
|
|
149
|
-
prompt: '
|
|
149
|
+
prompt: 'Analyze type definitions and interfaces'
|
|
150
150
|
})
|
|
151
151
|
|
|
152
|
-
// →
|
|
152
|
+
// → Collect results and identify cause
|
|
153
153
|
```
|
|
154
154
|
|
|
155
|
-
###
|
|
155
|
+
### Exploration Checklist
|
|
156
156
|
|
|
157
157
|
```text
|
|
158
|
-
✅
|
|
159
|
-
✅
|
|
160
|
-
✅
|
|
161
|
-
✅
|
|
162
|
-
✅
|
|
158
|
+
✅ Exact error location
|
|
159
|
+
✅ Related functions/classes/components
|
|
160
|
+
✅ Data flow and state changes
|
|
161
|
+
✅ External dependencies (libraries, APIs)
|
|
162
|
+
✅ Recent changes (git log/blame)
|
|
163
163
|
```
|
|
164
164
|
|
|
165
165
|
</exploration>
|
|
@@ -168,70 +168,70 @@ Task({
|
|
|
168
168
|
|
|
169
169
|
<option_presentation>
|
|
170
170
|
|
|
171
|
-
##
|
|
171
|
+
## Option Presentation Format
|
|
172
172
|
|
|
173
|
-
###
|
|
173
|
+
### Present 2-3 Options
|
|
174
174
|
|
|
175
175
|
```markdown
|
|
176
|
-
##
|
|
176
|
+
## Bug Analysis Results
|
|
177
177
|
|
|
178
|
-
|
|
178
|
+
**Cause:** [Cause explanation]
|
|
179
179
|
|
|
180
|
-
|
|
180
|
+
**Impact Scope:** [File and module list]
|
|
181
181
|
|
|
182
182
|
---
|
|
183
183
|
|
|
184
|
-
###
|
|
184
|
+
### Option 1: [Fix Method] (Recommended)
|
|
185
185
|
|
|
186
|
-
|
|
187
|
-
-
|
|
188
|
-
-
|
|
186
|
+
**Fix Content:**
|
|
187
|
+
- Change 1
|
|
188
|
+
- Change 2
|
|
189
189
|
|
|
190
|
-
|
|
|
190
|
+
| Pros | Cons |
|
|
191
191
|
|------|------|
|
|
192
|
-
|
|
|
193
|
-
|
|
|
192
|
+
| Pro 1 | Con 1 |
|
|
193
|
+
| Pro 2 | Con 2 |
|
|
194
194
|
|
|
195
|
-
|
|
195
|
+
**Files to Fix:**
|
|
196
196
|
- `src/file1.ts:line`
|
|
197
197
|
- `src/file2.ts:line`
|
|
198
198
|
|
|
199
|
-
|
|
199
|
+
**Risk:** Low
|
|
200
200
|
|
|
201
201
|
---
|
|
202
202
|
|
|
203
|
-
###
|
|
203
|
+
### Option 2: [Fix Method]
|
|
204
204
|
|
|
205
|
-
|
|
205
|
+
**Fix Content:**
|
|
206
206
|
...
|
|
207
207
|
|
|
208
|
-
|
|
|
208
|
+
| Pros | Cons |
|
|
209
209
|
|------|------|
|
|
210
210
|
| ... | ... |
|
|
211
211
|
|
|
212
|
-
|
|
212
|
+
**Files to Fix:**
|
|
213
213
|
...
|
|
214
214
|
|
|
215
|
-
|
|
215
|
+
**Risk:** Medium
|
|
216
216
|
|
|
217
217
|
---
|
|
218
218
|
|
|
219
|
-
###
|
|
219
|
+
### Option 3: [Fix Method] (Temporary)
|
|
220
220
|
|
|
221
|
-
|
|
221
|
+
**Fix Content:**
|
|
222
222
|
...
|
|
223
223
|
|
|
224
|
-
|
|
224
|
+
**Risk:** High (not root cause fix)
|
|
225
225
|
|
|
226
226
|
---
|
|
227
227
|
|
|
228
|
-
##
|
|
228
|
+
## Recommendation and Rationale
|
|
229
229
|
|
|
230
|
-
|
|
231
|
-
-
|
|
232
|
-
-
|
|
230
|
+
Recommend Option 1.
|
|
231
|
+
- Rationale 1
|
|
232
|
+
- Rationale 2
|
|
233
233
|
|
|
234
|
-
|
|
234
|
+
Which option to use? (1/2/3)
|
|
235
235
|
```
|
|
236
236
|
|
|
237
237
|
</option_presentation>
|
|
@@ -240,43 +240,43 @@ Task({
|
|
|
240
240
|
|
|
241
241
|
<implementation>
|
|
242
242
|
|
|
243
|
-
##
|
|
243
|
+
## Implementation Guide
|
|
244
244
|
|
|
245
|
-
###
|
|
245
|
+
### Fix Steps
|
|
246
246
|
|
|
247
247
|
```
|
|
248
|
-
1.
|
|
249
|
-
2.
|
|
250
|
-
3.
|
|
251
|
-
4.
|
|
252
|
-
5.
|
|
248
|
+
1. Wait for user option selection
|
|
249
|
+
2. Fix code with Edit tool
|
|
250
|
+
3. Explain changes
|
|
251
|
+
4. Run tests/build (optional)
|
|
252
|
+
5. Verify results
|
|
253
253
|
```
|
|
254
254
|
|
|
255
|
-
###
|
|
255
|
+
### Post-Fix Verification
|
|
256
256
|
|
|
257
257
|
```bash
|
|
258
|
-
#
|
|
258
|
+
# Type check
|
|
259
259
|
npm run typecheck
|
|
260
|
-
#
|
|
260
|
+
# Or
|
|
261
261
|
tsc --noEmit
|
|
262
262
|
|
|
263
|
-
#
|
|
263
|
+
# Run tests
|
|
264
264
|
npm test
|
|
265
|
-
#
|
|
266
|
-
npm test --
|
|
265
|
+
# Or
|
|
266
|
+
npm test -- <related test file>
|
|
267
267
|
|
|
268
|
-
#
|
|
268
|
+
# Verify build
|
|
269
269
|
npm run build
|
|
270
270
|
```
|
|
271
271
|
|
|
272
|
-
###
|
|
272
|
+
### Verification Checklist
|
|
273
273
|
|
|
274
274
|
```text
|
|
275
|
-
✅
|
|
276
|
-
✅
|
|
277
|
-
✅
|
|
278
|
-
✅
|
|
279
|
-
✅
|
|
275
|
+
✅ Error resolved
|
|
276
|
+
✅ Existing functionality intact
|
|
277
|
+
✅ No type errors
|
|
278
|
+
✅ Tests pass
|
|
279
|
+
✅ Build succeeds
|
|
280
280
|
```
|
|
281
281
|
|
|
282
282
|
</implementation>
|
|
@@ -285,30 +285,30 @@ npm run build
|
|
|
285
285
|
|
|
286
286
|
<validation>
|
|
287
287
|
|
|
288
|
-
##
|
|
288
|
+
## Validation Checklist
|
|
289
289
|
|
|
290
|
-
|
|
290
|
+
Before execution:
|
|
291
291
|
|
|
292
292
|
```text
|
|
293
|
-
✅ ARGUMENT
|
|
294
|
-
✅ Sequential Thinking
|
|
295
|
-
✅ Task (Explore)
|
|
296
|
-
✅
|
|
297
|
-
✅
|
|
298
|
-
✅
|
|
299
|
-
✅
|
|
293
|
+
✅ Verify ARGUMENT (ask if missing)
|
|
294
|
+
✅ Sequential Thinking minimum 3 steps
|
|
295
|
+
✅ Code exploration with Task (Explore)
|
|
296
|
+
✅ Cause analysis clear
|
|
297
|
+
✅ Minimum 2 options, recommend 3
|
|
298
|
+
✅ Specify pros/cons for each option
|
|
299
|
+
✅ Specify file location to fix (include line)
|
|
300
300
|
```
|
|
301
301
|
|
|
302
|
-
|
|
302
|
+
Absolute prohibitions:
|
|
303
303
|
|
|
304
304
|
```text
|
|
305
|
-
❌
|
|
306
|
-
❌ Sequential Thinking
|
|
307
|
-
❌
|
|
308
|
-
❌
|
|
309
|
-
❌
|
|
310
|
-
❌
|
|
311
|
-
❌
|
|
305
|
+
❌ Start analysis without ARGUMENT
|
|
306
|
+
❌ Less than 3 Sequential Thinking steps
|
|
307
|
+
❌ Fix by guess without code exploration
|
|
308
|
+
❌ Present only 1 option
|
|
309
|
+
❌ Start fixing without user choice
|
|
310
|
+
❌ Skip verification after fix
|
|
311
|
+
❌ List fix methods without pros/cons
|
|
312
312
|
```
|
|
313
313
|
|
|
314
314
|
</validation>
|
|
@@ -317,90 +317,90 @@ npm run build
|
|
|
317
317
|
|
|
318
318
|
<examples>
|
|
319
319
|
|
|
320
|
-
##
|
|
320
|
+
## Real-world Examples
|
|
321
321
|
|
|
322
|
-
###
|
|
322
|
+
### Example 1: Type Error
|
|
323
323
|
|
|
324
324
|
```bash
|
|
325
|
-
|
|
325
|
+
User: /bug-fix Property 'name' does not exist on type 'User'
|
|
326
326
|
|
|
327
|
-
1. Sequential Thinking (3
|
|
328
|
-
thought 1: "
|
|
329
|
-
thought 2: "User
|
|
330
|
-
thought 3: "
|
|
327
|
+
1. Sequential Thinking (3 steps):
|
|
328
|
+
thought 1: "Type error - simple, check User type definition"
|
|
329
|
+
thought 2: "Need to explore User type and usage locations"
|
|
330
|
+
thought 3: "2 options: modify type definition vs modify usage"
|
|
331
331
|
|
|
332
|
-
2. Task
|
|
333
|
-
Task (Explore): "User
|
|
334
|
-
→ src/types/user.ts, src/components/UserProfile.tsx
|
|
332
|
+
2. Task Exploration:
|
|
333
|
+
Task (Explore): "Find User type definition location and usage files"
|
|
334
|
+
→ Identified src/types/user.ts, src/components/UserProfile.tsx
|
|
335
335
|
|
|
336
|
-
3.
|
|
337
|
-
|
|
336
|
+
3. Cause Analysis:
|
|
337
|
+
name property missing from User type
|
|
338
338
|
|
|
339
|
-
4.
|
|
340
|
-
|
|
341
|
-
-
|
|
342
|
-
-
|
|
339
|
+
4. Option Presentation:
|
|
340
|
+
Option 1: Add name property to User type (Recommended)
|
|
341
|
+
- Pro: Root cause fix
|
|
342
|
+
- Con: None
|
|
343
343
|
|
|
344
|
-
|
|
345
|
-
-
|
|
346
|
-
-
|
|
344
|
+
Option 2: Remove name from usage
|
|
345
|
+
- Pro: Quick fix
|
|
346
|
+
- Con: Feature loss
|
|
347
347
|
|
|
348
|
-
5.
|
|
348
|
+
5. User Selection: 1
|
|
349
349
|
|
|
350
350
|
6. Edit:
|
|
351
351
|
src/types/user.ts:3
|
|
352
352
|
+ name: string;
|
|
353
353
|
|
|
354
|
-
7.
|
|
355
|
-
npm run typecheck →
|
|
354
|
+
7. Verification:
|
|
355
|
+
npm run typecheck → Success
|
|
356
356
|
```
|
|
357
357
|
|
|
358
|
-
###
|
|
358
|
+
### Example 2: Runtime Error
|
|
359
359
|
|
|
360
360
|
```bash
|
|
361
|
-
|
|
361
|
+
User: /bug-fix Cannot read property 'data' of undefined
|
|
362
362
|
|
|
363
|
-
1. Sequential Thinking (5
|
|
364
|
-
thought 1: "
|
|
365
|
-
thought 2: "
|
|
366
|
-
thought 3: "
|
|
367
|
-
thought 4: "
|
|
368
|
-
thought 5: "optional chaining
|
|
363
|
+
1. Sequential Thinking (5 steps):
|
|
364
|
+
thought 1: "Runtime error - normal complexity, missing null check"
|
|
365
|
+
thought 2: "Need to identify error location, check stack trace"
|
|
366
|
+
thought 3: "Explore related code: API calls, data access patterns"
|
|
367
|
+
thought 4: "Fix methods: optional chaining, null check, init"
|
|
368
|
+
thought 5: "Recommend optional chaining - concise and safe"
|
|
369
369
|
|
|
370
|
-
2. Task
|
|
371
|
-
Task (Explore): "
|
|
372
|
-
→ src/hooks/useUserData.ts:15, API
|
|
370
|
+
2. Task Exploration:
|
|
371
|
+
Task (Explore): "Analyze error code and data flow"
|
|
372
|
+
→ Found src/hooks/useUserData.ts:15, missing API response check
|
|
373
373
|
|
|
374
|
-
3.
|
|
375
|
-
|
|
374
|
+
3. Cause Analysis:
|
|
375
|
+
response is undefined when API call fails
|
|
376
376
|
|
|
377
|
-
4.
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
377
|
+
4. Options:
|
|
378
|
+
Option 1: Use optional chaining (Recommended)
|
|
379
|
+
Option 2: Null check with if statement
|
|
380
|
+
Option 3: Wrap with try-catch
|
|
381
381
|
|
|
382
|
-
5.
|
|
382
|
+
5. After selection → Implementation → Verification
|
|
383
383
|
```
|
|
384
384
|
|
|
385
|
-
###
|
|
385
|
+
### Example 3: Logic Error
|
|
386
386
|
|
|
387
387
|
```bash
|
|
388
|
-
|
|
388
|
+
User: /bug-fix User list showing duplicates
|
|
389
389
|
|
|
390
|
-
1. Sequential Thinking (5
|
|
391
|
-
thought 1: "
|
|
392
|
-
thought 2: "
|
|
393
|
-
thought 3: "
|
|
394
|
-
thought 4: "
|
|
395
|
-
thought 5: "useEffect
|
|
390
|
+
1. Sequential Thinking (5 steps):
|
|
391
|
+
thought 1: "Logic error - normal complexity, state management issue"
|
|
392
|
+
thought 2: "Suspect duplicate rerender or data fetch"
|
|
393
|
+
thought 3: "Explore related component and state management code"
|
|
394
|
+
thought 4: "Options: fix useEffect dependencies, add duplicate logic"
|
|
395
|
+
thought 5: "Recommend useEffect dependency fix"
|
|
396
396
|
|
|
397
|
-
2. Task
|
|
398
|
-
Task (Explore): "
|
|
399
|
-
→ UserList.tsx, useEffect
|
|
397
|
+
2. Task Exploration:
|
|
398
|
+
Task (Explore): "Analyze user list render and state management"
|
|
399
|
+
→ Found UserList.tsx, useEffect dependency array issue
|
|
400
400
|
|
|
401
|
-
3.
|
|
401
|
+
3. Cause: useEffect missing dependency, fetching every render
|
|
402
402
|
|
|
403
|
-
4.
|
|
403
|
+
4. Option presentation → Selection → Implementation → Verification
|
|
404
404
|
```
|
|
405
405
|
|
|
406
406
|
</examples>
|