jig-ui 0.9.0 → 0.11.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 +95 -0
- package/README.md +55 -12
- package/dist/index.js +1463 -159
- package/layers.json +100 -0
- package/package.json +3 -2
- package/rules/00-anti-patterns.md +80 -2
- package/rules/01-modes.md +6 -6
- package/rules/02-tokens.md +13 -10
- package/rules/03-patterns.md +44 -4
- package/rules/04-principles.md +12 -12
- package/rules/05-copy.md +1 -1
- package/rules.index.json +246 -95
- package/templates/COMMAND.md.tmpl +1060 -17
- package/templates/SKILL.md.tmpl +52 -13
- package/templates/command-metadata.json +43 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,100 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.11.0
|
|
4
|
+
|
|
5
|
+
One release, one lesson: a measurement an agent can type is not a
|
|
6
|
+
measurement. Everything here came from two live runs at the capability
|
|
7
|
+
floor the day 0.10.0 shipped.
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **`jig probe --save <surface>`.** The CLI writes the probe file now. It
|
|
12
|
+
reads what the probe returned on stdin, checks it is probe output for a
|
|
13
|
+
page inside the project, and stamps it with that page's checksum and the
|
|
14
|
+
time. A run had written its own probe file by hand — five links and an
|
|
15
|
+
Escape key that closed a menu with thirteen links and no Escape handler —
|
|
16
|
+
and its review passed on those numbers.
|
|
17
|
+
- **`install --hook` / `--no-hook`.** The Stop hook is opt-in. An
|
|
18
|
+
interactive install offers it once and takes silence as no; `--yes` never
|
|
19
|
+
adds it, because that is the path an agent takes and nobody is there to
|
|
20
|
+
consent. `update` moves an existing hook and never adds one.
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
- **Probe files are version 2.** `jig verdicts` rejects a probe with no
|
|
25
|
+
stamp — nothing measured it — and one whose page changed after it was
|
|
26
|
+
taken. Version 1 files no longer validate.
|
|
27
|
+
- **README and `init` say which directory to commit, and why.** The tokens
|
|
28
|
+
live in `<css dir>/jig/`; `.jig/` holds `state.json`, specs, mockups and
|
|
29
|
+
critique verdicts. Both are warned about separately, each with what
|
|
30
|
+
ignoring it costs. Since 0.7.0 both had said `.jig/` holds the tokens.
|
|
31
|
+
|
|
32
|
+
## 0.10.0
|
|
33
|
+
|
|
34
|
+
Mobile-first, and a design loop that a weak model cannot skip. Everything here
|
|
35
|
+
was measured on live runs at the capability floor (Haiku), and most of it exists
|
|
36
|
+
because an instruction the agent could choose to ignore was ignored.
|
|
37
|
+
|
|
38
|
+
### Added
|
|
39
|
+
|
|
40
|
+
- **The loop: `decide` → `spec` → `mockup` → `make` → `critique`.** `decide`
|
|
41
|
+
runs once per project. The other four run per page, feature or functionality.
|
|
42
|
+
`mockup` is new: a low-fidelity grayscale drawing, reviewed before any code,
|
|
43
|
+
in HTML (the default), Figma or Google Stitch. Every region is labelled with
|
|
44
|
+
its measured size, and the phone frame draws the menu open as well as closed.
|
|
45
|
+
- **`jig verdicts <surface>`.** A critique's reader arms write one verdict per
|
|
46
|
+
rule to `.jig/critique/<surface>/screen.json` and `code.json`; this command
|
|
47
|
+
decides whether the review is complete and computes the counts the attestation
|
|
48
|
+
reports. It refuses invented ids, a rule filed by the wrong arm, a rule judged
|
|
49
|
+
twice, an `n/a` whose reason says the rule was never read, and `rendered: true`
|
|
50
|
+
with no artefact. A screen pass with no render is `skipped`, not `ran`.
|
|
51
|
+
- **`jig probe`.** One expression the critique evaluates in any browser at 360,
|
|
52
|
+
768 and 1280. It operates the phone menu (does it open, does `aria-expanded`
|
|
53
|
+
change, does the label read as close, does Escape close it), measures sideways
|
|
54
|
+
scroll, and reads whether the styles and tokens actually applied. `verdicts`
|
|
55
|
+
refuses a verdict the probe contradicts.
|
|
56
|
+
- **`jig gate`, run by a Stop hook** — off unless you ask for it with
|
|
57
|
+
`install --hook`, or say yes when an interactive install offers it. It blocks
|
|
58
|
+
an agent from finishing while the files it changed fail `check`, or while the
|
|
59
|
+
`/jig` command it just ran left its work unfinished. After three attempts it
|
|
60
|
+
lets go and says the work is not done. `--yes` never adds it: that is the
|
|
61
|
+
agent's path, and nobody is there to consent. `update` moves an existing hook
|
|
62
|
+
to the new version and never adds one.
|
|
63
|
+
- **Six mobile rules.** `D-111` a page that never adapts, `D-112` `100vh`,
|
|
64
|
+
`F-113` form text that zooms on iOS, `D-114` a bar under the notch,
|
|
65
|
+
`D-115` a page that scrolls sideways, `E-116` a menu that cannot be opened or
|
|
66
|
+
cannot say it is open.
|
|
67
|
+
- **`H-117` a token name nothing declares.** A `var()` naming a property no file
|
|
68
|
+
declares makes its whole declaration invalid, so the page silently loses its
|
|
69
|
+
font, spacing and borders. Three of four live builds shipped exactly that,
|
|
70
|
+
and every file-based check passed them.
|
|
71
|
+
- **`P-14` site navigation**, composed for the phone first: what to show at each
|
|
72
|
+
width, a named menu control whose state is visible and announced, `aria-current`
|
|
73
|
+
styled from the attribute, and no sideways-scrolling nav row.
|
|
74
|
+
|
|
75
|
+
### Changed
|
|
76
|
+
|
|
77
|
+
- **`spec` writes a whole composition per screen size**, phone first, with
|
|
78
|
+
`regions:` and `nav:` at each — not one composition and a note about narrow
|
|
79
|
+
screens. A menu button at a width where the links fit is refused: where the
|
|
80
|
+
button sits is the project's decision, whether it exists at that width is not.
|
|
81
|
+
- **`make` finishes on three gates**: a pasted `JIG_CHECK` with no mechanical
|
|
82
|
+
errors, a region-by-region comparison with the approved mockup at each width,
|
|
83
|
+
and each size's spec fields accounted for.
|
|
84
|
+
- **`critique` operates the page** instead of only looking at it, judges the
|
|
85
|
+
`P-` patterns the spec uses, and sends its findings back to `make` until the
|
|
86
|
+
page is clean or the user accepts what is left, by id.
|
|
87
|
+
- **`decide` records what is still open** in an `Unresolved` section, and writes
|
|
88
|
+
only reasons the owner gave.
|
|
89
|
+
- **`explain` searches every line of every rule**, and the free sections of the
|
|
90
|
+
reference, not only titles and preambles.
|
|
91
|
+
- **`check` warns** when `jig.config.json` is unreadable or declares a mode the
|
|
92
|
+
token layer does not import, and counts those warnings in `JIG_CHECK`.
|
|
93
|
+
- **`L-01`'s squint test runs on a grayscale render** where a browser exists;
|
|
94
|
+
reading the source is the fallback, not the equal.
|
|
95
|
+
- **`init --yes` says what it did not decide** — no surface mapping, and
|
|
96
|
+
re-running `init` after you declare one.
|
|
97
|
+
|
|
3
98
|
## 0.9.0
|
|
4
99
|
|
|
5
100
|
One new rule and one amended correction, both from the same afternoon of
|
package/README.md
CHANGED
|
@@ -12,13 +12,13 @@ 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 113 rules, **16 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
|
|
19
19
|
regex settles those. An agent reads the rules and applies them.
|
|
20
20
|
|
|
21
|
-
Running only the CLI gets you the
|
|
21
|
+
Running only the CLI gets you the 16. Running only the agent gets you the 97 with
|
|
22
22
|
no verification. **A clean `jig check` is not a clean review**, and the skill
|
|
23
23
|
says so to every agent that reads it.
|
|
24
24
|
|
|
@@ -49,6 +49,22 @@ Paste the line for your agent and let it run the command.
|
|
|
49
49
|
Add `--scope global` to install once for every project instead of just this one.
|
|
50
50
|
Every agent supports both scopes.
|
|
51
51
|
|
|
52
|
+
**Claude Code can also install a Stop hook — if you ask for it.** Add `--hook`, or
|
|
53
|
+
answer yes when an interactive install offers it. It adds one entry to
|
|
54
|
+
`.claude/settings.json`, keeping everything already in that file, and runs `jig gate`
|
|
55
|
+
when the agent tries to finish: it holds the agent there while the files it changed
|
|
56
|
+
fail `check`, or while the `/jig` command it just ran left its work incomplete — a
|
|
57
|
+
spec that is prose, a critique with no verdict files, a review that never rendered
|
|
58
|
+
the page. After three attempts it lets the agent stop and says the work is
|
|
59
|
+
unfinished.
|
|
60
|
+
|
|
61
|
+
It is off by default, and `--yes` never adds it, because that is the path an agent
|
|
62
|
+
takes and nobody is there to consent. It exists because weak models skip any step
|
|
63
|
+
they are merely asked to run: in live runs at the capability floor, builds shipped
|
|
64
|
+
53 mechanical errors, pages rendered with no styles at all, and four reviews in a row
|
|
65
|
+
wrote no verdicts. Delete the entry to remove it; `update` moves it with the version
|
|
66
|
+
but never adds one.
|
|
67
|
+
|
|
52
68
|
| Agent | Project scope | Global scope |
|
|
53
69
|
| --- | --- | --- |
|
|
54
70
|
| Claude Code | `.claude/skills/jig/SKILL.md` | `~/.claude/skills/jig/SKILL.md` |
|
|
@@ -133,13 +149,23 @@ Set `brand` in `jig.config.json` to put it somewhere else. Projects set up
|
|
|
133
149
|
before 0.7.0 keep their `.jig/tokens/` layout; `update` does not move them, and
|
|
134
150
|
`init` offers to.
|
|
135
151
|
|
|
136
|
-
The mode file is the one
|
|
137
|
-
edge in a build graph and has to resolve locally, on
|
|
152
|
+
The mode file is the one token file copied verbatim from the package: a
|
|
153
|
+
stylesheet `@import` is an edge in a build graph and has to resolve locally, on
|
|
154
|
+
every machine that builds. The brand file and the barrel are generated for your
|
|
155
|
+
project, not copied.
|
|
156
|
+
|
|
157
|
+
**Commit the token directory** — `<css dir>/jig/`. It holds the files your
|
|
158
|
+
stylesheet `@import`s, so ignoring it means the design system does not exist for
|
|
159
|
+
anyone who did not run `init` themselves: their build breaks on a missing import,
|
|
160
|
+
and CI's `jig check` sees no token layer at all.
|
|
138
161
|
|
|
139
|
-
**Commit `.jig
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
162
|
+
**Commit `.jig/` too.** It is not the tokens (it was, before 0.7.0). It holds
|
|
163
|
+
`state.json`, which records the version and checksum of every file `init` wrote
|
|
164
|
+
and is what `update` reads to know what it may refresh, plus the durable record of
|
|
165
|
+
the design loop: your specs, approved mockups and critique verdicts. Ignored, a
|
|
166
|
+
teammate's `update` cannot tell a file you edited from one it wrote, and every
|
|
167
|
+
spec the project agreed is invisible to the next agent. `init` warns if it finds
|
|
168
|
+
either directory ignored.
|
|
143
169
|
|
|
144
170
|
Add `--yes` to accept every derived default non-interactively — the mode CI and
|
|
145
171
|
agents run in. It states the mode it chose and where to change it, because
|
|
@@ -150,10 +176,13 @@ overwrites a config or brand file you have edited.
|
|
|
150
176
|
|
|
151
177
|
| Command | What it does |
|
|
152
178
|
| --- | --- |
|
|
153
|
-
| `install --agent <name> [--scope project\|global]` | Puts the skill and its rules where your agent will find them. Writes nothing else into your repo
|
|
179
|
+
| `install --agent <name> [--scope project\|global] [--hook]` | Puts the skill and its rules where your agent will find them. Writes nothing else into your repo, unless you ask for `--hook`. |
|
|
154
180
|
| `init [--yes]` | Sets the project up: CSS system, brand colour, token files, `jig.config.json`, wired imports, baseline check. The only command that writes into your repo. |
|
|
155
181
|
| `check [--all] [--ci] [--json]` | Runs the rules a machine can decide. Reports findings by rule id. |
|
|
156
182
|
| `update` | Refreshes an install to a newer version, leaving alone any file you have edited. |
|
|
183
|
+
| `verdicts <surface>` | Verifies a critique's verdict files and computes its counts: every rule in each pass judged once, no id that does not exist, no rule in the wrong arm, and no verdict the render probe contradicts. |
|
|
184
|
+
| `probe` | Prints the render probe — one expression the critique runs in a browser at each width. It operates the menu, measures sideways scroll, and reads whether the styles and tokens applied. |
|
|
185
|
+
| `gate` | Run by the Stop hook `install` adds for Claude Code, not by hand. Blocks an agent from finishing while `check` fails on the files it changed, or the step it just ran left its work unfinished. |
|
|
157
186
|
| `explain <rule-id \| word> [--list]` | Given an id, prints a rule in full — what it forbids, what to do instead, the version it arrived in, and who checks it. Also resolves the `P-` pattern and `M-` mode specs, which no rule index contains. Given a **word**, searches every title and body and lists what matches, so you can find a rule you cannot name. `--list` prints every id, or one section's. |
|
|
158
187
|
|
|
159
188
|
Flags worth knowing:
|
|
@@ -166,6 +195,7 @@ Flags worth knowing:
|
|
|
166
195
|
| `check --json` | Machine-readable findings, for tooling or for reading every finding when the terminal output elides repeats. |
|
|
167
196
|
| `init --yes` | Non-interactive; accept every derived default. |
|
|
168
197
|
| `install --scope global` | Install once for every project. |
|
|
198
|
+
| `install --hook` | Add the Stop hook (Claude Code, project scope). Off unless asked; `--no-hook` declines without being asked. |
|
|
169
199
|
|
|
170
200
|
**Run `update` unpinned:** `npx jig-ui@latest update`. The skill pins every other
|
|
171
201
|
command to the version that wrote it, so the CLI and the rules always agree;
|
|
@@ -181,11 +211,19 @@ on the result — the CLI reports, the agent applies the judgment half.
|
|
|
181
211
|
| Slash command | Equivalent |
|
|
182
212
|
| --- | --- |
|
|
183
213
|
| `/jig init` | `jig init` — then states the mode it chose and what it wired |
|
|
184
|
-
| `/jig check` | `jig check` — then applies the
|
|
214
|
+
| `/jig check` | `jig check` — then applies the 97 judgment rules and reports both halves |
|
|
185
215
|
| `/jig explain C-19` | `jig explain C-19` — prints the rule as-is, without paraphrasing it |
|
|
186
216
|
| `/jig explain contrast` | `jig explain contrast` — every rule matching a word, when you do not have an id |
|
|
187
217
|
| `/jig install --agent cursor` | `jig install --agent cursor` |
|
|
188
218
|
| `/jig update` | `jig update` |
|
|
219
|
+
| `/jig decide` | No CLI. Once per project: interviews you and writes the project-wide decisions, with a reason for each |
|
|
220
|
+
| `/jig spec invoice page` | No CLI. What exactly is being built — a page, feature or functionality — at its smallest useful version, at every screen size |
|
|
221
|
+
| `/jig mockup` | No CLI. Low-fidelity design of that spec, reviewed before code — in HTML, Figma or Google Stitch, whichever you choose |
|
|
222
|
+
| `/jig make` | No CLI. High-fidelity: builds the actual page or feature from the spec and mockup |
|
|
223
|
+
| `/jig critique` | `jig verdicts` + `jig probe`. Scrutinises what was built against the rules, its spec and its mockup: two reader arms write their verdicts to files, the CLI decides whether the review is complete, and a browser probe checks the verdicts against what the page actually does |
|
|
224
|
+
|
|
225
|
+
`decide` runs once. The other four run for each page, feature or functionality, one
|
|
226
|
+
at a time — never the whole product at once.
|
|
189
227
|
|
|
190
228
|
Where each lands:
|
|
191
229
|
|
|
@@ -234,10 +272,13 @@ that plainly involves UI usually loads it. If it does not, say so once —
|
|
|
234
272
|
Every finished piece of UI work ends with an attestation line:
|
|
235
273
|
|
|
236
274
|
```text
|
|
237
|
-
JIG_CHECK: version=<version> mode=<mode> mechanical=<pass|fail|skipped>:<n> judgment=<ran|skipped>
|
|
275
|
+
JIG_CHECK: version=<version> mode=<mode> mechanical=<pass|fail|skipped>:<n> warnings=<n> judgment=<ran|skipped>:<n> files=<n> styled=<n>
|
|
238
276
|
```
|
|
239
277
|
|
|
240
278
|
`jig check` emits the same line for the half it can do, with `judgment=not-run`.
|
|
279
|
+
`mechanical=pass` means no errors; `warnings=` is counted beside it, because the
|
|
280
|
+
mobile detectors warn rather than fail CI and a page can carry `pass:0` while
|
|
281
|
+
not working on a phone.
|
|
241
282
|
If an agent reports `judgment=ran`, it ran the self-check at the end of
|
|
242
283
|
`rules/00-anti-patterns.md`; if it says `skipped`, it must say why.
|
|
243
284
|
|
|
@@ -330,7 +371,7 @@ treatment.
|
|
|
330
371
|
|
|
331
372
|
| File | Contents |
|
|
332
373
|
| --- | --- |
|
|
333
|
-
| `rules/00-anti-patterns.md` |
|
|
374
|
+
| `rules/00-anti-patterns.md` | 96 universal rules with corrections |
|
|
334
375
|
| `rules/01-modes.md` | `editorial` / `product` / `operator` profiles |
|
|
335
376
|
| `rules/02-tokens.md` | Token contract, naming, consumption |
|
|
336
377
|
| `rules/03-patterns.md` | Component anatomy and behaviour |
|
|
@@ -339,6 +380,8 @@ treatment.
|
|
|
339
380
|
| `<css dir>/jig/brand.*.css` | Identity. One per project. |
|
|
340
381
|
| `<css dir>/jig/mode.*.css` | Density, scale, rhythm, motion |
|
|
341
382
|
| `<css dir>/jig/theme.css` | The barrel — brand + mode. This is what you import. |
|
|
383
|
+
| `.jig/state.json` | What `init` wrote, with checksums. `update` reads it to leave your edits alone. |
|
|
384
|
+
| `.jig/specs/`, `.jig/mockups/`, `.jig/critique/` | The design loop's record: what was agreed, what was drawn, what the review found. |
|
|
342
385
|
|
|
343
386
|
`rules/*` and `rules.index.json` live beside your installed skill file, not
|
|
344
387
|
in the project — see above.
|