From grounding-rules
Distill a system or subsystem into a short, human-readable set of GROUNDING RULES — the minimal load-bearing invariants and design decisions that let a reader gain CONFIDENCE in the system in minutes and adjudicate future design choices, instead of reading a full spec for hours. Use this whenever the user wants the "essence" / "constitution" of a module, the load-bearing rules / single-source-of-truth / key invariants of a system, a first-principles explanation of how a subsystem really works (not API-reference docs), or types /grounding-rules. Three actions: a fresh grounding pass; `update <new facts or corrections>` (re-ground an existing doc when the system changes); and `ask <question>` (answer from the real code in the grounding voice). Favors compression and the good-faith reader: only rules that matter, that can't be inferred from the others, and whose plain reading makes the right choice the obvious one. Writes to a vault path → invokes obsidian-markdown. NOT for exhaustive API reference, tutorials, change logs, or edge-case fencing.
How this skill is triggered — by the user, by Claude, or both
Slash command
/grounding-rules:grounding-rulesThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
A grounding-rules document is to a system what a **minimal set of axioms** is to a
A grounding-rules document is to a system what a minimal set of axioms is to a theory: the smallest set of statements such that, if you know them, you know the system — almost everything else true about it can be derived with ordinary reasoning.
It has two jobs, and every rule serves both:
This is not documentation and not a spec. Docs describe every surface and rot as the API changes. A spec fences every case for a machine. Grounding rules describe only the load-bearing skeleton, for a human, and barely move — because they capture decisions, not surfaces.
This is the heart of the skill. A rule is written for a human acting in good faith, to give them confidence quickly — not to make every wrong path impossible.
A rule is only as trustworthy as the source you verified it against. Memory, plausible inference, a stale note, and a short spec are all hypotheses.
getSessionDetail() → ?format=signed is how it gets corrected.update).Apply the code-simplifier mindset to the rule set itself: single source of truth, no rule restates another, nothing present that could be inferred.
Test 1 — Load-bearing. If this rule were violated, would the system break or the mental model be wrong? If violating it changes nothing anyone cares about, it's trivia. Cut it.
Test 2 — Non-inferable. Could a reader derive this from the rules already written plus ordinary reasoning? If yes, it's a consequence, not an axiom. Cut it, or fold the surprising part into the rule it follows from.
What survives is small — typically 8–15 rules. Thirty means you're documenting. The discipline of cutting is the whole value: a reader holds ten load-bearing rules in their head; they cannot hold thirty facts.
Corollary — say each rule once. A rule in two places (a diagram caption and a section) breaks its own single source of truth. The diagram names the entities; the rules govern them. Same fact in two spots → a merge, not two rules.
You don't invent rules; you find them. Sweep the system through each lens:
Write to the path the user gives (often a Markdown note). Use this shape:
# <System> — Grounding Rules
> One sentence: what this system *is*, in plain language. The mental model in a breath.
## tl;dr
<The foundation rules as plain bullets — the handful a reader must hold to derive
everything else. Max two levels of nesting; no *why*, no anchors, no prose. If the
rest of the doc vanished, these bullets alone would still teach the system's shape.
The ultimate compression test: if you can't get the system down to ~5–10 foundation
bullets, you haven't found which rules are foundational. This REPLACES a separate
"foundations" group — everything below is just these bullets expanded.>
## The model
<The one diagram — entities and how they nest/relate, drawn first; every rule below
annotates it. NAME the nouns here (and the ownership boundary when two parts are
isolated); do not restate the rules. A reader should point at any noun used anywhere
in the doc and find it on this map.>
## Core operations
<The system's core verbs — "log", "instantiate", "recommend". Often better as a
tl;dr bullet; pull into their own section only when not obvious from the model.>
## <Group A — e.g. The nouns & their single source of truth>
**R1. <One-line declarative claim.>**
*Why:* <one or two lines — the reasoning that makes it load-bearing, and that lets
the rule drive a decision its author never foresaw.>
<optional anchor: where it lives, e.g. `models.py:Job.runner_id`>
**R2. ...**
## <Group B — Lifecycle / the ladder / boundaries / ...>
...
## Using these rules
<2–3 real design questions, each answered in one line by citing a rule. The proof
the rules are operative, not decorative.>
Writing into an Obsidian vault? When the target path is inside an Obsidian
vault, invoke the obsidian-markdown skill (Skill tool) and follow it: vault
frontmatter tags, callouts for the high-signal bits (a > [!info] callout for
the one-line mental model, > [!tldr] for the tl;dr, > [!example] for "Using
these rules"), and [[wikilinks]] only for notes that actually exist (plain text
otherwise). The rules stay terse; Obsidian syntax only carries the high-signal
framing. (obsidian-markdown is a soft dependency — if it isn't installed, write
plain Markdown.)
file:symbol pointer per rule helps a reader verify and
find the code, but the body stays prose — never paste code blocks or signatures.
Anchors locate; they don't define.update action)/grounding-rules update <new facts or corrections> re-grounds an existing doc
instead of writing a fresh one. The trap: update is not append. A new fact can
make an old rule wrong, redundant, or duplicated, so re-grounding means
reconsidering the whole doc.
ask action)/grounding-rules ask <question> answers a question about the system from the
real code, in the grounding voice — brief, correct, load-bearing, with a small
example when it helps. The read-only counterpart to writing the doc.
file:symbol. The value of ask
is that the answer is true now. If you can't verify a part, say so.update. If it confirms one, cite it ("this is C3"). If it's a new load-bearing
fact the doc is missing, flag it as a candidate rule.A good ask often surfaces the next update.
R5.
Job.runner_idis the sole link between a job and the worker running it. Set → claimed (and by which worker);NULL→ unclaimed. Never both. Why: one nullable FK on a unified jobs table means exactly one place to ask "is this job claimed, and by whom?" — so the scheduler resolves the worker from the row it owns, and no client can claim someone else's job. (Pattern: discriminator column on a unified table.)
Notice: one-line claim; a why that explains the design (not restates the claim); a named pattern; immediately usable — "can a job have two runners?" is answered by R5 alone (no — that's a re-queue into a new job). And a developer's first instinct after reading it ("resolve the worker from the job row") is the right one.
Guides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.
Dispatches multiple subagents concurrently for independent tasks without shared state. Use when facing 2+ unrelated failures or subsystems that can be investigated in parallel.
npx claudepluginhub initialneil/grounding-rules --plugin grounding-rules