Triage a bug or issue by exploring the codebase to find root cause, then create an issue with a TDD-based fix plan. Use when user reports a bug, wants to file an issue, mentions "triage", or wants to investigate and plan a fix for a problem.
Investigate a reported problem, find its root cause, and create an issue with a TDD fix plan. This is a mostly hands-off workflow - minimize questions to the user.
Get a brief description of the issue from the user. If they haven't provided one, ask ONE question: "What's the problem you're seeing?"
Do NOT ask follow-up questions yet. Start investigating immediately.
Use the Agent tool with subagent_type=Explore to deeply investigate the codebase. Your goal is to find:
Look at:
git logBased on your investigation, determine:
Create a concrete, ordered list of RED-GREEN cycles. Each cycle is one vertical slice:
Rules:
Save the issue to the user's chosen destination. See DESTINATIONS.md for options. Do NOT ask the user to review before creating - just create it.
A clear description of the bug or issue, including:
Describe what you found during investigation:
Do NOT include specific file paths, line numbers, or implementation details that couple to current code layout. Describe modules, behaviors, and contracts instead. The issue should remain useful even after major refactors.
A numbered list of RED-GREEN cycles:
RED: Write a test that [describes expected behavior] GREEN: [Minimal change to make it pass]
RED: Write a test that [describes next behavior] GREEN: [Minimal change to make it pass]
...
REFACTOR: [Any cleanup needed after all tests pass]
After creating the issue, print the issue URL or file path and a one-line summary of the root cause.