SKILL.md--- name: post-mortem description: Write the canonical engineering record of a fixed bug — root cause, mechanism, fix, validation, and how it slipped through. Engineer-audience, code identifiers welcome. Use after a debug session lands a fix, before closing the ticket. Trigger on /post-mortem, when the user says "write the post-mortem / postmortem / RCA / root cause analysis", "document this fix", "write up the root cause", "close out this bug with a writeup", or hands you a fixed-and-validated bug and asks for the writeup. --- # Post-mortem The canonical engineering record of a bug fix. Written **after** debugging lands a real fix, **for** other engineers (and future-you, who will have forgotten everything in 6 months). Code identifiers are welcome here — this is the artifact that lets the next person recover the mental model fast. For the up-the-org version of this same content, hand the finished post-mortem to [`management-talk`](../../productivity/management-talk/SKILL.md). They compose: post-mortem owns the engineering truth, management-talk reframes it for leadership. ## When to invoke - "/post-mortem" - "write the post-mortem / postmortem / RCA / root-cause analysis" - "document this fix" / "write up the root cause" / "close out this bug with a writeup" - After a debug session has clearly landed a fix, proactively offer to draft one. ## When NOT to use - **Bug not fixed yet, or fix not validated.** A post-mortem of a hypothesis is misleading. Refuse and tell the user what's missing. - **Customer-visible outage / incident.** Those need a separate incident report (timeline, blast radius, paging history, comms). This skill is bug-fix scope. Flag and confirm before producing one. - **Trivial fix** (typo, obvious one-liner). The PR description is the record. Don't manufacture ceremony. ## Required inputs — refuse to draft without these Before writing a single line, confirm all four. If any are missing, list what's missing and stop: - [ ] **Reliable repro** exists (not "happens sometimes" — a deterministic or high-rate-flake repro the next person can run). - [ ] **Root cause is known** (the mechanism is identified, not a hypothesis). - [ ] **Fix is identified** (PR / commit / branch pointer). - [ ] **Fix is validated** (the original repro now passes; the customer workload / failing test now succeeds). These map directly to `debug-mantra` steps 1–4. If you came in via `debug-mantra`, the breadcrumb ledger from step 4 is your raw material — pull from it. ## Structure Use these blocks in this order. **Summary, Root cause, Fix, and Validation are mandatory.** The rest are conditional but usually present. ### 1. Summary _(mandatory)_ One paragraph. What broke, in user/workload terms. What fixed it, in one sentence. JIRA key, PR number, owner. A reader who stops here should have the right answer. ### 2. Symptom What was actually observed. Test output, e