Inferensys

Prompt

Release Note Upgrade Instructions Generation Prompt

A practical prompt playbook for generating ordered, verifiable upgrade instructions from breaking change analysis in production release workflows.
Developer doing prompt engineering on laptop, prompt variations visible on screen, casual coding session.
PROMPT PLAYBOOK

When to Use This Prompt

Defines the precise conditions, required inputs, and operational boundaries for generating step-by-step upgrade instructions from a structured breaking change manifest.

Use this prompt when you have completed a full breaking change analysis for a software release and need to produce an ordered, actionable upgrade guide for users or internal teams. The ideal user is a release manager, platform engineer, or technical writer who already possesses a validated breaking change manifest—a structured document listing every identified breaking change, its affected surface, severity, and required remediation category. The prompt transforms that manifest into a sequential procedure covering pre-flight checks, configuration updates, database migrations, code modifications, and rollback steps. This is a documentation-generation workflow, not a code-generation tool; the output is a human-readable guide that must be reviewed by an engineer familiar with the system before publication.

Do not use this prompt when breaking changes have not been fully identified, when the upgrade path is trivial (e.g., a single non-breaking dependency bump), or when you lack a complete manifest. The prompt assumes the input is exhaustive—if a breaking change is missing from the manifest, it will be absent from the generated instructions. Similarly, avoid this prompt for generating code patches, database migration scripts, or automated fix tools; it produces procedural documentation, not executable artifacts. For releases with zero breaking changes, a simpler changelog-generation prompt is more appropriate. The prompt also requires the manifest to include severity classifications and affected component tags; without these, the output ordering and prioritization will be unreliable.

Before using this prompt, validate your breaking change manifest for completeness: every entry should include the change description, affected API surface or component, severity level, required action type (e.g., config update, data migration, code change), and any version constraints. Run a completeness check against the full diff or changelog to confirm no breaking changes were missed. After generating the upgrade guide, an engineer must review the output for procedural correctness, ordering logic, and missing edge cases. Pair this prompt with the 'Release Note QA and Accuracy Verification Prompt' to audit the generated guide against source changes before publication. If the upgrade affects multiple services or repositories, consider using the 'Multi-Repo Aggregated Changelog Prompt' first to produce a unified manifest before generating instructions.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Release Note Upgrade Instructions Generation Prompt delivers value and where it introduces risk. Use these cards to decide whether this prompt fits your current release workflow.

01

Good Fit: Structured Breaking Change Diffs

Use when: you have a well-scoped diff containing breaking changes with clear before/after signatures. The prompt excels at translating API removals, schema modifications, and deprecated endpoints into ordered upgrade steps. Guardrail: pre-filter the diff to only breaking changes before invoking the prompt to prevent noise from unrelated refactors.

02

Good Fit: Multi-Repository Coordinated Releases

Use when: a platform release spans multiple repositories with interdependent breaking changes. The prompt can sequence cross-repo upgrade steps and flag ordering constraints. Guardrail: provide a dependency manifest alongside the diffs so the model can validate step ordering against actual dependency graphs rather than guessing.

03

Bad Fit: Undocumented or Ad-Hoc Changes

Avoid when: the breaking change lacks clear documentation, commit messages, or schema annotations. The prompt will fabricate plausible but incorrect upgrade steps when source evidence is thin. Guardrail: require a minimum evidence threshold—at least one commit message, one code diff, and one affected surface identifier—before generating instructions.

04

Bad Fit: Consumer-Facing Marketing Language

Avoid when: the output is destined for non-technical audiences or marketing channels. This prompt produces procedural, step-oriented instructions that will confuse end users. Guardrail: route this prompt's output through a separate tone-adaptation prompt if customer-facing summaries are needed, and never ship raw upgrade instructions to end users.

05

Required Inputs: Change Evidence Bundle

What to watch: the prompt requires a structured input bundle including code diffs, schema change logs, deprecation notices, and affected endpoint lists. Missing any of these leads to incomplete or hallucinated instructions. Guardrail: build an input validation step that checks for required fields before invoking the prompt, and abort with a clear error if evidence is insufficient.

06

Operational Risk: Incomplete Rollback Coverage

What to watch: the prompt may generate forward-migration steps without corresponding rollback instructions, leaving operators without a safe retreat path. Guardrail: explicitly require rollback steps in the prompt's output schema and validate that every forward step has a matching rollback counterpart before publishing the release note.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A copy-ready template that generates ordered upgrade instructions from a breaking change manifest, ready to be wired into your release pipeline.

This template takes a structured breaking change manifest and produces a step-by-step upgrade guide. It is designed for teams that have already completed change analysis and need to convert raw impact data into clear, ordered procedures for downstream consumers. The prompt enforces a strict output schema so the generated instructions can be parsed, validated, and embedded directly into release notes or migration documentation.

