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.
- package/CITATION.cff +5 -5
- package/README.md +161 -249
- package/SKILL.md +173 -72
- package/dist/bin/unslop.d.ts +3 -1
- package/dist/bin/unslop.d.ts.map +1 -1
- package/dist/bin/unslop.js +377 -332
- package/dist/bin/unslop.js.map +1 -1
- package/dist/src/analyzer/design-craft.d.ts +38 -0
- package/dist/src/analyzer/design-craft.d.ts.map +1 -0
- package/dist/src/analyzer/design-craft.js +611 -0
- package/dist/src/analyzer/design-craft.js.map +1 -0
- package/dist/src/analyzer/refactor-plan.d.ts +49 -0
- package/dist/src/analyzer/refactor-plan.d.ts.map +1 -0
- package/dist/src/analyzer/refactor-plan.js +229 -0
- package/dist/src/analyzer/refactor-plan.js.map +1 -0
- package/dist/src/analyzer/slop-detector.d.ts +10 -2
- package/dist/src/analyzer/slop-detector.d.ts.map +1 -1
- package/dist/src/analyzer/slop-detector.js +31 -8
- package/dist/src/analyzer/slop-detector.js.map +1 -1
- package/dist/src/extractor/extract-dna.js +1 -1
- package/dist/src/extractor/extract-dna.js.map +1 -1
- package/dist/src/mcp/server.d.ts.map +1 -1
- package/dist/src/mcp/server.js +40 -2
- package/dist/src/mcp/server.js.map +1 -1
- package/dist/src/presets/anthropic-warm-editorial.json +122 -0
- package/dist/src/presets/bloomberg-terminal-dense.json +104 -0
- package/dist/src/presets/fintech-institutional.json +104 -0
- package/dist/src/presets/index.d.ts +20 -1
- package/dist/src/presets/index.d.ts.map +1 -1
- package/dist/src/presets/index.js +55 -4
- package/dist/src/presets/index.js.map +1 -1
- package/dist/src/presets/linear-precision.json +104 -0
- package/dist/src/presets/neo-brutalist-craft.json +122 -0
- package/dist/src/presets/raycast-command.json +108 -0
- package/dist/src/presets/stripe-atmospheric.json +120 -0
- package/dist/src/presets/swiss-editorial.json +122 -0
- package/dist/src/presets/teenage-engineering.json +120 -0
- package/dist/src/presets/vercel-monochrome.json +120 -0
- package/dist/src/sync/rule-writer.d.ts +1 -1
- package/dist/src/sync/rule-writer.d.ts.map +1 -1
- package/dist/src/sync/rule-writer.js +8 -5
- package/dist/src/sync/rule-writer.js.map +1 -1
- package/dist/src/sync/token-exporter.d.ts +12 -0
- package/dist/src/sync/token-exporter.d.ts.map +1 -1
- package/dist/src/sync/token-exporter.js +176 -6
- package/dist/src/sync/token-exporter.js.map +1 -1
- package/dist/src/version.d.ts +2 -2
- package/dist/src/version.d.ts.map +1 -1
- package/dist/src/version.js +5 -2
- package/dist/src/version.js.map +1 -1
- package/glama.json +64 -13
- package/package.json +116 -110
- package/scripts/build.mjs +23 -6
- package/server.json +21 -8
- 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:
|
|
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:
|
|
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
|
|
15
|
-
|
|
16
|
-
|
|
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.
|
|
3
|
+
**Your agent can write the code. unslop gives it a measurable design engineering protocol.**
|
|
4
4
|
|
|
5
|
+
[](https://www.npmjs.com/package/unslop-mcp)
|
|
6
|
+
[](https://www.npmjs.com/package/unslop-mcp)
|
|
5
7
|
[](https://github.com/avivgerz-hue/unslop/actions/workflows/ci.yml)
|
|
6
|
-
[](https://www.npmjs.com/package/unslop)
|
|
7
8
|
[](https://nodejs.org/)
|
|
8
9
|
[](LICENSE)
|
|
9
10
|
|
|
10
11
|

|
|
11
12
|
|
|
12
|
-
`unslop` is a zero-runtime-dependency CLI, native MCP
|
|
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
|

|
|
17
18
|
|
|
18
19
|
```bash
|
|
19
|
-
npx
|
|
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
|
-
|
|
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
|
-
##
|
|
27
|
+
## v2 at a glance
|
|
25
28
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
##
|
|
39
|
+
## The 7-Pillar Design Craft Engine
|
|
55
40
|
|
|
56
|
-
|
|
41
|
+
Run a deterministic baseline before letting an agent rewrite the interface:
|
|
57
42
|
|
|
58
43
|
```bash
|
|
59
|
-
npx
|
|
44
|
+
npx -y unslop-mcp audit . --json
|
|
60
45
|
```
|
|
61
46
|
|
|
62
47
|
```text
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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
|
-
|
|
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
|
-
|
|
71
|
+
### Scores with an action attached
|
|
78
72
|
|
|
79
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
91
|
-
Numeric UI is missing tabular figures, causing unstable alignment.
|
|
83
|
+
## Design Transformation Blueprint
|
|
92
84
|
|
|
93
|
-
Design
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
110
|
+
Use `--json` for the complete machine-readable blueprint:
|
|
110
111
|
|
|
111
112
|
```bash
|
|
112
|
-
npx
|
|
113
|
+
npx -y unslop-mcp refactor-plan src --preset swiss-editorial --report reports/DESIGN.md --json
|
|
113
114
|
```
|
|
114
115
|
|
|
115
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
143
|
+
## Four token formats — presets or extracted DNA
|
|
131
144
|
|
|
132
|
-
|
|
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
|
|
150
|
+
npx -y unslop-mcp export-tokens --preset linear-precision --format tailwind-v4 --out tokens.css
|
|
136
151
|
```
|
|
137
152
|
|
|
138
|
-
|
|
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
|
-
|
|
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
|
-
|
|
163
|
+
### Pure CSS custom properties
|
|
145
164
|
|
|
146
|
-
```
|
|
147
|
-
|
|
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
|
-
|
|
169
|
+
Emits standalone `:root` and `.dark` variables without requiring Tailwind.
|
|
152
170
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
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
|
-
|
|
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
|
|
167
|
-
npx
|
|
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
|
-
|
|
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
|
|
188
|
+
## Native MCP Server
|
|
173
189
|
|
|
174
|
-
Start the zero-dependency
|
|
190
|
+
Start the zero-dependency JSON-RPC 2.0 stdio server:
|
|
175
191
|
|
|
176
192
|
```bash
|
|
177
|
-
npx
|
|
193
|
+
npx -y unslop-mcp --mcp
|
|
178
194
|
```
|
|
179
195
|
|
|
180
|
-
`init` creates or updates
|
|
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": ["
|
|
203
|
+
"args": ["-y", "unslop-mcp", "--mcp"]
|
|
188
204
|
}
|
|
189
205
|
}
|
|
190
206
|
}
|
|
191
207
|
```
|
|
192
208
|
|
|
193
|
-
|
|
209
|
+
Claude Code can register it explicitly:
|
|
194
210
|
|
|
195
211
|
```bash
|
|
196
|
-
claude mcp add --scope project unslop -- npx
|
|
212
|
+
claude mcp add --scope project unslop -- npx -y unslop-mcp --mcp
|
|
197
213
|
```
|
|
198
214
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
|
202
|
-
|
|
|
203
|
-
| `
|
|
204
|
-
| `
|
|
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
|
-
|
|
222
|
+
Positional `mcp` remains a backward-compatible alias for `--mcp`.
|
|
208
223
|
|
|
209
|
-
|
|
224
|
+
## Principal UI/UX Design Engineer Skill
|
|
210
225
|
|
|
211
|
-
|
|
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
|
-
|
|
214
|
-
|
|
215
|
-
|
|
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
|
-
|
|
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
|
-
|
|
236
|
+
## Alternative: zero-build GitHub execution
|
|
221
237
|
|
|
222
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
257
|
-
|
|
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
|
-
|
|
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
|
-
|
|
257
|
+
## Registry and citation metadata
|
|
305
258
|
|
|
306
|
-
`
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
270
|
+
npm run typecheck
|
|
352
271
|
npm test
|
|
272
|
+
npm run build
|
|
353
273
|
```
|
|
354
274
|
|
|
355
|
-
|
|
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
|
|
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
|