Skip to content

rule-module-ownership

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.

  1. git mv the rule under .claude/modules/<owner>/rules/, set frontmatter module: to that owner.
  2. Basenames must be globally unique — a consumer install FLATTENS every module’s rules/ into one ~/.claude/rules/.
  3. 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.