text
You are a technical release engineer writing upgrade instructions for a software release.

Your task is to convert the provided breaking change manifest into an ordered, step-by-step upgrade guide. The guide must be complete, actionable, and safe for operators to follow.

## INPUT

[BREAKING_CHANGE_MANIFEST]

## OUTPUT SCHEMA

Return a JSON object with the following structure:

{
  "upgrade_guide": {
    "version": "[TARGET_VERSION]",
    "pre_flight_checks": [
      {
        "check_id": "string",
        "description": "string",
        "command_or_query": "string",
        "expected_result": "string",
        "failure_action": "string"
      }
    ],
    "ordered_steps": [
      {
        "step_number": integer,
        "category": "configuration | database_migration | api_change | dependency_update | data_migration | other",
        "breaking_change_reference": "string (must match an ID from the manifest)",
        "action": "string (clear imperative instruction)",
        "before_example": "string (code or config before)",
        "after_example": "string (code or config after)",
        "verification": "string (how to confirm the step succeeded)",
        "rollback": "string (how to undo this step if verification fails)"
      }
    ],
    "post_migration_checks": [
      {
        "check_id": "string",
        "description": "string",
        "command_or_query": "string",
        "expected_result": "string"
      }
    ],
    "completeness_report": {
      "total_breaking_changes_in_manifest": integer,
      "steps_generated": integer,
      "uncovered_breaking_change_ids": ["string"]
    }
  }
}

## CONSTRAINTS

- Every breaking change in the manifest must be addressed by at least one step. If a breaking change cannot be addressed with a step, list it in uncovered_breaking_change_ids with an explanation.
- Steps must be ordered by dependency: configuration changes before migrations, migrations before code changes, all pre-flight checks before any step.
- Use exact field names, command flags, and configuration keys from the manifest. Do not invent or guess.
- If the manifest lacks sufficient detail for a step, mark that step with a [NEEDS_CLARIFICATION] prefix and explain what is missing.
- Rollback instructions must be complete and reversible. If a step is not reversible, state that explicitly and recommend a backup before proceeding.
- Do not include steps for non-breaking changes, feature additions, or bug fixes unless they are prerequisites for a breaking change step.

## EXAMPLES

[FEW_SHOT_EXAMPLES]

## RISK LEVEL

[RISK_LEVEL: low | medium | high | critical]

If RISK_LEVEL is high or critical, add a prominent warning block at the top of the guide recommending a staging environment dry-run before production execution.

Adapt this template by replacing the square-bracket placeholders with your data. The [BREAKING_CHANGE_MANIFEST] should be a structured JSON or YAML object containing each breaking change with a unique ID, description, affected surfaces, and before/after signatures. The [FEW_SHOT_EXAMPLES] placeholder should contain one or two complete input-output pairs showing the expected mapping from manifest entries to ordered steps. If you omit examples, the model may produce plausible but incorrectly ordered steps. The [RISK_LEVEL] placeholder accepts one of four values and gates whether a staging dry-run warning is prepended to the output. Always validate the output against the schema before publishing. If the completeness_report shows uncovered breaking changes, route the output to a human reviewer or trigger a repair prompt that asks the model to fill the gaps with explicit [NEEDS_CLARIFICATION] markers.

IMPLEMENTATION TABLE

Prompt Variables

Inputs the prompt needs to generate reliable upgrade instructions. Validate each before sending to prevent hallucinated steps or missing migration requirements.

PlaceholderPurposeExampleValidation Notes

[BREAKING_CHANGES]

List of breaking changes detected from diff analysis

API v2 /users endpoint removed; JWT claim format changed from 'role' to 'roles' array

Must be non-empty array. Each entry requires source commit SHA and affected surface. Reject if no breaking changes provided.

[CURRENT_VERSION]

The version the user is upgrading from

2.4.1

Must match semver pattern. Required for generating version-specific migration steps. Reject if null or malformed.

[TARGET_VERSION]

The version the user is upgrading to

3.0.0

Must match semver pattern and be greater than [CURRENT_VERSION] per semver ordering. Reject if downgrade detected.

[CONFIGURATION_DIFF]

Configuration file changes between versions

env.yaml: DATABASE_POOL_SIZE renamed to DB_POOL_MAX; auth.yaml: new required field 'oidc_issuer'

Can be null if no config changes. If present, each entry must reference a specific config file path and changed key. Parse check for file path validity.

[SCHEMA_MIGRATIONS]

Database or API schema migration scripts required

migrations/014_add_user_preferences.sql; migrations/015_drop_legacy_tokens.sql

Can be null if no schema changes. If present, each entry must include migration file path and execution order. Validate file references exist in repository.

[DEPRECATED_SURFACES]

APIs, endpoints, or features removed or deprecated in target version

