chill-agent 1.1.0 → 1.3.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 (40) hide show
  1. package/GUIDE.md +47 -0
  2. package/INSTALL.md +78 -0
  3. package/after-install.md +23 -0
  4. package/antislop.md +764 -0
  5. package/chillslop.md +764 -0
  6. package/commands/chill-audit.toml +2 -0
  7. package/commands/chill-debt.toml +2 -0
  8. package/commands/chill-gain.toml +2 -0
  9. package/commands/chill-help.toml +2 -0
  10. package/commands/chill-review.toml +2 -0
  11. package/commands/chill.toml +2 -0
  12. package/docs/agent-portability.md +62 -0
  13. package/docs/cursor-hooks.md +200 -0
  14. package/gemini-extension.json +6 -0
  15. package/opencode.json +18 -0
  16. package/package.json +17 -2
  17. package/plugin.json +3 -0
  18. package/plugin.yaml +12 -0
  19. package/rules/antislop.md +764 -0
  20. package/rules/chillslop.md +764 -0
  21. package/rules/chillslop.mdc +764 -0
  22. package/skills/chill-audit/SKILL.md +103 -0
  23. package/skills/chill-debt/SKILL.md +44 -0
  24. package/skills/chill-gain/SKILL.md +52 -0
  25. package/skills/chill-help/SKILL.md +76 -0
  26. package/skills/chill-review/SKILL.md +101 -0
  27. package/skills/chill-slop/SKILL.md +218 -40
  28. package/skills/chill-slop/VERSION +1 -0
  29. package/skills/chill-slop-code/SKILL.md +85 -37
  30. package/skills/chill-slop-copywriting/SKILL.md +72 -24
  31. package/skills/chill-slop-human/SKILL.md +64 -15
  32. package/skills/chill-slop-human/contrast-check.py +168 -0
  33. package/skills/chill-slop-human/contrast-mcp.py +121 -0
  34. package/skills/chill-slop-human/references/A11Y-PATTERNS.md +249 -0
  35. package/skills/chill-slop-human/references/WCAG.md +127 -0
  36. package/skills/chill-slop-mobile/SKILL.md +85 -18
  37. package/skills/chill-slop-ui/SKILL.md +106 -33
  38. package/skills/chill-slop-ui/references/CORE-WEB-VITALS.md +181 -0
  39. package/skills/chill-slop-ui/references/WEB-BASELINE.md +28 -0
  40. package/src/auditor.js +16 -0
