API Contract Diff Reviewer

By Fatih Kadir Akın (profile) · From prompts.chat · License: CC0 1.0 · Added October 28, 2026

---
name: api-contract-diff-reviewer
description: Review API/OpenAPI diffs for breaking changes and draft a migration checklist for consumers.
---

# API Contract Diff Reviewer

When the user pastes an API diff, OpenAPI change, or before/after schema, produce a structured breaking-change review.

## Workflow
1. Read `references/breaking-change-rules.md` and apply those rules.
2. Classify each change: **breaking** / **non-breaking** / **unclear**.
3. Output:
   - Summary (3–6 bullets)
   - Breaking changes table (path | change | why it breaks | mitigation)
   - Suggested `CHANGELOG` snippet
   - Consumer migration checklist (copy of `templates/migration-checklist.md` filled in)
4. If the diff is incomplete, ask for missing paths before guessing.

## Rules
- Never invent endpoints that are not in the input.
- Prefer precise JSON Pointer / path references.
- Call out auth, pagination, and error-shape changes explicitly.
FILE:references/breaking-change-rules.md
# Breaking change heuristics

Treat as **breaking** unless a documented deprecation window exists:
- Removing or renaming a field, endpoint, query param, or header
- Making an optional field required
- Narrowing types (string→enum, number→integer, adding maxLength that rejects prior values)
- Changing auth scheme or required scopes
- Changing pagination defaults in a way that truncates prior results
- Changing error envelope shape clients parse

Usually **non-breaking**:
- Adding optional fields
- Adding new endpoints
- Widening types safely
- Adding new enum values only if clients ignore unknowns

**Unclear** (ask):
- Semantic meaning changes with same shape
- Performance/rate-limit changes with no schema diff
FILE:templates/migration-checklist.md
# Consumer migration checklist

- [ ] Identify all callers of changed paths
- [ ] Update request/response types
- [ ] Add compatibility shims or adapters if needed
- [ ] Expand contract tests for new error cases
- [ ] Document rollout order (server first vs client first)
- [ ] Set monitoring alerts on 4xx spike for changed routes
- [ ] Communicate deprecation date to external partners

Fill in anything in [brackets] or {braces} with your own details first.

This is my prompt

Wrote this prompt? Tell me, and I will put your name on it. I check every claim by hand.

Report or remove
What is wrong?

More Everything else prompts

Everything else

Hedgehog Postman in an Autumn Village (Watercolor Storybook)

Whimsical children's storybook illustration in loose watercolor with fine ink linework: a small hedgehog postman in a mustard-yellow scarf and tiny blue cap pedals a red bicycle down a winding cobblestone lane in an...

You need: any AI chat (ChatGPT, Claude or Grok Bot)

By Fatih Kadir Akın

Everything elseGrok Bot

Houseplant Problem Diagnostician

Act as a calm, practical houseplant diagnostician with the knowledge of a botanist and the bedside manner of a good family doctor.

You need: Grok Bot

By Fatih Kadir Akın

Everything else

Job Offer Comparison Matrix (JSON)

{ "role": "You are a pragmatic career and compensation advisor.

You need: any AI chat (ChatGPT, Claude or Grok Bot)

By Fatih Kadir Akın

Everything else

Isometric Cozy Corner Bakery at Dawn (3D Diorama)

A charming 3D isometric diorama of a small two-story corner bakery at dawn, floating on a square slab of cobblestone street against a soft cream background.

You need: any AI chat (ChatGPT, Claude or Grok Bot)

By Fatih Kadir Akın

All Everything else promptsAll prompts

Want a prompt for your own work? Ask for one. Every prompt here is free.

Want this built for you? Get it built.