GET /api/v1/users (removed); legacy_auth_enabled flag (deprecated, removed in 4.0)

Can be null. Each entry requires deprecation status (deprecated/removed), target removal version if deprecated, and replacement surface if available.

[ROLLBACK_CONSTRAINTS]

Known limitations or risks when rolling back the upgrade

Schema migration 015 is irreversible without backup; config changes require service restart

Can be null. If present, each constraint must include affected component and rollback difficulty (reversible/irreversible/partial). Used to generate rollback steps.

[DEPENDENCY_VERSIONS]

Minimum required versions of runtime dependencies after upgrade

Node.js >= 20.0.0; PostgreSQL >= 15.0; Redis >= 7.2

Can be null. Each entry requires dependency name, minimum version, and version constraint operator. Validate version strings against package manifests if available.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the upgrade instruction generation prompt into a CI/CD pipeline or release workflow with validation, retries, and human review gates.

The upgrade instructions prompt is designed to run after breaking change detection and schema impact analysis have completed. It consumes a structured list of breaking changes, deprecated surfaces, and configuration modifications, then produces ordered step-by-step upgrade procedures. In a production pipeline, this prompt should execute as a post-release-candidate step—after diffs are analyzed but before the release note is published. The prompt expects a JSON array of breaking changes as [BREAKING_CHANGES], each containing the affected surface, severity, and migration notes from prior analysis steps. Do not feed raw diffs directly into this prompt; it assumes pre-processed, categorized breaking changes.

Wire the prompt into your CI/CD workflow using a dedicated job that runs after the breaking change detection step. The job should: (1) load the breaking change manifest from the previous step's artifact, (2) inject it into the [BREAKING_CHANGES] placeholder along with the [RELEASE_VERSION] and [MIGRATION_WINDOW] variables, (3) call the model with response_format set to the defined JSON schema for ordered upgrade steps, (4) validate the output against the schema—each step must have a step_number, action, affected_component, pre_flight_check, and rollback_action field, (5) run a completeness check: every breaking change in the input must map to at least one upgrade step in the output, and (6) if validation fails, retry once with the validation errors appended to the [CONSTRAINTS] block. Use a model with strong structured output support (GPT-4o, Claude 3.5 Sonnet, or equivalent) and set temperature to 0.1–0.2 for deterministic, repeatable results.

For high-risk releases—major version bumps, database migrations, or auth changes—route the generated upgrade instructions to a human review queue before publication. The review step should verify that pre-flight checks are complete (backup instructions, downtime estimates, rollback commands) and that no breaking change is silently omitted. Log every generation attempt with the input manifest hash, output step count, validation errors, and reviewer decision. Avoid running this prompt on every commit; trigger it only on release candidate tags or merged release PRs to control cost and noise. If the prompt produces fewer steps than the number of breaking changes, treat it as a failure and escalate—do not silently publish incomplete upgrade instructions.

IMPLEMENTATION TABLE

Expected Output Contract

Defines the required fields, types, and validation rules for the upgrade guide and the input manifest that the prompt must produce. Use this contract to build a post-generation validator.

Field or ElementType or FormatRequiredValidation Rule

upgrade_guide.title

string

Must be a non-empty string starting with 'Upgrade Guide:' or 'Migration Guide:'. Max 120 characters.

upgrade_guide.target_version

string

Must match the semantic version pattern 'MAJOR.MINOR.PATCH'. Must be the version the user is upgrading TO.

upgrade_guide.pre_flight_checks

array of strings

Each item must be a complete imperative sentence. Array must contain at least one item. No null entries allowed.

upgrade_guide.steps

array of objects

Each object must contain 'order' (integer), 'action' (string), 'file_or_config' (string or null), and 'verification' (string). 'order' must be a strictly increasing sequence starting from 1.

upgrade_guide.rollback_plan

array of strings

Must contain at least one step. Each step must be a complete sentence describing a reversible action. If no rollback is possible, the first item must be 'No automated rollback available. Manual restoration required.'

upgrade_guide.breaking_changes_addressed

array of strings

Must list every breaking change ID from the [BREAKING_CHANGES] input. If none, must be an empty array. No phantom IDs allowed.

input_manifest.source_commits

array of strings

Each entry must be a valid short or long commit SHA. Array must not be empty. Duplicate SHAs must be deduplicated by the validator.

input_manifest.breaking_change_ids

array of strings

Must be a list of unique identifiers. If no breaking changes were detected in the source analysis, this must be an empty array, not null.

PRACTICAL GUARDRAILS

Common Failure Modes

What breaks first when generating upgrade instructions from change analysis and how to guard against it.

01

Missing Pre-Flight Checks

