This prompt is designed for platform teams and SDK engineers who need to produce version-to-version migration documentation. It takes a structured changelog of breaking changes, deprecated surfaces, and new API mappings as input, and outputs a complete migration guide with before/after code comparisons, effort estimates, and a checklist verifying that every breaking change is addressed. Use this when you have a finalized list of breaking changes and need to generate the first draft of a migration guide that downstream developers can follow.
Prompt
SDK Breaking Change Migration Guide Prompt

When to Use This Prompt
Defines the precise conditions, required inputs, and user context for deploying the SDK Breaking Change Migration Guide Prompt effectively.
The ideal user is an SDK maintainer, release manager, or technical writer who has already completed the breaking change discovery and enumeration phase. The required input is a structured list where each entry includes the deprecated surface, the replacement API, the reason for the change, and the target version. Do not use this prompt to discover breaking changes from source code; it assumes the breaking change enumeration is already complete and accurate. For discovery, use a code analysis prompt or static analysis tooling before feeding the results into this migration guide generator.
Before running this prompt, ensure your input is a machine-readable changelog, not a free-form commit history. The prompt's value comes from its ability to enforce completeness: it will generate a checklist that maps every input breaking change to a migration path, flagging any gaps. After generation, you must validate the output against your actual API surface and run the provided code examples through a test harness to confirm they compile and execute correctly. This prompt is not a substitute for human review of migration guidance, especially for security-critical or revenue-impacting API surfaces.
Use Case Fit
Where this prompt works and where it does not. Use these cards to decide if the SDK Breaking Change Migration Guide Prompt fits your current task or if you need a different approach.
Good Fit: Structured Changelog Input
Use when: you have a machine-readable or clearly structured changelog (JSON, YAML, or consistent markdown) that enumerates every breaking change with method signatures, deprecation dates, and replacement APIs. The prompt excels at transforming structured diffs into human-readable migration guides with before/after code comparisons. Guardrail: validate that the changelog input contains explicit breaking: true flags or equivalent severity markers before running the prompt.
Bad Fit: Unstructured Commit History
Avoid when: your only input is raw git log output, unstructured commit messages, or informal Slack threads about changes. The prompt requires pre-categorized breaking changes; it cannot reliably infer which commits are breaking, which are additive, or which are internal refactors. Guardrail: run a separate classification or triage prompt first to extract breaking changes from unstructured sources before feeding them into this migration guide prompt.
Required Inputs: Version Delta and API Surface Map
What to watch: the prompt needs three concrete inputs to produce reliable output: (1) the source and target version numbers, (2) a list of every deprecated or removed method with its replacement, and (3) the full public API surface of both versions for context. Missing any of these produces guides with gaps or incorrect replacement suggestions. Guardrail: build an input validation step that checks for version pairs, deprecated-to-replacement mappings, and API surface completeness before invoking the prompt.
Operational Risk: Hallucinated Migration Paths
What to watch: when the prompt encounters a breaking change without a documented replacement, it may invent plausible but incorrect migration paths—suggesting methods that don't exist or parameters that were never added. This is the highest-risk failure mode for SDK documentation. Guardrail: implement a post-generation validation step that checks every suggested replacement method against the target version's actual API surface, flagging any method name not found in the source of truth.
Operational Risk: Incomplete Breaking Change Coverage
What to watch: the prompt may silently skip breaking changes that are described ambiguously or buried in nested changelog entries. The output looks complete but misses critical migration steps, leaving downstream consumers with broken integrations. Guardrail: add a coverage check that counts breaking changes in the input and verifies that every one appears in the output, with a hard failure if coverage drops below 100%.
Variant: Effort Estimation and Risk Scoring
What to watch: some teams need migration guides that include per-change effort estimates (trivial, moderate, major) and risk scores to help consumers prioritize. The base prompt can be extended with an output schema that adds effort and risk fields. Guardrail: define explicit criteria for each effort level (e.g., trivial = rename only, major = architecture change) in the prompt's constraints to prevent inconsistent scoring across changes.
Copy-Ready Prompt Template
A reusable prompt that generates a structured migration guide from a changelog and API surface diff, with square-bracket placeholders for your specific inputs.
This prompt template is designed to take a raw list of breaking changes—typically sourced from a changelog, commit history, or API diff—and produce a structured, developer-facing migration guide. It forces the model to address every listed change, map deprecated surfaces to their replacements, and provide before/after code comparisons. The output is intended to be a first draft that a platform engineer or technical writer can review, test, and publish. Do not use this prompt for additive features or non-breaking changes; it is specifically scoped to version-to-version breaking change communication.
textYou are a technical documentation engineer for an SDK platform team. Your task is to produce a migration guide that helps developers upgrade from SDK version [OLD_VERSION] to [NEW_VERSION]. ## INPUTS - Breaking Change Changelog: [BREAKING_CHANGES_LIST] - Current API Surface Reference (optional, for replacement mapping): [API_SURFACE_REFERENCE] - Target Language and Framework: [LANGUAGE_AND_FRAMEWORK] - Migration Guide Style Guide or Template: [STYLE_GUIDE] ## OUTPUT SCHEMA Produce a JSON object with the following structure: { "guide_title": "string", "version_from": "string", "version_to": "string", "summary": "string (2-3 sentence overview of impact and required action)", "breaking_changes": [ { "change_id": "string", "category": "enum: method_removal | signature_change | behavior_change | config_change | dependency_change | auth_change", "severity": "enum: critical | high | medium | low", "deprecated_surface": "string (the old API, method, or behavior)", "replacement_surface": "string (the new API, method, or behavior, or null if no direct replacement)", "before_code": "string (code block showing old usage)", "after_code": "string (code block showing new usage)", "migration_steps": ["string (ordered step-by-step instructions)"], "effort_estimate": "enum: trivial | small | medium | large", "automatic_fix_available": "boolean (whether a codemod or automated migration tool exists)" } ], "deprecated_but_not_removed": [ { "surface": "string", "scheduled_removal_version": "string", "replacement": "string" } ], "upgrade_checklist": ["string (ordered steps for the full upgrade process)"], "known_issues": ["string (any known problems or edge cases during migration)"] } ## CONSTRAINTS - Every entry in [BREAKING_CHANGES_LIST] must appear in the breaking_changes array. Do not skip or consolidate entries. - Before and after code examples must be valid [LANGUAGE_AND_FRAMEWORK] syntax and compilable. - If a deprecated surface has no direct replacement, set replacement_surface to null and explain the workaround in migration_steps. - Categorize severity as critical if the change will cause a compilation error or runtime crash without code changes. - If [API_SURFACE_REFERENCE] is provided, use it to verify replacement surface names and signatures. If not provided, infer replacements from the changelog descriptions. - Follow [STYLE_GUIDE] for tone, formatting, and terminology if provided. - Do not invent breaking changes not present in [BREAKING_CHANGES_LIST]. ## EVALUATION CRITERIA Before returning the output, verify: 1. The count of entries in breaking_changes matches the count of distinct breaking changes in [BREAKING_CHANGES_LIST]. 2. Every critical or high severity change has a before/after code example. 3. No replacement_surface references an API that does not exist in [API_SURFACE_REFERENCE] (if provided). 4. The upgrade_checklist is ordered logically (e.g., auth changes first, then method migrations, then config updates).
To adapt this template, replace each square-bracket placeholder with your actual data. The [BREAKING_CHANGES_LIST] is the most critical input—it should be a structured list of every breaking change, ideally with the deprecated surface name, the reason for the change, and the intended replacement. If you are sourcing this from a git log or PR description, run a separate extraction prompt first to produce a clean list. The [API_SURFACE_REFERENCE] is optional but strongly recommended; providing the current public API surface (method signatures, type definitions, config options) significantly reduces hallucinated replacement names. After generating the guide, run the output through a validation step that checks code examples against the actual SDK to catch syntax errors or deprecated API usage before publication.
Prompt Variables
Required inputs for the SDK Breaking Change Migration Guide Prompt. Each placeholder must be populated before the prompt is assembled and sent. Missing or malformed inputs are the most common cause of incomplete migration guides.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[CURRENT_VERSION] | The version string for the new SDK release containing breaking changes | v3.0.0 | Must match semver format (MAJOR.MINOR.PATCH). Reject if missing or non-semver. |
[PREVIOUS_VERSION] | The version string for the last stable release before breaking changes were introduced | v2.5.1 | Must be a valid semver string lower than [CURRENT_VERSION]. Parse and compare numerically. |
[CHANGELOG_ENTRIES] | Array of breaking change entries from the changelog, each with method name, change type, and description | [{"method": "client.charge()", "change": "signature", "description": "amount param now required"}] | Must be a non-empty JSON array. Each entry requires 'method', 'change', and 'description' fields. Reject if any entry is missing required fields. |
[DEPRECATED_SURFACES] | List of all deprecated methods, classes, parameters, or types being removed or altered | ["PaymentIntent.create()", "Subscription.update()"] | Must be a JSON array of strings. Cross-reference against [CHANGELOG_ENTRIES] to ensure every breaking change has a corresponding deprecated surface listed. Warn if mismatch detected. |
[SDK_LANGUAGE] | The programming language or platform the SDK targets | python | Must be one of the supported language identifiers from the SDK platform registry. Reject unknown values. Controls code example syntax and idiom patterns. |
[CODE_EXAMPLES_DIR] | Path or URI to the directory containing before/after code examples for migration scenarios | sdk-examples/v2-to-v3/ | Must resolve to an accessible directory with at least one code file. Validate path exists and contains files with expected extension for [SDK_LANGUAGE]. Warn if empty. |
[OUTPUT_FORMAT] | Desired output structure for the migration guide | markdown | Must be one of: markdown, json, html. Defaults to markdown if not specified. Controls section heading levels and code fence formatting. |
Implementation Harness Notes
How to wire the migration guide prompt into a documentation pipeline with validation, retries, and human review gates.
This prompt is designed to be called programmatically as part of a release workflow, not as a one-off chat interaction. The typical integration point is a CI/CD pipeline that triggers when a new SDK version is tagged. A script collects the changelog entries, deprecated surface list, and previous migration guide, then assembles the prompt with these inputs. The model call should be wrapped in a harness that validates the output structure before it ever reaches a documentation preview environment.
Start with input validation: confirm that the changelog contains at least one breaking change entry before invoking the model. If the changelog is empty or contains only additive changes, skip the prompt entirely and generate a simple 'no breaking changes' notice. For the model call itself, use a model with strong structured output support (GPT-4o, Claude 3.5 Sonnet, or equivalent) and set temperature=0.1 to maximize consistency across regeneration. Request JSON output with a defined schema that includes breaking_changes (array of objects with title, before_code, after_code, replacement_api, effort_estimate), deprecated_surfaces (array of strings), and coverage_report (object with total_breaking_changes_in_changelog and addressed_count). If the model returns malformed JSON, retry once with the error message appended to the prompt as a correction hint. If the second attempt also fails, flag for human review rather than silently publishing broken output.
The coverage check is the most critical post-generation validation. Parse the output and compare addressed_count against total_breaking_changes_in_changelog. If they don't match, the prompt missed entries. In that case, extract the unaddressed changelog items and run a second pass with a targeted prompt that asks the model to generate migration entries only for those specific items, then merge the results. For code block validation, extract every before_code and after_code block and run them through a syntax checker for the target language. Flag any blocks that fail parsing. For effort estimate consistency, verify that estimates use a consistent scale (e.g., minutes, hours, days) and flag outliers for human review. Log every model call, the input changelog hash, the output JSON, validation results, and any retry attempts to an observability system for audit and debugging.
The final output should be rendered into a documentation page template, but do not publish automatically. Route the generated migration guide to a documentation preview environment and notify the SDK team through a pull request or Slack notification. Require at least one SDK engineer to verify that every breaking change is addressed with a correct migration path, that code examples compile against the new version, and that effort estimates are reasonable. Only after human approval should the guide be merged and published. For teams running this prompt on every release, maintain a regression test suite of known breaking change scenarios with expected migration entries, and run the prompt against these golden cases before processing real changelogs to catch prompt drift early.
Expected Output Contract
Fields, format, and validation rules for the generated migration guide. Use this contract to parse, validate, and gate the model output before publishing or passing it to downstream systems.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
migration_title | string | Must match regex ^Migrating from [SOURCE_VERSION] to [TARGET_VERSION]$. Title must not exceed 120 characters. | |
overview_summary | string (1-3 paragraphs) | Must contain the substring [SOURCE_VERSION] and [TARGET_VERSION]. Length must be between 100 and 800 characters. Must not contain future dates. | |
breaking_changes | array of objects | Array length must equal the count of breaking change entries in [CHANGELOG_INPUT]. Each object must have 'change_id', 'affected_surface', 'description', and 'migration_path' fields. | |
change_id | string | Must be a unique identifier derived from [CHANGELOG_INPUT] entries. Format: BC-XXX where XXX is a zero-padded integer. No duplicates allowed. | |
affected_surface | string | Must reference a valid class, method, interface, or type name present in [SDK_SOURCE_ANNOTATIONS]. Regex validation against known surface list. | |
before_code | string (code block) | Must be a valid code snippet in [TARGET_LANGUAGE] that compiles against [SOURCE_VERSION] SDK. Extract and run syntax check. | |
after_code | string (code block) | Must be a valid code snippet in [TARGET_LANGUAGE] that compiles against [TARGET_VERSION] SDK. Must differ from before_code by at least one token. | |
effort_estimate | string (enum) | Must be one of: 'trivial', 'low', 'medium', 'high', 'breaking'. If no automated replacement exists, effort must be 'high' or 'breaking'. |
Common Failure Modes
What breaks first when generating SDK migration guides and how to guard against it.
Missing Breaking Changes
What to watch: The model omits breaking changes present in the changelog or source diff, leaving downstream consumers unaware of critical migration steps. Guardrail: Provide a structured changelog as input and instruct the model to enumerate every entry, then diff the output list against the input to flag omissions before publication.
Hallucinated Replacement APIs
What to watch: The model invents method names, parameter signatures, or migration paths that do not exist in the target SDK version. Guardrail: Require the model to cite source files or API specs for every replacement mapping. Run a post-generation validation that checks each suggested replacement against the actual public API surface.
Incorrect Before/After Code
What to watch: Code examples contain syntax errors, use deprecated patterns in the after block, or fail to compile against the target version. Guardrail: Extract all code blocks and execute them against the actual SDK versions in a CI sandbox. Flag any block that fails compilation or emits deprecation warnings.
Effort Estimate Inflation
What to watch: The model assigns arbitrary or inconsistent effort estimates (e.g., hours, story points) without a defined rubric, misleading project planning. Guardrail: Supply a fixed effort rubric in the prompt (e.g., trivial <1h, moderate 1-4h, major >1 day) and require the model to justify each estimate with the number of affected call sites or configuration changes.
Deprecation Without Migration Path
What to watch: The guide flags a surface as deprecated but fails to provide a concrete replacement or workaround, leaving consumers blocked. Guardrail: Add a constraint that every deprecated item must have a corresponding replacement section. If no replacement exists, the model must explicitly state that and recommend a manual review escalation.
Version Confusion Across SDKs
What to watch: When generating migration guides for multi-language SDKs, the model mixes version numbers, platform-specific APIs, or language idioms between different SDKs. Guardrail: Isolate generation per language SDK. Use a pre-generation classifier to confirm the target language and version, and post-validate that all code examples match the language's syntax and package ecosystem.
Evaluation Rubric
Use this rubric to evaluate the quality of a generated SDK breaking change migration guide before publishing. Each criterion targets a specific failure mode common in migration documentation. Run these checks programmatically where possible and supplement with human review for subjective criteria.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Breaking Change Coverage | Every breaking change listed in [CHANGELOG_INPUT] appears in the migration guide with a dedicated section | A breaking change from the changelog is missing from the guide output | Parse [CHANGELOG_INPUT] for breaking change identifiers; diff against section headers in output; flag any unmatched entries |
Before/After Code Pairing | Each deprecated or removed surface includes a side-by-side before/after code block showing the old usage and the replacement | A deprecated method or type is described in prose but lacks a concrete code migration example | Extract all code blocks; verify each deprecated symbol from [DEPRECATED_SURFACES] appears in at least one before block with a corresponding after block |
Replacement API Mapping | Every removed or deprecated method, class, or parameter maps to a specific replacement with correct signature | A replacement is suggested that does not exist in [CURRENT_SDK_REFERENCE] or has an incorrect method signature | Cross-reference each replacement suggestion against [CURRENT_SDK_REFERENCE]; validate method name, parameter count, and return type match |
Effort Estimate Reasonableness | Each migration step includes an effort estimate (minutes, hours, days) that aligns with the complexity of the change | Effort estimates are missing for more than one migration step or a trivial rename is labeled as a multi-day effort | Check that every migration step has a non-null effort field; flag estimates exceeding 8 hours for single-method renames or under 5 minutes for auth flow changes |
Deprecation Timeline Accuracy | All deprecation dates, sunset dates, and migration deadlines match [DEPRECATION_SCHEDULE] exactly | A date in the guide differs from [DEPRECATION_SCHEDULE] by any amount or a required deadline field is null | Parse all date fields in output; compare string equality against [DEPRECATION_SCHEDULE] entries; fail on any mismatch or null where schedule requires a value |
Error Handling Migration Coverage | Exception class name changes, new error types, and removed error codes are documented with migration paths | A renamed or removed exception class from [ERROR_CATALOG_DIFF] appears nowhere in the guide | Extract exception class names from [ERROR_CATALOG_DIFF]; search output for each removed or renamed class; flag any not found |
Code Block Compilability | All code examples in the guide compile against [CURRENT_SDK_VERSION] with no syntax errors or missing imports | A code block uses a removed method, missing import, or incorrect argument count that would fail compilation | Extract each code block; run through a syntax validator for the target language; execute against [CURRENT_SDK_VERSION] in a sandbox; flag any compilation or runtime errors |
Rollback and Reversibility Guidance | The guide includes a rollback section or per-change reversibility notes when migration steps are not safely reversible | A migration step that modifies persistent state or data format lacks any warning about irreversibility | Scan output for a rollback section header; for each migration step tagged as stateful in [MIGRATION_RISK_TAGS], verify a reversibility note or warning exists within that step |
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 changelog entry and one before/after pair. Skip schema enforcement and effort estimation. Focus on getting the migration narrative right for one breaking change.
Prompt modification
- Remove [OUTPUT_SCHEMA] constraints and let the model produce freeform markdown.
- Replace [CHANGELOG] with a single breaking change description.
- Add: "Produce one before/after code example and a 2-sentence migration path."
Watch for
- Missing deprecated surface enumeration
- Vague replacement guidance without exact method signatures
- Overly broad instructions that skip specific version numbers

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