@josueavalosjim/taste-check 0.4.0 → 0.4.1

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 (2) hide show
  1. package/README.md +84 -20
  2. package/package.json +3 -2
package/README.md CHANGED
@@ -1,22 +1,27 @@
1
1
  # taste-check
2
2
 
3
- Two deterministic checks for a design system you already have. It computes WCAG
4
- contrast ratios from your own custom properties, and flags class names and
5
- literal values that are not on your own approved list.
3
+ Design review in CI, with a line down the middle of it.
6
4
 
7
- It has no opinion about which colours you use or which classes are allowed.
8
- You supply both.
5
+ Some of design review is measurable. Contrast ratios, values that should have
6
+ been tokens, class names nobody approved. taste-check measures those and fails
7
+ your build on them.
9
8
 
10
- ```bash
11
- npx @josueavalosjim/taste-check --config tastecheck.config.json
12
- ```
9
+ The rest is judgment, and it cannot be measured. For that it sends your
10
+ screenshots and your checklist to a model, and reports what comes back as an
11
+ opinion rather than a result.
13
12
 
14
- Installed as a dependency, the command is just `taste-check`:
13
+ Keeping those two apart is the whole design. A tool that blurs them either
14
+ blocks your pipeline on a coin flip or quietly downgrades a real failure to a
15
+ suggestion.
15
16
 
16
17
  ```bash
17
18
  npm i -D @josueavalosjim/taste-check
18
19
  ```
19
20
 
21
+ ```bash
22
+ npx @josueavalosjim/taste-check
23
+ ```
24
+
20
25
  ```
21
26
  contrast ok, 10 pairs across 2 themes
22
27
  ok 17.76:1 needs 4.5 light --text-strong on --surface body text
@@ -28,20 +33,37 @@ treatments FAILED
28
33
  FAIL src/Promo.jsx:8 inline value "#ff0055" on <a> is a one-off. Use a token, or add it to approvedValues.
29
34
  ```
30
35
 
36
+ ```bash
37
+ npx @josueavalosjim/taste-check judge
38
+ ```
39
+
40
+ ```
41
+ judge ok, 5 lines against 2 screenshots, 1 to read
42
+ NOTE fail Nothing important is cut off at the edge: the third card runs
43
+ past the right edge of the frame at roughly x=798 of 800.
44
+ ```
45
+
31
46
  Zero runtime dependencies. Node 22 or newer.
32
47
 
33
48
  ## Why this exists
34
49
 
35
- Most quality tooling checks compliance and has no point of view. axe tells you
36
- an element fails 4.5:1. It cannot tell you that your borders answer to 3:1
37
- while your captions answer to 4.5:1, because that distinction is yours, not the
38
- spec's.
50
+ Linters have a gate and no taste. They enforce what someone could write down
51
+ as a rule, which is why they can tell you an element fails 4.5:1 but not that
52
+ your borders answer to 3:1 while your captions answer to 4.5:1. That
53
+ distinction is yours, not the spec's.
54
+
55
+ The newer AI design reviewers have taste and no gate. They will tell you what
56
+ is wrong with a screen, in prose, in a chat window, and some of them arrive
57
+ with a few hundred opinions already loaded about what good looks like.
39
58
 
40
- Design systems drift in a specific way: a value gets hardcoded because the
41
- token did not quite fit, a class gets invented because nobody knew the approved
42
- one existed. Written rules do not stop it. A rule in a stylesheet comment is
43
- enforced by people re-reading stylesheets, and nobody re-reads a stylesheet
44
- while writing markup. So the rules get a check that runs instead.
59
+ Both halves are useful and they need to stay separable. Run the same model
60
+ twice over the same unchanged screen and you can get two different answers,
61
+ which is fine for advice and disqualifying for a build gate. So the measured
62
+ half here gates, the judged half does not, and the tool will not let you
63
+ confuse one for the other by accident.
64
+
65
+ It also ships no design rules of its own. Not a palette, not a class list, not
66
+ a contrast floor, not a checklist. You supply all of it.
45
67
 
46
68
  ## What counts as a failure
47
69
 
