debugging-patterns
npx machina-cli add skill a5c-ai/babysitter/debugging-patterns --openclawFiles (1)
SKILL.md
1.4 KB
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
- Read ALL available logs, error output, and stack traces
- DO NOT form hypotheses before reading evidence
- Identify the exact error: message, file, line, call stack
- Determine reproduction steps from evidence
- Check git log for recent changes correlating with bug introduction
Pattern-Based Diagnosis
- Check patterns.md for known gotchas matching the error
- Cross-reference with common patterns: null pointer, race condition, resource leak, config error
- Rate root cause confidence (>=80% to proceed with fix)
Evidence Collection
- Stack traces with full call chain
- Error messages with context
- Exit codes from reproduction attempts
- Git blame/log for change correlation
- Environment differences (if applicable)
When to Use
- During DEBUG workflow investigation phase
- When BUILD tests fail unexpectedly
- When reviewing error handling gaps
Agents Used
bug-investigator(primary consumer)silent-failure-hunter(pattern reference)
Source
git clone https://github.com/a5c-ai/babysitter/blob/main/plugins/babysitter/skills/babysit/process/methodologies/cc10x/skills/debugging-patterns/SKILL.mdView on GitHub Overview
Debugging Patterns provides structured frameworks for root cause analysis, prioritizing evidence collection before forming hypotheses. It includes log-first investigation, pattern-based diagnosis, and confidence-scored fixes.
How This Skill Works
It guides you to read all logs and evidence first, identify the exact error (message, file, line, call stack), and derive reproducible steps. It then uses pattern-based diagnosis with known patterns from patterns.md and a confidence threshold (>=80%) before applying a fix.
When to Use It
- During the DEBUG workflow investigation phase
- When BUILD tests fail unexpectedly
- When reviewing error handling gaps
- When correlating bugs with recent code changes using git blame/log
- When using pattern-based diagnosis to match known gotchas in patterns.md
Quick Start
- Step 1: Read ALL available logs, error output, and stack traces
- Step 2: DO NOT form hypotheses before reading evidence; identify the exact error
- Step 3: Check git log for recent changes, consult patterns.md, and rate confidence (>=80%) before proceeding
Best Practices
- Read all logs, error output, and stack traces before forming hypotheses
- Do not form hypotheses before evidence; follow the log-first approach
- Cross-reference errors with patterns.md and known gotchas
- Rate root cause confidence and only proceed with fix if >= 80%
- Collect comprehensive evidence: stack traces, error messages, exit codes, git blame/log, environment differences
Example Use Cases
- Example 1: A null pointer exception in a service is traced with full stack trace and git blame identifies the recent change that introduced it.
- Example 2: A race condition surfaces through interleaved logs and nondeterministic failures, solved by reproducing steps and pattern checks.
- Example 3: A misconfigured deployment causes a config error, uncovered by comparing environment differences.
- Example 4: A resource leak is found by tracking exit codes and long-running processes across multiple reproductions.
- Example 5: A known gotcha is matched via patterns.md, guiding diagnosis and confirming the fix with the reference pattern.
Frequently Asked Questions
Add this skill to your agents