--- name: log-debug description: Analyze logs, stack traces, and error output to diagnose issues. Use when asked to "debug logs", "analyze stack trace", or "why is this error happening". --- # Log Debug ## Goals - Extract the most likely root cause from logs. - Link evidence to hypotheses. - Provide concrete next steps to confirm and fix. ## Workflow 1. Parse signal: error type, first failure, and context lines. 2. Identify scope: service/module, request id, time window. 3. Form hypotheses and rank by likelihood. 4. Suggest targeted checks or repro steps. 5. Propose a fix direction and validation step. ## Output Format - **Likely cause**: 1–2 sentences. - **Evidence**: quoted log lines or stack frames. - **Next steps**: numbered list of checks. - **Fix direction**: brief recommendation.