Use this prompt when a data platform team submits a schema change for a topic governed by a schema registry, such as Confluent Schema Registry, AWS Glue, or Apicurio. The prompt's job is to validate the proposed schema against the currently registered version and the declared compatibility mode (BACKWARD, FORWARD, FULL, and their transitive variants). It produces a structured compatibility report that goes far beyond a binary pass/fail check. The report identifies breaking changes, field additions, default value gaps, type promotions, and the required consumer upgrade order. This is the artifact that turns a silent registry rejection into an actionable plan for the engineering team responsible for the change.
Prompt
Streaming Schema Registry Compatibility Prompt

When to Use This Prompt
Integrate a structured schema compatibility review into your CI/CD pipeline to catch breaking changes, plan consumer upgrades, and prevent production outages before a new schema is registered.
This prompt is designed to be a gate in a CI/CD pipeline or a mandatory step in a schema review workflow. The ideal user is a data engineer, a platform engineer, or a backend developer who has authored a new .avsc, .proto, or JSON Schema file and needs to register it. The required context includes the full text of the proposed schema, the full text of the latest registered schema, and the declared compatibility mode. Without all three, the prompt cannot perform a meaningful analysis. The prompt does not replace the registry's own compatibility check; instead, it adds the human-readable reasoning, consumer impact analysis, and upgrade sequencing that the registry's opaque pass/fail does not provide. This makes it a critical tool for teams practicing zero-downtime deployments with streaming data.
Do not use this prompt for simple format validation, for schemas that are not yet registered, or as a substitute for integration tests. It is not a schema linting tool. It is also not a replacement for a human review when a FULL_TRANSITIVE compatibility check fails; in such cases, the prompt's report should be a starting point for an architectural discussion, not the final word. The prompt's value is in its structured, deterministic reasoning about field-level changes. When you integrate it, ensure your harness provides the exact registered schema version, not a stale cached copy, as the entire analysis hinges on a correct diff. After the report is generated, the next step is to attach it to the schema change request and use the consumer upgrade order to sequence deployments safely.
Use Case Fit
Where this prompt works and where it does not. Streaming schema compatibility checks require precise inputs and clear boundaries to avoid false confidence.
Good Fit: Structured Registry Rules
Use when: your organization has a well-defined schema registry with explicit compatibility rules (BACKWARD, FORWARD, FULL, BACKWARD_TRANSITIVE, etc.) and a known schema format (Avro, Protobuf, JSON Schema). The prompt excels at mapping a proposed change against these rules and producing a structured verdict. Guardrail: feed the exact registry compatibility type and both schema versions as explicit inputs; do not ask the model to infer the rules from documentation.
Bad Fit: Undocumented Legacy Schemas
Avoid when: the current schema is undocumented, inferred from samples, or stored only in application code without a registry. The model cannot reliably reverse-engineer compatibility rules from incomplete evidence. Guardrail: require a registry-exported schema definition as a mandatory input. If one does not exist, run a schema extraction step first and flag any gaps before invoking this prompt.
Required Inputs: Schema Pair and Compatibility Type
Required: the current (old) schema, the proposed (new) schema, and the target compatibility mode. Without all three, the prompt produces vague advice instead of actionable checks. Guardrail: validate inputs in the harness before calling the model. Reject requests with missing schemas or ambiguous compatibility types. Log the input hash for auditability.
Operational Risk: Consumer Upgrade Ordering
Risk: the prompt identifies breaking changes but may not fully enumerate the required consumer upgrade sequence across multiple downstream services. A partial ordering recommendation can lead to production deserialization failures. Guardrail: always pair the compatibility verdict with a consumer impact matrix that lists each downstream service, its current schema version, and the required upgrade order. Escalate to a human review step when more than two consumers are affected.
Operational Risk: Default Value Assumptions
Risk: when adding a field with a default value, the prompt may classify the change as backward-compatible without flagging that existing consumers compiled against the old schema will silently receive the default, which may violate business logic expectations. Guardrail: require explicit annotation of default value semantics in the input context. Add a separate check in the harness that flags any new field with a default and prompts a business-logic review before accepting the compatibility verdict.
Boundary: Complex Union and Recursive Types
Avoid when: the schema contains deeply nested unions, recursive type definitions, or custom logical types that interact in non-obvious ways with compatibility rules. The model may miss edge cases in type promotion or union resolution. Guardrail: for schemas exceeding a complexity threshold (e.g., more than three levels of nesting or union types with more than five branches), route to a human review step and use the prompt output only as a preliminary scan, not a final verdict.
Copy-Ready Prompt Template
A copy-ready prompt template for validating streaming schema changes against registry compatibility rules.
This prompt template is designed to be pasted directly into your AI harness. It instructs the model to act as a schema registry compatibility reviewer, comparing a proposed schema change against the current schema and the registry's compatibility configuration. The model must identify breaking changes, classify compatibility violations (BACKWARD, FORWARD, FULL, NONE), and produce a structured report that a CI/CD pipeline can parse. Before using this prompt, ensure your harness has access to both the current and proposed schema definitions, along with the registry's configured compatibility type. If your harness passes schemas as separate structured objects rather than inline text, adjust the [CURRENT_SCHEMA] and [PROPOSED_SCHEMA] placeholders to reference those objects by name or ID.
textYou are a schema registry compatibility reviewer for a streaming data platform. Your task is to compare a proposed schema change against the current registered schema and determine whether the change violates the configured compatibility rules. ## INPUTS - Current registered schema: [CURRENT_SCHEMA] - Proposed new schema: [PROPOSED_SCHEMA] - Schema format: [SCHEMA_FORMAT: AVRO | PROTOBUF | JSON_SCHEMA] - Configured compatibility type: [COMPATIBILITY_TYPE: BACKWARD | FORWARD | FULL | BACKWARD_TRANSITIVE | FORWARD_TRANSITIVE | FULL_TRANSITIVE | NONE] - Subject name: [SUBJECT_NAME] ## TASK 1. Parse both schemas according to the specified format. 2. Identify every field-level change: additions, removals, renames, type changes, default value changes, and logical type modifications. 3. For each change, determine whether it violates the configured compatibility type. 4. Classify each violation as BREAKING or NON-BREAKING under the configured compatibility rules. 5. For breaking changes, specify the consumer upgrade ordering requirement (e.g., "consumers must upgrade before producers"). ## OUTPUT SCHEMA Return a JSON object with this exact structure: { "compatibility_check": { "subject": "string", "compatibility_type": "string", "overall_result": "COMPATIBLE | INCOMPATIBLE", "changes": [ { "field_path": "string", "change_type": "FIELD_ADDED | FIELD_REMOVED | TYPE_CHANGED | DEFAULT_CHANGED | RENAMED | LOGICAL_TYPE_CHANGED", "current_definition": "string | null", "proposed_definition": "string | null", "compatibility_impact": "BREAKING | NON_BREAKING", "violated_rule": "string | null", "consumer_action": "UPGRADE_BEFORE_PRODUCER | PRODUCER_UPGRADE_BEFORE_CONSUMER | NO_ACTION | ROLLING_UPGRADE_SAFE", "explanation": "string" } ], "recommended_migration_order": "string", "rollback_risk": "LOW | MEDIUM | HIGH", "rollback_notes": "string | null" } } ## CONSTRAINTS - Do not hallucinate fields that are not present in either schema. - If a field is renamed, you must detect it as a removal of the old name and an addition of the new name, and flag it as BREAKING unless the schema format supports aliases. - For AVRO, treat union type narrowing (removing a type from a union) as BREAKING for BACKWARD compatibility. - For PROTOBUF, field number reuse is always BREAKING regardless of compatibility type. - If the compatibility type is NONE, report all changes as NON_BREAKING but still list them. - If you cannot parse either schema, return a single error object: {"error": "PARSE_FAILURE", "detail": "..."} ## EXAMPLES [EXAMPLES] ## RISK LEVEL [RISK_LEVEL: LOW | MEDIUM | HIGH | CRITICAL]
To adapt this template for your environment, replace the square-bracket placeholders with actual values before execution. The [EXAMPLES] placeholder should contain 2-3 few-shot examples of correct compatibility assessments for your schema format, covering at least one compatible change and one breaking change. The [RISK_LEVEL] placeholder controls the model's conservatism: set it to HIGH or CRITICAL for production pipelines where false negatives (missed breaking changes) are unacceptable, and LOW for development environments where you want to reduce false positives. If your registry enforces transitive compatibility, ensure the [COMPATIBILITY_TYPE] reflects this and that [CURRENT_SCHEMA] includes the last fully-compatible schema, not just the immediate predecessor. After pasting this prompt, validate the output against your registry's actual compatibility check by running the same change through the Confluent Schema Registry or Apicurio Registry API and comparing results. Any discrepancy should trigger a human review of the prompt's reasoning before the change proceeds.
Prompt Variables
Every placeholder the Streaming Schema Registry Compatibility Prompt expects, why it matters, and how to validate it before execution.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[CURRENT_SCHEMA] | The existing schema definition registered in the schema registry, serving as the baseline for compatibility checks. | {"type":"record","name":"User","fields":[{"name":"id","type":"string"},{"name":"email","type":"string"}]} | Must parse as valid Avro, Protobuf, or JSON Schema. Validate with schema parser library before prompt assembly. Reject if empty or unparseable. |
[PROPOSED_SCHEMA] | The new schema version being proposed for registration, which will be compared against the current schema. | {"type":"record","name":"User","fields":[{"name":"id","type":"string"},{"name":"email","type":"string"},{"name":"phone","type":["null","string"],"default":null}]} | Must parse as valid schema matching the same format family as [CURRENT_SCHEMA]. Validate structural integrity and reject if identical to current schema. |
[SCHEMA_FORMAT] | The serialization format governing compatibility rules: AVRO, PROTOBUF, or JSON_SCHEMA. | AVRO | Must be one of the enumerated values: AVRO, PROTOBUF, JSON_SCHEMA. Case-insensitive check and normalize before prompt injection. Reject unrecognized formats. |
[COMPATIBILITY_LEVEL] | The compatibility policy enforced by the schema registry: BACKWARD, FORWARD, FULL, BACKWARD_TRANSITIVE, FORWARD_TRANSITIVE, FULL_TRANSITIVE, or NONE. | FULL | Must match one of the seven standard Confluent Schema Registry compatibility types. Validate against allowed enum. Default to BACKWARD if unspecified but warn. |
[REGISTRY_CONTEXT] | Optional namespace or subject strategy context for the schema, such as TopicNameStrategy or RecordNameStrategy. | my-topic-value | If provided, validate against subject naming conventions for the target registry. Null allowed. If null, prompt should assume default subject resolution rules. |
[CONSUMER_VERSIONS] | A list of consumer application versions and their expected schema versions currently deployed in production. | ["v1.2.0:User.v1","v1.3.0:User.v2"] | Must be a valid JSON array of strings. Each entry should follow a version:schema-identifier convention. Validate array structure. Null allowed if consumer landscape is unknown. |
[PRODUCER_VERSIONS] | A list of producer application versions and the schema versions they emit, used to assess forward compatibility risk. | ["v2.0.0:User.v2","v2.1.0:User.v3"] | Must be a valid JSON array of strings. Validate array structure. Null allowed. If both consumer and producer versions are null, prompt should note limited rollout impact analysis. |
Implementation Harness Notes
How to wire the streaming schema compatibility prompt into a CI/CD pipeline or schema review workflow with validation, retries, and human approval gates.
The streaming schema registry compatibility prompt is designed to sit inside a pre-merge or pre-registration pipeline that gates schema changes before they reach the registry. The harness should intercept the proposed schema diff and the target registry's compatibility configuration (e.g., BACKWARD, FORWARD, FULL, BACKWARD_TRANSITIVE) and feed them into the prompt as structured inputs. The model's output is a structured compatibility verdict, not a binary pass/fail. The harness must parse this verdict, extract the compatibility_status, breaking_changes list, and consumer_upgrade_ordering array, and then decide whether to block the pipeline, warn, or auto-approve based on the registry's configured compatibility level and the team's risk policy.
Build the harness as a CI job or a webhook receiver that accepts a schema change event. The harness should first validate inputs: confirm the proposed schema parses correctly against the declared format (Avro, Protobuf, or JSON Schema), confirm the current schema version exists in the registry, and confirm the compatibility level is a recognized value. If validation fails, fail fast with a clear error before calling the model. On model invocation, set temperature=0 and use a structured output mode (JSON mode or function calling) to enforce the output schema. Implement a retry loop with up to 3 attempts if the output fails schema validation or if the model returns a compatibility_status of UNCLEAR. After a successful parse, log the full prompt, response, and parsed verdict to an audit table for downstream review. If the verdict contains breaking_changes with severity HIGH and the registry compatibility level is FULL or BACKWARD_TRANSITIVE, block the pipeline and require human approval via a review ticket that includes the model's explanation and the raw diff. For MEDIUM severity breaking changes under BACKWARD compatibility, auto-warn but allow the pipeline to proceed with a flag for the on-call data platform engineer.
Do not treat the model's output as the sole gate for production schema changes. The harness should cross-reference the model's identified breaking changes against the registry's own compatibility check where available (e.g., Confluent Schema Registry's compatibility API) and flag any disagreement for human review. The prompt is strongest at explaining why a change breaks compatibility and what consumer upgrade ordering is required; it is not a replacement for deterministic compatibility verification. Wire the harness to emit metrics: time-to-verdict, retry count, and human-approval rate. These metrics will help you tune the risk thresholds and decide when the prompt is reliable enough to reduce manual review for low-risk changes.
Expected Output Contract
Fields, types, and validation rules the harness must enforce on the model's JSON response for a streaming schema registry compatibility check.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
compatibility_result | string (enum) | Must be one of: FULL_COMPATIBLE, FORWARD_COMPATIBLE, BACKWARD_COMPATIBLE, INCOMPATIBLE. Parse check against allowed enum values. | |
breaking_changes | array of objects | Each object must contain 'field' (string), 'change_type' (string enum: TYPE_CHANGE, FIELD_REMOVED, DEFAULT_CHANGED, NAMESPACE_CHANGE), and 'description' (string). Schema validation required. | |
consumer_upgrade_order | array of strings | Ordered list of consumer service names. Each entry must be a non-empty string. If no specific order required, return single-element array with value 'ANY_ORDER'. | |
producer_compatibility | string (enum) | Must be one of: NONE, BACKWARD, BACKWARD_TRANSITIVE, FORWARD, FORWARD_TRANSITIVE, FULL, FULL_TRANSITIVE. Must match the compatibility level detected or recommended. | |
schema_diffs | array of objects | Each object must contain 'path' (string in dot notation), 'previous_type' (string or null), 'new_type' (string or null), 'impact' (string). Null allowed for previous_type or new_type only when field is added or removed. | |
rollback_risk | string (enum) | Must be one of: NONE, LOW, MEDIUM, HIGH, CRITICAL. If any breaking_changes exist, rollback_risk must be HIGH or CRITICAL. Cross-field validation required. | |
recommended_migration_strategy | string | Non-empty string describing the recommended approach. If compatibility_result is INCOMPATIBLE, must include explicit rollback or multi-step migration plan. Content check for contradiction with compatibility_result. | |
validation_timestamp | string (ISO 8601) | Must be valid ISO 8601 datetime string. Parse check with date validation. Harness should reject non-parseable timestamps and retry. |
Common Failure Modes
What breaks first when validating streaming schema changes and how to guard against it in your harness and prompt design.
Compatibility Rule Misclassification
What to watch: The model incorrectly classifies a breaking change as compatible (or vice versa) because it misinterprets the registry's compatibility type (BACKWARD, FORWARD, FULL). For example, adding a field with a default is backward-compatible but not forward-compatible, and the model may conflate the two. Guardrail: Explicitly pass the target compatibility type as a [COMPATIBILITY_MODE] variable in the prompt. Add a post-processing validation step that checks the output classification against a hardcoded rule engine for known deterministic cases before accepting the model's judgment.
Consumer Upgrade Ordering Gaps
What to watch: The prompt identifies breaking changes but fails to produce a correct, ordered upgrade sequence for producers and consumers. This leads to downtime if consumers are upgraded before producers when the schema change requires the opposite order. Guardrail: Require the output to include an explicit, step-by-step upgrade_ordering array. Validate that the first step in the sequence matches the compatibility type (e.g., for BACKWARD compatibility, producers must be upgraded first). Flag any sequence that doesn't match the rule for human review.
Default Value Ambiguity in Avro
What to watch: When a new field is added to an Avro schema, the model may fail to check whether a default value is provided. In Avro, a missing default for a new field is a breaking change for readers using the old schema. The model often overlooks this subtlety. Guardrail: In your harness, parse the schema diff and explicitly extract any new fields. If the schema type is Avro, inject a pre-check into the prompt context: [NEW_FIELDS_WITHOUT_DEFAULTS]. If the list is non-empty, force a BREAKING classification regardless of the model's output.
Logical Type Incompatibility Oversight
What to watch: The model treats a change from int to long or string to uuid (logical type) as compatible because the underlying wire type is the same. However, consumer deserialization logic often breaks on these changes. Guardrail: Include a [LOGICAL_TYPE_CHANGES] section in the prompt input that lists all logical type modifications. Add an eval assertion that any detected logical type change triggers a warning in the output, even if the base type is technically compatible.
Namespace and Subject Confusion
What to watch: The prompt conflates the schema's namespace or subject name strategy (e.g., TopicNameStrategy vs. RecordNameStrategy) and makes incorrect compatibility assumptions based on the wrong subject. Guardrail: Always pass the [SUBJECT_NAME_STRATEGY] and the full [SUBJECT] as explicit inputs. In your harness, verify that the output's compatibility assessment references the correct subject. If the model references a different subject, reject the output and retry with a stricter prompt.
Enum and Union Evolution Errors
What to watch: Adding or removing symbols from an enum or types from a union is a common source of breaking changes that the model underestimates. Removing an enum symbol breaks consumers that expect it; adding a type to a union breaks producers that don't generate it. Guardrail: Pre-process the schema diff to extract all enum and union changes into a [ENUM_UNION_DIFF] block. Add a hard rule in the prompt: any modification to enums or unions must be classified as BREAKING unless explicitly overridden by a human reviewer.
Evaluation Rubric
How to test output quality before shipping this prompt into your schema review pipeline. Run these checks against a golden dataset of known schema change pairs.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Compatibility Rule Identification | Correctly identifies the specific registry compatibility type (BACKWARD, FORWARD, FULL, NONE) for the given schema pair | Misclassifies a breaking change as compatible or fails to detect a required compatibility level | Run against 20 known Avro/Protobuf/JSON Schema change pairs with pre-labeled compatibility outcomes; require >=95% exact match |
Breaking Change Detection | Flags all field removals, type changes, and default value removals that violate the declared compatibility mode | Misses a field removal in BACKWARD mode or a type widening that breaks FORWARD compatibility | Use a golden set of 15 schema diffs each containing exactly one breaking change; require 100% recall with zero false negatives |
Consumer Upgrade Ordering | Produces a correct ordered list of consumer upgrades when FULL compatibility is violated, with clear before/after steps | Suggests an upgrade order that would cause deserialization failures or data loss in production | Validate against 10 multi-service topology scenarios where known upgrade sequences exist; check ordering against reference sequences |
Field Default Value Assessment | Correctly identifies when a new field requires a default value for backward compatibility and suggests an appropriate default | Fails to flag a missing default on a required new field or suggests a default that violates business logic constraints | Test with 10 schema additions across Avro and Protobuf; verify default presence and type compatibility against schema registry rules |
Schema Registry Rule Reference | Cites the specific compatibility rule from the registry documentation that applies to each finding | Makes a compatibility claim without referencing the governing rule or cites an incorrect rule for the schema format | Spot-check 10 outputs for rule citation accuracy against Confluent Schema Registry and AWS Glue Schema Registry documentation |
False Positive Rate on Compatible Changes | Correctly passes compatible changes (e.g., adding optional fields with defaults) without flagging them as breaking | Flags a fully compatible change as breaking, causing unnecessary review churn and deployment delays | Run against 30 known-compatible schema changes; require false positive rate below 5% |
Output Schema Adherence | Returns valid JSON matching the defined [OUTPUT_SCHEMA] with all required fields present and correctly typed | Output is malformed JSON, missing required fields, or contains fields with incorrect types that break downstream parsing | Validate output with a JSON Schema validator against the expected contract; require 100% structural validity across all test cases |
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
Add a strict JSON output schema, require field-level change enumeration, and include consumer upgrade ordering. Wire the prompt into a harness that fetches the current schema from the registry API, diffs it against the proposed change, and validates the output against a schema before posting results.
codeOutput a JSON object with: - "compatibility_result": "COMPATIBLE" | "INCOMPATIBLE" - "changes": [{ "field_path": string, "change_type": "ADDED"|"REMOVED"|"TYPE_CHANGED"|"DEFAULT_CHANGED"|"REORDERED", "compatibility_impact": "COMPATIBLE"|"BREAKING", "rule_violated": string | null, "consumer_impact": string }] - "consumer_upgrade_order": string[] - "requires_data_migration": boolean
Watch for
- Silent format drift where the model returns a slightly different JSON shape
- Missing change entries for implicit schema evolution (e.g., adding a field with a default is compatible for Avro backward but not forward)
- Consumer upgrade ordering that assumes all consumers can update simultaneously

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