@@ -0,0 +1,127 @@
1
+ # WCAG 2.2 Quick Reference
2
+
3
+ > Reference for antislop. Adapted from the MIT-licensed web-quality-skills by Addy Osmani (https://github.com/addyosmani/web-quality-skills); see LICENSE-web-quality-skills in the skill folder.
4
+
5
+ ## Success criteria by level
6
+
7
+ ### Level A (minimum)
8
+
9
+ | Criterion | Description |
10
+ |-----------|-------------|
11
+ | **1.1.1** Non-text Content | All images, icons have text alternatives |
12
+ | **1.2.1** Audio-only/Video-only | Provide transcript or audio description |
13
+ | **1.2.2** Captions | Video with audio has captions |
14
+ | **1.2.3** Audio Description | Video has audio description |
15
+ | **1.3.1** Info and Relationships | Information conveyed through presentation is available programmatically |
16
+ | **1.3.2** Meaningful Sequence | Reading order is logical |
17
+ | **1.3.3** Sensory Characteristics | Instructions don't rely solely on shape, color, size, location, orientation, or sound |
18
+ | **1.4.1** Use of Color | Color is not the only visual means of conveying information |
19
+ | **1.4.2** Audio Control | Audio playing automatically can be paused/stopped |
20
+ | **2.1.1** Keyboard | All functionality available via keyboard |
21
+ | **2.1.2** No Keyboard Trap | Keyboard focus can be moved away from any component |
22
+ | **2.1.4** Character Key Shortcuts | Single-key shortcuts can be turned off or remapped |
23
+ | **2.2.1** Timing Adjustable | Time limits can be extended |
24
+ | **2.2.2** Pause, Stop, Hide | Moving/blinking content can be paused |
25
+ | **2.3.1** Three Flashes | Nothing flashes more than 3 times per second |
26
+ | **2.4.1** Bypass Blocks | Skip link or landmark navigation available |
27
+ | **2.4.2** Page Titled | Pages have descriptive titles |
28
+ | **2.4.3** Focus Order | Focus order preserves meaning |
29
+ | **2.4.4** Link Purpose | Link purpose clear from link text or context |
30
+ | **2.5.1** Pointer Gestures | Multi-point gestures have single-pointer alternatives |
31
+ | **2.5.2** Pointer Cancellation | Down-event doesn't trigger action (use up-event or click) |
32
+ | **2.5.3** Label in Name | Accessible name contains visible label text |
33
+ | **2.5.4** Motion Actuation | Motion-triggered functions have alternatives |
34
+ | **3.1.1** Language of Page | Default language specified in HTML |
35
+ | **3.2.1** On Focus | Focus doesn't trigger unexpected changes |
36
+ | **3.2.2** On Input | Input doesn't trigger unexpected changes |
37
+ | **3.2.6** Consistent Help | Help mechanisms appear in the same relative order across pages |
38
+ | **3.3.1** Error Identification | Input errors clearly described |
39
+ | **3.3.2** Labels or Instructions | Form inputs have labels or instructions |
40
+ | **3.3.7** Redundant Entry | Information previously entered is auto-populated or available to select |
41
+ | **4.1.2** Name, Role, Value | UI components have accessible names and correct roles |
42
+
43
+ ### Level AA (standard)
44
+
45
+ | Criterion | Description |
46
+ |-----------|-------------|
47
+ | **1.2.4** Captions (Live) | Live audio has captions |
48
+ | **1.2.5** Audio Description | Pre-recorded video has audio description |
49
+ | **1.3.4** Orientation | Content doesn't restrict orientation |
50
+ | **1.3.5** Identify Input Purpose | Input purpose can be programmatically determined |
51
+ | **1.4.3** Contrast (Minimum) | 4.5:1 for normal text, 3:1 for large text |
52
+ | **1.4.4** Resize Text | Text can be resized to 200% without loss of functionality |
53
+ | **1.4.5** Images of Text | Text used instead of images of text |
54
+ | **1.4.10** Reflow | Content reflows at 320px width without horizontal scroll |
55
+ | **1.4.11** Non-text Contrast | UI components have 3:1 contrast |
56
+ | **1.4.12** Text Spacing | Content adapts to text spacing changes |
57
+ | **1.4.13** Content on Hover/Focus | Additional content is dismissible, hoverable, persistent |
58
+ | **2.4.5** Multiple Ways | Multiple ways to find pages |
59
+ | **2.4.6** Headings and Labels | Headings and labels are descriptive |
60
+ | **2.4.7** Focus Visible | Focus indicator is visible |
61
+ | **2.4.11** Focus Not Obscured (Minimum) | Focused element is not entirely hidden by author-created content |
62
+ | **2.5.7** Dragging Movements | Dragging actions have single-pointer alternatives |
63
+ | **2.5.8** Target Size (Minimum) | Interactive targets are at least 24×24 CSS pixels (with exceptions) |
64
+ | **3.1.2** Language of Parts | Language changes are marked |
65
+ | **3.2.3** Consistent Navigation | Navigation is consistent across pages |
66
+ | **3.2.4** Consistent Identification | Same functionality uses same labels |
67
+ | **3.3.3** Error Suggestion | Error corrections suggested when known |
68
+ | **3.3.4** Error Prevention (Legal) | Actions can be reversed or confirmed |
69
+ | **3.3.8** Accessible Authentication (Minimum) | No cognitive function test for login unless an alternative or assistance is provided |
70
+ | **4.1.3** Status Messages | Status messages announced to screen readers |
71
+
72
+ ### Level AAA (enhanced)
73
+
74
+ | Criterion | Description |
75
+ |-----------|-------------|
76
+ | **1.2.6** Sign Language (Prerecorded) | Pre-recorded video has a sign language interpretation |
77
+ | **1.2.7** Extended Audio Description (Prerecorded) | Video pauses long enough for audio description to convey the visuals |
78
+ | **1.2.8** Media Alternative (Prerecorded) | A text alternative covers everything the pre-recorded media shows |
79
+ | **1.2.9** Audio-only (Live) | Live audio-only content has a text alternative |
80
+ | **1.3.6** Identify Purpose | Icons and regions have a programmatically determined purpose |
81
+ | **1.4.6** Contrast (Enhanced) | 7:1 for normal text, 4.5:1 for large text |
82
+ | **1.4.7** Low or No Background Audio | Speech stays understandable over background sound |
83
+ | **1.4.8** Visual Presentation | Foreground/background colors can be selected |
84
+ | **1.4.9** Images of Text (No Exception) | No images of text |
85
+ | **2.1.3** Keyboard (No Exception) | All functionality keyboard accessible |
86
+ | **2.2.3** No Timing | No time limits |
87
+ | **2.2.4** Interruptions | Interruptions can be postponed |
88
+ | **2.2.5** Re-authenticating | Data preserved on re-authentication |
89
+ | **2.2.6** Timeouts | Users warned about data loss from inactivity |
90
+ | **2.3.2** Three Flashes | No content flashes more than 3 times |
91
+ | **2.3.3** Animation from Interactions | Motion animation can be disabled |
92
+ | **2.4.8** Location | User location within site is available |
93
+ | **2.4.9** Link Purpose (Link Only) | Link purpose clear from link text alone |
94
+ | **2.4.10** Section Headings | Sections have headings |
95
+ | **2.4.12** Focus Not Obscured (Enhanced) | No part of the focused element is hidden by author-created content |
96
+ | **2.4.13** Focus Appearance | Focus indicator has sufficient area, contrast, and is not obscured |
97
+ | **2.5.5** Target Size (Enhanced) | Interactive targets are at least 44×44 CSS pixels |
98
+ | **2.5.6** Concurrent Input Mechanisms | Content does not restrict which input modality a person uses |
99
+ | **3.1.3** Unusual Words | Definitions available for unusual words |
100
+ | **3.1.4** Abbreviations | Abbreviations expanded |
101
+ | **3.1.5** Reading Level | Alternative content for complex text |
102
+ | **3.1.6** Pronunciation | Pronunciation available where needed |
103
+ | **3.2.5** Change on Request | Changes initiated only by user |
104
+ | **3.3.5** Help | Context-sensitive help available |
105
+ | **3.3.6** Error Prevention (All) | All form submissions can be reviewed |
106
+ | **3.3.9** Accessible Authentication (Enhanced) | No cognitive function test for login (no object or personal content recognition exceptions) |
107
+
108
+ ## What changed from 2.1 to 2.2
109
+
110
+ | Change | Criterion | Level |
111
+ |--------|-----------|-------|
112
+ | **Removed** | 4.1.1 Parsing | A |
113
+ | **Added** | 2.4.11 Focus Not Obscured (Minimum) | AA |
114
+ | **Added** | 2.4.12 Focus Not Obscured (Enhanced) | AAA |
115
+ | **Added** | 2.4.13 Focus Appearance | AAA |
116
+ | **Added** | 2.5.7 Dragging Movements | AA |
117
+ | **Added** | 2.5.8 Target Size (Minimum) | AA |
118
+ | **Added** | 3.2.6 Consistent Help | A |
119
+ | **Added** | 3.3.7 Redundant Entry | A |
120
+ | **Added** | 3.3.8 Accessible Authentication (Minimum) | AA |
121
+ | **Added** | 3.3.9 Accessible Authentication (Enhanced) | AAA |
122
+
123
+ ## Sources
124
+
125
+ - [WCAG 2.2 W3C Recommendation](https://www.w3.org/TR/WCAG22/)
126
+ - [WCAG 2.2 Quick Reference](https://www.w3.org/WAI/WCAG22/quickref/)
127
+ - [What's New in WCAG 2.2](https://www.w3.org/WAI/standards-guidelines/wcag/new-in-22/)
@@ -1,28 +1,95 @@
1
1
  ---
2
2
  name: chill-slop-mobile
3
- description: "Mobile & Responsive Engineering Standard. Fluid CSS clamp typography, zero horizontal blowout, and comfortable thumb-reach zone actions without complex layout bloat."
3
+ description: "Comprehensive Mobile & Responsive Engineering Standard. Zero horizontal viewport overflow, fluid CSS clamp typography, thumb-zone ergonomics, and cleanly scrollable data views without bloated media queries."
4
4
  license: MIT
5
5
  ---
6
6
 
7
- # ChillSlop Mobile: Responsive Engineering
7
+ # ChillSlop Mobile: Comprehensive Responsive Engineering Standard
8
8
 
9
- > *"A responsive design works everywhere by default, not through 50 media query overrides."*
9
+ > *"A responsive design works everywhere by default, not through 50 brittle media query overrides."*
10
10
 
11
- ## 1. Zero Horizontal Overflow
12
- - The viewport must never produce accidental horizontal scrollbars. Eliminate protruding widths and rigid pixel bounds.
13
- - Tables and wide code views must sit inside cleanly scrollable wrappers:
14
- `overflow-x: auto; -webkit-overflow-scrolling: touch;`
11
+ ---
12
+
13
+ ## 1. Zero Horizontal Overflow Mandate
14
+
15
+ - **The Rule:** The viewport must NEVER produce horizontal scrollbars (`overflow-x: hidden` on `<body>` is a lazy band-aid that hides layout defects; you must eliminate the protruding elements directly).
16
+ - **Causes & Fixes:**
17
+ - *Fixed Pixel Widths:* Never write `width: 600px`. Use `width: 100%; max-width: 600px;`.
18
+ - *Large Images / SVGs:* Ensure all images declare `max-width: 100%; height: auto;`.
19
+ - *Code Blocks & Data Tables:* Wrap tables and code views inside an explicit horizontal scrolling container:
20
+ ```css
21
+ .table-wrapper {
22
+ width: 100%;
23
+ overflow-x: auto;
24
+ -webkit-overflow-scrolling: touch;
25
+ border: 1px solid #26262E;
26
+ border-radius: 6px;
27
+ }
28
+ ```
29
+
30
+ ---
31
+
32
+ ## 2. Fluid Typography & The Modular Scale
33
+
34
+ Avoid massive static header font sizes that blow out mobile viewports. Use mathematical CSS `clamp()`:
35
+
36
+ ### Fluid Header Formulas
37
+ ```css
38
+ /* Responsive H1: 32px on 320px mobile up to 54px on 1280px desktop */
39
+ h1 {
40
+ font-size: clamp(2rem, 1.5rem + 2.5vw, 3.375rem);
41
+ line-height: 1.1;
42
+ letter-spacing: -0.025em;
43
+ }
44
+
45
+ /* Responsive H2: 24px on mobile up to 36px on desktop */
46
+ h2 {
47
+ font-size: clamp(1.5rem, 1.25rem + 1.25vw, 2.25rem);
48
+ line-height: 1.2;
49
+ }
15
50
 
16
- ## 2. Fluid Typography & Modular Scale
17
- - Avoid massive static header sizes on mobile (`font-size: 72px` breaking mobile screens).
18
- - Use CSS `clamp()` for fluid scaling:
19
- ```css
20
- h1 {
21
- font-size: clamp(2rem, 5vw + 1rem, 3.75rem);
22
- line-height: 1.1;
51
+ /* Responsive Body */
52
+ p, body {
53
+ font-size: 14px;
54
+ line-height: 1.6;
55
+ }
56
+ @media (min-width: 768px) {
57
+ p, body {
58
+ font-size: 15px;
23
59
  }
24
- ```
60
+ }
61
+ ```
62
+
63
+ ---
64
+
65
+ ## 3. Thumb-Zone Architecture & Safe Areas
66
+
67
+ ### Ergonomic Zones
68
+ On mobile devices, user thumbs naturally rest on the bottom third of the screen:
69
+ - **Bottom Navigation & Actions:** Place high-frequency buttons (Submit, Filter, Fork, Run) in a sticky bottom action bar or within easy thumb reach.
70
+ - **Top Bar:** Reserve the top navigation bar for secondary navigation links, search, and settings.
71
+
72
+ ### Hardware Safe Areas
73
+ Sticky bottom action bars and mobile drawers must respect mobile home indicators:
74
+ ```css
75
+ .bottom-action-bar {
76
+ position: sticky;
77
+ bottom: 0;
78
+ padding-bottom: max(12px, env(safe-area-inset-bottom));
79
+ background: rgba(16, 16, 20, 0.95);
80
+ backdrop-filter: blur(8px);
81
+ border-top: 1px solid #26262E;
82
+ }
83
+ ```
84
+
85
+ ---
86
+
87
+ ## 4. Mobile Breakpoints Architecture
88
+
89
+ Keep responsive logic lean. Do not declare 10 different media queries. Stick to 3 standard anchors:
25
90
 
26
- ## 3. Thumb-Zone Optimization
27
- - Primary navigation and destructive or frequent actions on mobile should sit within the comfortable bottom thumb-reach zone.
28
- - Sticky bottom action bars on mobile must respect `env(safe-area-inset-bottom)` to prevent clipping against home indicators.
91
+ | Breakpoint | Width | Target Layout |
92
+ |---|---|---|
93
+ | **Mobile** | `< 768px` | Single-column stacked layouts, bottom sheets, scrollable table containers. |
94
+ | **Tablet** | `768px - 1024px` | 2-column layouts, collapsible sidebars. |
95
+ | **Desktop**| `> 1024px` | Full multi-column workspaces, split diff inspectors, fixed navigation rails. |
@@ -1,41 +1,114 @@
1
1
  ---
2
2
  name: chill-slop-ui
3
- description: "High-Craft Visual Engineering & Minimalist UI Standard. Enforces Linear/Geist/Raycast monochrome discipline, purposeful typography, and clean semantic states while eliminating AI slop gradients and pill cards."
3
+ description: "Comprehensive Visual Engineering Standard. Deep carbon monochrome palettes, 1px hairline borders, tabular monospace data, asymmetric layout density, and zero generic AI gradients or pill cards."
4
4
  license: MIT
5
5
  ---
6
6
 
7
- # ChillSlop UI: High-Craft Visual Engineering
7
+ # ChillSlop UI: Comprehensive Visual Engineering Standard
8
8
 
9
9
  > *"Good design is as little design as possible. Less, but better — because it concentrates on the essential aspects."*
10
10
 
11
- ## 1. Palette & Surface Architecture
12
- - **Reject the Purple/Cyan Default:** Saturated violet-to-cyan mesh gradients are banned.
13
- - **Surface Elevation Hierarchy:** Build visual depth via distinct background shades and hairline borders, not muddy shadows:
14
- - Base Canvas: `#09090B` (Deep Carbon)
15
- - Secondary Panel: `#101014`
16
- - Interactive Elevated: `#16161C`
17
- - Hover Surface: `#1E1E26`
18
- - Hairline Border: `1px solid #26262E`
19
- - **Monochrome Foundation:** Build 90% of the UI in monochrome (carbon, zinc, white). Limit color strictly to semantic roles:
20
- - Emerald (`#10B981`): Success, verified cache hits, live connectivity.
21
- - Amber (`#F59E0B`): Pruned content, warnings, pending state.
22
- - Rose (`#F43F5E`): Circuit breakers, errors, destructive actions.
23
- - Indigo (`#818CF8`): Branched sessions, active tabs, navigation anchors.
24
-
25
- ## 2. Geometry & Spacing
26
- - **Border Radius Discipline:**
27
- - Micro badges, tags, code chips: `4px`
28
- - Buttons, inputs, dropdown items: `6px`
29
- - Modals, panels, code containers: `8px`
30
- - Maximum outer containers: `12px`
31
- - **Ban:** Universal `rounded-2xl` and `rounded-3xl` cards.
32
- - **Rhythm Over Magic Numbers:** Use strict modular spacing: `4px`, `8px`, `12px`, `16px`, `24px`, `32px`, `48px`, `64px`.
33
-
34
- ## 3. Component Architecture & Density
35
- - **Asymmetric Density:** Avoid the cliché 3 identical feature cards with centered icons and 2 lines of lorem ipsum. Use real data tables, inline previews, and asymmetric layouts.
36
- - **Tabular Monospace Metrics:** All numbers, counters, latencies, timestamps, and hashes must use `ui-monospace`, `JetBrains Mono`, or `font-variant-numeric: tabular-nums` to eliminate layout jitter.
37
- - **Affordance Clarity:** Interactive elements must have visible hover states, clear pressed states, and distinct disabled opacity (`0.45` with `cursor: not-allowed`).
38
-
39
- ## 4. Animation & Motion
40
- - Fast, purposeful, non-distracting motion: `duration: 120ms` to `180ms`, easing `cubic-bezier(0.16, 1, 0.3, 1)`.
41
- - Motion is strictly spatial (drawers sliding in from anchor, dropdown expansion). Never animate elements just to show off CSS transitions.
11
+ ---
12
+
13
+ ## 1. Color Architecture & Surface Hierarchy
14
+
15
+ ### The Monochromatic Foundation
16
+ Build 90% of the interface in crisp monochromatic shades. This grounds the interface and lets content stand out:
17
+
18
+ | Layer | Hex Value | Purpose |
19
+ |---|---|---|
20
+ | **Canvas Background** | `#09090B` | Base canvas. Deep obsidian carbon, non-reflective. |
21
+ | **Panel Surface** | `#111114` | Sidebars, section containers, grouped blocks. |
22
+ | **Interactive Surface** | `#16161C` | Cards, table headers, text inputs, inactive buttons. |
23
+ | **Active / Hover Surface**| `#1E1E26` | Interactive hover targets, selected tabs. |
24
+ | **Hairline Border** | `#26262E` | 1px crisp separation lines. Never use blurry shadows for borders. |
25
+ | **Focus / Active Border** | `#3F3F4E` | Focus indicators, active cards, highlighted inputs. |
26
+
27
+ ### Semantic Accent Discipline
28
+ Bright colors are strictly functional signals, never background wallpaper:
29
+ - **Emerald (`#10B981`):** Cache hits, active streams, verified statuses, low latencies.
30
+ - **Amber (`#F59E0B`):** Pruned content, warnings, pending transactions, rate-limits.
31
+ - **Rose (`#F43F5E`):** Circuit breakers, fatal errors, destructive actions, high drop-off.
32
+ - **Indigo (`#818CF8`):** Branched DAG sessions, active tabs, navigation anchors.
33
+
34
+ > **Dose Cap Rule:** No single screen may use more than 1 semantic accent color as a dominant highlight. A page painted with emerald borders, indigo buttons, and amber cards is rejected as AI Slop.
35
+
36
+ ---
37
+
38
+ ## 2. Geometry, Elevation & Spacing
39
+
40
+ ### Border Radius Hierarchy
41
+ Never make every element on the screen a pill bubble (`rounded-3xl` / `rounded-full`). Follow a strict radius scale:
42
+ - **Tags, Micro-Badges, Code Chips:** `4px`
43
+ - **Buttons, Text Inputs, Dropdown Items:** `6px`
44
+ - **Cards, Panels, Modals, Code Blocks:** `8px`
45
+ - **Outer Shell / Max Container:** `12px` (Never exceed `12px` for desktop utility interfaces).
46
+
47
+ ### Depth Through Hairline Borders (No Muddy Shadows)
48
+ - Replace 20px-30px blurred ambient shadows with:
49
+ `border: 1px solid #26262E;`
50
+ - For elevated modal popups or floating dropdowns, use tight micro-ambient elevation:
51
+ `box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), 0 0 0 1px #26262E;`
52
+
53
+ ### Modular Spacing Scale
54
+ Never use arbitrary padding or margins (e.g. `margin-top: 19px`). Follow the 4px/8px modular rhythm:
55
+ `4px` → `8px` → `12px` → `16px` → `24px` → `32px` → `48px` → `64px` → `96px`.
56
+
57
+ ---
58
+
59
+ ## 3. Typography & Numerals
60
+
61
+ ### Font Pairing Rules
62
+ - **Sans Display & Body:** Inter, Geist Sans, -apple-system, BlinkMacSystemFont, Roboto.
63
+ - **Data, Metrics, Code & Hashes:** JetBrains Mono, Fira Code, SF Mono, ui-monospace.
64
+ - **Letter Spacing:**
65
+ - Large Section Headers (>= 28px): `letter-spacing: -0.025em;`
66
+ - Body Text: `letter-spacing: normal;`
67
+ - Uppercase Metadata Badges (<= 11px): `letter-spacing: +0.05em; text-transform: uppercase;`
68
+
69
+ ### The Tabular Monospace Mandate
70
+ Every timestamp, latency number, hash string, currency value, token counter, and percentage **MUST** use a monospace font or:
71
+ `font-variant-numeric: tabular-nums;`
72
+ *Why:* Proportional fonts cause layout shifting and jitter when real-time numbers update.
73
+
74
+ ---
75
+
76
+ ## 4. Component Engineering Patterns
77
+
78
+ ### Feature Sections (Breaking the 3-Card Cliche)
79
+ - **FORBIDDEN:** 3 identical feature cards with a centered circle icon, bold title, and 2 lines of lorem ipsum.
80
+ - **REQUIRED:** Asymmetric density:
81
+ - Card 1: Interactive live code preview or syntax block.
82
+ - Card 2: High-density tabular telemetry feed.
83
+ - Card 3: Split-screen flow diagram with step connectors.
84
+
85
+ ### Buttons & Controls
86
+ - **Minimum Tap Target:** Mobile tap targets must measure at least `44x44px` (desktop compact controls may be `32px` to `36px` height with generous click padding).
87
+ - **Cursor Affordance:**
88
+ - Enabled: `cursor: pointer;`
89
+ - Disabled: `cursor: not-allowed; opacity: 0.45;`
90
+ - **Focus Rings:**
91
+ `outline: 2px solid #818CF8; outline-offset: 2px;`
92
+ Never ship `outline: none` without providing this high-visibility ring.
93
+
94
+ ### Data Tables
95
+ - Always use zebra-striping or 1px hairline dividers: `border-bottom: 1px solid #26262E`.
96
+ - Numeric columns must align **Right**. Text columns align **Left**. Status badges align **Center**.
97
+
98
+ ---
99
+
100
+ ## 5. Motion & Kinetic Physics
101
+
102
+ - **Timing Range:** `120ms` to `180ms` for micro-interactions (hovers, clicks); `220ms` to `280ms` for spatial transitions (drawers, dialogs).
103
+ - **Easing Curve:** `cubic-bezier(0.16, 1, 0.3, 1)` (Deceleration curve for crisp, tactile snap).
104
+ - **Reduced Motion Support:**
105
+ ```css
106
+ @media (prefers-reduced-motion: reduce) {
107
+ *, ::before, ::after {
108
+ animation-duration: 0.01ms !important;
109
+ animation-iteration-count: 1 !important;
110
+ transition-duration: 0.01ms !important;
111
+ scroll-behavior: auto !important;
112
+ }
113
+ }
114
+ ```
@@ -0,0 +1,181 @@
1
+ # Core Web Vitals (LCP, INP, CLS)
2
+
3
+ > Reference for antislop. Adapted from the MIT-licensed web-quality-skills by Addy Osmani (https://github.com/addyosmani/web-quality-skills); see LICENSE-web-quality-skills in the skill folder.
4
+
5
+ Targeted optimization for the three Core Web Vitals using field data to identify user impact and browser traces to diagnose causes.
6
+
7
+ ## Measure before optimizing
8
+
9
+ When a runnable URL is available, prefer this sequence:
10
+
11
+ 1. Check page-level CrUX p75 data, with a clearly labeled origin fallback when page data is unavailable.
12
+ 2. Record a browser performance trace under stated conditions. With Chrome DevTools MCP, trace summaries can include CrUX alongside the observed lab metrics.
13
+ 3. Analyze only the insights associated with the failing metric, then inspect the implicated code and resources.
14
+ 4. Re-run equivalent lab measurements after the fix. Do not claim an immediate field improvement; CrUX and first-party RUM need new user visits.
15
+
16
+ If only source code is available, identify likely causes but do not claim that LCP, INP, or CLS is failing without runtime evidence.
17
+
18
+ ## The three metrics
19
+
20
+ | Metric | Measures | Good | Needs work | Poor |
21
+ |--------|----------|------|------------|------|
22
+ | **LCP** | Loading | ≤ 2.5s | 2.5s to 4s | > 4s |
23
+ | **INP** | Interactivity | ≤ 200ms | 200ms to 500ms | > 500ms |
24
+ | **CLS** | Visual Stability | ≤ 0.1 | 0.1 to 0.25 | > 0.25 |
25
+
26
+ Google measures at the **75th percentile**: 75% of page visits must meet "Good" thresholds.
27
+
28
+ These are the numbers R-40 keeps out of the Hard Gate. They describe real visits, so compare a page against them only with a real measurement in hand, and report "not measured" otherwise (R-36).
29
+
30
+ ---
31
+
32
+ ## LCP: Largest Contentful Paint
33
+
34
+ LCP measures when the largest visible content element renders. Usually this is:
35
+ - Hero image or video
36
+ - Large text block
37
+ - Background image
38
+ - `<svg>` element
39
+
40
+ ### Common LCP issues
41
+
42
+ **1. Slow server response (TTFB > 800ms)**
43
+ ```
44
+ Fix: CDN, caching, optimized backend, edge rendering
45
+ ```
46
+
47
+ **2. Render-blocking resources**
48
+ ```html
49
+ <!-- ❌ Blocks rendering -->
50
+ <link rel="stylesheet" href="/all-styles.css">
51
+
52
+ <!-- ✅ Critical CSS inlined, rest deferred -->
53
+ <style>/* Critical above-fold CSS */</style>
54
+ <link rel="preload" href="/styles.css" as="style"
55
+ onload="this.onload=null;this.rel='stylesheet'">
56
+ ```
57
+
58
+ **3. Slow resource load times**
59
+ ```html
60
+ <!-- ❌ LCP image is discovered only after a stylesheet loads -->
61
+ <div class="hero"></div>
62
+
63
+ <!-- ✅ Discoverable in initial HTML and prioritized -->
64
+ <link rel="preload" href="/hero.webp" as="image" fetchpriority="high">
65
+ <img src="/hero.webp" alt="Hero" fetchpriority="high">
66
+ ```
67
+
68
+ Prefer a discoverable `<img>` with `fetchpriority="high"`. Add the preload only when the trace shows that the resource would otherwise be discovered late; duplicate or speculative preloads can compete for bandwidth.
69
+
70
+ **4. Client-side rendering delays**
71
+ ```javascript
72
+ // ❌ Content loads after JavaScript
73
+ useEffect(() => {
74
+ fetch('/api/hero-text').then(r => r.json()).then(setHeroText);
75
+ }, []);
76
+
77
+ // ✅ Server-side or static rendering
78
+ // Use SSR, SSG, or streaming to send HTML with content
79
+ export async function getServerSideProps() {
80
+ const heroText = await fetchHeroText();
81
+ return { props: { heroText } };
82
+ }
83
+ ```
84
+
85
+ **5. Make navigations instant with the Speculation Rules API**
86
+
87
+ For sites with predictable same-origin journeys, prerendering a likely next page can make a successful subsequent navigation much faster. Treat this as a measured navigation optimization, not a substitute for fixing the current page's LCP.
88
+
89
+ ```html
90
+ <script type="speculationrules">
91
+ {
92
+ "prerender": [{
93
+ "where": { "href_matches": "/*" },
94
+ "eagerness": "moderate"
95
+ }]
96
+ }
97
+ </script>
98
+ ```
99
+
100
+ Current Chrome behavior is specific enough to guide the choice:
101
+
102
+ | `eagerness` | Trigger |
103
+ |-------------|---------|
104
+ | `conservative` | Pointer or touch down |
105
+ | `moderate` | Desktop: 200ms hover, or earlier pointer down; mobile: viewport heuristics |
106
+ | `eager` | Chrome 143+: desktop 10ms hover; mobile 50ms after the anchor enters the viewport |
107
+ | `immediate` | As soon as the rules are observed |
108
+
109
+ Start conservatively and measure prediction hit rate, transferred bytes, server load, and navigation improvement before expanding the rules. Recheck [Chrome's maintained eagerness documentation](https://developer.chrome.com/docs/web-platform/prerender-pages#eagerness) before hardcoding timing-sensitive behavior.
110
+
111
+ Caveats:
112
+ - **Bandwidth/CPU cost.** Each prerender is roughly a full page load. Scope `where` carefully (`href_matches` patterns, exclude logout/checkout) and avoid `immediate` outside small sites.
113
+ - **Side effects fire early.** Analytics, ads, and any code that runs on load will fire when the prerender starts, not when the user navigates. Gate side effects on the [`prerenderingchange` event](https://developer.chrome.com/docs/web-platform/prerender-pages#detect_when_a_page_is_prerendered_or_used_for_a_full_navigation) or `document.prerendering`.
114
+ - **Chromium-only.** Safari and Firefox ignore the script, it's a progressive enhancement, never a regression.
115
+
116
+ ### LCP optimization checklist
117
+
118
+ ```markdown
119
+ - [ ] TTFB < 800ms (use CDN, edge caching)
120
+ - [ ] LCP resource is discoverable in initial HTML and prioritized; preload only if the trace shows late discovery
121
+ - [ ] LCP image optimized (WebP/AVIF, correct size)
122
+ - [ ] Critical CSS inlined (< 14KB)
123
+ - [ ] No render-blocking JavaScript in <head>
124
+ - [ ] Fonts don't block text rendering (font-display: swap)
125
+ - [ ] LCP element in initial HTML (not JS-rendered)
126
+ - [ ] Speculation Rules added for likely-next navigations (moderate eagerness)
127
+ ```
128
+
129
+ ### LCP element identification
130
+
131
+ This snippet diagnoses the current page session. It is not field data.
132
+
133
+ ```javascript
134
+ // Find your LCP element
135
+ new PerformanceObserver((list) => {
136
+ const entries = list.getEntries();
137
+ const lastEntry = entries[entries.length - 1];
138
+ console.log('LCP element:', lastEntry.element);
139
+ console.log('LCP time:', lastEntry.startTime);
140
+ }).observe({ type: 'largest-contentful-paint', buffered: true });
141
+ ```
142
+
143
+ ---
144
+
145
+ ## INP: Interaction to Next Paint
146
+
147
+ INP measures responsiveness across clicks, taps, and key presses during a visit. Diagnose its input delay, processing time, and presentation delay separately; a slow interaction may involve main-thread contention before the handler, expensive application work, or delayed rendering after it.
148
+
149
+ When field INP is poor or a trace identifies a slow interaction, read [web.dev on optimizing INP](https://web.dev/articles/optimize-inp) for trace interpretation, yielding patterns, and third-party and rendering causes.
150
+
151
+ ---
152
+
153
+ ## CLS: Cumulative Layout Shift
154
+
155
+ CLS measures unexpected layout shifts across a page visit. Use field attribution or a trace to identify the shifted node and the trigger; do not assume the visible victim caused the shift.
156
+
157
+ When field CLS is poor or a trace reports shifts, read [web.dev on optimizing CLS](https://web.dev/articles/optimize-cls) for reserved-space patterns, dynamic content, and font and animation fixes.
158
+
159
+ ---
160
+
161
+ ## Measurement sources
162
+
163
+ | Source | Use |
164
+ |--------|-----|
165
+ | Browser performance trace (Chrome DevTools MCP: `performance_start_trace`) | Observe one load or interaction and diagnose focused insights; use included CrUX context when available |
166
+ | CrUX or Search Console | Prioritize aggregated real-user outcomes at p75 |
167
+ | Lighthouse CLI or PageSpeed Insights | Controlled lab fallback when DevTools tools are unavailable |
168
+ | First-party RUM | Segment current production experience by route, device, release, and attribution |
169
+ | Raw `PerformanceObserver` | Inspect one page session during debugging |
170
+
171
+ Do not route performance through Chrome DevTools MCP's `lighthouse_audit`; that capability intentionally covers non-performance Lighthouse categories. Do not compare a single lab value directly with a field p75 as if they were equivalent samples.
172
+
173
+ When adding or reviewing production collection, read [the `web-vitals` library documentation](https://github.com/GoogleChrome/web-vitals). Prefer the `web-vitals` library because raw browser APIs do not by themselves implement every Core Web Vital's lifecycle and reporting rules.
174
+
175
+ ---
176
+
177
+ ## References
178
+
179
+ - [web.dev LCP](https://web.dev/articles/lcp) and [optimizing LCP](https://web.dev/articles/optimize-lcp)
180
+ - [web.dev INP](https://web.dev/articles/inp)
181
+ - [web.dev CLS](https://web.dev/articles/cls)
@@ -0,0 +1,28 @@
1
+ # Web Baseline
2
+
3
+ > Reference for antislop. Adapted from the MIT-licensed web-quality-skills by Addy Osmani (https://github.com/addyosmani/web-quality-skills); see LICENSE-web-quality-skills in the skill folder.
4
+
5
+ Page basics and security defaults. This is an optional checklist, not a Hard Gate rule: run it when the task asks for a production-ready page or a web-quality review. None of it shows in a screenshot, which is why it is easy to skip.
6
+
7
+ ## Document basics
8
+
9
+ - `<!doctype html>` first, so the page never renders in quirks mode.
10
+ - `<meta charset="utf-8">` first in `<head>`.
11
+ - `<meta name="viewport" content="width=device-width, initial-scale=1">` (zoom stays allowed, R-39).
12
+ - Valid, semantic HTML with no duplicate `id`.
13
+
14
+ ## Runtime
15
+
16
+ Console errors are already R-35.
17
+
18
+ - No deprecated APIs: `document.write`, synchronous XHR, `unload` listeners.
19
+ - Scroll and touch listeners are `{ passive: true }` where they do not call `preventDefault`.
20
+
21
+ ## Security defaults
22
+
23
+ - HTTPS for every resource, with no mixed `http://` content.
24
+ - External links opened in a new tab carry `rel="noopener noreferrer"`.
25
+ - No secrets, API keys, or tokens in client code; they stay on the server.
26
+ - `textContent` or a sanitizer instead of `innerHTML` or `eval` with untrusted input.
27
+ - Third-party scripts and styles from a CDN you do not control are pinned with Subresource Integrity.
28
+ - Permissions (location, notifications, camera) are requested after a user action, never on page load.
package/src/auditor.js CHANGED
@@ -29,6 +29,14 @@ const SLOP_PATTERNS = [
29
29
  name: 'Excessive Glassmorphic Blur',
30
30
  fix: 'Ensure backdrop-blur is not stacked across cards, modals, and navbars simultaneously.'
31
31
  },
32
+ {
33
+ id: 'VISUAL-04',
34
+ category: 'Visual Slop',
35
+ severity: 'MEDIUM',
36
+ regex: /body\s*\{[^}]*overflow-x\s*:\s*hidden/i,
37
+ name: 'Lazy Body Overflow Masking',
38
+ fix: 'Do not use overflow-x: hidden on body to mask layout bugs. Eliminate the protruding element width directly.'
39
+ },
32
40
 
33
41
  // 2. Over-Engineering & Bloat (Ponytail Minimalism)
34
42
  {
@@ -73,6 +81,14 @@ const SLOP_PATTERNS = [
73
81
  name: 'Hallucinated Social Proof',
74
82
  fix: 'Cite verified customer metrics or remove synthetic testimonials entirely.'
75
83
  },
84
+ {
85
+ id: 'COPY-04',
86
+ category: 'Copywriting Slop',
87
+ severity: 'MEDIUM',
88
+ regex: /—/u,
89
+ name: 'Em Dash (—) AI Writing Tic',
90
+ fix: 'R-02 rule: replace em dash with comma, period, colon, or parentheses.'
91
+ },
76
92
 
77
93
  // 4. Code Hygiene Slop
78
94
  {