Skip to content

Commit 699e38e

Browse files
fix(commands): fixed name of agents
1 parent f453554 commit 699e38e

File tree

1 file changed

+106
-80
lines changed

1 file changed

+106
-80
lines changed

commands/devkit.fix-debugging.md

Lines changed: 106 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
---
22
description: Guided bug fixing and debugging with systematic root cause analysis
3-
argument-hint: [--lang=java|spring|typescript|nestjs|react|general] [issue-description or error-message]
3+
argument-hint: [ --lang=java|spring|typescript|nestjs|react|general ] [ issue-description or error-message ]
44
allowed-tools: Task, Read, Write, Edit, Bash, Grep, Glob, TodoWrite, AskUserQuestion
55
model: inherit
66
---
77

88
# Fix & Debugging
99

10-
You are helping a developer fix a bug or debug an issue. Follow a systematic approach: understand the problem, trace the root cause, design a minimal fix, then implement and verify.
10+
You are helping a developer fix a bug or debug an issue. Follow a systematic approach: understand the problem, trace the
11+
root cause, design a minimal fix, then implement and verify.
1112

1213
## Language/Framework Selection
1314

1415
Parse $ARGUMENTS to detect the optional `--lang` parameter:
16+
1517
- `--lang=spring` or `--lang=java`: Use Java/Spring Boot specialized agents
1618
- `--lang=typescript` or `--lang=ts`: Use TypeScript specialized agents
1719
- `--lang=nestjs`: Use NestJS specialized agents
@@ -20,11 +22,11 @@ Parse $ARGUMENTS to detect the optional `--lang` parameter:
2022

2123
**Agent Mapping by Language:**
2224

23-
| Phase | General (default) | Java/Spring Boot (`--lang=spring` or `--lang=java`) | TypeScript (`--lang=typescript` or `--lang=ts`) | NestJS (`--lang=nestjs`) | React (`--lang=react`) |
24-
|-------|-------------------|-----------------------------------------------------|------------------------------------------------|--------------------------|------------------------|
25-
| Debugger | `developer-kit:general-debugger` | `developer-kit:general-debugger` | `developer-kit:general-debugger` | `developer-kit:general-debugger` | `developer-kit:general-debugger` |
26-
| Architect | `developer-kit:general-software-architect` | `developer-kit:java-software-architect-review` | `developer-kit:typescript-software-architect-review` | `developer-kit:typescript-software-architect-review` | `developer-kit:typescript-software-architect-review` |
27-
| Code Review | `developer-kit:general-code-reviewer` | `developer-kit:spring-boot-code-review-expert` | `developer-kit:general-code-reviewer` | `developer-kit:nestjs-code-review-expert` | `developer-kit:general-code-reviewer` |
25+
| Phase | General (default) | Java/Spring Boot (`--lang=spring` or `--lang=java`) | TypeScript (`--lang=typescript` or `--lang=ts`) | NestJS (`--lang=nestjs`) | React (`--lang=react`) |
26+
|-------------|-------------------------------|-----------------------------------------------------|------------------------------------------------------|------------------------------------------------------|------------------------------------------------------|
27+
| Debugger | `developer-kit:debugger` | `developer-kit:debugger` | `developer-kit:debugger` | `developer-kit:debugger` | `developer-kit:debugger` |
28+
| Architect | `developer-kit:architect` | `developer-kit:java-software-architect-review` | `developer-kit:typescript-software-architect-review` | `developer-kit:typescript-software-architect-review` | `developer-kit:typescript-software-architect-review` |
29+
| Code Review | `developer-kit:code-reviewer` | `developer-kit:spring-boot-code-review-expert` | `developer-kit:code-reviewer` | `developer-kit:nestjs-code-review-expert` | `developer-kit:code-reviewer` |
2830

2931
## Current Context
3032

@@ -39,7 +41,9 @@ Parse $ARGUMENTS to detect the optional `--lang` parameter:
3941
- **Minimal changes**: Fix only what's broken, avoid scope creep
4042
- **Verify completely**: Confirm the fix works and doesn't break other things
4143
- **Use TodoWrite**: Track all progress throughout
42-
- **Structured user interaction**: Use the AskUserQuestion tool in all phases where you need to ask structured questions to the user (Phase 1: Problem Capture, Phase 3: Root Cause Analysis, Phase 4: Fix Design, Phase 7: Verification). Always use AskUserQuestion for clarifications, confirmations, and decisions rather than plain text questions.
44+
- **Structured user interaction**: Use the AskUserQuestion tool in all phases where you need to ask structured questions
45+
to the user (Phase 1: Problem Capture, Phase 3: Root Cause Analysis, Phase 4: Fix Design, Phase 7: Verification).
46+
Always use AskUserQuestion for clarifications, confirmations, and decisions rather than plain text questions.
4347
- **No time estimates**: DO NOT provide or request time estimates or implementation timelines at any phase
4448

