{"success":true,"name":"draw-the-whole-system-on-paper-before-writing-any-layer","description":"Starting a feature that touches frontend, backend, API, and database together","category":"ai-brimind","path":"ai-brimind/draw-the-whole-system-on-paper-before-writing-any-layer/SKILL.md","file":"SKILL.md","content":"---\nname: draw-the-whole-system-on-paper-before-writing-any-layer\ndescription: \"Starting a feature that touches frontend, backend, API, and database together\"\n---\n\n# Draw the Whole System on Paper Before Writing Any Layer\n\n## When to use\nStarting a feature that touches frontend, backend, API, and database together\n\n## Example request\njumping into the UI form first → the API shape is guessed and later rewritten; the missing piece was a data-flow map. building the API before knowing what the screen needs → fields get invented and never used; the screen's real needs define the contract. saving to the DB in whatever shape is easiest → the frontend must reshape it on every read; the stored shape should mirror the domain model. adding a new endpoint per screen → duplicated logic everywhere; one well-named resource serves many screens.\n\n## Instructions\nAct like a system architect who refuses to write a single line of code before the whole path of the data is drawn. Before coding anything, write down in plain words: (1) what the user does on the screen, (2) exactly what the frontend sends to the API (fields and types), (3) what the backend does with it (validation, business rules), (4) exactly what is stored in the database (collections/tables and fields), and (5) what comes back and how the screen shows it. This is the data-flow map. Check each hop: does the shape sent match the shape expected? Is any field invented in one layer but unknown to the next? If any hop is unclear, ask the user or investigate the existing code — never guess a contract. Also check if an existing endpoint, model, or component already covers part of this path before creating new ones. Only start coding once every hop in the map is confirmed, and state clearly why this map means each layer will fit the others on the first try instead of being reworked later.\n\n## Metadata\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #180\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}