← ClaudeAtlas

create-rulelisted

Scaffolds a project-specific governance rule into `.claude/rules/project/<subdir>/<n>-<slug>.md` with correct frontmatter and a non-colliding number. Use when asked to "add a rule", "create a governance rule", "write a project rule", or when a project needs a coding rule the toolkit does not ship. Do NOT use to edit toolkit source rules under `governance/rules/`.
erclx/canon · ★ 2 · Code & Development · score 68
Install: claude install-skill erclx/canon
# Create rule Author a project-local governance rule. The rule lives in the target project, not the toolkit, so `canon gov sync` never overwrites it: the sync engine orphans anything under `.claude/rules/project/` by location, before it ever checks the rule's name against the toolkit catalog. A rule written anywhere else under `.claude/rules/` survives the sync too, and the report offers it the path under the project subfolder it would take. ## Guards - If no `.claude/` directory exists, stop: `❌ No .claude/ directory found. Run canon init first.` - If the request names no behavior to enforce, stop: `❌ Describe what the rule should enforce and which files it applies to.` ## Step 1: gather intent Resolve both from the request, and ask only for what is missing. Attach a proposed default derived from the request. - What the rule enforces: one topic, phrased as a standard (`<topic> conventions`). - Scope: a path glob relative to the project root (`<dir>/**/*.<ext>`) for a path-scoped rule, or always-on when the rule states a global principle with no file scope. ## Step 2: resolve the subdir Pick the subdir from the topic. It sits under `.claude/rules/project/` and names the rule's domain: - `core/`: global persona, testing, error handling, planning. Always-on, no `paths:`. - `lang/`: one programming language. - `framework/`: one framework. - `lib/`: one library or tool. - `ui/`: UI copy, accessibility, forms. - `claude/`: `.claude/` authoring surfaces. ## Step 3: pick a