4549
---
@@ -51,18 +55,19 @@ Parse $ARGUMENTS to detect the optional `--lang` parameter:
5155
**Initial issue**: $ARGUMENTS
5256

5357
**Actions**:
58+
5459
1. Create todo list with all phases
5560
2. Gather problem details:
56-
- What is the exact error message or unexpected behavior?
57-
- When did this start happening?
58-
- Can you reproduce it consistently?
59-
- What are the reproduction steps?
60-
- Any recent changes that might be related?
61+
- What is the exact error message or unexpected behavior?
62+
- When did this start happening?
63+
- Can you reproduce it consistently?
64+
- What are the reproduction steps?
65+
- Any recent changes that might be related?
6166
3. **Use the AskUserQuestion tool to gather all missing information in a clear, organized format**:
62-
- Error messages, logs, or stack traces
63-
- Steps to reproduce
64-
- Expected vs actual behavior
65-
- Environment details (local, staging, production)
67+
- Error messages, logs, or stack traces
68+
- Steps to reproduce
69+
- Expected vs actual behavior
70+
- Environment details (local, staging, production)
6671
4. **Wait for user answers before proceeding to evidence collection**
6772

6873
---
@@ -72,12 +77,14 @@ Parse $ARGUMENTS to detect the optional `--lang` parameter:
7277
**Goal**: Gather all relevant information about the failure
7378

7479
**Actions**:
80+
7581
1. Use the Task tool to launch 2-3 general-debugger subagents in parallel with different focuses:
76-
- Analyze stack traces and error messages
77-
- Trace execution paths related to the failure
78-
- Check recent git changes that might have introduced the bug
82+
- Analyze stack traces and error messages
83+
- Trace execution paths related to the failure
84+
- Check recent git changes that might have introduced the bug
7985

8086
**Example Task tool usage**:
87+
8188
```
8289
Task(
8390
description: "Analyze error and trace execution path",
@@ -87,10 +94,11 @@ Task(
8794
```
8895

8996
**Example agent prompts**:
90-
- "Analyze this stack trace: [trace]. Identify the root cause and exact failure point"
91-
- "Trace the execution flow for [feature/function] and identify where it deviates from expected behavior"
92-
- "Check recent git changes (last 5-10 commits) for changes that could have caused [issue]"
93-
- "Analyze the data flow for [operation] and identify where data becomes corrupted/invalid"
97+
98+
- "Analyze this stack trace: [trace]. Identify the root cause and exact failure point"
99+
- "Trace the execution flow for [feature/function] and identify where it deviates from expected behavior"
100+
- "Check recent git changes (last 5-10 commits) for changes that could have caused [issue]"
101+
- "Analyze the data flow for [operation] and identify where data becomes corrupted/invalid"
94102

