Inferensys

Prompt

Breaking Change Impact Radius Estimation Prompt

A practical prompt playbook for using the Breaking Change Impact Radius Estimation Prompt in production AI workflows to identify downstream consumers, affected API surfaces, and migration effort before shipping a breaking change.
Operations team reviewing AI workflow automation on laptop, workflow builder visible, casual office setup.
PROMPT PLAYBOOK

When to Use This Prompt

Define the job, reader, and constraints for the Breaking Change Impact Radius Estimation Prompt.

This prompt is for library maintainers, platform teams, and API owners who are planning a breaking change and need a rigorous, evidence-backed estimate of the downstream blast radius before they ship. The job-to-be-done is not just listing consumers, but producing a structured impact report that identifies every affected API surface, downstream consumer, and the estimated migration effort per consumer, all grounded in source evidence. The ideal user is a senior engineer or architect who can provide the proposed change specification and has access to the codebase or dependency graph.

Use this prompt when the change is material—deprecating a public function, altering a method signature, removing a supported parameter, or changing a serialization contract. It is designed for scenarios where the cost of breaking a downstream consumer is high, such as public SDKs, internal platform services with multiple teams depending on them, or open-source libraries with a broad user base. The prompt requires a detailed [CHANGE_SPECIFICATION] that describes the current and proposed API surface, and a [DEPENDENCY_CONTEXT] that includes the list of known consumers, their usage patterns, or the repository structure to analyze. Without these inputs, the model will hallucinate consumers and produce a useless report.

Do not use this prompt for trivial internal refactors where the blast radius is already known, for changes that are purely additive, or for codebases where you cannot provide a reliable list of downstream consumers. The prompt is also inappropriate when the primary goal is to decide whether to make the change—it estimates impact, not business value. Finally, every consumer identified by the model must be verified by a human before the report is used to communicate migration timelines to dependent teams. The model can miss consumers that use reflection, dynamic invocation, or undocumented internal APIs, so treat the output as a starting point for a manual review, not a final audit.

PRACTICAL GUARDRAILS

Use Case Fit

This prompt estimates the blast radius of a breaking change by identifying downstream consumers, affected API surfaces, and migration effort. It is designed for library and platform teams who need source-grounded impact analysis before shipping a breaking change. The cards below define where this prompt delivers reliable value and where it introduces unacceptable risk.

01

Good Fit: Monorepo with Static Analysis Access

Use when: the codebase is a monorepo or a well-defined set of repositories where static analysis can resolve imports, function calls, and type references. Why: the prompt relies on grounding every consumer to a specific file path and line number. Without this access, the model will hallucinate consumers.

02

Bad Fit: Dynamic or Runtime Dependency Resolution

Avoid when: consumers are resolved at runtime via reflection, dependency injection containers, service locators, or dynamic imports (e.g., import(variable)). Risk: the model cannot trace these paths from static code alone and will either miss consumers or invent plausible but incorrect call sites.

03

Required Input: Complete API Surface Diff

Guardrail: the prompt must receive a precise, machine-readable diff of the breaking change—not a prose description. What to watch: if the input only says "we changed the signature of authenticate()", the model will guess which parameters changed and produce a useless impact estimate. Provide the before/after signatures, removed fields, or type changes explicitly.

04

Operational Risk: Silent Consumer Misses

Risk: the model may miss consumers that use wrapper functions, re-exports, or barrel files to access the changed API. Guardrail: always run a complementary automated dependency graph tool (e.g., madge, depcruise) and diff the model's consumer list against the tool's output. Flag any consumer present in the tool but absent from the model's report for manual review.

05

Operational Risk: Migration Effort Overestimation

Risk: the model may treat every call site as requiring equal migration effort, inflating the total estimate. Guardrail: require the prompt to classify each consumer by migration complexity (trivial signature update vs. logic rewrite) and provide a per-consumer rationale. Review any consumer classified as high-effort without a concrete explanation of why the change breaks existing logic.

06

Bad Fit: External Consumers Without Source Access

