Logo Write A Postmortem

Write A Postmortem

Tổ chứcPhổ biến
inkeep
write-a-postmortem

Viết bản đánh giá sau sự cố không đổ lỗi trong thư mục postmortems/ theo cấu trúc Google SRE — dòng thời gian dựa trên bằng chứng, phân biệt tác nhân kích hoạt với nguyên nhân gốc rễ và triệu chứng, các yếu tố góp phần, những việc đã làm tốt, cùng các đầu việc hành động có người phụ trách, ngày hoàn thành và cách xác minh. Đọc khi được yêu cầu viết bản đánh giá sau sự cố, đánh giá sự cố, phân tích nguyên nhân gốc rễ, ghi lại sự cố gián đoạn dịch vụ, nhìn lại sự cố hoặc khi người dùng nói đã xảy ra sự cố và muốn lập tài liệu. KHÔNG đọc để định hướng đề xuất (dùng frame-a-proposal), viết đặc tả (dùng write-a-spec), ghi lại quyết định (dùng record-a-decision) hoặc đánh giá thiết kế (dùng review-a-design) — bản đánh giá sau sự cố ghi lại sự việc đã xảy ra, chứ không đề xuất, đặc tả, quyết định hay phê bình công việc trong tương lai.

Add to TypingMind

Tổng quan

Nhà phát hànhinkeep
Kho mãopen-knowledge
Tên kỹ năngwrite-a-postmortem
Sao
4.2K
Bản fork
279
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépGPL-3.0
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được inkeep công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Write A Postmortem trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/inkeep/open-knowledge/tree/main/packages/server/assets/skills/packs/software-lifecycle/write-a-postmortem
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/inkeep/open-knowledge.git /tmp/open-knowledge
mkdir -p .claude/skills
cp -r /tmp/open-knowledge/packages/server/assets/skills/packs/software-lifecycle/write-a-postmortem .claude/skills/write-a-postmortem
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Write A Postmortem trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Write A Postmortem ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Write A Postmortem với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Write a postmortem

The platform /open-knowledge skill still governs every markdown operation here — folder scope, the read/write tool surface, linking, and preview. This skill layers postmortem craft on top of it; it does not replace those rules.

A postmortem is not a status update and not a blame ledger. It is a durable, blameless reconstruction of one incident, built from evidence, that makes the system's failure mode legible and produces action items someone will actually verify. The value compounds only when postmortems that share a subsystem link to each other — that is how a repeat class stops being invisible.

This pack scaffolds proposals/, decisions/, specs/, postmortems/, and guides/ at the project root. Postmortems live in postmortems/, one file per incident, filename YYYY-MM-DD-name.md, template id postmortem. Action items that are guide-shaped produce runbook stubs in guides/.

The knowledge base is markdown owned by OpenKnowledge MCP. Read and list in-scope markdown with exec (exec("ls -A postmortems/"), exec("cat postmortems/2024-03-02-auth-outage.md"), exec("grep -rln failover .")) and search({ query: "..." }); create and edit with write and edit; inspect the link graph with links. Never use native Read/Edit/Grep/Glob/cat on in-scope markdown. Source code, logs, dashboards, deploy history, and chat transcripts are OUTSIDE the knowledge base — read those with the host's native tools. Links are plain markdown relative links [db failover](./guides/db-failover.md) — never backticked, never HTML anchors.


Step 0 — Blamelessness gate (stated first because it constrains every later step)

Blameless is a mechanical discipline, not a slogan you paste in the header. If you cannot follow these rules mechanically, the document is not blameless no matter what it says at the top.

  • Name systems and roles, never individuals. "the deploy pipeline," "the on-call engineer," "the release process" — not "Alice," not "the new hire." A named person turns readers defensive and the analysis stops.
  • Write the system's affordance, not the person's action. "The deploy pipeline allowed an unreviewed config to reach production" — not "Alice deployed an unreviewed config." The grammatical subject is the system that permitted the outcome. If your sentence's subject is a person, rewrite it until it is a system.
  • Treat every human action as the reasonable action given the information available at that moment. Nobody caused the incident by being careless. Someone did the sensible thing with the signals they had. The analytical question is never "why did they do that?" — it is "what made that look like the right move at the time?" A dashboard that read green, an alert that never fired, a runbook that said to do exactly that. Find the thing that made it reasonable; that thing is a contributing factor.

