Skip to content
Skills Library
Management & product · Analysis

rulebook-map

/rulebook-map

Use when a codebase's business rules are to be documented and no rulebook/index.md exists yet, or when asked to map, list or split the business domains of an application ("what are the domains", "cartographie des domaines", first step of a rulebook).

Repository
rulebook ↗
Licence
MIT
Last repository change
24.10.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
11
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 24.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use when a codebase's business rules are to be documented and no rulebook/index.md exists yet, or when asked to map, list or split the business domains of an application ("what are the domains", "cartographie des domaines", first step of a rulebook).

Triggers from the description

what are the domainscartographie des domaines
Original author description

Use when a codebase's business rules are to be documented and no rulebook/index.md exists yet, or when asked to map, list or split the business domains of an application ("what are the domains", "cartographie des domaines", first step of a rulebook).

How it works

  1. Overview
  2. When not to use
  3. Steps
  4. Boundaries
  5. Common mistakes
Original SKILL.md headings · 67 lines, 696 words
SKILL.md preview
---
name: rulebook-map
description: Use when a codebase's business rules are to be documented and no rulebook/index.md exists yet, or when asked to map, list or split the business domains of an application ("what are the domains", "cartographie des domaines", first step of a rulebook).
---

# rulebook-map — level 1: the domain map

## Overview
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`.

## When not to use
- `rulebook/index.md` already exists → extend it only if the user asks; otherwise use `rulebook-extract`.
- The user wants rules or edge cases → `rulebook-extract`, `rulebook-edge-cases`.

## Steps
1. **Scope.** Use the scope and language the user gave; otherwise the whole repository and
   the language of the user's request. Do not stop to ask.
2. **Data and existing knowledge.** Settle the data question once, as `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`).
3. **Survey** (read, don't change): entry points (routes, commands, jobs), models and schema,
   module and folder names, configuration, tests, README. Use `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.
4. **Propose domains** as a business person would name them — a capability the business
   talks about (Orders, Pricing, Accounts), never a technical layer (Controllers, Utils).
   Keep authentication and authorization of the same users in one domain; keep a lifecycle
   and the refunds of the same orders in one domain unless the business clearly separates them.
   Aim for the smallest set that covers the code: often 3–5 for a small app, rarely above 12.
   For each: a 3-letter code, a title, one sentence, its folders, suggested hotspots.
5. **Write — without asking**, exactly in the formats of `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.
6. **Measure, then build.** Run `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.
7. **Report and offer corrections.** Give the path of the HTML first, then the domains as a
   table (code, title, sentence, decision points, hotspots), and ask the user to rename, merge, split or drop
   domains and to confirm the hotspots. Apply the corrections, rebuild, and suggest the next
   step: `rulebook-extract` on a domain.

## Boundaries
- Write only under `rulebook/`: `index.md`, `config.json`, and the built `rulebook.html` (with
  its `.published.json`).
- Do not run `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.
- Do not write rule cards. Rules and traps you noticed while surveying (a comment that
  contradicts the code, dead code, hardcoded thresholds) go in the domain's **check** detail.

## Common mistakes
| 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`) |
Files in this package (11)
  • SKILL.md 5 KB
  • references/audit.md 3 KB
  • references/card-template.md 5 KB
  • references/cli.md 4 KB
  • references/data.md 3 KB
  • references/hotspots.md 2 KB
  • references/ids.md 1 KB
  • references/okf.md 1 KB
  • references/policy-vs-rule.md 2 KB
  • references/vocabulary.md 2 KB
  • references/writing-style.md 2 KB

Versions

The database has no other skills named rulebook-map.

Database snapshot: 13.11.2026 · package version d476c9f55f32 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 3 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90rulebook-extract
    Use 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.
  • 90rulebook-edge-cases
    Use 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.
  • 90spec
    Author a rulebook task spec interactively — research, draft, ask the user clarifying questions, confirm, then create the tasks in rulebook ready for /rulebook-driver. Use when the user wants to plan/spec a feature before implementing.
  • 86bizopsmap-map
    Map how a business or a project works with the bizopsmap command, and render the map as one page. Use when asked to map a business, its operations, its hand-offs or its checks, or to bring an existing map up to date.
  • 100product-map
    Produces a functional cartography of the Packmind application (domains × features × usage signals) as `product-map.md` at the project root. Manual-only skill — invoke ONLY when the user explicitly runs `/product-map` or asks to "map the application", "cartographier…
  • 91ansible-eda-rulebook
    Create Event-Driven Ansible rulebooks and integrate with event sources for automated infrastructure response. Use this skill when the user asks to: "create eda rulebook", "event-driven ansible", "ansible rulebook", "eda event source", "webhook automation", "event automation",…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.