incident-postmortem-drafter

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

When to invoke

调用场景

  • You have an outage/incident timeline and need a consistent postmortem draft.
  • You want to standardize incident write-ups across teams.
  • 您拥有故障/事件时间线,需要一份格式统一的复盘文档草稿。
  • 您希望在团队间标准化事件复盘文档的撰写。

Inputs needed

所需输入

  • Incident metadata: title, date/time, duration, severity.
  • Impact summary: customer impact, internal impact, key metrics.
  • Timeline of events (timestamp + event).
  • Contributing factors (optional) and what went well/poorly.
  • Action items (optional; can be generated placeholders).
  • 事件元数据:标题、日期/时间、持续时长、严重程度。
  • 影响总结:客户影响、内部影响、关键指标。
  • 事件时间线(时间戳 + 事件内容)。
  • 促成因素(可选)以及表现良好/不佳的环节。
  • 行动项(可选;可生成占位符)。

Workflow

工作流程

  1. Validate required fields and normalize timestamps.
  2. Derive key milestones (start, detection, mitigation, resolution).
  3. Summarize impact and customer communication.
  4. Generate a blameless narrative: what happened and why (avoid personal attribution).
  5. Produce corrective and preventive actions (CPAs) with owners and due dates if provided; otherwise create placeholders.
  1. 验证必填字段并统一时间戳格式。
  2. 提取关键里程碑(事件开始、检测、缓解、解决)。
  3. 总结影响范围与客户沟通情况。
  4. 生成无责叙事:事件经过及原因(避免个人归因)。
  5. 生成纠正与预防措施(CPA),若提供负责人和截止日期则填入;否则创建占位符。

Output format

输出格式

Markdown report with:
  • Summary
  • Customer impact
  • Timeline
  • Root cause / contributing factors (blameless)
  • Detection and response analysis
  • What went well / what didn’t
  • Action items (table)
  • Follow-ups and references
Markdown报告包含以下部分:
  • 摘要
  • 客户影响
  • 时间线
  • 根本原因/促成因素(无责视角)
  • 检测与响应分析
  • 表现良好/不佳的环节
  • 行动项(表格形式)
  • 后续跟进与参考资料

Guardrails

约束规则

  • Do not assign blame to individuals; focus on systems and process.
  • If inputs are missing, call them out explicitly rather than inventing facts.
  • Keep timestamps and units consistent.
  • 不得将责任归咎于个人;聚焦于系统与流程问题。
  • 若输入信息缺失,需明确指出,而非编造内容。
  • 保持时间戳与单位格式一致。

Reference code

参考代码

  • postmortem_drafter.py
    reads a JSON incident file and writes a Markdown postmortem.
  • postmortem_drafter.py
    读取JSON格式的事件文件并生成Markdown格式的复盘文档。