@@ -58,6 +80,12 @@ Each of these exits 1 rather than passing quietly:
58
80
  A check that cannot fail is worse than no check, because it goes green and gets
59
81
  quoted as evidence.
60
82
 
83
+ The judge is held to the same rule from the other side. Its verdicts never
84
+ affect the exit code by default, but a judge that could not run does: no
85
+ screenshots, a command that died, a reply that was not JSON or that skipped a
86
+ checklist line. "Did not run" and "found nothing" must not print the same
87
+ thing.
88
+
61
89
  ## The contrast check
62
90
 
63
91
  Give it your custom properties, describe your themes, and list what must clear
@@ -252,6 +280,33 @@ taste-check judge [options] Ask a fresh-eyes judge about your screenshots
252
280
  Exit code is 1 if any check fails, 0 if every check ran and passed. The judge
253
281
  plays by the rules in its own section above.
254
282
 
283
+ ## Where it sits next to other tools
284
+
285
+ This is a small tool with a narrow claim, and several of these are better than
286
+ it at the thing they do. Reach for them.
287
+
288
+ **axe, pa11y.** They run against a real rendered page and catch far more than
289
+ contrast. taste-check checks pairs you declare in a config, before a page
290
+ exists and without a browser. Use both. If you only run one accessibility
291
+ tool, run axe.
292
+
293
+ **stylelint, eslint.** General code quality, with an enormous rule ecosystem.
294
+ Nothing here replaces them.
295
+
296
+ **@lapidist/design-lint.** More thorough than taste-check on the token and
297
+ component side: it parses properly rather than scanning, knows about
298
+ frameworks, autofixes, and manages deprecations. If enforcing tokens in code is
299
+ the whole of your problem, it is the better fit.
300
+
301
+ **Checklist Design and similar agent skills.** They arrive with a hundred or
302
+ more published checklists and review conversationally. If you want good
303
+ opinions supplied, take theirs. taste-check supplies none on purpose and runs
304
+ in CI with an exit code instead.
305
+
306
+ What is left, and the reason this exists: nothing above draws a line between
307
+ the part that can gate a build and the part that cannot. The linters have no
308
+ judgment, the judges have no gate.
309
+
255
310
  ## What this does not do
256
311
 
257
312
  Read this before trusting a green run.
@@ -288,12 +343,21 @@ invisible to it.
288
343
  Not built. Written down so the shape is clear.
289
344
 
290
345
  **A runtime mode**, closing the gap named above by measuring `getComputedStyle`
291
- in a real browser, as an optional peer dependency so the core stays free of one.
346
+ in a real browser, as an optional peer dependency so the core stays free of
347
+ one. This is the one that matters most. An advisory judge is only worth
348
+ listening to if the measured half beside it is genuinely measured, and reading
349
+ a token file is the weaker version of that.
292
350
 
293
351
  **YAML configs**, once there is a reason to take on a parser.
294
352
 
353
+ **SARIF output**, so findings land in a code scanning tab rather than only in
354
+ a log.
355
+
356
+ **A way to run the judge from an agent skill**, not only from a shell.
357
+
295
358
  **`lab()` and `lch()`**, which need the D50 white point and a chromatic
296
- adaptation step that `oklch()` does not. Worth doing the same way: derive it,
359
+ adaptation step that `oklch()` does not. Completeness rather than reach, so
360
+ it sits behind the others. Worth doing the same way when it happens: derive it,
297
361
  then check every case against a browser rather than trusting the matrices.
298
362
 
299
363
  ## Development
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@josueavalosjim/taste-check",
3
- "version": "0.4.0",
4
- "description": "Deterministic design-system checks: WCAG contrast over your own tokens, and a one-off value linter over your own approved list. No palette, no class list, no opinions shipped.",
3
+ "version": "0.4.1",
4
+ "description": "Design review in CI with a line down the middle: measured checks that gate the build (WCAG contrast over your own tokens, one-off values in your own markup) and a fresh-eyes model judge whose verdicts stay advisory. Ships no design rules of its own.",
5
5
  "keywords": [
6
6
  "accessibility",
7
7
  "cli",
8
8
  "contrast",
9
+ "design-review",
9
10
  "design-system",
10
11
  "design-tokens",
11
12
  "lint",