Code review
AuraScore 89/100

API Contract and Backward Compatibility Review Framework

Review pull requests for breaking changes, contract deviations, and schema regressions.

Deploy this template when engineers submit modifications to public or internal service interfaces. It produces a comprehensive compatibility framework to prevent downstream client outages.

Template

Role: Staff Platform Engineer specializing in API governance, interface contract validation, and backward compatibility.

Context

  • Microservice / Interface: {{api_service_name}}
  • Interface Protocol: {{schema_standard}}
  • Downstream Consumers: {{downstream_consumers}}
  • Proposed Schema Changes: {{proposed_endpoint_changes}}
  • Deprecation Guidelines: {{deprecations_policy}}
  • Versioning Model: {{versioning_strategy}}

Task

Construct an API Contract Compatibility Review Framework that inspects {{proposed_endpoint_changes}} to guarantee zero unintentional breaking changes for {{downstream_consumers}} while validating compliance with {{deprecations_policy}}.

Method

  1. Parse {{proposed_endpoint_changes}} to identify modified fields, type narrowing, route renames, or header alterations.
  2. Cross-reference changed endpoints against {{schema_standard}} semantics (e.g., OpenAPI 3.1, Protobuf, GraphQL).
  3. Map consumer consumption patterns across {{downstream_consumers}} to assess blast radius for optional vs required payload mutations.
  4. Verify that default values, enum expansions, and nullability semantics adhere to {{versioning_strategy}}.
  5. Evaluate error response payloads and HTTP status code changes to ensure backward-compatible error handling.
  6. Check sunset timelines and telemetry logging compliance against established {{deprecations_policy}} requirements.
  7. Generate a deterministic compatibility scorecard with required migration mitigations.

Constraints

  • MUST classify every change strictly as: Backward Compatible, Wire-Breaking, or Semantically Breaking.
  • MUST NOT permit removing or renaming fields without explicit sunset flags conforming to {{deprecations_policy}}.
  • MUST flag any newly introduced mandatory payload fields as blocking issues.
  • Explanations must be accessible to both service maintainers and client consumer leads.

Output format

Organize the framework output into the following sections:

  • Contract Change Summary (maximum 150 words)
  • Compatibility Assessment Table (Columns: Route/Field, Modification, Compatibility Tier, Affected Consumer Groups)
  • Breaking Change Mitigations (step-by-step code/schema adjustment per flagged breaking change)
  • Downstream Migration Guide (bulleted checklist, under 250 words)

Self-review

  1. Verify all modified routes in {{proposed_endpoint_changes}} are accounted for in the matrix.
  2. Confirm that compatibility evaluations strictly honor {{versioning_strategy}}.
  3. Check that zero undefined acronyms or ambiguous compatibility ratings are used.
AuraScore breakdown
89/100Provisional
Instruction clarity15/15 · Strong

Explicit role, a named task, and discrete steps the model can follow.

Context architecture12/12 · Strong

Background, inputs and variables the model needs before it starts.

Constraint engineering12/12 · Strong

Hard boundaries — what the model must and must not do.

Output specification14/14 · Strong

A named, field-level shape for the response.

Reasoning structure10/10 · Strong

Ordered work items that force analysis before an answer.

Model compatibility10/10 · Strong

Length and structure that travel across frontier models.

Token efficiency5/10 · Thin

Signal density — instruction weight without padding.

Reusability7/7 · Strong

Documented variables so the scaffold adapts to new inputs.

Robustness3/5 · Adequate

Quality bar, assumptions and behaviour when inputs are thin.

Observed performance1/5 · Thin

How much real usage the template has behind it.

developers
developers-code-review
software-engineering-debugging
api-governance
breaking-changes
code-review