A bad line of research is a hundred bad lines of code
Key takeaway: Give an agent researched context about your codebase and a written plan before you let it write code.
One misunderstanding in research turns into a hundred bad lines of code. Load your AI agent with verified research and a written plan before it writes anything.
The natural first approach to coding agents is to describe what you want and hope. Sometimes it works. Other times you get code that looks right but misses the patterns, naming conventions, and business rules your codebase depends on. Usually the model is fine. An agent that doesn’t understand your codebase writes generic code. Engineers who skip that setup often conclude the model can’t code.
Dex Horthy’s Research-Plan-Implement workflow fixes that:
- Research first. Read the code, trace dependencies, and look at how similar features and their tests were built. Verify instead of assuming. It also builds your own understanding of the system.
- Plan next. Write down the approach, the files involved, and the expected outcome. The plan stays in the agent’s context and keeps it on track.
- Implement only after both are loaded.
Bad research spreads. If the agent misreads the architecture, every file it touches carries the mistake. If it doesn’t know about an existing utility, it reinvents it badly. Good research compounds the other way. New code fits, and tests follow the conventions the first time.
That’s why I built rpikit, which enforces the discipline at each phase. It makes the agent verify before claiming done and weigh feedback before accepting it. The idea is to outsource the typing, not the thinking.
The people getting the best results put their effort into research more than prompting, and they capture what they learn in SKILL.md files so the next session starts smarter.