Inferensys

Prompt

Event Schema Design Review Prompt Template

A practical prompt playbook for platform engineers and architects who need a structured, repeatable review of event schemas before they ship to production. This playbook covers the prompt template, required variables, expected output contract, implementation harness, evaluation rubric, and common failure modes.
AI evaluator reviewing output quality on laptop, comparison metrics visible, casual evaluation session.
PROMPT PLAYBOOK

When to Use This Prompt

Understand the job-to-be-done, ideal user, required context, and when not to use this prompt.

This prompt is for platform engineers and architects who need a structured, automated first-pass review of an event schema before it is registered, versioned, or put into production. The job-to-be-done is a systematic critique of a draft schema—in JSON Schema, Avro, or Protobuf format—against evolvability, backward compatibility, semantic clarity, and versioning criteria. It is designed to be used during design review, as a pre-commit gate in CI, or as a preparatory step before a human architecture review. The prompt assumes you have a complete draft schema and want to surface risks that are expensive to fix once producers and consumers are live.

Use this prompt when you need to catch common schema defects early: ambiguous field names, missing required fields, incompatible type changes, unclear enumeration semantics, and versioning gaps that would break downstream consumers. It is particularly valuable in environments with multiple producer and consumer teams where a single breaking change cascades across the system. The prompt works best when you provide the full schema text, the intended compatibility model (e.g., BACKWARD, FORWARD, FULL), and any domain constraints such as naming conventions or field deprecation policies. The output is a structured review with categorized findings, severity ratings, and actionable recommendations—not a binary pass/fail verdict.

Do not use this prompt as a replacement for human architecture review, wire-level serialization compatibility testing, or schema registry validation. It does not validate that your Avro schema produces compatible binary encodings, nor does it test actual consumer deserialization behavior. It is also not suitable for reviewing the business correctness of the event semantics—it can flag that a field named status has no documented enumeration, but it cannot tell you whether the enumeration values match your order lifecycle. For high-risk domains such as financial transactions or healthcare events, always pair this automated review with human approval and evidence grounding. The prompt is a force multiplier for reviewers, not a substitute for architectural judgment.

PRACTICAL GUARDRAILS

Use Case Fit

Where this prompt works, where it fails, and what you must provide before using it.

01

Good Fit: Schema Design Reviews

Use when: you have a draft event schema (JSON Schema, Avro, Protobuf) and need a structured review against evolvability, backward compatibility, and semantic clarity criteria. Guardrail: provide the schema, the domain context, and the expected consumer list.

02

Bad Fit: Runtime Validation

Avoid when: you need to validate live event payloads in production. This prompt reviews the design of the schema, not individual messages. Guardrail: use a schema registry with server-side validation for runtime enforcement; this prompt is a design-time tool.

03

Required Inputs

What you must provide: the event schema definition, the event's business purpose, the producing service, known consumers, and the versioning strategy in use. Guardrail: missing consumer context leads to reviews that ignore real-world coupling constraints.

04

Operational Risk: Over-Engineering

Risk: the prompt may flag every optional field as a versioning concern, leading to premature abstraction. Guardrail: constrain the review to the schema's stated compatibility guarantees (e.g., 'backward compatible within major version') and treat optional fields as intentional unless they break consumer contracts.

05

Operational Risk: Semantic Blind Spots

Risk: the model can check structural compatibility but cannot know whether order_total includes tax in your domain. Guardrail: always pair this prompt with a human reviewer who owns the domain semantics; the model flags ambiguity, humans resolve it.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A copy-ready prompt template for reviewing event schemas against evolvability, backward compatibility, and semantic clarity criteria.

The prompt below is designed to be pasted directly into your AI tool. It instructs the model to act as a platform architecture reviewer and produce a structured JSON output you can parse in your CI pipeline, design review tool, or schema registry automation. Replace every square-bracket placeholder with your actual schema, constraints, and risk tolerance before use. The prompt forces the model to reason about field semantics, versioning impact, and consumer breakage rather than producing a superficial checklist.

