I Built an AI That Finds Your Bugs and Rewrites Your Code to Fix Them.

Dev.to AI
Generative AI AI Safety AI Hardware

How I built CodeLens - a Groq-powered code review tool that detects SQL injection, memory leaks, and O(n²) algorithms, then rewrites your entire file with all issues resolved. Full breakdown of the architecture, prompt engineering tricks, and the LLM hallucination problem I had to solve. Every developer has shipped a bug they should have caught. Not because they were careless. Beca is expensive. You're scanning hundreds of lines for subtle patterns: a missing conn.close, an f-string wired directly into a SQL query, a nested loop that looks innocent at n = 10 but detonates at n = 10,000.