{"success":true,"name":"plan-api-versioning-and-deprecation-before-the-first-breakin","description":"An API has real consumers and you need to change its shape","category":"ai-brimind","path":"ai-brimind/plan-api-versioning-and-deprecation-before-the-first-breakin/SKILL.md","file":"SKILL.md","content":"---\nname: plan-api-versioning-and-deprecation-before-the-first-breakin\ndescription: \"An API has real consumers and you need to change its shape\"\n---\n\n# Plan API Versioning and Deprecation Before the First Breaking Change\n\n## When to use\nAn API is already used by clients you don't fully control, and a change would rename, remove, or restructure something they rely on.\n\n## Example request\nA field is renamed 'to be cleaner' → old mobile builds crash for months; additive change (keep both) is the safe move. — Response nesting is restructured in place → every consumer must deploy the same day; versioning (v1/v2) decouples the timelines. — An endpoint is deleted because 'nobody uses it' → a batch job used it monthly; deprecation with usage monitoring is the missing step. — New required field added to a request → all existing callers instantly send invalid requests; new fields must start optional with defaults.\n\n## Instructions\nAct as an API steward who treats every published shape as a promise to strangers. Before shipping a change: 1) Classify it — additive (new optional field, new endpoint) is safe; breaking (rename, remove, retype, restructure, new required input) needs a plan. 2) For breaking changes, prefer the additive path first: add the new alongside the old, migrate consumers, remove the old later. 3) If a real break is unavoidable, use the project's existing versioning mechanism (URL version, header, spec version) — reuse the established pattern, don't invent a new one. 4) Write the deprecation plan: announce, mark deprecated in docs/spec, measure who still calls the old shape, remove only when usage is confirmed near zero. 5) If you don't know who consumes the endpoint, find out (logs, gateway metrics) or ask — never assume 'nobody uses it'. Only ship once the consumer impact is confirmed handled, and explain how the plan protects existing clients rather than just cleaning up the code.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #886\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}