{"data":{"slug":"discovered-cd670d3acb90ecea286520c709908290a7ccea63476dafa5","title":"Koi Design Laws","summary":"Apply measurable design laws to ensure correctness in UX, interaction, grid alignment, color theory, typography, and brand perception. Run reference\/checklist.md before calling a screen done.","url":"https:\/\/skillshunter.net\/skills\/discovered-cd670d3acb90ecea286520c709908290a7ccea63476dafa5","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/discovered-cd670d3acb90ecea286520c709908290a7ccea63476dafa5","markdown_url":"https:\/\/skillshunter.net\/skills\/discovered-cd670d3acb90ecea286520c709908290a7ccea63476dafa5.md","download_url":"https:\/\/skillshunter.net\/skills\/discovered-cd670d3acb90ecea286520c709908290a7ccea63476dafa5\/download","category":{"slug":"product-design","name":"Product & Design"},"editor_note":"Before using this skill, ensure that all positions, sizes, gaps, and paddings are multiples of 4px (except for 1px strokes and text line boxes). Collect bounds and computed styles using FigCraft `absoluteBounds` or DOM `getBoundingClientRect()` at 1440, 1280, and 375 widths. Run the measurement procedure in `reference\/grid-alignment.md` and compute contrast using the formula in `reference\/color-theory.md`.","instructions":"---\nname: koi-design-laws\ndescription: Shared design-law base for every koi skill \u2014 UX laws, Gestalt, interaction rules, grid and alignment measurement, color theory, typography and brand perception, plus one measurable checklist. Read before designing, redesigning or critiquing any screen (code or FigCraft), and run reference\/checklist.md before calling a screen done.\n---\n\n# koi-design-laws\n\nShared rulebook for all koi design skills (`koi-page`, `koi-new-page`, `koi-critique`, `koi-distill`, `koi-bolder`, `koi-figcraft-screen`, `koi-craft`, `koi-taste`). Those skills decide *what* to build; this skill decides *whether it is correct*.\n\nEvery rule here has a stable id (`L3`, `G1`, `R7`...), a measurable check, and a common violation. Cite ids in every critique and every self-review. A rule without a measured value in the report does not count as checked.\n\nLaws are product-agnostic. Examples use a generic operational e-commerce tool (dense tables, product cards, prices in BRL, SKUs, multiple sales channels) only to make checks concrete. When a product design system exists, its tokens override the generic numbers here as long as they still pass the measurable floor (contrast, target size, grid).\n\n## When to read\n\n| Situation | Read |\n|---|---|\n| Critique \/ review \/ audit of an existing screen | `reference\/checklist.md` first, then the files named by failing lines |\n| New screen from scratch | `laws-of-ux.md` -> `gestalt.md` -> `grid-alignment.md` -> `color-theory.md` -> `typography.md` -> `interaction.md` -> `brand-perception.md`, then `checklist.md` |\n| Redesign of a screen | `checklist.md` on the current screen (baseline), then the new-screen order, then `checklist.md` again (delta) |\n| Small tweak (spacing, one component) | `grid-alignment.md` measurement procedure + affected checklist group |\n| Before saying \"done\" | `checklist.md` in full. Always. |\n| FigCraft frame | `grid-alignment.md` measurement procedure using `absoluteBounds` |\n| Code (Next.js \/ shadcn) | Same procedure using `getBoundingClientRect()` at 1440, 1280 and 375 widths |\n\n## Reference files\n\n| File | Ids | Covers |\n|---|---|---|\n| `reference\/laws-of-ux.md` | L1-L19 | Fitts, Hick, Jakob, Miller, Tesler, Doherty, Von Restorff, serial position, peak-end, goal-gradient, Zeigarnik, aesthetic-usability, Occam, Pareto, Postel, Parkinson, selective attention, cognitive load |\n| `reference\/gestalt.md` | G1-G11 | Proximity, similarity, common region, continuity, closure, figure-ground, common fate, uniform connectedness, Pragnanz, spacing ratio rule |\n| `reference\/interaction.md` | I1-I30 | Nielsen heuristics, Norman principles, component states, target sizes, focus, undo, destructive actions, disclosure, latency, forms, keyboard, motion |\n| `reference\/grid-alignment.md` | R1-R20 | 4\/8pt grid, columns, content width, keylines, baseline, rhythm, spacing hierarchy, optical alignment, numeric alignment, measurement procedure |\n| `reference\/color-theory.md` | C1-C18 | Models, OKLCH scales, 60-30-10, neutrals first, semantic color, contrast WCAG + APCA, dark mode, data-viz palettes, brand limits |\n| `reference\/typography.md` | T1-T16 | Scale, hierarchy, measure, line-height, tracking, tabular figures, families\/weights, truncation, number formatting |\n| `reference\/brand-perception.md` | B1-B12 | First impression, consistency, distinctiveness vs convention, trust signals, voice, brand carriers, restraint, premium |\n| `reference\/checklist.md` | all | Single pass\/fail checklist + report template |\n\n## Hard floor (non-negotiable)\n\nA screen with any hard-floor failure is not done, regardless of how good it looks.\n\n1. **R1** Every position, size, gap and padding is a multiple of 4px (exceptions: 1px strokes, text line boxes, optical nudges logged as such).\n2. **R9** Siblings in a row\/column share an edge or a center within 0px; equal-role gaps are identical.\n3. **G10** Space inside a group is smaller than space between groups by at least 1.5x (target 2x).\n4. **C7\/C8** Body text contrast >= 4.5:1 (APCA |Lc| >= 75 for dense body); large text and UI boundaries\/icons >= 3:1.\n5. **C6** Color is never the only signal: every status also has text, icon or shape.\n6. **C5** Semantic colors mean one thing only: green = money\/success\/opportunity, amber = warning\/stale, red = destructive\/error. No decorative use.\n7. **T7** Numbers that are compared (tables, KPIs, prices) use tabular figures and are right-aligned (or decimal-aligned) in columns.\n8. **T12** Money always uses the locale format in full (BRL: `R$ 1.234,56`, non-breaking space after `R$`); no mixed formats on one screen.\n9. **I4** Every interactive component defines default, hover, focus-visible, active, disabled; every data surface defines loading, empty, error (and stale when data can age).\n10. **I8** Targets >= 24x24px with spacing (WCAG 2.2 AA); touch targets >= 44x44px on mobile.\n11. **I14** Destructive actions are never the primary-styled default, are visually separated from safe actions, and offer undo or an explicit confirmation naming the object.\n12. **I27** All motion respects `prefers-reduced-motion`; no animation > 400ms on routine UI; nothing moves layout under the cursor.\n13. **L1\/L17** One primary action per view region; the primary task's elements win the first glance (squint test).\n\n## How to measure\n\n1. Collect bounds of every relevant layer: FigCraft `absoluteBounds {x, y, width, height}` or DOM `el.getBoundingClientRect()` (round to 0.5px; anything fractional beyond that is a fail by itself).\n2. Collect computed styles: font-size, line-height, weight, letter-spacing, color, background, border, radius.\n3. Run the procedure in `reference\/grid-alignment.md` section \"Measurement procedure\".\n4. Compute contrast for each text\/background pair using the formula in `reference\/color-theory.md`.\n5. Walk interaction states by forcing them (`:hover`, `:focus-visible`, disabled prop, empty dataset, thrown error, slow network 3G).\n6. Fill the report template in `reference\/checklist.md`.\n\nNever eyeball a value you can measure. Never report \"looks off\" without a number.\n\n## How to report violations\n\nOne line per violation, sorted by severity (hard floor first), then by screen position (top-left to bottom-right):\n\n```\n[SEV] RULE-ID | element (layer name or selector) | measured | expected | fix\n```\n\n- `SEV`: `BLOCK` (hard floor), `MAJOR` (hurts task or trust), `MINOR` (polish).\n- `element`: FigCraft layer path (`Page\/Table\/Header\/Cell-Price`) or CSS selector \/ component name (`KoiDataTable > th:nth-child(4)`).\n- `measured`: the actual number(s) - `gap 14px`, `contrast 3.2:1`, `x=37`.\n- `expected`: the rule target - `gap 16px (token space-4)`, `>= 4.5:1`, `x=40 (keyline)`.\n- `fix`: one concrete change - `set gap-4`, `text-muted-foreground -> text-foreground\/80`, `move 3px right`.\n\nExamples:\n\n```\n[BLOCK] R1  | ProductCard\/Price         | y=203, h=21        | multiples of 4         | snap y=204, line-height 20\n[BLOCK] C7  | th \"Margem\" on bg-muted   | 3.9:1              | >= 4.5:1               | text #5b6170 -> #464c59\n[MAJOR] G10 | Filters \/ chip rows       | in=12px, out=12px  | out >= 18px (1.5x)     | row gap 12 -> 24\n[MINOR] R14 | Toolbar search icon       | geometric center   | optical center +1px x  | nudge icon 1px right, log as optical\n```\n\nEnd the report with: total by severity, hard-floor pass\/fail, and the top 3 fixes by impact. A screen passes when there are zero `BLOCK` and the remaining `MAJOR` count is justified in writing.\n\n## Conflicts between rules\n\n- Accessibility (C6, C7, I8, I27) beats brand (B*) and aesthetics.\n- Product design-system tokens beat generic numbers here, unless they break the hard floor.\n- Convention (L3 Jakob) beats novelty for core controls (tables, forms, nav); distinctiveness belongs in brand carriers (B7), not in how a checkbox works.\n- Density (operational tools) beats whitespace generosity, but never at the cost of G10 grouping or I8 targets.\n","use_cases":["Critique or review an existing screen using `reference\/checklist.md`","Design a new screen by following the order: `laws-of-ux.md` -> `gestalt.md` -> `grid-alignment.md` -> `color-theory.md` -> `typography.md` -> `interaction.md` -> `brand-perception.md`","Redesign a screen by running `checklist.md` on the current screen (baseline), then the new-screen order, and `checklist.md` again (delta)","Measure spacing or component adjustments using the `grid-alignment.md` measurement procedure","Validate a FigCraft frame using `absoluteBounds` for grid alignment","Validate code (Next.js \/ shadcn) using `getBoundingClientRect()` at 1440, 1280, and 375 widths"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/MirandaSls\/koi-design\/blob\/d86c88cb439045af1785329fcabfbd645fa3b646\/skills\/design-system\/koi-design-laws\/SKILL.md","source_commit":"d86c88cb439045af1785329fcabfbd645fa3b646","license":null,"version":null,"listing_approved_at":"2026-11-29","created_at":"2026-11-28T18:44:08.000000Z","updated_at":"2026-11-29T10:53:15.000000Z","seo_title":"Koi Design Laws - Measurable UX and Design Rules","seo_description":"Apply measurable design laws to ensure correctness in UX, interaction, grid alignment, color theory, typography, and brand perception. Run reference\/checklist.md before a","seo_keywords":["design laws","ux rules","grid alignment","color theory","typography","interaction design","measurable design","checklist for design validation"]}}