This prompt is for architects and platform engineers who need to evaluate the blast radius of a proposed code or design change before implementation begins. The core job-to-be-done is producing a risk-scored impact report that lists affected modules, estimates breakage probability, and recommends test priorities. Use this when a change touches a shared interface, a foundational library, a database schema, or any widely-depended-upon component where an uncaught regression could cascade across the system. The prompt requires source-grounded evidence for every affected path it identifies, so it is only effective when the codebase, dependency graph, or design documentation is available for inspection.
Prompt
Change Propagation Risk Assessment Prompt

When to Use This Prompt
Defines the ideal user, required context, and boundaries for the Change Propagation Risk Assessment Prompt.
Do not use this prompt for trivial changes with no transitive dependencies, such as isolated UI string updates or single-file utility functions with zero importers. It is also inappropriate when the codebase is not available for inspection—this is a design-level static analysis tool, not a runtime monitoring solution. The prompt works best when paired with concrete artifacts: import graphs, API specifications, database schemas, or architecture decision records. Without these, the model will hallucinate dependency paths. For high-risk domains like payments, auth, or data integrity, always require human review of the generated impact report before accepting it as a release gate. The output is a decision-support artifact, not an automated approval.
Before running this prompt, gather the proposed change description, the affected component's interface surface, and a dependency map if available. After receiving the output, validate that every affected path listed has a corresponding source reference. If the model cannot ground a path, flag it for manual investigation. The next section provides the copy-ready prompt template you can adapt with your own input variables, output schema, and risk thresholds.
Use Case Fit
This prompt is designed for rigorous, evidence-backed change impact analysis. It is not a general-purpose code explainer. Use it when you need a structured risk report grounded in real code paths.
Good Fit: Pre-Merge Impact Review
Use when: A pull request touches a core module or shared library. The prompt maps the blast radius before merging, identifying every downstream consumer and test gap. Guardrail: Run against the merge-base diff, not the full branch, to isolate the change set.
Good Fit: Platform API Deprecation Planning
Use when: You are planning to deprecate or change a public API. The prompt estimates the migration effort for all internal consumers, prioritizing high-risk breakages. Guardrail: Ground every affected call site with a direct link to the source file and line number.
Bad Fit: Greenfield Design Brainstorming
Avoid when: You are designing a new system with no existing codebase. This prompt requires a concrete dependency graph to analyze. It will hallucinate imaginary modules if forced. Guardrail: Use an Architecture Decision Record (ADR) prompt for design exploration instead.
Bad Fit: Runtime Performance Profiling
Avoid when: You need to diagnose a latency spike or memory leak. This prompt analyzes static dependency structures, not dynamic runtime behavior or call frequency. Guardrail: Pair this with an observability tool; use the prompt only to explain why a hot path is architecturally fragile.
Required Inputs: Dependency Graph & Diff
Risk: Without a machine-readable dependency graph (e.g., from a build tool or code analyzer), the model relies on guesswork. Guardrail: Always provide a structured [DEPENDENCY_GRAPH] and a specific [CHANGE_DIFF]. The output must cite exact paths from these inputs.
Operational Risk: False Positive Storms
Risk: On very large monorepos, a change to a low-level utility can flag hundreds of downstream modules, overwhelming the reviewer. Guardrail: Instruct the prompt to tier the output by [SEVERITY] and cap the report at the top N highest-risk items, with a summary count for the rest.
Copy-Ready Prompt Template
A reusable prompt with square-bracket placeholders for assessing the blast radius of a proposed code or design change.
The following prompt template is designed to be pasted directly into your AI harness. It instructs the model to act as a systems architect, analyze a proposed change against a provided dependency graph or codebase context, and produce a structured risk assessment. Every placeholder is enclosed in square brackets. Replace them with concrete values before execution. The prompt enforces source-grounding, meaning every affected module listed in the output must be traceable back to the evidence you provide in [DEPENDENCY_CONTEXT].
textYou are a systems architect specializing in dependency analysis and change risk assessment. Your task is to evaluate the blast radius of a proposed change and produce a structured risk report. ## INPUT [CHANGE_DESCRIPTION] ## CONTEXT [DEPENDENCY_CONTEXT] ## CONSTRAINTS - Ground every affected module, file, or service in the provided [DEPENDENCY_CONTEXT]. Do not invent dependencies. - Classify each affected component's breakage probability as HIGH, MEDIUM, or LOW based on directness of coupling and interface contract strictness. - If the change involves a public API, assess both internal and external consumer impact separately. - Flag any circular dependencies that amplify risk. - If the provided context is insufficient to assess a likely impact, explicitly state that instead of guessing. ## OUTPUT_SCHEMA Return a single JSON object with the following structure: { "change_summary": "A one-sentence summary of the proposed change.", "risk_score": "OVERALL_RISK_LEVEL", // HIGH, MEDIUM, or LOW "affected_components": [ { "component_path": "string", "dependency_type": "DIRECT | TRANSITIVE | CONFIGURATION | DATA_CONTRACT", "breakage_probability": "HIGH | MEDIUM | LOW", "rationale": "string explaining the coupling and why breakage is likely or unlikely, citing specific evidence from [DEPENDENCY_CONTEXT]", "recommended_test_priority": "CRITICAL | HIGH | MEDIUM | LOW" } ], "amplifying_factors": ["List any circular dependencies, god components, or shared mutable state that increase the blast radius."], "test_recommendations": { "critical_path_tests": ["List of specific test cases or test suites to run first."], "integration_test_targets": ["List of integration points that need verification."], "monitoring_signals": ["List of metrics, logs, or alerts to watch during rollout."] }, "insufficient_context_notes": ["List any questions that must be answered before a complete assessment is possible, or null if the context is sufficient."] } ## EXAMPLES [FEW_SHOT_EXAMPLES] ## RISK_LEVEL [RISK_LEVEL]
To adapt this template, start by replacing [CHANGE_DESCRIPTION] with a precise description of the proposed code, schema, or API change. Populate [DEPENDENCY_CONTEXT] with a dependency graph, import statements, build manifest, or architecture decision records. The quality of the output depends entirely on this context. [FEW_SHOT_EXAMPLES] should contain one or two example input-output pairs that demonstrate the desired level of detail and grounding. Set [RISK_LEVEL] to the organizational risk tolerance for this type of change, which influences how conservative the model's probability estimates should be. After generating the output, validate that every component_path in affected_components appears in your provided context. If the model returns insufficient_context_notes, resolve those questions and re-run the prompt before making a release decision.
Prompt Variables
Placeholders required by the Change Propagation Risk Assessment Prompt. Each variable must be populated before the prompt is sent to the model. Validation notes describe how to verify the input is well-formed and sufficient for a reliable risk assessment.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[CHANGE_DESCRIPTION] | Natural language description of the proposed change, including what is being modified and why | Update the authentication service to support OAuth2 client credentials flow for machine-to-machine communication | Must be non-empty and contain a verb describing the action. Reject if only a ticket number or URL is provided without inline description. |
[AFFECTED_MODULE] | The primary module, service, or component where the change originates | auth-service/src/token_provider.py | Must resolve to a real file path, package name, or service identifier in the target system. Validate against repository structure or service registry before prompt assembly. |
[DEPENDENCY_GRAPH] | Machine-readable representation of the system's dependency structure, typically as a directed graph of imports, calls, or data flows | JSON adjacency list: {"auth-service": ["user-db", "cache-layer", "api-gateway"], ...} | Must be valid JSON with no cycles in the graph representation itself. Each node must have a corresponding entry. Null allowed if graph is generated at runtime from build manifests. |
[ARCHITECTURE_RULES] | Declared architectural constraints that define allowed and disallowed dependency directions | Layer rule: 'domain' must not depend on 'infrastructure'. Boundary rule: 'billing' context is isolated from 'shipping'. | Must be a list of explicit, testable rules. Reject rules that contain only vague guidance like 'keep coupling low'. Each rule must be parseable into a source-target pair for automated checking. |
[CHANGE_TYPE] | Classification of the change: SIGNATURE_CHANGE, BEHAVIOR_CHANGE, DEPRECATION, REMOVAL, or DATA_MODEL_CHANGE | SIGNATURE_CHANGE | Must match one of the enumerated values exactly. Determines which propagation heuristics the prompt applies. Reject unknown values rather than guessing. |
[TEST_COVERAGE_DATA] | Coverage metrics or file-level coverage annotations for affected and dependent modules | {"auth-service": {"line_coverage": 0.82, "test_files": ["test_token_provider.py"]}, ...} | Null allowed if coverage data is unavailable. If provided, must be valid JSON with numeric coverage values between 0.0 and 1.0. Warn if coverage data is older than 30 days. |
[OUTPUT_SCHEMA] | Expected JSON schema for the risk assessment output, defining required fields and their types | {"type": "object", "properties": {"affected_modules": {"type": "array"}, "risk_score": {"type": "number"}}, "required": ["affected_modules", "risk_score"]} | Must be valid JSON Schema draft-07 or later. Reject if schema contains circular references. Validate that required fields match downstream consumer expectations before prompt execution. |
Implementation Harness Notes
How to wire the Change Propagation Risk Assessment prompt into an application with validation, source grounding, and review gates.
This prompt is designed to operate inside a deterministic harness, not as a free-text chat. The harness must supply the proposed change description, the affected module or component list, and the dependency graph or import structure as structured [INPUT]. The model's job is to reason over that graph and produce a scored impact report. The harness is responsible for providing accurate graph data; the model is responsible for traversal reasoning and risk classification. Do not ask the model to invent the dependency graph from memory or training data—source-ground every edge.
Build the harness in three stages: pre-processing, invocation, and post-processing. In pre-processing, extract the dependency graph from your build system (e.g., madge, dependency-cruiser, or a custom import parser) and serialize it as an adjacency list or edge list in JSON. Attach file paths, module names, and any known architectural rules (layer boundaries, allowed dependency directions). In the invocation stage, inject this graph into the [DEPENDENCY_GRAPH] placeholder along with the [PROPOSED_CHANGE] description and a [RISK_THRESHOLD] for filtering low-impact paths. In post-processing, validate that every affected path in the model's output references a real edge present in the input graph. Reject hallucinated paths. Log the input graph hash, the prompt version, and the model response for auditability.
For high-risk changes—those touching authentication, data persistence, payment flows, or security boundaries—route the output to a human review queue before accepting it. The harness should flag any report where the estimated breakage probability exceeds 0.7 or where the blast radius crosses a declared architectural boundary. Use a structured output schema with fields like affected_modules, propagation_paths, breakage_probability, test_priority, and evidence_edges so that downstream tooling can parse the report and automatically generate a test plan or a CI/CD risk comment.
Model choice matters. Use a model with strong reasoning capabilities and a large context window if the dependency graph exceeds 200 edges. For smaller graphs, a faster model with constrained output (JSON mode, strict schema) works well. Implement retry logic: if the output fails schema validation or references edges not in the input graph, retry once with a stricter prompt that includes the validation error message. After two failures, escalate to a human with the partial output and the validation errors. Never silently accept an unvalidated risk report.
Expected Output Contract
Defines the structure, types, and validation rules for the Change Propagation Risk Assessment output. Use this contract to parse, validate, and integrate the model response into downstream risk dashboards or CI/CD gates.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
change_summary | string | Must be a non-empty string summarizing the proposed change in one sentence. | |
overall_risk_score | string (enum) | Must be one of: 'CRITICAL', 'HIGH', 'MEDIUM', 'LOW'. Case-sensitive check. | |
affected_modules | array of objects | Array must contain at least 1 item. Each item must have 'module_name' (string) and 'file_path' (string) fields. | |
breakage_probability | number (float) | Must be a float between 0.0 and 1.0 inclusive. Represents estimated breakage likelihood. | |
propagation_paths | array of strings | Each string must be a valid import path or call chain traceable to a source file. Empty array is allowed only if risk_score is 'LOW'. | |
test_priority_order | array of strings | Array must contain at least 1 item. Each string must reference a specific test suite or file path. Order implies priority. | |
recommended_verification_steps | array of strings | If present, each string must describe a concrete, actionable verification step. Null or empty array is acceptable. | |
source_grounding_references | array of objects | Each object must have 'source_file' (string) and 'line_range' (string in format 'L{start}-L{end}'). Array must not be empty. |
Common Failure Modes
Change propagation risk assessments fail when the model hallucinates dependencies, misses indirect coupling, or overestimates impact. These cards cover the most common production failure modes and how to guard against them.
Hallucinated Dependency Paths
What to watch: The model invents import paths, call chains, or module names that don't exist in the codebase. This happens when the prompt lacks source-grounding instructions or the model fills gaps with plausible but fictional dependencies. Guardrail: Require every affected path to be grounded with a file path and line reference. Add a post-generation validation step that checks each claimed dependency against the actual codebase using a static analysis tool or grep before the report is accepted.
Missed Indirect Coupling Through Shared State
What to watch: The model identifies direct imports but misses coupling through shared databases, message queues, feature flags, or configuration files. A change to a schema can silently break consumers that don't import the changed module directly. Guardrail: Explicitly list coupling categories in the prompt: direct imports, shared schemas, event payloads, config keys, and database tables. Require the output to include a dedicated section for each category, and flag any category with zero findings for human review.
Overestimated Blast Radius
What to watch: The model treats every downstream consumer as equally affected, producing an impact report so broad it's useless for prioritization. Test-only imports, deprecated paths, and dead code get the same severity as critical production call sites. Guardrail: Require severity classification per affected module based on runtime usage evidence, not just static import presence. Include a confidence score for each finding, and flag high-severity-low-confidence items for manual verification before they drive test planning.
Stale Analysis from Outdated Context
What to watch: The model analyzes a snapshot of the codebase that's already out of date by the time the report is read. This is especially dangerous when the prompt is run against a cached or summarized representation rather than live repository state. Guardrail: Include a timestamp and commit hash in the prompt context and in the output header. Add a freshness check: if the repository HEAD has moved since the analysis was generated, flag the report as potentially stale and require re-generation before acting on its recommendations.
Test Priority Based on Volume Not Risk
What to watch: The model recommends testing every affected module equally, producing a flat checklist that ignores the difference between a core payment path and a rarely-used admin utility. This wastes testing effort and creates a false sense of coverage. Guardrail: Require the output to rank test priorities by a composite score that combines coupling strength, runtime call frequency, and business criticality. Include explicit rationale for the top three and bottom three priorities so reviewers can spot misranked items quickly.
Ignoring Asymmetric Coupling Direction
What to watch: The model treats all coupling as bidirectional, missing cases where a stable abstraction is depended upon by many consumers but the change only affects one implementation behind that abstraction. This inflates the reported impact and triggers unnecessary cross-team coordination. Guardrail: Instruct the model to distinguish between interface-level coupling and implementation-level coupling. For changes behind a stable interface, require the output to explicitly state that downstream consumers are shielded and note any interface contract tests that should still be run.
Evaluation Rubric
Criteria for evaluating the quality and safety of the change propagation risk assessment output before integrating it into a CI/CD gate or architectural review workflow.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Affected Module Completeness | Every module in the call graph or dependency tree reachable from the changed symbol is listed in the impact report. | A known downstream consumer is missing from the report; a static analysis tool identifies an unlisted dependency. | Cross-reference the report's module list against a programmatic dependency graph generated from the codebase. Flag any missing nodes. |
Source Grounding Accuracy | Every affected file path and line number cited in the report corresponds to an actual import, call, or reference in the source code. | A cited file path does not exist in the repository, or the referenced line does not contain the claimed dependency. | Automated script validates each file path and line number against the current commit. Any mismatch is a failure. |
Breakage Probability Calibration | High-probability flags are reserved for breaking API changes (signature, schema, contract). Low-probability flags are assigned to compatible changes. | A non-breaking change like adding an optional parameter is flagged as high probability, or a breaking change is flagged as low. | Provide a controlled set of 10 known breaking and non-breaking changes. Measure whether the model's probability assignments match the expected severity. |
Test Priority Ordering | Modules with the highest coupling and breakage probability are recommended for testing first. The ordering is deterministic and explainable. | A module with a low risk score is prioritized above a high-risk module with no justification, or the ordering is random across runs. | Run the prompt on the same change three times. The top-3 test priorities must be identical and must correlate with the risk scores. |
False Positive Control for Dynamic Imports | Dependencies resolved at runtime (e.g., importlib, require) are flagged with a distinct 'dynamic' label and are not treated as static coupling. | A dynamic import is reported as a standard static dependency, inflating the blast radius and breakage probability. | Seed the codebase with known dynamic import patterns. Verify that the output labels them as dynamic and does not assign them a high static breakage probability. |
Test-Only Dependency Handling | Dependencies that exist only in test files are labeled as 'test-scope' and are excluded from the production breakage probability score. | A test-only dependency is reported as a production risk, causing unnecessary test prioritization and alarm. | Provide a change where the only consumers are test files. The production risk score must be zero, and all affected paths must be labeled 'test-scope'. |
Output Schema Validity | The output is valid JSON matching the [OUTPUT_SCHEMA] contract, including all required fields and correct enum values for risk levels. | The output is missing a required field, uses an undefined enum value, or is not parseable JSON. | Validate the raw output against the JSON Schema definition. A single schema violation constitutes a failure. |
Abstraction vs. Implementation Leakage | The report correctly identifies when a change affects a public interface versus an internal implementation detail, and adjusts the risk commentary accordingly. | A change to an internal private method is reported with the same severity and consumer impact as a change to a public API. | Test with a change to a private function (e.g., prefixed with _) and a public function. Verify that the risk narrative and consumer list are appropriately scoped for each. |
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 [CHANGE_DESCRIPTION] and a manually provided [DEPENDENCY_GRAPH] as a JSON list of {"source": "...", "target": "...", "type": "..."} objects. Skip strict schema validation on output; accept a markdown risk report. Run interactively in a chat interface.
Watch for
- Missing dependency edges causing false negatives in blast radius
- Overly broad risk scores when the model cannot trace indirect paths
- No source-grounding of affected modules—verify manually

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