text
You are a platform architecture reviewer specializing in event-driven systems. Your task is to review an event schema for evolvability, backward compatibility, semantic clarity, and operational safety.

## INPUT

Schema to review:
[SCHEMA_DEFINITION]

Schema format (e.g., JSON Schema, Avro, Protobuf, AsyncAPI):
[SCHEMA_FORMAT]

Event type and domain context:
[EVENT_TYPE_AND_DOMAIN]

Known consumers and their compatibility requirements:
[KNOWN_CONSUMERS]

Schema registry or versioning strategy in use:
[VERSIONING_STRATEGY]

## CONSTRAINTS

Apply these review constraints:
[CONSTRAINTS]

Example constraints: "Must maintain backward compatibility for 3 versions", "No required field additions without default values", "All timestamps must be ISO 8601 UTC", "Envelope must include trace-id and correlation-id"

## OUTPUT SCHEMA

Return a single JSON object with this exact structure:
{
  "review_summary": {
    "overall_assessment": "PASS | PASS_WITH_WARNINGS | FAIL",
    "critical_issues_count": 0,
    "warnings_count": 0,
    "suggestions_count": 0
  },
  "findings": [
    {
      "severity": "CRITICAL | WARNING | SUGGESTION",
      "category": "COMPATIBILITY | SEMANTICS | NAMING | VERSIONING | ENVELOPE | OBSERVABILITY | DOCUMENTATION",
      "field_path": "$.field.name or null",
      "description": "Clear explanation of the finding",
      "impact": "What breaks or degrades if this is not addressed",
      "recommendation": "Specific, actionable fix"
    }
  ],
  "compatibility_analysis": {
    "backward_compatible": true,
    "forward_compatible": true,
    "breaking_changes": ["list of breaking changes if any"],
    "consumer_impact": "Description of which consumers are affected and how"
  },
  "semantic_review": {
    "naming_issues": ["ambiguous or inconsistent field names"],
    "missing_fields": ["fields that should exist based on domain context"],
    "type_appropriateness": "Assessment of whether field types match their semantic purpose"
  },
  "versioning_assessment": {
    "versioning_gaps": ["missing version indicators or migration paths"],
    "deprecation_plan": "Assessment of whether deprecated fields have clear removal timelines"
  }
}

## INSTRUCTIONS

1. Parse the schema and identify every field, its type, required/optional status, and default value.
2. For each field, assess whether its name clearly communicates its purpose without domain-internal jargon.
3. Check whether adding, removing, or changing any field would break existing consumers.
4. Verify that the schema includes necessary metadata fields (trace-id, correlation-id, timestamp, event-type, version).
5. Flag any field whose type is technically valid but semantically wrong (e.g., string for a timestamp, integer for an enum).
6. If the schema is a new version of an existing event, verify that the versioning strategy is explicit and safe.
7. Do not invent issues. Only flag real problems you can justify from the schema content.
8. If no issues exist, return PASS with empty findings arrays.

How to adapt this prompt: Replace [SCHEMA_DEFINITION] with the actual schema text. If you're reviewing an Avro schema, set [SCHEMA_FORMAT] to "Avro" and the model will apply Avro-specific compatibility rules. For [CONSTRAINTS], add your organization's specific rules such as field naming conventions, required envelope fields, or compatibility windows. The [KNOWN_CONSUMERS] field is critical: listing which services consume this event helps the model assess real breakage risk rather than theoretical compatibility. If you have no consumers yet, state that explicitly so the model focuses on forward-looking design quality.

What to do next: After pasting the prompt with your placeholders filled, run the output through a JSON schema validator to confirm the structure matches the OUTPUT_SCHEMA contract. For high-risk events in production systems, route CRITICAL findings to a human reviewer before merging schema changes. Store the review output alongside your schema version in the registry for auditability. If the model returns a FAIL assessment, do not proceed with deployment until every CRITICAL finding is resolved or explicitly accepted with a documented rationale.