HARD GATE. If the user's framing is blame-seeking — "write up how Alice broke prod," "document who screwed up the deploy" — do not comply as asked. Say so plainly, reframe to the system question, and only then write. Example reframe: "I'll write this blamelessly — the useful question isn't who pushed the config but what let an unreviewed config reach production. That's the finding that prevents a recurrence." Producing a named-culprit document because the user asked for one is the single worst failure this skill can commit; it poisons the postmortem culture the document is supposed to build.


Step 1 — Gather evidence before you narrate

You cannot write a timeline from memory and call it a postmortem. Gather first, narrate second.

Pull, using the host's native tools (these live outside the knowledge base):

  • Alerts and monitoring — what fired, when, and what did not fire that should have.
  • Deploy and release history — what shipped in the hours before, and the exact commit/config.
  • Dashboards and metrics — error rate, latency, saturation, the graphs that show onset and recovery.
  • Chat transcripts and the incident channel — timestamps of human decisions and the reasoning in the moment.
  • The code and config as it stood at incident time — not as it stands now; check out or read the state at the incident SHA.

HARD GATE — no timeline entry without a source you can point at. Every timeline line cites its evidence: an alert ID, a deploy timestamp, a graph, a chat message time. If you are reconstructing a moment from someone's recollection and have no artifact, you may still include it — but label it inline: (reconstructed from recollection, no artifact). A postmortem whose timeline silently blends logged fact with memory is worse than one that admits the gap, because the reader cannot tell which numbers to trust.


Step 2 — Scan prior postmortems for the same subsystem

Before writing, find out whether this already happened.

  1. exec("ls -A postmortems/") — see every prior incident at a glance.
  2. search({ query: "<subsystem> <failure mode>" }) — semantic match on the affected component (e.g. "database failover replication lag").
  3. exec("grep -rln <subsystem-keyword> postmortems/") — exact-term sweep for the service, the error, the mechanism.
  4. exec("cat postmortems/<candidate>.md") on the 1–3 closest matches — read their Root cause and Action items.

If this is a repeat of a class already documented, that is the most important finding in the entire document — and it belongs in the Summary, not buried in Related. A recurrence means a prior action item did not land, or landed and did not prevent recurrence. State it in the first two sentences: "This is the third connection-pool exhaustion incident in the payments service (see 2024-01-11, 2024-03-02); the action item from the second was never completed." Repeat classes are where postmortems earn their keep — surface them loudly.


Step 3 — Create the postmortem from the template

write({ document: { path: "postmortems/YYYY-MM-DD-name.md", template: "postmortem" } })
  • The date is the incident date, not today's. If the outage was 2024-03-02, the filename is postmortems/2024-03-02-name.md even if you write it a week later.
  • name is a short kebab slug of the affected system and failure: payments-pool-exhaustion, auth-cert-expiry, search-index-corruption.
  • The postmortem template scaffolds the SRE shape: Summary / Timeline / Root cause / What went well / Action items. Fill each in the steps below; do not invent a different structure.

Step 4 — Summary: impact first, cause second

The Summary is read by people who will never read the rest. Write it for the org, not for the on-call engineer.

  • Lead with user-visible impact: who was affected, how, and for how long. "For 47 minutes, roughly 12% of checkout attempts failed with a 500." Not "the connection pool saturated."
  • Then one sentence of cause, plain: "A config change halved the pool size while traffic was at peak; the pool exhausted and requests queued past timeout."
  • If Step 2 found a repeat class, it goes here (see Step 2).

A summary that leads with the technology ("the connection pool saturated at 14:03") and buries the impact is written for engineers, not for the organization that needs to weigh the incident. Impact is the currency; state it first and in human terms.


Step 5 — Timeline: timestamped, sourced, with the detection gap made explicit

Reconstruct the incident chronologically. Every entry: a timestamp with time zone, what happened, and the evidence it came from.

