2 hacks
Keep the root CLAUDE.md short and drop domain-specific CLAUDE.md files under paths like src/db/ so Claude loads them only when it works in that area.
Put domain-specific instructions in path-scoped `.claude/rules/` so they load only when Claude touches matching files.