This prompt is for architects and platform engineers who need to evaluate the downstream impact of a proposed change to a single service before writing code. It produces a structured impact map identifying every affected service, API endpoint, event topic, and data store, with risk scores and a recommended integration test scope. Use it during design review, sprint planning, or as a gate before merging a breaking change proposal.
Prompt
Change Propagation Risk Analysis Prompt

When to Use This Prompt
Defines the job-to-be-done, ideal user, required context, and explicit non-use cases for the Change Propagation Risk Analysis Prompt.
The ideal user has access to a current service dependency graph, API specifications, event schemas, and data ownership documentation. The prompt requires these artifacts as input because it reasons over concrete contracts, not assumptions. Without them, the model will hallucinate dependencies and produce a false sense of security. The prompt is designed for changes with contract implications—schema modifications, endpoint deprecations, event payload changes, or data model migrations—not cosmetic refactors or logging additions that don't cross service boundaries.
Do not use this prompt when the system architecture is undocumented, when the change is purely cosmetic with no contract implications, or when you need a real-time production dependency graph rather than a design-time analysis. The output is a planning artifact, not a runtime topology. For high-risk changes in regulated domains, always route the impact map through a human architecture review before accepting the recommended test scope. The prompt identifies propagation paths; it does not replace integration testing or canary deployment validation.
Use Case Fit
Where the Change Propagation Risk Analysis prompt delivers reliable impact maps and where it introduces unacceptable risk.
Good Fit: Pre-Merge Architecture Review
Use when: A pull request or design document proposes a schema change, API deprecation, or event contract modification. Guardrail: Run the prompt against the proposed change diff and the service dependency graph before approving the merge. The impact map becomes a required artifact in the review checklist.
Good Fit: Migration Sequencing
Use when: Planning a multi-service migration such as database per service extraction or Strangler Fig step ordering. Guardrail: Feed the prompt the current dependency graph and the target state. Use the risk scores to sequence migrations so high-propagation changes happen first with extra integration test coverage.
Bad Fit: Runtime Incident Triage
Avoid when: A production incident is active and you need root cause within minutes. The prompt requires static analysis of known dependencies and cannot observe live traffic, latency spikes, or partial failures. Guardrail: Use observability tools for triage. Run this prompt during the post-incident review to map blast radius for the postmortem.
Bad Fit: Undocumented or Inferred Dependencies
Avoid when: The system lacks a machine-readable dependency graph, API catalog, or event registry. The model will hallucinate plausible but incorrect dependencies. Guardrail: Require a verified dependency graph as a required input. If none exists, run a dependency discovery tool first and have a human validate the graph before running this prompt.
Required Input: Verified Dependency Graph
Risk: Without an accurate, versioned dependency graph, the impact map will miss hidden couplings such as shared databases, implicit API consumers, or cron job dependencies. Guardrail: The prompt must receive a structured graph with service nodes, directional edges, and edge types (sync API, async event, shared store). Reject outputs when the graph is stale or manually sketched without verification.
Operational Risk: Breaking Change False Negatives
Risk: The prompt may classify a change as non-breaking when it actually breaks downstream consumers due to undocumented field ordering, implicit type coercion, or semantic contract violations. Guardrail: Pair the impact map with automated contract tests in CI/CD. Any change flagged as low-risk but touching a shared schema must still pass consumer-driven contract tests before deployment.
Copy-Ready Prompt Template
A copy-ready prompt template that instructs the model to act as a systems architect performing a rigorous change propagation risk analysis.
The following prompt template is designed to be pasted directly into your AI system. It instructs the model to adopt the persona of a systems architect and perform a structured analysis of how a proposed change to one service will propagate across the entire system. The output is an impact map identifying all affected services, APIs, events, and data stores, complete with risk scores and a recommended integration test scope. Replace every square-bracket placeholder with the specific details of your system and the change being proposed before execution.
textYou are a systems architect specializing in distributed systems and microservice risk analysis. Your task is to perform a rigorous change propagation analysis for a proposed modification. ## System Context [SYSTEM_ARCHITECTURE_DESCRIPTION] ## Proposed Change Service to modify: [SERVICE_NAME] Change description: [CHANGE_DESCRIPTION] Proposed changes to API contracts, event schemas, or data models: [CONTRACT_CHANGES] ## Analysis Instructions 1. **Dependency Mapping:** Identify every downstream service, API consumer, event subscriber, and data store that depends on [SERVICE_NAME] or the artifacts being changed. 2. **Impact Assessment:** For each identified dependency, describe the specific impact of the proposed change. Classify the impact as **Breaking**, **Degrading**, or **Transparent**. 3. **Risk Scoring:** Assign a risk score (1-5, where 5 is critical) to each impacted component based on the severity of the impact and the criticality of the component. 4. **Test Scope Recommendation:** Define the minimum required integration test scope to validate the change safely, specifying which service interactions must be tested. 5. **Migration Sequencing:** If the change is breaking, propose a sequenced migration plan (e.g., two-phase deployment, feature flags, API versioning) to minimize blast radius. ## Output Format Produce a single JSON object conforming to this exact schema: { "change_id": "string", "analysis_summary": "string", "impact_map": [ { "impacted_component": "string", "dependency_type": "API | Event | Database | Config", "impact_description": "string", "impact_classification": "Breaking | Degrading | Transparent", "risk_score": "number (1-5)", "recommended_action": "string" } ], "breaking_changes_detected": "boolean", "recommended_integration_test_scope": ["string"], "migration_sequence": ["string"] } ## Constraints - Only report on components explicitly mentioned in or directly inferable from the provided system context. - If the change description is ambiguous, state your assumptions clearly in the `analysis_summary`. - Do not invent dependencies or system components not described in the context.
To adapt this template, replace the [SYSTEM_ARCHITECTURE_DESCRIPTION] placeholder with a detailed description of your system's components, their interactions, and data flows. This context is critical for accurate dependency mapping. The [CHANGE_DESCRIPTION] and [CONTRACT_CHANGES] placeholders must be filled with precise, technical details of the modification. The output schema is strictly enforced in the prompt to ensure the result can be parsed by downstream automation. For high-risk changes, the generated impact_map and migration_sequence should be treated as a starting point for a formal architecture review, not a final decision. Always log the full prompt and response for auditability.
Prompt Variables
Required inputs for the Change Propagation Risk Analysis Prompt. Each placeholder must be populated before execution to ensure reliable impact mapping and risk scoring.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[CHANGE_DESCRIPTION] | The proposed code, schema, or configuration change to analyze | Update the | Must be a non-empty string describing the delta. Reject if only a ticket number or URL is provided without the change summary. |
[SYSTEM_ARCHITECTURE_CONTEXT] | Current-state architecture including service inventory, API contracts, event schemas, and data store mappings | Service map JSON with dependencies, OpenAPI specs for affected endpoints, and event registry | Must include at least service names, their exposed interfaces, and known dependencies. Null allowed if the model should infer from code, but accuracy will degrade. |
[DEPENDENCY_GRAPH] | Directed graph of service-to-service and service-to-datastore dependencies | Adjacency list or Mermaid diagram showing Orders -> Payments, Orders -> Inventory, Orders -> PostgresDB | Must be parseable as a graph. Cyclic dependencies should be flagged in validation. Null allowed for code-inference mode. |
[BREAKING_CHANGE_RULES] | Organization-specific definitions of what constitutes a breaking change | Schema field removal, enum value deletion, auth scope change, or latency SLO regression >10% | Must be a list of explicit rules. If null, the prompt defaults to standard semantic versioning breaking change definitions. |
[INTEGRATION_TEST_CATALOG] | Inventory of existing integration tests with coverage scope per service boundary | Test IDs and descriptions: 'test_payment_flow_e2e', 'test_order_refund_saga' | Null allowed. When provided, the output should map affected tests. When null, the prompt generates recommended test scope without mapping to existing tests. |
[RISK_THRESHOLD_CONFIG] | Thresholds for classifying risk scores as Low, Medium, High, Critical | Low: 0-3, Medium: 4-6, High: 7-8, Critical: 9-10 | Must be a valid numeric range mapping. If null, use default thresholds: Low 0-3, Medium 4-6, High 7-8, Critical 9-10. |
[OUTPUT_SCHEMA] | Expected JSON schema for the impact map output | JSON Schema with fields: affected_services, affected_apis, affected_events, affected_datastores, risk_scores, breaking_changes, recommended_tests | Must be a valid JSON Schema object. If null, the prompt uses its default structured output format. Schema validation should run post-generation. |
Implementation Harness Notes
How to wire the Change Propagation Risk Analysis prompt into an application or review workflow.
This prompt is designed to be integrated into an architecture review pipeline, not used as a one-off chat interaction. The implementation harness should treat the prompt as a deterministic analysis step that takes a structured change proposal and a service dependency graph as inputs, and returns a machine-readable impact map. Because the output directly informs integration test scope and release gating decisions, the harness must enforce schema validation, handle model non-determinism, and provide a clear audit trail linking each risk score to the evidence used to produce it.
Wire the prompt into an application by first assembling the [SERVICE_DEPENDENCY_GRAPH] from your service catalog, API gateway configs, event registry, and data lineage tools. This graph should be a machine-generated input, not hand-written, to avoid drift between the analysis and reality. The [CHANGE_PROPOSAL] should come from a structured form or PR template that captures the affected service, the type of change (schema, contract, data model, protocol, dependency version), and the blast radius intent. Before calling the model, validate both inputs against their expected schemas. After receiving the model response, run strict JSON schema validation on the output. If validation fails, retry once with the validation errors appended to the prompt as [PREVIOUS_ERRORS]. If the retry also fails, route the request to a human architect for manual review rather than silently accepting a malformed impact map.
Model choice matters here. Use a model with strong reasoning capabilities and reliable structured output support. Configure the request with response_format set to json_schema (OpenAI) or equivalent structured output mode, and provide the full expected schema. Set temperature low (0.1-0.2) to reduce variance in risk scoring. Log every request and response pair, including the validated output, the model version, and the timestamp, to an immutable audit store. This log becomes evidence for compliance reviews and post-incident analysis. For high-risk changes—those touching payment, auth, or data deletion paths—add a mandatory human approval gate after the impact map is generated. The approval step should present the impact map alongside the original change proposal and require sign-off before integration tests are scoped or the change proceeds.
Do not use this prompt as a real-time gate in a CI/CD pipeline without caching. The model call adds latency and cost. Instead, run it as an asynchronous analysis triggered by a change proposal event. Cache the dependency graph with a known version identifier and include that version in the prompt's [SERVICE_DEPENDENCY_GRAPH] section so stale-graph analyses are detectable. When the service topology changes, invalidate the cache and re-run any pending analyses. Avoid wiring the prompt directly to automated deployment blockers until you have at least 50 reviewed outputs where you've measured false-positive and false-negative risk assignments against actual production incidents. Premature automation here creates a bottleneck that engineers will route around.
For teams using RAG, do not retrieve dependency information at prompt time from unstructured docs. The dependency graph must be authoritative and pre-assembled. If you lack a formal service catalog, invest in building one before operationalizing this prompt. The quality floor of the analysis is set by the accuracy of the input graph, not by prompt engineering.
Expected Output Contract
Validate the structure and content of the Change Propagation Risk Analysis output. Use this contract to build a parser, write automated tests, and detect malformed responses before downstream consumption.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
change_id | string | Non-empty string matching the input change identifier. Must be present and identical to the [CHANGE_ID] input. | |
propagation_map | array of objects | Array must contain at least one element. Each element must have the fields: service_name (string, required), impact_type (enum: DIRECT, INDIRECT, NONE, required), coupling_path (string, required if impact_type is DIRECT or INDIRECT), risk_score (integer 1-10, required), breaking_change (boolean, required). | |
propagation_map[].service_name | string | Must match a known service identifier from the [SERVICE_REGISTRY] input. Case-sensitive exact match required. | |
propagation_map[].impact_type | enum string | Must be one of: DIRECT, INDIRECT, NONE. DIRECT means the service consumes the changed API or event directly. INDIRECT means downstream dependency chain. NONE means no propagation path found. | |
propagation_map[].coupling_path | string or null | Required when impact_type is DIRECT or INDIRECT. Must describe the specific API endpoint, event type, or data store dependency. Null allowed only when impact_type is NONE. | |
propagation_map[].risk_score | integer | Integer between 1 and 10 inclusive. 1-3: low risk (backward compatible, isolated). 4-6: medium risk (requires coordination). 7-10: high risk (breaking change, shared data, or cascading failure potential). | |
propagation_map[].breaking_change | boolean | Must be true if the change alters a contract, schema, or behavior that consumers depend on. False otherwise. Cannot be null. | |
recommended_test_scope | array of strings | Array of service names that should be included in integration testing. Must be a subset of services listed in propagation_map with impact_type DIRECT or INDIRECT. Empty array allowed only if all impact_type values are NONE. |
Common Failure Modes
Change propagation analysis fails silently when the model misses hidden coupling, overestimates isolation, or confuses direct and transitive dependencies. These cards cover the most common failure patterns and how to catch them before they reach production.
Hidden Shared Database Coupling
What to watch: The model identifies API and event dependencies but misses services that share a database table, schema, or materialized view. Two services reading from the same table without explicit contracts create silent propagation risk. Guardrail: Require the prompt to enumerate data stores per service and flag any table accessed by more than one service as a coupling point, even without direct API calls.
Transitive Dependency Blindness
What to watch: The model reports only direct callers of the changed service and ignores services two or three hops away that depend on the response shape, timing, or error modes. A change to Service A breaks Service C through Service B, and the analysis misses it. Guardrail: Add an explicit instruction to traverse the dependency graph to depth N and report the full propagation chain, not just immediate consumers.
Semantic Contract Drift
What to watch: The model treats a field rename or type change as low-risk because the API endpoint name didn't change, but downstream services parse that field by position or make assumptions about its format. Guardrail: Require field-level impact analysis for every schema change, not just endpoint-level. Include a check for implicit contracts like sort order, nullability, and enum value stability.
Event Schema Compatibility Gaps
What to watch: The model analyzes REST and gRPC endpoints but overlooks asynchronous event channels like Kafka topics, message queues, or event streams. A change to the event payload breaks consumers that were never listed as API clients. Guardrail: Explicitly require the prompt to inventory all published and consumed events per service, including topic names, schema registries, and consumer groups.
Risk Score Inflation from Static Analysis
What to watch: The model assigns high risk scores to every dependency because it cannot distinguish between a critical runtime call and a deprecated import that never executes. Teams ignore the analysis when everything is flagged as high severity. Guardrail: Instruct the model to differentiate static code references from runtime call paths and to request deployment frequency or traffic data before scoring. Require a confidence qualifier when runtime data is unavailable.
Integration Test Scope Gaps
What to watch: The model recommends testing only the changed service and its direct consumers, missing integration points like shared caches, feature flags, or configuration services that propagate failures without appearing in the dependency graph. Guardrail: Add a checklist of infrastructure coupling points—config stores, feature flag services, CDNs, and secret managers—that must be included in the test scope regardless of the dependency graph output.
Evaluation Rubric
Criteria for evaluating the quality of a Change Propagation Risk Analysis output before integrating it into an architecture review or CI/CD pipeline.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Service Completeness | All services directly or indirectly called by [TARGET_SERVICE] are listed. | A known downstream service is missing from the impact map. | Cross-reference the output list against the service registry or dependency graph for [TARGET_SERVICE]. |
Breaking Change Detection | Every public API, event schema, or data contract change is flagged as 'breaking' or 'non-breaking' with a specific reason. | A field removal or type change is incorrectly labeled 'non-breaking'. | Manually review one breaking and one non-breaking change against the API's versioning policy. |
Risk Score Calibration | Risk scores (e.g., High/Medium/Low) correlate with the blast radius and coupling type. | A change to a shared database schema is scored 'Low' risk. | Validate that 'High' risk items involve shared kernels, tight coupling, or data migrations. |
Integration Test Scope | The recommended test scope lists specific service-to-service interaction points, not just service names. | The test scope is a generic list of all downstream services with no specific API or event to test. | Check that each test recommendation includes a specific endpoint, event type, or contract to validate. |
Data Store Impact | All shared databases, read replicas, or caches affected are explicitly named. | A change to a shared table is described without naming the other reading services. | Verify that for each data store change, all consuming services are listed in the impact map. |
Rollback Guidance | A clear rollback order and a check for irreversible data changes are provided. | The output suggests a rollback without noting that a schema migration is irreversible. | Confirm that any data migration step includes a warning if it is not safely reversible. |
Citation Grounding | Each risk claim references a specific source file, API spec, or architecture document. | A high-risk claim is made with no link to the code, schema, or ADR that proves the dependency. | Trace a sample of 3 risk claims back to the provided [ARCHITECTURE_DOCUMENTS] or [DEPENDENCY_GRAPH]. |
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 service change description and a manually provided dependency list. Skip formal schema validation and accept unstructured markdown output. Focus on getting a quick impact map to guide a whiteboard discussion.
Simplify the input block:
code[CHANGE_DESCRIPTION]: brief paragraph describing the proposed change [KNOWN_DEPENDENCIES]: comma-separated list of services you already know about
Remove the risk_score numeric requirement and ask for High / Medium / Low labels instead.
Watch for
- Missing transitive dependencies the model can't infer without a full graph
- Overly broad "all services affected" responses when the model lacks specificity
- No distinction between direct callers and event consumers

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