oh-my-customcode 0.56.0 → 0.58.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.
@@ -0,0 +1,173 @@
1
+ ---
2
+ name: impeccable-design
3
+ description: AI design language for production-grade UI — 10 commands covering typography, color, motion, layout, and UX writing quality
4
+ scope: core
5
+ user-invocable: false
6
+ version: 1.0.0
7
+ source:
8
+ type: external
9
+ origin: github
10
+ url: https://github.com/pbakaus/impeccable
11
+ ---
12
+
13
+ ## Purpose
14
+
15
+ Impeccable is a design language for producing intentional, production-grade UI. It defines a vocabulary of steering commands that guide an AI toward specific design dimensions — typography, color, motion, layout, and UX writing — while actively avoiding the generic patterns associated with AI-generated interfaces.
16
+
17
+ ## Commands
18
+
19
+ ### 10 Selected Commands
20
+
21
+ | Command | Trigger phrases | Description |
22
+ |---------|----------------|-------------|
23
+ | **critique** | "review design", "UX feedback" | UX design review: hierarchy, clarity, emotional resonance, and intentionality across the interface |
24
+ | **audit** | "design audit", "quality check" | Systematic quality checks across all design dimensions simultaneously |
25
+ | **typeset** | "fix fonts", "typography" | Fix font choices, weight contrast, scale, line-height, tracking, and type pairing |
26
+ | **colorize** | "add color", "color palette" | Introduce strategic color using OKLCH; construct tinted neutral palettes, avoid pure black/white |
27
+ | **animate** | "add motion", "animation" | Add purposeful motion using the 100ms/300ms/500ms rule; eliminate decorative or distracting animation |
28
+ | **normalize** | "align design system" | Align output with design system standards: spacing scales, token usage, component consistency |
29
+ | **polish** | "final pass", "ship ready" | Pre-ship quality sweep across all design dimensions, including AI slop test |
30
+ | **clarify** | "improve copy", "UX writing" | Improve UX copy: labels, microcopy, empty states, error messages, button specificity |
31
+ | **arrange** | "fix layout", "spacing" | Fix layout structure, whitespace, alignment, and visual rhythm |
32
+ | **adapt** | "responsive", "mobile" | Adapt design decisions for different devices, screen sizes, and input modes |
33
+
34
+ ### Command Detail
35
+
36
+ #### critique
37
+ Holistic UX review. Evaluates information hierarchy, interaction clarity, emotional resonance, and whether design decisions feel intentional. Surfaces both friction points and missed opportunities. Output: prioritized list of issues with impact level (critical / moderate / minor).
38
+
39
+ #### audit
40
+ Systematic multi-dimension check. Runs all other command lenses in sequence and produces a structured report. Use when you need a full picture before starting work. Output: dimension-by-dimension audit with specific findings.
41
+
42
+ #### typeset
43
+ Typography repair. Evaluates and fixes:
44
+ - Font family selection (avoid default Inter/Roboto/Arial without rationale)
45
+ - Type scale (use modular scale, not arbitrary pixel sizes)
46
+ - Weight contrast (body vs. heading vs. label differentiation)
47
+ - Line-height and measure (optimal reading width 60-75 chars)
48
+ - Letter-spacing for display vs. body contexts
49
+ - Font pairing coherence
50
+
51
+ #### colorize
52
+ Color strategy and implementation using OKLCH. Key principles:
53
+ - Build tinted neutrals (never pure gray — always a 5-10% hue push)
54
+ - Use OKLCH for perceptually uniform lightness steps
55
+ - Establish semantic color roles (primary, surface, on-surface, accent, destructive)
56
+ - Avoid pure black backgrounds; tint with brand hue at low chroma
57
+ - Check color relationships for harmony, not just individual values
58
+
59
+ #### animate
60
+ Motion design with purpose. Core rule — 100/300/500ms:
61
+ - 100ms: micro-interactions, state transitions (hover, focus, active)
62
+ - 300ms: element entrances, panel transitions, drawer opens
63
+ - 500ms: page transitions, complex sequence animations
64
+ Avoid: bounce/elastic easing as decoration, animation on load without user trigger, looping animations in primary content areas.
65
+ Use: ease-out for entrances, ease-in for exits, linear for progress/loading.
66
+
67
+ #### normalize
68
+ Design system alignment. Enforces:
69
+ - Spacing scale usage (4/8/12/16/24/32/48/64 or 4pt grid)
70
+ - Border radius consistency (choose a base radius, derive multiples)
71
+ - Shadow scale (0-3 elevation levels, not arbitrary per-component)
72
+ - Color token usage vs. hardcoded values
73
+ - Component variant consistency
74
+
75
+ #### polish
76
+ Pre-ship quality sweep. Runs: typeset + colorize + arrange + AI slop test + final coherence check. Output includes a ship-readiness verdict (ship / ship with minor fixes / needs work).
77
+
78
+ #### clarify
79
+ UX writing improvement. Targets:
80
+ - Button labels: specific verbs over generic ("Save changes" not "Submit")
81
+ - Empty states: explain what goes here + clear action to fill it
82
+ - Error messages: say what happened + what to do (not "An error occurred")
83
+ - Tooltips and help text: answer the user's actual question
84
+ - Confirmation dialogs: describe the consequence, not the action
85
+
86
+ #### arrange
87
+ Layout and spatial design. Fixes:
88
+ - Visual hierarchy via size, weight, and position
89
+ - Negative space: increase breathing room between unrelated groups
90
+ - Alignment: establish a clear grid baseline
91
+ - Proximity: group related elements, separate unrelated ones
92
+ - Visual rhythm: consistent incremental spacing within components
93
+
94
+ #### adapt
95
+ Responsive and cross-device adaptation:
96
+ - Mobile-first breakpoint strategy
97
+ - Touch target sizing (minimum 44x44px)
98
+ - Content reflow for narrow viewports
99
+ - Progressive disclosure for complex interfaces on mobile
100
+ - Pointer vs. touch interaction mode awareness
101
+
102
+ ## AI Slop Test
103
+
104
+ The AI Slop Test is a critical checkpoint embedded in every `audit` and `polish` command. It must also be run manually on any design output before declaring it complete.
105
+
106
+ **The question**: Would someone immediately identify this as AI-generated?
107
+
108
+ ### Patterns to Flag as AI Slop
109
+
110
+ **Typography slop**
111
+ - Inter, Roboto, or Arial as the default font with no intentional reason stated
112
+ - All text the same weight except headings
113
+ - Line-height exactly 1.5 applied universally regardless of font size
114
+
115
+ **Color slop**
116
+ - Pure black (`#000000` or `#0d0d0d`) or pure gray (`#f5f5f5`, `#e5e5e5`) backgrounds without tinting
117
+ - One brand color on an otherwise completely neutral palette
118
+ - Blue-purple or coral-orange gradients with no contextual rationale
119
+
120
+ **Layout slop**
121
+ - Centered-everything layout that avoids making spatial decisions
122
+ - Identical card components with same border-radius, same shadow, and same padding stacked vertically
123
+ - Hero section: gradient blob behind centered heading + subheading + two buttons
124
+
125
+ **Motion slop**
126
+ - Bounce or elastic easing used as "delight" with no functional purpose
127
+ - Every element animates on page load with staggered delays
128
+ - Hover states that scale to 1.05 on every interactive element
129
+
130
+ **Copy slop**
131
+ - Empty states: "[Icon] No [items] yet. [Create button]"
132
+ - Error messages: "Something went wrong. Please try again."
133
+ - Buttons: "Submit", "Confirm", "OK"
134
+ - Tooltips: restate the label they're attached to
135
+
136
+ ### Slop Test Verdict
137
+
138
+ After running the test, assign one of:
139
+ - **Clean**: No slop patterns detected
140
+ - **Mild slop**: 1-2 patterns present, easy to fix
141
+ - **Heavy slop**: 3+ patterns, requires deliberate design work before ship
142
+
143
+ ## Role Separation
144
+
145
+ This skill operates in the aesthetic/creative layer. It does not replace technical compliance tooling.
146
+
147
+ | Design Aspect | impeccable-design (this skill) | web-design-guidelines |
148
+ |---------------|-------------------------------|----------------------|
149
+ | Typography | Font selection, pairing, type scale, expressive hierarchy | Minimum font sizes (16px body), contrast ratios |
150
+ | Color | Palette building, OKLCH, tinted neutrals, emotional resonance | WCAG 2.1 AA/AAA contrast compliance |
151
+ | Motion | Purposeful animation, easing curves, timing strategy, felt quality | prefers-reduced-motion compliance, no-animation-on-load |
152
+ | Layout | Visual rhythm, spatial design, negative space, hierarchy | Accessibility, semantic HTML structure, ARIA landmarks |
153
+ | Copy | Tone, clarity, specificity, label quality | (no overlap) |
154
+
155
+ **When both apply**: Run `impeccable-design` for aesthetic quality, then `web-design-guidelines` for compliance. They are complementary, not competing.
156
+
157
+ ## Reference Guides
158
+
159
+ - `guides/impeccable-design/typography.md` — type scale construction, font pairing strategy, hierarchy patterns
160
+ - `guides/impeccable-design/color-and-contrast.md` — OKLCH primer, tinted neutral construction, palette strategy
161
+ - `guides/impeccable-design/motion-design.md` — 100/300/500ms rule, easing reference, purposeful vs. decorative motion
162
+ - `guides/impeccable-design/ux-writing.md` — microcopy patterns, empty state templates, error message formulas
163
+
164
+ ## Execution Flow
165
+
166
+ ```
167
+ 1. Identify active command(s) from trigger phrase or explicit instruction
168
+ 2. Read target component/page files
169
+ 3. Consult relevant reference guides for the active command
170
+ 4. Apply changes with explicit rationale for each decision
171
+ 5. Run AI Slop Test on output
172
+ 6. Report: changes made + slop test verdict + any deferred items
173
+ ```
@@ -0,0 +1,136 @@
1
+ ---
2
+ name: omcustom:auto-improve
3
+ description: Apply verified improvement suggestions from eval-core analysis to omcustom configuration
4
+ scope: harness
5
+ user-invocable: true
6
+ effort: high
7
+ ---
8
+
9
+ # /omcustom:auto-improve — Automated Improvement Workflow
10
+
11
+ ## Purpose
12
+
13
+ Reads improvement suggestions from eval-core analysis, lets the user select which to apply, applies changes in an isolated worktree with sauron verification, and creates a PR for review.
14
+
15
+ ## Usage
16
+
17
+ ```
18
+ /omcustom:auto-improve # Interactive selection from pending suggestions
19
+ ```
20
+
21
+ ## Prerequisites
22
+
23
+ - eval-core analysis data exists (run `/omcustom:improve-report` first if empty)
24
+ - Pending improvement suggestions in `proposed` status
25
+
26
+ ## Workflow
27
+
28
+ ### Step 1: Read Suggestions
29
+
30
+ 1. Run `bun run packages/eval-core/src/cli/index.ts analyze --format json --save` via Bash
31
+ 2. Parse JSON output for improvement suggestions
32
+ 3. If no suggestions: display "No improvement suggestions available" and exit
33
+
34
+ ### Step 2: Display & Select
35
+
36
+ Display numbered list:
37
+ ```
38
+ [Auto-Improve] Available suggestions:
39
+ 1. [HIGH] agent:lang-golang-expert — Escalate model sonnet→opus (3 failures in 5 uses)
40
+ 2. [MED] routing:dev-lead-routing — Add Flutter keyword mapping (2 routing misses)
41
+ 3. [LOW] skill:systematic-debugging — Add timeout guard (1 timeout in 10 uses)
42
+
43
+ Select items: [1,2,3] / "all" / "cancel"
44
+ ```
45
+
46
+ **Self-reference filter**: Exclude items where targetName matches:
47
+ - `omcustom-auto-improve`, `auto-improve`
48
+ - `pipeline-guards`, `evaluator-optimizer`
49
+ - Any item targeting this skill itself
50
+
51
+ ### Step 3: Approve (State Transition)
52
+
53
+ For each selected item:
54
+ 1. Call eval-core API: transition `proposed` → `approved`
55
+ 2. Display: `[Approved] {N} items selected for application`
56
+
57
+ ### Step 4: Worktree Isolation
58
+
59
+ - Use `EnterWorktree` tool with name `auto-improve-{YYYYMMDD}`
60
+ - Creates isolated branch from HEAD
61
+
62
+ ### Step 5: Apply Changes
63
+
64
+ Map each approved item to the appropriate subagent by `targetType`:
65
+
66
+ | targetType | Agent | Action |
67
+ |------------|-------|--------|
68
+ | agent | mgr-creator | Modify agent frontmatter/body |
69
+ | skill | Matching domain expert | Revise skill SKILL.md |
70
+ | routing | general-purpose | Update routing patterns |
71
+ | model-escalation | general-purpose | Update model field in agent frontmatter |
72
+
73
+ Spawn agents in parallel (max 4 per R009). Each agent receives:
74
+ - Action description and evidence data
75
+ - Target file path
76
+ - Specific modification instructions
77
+
78
+ ### Step 6: Verification
79
+
80
+ 1. Delegate to mgr-sauron: full R017 verification
81
+ 2. If **PASS**: proceed to Step 7
82
+ 3. If **FAIL**: display failures, offer options:
83
+ - `fix` → re-apply with sauron feedback (max 2 cycles)
84
+ - `reject` → transition all to `rejected`, ExitWorktree(remove)
85
+ - `manual` → keep worktree for user inspection
86
+
87
+ ### Step 7: PR & Finalize
88
+
89
+ 1. Delegate to mgr-gitnerd: commit + create PR
90
+ - Title: `chore(auto-improve): apply {N} improvement suggestions`
91
+ - Body: table of applied items with evidence
92
+ 2. Transition all items to `applied` with `appliedAt` timestamp and PR URL
93
+ 3. `ExitWorktree(action: "keep")` — keep branch for PR
94
+ 4. Display PR URL to user
95
+
96
+ ## Safety Guards
97
+
98
+ | Guard | Implementation |
99
+ |-------|---------------|
100
+ | Self-reference prevention | Blocklist filter in Step 2 |
101
+ | User approval gate | Step 2 interactive selection |
102
+ | Worktree isolation | Step 4 EnterWorktree |
103
+ | Sauron verification | Step 6 mandatory pass |
104
+ | PR-based merge | Step 7 — no direct push to develop |
105
+ | Max items per run | 20 default, 50 hard cap |
106
+ | Max fix cycles | 2 retries before rejection |
107
+ | Rollback | `git revert` via mgr-gitnerd post-merge |
108
+
109
+ ## Error Handling
110
+
111
+ | Scenario | Action |
112
+ |----------|--------|
113
+ | No suggestions available | Display message, exit |
114
+ | User cancels selection | Exit, no state changes |
115
+ | Sauron verification fails 2x | Reject all, cleanup worktree |
116
+ | Agent application error | Mark individual item as rejected, continue others |
117
+ | EnterWorktree fails | Report error, exit |
118
+
119
+ ## Display Format
120
+
121
+ ```
122
+ [Auto-Improve] Starting improvement workflow
123
+ ├── Suggestions: {N} available ({high}H/{medium}M/{low}L confidence)
124
+ ├── Self-reference filtered: {count} items excluded
125
+ └── Select items to apply: [1,2,3] or "all" or "cancel"
126
+
127
+ [Auto-Improve] Applying {N} improvements in worktree
128
+ ├── Worktree: auto-improve-{date}
129
+ ├── Agents: {count} parallel
130
+ └── Pipeline guards: max 20 items, 2 retry cycles
131
+
132
+ [Auto-Improve] Verification
133
+ ├── Sauron: {PASS|FAIL}
134
+ ├── PR: #{number} created
135
+ └── Status: {N} items → applied
136
+ ```
@@ -22,6 +22,7 @@ Defines mandatory safety constraints for all pipeline, workflow, and iterative e
22
22
  | Timeout per pipeline | 900s | 1800s | worker-reviewer-pipeline |
