Files
zeekayandHanzo Dev 1776747704 design: one skill teaches the system, one lint proves the code reached it
An agent had no way to LEARN this design system. prompts/ was material for a
human to paste, so every generated surface re-derived the rules from scratch —
and got them wrong the same ways each time: 117 all-caps labels, 586
inline-styled buttons, 25 z-index literals, a menu painting with tokens nothing
declares.

So: skills/design-system/SKILL.md, one file, one author. It states the
derivation chain (@hanzo/brand + @hanzo/logo -> @hanzo/design -> component) and
the rule that follows from it — a component reads the token layer and never
reaches past it; a missing token is a NEW TOKEN, not a local constant.

Guidance nothing enforces is advice. scripts/lint.mjs is the gate the skill must
run before returning, and it reads CONSUMER code, not just this repo:
unresolved var(), raw colour, magic z-index, px font-size, non-eyebrow caps,
literal-valued inline style, a second icon set, and the wrong package name.
None of those fail loudly on their own. That is exactly why they ship.

Run against this repo it found nine violations in the design system's OWN
components — Dialog and Sheet hardcoded zIndex:80 and rgb(0 0 0 / .8) while
publishing --z-modal to everyone else. Fixed at source, and the two scrims that
disagreed are now one --surface-scrim token. npm test runs both gates.

Also: every doc told agents to import @hanzoai/design. That package does not
exist; the import resolves to nothing and an unresolved token layer paints
nothing. It is @hanzo/design, in all ten places.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-27 18:24:03 -07:00

1.6 KiB

prompts — make an AI build it Hanzo

Entry point is skills/design-system/SKILL.md, not this folder. The skill is what chat, hanzo.app and Claude Code load; it points here for the long form and finishes by running hanzo-design-lint. Everything below is the reference the skill cites.

Guidance an agent reads before generating a Hanzo surface. Two layers, no overlap:

Layer Lives Answers
System (this folder) prompts/ "How does anything Hanzo look and behave?"
Component (co-located) components/**/*.prompt.md "How do I use this Button / Dialog / Card?"

Read the system layer first, then pull the per-component prompt for each part you place.

File Use
system.md Paste as the system prompt. The whole brand, compressed to one screen.
rules.md The do / don't checklist. Grep it before you ship.
pages.md Ready prompts for full sections — hero, feature grid, pricing, CTA.

Everything here assumes one import gives you the tokens:

@import "@hanzo/design/styles.css";

So every rule below can be obeyed with a CSS variable, never a hardcoded hex.

The two prompts (one and one way)

  • system.md — the design LANGUAGE prompt: paste as a system prompt to make any model generate Hanzo-looking output (monochrome, true-black, token-only).
  • studio-designer.md — the AGENTIC prompt Hanzo Studio's Design System designer hands the Hanzo agent stack to GENERATE/EDIT this repo's file tree with its file tools, grounded in guidelines/DESIGN.md. Uses system.md's language rules.