/rulebook:rulebook-mapfrom rulebook
Maps business domains of a codebase into a rulebook/index.md when none exists. Use when asked to list, split, or cartographier business domains as the first step of a rulebook.
Ships in rulebook. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Produce the map that every later level hangs on: a few business domains, each with a code, a one-line description and the places in the code where its rules live. Nothing else. The map is written and built first, then the user corrects it.
CLI. rulebook … below means the rulebook CLI: rulebook, or npx --yes rulebook-cli@latest. Without Node, use the manual column of references/cli.md.
rulebook/index.md already exists → extend it only if the user asks; otherwise use rulebook-extract.rulebook-extract, rulebook-edge-cases.references/data.md
says (use the recorded sources, respect a refusal, otherwise ask one question and record the
answer). Look for OKF bundles already in the project and read them as context
(references/okf.md).references/hotspots.md. With a
data source, list its tables: reference tables (rates, settings, statuses, categories) often
carry rules and tell which domain they belong to.references/card-template.md:
rulebook/index.md — one line per domain, - **ORD** · Orders — One sentence., then
indented details: what it covers, its key concepts, where its code lives (as
backticked paths or globs, which rulebook scan uses), and
what to check (traps, hardcoded values, dead code you noticed). The map must be worth
reading on its own: it is the first thing people see.rulebook/config.json — { "formatVersion": 1, "language": "<lang>", "repoUrl": <https URL or null>, "hotspots": [<globs>] }.
Hotspots are never empty: list the folders and files where the domains' rules live.rulebook scan: it counts each domain's decision points. If
many fall "outside any domain", a Code detail misses folders — fix it. Then
rulebook build → rulebook/rulebook.html, which shows those counts. The HTML is the
deliverable people open and share.rulebook-extract on a domain.rulebook/: index.md, config.json, and the built rulebook.html (with
its .published.json).rulebook init and do not create AGENTS.md, hooks or other files. If the
companion is not installed, mention rulebook init as an option in your report.| Mistake | Instead |
|---|---|
A free-form domains.md | rulebook/index.md in the domain-map format, with codes |
| One domain per technical folder or per sub-feature | Business capabilities; merge sub-features |
| Asking before writing | Write and build first, then offer corrections |
hotspots: [] | Globs for every domain's rule-bearing code |
| A bare list of domain names | Details under each domain; the map is read on its own |
| Stopping at the Markdown | rulebook build: the HTML is the deliverable |
| Writing or touching up the HTML yourself | Only rulebook build writes it (references/cli.md) |
references/audit.md (opens in a new tab)references/card-template.md (opens in a new tab)references/cli.md (opens in a new tab)references/data.md (opens in a new tab)references/hotspots.md (opens in a new tab)references/ids.md (opens in a new tab)references/okf.md (opens in a new tab)references/policy-vs-rule.md (opens in a new tab)references/vocabulary.md (opens in a new tab)references/writing-style.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub gregorybabonaux/rulebook --plugin rulebook5 skills in this plugin
/rulebook-edge-casesUse when asked for the edge cases, boundary conditions, corner cases or "cas limites" of a documented business rule or domain in rulebook/, or when a rule card has no Edge cases section and someone asks what happens at its limits./rulebook-extractUse when rulebook/index.md exists and the business rules of one or more domains must be written down — "extract the rules", "document the business rules of ORD", "règles de gestion", "règles métier" — or when a domain listed in the map has no rulebook/<CODE>-*.md file yet./rulebook-publishUse when asked to publish, share, export, regenerate or send the rulebook / business-rules reference ("publier le référentiel") — as an HTML page, a PDF, or to Notion, Google Drive, Confluence or another documentation tool./rulebook-syncUse when rulebook/inbox.md has pending detections ("traiter l'inbox", "mettre à jour les règles"), when a hook or `rulebook check` reports that a rule "may have changed", "may have been removed" or "possible new rule", or when asked to sync, realign or update the rulebook after code changes.Other plugins' skills for the same job