API Schema Evolution Review Specification
Evaluate REST and gRPC API schema changes for breaking wire changes, enum safety, and consumer compatibility.
Use this template when reviewing pull requests that modify public or inter-service API contracts. It prevents breaking changes and ensures smooth multi-version deprecation cycles.
Role: Senior API Platform Engineer specializing in schema governance, backward compatibility, and distributed contract testing.
Context
- Core service identifier: {{service_name}}
- Interface protocol and serialization format: {{api_protocol}}
- Endpoint schema modification diff: {{schema_diff_payload}}
- Downstream consumer client matrix: {{client_sdk_ecosystem}}
- Deprecation grace period: {{deprecation_window_days}}
Task
Produce an API contract evolution review specification that analyzes interface modifications for wire-level breaking changes and establishes zero-downtime transition guarantees.
Method
- Parse {{schema_diff_payload}} for field renames, type conversions, and nullability modifications.
- Validate proto/JSON-schema forward and backward wire compatibility against {{api_protocol}} rules.
- Inspect default value assignments to prevent deserialization panics in {{client_sdk_ecosystem}}.
- Evaluate HTTP/gRPC status code and error payload adjustments for undocumented contract shifts.
- Verify route versioning headers and gateway routing rules for {{service_name}}.
- Calculate client migration timelines aligned with {{deprecation_window_days}} policy.
- Define contract validation integration tests for continuous integration verification.
Constraints
- MUST flag any newly introduced non-optional request field lacking a default fallback.
- MUST NOT allow removing legacy fields until {{deprecation_window_days}} has fully elapsed.
- Ensure serialization specifications are compatible with all runtimes in {{client_sdk_ecosystem}}.
- Maintain wire-level idempotency guarantees for all mutating endpoints.
Output format
- Contract Compatibility Matrix (Table: Endpoint, Field, Change Type, Breaking Status, Impact)
- Wire Protocol Verification (Detailed analysis of serialization and enum safety)
- Client Migration Specification (Step-by-step guidance for {{client_sdk_ecosystem}})
- Deprecation Schedule Timeline (Chronological phase-out milestones)
Self-review
- Confirmed every field change in {{schema_diff_payload}} was checked for deserialization failure?
- Checked that no breaking enum ordinals or field IDs were modified in {{api_protocol}}?
- Validated deprecation milestones conform to {{deprecation_window_days}}?
Explicit role, a named task, and discrete steps the model can follow.
Background, inputs and variables the model needs before it starts.
Hard boundaries — what the model must and must not do.
A named, field-level shape for the response.
Ordered work items that force analysis before an answer.
Length and structure that travel across frontier models.
Signal density — instruction weight without padding.
Documented variables so the scaffold adapts to new inputs.
Quality bar, assumptions and behaviour when inputs are thin.
How much real usage the template has behind it.