--- name: design-doctrine description: The house rules for ANY design or UI work - the verification protocol (run the gate, never claim a number), the absolute no-emoji rule, token by intent, one shared theme, the eight states, one thing leads, and output completeness. Load this FIRST whenever building, reviewing, or theming a screen, component, or token set. Installed as a plugin, this skill carries what CLAUDE.md carries in the repo. --- # Skill: Design Doctrine > **Step 0 — is the kit here?** This skill reads files from the kit. Check once: > `ls ${CLAUDE_SKILL_DIR}/../../../tokens >/dev/null 2>&1 && echo KIT_OK || echo KIT_MISSING` > On `KIT_MISSING` only the skill folders were installed, which is what > `npx skills add` does. Say so plainly, point the user at > `npx ux-ui-agent-skills init` or the plugin install, and stop. Do not guess the > contents of a file you could not open. A plugin's root `CLAUDE.md` is not loaded as project context, so the always-on brief travels here instead. Read this before the first line of any design work, then load the rule file for the territory you are actually in. ## Verification protocol - run gates, never claim 1. **Never state a number you did not measure.** Any contrast ratio, "WCAG pass", or "100%" must come from running a gate and reporting its real output. If you have not run it, say "not verified yet." 2. **Verify every state, not just resting.** `node ${CLAUDE_SKILL_DIR}/../../../scripts/verify_states.mjs [--dark]` measures default, hover and focus - a button that passes at rest can fail on hover. 3. **One command before reporting done:** `node ${CLAUDE_SKILL_DIR}/../../../scripts/accuracy_report.mjs`. Report the real `N/N` line. It is all-or-nothing. 4. **Build with the gates, not after them.** Fix and re-run until green; never announce success between failures. 5. **Render and LOOK.** Gates pass while a UI is still visibly broken. Screenshot the harness in both themes, click every control, and confirm the state changed. 6. **Responsive is gated too:** `node ${CLAUDE_SKILL_DIR}/../../../scripts/verify_responsive.mjs ` - no horizontal overflow at 280/320/414px. 7. **Honest scope.** The gates prove objective correctness. They never prove taste. For that, run `/critique`, look at the work yourself, and start from the taste preflight below rather than from default components. 8. **SKIPPED is not a pass.** With no browser installed a render gate prints `SKIPPED` and exits 0, reporting nothing. Run single render gates behind `DS_REQUIRE_BROWSER=1` so that becomes `REQUIRED, FAILING`, and fix it with `npx playwright install chrome` rather than by removing the flag. ## Mobile is the base Base styles ARE the phone layout. Wider screens are layered on with `min-width`. `max-width` is not banned - it is right for a genuine narrow refinement, or for a range between two breakpoints - but a desktop-first stylesheet, where the base assumes a wide screen and mobile is patched in afterwards, is a bug. Measured by `${CLAUDE_SKILL_DIR}/../../../scripts/verify_mobile_first.mjs`, which removes every `@media` and `@container` rule and renders what is left at 320px. A mobile-first page passes because its base already is the phone layout. A desktop-first page cannot fit. ## Two house rules on what never ships **Never ship a native `