Platform teams that treat prompts as production code need repeatable migration runbooks, not ad-hoc rollout notes. This prompt is designed for the release-preparation phase, specifically after compatibility checks and dry-run simulations have surfaced risks, but before the migration is handed off to SREs or operators. The ideal user is a platform engineer, release manager, or AI ops lead who has access to evidence from past instruction rollouts, incident reports, and team debriefs. The job-to-be-done is converting that raw operational history into a structured, step-by-step migration playbook that QA, SRE, and product teams can execute with clear checkpoints, rollback triggers, and communication templates.
Prompt
Migration Playbook Generation Prompt for Platform Teams

When to Use This Prompt
Defines the ideal scenario, required inputs, and boundaries for the migration playbook generation prompt.
To use this prompt effectively, you must provide concrete evidence as input: post-mortems from previous migrations, compatibility reports, dry-run simulation results, and a list of affected agent sessions or services. The prompt expects [EVIDENCE_DOCUMENTS] to be rich and specific; vague summaries will produce a vague playbook. The output is a structured plan with explicit phases, each containing a step description, the responsible team, a success checkpoint, a rollback trigger, and a communication template for stakeholders. For example, a checkpoint might be 'Verify that <5% of migrated sessions throw the new instruction compatibility error in the first 15 minutes,' and a rollback trigger might be 'If error rate exceeds 10% or P95 latency increases by >200ms, initiate rollback procedure R-01.' This level of operational detail is what separates a useful runbook from a generic checklist.
Do not use this prompt for initial instruction design, for writing the instructions themselves, or for real-time incident response. It is a planning tool, not an execution tool. If you are in the middle of an active incident, use the Instruction Rollback Trigger Prompt instead. If you haven't yet validated that the new instructions are compatible with your agent fleet, run the Instruction Compatibility Check Prompt first. The migration playbook is only as good as the evidence it synthesizes; if your team has no post-mortem culture or no dry-run data, the generated plan will contain speculative steps that should be flagged for human review before execution. Always pair the generated playbook with a human approval gate, especially for migrations affecting production customer-facing agents or regulated workflows.
Use Case Fit
Where this prompt works and where it introduces risk. Use these cards to decide if a migration playbook generation prompt is the right tool before wiring it into your release pipeline.
Good Fit: Repeatable Platform Migrations
Use when: your team has completed at least one migration and needs to codify the steps, checkpoints, and rollback triggers for future rollouts. Guardrail: feed the prompt structured post-mortem notes, not raw chat logs, to produce a consistent playbook template.
Bad Fit: First-Time or Novel Migrations
Avoid when: the migration path is unknown, the system architecture is undocumented, or no prior rollout exists to learn from. Guardrail: use a discovery or architecture review prompt first; this prompt synthesizes known patterns, not unknown ones.
Required Inputs
What you must provide: past migration notes, incident timelines, rollback decision logs, communication templates, and the target system topology. Guardrail: validate that at least one completed migration with a post-mortem exists before invoking this prompt; otherwise output quality degrades to generic advice.
Operational Risk: Over-Confident Playbooks
What to watch: the model may produce a playbook that reads as authoritative even when gaps exist in the source material. Guardrail: every generated step must cite which past migration it derives from; flag steps without a source for human review before the playbook enters the runbook library.
Session Migration Compatibility
What to watch: the generated playbook may assume all sessions can be migrated atomically, ignoring long-running or stateful sessions. Guardrail: require the prompt to produce a session-inventory step and a compatibility-scoring checkpoint before any in-place migration step is approved.
Communication Template Drift
What to watch: generated stakeholder and user-facing communication templates may not match your organization's voice, compliance requirements, or change-management process. Guardrail: treat all generated templates as drafts; route them through your internal comms review before they are used in a real migration.
Copy-Ready Prompt Template
A copy-ready prompt that generates a structured migration playbook from past rollout data, including checkpoints, rollback triggers, and communication templates.
This prompt template is designed to be pasted directly into your orchestration layer. It instructs the model to act as a platform reliability engineer and produce a detailed, step-by-step migration playbook. The playbook is built from a provided [PAST_ROLLOUT_LOG] and a [TARGET_MIGRATION_SCOPE], ensuring that the output is grounded in real operational history rather than generic best practices. The template uses square-bracket placeholders for all dynamic inputs, which your application must replace with real values before execution. The output is a structured Markdown document with explicit sections for pre-flight checks, execution steps, rollback triggers, and stakeholder communication.
markdownYou are a senior platform reliability engineer. Your task is to generate a detailed, step-by-step migration playbook based on a past rollout log and a new target scope. The playbook must be actionable, include explicit checkpoints, and define clear rollback triggers. ## Input Data - **Past Rollout Log:** [PAST_ROLLOUT_LOG] - **Target Migration Scope:** [TARGET_MIGRATION_SCOPE] ## Playbook Structure and Constraints Generate a Markdown document with the following sections. Adhere strictly to the constraints for each. ### 1. Executive Summary - A 3-4 sentence summary of the migration, its criticality, and the primary lesson learned from the past rollout that is being applied here. ### 2. Pre-Flight Checks - A checklist of 5-10 specific, verifiable conditions that must be true before starting. - Each item must be a checkbox (`- [ ]`). - Include checks for: deployment health, monitoring dashboard verification, on-call schedule confirmation, and a specific data integrity check derived from the [PAST_ROLLOUT_LOG]. ### 3. Step-by-Step Execution Plan - A numbered list of discrete, ordered actions. - Each step must include: - **Action:** The precise command or operation to perform. - **Expected Outcome:** What success looks like. - **Checkpoint:** A specific metric or log line to verify before proceeding to the next step. - The plan must incorporate a canary deployment or phased rollout strategy. ### 4. Rollback Triggers and Procedure - Define 3-5 specific, observable conditions that will trigger an immediate rollback (e.g., error rate > X% for Y minutes, specific P1 alert fires). - For each trigger, provide the exact rollback command or sequence of actions to execute. - State the expected time to full rollback. ### 5. Communication Plan - Draft a template for a "Migration Starting" notification. - Draft a template for a "Migration Complete" notification. - Draft a template for a "Migration Rolled Back" notification. - Each template must have placeholders for `[STATUS_PAGE_LINK]` and `[INCIDENT_CHANNEL]`. ### 6. Lessons Learned Integration - Explicitly list 2-3 specific failures or near-misses from the [PAST_ROLLOUT_LOG]. - For each, explain how this playbook's steps or checks are designed to prevent a recurrence. ## Output Rules - Output only the valid Markdown document. - Do not add any conversational preamble or postamble. - If the [PAST_ROLLOUT_LOG] is empty or nonsensical, output a single line: "ERROR: Invalid past rollout log provided. Cannot generate playbook."
To adapt this template, replace the placeholders with your actual data. The [PAST_ROLLOUT_LOG] should be a structured summary of a previous, similar migration, including what went well and what failed. The [TARGET_MIGRATION_SCOPE] should clearly define the components, services, or infrastructure being changed in the new migration. Before deploying this prompt in a production pipeline, validate that the model reliably produces the ERROR: string when given empty or garbage input for [PAST_ROLLOUT_LOG]. This is a critical safety check to prevent the generation of a hallucinated playbook. For high-risk migrations, the generated playbook must be reviewed and approved by a human incident commander before any execution steps are initiated.
Prompt Variables
Required inputs for the Migration Playbook Generation Prompt. Validate each before calling the model to prevent hallucinated runbooks or missing rollback triggers.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[PREVIOUS_ROLLOUT_LOG] | Raw incident timeline, engineer notes, and postmortem from the last migration | 2025-03-14 DB migration: 02:14 UTC started, 02:22 schema apply failed, 02:31 rollback completed | Must contain timestamps and at least one failure or rollback event. Reject if log is only success messages with no decision points. |
[TARGET_ENVIRONMENT] | Description of the environment stack, versions, and topology for the new migration | PostgreSQL 16.2 on AWS RDS, 3-node cluster, primary in us-east-1, read replicas in us-west-2 | Must include version numbers and topology. Reject if environment is described only by name with no version or component details. |
[MIGRATION_SCOPE] | Boundary of what is being migrated and what is explicitly excluded | Migrate user tables and stored procedures only. Exclude analytics schema and replication config. | Must contain explicit exclusions. Reject if scope is unbounded or uses 'everything' without qualification. |
[ACCEPTANCE_CRITERIA] | Measurable conditions that define migration success | All user queries return within 200ms p95, zero data loss verified by row-count reconciliation, rollback completes in under 4 minutes | Must include at least one latency, correctness, and rollback criterion. Reject if criteria are qualitative only. |
[COMMUNICATION_TEMPLATE] | Stakeholder notification format and required fields for status updates | Slack #incidents template: [STATUS] [AFFECTED_SERVICE] [ESTIMATED_RESOLUTION] [CUSTOMER_IMPACT] | Must specify channel, required fields, and audience. Reject if template has no audience or escalation path. |
[ROLLBACK_TRIGGERS] | Explicit conditions that force immediate rollback during the migration | Rollback if: schema apply exceeds 5 minutes, error rate on health check exceeds 1%, or row-count mismatch detected | Must be numeric thresholds or boolean conditions. Reject if triggers are subjective like 'if things look bad'. |
[LESSONS_LEARNED_SOURCE] | Repository or document containing post-incident review findings from prior migrations | Confluence space 'DB Migrations Postmortems', pages tagged with 'rollback' and 'lessons-learned' | Must be a resolvable path or query. Reject if source is 'team knowledge' or 'past experience' without a retrievable artifact. |
[OUTPUT_FORMAT] | Schema or template for the generated migration playbook | Markdown document with sections: Pre-flight Checklist, Step Sequence, Checkpoint Gates, Rollback Procedure, Communication Cadence, Post-Migration Verification | Must enumerate required sections. Reject if format is unspecified or 'whatever works'. |
Implementation Harness Notes
How to wire the migration playbook prompt into a CI/CD pipeline, internal platform, or operational runbook system.
This prompt is designed to be called programmatically as part of a platform team's release workflow, not as a one-off chat interaction. The implementation harness should treat the prompt as a function that accepts structured inputs—previous migration logs, incident postmortems, and the target change description—and returns a validated playbook object. Because the output directly informs production changes, the harness must enforce schema validation, run pre-defined evaluation checks, and gate the result before any human operator sees it. The prompt is not a replacement for engineering judgment; it is a structured drafting tool that compresses scattered operational knowledge into a consistent, reviewable artifact.
Wire the prompt into a release pipeline or internal developer portal using a thin service wrapper. The service should accept a JSON payload with fields for [PREVIOUS_MIGRATION_LOGS], [INCIDENT_POSTMORTEMS], [TARGET_CHANGE_DESCRIPTION], [AFFECTED_SERVICES], and [RISK_TOLERANCE_LEVEL]. Before calling the model, the harness should validate that all required fields are present and that text fields meet minimum length thresholds to prevent low-quality outputs from sparse inputs. After receiving the model response, run a strict JSON schema validator against the expected playbook structure—sections for pre-flight checks, step-by-step migration steps, rollback triggers, communication templates, and lessons-learned integration must all be present and non-empty. If validation fails, retry once with the validation errors appended to the prompt as [CONSTRAINTS] feedback. If the second attempt also fails, log the failure, alert the release lead, and block the playbook from being published to the runbook system.
For model choice, prefer a model with strong instruction-following and long-context handling, such as Claude 3.5 Sonnet or GPT-4o, because the prompt must synthesize information from multiple long-form documents. Set temperature low (0.1–0.2) to prioritize consistency across runs. Log every generation with the input hash, model version, output schema validation result, and the human reviewer who approved the final playbook. In high-risk environments—such as database migrations, auth system changes, or payment pipeline updates—require explicit human approval before the playbook is loaded into the runbook automation system. The harness should also store the generated playbook alongside its source inputs and approval metadata for audit purposes, enabling post-migration reviews to trace decisions back to the evidence that informed them.
Common failure modes in the harness layer include: incomplete playbooks where the model omits rollback triggers due to ambiguous input, hallucinated service names when [AFFECTED_SERVICES] is not explicitly provided, and communication templates that lack specific stakeholder roles. Mitigate these by adding pre-generation input completeness checks and post-generation eval prompts that score the playbook on coverage of required sections, presence of concrete rollback criteria, and specificity of communication templates. If the eval score falls below a defined threshold, route the playbook for manual authoring instead of publishing it. Do not treat this prompt as a fire-and-forget generator; the harness is the safety boundary between a raw model output and a production migration order.
Expected Output Contract
Validation rules and format requirements for the migration playbook output. Use this contract to build post-processing checks, retry logic, and integration tests before the playbook enters downstream automation.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
playbook_title | string | Non-empty string. Must match regex ^[A-Z].* and contain the word 'Migration' or 'Rollout'. | |
version | string | Semantic version format (MAJOR.MINOR.PATCH). Must be parseable by a semver library. | |
effective_date | ISO 8601 date string | Must be a valid date in YYYY-MM-DD format. Cannot be in the past relative to generation timestamp. | |
steps | array of objects | Array length >= 3. Each object must contain 'step_number' (integer), 'action' (string), 'owner' (string), and 'rollback_trigger' (string or null). | |
steps[].step_number | integer | Sequential, starting at 1. No gaps or duplicates. Validate monotonic increase. | |
steps[].rollback_trigger | string or null | If null, a human approval gate is implied. If string, must describe a specific, observable failure condition. | |
communication_template | string | Must contain at least one square-bracket placeholder for recipient personalization. Minimum length 50 characters. | |
lessons_learned | array of strings | If present, each string must start with a past-tense verb and reference a specific past rollout event ID or date. |
Common Failure Modes
Migration playbook generation fails in predictable ways. These are the most common failure modes when prompting a model to produce a step-by-step migration runbook, along with practical guardrails to catch them before they reach production.
Hallucinated Rollback Triggers
What to watch: The model invents plausible-sounding but nonexistent metrics, thresholds, or monitoring alerts as rollback triggers. The playbook references dashboards or log queries that don't exist. Guardrail: Require the prompt to cite specific, existing observability sources. Add a post-generation validation step that checks every trigger reference against a known inventory of monitors and alerts.
Missing State Preservation Steps
What to watch: The generated playbook assumes a clean cutover and omits session state snapshots, in-flight transaction handling, or user intent preservation. Active sessions break because the migration doesn't account for what was in progress. Guardrail: Include a mandatory checkpoint in the prompt template that forces the model to enumerate all in-flight states and prescribe a preservation action for each before any migration step executes.
Generic Communication Templates
What to watch: The playbook produces vague stakeholder notifications that lack specific impact scope, expected downtime, or user-visible behavior changes. Teams send notices that don't prepare anyone. Guardrail: Constrain the output schema to require explicit fields: affected services, user-facing change description, expected duration, and rollback contact. Validate template completeness before accepting the playbook.
Ignored Version Compatibility Gaps
What to watch: The playbook treats the migration as a single atomic step and doesn't account for intermediate states where old and new instruction versions coexist. Multi-agent systems deadlock or produce conflicting outputs during the transition window. Guardrail: Require the prompt to generate a compatibility matrix for every pair of interacting components and prescribe a version ordering that prevents conflicts. Flag any gap where no compatibility bridge exists.
Lessons-Learned Fabrication
What to watch: When asked to integrate lessons learned from past rollouts, the model invents plausible past incidents, failure patterns, or postmortem findings that never occurred. The playbook looks thorough but is built on fiction. Guardrail: Require all lessons-learned entries to reference a specific incident ID, postmortem document, or timestamped event from a known corpus. Reject any lesson that cannot be traced to a source record.
Checklist Without Verification Criteria
What to watch: The playbook includes a step-by-step checklist but each step is a vague instruction like 'verify system is healthy' without defining what healthy means or how to check it. Operators can't confirm completion. Guardrail: Require every checklist item to include an observable success criterion and a prescribed verification method. The prompt should reject any step that lacks a testable condition.
Evaluation Rubric
Use this rubric to test the quality of a generated migration playbook before shipping it to a platform team or feeding it into an automated runbook system.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Step Completeness | Playbook contains discrete, ordered steps covering pre-migration checks, execution, verification, and rollback. | Missing entire phase (e.g., no rollback steps) or steps are vague imperatives like 'do the migration'. | Parse step count; assert >= 1 step per phase; check for action verbs per step. |
Checkpoint Presence | Each major phase includes an explicit go/no-go checkpoint with pass criteria. | Checkpoint missing or criteria are subjective ('if it looks good'). | Regex for checkpoint markers; assert each has a measurable condition. |
Rollback Trigger Definition | Specific, observable conditions that trigger rollback are listed (e.g., error rate > X%, latency > Y ms). | Rollback triggers are missing, generic ('if something goes wrong'), or reference unavailable metrics. | Extract trigger conditions; assert each references a concrete metric or log signal. |
Communication Template Quality | Templates include required fields: audience, subject, body with [PLACEHOLDER] variables, and send timing. | Templates are missing, are prose-only without variables, or omit timing. | Validate template structure; assert presence of [AUDIENCE], [SUBJECT], [BODY] with at least one variable. |
Lessons-Learned Integration | Playbook references specific past incident IDs or failure patterns and how they are mitigated in this runbook. | Lessons-learned section is boilerplate, references no actual past events, or is absent. | Check for incident ID references or concrete failure pattern descriptions; assert non-empty and non-generic. |
Source Grounding | All claims about system behavior, dependencies, or migration impact cite a source (runbook, config file, prior incident report). | Claims are unsubstantiated or cite sources that don't exist in the provided [CONTEXT]. | Extract citations; cross-reference against provided [CONTEXT] documents; flag orphan citations. |
Schema Compliance | Output strictly matches the [OUTPUT_SCHEMA] with all required fields present and correctly typed. | Missing required fields, extra fields not in schema, or type mismatches (e.g., string where array expected). | Validate output against [OUTPUT_SCHEMA] using a JSON Schema validator; assert zero errors. |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Adapt This Prompt
How to adapt
Start with the base migration playbook prompt but relax strict schema enforcement. Use a simpler output structure—plain markdown sections instead of a typed JSON schema. Remove rollback trigger precision and communication template requirements. Focus on getting a usable step-by-step plan from a single past rollout description.
Prompt modification
- Replace [OUTPUT_SCHEMA] with:
Return a markdown document with sections: Overview, Pre-Migration Checklist, Migration Steps, Rollback Notes, Communication Summary. - Drop [CONSTRAINTS] requiring exact timestamp formats and severity enums.
- Set [LESSONS_SOURCE] to
"optional"instead of"required".
Watch for
- Missing checkpoint definitions that make rollback decisions ambiguous
- Overly broad steps that skip environment-specific details
- No distinction between pre-migration validation and post-migration verification

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us