unslop-mcp 1.2.0 → 2.0.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 (55) hide show
  1. package/CITATION.cff +5 -5
  2. package/README.md +161 -249
  3. package/SKILL.md +173 -72
  4. package/dist/bin/unslop.d.ts +3 -1
  5. package/dist/bin/unslop.d.ts.map +1 -1
  6. package/dist/bin/unslop.js +377 -332
  7. package/dist/bin/unslop.js.map +1 -1
  8. package/dist/src/analyzer/design-craft.d.ts +38 -0
  9. package/dist/src/analyzer/design-craft.d.ts.map +1 -0
  10. package/dist/src/analyzer/design-craft.js +611 -0
  11. package/dist/src/analyzer/design-craft.js.map +1 -0
  12. package/dist/src/analyzer/refactor-plan.d.ts +49 -0
  13. package/dist/src/analyzer/refactor-plan.d.ts.map +1 -0
  14. package/dist/src/analyzer/refactor-plan.js +229 -0
  15. package/dist/src/analyzer/refactor-plan.js.map +1 -0
  16. package/dist/src/analyzer/slop-detector.d.ts +10 -2
  17. package/dist/src/analyzer/slop-detector.d.ts.map +1 -1
  18. package/dist/src/analyzer/slop-detector.js +31 -8
  19. package/dist/src/analyzer/slop-detector.js.map +1 -1
  20. package/dist/src/extractor/extract-dna.js +1 -1
  21. package/dist/src/extractor/extract-dna.js.map +1 -1
  22. package/dist/src/mcp/server.d.ts.map +1 -1
  23. package/dist/src/mcp/server.js +40 -2
  24. package/dist/src/mcp/server.js.map +1 -1
  25. package/dist/src/presets/anthropic-warm-editorial.json +122 -0
  26. package/dist/src/presets/bloomberg-terminal-dense.json +104 -0
  27. package/dist/src/presets/fintech-institutional.json +104 -0
  28. package/dist/src/presets/index.d.ts +20 -1
  29. package/dist/src/presets/index.d.ts.map +1 -1
  30. package/dist/src/presets/index.js +55 -4
  31. package/dist/src/presets/index.js.map +1 -1
  32. package/dist/src/presets/linear-precision.json +104 -0
  33. package/dist/src/presets/neo-brutalist-craft.json +122 -0
  34. package/dist/src/presets/raycast-command.json +108 -0
  35. package/dist/src/presets/stripe-atmospheric.json +120 -0
  36. package/dist/src/presets/swiss-editorial.json +122 -0
  37. package/dist/src/presets/teenage-engineering.json +120 -0
  38. package/dist/src/presets/vercel-monochrome.json +120 -0
  39. package/dist/src/sync/rule-writer.d.ts +1 -1
  40. package/dist/src/sync/rule-writer.d.ts.map +1 -1
  41. package/dist/src/sync/rule-writer.js +8 -5
  42. package/dist/src/sync/rule-writer.js.map +1 -1
  43. package/dist/src/sync/token-exporter.d.ts +12 -0
  44. package/dist/src/sync/token-exporter.d.ts.map +1 -1
  45. package/dist/src/sync/token-exporter.js +176 -6
  46. package/dist/src/sync/token-exporter.js.map +1 -1
  47. package/dist/src/version.d.ts +2 -2
  48. package/dist/src/version.d.ts.map +1 -1
  49. package/dist/src/version.js +5 -2
  50. package/dist/src/version.js.map +1 -1
  51. package/glama.json +64 -13
  52. package/package.json +116 -110
  53. package/scripts/build.mjs +23 -6
  54. package/server.json +21 -8
  55. package/smithery.yaml +1 -1
package/CITATION.cff CHANGED
@@ -1,19 +1,19 @@
1
1
  cff-version: 1.2.0
2
2
  message: If you use this software, please cite it using these metadata.
3
- title: "unslop: Studio-grade design systems and anti-slop MCP tools"
3
+ title: "unslop: 7-Pillar UI/UX Design Engineering CLI and MCP Server"
4
4
  type: software
5
5
  authors:
6
6
  - name: VibeFoundry
7
7
  website: https://github.com/avivgerz-hue
8
- version: 1.2.0
8
+ version: 2.0.0
9
9
  date-released: "2026-11-07"
10
10
  license: MIT
11
11
  repository-code: https://github.com/avivgerz-hue/unslop
12
12
  url: https://github.com/avivgerz-hue/unslop
13
13
  abstract: >-
14
- unslop is a zero-runtime-dependency MCP server and CLI for auditing AI-generated
15
- interfaces, extracting versioned Design DNA, and applying complete design-system
16
- presets with real Tailwind CSS v4 tokens and WCAG contrast checks.
14
+ unslop is a zero-runtime-dependency MCP server, CLI, and Agent Skill with 72
15
+ design engineering rules, 10 studio archetypes, exact WCAG and perceptual checks,
16
+ multi-format token exports, and prioritized Design Transformation Blueprints.
17
17
  keywords:
18
18
  - model-context-protocol
19
19
  - mcp-server
package/README.md CHANGED
@@ -1,367 +1,279 @@
1
- # unslop
1
+ # unslop v2.0.0
2
2
 
3
- **Your agent can write the code. Stop letting it ship the same AI interface.**
3
+ **Your agent can write the code. unslop gives it a measurable design engineering protocol.**
4
4
 
