unslop-design 1.12.0 → 1.14.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/README.md CHANGED
@@ -10,11 +10,9 @@
10
10
  <a href="https://marcosnovo.github.io/unslop-design/"><b>Website and live demo</b></a> ·
11
11
  <a href="#quick-start">Quick start</a> ·
12
12
  <a href="#use-it">Use it</a> ·
13
- <a href="#the-72-fixes">The 72 fixes</a> ·
14
13
  <a href="#keep-it-clean">Hook and CI</a> ·
15
- <a href="#web-and-dashboards">Web</a> ·
16
- <a href="#how-it-works">How it works</a> ·
17
- <a href="#faq">FAQ</a>
14
+ <a href="#the-72-fixes">The 72 fixes</a> ·
15
+ <a href="#guide">Guide</a>
18
16
  </p>
19
17
 
20
18
  <p align="center">
@@ -63,8 +61,8 @@ npx skills add marcosnovo/unslop-design -g
63
61
  ```
64
62
 
65
63
  Pick one route per agent: installing the same skill twice makes it show up
66
- twice. Other routes (one command for every agent, one project only, chat
67
- apps, manual clone) are in [More ways to install](#more-ways-to-install).
64
+ twice. One project only, chat apps (claude.ai, ChatGPT) and manual clones:
65
+ [guide/install.md](guide/install.md).
68
66
 
69
67
  **Check it works.** In a project, paste a screenshot and write *unslop this
70
68
  screen*. You should get five numbered fixes, each with its reason, and a
@@ -104,68 +102,6 @@ see which one helped.
104
102
 
105
103
  <sub>The app is in Spanish. Full-quality MP4s: <a href="assets/videos/refil-mapa.mp4">map</a> · <a href="assets/videos/refil-perfil.mp4">profile</a>.</sub>
106
104
 
107
- ## More ways to install
108
-
109
- **Claude Code from a terminal:** `claude plugin marketplace add
110
- marcosnovo/unslop-design && claude plugin install unslop-design@unslop`.
111
- Update with `claude plugin marketplace update unslop && claude plugin update
112
- unslop-design@unslop`. Plugin skills are namespaced, so the command is
113
- `/unslop-design:unslop-design`; asking in plain words works the same.
114
-
115
- **Every agent on your machine, one command:**
116
-
117
- ```bash
118
- curl -fsSL https://raw.githubusercontent.com/marcosnovo/unslop-design/main/install.sh | bash
119
- ```
120
-
121
- It clones the skill once into `~/.agents/skills/unslop-design` and links it
122
- into every agent it finds, so one `git pull` updates them all. Nothing is
123
- overwritten: an existing folder with the same name is left alone.
124
- `--dry-run` shows what it would do, `--copy` copies instead of linking, and
125
- `--uninstall` removes only what it installed.
126
- ([Read the script](install.sh) before piping it into a shell.)
127
-
128
- **Or one agent by hand.** Clone into its skills folder:
129
-
130
- | Agent | Global folder | Call it |
131
- |---|---|---|
132
- | Claude Code | `~/.claude/skills/` | `/unslop-design` |
133
- | Codex · Replit · Cline · Zed | `~/.agents/skills/` | `$unslop-design` (Codex) |
134
- | Cursor | `~/.cursor/skills/` | ask for it by name |
135
- | GitHub Copilot | `~/.copilot/skills/` | ask for it by name |
136
- | Gemini CLI | `~/.gemini/skills/` | ask for it by name |
137
- | Antigravity | `~/.gemini/antigravity/skills/` | ask for it by name |
138
- | Windsurf | `~/.codeium/windsurf/skills/` | ask for it by name |
139
- | OpenCode | `~/.config/opencode/skills/` | ask for it by name |
140
- | Amp | `~/.config/agents/skills/` | ask for it by name |
141
- | Kiro | `~/.kiro/skills/` | ask for it by name |
142
- | Goose · Roo Code · Junie | `~/.config/goose/skills/` · `~/.roo/skills/` · `~/.junie/skills/` | ask for it by name |
143
- | Devin · Grok Build · Hermes | `~/.config/devin/skills/` · `~/.grok/skills/` · `~/.hermes/skills/` | ask for it by name |
144
- | Pi · Oh My Pi · Qoder | `~/.pi/agent/skills/` · `~/.omp/agent/skills/` · `~/.qoder/skills/` | ask for it by name |
145
- | Trae · Rovo Dev · Mistral Vibe · DeepSeek | `~/.trae/skills/` · `~/.rovodev/skills/` · `~/.vibe/skills/` · `~/.dsh/skills/` | ask for it by name |
146
-
147
- ```bash
148
- git clone https://github.com/marcosnovo/unslop-design ~/.claude/skills/unslop-design
149
- ```
150
-
151
- Every agent also picks it up on its own when the request matches (design
152
- review, screenshots, "less AI"), so calling it by name is optional.
153
-
154
- <details>
155
- <summary>Only for one project, or in a chat app</summary>
156
-
157
- - **One project:** clone it into `.agents/skills/unslop-design` inside the
158
- repo (Claude Code: `.claude/skills/`, Windsurf: `.windsurf/skills/`,
159
- Kiro: `.kiro/skills/`) and commit it, so your team and cloud sessions get
160
- it too.
161
- - **claude.ai, Claude desktop or ChatGPT:** download `unslop-design.zip`
162
- from the [latest release](https://github.com/marcosnovo/unslop-design/releases/latest)
163
- and upload it as a skill (Claude: Settings → Capabilities → Skills).
164
- Chat apps can review screenshots and draw the before/after; the parts
165
- that touch a codebase need a coding agent.
166
-
167
- </details>
168
-
169
105
  ## Web and dashboards
170
106
 
171
107
  <p align="center">
@@ -174,20 +110,10 @@ review, screenshots, "less AI"), so calling it by name is optional.
174
110
 
175
111
  <p align="center"><sub><a href="examples/dashboard-before.html">examples/dashboard-before.html</a> → <a href="examples/dashboard-after.html">examples/dashboard-after.html</a>, rendered at 1280 px. Drag between the two on <a href="https://marcosnovo.github.io/unslop-design/#demo">the website</a>.</sub></p>
176
112
 
177
- For a site or web app the agent also measures instead of eyeballing:
178
-
179
- ```bash
180
- python3 scripts/slop-scan.py src/ # gradients, glows, emoji, raw colors, starter-kit defaults, rows of stat cards… with file:line and fix #
181
- node scripts/web-audit.mjs http://localhost:3000 # the rendered page at 390/768/1280 px
182
- ```
183
-
184
- On the example above, `web-audit.mjs` goes from 19 spacing values (15 off
185
- the scale), 5 weights, 6 radii, 6 shadows, a page that scrolls sideways
186
- on a phone and 11 links with no focus style, to 6 spacing values, all on the scale, 2
187
- weights, 1 shadow, no sideways scroll and a focus ring on everything.
188
- `slop-scan.py` finds 91 hits in the before and none in the after, and
189
- `unslop-score.py` goes from 21 to 100 on the code alone. Details
190
- in [`web.md`](web.md).
113
+ On this example `slop-scan.py` finds 91 hits before and none after, and the
114
+ score goes from 21 to 100; the rendered audit goes from 19 spacing values
115
+ and a sideways scroll on phones to 6 values on the scale and none. The web
116
+ playbook is [`web.md`](web.md).
191
117
 
192
118
  ## Native apps
193
119
 
@@ -204,26 +130,6 @@ greetings, Title Case and rows of stat cards in `.swift` and `.kt` files.
204
130
  | [`examples/swiftui/`](examples/swiftui) · subscriptions | 32/100: 10 emoji, glows, 4 gradients, 25 literals, "Hey Maya!" | 100/100 |
205
131
  | [`examples/compose/`](examples/compose) · settings | 62/100: 7 emoji, 15 literals, the Android Studio template colors | 100/100 |
206
132
 
207
- ```bash
208
- python3 scripts/unslop-score.py examples/swiftui/before # 32/100
209
- python3 scripts/unslop-score.py examples/swiftui/after # 100/100
210
- ```
211
-
212
- The SwiftUI folders also hold the HTML mock of each state at iPhone size,
213
- the way quick mode shows a native before/after when there's no simulator.
214
-
215
- ## Scores in the wild
216
-
217
- Ran it on your own app or site? [Share the before/after and the
218
- score](https://github.com/marcosnovo/unslop-design/issues/new?template=score-report.yml),
219
- and it goes here with your permission: what the app is, the two numbers,
220
- one image. What it missed is just as useful: that's how rules get added.
221
-
222
- | App | Platform | Score | |
223
- |---|---|---|---|
224
- | [Refil](https://refil.app) (the author's) | iOS, Android | before/after above | [screens](#one-fix-at-a-time) |
225
- | *Yours?* | | | [share it](https://github.com/marcosnovo/unslop-design/issues/new?template=score-report.yml) |
226
-
227
133
  ## Use it
228
134
 
229
135
  Type `/unslop-design` (or `$unslop-design` in Codex), or just ask in plain
@@ -261,294 +167,87 @@ agent reads where you left off and proposes the next two or three steps.
261
167
  | *unslop audit* | Every finding ranked by fix number; changes nothing |
262
168
  | *unslop critique* | A usability report: tasks walked as three users, cognitive load, ten heuristics scored 0-4, P0-P3 findings |
263
169
  | *unslop apply* | The accepted fixes still pending in `.unslop/review.md`, one at a time |
264
- | *unslop full* | The whole process below, with parallel reviewers |
265
-
266
- ### Score it
170
+ | *unslop full* | The whole process with parallel reviewers ([how it works](guide/how-it-works.md)) |
267
171
 
268
- ```bash
269
- python3 scripts/unslop-score.py src/ # the code alone
270
- python3 scripts/unslop-score.py src/ --audit unslop-audit/report.json # plus the rendered page (web-audit.mjs)
271
- ```
272
-
273
- ```text
274
- $ python3 scripts/unslop-score.py examples/dashboard-before.html
275
- unslop score: 21/100 — slop (1 source file)
276
-
277
- Where the points went (fix the top rows first):
278
- - 12 [#32] Colored glows (6)
279
- - 10 [#33] Emoji in the UI (19)
280
- - 8 [#53] Focus outline removed (1)
281
- …
282
-
283
- Badge: [![unslop score](https://img.shields.io/badge/unslop_score-21%2F100-red)](https://github.com/marcosnovo/unslop-design)
284
- ```
285
-
286
- Each kind of slop costs points per hit up to a cap, so the number says how
287
- many kinds are left, not how big the codebase is. Paste the badge in your
288
- README, and put "score 21 → 100" at the top of the PR. It's a smoke alarm,
289
- not a judge: a 95 can still have a flat hierarchy. `--min 80` makes it exit
290
- 1 below 80 if you want it in a pre-commit hook, and `--save` keeps every run
291
- in `.unslop/history.json` so the score has a trend.
172
+ How the score works, `--save`, `--baseline` and `--min`: [guide/automation.md](guide/automation.md).
292
173
 
293
174
  ## Keep it clean
294
175
 
295
176
  A review fixes the screen; these keep the next edit from undoing it.
296
177
 
297
- **While the agent writes (Claude Code).** The plugin ships a hook: after
298
- every edit to a UI file it scans that file and tells the agent what slop the
299
- edit just added, with the fix number. It says nothing when the edit is
300
- clean, never changes code itself, and turns off with `UNSLOP_HOOK=off` or
301
- `hook: off` in `.unslop/context.md`.
302
-
303
- **On every pull request (GitHub Actions).** Each hit becomes an annotation
304
- on its line, and one comment on the PR keeps the score and the change
305
- against the base branch, updated on every push:
306
-
307
- > ### unslop score: 88/100 (+7 vs main)
308
- > **Worse** · [#68] Border and shadow on one card: 0 → 2 (-2)
309
- > **Better** · [#32] Colored glows: 3 → 0 (+8) · [#33] Emoji in the UI: 4 → 0 (+8)
310
-
311
- The job fails under your minimum, if you set one:
178
+ - **While the agent writes.** After every edit to a UI file, a hook tells the
179
+ agent what slop it just added, with the fix number, and says nothing when
180
+ the edit is clean. Built into the Claude Code plugin; one command for
181
+ Gemini CLI, Codex and Copilot (`npx unslop-design hooks gemini --write`).
182
+ - **On every pull request.** The GitHub Action annotates each line and keeps
183
+ one comment with the score and the change against the base branch
184
+ ("88/100, +7 vs main"), failing under your minimum if you set one.
185
+ - **Your decisions, once.** `.unslop/context.md` holds your scales and the
186
+ rules your project allows, so a base-6 grid or a brand face isn't flagged
187
+ twice.
312
188
 
313
189
  ```yaml
314
190
  # .github/workflows/unslop.yml
315
191
  on: pull_request
316
- permissions:
317
- contents: read
318
- pull-requests: write # for the comment
192
+ permissions: { contents: read, pull-requests: write }
319
193
  jobs:
320
194
  unslop:
321
195
  runs-on: ubuntu-latest
322
196
  steps:
323
197
  - uses: actions/checkout@v5
324
- - uses: marcosnovo/unslop-design@v1.12.0
325
- with:
326
- paths: src
327
- min: 80 # optional; also: allow, scale, type-scale, comment: false
198
+ - uses: marcosnovo/unslop-design@v1
199
+ with: { paths: src, min: 80 }
328
200
  ```
329
201
 
330
- Locally, `unslop-score.py --json > main.json` on one branch and
331
- `--baseline main.json` on another gives the same comparison.
332
-
333
- **Anywhere else.** `python3 scripts/slop-scan.py src --github` prints the
334
- same annotations, `--json` every hit for other tools, and `--list-rules`
335
- every rule id. All of them read `.unslop/context.md`, so your scale and your
336
- allowed rules apply without flags.
337
-
338
- Screen recordings need `ffmpeg` (`brew install ffmpeg`) so the agent can
339
- pull frames from them.
202
+ Every option, other agents and the local commands:
203
+ [guide/automation.md](guide/automation.md).
340
204
 
341
205
  ## The 72 fixes
342
206
 
343
207
  Every fix has a number so reviewers can cite it ("#20 badge is too loud")
344
- and you can accept or reject them one by one. A few of them:
208
+ and you can accept or reject them one by one. Twelve of them:
345
209
 
346
210
  | # | Fix | Instead of |
347
211
  |---|---|---|
348
212
  | 1 | Non-linear spacing scale, neighbors ≥ 25% apart | `padding(13)`, `padding(15)`, `padding(18)` |
349
213
  | 11 | Hierarchy with weight and color before size | three numbers fighting at the same size |
350
- | 12 | "12 left in stock" | "Stock: 12" |
351
- | 15 | Number and unit on one baseline | `$` and `/gal` vertically centered |
352
- | 16 | Only numbers that exist | "vs. last month" with one month of data |
353
214
  | 19 | One accent, for one gesture | brand color on cards, icons and titles |
354
215
  | 20 | Quiet badges: dark text on a light tint | white on saturated pink |
355
- | 22 | A shade of the same hue on colored panels | gray or 60% white text |
356
216
  | 26 | The title says what the screen is | "Hey Alex! 👋" |
357
- | 31 | Space, then background, then shadow, border last | a border around everything |
358
- | 32 | Shadows mean height | shadows as decoration |
359
217
  | 33 | One icon set, one stroke | emoji as icons, icons in colored circles |
360
- | 39 | Charts: today saturated, values on the bars | gridlines and axes nobody reads |
361
218
  | 41 | The primary button names where it goes | "Let's Go! 🚀" |
362
- | 43 | One left and one right rail for everything | blocks starting at 12, 16 and 20 pt |
363
- | 44 | One gap between sections, no filler copy | "✨ Share your best moments" |
364
- | 47 | A signature taken from the domain, as a small family | a new font plus a glow |
365
219
  | 50 | Counts as muted tabular numbers | `12` in a hot-pink pill, `210 👤` |
366
220
  | 52 | A delta names its baseline | "+12%!!" |
367
221
  | 55 | Ink headline on a neutral canvas | gradient text over a purple glow |
368
222
  | 68 | One separator per surface | a 1px border and a soft shadow on every card |
369
- | 70 | A modal is the last resort; Undo beats Confirm | "Are you sure?" before every delete |
370
223
  | 71 | Plurals, dates and money from the platform | "3 item(s)", a hand-built "MM/DD" |
371
- | 72 | Four choices or fewer per group | nine filter chips in a row |
372
-
373
- <details>
374
- <summary><b>All 72, by section</b></summary>
375
-
376
- **System** · 1 spacing scale · 2 type scale and two weights · 3 palette with
377
- shades defined up front · 4 grays with one temperature · 5 named elevation
378
- and radii · 6 a chosen personality
379
-
380
- **Spacing** · 7 start with too much space · 8 more space around a group than
381
- within · 9 uniform card padding · 10 you don't have to fill the screen
382
-
383
- **Hierarchy** · 11 data first · 12 labels as a last resort · 13 small section
384
- titles · 14 balance weight and contrast · 15 parts of a number · 16 only
385
- numbers that exist · 17 each number once per screen · 18 what's next,
386
- concretely
387
-
388
- **Color** · 19 one accent · 20 quiet badges · 21 dark ink on brand fills ·
389
- 22 no gray on color · 23 neutral global tint · 24 color never alone
390
-
391
- **Typography** · 25 sentence case · 26 title, not a greeting · 27 line height
392
- and length · 28 align for readability · 29 letter-spacing with intent · 69
393
- code faces for code and data
394
-
395
- **Decoration and depth** · 30 remove ornaments · 31 fewer borders · 32 shadows
396
- mean height · 33 one icon style · 34 decoration with conditions · 66 a hard
397
- offset shadow is a style · 68 one separator per surface
398
-
399
- **Images and charts** · 35 good images or none · 36 text over images ·
400
- 37 user content in fixed frames · 38 screenshots at their size · 39 charts
401
- without noise
402
-
403
- **Layout** · 40 one card per idea · 41 action pyramid · 42 components don't
404
- scale proportionally · 70 a modal is the last resort · 72 four choices or
405
- fewer per group
406
-
407
- **Chrome and signature** · 43 rails · 44 one section gap, no filler · 45
408
- section headers are quiet labels · 46 floating chrome in the system material,
409
- content solid · 47 a signature is a family · 48 real content in every mock
410
224
 
411
- **Web and dashboards** · 49 one icon slot · 50 counts are text, not pills ·
412
- 51 one category, one color · 52 a delta names its baseline · 53 interactive
413
- states drawn · 54 shortcuts as keys · 55 no gradient text, no page glow ·
414
- 56 a data voice · 57 works at 390, 768 and 1280 px
225
+ All 72 with the reason behind each: [`checklist.md`](checklist.md) (by section:
226
+ [guide/how-it-works.md](guide/how-it-works.md#all-72-fixes-by-section)).
415
227
 
416
- **Beyond clean** · 58 objects before boxes · 59 when the content is a canvas,
417
- chrome floats · 65 a skeleton from the job, not from the template
228
+ ## Scores in the wild
418
229
 
419
- **Craft floor** · 60 structure carries information or goes · 61 real
420
- typography characters · 62 system surfaces wear the theme · 63 motion is
421
- named, short and optional · 64 nothing invented, nothing inflated · 67 ease
422
- out, don't bounce · 71 built for every language and every size of data
230
+ Ran it on your own app or site? [Share the before/after and the
231
+ score](https://github.com/marcosnovo/unslop-design/issues/new?template=score-report.yml),
232
+ and it goes here with your permission: what the app is, the two numbers,
233
+ one image. What it missed is just as useful: that's how rules get added.
423
234
 
424
- Full text with the reason behind each one: [`checklist.md`](checklist.md).
235
+ | App | Platform | Score | |
236
+ |---|---|---|---|
237
+ | [Refil](https://refil.app) (the author's) | iOS, Android | before/after above | [screens](#one-fix-at-a-time) |
238
+ | *Yours?* | | | [share it](https://github.com/marcosnovo/unslop-design/issues/new?template=score-report.yml) |
425
239
 
426
- </details>
240
+ ## Guide
427
241
 
428
- ## How it works
242
+ - [Install](guide/install.md): every agent, one project only, chat apps, manual clone
243
+ - [Score, hook and CI](guide/automation.md): how the number works, the post-edit hook in each agent, the GitHub Action
244
+ - [How it works](guide/how-it-works.md): the full process with parallel reviewers, the principles, every file in the repo
245
+ - [FAQ](guide/faq.md): rewriting without asking, which agent, iOS only?, existing design systems, cost
429
246
 
430
- <p align="center">
431
- <img src="assets/process.png" alt="Screen recordings, then a grayscale pass, then 3-4 reviewers in parallel, then a before/after you approve, then devs per area, then audit and PR." width="100%">
432
- </p>
247
+ ## Contributing
433
248
 
434
- 1. **Inventory.** The agent pulls frames from your recordings, lists every
435
- screen and state, and finds each one in your code.
436
- 2. **System and grayscale pass.** It checks your spacing, type, color and
437
- shadow scales, then asks whether each screen still works without color.
438
- If it doesn't, the fix is hierarchy, not paint.
439
- 3. **Reviewers in parallel.** 3-4 agents acting as senior product designers,
440
- one per area, each drawing an HTML before/after, citing fix numbers and
441
- filling a spec card (Gap, Rails, Radius, Heads, Accent…).
442
- A jury agent merges them and resolves conflicts.
443
- 4. **You approve.** One published page with every before/after, the
444
- numbered decisions, what was dropped and the risks. Nothing is built
445
- until you say yes.
446
- 5. **Devs per area.** Agents in isolated git worktrees, each with a closed
447
- brief, so they don't step on each other. Shared tokens land first.
448
- 6. **Audit and PR.** Measured contrast, off-scale literals, platform parity,
449
- build checks. Then one PR, answers to review bots, and merge when green.
450
-
451
- Small job? It scales down: a single screen gets the checklist and a
452
- before/after without the whole team.
453
-
454
- ## Principles
455
-
456
- 1. A fix is a rule, not a tweak: it ships as a token or component.
457
- 2. Hierarchy before color: if it doesn't work in gray, color won't save it.
458
- 3. The first thing you read is the answer.
459
- 4. Color says one thing.
460
- 5. Contrast is measured, not assumed.
461
- 6. Nothing the screen can't deliver: no invented numbers.
462
- 7. One signature gesture, taken from the domain. Everything else native.
463
- 8. Platforms ship together.
464
- 9. Verify what the user sees: dark mode, largest text, long languages.
465
-
466
- ## What's in the repo
467
-
468
- <details>
469
- <summary>Files and scripts</summary>
470
-
471
- | File | What it covers |
472
- |---|---|
473
- | [`SKILL.md`](SKILL.md) | Principles, quick mode and the full flow (what the agent reads first) |
474
- | [`checklist.md`](checklist.md) | The 72 fixes, each with what to do and why |
475
- | [`context.md`](context.md) | `init`: the `.unslop/context.md` template, `review.md` backlog and what scripts read |
476
- | [`critique.md`](critique.md) | The usability report: tasks, cognitive load, ten heuristics, severities |
477
- | [`spec-card.md`](spec-card.md) | The card each reviewer fills: named values, ticked as they land |
478
- | [`process.md`](process.md) | Inventory, reviewers, proposal, devs, verification, PR |
479
- | [`platforms.md`](platforms.md) | SwiftUI, Compose, web, widgets, watch and car notes |
480
- | [`web.md`](web.md) | Web playbook: finding tokens per stack, dashboards, landing pages, web PR checks |
481
- | [`scripts/slop-scan.py`](scripts/slop-scan.py) | Finds slop patterns in source with file, line and fix number |
482
- | [`scripts/web-audit.mjs`](scripts/web-audit.mjs) | Measures a rendered page: overflow, value census, contrast, focus |
483
- | [`scripts/unslop-score.py`](scripts/unslop-score.py) | Both as one score from 0 to 100, with the breakdown and a badge |
484
- | [`examples/`](examples) | Before/after pairs to try the scripts on: a web dashboard, a SwiftUI screen, a Compose screen |
485
- | [`.claude-plugin/`](.claude-plugin) | Claude Code plugin and marketplace manifests |
486
- | [`hooks/`](hooks) | The Claude Code hook that scans each UI edit |
487
- | [`action.yml`](action.yml) | The GitHub Action: annotations, job summary, minimum score |
488
- | [`bin/unslop.mjs`](bin/unslop.mjs) | `npx unslop-design install / scan / score / audit / rules` |
489
- | [`docs/`](docs) | The landing page (GitHub Pages) with the live before/after |
490
- | [`install.sh`](install.sh) | Installs or updates the skill for every agent it finds |
491
- | [`scripts/validate.py`](scripts/validate.py) | Checks `SKILL.md` against the Agent Skills spec |
492
- | [`scripts/test.py`](scripts/test.py) | Regression tests: every case in `tests/cases` gives exactly the hits `tests/expected.json` lists |
493
- | [`agents/openai.yaml`](agents/openai.yaml) | Codex UI metadata (name, description, default prompt) |
494
- | [`references.md`](references.md) | Six real before/afters, one reference app and a chapter map of *Refactoring UI* |
495
-
496
- </details>
497
-
498
- ## FAQ
499
-
500
- <details>
501
- <summary><b>Will it rewrite my app without asking?</b></summary>
502
-
503
- No. The process stops at the before/after page and waits for your yes.
504
- After that it works on branches and opens a PR; merging is up to your repo's
505
- rules.
506
- </details>
507
-
508
- <details>
509
- <summary><b>Which agent should I use? What changes between them?</b></summary>
510
-
511
- Nothing in the rules: all of them read the same `SKILL.md` (the open
512
- [Agent Skills](https://agentskills.io) format); Codex also reads
513
- `agents/openai.yaml` for its UI. The parallel reviewers use subagents where
514
- your tool has them, and run one after another where it doesn't. The
515
- before/after is a published artifact in Claude Code and a local HTML file
516
- elsewhere. The full process (parallel reviewers, worktrees, PR) works best
517
- in agents with subagents and git: Claude Code, Codex, Cursor, Copilot.
518
- </details>
519
-
520
- <details>
521
- <summary><b>Does it only work for iOS?</b></summary>
522
-
523
- No. The checklist is platform-agnostic and `platforms.md` has notes for
524
- SwiftUI, Jetpack Compose and the web, plus widgets, watch and car surfaces.
525
- </details>
526
-
527
- <details>
528
- <summary><b>My project already has a design system.</b></summary>
529
-
530
- Good. The skill uses your tokens and components, and when one of its rules
531
- clashes with a written decision of yours, yours wins and the proposal says
532
- so.
533
- </details>
534
-
535
- <details>
536
- <summary><b>Isn't this just Refactoring UI?</b></summary>
537
-
538
- It builds on it (and you should buy the book). The skill turns those ideas
539
- into numbered, checkable fixes, adds what came up in real redesigns of
540
- AI-built apps (invented numbers, greeting titles, emoji icons, carousels
541
- hiding content), and is stricter where the book allows decoration that
542
- AI-generated UIs overuse.
543
- </details>
544
-
545
- <details>
546
- <summary><b>How much does a full run cost?</b></summary>
547
-
548
- The full process spawns several agents (reviewers, a jury, devs, auditors),
549
- so it uses noticeably more tokens than a normal chat. For one screen, ask
550
- for the checklist review only.
551
- </details>
249
+ Found a pattern of AI slop the checklist misses? Open an issue with a
250
+ before/after screenshot and the fix. See [CONTRIBUTING.md](CONTRIBUTING.md).
552
251
 
553
252
  ## Credits
554
253
 
@@ -562,11 +261,6 @@ for the checklist review only.
562
261
  post with "boxes have their purpose, but an app shouldn't only be built
563
262
  by them" — and a better-looking app to prove it.
564
263
 
565
- ## Contributing
566
-
567
- Found a pattern of AI slop the checklist misses? Open an issue with a
568
- before/after screenshot and the fix. See [CONTRIBUTING.md](CONTRIBUTING.md).
569
-
570
264
  ## License
571
265
 
572
266
  [MIT](LICENSE)
package/bin/unslop.mjs CHANGED
@@ -2,6 +2,7 @@
2
2
  // npx unslop-design <command>: one entry point for the installer and the scripts.
3
3
  // No dependencies. scan and score need Python 3; audit needs Playwright.
4
4
  import { spawnSync } from "node:child_process";
5
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
5
6
  import { dirname, join } from "node:path";
6
7
  import { fileURLToPath } from "node:url";
7
8
 
@@ -20,6 +21,12 @@ const HELP = `unslop-design: make your app or site stop looking AI-generated
20
21
  the rendered page at 390/768/1280 px (needs Playwright)
21
22
  npx unslop-design rules
22
23
  every rule id with its fix number
24
+ npx unslop-design contrast <text-color> <background> [more backgrounds]
25
+ the WCAG ratio of a color pair (hex, rgba(), Compose 0xFF…)
26
+ npx unslop-design hook
27
+ the post-edit hook itself: reads the agent's event on stdin (what hook configs run)
28
+ npx unslop-design hooks <gemini|codex|copilot|claude> [--write]
29
+ the post-edit hook for that agent: prints its config, --write adds it to this project
23
30
 
24
31
  Then, in your agent: "unslop this screen". Docs: https://github.com/marcosnovo/unslop-design`;
25
32
 
@@ -38,6 +45,72 @@ function python(script, args) {
38
45
  process.exit(2);
39
46
  }
40
47
 
48
+ // The same hook for every agent: `npx -y unslop-design hook` reads the agent's event on stdin.
49
+ const HOOK = "npx -y unslop-design hook";
50
+ const HOOKS = {
51
+ gemini: {
52
+ file: ".gemini/settings.json",
53
+ note: "Gemini CLI: AfterTool on write_file and replace. Project hooks ask for approval the first time.",
54
+ merge: (cfg) => {
55
+ cfg.hooks ??= {};
56
+ cfg.hooks.AfterTool = withOurHook(cfg.hooks.AfterTool,
57
+ { matcher: "write_file|replace", hooks: [{ name: "unslop-design", type: "command", command: HOOK, timeout: 30000 }] });
58
+ return cfg;
59
+ },
60
+ },
61
+ copilot: {
62
+ file: ".github/hooks/unslop-design.json",
63
+ note: "GitHub Copilot (VS Code agent, Copilot CLI, cloud agent): postToolUse. Agent hooks are in preview; commit the file for cloud sessions.",
64
+ merge: () => ({ version: 1, hooks: { postToolUse: [{ type: "command", command: HOOK, timeoutSec: 30 }] } }),
65
+ },
66
+ claude: {
67
+ file: ".claude/settings.json",
68
+ note: "Claude Code: the plugin already ships this hook (/plugin install unslop-design@unslop). Use this only without the plugin.",
69
+ merge: (cfg) => {
70
+ cfg.hooks ??= {};
71
+ cfg.hooks.PostToolUse = withOurHook(cfg.hooks.PostToolUse,
72
+ { matcher: "Write|Edit|MultiEdit", hooks: [{ type: "command", command: HOOK, timeout: 30 }] });
73
+ return cfg;
74
+ },
75
+ },
76
+ codex: {
77
+ file: null,
78
+ note: "Codex CLI: PostToolUse on apply_patch. Add this to ~/.codex/config.toml (hooks may need enabling in your version, and some versions don't fire it for apply_patch).",
79
+ text: `[[hooks.PostToolUse]]\nmatcher = "apply_patch"\n\n[[hooks.PostToolUse.hooks]]\ntype = "command"\ncommand = "${HOOK}"\n`,
80
+ },
81
+ };
82
+
83
+ // Replace only our own handler in a list of hook groups: other commands in the same group stay.
84
+ function withOurHook(groups, group) {
85
+ const ours = (h) => typeof h?.command === "string" && h.command.includes("unslop-design");
86
+ const kept = (groups || []).map(g => ({ ...g, hooks: (g.hooks || []).filter(h => !ours(h)) })).filter(g => g.hooks.length);
87
+ return [...kept, group];
88
+ }
89
+
90
+ function hooks([agent, ...flags]) {
91
+ const h = HOOKS[agent];
92
+ if (!h) {
93
+ console.error(`usage: npx unslop-design hooks <${Object.keys(HOOKS).join("|")}> [--write]\n` +
94
+ "Cursor and Windsurf hooks can't send a note back to the agent yet, so there is no hook for them.");
95
+ process.exit(2);
96
+ }
97
+ console.log(h.note + "\n");
98
+ if (!h.file) { console.log(h.text); return; }
99
+ let cfg = {};
100
+ if (existsSync(h.file)) {
101
+ try { cfg = JSON.parse(readFileSync(h.file, "utf8")); }
102
+ catch { console.error(`${h.file} isn't valid JSON: fix it or add the hook by hand.`); process.exit(2); }
103
+ }
104
+ const next = JSON.stringify(h.merge(cfg), null, 2) + "\n";
105
+ if (flags.includes("--write")) {
106
+ mkdirSync(dirname(h.file), { recursive: true });
107
+ writeFileSync(h.file, next);
108
+ console.log(`Wrote ${h.file}. The hook runs after each UI edit and is silent when it's clean.`);
109
+ } else {
110
+ console.log(`${h.file}:\n${next}\nRun again with --write to save it.`);
111
+ }
112
+ }
113
+
41
114
  switch (cmd) {
42
115
  case "install": {
43
116
  const code = run("bash", [join(ROOT, "install.sh"), ...rest]);
@@ -50,6 +123,12 @@ switch (cmd) {
50
123
  case "scan": python("slop-scan.py", rest); break;
51
124
  case "score": python("unslop-score.py", rest); break;
52
125
  case "rules": python("slop-scan.py", ["--list-rules"]); break;
126
+ case "contrast": python("contrast.py", rest); break;
127
+ case "hook": {
128
+ const r = spawnSync(process.execPath, [join(ROOT, "hooks", "unslop-hook.mjs")], { stdio: "inherit" });
129
+ process.exit(r.status ?? 0);
130
+ }
131
+ case "hooks": hooks(rest); break;
53
132
  case "audit": process.exit(run(process.execPath, [join(ROOT, "scripts", "web-audit.mjs"), ...rest]) ?? 1);
54
133
  case undefined: case "help": case "-h": case "--help": console.log(HELP); break;
55
134
  default:
@@ -1,17 +1,27 @@
1
1
  #!/usr/bin/env node
2
- // PostToolUse hook: scan the UI file the agent just wrote or edited with
2
+ // Post-edit hook: scan the UI files the agent just wrote or edited with
3
3
  // scripts/slop-scan.py and hand the new hits back to the agent as context.
4
- // Silent when clean, when the file isn't UI, when Python is missing, or when
5
- // turned off (UNSLOP_HOOK=off, or a line "hook: off" in .unslop/context.md).
4
+ //
5
+ // One script for every agent whose hooks can talk back to the model:
6
+ // Claude Code PostToolUse Write, Edit, MultiEdit: tool_input.file_path
7
+ // Gemini CLI AfterTool write_file, replace: tool_input.file_path
8
+ // Codex CLI PostToolUse apply_patch: the paths inside the patch text
9
+ // Copilot / VS Code agents PostToolUse: a file path in tool_input or toolArgs
10
+ // All of them read {"hookSpecificOutput": {"additionalContext": "…"}} on stdout.
11
+ //
12
+ // Silent when clean, when no UI file was touched, when Python is missing, or
13
+ // when turned off (UNSLOP_HOOK=off, or a line "hook: off" in .unslop/context.md).
6
14
  // It never edits anything: the agent decides, the user approves.
7
15
  import { spawnSync } from "node:child_process";
8
16
  import { existsSync, readFileSync } from "node:fs";
9
- import { dirname, join, relative, extname } from "node:path";
17
+ import { dirname, join, relative, resolve, extname } from "node:path";
10
18
  import { fileURLToPath } from "node:url";
11
19
 
12
20
  const UI = new Set([".css", ".scss", ".sass", ".less", ".html", ".htm", ".jsx", ".tsx", ".vue", ".svelte", ".astro", ".mdx", ".swift", ".kt"]);
13
21
  const SCAN = join(dirname(fileURLToPath(import.meta.url)), "..", "scripts", "slop-scan.py");
14
22
  const MAX = 8;
23
+ const PATH_KEYS = ["file_path", "filePath", "path", "absolute_path", "absolutePath", "target_file", "filename"];
24
+ const WRITE_TOOLS = /^(Write|write_file|create_file|createFile|create)$/;
15
25
 
16
26
  function quit() { process.exit(0); }
17
27
 
@@ -21,12 +31,38 @@ let ev;
21
31
  try { ev = JSON.parse(input); } catch { quit(); }
22
32
  if (/^(off|0|false|no)$/i.test(process.env.UNSLOP_HOOK || "")) quit();
23
33
 
24
- const tool = ev.tool_input || {};
25
- const file = tool.file_path;
26
- if (!file || !UI.has(extname(file).toLowerCase()) || !existsSync(file)) quit();
34
+ const cwd = ev.cwd || process.cwd();
35
+ let tool = ev.tool_input ?? ev.toolArgs ?? ev.tool_args ?? {};
36
+ if (typeof tool === "string") { try { tool = JSON.parse(tool); } catch { tool = { input: tool }; } }
37
+ const toolName = ev.tool_name || ev.toolName || "";
38
+
39
+ // The files this edit touched -> the text it brought in (null: the whole file is new).
40
+ const files = new Map();
41
+ const fresh = [tool.new_string, tool.newString, ...(Array.isArray(tool.edits) ? tool.edits : [])
42
+ .map(e => e && (e.new_string ?? e.newString))].filter(s => typeof s === "string" && s);
43
+ const whole = WRITE_TOOLS.test(toolName) || !fresh.length;
44
+ for (const key of PATH_KEYS) {
45
+ if (typeof tool[key] === "string" && tool[key]) files.set(resolve(cwd, tool[key]), whole ? null : fresh.join("\n"));
46
+ }
47
+ // Codex apply_patch: "*** Update File: src/Card.tsx" then "+added line" rows.
48
+ const strings = [];
49
+ (function walk(v) {
50
+ if (typeof v === "string") strings.push(v);
51
+ else if (Array.isArray(v)) v.forEach(walk);
52
+ else if (v && typeof v === "object") Object.values(v).forEach(walk);
53
+ })(tool);
54
+ for (const s of strings) {
55
+ for (const block of s.split(/^(?=\*\*\* (?:Add|Update|Delete) File: )/m)) {
56
+ const m = block.match(/^\*\*\* (Add|Update) File: (.+)$/m);
57
+ if (!m) continue;
58
+ const added = block.split("\n").filter(l => l.startsWith("+") && !l.startsWith("+++")).map(l => l.slice(1));
59
+ files.set(resolve(cwd, m[2].trim()), m[1] === "Add" ? null : added.join("\n"));
60
+ }
61
+ }
62
+ const targets = [...files].filter(([f]) => UI.has(extname(f).toLowerCase()) && existsSync(f));
63
+ if (!targets.length) quit();
27
64
 
28
65
  // Project context (written by "init"): slop-scan reads its scales and allowed rules itself.
29
- const cwd = ev.cwd || process.cwd();
30
66
  const opts = [];
31
67
  const ctxPath = join(cwd, ".unslop", "context.md");
32
68
  if (existsSync(ctxPath)) {
@@ -35,8 +71,8 @@ if (existsSync(ctxPath)) {
35
71
  }
36
72
 
37
73
  let out = null;
38
- for (const py of ["python3", "python"]) {
39
- const r = spawnSync(py, [SCAN, file, "--json", ...opts], { encoding: "utf8", timeout: 15000 });
74
+ for (const py of process.platform === "win32" ? ["py", "python", "python3"] : ["python3", "python"]) {
75
+ const r = spawnSync(py, [SCAN, ...targets.map(([f]) => f), "--json", ...opts], { encoding: "utf8", timeout: 15000 });
40
76
  if (r.error) continue; // not installed under this name
41
77
  if (r.status !== 0) quit(); // a bad --allow in context.md, etc.: stay out of the way
42
78
  out = r.stdout;
@@ -46,29 +82,34 @@ if (!out) quit();
46
82
 
47
83
  let hits;
48
84
  try { hits = JSON.parse(out).hits; } catch { quit(); }
49
- // After an Edit, only what the edit brought in: hits on the lines its new text now spans
50
- // (a partial-line edit counts its whole line).
51
- const fresh = [tool.new_string, ...(tool.edits || []).map(e => e.new_string)].filter(Boolean);
52
- if (fresh.length && ev.tool_name !== "Write") {
53
- const text = readFileSync(file, "utf8");
54
- const touched = new Set();
55
- for (const ns of fresh) {
56
- for (let at = text.indexOf(ns); at !== -1; at = text.indexOf(ns, at + Math.max(1, ns.length))) {
57
- const first = text.slice(0, at).split("\n").length;
58
- const last = first + ns.split("\n").length - 1;
59
- for (let n = first; n <= last; n++) touched.add(n);
85
+
86
+ // After an edit, only the lines its new text now sits on (a partial-line edit counts its whole line).
87
+ const touched = new Map();
88
+ for (const [f, text] of targets) {
89
+ if (text === null) continue;
90
+ const body = readFileSync(f, "utf8");
91
+ const lines = new Set();
92
+ // Every non-empty piece counts, even "3": a short value is a common UI edit. A short piece may
93
+ // also match other lines; reporting a few extra beats missing what the edit added.
94
+ for (const piece of text.split("\n").map(l => l.trim()).filter(Boolean)) {
95
+ for (let at = body.indexOf(piece); at !== -1; at = body.indexOf(piece, at + piece.length)) {
96
+ lines.add(body.slice(0, at).split("\n").length);
60
97
  }
61
98
  }
62
- hits = hits.filter(h => touched.has(h.line));
99
+ touched.set(f, lines);
63
100
  }
101
+ hits = hits.filter(h => {
102
+ const lines = touched.get(resolve(h.file));
103
+ return !lines || lines.has(h.line);
104
+ });
64
105
  if (!hits.length) quit();
65
- hits.sort((a, b) => a.line - b.line);
106
+ hits.sort((a, b) => (a.file === b.file ? a.line - b.line : a.file < b.file ? -1 : 1));
66
107
 
67
- const rel = relative(cwd, file) || file;
68
- const shown = hits.slice(0, MAX).map(h => `- line ${h.line}: ${h.ref} ${h.rule} — ${h.description}`);
69
- const more = hits.length > MAX ? `\n- … ${hits.length - MAX} more (python3 scripts/slop-scan.py ${rel})` : "";
70
- const note = `unslop-design found ${hits.length} slop pattern${hits.length === 1 ? "" : "s"} in what you just wrote to ${rel}:\n` +
108
+ const shown = hits.slice(0, MAX).map(h => `- ${relative(cwd, resolve(h.file)) || h.file}:${h.line}: ${h.ref} ${h.rule} — ${h.description}`);
109
+ const more = hits.length > MAX ? `\n- … ${hits.length - MAX} more (run scripts/slop-scan.py on the same files)` : "";
110
+ const note = `unslop-design found ${hits.length} slop pattern${hits.length === 1 ? "" : "s"} in what you just wrote:\n` +
71
111
  shown.join("\n") + more +
72
112
  "\nFix them by changing the value or the token (checklist.md has each fix), not by hiding them. " +
73
113
  "If one is a written project decision, it belongs in .unslop/context.md under allow:, not in an unslop-ignore.";
74
- process.stdout.write(JSON.stringify({ hookSpecificOutput: { hookEventName: "PostToolUse", additionalContext: note } }));
114
+ const event = ev.hook_event_name || ev.hookEventName || "PostToolUse";
115
+ process.stdout.write(JSON.stringify({ hookSpecificOutput: { hookEventName: event, additionalContext: note } }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unslop-design",
3
- "version": "1.12.0",
3
+ "version": "1.14.0",
4
4
  "description": "Make your app or site stop looking AI-generated: install the agent skill, scan UI code for slop and score it 0-100.",
5
5
  "license": "MIT",
6
6
  "author": "Marcos Novo (https://github.com/marcosnovo)",
@@ -18,6 +18,7 @@
18
18
  "bin/",
19
19
  "scripts/slop-scan.py",
20
20
  "scripts/unslop-score.py",
21
+ "scripts/contrast.py",
21
22
  "scripts/web-audit.mjs",
22
23
  "hooks/",
23
24
  "install.sh",
@@ -0,0 +1,91 @@
1
+ #!/usr/bin/env python3
2
+ """WCAG contrast of a text or icon color on a background, measured, not assumed.
3
+
4
+ python3 scripts/contrast.py <foreground> <background> [<more backgrounds>…]
5
+
6
+ Colors as #rgb, #rrggbb, #rrggbbaa, rgb(…) or rgba(…). A translucent
7
+ foreground is composited over each background first, the way it renders.
8
+ For text on a gradient or a photo, pass its lightest and darkest colors:
9
+ the worst one is the ratio. Native colors work the same: SwiftUI
10
+ Color(red:green:blue:) and Compose Color(0xFFrrggbb) are hex values too.
11
+
12
+ $ python3 scripts/contrast.py '#ffffff' '#3ddc84'
13
+ #ffffff on #3ddc84: 1.78:1 fails text (4.5), large text (3), icons (3)
14
+
15
+ Exit code 1 if any pair is under 4.5:1 (or under --min). Standard library only.
16
+ """
17
+ import argparse
18
+ import re
19
+ import sys
20
+
21
+
22
+ def parse(color):
23
+ c = color.strip().lower()
24
+ if c.startswith("0xff") and len(c) == 10: # Compose Color(0xFFrrggbb)
25
+ c = "#" + c[4:]
26
+ m = re.fullmatch(r"#?([0-9a-f]{3,8})", c)
27
+ if m:
28
+ h = m.group(1)
29
+ if len(h) in (3, 4):
30
+ h = "".join(ch * 2 for ch in h)
31
+ if len(h) not in (6, 8):
32
+ raise ValueError(color)
33
+ r, g, b = (int(h[i:i + 2], 16) for i in (0, 2, 4))
34
+ a = int(h[6:8], 16) / 255 if len(h) == 8 else 1.0
35
+ return r, g, b, a
36
+ m = re.fullmatch(r"rgba?\(\s*([\d.]+)[\s,]+([\d.]+)[\s,]+([\d.]+)(?:[\s,/]+([\d.]+%?))?\s*\)", c)
37
+ if m:
38
+ r, g, b = (float(m.group(i)) for i in (1, 2, 3))
39
+ a = m.group(4)
40
+ a = 1.0 if a is None else (float(a[:-1]) / 100 if a.endswith("%") else float(a))
41
+ return r, g, b, a
42
+ raise ValueError(color)
43
+
44
+
45
+ def over(fg, bg):
46
+ """fg composited over an opaque bg."""
47
+ a = fg[3]
48
+ return tuple(fg[i] * a + bg[i] * (1 - a) for i in range(3)) + (1.0,)
49
+
50
+
51
+ def luminance(c):
52
+ def ch(v):
53
+ v /= 255
54
+ return v / 12.92 if v <= 0.03928 else ((v + 0.055) / 1.055) ** 2.4
55
+ r, g, b = (ch(v) for v in c[:3])
56
+ return 0.2126 * r + 0.7152 * g + 0.0722 * b
57
+
58
+
59
+ def ratio(fg, bg):
60
+ l1, l2 = sorted((luminance(over(fg, bg)), luminance(bg)), reverse=True)
61
+ return (l1 + 0.05) / (l2 + 0.05)
62
+
63
+
64
+ def main():
65
+ ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
66
+ ap.add_argument("foreground")
67
+ ap.add_argument("backgrounds", nargs="+")
68
+ ap.add_argument("--min", type=float, default=4.5, help="exit 1 under this ratio (default 4.5, body text)")
69
+ a = ap.parse_args()
70
+ try:
71
+ fg = parse(a.foreground)
72
+ bgs = [parse(b) for b in a.backgrounds]
73
+ except ValueError as e:
74
+ sys.exit(f"can't read the color {e}: use #rrggbb, #rrggbbaa, rgb(…) or rgba(…)")
75
+ worst = None
76
+ for raw, bg in zip(a.backgrounds, bgs):
77
+ if bg[3] < 1:
78
+ sys.exit(f"the background {raw} is translucent: pass the color it renders as (composite it first)")
79
+ r = ratio(fg, bg)
80
+ worst = r if worst is None else min(worst, r)
81
+ passes = [name for name, need in (("text", 4.5), ("large text", 3), ("icons", 3)) if r >= need]
82
+ fails = [f"{name} ({need:g})" for name, need in (("text", 4.5), ("large text", 3), ("icons", 3)) if r < need]
83
+ verdict = ("passes " + ", ".join(passes)) if not fails else ("fails " + ", ".join(fails))
84
+ print(f"{a.foreground} on {raw}: {r:.2f}:1 {verdict}")
85
+ if len(bgs) > 1:
86
+ print(f"worst: {worst:.2f}:1")
87
+ return 1 if worst < a.min else 0
88
+
89
+
90
+ if __name__ == "__main__":
91
+ sys.exit(main())
@@ -104,7 +104,7 @@ RULES = [
104
104
  ("empty-action", "#64", "A control whose action is empty (it implies a feature that doesn't exist: principle 6)",
105
105
  re.compile(r"\bonClick\s*=\s*\{\s*\}|\bonClick=\{\s*\(\s*\)\s*=>\s*\{\s*\}\s*\}|"
106
106
  r"\bButton\s*\(\s*(?:action:\s*)?\{\s*\}|\bButton\s*\{\s*\}\s*label|\baction:\s*\{\s*\}"), "all"),
107
- ("pressure", "#64", "Pressure copy (countdown, scarcity, \"most popular\", \"save N%\"): true, computed and sourced?",
107
+ ("pressure", "#64", "Pressure copy (countdown, scarcity, \"most popular\", \"save N%\"): true, computed and sourced? (\"Recommended\" is honest)",
108
108
  re.compile(r"(?i:\boffer ends in\b|\bends in \d|\blimited[- ]time (?:offer|deal|only)\b|\bonly \d+ (?:left|spots?|seats?)\b|"
109
109
  r"\bhurry\b|\bact now\b|\blast chance\b|\bmost popular\b|\bbest (?:value|seller)\b|"
110
110
  r"\bsave \d+\s?%(?!(?:\s|<[^<>]+>)*(?:vs\.?|versus|compared|than)\b))"), "all"),