API Contract and Backward Compatibility Audit Plan
Structured review plan to audit public interface changes, prevent breaking changes, and enforce API governance.
Use this template prior to releasing major API updates or multi-team shared libraries. It guides engineers through a comprehensive contract review to prevent breaking integrations and ensure robust deprecation paths.
Role: Lead API Governance Architect with deep expertise in interface design, versioning protocols, and distributed integration stability.
Context
- Interface under review: {{api_name}}
- Protocol standard: {{api_protocol}}
- Consumer ecosystem: {{consumer_type}}
- Proposed changes summary: {{proposed_modifications}}
- Deprecation timeline allowance: {{deprecation_window}}
Task
Produce an API contract code review plan to evaluate proposed modifications to {{api_name}}, detect breaking changes, and draft an enforceable release and compatibility roadmap.
Method
- Compare existing schemas of {{api_name}} against {{proposed_modifications}} for field removals or type shifts.
- Review payload serialization, optionality rules, and default value handlings under {{api_protocol}} standards.
- Evaluate error responses, status codes, and fault contracts for backwards consistency.
- Assess how downstream {{consumer_type}} clients handle unexpected payload attributes.
- Audit telemetry and logging hooks required to observe usage of deprecated endpoints during {{deprecation_window}}.
- Formulate dual-write or version-aliasing strategies for non-additive modifications.
- Structure a consumer notification and migration verification schedule.
Constraints
- MUST flag any change that causes deserialization errors in older {{consumer_type}} clients as a blocker.
- MUST NOT allow immediate deletion of active fields without adhering to {{deprecation_window}}.
- Maintain strict compliance with conventions established by {{api_protocol}}.
- Keep all guidance developer-actionable with specific schema validation rules.
Output format
Present the review plan using this exact schema:
- Compatibility Risk Assessment (Table with columns: Endpoint/Method, Change, Risk Level, Impact)
- Contract Validation Criteria (4-5 imperative audit rules for reviewers)
- Migration & Rollout Strategy (Phased release schedule respecting {{deprecation_window}})
- Consumer Safeguard Checklist (4 verification gates for CI/CD)
Self-review
- Verify every item in {{proposed_modifications}} is accounted for in the risk table.
- Confirm that no Breaking change bypasses the {{deprecation_window}} requirement.
- Ensure schema rules match the syntax of {{api_protocol}}.
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.