インシデント後の振り返り文書と一緒に仕事をします。チームがインシデント(障害や問題が発生した状況)後に作成する総括資料を扱います。 **次のような場合に使用:** - 振り返り文書(ポストモーテム・事後レビュー・振り返りミーティング記録など)を見つけたり、作成したり、読んだり、文章を修正したり、実際に起こったことと照らし合わせて検証する場合 **対応する業務:** - 文書のセクションを書き直す - 主張や記述の誤りを修正する - タイムライン(時系列の出来事)や学習事項を追加する - 記載内容が妥当かどうかを判断する - 足りない情報を特定する - フォローアップすべき事項を見分ける ※インシデント全般についての一般的な質問は、別の「インシデント」スキルで対応します。
Work with an incident's postmortem document — the write-up a team produces after an incident. Use when the conversation is about a postmortem, post-incident review, debrief or retro document: finding it, creating one, reading it, changing its text, or reviewing it against what actually happened. Covers rewriting a section, fixing a claim, adding a timeline entry or a learning, and also judging whether its claims hold up, what is missing, and what should become a follow-up. Not for general questions about an incident, which is the incidents skill.
A postmortem is generated from a template: a set of sections, each with a title and, often, help text telling the writer what belongs there. The help text is the standard a section is measured against.
An incident usually has one document, but it can have several.
Everything here is one of three jobs. Finding and reading comes first and both other jobs depend on it, because which rendering you read decides whether your work lands. Editing changes the text. Reviewing judges it and changes nothing.
Find it with postmortem_list. Pass incident_id to scope it to one incident: an
ID, an external ID, or a reference like INC-123. Each result carries the id the other
tools take, with the title, status and whether it is the incident's primary document.
Check what kind of document it is, and whether it exists yet. Everything below works
on in_app documents. An external one lives in a provider such as Notion, named in
provider, and nothing here reads or edits it: give the user its url. A state of
pending means it is still being created and holds only a placeholder, so wait for
created before reading it. failed means it never was, with the reason in error:
tell the user rather than trying again unasked.
An incident can hold several documents. When more than one comes back and the user said "the post-mortem", tell them what exists and let them choose. Do not take the primary one as what they meant — working on the wrong document is silent, and they will not find out from you.
You already have the id without calling this when incident_show was run with
include: ["postmortem"], which carries the primary document's. That is the primary one
only, so it answers "the post-mortem" and not "which post-mortems".
When there isn't one, postmortem_create makes it. Choose a template with
postmortem_template_list, passing the incident to see its default. The template's
kind decides what you get: an in_app document, or an external one, which goes to a
destination from postmortem_destination_list or to the incident's default. A document
made from a template comes back pending: follow it with postmortem_list until it is
created. To write the post-mortem yourself, pass content as markdown instead of a
template, and it exists straight away.
There are two renderings of the same document, and they are not interchangeable.
| what it is | what to use it for | |
|---|---|---|
Reader's form — incident_show with include: ["postmortem"] |
the document as a person sees it: mentions are names, and the blocks that fill themselves in from the incident are the lists they display | reading, quoting, reviewing |
Editable form — postmortem_show |
the same document with those parts as HTML tags carrying their IDs | the only valid source of anchors for an edit |
Reading the reader's form and then editing from it is the most common way to waste a call: that text is not in the document, so nothing matches it. Read the form that fits the job you are about to do.
Read format://postmortem-document before writing a tag you cannot copy from the
document in front of you. It lists every tag, its attributes and an example, and it is
the only place they are written down.
You change the document by describing string operations on its markdown. Read it with
postmortem_show, copy the exact text you want to act on out of what came back, and send
that text as the anchor for your edit. There is no cursor, no line number and no section
addressing: an anchor is a substring, and it has to match.
Everything in this section exists because that one mechanism has sharp edges.
postmortem_edit takes the document ID and a list of edits, up to 50 in one call. The
call returns the whole document as markdown.
Anchor your next edit on what came back, never on what you sent. The returned markdown is re-rendered from the document, so the bullet characters, blank lines and escaping you wrote may not be the bytes now stored. A second edit built from your own text is the single most common way to get "Found nothing matching".
Within one call, each edit applies to the result of the edit before it. If your second edit anchors on text your first edit rewrote, anchor on the new text.
The whole call is refused if any single edit is, so nothing is ever half-applied. Fix the edit that was named and send the batch again.
| op | fields | what it does |
|---|---|---|
replace |
old_string, new_string |
swaps a run of text, or one tag for another |
delete |
old_string |
removes a run of text, or a whole node |
insert_before |
anchor, text |
adds blocks before the block the anchor sits in |
insert_after |
anchor, text |
adds blocks after the block the anchor sits in |
prepend |
text |
adds blocks at the very start of the document |
append |
text |
adds blocks at the very end |
replace works at any scale: a word, a sentence, a whole section including its heading.
Prefer one replace spanning a rewritten paragraph over five small ones, because every
anchor is another chance to miss.
insert_before and insert_after add blocks. They widen the anchor to the whole
block containing it and insert either side of that, so you cannot use them to put words
in the middle of a sentence. Use replace for that: make old_string the part of the
sentence you are changing and new_string the version with your words in it.
new_string may not be empty. Removing text is delete, which also tidies up the blank
lines the removed block leaves behind.
Inserted text is parsed as markdown, so headings, lists, tables and formatting all work, and so do tags.
An anchor must appear exactly once in the document. Nothing is guessed: an anchor matching nothing is refused, and an anchor matching several places is refused with the surrounding text of each match so you can see what you hit.
**bold** in the markdown, and an anchor without the asterisks does not match it. The
same goes for links, inline code, list markers and heading hashes.A postmortem holds things markdown has no syntax for: mentions carrying the ID of a person or record, blocks that fill themselves in from the incident, marks with no markdown equivalent. These read and write as self-closing HTML tags.
Reported by <user id="01JOHANNA" value="Johanna Larsson" /> at <timestamp .../>.
<followups />
<user id="01JOHANNA" value="Johanna Larsson" /> with the words "Johanna Larsson"
turns a live reference into dead text. The document stops knowing who that is.format://postmortem-document. Writing a tag
from memory is how you get a tag name the document has no node for, which would be
stored as visible markup rather than as a mention. That is refused rather than written,
but it costs a round trip.<user_mention/> is read as prose. The schema's internal type names use
underscores; the tags do not.Dynamic blocks like <followups />, <timeline /> and <custom-fields /> are not text
you can correct. They render from the incident's own data. If the timeline is wrong, the
incident's timeline is wrong, and the fix is there rather than in the document. To see
what one of them currently says, read the reader's form.
The error says which edit and why. The common ones:
postmortem_show and copy from that.format://postmortem-document.The document is live and shared. Someone may have it open while you write to it, and there is no draft and no review step, so treat every call as publishing.
A review judges the document and changes nothing. Answer what is asked: a question gets an answer, a request to create a follow-up creates one. Offer a review only when the user asks for one.
When the user asks for a review, settle four things first:
If they decline to answer, or tell you to get on with it: review all three dimensions, assume an organisation-wide audience, and cover every section.
Use these as a guide for what to ask. Do not recite the framework at the user.
Factual quality — is it comprehensive and accurate?
Structure and tone — can a reader who was not there follow it?
Learning value — will it prevent the next incident?
The incident's own record is what a claim is checked against: incident_show,
incident_update_list for how the response unfolded, and action_list and
follow_up_list for what came out of it. Where telemetry is connected, a claim about
system behaviour — "the error rate increased tenfold" — can be checked against it rather
than taken on trust.
Some incidents have no telemetry. That is not a finding.
A review suggests; it does not write. When the user asks you to make the change rather
than describe it, go back to Editing above — and read the document with
postmortem_show first, because the text you quoted in the review came from the reader's
form and will not match.
A gap the review exposes — missing monitoring, a process that did not work — is worth a follow-up rather than a sentence in the document. Create one when the user asks, or offer when the gap is clear.
原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。