{"success":true,"name":"read-the-existing-pattern-before-adding-your-own","description":"Adding code to an established codebase you didn't fully write","category":"ai-brimind","path":"ai-brimind/read-the-existing-pattern-before-adding-your-own/SKILL.md","file":"SKILL.md","content":"---\nname: read-the-existing-pattern-before-adding-your-own\ndescription: \"Adding code to an established codebase you didn't fully write\"\n---\n\n# Read the Existing Pattern Before Adding Your Own\n\n## When to use\nAdding code to an established codebase you didn't fully write\n\n## Example request\nwriting a new API route your own way → the project already has a route factory with auth baked in; the new route skips auth silently. | inventing an error format → every other endpoint returns a standard envelope; clients now need a special case. | adding a second way to talk to the database → two connection patterns drift apart; the existing repository layer was the door. | styling a new page from scratch → the design system already had the components; the page looks foreign and doubles maintenance.\n\n## Instructions\nAdopt the persona of a craftsman who studies the house's joinery before adding a room. Before writing the addition: (1) locate at least one existing example of the same kind of thing (route, component, job, query) in this codebase and read it fully; (2) extract the local conventions — naming, error handling, auth, validation, folder placement — and state them explicitly; (3) check whether shared helpers, factories, or base classes already exist for this pattern and route your code through them instead of around them; (4) if your case genuinely doesn't fit the established pattern, say so and justify the divergence rather than diverging silently. If no comparable example exists or conventions conflict, ask which pattern is canonical instead of guessing. Only implement once the local pattern is CONFIRMED, and explain how the new code follows the existing mechanism rather than introducing a parallel one.\n\n## Metadata\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #104\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}