23
23
  | Max retry count | 2 | 3 | Failure retry strategies |
24
24
  | Max PR improvement items | 20 | 50 | pr-auto-improve |
25
+ | Max auto-improve items | 20 | 50 | omcustom-auto-improve |
25
26
 
26
27
  ## Enforcement
27
28
 
@@ -152,6 +153,7 @@ Guard warnings appear inline:
152
153
  | dag-orchestration | Node count and timeout limits |
153
154
  | worker-reviewer-pipeline | Iteration and pipeline timeout limits |
154
155
  | pr-auto-improve | Improvement item count limits |
156
+ | omcustom-auto-improve | Auto-improve item count limits |
155
157
  | stuck-recovery | Guard triggers feed into stuck detection |
156
158
  | model-escalation | Repeated failures trigger escalation advisory |
157
159
 
@@ -50,10 +50,16 @@ git → mgr-gitnerd
50
50
  verify → mgr-sauron
51
51
  spec → mgr-claude-code-bible
52
52
  memory → sys-memory-keeper
53
- todo → sys-naggy
54
- batch multiple (parallel)
53
+ todo → sys-naggy
54
+ improve-report omcustom-improve-report (skill invocation)
55
+ auto-improve → omcustom-auto-improve (skill invocation)
56
+ batch → multiple (parallel)
55
57
  ```
56
58
 
59
+ **improve-report keywords**: "improve-report", "improvement", "개선", "개선 리포트", "improve" → invoke `omcustom-improve-report` skill (read-only, no agent delegation needed)
60
+
61
+ **auto-improve keywords**: "auto-improve", "자동 개선", "개선 적용", "apply improvements", "improvement suggestions" → invoke `omcustom-auto-improve` skill (worktree isolation, sauron verification, PR creation)
62
+
57
63
  ### Ontology-RAG Enrichment (R019)
58
64
 
59
65
  If `get_agent_for_task` MCP tool is available, call it with the original query and inject `suggested_skills` into the agent prompt. Skip silently on failure.
@@ -101,6 +101,7 @@ oh-my-customcode로 구동됩니다.
101
101
  | `/omcustom:update-external` | 외부 소스에서 에이전트 업데이트 |
102
102
  | `/omcustom:audit-agents` | 에이전트 의존성 감사 |
103
103
  | `/omcustom:fix-refs` | 깨진 참조 수정 |
104
+ | `/omcustom:auto-improve` | 개선 사항 자동 적용 워크플로우 |
104
105
  | `/omcustom:improve-report` | eval-core 기반 개선 현황 리포트 |
105
106
  | `/omcustom-takeover` | 기존 에이전트/스킬에서 canonical spec 추출 |
106
107
  | `/adversarial-review` | 공격자 관점 보안 코드 리뷰 |
@@ -136,12 +137,12 @@ oh-my-customcode로 구동됩니다.
136
137
  project/
137
138
  +-- CLAUDE.md # 진입점
138
139
  +-- .claude/
139
- | +-- agents/ # 서브에이전트 정의 (45 파일)
140
- | +-- skills/ # 스킬 (91 디렉토리)
140
+ | +-- agents/ # 서브에이전트 정의 (46 파일)
141
+ | +-- skills/ # 스킬 (94 디렉토리)
141
142
  | +-- rules/ # 전역 규칙 (R000-R021)
142
143
  | +-- hooks/ # 훅 스크립트 (보안, 검증, HUD)
143
144
  | +-- contexts/ # 컨텍스트 파일 (ecomode)
144
- +-- guides/ # 레퍼런스 문서 (30 토픽)
145
+ +-- guides/ # 레퍼런스 문서 (31 토픽)
145
146
  ```
