post-mortem-author
Build-an-X workflow that produces a blameless post-mortem from an incident - captures the timeline (chronological event sequence with sources), root cause analysis (what + why, not who), impact (users / revenue / SLO debt), action items (with owners + due dates + measurable success criteria), and "what went well" (intentional). Per Google SRE: "Blameless postmortems are a tenet of SRE culture." Use after every user-visible incident, not just severe ones.
Install with skills.sh (any agent)
npx skills add testland/qa --skill post-mortem-authorpost-mortem-author
Overview
Per google-sre-postmortem (opens in new window):
"A postmortem is 'a written record of an incident, its impact, the actions taken to mitigate or resolve it, the root cause(s), and the follow-up actions to prevent the incident from recurring.'"
"Blameless postmortems are a tenet of SRE culture." (google-sre-postmortem (opens in new window))
"Writing a postmortem is not punishment - it is a learning opportunity for the entire company." (google-sre-postmortem (opens in new window))
The blameless framing is load-bearing. Per google-sre-postmortem (opens in new window), the document must "focus on identifying the contributing causes of the incident without indicting any individual or team for bad or inappropriate behavior" - assuming "everyone involved in an incident had good intentions and did the right thing with the information they had."
When to use
Per google-sre-postmortem (opens in new window), common triggers include:
"user-visible downtime, data loss, on-call interventions, extended resolution times, and monitoring failures."
Author a post-mortem after every such incident - not just sev-1. Lower-severity incidents accumulate context that prevents the sev-1.
Step 1 - Author the document
Copy the full section skeleton from references/post-mortem-document-template.md and fill every section. The required sections, in order:
The worked example below fills this skeleton for a real SEV-2.
Step 2 - Blameless review
Per google-sre-postmortem (opens in new window): "Postmortems are not punishment."
Reviewers should:
Step 3 - Action item discipline
Action items must have:
The action items are the post-mortem's value. Without them, the document is paperwork.
Step 4 - Approval + closure
The post-mortem isn't "done" until:
The post-mortem is "closed" when all action items ship - typically 2-4 weeks. A 6-month-old open post-mortem is a process failure.
Step 5 - Storage
docs/postmortems/
├── INC-1234-stripe-webhook-2026-05-04.md
├── INC-1235-cache-invalidation-2026-05-12.md
├── INC-summary-2026-Q2.md ← rollup
└── README.mdMarkdown + git. Quarterly rollup identifies patterns:
## Q2 2026 incident summary
**Total incidents:** 12
**SEV-1:** 1
**SEV-2:** 6
**SEV-3:** 5
**Patterns:**
- 4 of 12 (33%) were "test gap" - the failing condition wasn't
in the test suite. Action: invest in
test-coverage-targeter
+ property-based testing.
- 3 of 12 (25%) involved canary metrics; 2 of those proceeded
through canary gate. Action: review thresholds (per AI-2 from
INC-1234).
- ...Worked example - INC-1234 Stripe webhook failure (SEV-2)
The skeleton from Step 1, filled for a real incident.
Summary. A v1.4.5 deploy introduced a null-metadata crash in the Stripe webhook handler; ~12,400 customers (4.3% of MAU) hit failed checkout completions for 23 minutes until rollback.
Impact. ~$140,000 in delayed (not lost) orders; 32% of the monthly availability budget burned; 47 support tickets.
Timeline (excerpt).
| Time (UTC) | Event | Source |
|---|---|---|
| 14:00 | Deploy of v1.4.5 to canary (5% traffic) | CD pipeline log |
| 14:23 | First Sentry alert: NullPointerException at WebhookHandler:42 | Sentry |
| 14:30 | Canary window ends within thresholds; promoted to 100% | CD pipeline |
| 14:42 | PagerDuty SLO burn-rate alert; incident declared SEV-2 | PagerDuty |
| 14:58 | Rollback complete; error rate returning to baseline | Datadog |
Root cause (what, not who). The v1.4.5 handler added a path for Stripe's payment_intent.partially_funded event that called payment.metadata.get("internal_id"); for ~3% of events metadata was null, the exception was uncaught, the handler returned 500, and Stripe stopped retrying, so fulfillment never triggered. The canary stage saw the error rate rise (0.4% vs 0.3% baseline) but stayed under the 1.5x rollback threshold, so prod-canary-validator returned PROCEED with WARNING and the gate was acked.
Contributing factors. (1) test gap - no unit test for the null-metadata case; (2) canary threshold too lenient for a low baseline; (3) staging carries almost no Stripe webhook traffic, so the new event type was never exercised pre-deploy.
Action items.
| ID | Action | Owner | Priority | Due | Success criterion |
|---|---|---|---|---|---|
| AI-1 | Unit test for partially_funded with null metadata | Bob | P1 | 2 days | Test in WebhookHandlerTest.kt fails against the bug, passes after |
| AI-2 | Tighten canary error-rate threshold 1.5x -> 1.3x | SRE | P2 | 1 sprint | canary-thresholds.yml updated; one normal canary passes |
| AI-3 | Staging fixture covering all Stripe event types | Bob | P2 | 1 sprint | Staging "events by type" metric shows all types > 0 |
What went well. Sentry caught the regression at 14:23, well before the PagerDuty page; rollback finished in 7 minutes, inside RTO. Diagnosis came from the Sentry stack trace alone, with no production debugging.
Anti-patterns
| Anti-pattern | Why it fails | Fix |
|---|---|---|
| Blame language | Defeats the blameless principle; team stops authoring post-mortems honestly. | Per Google SRE: focus on contributing causes, not individuals (Step 2). |
| Action items without owner / due date | Nobody acts; same incident recurs. | All four fields required (Step 3). |
| Skipping post-mortems for "small" incidents | Lower-severity context that prevents big incidents is missed. | Author per google-sre-postmortem (opens in new window) trigger criteria (Step 1). |
| Post-mortem stored in private docs | Org learning capped at the team. | Public to org (per Google SRE pattern). |
| One-shot post-mortem with no follow-up | "Closed" but action items stale; recurrence likely. | Track action items in tracker (Step 4); post-mortem closed only when all done. |
| Post-mortem authored 2+ weeks after incident | Memory faded; details lost. | Author within 5 business days. |
Limitations
References
Post-mortem document template
View source (opens in new window)Post-mortem document template
Deep reference for the post-mortem-author SKILL.md. The full per-incident section skeleton to copy when authoring a blameless post-mortem. Fill every section; the Action items table is load-bearing - a post-mortem without owned, dated, measurable action items is paperwork.
Store one markdown file per incident under a stable directory (for example docs/postmortems/) with an incident-ID-and-date filename.
# Post-mortem - `INC-XXXX` - <one-line title>
**Status:** Draft | Review | Approved | Action items closed
**Severity:** SEV-n
**Authors:** <incident commander>, <lead investigator>
**Date authored:** YYYY-MM-DD **Incident date:** YYYY-MM-DD
**Reviewers:** <eng manager>, <SRE lead>, <product>
## Summary
2-3 sentences: what happened, who was affected, how long, what was done.
## Impact
- **Users affected:** count and % of MAU.
- **Revenue impact:** amount (state deferred vs lost).
- **SLO debt:** % of the monthly availability budget burned.
- **Reputational:** support tickets, social reach.
## Timeline
Chronological events, one row each, with a UTC timestamp and a source link.
| Time (UTC) | Event | Source |
|------------|-------|--------|
| ... | ... | ... |
## Root cause
What happened, in detail. Not who. The system is the grammatical subject.
## Contributing factors
Every condition that allowed the incident (test gap, threshold too lenient,
missing staging traffic, ...). List all; incidents rarely have a single cause.
## What went well
The positives - what mitigated faster than expected. Per
[Google SRE, Postmortem Culture](https://sre.google/sre-book/postmortem-culture/),
post-mortems should call these out too.
## Action items
| ID | Action | Owner | Priority | Due | Success criterion |
|----|--------|-------|----------|-----|-------------------|
| AI-1 | ... | one named person | P0-P3 | concrete date | measurable "done" condition |
## Lessons learned
What the team knows now that it did not before.
## Postmortem trigger
Which trigger criteria this incident met (user-visible, duration, revenue, SLO).Two fields carry the most weight. Root cause must read as a property of the system, never of a person. Action items must each have one named owner, a concrete due date, a priority, and a measurable success criterion; without all four the item does not get acted on and the same incident recurs.
Related skills
attack-surface-test-checklist
Maps a code change to the security tests worth running against it. Classifies changed paths and file contents into nine attack surfaces (authentication, session management, input handling, file upload, deserialization, access control, API and web service, cryptography, data protection), attaches the matching OWASP ASVS 4.0.3 verification requirements, OWASP Top 10 2021 category IDs, and OWASP WSTG section numbers to each active surface, then emits a per-surface manual and automated test checklist bounded by what actually changed. Surfaces with no changed lines are excluded rather than carried as filler. Use when a pull request, release branch, or feature is about to be security tested and the team needs a targeted test list instead of a generic application-wide checklist.
definition-of-done
The team's Definition of Done (DoD), both halves of the lifecycle: authoring and auditing. Explains the Scrum Guide's DoD definition ("a formal description of the state of the Increment when it meets the quality measures required for the product"), proposes a starter DoD with the 7-10 lines most teams need (code reviewed, unit tests, docs, AC met, deployed to staging, smoke passed, no a11y regressions, telemetry wired), emits a per-PR checklist a reviewer enforces, and audits work against an existing DoD line by line with repository evidence (review records, diffs, CI runs, coverage reports), tagging every line met, not met, or unverifiable - never passing a line on self-attestation. Use when the team doesn't have a DoD, wants to revise theirs, or is about to mark a story or PR done and nobody has checked the work against the committed checklist.
e2e-suite-budget
Caps E2E suite size by computing per-test ROI - (regressions caught × value) ÷ (runtime × flake rate × maintenance) - then ranks every end-to-end test and recommends which bottom-decile ones to retire, move to a lower layer, or fix. Use when CI is slow or E2E-dominated, flaky failures are rising, or quarterly to keep suite size within maintenance capacity. For strategic unit:service:UI layer ratios use test-pyramid-balancer, for the minimal per-deploy critical-path gate use smoke-suite-gate, and for quarantining flaky tests use flaky-test-quarantine; this prunes low-signal tests by ROI.
framework-choice-advisor
Reference catalog for picking a test automation framework or QA tool - covers Playwright / Cypress / Selenium / WebdriverIO / Appium / Espresso / XCUITest / RestAssured / Karate / k6 / Locust with side-by-side tradeoffs on speed, cross-browser, mobile, parallelisation, language support, ecosystem maturity, CI integration; a decision tree matching project NFRs to framework choice; and reference layouts for the chosen stack. references/ extends the same decision to commercial procurement (seven-axis vendor evaluation for TCM platforms, no-code tools, visual-regression services) and to recording the outcome (ADR-based tool-selection decision record with signal, one recommendation, flip conditions). This is the upstream selection step: it decides which tool to adopt, not how to configure one already chosen. Use when starting a new test-automation suite, evaluating commercial QA vendors, or writing down a tool decision.
risk-matrix
The risk-based testing (RBT) umbrella: risk matrix and risk register authoring, likelihood x impact scoring, risk storming, calibration, and risk-to-test coverage mapping. Produces the per-feature / per-release matrix artifact (structured intake: feature, category, impact 1-5 by likelihood 1-5, score; heatmap; mitigations with owners and due dates), supporting lightweight and heavyweight (FMEA / Cost of Exposure) methods per RBT canon, plus a risk coverage mapping workflow that proves which tests, cases, or monitors back each registered risk. references/ carries the product-risk and project-risk register variants, the risk-storming facilitation guide, matrix calibration against observed defect data, and a register review checklist. Use for any risk-based-testing artifact: building a matrix or register, running a risk-storming session, calibrating ratings against defects, or mapping risks onto test coverage.
smoke-suite-gate
Build-an-X workflow for a critical-path smoke suite that runs in <5 minutes - picks the 5-15 highest-business-value journeys (login, hero flow, checkout, payment, primary read), implements as fast E2E or API tests, gates per-deploy, retries on transient failures with quarantine. Use as the canary-precursor or per-deploy verification gate; the team's "if this fails, the build can't proceed" floor.
test-case-from-live-feature
Build-an-X workflow that produces a test-case matrix from a **live, undocumented feature** - running app at a URL, screen recording, screenshot, or verbal brief - by combining structured exploration (Playwright trace / DevTools / accessibility tree) with the four canonical heuristic test-design models bundled in references/ (Bach's HTSM / SFDPOT product elements, Whittaker's How-to-Break-Software attacks, Bolton's FEW HICCUPPS consistency oracles, ISO/IEC 25010 quality characteristics). Output is a structured case matrix, not an exploratory session charter. Use when there is no story, no AC, and no documentation - only a live feature - or as the heuristic reference layer for zero-documentation test design.
test-case-ideation-from-story
Turns a thin or ambiguous story into a reviewable test list - a backlog item that is a short paragraph plus the click-through support recorded for themselves, a spec that is mostly a list of accepted formats, or a tech design pasted into the ticket while the last few releases still shipped missed cases. Takes the story or feature spec and emits a markdown test-case matrix, one row per case (id, title, precondition, steps, expected, tier), covering happy path, alternate paths, boundaries, and negative paths, before any test code is written. Output is the human-reviewable matrix that goes into TestRail / Qase / Xray, not Gherkin scenarios. Use when a story needs its cases enumerated and agreed before automation starts.
test-effort-estimation
Turns a list of testable areas plus a change-shape distribution into a PERT three-point test effort estimate, reporting every row as a range around the expected value rather than a single number, requiring a named assumptions ledger across six mandatory categories, and recommending a per-layer ownership split across developer, automation, and exploratory roles. Bundles the change-shape classifier (pure-logic / service-layer / ui-heavy / data-heavy from git-history path and content signals, with the relative per-layer cost model) as a reference, so the shape distribution the estimate consumes can be produced here too. Does not choose which tests to run or how deep coverage should go. Use when an epic or release has been broken into testable areas and someone is about to commit test capacity for a sprint, or when a change set needs its shape classified before planning.
test-pyramid-balancer
Build-an-X workflow that analyzes a repo's test mix (unit / integration / E2E counts + runtimes) and recommends rebalancing toward the test pyramid ratios per the change-set shape - pure-logic-heavy repo wants ~80/15/5; UI-heavy repo wants ~60/25/15. Detects 'ice-cream cone' (E2E-heavy) and 'hourglass' (integration-thin) anti-patterns. Use when the user asks about test distribution, test strategy, test balance, too many E2E tests, slow CI caused by tests, testing best practices, or rebalancing their test suite; also suitable for quarterly calibration of the test mix to codebase reality.
test-strategy-author
Authors a test strategy document (a master test plan) for a project, release, or feature - covers scope, in/out, test types per layer (unit / integration / contract / E2E / perf / security / a11y), risk-based test prioritization that maps top risks to test investment (per `risk-matrix`), tooling stack, environments, exit criteria, and ownership. Includes a risk-based test-planning workflow that turns a feature scope plus the risk matrix into a budgeted per-risk test plan with owners, effort estimates, and an explicit risks-not-addressed section. Use when a team needs the release-readiness artifact stakeholders sign off on before significant test investment, or a risk-prioritized test plan for a feature or quarter.