Parent: #576 · Relates to: #732 (introduced renderSkillFile)
Problem
A rulebook delivered as a skill materializes into a directory named after its bare slug, and the invocable command is derived from that directory name — so the command is /<slug>. A bare slug reads as a noun (a request to display the content) rather than the act of bringing the guidance to bear, and nothing distinguishes guidance skills from capability skills sharing the same directory.
Context
The invocation lever is the directory name, not the frontmatter name field: Claude Code treats name only as a display label, and the codeassembly harness's prompts.yml generator reads the directory name and never the frontmatter name. renderSkillFile currently stamps both the directory and name with the slug, and sync keys retraction off the directory name (== slug). The sync ownership marker <!-- codeassembly-rulebook:<slug> --> carries the slug and identifies a directory as sync-owned. shell-conventions is currently the only skill-delivery rulebook, and no prose documentation references rulebook invocation or frontmatter fields.
Proposed solution
Resolve each skill-delivery rulebook's skill name as consult-<slug> by default (shell-conventions → /consult-shell-conventions), or a per-rulebook skill-name frontmatter override used verbatim when present. consult- reads evenly across rulebook noun-types (conventions, preferences, rules, guidance, anti-patterns) and signals the stance — load the guidance to inform future work, not transform existing code (which apply- would imply).
The resolved skill name becomes both the on-disk skill directory (the lever that sets the / command in both harnesses) and the frontmatter name (display label, kept consistent). The slug is unchanged as the declaration identifier (rulebooks.yaml) and neutral-file name (.agents/rulebooks/<slug>.md).
The ownership marker stays slug-based, decoupling stable identity from the renamable directory. Retraction is reworked to recover each owned directory's slug from its marker, so it keeps working when the directory differs from the slug — and retracts a stale directory when a rulebook's resolved skill name changes, leaving no duplicate behind.
A skill-name override is validated as kebab-case (same shape as a slug), since it becomes a directory and a command. If two skill-delivery rulebooks resolve to the same skill name, sync fails with a readable error rather than letting one clobber the other.
Acceptance criteria
Must have
Parent: #576 · Relates to: #732 (introduced
renderSkillFile)Problem
A rulebook delivered as a skill materializes into a directory named after its bare slug, and the invocable command is derived from that directory name — so the command is
/<slug>. A bare slug reads as a noun (a request to display the content) rather than the act of bringing the guidance to bear, and nothing distinguishes guidance skills from capability skills sharing the same directory.Context
The invocation lever is the directory name, not the frontmatter
namefield: Claude Code treatsnameonly as a display label, and the codeassembly harness'sprompts.ymlgenerator reads the directory name and never the frontmattername.renderSkillFilecurrently stamps both the directory andnamewith the slug, andsynckeys retraction off the directory name (== slug). The sync ownership marker<!-- codeassembly-rulebook:<slug> -->carries the slug and identifies a directory as sync-owned.shell-conventionsis currently the only skill-delivery rulebook, and no prose documentation references rulebook invocation or frontmatter fields.Proposed solution
Resolve each skill-delivery rulebook's skill name as
consult-<slug>by default (shell-conventions→/consult-shell-conventions), or a per-rulebookskill-namefrontmatter override used verbatim when present.consult-reads evenly across rulebook noun-types (conventions, preferences, rules, guidance, anti-patterns) and signals the stance — load the guidance to inform future work, not transform existing code (whichapply-would imply).The resolved skill name becomes both the on-disk skill directory (the lever that sets the
/command in both harnesses) and the frontmattername(display label, kept consistent). The slug is unchanged as the declaration identifier (rulebooks.yaml) and neutral-file name (.agents/rulebooks/<slug>.md).The ownership marker stays slug-based, decoupling stable identity from the renamable directory. Retraction is reworked to recover each owned directory's slug from its marker, so it keeps working when the directory differs from the slug — and retracts a stale directory when a rulebook's resolved skill name changes, leaving no duplicate behind.
A
skill-nameoverride is validated as kebab-case (same shape as a slug), since it becomes a directory and a command. If two skill-delivery rulebooks resolve to the same skill name, sync fails with a readable error rather than letting one clobber the other.Acceptance criteria
Must have
consult-<slug>with frontmattername: consult-<slug>; the slug is unchanged as the declaration identifier and neutral-file name.skill-namefrontmatter override, when present, is used verbatim as both the directory and the frontmattername; it is validated as kebab-case, and an invalid value fails the sync with a readable error.