What to watch: The model generates upgrade steps but omits prerequisite checks like version requirements, backup instructions, or environment validation. Users follow instructions and encounter preventable failures. Guardrail: Include a mandatory pre-flight checklist in the prompt template with explicit fields for current version, backup status, and environment readiness. Validate that every generated output contains all checklist items before publishing.

02

Incomplete Migration Steps

What to watch: The model covers database migrations but skips configuration changes, or documents API changes but omits environment variable updates. Partial instructions create silent failures. Guardrail: Cross-reference generated steps against the breaking change list in the input. Require the model to map each breaking change to at least one explicit upgrade action. Run a completeness check that flags uncovered changes.

03

Hallucinated Commands or Flags

What to watch: The model invents CLI flags, migration command syntax, or configuration keys that don't exist in the actual tooling. Users copy-paste and hit errors. Guardrail: Ground all commands in the provided diff or changelog evidence. Add a constraint requiring the model to only reference commands and flags present in the source material. Run a factuality check comparing generated commands against the input diffs.

04

Incorrect Step Ordering

What to watch: The model places database migrations after application deployment, or configuration changes before dependency updates. Order-dependent failures are hard to debug. Guardrail: Include explicit ordering rules in the prompt: dependencies before dependents, schema changes before code deploys, config changes before restarts. Validate the generated sequence against a dependency graph extracted from the change analysis.

05

Missing Rollback Instructions

What to watch: The model generates forward migration steps but omits rollback procedures. When upgrades fail in production, operators have no documented path back to a working state. Guardrail: Require a rollback section for every irreversible step. Add a validation check that counts forward steps and verifies a corresponding rollback action exists for each. Flag outputs with zero rollback coverage.

06

Assumed Environment State

What to watch: The model assumes specific tool versions, operating systems, or deployment topologies without verifying them against the user's actual environment. Instructions work in one context and fail in another. Guardrail: Require the prompt to accept an [ENVIRONMENT_CONTEXT] input block with explicit OS, tool versions, and deployment type. Constrain the model to condition steps on the provided environment rather than assuming defaults.

IMPLEMENTATION TABLE

Evaluation Rubric

Score each criterion on a pass/fail basis. All criteria must pass before the upgrade guide is approved for review.

CriterionPass StandardFailure SignalTest Method

Breaking Change Completeness

Every breaking change from [BREAKING_CHANGE_LIST] has a corresponding upgrade step

A breaking change is present in the source list but has no matching step in the output

Parse [BREAKING_CHANGE_LIST] IDs and diff against step references in output; flag orphans

Step Ordering Correctness

Pre-flight checks appear before configuration changes; migrations appear before verification steps

A database migration step appears before its prerequisite configuration change

Classify each step by type (preflight/config/migration/verify/rollback) and validate type ordering constraints

Pre-Flight Check Presence

At least one pre-flight check exists for each stateful change (database, config, infra)

A migration step has no preceding backup or state-check instruction

For each step tagged as stateful, assert a pre-flight step exists within 2 prior steps

Rollback Step Coverage

Every irreversible or data-mutating step has a corresponding rollback or revert instruction

A schema-altering migration has no rollback step anywhere in the guide

Tag steps as reversible or irreversible; assert irreversible steps have a rollback sibling step

Configuration Change Specificity

Every configuration change references exact keys, files, or environment variables from [CONFIG_DIFF]

A step says 'update config' without naming the file, key, or expected value

Extract config references from output; diff against [CONFIG_DIFF] keys; flag missing or vague references

Code Example Accuracy

Every code example matches the actual API or schema change described in [API_DIFF]

A code snippet uses a deprecated method signature or incorrect field name

Parse code blocks; validate method signatures and field names against [API_DIFF] schema; flag mismatches

Version Number Consistency

All version references in the guide match [TARGET_VERSION] and [SOURCE_VERSION]

A step references an intermediate version not present in the upgrade path

Extract all version strings from output; assert each equals [TARGET_VERSION] or [SOURCE_VERSION]

Hallucinated Change Detection

No upgrade step describes a change not present in [BREAKING_CHANGE_LIST], [CONFIG_DIFF], or [API_DIFF]

A step describes a new required field or removed endpoint with no source evidence

For each step, require at least one citation to a source document; flag uncited steps as hallucinated

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Add the full output schema with pre_flight_checks, configuration_changes, database_migrations, ordered_upgrade_steps, verification_checks, and rollback_steps. Wire in a validator that confirms every breaking change from [BREAKING_CHANGES_LIST] has at least one corresponding upgrade step.

Add a retry loop: if validation fails, feed the missing breaking changes back into the prompt as [UNCOVERED_BREAKING_CHANGES] and re-generate. Log each attempt.

Watch for

  • Silent omission of a breaking change without retry triggering
  • Rollback steps that reference state from mid-upgrade rather than pre-upgrade
  • Configuration change instructions that don't specify the exact file or key path
Prasad Kumkar

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.