Avoid when: the breaking change affects external consumers whose source code you cannot analyze (e.g., public API users, third-party plugins). Risk: the model cannot ground external consumer impact in evidence and will fabricate adoption statistics or migration timelines. Guardrail: for public APIs, use this prompt only on your internal usage, and pair it with telemetry or API key-based consumer tracking for external impact.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A reusable prompt template with square-bracket placeholders for estimating the impact radius of a breaking change.

This is the core prompt template for the Breaking Change Impact Radius Estimation workflow. It is designed to be copied directly into your prompt management system, IDE, or orchestration harness. The template uses square-bracket placeholders for all dynamic inputs, ensuring you can swap in your specific change description, codebase context, and output requirements without altering the instruction structure. The prompt instructs the model to act as a principal architect and produce a source-grounded impact report, not a speculative summary.

text
You are a principal software architect analyzing the impact radius of a proposed breaking change. Your task is to produce a detailed, source-grounded impact estimate. You must identify every downstream consumer, affected API surface, and migration effort. You must not speculate without evidence.

## CHANGE PROPOSAL
[CHANGE_DESCRIPTION]

## CODEBASE CONTEXT
[CODEBASE_CONTEXT]

## CONSTRAINTS
- Identify every downstream consumer (internal modules, external services, public APIs, SDK clients, and configuration files) that will be affected.
- For each consumer, cite the specific file path, function signature, class, or interface that will break.
- Classify each break by severity: CRITICAL (compile-time failure or runtime crash), HIGH (behavioral change without crash), MEDIUM (deprecation warning or optional migration), LOW (cosmetic or documentation-only).
- Estimate the migration effort for each consumer using t-shirt sizes (S, M, L, XL) with a one-sentence justification.
- If the change affects a public API, list every known external integrator from the provided context.
- If the provided context is insufficient to identify all consumers, explicitly state what information is missing and where to find it.
- Do not invent consumers, file paths, or API surfaces not present in the provided context.

## OUTPUT SCHEMA
Return a valid JSON object with the following structure:
{
  "change_summary": "string (one-sentence summary of the breaking change)",
  "total_consumers_affected": "integer",
  "severity_distribution": {
    "critical": "integer",
    "high": "integer",
    "medium": "integer",
    "low": "integer"
  },
  "consumers": [
    {
      "consumer_name": "string",
      "consumer_type": "internal_module | external_service | public_api_client | sdk_user | config_file",
      "affected_artifact": "string (file path, function signature, or API endpoint)",
      "break_description": "string (what will fail and how)",
      "severity": "CRITICAL | HIGH | MEDIUM | LOW",
      "migration_effort": "S | M | L | XL",
      "migration_justification": "string (one sentence)",
      "source_evidence": "string (exact file path, line range, or documentation reference from context)"
    }
  ],
  "missing_information": ["string (list of missing context items needed for complete analysis)"],
  "recommended_mitigation": "string (summary of rollout strategy, deprecation window, or migration tooling)"
}

## EXAMPLES
[FEW_SHOT_EXAMPLES]

## RISK LEVEL
[RISK_LEVEL]

To adapt this template, replace each square-bracket placeholder with concrete values before sending it to the model. [CHANGE_DESCRIPTION] should contain the full breaking change proposal, including the old and new signatures, behavioral differences, and the rationale. [CODEBASE_CONTEXT] must include the relevant source files, import graphs, API specifications, or dependency manifests that the model will use as ground truth. If you have a large codebase, pre-filter the context to only the modules and consumers within the blast radius of the change; do not dump the entire repository into the prompt. [FEW_SHOT_EXAMPLES] should contain one or two example input-output pairs showing the expected analysis depth and citation style. [RISK_LEVEL] should be set to HIGH, MEDIUM, or LOW to calibrate the model's conservatism. For high-risk changes, add an explicit instruction to flag any consumer where the migration effort is XL for mandatory human review before proceeding.

IMPLEMENTATION TABLE

Prompt Variables

Required inputs for the Breaking Change Impact Radius Estimation prompt. Each variable must be populated before execution to ensure source-grounding and accurate consumer identification.

