
Using AI on a 15,000+ Line Codebase Is Broken (Unless You Do This)
I tried using AI on a 15k+ line codebase. It failed badly. Wrong changes, broken logic, random imports — classic. Then I changed how I used it, and it started saving me weeks of work. The Problem AI doesn’t understand large codebases. You can’t just paste a repo and say: “refactor this” It will: miss dependencies break existing flows hallucinate logic touch things you didn’t ask for I learned this the hard way. The Setup This is not a small project. Multiple screens, services, storage layers — not something AI can “just understand”. What Actually Worked Stop dumping the whole codebase Instead of: “Here’s my project, fix X” Do: give only relevant files explain relationships manually AI is not context-aware at scale. You have to simulate context. Give strict instructions (like a junior dev) Bad: “Improve this” Good: “Modify this function only. Do not change API shape. Do not touch unrelated files.” The difference is massive. One change at a time Don’t do: “Refactor this entire flow” Do:
Continue reading on Dev.to
Opens in a new tab



