@tw93/waza 3.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +206 -0
  3. package/package.json +35 -0
  4. package/rules/anti-patterns.md +38 -0
  5. package/rules/chinese.md +18 -0
  6. package/rules/durable-context.md +27 -0
  7. package/rules/english.md +14 -0
  8. package/scripts/build_metadata.py +360 -0
  9. package/scripts/check_routing_drift.py +82 -0
  10. package/scripts/dispatcher-template.md +43 -0
  11. package/scripts/dispatcher.md +53 -0
  12. package/scripts/package-skill.sh +71 -0
  13. package/scripts/packaging_filter.py +55 -0
  14. package/scripts/setup-rule.sh +109 -0
  15. package/scripts/setup-statusline.sh +127 -0
  16. package/scripts/skill_checks.py +483 -0
  17. package/scripts/skill_frontmatter.py +110 -0
  18. package/scripts/statusline.sh +321 -0
  19. package/scripts/validate_package.py +66 -0
  20. package/scripts/verify_skills.py +100 -0
  21. package/skills/RESOLVER.md +91 -0
  22. package/skills/check/SKILL.md +338 -0
  23. package/skills/check/agents/reviewer-architecture.md +39 -0
  24. package/skills/check/agents/reviewer-security.md +39 -0
  25. package/skills/check/references/persona-catalog.md +56 -0
  26. package/skills/check/references/project-context.md +107 -0
  27. package/skills/check/references/public-reply.md +14 -0
  28. package/skills/check/scripts/audit_signals.py +485 -0
  29. package/skills/check/scripts/run-tests.sh +19 -0
  30. package/skills/design/SKILL.md +134 -0
  31. package/skills/design/references/design-aesthetic-quality.md +67 -0
  32. package/skills/design/references/design-data-viz.md +34 -0
  33. package/skills/design/references/design-reference.md +278 -0
  34. package/skills/design/references/design-tokens.md +53 -0
  35. package/skills/design/references/design-traps.md +43 -0
  36. package/skills/health/SKILL.md +231 -0
  37. package/skills/health/agents/inspector-context.md +119 -0
  38. package/skills/health/agents/inspector-control.md +84 -0
  39. package/skills/health/agents/inspector-maintainability.md +55 -0
  40. package/skills/health/scripts/check-agent-context.sh +5 -0
  41. package/skills/health/scripts/check-doc-refs.sh +8 -0
  42. package/skills/health/scripts/check-maintainability.sh +8 -0
  43. package/skills/health/scripts/check-verifier-output.sh +5 -0
  44. package/skills/health/scripts/check_agent_context.py +407 -0
  45. package/skills/health/scripts/check_doc_refs.py +110 -0
  46. package/skills/health/scripts/check_maintainability.py +629 -0
  47. package/skills/health/scripts/check_verifier_output.py +116 -0
  48. package/skills/health/scripts/collect-data.sh +760 -0
  49. package/skills/hunt/SKILL.md +197 -0
  50. package/skills/hunt/references/failure-patterns.md +75 -0
  51. package/skills/hunt/references/ime-unicode.md +58 -0
  52. package/skills/hunt/references/logging-techniques.md +72 -0
  53. package/skills/hunt/references/rendering-debug.md +34 -0
  54. package/skills/learn/SKILL.md +128 -0
  55. package/skills/read/SKILL.md +108 -0
  56. package/skills/read/references/read-methods.md +110 -0
  57. package/skills/read/references/save-paths.md +33 -0
  58. package/skills/read/scripts/fetch.sh +105 -0
  59. package/skills/read/scripts/fetch_feishu.py +246 -0
  60. package/skills/read/scripts/fetch_local.py +218 -0
  61. package/skills/read/scripts/fetch_weixin.py +107 -0
  62. package/skills/think/SKILL.md +155 -0
  63. package/skills/write/SKILL.md +129 -0
  64. package/skills/write/references/write-en.md +197 -0
  65. package/skills/write/references/write-zh-bilingual.md +60 -0
  66. package/skills/write/references/write-zh-prose.md +48 -0
  67. package/skills/write/references/write-zh-release-notes.md +38 -0
  68. package/skills/write/references/write-zh.md +645 -0