PlaceholderPurposeExampleValidation Notes

[BREAKING_CHANGE_DESCRIPTION]

Describes the specific breaking change being proposed, including the API surface, method signature, or contract modification

Remove the timeout_ms parameter from Client.connect() and replace with a ConnectionConfig object

Must be a non-empty string with sufficient specificity to identify the affected surface; reject vague descriptions like 'update the API'

[CODEBASE_ROOT_PATH]

Absolute or repository-relative path to the root of the codebase being analyzed for downstream consumers

/home/runner/work/platform-sdk

Must resolve to a valid directory containing source files; validate path exists before prompt execution

[PACKAGE_OR_MODULE_NAME]

The specific package, module, or library name where the breaking change originates

platform-sdk/client

Must match an actual importable path in the codebase; validate against package manifests or directory structure

[CURRENT_API_SIGNATURE]

The exact current signature, interface, or contract that will be broken, used to search for usage sites

def connect(self, host: str, port: int, timeout_ms: int = 5000) -> Connection:

Must be parseable as a valid code signature; use AST or regex extraction to confirm format before search

[CONSUMER_DISCOVERY_SCOPE]

Defines the boundary for discovering downstream consumers: single repo, monorepo, organization-wide, or external ecosystem

monorepo

Must be one of: 'single-repo', 'monorepo', 'org-wide', 'external-ecosystem'; reject unknown scopes

[DEPENDENCY_GRAPH_SOURCE]

Path or reference to the dependency graph, import map, or build manifest used to trace consumers

