Tips for Managing a Medium-Sized Codebase with Claude Code
Asked by
mended hem
I've recently upgraded to the $100 max plan, which offers five times more usage, and I want to leverage it for adding a new feature to my codebase, which is about 25,000 lines long. While using Opus, it encountered issues finishing its tasks; it got through some files but didn't complete the first prompt. When I switched to Sonnet, it felt similar to using Cursor โ I ended up telling it step by step what to do for implementation and bug fixes, which worked eventually. I'm hoping to integrate Opus to tackle some more complex bugs or features. Is there a way to set up Sonnet to provide the necessary context for Opus while keeping it as concise as possible?
Answers
Give the '/in' command a shot for every new repository you set up. It could help the AI focus better on specific contexts.
Reply to this answer
Definitely use a master_context_plan.md! Itโs a fantastic way to keep Claude aligned with your project goals. This structured approach helps ensure everything flows smoothly.
Reply to this answer
For a 25k line codebase, organization is key! Aim for short files; ideally, keep them under 250 lines. Even 500 lines can work, but clarity is crucial. Using headers for each file, outlined in a CLAUDE.md at the root, can help keep track of everything. Proper documentation goes a long way when steering AI models like Claude. It might require some preparation, but it'll pay off in the long run!
Reply to this answer
Remember, LLMs like Claude aren't AGI. They need guidance just like you would debug a code issue. Be proactive in directing it to focus on the right tasks. Share your thoughts and inquire actively. When it goes off track, just steer it back on course. Youโve got this!
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions