id = "incident-postmortem" name = "Incident Postmortem" description = "Turn raw incident notes into a structured postmortem: timeline, root cause, impact assessment, and action items." category = "engineering" tags = ["incident", "postmortem", "devops", "reliability"] [i18n.zh] name = "故障复盘" description = "将原始故障记录整理为结构化复盘报告:时间线、根因分析、影响评估和行动项。" [[parameters]] name = "incident_notes" description = "Raw notes, chat logs, or timeline from the incident" param_type = "string" required = true [[parameters]] name = "service_name" description = "Name of the affected service or system" param_type = "string" required = false default = "" [[steps]] name = "timeline" prompt_template = """ You are an SRE writing a postmortem. From the raw incident notes below, reconstruct a clean chronological timeline: - Format: [HH:MM UTC] — event description - Include: first alert, detection, escalation, mitigation steps, resolution - Note who was involved at each stage - Mark the start and end of user impact Service: {{service_name}} Raw notes: {{incident_notes}} """ [[steps]] name = "root_cause_analysis" prompt_template = """ Perform a thorough root cause analysis using the 5-Whys method: 1. Immediate trigger 2. Five-whys chain down to the systemic root cause 3. Contributing factors (monitoring gaps, process failures, dependency issues) 4. Detection gap — why it took as long as it did to detect Timeline: {{timeline}} """ depends_on = ["timeline"] [[steps]] name = "postmortem_report" prompt_template = """ Write a complete postmortem report with these sections: ## Summary One paragraph: what happened, impact, duration, resolution. ## Impact Quantified: users affected, error rate, revenue/SLA impact. ## Timeline (Use the timeline above) ## Root Cause (Use the RCA above) ## What Went Well ## What Went Wrong ## Action Items Table: | Action | Owner | Priority | Due date | Minimum 5 concrete, measurable actions. ## Lessons Learned Timeline: {{timeline}} Root cause analysis: {{root_cause_analysis}} """ depends_on = ["timeline", "root_cause_analysis"]