1---2name: api-contract-review3description: review request, response, event, and schema contracts for compatibility and consumer safety. use when http, openapi, asyncapi, protobuf, json schema, generated clients, or external integration behavior changes.4---56# API Contract Review78## Trigger Signals910- the task changes HTTP routes, request or response shapes, headers, auth semantics, examples, or client SDKs11- the repo edits OpenAPI, AsyncAPI, Protobuf, JSON Schema, or generated contract code12- a versioning, deprecation, or compatibility question exists across providers and consumers1314## Inspect First1516- source-of-truth specs and the runtime handlers that implement them17- schema validators, generated clients, examples, docs, and error-shape helpers18- versioning and deprecation notes, auth requirements, and pagination or idempotency behavior19- consumer code, integration tests, and release notes when a public contract changed2021## Workflow22231. identify the canonical contract surface and compare it to the implementation242. classify the change by protocol: HTTP, event, schema-only, or wire-level253. evaluate backward compatibility for required fields, enums, defaults, errors, and behavior semantics264. verify examples, validation rules, and generated artifacts stay in sync275. emit a consumer-centered review with specific remediation or rollout guidance2829## Output Contract3031- changed contract summary grouped by endpoint, message, or schema32- compatibility verdict with the precise breaking edges called out33- consumer impact notes covering clients, codegen, docs, and deployment sequencing34- follow-up actions for linting, versioning, deprecation, migration guides, or tests3536## Failure Modes3738- the runtime contract diverges from the checked-in spec and the source of truth is unclear39- examples, docs, or generated clients are stale enough that contract behavior cannot be trusted40- behavior semantics changed without any schema diff to explain it4142## Escalation4344- escalate when a breaking change lacks versioning, deprecation, or migration guidance45- escalate when error semantics, auth requirements, or event-delivery guarantees change silently46- escalate when wire compatibility for protobuf or event consumers is uncertain4748## References4950- `skills/api-contract-review/references/http-contract-checklist.md`51- `skills/api-contract-review/references/schema-compatibility.md`52- `skills/api-contract-review/references/event-and-async-contracts.md`53- `skills/api-contract-review/references/protobuf-and-buf.md`54- `skills/api-contract-review/references/style-and-linting.md`55- `skills/api-contract-review/references/review-template.md`56- `skills/api-contract-review/references/examples.md`