investigate
Investigate
Establish causal evidence before fixing a bug. For diagnosis-only requests, report the cause and correction without editing source.
Start with the symptom
Read the error, failing test, issue or observed behavior. Establish expected versus actual behavior and reproduce the failure in the relevant environment. Inspect the implicated code, callers and data. Reuse a supplied verified root cause rather than repeating discovery.
Use quick mode for a direct, verifiable cause. If its first hypothesis fails, broaden the investigation. For performance, environment or regression problems read only the corresponding section of specialized.md.
Investigate
Keep a concise evidence log: observation, hypothesis, disconfirming check, result and next action. For an obvious bug this can be a few notes; for a long investigation save it in a temporary artifact. Avoid repeatedly rereading whole logs.
Follow data through the failure boundary. Check partial updates, stale state, permissions, encoding, time/locale, dependencies, concurrency and external contracts only as implicated by the evidence. Verify installed APIs before assuming a framework behavior. Use sanitized generic errors and primary sources for outside research; do not upload private logs or customer data.
Test a specific causal hypothesis with a reproduction, assertion, trace or controlled experiment. Seek evidence that could disprove it. Several failed hypotheses are a reason to reassess the model and evidence, not proof that the architecture is wrong. Continue useful checks; ask when unavailable information or a material scope decision blocks progress.