design-system
CLAUDE.md4 starsChanged 51 days agoMITView on GitHub
The brand-agnostic half of an agent-native design system, published to npm as @fracazo/design-system (public, MIT). "Agent-native" is Vercel's phrase (their product-design and design.md posts); it lives in the description and README, the package name stays plain. It ships the roles a product can name (tokens, the Tailwind v4 theme mapping, radius ramp, fluid type, band rhythm, the eight aliasing semantics), a machine-readable brand contract, two bins that hold a product's brand file to that contract and compose its public brand.css,…
In this repository9 other files it gives its agents.
- template/CLAUDE.mdCLAUDE.md
- accessibilitySkill
- colorsSkill
- interfaceSkill
- layoutSkill
- product-designSkill
- typographySkill
- uiSkill
- writingSkill
The file
We split this CLAUDE.md into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 72
Never use em dashes, anywhere.
- Very specific: line 73
No brand literal in css/roles.css, ever.
- Very specific: line 84
Do not add dependencies without discussing first.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md - @fracazo/design-system
What this is
The brand-agnostic half of an agent-native design system, published to
npm as @fracazo/design-system (public, MIT). "Agent-native" is Vercel's
phrase (their product-design and design.md posts); it lives in the
description and README, the package name stays plain. It ships the roles
a product can name (tokens, the Tailwind v4 theme mapping, radius ramp, fluid type,
band rhythm, the eight aliasing semantics), a machine-readable brand
contract, two bins that hold a product's brand file to that contract and
compose its public brand.css, ESLint guardrails, and a showcase page.
Each product keeps its own brand file in its own repo; nothing brand-
specific lives here.
Consumers today: BirthGuide (~/Developer/birthguide, warm cream / espresso
/ rose) and birthplans.app (~/Developer/birthplans, same palette, brand
hue rotated to periwinkle). Both depend on the npm package and keep only a
brand file of their own. The system was extracted
from BirthGuide in September 2026; both products stay byte-identical in
rendering through every step, proven with BirthGuide's snapshot harness.
Layout
src/:cn.ts,index.ts(the.export) andui/*.tsx, the 19 components (17 shadcn-based, plus the house OfferCard and ArticleCard) with their intent JSDoc, exported as./ui/*. Compiled bytsctodist/src/; the class strings and"use client"directives survive compilation, which is what lets a consumer@sourcethe dist. Stories stay in BirthGuide.skills/: seven domain skills (accessibility, layout, writing, typography, colors, ui, and the interface orchestrator) plusproduct-design/, the Jacaranda layer.SKILL.mdroutes by mode and sends a review to interface.references/rules.mdis the lint registry (stable IDs, source, enforcement status, bad and good);exemplars/are decisions from shipped commits;coverage-gaps.mdholds lint candidates and missing decisions. A rule is added only when the same correction has recurred and Alex accepts it; lintable rules move toguardrails/eslint.ts.css/roles.css: the system. The brand contract is the comment block at the top (brand-contract:theme,:core,:landing,:showcase); the bins parse it. It importscss/motion.css, the animation vocabulary the components use (values matchingtw-animate-css1.4.0 for the subset in use); add a utility there only when a component or a product needs it.template/: whatds-initwrites for a new product (Next 16, Tailwind v4, the package, the blank brand file, the guardrails). Ships in the tarball.gitignoreis undotted because npm renames a packed.gitignore;ds-initrestores the dot. Never install or build inside it in this repo; scaffold into a scratch directory instead.guardrails/*.ts: compiled bytsctodist/, which is what publishes.check-brand.ts,build-brand-css.ts,intake.tsandinit.tsare bins (ds-check-brand,ds-build-brand-css,ds-intake,ds-init);eslint.tsis a flat-config plugin, one rule per ID inrules.md, exported throughdesignSystemGuardrails(). It has no dependency on eslint: the rule shapes are typed locally. Test a rule change by linting a fixture inside a consumer with a temporary config that imports this repo'sdist/guardrails/eslint.js.demo/index.html: showcase template that links a served/brand.css.studio/: recording kit for the X series (Jacaranda). Vite app that renders the real components on an illustrative Jacaranda skin (bloom purple, Grafton lilac). Not in the published tarball.pnpm buildthenpnpm studio. The npm name stays@fracazo/design-system. Jacaranda is the name you say.DESIGN.md: the written authority, in Vercel's design.md shape (front matter, reader, priority order, surface scopes, four passes, the visual system, components, guardrails, reject list, one chapter per brand). A prose rule is added only when the same correction has recurred; prefer a token, lint rule or contract entry that enforces itself.
Rules
- Australian English everywhere, including comments and commit messages.
- Never use em dashes, anywhere. Commas, colons, full stops instead.
- No brand literal in
css/roles.css, ever. If a value is needed, it is a role the brand file must supply; add it to the contract. - The eight aliasing semantics (foreground, card, popover, primary, accent, ring and their foregrounds) live here once. The six divergent ones (secondary, muted, border, input, muted-foreground, accent-foreground) are brand values by design; never alias them.
- A new or renamed role is a minor version and a changelog note; a contract change a brand file must satisfy anew is a major version.
- Feature branch, then fast-forward merge to
main; no PRs. Conventional Commits, present tense. (The initial scaffold went straight to main; that was the exception.) - Do not add dependencies without discussing first. The package has no
runtime dependencies: everything the components sit on is a peer, and
each peer is mirrored as a devDependency only so
tsccan resolve types. Dev tooling beyond that istypescript,@types/nodeand@types/react; there is deliberately no Storybook here (BirthGuide's local Storybook consumes the components instead).
Verify a change
pnpm check(tsc, no emit) andpnpm build. After a component change, confirm the compiled file still opens with its"use client"directive (13 of the 19 carry one) and thatpnpm packlistsdist/src/ui/*.js.node dist/guardrails/check-brand.js <a brand file>: a brand file must satisfy core, plus every extension it declares. The starter satisfies core alone. The studio record skin declareslandingandshowcase.node dist/guardrails/build-brand-css.js --brand <file> --out /tmp/x.css --name X --url https://x --checkagainst a product's committedpublic/brand.css: declarations must match.node dist/guardrails/check-brand.js template/src/system/brands/starter.cssmust pass, and before a release:pnpm pack,ds-initinto a scratch directory with the dependency pointed at the tarball, thenpnpm install,pnpm lint,pnpm typecheck,pnpm buildthere.- Anything that can change a consumer's rendering is verified in the
consumer with its snapshot harness (
pnpm design:snapshot/design:comparein BirthGuide), never here by eye. Claude here is DRI for this package only: work needed in a consumer becomes a prompt for that repo's agent, handed to Alex, never an edit from here.
Publishing
Alex publishes; it needs his npm login and a 2FA code at publish time:
pnpm publish --access public from the main checkout after the fast-forward
(it builds first), then tag vX.Y.Z on the published commit and push the
tag. Always confirm with npm view @fracazo/design-system versions
--prefer-online before touching a consumer. On npm: 0.1.0, 0.2.0, 0.2.1
(5 Sep 2026) 0.6.0 and 0.7.0 (8 Sep 2026), tagged. 0.3.0, 0.4.0 and 0.5.0 never
reached the registry: an expired npm session makes a scoped publish fail
with a misleading 404 Not Found - PUT, and no 2FA prompt appears. Run
npm whoami first; a 401 means npm login again. Enabling 2FA on the
account had to be done on npmjs.com; the CLI route
(npm profile enable-2fa) is refused by the registry now.
Roadmap (state as of 5 Sep 2026, evening)
- 4a DONE: this repo, first commit
d714eaa, pushed to github.com/fracazo/design-system. - 4b DONE (branch
claude/claude-md-phase-4b-5a17c7, version 0.2.0): BirthGuide's 17src/components/ui/*components andcnlive insrc/, exported as.and./ui/*, with the peerDependencies listed inpackage.json.place-autocompletestayed in BirthGuide (it imports app code), as did the stories. The only source edits were the import paths and theSortableListbanner comment, which named the product. BirthGuide still has its own copies until 4c deletes them. Not yet merged tomainor published. - 4c DONE: BirthGuide main (
d3f1dcc) depends on@fracazo/design-system^0.2.0from npm.globals.cssimports the package's roles.css, then the brand, then@sources the packagedist; the local components,src/system/roles.cssand the brand scripts are gone; imports point at@fracazo/design-system/ui/*(stories included);cnis re-exported from@/lib/utils; ESLint pullsdesignSystemGuardrails; the snapshot harness reads roles from the package. Snapshot identical (349 keys). Lesson: after merging a version that adds devDependencies, runpnpm installin the main checkout beforepnpm publish, or the pre-publishtscfails on missing types. - 4d DONE, awaiting merge: birthplans.app on branch
feature/consume-design-system(two commits,aa49ed0renames the colour-literal tokens to the roles with 329 keys pairwise identical under the rename map,3a98e2cswaps to the package and its ownsrc/system/brands/birthplans.csswith exactly six token additions, the reasoned chip-3 pair and dark-brand, and nothing changed). The package's fluid-type ESLint rule stays off there until a type-role pass converges fourteen clamp literals. BirthGuide branchfeature/retire-birthplans-brand-copy(0754afa) removes its validated copy. Both branches fast-forward cleanly; Alex merges. - 5 DONE:
DESIGN.mdauthored (version 1.0.0 in its front matter, package 0.2.1), assembled from BirthGuide's PRINCIPLES.md, the Storybook principles/tokens/usage prose, the component intent JSDoc and the corrections that recurred in git history. Consumer CLAUDE.md files still carry their full design sections; slimming them to hard in-context rules plus a pointer here is optional follow-up. - 6 DONE, then folded in (8 Sep 2026, 0.6.0): the starter was a separate
repo, github.com/fracazo/design-system-starter, pinned to
^0.2.0with nothing tying it to the package version. It now lives intemplate/andds-initwrites it, pinned to the version that ran. Same content: Next 16, Tailwind v4,src/system/brands/starter.csswith achromatic placeholders for the core contract, the house base layer, the pre-paint dark script plusThemeSync,designSystemGuardrails()with no exemptions,pnpm lint= eslint plusds-check-brand, thepnpm-workspace.yamlthat approves native builds and excludes the package from pnpm 11's minimum-release-age gate. The old repo was deleted on 8 Sep 2026; nothing referenced it. - 7 (5 Sep 2026, evening): reframed after Vercel's "Teaching agents
product design" post. The system is how agents building Alex's products
make his design decisions for the right reasons: the package is the
mechanical half,
skills/product-designthe judgment half. 7a DONE: the skill (0.3.0, unpublished; 0.2.1 is on npm). 7b DONE (0.4.0): eight plugin rules with per-rule severities; against the products, dark pairs are clean, radius literals are 8 and 2 (phone bezel and two tiny corners), and stock palette, focus:, em dashes and on-dark text ship as warnings until a cleanup pass. Consumers bump, rename their inline disables todesign-system/<id>, and birthplans dropsnoArbitraryColourfordesignSystemGuardrails({ severity: { 'no-arbitrary-clamp': 'warn' } }). 7c DONE (0.5.0):ds-intakecollects, the agent proposes inside the packet, a human reviews and accepts (references/intake.md); first packet atskills/product-design/intake/2026-09-07.md, candidates pending. Publish note: 0.3.0 and 0.4.0 never reached npm (registry checked 7 Sep); 0.5.0 carries all three. 7d: evals once exemplars reach ten. Still open: the birthplans type-role pass, and which BirthGuide-shaped roles become optional modules (a 7b-adjacent decision, not a rewrite).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

