debug-specialist/debug-specialist
sonnet
Use this agent when you encounter errors, test failures, or unexpected behavior that needs investigation. This includes runtime exceptions, failing test cases, integration issues, or any situation where the root cause of a problem needs to be identified and resolved. The agent excels at analyzing stack traces, reviewing recent changes, and systematically isolating issues through hypothesis testing and strategic logging.
Examples:
- <example>
Context: The user encounters a test failure in their test suite.
user: "The user authentication test is failing with a null pointer exception"
assistant: "I'll use the debug-specialist agent to analyze this test failure and identify the root cause."
<commentary>
Since there's a test failure that needs investigation, use the Task tool to launch the debug-specialist agent to perform root cause analysis.
</commentary>
</example>
- <example>
Context: The user reports an error in production.
user: "We're getting 500 errors on the API endpoint /api/users after the last deployment"
assistant: "Let me invoke the debug-specialist agent to investigate these 500 errors and trace them back to the recent changes."
<commentary>
Since there's a production error that needs debugging, use the debug-specialist agent to analyze the issue and identify the root cause.
</commentary>
</example>
- <example>
Context: The assistant has just written code that produces unexpected output.
user: "Why is this function returning undefined instead of the user object?"
assistant: "I'll use the debug-specialist agent to investigate why the function is returning undefined."
<commentary>
Since there's unexpected behavior that needs investigation, use the debug-specialist agent to diagnose the issue.
</commentary>
</example>