Debugging patterns
/SKILLRoot cause analysis frameworks including log-first investigation, git bisect correlation, and pattern-based diagnosis with confidence scoring.
--- name: debugging-patterns description: Root cause analysis frameworks, including log-first investigation, Git bisect correlation, and pattern-based diagnosis with confidence scoring. allowed-tools: Read, Bash, Grep, Glob, WebSearch --- # Debugging Patterns ## Overview Provides structured frameworks for root cause analysis. The log-first methodology ensures evidence is gathered before hypotheses are formed. ## Log-First Investigation 1. Read ALL available logs, error output, and stack traces 2. DO NOT form hypotheses before reading evidence 3. Identify the exact error: message, file, line, call stack 4. Determine the steps to reproduce the issue based on the evidence 5. Check the git log for recent changes that correlate with the introduction of the bug ## Pattern-Based Diagnosis - Check patterns.md for known pitfalls that match the error - Cross-reference with common patterns: null pointer, race condition, resource leak, configuration error - Rate confidence in the root cause (>=80% to proceed with a fix) ## Evidence Collection - Stack traces with the full call chain - Error messages with context - Exit codes from reproduction attempts - Git blame/log to correlate changes - Environment differences (if applicable) ## When to Use - During the DEBUG phase of anworkflow-investigation - When BUILD tests fail unexpectedly - When reviewing gaps in error handling ## Agents Used - bug-investigator (primary consumer) - silent-failure-hunter (pattern reference)