Generate structured, blame-free incident postmortem reports with timeline reconstruction, log analysis, and action item tracking.
bash
# Create a postmortem from scratch (fills in template sections)
python3 scripts/generate_postmortem.py --title "Database outage" --severity P1
# Parse logs to auto-extract timeline events
python3 scripts/generate_postmortem.py --title "API latency" --log /var/log/app.log --since 2h
# Load a complete incident from JSON
python3 scripts/generate_postmortem.py --from incident.json --output html -o postmortem.html
# Combine logs + manual timeline
python3 scripts/generate_postmortem.py --title "Deploy failure" --log /var/log/deploy.log --timeline events.json
# Check existing document for blameful language
python3 scripts/generate_postmortem.py --check-blame existing-report.md
--check-blame on any document.FlagDefaultDescription--titlerequiredIncident title--severityP2P0, P1, P2, or P3--datetodayIncident date--durationTBDHow long it lasted--summary—Brief summary text--log—Log file path (repeatable)--sinceallTime filter for logs (1h, 24h, 7d)--timeline—Timeline JSON file--from—Load full incident from JSON--outputmarkdownOutput format: markdown, html, json-ostdoutOutput file path--check-blame—Check file for blameful language
--log /var/log/app.log --log /var/log/nginx/error.log --since 4hpython3 scripts/generate_postmortem.py --title "..." --severity P1 --log ... -o draft.md--check-blame draft.mdincident.json with full details (see references/templates.md for schema)--from incident.json --output html -o postmortem.htmlUse JSON output to track action item completion across multiple postmortems.