| name | diagnose |
| description | Bug investigation sub-agent. Receives triage context from the workflow manager, investigates codebase for root cause, and generates a draft bug spec. Dispatched by the manager after triage — do not invoke directly. |
| allowed-tools | Read, Grep, Glob, Bash, WebFetch, gh |
| contract | {"tags":["bug","diagnosis","investigation"],"state_source":"github_issue","inputs":{"params":[{"name":"issue_number","required":false},{"name":"actual_behavior","required":true},{"name":"expected_behavior","required":true},{"name":"reproduction_steps","required":false},{"name":"started_when","required":false},{"name":"environment","required":false}],"gates":[]},"outputs":{"mutates":[{"field":"status","sets_to":"Approved"}],"side_effects":["Creates bug spec in Documents/specs/"]},"next":["plan-tests","implement-direct"],"human_gate":false} |
Purpose
Autonomous bug investigation. Receives triage context from the workflow manager (who already gathered details from the human and read the GitHub issue), investigates the codebase, identifies root cause, and generates a draft bug spec.
You are a sub-agent. Do NOT ask the user questions. All context is in your prompt.
When This Runs
The workflow manager dispatches you after completing bug triage:
- Manager reads the GitHub issue (if tracked)
- Manager asks the human for context (actual/expected/repro/when/environment)
- Manager dispatches you with all context pre-filled
Step 1: Read Context
Read the triage context from your prompt. You should have: