From 5687c11a395cd41ebf8741dc8f17d128812ba4b6 Mon Sep 17 00:00:00 2001 From: wu Date: Tue, 13 Jan 2026 11:17:26 +0800 Subject: [PATCH 1/6] Add postmortems skill for incident analysis and learning - Add comprehensive postmortem guide based on Atlassian practices - Include blameless postmortem principles and techniques - Provide structured template for postmortem reports - Cover root cause analysis methods (5 Whys, causal chain) - Include action item categorization and best practices --- skills/postmortems/LICENSE.txt | 202 ++++++++++++ skills/postmortems/SKILL.md | 295 ++++++++++++++++++ .../templates/postmortem_template.md | 279 +++++++++++++++++ 3 files changed, 776 insertions(+) create mode 100644 skills/postmortems/LICENSE.txt create mode 100644 skills/postmortems/SKILL.md create mode 100644 skills/postmortems/templates/postmortem_template.md diff --git a/skills/postmortems/LICENSE.txt b/skills/postmortems/LICENSE.txt new file mode 100644 index 00000000..4dae6811 --- /dev/null +++ b/skills/postmortems/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted under this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing + the origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on your own behalf and on your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/skills/postmortems/SKILL.md b/skills/postmortems/SKILL.md new file mode 100644 index 00000000..e5417d92 --- /dev/null +++ b/skills/postmortems/SKILL.md @@ -0,0 +1,295 @@ +--- +name: postmortems +description: Guide for creating comprehensive, blameless incident postmortems that help teams learn from incidents, identify root causes, and prevent future occurrences. Use when conducting post-incident reviews, writing postmortem reports, or analyzing incidents to improve system reliability. +license: Complete terms in LICENSE.txt +--- + +# Incident Postmortems + +A comprehensive guide for creating effective, blameless postmortems that help teams learn from incidents and improve system reliability. + +## When to use this skill + +Use this skill when: +- Conducting post-incident reviews after system outages or incidents +- Writing postmortem reports for incidents with severity level 2 or higher +- Analyzing incidents to identify root causes and preventive measures +- Creating action items to mitigate and prevent future incidents +- Documenting incident timelines and impact +- Facilitating blameless postmortem meetings + +## Overview + +A postmortem is a written record of an incident that describes: +- The incident's impact +- The actions taken to mitigate or resolve the incident +- The incident's root cause +- Follow-up actions to prevent the incident from recurring + +Postmortems should be **blameless** - focusing on systems, processes, and roles rather than individuals. This creates a culture of learning and continuous improvement. + +## Postmortem Process + +### 1. Determine When to Write a Postmortem + +**Trigger thresholds:** +- Any incident with severity level 1 or 2 (critical or high) +- Incidents that caused significant user impact +- Incidents that exposed systemic issues +- Incidents that required escalation or major remediation efforts + +**Timeline:** +- Schedule postmortem meeting within 24-48 hours of incident resolution +- Complete postmortem report within 5 business days of the meeting + +### 2. Assemble the Postmortem Team + +**Key participants:** +- Incident commander/responder +- On-call engineer(s) involved +- Service owners +- Subject matter experts relevant to the incident +- Anyone who made key decisions during the incident + +**Roles:** +- **Postmortem Lead**: Facilitates the meeting and writes the report +- **Timeline Scribe**: Documents the chronological sequence of events +- **Action Item Owner**: Tracks and assigns follow-up actions + +### 3. Conduct the Postmortem Meeting + +**Meeting structure:** + +1. **Opening (5 minutes)** + - State that this is a blameless postmortem + - Explain why blameless postmortems are important + - Set ground rules: focus on systems and processes, not individuals + +2. **Timeline Construction (20-30 minutes)** + - Build a chronological timeline of events + - Include: first alert, detection, communication, mitigation attempts, resolution + - Use role-based language (e.g., "the on-call engineer") not names + - Document all key decisions and actions + +3. **Impact Assessment (10 minutes)** + - Quantify user impact (affected users, duration, error rates) + - Document business impact (revenue, SLA breaches, customer complaints) + - Record technical metrics (downtime, error rates, performance degradation) + +4. **Root Cause Analysis (20-30 minutes)** + - Use "5 Whys" technique to dig deeper + - Identify contributing factors, not just the immediate cause + - Consider: system design, process gaps, monitoring gaps, human factors + - Frame in terms of systems and processes, not individual actions + +5. **Action Items (20-30 minutes)** + - Generate actionable, specific, bounded action items + - Categorize by: investigate, mitigate, repair, detect, mitigate future, prevent + - Assign owners and deadlines + - Prioritize actions that address root causes + +6. **Closing (5 minutes)** + - Summarize key learnings + - Confirm action item assignments + - Schedule follow-up review if needed + +### 4. Write the Postmortem Report + +**Report structure:** + +Use the template in `templates/postmortem_template.md` as a starting point. The report should include: + +1. **Executive Summary** + - Brief overview of the incident + - Impact summary + - Root cause summary + - Key actions + +2. **Incident Details** + - Incident ID and title + - Date and duration + - Severity level + - Affected services/systems + +3. **Impact** + - User impact (quantified) + - Business impact + - Technical metrics + +4. **Timeline** + - Chronological sequence of events + - Key decisions and actions + - Communication milestones + +5. **Root Cause Analysis** + - Immediate cause + - Contributing factors + - Root cause(s) + - Why existing safeguards didn't prevent it + +6. **Resolution** + - How the incident was resolved + - Immediate mitigation steps taken + - Long-term fixes applied + +7. **Action Items** + - Categorized by type (investigate, mitigate, repair, detect, mitigate future, prevent) + - Each action should be: + - **Actionable**: Phrase as a sentence starting with a verb + - **Specific**: Define scope narrowly + - **Bounded**: Indicate how to tell when it's finished + - Include owner, priority, and deadline + +8. **Lessons Learned** + - What went well + - What could be improved + - Systemic improvements needed + +9. **Appendices** + - Relevant logs, graphs, or screenshots + - Links to related incidents or documentation + +## Blameless Postmortem Principles + +**Core principles:** +- Assume good intentions on the part of all staff +- Never blame people for faults +- Focus on systems, processes, and roles, not individuals +- Ask "why did the system allow this" not "why did this person do this" + +**Techniques for creating personal safety:** +- Open meetings by stating this is a blameless postmortem and why +- Refer to individuals by role (e.g., "the on-call engineer") not name +- Frame timeline, causal chain, and mitigations in context of systems and processes +- Use "second stories" - alternative explanations that focus on systemic factors + +**Example reframing:** +- ❌ "John deployed the buggy code" +- ✅ "The deployment process allowed code without sufficient tests to reach production" + +## Action Item Categories + +When creating action items, work through these categories to ensure comprehensive coverage: + +| Category | Question to Ask | Examples | +|----------|----------------|----------| +| **Investigate this incident** | "What happened to cause this incident and why?" | Logs analysis, diagramming request path, reviewing heap dumps | +| **Mitigate this incident** | "What immediate actions did we take to resolve this specific event?" | Rolling back, cherry-picking, pushing configs, communicating with users | +| **Repair damage from this incident** | "How did we resolve immediate or collateral damage?" | Restoring data, fixing machines, removing traffic re-routes | +| **Detect future incidents** | "How can we decrease time to accurately detect similar failures?" | Monitoring, alerting, plausibility checks on input/output | +| **Mitigate future incidents** | "How can we decrease severity/duration of future incidents like this?" | Graceful degradation, dropping non-critical results, failing open, dashboards, playbooks | +| **Prevent future incidents** | "How can we prevent a recurrence of this sort of failure?" | Stability improvements, thorough unit tests, input validation, provisioning changes | + +**Action item wording guidelines:** + +| From (Poor) | To (Good) | Why | +|------------|-----------|-----| +| Investigate monitoring for this scenario | Add alerting for all cases where this service returns >1% errors | Actionable: specific verb and outcome | +| Fix the issue that caused the outage | Handle invalid postal code in user address form input safely | Specific: narrow scope defined | +| Make sure engineer checks database schema | Add automated pre-submit check for schema changes | Bounded: clear completion criteria | + +## Root Cause Analysis Techniques + +### 5 Whys + +Ask "why" five times to dig deeper into root causes: + +1. Why did the service fail? → Database connection timeout +2. Why did the connection timeout? → Connection pool exhausted +3. Why was the pool exhausted? → Long-running queries blocking connections +4. Why were there long-running queries? → Missing index on frequently queried column +5. Why was the index missing? → Database migration script didn't include index creation + +### Causal Chain + +Build a chain of causation from the immediate symptom to the root cause: + +``` +Symptom → Immediate Cause → Contributing Factor → Root Cause +``` + +### Systems Thinking + +Consider multiple layers: +- **Technical**: Code, infrastructure, configuration +- **Process**: Deployment, monitoring, on-call procedures +- **Organizational**: Training, documentation, communication + +## Third-Party Dependencies + +When incidents involve third-party services, use this framework: + +1. **Did the 3rd party violate our expectations?** + - Review and agree with their RCA + - Or adjust our expectations and increase resilience + - Or find alternative solutions if expectations are unacceptable + +2. **Did the 3rd party meet expectations, but our service failed anyway?** + - Our service needs to increase resilience + +3. **Do we not have clear expectations?** + - Establish expectations with the 3rd party + - Share expectations with teams so they can build appropriate resilience + +## Postmortem Approval + +**Approval process:** +- Postmortems should be reviewed and approved by service owners or managers +- Approval indicates: + - Agreement with findings, including root cause + - Agreement that action items adequately address the root cause +- Approvers may request additional actions or identify gaps + +**Approval workflow:** +1. Postmortem lead completes draft +2. Share with participants for review +3. Submit to approver(s) +4. Address feedback and revise +5. Final approval and publication + +## Postmortem Metrics + +Track these metrics to measure postmortem effectiveness: + +- **Time to postmortem**: Time from incident resolution to postmortem meeting +- **Time to report**: Time from meeting to completed report +- **Action item completion rate**: Percentage of action items completed on time +- **Incident recurrence rate**: Frequency of similar incidents +- **Postmortem quality score**: Subjective assessment of report completeness and usefulness + +## Best Practices + +### Do's + +✅ **Do** schedule postmortems quickly (24-48 hours) +✅ **Do** include diverse perspectives (not just engineers) +✅ **Do** focus on systems and processes +✅ **Do** create specific, actionable, bounded action items +✅ **Do** follow up on action items +✅ **Do** share postmortems widely for learning +✅ **Do** use templates for consistency +✅ **Do** quantify impact with metrics +✅ **Do** document what went well, not just what went wrong + +### Don'ts + +❌ **Don't** blame individuals +❌ **Don't** skip postmortems for "small" incidents +❌ **Don't** create vague action items +❌ **Don't** let action items languish without follow-up +❌ **Don't** make postmortems private by default +❌ **Don't** focus only on technical causes +❌ **Don't** rush through root cause analysis +❌ **Don't** create postmortems that are too long or too short + +## Templates + +Use the template in `templates/postmortem_template.md` when writing postmortems. The template includes: +- All required sections +- Example content for each section +- Guidance on what to include +- Formatting guidelines + +## Keywords + +postmortem, post-mortem, incident review, post-incident review, blameless postmortem, root cause analysis, incident analysis, outage analysis, incident report, 5 whys, action items, incident response, reliability, SRE diff --git a/skills/postmortems/templates/postmortem_template.md b/skills/postmortems/templates/postmortem_template.md new file mode 100644 index 00000000..a41c0873 --- /dev/null +++ b/skills/postmortems/templates/postmortem_template.md @@ -0,0 +1,279 @@ +# Postmortem: [Incident Title] + +**Incident ID:** [INC-YYYY-MMDD-NNN] +**Date:** [YYYY-MM-DD] +**Duration:** [X hours Y minutes] +**Severity:** [Level 1/2/3/4] +**Status:** [Resolved/Resolved with follow-up] + +--- + +## Executive Summary + +[2-3 sentence overview of the incident, impact, root cause, and key actions] + +**Impact:** [Brief impact statement] + +**Root Cause:** [Brief root cause statement] + +**Key Actions:** [Top 2-3 most important action items] + +--- + +## Incident Details + +### Basic Information + +- **Incident ID:** [INC-YYYY-MMDD-NNN] +- **Title:** [Descriptive title] +- **Date:** [YYYY-MM-DD] +- **Start Time:** [HH:MM UTC] +- **End Time:** [HH:MM UTC] +- **Duration:** [X hours Y minutes] +- **Severity Level:** [1/2/3/4] +- **Affected Services:** [List services/systems] +- **Postmortem Lead:** [Name/Role] +- **Postmortem Date:** [YYYY-MM-DD] + +### Severity Level + +[ ] **Level 1 - Critical**: Complete service outage or severe degradation affecting all users +[ ] **Level 2 - High**: Significant service degradation affecting large portion of users +[ ] **Level 3 - Medium**: Moderate impact affecting subset of users or features +[ ] **Level 4 - Low**: Minor impact with workaround available + +--- + +## Impact + +### User Impact + +- **Affected Users:** [Number or percentage] +- **User-Facing Symptoms:** [What users experienced] +- **Geographic Impact:** [If applicable] +- **Feature Impact:** [Which features were affected] + +### Business Impact + +- **Revenue Impact:** [If applicable] +- **SLA Breaches:** [If applicable] +- **Customer Complaints:** [Number or description] +- **Reputation Impact:** [If applicable] + +### Technical Metrics + +- **Error Rate:** [Percentage or absolute numbers] +- **Latency Increase:** [If applicable] +- **Throughput Reduction:** [If applicable] +- **Data Loss:** [If applicable] +- **Other Metrics:** [Custom metrics relevant to the incident] + +--- + +## Timeline + +[Chronological sequence of events. Use role-based language, not names.] + +| Time (UTC) | Event | Actor | Details | +|------------|-------|-------|---------| +| HH:MM | First alert/detection | [Role, e.g., "On-call engineer"] | [What was detected] | +| HH:MM | Investigation started | [Role] | [Initial investigation steps] | +| HH:MM | Communication sent | [Role] | [Internal/external communication] | +| HH:MM | Mitigation attempt #1 | [Role] | [What was tried] | +| HH:MM | Status update | [Role] | [Update content] | +| HH:MM | Root cause identified | [Role] | [What was found] | +| HH:MM | Fix deployed | [Role] | [Fix description] | +| HH:MM | Incident resolved | [Role] | [Resolution confirmation] | + +### Key Decisions + +1. **[Time]**: [Decision made] - [Rationale] +2. **[Time]**: [Decision made] - [Rationale] +3. **[Time]**: [Decision made] - [Rationale] + +--- + +## Root Cause Analysis + +### Immediate Cause + +[What directly caused the incident to occur] + +### Contributing Factors + +1. **[Factor 1]**: [Description] +2. **[Factor 2]**: [Description] +3. **[Factor 3]**: [Description] + +### Root Cause(s) + +[The underlying system, process, or design issue that allowed the incident to occur] + +**Why existing safeguards didn't prevent it:** + +[Explanation of why monitoring, testing, processes, or other safeguards failed to prevent or catch this issue] + +### Causal Chain + +``` +[Immediate Symptom] + ↓ +[Immediate Cause] + ↓ +[Contributing Factor] + ↓ +[Root Cause] +``` + +### 5 Whys Analysis + +1. **Why did [symptom] occur?** + → [Answer] + +2. **Why did [answer 1] happen?** + → [Answer] + +3. **Why did [answer 2] happen?** + → [Answer] + +4. **Why did [answer 3] happen?** + → [Answer] + +5. **Why did [answer 4] happen?** + → [Root cause] + +--- + +## Resolution + +### How the Incident Was Resolved + +[Step-by-step description of how the incident was resolved] + +### Immediate Mitigation Steps + +1. **[Action]**: [Description] +2. **[Action]**: [Description] +3. **[Action]**: [Description] + +### Long-Term Fixes Applied + +1. **[Fix]**: [Description] +2. **[Fix]**: [Description] + +--- + +## Action Items + +[Each action item should be: Actionable (verb + outcome), Specific (narrow scope), Bounded (clear completion criteria)] + +### Investigate This Incident + +| ID | Action | Owner | Priority | Deadline | Status | +|----|--------|-------|----------|----------|--------| +| AI-1 | [Actionable, specific, bounded action] | [Name] | [High/Medium/Low] | [Date] | [Open/In Progress/Done] | + +### Mitigate This Incident + +| ID | Action | Owner | Priority | Deadline | Status | +|----|--------|-------|----------|----------|--------| +| AI-2 | [Actionable, specific, bounded action] | [Name] | [High/Medium/Low] | [Date] | [Open/In Progress/Done] | + +### Repair Damage from This Incident + +| ID | Action | Owner | Priority | Deadline | Status | +|----|--------|-------|----------|----------|--------| +| AI-3 | [Actionable, specific, bounded action] | [Name] | [High/Medium/Low] | [Date] | [Open/In Progress/Done] | + +### Detect Future Incidents + +| ID | Action | Owner | Priority | Deadline | Status | +|----|--------|-------|----------|----------|--------| +| AI-4 | [Actionable, specific, bounded action] | [Name] | [High/Medium/Low] | [Date] | [Open/In Progress/Done] | + +### Mitigate Future Incidents + +| ID | Action | Owner | Priority | Deadline | Status | +|----|--------|-------|----------|----------|--------| +| AI-5 | [Actionable, specific, bounded action] | [Name] | [High/Medium/Low] | [Date] | [Open/In Progress/Done] | + +### Prevent Future Incidents + +| ID | Action | Owner | Priority | Deadline | Status | +|----|--------|-------|----------|--------|--------| +| AI-6 | [Actionable, specific, bounded action] | [Name] | [High/Medium/Low] | [Date] | [Open/In Progress/Done] | + +**Priority Actions:** [List the 2-3 most critical action items that address the root cause] + +--- + +## Lessons Learned + +### What Went Well + +1. **[Positive aspect]**: [Description] +2. **[Positive aspect]**: [Description] +3. **[Positive aspect]**: [Description] + +### What Could Be Improved + +1. **[Area for improvement]**: [Description] +2. **[Area for improvement]**: [Description] +3. **[Area for improvement]**: [Description] + +### Systemic Improvements Needed + +1. **[Systemic change]**: [Description] +2. **[Systemic change]**: [Description] + +--- + +## Related Incidents + +- [Link to related incident #1] +- [Link to related incident #2] + +--- + +## Appendices + +### A. Relevant Logs + +[Links to or excerpts from relevant logs] + +### B. Graphs and Metrics + +[Links to dashboards, graphs, or screenshots showing the incident] + +### C. Configuration Changes + +[If applicable, document configuration changes made during or after the incident] + +### D. References + +- [Link to monitoring dashboard] +- [Link to runbook used] +- [Link to related documentation] +- [Link to code changes] + +--- + +## Approval + +**Postmortem Lead:** [Name] - [Date] + +**Service Owner:** [Name] - [Date] + +**Approver:** [Name] - [Date] + +--- + +## Follow-Up + +**Next Review Date:** [Date] + +**Action Item Review:** [Date] + +--- + +*This postmortem follows blameless postmortem principles. We focus on systems, processes, and roles rather than individuals to create a culture of learning and continuous improvement.* From 943156bdc661aad488cccc193c2ffd8c4d15a9bb Mon Sep 17 00:00:00 2001 From: wu Date: Tue, 13 Jan 2026 13:50:43 +0800 Subject: [PATCH 2/6] Refine postmortems skill for AI usage - Adjust timeline requirements to reference team practices rather than hard requirements - Change meeting facilitation to analysis and documentation focus - Update team assembly to information gathering - Refine approval section to focus on creating review-ready reports - Make best practices more AI-appropriate --- skills/postmortems/SKILL.md | 94 ++++++++++++++++++++----------------- 1 file changed, 50 insertions(+), 44 deletions(-) diff --git a/skills/postmortems/SKILL.md b/skills/postmortems/SKILL.md index e5417d92..7c37c3ba 100644 --- a/skills/postmortems/SKILL.md +++ b/skills/postmortems/SKILL.md @@ -38,60 +38,64 @@ Postmortems should be **blameless** - focusing on systems, processes, and roles - Incidents that exposed systemic issues - Incidents that required escalation or major remediation efforts -**Timeline:** -- Schedule postmortem meeting within 24-48 hours of incident resolution -- Complete postmortem report within 5 business days of the meeting +**Timeline (team practice reference):** +- Teams typically schedule postmortem meetings within 24-48 hours of incident resolution +- Postmortem reports are usually completed within 5 business days of the meeting +- When assisting with postmortems, help create reports promptly while details are fresh -### 2. Assemble the Postmortem Team +### 2. Gather Postmortem Information -**Key participants:** -- Incident commander/responder +When helping with a postmortem, ensure you have information from: + +**Key sources:** +- Incident commander/responder notes - On-call engineer(s) involved - Service owners - Subject matter experts relevant to the incident - Anyone who made key decisions during the incident -**Roles:** -- **Postmortem Lead**: Facilitates the meeting and writes the report -- **Timeline Scribe**: Documents the chronological sequence of events -- **Action Item Owner**: Tracks and assigns follow-up actions +**Information to collect:** +- Chronological sequence of events +- Decisions made and actions taken +- Impact metrics and measurements +- System logs, monitoring data, or error reports +- Communication records (internal and external) -### 3. Conduct the Postmortem Meeting +**Note:** If you're helping organize a postmortem, teams typically involve these roles, but as an AI assistant, focus on synthesizing and documenting the information provided rather than coordinating team participation. -**Meeting structure:** +### 3. Postmortem Analysis and Documentation -1. **Opening (5 minutes)** - - State that this is a blameless postmortem - - Explain why blameless postmortems are important - - Set ground rules: focus on systems and processes, not individuals +When helping with postmortems, structure your analysis around these key areas: -2. **Timeline Construction (20-30 minutes)** - - Build a chronological timeline of events +1. **Timeline Construction** + - Build a chronological timeline of events from available information - Include: first alert, detection, communication, mitigation attempts, resolution - Use role-based language (e.g., "the on-call engineer") not names - - Document all key decisions and actions + - Document all key decisions and actions mentioned -3. **Impact Assessment (10 minutes)** - - Quantify user impact (affected users, duration, error rates) - - Document business impact (revenue, SLA breaches, customer complaints) +2. **Impact Assessment** + - Quantify user impact (affected users, duration, error rates) from provided data + - Document business impact (revenue, SLA breaches, customer complaints) if available - Record technical metrics (downtime, error rates, performance degradation) -4. **Root Cause Analysis (20-30 minutes)** - - Use "5 Whys" technique to dig deeper +3. **Root Cause Analysis** + - Use "5 Whys" technique to dig deeper into causes - Identify contributing factors, not just the immediate cause - Consider: system design, process gaps, monitoring gaps, human factors - Frame in terms of systems and processes, not individual actions -5. **Action Items (20-30 minutes)** +4. **Action Items Generation** - Generate actionable, specific, bounded action items - Categorize by: investigate, mitigate, repair, detect, mitigate future, prevent - - Assign owners and deadlines + - Suggest owners and deadlines based on context - Prioritize actions that address root causes -6. **Closing (5 minutes)** - - Summarize key learnings - - Confirm action item assignments - - Schedule follow-up review if needed +5. **Summary and Learnings** + - Summarize key learnings from the incident + - Highlight what went well and what could be improved + - Identify systemic improvements needed + +**Note:** If you're helping facilitate an actual postmortem meeting, teams typically follow a structured agenda with time allocations, but as an AI assistant, focus on helping document and analyze the information provided rather than managing meeting logistics. ### 4. Write the Postmortem Report @@ -231,22 +235,24 @@ When incidents involve third-party services, use this framework: - Establish expectations with the 3rd party - Share expectations with teams so they can build appropriate resilience -## Postmortem Approval +## Postmortem Review and Approval -**Approval process:** -- Postmortems should be reviewed and approved by service owners or managers -- Approval indicates: - - Agreement with findings, including root cause - - Agreement that action items adequately address the root cause -- Approvers may request additional actions or identify gaps +**Review considerations:** +- When helping create postmortems, ensure the report is ready for review by service owners or managers +- A complete postmortem should demonstrate: + - Clear agreement on findings, including root cause + - Action items that adequately address the root cause +- Be prepared to revise based on feedback from approvers who may request additional actions or identify gaps -**Approval workflow:** -1. Postmortem lead completes draft +**Typical review workflow (for reference):** +1. Complete postmortem draft 2. Share with participants for review -3. Submit to approver(s) -4. Address feedback and revise +3. Submit to approver(s) for approval +4. Address feedback and revise as needed 5. Final approval and publication +**Note:** Approval processes vary by organization. When assisting, focus on creating comprehensive, well-structured postmortems that facilitate review and approval rather than managing the approval workflow itself. + ## Postmortem Metrics Track these metrics to measure postmortem effectiveness: @@ -261,11 +267,11 @@ Track these metrics to measure postmortem effectiveness: ### Do's -✅ **Do** schedule postmortems quickly (24-48 hours) -✅ **Do** include diverse perspectives (not just engineers) +✅ **Do** help create postmortems promptly while details are fresh (teams typically aim for 24-48 hours after resolution) +✅ **Do** incorporate diverse perspectives when information is available (not just engineering views) ✅ **Do** focus on systems and processes ✅ **Do** create specific, actionable, bounded action items -✅ **Do** follow up on action items +✅ **Do** help track and document action items (follow-up is typically handled by teams) ✅ **Do** share postmortems widely for learning ✅ **Do** use templates for consistency ✅ **Do** quantify impact with metrics From 97eae3a7d3651e667614aa571c452bf9a7789646 Mon Sep 17 00:00:00 2001 From: wu Date: Tue, 13 Jan 2026 13:54:06 +0800 Subject: [PATCH 3/6] Refactor postmortems skill for human-AI collaboration Complete restructure from human-to-human workflow to human-AI collaboration: - Add 'How This Skill Works' section explaining AI-human roles - Transform workflow from meeting facilitation to interactive collaboration - Each step now clearly defines what AI does vs what user provides - Add interactive workflow examples - Remove meeting logistics, approval workflows, and time-based requirements - Focus on AI helping with analysis, synthesis, and report generation - Emphasize incremental information gathering and iterative refinement --- skills/postmortems/SKILL.md | 381 +++++++++++++++++++----------------- 1 file changed, 203 insertions(+), 178 deletions(-) diff --git a/skills/postmortems/SKILL.md b/skills/postmortems/SKILL.md index 7c37c3ba..0a8cc7ca 100644 --- a/skills/postmortems/SKILL.md +++ b/skills/postmortems/SKILL.md @@ -6,7 +6,7 @@ license: Complete terms in LICENSE.txt # Incident Postmortems -A comprehensive guide for creating effective, blameless postmortems that help teams learn from incidents and improve system reliability. +A comprehensive guide for creating effective, blameless postmortems through human-AI collaboration. This skill helps you analyze incidents, identify root causes, and generate actionable postmortem reports. ## When to use this skill @@ -16,7 +16,7 @@ Use this skill when: - Analyzing incidents to identify root causes and preventive measures - Creating action items to mitigate and prevent future incidents - Documenting incident timelines and impact -- Facilitating blameless postmortem meetings +- Synthesizing information from multiple sources into a structured postmortem ## Overview @@ -28,274 +28,299 @@ A postmortem is a written record of an incident that describes: Postmortems should be **blameless** - focusing on systems, processes, and roles rather than individuals. This creates a culture of learning and continuous improvement. -## Postmortem Process +## How This Skill Works: Human-AI Collaboration -### 1. Determine When to Write a Postmortem +This skill enables a collaborative workflow where: +- **You provide**: Incident information, context, data, and decisions +- **AI helps**: Analyze, structure, synthesize, generate insights, and create comprehensive reports -**Trigger thresholds:** +The AI will guide you through gathering information, help you think through root causes, generate well-structured action items, and produce a complete postmortem report. + +## Postmortem Workflow + +### Step 1: Determine If a Postmortem Is Needed + +**When to create a postmortem:** - Any incident with severity level 1 or 2 (critical or high) - Incidents that caused significant user impact - Incidents that exposed systemic issues - Incidents that required escalation or major remediation efforts -**Timeline (team practice reference):** -- Teams typically schedule postmortem meetings within 24-48 hours of incident resolution -- Postmortem reports are usually completed within 5 business days of the meeting -- When assisting with postmortems, help create reports promptly while details are fresh +**What the AI will do:** +- Help you assess if an incident warrants a postmortem +- Suggest appropriate severity levels based on impact +- Identify if systemic issues were exposed -### 2. Gather Postmortem Information +**What you provide:** +- Basic incident information (severity, duration, affected services) -When helping with a postmortem, ensure you have information from: +### Step 2: Gather Incident Information -**Key sources:** -- Incident commander/responder notes -- On-call engineer(s) involved -- Service owners -- Subject matter experts relevant to the incident -- Anyone who made key decisions during the incident +**What you should provide:** -**Information to collect:** -- Chronological sequence of events -- Decisions made and actions taken -- Impact metrics and measurements -- System logs, monitoring data, or error reports -- Communication records (internal and external) +The AI will help you collect and organize information from various sources: -**Note:** If you're helping organize a postmortem, teams typically involve these roles, but as an AI assistant, focus on synthesizing and documenting the information provided rather than coordinating team participation. +**Essential information:** +- Chronological sequence of events (timeline) +- What was detected and when +- Actions taken during the incident +- How the incident was resolved +- Impact metrics (users affected, error rates, downtime) -### 3. Postmortem Analysis and Documentation +**Helpful additional information:** +- System logs, monitoring dashboards, or error reports +- Communication records (internal updates, customer notifications) +- Decisions made during the incident and rationale +- Relevant code changes, configuration changes, or deployments +- Related incidents or similar past incidents -When helping with postmortems, structure your analysis around these key areas: +**What the AI will do:** +- Help you identify what information might be missing +- Organize scattered information into a coherent structure +- Ask clarifying questions to fill gaps +- Synthesize information from multiple sources +- Create a structured timeline from raw data + +**How to provide information:** +- Share information as you have it (logs, screenshots, notes, etc.) +- Describe events in chronological order or as they come to mind +- The AI will help organize and structure it +- You can provide information incrementally - the AI will help piece it together + +### Step 3: Analyze and Structure the Information + +**What the AI will do:** 1. **Timeline Construction** - - Build a chronological timeline of events from available information - - Include: first alert, detection, communication, mitigation attempts, resolution + - Build a chronological timeline from the information you provide + - Identify gaps and ask clarifying questions + - Organize events into: detection → investigation → mitigation attempts → resolution - Use role-based language (e.g., "the on-call engineer") not names - - Document all key decisions and actions mentioned + - Highlight key decisions and turning points 2. **Impact Assessment** - - Quantify user impact (affected users, duration, error rates) from provided data - - Document business impact (revenue, SLA breaches, customer complaints) if available - - Record technical metrics (downtime, error rates, performance degradation) + - Quantify user impact from the metrics you provide + - Calculate business impact if data is available + - Structure technical metrics clearly + - Help identify what metrics might be missing 3. **Root Cause Analysis** - - Use "5 Whys" technique to dig deeper into causes - - Identify contributing factors, not just the immediate cause - - Consider: system design, process gaps, monitoring gaps, human factors - - Frame in terms of systems and processes, not individual actions + - Guide you through "5 Whys" analysis interactively + - Help identify contributing factors beyond the immediate cause + - Consider multiple layers: technical, process, organizational + - Frame causes in terms of systems and processes, not individuals + - Suggest alternative explanations and "second stories" 4. **Action Items Generation** - Generate actionable, specific, bounded action items - Categorize by: investigate, mitigate, repair, detect, mitigate future, prevent - - Suggest owners and deadlines based on context - - Prioritize actions that address root causes + - Help prioritize actions that address root causes + - Suggest owners and deadlines based on context (you can adjust) + - Ensure comprehensive coverage across all categories -5. **Summary and Learnings** - - Summarize key learnings from the incident - - Highlight what went well and what could be improved +5. **Lessons Learned** + - Help identify what went well + - Surface what could be improved - Identify systemic improvements needed -**Note:** If you're helping facilitate an actual postmortem meeting, teams typically follow a structured agenda with time allocations, but as an AI assistant, focus on helping document and analyze the information provided rather than managing meeting logistics. +**What you do:** +- Provide information and context +- Answer clarifying questions +- Review and refine the AI's analysis +- Validate root cause analysis +- Adjust action items as needed -### 4. Write the Postmortem Report +### Step 4: Generate the Postmortem Report + +**What the AI will do:** +- Use the template in `templates/postmortem_template.md` as a starting point +- Generate a complete, well-structured postmortem report +- Fill in all sections based on the information and analysis +- Ensure consistency and completeness +- Format the report professionally + +**What you do:** +- Review the generated report +- Provide feedback and corrections +- Add any missing information +- Refine language and tone as needed +- Approve the final version **Report structure:** - -Use the template in `templates/postmortem_template.md` as a starting point. The report should include: - -1. **Executive Summary** - - Brief overview of the incident - - Impact summary - - Root cause summary - - Key actions - -2. **Incident Details** - - Incident ID and title - - Date and duration - - Severity level - - Affected services/systems - -3. **Impact** - - User impact (quantified) - - Business impact - - Technical metrics - -4. **Timeline** - - Chronological sequence of events - - Key decisions and actions - - Communication milestones - -5. **Root Cause Analysis** - - Immediate cause - - Contributing factors - - Root cause(s) - - Why existing safeguards didn't prevent it - -6. **Resolution** - - How the incident was resolved - - Immediate mitigation steps taken - - Long-term fixes applied - -7. **Action Items** - - Categorized by type (investigate, mitigate, repair, detect, mitigate future, prevent) - - Each action should be: - - **Actionable**: Phrase as a sentence starting with a verb - - **Specific**: Define scope narrowly - - **Bounded**: Indicate how to tell when it's finished - - Include owner, priority, and deadline - -8. **Lessons Learned** - - What went well - - What could be improved - - Systemic improvements needed - -9. **Appendices** - - Relevant logs, graphs, or screenshots - - Links to related incidents or documentation +1. Executive Summary +2. Incident Details +3. Impact (User, Business, Technical) +4. Timeline +5. Root Cause Analysis +6. Resolution +7. Action Items (categorized) +8. Lessons Learned +9. Appendices ## Blameless Postmortem Principles -**Core principles:** +**Core principles the AI will follow:** - Assume good intentions on the part of all staff - Never blame people for faults - Focus on systems, processes, and roles, not individuals - Ask "why did the system allow this" not "why did this person do this" -**Techniques for creating personal safety:** -- Open meetings by stating this is a blameless postmortem and why -- Refer to individuals by role (e.g., "the on-call engineer") not name +**How the AI applies these:** +- Reframe individual actions in terms of system/process failures +- Use role-based language (e.g., "the on-call engineer") not names - Frame timeline, causal chain, and mitigations in context of systems and processes -- Use "second stories" - alternative explanations that focus on systemic factors +- Suggest "second stories" - alternative explanations that focus on systemic factors -**Example reframing:** +**Example reframing the AI will do:** - ❌ "John deployed the buggy code" - ✅ "The deployment process allowed code without sufficient tests to reach production" -## Action Item Categories - -When creating action items, work through these categories to ensure comprehensive coverage: - -| Category | Question to Ask | Examples | -|----------|----------------|----------| -| **Investigate this incident** | "What happened to cause this incident and why?" | Logs analysis, diagramming request path, reviewing heap dumps | -| **Mitigate this incident** | "What immediate actions did we take to resolve this specific event?" | Rolling back, cherry-picking, pushing configs, communicating with users | -| **Repair damage from this incident** | "How did we resolve immediate or collateral damage?" | Restoring data, fixing machines, removing traffic re-routes | -| **Detect future incidents** | "How can we decrease time to accurately detect similar failures?" | Monitoring, alerting, plausibility checks on input/output | -| **Mitigate future incidents** | "How can we decrease severity/duration of future incidents like this?" | Graceful degradation, dropping non-critical results, failing open, dashboards, playbooks | -| **Prevent future incidents** | "How can we prevent a recurrence of this sort of failure?" | Stability improvements, thorough unit tests, input validation, provisioning changes | - -**Action item wording guidelines:** - -| From (Poor) | To (Good) | Why | -|------------|-----------|-----| -| Investigate monitoring for this scenario | Add alerting for all cases where this service returns >1% errors | Actionable: specific verb and outcome | -| Fix the issue that caused the outage | Handle invalid postal code in user address form input safely | Specific: narrow scope defined | -| Make sure engineer checks database schema | Add automated pre-submit check for schema changes | Bounded: clear completion criteria | +If you provide information that blames individuals, the AI will help reframe it in blameless terms. ## Root Cause Analysis Techniques +The AI will guide you through these techniques: + ### 5 Whys -Ask "why" five times to dig deeper into root causes: +The AI will help you dig deeper by asking "why" iteratively: -1. Why did the service fail? → Database connection timeout -2. Why did the connection timeout? → Connection pool exhausted -3. Why was the pool exhausted? → Long-running queries blocking connections -4. Why were there long-running queries? → Missing index on frequently queried column -5. Why was the index missing? → Database migration script didn't include index creation +**Example interaction:** +- You: "The service failed" +- AI: "Why did the service fail?" +- You: "Database connection timeout" +- AI: "Why did the connection timeout?" +- You: "Connection pool exhausted" +- AI: "Why was the pool exhausted?" +- ... (continues until root cause) ### Causal Chain -Build a chain of causation from the immediate symptom to the root cause: - +The AI will help you build a chain of causation: ``` Symptom → Immediate Cause → Contributing Factor → Root Cause ``` ### Systems Thinking -Consider multiple layers: +The AI will help you consider multiple layers: - **Technical**: Code, infrastructure, configuration - **Process**: Deployment, monitoring, on-call procedures - **Organizational**: Training, documentation, communication +The AI will prompt you to think about each layer and identify gaps. + +## Action Item Categories + +The AI will generate action items across these categories to ensure comprehensive coverage: + +| Category | What the AI Asks | Examples the AI Might Generate | +|----------|-----------------|-------------------------------| +| **Investigate this incident** | "What happened to cause this incident and why?" | "Analyze logs from [timeframe] to identify all error patterns" | +| **Mitigate this incident** | "What immediate actions did we take to resolve this specific event?" | "Roll back deployment v1.2.3 to v1.2.2" | +| **Repair damage from this incident** | "How did we resolve immediate or collateral damage?" | "Restore corrupted user data from backup timestamped [date]" | +| **Detect future incidents** | "How can we decrease time to accurately detect similar failures?" | "Add alerting for all cases where this service returns >1% errors" | +| **Mitigate future incidents** | "How can we decrease severity/duration of future incidents like this?" | "Implement graceful degradation when database connections exceed 80% capacity" | +| **Prevent future incidents** | "How can we prevent a recurrence of this sort of failure?" | "Add automated pre-submit check for schema changes" | + +**Action item quality:** +The AI will ensure each action item is: +- **Actionable**: Phrase as a sentence starting with a verb +- **Specific**: Define scope narrowly +- **Bounded**: Indicate how to tell when it's finished + +**Example improvements the AI will make:** +- ❌ "Investigate monitoring for this scenario" +- ✅ "Add alerting for all cases where this service returns >1% errors" + ## Third-Party Dependencies -When incidents involve third-party services, use this framework: +When incidents involve third-party services, the AI will help you work through this framework: 1. **Did the 3rd party violate our expectations?** - - Review and agree with their RCA - - Or adjust our expectations and increase resilience - - Or find alternative solutions if expectations are unacceptable + - Help review and assess their RCA + - Suggest adjusting expectations and increasing resilience + - Identify alternative solutions if expectations are unacceptable 2. **Did the 3rd party meet expectations, but our service failed anyway?** - - Our service needs to increase resilience + - Help identify where our service needs to increase resilience + - Suggest specific resilience improvements 3. **Do we not have clear expectations?** - - Establish expectations with the 3rd party - - Share expectations with teams so they can build appropriate resilience + - Help establish expectations with the 3rd party + - Suggest how to share expectations with teams -## Postmortem Review and Approval +## Interactive Workflow Examples -**Review considerations:** -- When helping create postmortems, ensure the report is ready for review by service owners or managers -- A complete postmortem should demonstrate: - - Clear agreement on findings, including root cause - - Action items that adequately address the root cause -- Be prepared to revise based on feedback from approvers who may request additional actions or identify gaps +### Example 1: Starting from Scratch -**Typical review workflow (for reference):** -1. Complete postmortem draft -2. Share with participants for review -3. Submit to approver(s) for approval -4. Address feedback and revise as needed -5. Final approval and publication +**You:** "I need to write a postmortem for an incident that happened yesterday. The database went down for 2 hours." -**Note:** Approval processes vary by organization. When assisting, focus on creating comprehensive, well-structured postmortems that facilitate review and approval rather than managing the approval workflow itself. +**AI (using this skill):** +- Asks about severity and impact +- Requests timeline information +- Helps gather details incrementally +- Structures the information as you provide it +- Guides root cause analysis +- Generates action items +- Creates the full report -## Postmortem Metrics +### Example 2: You Have Some Information -Track these metrics to measure postmortem effectiveness: +**You:** "Here's our incident timeline and some logs. Can you help me create a postmortem?" -- **Time to postmortem**: Time from incident resolution to postmortem meeting -- **Time to report**: Time from meeting to completed report -- **Action item completion rate**: Percentage of action items completed on time -- **Incident recurrence rate**: Frequency of similar incidents -- **Postmortem quality score**: Subjective assessment of report completeness and usefulness +**AI (using this skill):** +- Analyzes the provided information +- Identifies gaps and asks clarifying questions +- Helps structure the timeline +- Guides root cause analysis +- Generates comprehensive action items +- Creates the report -## Best Practices +### Example 3: Refining an Existing Draft + +**You:** "I have a rough postmortem draft. Can you help improve it?" + +**AI (using this skill):** +- Reviews the draft +- Identifies missing sections or information +- Suggests improvements to root cause analysis +- Helps refine action items +- Ensures blameless language +- Polishes the final report + +## Best Practices for Using This Skill ### Do's -✅ **Do** help create postmortems promptly while details are fresh (teams typically aim for 24-48 hours after resolution) -✅ **Do** incorporate diverse perspectives when information is available (not just engineering views) -✅ **Do** focus on systems and processes -✅ **Do** create specific, actionable, bounded action items -✅ **Do** help track and document action items (follow-up is typically handled by teams) -✅ **Do** share postmortems widely for learning -✅ **Do** use templates for consistency -✅ **Do** quantify impact with metrics -✅ **Do** document what went well, not just what went wrong +✅ **Do** provide information incrementally - the AI can help organize it as you go +✅ **Do** share raw data (logs, metrics, screenshots) - the AI can help extract insights +✅ **Do** answer clarifying questions - they help the AI create a better analysis +✅ **Do** review and refine the AI's suggestions - your domain knowledge is crucial +✅ **Do** provide context about your systems and processes - it helps the AI generate better action items +✅ **Do** use the template structure - it ensures completeness +✅ **Do** focus on systems and processes in your input - the AI will help maintain blameless language +✅ **Do** quantify impact with metrics when possible - the AI can help structure them ### Don'ts -❌ **Don't** blame individuals -❌ **Don't** skip postmortems for "small" incidents -❌ **Don't** create vague action items -❌ **Don't** let action items languish without follow-up -❌ **Don't** make postmortems private by default -❌ **Don't** focus only on technical causes -❌ **Don't** rush through root cause analysis -❌ **Don't** create postmortems that are too long or too short +❌ **Don't** blame individuals in your input - the AI will help reframe, but it's better to start blameless +❌ **Don't** skip root cause analysis - the AI will guide you through it +❌ **Don't** create vague action items - the AI will help make them specific and actionable +❌ **Don't** focus only on technical causes - the AI will prompt you to consider process and organizational factors +❌ **Don't** rush through the analysis - take time to work through the 5 Whys with the AI +❌ **Don't** skip the "what went well" section - the AI will help identify positive learnings ## Templates -Use the template in `templates/postmortem_template.md` when writing postmortems. The template includes: +The AI will use the template in `templates/postmortem_template.md` when generating reports. The template includes: - All required sections -- Example content for each section +- Example content structure for each section - Guidance on what to include - Formatting guidelines +You can ask the AI to customize the template structure if your organization has specific requirements. + ## Keywords postmortem, post-mortem, incident review, post-incident review, blameless postmortem, root cause analysis, incident analysis, outage analysis, incident report, 5 whys, action items, incident response, reliability, SRE From 1da9ebc2a3656ea531bbb5a959bb54b8333d62b0 Mon Sep 17 00:00:00 2001 From: wu Date: Tue, 13 Jan 2026 14:03:53 +0800 Subject: [PATCH 4/6] Refactor postmortems skill to follow skill-creator best practices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Restructure as 3-stage workflow (Information Gathering → Analysis → Report Generation) - Move detailed content to references/ directory (progressive disclosure) - Reduce SKILL.md from 327 to 229 lines - Use imperative/infinitive form throughout - Add clear stage goals, steps, and exit conditions - Follow doc-coauthoring pattern for structured workflows - Maintain human-AI collaboration focus --- skills/postmortems/SKILL.md | 405 +++++++----------- skills/postmortems/references/action-items.md | 43 ++ .../references/root-cause-analysis.md | 45 ++ 3 files changed, 242 insertions(+), 251 deletions(-) create mode 100644 skills/postmortems/references/action-items.md create mode 100644 skills/postmortems/references/root-cause-analysis.md diff --git a/skills/postmortems/SKILL.md b/skills/postmortems/SKILL.md index 0a8cc7ca..648398a5 100644 --- a/skills/postmortems/SKILL.md +++ b/skills/postmortems/SKILL.md @@ -6,147 +6,148 @@ license: Complete terms in LICENSE.txt # Incident Postmortems -A comprehensive guide for creating effective, blameless postmortems through human-AI collaboration. This skill helps you analyze incidents, identify root causes, and generate actionable postmortem reports. +Guide users through creating effective, blameless postmortems through human-AI collaboration. Act as an active guide, walking users through three stages: Information Gathering, Analysis & Root Cause, and Report Generation. -## When to use this skill +## When to Offer This Workflow -Use this skill when: -- Conducting post-incident reviews after system outages or incidents -- Writing postmortem reports for incidents with severity level 2 or higher -- Analyzing incidents to identify root causes and preventive measures -- Creating action items to mitigate and prevent future incidents -- Documenting incident timelines and impact -- Synthesizing information from multiple sources into a structured postmortem +**Trigger conditions:** +- User mentions writing a postmortem: "write a postmortem", "create an incident report", "analyze this outage" +- User mentions an incident: "we had an outage", "there was an incident yesterday" +- User wants to review an incident: "help me understand what happened", "analyze this incident" -## Overview +**Initial offer:** +Offer the user a structured workflow for creating a postmortem. Explain the three stages: -A postmortem is a written record of an incident that describes: -- The incident's impact -- The actions taken to mitigate or resolve the incident -- The incident's root cause -- Follow-up actions to prevent the incident from recurring +1. **Information Gathering**: User provides incident details, timeline, and impact data while Claude asks clarifying questions +2. **Analysis & Root Cause**: Iteratively analyze the incident, identify root causes, and generate action items +3. **Report Generation**: Create a comprehensive postmortem report using the template -Postmortems should be **blameless** - focusing on systems, processes, and roles rather than individuals. This creates a culture of learning and continuous improvement. +Explain that this approach ensures completeness, blameless analysis, and actionable outcomes. Ask if they want to try this workflow or prefer to work freeform. -## How This Skill Works: Human-AI Collaboration +If user declines, work freeform. If user accepts, proceed to Stage 1. -This skill enables a collaborative workflow where: -- **You provide**: Incident information, context, data, and decisions -- **AI helps**: Analyze, structure, synthesize, generate insights, and create comprehensive reports +## Stage 1: Information Gathering -The AI will guide you through gathering information, help you think through root causes, generate well-structured action items, and produce a complete postmortem report. +**Goal:** Collect all relevant incident information to enable thorough analysis. -## Postmortem Workflow +### Initial Questions -### Step 1: Determine If a Postmortem Is Needed +Start by asking for basic incident information: -**When to create a postmortem:** -- Any incident with severity level 1 or 2 (critical or high) -- Incidents that caused significant user impact -- Incidents that exposed systemic issues -- Incidents that required escalation or major remediation efforts +1. What happened? (Brief description) +2. When did it occur? (Start time, end time, duration) +3. What was the severity level? (If unknown, help assess based on impact) +4. Which services/systems were affected? +5. How was the incident detected? +6. How was it resolved? -**What the AI will do:** -- Help you assess if an incident warrants a postmortem -- Suggest appropriate severity levels based on impact -- Identify if systemic issues were exposed +Inform them they can answer in shorthand or provide information however works best. -**What you provide:** -- Basic incident information (severity, duration, affected services) +### Timeline Construction -### Step 2: Gather Incident Information +Ask for a chronological sequence of events. Encourage them to provide: +- First detection/alert +- Investigation steps +- Mitigation attempts +- Key decisions made +- Resolution steps -**What you should provide:** +**What to do:** +- Organize scattered information into a coherent timeline +- Identify gaps and ask clarifying questions +- Use role-based language (e.g., "the on-call engineer") not names +- Highlight key decisions and turning points -The AI will help you collect and organize information from various sources: +### Impact Assessment -**Essential information:** -- Chronological sequence of events (timeline) -- What was detected and when -- Actions taken during the incident -- How the incident was resolved -- Impact metrics (users affected, error rates, downtime) +Request impact metrics: +- User impact (affected users, error rates, feature degradation) +- Business impact (revenue, SLA breaches, customer complaints) +- Technical metrics (downtime, latency, throughput) -**Helpful additional information:** +**What to do:** +- Quantify impact from provided data +- Structure metrics clearly +- Help identify what metrics might be missing + +### Additional Information + +Ask if they have: - System logs, monitoring dashboards, or error reports - Communication records (internal updates, customer notifications) -- Decisions made during the incident and rationale - Relevant code changes, configuration changes, or deployments - Related incidents or similar past incidents -**What the AI will do:** -- Help you identify what information might be missing -- Organize scattered information into a coherent structure -- Ask clarifying questions to fill gaps -- Synthesize information from multiple sources -- Create a structured timeline from raw data +**If integrations are available** (e.g., monitoring tools, incident management systems), mention these can be used to pull in data directly. -**How to provide information:** -- Share information as you have it (logs, screenshots, notes, etc.) -- Describe events in chronological order or as they come to mind -- The AI will help organize and structure it -- You can provide information incrementally - the AI will help piece it together +**Exit condition:** +Sufficient information when you have a clear timeline, impact metrics, and resolution details. You should be able to understand what happened, when, and the consequences. -### Step 3: Analyze and Structure the Information +**Transition:** +Ask if there's any more information they want to provide, or if it's time to move on to analysis. -**What the AI will do:** +## Stage 2: Analysis & Root Cause -1. **Timeline Construction** - - Build a chronological timeline from the information you provide - - Identify gaps and ask clarifying questions - - Organize events into: detection → investigation → mitigation attempts → resolution - - Use role-based language (e.g., "the on-call engineer") not names - - Highlight key decisions and turning points +**Goal:** Identify root causes, contributing factors, and generate comprehensive action items. -2. **Impact Assessment** - - Quantify user impact from the metrics you provide - - Calculate business impact if data is available - - Structure technical metrics clearly - - Help identify what metrics might be missing +### Root Cause Analysis -3. **Root Cause Analysis** - - Guide you through "5 Whys" analysis interactively - - Help identify contributing factors beyond the immediate cause - - Consider multiple layers: technical, process, organizational - - Frame causes in terms of systems and processes, not individuals - - Suggest alternative explanations and "second stories" +Guide users through root cause analysis using techniques from [references/root-cause-analysis.md](references/root-cause-analysis.md): -4. **Action Items Generation** - - Generate actionable, specific, bounded action items - - Categorize by: investigate, mitigate, repair, detect, mitigate future, prevent - - Help prioritize actions that address root causes - - Suggest owners and deadlines based on context (you can adjust) - - Ensure comprehensive coverage across all categories +1. **5 Whys**: Ask iterative "why" questions to dig deeper +2. **Causal Chain**: Build symptom → immediate cause → contributing factor → root cause +3. **Systems Thinking**: Consider technical, process, and organizational layers -5. **Lessons Learned** - - Help identify what went well - - Surface what could be improved - - Identify systemic improvements needed +**What to do:** +- Guide interactive 5 Whys analysis +- Help identify contributing factors beyond immediate cause +- Frame causes in terms of systems and processes, not individuals +- Suggest alternative explanations and "second stories" -**What you do:** -- Provide information and context -- Answer clarifying questions -- Review and refine the AI's analysis -- Validate root cause analysis -- Adjust action items as needed +**Blameless principles:** +- Always reframe individual actions in terms of system/process failures +- Use role-based language, not names +- Ask "why did the system allow this" not "why did this person do this" -### Step 4: Generate the Postmortem Report +If user provides information that blames individuals, help reframe it in blameless terms. -**What the AI will do:** -- Use the template in `templates/postmortem_template.md` as a starting point -- Generate a complete, well-structured postmortem report -- Fill in all sections based on the information and analysis -- Ensure consistency and completeness -- Format the report professionally +### Action Items Generation -**What you do:** -- Review the generated report -- Provide feedback and corrections -- Add any missing information -- Refine language and tone as needed -- Approve the final version +Generate action items using guidelines from [references/action-items.md](references/action-items.md). + +**What to do:** +- Generate actionable, specific, bounded action items +- Categorize by: investigate, mitigate, repair, detect, mitigate future, prevent +- Ensure comprehensive coverage across all categories +- Suggest owners and deadlines based on context (user can adjust) +- Prioritize actions that address root causes + +**Action item quality:** +- **Actionable**: Phrase as a sentence starting with a verb +- **Specific**: Define scope narrowly +- **Bounded**: Indicate how to tell when it's finished + +### Lessons Learned + +Help identify: +- What went well during the incident response +- What could be improved +- Systemic improvements needed + +**Exit condition:** +Root cause identified, action items generated across all categories, and lessons learned captured. + +**Transition:** +Ask if they want to refine the analysis or action items, or if ready to generate the report. + +## Stage 3: Report Generation + +**Goal:** Create a comprehensive, well-structured postmortem report. + +### Report Structure + +Use the template in `templates/postmortem_template.md` as a starting point. The report includes: -**Report structure:** 1. Executive Summary 2. Incident Details 3. Impact (User, Business, Technical) @@ -157,169 +158,71 @@ The AI will help you collect and organize information from various sources: 8. Lessons Learned 9. Appendices -## Blameless Postmortem Principles +### Drafting the Report -**Core principles the AI will follow:** -- Assume good intentions on the part of all staff -- Never blame people for faults -- Focus on systems, processes, and roles, not individuals -- Ask "why did the system allow this" not "why did this person do this" +**If access to artifacts is available:** +Use `create_file` to create an artifact with the complete postmortem report. -**How the AI applies these:** -- Reframe individual actions in terms of system/process failures -- Use role-based language (e.g., "the on-call engineer") not names -- Frame timeline, causal chain, and mitigations in context of systems and processes -- Suggest "second stories" - alternative explanations that focus on systemic factors +**If no access to artifacts:** +Create a markdown file in the working directory (e.g., `postmortem-YYYY-MM-DD.md`). -**Example reframing the AI will do:** -- ❌ "John deployed the buggy code" -- ✅ "The deployment process allowed code without sufficient tests to reach production" +Fill in all sections based on the information gathered and analysis completed. Ensure: +- Consistency and completeness +- Professional formatting +- Blameless language throughout +- Clear, actionable language -If you provide information that blames individuals, the AI will help reframe it in blameless terms. +### Review and Refinement -## Root Cause Analysis Techniques +After drafting, ask user to review the report. Request feedback on: +- Accuracy of information +- Completeness of analysis +- Quality of action items +- Clarity and tone -The AI will guide you through these techniques: +Use `str_replace` to make edits based on feedback. Never reprint the whole doc. -### 5 Whys +**Continue iterating** until user is satisfied. -The AI will help you dig deeper by asking "why" iteratively: +### Final Checks -**Example interaction:** -- You: "The service failed" -- AI: "Why did the service fail?" -- You: "Database connection timeout" -- AI: "Why did the connection timeout?" -- You: "Connection pool exhausted" -- AI: "Why was the pool exhausted?" -- ... (continues until root cause) +Before completion, review the entire document for: +- Flow and consistency +- Redundancy or contradictions +- Blameless language +- Actionable, specific action items +- Complete root cause analysis -### Causal Chain +**Exit condition:** +User is satisfied with the postmortem report and it's ready for sharing. -The AI will help you build a chain of causation: -``` -Symptom → Immediate Cause → Contributing Factor → Root Cause -``` +## Tips for Effective Guidance -### Systems Thinking +**Tone:** +- Be direct and procedural +- Explain rationale briefly when it affects user behavior +- Don't try to "sell" the approach - just execute it -The AI will help you consider multiple layers: -- **Technical**: Code, infrastructure, configuration -- **Process**: Deployment, monitoring, on-call procedures -- **Organizational**: Training, documentation, communication +**Handling Deviations:** +- If user wants to skip a stage: Ask if they want to skip this and work freeform +- If user seems frustrated: Acknowledge and suggest ways to move faster +- Always give user agency to adjust the process -The AI will prompt you to think about each layer and identify gaps. +**Information Management:** +- Throughout, if information is missing, proactively ask +- Don't let gaps accumulate - address them as they come up +- Help organize scattered information as it's provided -## Action Item Categories +**Quality over Speed:** +- Don't rush through stages +- Each iteration should make meaningful improvements +- The goal is a postmortem that actually helps prevent future incidents -The AI will generate action items across these categories to ensure comprehensive coverage: +## References -| Category | What the AI Asks | Examples the AI Might Generate | -|----------|-----------------|-------------------------------| -| **Investigate this incident** | "What happened to cause this incident and why?" | "Analyze logs from [timeframe] to identify all error patterns" | -| **Mitigate this incident** | "What immediate actions did we take to resolve this specific event?" | "Roll back deployment v1.2.3 to v1.2.2" | -| **Repair damage from this incident** | "How did we resolve immediate or collateral damage?" | "Restore corrupted user data from backup timestamped [date]" | -| **Detect future incidents** | "How can we decrease time to accurately detect similar failures?" | "Add alerting for all cases where this service returns >1% errors" | -| **Mitigate future incidents** | "How can we decrease severity/duration of future incidents like this?" | "Implement graceful degradation when database connections exceed 80% capacity" | -| **Prevent future incidents** | "How can we prevent a recurrence of this sort of failure?" | "Add automated pre-submit check for schema changes" | - -**Action item quality:** -The AI will ensure each action item is: -- **Actionable**: Phrase as a sentence starting with a verb -- **Specific**: Define scope narrowly -- **Bounded**: Indicate how to tell when it's finished - -**Example improvements the AI will make:** -- ❌ "Investigate monitoring for this scenario" -- ✅ "Add alerting for all cases where this service returns >1% errors" - -## Third-Party Dependencies - -When incidents involve third-party services, the AI will help you work through this framework: - -1. **Did the 3rd party violate our expectations?** - - Help review and assess their RCA - - Suggest adjusting expectations and increasing resilience - - Identify alternative solutions if expectations are unacceptable - -2. **Did the 3rd party meet expectations, but our service failed anyway?** - - Help identify where our service needs to increase resilience - - Suggest specific resilience improvements - -3. **Do we not have clear expectations?** - - Help establish expectations with the 3rd party - - Suggest how to share expectations with teams - -## Interactive Workflow Examples - -### Example 1: Starting from Scratch - -**You:** "I need to write a postmortem for an incident that happened yesterday. The database went down for 2 hours." - -**AI (using this skill):** -- Asks about severity and impact -- Requests timeline information -- Helps gather details incrementally -- Structures the information as you provide it -- Guides root cause analysis -- Generates action items -- Creates the full report - -### Example 2: You Have Some Information - -**You:** "Here's our incident timeline and some logs. Can you help me create a postmortem?" - -**AI (using this skill):** -- Analyzes the provided information -- Identifies gaps and asks clarifying questions -- Helps structure the timeline -- Guides root cause analysis -- Generates comprehensive action items -- Creates the report - -### Example 3: Refining an Existing Draft - -**You:** "I have a rough postmortem draft. Can you help improve it?" - -**AI (using this skill):** -- Reviews the draft -- Identifies missing sections or information -- Suggests improvements to root cause analysis -- Helps refine action items -- Ensures blameless language -- Polishes the final report - -## Best Practices for Using This Skill - -### Do's - -✅ **Do** provide information incrementally - the AI can help organize it as you go -✅ **Do** share raw data (logs, metrics, screenshots) - the AI can help extract insights -✅ **Do** answer clarifying questions - they help the AI create a better analysis -✅ **Do** review and refine the AI's suggestions - your domain knowledge is crucial -✅ **Do** provide context about your systems and processes - it helps the AI generate better action items -✅ **Do** use the template structure - it ensures completeness -✅ **Do** focus on systems and processes in your input - the AI will help maintain blameless language -✅ **Do** quantify impact with metrics when possible - the AI can help structure them - -### Don'ts - -❌ **Don't** blame individuals in your input - the AI will help reframe, but it's better to start blameless -❌ **Don't** skip root cause analysis - the AI will guide you through it -❌ **Don't** create vague action items - the AI will help make them specific and actionable -❌ **Don't** focus only on technical causes - the AI will prompt you to consider process and organizational factors -❌ **Don't** rush through the analysis - take time to work through the 5 Whys with the AI -❌ **Don't** skip the "what went well" section - the AI will help identify positive learnings - -## Templates - -The AI will use the template in `templates/postmortem_template.md` when generating reports. The template includes: -- All required sections -- Example content structure for each section -- Guidance on what to include -- Formatting guidelines - -You can ask the AI to customize the template structure if your organization has specific requirements. +- **Root Cause Analysis**: See [references/root-cause-analysis.md](references/root-cause-analysis.md) for detailed techniques +- **Action Items**: See [references/action-items.md](references/action-items.md) for categories and guidelines +- **Template**: Use `templates/postmortem_template.md` when generating reports ## Keywords diff --git a/skills/postmortems/references/action-items.md b/skills/postmortems/references/action-items.md new file mode 100644 index 00000000..33b7a3d7 --- /dev/null +++ b/skills/postmortems/references/action-items.md @@ -0,0 +1,43 @@ +# Action Item Categories and Guidelines + +## Categories + +Generate action items across these categories to ensure comprehensive coverage: + +| Category | Question to Ask | Examples | +|----------|----------------|----------| +| **Investigate this incident** | "What happened to cause this incident and why?" | "Analyze logs from [timeframe] to identify all error patterns" | +| **Mitigate this incident** | "What immediate actions did we take to resolve this specific event?" | "Roll back deployment v1.2.3 to v1.2.2" | +| **Repair damage from this incident** | "How did we resolve immediate or collateral damage?" | "Restore corrupted user data from backup timestamped [date]" | +| **Detect future incidents** | "How can we decrease time to accurately detect similar failures?" | "Add alerting for all cases where this service returns >1% errors" | +| **Mitigate future incidents** | "How can we decrease severity/duration of future incidents like this?" | "Implement graceful degradation when database connections exceed 80% capacity" | +| **Prevent future incidents** | "How can we prevent a recurrence of this sort of failure?" | "Add automated pre-submit check for schema changes" | + +## Quality Guidelines + +Ensure each action item is: + +- **Actionable**: Phrase as a sentence starting with a verb +- **Specific**: Define scope narrowly +- **Bounded**: Indicate how to tell when it's finished + +**Example improvements:** +- ❌ "Investigate monitoring for this scenario" +- ✅ "Add alerting for all cases where this service returns >1% errors" + +## Third-Party Dependencies + +When incidents involve third-party services, use this framework: + +1. **Did the 3rd party violate our expectations?** + - Review and assess their RCA + - Suggest adjusting expectations and increasing resilience + - Identify alternative solutions if expectations are unacceptable + +2. **Did the 3rd party meet expectations, but our service failed anyway?** + - Identify where our service needs to increase resilience + - Suggest specific resilience improvements + +3. **Do we not have clear expectations?** + - Help establish expectations with the 3rd party + - Suggest how to share expectations with teams diff --git a/skills/postmortems/references/root-cause-analysis.md b/skills/postmortems/references/root-cause-analysis.md new file mode 100644 index 00000000..ce0be25e --- /dev/null +++ b/skills/postmortems/references/root-cause-analysis.md @@ -0,0 +1,45 @@ +# Root Cause Analysis Techniques + +## 5 Whys + +Guide users through iterative "why" questions to dig deeper into root causes. + +**Example interaction:** +- User: "The service failed" +- AI: "Why did the service fail?" +- User: "Database connection timeout" +- AI: "Why did the connection timeout?" +- User: "Connection pool exhausted" +- AI: "Why was the pool exhausted?" +- ... (continues until root cause) + +Continue asking "why" until reaching a root cause that cannot be further decomposed or points to a systemic issue. + +## Causal Chain + +Help users build a chain of causation from symptom to root cause: + +``` +Symptom → Immediate Cause → Contributing Factor → Root Cause +``` + +Guide users to identify each link in the chain and understand how they connect. + +## Systems Thinking + +Prompt users to consider multiple layers: + +- **Technical**: Code, infrastructure, configuration +- **Process**: Deployment, monitoring, on-call procedures +- **Organizational**: Training, documentation, communication + +For each layer, ask: "What gaps or issues exist at this level that contributed to the incident?" + +## Blameless Reframing + +When users provide information that blames individuals, help reframe in blameless terms: + +- ❌ "John deployed the buggy code" +- ✅ "The deployment process allowed code without sufficient tests to reach production" + +Always ask: "Why did the system/process allow this?" rather than "Why did this person do this?" From c196bc79abfb7cdb7260b9f13a85978e48a9f45c Mon Sep 17 00:00:00 2001 From: wu Date: Tue, 13 Jan 2026 14:12:12 +0800 Subject: [PATCH 5/6] Simplify postmortem template to focus on core issues - Remove detailed timeline and time-based fields (not always known) - Focus on: where it went wrong, why it went wrong, impact - Add Pre-Release Checklist section for future release reviews - Simplify structure for practical use - Make template more actionable and less process-heavy --- skills/postmortems/SKILL.md | 17 +- .../templates/postmortem_template.md | 279 ++++-------------- 2 files changed, 73 insertions(+), 223 deletions(-) diff --git a/skills/postmortems/SKILL.md b/skills/postmortems/SKILL.md index 648398a5..37823264 100644 --- a/skills/postmortems/SKILL.md +++ b/skills/postmortems/SKILL.md @@ -146,17 +146,16 @@ Ask if they want to refine the analysis or action items, or if ready to generate ### Report Structure -Use the template in `templates/postmortem_template.md` as a starting point. The report includes: +Use the template in `templates/postmortem_template.md` as a starting point. The simplified template focuses on: -1. Executive Summary -2. Incident Details -3. Impact (User, Business, Technical) -4. Timeline -5. Root Cause Analysis -6. Resolution -7. Action Items (categorized) +1. Issue Overview +2. Where It Went Wrong +3. Why It Went Wrong (Root Cause Analysis) +4. Impact +5. Resolution +6. Action Items +7. Pre-Release Checklist (for future release reviews) 8. Lessons Learned -9. Appendices ### Drafting the Report diff --git a/skills/postmortems/templates/postmortem_template.md b/skills/postmortems/templates/postmortem_template.md index a41c0873..05d5aedd 100644 --- a/skills/postmortems/templates/postmortem_template.md +++ b/skills/postmortems/templates/postmortem_template.md @@ -1,46 +1,49 @@ -# Postmortem: [Incident Title] +# Postmortem: [Issue Title] -**Incident ID:** [INC-YYYY-MMDD-NNN] -**Date:** [YYYY-MM-DD] -**Duration:** [X hours Y minutes] -**Severity:** [Level 1/2/3/4] -**Status:** [Resolved/Resolved with follow-up] +## Issue Overview + +**What happened:** [Brief description of what went wrong] + +**Impact scope:** [Which services/features/users were affected] --- -## Executive Summary +## Where It Went Wrong -[2-3 sentence overview of the incident, impact, root cause, and key actions] +[Describe specifically where the problem occurred, including:] +- The system/service/feature that failed +- The specific location (code module, configuration, process, etc.) +- The symptoms (error messages, abnormal behavior, etc.) -**Impact:** [Brief impact statement] - -**Root Cause:** [Brief root cause statement] - -**Key Actions:** [Top 2-3 most important action items] +**Examples:** +- User login service exhausted connection pool during peak hours +- Database migration script missing index creation step +- New feature release didn't check dependency service version compatibility --- -## Incident Details +## Why It Went Wrong -### Basic Information +### Immediate Cause -- **Incident ID:** [INC-YYYY-MMDD-NNN] -- **Title:** [Descriptive title] -- **Date:** [YYYY-MM-DD] -- **Start Time:** [HH:MM UTC] -- **End Time:** [HH:MM UTC] -- **Duration:** [X hours Y minutes] -- **Severity Level:** [1/2/3/4] -- **Affected Services:** [List services/systems] -- **Postmortem Lead:** [Name/Role] -- **Postmortem Date:** [YYYY-MM-DD] +[The direct cause that led to the problem] -### Severity Level +### Root Cause -[ ] **Level 1 - Critical**: Complete service outage or severe degradation affecting all users -[ ] **Level 2 - High**: Significant service degradation affecting large portion of users -[ ] **Level 3 - Medium**: Moderate impact affecting subset of users or features -[ ] **Level 4 - Low**: Minor impact with workaround available +[The root cause identified through 5 Whys analysis] + +**Why existing safeguards didn't prevent this:** +- [Gaps or deficiencies in monitoring/testing/processes] + +### Causal Chain + +``` +[Symptom] + ↓ +[Immediate Cause] + ↓ +[Root Cause] +``` --- @@ -48,118 +51,28 @@ ### User Impact -- **Affected Users:** [Number or percentage] -- **User-Facing Symptoms:** [What users experienced] -- **Geographic Impact:** [If applicable] -- **Feature Impact:** [Which features were affected] +- [What users experienced/observed] +- [Affected features/services] ### Business Impact -- **Revenue Impact:** [If applicable] -- **SLA Breaches:** [If applicable] -- **Customer Complaints:** [Number or description] -- **Reputation Impact:** [If applicable] +- [Business metrics impact, if applicable] -### Technical Metrics +### Technical Impact -- **Error Rate:** [Percentage or absolute numbers] -- **Latency Increase:** [If applicable] -- **Throughput Reduction:** [If applicable] -- **Data Loss:** [If applicable] -- **Other Metrics:** [Custom metrics relevant to the incident] - ---- - -## Timeline - -[Chronological sequence of events. Use role-based language, not names.] - -| Time (UTC) | Event | Actor | Details | -|------------|-------|-------|---------| -| HH:MM | First alert/detection | [Role, e.g., "On-call engineer"] | [What was detected] | -| HH:MM | Investigation started | [Role] | [Initial investigation steps] | -| HH:MM | Communication sent | [Role] | [Internal/external communication] | -| HH:MM | Mitigation attempt #1 | [Role] | [What was tried] | -| HH:MM | Status update | [Role] | [Update content] | -| HH:MM | Root cause identified | [Role] | [What was found] | -| HH:MM | Fix deployed | [Role] | [Fix description] | -| HH:MM | Incident resolved | [Role] | [Resolution confirmation] | - -### Key Decisions - -1. **[Time]**: [Decision made] - [Rationale] -2. **[Time]**: [Decision made] - [Rationale] -3. **[Time]**: [Decision made] - [Rationale] - ---- - -## Root Cause Analysis - -### Immediate Cause - -[What directly caused the incident to occur] - -### Contributing Factors - -1. **[Factor 1]**: [Description] -2. **[Factor 2]**: [Description] -3. **[Factor 3]**: [Description] - -### Root Cause(s) - -[The underlying system, process, or design issue that allowed the incident to occur] - -**Why existing safeguards didn't prevent it:** - -[Explanation of why monitoring, testing, processes, or other safeguards failed to prevent or catch this issue] - -### Causal Chain - -``` -[Immediate Symptom] - ↓ -[Immediate Cause] - ↓ -[Contributing Factor] - ↓ -[Root Cause] -``` - -### 5 Whys Analysis - -1. **Why did [symptom] occur?** - → [Answer] - -2. **Why did [answer 1] happen?** - → [Answer] - -3. **Why did [answer 2] happen?** - → [Answer] - -4. **Why did [answer 3] happen?** - → [Answer] - -5. **Why did [answer 4] happen?** - → [Root cause] +- [System performance, stability, or other technical consequences] --- ## Resolution -### How the Incident Was Resolved +### Immediate Fixes -[Step-by-step description of how the incident was resolved] +1. [Emergency measures taken] -### Immediate Mitigation Steps +### Long-term Solutions -1. **[Action]**: [Description] -2. **[Action]**: [Description] -3. **[Action]**: [Description] - -### Long-Term Fixes Applied - -1. **[Fix]**: [Description] -2. **[Fix]**: [Description] +1. [Long-term measures to prevent recurrence] --- @@ -167,43 +80,26 @@ [Each action item should be: Actionable (verb + outcome), Specific (narrow scope), Bounded (clear completion criteria)] -### Investigate This Incident +| Action Item | Owner | Priority | Status | +|-------------|-------|----------|--------| +| [Specific, actionable item] | [Owner] | [High/Medium/Low] | [Open/In Progress/Done] | -| ID | Action | Owner | Priority | Deadline | Status | -|----|--------|-------|----------|----------|--------| -| AI-1 | [Actionable, specific, bounded action] | [Name] | [High/Medium/Low] | [Date] | [Open/In Progress/Done] | +**Priority Actions:** [List 2-3 most critical action items that address the root cause] -### Mitigate This Incident +--- -| ID | Action | Owner | Priority | Deadline | Status | -|----|--------|-------|----------|----------|--------| -| AI-2 | [Actionable, specific, bounded action] | [Name] | [High/Medium/Low] | [Date] | [Open/In Progress/Done] | +## Pre-Release Checklist -### Repair Damage from This Incident +**Before future releases, verify these issues are resolved or prevented:** -| ID | Action | Owner | Priority | Deadline | Status | -|----|--------|-------|----------|----------|--------| -| AI-3 | [Actionable, specific, bounded action] | [Name] | [High/Medium/Low] | [Date] | [Open/In Progress/Done] | +- [ ] [Check item 1: Related to this issue] +- [ ] [Check item 2: Related to this issue] +- [ ] [Check item 3: Related to this issue] -### Detect Future Incidents - -| ID | Action | Owner | Priority | Deadline | Status | -|----|--------|-------|----------|----------|--------| -| AI-4 | [Actionable, specific, bounded action] | [Name] | [High/Medium/Low] | [Date] | [Open/In Progress/Done] | - -### Mitigate Future Incidents - -| ID | Action | Owner | Priority | Deadline | Status | -|----|--------|-------|----------|----------|--------| -| AI-5 | [Actionable, specific, bounded action] | [Name] | [High/Medium/Low] | [Date] | [Open/In Progress/Done] | - -### Prevent Future Incidents - -| ID | Action | Owner | Priority | Deadline | Status | -|----|--------|-------|----------|--------|--------| -| AI-6 | [Actionable, specific, bounded action] | [Name] | [High/Medium/Low] | [Date] | [Open/In Progress/Done] | - -**Priority Actions:** [List the 2-3 most critical action items that address the root cause] +**Examples:** +- [ ] Does the database migration script include all necessary index creation? +- [ ] Is dependency service version compatibility checked before new feature releases? +- [ ] Are appropriate monitoring and alerts in place? --- @@ -211,69 +107,24 @@ ### What Went Well -1. **[Positive aspect]**: [Description] -2. **[Positive aspect]**: [Description] -3. **[Positive aspect]**: [Description] +1. [Positive aspects of the incident response] ### What Could Be Improved -1. **[Area for improvement]**: [Description] -2. **[Area for improvement]**: [Description] -3. **[Area for improvement]**: [Description] +1. [Areas for improvement] -### Systemic Improvements Needed +### Systemic Improvements -1. **[Systemic change]**: [Description] -2. **[Systemic change]**: [Description] +1. [Systemic changes needed, such as processes, tools, documentation] --- -## Related Incidents +## Related Links -- [Link to related incident #1] -- [Link to related incident #2] +- [Related code changes] +- [Related documentation] +- [Related monitoring/logs] --- -## Appendices - -### A. Relevant Logs - -[Links to or excerpts from relevant logs] - -### B. Graphs and Metrics - -[Links to dashboards, graphs, or screenshots showing the incident] - -### C. Configuration Changes - -[If applicable, document configuration changes made during or after the incident] - -### D. References - -- [Link to monitoring dashboard] -- [Link to runbook used] -- [Link to related documentation] -- [Link to code changes] - ---- - -## Approval - -**Postmortem Lead:** [Name] - [Date] - -**Service Owner:** [Name] - [Date] - -**Approver:** [Name] - [Date] - ---- - -## Follow-Up - -**Next Review Date:** [Date] - -**Action Item Review:** [Date] - ---- - -*This postmortem follows blameless postmortem principles. We focus on systems, processes, and roles rather than individuals to create a culture of learning and continuous improvement.* +*This postmortem follows blameless principles, focusing on systems, processes, and roles rather than individuals to promote learning and continuous improvement.* From 2c86208d2953feb3a0ac1b77c574e7bc95cebd27 Mon Sep 17 00:00:00 2001 From: wu Date: Tue, 13 Jan 2026 14:45:47 +0800 Subject: [PATCH 6/6] Refactor root cause analysis to allow AI proactive analysis - Change from strict Q&A to AI-based synthesis from conversation - AI can analyze root causes proactively from available information - Only ask targeted questions when information is missing - Present full analysis and ask for confirmation/clarification - More flexible and efficient than step-by-step questioning --- skills/postmortems/SKILL.md | 15 +++--- .../references/root-cause-analysis.md | 47 ++++++++++++------- 2 files changed, 40 insertions(+), 22 deletions(-) diff --git a/skills/postmortems/SKILL.md b/skills/postmortems/SKILL.md index 37823264..bf027bcc 100644 --- a/skills/postmortems/SKILL.md +++ b/skills/postmortems/SKILL.md @@ -92,14 +92,17 @@ Ask if there's any more information they want to provide, or if it's time to mov ### Root Cause Analysis -Guide users through root cause analysis using techniques from [references/root-cause-analysis.md](references/root-cause-analysis.md): +Analyze root causes using techniques from [references/root-cause-analysis.md](references/root-cause-analysis.md). Based on information provided in the conversation: -1. **5 Whys**: Ask iterative "why" questions to dig deeper -2. **Causal Chain**: Build symptom → immediate cause → contributing factor → root cause -3. **Systems Thinking**: Consider technical, process, and organizational layers +1. **Synthesize available information**: Review what the user has shared about the incident +2. **Apply 5 Whys**: Analyze the chain of "whys" from available information, ask targeted questions only when information is missing +3. **Build Causal Chain**: Construct symptom → immediate cause → contributing factor → root cause +4. **Apply Systems Thinking**: Consider technical, process, and organizational layers **What to do:** -- Guide interactive 5 Whys analysis +- Analyze root causes proactively from conversation context +- Present your analysis and ask for confirmation or clarification +- Only ask targeted questions about specific gaps, not the entire chain - Help identify contributing factors beyond immediate cause - Frame causes in terms of systems and processes, not individuals - Suggest alternative explanations and "second stories" @@ -109,7 +112,7 @@ Guide users through root cause analysis using techniques from [references/root-c - Use role-based language, not names - Ask "why did the system allow this" not "why did this person do this" -If user provides information that blames individuals, help reframe it in blameless terms. +If user provides information that blames individuals, automatically reframe it in blameless terms. ### Action Items Generation diff --git a/skills/postmortems/references/root-cause-analysis.md b/skills/postmortems/references/root-cause-analysis.md index ce0be25e..934f25d7 100644 --- a/skills/postmortems/references/root-cause-analysis.md +++ b/skills/postmortems/references/root-cause-analysis.md @@ -1,45 +1,60 @@ # Root Cause Analysis Techniques +## Approach + +Analyze root causes based on information provided in the conversation. You can synthesize information from multiple messages, ask clarifying questions when needed, and provide analysis proactively rather than requiring strict question-answer sequences. + ## 5 Whys -Guide users through iterative "why" questions to dig deeper into root causes. +Use iterative "why" questions to dig deeper into root causes. You can: -**Example interaction:** -- User: "The service failed" -- AI: "Why did the service fail?" -- User: "Database connection timeout" -- AI: "Why did the connection timeout?" -- User: "Connection pool exhausted" -- AI: "Why was the pool exhausted?" -- ... (continues until root cause) +- **Analyze from conversation**: If the user has already provided information about what happened, analyze it and identify the chain of "whys" yourself +- **Ask when needed**: Only ask "why" questions if information is missing or unclear +- **Present the chain**: Show the full 5 Whys chain once you have enough information -Continue asking "why" until reaching a root cause that cannot be further decomposed or points to a systemic issue. +**Example:** +If user says "The service failed because database connection timed out", you can analyze: +1. Why did the service fail? → Database connection timeout +2. Why did the connection timeout? → Connection pool exhausted (infer or ask if unclear) +3. Why was the pool exhausted? → Long-running queries blocking connections (infer or ask) +4. Why were there long-running queries? → Missing index on frequently queried column (infer or ask) +5. Why was the index missing? → Database migration script didn't include index creation (root cause) + +Present this analysis and ask for confirmation or clarification if needed. ## Causal Chain -Help users build a chain of causation from symptom to root cause: +Build a chain of causation from symptom to root cause based on available information: ``` Symptom → Immediate Cause → Contributing Factor → Root Cause ``` -Guide users to identify each link in the chain and understand how they connect. +Identify each link from the conversation context. If a link is unclear, ask a specific question about that link rather than going through the whole chain step-by-step. ## Systems Thinking -Prompt users to consider multiple layers: +Analyze across multiple layers based on what the user has shared: - **Technical**: Code, infrastructure, configuration - **Process**: Deployment, monitoring, on-call procedures - **Organizational**: Training, documentation, communication -For each layer, ask: "What gaps or issues exist at this level that contributed to the incident?" +For each layer, identify gaps or issues that contributed to the incident. If information is missing for a layer, ask targeted questions about that specific layer. ## Blameless Reframing -When users provide information that blames individuals, help reframe in blameless terms: +When users provide information that blames individuals, automatically reframe in blameless terms: - ❌ "John deployed the buggy code" - ✅ "The deployment process allowed code without sufficient tests to reach production" -Always ask: "Why did the system/process allow this?" rather than "Why did this person do this?" +Always frame causes in terms of systems and processes, not individuals. Ask: "Why did the system/process allow this?" rather than "Why did this person do this?" + +## Analysis Workflow + +1. **Synthesize available information**: Review what the user has shared about the incident +2. **Identify gaps**: Determine what information is missing for a complete root cause analysis +3. **Ask targeted questions**: Only ask about specific gaps, not the entire chain +4. **Present analysis**: Show your root cause analysis and causal chain +5. **Validate and refine**: Ask if the analysis makes sense or if anything is missing