IMPLEMENTATION TABLE

Prompt Variables

Each placeholder required by the Event Schema Design Review prompt, its purpose, a concrete example, and actionable validation rules to prevent malformed or incomplete inputs before they reach the model.

PlaceholderPurposeExampleValidation Notes

[EVENT_SCHEMA]

The complete event schema definition to be reviewed, typically in JSON Schema, Avro, or Protobuf format.

{"type":"record","name":"OrderPlaced","fields":[{"name":"orderId","type":"string"}]}

Parse check: must be valid JSON, Avro, or Proto. Schema check: must contain at least one field definition. Reject empty or comment-only schemas.

[EVENT_NAME]

The canonical name of the event being reviewed, used to anchor semantic clarity checks.

order.placed.v1

Format check: must match domain.event.version pattern. Null allowed if name is embedded in schema. Warn if name implies CRUD operation instead of domain event.

[DOMAIN_CONTEXT]

A brief description of the business domain and the event's role within it, enabling semantic review.

E-commerce order lifecycle. This event is emitted when a customer successfully submits an order.

Length check: minimum 20 characters. Must contain a noun identifying the domain. Reject placeholder text like 'todo' or 'context here'.

[CONSUMER_LIST]

A list of known or planned consumers of this event, used to evaluate backward compatibility risk.

["inventory-service", "notification-service", "analytics-pipeline"]

Type check: must be a JSON array of strings. Empty array allowed but triggers a warning. Each string must be non-empty.

[VERSIONING_STRATEGY]

The team's declared versioning approach, used to calibrate compatibility recommendations.

Semantic versioning with forward-compatible defaults

Enum check: must be one of ["Semantic versioning", "Schema registry with compatibility modes", "No formal strategy"]. If 'No formal strategy', elevate risk level in output.

[COMPATIBILITY_MODE]

The schema registry compatibility mode if applicable, used to validate field changes against registry rules.

BACKWARD

Enum check: must be one of ["BACKWARD", "BACKWARD_TRANSITIVE", "FORWARD", "FORWARD_TRANSITIVE", "FULL", "FULL_TRANSITIVE", "NONE", null]. Null allowed if no registry is in use.

[EXISTING_SCHEMAS]

Prior versions of this event schema for detecting breaking changes and drift.

[{"version":"v0","schema":{"type":"record","name":"OrderPlaced","fields":[{"name":"orderId","type":"string"}]}}]

Parse check: must be a JSON array of schema objects, each with a version identifier. Empty array allowed for new events. Validate that each entry has a version key.

[CONSTRAINTS]

Specific rules or policies the review must enforce, such as naming conventions, required fields, or size limits.

All events must include eventId, timestamp, and source. Field names must use camelCase. Max payload size 1MB.

Must be a non-empty string. Parse for known constraint keywords: 'must include', 'must not', 'max', 'min'. If empty, use default constraints from system prompt.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Event Schema Design Review prompt into a schema registry CI check, PR review pipeline, or architecture review workflow.

This prompt is designed to be called programmatically as part of a schema review pipeline, not as a one-off chat interaction. The typical integration point is a CI step that triggers when a new schema version is proposed in your schema registry (e.g., after an avsc, .proto, or AsyncAPI document is committed to a branch). The harness should extract the schema text, the previous version if available, and any consumer compatibility requirements, then assemble the prompt with these inputs and parse the structured review output for automated gating decisions.

