| name | runbook-generator |
| description | Create and review production operational runbooks from repository and platform evidence. Use when documenting deployments, rollbacks, incidents, database maintenance, disaster recovery, scaling, or recurring operator procedures that require safe commands, explicit preconditions, verification, escalation, and rehearsal. |
| zh_description | 用于基于仓库和平台证据编写安全、可演练、可验证的生产运维 Runbook。 |
| version | 2.0.0 |
| author | seaworld008 |
| source | in-house |
| source_url | |
| tags | ["generator", "runbook", "operations", "sre", "safety"] |
| created_at | 2026-03-04 |
| updated_at | 2026-07-27 |
| quality | 5 |
| complexity | advanced |
Runbook Generator
Create operator-ready procedures from evidence. Never invent commands, account
names, URLs, thresholds, rollback behavior, or escalation contacts.
Required Inputs
Collect before writing:
- service and environment in scope
- repository configuration and deployment manifests
- current platform/provider documentation
- dependency and data-store topology
- observability links and known-good health signals
- change authority, approval boundary, and escalation owner
- recovery objectives when relevant: RTO, RPO, and maximum tolerated impact
If any production-critical input is unavailable, mark it TBD — owner required
instead of supplying a plausible value.
Evidence Discovery
Inspect likely sources:
rg --files -g 'Dockerfile*' -g 'docker-compose*.yml' -g 'compose*.yaml'
rg --files -g '.github/workflows/*.yml' -g 'terraform/**' -g 'k8s/**'
rg --files -g 'vercel.json' -g 'fly.toml' -g 'render.yaml'
rg -n "DATABASE_URL|migrate|rollback|health|readiness|liveness" .
Read the actual scripts and provider configuration before quoting a command.
Confirm current CLI syntax against official documentation when the platform may
have changed.
Safety Classification
Classify every step:
| Class | Meaning | Required handling |
|---|
| Read-only | Observes state | Safe to rehearse with non-secret fixtures |
| Reversible | Changes state with a proven undo | State precondition and rollback |
| Destructive | Deletes, truncates, resets, rotates, or revokes | Explicit approval and backup evidence |
| Irreversible | Cannot restore exact prior state | Separate break-glass procedure |
Never present destructive database reset, force push, bucket deletion, secret
revocation, or irreversible migration as a routine rollback.
In particular, commands such as prisma migrate reset, , ,
, , and require a
destructive-operation warning and must not appear as the default production
path.