5
+ [![npm version](https://img.shields.io/npm/v/unslop-mcp.svg)](https://www.npmjs.com/package/unslop-mcp)
6
+ [![npm downloads](https://img.shields.io/npm/dm/unslop-mcp.svg)](https://www.npmjs.com/package/unslop-mcp)
5
7
  [![CI](https://github.com/avivgerz-hue/unslop/actions/workflows/ci.yml/badge.svg)](https://github.com/avivgerz-hue/unslop/actions/workflows/ci.yml)
6
- [![npm version](https://img.shields.io/npm/v/unslop.svg)](https://www.npmjs.com/package/unslop)
7
8
  [![Node.js 20.19+](https://img.shields.io/badge/node-%3E%3D20.19-3c873a)](https://nodejs.org/)
8
9
  [![MIT license](https://img.shields.io/badge/license-MIT-111111)](LICENSE)
9
10
 
10
11
  ![unslop preview](./assets/hero-preview.svg)
11
12
 
12
- `unslop` is a zero-runtime-dependency CLI, native MCP server, and installable Agent Skill that gives coding agents a real design system, audits frontend source for generic AI patterns and WCAG contrast failures, exports Tailwind v4 tokens, and turns live interfaces into enforceable Design DNA.
13
+ `unslop` is a zero-runtime-dependency **UI/UX Design Engineering CLI, native MCP Server, and AI Agent Skill**. It audits 72 rules across seven design craft pillars, installs ten studio-grade archetypes, extracts Design DNA, exports four token formats, and turns every finding into an exact, prioritized transformation blueprint for JSX/TSX, HTML, Vue, Svelte, CSS, and Tailwind codebases.
13
14
 
14
15
  Works with **Claude Code, OpenAI Codex, Cursor, Windsurf, Cline**, and any agent that reads project instructions.
15
16
 
16
17
  ![Before and after unslop: a generic purple-gradient AI landing page transformed into a precise, token-driven Linear Dark dashboard](https://raw.githubusercontent.com/avivgerz-hue/unslop/main/docs/assets/before-after-unslop.png)
17
18
 
18
19
  ```bash
19
- npx github:avivgerz-hue/unslop init
20
+ npx -y unslop-mcp init --preset linear-precision
21
+ npx -y unslop-mcp audit .
22
+ npx -y unslop-mcp refactor-plan . --report UNSLOP-REPORT.md
20
23
  ```
21
24
 
22
- That one command installs the `linear-dark` design contract into `.claude/skills/unslop/SKILL.md`, `CLAUDE.md`, `AGENTS.md`, `.cursorrules`, `.windsurfrules`, and `.clinerules`, then merges the native server into `.mcp.json`. Existing instructions and unrelated MCP servers are preserved.
25
+ The result is not a generic prompt. It is a versioned token contract, a **Design Craft Score from 0–100**, a seven-pillar scorecard, exact before/after translations, and file-level steps your agent can execute in one coherent pass.
23
26
 
24
- ## The difference
27
+ ## v2 at a glance
25
28
 
26
- ```text
27
- BEFORE: probabilistic taste AFTER: enforceable design physics
28
- ────────────────────────────────────── ──────────────────────────────────────
29
- “Make it modern and beautiful.” 4px grid · semantic surface hierarchy
30
- ↓ ↓
31
- centered purple-gradient hero 12-column content-driven composition
32
- ↓ ↓
33
- three centered emoji cards tight display type · 45–75ch body measure
34
- ↓ ↓
35
- shadow-xl + rounded-2xl everywhere hairline borders · intentional elevation
36
- ↓ ↓
37
- another interchangeable AI page auditable tokens + complete UI states
38
- ```
39
-
40
- `unslop` does not ask a model to be more creative. It constrains the implementation with explicit typography, geometry, color roles, elevation, motion, and verification loops.
41
-
42
- ## Why teams install it
43
-
44
- - **Installable taste, not a prompt snippet.** Five complete, versioned presets compile to CSS variables and strict agent laws.
45
- - **Deterministic anti-slop audit.** Scan TSX, JSX, Vue, Svelte, HTML, and CSS with exact `file:line:column` diagnostics.
46
- - **Mathematical WCAG 2.1 checks.** Real sRGB relative luminance, alpha compositing, and normal/large-text thresholds—not approximate color heuristics.
47
- - **Native MCP tools.** Audit, extract DNA, and apply presets directly from Claude Code, Claude Desktop, Cursor, or Codex over JSON-RPC 2.0 stdio.
48
- - **Tailwind v4 token export.** Generate `@theme`, `:root`, and `.dark` contracts from any built-in preset or extracted Design DNA.
49
- - **A score your agent can act on.** Every audit includes a structured refactoring brief and acceptance criteria.
50
- - **Extract real Design DNA.** Read local CSS or a live URL, including inline styles, linked stylesheets, and `@import` graphs.
51
- - **No runtime dependency footprint.** Node.js built-ins do the analysis, extraction, synchronization, MCP transport, and CLI work.
52
- - **Safe to re-run.** Managed blocks are idempotent; your existing agent instructions and MCP servers remain intact.
29
+ | Capability | v2 contract |
30
+ | --- | --- |
31
+ | Design Craft Engine | **72 rules · 7 pillars · A+–F grades** |
32
+ | Color analysis | Exact **WCAG 2.1 AA/AAA** plus **APCA-inspired perceptual checks** |
33
+ | Studio archetypes | **10** complete production design systems; five v1 IDs remain compatible |
34
+ | Token formats | Tailwind v4 `@theme`, Tailwind v3 config, CSS custom properties, W3C Design Tokens JSON |
35
+ | Transformation | `refactor-plan` CLI and `unslop_refactor_plan` MCP tool generate `UNSLOP-REPORT.md` |
36
+ | Agent protocol | Five-step principal UI/UX design engineer [`SKILL.md`](SKILL.md) |
37
+ | Runtime | Node.js 20.19+, JSON-RPC 2.0 stdio, **zero runtime dependencies** |
53
38
 
54
- ## Quickstart
39
+ ## The 7-Pillar Design Craft Engine
55
40
 
56
- ### 1. Choose a design system
41
+ Run a deterministic baseline before letting an agent rewrite the interface:
57
42
 
58
43
  ```bash
59
- npx github:avivgerz-hue/unslop init --preset linear-dark
44
+ npx -y unslop-mcp audit . --json
60
45
  ```
61
46
 
62
47
  ```text
63
- Installed the linear-dark design system:
64
- created .claude/skills/unslop/SKILL.md
65
- created CLAUDE.md
66
- created AGENTS.md
67
- created .cursorrules
68
- created .windsurfrules
69
- created .clinerules
70
- created .mcp.json
71
-
72
- Next: run npx github:avivgerz-hue/unslop audit . before your agent writes more UI.
48
+ Design Craft Score: 78/100 (C)
49
+ 7-Pillar Scorecard:
50
+ Color & Contrast: 82/100 (B) · 3 findings
51
+ Typography & Hierarchy: 76/100 (C) · 4 findings
52
+ Layout & Spatial Rhythm: 70/100 (C) · 5 findings
53
+ Surface & Elevation: 88/100 (B) · 2 findings
54
+ Copy & Microcopy: 82/100 (B) · 3 findings
55
+ Interaction & Motion: 58/100 (F) · 7 findings
56
+ Theme & Token Architecture: 90/100 (A) · 2 findings
73
57
  ```
74
58
 
75
- Then ask your agent:
59
+ | Pillar | Canonical rules | What the engine detects |
60
+ | --- | --- | --- |
61
+ | **1 · Color, Atmospheric Polarity & Contrast Math** | `SLOP-COLOR-*` | Purple/pink/indigo clone gradients, neon glows, absolute black/white glare, muddy grays, hardcoded component colors, low-opacity text, exact WCAG AA/AAA, APCA-inspired polarity |
62
+ | **2 · Typography & Scannable Hierarchy** | `SLOP-TYPE-*` | Fixed display scales, monotonous heading weights, paragraphs beyond readable measure, missing `tabular-nums`, cramped body leading, loose display leading, untracked uppercase labels |
63
+ | **3 · Layout, Spatial Rhythm & Grid Craft** | `SLOP-LAYOUT-*` | Centered three-card clones, nested cards, off-grid arbitrary values, excessive container rounding, arbitrary grids, missing content measures, conflicting spacing and radii |
64
+ | **4 · Visual Restraint & Surface Elevation** | `SLOP-SURFACE-*` | Glassmorphism overuse, heavy dark-mode shadows, decorative blur blobs, icon badge clutter, unanchored raw elevation, ad-hoc shadow stacks |
65
+ | **5 · Copywriting & Microcopy Anti-Slop** | `SLOP-COPY-*` | 100+ cliché variants, including “Unleash the power,” “Revolutionize,” “Supercharge your workflow,” “Seamless integration,” “Next-generation,” hype, filler, superlatives, and emoji spam |
66
+ | **6 · Interactive Ergonomics, Motion & States** | `SLOP-UX-*` | Clickable divs, missing labels and keyboard rings, incomplete hover/active/disabled states, small targets, positive `tabindex`, `transition-all`, missing reduced-motion behavior |
67
+ | **7 · Theme Parity & Token Architecture** | `SLOP-TOKEN-*` | Broken Canvas → Surface-1 → Surface-2 → Interactive → Border order, asymmetric dark overrides, missing dark companions, off-grid or mistyped tokens |
68
+
69
+ Legacy `slop/*` IDs remain in output for compatibility. Canonical `SLOP-*` findings drive the v2 seven-pillar score, with location-level deduplication so compatibility output does not double-penalize a finding.
76
70
 
77
- > Build the settings page using the unslop contract. Reuse the semantic tokens, implement every interaction state, run the audit, and resolve each finding.
71
+ ### Scores with an action attached
78
72
 
79
- ### 2. Audit the interface
73
+ Every audit includes exact `file:line:column` diagnostics and refactoring instructions. The overall score is the rounded mean of seven independently capped pillar scores; **95–100 is A+**. Use `--fail-under` in CI or agent loops:
80
74
 
81
75
  ```bash
82
- npx github:avivgerz-hue/unslop audit src
76
+ npx -y unslop-mcp audit . --fail-under 95
77
+ npx -y unslop-mcp audit . --prompt
78
+ npx -y unslop-mcp audit src --json --no-fail
83
79
  ```
84
80
 
85
- ```text
86
- src/components/Hero.tsx:4:7 WARNING slop/cliche-gradient
87
- Cliché purple/indigo AI gradient stop detected.
88
- Fix: Replace the gradient with a deliberate solid accent ...
81
+ Static analysis never replaces rendered verification. Keyboard operation, responsive behavior, actual contrast, content overflow, and reduced motion still need explicit inspection.
89
82
 
90
- src/components/Metric.tsx:8:5 WARNING slop/numeric-alignment
91
- Numeric UI is missing tabular figures, causing unstable alignment.
83
+ ## Design Transformation Blueprint
92
84
 
93
- Design Integrity Score: 86/100 (B)
94
- ```
95
-
96
- The full output also contains a copy-ready refactoring prompt. Machine-readable output is one flag away:
85
+ `unslop_refactor_plan` turns the audit into an executable **Design Transformation Blueprint** instead of a list of vague taste suggestions:
97
86
 
98
87
  ```bash
99
- npx github:avivgerz-hue/unslop audit . --json
100
- npx github:avivgerz-hue/unslop audit . --prompt
101
- npx github:avivgerz-hue/unslop audit . --fail-under 90
102
- npx github:avivgerz-hue/unslop audit . --no-fail
88
+ npx -y unslop-mcp refactor-plan . --preset linear-precision --report UNSLOP-REPORT.md
103
89
  ```
104
90
 
105
- By default, an audit exits `1` when it finds violations and `0` when clean. Invalid usage exits `2`. Unsupported or empty directories still produce a valid report with zero scanned files.
91
+ The report contains:
92
+
93
+ 1. **Design Craft Score and 7-Pillar Scorecard.**
94
+ 2. **Before → After Class & Token Translation Table** mapping detected classes, hex/RGB literals, off-grid values, and cliché copy to exact replacements from the selected archetype.
95
+ 3. **Prioritized P0/P1/P2 file:line steps** covering the entire interface transformation.
96
+ 4. **Acceptance criteria** for reaching 95–100 without suppressing rules or losing accessible states.
97
+
98
+ Example translations:
106
99
 
107
- ### 3. Extract a visual language
100
+ | Before | After |
101
+ | --- | --- |
102
+ | `from-purple-500 via-pink-500 to-indigo-500` | `bg-[var(--surface-1)] text-[var(--text-primary)]` |
103
+ | `shadow-xl` | `border border-[var(--border-subtle)] shadow-[var(--shadow-md)]` |
104
+ | `p-[13px]` | `p-[var(--spacing-12)]` |
105
+ | `rounded-3xl` | `rounded-[var(--radius-lg)]` |
106
+ | `transition-all` | `transition-colors motion-reduce:transition-none` |
107
+ | `#777777` | `var(--text-primary)` |
108
+ | “Unleash the power” | A concrete product capability and verifiable user outcome |
108
109
 
109
- From a local stylesheet:
110
+ Use `--json` for the complete machine-readable blueprint:
110
111
 
111
112
  ```bash
112
- npx github:avivgerz-hue/unslop extract ./tokens.css --name acme -o .claude/skills/unslop/SKILL.md
113
+ npx -y unslop-mcp refactor-plan src --preset swiss-editorial --report reports/DESIGN.md --json
113
114
  ```
114
115
 
115
- From a live URL:
116
+ ## 10 Studio-Grade Design Archetypes
117
+
118
+ Inspect and install a complete token and agent-rule contract:
116
119
 
117
120
  ```bash
118
- npx github:avivgerz-hue/unslop extract https://example.com --name example --json -o design-dna.json
121
+ npx -y unslop-mcp presets
122
+ npx -y unslop-mcp presets anthropic-warm-editorial
123
+ npx -y unslop-mcp init --preset anthropic-warm-editorial
119
124
  ```
120
125
 
121
- The extractor inventories:
126
+ | Archetype | Visual and engineering thesis |
127
+ | --- | --- |
128
+ | `swiss-editorial` | High-contrast editorial grid, warm paper, serif/grotesk pairing, crisp hairline rules |
129
+ | `linear-precision` | Obsidian craft, luminance borders, compact tracking, subtle layers, tabular precision |
130
+ | `stripe-atmospheric` | Refined slate atmosphere, crisp white surfaces, cobalt trust, layered micro-shadows |
131
+ | `vercel-monochrome` | Architectural monochrome, geometric rhythm, zero decorative bloat, semantic status color |
132
+ | `teenage-engineering` | Tactile industrial UI, monospace labels, international orange, physical grid borders |
133
+ | `anthropic-warm-editorial` | Parchment and stone, literary serif headings, calm clay accents, generous reading measure |
134
+ | `bloomberg-terminal-dense` | Ultra-high data density, strict numeric alignment, compact workflows, semantic tickers |
135
+ | `raycast-command` | Frosted graphite command palette, keyboard-first selection, crisp shortcut badges |
136
+ | `fintech-institutional` | Deep forest-navy authority, legible financial hierarchy, restrained brass and emerald |
137
+ | `neo-brutalist-craft` | Intentional ink borders, offset hard shadows, bold geometric contrast, disciplined rhythm |
138
+
139
+ Each archetype includes full surface hierarchy, explicit light/dark companions, typography scale and weights, spacing rhythm, radii, shadow/border elevation, layout contract, motion curve and spring values, plus ten archetype-specific design laws.
122
140
 
123
- - surface, text, muted-text, border, accent, and on-accent colors;
124
- - CSS custom properties and font stacks;
125
- - font sizes, line heights, weights, and tracking;
126
- - radius and spacing scales;
127
- - complete layered elevation tokens and their individual shadow layers;
128
- - durations and easing functions.
141
+ The v1 IDs `linear-dark`, `swiss-grid`, `stripe-minimal`, `apple-glass`, and `neo-brutalist` remain loadable for existing installations; the canonical v2 gallery contains the ten systems above.
129
142
 
130
- Markdown output is a complete Claude-compatible `SKILL.md`. `--json` emits both the raw token inventory and its validated, compiled preset. Network requests use timeouts, response-size limits, a bounded stylesheet queue, and HTTP(S)-only URLs; page JavaScript is never executed.
143
+ ## Four token formats — presets or extracted DNA
131
144
 
132
- ### 4. Export Tailwind v4 and framework-agnostic tokens
145
+ Use the same deterministic exporter for a built-in archetype or extracted Design DNA.
146
+
147
+ ### Tailwind v4 `@theme`
133
148
 
134
149
  ```bash
135
- npx github:avivgerz-hue/unslop export-tokens --preset linear-dark --out tokens.css
150
+ npx -y unslop-mcp export-tokens --preset linear-precision --format tailwind-v4 --out tokens.css
136
151
  ```
137
152
 
138
- The generated stylesheet contains three complementary contracts:
153
+ Produces `@theme`, `:root`, and `.dark` contracts with semantic colors, fonts, fluid type, tracking, weights, radii, shadows, spacing, motion, and layout values.
154
+
155
+ ### Tailwind v3 configuration fragment
156
+
157
+ ```bash
158
+ npx -y unslop-mcp export-tokens --preset linear-precision --format tailwind-v3 --out tailwind.config.js
159
+ ```
139
160
 
140
- - **Tailwind v4 `@theme`** with literal `--color-*`, `--font-*`, `--text-*`, `--radius-*`, `--shadow-*`, `--spacing-*`, motion, and container tokens.
141
- - **`:root` semantic variables** such as `--surface-0`, `--surface-1`, `--text-primary`, `--border-subtle`, and `--font-display` for CSS Modules, vanilla CSS, styled-components, or any other framework.
142
- - **`.dark` overrides** for semantic and Tailwind color variables. Dark presets retain their native palette; light presets receive a deterministic dark companion derived from their source colors.
161
+ Emits a mergeable `theme.extend` fragment with semantic utilities.
143
162
 
144
- Use it with Tailwind v4:
163
+ ### Pure CSS custom properties
145
164
 
146
- ```css
147
- @import "tailwindcss";
148
- @import "./tokens.css";
165
+ ```bash
166
+ npx -y unslop-mcp export-tokens --preset linear-precision --format css --out tokens.css
149
167
  ```
150
168
 
151
- Or without Tailwind:
169
+ Emits standalone `:root` and `.dark` variables without requiring Tailwind.
152
170
 
153
- ```css
154
- .panel {
155
- color: var(--text-primary);
156
- background: var(--surface-1);
157
- border: var(--border-width) solid var(--border-subtle);
158
- border-radius: var(--radius-lg);
159
- box-shadow: var(--shadow-md);
160
- }
171
+ ### W3C Design Tokens JSON
172
+
173
+ ```bash
174
+ npx -y unslop-mcp export-tokens --preset linear-precision --format w3c-json --out tokens.json
161
175
  ```
162
176
 
163
- Compile tokens directly from extracted DNA instead of a built-in preset:
177
+ Emits typed `$type` / `$value` groups for light and dark colors, typography, dimensions, radii, spacing, shadows, motion, and layout. A `.json` output path infers this format automatically.
178
+
179
+ ### Extract Design DNA from CSS or a URL
164
180
 
165
181
  ```bash
166
- npx github:avivgerz-hue/unslop export-tokens --source https://example.com --name example --out example-tokens.css
167
- npx github:avivgerz-hue/unslop export-tokens --source ./tokens.css --name acme
182
+ npx -y unslop-mcp extract https://example.com --name reference --json -o design-dna.json
183
+ npx -y unslop-mcp export-tokens --source https://example.com --name reference --format w3c-json --out tokens.json
168
184
  ```
169
185
 
170
- `--preset` and `--source` are mutually exclusive. Without `--out`, CSS is written to stdout.
186
+ The extractor reads local CSS or live HTML, inline styles, linked stylesheets, and `@import` graphs with explicit byte, request, and stylesheet budgets. Extraction warnings remain visible rather than silently inventing missing tokens.
171
187
 
172
- ## Native MCP server
188
+ ## Native MCP Server
173
189
 
174
- Start the zero-dependency Model Context Protocol server over stdio:
190
+ Start the zero-dependency JSON-RPC 2.0 stdio server:
175
191
 
176
192
  ```bash
177
- npx github:avivgerz-hue/unslop mcp
193
+ npx -y unslop-mcp --mcp
178
194
  ```
179
195
 
180
- `init` creates or updates this project configuration automatically:
196
+ `init` merge-safely creates or updates `.mcp.json` without replacing unrelated servers, top-level settings, or custom fields on the unslop entry:
181
197
 
182
198
  ```json
183
199
  {
184
200
  "mcpServers": {
185
201
  "unslop": {
186
202
  "command": "npx",
187
- "args": ["github:avivgerz-hue/unslop", "mcp"]
203
+ "args": ["-y", "unslop-mcp", "--mcp"]
188
204
  }
189
205
  }
190
206
  }
191
207
  ```
192
208
 
193
- The merge preserves unrelated entries in `mcpServers`, other top-level settings, and custom fields on the unslop entry. Invalid JSON is rejected rather than overwritten. Claude Code can also register the server explicitly:
209
+ Claude Code can register it explicitly:
194
210
 
195
211
  ```bash
196
- claude mcp add --scope project unslop -- npx github:avivgerz-hue/unslop mcp
212
+ claude mcp add --scope project unslop -- npx -y unslop-mcp --mcp
197
213
  ```
198
214
 
199
- For Claude Desktop, add the same `mcpServers.unslop` entry to the application's MCP configuration. Cursor reads project `.mcp.json`; Codex and other MCP-compatible clients can launch the same stdio command.
200
-
201
- | MCP tool | Required input | Result |
202
- | --- | --- | --- |
203
- | `unslop_audit` | None; optional `path` and `ignore` | Full audit, integrity score, exact diagnostics, and refactoring instructions |
204
- | `unslop_extract_dna` | `source` CSS path or HTTP(S) URL | Raw DNA, validated compiled preset, and ready-to-use Agent Skill |
205
- | `unslop_apply_preset` | `preset`; optional `projectDir` | Six synchronized agent-rule files plus merge-safe `.mcp.json` |
215
+ | MCP tool | Purpose |
216
+ | --- | --- |
217
+ | `unslop_audit` | 72-rule diagnostic, Design Craft Score, seven-pillar scorecard, exact findings |
218
+ | `unslop_extract_dna` | CSS/URL extraction and a complete compiled Design DNA preset |
219
+ | `unslop_apply_preset` | Install any canonical archetype and merge project agent rules/MCP configuration |
220
+ | `unslop_refactor_plan` | Generate `UNSLOP-REPORT.md` with exact translations and prioritized transformation steps |
206
221
 
207
- The transport supports `initialize`, `ping`, `tools/list`, `tools/call`, JSON-RPC errors, notifications, and newline-delimited stdio framing. Protocol messages are the only stdout output. Tool execution failures return MCP `isError` results without terminating the server.
222
+ Positional `mcp` remains a backward-compatible alias for `--mcp`.
208
223
 
209
- ### Production Docker image
224
+ ## Principal UI/UX Design Engineer Skill
210
225
 
211
- Build the minimal Node 22 Alpine image from the committed runtime; no TypeScript compiler, source files, or development dependencies enter the build context:
226
+ The rewritten [`SKILL.md`](SKILL.md) is a five-step execution protocol for Claude Code, Cursor, Windsurf, and other coding agents:
212
227
 
213
- ```bash
214
- docker build -t unslop:mcp .
215
- docker run --rm -i unslop:mcp
216
- ```
228
+ 1. **Anti-Slop Diagnostic:** baseline all seven pillars with `unslop_audit`.
229
+ 2. **Aesthetic Direction & Token Foundation:** choose one archetype or extract Design DNA; install tokens before editing components.
230
+ 3. **Structural & Layout Transformation:** use `unslop_refactor_plan` to replace clone layouts, enforce rhythm, and apply exact translations.
231
+ 4. **Surface, Typography & Copy Polish:** implement semantic colors, WCAG contrast, fluid type, tabular numbers, and concrete product copy.
232
+ 5. **Interactive Ergonomics & Verification:** complete focus and state behavior, then re-audit to **95–100/100 (A+)** and inspect the rendered result.
217
233
 
218
- The image entrypoint is `node dist/bin/unslop.js mcp`. CI builds this image and verifies the `initialize` response, silent handling of `notifications/initialized`, and the three-tool `tools/list` response over stdio with networking disabled.
234
+ `init` installs the selected contract into `.claude/skills/unslop/SKILL.md`, `CLAUDE.md`, `AGENTS.md`, `.cursorrules`, `.windsurfrules`, and `.clinerules`. Existing content outside managed blocks is preserved and repeated installs are byte-for-byte idempotent.
219
235
 
220
- ### Zero-build GitHub execution
236
+ ## Alternative: zero-build GitHub execution
221
237
 
222
- Run the committed distribution directly from GitHub without installing TypeScript or any other development dependency:
238
+ The npm package is the primary installation path. To execute the committed distribution directly from GitHub:
223
239
 
224
240
  ```bash
225
- npx github:avivgerz-hue/unslop --version
226
- npx github:avivgerz-hue/unslop init
227
- npx github:avivgerz-hue/unslop mcp
241
+ npx -y github:avivgerz-hue/unslop --version
242
+ npx -y github:avivgerz-hue/unslop init --preset linear-precision
243
+ npx -y github:avivgerz-hue/unslop --mcp
228
244
  ```
229
245
 
230
- The repository includes `dist/`. During a GitHub install, `prepare` uses the local TypeScript compiler for development when it is available and otherwise validates and reuses the committed runtime and all five preset JSON files. A cold `npx` invocation still needs to download the package; no local compilation step is required.
231
-
232
- ### Registry and citation metadata
246
+ The repository includes `dist/`. During a GitHub install, `prepare` uses TypeScript when available and otherwise validates and reuses the committed runtime and all fifteen canonical-plus-legacy preset JSON files. No production dependency or local compilation step is required.
233
247
 
234
- Machine-readable discovery documents live at the repository root:
235
-
236
- - [`server.json`](server.json) follows the official MCP Registry schema, declares the GitHub npm specifier with the `npx` runtime and fixed `mcp` argument, and carries the three tool summaries in the registry-approved publisher metadata extension. `package.json` includes the matching `mcpName` ownership declaration.
237
- - [`smithery.yaml`](smithery.yaml) starts `npx github:avivgerz-hue/unslop mcp` over stdio without requiring configuration.
238
- - [`glama.json`](glama.json) uses Glama's schema and mirrors the exact runtime tool names, descriptions, and input schemas.
239
- - [`CITATION.cff`](CITATION.cff) provides CFF 1.2.0 software citation metadata for VibeFoundry and powers GitHub's citation widget.
240
-
241
- These files describe the project for registry indexing; their presence does not claim that a registry listing or npm publication has occurred.
242
-
243
- ## Preset gallery
244
-
245
- | Preset | Mode | Visual thesis | Best suited for |
246
- | --- | --- | --- | --- |
247
- | `linear-dark` | Dark | Quiet neutral layers, hairline borders, compact type, restrained indigo | Developer tools, operational dashboards, engineering products |
248
- | `swiss-grid` | Light | Editorial scale, exposed grid, black rules, one signal-red accent | Publications, portfolios, cultural and typographic sites |
249
- | `stripe-minimal` | Light | Cool atmospheric canvas, crisp white surfaces, layered soft elevation | SaaS, financial products, marketing with dense product UI |
250
- | `apple-glass` | Light | Optical hierarchy, sparse translucent materials, continuous corners, springs | Consumer products, media experiences, spatial interfaces |
251
- | `neo-brutalist` | Light | Opaque surfaces, stark ink borders, hard offset shadows, one loud accent | Experiments, communities, campaigns, playful tools |
252
-
253
- Inspect every token and law before choosing:
248
+ ## Docker MCP
254
249
 
255
250
  ```bash
256
- npx github:avivgerz-hue/unslop presets
257
- npx github:avivgerz-hue/unslop presets swiss-grid
258
- npx github:avivgerz-hue/unslop presets apple-glass --json
259
- ```
260
-
261
- ## What the audit detects
262
-
263
- | Rule ID | Detection |
264
- | --- | --- |
265
- | `slop/cliche-gradient` | Purple, indigo, violet, and fuchsia gradient utility stops and matching CSS gradients |
266
- | `slop/low-contrast` | WCAG 2.1 AA failures for detected CSS, inline-style, and Tailwind foreground/background pairs |
267
- | `slop/neon-glow` | Cyan, magenta, and fuchsia cyber-glow box shadows |
268
- | `slop/emoji-feature-grid` | Three-column grids combined with centered content and emoji in the same component region |
269
- | `slop/raw-elevation` | `shadow-xl`/`shadow-2xl` without a subtle border token, or a single heavy CSS shadow without support |
270
- | `slop/display-tracking` | Large `h1`/`h2` typography without tight or negative tracking |
271
- | `slop/numeric-alignment` | Static numeric UI and marked dynamic metrics without `tabular-nums` |
272
- | `slop/font-weight-mixing` | Four or more distinct weights in one component source tree |
273
- | `slop/conflicting-spacing` | Different values for the same spacing property and responsive variant on one element |
274
- | `slop/off-grid-spacing` | Arbitrary pixel/rem spacing outside the 4px grid, excluding deliberate 1px and 2px optical stops |
275
- | `slop/conflicting-radius` | Competing radius utilities for one element and corner axis |
276
- | `slop/radius-scale` | Four or more unrelated non-pill surface radii in a component tree |
277
-
278
- **WCAG 2.1 contrast:** colors are converted from hex, RGB(A), HSL(A), named colors, CSS variables, or supported Tailwind utilities into sRGB. Channels are linearized with the official WCAG formula, translucent foregrounds are composited over their backgrounds, and contrast is `(L1 + 0.05) / (L2 + 0.05)`. Normal text requires **4.5:1**; large text (at least 24px, or 18.66px at 700+) requires **3:1**. Unsupported or indeterminate color functions are skipped rather than guessed.
279
-
280
- **Design Integrity Score:** start at 100; subtract 12 per error, 7 per warning, and 3 per informational finding, clamped to `0–100`. Low-contrast findings are errors. The score is comparable and deterministic, not a claim that static analysis can replace rendered design review.
281
-
282
- ## CLI reference
283
-
284
- ```text
285
- unslop init [--preset <name>] [--dir <path>] [--force] [--json]
286
- unslop mcp
287
- unslop audit [dir] [--json | --prompt] [--fail-under <0-100>]
288
- [--ignore <directory>] [--no-fail]
289
- unslop extract <url-or-css-path> [--name <preset-name>] [--json]
290
- [--output <path>] [--timeout <ms>] [--max-stylesheets <n>]
291
- unslop export-tokens [--preset <name> | --source <url-or-css-path>]
292
- [--name <preset-name>] [--out <file>]
293
- unslop presets [name] [--json]
294
- unslop help
295
- unslop --version
251
+ docker build --tag unslop:mcp .
252
+ docker run --rm -i unslop:mcp
296
253
  ```
297
254
 
298
- ### Safe rule synchronization
299
-
300
- Each generated agent-rule file contains an `unslop` managed block. Running `init` again updates only that block. Existing rule content is preserved byte-for-byte. `.mcp.json` is merged structurally and never replaces unrelated MCP servers. `--force` intentionally replaces whole agent-rule files, including unmanaged content—use it only when that is what you want; it does not erase other MCP servers.
301
-
302
- ## Agent Skill usage
255
+ The image entrypoint is `node dist/bin/unslop.js mcp`. CI builds the image and verifies `initialize`, silent handling of `notifications/initialized`, and all four tools in `tools/list` over stdio with networking disabled.
303
256
 
304
- ### Claude Code
257
+ ## Registry and citation metadata
305
258
 
306
- `init` writes `.claude/skills/unslop/SKILL.md` with valid frontmatter and the selected design contract. `CLAUDE.md` points to the same managed rules so the constraints remain visible in project context.
259
+ - [`server.json`](server.json) follows the official MCP Registry schema and declares `unslop-mcp` 2.0.0 with the `npx -y … --mcp` startup contract and four tool summaries.
260
+ - [`glama.json`](glama.json) mirrors the exact MCP tool schemas and canonical archetype enum.
261
+ - [`smithery.yaml`](smithery.yaml) starts the native stdio server without additional configuration.
262
+ - [`CITATION.cff`](CITATION.cff) provides software citation metadata for VibeFoundry.
307
263
 
308
- ### OpenAI Codex
264
+ The npm package is published as [`unslop-mcp`](https://www.npmjs.com/package/unslop-mcp). These files support registry indexing but do not claim that a registry listing has occurred.
309
265
 
310
- Codex reads `AGENTS.md`. Keep the generated file at the repository root and ask Codex to run `npx github:avivgerz-hue/unslop audit .` after implementing UI.
311
-
312
- ### Cursor, Windsurf, and Cline
313
-
314
- The same contract is compiled into `.cursorrules`, `.windsurfrules`, and `.clinerules`. No plugin, MCP server, or additional runtime is required.
315
-
316
- ### Manual installation
317
-
318
- Copy this repository’s root `SKILL.md` into `.claude/skills/unslop/SKILL.md` for the preset-agnostic anti-slop contract, or run `init` to include a complete preset. The compiled rules are plain Markdown and can be adapted to other agents without changing the CLI.
319
-
320
- ## Programmatic API
321
-
322
- ```ts
323
- import { auditTarget, contrastRatio } from "unslop/analyzer";
324
- import { extractDesignDNA, createPresetFromDNA } from "unslop/extractor";
325
- import { startMcpServer } from "unslop/mcp";
326
- import { loadPreset } from "unslop/presets";
327
- import { installUnslop, renderAgentSkill } from "unslop/sync";
328
- import { renderTokenStylesheet } from "unslop/tokens";
329
-
330
- const report = await auditTarget("./src");
331
- const dna = await extractDesignDNA("./tokens.css");
332
- const extractedPreset = createPresetFromDNA(dna, "acme");
333
- const skill = renderAgentSkill(extractedPreset);
334
- const stylesheet = renderTokenStylesheet(extractedPreset);
335
-
336
- await installUnslop({ cwd: process.cwd(), preset: loadPreset("linear-dark") });
337
- console.log(report.score, contrastRatio("#111111", "#ffffff"), skill, stylesheet);
338
-
339
- // Blocks until the MCP client's stdio stream closes:
340
- await startMcpServer({ cwd: process.cwd() });
341
- ```
342
-
343
- The analyzer also exposes `analyzeSource` for in-memory fixtures and editor integrations.
344
-
345
- ## Development
266
+ ## Development and verification
346
267
 
347
268
  ```bash
348
- git clone https://github.com/avivgerz-hue/unslop.git
349
- cd unslop
350
269
  npm ci
351
- npm run build
270
+ npm run typecheck
352
271
  npm test
272
+ npm run build
353
273
  ```
354
274
 
355
- See [CONTRIBUTING.md](CONTRIBUTING.md) for analyzer-rule design, extraction safety, preset requirements, and pull-request guidelines.
275
+ CI verifies Node.js 20 and 22, a production install without TypeScript, reproducible committed `dist/`, real CLI/MCP stdio negotiation, and the Docker MCP handshake. The v2 suite covers all seven pillars, all ten archetypes, every token format, extracted DNA, refactor blueprints, and manifest-driven 2.0.0 version output.
356
276
 
357
277
  ## License
358
278
 
359
- MIT © 2026 VibeFoundry. See [LICENSE](LICENSE).
360
-
361
- ## Part of the VibeFoundry Agent Suite
362
-
363
- | Tool | Purpose |
364
- | --- | --- |
365
- | 🎨 [unslop](https://github.com/avivgerz-hue/unslop) | Studio-grade UI design systems & Anti-Slop engine for coding agents. |
366
- | 🛡️ [vibe-shield](https://github.com/avivgerz-hue/vibe-shield) | Automated security scanner & MCP guard for AI-generated codebases. |
367
- | 👻 [ghost-qa](https://github.com/avivgerz-hue/ghost-qa) | Autonomous headless browser QA & self-healing verification loop. |
279
+ MIT · VibeFoundry