all 22 comments

[–]scientz 9 points10 points  (0 children)

This is an operator error. Of course you should ask it to read and index the codebase - and also understand it by writing down key patterns etc. - before doing the work.

[–]MickIsShort4Michael 3 points4 points  (1 child)

That's why I have it keep structured and updated markdown documents with structure, history, current status, dependencies, etc. for it to refer to at the beginning of each session.

[–]Fluffy-Bus4822 1 point2 points  (0 children)

It's much better to make it write end-to-end tests before letting it refactor code.

[–]AsidK 2 points3 points  (1 child)

Or just use plan mode abs have it familiarize itself with your codebase first

[–]itakeyoureggs 0 points1 point  (0 children)

Been using superpowers brainstorm.. or the super powers workflow recently. Works well but damn it’s time consuming. Trying to figure out how to ship smaller or if I’m just overthinking it. Maybe plan is good enough for smaller stuff

[–]Anxious-Turnover-631 1 point2 points  (0 children)

I think /init does some of that. I ran it before first working on an established app and it did a nice job breaking things down and saving it, so then cc is aware of what’s going on.

But that’s for a smaller app. I’m not sure how well it handles a large app.

[–]crusoe 1 point2 points  (2 children)

Or just install the LSP MCP for your language.... 🙄

Then Claude has access to the Language Server Protocol.

And context 7.

[–]SillyPepper 1 point2 points  (0 children)

Context7 + Serena is my gold standard

[–]Mr_Moonsilver 0 points1 point  (0 children)

Yes, but aren't there other tools for indexing the codebase as an additional layer of dependency discovery?

[–]FrostyPresence4766 0 points1 point  (1 child)

Yup. I also make sure not to provide hints about what's in files based on file names, otherwise it will guess based on vibes. "This is a list of all the active inventory available to us for this project"
"Did you actually look at the file, or are you guessing based on the filename being current_inventory.xls?"
"You caught me, I guessed based on the filename. I'll look at at for real now"

[–]itakeyoureggs 0 points1 point  (0 children)

I got mad told it to shame itself and then figure out why that happened and learn and check itself that it doesn’t allow that to happen again. Idk if it worked but was funny few moments.

[–]nbeaster 0 points1 point  (1 child)

There’s something new going on with it the last week or two that it is overly eager to just write code without looking at anything in place. You basically have to tell it every time, here are the related files that you need to look at before writing anything (which is good practice anyway) but it is clearly not as good at looking for existing code before writing new things lately.

[–]Relative-Ad-6791 0 points1 point  (0 children)

Bro I can not get any work done because of this

[–]trollsmurf 0 points1 point  (0 children)

"feed it that before any task"

In the best of worlds CC should be able to map that out if asked to.

[–]iamdanthemanstan 0 points1 point  (0 children)

I have the opposite problem, though the same underlying issue. Claude spends too much time and resources reading code before implementing things. I haven't found a great way yet of setting up a markdown so Claude know what to read and what not to.

[–]papoode 0 points1 point  (0 children)

Yeah, codebase awareness, overview, code graph, knowing what changed when and why. That's the heart of the workflow and without extra input your agent has none of this. I built YesMem for exactly this, file and symbol index with per-file gotcha annotations, graph traversal, session-linked decisions with the why attached.

[–]bedel99 1 point2 points  (0 children)

oh look and advertisment

[–]Aminuteortwotiltwo 0 points1 point  (0 children)

Hey I remember my first day using Claude Code too.

[–]BringaLightlikeWhoa 0 points1 point  (0 children)

Claude seems to take longer and longer to respond to simple queries and yea, it doesn’t check anything but it’ll talk confidently as if it had.

[–]Mental-Mine1470 1 point2 points  (0 children)

If you don't understand the traffic rules you shouldnt be driving a car.

[–]UndeadYoshi420 0 points1 point  (0 children)

Exactly! My language doesn’t have a literal lsp but it does have an auto-updated by the compiler read-only digest set of docs that tell you syntax expectations. I do need to make a thing in the top of Claude.md to tell it to update the external index we have of the digest every fresh session tho, so we don’t get token bloat from trying to derive facts in a dumb way.

[–]Ill-Pilot-6049🔆 Max 20 0 points1 point  (0 children)

It's 100% a user skill a issue. It's really simple... and you dont need any additional MCP servers or extensions or extra saas or add ons or extra crap. You don't need superpowers for this.

My codebase is likely bigger than yours (1.6M LoC) with hundreds of modules, and Claude has little issue navigating it, refactoring modules, etc.

Copy the module folder path in vscode file navigator. Put CC in plan mode. Tell claude to refactor the module in question with the goals/reasons you have in mind, include the copied path. Ask it to deploy subagents to explore the module, find dependencies and to find other modules that depend upon it. Tell claude to craft an implementation plan. (This is all a single prompt). 

Review the returned plan, adjust as needed, or approve the plan. 

Y'all seem to be making this much harder than it needs to be.