When an issue labelled incident is closed, reconstructs the incident timeline from the issue body and comments, linked pull requests, commits, CI runs, and deploys in the window. Drafts a blameless postmortem and posts it as an issue comment for humans to edit. Set the repository on the report step after importing.
- Identifier
postmortem-drafter- Version
- 1.0.0
- Steps
- 3
- Triggers
- 1
- postmortem
- incident
- observability
- blameless
- automated
When it runs
issue.closed- Settle delay
- 15s after the event
Only when all hold
- issue.labels contains incident
- actor.username not contains [bot]
The pipeline
The graph below is the one the workflow opens with in the builder — same steps, same layout, drawn on the same canvas. The run playing through it is a simulation; the branches and conditions are real.
- 01Incident Issue Closed
triggerThe event that starts the run.
- 02Draft Blameless Postmortem
agent.runOne agent works the task with its toolkit.
- 03Publish Postmortem Comment
report.publishPosts or updates a deduplicated report comment.
The agent
Postmortem Drafter
- Base type
- Tech Writer
- Temperature
- 0.25
- Max iterations
- 40
- Tools
- 6
Git provider · 3
read_pull_requestRead Pull Request · readlist_pull_requestsList Pull Requests · readcreate_issue_commentCreate Issue Comment · write
CI/CD · 2
list_pr_ci_runsList PR CI Runs · readget_ci_run_logsGet CI Run Logs · read
Status · 1
update_statusUpdate Status · write
Related playbooks
Alert to Ticket Enrichment
Turns a raw alert into an actionable ticket with a hypothesis, owning code, suspect deploys, and prior occurrences.
Error Budget Report
Weekly SLI/SLO report that computes error-budget burn rate and states the policy consequence when a budget is more than 75% consumed.
Log Anomaly Sweep
Daily clustering of production error logs, surfacing novel signatures and investigating the emitting code, suspected commit, and proposed fix.