Input assembly: Before calling the model, collect three required inputs: [EVENT_SCHEMA] (the full schema definition text), [PREVIOUS_SCHEMA] (the prior version for diff-based compatibility checks, or null for initial versions), and [DOMAIN_CONTEXT] (a brief description of the event's business purpose and known consumers). Optionally, provide [COMPATIBILITY_RULES] if your organization enforces specific rules beyond semantic best practices (e.g., 'no field removal allowed', 'new fields must have defaults'). The harness should validate that the schema parses successfully before sending it to the model—sending unparseable schemas wastes tokens and produces unreliable reviews.

Model choice and configuration: Use a model with strong structured output capabilities and a large context window. Set temperature=0 or very low (0.0–0.1) to maximize consistency across reviews. Enable structured output mode if your provider supports it, binding the response to a schema with fields: compatibility_assessment, semantic_clarity_issues, evolution_risks, missing_required_fields, naming_concerns, versioning_gaps, and overall_verdict (pass/caution/fail). If structured output isn't available, append explicit format instructions to the prompt and validate the JSON response before processing.

Validation and retry logic: After receiving the model response, validate that all required fields are present and that the overall_verdict is one of the expected enum values. If validation fails, retry once with the same prompt. If the second attempt also fails, log the raw response, flag the review as 'inconclusive', and require human review. For high-risk domains (financial events, healthcare data, auth events), always require human sign-off on fail verdicts and consider requiring it for caution verdicts as well. Never auto-merge schema changes that receive a fail verdict.

CI integration pattern: In a GitHub Actions or similar CI pipeline, the harness should: (1) detect changed schema files, (2) for each changed schema, fetch the previous version from the main branch or schema registry, (3) call the model with the assembled prompt, (4) parse and validate the response, (5) post the review as a PR comment with the structured findings, and (6) set a commit status of success (pass), neutral (caution), or failure (fail). Store the full prompt and response as CI artifacts for auditability. Teams should review the first 10–20 automated reviews manually to calibrate thresholds before relying on automated gating.

IMPLEMENTATION TABLE

Expected Output Contract

Fields, types, and validation rules for the structured JSON output. Use this contract to build a post-processing validator or to configure structured output mode in your model API.

Field or ElementType or FormatRequiredValidation Rule

review_id

string (UUID)

Must match regex ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

schema_name

string

Must be non-empty and match the [SCHEMA_NAME] input exactly

schema_version

string (semver)

Must match the [SCHEMA_VERSION] input exactly

overall_assessment

enum

Must be one of: 'pass', 'pass_with_warnings', 'fail'. If any critical finding exists, must be 'fail'.

findings

array of objects

Array must contain at least 1 item. Each item must conform to the finding object schema below.

findings[].severity

enum

Must be one of: 'critical', 'warning', 'info'. At least one finding must be present if overall_assessment is not 'pass'.

findings[].category

enum

Must be one of: 'evolvability', 'backward_compatibility', 'semantic_clarity', 'versioning', 'naming', 'required_fields', 'type_safety', 'envelope_design'

findings[].description

string

Must be non-empty, between 20 and 500 characters. Must reference a specific field or property from [INPUT_SCHEMA] when applicable.

PRACTICAL GUARDRAILS

Common Failure Modes

What breaks first when using the Event Schema Design Review prompt in production and how to guard against each failure.

01

Vague Naming Escapes Review

Risk: The model approves field names that are technically valid but semantically ambiguous (e.g., status, data, type), causing downstream consumer confusion. Guardrail: Add a [NAMING_CONVENTIONS] input that specifies required prefixes, domain terms, and forbidden generic names. Include an eval check that flags any field name appearing in a shared banned-word list.

02

Backward Compatibility Over-Promise

Risk: The prompt declares a schema change as 'backward compatible' when it is not (e.g., adding a required field, narrowing an enum), leading to consumer breakage. Guardrail: Require the prompt to output a specific compatibility impact matrix for each change type (add/remove/modify field) and validate it against a deterministic compatibility checker before accepting the review.

03

Missing Versioning Strategy

Risk: The review focuses on the current schema shape but fails to enforce a concrete versioning strategy (e.g., no version field, no plan for deprecation), making future evolution impossible. Guardrail: Add a [VERSIONING_POLICY] constraint that requires the model to explicitly state the versioning approach and flag any schema that lacks a version identifier or a documented deprecation path.

04

Context Window Truncation of Large Schemas

Risk: Large schemas with many nested objects exceed the model's effective context window, causing the review to silently skip the last fields or ignore deep nesting. Guardrail: Implement a pre-processing step that chunks the schema by top-level object and runs the review independently on each chunk, followed by a final cross-chunk consistency check for shared types.

05

Semantic Drift in Enum Values

Risk: The model approves new enum values that overlap in meaning with existing ones (e.g., adding CANCELLED when VOIDED already exists) or violate the enum's semantic contract. Guardrail: Include a [SEMANTIC_CONTRACT] input that defines the precise meaning of each existing enum value. Add an eval that uses cosine similarity on definitions to detect semantic overlap above a threshold.

06

Hallucinated Compliance Claims

Risk: The model confidently asserts the schema meets a regulatory standard (e.g., GDPR, PCI) without verifying specific field-level requirements, creating a false sense of security. Guardrail: Never ask the model to assert compliance. Instead, require it to output a checklist of specific schema properties (e.g., 'field X must be encrypted') for a human to verify against the actual regulation text.

IMPLEMENTATION TABLE

Evaluation Rubric

How to test output quality before shipping this prompt into your schema review pipeline. Run these checks against a golden set of 5-10 schemas with known issues.

CriterionPass StandardFailure SignalTest Method

Missing Required Fields Detection

Review identifies all schemas missing a mandatory field like event_id or timestamp

Review output says 'no issues found' for a schema with a missing required field

Golden set includes 2 schemas with intentionally removed required fields; check that review flags both

Ambiguous Naming Flagging

Review calls out fields with ambiguous names (e.g., data, info, status) and suggests specific alternatives

Review accepts data or info fields without comment or suggests a vague rename like 'make it clearer'

Golden set includes 2 schemas with deliberately vague field names; verify review output contains concrete rename suggestions

Backward Compatibility Break Detection

Review identifies field type changes, field removals, or enum value deletions that break consumers

Review misses a type change from string to integer or removal of a previously published field

Golden set includes 1 schema with a type change and 1 with a removed field; check that review flags both as breaking

Versioning Gap Identification

Review notes when a schema lacks a version field or when version semantics are undocumented

Review output does not mention versioning for a schema that has no version field and no versioning documentation

Golden set includes 1 schema with no version field; verify review explicitly calls out the missing versioning strategy

Semantic Clarity Assessment

Review identifies fields whose purpose is unclear from name alone and requests descriptions or examples

Review accepts fields like type or code without asking for enumeration, format, or semantic meaning

Golden set includes 2 schemas with semantically overloaded field names; check that review requests clarification for both

Enum Value Governance Check

Review flags enums without documented governance for adding or removing values

Review accepts an open-ended enum with no deprecation policy or consumer impact notes

Golden set includes 1 schema with an ungoverned enum; verify review output asks about value lifecycle management

Nullability and Default Handling

Review identifies fields where nullability is unspecified or where default values could cause consumer misinterpretation

Review output ignores a field with no nullability annotation and no default value documentation

Golden set includes 2 schemas with ambiguous nullability; check that review flags both and asks for explicit null/default contracts

Schema Registry Compatibility Check

Review output is structured enough to parse programmatically and map to a schema registry compatibility rule set

Review output is purely prose with no structured findings that can be ingested by a CI/CD pipeline

Parse review output with a test script; verify it contains machine-readable finding types (e.g., BREAKING, WARNING, SUGGESTION) for each issue

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Use the base prompt with a single schema example. Drop the versioning and compatibility sections. Focus on semantic clarity and field naming only. Replace [OUTPUT_SCHEMA] with a simple markdown checklist.

code
Review this event schema for semantic clarity and naming:
[EVENT_SCHEMA]

Return a markdown checklist of issues found.

Watch for

  • Skipping required field checks
  • Overly broad feedback without specific line references
  • No versioning guidance, which is fine for prototypes
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.