Move area-specific guidance from CLAUDE.md into path-scoped rules - #42
Merged
Merged
Conversation
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>
4 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.gradle-build.md**/*.gradle.kts,build-logic/**,gradle/**,gradle.propertieshot-reload.mddesktopApp/**,ui/**data-flow.mdrepository/**,domain/**compose-stability.mdmodel/**,repository/**,config/compose/**circuit.mddomain/**,ui/**network.mdnetwork/**,repository/**storage.mdstorage/**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-screenandthemealdb-apimove their invariants intocircuit.mdandnetwork.md, so those apply without anyone invoking the skill. The skills keep the add-a-screen walkthrough and the endpoint/tier/attribution reference.verifyis a procedure, so it stays a skill as it was. Only its link to the old Compose stability section changed.Agents
circuit-scaffoldnow readscircuit.md, anddata-flow.mdwhen a repository is involved. It also requires@Immutable/@Stableon the sealed state, because a skeleton without it failscomposeStabilityCheck.recipes-gradle-runnergains acomposeStabilityCheckrow, since/verifysends 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
storage/and run/memory: onlystorage.mdshould have loadedbuild-logic/: onlygradle-build.mdshould have loaded.mdfiles under.claude/and CLAUDE.md🤖 Generated with Claude Code