jig-ui 0.8.2 → 0.9.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/CHANGELOG.md +45 -0
- package/README.md +4 -4
- package/package.json +1 -1
- package/rules/00-anti-patterns.md +9 -1
- package/rules.index.json +7 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,50 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.9.0
|
|
4
|
+
|
|
5
|
+
One new rule and one amended correction, both from the same afternoon of
|
|
6
|
+
dogfooding and both about the same blind spot: H-47's correction always pointed
|
|
7
|
+
at a token, so an agent reading it literally always produced one.
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **`B-105` Monospace sized by a guessed ratio.** No rule in the corpus
|
|
12
|
+
mentioned monospace or inline `code` at all — `jig explain monospace` returned
|
|
13
|
+
nothing — while `brand.default.css` ships a `--font-mono` stack, so every Jig
|
|
14
|
+
project has the pairing and none had guidance on it.
|
|
15
|
+
|
|
16
|
+
Shrinking inline code by a ratio is right for faces drawn apart, where a mono
|
|
17
|
+
face often does sit larger at the same `font-size`. In a superfamily it is
|
|
18
|
+
wrong: IBM Plex Sans and IBM Plex Mono are both x-height 51.6 and cap-height
|
|
19
|
+
69.8 per 1000 units — identical — and mono is *narrower*. A `0.9em` there sets
|
|
20
|
+
code at x-height 46.8 inside text at 52, creating the mismatch it was meant to
|
|
21
|
+
remove. The rule asks for one measurement, once per project, when the brand
|
|
22
|
+
file is written.
|
|
23
|
+
|
|
24
|
+
It deliberately has no token. Inline `code` appears inside body text,
|
|
25
|
+
headings, table cells and captions; one multiplier has to be right for all
|
|
26
|
+
four, and a fixed token is worse — it collapses code in a heading to caption
|
|
27
|
+
size. Inheriting is correct in every host.
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
- **`H-47`'s correction names a third branch.** It offered "reference the token"
|
|
32
|
+
or "a value that cannot be expressed as a token indicates a missing token".
|
|
33
|
+
Both end in a token. Twice in a row on Jig's own documentation site the right
|
|
34
|
+
answer was **deletion** — the `0.9em` above, and a `min-width` in `em` on a
|
|
35
|
+
table column that `max-content` measures for free. An agent following the text
|
|
36
|
+
as written invents `--text-code: 0.9em` and entrenches a value that should not
|
|
37
|
+
exist. The correction now says to check "should this value exist at all"
|
|
38
|
+
before minting a token.
|
|
39
|
+
|
|
40
|
+
`rules.index.json`'s `fix: token-substitute` on H-47 encoded the same
|
|
41
|
+
assumption and is now `token-substitute-or-remove`. Nothing consumes that
|
|
42
|
+
field yet, which is why it was worth correcting before something does.
|
|
43
|
+
|
|
44
|
+
- **Rule count is 105.** The attestation line and the README's counts move with
|
|
45
|
+
it.
|
|
46
|
+
|
|
47
|
+
|
|
3
48
|
## 0.8.2
|
|
4
49
|
|
|
5
50
|
Every fix here was found by a consumer using Jig rather than by Jig checking
|
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ Installed as `npx jig-ui` — the bare name was taken on npm.
|
|
|
12
12
|
Jig is **a skill your coding agent reads**, and **a CLI you can run yourself**.
|
|
13
13
|
They are two halves of the same thing, and the split is not arbitrary:
|
|
14
14
|
|
|
15
|
-
- Of the
|
|
15
|
+
- Of the 105 rules, **7 can be decided by a machine** — a hard-coded colour, a
|
|
16
16
|
contrast ratio below the floor, a removed focus ring. The CLI decides those.
|
|
17
17
|
- The other **97 are judgment** — whether an empty state says anything useful,
|
|
18
18
|
whether a label reads as an instruction, whether motion earns its place. No
|
|
@@ -181,7 +181,7 @@ on the result — the CLI reports, the agent applies the judgment half.
|
|
|
181
181
|
| Slash command | Equivalent |
|
|
182
182
|
| --- | --- |
|
|
183
183
|
| `/jig init` | `jig init` — then states the mode it chose and what it wired |
|
|
184
|
-
| `/jig check` | `jig check` — then applies the
|
|
184
|
+
| `/jig check` | `jig check` — then applies the 95 judgment rules and reports both halves |
|
|
185
185
|
| `/jig explain C-19` | `jig explain C-19` — prints the rule as-is, without paraphrasing it |
|
|
186
186
|
| `/jig explain contrast` | `jig explain contrast` — every rule matching a word, when you do not have an id |
|
|
187
187
|
| `/jig install --agent cursor` | `jig install --agent cursor` |
|
|
@@ -262,7 +262,7 @@ In CI:
|
|
|
262
262
|
code — nothing model-dependent, no network. As a pre-commit hook, plain `check`
|
|
263
263
|
looks at changed files only.
|
|
264
264
|
|
|
265
|
-
What you will not get from the CLI alone is the other
|
|
265
|
+
What you will not get from the CLI alone is the other 95 rules. `check` says so
|
|
266
266
|
rather than letting a narrow pass read as a broad one.
|
|
267
267
|
|
|
268
268
|
## What `check` covers
|
|
@@ -330,7 +330,7 @@ treatment.
|
|
|
330
330
|
|
|
331
331
|
| File | Contents |
|
|
332
332
|
| --- | --- |
|
|
333
|
-
| `rules/00-anti-patterns.md` |
|
|
333
|
+
| `rules/00-anti-patterns.md` | 88 universal rules with corrections |
|
|
334
334
|
| `rules/01-modes.md` | `editorial` / `product` / `operator` profiles |
|
|
335
335
|
| `rules/02-tokens.md` | Token contract, naming, consumption |
|
|
336
336
|
| `rules/03-patterns.md` | Component anatomy and behaviour |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jig-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "A design system for coding agents. 104 numbered UI rules, brand x mode design tokens, and an installer for Claude Code, Codex, Cursor and opencode.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -144,6 +144,13 @@ Four workable treatments:
|
|
|
144
144
|
4. **Solid background behind the text** — the caption approach; most reliable, least subtle.
|
|
145
145
|
A text shadow may reinforce any of these but never substitutes for one. Verify against the worst image the slot will ever hold, not the one in the mockup.
|
|
146
146
|
|
|
147
|
+
### B-105 Monospace sized by a guessed ratio
|
|
148
|
+
❌ Inline `code` set to `0.9em` — or any fixed ratio — to stop it looking bigger than the text around it
|
|
149
|
+
✅ Measure both faces before correcting either. If they share an x-height, the ratio is the mismatch. Let code inherit its host's size.
|
|
150
|
+
The habit comes from pairings where it is true: a mono face drawn separately from the text face often does sit larger at the same `font-size`. In a superfamily it does not. IBM Plex Sans and IBM Plex Mono are both x-height 51.6 and cap-height 69.8 per 1000 units — identical — and mono is *narrower*, not larger. A `0.9em` there sets code at x-height 46.8 inside text at 52, creating the mismatch it was meant to remove.
|
|
151
|
+
A ratio is also the wrong shape of answer. Inline `code` appears inside body text, headings, table cells and captions; one multiplier has to be right for all of them, and a fixed token is worse still — it collapses code in a heading to caption size. Inheriting is correct in every host, which is why this rule has no token.
|
|
152
|
+
The measurement is one line in a browser: render `x` in both faces at the same size and compare the rendered heights, or read `sxHeight` from each font's `OS/2` table. Do it once per project when the brand file is written, not per component.
|
|
153
|
+
|
|
147
154
|
---
|
|
148
155
|
|
|
149
156
|
## C. Colour and contrast
|
|
@@ -485,7 +492,8 @@ Where people must *browse* to decide, split the list into two dependent fields
|
|
|
485
492
|
|
|
486
493
|
### H-47 Values hard-coded past the token layer
|
|
487
494
|
❌ A raw hex colour or pixel size written in component code
|
|
488
|
-
✅ Reference the token. Consume the semantic role (`--color-text-strong`), not the primitive (`--color-neutral-900`). A value that cannot be expressed as a token
|
|
495
|
+
✅ Reference the token. Consume the semantic role (`--color-text-strong`), not the primitive (`--color-neutral-900`). A value that cannot be expressed as a token is a missing token — or a value that should not exist at all. Check the second before minting the first.
|
|
496
|
+
Deletion is a real answer and the easy one to miss, because the correction points at a token and an agent reading it literally invents one. Both times this rule fired on Jig's own documentation site the fix was removal: `font-size: 0.9em` on inline `code`, where the two faces share vertical metrics and inheriting is correct (`B-105`); and a `min-width` in `em` on a table column that `max-content` measures for free. A token minted to satisfy a detector entrenches the value it was invented for.
|
|
489
497
|
|
|
490
498
|
### H-48 JavaScript for something CSS does
|
|
491
499
|
❌ Scroll listeners for sticky positioning; scripted accordions and dialogs that have native equivalents
|
package/rules.index.json
CHANGED
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"bucket": "mechanical",
|
|
50
50
|
"severity": "error",
|
|
51
51
|
"detector": "hardcoded-value",
|
|
52
|
-
"fix": "token-substitute",
|
|
52
|
+
"fix": "token-substitute-or-remove",
|
|
53
53
|
"since": "0.1.0"
|
|
54
54
|
},
|
|
55
55
|
{
|
|
@@ -187,6 +187,12 @@
|
|
|
187
187
|
"severity": "note",
|
|
188
188
|
"since": "0.1.0"
|
|
189
189
|
},
|
|
190
|
+
{
|
|
191
|
+
"id": "B-105",
|
|
192
|
+
"bucket": "judgment",
|
|
193
|
+
"severity": "note",
|
|
194
|
+
"since": "0.9.0"
|
|
195
|
+
},
|
|
190
196
|
{
|
|
191
197
|
"id": "C-66",
|
|
192
198
|
"bucket": "judgment",
|