Platform teams shipping breaking tool changes need a reliable way to generate step-by-step migration guides for downstream consumers. This prompt takes a structured breaking change list, old and new tool schemas, and produces a complete migration playbook with code snippets, config diffs, and verification steps. Use it when you have a defined set of breaking changes and need to produce consistent, actionable migration documentation at scale. The ideal user is a platform engineer or tool provider who already has a verified change list and needs to turn it into consumer-facing guidance without manually writing each guide.
Prompt
Migration Playbook Generation Prompt for Tool Consumers

When to Use This Prompt
Determine when this migration playbook generation prompt is the right tool and when it introduces unacceptable risk.
Do not use this prompt when the change list is incomplete, unverified, or still under active development. If breaking changes haven't been finalized, the generated playbook will contain instructions that become incorrect after the next revision, creating downstream confusion and potential production incidents. Similarly, avoid this prompt when you need a general-purpose API reference or getting-started guide—this prompt is specifically tuned for migration documentation with before/after comparisons, not for introducing new concepts or explaining tool capabilities from scratch. The prompt assumes the consumer already understands the tool's purpose and only needs to adapt their integration.
Before running this prompt, validate that you have: (1) a complete, reviewed list of breaking changes with old and new behavior descriptions, (2) the old and new tool schemas in a structured format, (3) any migration deadlines or deprecation windows, and (4) known edge cases or common consumer patterns that need special attention. If any of these inputs are missing, the generated playbook will have gaps that require manual correction. For high-risk tool migrations where incorrect consumer adaptation could cause data loss, security issues, or service outages, always route the generated playbook through human review before publication. The prompt produces a draft that accelerates documentation, but it does not replace domain expertise or consumer impact analysis.
Use Case Fit
This prompt generates step-by-step migration instructions for tool consumers. It works best when the breaking change list is complete and the old/new schemas are well-defined. It fails when changes are undocumented, implicit, or require runtime behavior observation.
Complete Breaking Change List Available
Use when: the tool provider has published a structured, exhaustive list of breaking changes including field renames, type changes, removed endpoints, and behavioral shifts. Avoid when: the change list is partial, inferred from changelogs, or based on anecdotal reports. Guardrail: validate the input change list against the provider's official migration guide before running the prompt.
Old and New Schemas Are Machine-Readable
Use when: both the deprecated and target tool schemas are available as structured JSON Schema, OpenAPI specs, or typed definitions. Avoid when: schemas exist only in prose documentation or example payloads. Guardrail: pre-process prose schemas into a structured format and flag any fields that could not be resolved for manual review.
Migration Requires Code and Config Changes
Use when: the migration involves concrete code edits, configuration updates, and verification steps that can be expressed as instructions. Avoid when: the migration is purely conceptual, requires undocumented runtime behavior knowledge, or depends on external system state not captured in the prompt. Guardrail: include a completeness check that maps every breaking change to at least one generated migration step.
Consumer Has Access to Both Tool Versions
Use when: the consumer can test against both old and new tool versions to verify migration steps. Avoid when: the old version is already decommissioned or the new version is not yet accessible. Guardrail: generate verification steps that include side-by-side output comparison when both versions are available; otherwise, flag verification steps as untestable.
Risk of Incomplete or Hallucinated Migration Steps
Risk: the model may invent migration steps for changes not in the input list or omit steps for subtle behavioral changes. Guardrail: implement a post-generation validation pass that cross-references every generated step against the input breaking change list and flags orphaned or missing coverage.
Silent Behavioral Changes Not Captured in Schemas
Risk: breaking changes in tool behavior—such as changed rate limits, altered default values, or modified error responses—may not appear in schema diffs and will be missed. Guardrail: supplement the prompt input with behavioral change notes from the provider's changelog and include a manual review gate for behavioral changes that lack schema-level signals.
Copy-Ready Prompt Template
A reusable prompt that generates step-by-step migration instructions from old tool versions to new ones, with completeness checks against a provided breaking change list.
This prompt template is designed for platform teams that need to produce clear, actionable migration playbooks for consumers of their tools. It takes a structured list of breaking changes, the old and new tool specifications, and any relevant context, and outputs a complete migration guide. The prompt is engineered to not just list changes, but to generate the specific code modifications, configuration updates, and verification steps a developer needs to follow. It includes an explicit completeness check to ensure every breaking change in the input list is addressed in the output, preventing silent omissions.
markdownYou are an expert migration engineer writing for developers who depend on our platform. Your task is to generate a complete, step-by-step migration playbook from an old tool version to a new one. **Inputs:** - Old Tool Specification: [OLD_TOOL_SPEC] - New Tool Specification: [NEW_TOOL_SPEC] - Breaking Change List: [BREAKING_CHANGE_LIST] - Consumer Context (optional): [CONSUMER_CONTEXT] - Output Schema: [OUTPUT_SCHEMA] **Instructions:** 1. Analyze the [BREAKING_CHANGE_LIST] and the differences between [OLD_TOOL_SPEC] and [NEW_TOOL_SPEC]. 2. For each breaking change, generate a dedicated migration step that includes: - **Change Description:** A clear, one-sentence summary of what broke. - **Before Code:** A code snippet showing the old, now-invalid usage pattern. - **After Code:** A code snippet showing the new, correct usage pattern. - **Configuration Update:** Any required changes to configuration files, environment variables, or initialization code. - **Verification Step:** A specific command, script, or check a developer can run to confirm the migration was successful for this step. 3. After generating all steps, perform a **Completeness Check**: - Iterate through every item in the original [BREAKING_CHANGE_LIST]. - Verify that a corresponding migration step exists in your output. - If any item is missing, generate the missing step(s) now. - Append a final "Migration Completeness Confirmation" section that lists each breaking change from the input and confirms it was addressed. 4. Format the entire output according to the [OUTPUT_SCHEMA] provided. If the schema requires a structured JSON object, ensure strict compliance. 5. If [CONSUMER_CONTEXT] is provided, tailor code examples and configuration paths to that specific environment. Otherwise, use generic but realistic examples. **Constraints:** - Do not omit any item from the [BREAKING_CHANGE_LIST]. - Code examples must be syntactically correct for the target language implied by the context or schemas. - If a breaking change cannot be fully automated, clearly state the required manual intervention and its risk.
To adapt this template, start by populating the [OLD_TOOL_SPEC] and [NEW_TOOL_SPEC] placeholders with the full JSON Schema, OpenAPI specs, or structured documentation for your tool versions. The [BREAKING_CHANGE_LIST] should be a structured list, ideally as a JSON array of objects with id and description fields, to enable the model's completeness check. For high-risk production migrations, always route the generated playbook through a human review stage before publishing it to consumers. You can validate the output's completeness by running a separate evaluation prompt that compares the generated steps against the original breaking change list, flagging any missing IDs for manual correction.
Prompt Variables
Required inputs for the Migration Playbook Generation Prompt. Each variable must be populated before the prompt is assembled. Missing or malformed inputs cause incomplete migration steps or silent omission of breaking changes.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[OLD_TOOL_SCHEMA] | Complete JSON Schema or OpenAPI spec for the deprecated tool version | openapi: 3.0.0 info: version: 1.4.2 | Parse as valid JSON/YAML. Must contain version field. Reject if empty or unparseable. |
[NEW_TOOL_SCHEMA] | Complete JSON Schema or OpenAPI spec for the target tool version | openapi: 3.0.0 info: version: 2.0.0 | Parse as valid JSON/YAML. Version must differ from [OLD_TOOL_SCHEMA]. Reject if identical. |
[BREAKING_CHANGES_LIST] | Structured list of breaking changes between versions, including field renames, type changes, removed endpoints, and auth changes | [{"change_type": "FIELD_REMOVED", "path": "/users/:id/email", "old_field": "primary_email", "replacement": null}] | Must be a non-empty array. Each entry requires change_type, path, and old_field. Validate against both schemas for completeness. |
[TARGET_CONSUMER_PROFILE] | Description of the tool consumer: agent type, framework, language, and current usage patterns | Python agent using requests library, calls /users and /projects endpoints daily | Must include language or runtime. Null allowed if generating generic migration guide. Warn if profile is too vague to generate code examples. |
[MIGRATION_WINDOW] | Timeframe available for migration before old version is sunset | 2025-09-01 to 2025-10-15 (45 days) | Must be a valid date range. Start before end. Reject if window is in the past. Flag if window is under 14 days for urgency escalation. |
[OUTPUT_FORMAT] | Desired output structure: markdown guide, JSON step list, or runbook with verification steps | markdown_with_code_blocks | Must be one of: markdown_guide, json_steps, runbook_with_checks. Default to markdown_guide if null. |
[VERIFICATION_REQUIREMENTS] | Specific checks the consumer must perform to confirm migration success | ["All /users endpoints return 200", "Email field present in response", "Auth token refresh works"] | Must be an array of strings. Each entry must be a testable assertion. Reject if empty when [OUTPUT_FORMAT] is runbook_with_checks. |
[KNOWN_EDGE_CASES] | Documented edge cases, known bugs, or behavioral differences between versions that are not captured in the breaking changes list | Rate limit changed from 100/min to 50/min. Pagination cursor format differs. | Null allowed. If provided, must be a string or array of strings. Flag if this field is null but [BREAKING_CHANGES_LIST] contains behavioral changes. |
Implementation Harness Notes
How to wire the migration playbook generation prompt into a reliable application or workflow.
This prompt is designed to be called programmatically, not pasted into a chat UI. It expects structured inputs—old and new tool schemas, a breaking change list, and optional code samples—and produces a structured migration guide. The harness should treat this as a generation step in a larger pipeline: validate inputs, call the model, validate the output, and then route the result to documentation systems or consumer-facing portals. Do not expose the raw prompt to end users; it is a platform-internal tool for engineering teams publishing migration guidance.
Input assembly is the first harness responsibility. Collect the old schema, new schema, and breaking change list from your API registry or schema repository. If code samples are available, attach them as [EXAMPLES]. Map these into the prompt's placeholders before invocation. Model choice matters: use a model with strong instruction-following and long-context handling (GPT-4o, Claude 3.5 Sonnet, or equivalent). Set temperature low (0.0–0.2) to maximize consistency across regenerations. Output validation must check that every breaking change in the input list has a corresponding migration step in the output. Implement a completeness check: extract the list of addressed changes from the generated playbook and diff it against the input breaking change list. Flag any missing entries for human review. Also validate that code blocks in the output are syntactically valid for the target language if your pipeline can execute a linter.
Retry and repair logic should be built into the harness. If the completeness check fails, construct a repair prompt that includes the original output plus the list of uncovered breaking changes, and ask the model to generate only the missing sections. Merge the repair output into the original playbook. If the output fails schema validation (malformed JSON, missing required sections), retry with a stricter output format instruction appended to the prompt. Logging and audit are critical: record the prompt version, model version, input hashes, output completeness score, and any repair iterations. This traceability is essential when consumers question a migration step or when you need to regenerate playbooks after model upgrades. Human review should be the final gate before publication—especially for breaking changes that involve data loss, authentication shifts, or security boundary changes. The harness should route generated playbooks to a review queue with the completeness report attached.
Integration points depend on your tool ecosystem. For an internal developer portal, the harness can publish directly to a documentation API after review approval. For MCP server consumers, the generated playbook can be attached as a structured migration artifact alongside the new server version. For API changelog pipelines, wire this prompt downstream of your deprecation detection prompts so that detected breaking changes automatically trigger playbook generation. What to avoid: do not skip the completeness check—models will occasionally omit or merge breaking changes, especially when the change list is long. Do not treat the generated playbook as final without human review for high-severity changes. And do not call this prompt synchronously in a user-facing request path; the generation can take significant tokens and latency, so run it as an asynchronous job with results delivered to the appropriate publishing or review system.
Expected Output Contract
Validate the migration playbook output against this contract before publishing or passing it to downstream tool consumers. Each row defines a required or optional field, its expected format, and a concrete validation rule that can be automated in a test harness.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
migration_playbook.title | string | Non-empty string; length 10-200 characters; must include source and target version identifiers | |
migration_playbook.source_version | string (semver) | Matches semver pattern (MAJOR.MINOR.PATCH); must differ from target_version | |
migration_playbook.target_version | string (semver) | Matches semver pattern; must be greater than source_version per semver ordering | |
migration_playbook.breaking_changes | array of objects | Array length >= 1; each object must contain 'change_id', 'description', and 'affected_components' fields; no empty descriptions allowed | |
migration_playbook.steps | array of objects | Array length >= 1; each step must have 'step_number' (integer, sequential starting at 1), 'action' (non-empty string), 'verification' (non-empty string), and 'rollback' (string or null) | |
migration_playbook.steps[].code_changes | array of objects | If present, each object must contain 'file_path' (string), 'before' (string), 'after' (string); file_path must be a valid relative path pattern | |
migration_playbook.config_updates | array of objects | If present, each object must contain 'config_key' (string), 'old_value' (string or null), 'new_value' (string or null); config_key must be non-empty | |
migration_playbook.completeness_report.mapped_breaking_changes | integer | Must equal the count of breaking_changes provided in [BREAKING_CHANGE_LIST]; flag mismatch as incomplete coverage | |
migration_playbook.completeness_report.unmapped_breaking_changes | array of strings | Must be empty array if all breaking changes are addressed; each entry must match a change_id from [BREAKING_CHANGE_LIST] | |
migration_playbook.verification_checklist | array of strings | Array length >= 1; each entry must be a non-empty string describing a testable verification action; no duplicate entries |
Common Failure Modes
Migration playbook generation fails in predictable ways. These are the most common failure modes when generating step-by-step migration instructions for tool consumers, along with practical mitigations.
Silent Omission of Breaking Changes
What to watch: The generated playbook skips one or more breaking changes from the source changelog, producing an incomplete migration guide that leaves consumers vulnerable. This happens most often with indirect breaks (deprecated transitive dependencies, behavioral changes not labeled 'breaking'). Guardrail: Require a completeness check step that cross-references every item in the input breaking-change list against the generated playbook. Use a structured output schema with explicit coverage flags per change item.
Hallucinated Migration Steps
What to watch: The model invents plausible-sounding but non-existent API methods, config keys, or migration commands that will fail at runtime. This is especially common when the old or new tool version is under-documented in the prompt context. Guardrail: Ground every generated code change and config update against provided schema diffs. Add a validation instruction that marks any step without explicit source evidence as 'UNVERIFIED' and requires human confirmation before inclusion.
Incorrect Argument Translation Between Versions
What to watch: The playbook maps old parameters to new ones incorrectly—swapping field meanings, dropping required fields, or coercing types in lossy ways. This produces migration instructions that compile but produce wrong behavior. Guardrail: Include explicit field-level mapping tables in the prompt context. Require the output to cite the specific schema diff entry for each argument translation. Add a behavioral equivalence check comparing old and new call semantics.
Missing Verification and Rollback Instructions
What to watch: The generated playbook describes forward migration steps but omits how to verify each step succeeded or how to roll back if it didn't. Consumers following the guide have no safety net. Guardrail: Require the output schema to include a verification step and a rollback step for every migration action. Use a structured template that enforces these fields rather than leaving them optional.
Ordering Dependency Failures in Multi-Step Migrations
What to watch: The playbook lists migration steps in an order that breaks intermediate states—requiring a config change before the code that supports it, or dropping a deprecated field before the replacement is active. Guardrail: Add a dependency graph check to the prompt instructions. Require the model to output step prerequisites explicitly and validate that no step references a not-yet-completed prerequisite. Test with known dependency chains from the breaking-change list.
Version Ambiguity in Generated Instructions
What to watch: The playbook uses vague version references like 'the latest version' or 'the new API' without pinning exact version numbers, making the guide ambiguous when multiple versions exist simultaneously. Guardrail: Require every migration step to reference explicit, pinned version identifiers. Add a validation pass that rejects any step containing unresolved version tokens or relative version references. Include the source and target version numbers in the output schema header.
Evaluation Rubric
Use this rubric to test the generated migration playbook before shipping it to tool consumers. Each criterion targets a known failure mode in migration content generation.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Step Completeness | Every breaking change from [BREAKING_CHANGE_LIST] maps to at least one migration step | A breaking change in the input list has no corresponding step in the output | Diff the input change IDs against the output step references; flag orphans |
Code Change Accuracy | All code snippets in the output match the [NEW_SCHEMA] field names, types, and required flags | A snippet references a removed field, wrong type, or deprecated endpoint | Parse snippets with a schema validator; check field existence and type coercion |
Config Update Coverage | Every config key in [OLD_CONFIG] that changed in [NEW_CONFIG] appears in the playbook | A renamed or removed config key is absent from the migration instructions | Extract config keys from both versions; diff against keys mentioned in the output |
Verification Step Presence | Each migration step includes a concrete verification action with expected result | A step ends with 'verify it works' or no testable check | Scan each step for a verifiable assertion: HTTP status, response field, or log message |
Ordering Correctness | Steps that depend on prior steps appear after their prerequisites | A code change step references a config key not yet introduced | Build a dependency graph from step references; check for topological sort violations |
Deprecation Window Handling | If [DEPRECATION_DATE] is in the future, the playbook includes a dual-support interim step | Playbook forces immediate cutover when a deprecation window is still open | Check for a coexistence or feature-flag step when current date < deprecation date |
Rollback Instructions | The playbook includes a rollback section when [IRREVERSIBLE_CHANGES] is true | Irreversible changes are listed with no revert path or warning | Assert rollback section exists and references each irreversible change by ID |
Consumer Impact Labeling | Each step is tagged with impact level: BREAKING, ADVISORY, or COSMETIC | A breaking change is labeled COSMETIC or has no impact tag | Cross-reference step impact labels against the input change severity classifications |
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
Use the base prompt with a single representative breaking change and a short migration step count. Remove the completeness check and eval criteria. Replace [TOOL_NAME] and [OLD_VERSION] → [NEW_VERSION] with hardcoded values for a known migration. Drop the output schema requirement and accept free-text migration instructions.
Watch for
- Missing steps when the breaking change list is incomplete
- Overly generic instructions that skip config or environment variables
- No verification steps, leaving consumers to guess whether migration succeeded

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