| name | dev-api-contract-review |
| description | Use to design or review API contracts, auth, pagination, versioning, errors, compatibility, and OpenAPI/GraphQL shape. |
| metadata | {"version":"0.3","updated":"2026-06-12"} |
API contract review workflow
Use this workflow when API behavior is being designed, changed, reviewed, or documented.
Steps
-
Establish current contract evidence.
- Routes, handlers, schemas, serializers, generated clients, OpenAPI specs, docs, fixtures, tests, and live CLI/API output.
-
Define the boundary.
- Resources or operations
- Request shape
- Response shape
- Error format
- Auth and permission behavior
- Pagination, filtering, sorting, rate limits
- Versioning and deprecation impact
-
Check compatibility.
- Existing clients
- Backward-compatible additions
- Breaking changes
- Migration path
- Feature flags or staged rollout if needed
-
Validate semantics.
- REST method/status-code semantics
- GraphQL schema and resolver implications
- Idempotency and retry behavior
- Data validation and partial failure handling
-
Tie to tests.
- Unit tests for validation and errors
- Integration/API tests for success and failure paths
- Contract tests or generated-client checks when available
Output
Return:
- Current contract evidence
- Proposed or reviewed contract
- Compatibility assessment
- Test plan
- Open questions
Do not
- Do not invent API conventions when repo conventions are visible.
- Do not change auth, versioning, or response formats silently.
- Do not claim OpenAPI/client compatibility without checking the actual spec or generator path.