95103
2. Once agents return, read all identified critical files
96104
3. Compile evidence summary with key findings
@@ -104,15 +112,16 @@ Task(
104112
**CRITICAL**: Do not proceed to fixing until root cause is confirmed.
105113

106114
**Actions**:
115+
107116
1. Use the Task tool to launch 2 general-debugger subagents with analysis focus:
108-
- Deep dive into the most likely failure point
109-
- Verify hypothesis with code analysis
117+
- Deep dive into the most likely failure point
118+
- Verify hypothesis with code analysis
110119

111120
2. Synthesize findings into root cause statement:
112-
- **What**: Exact condition causing the failure
113-
- **Where**: File and line where the bug originates
114-
- **Why**: Underlying reason this happens
115-
- **When**: Conditions that trigger the bug
121+
- **What**: Exact condition causing the failure
122+
- **Where**: File and line where the bug originates
123+
- **Why**: Underlying reason this happens
124+
- **When**: Conditions that trigger the bug
116125

117126
3. **Use the AskUserQuestion tool to confirm root cause with user before proceeding**
118127
4. **Wait for user confirmation before moving to Fix Design**
@@ -126,20 +135,21 @@ Task(
126135
**DO NOT PROCEED WITHOUT ROOT CAUSE CONFIRMATION**
127136

128137
**Actions**:
138+
129139
1. Use the Task tool to launch 2-3 general-software-architect subagents in parallel with different approaches:
130-
- Minimal surgical fix (smallest possible change)
131-
- Defensive fix (adds guards and validation)
132-
- Comprehensive fix (addresses similar issues elsewhere)
140+
- Minimal surgical fix (smallest possible change)
141+
- Defensive fix (adds guards and validation)
142+
- Comprehensive fix (addresses similar issues elsewhere)
133143

134144
2. Review approaches considering:
135-
- Risk of regression
136-
- Side effects on other code
137-
- Test coverage implications
145+
- Risk of regression
146+
- Side effects on other code
147+
- Test coverage implications
138148

139149
3. Present to user:
140-
- Brief summary of each approach
141-
- Trade-offs and risks
142-
- **Your recommendation with reasoning**
150+
- Brief summary of each approach
151+
- Trade-offs and risks
152+
- **Your recommendation with reasoning**
143153

144154
4. **Use the AskUserQuestion tool to ask user which approach they prefer**
145155
5. **Wait for user response before proceeding to implementation**
@@ -153,6 +163,7 @@ Task(
153163
**DO NOT START WITHOUT USER APPROVAL**
154164

155165
**Actions**:
166+
156167
1. Wait for explicit user approval
157168
2. Re-read all affected files to ensure current state
158169
3. Implement fix following chosen approach
@@ -167,26 +178,27 @@ Task(
167178
**Goal**: Ensure the code compiles and all tests pass
168179

169180
**Actions**:
181+
170182
1. **Compile/Build** the project:
171-
- Run the appropriate build command for the project
172-
- Maven: `mvn compile` or `mvn package -DskipTests`
173-
- Gradle: `./gradlew build -x test` or `./gradlew compileJava`
174-
- npm: `npm run build`
175-
- Other: Use project-specific build command
183+
- Run the appropriate build command for the project
184+
- Maven: `mvn compile` or `mvn package -DskipTests`
185+
- Gradle: `./gradlew build -x test` or `./gradlew compileJava`
186+
- npm: `npm run build`
187+
- Other: Use project-specific build command
176188

177189
2. **Fix any compilation errors** before proceeding
178190

179191
3. **Run tests**:
180-
- Run unit tests for affected components first
181-
- Run full test suite if quick tests pass
182-
- Maven: `mvn test` or `mvn verify`
183-
- Gradle: `./gradlew test`
184-
- npm: `npm test`
192+
- Run unit tests for affected components first
193+
- Run full test suite if quick tests pass
194+
- Maven: `mvn test` or `mvn verify`
195+
- Gradle: `./gradlew test`
196+
- npm: `npm test`
185197

186198
4. **If tests fail**:
187-
- Analyze failure: Is it related to our fix or pre-existing?
188-
- If related to fix: Return to Phase 5 and adjust
189-
- If pre-existing: Document and proceed (not our scope)
199+
- Analyze failure: Is it related to our fix or pre-existing?
200+
- If related to fix: Return to Phase 5 and adjust
201+
- If pre-existing: Document and proceed (not our scope)
190202

191203
5. **Confirm all green** before proceeding to verification
192204

@@ -197,22 +209,23 @@ Task(
197209
**Goal**: Confirm the fix is correct and doesn't introduce regressions
198210

199211
**Actions**:
212+
200213
1. Use the Task tool to launch 2 general-code-reviewer subagents:
201-
- Review fix for correctness and potential regressions
202-
- Check for similar issues that might need the same fix
214+
- Review fix for correctness and potential regressions
215+
- Check for similar issues that might need the same fix
203216

204217
2. **Use the AskUserQuestion tool to confirm with user**:
205-
- Does the fix resolve the original issue?
206-
- Any unexpected behavior observed?
207-
- Should we add tests to prevent regression?
218+
- Does the fix resolve the original issue?
219+
- Any unexpected behavior observed?
220+
- Should we add tests to prevent regression?
208221

209222
3. **Wait for user feedback before finalizing**
210223

211224
3. If regression tests needed:
212-
- Propose test cases that would catch this bug
213-
- **Use AskUserQuestion to ask if user wants to implement the tests**
214-
- Implement tests if user approves
215-
- Run tests again to confirm new tests pass
225+
- Propose test cases that would catch this bug
226+
- **Use AskUserQuestion to ask if user wants to implement the tests**
227+
- Implement tests if user approves
228+
- Run tests again to confirm new tests pass
216229

217230
---
218231

@@ -221,14 +234,15 @@ Task(
221234
**Goal**: Document what was fixed and learned
222235

223236
**Actions**:
237+
224238
1. Mark all todos complete
225239
2. Summarize:
226-
- **Problem**: What was broken
227-
- **Root Cause**: Why it was broken
228-
- **Fix**: What was changed
229-
- **Files Modified**: List of changes
230-
- **Tests Added**: If any
231-
- **Prevention**: How to avoid similar issues
240+
- **Problem**: What was broken
241+
- **Root Cause**: Why it was broken
242+
- **Fix**: What was changed
243+
- **Files Modified**: List of changes
244+
- **Tests Added**: If any
245+
- **Prevention**: How to avoid similar issues
232246

233247
---
234248

@@ -272,43 +286,51 @@ This command leverages specialized sub-agents using the Task tool.
272286
**Agent Selection**: Based on the `--lang` parameter, select the appropriate agents:
273287

274288
### General Agents (default, or `--lang=general`)
275-
- **Debugger**: `developer-kit:general-debugger`
276-
- **Software Architect**: `developer-kit:general-software-architect`
277-
- **Code Reviewer**: `developer-kit:general-code-reviewer`
289+
290+
- **Debugger**: `developer-kit:debugger`
291+
- **Software Architect**: `developer-kit:architect`
292+
- **Code Reviewer**: `developer-kit:code-reviewer`
278293

279294
### Java/Spring Boot Agents (`--lang=spring` or `--lang=java`)
280-
- **Debugger**: `developer-kit:general-debugger`
295+
296+
- **Debugger**: `developer-kit:debugger`
281297
- **Software Architect**: `developer-kit:java-software-architect-review`
282298
- **Code Reviewer**: `developer-kit:spring-boot-code-review-expert`
283299

284300
### TypeScript Agents (`--lang=typescript` or `--lang=ts`)
285-
- **Debugger**: `developer-kit:general-debugger`
301+
302+
- **Debugger**: `developer-kit:debugger`
286303
- **Software Architect**: `developer-kit:typescript-software-architect-review`
287-
- **Code Reviewer**: `developer-kit:general-code-reviewer`
304+
- **Code Reviewer**: `developer-kit:code-reviewer`
288305

289306
### NestJS Agents (`--lang=nestjs`)
290-
- **Debugger**: `developer-kit:general-debugger`
307+
308+
- **Debugger**: `developer-kit:debugger`
291309
- **Software Architect**: `developer-kit:typescript-software-architect-review`
292310
- **Code Reviewer**: `developer-kit:nestjs-code-review-expert`
293311

294312
### React Agents (`--lang=react`)
295-
- **Debugger**: `developer-kit:general-debugger`
313+
314+
- **Debugger**: `developer-kit:debugger`
296315
- **Software Architect**: `developer-kit:typescript-software-architect-review`
297-
- **Code Reviewer**: `developer-kit:general-code-reviewer`
316+
- **Code Reviewer**: `developer-kit:code-reviewer`
298317

299318
**Fallback**: If specialized agents are not available, fall back to `general-purpose` agent.
300319

301320
1. **general-debugger** - Analyzes errors, traces execution, finds root cause
302-
2. **general-software-architect** / **java-software-architect-review** / **typescript-software-architect-review** - Designs fix approaches with trade-offs
303-
3. **general-code-reviewer** / **spring-boot-code-review-expert** / **nestjs-code-review-expert** - Reviews fix for quality and regressions
321+
2. **general-software-architect** / **java-software-architect-review** / **typescript-software-architect-review** -
322+
Designs fix approaches with trade-offs
323+
3. **general-code-reviewer** / **spring-boot-code-review-expert** / **nestjs-code-review-expert** - Reviews fix for
324+
quality and regressions
304325

305326
### Usage Pattern
327+
306328
```javascript
307329
// General agents (default)
308330
Task(
309331
description: "Brief task description",
310332
prompt: "Detailed prompt for the sub-agent",
311-
subagent_type: "developer-kit:general-debugger"
333+
subagent_type: "developer-kit:debugger"
312334
)
313335

314336
// Java/Spring Boot agents (when --lang=spring or --lang=java)
@@ -341,6 +363,7 @@ Task(
341363
```
342364

343365
### Important Notes
366+
344367
- Sub-agents are automatically discovered from `/Users/giuseppe/project/GT/developer-kit/agents/`
345368
- Each sub-agent operates with its own context window
346369
- Multiple sub-agents can be launched in parallel for different perspectives
@@ -370,11 +393,13 @@ Update the status as you progress through each phase.
370393
For simple issues, you can skip some phases:
371394

372395
**When to use quick mode**:
396+
373397
- Error message clearly points to the issue
374398
- Recent, obvious change caused the bug
375399
- Simple typo or configuration error
376400

377401
**Quick mode flow**:
402+
378403
1. Phase 1: Problem Capture (simplified)
379404
2. Phase 3: Root Cause Analysis (focused)
380405
3. Phase 5: Implementation
@@ -385,4 +410,5 @@ Tell the user: "This appears to be a straightforward issue. Would you like to pr
385410

386411
---
387412

388-
**Note**: This command follows a systematic debugging approach to ensure bugs are fixed correctly the first time, with minimal risk of regression.
413+
**Note**: This command follows a systematic debugging approach to ensure bugs are fixed correctly the first time, with
414+
minimal risk of regression.

0 commit comments

Comments
 (0)