- 13:52 UTC — Config change #4821 merged, halving `pool.max` from 200 to 100. (deploy log, PR #4821)
- 14:03 UTC — Checkout error rate crosses 5%. (Grafana, checkout-errors panel)
- 14:19 UTC — First page fires to on-call. (PagerDuty incident #9917)
- 14:26 UTC — On-call acknowledges, begins investigating a suspected upstream issue. (incident channel)
- 14:41 UTC — Config change identified as cause; rollback initiated. (incident channel)
- 14:50 UTC — Error rate returns to baseline. (Grafana)
  • Call out detection time and mitigation time explicitly. Mark the entry where the incident began, where it was detected, and where it was mitigated.
  • The gap between incident start and detection is usually the most actionable number in the document. Here: onset 14:03, first page 14:19 — sixteen minutes blind. Name that gap in prose right after the timeline: "Detection lagged onset by 16 minutes; there was no alert on checkout error rate, only on host CPU." That sentence is often the source of the highest-leverage action item.
  • Keep entries factual and sourced. Analysis goes in Root cause, not here.

Step 6 — Trigger vs root cause vs symptom

Give the reader the three definitions, then separate them cleanly. Conflating them is the most common way a postmortem produces a shallow fix.

  • Symptom — what was observed. "Checkout requests returned 500s; the pool showed zero free connections." The symptom is real but it is not the cause; fixing the symptom (restart, scale up) ends the incident without preventing the next one.
  • Trigger — the specific thing that set it off. "Config change #4821 halved the pool size at peak traffic." The trigger is necessary to the story but rarely the whole cause.
  • Root cause — the condition that made the trigger sufficient to cause the outage. Not "a bad config was pushed" — ask what made a bad config pushable to production at peak with no guard. The root cause is usually a missing safeguard, not the triggering action.

Push past the first plausible cause. If your answer is "someone pushed a bad config," you have named the trigger and stopped. Keep going: What allowed an unreviewed config to reach production? Why was there no validation on pool-size bounds? Why did no canary catch it? Techniques like "five whys" help you keep asking — but they are a prompt, not a proof, and they tend to walk you down a single chain when reality had several. Most incidents have several contributing factors and one or two root causes, not a single linear chain. Name the one or two conditions that, if they had not held, the trigger would have been harmless.


Step 7 — Contributing factors

The conditions that widened the blast radius, delayed detection, or slowed recovery. These are not the root cause but they are why the incident was as bad as it was — and each is usually its own action item.

Look specifically for:

  • Missing or misrouted alerts — the detection gap from Step 5 almost always lands here.
  • Absent or stale runbook — no documented recovery path, so the on-call improvised. Check guides/ and its last_verified dates.
  • Unclear ownership — nobody knew who owned the failing component, so acknowledgement lagged.
  • A stale guide — a runbook that said to do the thing that made it worse, or whose last_verified was long past.
  • Compounding conditions — peak traffic, a concurrent deploy freeze, a second on-call already paged.

List each as a discrete factor. Vague "communication could have been better" is not a factor; "there was no owner mapping for the payments pool, so the first page went to the wrong team for 7 minutes" is.


Step 8 — What went well (genuinely)

This section is not filler and skipping it quietly is a failure mode. Something limited the damage; name it so the org preserves it.

  • What made detection or recovery faster than it could have been? A good dashboard, a fast rollback path, a clear escalation.
  • What held up under load? The circuit breaker that shed load cleanly, the read replica that absorbed traffic.
  • Which prior action item paid off here? If a previous postmortem's fix limited this incident, say so and link it — that is the strongest possible argument for funding action items.

Write it honestly. If genuinely little went well, say that plainly rather than manufacturing praise — "recovery was slow and manual; the one thing that worked was that rollback was a single command." Preserving what worked is as much the point as fixing what didn't.


Step 9 — Action items: owned, dated, verifiable

An action item with no owner is a wish. Every item gets three things or it does not go in the list:

  • An owner — a role or team (blameless: "the payments team," not a person's name unless the person self-assigns).
  • A due date — a real date, not "soon."
  • A verifiable done-condition — something you could check and unambiguously call done. "Add an alert on checkout error rate >2% for 3 minutes, tested by triggering it in staging" — not "improve alerting."

Classify each item by what it buys you:

  • Prevention — stops this exact recurrence (add pool-size validation to the config pipeline).
  • Mitigation — limits the damage next time it happens anyway (auto-shed load when the pool saturates).
  • Detection — finds it sooner (the missing error-rate alert from Step 5).

A healthy postmortem has items across all three; a list that is all prevention often means the detection and mitigation gaps went unexamined.

Guide-shaped action items produce runbook stubs. When an item is "write/fix the recovery runbook for X," don't just name it — stub it now:

write({ document: { path: "guides/db-pool-exhaustion-runbook.md", template: "runbook" } })

Pre-fill the stub with the symptom (how you'd recognize this again — "checkout 500s + pool free-connections at zero") and the relevant timeline excerpt (the rollback steps that actually worked, lifted from Step 5). Then link the stub from the action item: - [ ] Payments team, by 2024-03-16: complete the [pool-exhaustion runbook](./guides/db-pool-exhaustion-runbook.md), verified by a tabletop dry-run. The runbook carries last_verified frontmatter so it surfaces in review when it goes stale.


Step 10 — Link and validate

  • Add a ## Related section linking every prior postmortem that shares a subsystem (from Step 2), plus the decisions/ and specs/ implicated — the decision that set the config policy, the spec for the component that failed. [2024-01-11 payments pool](./postmortems/2024-01-11-payments-pool.md), [connection-pool sizing decision](./decisions/2023-11-04-pool-sizing.md).
  • Link the runbook stubs you created in Step 9 from their action items (done above) and from ## Related.
  • Update the hub of any folder you touched if it has one (an INDEX.md in postmortems/) so the new incident shows up in the index — the preview becomes a live progress bar.
  • Validate: audit({ path: "postmortems/YYYY-MM-DD-name.md" }) returns clean (every lint violation + broken internal link) — fix every finding. Confirm frontmatter is complete and the Summary / Timeline / Root cause / What went well / Action items sections are all filled, none left as template placeholder.

Step 11 — Recap

Close in conversation with four things, tightly:

  1. Impact in one line, user-visible terms.
  2. Root cause in one sentence (the condition, not the trigger).
  3. The single highest-leverage action item — usually the one that closes the detection gap or the missing safeguard.
  4. Whether this is a repeat class — and if so, why the prior fix didn't hold.

Then point at the file: postmortems/YYYY-MM-DD-name.md and any runbook stubs created.


Non-goals

  • Don't assign blame to people. Systems and roles, never individuals. If a name is load-bearing to the story, the story is framed wrong — find the system affordance instead.
  • Don't stop at the first plausible cause. "A bad config was pushed" is a trigger. Keep asking what made the trigger sufficient until you reach a missing safeguard.
  • Don't write action items you cannot verify. No owner, no date, no checkable done-condition means it is a wish, not an action item. Leave it out or fix it.
  • Don't quietly omit "what went well." Skipping it loses the practices worth preserving. If little went well, say so honestly rather than dropping the section.
  • Don't use a postmortem to relitigate a design decision. A postmortem documents what happened and what to change operationally. Arguing that the architecture should have been different belongs in a proposal (/frame-a-proposal) or a design review (/review-a-design) — link to it from Related; don't fight it here.
  • Don't fabricate the timeline. No entry without a source you can point at; reconstructed-from-memory entries are labelled inline as such.

Câu hỏi thường gặp

Kỹ năng AI Write A Postmortem làm được gì?

Viết bản đánh giá sau sự cố không đổ lỗi trong thư mục postmortems/ theo cấu trúc Google SRE — dòng thời gian dựa trên bằng chứng, phân biệt tác nhân kích hoạt với nguyên nhân gốc rễ và triệu chứng, các yếu tố góp phần, những việc đã làm tốt, cùng các đầu việc hành động có người phụ trách, ngày hoàn thành và cách xác minh. Đọc khi được yêu cầu viết bản đánh giá sau sự cố, đánh giá sự cố, phân tích nguyên nhân gốc rễ, ghi lại sự cố gián đoạn dịch vụ, nhìn lại sự cố hoặc khi người dùng nói đã xảy ra sự cố và muốn lập tài liệu. KHÔNG đọc để định hướng đề xuất (dùng frame-a-proposal), viết đặc...

Vì sao nên dùng Write A Postmortem trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Write A Postmortem là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Write A Postmortem trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/inkeep/open-knowledge/tree/main/packages/server/assets/skills/packs/software-lifecycle/write-a-postmortem. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Write A Postmortem?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Write A Postmortem với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Write A Postmortem với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Write A Postmortem có miễn phí không?

Có. Kỹ năng này được inkeep phát hành trên GitHub theo giấy phép GPL-3.0. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