Files
msd-core/commands/gsd/debug.md
Lex Christopherson f0b4c7d853 feat: add /gsd:debug for systematic debugging with persistent state
- Creates .planning/debug/[slug].md immediately on command
- Continuous updates: file IS the debugging brain
- Clear section rules: OVERWRITE (Current Focus, Resolution) vs APPEND (Evidence, Eliminated)
- Survives /clear perfectly - resume from any interruption point
- Scientific method: evidence → hypothesis → test → eliminate or confirm
- Includes debugging reference files (mindset, hypothesis testing, investigation techniques)

Closes #53, closes #44

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 11:48:14 -06:00

59 lines
1.7 KiB
Markdown

---
name: gsd:debug
description: Systematic debugging with persistent state across context resets
argument-hint: [issue description]
allowed-tools:
- Read
- Write
- Edit
- Bash
- Grep
- Glob
- AskUserQuestion
---
<objective>
Debug issues using scientific method with a persistent debug document that survives `/clear`.
If resuming (no arguments and active session exists): pick up where you left off.
If starting new: gather symptoms, then investigate autonomously.
</objective>
<execution_context>
@~/.claude/get-shit-done/workflows/debug.md
@~/.claude/get-shit-done/templates/DEBUG.md
</execution_context>
<context>
User's issue: $ARGUMENTS
Check for active debug sessions:
```bash
ls .planning/debug/*.md 2>/dev/null | head -5
```
</context>
<process>
Follow the workflow in @~/.claude/get-shit-done/workflows/debug.md
**Quick reference:**
1. **Check for active sessions** - Offer to resume or start new
2. **Gather symptoms** - What happened? What should happen? Errors? When?
3. **Create DEBUG.md** - Document symptoms in `.planning/debug/[slug].md`
4. **Investigate** - Evidence → Hypothesis → Test → Eliminate or Confirm
5. **Fix and verify** - Minimal fix, verify against original symptoms
6. **Archive** - Move to `.planning/debug/resolved/`
**Key principle:** The DEBUG.md is your memory. Update it constantly. It survives `/clear`.
</process>
<success_criteria>
- [ ] Active sessions checked before starting new
- [ ] Symptoms gathered through AskUserQuestion (not inline questions)
- [ ] DEBUG.md tracks all investigation state
- [ ] Scientific method followed (not random fixes)
- [ ] Root cause confirmed with evidence before fixing
- [ ] Fix verified and session archived
</success_criteria>