@@ -0,0 +1,67 @@
1
+ # Design Aesthetic Quality and Production Structure
2
+
3
+ ## App Shell Rules
4
+
5
+ When building a sidebar + main workspace layout (Slack, Linear, Notion class):
6
+ - Decorative backgrounds default to off
7
+ - Surface hierarchy uses background-color steps and shadow only
8
+ - All interactive elements get `active:scale-95`
9
+ - Button radius is consistent within each component type (pick one: pill, square, or one fixed value, do not mix)
10
+ - Commit to a named radius scale before the first component
11
+
12
+ ## Options Guide
13
+
14
+ When asked for design options, give at least 3 variations spread across genuinely different dimensions:
15
+
16
+ - **Dimensions to vary**: visual density, typographic personality, color temperature, layout structure, motion character, amount of decoration, level of abstraction
17
+ - **Mix approaches**: one option follows existing conventions closely, one remixes the brand DNA, one is deliberately unexpected
18
+ - **Progress from basic to bold**: the first option is safe and understandable; later options push further
19
+ - Three options that differ only by accent color are not three variations. Vary layout, typeface, motion, surface treatment.
20
+
21
+ ## DESIGN.md Scaffold (Optional, Production UIs)
22
+
23
+ For a multi-page or production UI, emit a short `DESIGN.md`-style summary before writing the first component. The nine sections:
24
+
25
+ 1. **Visual Theme and Atmosphere**: mood, density, design philosophy in 2-3 sentences
26
+ 2. **Color Palette and Roles**: semantic name + value + functional role for each color token
27
+ 3. **Typography Rules**: font family, size scale, weight scale, line-height, letter-spacing
28
+ 4. **Component Stylings**: buttons (all states), cards (if used), inputs, navigation
29
+ 5. **Layout Principles**: spacing scale, grid columns, whitespace philosophy
30
+ 6. **Depth and Elevation**: shadow system or background-color-step system; describe each level
31
+ 7. **Do's and Don'ts**: 5 to 10 guardrails specific to this project
32
+ 8. **Responsive Behavior**: breakpoints, how navigation collapses, touch target minimums
33
+ 9. **Agent Prompt Guide**: color reference (name: value pairs) + 3-5 example component prompts with all values inlined
34
+
35
+ For a single component or quick prototype, skip this. The three-line thesis is sufficient.
36
+
37
+ ## Pre-Handoff Checklist: Strategic Omissions
38
+
39
+ Items most frequently missing from AI-generated UIs:
40
+
41
+ - [ ] **Custom 404 page**: a branded page with a clear path back
42
+ - [ ] **Back navigation**: every page reachable by user action must have a path back
43
+ - [ ] **Form client-side validation**: inline errors adjacent to each field
44
+ - [ ] **Skip-to-content link**: visually hidden `<a href="#main-content">Skip to main content</a>` as first focusable element
45
+ - [ ] **Cookie consent**: for EU or California jurisdictions
46
+ - [ ] **Footer Privacy and Terms links**
47
+
48
+ These are not polish items. They are the difference between a demo and a shippable product.
49
+
50
+ ## Reference Material Priority
51
+
52
+ When source code and a screenshot are both available: read the code. Source files contain exact token values; screenshots require guessing.
53
+
54
+ When only a URL is provided: fetching returns extracted text only, with no layout information. For visual references, ask for a screenshot rather than inferring from stripped HTML.
55
+
56
+ ## Adding to Existing UI
57
+
58
+ When extending an existing interface, first understand its visual vocabulary. Match all of the following before writing the first line of new code:
59
+ - Copywriting tone and reading level
60
+ - Color palette and semantic color roles
61
+ - Hover and click states: scale, color shift, underline, background fill
62
+ - Animation style: duration, easing, whether interactions bounce or are ease-out
63
+ - Shadow and card treatment
64
+ - Layout density and whitespace rhythm
65
+ - Border radius choices
66
+
67
+ If swapping in different content would make the new component look out of place, the vocabulary was not matched closely enough.
@@ -0,0 +1,34 @@
1
+ # Design Reference: Data Visualization
2
+
3
+ Load this only when the surface is a dashboard, analytics view, chart-heavy interface, or any number-dense data display. Marketing pages, landing pages, and generic component work do not need it.
4
+
5
+ ## Dashboard defaults
6
+
7
+ Dashboards are utility surfaces: orient the user, show status, enable action. No hero sections, no marketing copy. Every element must earn its place by answering a question the user has.
8
+
9
+ - Primary layout: status summary at top, detail below; or sidebar filters + main chart area.
10
+ - Whitespace: tighter than marketing pages; users scan, not read. Use generous column spacing, not generous row height.
11
+ - Number density: many numbers on screen at once is not a problem. Crowding without alignment is. Use `font-variant-numeric: tabular-nums` for all numeric columns. Right-align numbers. Left-align labels.
12
+
13
+ ## Chart selection
14
+
15
+ | Use case | Chart type |
16
+ |---|---|
17
+ | Comparing values across categories | Bar chart (horizontal if labels are long) |
18
+ | Trend over time | Line chart; avoid bars for time series with many points |
19
+ | Part-whole relationships | Treemap (6+ segments) or stacked bar; pie only for 2-4 segments |
20
+ | Distribution | Histogram or box plot; never pie chart |
21
+ | Correlation | Scatter plot; do not use line chart |
22
+
23
+ Pie charts with more than 4 segments communicate nothing. Use a treemap or ranked list instead.
24
+
25
+ ## Number-dense interfaces
26
+
27
+ - `font-variant-numeric: tabular-nums` on every number column so digits align vertically.
28
+ - Right-align all numbers; left-align all text labels. Mixed alignment in the same column is always wrong.
29
+ - Subtle row separators: `1px` line at `rgba(0,0,0,0.06)` (light) or `rgba(255,255,255,0.05)` (dark). Alternating row backgrounds only if the table is very wide (12+ columns).
30
+ - Column spacing: at least `16px` between adjacent columns; more between logically distinct groups.
31
+
32
+ ## Using a product as a benchmark
33
+
34
+ When the user references a product for visual benchmark ("make it feel like Grafana" / "similar to Linear analytics"): extract 3-5 concrete data-visualization-specific properties from that product, not general aesthetic properties. Useful properties: chart color palette (exact values), grid line weight and opacity, axis label size and color, tooltip border-radius and shadow, empty-state treatment. Do not extract "minimal" or "clean" as properties; those are not actionable.
@@ -0,0 +1,278 @@
1
+ # Design Reference
2
+
3
+ ## Tech Stack Conflicts
4
+
5
+ These combinations produce silent failures or incoherent output. Never combine them:
6
+
7
+ | Never combine | Why |
8
+ |---|---|
9
+ | Tailwind + CSS Modules on the same element | Specificity conflicts, unpredictable cascade |
10
+ | Framer Motion + CSS transitions on the same element | Double-animating the same property causes jank |
11
+ | styled-components or emotion + Tailwind | Two competing class systems fighting for the same DOM node |
12
+ | Heroicons + Lucide + Font Awesome in one project | Visual inconsistency, size mismatches, bundle bloat |
13
+ | Multiple Google Font families as display fonts | Competing personalities cancel each other out |
14
+ | Glassmorphism backdrop-filter + solid `border: 1px solid` | Solid borders shatter the layered depth illusion |
15
+ | Dark background + `#ffffff` text at full opacity | Too harsh; use `rgba(255,255,255,0.85)` or `#f0f0f0` |
16
+ | Tailwind v4 `@theme` + dynamically constructed class names | `@theme` tokens generate utility classes JIT; if class names are built from variables or not present in scanned source, the class is purged and styles silently disappear. Fix: use static class names in source files, add to `safelist`, or define custom colors in `:root` + `extend.colors` in `tailwind.config.js` instead of `@theme` |
17
+
18
+ Before writing the first component, name the single CSS strategy for the project: Tailwind only, CSS Modules only, or CSS-in-JS only. Do not drift from it.
19
+
20
+ ## Common Traps
21
+
22
+ Before submitting, check whether any of the following slipped in without intention:
23
+
24
+ - A purple or blue gradient over white as the hero background
25
+ - A three-part hero: large headline, one-line subtext, two CTA buttons side by side
26
+ - A grid of cards with identical rounded corners, identical drop shadows, identical padding
27
+ - A top navigation bar with logo left, links center, primary action far right
28
+ - Sections that alternate between white and `#f9f9f9`
29
+ - A centered icon or illustration sitting above a heading above a paragraph
30
+ - A four-column footer with equal-weight columns
31
+
32
+ Any of these can appear if they serve the design intentionally. They cannot appear by default.
33
+
34
+ Final test: if you swapped in completely different content and the layout still made sense without changes, you built a template, not a design. Redo it.
35
+
36
+ ## Content Authenticity
37
+
38
+ Placeholder copy that looks real but is not real breaks the illusion the moment a user reads it. Apply these rules before handoff.
39
+
40
+ **Sample data:**
41
+ - No generic names: not John Doe, Jane Smith, Alex Johnson, or any first-name-last-name combination that reads as filler. Use culturally varied names with real specificity (e.g., Priya Mehta, Lars Eriksson, Nia Okafor).
42
+ - No generic company names: not Acme Corp, Nexus, SmartFlow, TechCorp, Initech. Pick names with a domain (e.g., Meridian Logistics, Hokkaido Ceramics, Vantage Bioworks).
43
+ - No Lorem Ipsum. Write short real copy that matches the layout's reading level.
44
+ - No round numbers in data samples. `99.99%` uptime, `50%` conversion, `$100.00` MRR look synthetic. Use organic values instead: `99.94%`, `47.2%`, `$99.00`.
45
+ - Multiple avatar instances must not share the same image. Multiple blog post or event cards must not share the same date.
46
+
47
+ **UI copy:**
48
+ - Sentence case on all headings. Title Case On Every Heading is the most common AI tell in body copy.
49
+ - Remove exclamation marks from success states ("Saved!" → "Saved", "Done!" → "Done"). Reserve `!` for genuine urgency.
50
+ - Never open an error message with "Oops!". It reads as condescending.
51
+ - No passive voice in error messages ("Something went wrong" → "We couldn't load your data. Try refreshing.").
52
+ - Banned AI marketing words in hero copy, CTAs, and feature descriptions: Elevate, Seamless, Unleash, Delve, Tapestry, Game-changer, Next-Gen, "In the world of...". These words communicate nothing about the product. Name the specific value instead.
53
+
54
+ ## Placeholders Over Imitations
55
+
56
+ When an icon, image, or component is unavailable: use a placeholder. In hi-fi design a labeled placeholder is always better than a low-quality attempt at the real thing. Examples: a grey rectangle for a hero image, a monogram wordmark for a missing logo, a dashed border for a component not yet designed.
57
+
58
+ Never draw illustrative imagery using inline SVG. SVG is for icons and geometric shapes. For photography, illustrations, or product shots, use a placeholder and ask the user to supply real assets.
59
+
60
+ ## Production Quality Baseline
61
+
62
+ Check before handoff. These are not aesthetic choices, they are non-negotiable.
63
+
64
+ > Treat the sections below as craft details, not defaults. Only apply them when they serve the locked visual direction. If removing a detail changes nothing about how the interface feels, leave it out.
65
+
66
+ ### Accessibility
67
+ - Icon-only buttons need `aria-label`
68
+ - Actions use `<button>`, navigation uses `<a>` (not `<div onClick>`)
69
+ - Images need `alt` (or `alt=""` if decorative)
70
+ - Visible focus states: `focus-visible:ring-*` or equivalent; never `outline: none` without replacement
71
+
72
+ ### Animation
73
+ - Honor `prefers-reduced-motion`: disable or reduce animations when set
74
+ - Animate `transform`/`opacity` only (compositor-friendly, no layout thrash)
75
+ - Never `transition: all`; list properties explicitly
76
+ - Interruptible animations: prefer CSS transitions for interactive state changes (hover, toggle, open/close) because they retarget mid-animation; reserve keyframe animations for staged sequences that run once (e.g., staggered page enters)
77
+ - Staggered enter: split content into semantic chunks with ~100ms delay; titles into words at ~80ms; typical enter uses `opacity: 0 → 1`, `translateY(12px) → 0`, and `blur(4px) → 0`
78
+ - Subtle exit: use a small fixed `translateY(-12px)` instead of full height; keep duration ~150ms `ease-in`, shorter and softer than enter
79
+ - Contextual icon swaps: animate with `scale: 0.25 → 1`, `opacity: 0 → 1`, and `blur: 4px → 0px`. With a spring library: `{ type: "spring", duration: 0.3, bounce: 0 }`. Without: keep both icons in DOM (one absolute) and cross-fade with CSS using `cubic-bezier(0.2, 0, 0, 1)`
80
+ - Scale on press: buttons use `scale(0.96)` on active/press via CSS transitions so the press can be interrupted; add a `static` prop to disable when motion would be distracting
81
+ - Page-load guard: use `initial={false}` on animated presence wrappers for toggles, tabs, and icon swaps to prevent enter animations on first render; do not use it for intentional page-load entrance sequences
82
+
83
+ ### Performance
84
+ - Transition specificity: never `transition: all`; list exact properties (e.g., `transition-property: scale, opacity`). Tailwind's `transition-transform` covers `transform, translate, scale, rotate`; use `transition-[scale,opacity,filter]` for mixed properties
85
+ - GPU compositing: only use `will-change` for `transform`, `opacity`, or `filter`. Never `will-change: all`. Add only when you notice first-frame stutter; do not apply preemptively to every element
86
+ - Images: explicit `width` and `height` (prevents layout shift)
87
+ - Below-fold images: `loading="lazy"`
88
+ - Critical fonts: `font-display: swap`
89
+
90
+ ### Touch and Mobile
91
+ - `touch-action: manipulation` (prevents double-tap zoom delay)
92
+ - Full-bleed layouts: `env(safe-area-inset-*)` for notch devices
93
+ - Modals and drawers: `overscroll-behavior: contain`
94
+ - Hover guard: wrap interactive hover states with `@media(hover:hover)` so they only apply on pointer devices, not touch screens. Tailwind: `[@media(hover:hover)]:hover:bg-...`. Without this, a tapped element on mobile gets a permanent hover state until the next tap elsewhere.
95
+
96
+ ### Typography Details
97
+ - Text wrapping: `text-wrap: balance` on headings and short text blocks (≤6 lines in Chromium, ≤10 in Firefox); `text-wrap: pretty` on body paragraphs and longer text; leave default on code blocks and pre-formatted text
98
+ - Font smoothing: apply `-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale` once on the root layout (macOS only)
99
+ - Tabular numbers: use `font-variant-numeric: tabular-nums` for counters, timers, prices, number columns, or any dynamically updating numbers
100
+ - Letter-spacing scales with font size: display type needs negative tracking to look engineered rather than stretched. Two tiers: roughly -0.022em for display sizes (32px and above), -0.012em for mid-range (20–28px), normal at 16px and below. Apply to any display-weight typeface, not just geometric sans. Positive letter-spacing on large headlines is always wrong.
101
+
102
+ ### Surfaces
103
+ - Concentric border radius: calculate `outerRadius = innerRadius + padding` so nested rounded corners feel intentional, not mechanical; if padding exceeds `24px`, treat layers as separate surfaces and choose each radius independently
104
+ - Optical alignment: nudge icons by eye, not just by math, so buttons feel centered; buttons with text and an icon use slightly less padding on the icon side (e.g., `pl-4 pr-3.5`); play triangles and asymmetric icons should shift `1px`-`2px` toward the heavier side, or fix the SVG directly
105
+ - Shadows over borders: use layered `box-shadow` for depth on cards, buttons, and elevated elements so the surface feels lifted, not fenced in; reserve actual `border` for dividers, table cells, and layout separation (applies primarily to light mode; on dark surfaces see the dark-mode surface hierarchy rule below)
106
+ - Image outlines: add a subtle inset outline so images hold their own depth without altering layout dimensions: `outline: 1px solid rgba(0,0,0,0.1); outline-offset: -1px` (light) or `outline: 1px solid rgba(255,255,255,0.1); outline-offset: -1px` (dark)
107
+ - Minimum hit area: keep every interactive target at least 40×40px so even small controls feel generous and precise; extend with a centered pseudo-element when the visible element is smaller, and never let hit areas of two interactive elements overlap
108
+ - Multi-card alignment: in a card group, bottom-align all CTA buttons so height variations between cards don't create a ragged action row. In pricing or comparison cards, align feature list items to a shared Y origin across all columns. In side-by-side panels (testimonials, plans, feature breakdowns), title, description, price, and action button must share baselines across the row. Section top and bottom padding need not be symmetric: optical balance often requires bottom padding 20-25% larger than top. Constrain body paragraph width to approximately 65 characters (ch) to maintain comfortable reading line length.
109
+ - Light-mode app surface hierarchy: adjacent nested surfaces must be visually distinguishable. Minimum: background-color step of at least 4% lightness between sidebar and main area, and between main area and cards; or a shadow of at least `0 1px 3px rgba(0,0,0,0.10)` on elevated cards. A white card on a near-white background with `box-shadow: 0 1px 2px rgba(0,0,0,0.05)` is invisible -- that is not depth, it is noise.
110
+ - Dark-mode surface hierarchy: the page canvas is a near-black solid (e.g. `#08090a`). Elevation is communicated by adding semi-transparent white overlays on top of that canvas: cards at `rgba(255,255,255,0.02)`, elevated surfaces at `0.04`, prominent panels at `0.05`. Borders follow the same logic: `rgba(255,255,255,0.05)` for subtle, `0.08` for standard. Traditional drop shadows (dark on dark) are nearly invisible; luminance stepping through background opacity is the primary depth cue on dark surfaces.
111
+ - Border radius system: define a named radius scale during direction lock instead of picking values ad-hoc. A minimal scale is 3–4 tiers (e.g. `{4px, 8px, 12px, pill}`); a richer system might run 6–8 tiers. The point is committing to a named set before the first component so that all surfaces speak the same spatial language -- not covering every possible radius value.
112
+
113
+ ### Adding to Existing UI
114
+
115
+ When extending an existing interface, first spend time understanding its visual vocabulary. Match all of the following before writing the first line of new code:
116
+ - Copywriting tone and reading level (technical? casual? punchy?)
117
+ - Color palette and semantic color roles (which tokens mean "danger", "success", "muted")
118
+ - Hover and click states: scale, color shift, underline, background fill
119
+ - Animation style: duration, easing, whether interactions bounce or are strictly ease-out
120
+ - Shadow and card treatment: which surfaces are elevated, which are flush
121
+ - Layout density and whitespace rhythm
122
+ - Border radius choices and whether buttons are pill, square, or a specific fixed value
123
+
124
+ If swapping in different content would make the new component look out of place, the vocabulary was not matched closely enough.
125
+
126
+ ## Data Visualization Surfaces
127
+
128
+ For dashboards, analytics views, chart-heavy interfaces, or number-dense displays, load `references/design-data-viz.md`. It owns dashboard defaults, chart selection, number alignment, and product-benchmark extraction.
129
+
130
+ ## Reflex Fonts to Reject
131
+
132
+ LLMs default to these because they dominate training data. Using them signals "no decision was made." Pick from foundries with a clear voice instead. The ban is on reflex use as a display face; informed product-UI use (e.g. Inter for a dense data table) is allowed when justified. This list is not exhaustive -- any font used reflexively without a stated reason qualifies.
133
+
134
+ Reject: Inter, DM Sans, DM Serif Display, DM Serif Text, Outfit, Plus Jakarta Sans, Instrument Sans, Instrument Serif, Space Grotesk, Space Mono, IBM Plex Sans, IBM Plex Serif, IBM Plex Mono, Syne, Fraunces, Newsreader, Lora, Crimson Pro, Crimson Text, Playfair Display, Cormorant, Cormorant Garamond.
135
+
136
+ ## Font Selection Procedure
137
+
138
+ 1. Write three words that describe the brand (e.g. "precise, minimal, fast").
139
+ 2. Name the three fonts you would reach for reflexively.
140
+ 3. Reject all three.
141
+ 4. Pick a typeface from a named foundry (Klim, Commercial Type, Colophon, Grilli Type, OH no Type, Village, etc.) or an open-source option with a clear personality that matches the brand words. Be able to explain why that specific typeface in one sentence.
142
+
143
+ ## Color System: OKLCH Rules
144
+
145
+ - Use OKLCH instead of HSL. OKLCH is perceptually uniform: equal numeric changes produce equal perceived changes across the spectrum.
146
+ - Reduce chroma as lightness approaches the extremes. At 85% lightness a chroma around 0.08 is enough; pushing to 0.15 looks garish. At 15% lightness, tighten chroma similarly.
147
+ - Tint neutrals toward the brand hue with a chroma of 0.005 to 0.01. Even this faint amount is perceptible and creates subconscious cohesion.
148
+ - 60-30-10 is about visual weight, not pixel count. 60% neutral/surface, 30% secondary text and borders, 10% accent.
149
+ - Never use gray text on a colored background. Use a shade of the background hue at reduced lightness instead.
150
+
151
+ ## Theme Matrix
152
+
153
+ Choose light or dark deliberately based on audience and context. Neither is a default.
154
+
155
+ | Context | Direction | Reason |
156
+ |---|---|---|
157
+ | Trading or analytics dashboard, night-shift use | Dark | High data density; reduced glare during long sessions |
158
+ | Children's reading or learning app | Light | Welcoming, low fatigue for eyes still developing contrast sensitivity |
159
+ | Enterprise SRE or observability tool | Dark | Operator context; dark surfaces read at a glance in low-light NOC rooms |
160
+ | Weekend planning, recipes, journaling | Light | Ambient daytime use; light feels casual and approachable |
161
+ | Music player or media browser | Dark | Content-forward; dark surfaces recede and let media pop |
162
+ | Hospital or clinical patient portal | Light | Trust and legibility are paramount; clinical associations favor light |
163
+ | Vintage or artisanal brand site | Cream/warm light | Dark would clash with the analog material references |
164
+
165
+ If the answer is not obvious from the context, default to light. If the user's context implies both modes, ship light first and layer dark-mode tokens on top.
166
+
167
+ ## Absolute Bans (CSS-Pattern Level)
168
+
169
+ These patterns appear in the majority of AI-generated interfaces. Each one has a specific rewrite. Not exhaustive -- any CSS pattern applied as a mindless default rather than an intentional choice belongs in the same category.
170
+
171
+ | Pattern | Why | Rewrite |
172
+ |---|---|---|
173
+ | `border-left` or `border-right` wider than 1px as a section accent | The single most overused "design touch" in admin and dashboard UIs; it looks like a mistake at anything beyond a hairline divider | Change element structure: use a colored dot, a short horizontal rule, a background swatch, or a typographic weight shift instead |
174
+ | `background-clip: text` gradient text | Decorative rather than meaningful; one of the top AI design tells; illegible when printed or in high-contrast mode | Use a solid brand color, a tinted neutral, or typographic weight for emphasis |
175
+ | `backdrop-filter: blur` glassmorphism as the default card surface | Expensive on low-power devices; overused; the layered-depth illusion breaks with a solid border | Use elevated surfaces via background color steps and `box-shadow` instead |
176
+ | Purple-to-blue gradients or cyan-on-dark accent systems | The canonical "AI design" color palette; communicates nothing about the brand | Pick a palette from the brand words via the OKLCH rules above |
177
+ | Generic rounded-rect card with `box-shadow` as the default container | Template thinking; applies the same container to every content type regardless of hierarchy | Default to cardless sections; only add card treatment when the content type requires it |
178
+ | Modals as a lazy escape for overflow UI | Interrupts flow and breaks browser back navigation; used when an inline expansion, drawer, or separate page would be better | Inline expand, detail panel, or dedicated route; modals only when the action truly requires focus-lock |
179
+ | `transition: all` or animating width/height/padding/margin | Forces the browser into layout recalculation on every frame | List exact properties (`transition-property: transform, opacity`); use `grid-template-rows: 0fr to 1fr` for height reveals |
180
+
181
+ ## Motion Specifics
182
+
183
+ Complements the motion timing in the main SKILL.md constraints.
184
+
185
+ - No bounce or elastic easing. Real objects decelerate smoothly. Use exponential ease-out (`ease-out-quart`, `ease-out-quint`, or `cubic-bezier(0.16,1,0.3,1)`) for natural, high-quality deceleration.
186
+ - Animate `transform` and `opacity` only. Every other property triggers layout or paint.
187
+ - For height reveals, use `grid-template-rows: 0fr` to `1fr` transitions instead of animating `height` directly. It avoids the `height: auto` animation trap.
188
+ - Icon swaps: use a 120ms cross-fade with `opacity` and a subtle `scale(0.9)` to `scale(1)`. No rotation unless rotation is semantically meaningful (e.g. a chevron indicating direction change).
189
+ - Do not use `transition: all` even as a quick prototype shortcut. It animates layout, color, and font-size simultaneously, causing visible jank.
190
+
191
+ ## Reference-site Brand Presets (awesome-design-md)
192
+
193
+ `VoltAgent/awesome-design-md` maintains 66+ curated DESIGN.md files extracted from real-world brand sites. Running `npx getdesign@latest add <brand>` drops the file into the project root, giving the agent concrete token values to decompose rather than reasoning from memory.
194
+
195
+ **Usage rule:** never auto-run the command. Offer it as an option during direction lock, run it only with explicit user approval, and treat the result as seed decomposition material, not a finished direction.
196
+
197
+ **Brands in the catalog** (recognize these when a user names a reference):
198
+
199
+ | Category | Brands |
200
+ |---|---|
201
+ | AI & LLM | Claude, Cohere, ElevenLabs, Mistral, Ollama, Replicate, RunwayML, Together AI, xAI |
202
+ | Dev Tools & IDEs | Cursor, Expo, Lovable, Raycast, Superhuman, Vercel, Warp |
203
+ | Backend / DB / DevOps | ClickHouse, Composio, HashiCorp, MongoDB, PostHog, Sanity, Sentry, Supabase |
204
+ | Productivity & SaaS | Cal.com, Intercom, Linear, Mintlify, Notion, Resend, Zapier |
205
+ | Design & Creative | Airtable, Clay, Figma, Framer, Miro, Webflow |
206
+ | Fintech & Crypto | Binance, Coinbase, Kraken, Revolut, Stripe, Wise |
207
+ | E-commerce & Retail | Airbnb, Meta, Nike, Shopify |
208
+ | Media & Consumer | Apple, IBM, NVIDIA, Pinterest, PlayStation, SpaceX, Spotify, Uber |
209
+ | Automotive | BMW, Bugatti, Ferrari, Lamborghini, Tesla |
210
+
211
+ **Conflict resolution:** this skill's rules always win. If the preset recommends a font on the Reflex Fonts blocklist (e.g. Inter as a display face), discard it and apply the Font Selection Procedure. If it proposes a pattern in the Absolute Bans table (e.g. purple-to-blue gradient), discard it. State the override in the handoff summary.
212
+
213
+ Source: [github.com/VoltAgent/awesome-design-md](https://github.com/VoltAgent/awesome-design-md)
214
+
215
+ ## Reference Material Priority
216
+
217
+ When source code and a screenshot are both available for a reference UI: read the code. Source files contain exact token values; screenshots require guessing. Reconstruct from what is written, not what is visible.
218
+
219
+ When only a URL is provided: fetching it returns extracted text only, with no layout information. For visual references ("make it look like X"), ask for a screenshot rather than inferring visual design from stripped HTML.
220
+
221
+ ## DESIGN.md Scaffold (Optional, Production UIs)
222
+
223
+ For a multi-page or production UI, emit a short `DESIGN.md`-style summary before writing the first component. This forces enumeration of decisions that would otherwise be left implicit and lets the user correct direction early. The nine sections:
224
+
225
+ 1. **Visual Theme and Atmosphere** - mood, density, design philosophy in 2-3 sentences
226
+ 2. **Color Palette and Roles** - semantic name + value + functional role for each color token
227
+ 3. **Typography Rules** - font family, size scale, weight scale, line-height, letter-spacing; a table if more than 4 levels
228
+ 4. **Component Stylings** - buttons (all states), cards (if used), inputs, navigation; describe each with states (default, hover, active, disabled)
229
+ 5. **Layout Principles** - spacing scale, grid columns, whitespace philosophy
230
+ 6. **Depth and Elevation** - shadow system or background-color-step system; describe each level
231
+ 7. **Do's and Don'ts** - 5 to 10 guardrails specific to this project, not generic rules
232
+ 8. **Responsive Behavior** - breakpoints, how navigation collapses, touch target minimums
233
+ 9. **Agent Prompt Guide** - a quick color reference (name: value pairs) + 3 to 5 example component prompts ready to paste into a follow-up request. Prompts must be specific enough to execute without further lookup: every value, every radius, every letter-spacing, every weight inlined. Example standard (values are illustrative, use the project's own tokens): "Create a hero on `{bg-canvas}`, headline at 48px weight 600, line-height 1.00, letter-spacing -0.022em, color `{text-primary}`, CTA at `{accent}` with `{btn-radius}` radius"; that level of specificity, not "hero with primary color and CTA button"
234
+
235
+ For a single component or quick prototype, skip this. The three-line thesis in SKILL.md is sufficient.
236
+
237
+ ## Pre-Handoff Checklist: Strategic Omissions
238
+
239
+ These are the items most frequently missing from AI-generated UIs because they require intentional product thinking, not visual judgment. Run through them before every handoff.
240
+
241
+ - [ ] **Custom 404 page**: a generic framework 404 is a broken experience. Build a branded page with a clear path back (home link, search, or most-used nav items).
242
+ - [ ] **Back navigation**: every page reachable by user action must have a clear, functional path back. Dead-end pages (detail views, confirmation screens, modal-only flows) are UX failures.
243
+ - [ ] **Form client-side validation**: email fields validate format before submit; required fields show inline errors; error messages appear adjacent to the field, not only at form top.
244
+ - [ ] **Skip-to-content link**: a visually hidden `<a href="#main-content">Skip to main content</a>` as the first focusable element in the document. Required for keyboard accessibility.
245
+ - [ ] **Cookie consent**: if the product operates in the EU or California, cookie consent UI is not optional. Scope the implementation to the jurisdiction.
246
+ - [ ] **Footer Privacy and Terms links**: every product page needs these. Their absence signals "demo", not "product".
247
+
248
+ These are not visual polish items. They are the difference between a demo and a shippable product.
249
+
250
+ ## AI Slop Test
251
+
252
+ Would a stranger glancing at the first viewport say "an AI made this" immediately? If yes, the committed direction was not committed enough. The usual culprits: reflex font, default purple accent, centered hero with generic card grid beneath. Fix the typography, the color system, or the layout until the answer flips.
253
+
254
+ ## Brand Preset Flow
255
+
256
+ For well-known brands (Linear, Stripe, Claude, Vercel, Apple, Tesla, Notion, Figma, Airbnb, Spotify, and ~56 others catalogued in `awesome-design-md`): ask the user whether to pull the curated preset via `npx getdesign@latest add <brand>`. If they approve, run it, read the generated `DESIGN.md` at project root, then do the 3-property decomposition against that file rather than from memory. The preset is a starting point, not a direction: the user still names the aesthetic precisely, and the reflex-font blocklist and absolute bans still win on any conflict.
257
+
258
+ ## App Shell Rules
259
+
260
+ When building a sidebar + main workspace layout (Slack, Linear, Notion class):
261
+ - Decorative backgrounds default to off
262
+ - Surface hierarchy uses background-color steps and shadow only
263
+ - All interactive elements get `active:scale-95`
264
+ - Button radius is consistent within each component type (pick one: pill, square, or one fixed value, do not mix)
265
+ - Commit to a named radius scale before the first component (see Border radius system above)
266
+
267
+ ## Options Guide
268
+
269
+ When asked for design options, give at least 3 variations spread across genuinely different dimensions:
270
+
271
+ - **Dimensions to vary**: visual density, typographic personality, color temperature, layout structure, motion character, amount of decoration, level of abstraction
272
+ - **Mix approaches**: one option that follows existing conventions closely, one that remixes the brand DNA in a new way, one that is deliberately unexpected
273
+ - **Progress from basic to bold**: the first option is safe and understandable; later options push further
274
+ - Three options that differ only by accent color are not three variations. Vary the layout, the typeface, the motion, the surface treatment.
275
+
276
+ ---
277
+
278
+ *Rules in Reflex Fonts, Font Selection, OKLCH, Theme Matrix, Absolute Bans, Motion Specifics, and AI Slop Test adapted from [pbakaus/impeccable](https://github.com/pbakaus/impeccable) (Apache 2.0). DESIGN.md Scaffold adapted from [getdesign.md](https://getdesign.md) (MIT); concept credited to Google Stitch. Brand preset catalog from [VoltAgent/awesome-design-md](https://github.com/VoltAgent/awesome-design-md) (MIT). Content Authenticity, Multi-Card Alignment, and Strategic Omissions inspired by [Leonxlnx/taste-skill](https://github.com/Leonxlnx/taste-skill).*
@@ -0,0 +1,53 @@
1
+ # Design Tokens: Color, Typography, and Motion
2
+
3
+ ## Color System: OKLCH Rules
4
+
5
+ - Use OKLCH instead of HSL. OKLCH is perceptually uniform: equal numeric changes produce equal perceived changes across the spectrum.
6
+ - Reduce chroma as lightness approaches the extremes. At 85% lightness, chroma around 0.08 is enough; pushing to 0.15 looks garish.
7
+ - Tint neutrals toward the brand hue with a chroma of 0.005 to 0.01.
8
+ - 60-30-10 is about visual weight, not pixel count: 60% neutral/surface, 30% secondary text and borders, 10% accent.
9
+ - Never use gray text on a colored background. Use a shade of the background hue at reduced lightness instead.
10
+
11
+ ## Theme Matrix
12
+
13
+ | Context | Direction | Reason |
14
+ |---|---|---|
15
+ | Trading or analytics dashboard, night-shift use | Dark | High data density; reduced glare during long sessions |
16
+ | Children's reading or learning app | Light | Welcoming, low fatigue |
17
+ | Enterprise SRE or observability tool | Dark | Operator context; dark surfaces read at a glance in low-light rooms |
18
+ | Weekend planning, recipes, journaling | Light | Ambient daytime use; light feels casual |
19
+ | Music player or media browser | Dark | Content-forward; dark surfaces recede and let media pop |
20
+ | Hospital or clinical patient portal | Light | Trust and legibility are paramount |
21
+ | Vintage or artisanal brand site | Cream/warm light | Dark would clash with the analog material references |
22
+
23
+ If the answer is not obvious from context, default to light.
24
+
25
+ ## Reflex Fonts to Reject
26
+
27
+ These fonts dominate training data. Using them signals no decision was made. The ban is on reflex use as a display face; informed product-UI use (e.g. Inter for a dense data table) is allowed when justified.
28
+
29
+ Reject: Inter, DM Sans, DM Serif Display, DM Serif Text, Outfit, Plus Jakarta Sans, Instrument Sans, Instrument Serif, Space Grotesk, Space Mono, IBM Plex Sans, IBM Plex Serif, IBM Plex Mono, Syne, Fraunces, Newsreader, Lora, Crimson Pro, Crimson Text, Playfair Display, Cormorant, Cormorant Garamond.
30
+
31
+ ## Font Selection Procedure
32
+
33
+ 1. Write three words that describe the brand (e.g. "precise, minimal, fast").
34
+ 2. Name the three fonts you would reach for reflexively.
35
+ 3. Reject all three.
36
+ 4. Pick a typeface from a named foundry (Klim, Commercial Type, Colophon, Grilli Type, OH no Type, Village) or an open-source option with a clear personality. Be able to explain why in one sentence.
37
+
38
+ ## Typography Details
39
+
40
+ - `text-wrap: balance` on headings and short text blocks; `text-wrap: pretty` on body paragraphs
41
+ - `-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale` once on root layout (macOS only)
42
+ - `font-variant-numeric: tabular-nums` for counters, timers, prices, number columns
43
+ - Letter-spacing: roughly -0.022em for display sizes (32px+), -0.012em for mid-range (20-28px), normal at 16px and below
44
+
45
+ ## Motion Specifics
46
+
47
+ - No bounce or elastic easing. Use exponential ease-out: `cubic-bezier(0.16,1,0.3,1)` for natural deceleration.
48
+ - Animate `transform` and `opacity` only. Every other property triggers layout or paint.
49
+ - For height reveals: `grid-template-rows: 0fr` to `1fr` (avoids `height: auto` animation trap).
50
+ - Icon swaps: 120ms cross-fade with `opacity` and subtle `scale(0.9)` to `scale(1)`.
51
+ - Scale on press: `scale(0.96)` on active/press via CSS transitions.
52
+ - Page-load guard: `initial={false}` on animated presence wrappers for toggles and tabs (prevents enter animations on first render).
53
+ - Honor `prefers-reduced-motion`: disable or reduce animations when set.
@@ -0,0 +1,43 @@
1
+ # Design Traps and Anti-Patterns
2
+
3
+ ## Common Default Traps
4
+
5
+ Before submitting, check whether any of the following slipped in without intention:
6
+
7
+ - A purple or blue gradient over white as the hero background
8
+ - A three-part hero: large headline, one-line subtext, two CTA buttons side by side
9
+ - A grid of cards with identical rounded corners, identical drop shadows, identical padding
10
+ - A top navigation bar with logo left, links center, primary action far right
11
+ - Sections that alternate between white and `#f9f9f9`
12
+ - A centered icon or illustration sitting above a heading above a paragraph
13
+ - A four-column footer with equal-weight columns
14
+
15
+ Any of these can appear if they serve the design intentionally. They cannot appear by default.
16
+
17
+ Final test: if you swapped in completely different content and the layout still made sense without changes, you built a template, not a design. Redo it.
18
+
19
+ ## Absolute Bans (CSS-Pattern Level)
20
+
21
+ | Pattern | Why | Rewrite |
22
+ |---|---|---|
23
+ | `border-left` or `border-right` wider than 1px as a section accent | The single most overused design touch in admin UIs | Use a colored dot, a short horizontal rule, a background swatch, or a typographic weight shift |
24
+ | `background-clip: text` gradient text | Decorative and illegible in high-contrast mode | Use a solid brand color or typographic weight for emphasis |
25
+ | `backdrop-filter: blur` glassmorphism as default card surface | Expensive on low-power devices; overused | Use elevated surfaces via background color steps and `box-shadow` |
26
+ | Purple-to-blue gradients or cyan-on-dark accent systems | The canonical AI design palette; communicates nothing about the brand | Pick a palette from the brand words via OKLCH rules |
27
+ | Generic rounded-rect card with `box-shadow` as the default container | Template thinking | Default to cardless sections; only add card treatment when content type requires it |
28
+ | Modals as lazy escape for overflow UI | Interrupts flow and breaks browser back navigation | Inline expand, detail panel, or dedicated route; modals only when action truly requires focus-lock |
29
+ | `transition: all` or animating width/height/padding/margin | Forces browser into layout recalculation on every frame | List exact properties; use `grid-template-rows: 0fr to 1fr` for height reveals |
30
+
31
+ ## AI Slop Test
32
+
33
+ Would a stranger glancing at the first viewport say "an AI made this" immediately? If yes, the committed direction was not committed enough. Usual culprits: reflex font, default purple accent, centered hero with generic card grid beneath. Fix the typography, color system, or layout until the answer flips.
34
+
35
+ ## Content Authenticity
36
+
37
+ Placeholder copy that looks real but is not real breaks the illusion. Apply these rules before handoff.
38
+
39
+ **Sample data:** no generic names (John Doe, Jane Smith), no generic company names (Acme Corp, TechCorp), no Lorem Ipsum. Use organic numbers: `99.94%` not `99.99%`, `$99.00` not `$100.00`.
40
+
41
+ **UI copy:** sentence case on all headings, no exclamation marks on success states, never "Oops!" on errors. Banned words: Elevate, Seamless, Unleash, Delve, Tapestry, Game-changer, Next-Gen.
42
+
43
+ **Placeholders:** when a component is unavailable, use a labeled placeholder (grey rectangle, monogram wordmark, dashed border). Never draw illustrative imagery with inline SVG.