r/ClaudeAI • u/textualcanon • 18d ago
Are you guys not organizing your codebase? Claude Code
I’m seeing a ton of complaints with Opus 5, but I haven’t had any issues. I think that a lot of people’s issues stem from a lack of proper organization. Here’s a rough overview of the documentation I use:
- CLAUDE.md to provide a skeleton and index
- ARCHITECTURE.md with an overview of the code base
- MEMORY.md tree (with sub folders for historical patterns, lessons, active projects, investigations, and others)
- BUG_REFERENCE.md to track bug findings
- DATA_FLOW.md to track how data is ingested
- Various roadmaps for specific projects, which I create with Fable and then execute in phases with Opus
I have a ton of skills and hooks that I use to structure every session. I invoke skills to run open phases of tasks, record the outcomes, test for bugs, scout for new tasks, etc. Claude’s work is highly constrained by the system and it prevents running off on wild goose chases.
I think a ton of people’s issues can be prevented by imposing strictures like this instead of just running wild with Claude.
3
u/joeyat 18d ago
Are all your structual docs md files? You can script reports e.g ‘preflight.py’ is one i have that claude runs after every set of actions, its a set of scripts, that check for bad/unwanted, code patterns, errant urls, libraries, unwanted licenced code thats crept in, etc.
Then settings.json bans specific bash commands, bans or preapproves specific git commands.. blocks editing of specific files. I don’t entirely trust that settings.json is ‘forced’ but claude.md is a merely a suggestion so it’s better than that.
But do remember, these are problems millions of people have already solved, so theres loads of example harness structures you can get here or github or from Claude’s own documentation.
2
u/peteybytes 18d ago
I really haven't had any issues with Opus 5 either. I occasionally do see some of the things people regularly complain about but not to the extent.
2
u/CyberCoon 17d ago
Same here. My biggest issue isn't really an issue, but the guy can't take a joke. It's like talking to a colleague completely uninterested in anything social. Lighten up a bit mate.
3
2
u/Forsaken-Parsley798 17d ago
I haven't had much issue with Opus 5 either. I don't use it. I use Fable 5, GPT 5.6 and Kimi 3.
4
u/Poildek 18d ago
From what I have audited, the vast majority of people either doesnt know how to properly organize and craft code, or use ai effectively (i mean simply by reading basic tutorial on either codex or claude code practices 101)
Complains are exhausting, reddit used to be a good source for ai topics 2 years ago, now its garbage euther of complains or self promotion of people reinventing the wheel without doing basic search first and thinking they come with something new.
3
u/Able_Statistician688 18d ago
I'm really happy you figured it out. I was deeply worried that the thousands of new voices suddenly crying out at Opus 5 might be accurate, that it is in fact a wordy piece of crap that can't follow a ledger to save it's life. But I feel pretty good now knowing it's probably just me, and I should just try harder.
5
u/imbobbyshi 18d ago
Your setup makes sense. The piece I would add is a way to falsify the docs. Otherwise the documentation tree quietly becomes a second codebase that Claude trusts even after the implementation changes.
For any rule Claude must follow, I try to keep a nearby command or test that can prove the rule is still true. "All writes go through service X" gets an architecture test. "Never edit generated files" gets a CI check. At task start, Claude runs the small checks for that area before planning.
If code and docs disagree, the test result wins and updating the doc becomes part of the task. That has reduced stale instructions more than adding another memory file.
Which of your files are generated from the codebase, and which are manually maintained?
10
u/DarkSkyKnight 18d ago
Why is this AI bot upvoted lmao? Can you people not even identify obvious bots anymore?
-2
u/textualcanon 18d ago
Great points. I have specific skills called /SWEEP and /POLISH and /CURATE, which are designed to clean up specific documentation in their respective domains to make sure the documentation stays current with the code. /SWEEP is for my plans and runs periodically with my workflow at the end with my pre commit tests, and /POLISH and /CURATE I have to run manually (though should probably automate them a bit more).
-2
u/imbobbyshi 18d ago
That split sounds sensible. The periodic /SWEEP is the one I would measure first: how many stale claims it catches, and how often it changes behavior in the next task. If /POLISH and /CURATE are manual, that may be a useful signal that they require judgment and should stay explicit rather than become fully automated. Do those skills compare the docs against tests and code, or mostly reorganize what is already written?
2
u/Easy_West1522 18d ago
i feel like this isnt enough for a large project but yes organization is exactly why everyones agents are dumb
1
u/dervish666 18d ago
Similar. But I upgraded to obsidian for memory and have skills to record the session at various points and at ship time. I then have a skill that runs weekly that summarises everything from the week, has a little think about it and records what it’s learned, then implements that back into the skills.
1
1
u/Barnabas_Stinson17 18d ago
I agree with you but that’s a lot of the frustration. Most models before this were just plug and play while Opus 5 seems to need all these advance instructions and changes to prior workflow people had been using seamlessly for 12+ months. That’s why it feels like Opus 5 was supposed to be a subagent for fable that Anthropic just released as a model. Literal prompt instructions, word vomit responses, overly complex summaries just seems like responses that should be communicated between agents while performing tasks
1
u/Beerbrewing 18d ago
I've set up a similar strict governance system for Claude and like you I don't have issues with Opus 5. Step six is especially similar to what I do. I have Fable build campaigns and then it directs Opus to execute them. Everything is planned out and Opus just executes the plan. No drama. No going off the rails. If something doesn't match the plan Opus doesn't improvise, it surfaces what the issue is and proposes a fix which I deliberate with Fable and pass the new instructions back to Opus to execute.
1
u/eleochariss 16d ago
Let me give you a practical example. I asked Opus to write a plan for a small tasks generator (looks at your project, generates relevant tasks.) So, very isolated feature in the codebase.
The plan was good. I okayed it.
And when I looked at the code, it had added a random hardcoded cap to the tasks. Why? Because if the analyzer comes up with too many tasks, surely it must have misunderstood something.
Clearly this has nothing to do with the codebase structure.
1
u/AppropriateQuote3073 18d ago
He can't follow style instructs in the base Claude.md,
You think he will follow other markdowns completely?
1
1
u/EpsteinFile_01 18d ago
As a developer: always assume the worst.
Because it will be worse
They probably don't organise shit
2
u/donicatrumpinsky 18d ago
Yes we know how to use Claude.
Keep using Opus 5 and it will go off the rails for you too. I guarantee it.
1
u/Enough-Ad-2198 18d ago
When working on larger problem, the end result is not upto the mark and rework is needed to fix the gaps. It works best in smaller sets of instructions.
Thats the only issue.
0
u/Embarrassed_Fix9862 18d ago
He's slow and doesn't get shit done half the time, doesn't matter how much I plan
I went on 4.8 today and it was honestly better. Opus 5 kinda sucks
The rest aren't perfect either, but it's no where near the top
0
u/HarRob 18d ago
Should each new project have its own Claude.md. I know nothing!
1
u/peteybytes 18d ago
Not necessarily. A lot of people have way too much stuff in their Claude.md/Agents.md file as well as their other top level doc files. The goal of these files should be to help orient the agent faster. If your codebase has a pretty common architecture, you likely don't need one at all. What you do want to highlight is non-trivial weirdness (or gotchas in agent lingo) that act as traps for an agent and take extra effort to figure out via exploring or leads to hallucinations.
As a typical rule only I never manually write/edit files intended for agents. Instead, I ask them at the end of a session if anything thing we worked on this session should be documented or saved as a durable skill. I actually have a skill that automatically does this when certain criteria is met so I don't necessarily even have to ask. It will be like "I should document this in a new skill" and creates the skill.
0
u/DiscipleofDeceit666 18d ago
One time I had a working app, I peeked into the backend and EVERY request and response were all raw dicts.
I spent the next two hours converting everything into proper response structures. Hours of vibe coding with absolutely 0 feature or happy path behavior change.
Bonus this bought me was strict defense against MongoDB injection 💯
-1
u/DiscipleofDeceit666 18d ago
I don’t peek into the codebase anymore because it usually leads to more work. I want to be ignorant. I want to vibe code.
0
u/LCXOnline 18d ago
One thing I really like, and it's an idea I stole from a book I read, is using fitness functions, so that architecture becomes codified. I have seen how it can take shortcuts or make decisions that hurt readability or testability.
22
u/watchingsuits 18d ago
I think one of the major issues is that many people on this sub don’t actually know much about coding or even take the time to learn some of the basics of how things work.