monorepo/packages/*/package.json

Must point to a parseable dependency manifest; validate file existence and format before graph traversal

[MIGRATION_EFFORT_ESTIMATION_METHOD]

The method for estimating migration effort per consumer: heuristic, historical data, or manual annotation

heuristic

Must be one of: 'heuristic', 'historical', 'manual'; if 'historical', validate that change history data is available

[OUTPUT_SCHEMA]

The expected structure for the impact report, defining consumer records, affected surfaces, and effort estimates

See output contract: consumer_name, affected_file, affected_line, api_surface, migration_effort_hours, confidence

Must be a valid JSON Schema or structured type definition; validate schema before generating output

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Breaking Change Impact Radius Estimation Prompt into an application or workflow with validation, retries, and source grounding.

This prompt is designed to be integrated into a library or platform team's release pipeline, not run as a one-off chat. The implementation harness must enforce source grounding for every consumer identified, validate the output schema before accepting results, and provide clear logging for auditability. Because the output directly informs migration communication and deprecation timelines, the harness should treat the prompt as a structured data generator with strict post-processing, not as a free-text advisor.

Wire the prompt into an automated workflow that feeds it a structured [CHANGE_DESCRIPTION] and a [CODEBASE_MANIFEST] containing import graphs, API usage data, or dependency declarations. The harness should first validate that the manifest is non-empty and recent enough to be useful—stale data produces false negatives. After the model responds, run a schema validator against the expected JSON output shape: a top-level consumers array where each entry has consumer_name, affected_api_surfaces, estimated_migration_effort, and source_evidence. Reject any output where source_evidence is missing, vague, or hallucinated by cross-referencing against the provided manifest. If validation fails, retry once with a repair prompt that includes the specific validation errors. If the retry also fails, escalate to a human reviewer with the raw output and failure reasons logged.

Model choice matters here. Use a model with strong structured output support and a large context window if the manifest is substantial. For very large codebases, pre-filter the manifest to only include modules that import or depend on the changed surface area before passing it to the prompt—this reduces noise and token cost. Log every run with the prompt version, manifest hash, model used, validation results, and final output. This audit trail is essential when downstream teams question why they were or were not flagged. Avoid running this prompt in a fully automated gate that blocks releases; it should inform decisions, not make them.

IMPLEMENTATION TABLE

Expected Output Contract

Defines the structured output schema for the Breaking Change Impact Radius Estimation Prompt. Use this contract to validate the model's response before downstream processing.

Field or ElementType or FormatRequiredValidation Rule

breaking_change_summary

object

Must contain 'change_id', 'description', and 'affected_api_surfaces' array. 'change_id' must match [CHANGE_ID] input.

breaking_change_summary.affected_api_surfaces

string[]

Each entry must be a fully qualified method signature, endpoint path, or exported symbol. Non-empty array required.

impact_radius.overall_severity

string

Must be one of: 'CRITICAL', 'HIGH', 'MEDIUM', 'LOW'. Enum check required.

impact_radius.downstream_consumers

object[]

Array must contain at least one consumer. Each object must include 'consumer_name', 'repository_path', and 'migration_effort' fields.

impact_radius.downstream_consumers[].consumer_name

string

Non-empty string. Must match a real package, service, or repository name. Source-grounding citation required in 'evidence' field.

impact_radius.downstream_consumers[].migration_effort

string

Must be one of: 'TRIVIAL', 'MODERATE', 'SIGNIFICANT', 'BLOCKING'. Enum check required.

impact_radius.downstream_consumers[].evidence

object

Must contain 'source_type' (e.g., 'import_statement', 'api_call', 'config_reference') and 'source_location' (file path and line reference). Both fields required.

migration_plan.recommended_sequence

string[]

Ordered list of consumer names in recommended migration order. Must include all consumers from impact_radius.downstream_consumers. No missing or extra entries allowed.

PRACTICAL GUARDRAILS

Common Failure Modes

What breaks first when estimating the impact radius of a breaking change, and how to guard against it before the estimate reaches a stakeholder.

01

Silent Consumer Miss

What to watch: The model fails to identify a downstream consumer because it relies on naming conventions, documentation, or static analysis alone, missing runtime callers, reflection-based access, or undocumented internal forks. Guardrail: Cross-reference static analysis with runtime telemetry, API gateway logs, or service mesh data. Require the prompt to flag any consumer identified solely by convention with a confidence qualifier.

02

False Positive from Test Fixtures

What to watch: The model inflates the impact radius by treating test files, mock implementations, or example code as production consumers. This leads to overestimated migration effort and unnecessary stakeholder alarm. Guardrail: Add a [CONSTRAINTS] block instructing the model to classify each consumer as production, test, example, or unknown. Exclude test and example from the primary impact count and report them separately.

03

Unverified Source Grounding

What to watch: The model asserts a dependency exists without providing a verifiable file path, import statement, or API call trace. This makes the estimate non-reproducible and erodes trust during review. Guardrail: Require the [OUTPUT_SCHEMA] to include a source_evidence field for every consumer. If the model cannot locate a concrete source, it must label the entry as unverified and exclude it from the primary impact score.

04

Ignoring Transitive Breakage

What to watch: The model correctly identifies direct consumers but stops there, missing the second-order impact on services that depend on those direct consumers. The estimate looks manageable until cascading failures appear during rollout. Guardrail: Instruct the model to perform a two-hop analysis. The prompt should explicitly request a transitive_impact section listing consumers-of-consumers, with a separate risk score for propagation depth.

05

Version-Specific Blindness

What to watch: The model analyzes the main branch or a single version of the codebase, missing consumers pinned to older versions, LTS releases, or client SDKs that will also break. Guardrail: Add an [INPUT] field for target_versions or release_branches. If the change affects a public API or SDK, require a separate scan of known client repositories or published dependency manifests.

06

Migration Effort Hallucination

What to watch: The model confidently estimates migration effort in hours or story points without access to consumer codebases, team velocity, or the complexity of the required change. These numbers look authoritative but are fabricated. Guardrail: Restrict the output to a qualitative effort classification: trivial, moderate, complex, or unknown. Never request numeric effort estimates. Add a mandatory disclaimer that effort classification is a structural signal, not a commitment.

IMPLEMENTATION TABLE

Evaluation Rubric

Use this rubric to evaluate the quality of the Breaking Change Impact Radius Estimation output before integrating it into a release workflow or sharing it with downstream consumers. Each criterion targets a specific failure mode common to dependency analysis prompts.

CriterionPass StandardFailure SignalTest Method

Consumer Completeness

All downstream consumers identified by the prompt are verified against the repository's dependency graph or build manifests.

A known consumer from the build graph is missing from the output; a consumer is listed without a corresponding import or dependency declaration.

Cross-reference the [IMPACT_REPORT] consumer list with a programmatic dependency scan of the repository. Flag any consumer present in the scan but absent from the report.

API Surface Accuracy

Every affected API surface listed in the output maps to a real public symbol, method, or endpoint in the source code at the specified [TARGET_VERSION].

An affected API surface is listed that does not exist in the codebase; a public API that is changing is omitted from the surface list.

Parse the source code at [TARGET_VERSION] to extract public API surfaces. Compare against the [AFFECTED_API_SURFACES] list. Fail if precision or recall drops below 0.95.

Migration Effort Grounding

Each migration effort estimate is accompanied by a source-grounded rationale referencing specific usage patterns, call sites, or integration points.

An effort estimate is provided without any supporting evidence; rationale is generic and could apply to any change.

For each consumer in the [IMPACT_REPORT], check that the migration_effort field has a non-empty evidence array with at least one file path or integration point reference.

False Positive Control

No consumer is flagged as impacted unless it directly imports, calls, or integrates with the changing API surface.

A consumer is listed as impacted solely because it shares a dependency with the changed module; test-only or build-time dependencies are incorrectly flagged as runtime impacts.

For each consumer in the report, verify that a direct code path exists from the consumer to the changed API. Exclude test-scoped and build-scoped dependencies unless the change affects test infrastructure.

Severity Classification Consistency

Impact severity levels follow the defined taxonomy in [SEVERITY_RUBRIC] and are applied consistently across all consumers.

Two consumers with identical coupling characteristics receive different severity ratings; a consumer with a deprecated wrapper is rated higher than one with direct raw API usage.

Extract all severity assignments. For each pair of consumers with matching coupling type and call frequency, assert identical severity. Spot-check 3 assignments against the [SEVERITY_RUBRIC] definitions.

Output Schema Compliance

The output strictly conforms to the [OUTPUT_SCHEMA] with all required fields present and correctly typed.

A required field is missing; a field contains a string where an array is expected; an extra undocumented field appears.

Validate the raw output against the [OUTPUT_SCHEMA] using a JSON Schema validator. Reject any output that fails validation.

Citation Format Validity

Every source reference in the output uses the exact format specified in [CITATION_FORMAT] and resolves to a real file path or resource identifier.

A citation uses a relative path that does not exist; a citation format deviates from the required pattern; a claim about a consumer lacks any citation.

Parse all citation strings. Verify each file path exists in the repository at [TARGET_VERSION]. Check that every consumer entry has at least one valid citation.

Abstention on Unknowns

The prompt explicitly states 'Unknown' or 'Unable to determine' for any consumer or API surface where evidence is insufficient, rather than fabricating an entry.

A consumer is listed with fabricated file paths or guessed API surface names; confidence is not reported for low-certainty entries.

Search the output for entries where the evidence array is empty but the consumer is listed as confirmed. Flag any entry without a confidence score or with confidence above 0.5 and no evidence.

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Start with the base prompt and a single repository or dependency manifest. Replace [CODEBASE_CONTEXT] with a static file list or pipdeptree/npm list output. Skip formal schema validation—focus on getting a readable impact list. Use a frontier model (GPT-4o, Claude 3.5 Sonnet) with default temperature.

Prompt modification

code
Analyze the following dependency graph and proposed breaking change:

DEPENDENCY GRAPH:
[DEPENDENCY_GRAPH]

BREAKING CHANGE:
[CHANGE_DESCRIPTION]

List every downstream consumer, the affected API surface, and a rough migration effort estimate (Low/Medium/High).

Watch for

  • Hallucinated consumers not present in the input graph
  • Missing transitive dependencies beyond one hop
  • Overly broad "High" effort estimates without justification
  • No distinction between direct and indirect consumers
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.