Move path-specific guidance into .claude/rules - #44
Merged
Merged
Conversation
Invariants that fail silently and belong to one directory now live in path-scoped rules that Claude Code loads when a matching file is read, instead of skills that loaded only if the model remembered to open them. - Add 11 rules under .claude/rules/, and un-ignore the directory. - Delete the network-apollo, web-app, apple-app-icons and compose-previews skills, whose content moved into rules in full. - Trim desktop-app to hot reload, dependency-bump to its verification procedure, and add-screen to pointers. - AGENTS.md: route to rules and task skills, drop derivable content, move platform commands into their rules. - Correct stale facts: detekt now runs on every module (config is config/detekt/detekt.yml), there are eleven modules, and KMP tests use kotlin.test rather than JUnit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Most of what breaks in this repo fails silently. The guidance for it was kept in skills, and
AGENTS.mdasked the agent to "read the matching skill before editing". That only worked when the model remembered to. This PR moves those per-directory invariants into path-scoped rules (.claude/rules/*.mdwithpaths:frontmatter). Claude Code loads a rule automatically whenever a matching file is read.swift-export,network,web,desktop,app-icons,compose-ui,compose-resources,screens,metro-graph,build-scripts,kmp-tests..gitignorenow un-ignores.claude/rules/.network-apollo,web-app,apple-app-iconsandcompose-previewsare deleted; their content is now in rules in full.desktop-appis trimmed to hot reload and the MCP server,dependency-bumpto its verification procedure, andadd-screenpoints to the rules instead of repeating them.apple-app,verify,pr-reviewandcompose-fontsstay as task skills.AGENTS.md(26.5k → ~20k chars, always loaded):ModifierMissing/ModifierNotUsedAtRootactive and run by CI's./gradlew build.AGENTS.mdand thecompose-conventionsagent still said it covered onlybuild-logic.config/detekt/detekt.yml.detekt/detekt.ymllooks like a leftover and is left in place.kotlin.test+ Turbine.renovate.json5comments point at the network rule instead of the deleted skill. The rule also gains the sql.js "declared twice, must match" invariant, which only Renovate's config recorded before.Test plan
verifyrequires no build.git grep).verify's "fails at runtime with a clean build" list is covered by a rule.paths:and confirm the rule loads, then open an unrelated file and confirm it does not.🤖 Generated with Claude Code