CLAUDE.md
files are read wherever you put them… so why not scatter them throughout my codebase in an attempt at keeping the parent
CLAUDE.md
as concise as contextual as possible. My idea being that as Claude navigates the project, it picks up contextual
CLAUDE.md
information that is relevant to that namespace area of the project.
How do I do this?
I have my own version of “Ralph Wiggum” that creates a plan with a “Learnings” table.
The table is updated by each subagent as it finds things worthy of noting that caused issues, were a consistent design/pattern if found throughout its ‘explore’ investigations, workarounds, etc etc.
After the plan is done I run /distill-learnings <plan-path>
That command:
Parses
every row in the Learnings table
Classifies
each as repeatable pattern or one-off fix (one-offs get dropped)
Verifies
surviving patterns against the actual source code — if the code doesn’t match the claim, it gets dropped
Maps
each pattern to the most specific directory where a micro CLAUDE.md would catch future instances
Reconciles
with ALL existing micro CLAUDE.md files to avoid duplicates or contradictions
Applies
the new rules with clear action labels: [], [], [], or []
The result is a network of tiny
CLAUDE.md
files sitting next to code they govern. Most are under 30 lines.
The plans are throwaway. The learnings compound.
It’s been incredible for overcoming consistency with design patterns.
submitted by
/u/Fresh_Quit390
Originally posted by u/Fresh_Quit390 on r/ClaudeCode
