When a deploy or post-deploy check fails on the main branch, assembles a decision packet covering what changed since the last known-good revision, which revision is currently serving, signal deltas, and whether the release included a database migration. Recommends roll back, roll forward, or hold and investigate, then routes the recommendation through an approval gate. On approval, dispatches the rollback workflow and publishes a record of the decision.
- Identifier
rollback-decision-assistant- Version
- 1.0.1
- Steps
- 7
- Triggers
- 1
- rollback
- incident
- ci_cd
- approval
- reliability
- on-call
When it runs
ci_workflow.completed- Settle delay
- 30s after the event
Only when all hold
- ciWorkflow.conclusion equals failure
- ciWorkflow.branch in main, master
- 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.
- 01CI Failed on Main
triggerThe event that starts the run.
- 02Clone Failing Branch
git.cloneShallow-clones the repository at the right ref.
- 03Assemble Rollback Decision Packet
agent.runOne agent works the task with its toolkit.
- 04Approve Rollback
approval.gatePauses the run until a human decides.
- 05Dispatch Rollback Workflow
ci.executeWorkflowDispatches a CI workflow on the provider.
- 06File Rollback Declined Ticket
ticket.createOpens a ticket on the connected tracker.
- 07File Rollback Outcome Ticket
ticket.createOpens a ticket on the connected tracker.
Branches
- rollback_gate to publish_rejected: runs only if the step above failed, was rejected, or timed out
The agent
Rollback Decision Analyst
- Base type
- Senior Developer
- Temperature
- 0.2
- Max iterations
- 40
- Tools
- 5
CI/CD · 2
get_ci_run_logsGet CI Run Logs · readlist_pr_ci_runsList PR CI Runs · read
Terminal · 1
run_terminal_cmdRun Terminal Command · write
Filesystem · 1
read_fileRead File · read
Status · 1
update_statusUpdate Status · write
Related playbooks
Incident Response
Treats CI failures on protected branches as potential incidents and starts the response.
Deploy Verification
After a deploy workflow succeeds, independently verifies that serving revisions, health endpoints, and client bundles match the built commit.
Release Readiness Gate
Assembles a release readiness report, pauses for human approval, then dispatches the release pipeline.