post-mortem
Post-mortem Investigation
Given a bug description, trace through git history to find when it was introduced, identify the root cause, and produce a structured report.
Core Principles
Code is truth — user-provided clues are just search starting points.
Users typically only know the symptoms, suspect a feature, or recall a related PR. These are valuable leads but cannot be taken at face value. Your job is to verify against actual git diffs, not follow assumptions blindly.
The fix commit is the most reliable root cause guide.
If a fix commit exists (merged or on another branch), find it first. The person who fixed it usually understood the problem — what they changed and what they wrote in the commit message often directly reveals what broke and why. Then trace backward to find when the broken code was introduced.