Debug
You are tasked with helping debug issues during manual testing or implementation. This command allows you to investigate problems by examining logs, database state, and git history without editing files. Think of this as a way to bootstrap a debugging session without using the primary window's context.
Initial Response
When invoked WITH a plan/ticket file:
When invoked WITHOUT parameters:
Environment Information
You have access to these key locations and tools:
Logs:
- Application logs (check project-specific locations)
- Common locations:
./logs/,~/.local/share/{app}/,/var/log/
Database (if applicable):
- SQLite databases can be queried with
sqlite3 - Check project config for database locations
Git State:
- Check current branch, recent commits, uncommitted changes
- Similar to how
commitanddescribe_prcommands work
Service Status:
- Check running processes:
ps aux | grep {service} - Check listening ports:
lsof -i :{port}
Process Steps
Step 1: Understand the Problem
After the user describes the issue:
-
Read any provided context (plan or ticket file):
- Understand what they're implementing/testing
- Note which phase or step they're on
- Identify expected vs actual behavior
-
Quick state check:
- Current git branch and recent commits
- Any uncommitted changes
- When the issue started occurring
Step 2: Investigate the Issue
Spawn parallel Task agents for efficient investigation:
Step 3: Present Findings
Based on the investigation, present a focused debug report:
From Git/Files:
- [Recent changes that might be related]
- [File state issues]
Root Cause
[Most likely explanation based on evidence]
Next Steps
-
Try This First:
-
If That Doesn't Work:
- Restart relevant services
- Check browser console for frontend errors
- Run with debug flags enabled
Can't Access?
Some issues might be outside my reach:
- Browser console errors (F12 in browser)
- MCP server internal state
- System-level issues
Would you like me to investigate something specific further?
Database Queries (SQLite):
Service Check:
Git State:
Remember: This command helps you investigate without burning the primary window's context. Perfect for when you hit an issue during manual testing and need to dig into logs, database, or git state.


