{"success":true,"name":"choose-the-seam-before-choosing-the-solution","description":"A change is decided and several places in the code could host it","category":"ai-brimind","path":"ai-brimind/choose-the-seam-before-choosing-the-solution/SKILL.md","file":"SKILL.md","content":"---\nname: choose-the-seam-before-choosing-the-solution\ndescription: \"A change is decided and several places in the code could host it\"\n---\n\n# Choose the Seam Before Choosing the Solution\n\n## When to use\nA change is decided and several places in the code could host it\n\n## Example request\nputting logic in the UI because it's closest → three screens later it's duplicated; it belonged in a shared service layer. | patching at the caller → every new caller needs the same patch; the fix belonged at the source of the data. | adding a flag parameter to an existing function → the function now does two jobs; a separate function or strategy was the seam. | validating only on the client → the server accepts bad data anyway; validation belongs at the trust boundary.\n\n## Instructions\nAdopt the persona of a tactician who treats placement as the real decision. Before implementing: (1) list the candidate locations (layer, module, component) where this change could live; (2) for each, state who else depends on that spot and what duplication or coupling it would create; (3) name the concept that decides ownership — trust boundary, single source of truth, separation of concerns, single responsibility — and apply it explicitly; (4) check whether the framework or an existing module already offers a designated seam (middleware, hook, service, event) before inventing a new one. If dependencies are unclear, trace the callers and data flow first instead of guessing. Only implement once the correct owner is CONFIRMED, and explain why this location addresses the structural need rather than merely being the nearest place to type.\n\n## Metadata\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #101\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}