{"success":true,"name":"map-the-blast-radius-before-touching-anything-shared-a-field","description":"About to change a field, model, or endpoint that several layers depend on","category":"ai-brimind","path":"ai-brimind/map-the-blast-radius-before-touching-anything-shared-a-field/SKILL.md","file":"SKILL.md","content":"---\nname: map-the-blast-radius-before-touching-anything-shared-a-field\ndescription: \"About to change a field, model, or endpoint that several layers depend on\"\n---\n\n# Map the Blast Radius Before Touching Anything Shared: A Field Lives in Five Places at Once\n\n## When to use\nYou are about to rename, retype, or change the meaning of something shared — a schema field, a core model, a common endpoint — without listing every layer that depends on it.\n\n## Example request\nRenaming 'status' to 'membershipStatus' looks like one schema line → it actually lives in the Mongoose model, two aggregations, four endpoints, the validation layer, the frontend types, and three screens' render logic; the rename is one edit, the dependency chain is ten. A change tested only where it was made → the payment page was never touched, but it read the old field and now shows blanks; breakage appears at the DEPENDENTS, not at the change. The chain found by grepping the exact name across the whole repo → search results ARE the dependency map; ten minutes of reading beats a day of whack-a-mole. A field used in exactly one component → tiny radius, change freely; the discipline scales effort to how shared the thing is.\n\n## Instructions\nAct as a demolition surveyor, not a renovator: before moving any wall, you find out what rests on it — because in a full-stack app, a 'small' change to a shared field or endpoint is never one edit, it is one edit plus every model, query, validator, endpoint, type, and screen that silently leans on the old shape, and the bugs will surface at those dependents, usually days later, wearing disguises. Before changing anything shared, do this: (1) Build the dependency map mechanically, not from memory: grep the exact name (and its variants) across the ENTIRE repo — schema definitions, aggregation pipelines (string field names hide from rename tools!), API routes, validation schemas, frontend API calls, components, seed scripts, and cron jobs. Write the list down; memory says 'three places', grep says nine, and grep is right. (2) Classify each hit by layer and ask the crossing question: does this change alter what crosses a boundary — the DB shape (then your migration discipline fires: old records still hold the old shape), the API response (then your contract-and-consumers discipline fires: who reads this field?), or only internal code (the cheap case)? Boundary-crossing changes cost an order of magnitude more than internal ones — knowing WHICH kind you are making is the whole decision. (3) Sequence the edits along the dependency direction, not randomly: data layer first (migration or dual-shape tolerance), then backend reading/writing it, then the contract doc, then frontend — each layer only changed once the layer it depends on is ready, so the app stays runnable between steps rather than broken until everything lands at once. (4) Test at the LEAVES of the map, not the root: the proof is not 'the schema compiles' but 'the furthest dependent screens and jobs still work' — walk your written list and check each dependent off explicitly. (5) If the map turns out huge, treat that as information, not annoyance: maybe the change wants your deprecation pattern (add new alongside old, migrate consumers, retire old) instead of an in-place edit — say which strategy you chose and why. Only start editing once the dependent list is written and the order is chosen — 'it's just a rename' is the most expensive sentence in full-stack development, and the invoice always arrives at a screen you didn't open.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #237\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}