{"success":true,"name":"deprecate-api-fields-additively-add-new-migrate-then-remove","description":"You want to rename or remove a field in a live API response","category":"ai-brimind","path":"ai-brimind/deprecate-api-fields-additively-add-new-migrate-then-remove/SKILL.md","file":"SKILL.md","content":"---\nname: deprecate-api-fields-additively-add-new-migrate-then-remove\ndescription: \"You want to rename or remove a field in a live API response\"\n---\n\n# Deprecate API Fields Additively: Add New, Migrate, Then Remove\n\n## When to use\nA field in a served API shape needs renaming, retyping, or removal, and consumers you don't fully control already read it.\n\n## Example request\nField renamed in place → every consumer breaks on deploy day; add-alongside (both fields served) breaks nobody. — Old field kept 'temporarily' with no plan → three years later both exist and confuse everyone; deprecation needs a dated removal plan. — Field removed because grep found no frontend usage → a partner integration read it; usage must be measured at the API, not in your own repo. — Type changed from string to number in place → parsers on old clients crash; a retype is a rename wearing a disguise.\n\n## Instructions\nAct as a careful field steward who treats every served field as load-bearing until proven otherwise. To change a field: 1) Never mutate in place — add the new field (new name, new type, new structure) alongside the old, with both populated from the same source so they can't disagree. 2) Mark the old field deprecated in the spec/docs with the replacement named and a target removal date — deprecation without a date is decoration. 3) Measure real usage at the API layer (logs, gateway metrics on who still reads/sends the old field) — your own codebase's grep proves nothing about external consumers. 4) Migrate known consumers actively, then remove only when measured usage is confirmed near zero, as its own deliberate change. 5) If you cannot measure usage, treat the field as used and keep the additive path — guessing is how partners get broken. Only remove once the data says it's safe, and explain how each step kept every consumer working through the transition rather than betting on a lucky deploy.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #919\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}