rule-module-ownership
Every Rule Belongs to a Module
Section titled “Every Rule Belongs to a Module”A kit-shipped rule lives at .claude/modules/<name>/rules/<rule>.md and declares frontmatter module: <name> matching its directory. A rule sitting in a kit’s flat .claude/rules/ dir is a bug — file /t1k:issue against the owning kit rather than silently relocating it in a consumer.
When authoring a new rule, the first question is which module owns it, not what to name it. No fit → that’s a missing module, not a licence to go flat: create it (required: false unless genuinely universal) and put the rule there.
No CI gate catches this. validate-module-rules-claim.cjs fires only on a basename COLLISION — a new, non-colliding flat rule with module: null passes silently, and t1k rule new --universal is a supported CLI path to exactly that placement. This rule text is what stands between a session and that outcome.
How to apply
Section titled “How to apply”git mvthe rule under.claude/modules/<owner>/rules/, set frontmattermodule:to that owner.- Basenames must be globally unique — a consumer install FLATTENS every module’s
rules/into one~/.claude/rules/. - New module → regenerate the rollup per
agents/t1k-kit-developer.md§ “Module Registry Sync” in the SAME commit.
Enforcement gates, the flattening model, and how to place a rule two modules both want: docs/rule-module-ownership.md.