146
147
 
147
148
  ## 오케스트레이션
@@ -0,0 +1,278 @@
1
+ # Color and Contrast
2
+
3
+ > Reference: Impeccable Design Language — https://github.com/pbakaus/impeccable (Apache 2.0)
4
+
5
+ ---
6
+
7
+ ## OKLCH: The Preferred Color Model
8
+
9
+ OKLCH (Oklab Lightness, Chroma, Hue) is a perceptually uniform color space. Unlike HSL, equal numeric changes in OKLCH produce equal perceived differences — making it the right tool for generating accessible, harmonious palettes programmatically.
10
+
11
+ ### Structure
12
+
13
+ ```
14
+ oklch(lightness% chroma hue)
15
+ ```
16
+
17
+ | Channel | Range | Description |
18
+ |---------|-------|-------------|
19
+ | `lightness` | 0%–100% | Perceived brightness |
20
+ | `chroma` | 0–0.4 (approx) | Color saturation/vividness |
21
+ | `hue` | 0–360 | Color angle (red=25, yellow=90, green=145, cyan=200, blue=250, purple=310) |
22
+
23
+ ### Why not HSL?
24
+
25
+ HSL's lightness channel is not perceptually uniform. A blue at `hsl(250, 70%, 50%)` and a yellow at `hsl(60, 70%, 50%)` have the same numeric lightness but very different perceived brightness. This makes HSL palettes that "look right" on the screen require constant manual tuning.
26
+
27
+ OKLCH fixes this: a blue at `oklch(50% 0.15 250)` and a yellow at `oklch(50% 0.15 90)` appear equally bright.
28
+
29
+ ### Browser support
30
+
31
+ OKLCH is supported in all modern browsers (Chrome 111+, Firefox 113+, Safari 15.4+). For legacy support, provide an HSL fallback:
32
+
33
+ ```css
34
+ color: hsl(250, 60%, 40%); /* fallback */
35
+ color: oklch(40% 0.15 250); /* modern */
36
+ ```
37
+
38
+ ---
39
+
40
+ ## Chroma Constraints
41
+
42
+ ### Reduce chroma near white and black extremes
43
+
44
+ At very high or very low lightness values, maximum chroma cannot be rendered — the color clips to the display gamut. Reduce chroma as lightness approaches 0% or 100%:
45
+
46
+ | Lightness range | Max chroma (approx) |
47
+ |-----------------|---------------------|
48
+ | 10%–20% | 0.04–0.08 |
49
+ | 20%–40% | 0.08–0.20 |
50
+ | 40%–60% | 0.15–0.35 |
51
+ | 60%–80% | 0.10–0.25 |
52
+ | 80%–95% | 0.03–0.10 |
53
+
54
+ Check rendered output with [OKLCH.com](https://oklch.com/) — the gamut boundary is shown visually.
55
+
56
+ ---
57
+
58
+ ## Neutrals: Tinted, Not Pure Gray
59
+
60
+ Pure grays (chroma 0) appear cold and disconnected from the UI's color palette. Tinting neutrals with a low-chroma version of the brand hue creates cohesion.
61
+
62
+ ### Formula
63
+
64
+ Use the brand hue with chroma 0.01–0.02 for neutrals:
65
+
66
+ ```css
67
+ :root {
68
+ /* Brand hue: 250 (blue) */
69
+ --neutral-900: oklch(12% 0.01 250);
70
+ --neutral-800: oklch(20% 0.01 250);
71
+ --neutral-700: oklch(30% 0.01 250);
72
+ --neutral-600: oklch(40% 0.01 250);
73
+ --neutral-500: oklch(50% 0.01 250);
74
+ --neutral-400: oklch(60% 0.01 250);
75
+ --neutral-300: oklch(72% 0.01 250);
76
+ --neutral-200: oklch(84% 0.01 250);
77
+ --neutral-100: oklch(93% 0.01 250);
78
+ --neutral-50: oklch(97% 0.01 250);
79
+ }
80
+ ```
81
+
82
+ ### Temperature
83
+
84
+ | Hue angle | Temperature | Effect |
85
+ |-----------|-------------|--------|
86
+ | ~60° | Warm | Approachable, editorial |
87
+ | ~250° | Cool | Technical, precise, professional |
88
+
89
+ Warm neutrals (cream, off-white) suit consumer and lifestyle products. Cool neutrals suit developer tools, dashboards, and data products.
90
+
91
+ ---
92
+
93
+ ## Palette Architecture
94
+
95
+ ### Components
96
+
97
+ | Component | Count | Purpose |
98
+ |-----------|-------|---------|
99
+ | Primary | 1 color, 3–5 shades | Brand identity, CTAs, interactive elements |
100
+ | Neutral | 9–11 shades | Backgrounds, borders, text |
101
+ | Semantic | 4 colors (success, warning, danger, info), 2–3 shades each | State communication |
102
+ | Surface | 2–3 variants | Background layering (base, raised, overlay) |
103
+
104
+ ### Primary palette (5 shades)
105
+
106
+ ```css
107
+ :root {
108
+ --primary-50: oklch(95% 0.05 250); /* tint, hover backgrounds */
109
+ --primary-200: oklch(80% 0.10 250); /* light states */
110
+ --primary-500: oklch(55% 0.20 250); /* primary action */
111
+ --primary-700: oklch(38% 0.18 250); /* pressed, dark variant */
112
+ --primary-900: oklch(22% 0.12 250); /* text on light bg */
113
+ }
114
+ ```
115
+
116
+ ### Semantic palette
117
+
118
+ ```css
119
+ :root {
120
+ /* Success */
121
+ --success-light: oklch(92% 0.06 145);
122
+ --success: oklch(50% 0.18 145);
123
+ --success-dark: oklch(35% 0.15 145);
124
+
125
+ /* Warning */
126
+ --warning-light: oklch(93% 0.08 85);
127
+ --warning: oklch(65% 0.20 85);
128
+ --warning-dark: oklch(45% 0.18 85);
129
+
130
+ /* Danger */
131
+ --danger-light: oklch(93% 0.06 25);
132
+ --danger: oklch(50% 0.20 25);
133
+ --danger-dark: oklch(35% 0.18 25);
134
+
135
+ /* Info */
136
+ --info-light: oklch(93% 0.05 230);
137
+ --info: oklch(52% 0.18 230);
138
+ --info-dark: oklch(38% 0.16 230);
139
+ }
140
+ ```
141
+
142
+ ---
143
+
144
+ ## The 60-30-10 Rule
145
+
146
+ Visual weight should be distributed to create hierarchy without chaos:
147
+
148
+ | Proportion | Role | Example |
149
+ |------------|------|---------|
150
+ | 60% | Dominant (neutral backgrounds) | Page background, card surfaces |
151
+ | 30% | Secondary (supporting) | Sidebar, navigation, secondary panels |
152
+ | 10% | Accent (brand, CTAs) | Buttons, links, highlights, icons |
153
+
154
+ Violating this ratio — for example, a 40% brand-color background — overwhelms the interface and makes it harder to identify interactive elements.
155
+
156
+ ---
157
+
158
+ ## WCAG Contrast Requirements
159
+
160
+ Contrast ratio is calculated between foreground and background luminance. Use a contrast checker to verify all text/background combinations.
161
+
162
+ ### Minimum ratios
163
+
164
+ | Element | WCAG AA | WCAG AAA |
165
+ |---------|---------|----------|
166
+ | Body text (< 18px / < 14px bold) | 4.5:1 | 7:1 |
167
+ | Large text (≥ 18px / ≥ 14px bold) | 3:1 | 4.5:1 |
168
+ | UI components (borders, icons, input outlines) | 3:1 | 4.5:1 |
169
+
170
+ ### Practical targets
171
+
172
+ - Body text: aim for 7:1 (AAA) — the difference in effort is minimal and accessibility is significantly better
173
+ - Large headings: 4.5:1 minimum
174
+ - Placeholder text: WCAG requires 4.5:1; placeholders are not exempt despite their decorative role
175
+ - Disabled elements: WCAG exempts disabled controls from contrast requirements, but aim for 3:1 as a courtesy
176
+
177
+ ### Anti-patterns
178
+
179
+ | Anti-pattern | Problem | Fix |
180
+ |--------------|---------|-----|
181
+ | Light gray text on white | Classic failure — looks designed, fails AA | Use `oklch(45% 0.01 250)` on white for safe gray |
182
+ | Gray text on colored background | Double unpredictability — two variables affecting contrast | Test with a contrast checker, not by eye |
183
+ | Red on green | Colorblind failure (deuteranopia/protanopia) | Add pattern or icon; do not rely on color alone |
184
+ | Blue on red | Chromatic aberration causes vibration | Add lightness contrast; avoid hue-only contrast |
185
+ | Yellow on white | Low contrast despite perceived brightness | Yellow on white fails AA unless very dark yellow |
186
+ | Thin text over images | Impossible to guarantee; background varies | Add text shadow, overlay panel, or blur backdrop |
187
+
188
+ ### Testing tools
189
+
190
+ - [WebAIM Contrast Checker](https://webaim.org/resources/contrastchecker/)
191
+ - Chrome DevTools: Elements panel → Accessibility → Contrast
192
+ - Firefox DevTools: Accessibility panel
193
+ - Polypane: Built-in contrast checking across all breakpoints
194
+
195
+ ---
196
+
197
+ ## No Pure Gray or Black
198
+
199
+ Pure grays (`oklch(N% 0 0)` or `#808080`) read as cold and disconnected. Tinted grays integrate into the palette.
200
+
201
+ ### Rule: chroma 0.005–0.01 minimum
202
+
203
+ ```css
204
+ /* WRONG: pure gray */
205
+ color: oklch(50% 0 0);
206
+
207
+ /* CORRECT: tinted neutral */
208
+ color: oklch(50% 0.01 250);
209
+ ```
210
+
211
+ ### No pure black
212
+
213
+ `#000000` or `oklch(0% 0 0)` is rarely appropriate. High contrast without tint creates harshness. Instead:
214
+
215
+ ```css
216
+ /* WRONG */
217
+ --text-primary: #000000;
218
+
219
+ /* CORRECT: near-black with subtle tint */
220
+ --text-primary: oklch(12% 0.01 250);
221
+ ```
222
+
223
+ ---
224
+
225
+ ## Dark Mode
226
+
227
+ Dark mode is NOT a color inversion. Inversion breaks contrast relationships and produces garish results. Instead, dark mode requires thoughtfully redesigned color relationships.
228
+
229
+ ### Principles
230
+
231
+ **Lighter surfaces indicate depth.** In light mode, shadows indicate elevation. In dark mode, lighter backgrounds indicate elevation:
232
+
233
+ | Elevation | Light mode | Dark mode |
234
+ |-----------|-----------|-----------|
235
+ | Page background | Lightest | Darkest |
236
+ | Card | +shadow | Slightly lighter |
237
+ | Modal/overlay | +deeper shadow | Lighter still |
238
+ | Tooltip | Darkest shadow | Lightest surface |
239
+
240
+ **Slightly desaturated accents.** Saturated colors are harder to look at on dark backgrounds for extended periods. Reduce chroma by 0.02–0.04:
241
+
242
+ ```css
243
+ @media (prefers-color-scheme: dark) {
244
+ --primary-500: oklch(62% 0.16 250); /* was 0.20 in light mode */
245
+ }
246
+ ```
247
+
248
+ **Dark gray, never pure black.** Use 12–18% lightness for the base background:
249
+
250
+ ```css
251
+ @media (prefers-color-scheme: dark) {
252
+ --surface-base: oklch(14% 0.01 250); /* main background */
253
+ --surface-raised: oklch(18% 0.01 250); /* cards */
254
+ --surface-overlay: oklch(22% 0.01 250); /* modals */
255
+ }
256
+ ```
257
+
258
+ **Redefine semantic tokens, do not invert them.** Semantic tokens exist precisely for this purpose:
259
+
260
+ ```css
261
+ :root {
262
+ --text-body: oklch(25% 0.01 250);
263
+ --text-muted: oklch(50% 0.01 250);
264
+ --bg-base: oklch(98% 0.01 250);
265
+ }
266
+
267
+ @media (prefers-color-scheme: dark) {
268
+ --text-body: oklch(90% 0.01 250);
269
+ --text-muted: oklch(65% 0.01 250);
270
+ --bg-base: oklch(14% 0.01 250);
271
+ }
272
+ ```
273
+
274
+ ### Dark mode testing
275
+
276
+ - DevTools: Rendering panel → Emulate CSS media feature prefers-color-scheme
277
+ - Test WCAG contrast ratios in dark mode independently — they differ from light mode
278
+ - Test with vision emulation filters (protanopia, deuteranopia, achromatopsia) in DevTools
@@ -0,0 +1,12 @@
1
+ name: impeccable-design
2
+ description: AI design language reference — typography, color, motion, and UX writing for production-grade UI
3
+ source:
4
+ type: external
5
+ origin: github
6
+ url: https://github.com/pbakaus/impeccable
7
+ license: Apache-2.0
8
+ documents:
9
+ - typography.md
10
+ - color-and-contrast.md
11
+ - motion-design.md
12
+ - ux-writing.md