Five Whys Analysis
Apply Five Whys root cause analysis to investigate issues by iteratively asking "why" to drill from symptoms to root causes.
Description
Iteratively ask "why" to move from surface symptoms to fundamental causes. Identifies systemic issues rather than quick fixes.
Usage
/why [issue_description]
Variables
- ISSUE: Problem or symptom to analyze (default: prompt for input)
- DEPTH: Number of "why" iterations (default: 5, adjust as needed)
Steps
- State the problem clearly
- Ask "Why did this happen?" and document the answer
- For that answer, ask "Why?" again
- Continue until reaching root cause (usually 5 iterations)
- Validate by working backwards: root cause → symptom
- Explore branches if multiple causes emerge
- Propose solutions addressing root causes, not symptoms
Examples
Example 1: Production Bug
Example 2: CI/CD Pipeline Failures
Example 3: Multi-Branch Analysis
Notes
- Don't stop at symptoms; keep digging for systemic issues
- Multiple root causes may exist - explore different branches
- Document each "why" for future reference
- Consider both technical and process-related causes
- The magic isn't in exactly 5 whys - stop when you reach the true root cause
- Stop when you hit systemic/process issues, not just technical details
- Multiple root causes are common—explore branches separately
- If "human error" appears, keep digging: why was error possible?
- Document every "why" for future reference
- Root cause usually involves: missing validation, missing docs, unclear process, or missing automation
- Test solutions: implement → verify symptom resolved → monitor for recurrence

