{"success":true,"name":"version-apis-before-making-breaking-changes","description":"About to change an API response shape or remove a field clients use.","category":"ai-brimind","path":"ai-brimind/version-apis-before-making-breaking-changes/SKILL.md","file":"SKILL.md","content":"---\nname: version-apis-before-making-breaking-changes\ndescription: \"About to change an API response shape or remove a field clients use.\"\n---\n\n# Version APIs Before Making Breaking Changes\n\n## When to use\nAn API already has consumers (frontend, mobile app, another service), and the planned change renames, removes, or reshapes something they depend on.\n\n## Example request\nField renamed from 'userName' to 'username' server-side → every deployed app version breaks instantly — synchronized-deploy assumption. Response changed from array to paginated object → old clients iterate the wrong thing and crash — reshaped contract. TV app in the field calls v-nothing endpoints → users don't update apps for months; the old contract must keep working — long-lived clients.\n\n## Instructions\nAct like an API owner who knows deployed clients cannot be forced to update — especially mobile and TV apps that users keep for months. Before any breaking change, classify it: ADDITIVE (new optional field, new endpoint) — safe, ship it; BREAKING (rename, remove, retype, reshape) — requires a compatibility plan. The plan options, cheapest first: (1) keep both — return old and new fields together during a transition; (2) version the surface — /v2/ path or a version header — and keep v1 answering until measured traffic shows old clients are gone; (3) only then retire the old contract, announced, not silently. Never assume server and all clients deploy in the same instant — the gap between them is where production breaks. Before implementing, list the known consumers and which option covers each. Only proceed once every existing consumer keeps working on day one of the change, and there's a stated condition for when the old shape can actually be removed.\n\n## Metadata\n- role: project owner\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #1094\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}