codebase-research
Codebase Research
Overview
Before writing new code in an existing project, understand what already exists inside it. The codebase itself is the most authoritative reference for how things should be built. Every project accumulates conventions, patterns, and implicit standards that new code must respect.
Core principle: Search the current codebase before coding. Find similar files, functions, and patterns. Match existing conventions exactly. Never introduce a second way of doing something when a first way already exists.
No exceptions. No workarounds. No shortcuts.
The Prime Directive
NO NEW CODE WITHOUT UNDERSTANDING THE EXISTING CODE FIRST
If you have not searched the current codebase for prior implementations of the same pattern, you are risking inconsistency. Found nothing similar? Document what you searched. Then build, establishing the convention deliberately.