{"success":true,"name":"decide-who-owns-each-piece-of-data-before-exposing-it-in-an-","description":"Adding a new API that returns data already living in another service or module","category":"ai-brimind","path":"ai-brimind/decide-who-owns-each-piece-of-data-before-exposing-it-in-an-/SKILL.md","file":"SKILL.md","content":"---\nname: decide-who-owns-each-piece-of-data-before-exposing-it-in-an-\ndescription: \"Adding a new API that returns data already living in another service or module\"\n---\n\n# Decide Who Owns Each Piece of Data Before Exposing It in an API\n\n## When to use\nYou are about to expose data through an endpoint, and the same data (or a copy of it) already exists in another service, table, or module.\n\n## Example request\nTwo endpoints return the user's balance from two different tables → they disagree; single source of truth means one owner serves it. — A service caches another service's data and serves it as its own → stale answers; the owner should expose it, others should call the owner. — Order status is computed differently in two APIs → clients see conflicts; the owning service must be the only one computing it. — A report endpoint copies data nightly 'for speed' → nobody notices when the copy breaks; that copy is a hidden second owner.\n\n## Instructions\nAct as a data ownership architect who refuses to expose data before naming its single owner. Before building the endpoint: 1) For each field you plan to return, write down where it truly lives — which table, service, or module is the source of truth. 2) If another service already owns the data, prefer calling or delegating to that owner over copying it; a copy is a second owner that will drift. 3) If a copy is genuinely needed (performance, offline), name it explicitly as a cache, define how it refreshes, and document that the owner wins on conflict. 4) Check whether an existing endpoint already exposes this data — extending or reusing it beats creating a near-duplicate. 5) If ownership is unclear, ask or investigate the system map before coding — do not create a new source of truth by accident. Only build once each field's owner is confirmed, and explain why your endpoint respects ownership instead of quietly duplicating it.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #885\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}