The laws this repo is built under, rendered from the files themselves. The routing law decides whether something is a page and which class it is; cross-cutting laws apply inside every page; a page-class law owns one page shape and pins the kit that enforces it.
Read first. A page's class is derived from the reader's task, never chosen from a menu — and the first question is whether it needs a page at all.
They apply INSIDE every page class. A page never picks one of these — it obeys all seven at once.
The theme and settings machinery: one CSS source, two reflectors that must stay mirrored, and every grey parameterised so the Base color setting can reach it.
6 sections·src/app/globals.css
Why the card gallery reads as one product rather than a mood board — surface anatomy, the two-font rhythm, earned color, and one signature element per card.
9 sections·src/app/(app)/cards/
One thesis with a ladder under it: an icon at rest is never pure black. Plus the three well recipes and where the law is enforced.
8 sections·no kit yet
Every state surface — alert, toast, status mark, loading, empty, error — speaking one language of five tones.
9 sections·src/components/feedback/
The question picks the chart: seven questions a reader brings to a number, each with an inline mark and a card mark, and a three-engine ruling — CSS parts in rows, Recharts where there are axes, hand-drawn SVG only for a card's signature figure until it recurs.
10 sections·ui/share-bar · ui/sparkline · feedback/meter · feedback/ring · ui/chart
How server data moves: one fetch seam, generated query keys, mutations that toast and invalidate, and reads that suspend inside a boundary.
4 sections·src/lib/api.ts
Identity behind a stable seam — a session shape where signed-out is a state rather than a 401, one guard, and gates that are UX and never security.
6 sections·src/middleware.ts
Where a shortcut binds, and why the document's capture phase is the only place that survives an overlay.
4 sections·src/hooks/use-hotkeys.ts
What turns a good card into a family of them: a shell that is the method, a contract that names what varies, members that are data modules plus one figure — and the growth law that legislates on the second instance.
10 sections·src/components/families/
The layout library: a shader is a material, not a work — so the shelf holds fixed layouts with one slot left open, the ground. Browse by type, choose a fixed preset, then pair it with a material.
9 sections·src/components/compositions/
One page belongs to exactly one class. Classify first, then compose that class's kit — never hand-build its chrome.
Table, list and card-list pages: one shell whose defaults ARE the rules, a canonical order for everything around the rows, and a view that survives a refresh.
9 sections·src/components/data-view/
Widget boards: a grid engine, tiles whose figures reconcile with the data under them, and a layout the reader can rearrange, hide and reset.
5 sections·src/components/gridstack/
One record unfolded — as a page, and as the peek that opens beside the list it came from.
7 sections·src/components/detail/
Workflow boards: columns are states, a drag is a transition, and the data-view shell supplies everything around the board.
6 sections·src/components/kanban/
A record being created or edited as the page's whole purpose — sections, field anatomy, and a footer that gates the save.
5 sections·src/components/form-page/
A control panel of small independent decisions, and the ruling on which of them apply immediately versus wait behind a Save.
6 sections·src/components/settings-page/
A full-screen tool — the one page class with no kit yet, because a shell extracted from a single instance is premature. It records what a second instance must follow.
5 sections·no kit yet
Nothing here was designed up front. Every document below started as a rework someone had already paid for, which is why the order is always the same: the failure first, then the rule, then the component that makes the rule unnecessary to remember.
01
Walk the routing law's five steps — does it need a page, what is the reader's one verb, which information model, which expression, where does the rest live — and land on a row of AGENTS.md's page-type table. A hit means read that law and compose its kit. No hit means the class has no law yet, and building comes second.
02
Write docs/<class>.md in the house shape: the thesis, the anatomy, the canonical order, and the anti-patterns that provoked it. A rule with no failure behind it is a preference.
03
Move everything a component can enforce into defaults, so deviating takes a visible opt-out. A written convention decays one copy-paste at a time; a component whose defaults are the rules cannot.
04
Add the AGENTS.md row, the roster entry behind this page, and a living example — in the same commit as the law. An unregistered law is one nobody will find.