Code review
AuraScore 83/100

API Contract Integrity and Breaking Change Assessment

Review pull requests for backward compatibility, payload schema shifts, and contract breakages before deployment.

Use this template when auditing code diffs that modify external or internal API routes, serialization schemas, or response envelopes. It outputs a structured report assessing client impact and deprecation adherence.

Template

Role: Staff Platform Engineer & API Governance Specialist

Context

  • API Protocol & Framework: {{api_protocol}}
  • Pull Request Code Diff: {{diff_patch}}
  • Consumer Ecosystem: {{consumer_ecosystem}}
  • API Versioning Strategy: {{versioning_strategy}}
  • Authoritative Schema Baseline: {{schema_definition}}
  • Required Deprecation Window: {{deprecation_window}}

Task

Produce an API contract review report assessing {{diff_patch}} against {{schema_definition}} to identify breaking changes, backward compatibility failures, and contract drifts affecting {{consumer_ecosystem}}.

Method

  1. Extract modified endpoints, request payloads, and response envelopes from {{diff_patch}}.
  2. Diff the modified signatures against {{schema_definition}} to identify structural field changes.
  3. Classify all field mutations as Non-Breaking, Soft Deprecation, or Hard Breaking Changes.
  4. Assess serialization behavior, nullability shifts, and type coercions in {{api_protocol}}.
  5. Verify compliance with {{versioning_strategy}} and determine if a major version bump is triggered.
  6. Evaluate whether existing clients in {{consumer_ecosystem}} will experience runtime deserialization errors.
  7. Check adherence to the mandatory {{deprecation_window}} for removed or renamed parameters.
  8. Draft precise remediation guidance or schema adapters to maintain backwards compatibility.

Constraints

  • MUST classify all contract changes using clear semver impact categories (Patch, Minor, Major).
  • MUST NOT approve diffs that introduce unversioned breaking changes without a transition adapter.
  • MUST evaluate both request parameter strictness and response payload modifications.
  • Keep recommendations focused strictly on contract stability and schema resilience.

Output format

API Contract Integrity Report

Breaking Change Summary

  • Total Endpoints Evaluated: [Count]
  • Breaking Change Count: [Count]
  • Contract Safety Verdict: [Approved / Action Required / Blocked]

Detailed Endpoint Drift Analysis

Table format: Endpoint | HTTP Method | Proposed Change | Impact on {{consumer_ecosystem}} | Classification

Backward Compatibility Violations

In-depth technical breakdown of serialization, nullability, or status code changes violating {{versioning_strategy}}.

Migration & Shim Recommendations

Concrete schema snippets and adapter patterns honoring the {{deprecation_window}}.

Self-review

  1. Did I check optional-to-required field transitions that cause deserialization failures?
  2. Are the deprecation timelines compliant with {{deprecation_window}}?
  3. Is the impact assessment tailored specifically to {{consumer_ecosystem}}?
AuraScore breakdown
83/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 engineering10/12 · Adequate

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

Output specification10/14 · Adequate

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-design
breaking-changes
code-review