Skip to content

Move area-specific guidance from CLAUDE.md into path-scoped rules - #42

Merged
solcott merged 1 commit into
mainfrom
feature/claude-rules
Sep 30, 2026
Merged

solcott merged 1 commit into
mainfrom
feature/claude-rules

Conversation

@solcott

@solcott solcott commented Sep 30, 2026

Copy link
Copy Markdown
Owner

Summary

CLAUDE.md loaded all 347 lines into every session, though most of it only matters in one part of the codebase. This moves that guidance into .claude/rules/, where each file loads only when Claude touches matching files.

Rule Loads for
gradle-build.md **/*.gradle.kts, build-logic/**, gradle/**, gradle.properties
hot-reload.md desktopApp/**, ui/**
data-flow.md repository/**, domain/**
compose-stability.md the six Compose modules, model/**, repository/**, config/compose/**
circuit.md domain/**, ui/**
network.md network/**, repository/**
storage.md storage/**

CLAUDE.md keeps what's true everywhere (build loop, delegation, code style, targets, layering, Metro DI, the remaining gotchas) and drops to 96 lines.

Skills

  • circuit-screen and themealdb-api move their invariants into circuit.md and network.md, so those apply without anyone invoking the skill. The skills keep the add-a-screen walkthrough and the endpoint/tier/attribution reference.
  • verify is a procedure, so it stays a skill as it was. Only its link to the old Compose stability section changed.

Agents

  • circuit-scaffold now reads circuit.md, and data-flow.md when a repository is involved. It also requires @Immutable/@Stable on the sealed state, because a skeleton without it fails composeStabilityCheck.
  • recipes-gradle-runner gains a composeStabilityCheck row, since /verify sends that task to it.

The text was moved, not rewritten. A paragraph-by-paragraph comparison against the old CLAUDE.md and skills found every paragraph in the new files, apart from four deliberately reworded ones whose content lives in the new rules.

Test plan

  • In a fresh session, read a file under storage/ and run /memory: only storage.md should have loaded
  • Do the same under build-logic/: only gradle-build.md should have loaded
  • No Gradle run needed: the change only touches .md files under .claude/ and CLAUDE.md

🤖 Generated with Claude Code

CLAUDE.md loaded all 347 lines every session, though most of it only
applies in one area. Split it into seven .claude/rules/ files that load
when matching files are touched: gradle-build, hot-reload, data-flow,
compose-stability, circuit, network and storage. CLAUDE.md keeps what is
true everywhere and drops to 96 lines.

The circuit-screen and themealdb-api skills move their invariants into
the circuit and network rules, so the rules apply without the skill
being invoked. The skills keep the add-a-screen walkthrough and the
endpoint/tier reference. verify stays a skill.

Agents: circuit-scaffold reads the circuit and data-flow rules and now
requires @immutable on the sealed state; recipes-gradle-runner learns
composeStabilityCheck, which /verify delegates to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@solcott
solcott merged commit a62bb15 into main Sep 30, 2026
1 check passed
@solcott
solcott deleted the feature/claude-rules branch September 30, 2026 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant