jig-ui 0.9.0 → 0.10.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 +66 -0
- package/README.md +37 -6
- package/dist/index.js +1368 -158
- 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 +1052 -17
- package/templates/SKILL.md.tmpl +52 -13
- package/templates/command-metadata.json +43 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,71 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.10.0
|
|
4
|
+
|
|
5
|
+
Mobile-first, and a design loop that a weak model cannot skip. Everything here
|
|
6
|
+
was measured on live runs at the capability floor (Haiku), and most of it exists
|
|
7
|
+
because an instruction the agent could choose to ignore was ignored.
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **The loop: `decide` → `spec` → `mockup` → `make` → `critique`.** `decide`
|
|
12
|
+
runs once per project. The other four run per page, feature or functionality.
|
|
13
|
+
`mockup` is new: a low-fidelity grayscale drawing, reviewed before any code,
|
|
14
|
+
in HTML (the default), Figma or Google Stitch. Every region is labelled with
|
|
15
|
+
its measured size, and the phone frame draws the menu open as well as closed.
|
|
16
|
+
- **`jig verdicts <surface>`.** A critique's reader arms write one verdict per
|
|
17
|
+
rule to `.jig/critique/<surface>/screen.json` and `code.json`; this command
|
|
18
|
+
decides whether the review is complete and computes the counts the attestation
|
|
19
|
+
reports. It refuses invented ids, a rule filed by the wrong arm, a rule judged
|
|
20
|
+
twice, an `n/a` whose reason says the rule was never read, and `rendered: true`
|
|
21
|
+
with no artefact. A screen pass with no render is `skipped`, not `ran`.
|
|
22
|
+
- **`jig probe`.** One expression the critique evaluates in any browser at 360,
|
|
23
|
+
768 and 1280. It operates the phone menu (does it open, does `aria-expanded`
|
|
24
|
+
change, does the label read as close, does Escape close it), measures sideways
|
|
25
|
+
scroll, and reads whether the styles and tokens actually applied. `verdicts`
|
|
26
|
+
refuses a verdict the probe contradicts.
|
|
27
|
+
- **`jig gate`, run by a Stop hook** — off unless you ask for it with
|
|
28
|
+
`install --hook`, or say yes when an interactive install offers it. It blocks
|
|
29
|
+
an agent from finishing while the files it changed fail `check`, or while the
|
|
30
|
+
`/jig` command it just ran left its work unfinished. After three attempts it
|
|
31
|
+
lets go and says the work is not done. `--yes` never adds it: that is the
|
|
32
|
+
agent's path, and nobody is there to consent. `update` moves an existing hook
|
|
33
|
+
to the new version and never adds one.
|
|
34
|
+
- **Six mobile rules.** `D-111` a page that never adapts, `D-112` `100vh`,
|
|
35
|
+
`F-113` form text that zooms on iOS, `D-114` a bar under the notch,
|
|
36
|
+
`D-115` a page that scrolls sideways, `E-116` a menu that cannot be opened or
|
|
37
|
+
cannot say it is open.
|
|
38
|
+
- **`H-117` a token name nothing declares.** A `var()` naming a property no file
|
|
39
|
+
declares makes its whole declaration invalid, so the page silently loses its
|
|
40
|
+
font, spacing and borders. Three of four live builds shipped exactly that,
|
|
41
|
+
and every file-based check passed them.
|
|
42
|
+
- **`P-14` site navigation**, composed for the phone first: what to show at each
|
|
43
|
+
width, a named menu control whose state is visible and announced, `aria-current`
|
|
44
|
+
styled from the attribute, and no sideways-scrolling nav row.
|
|
45
|
+
|
|
46
|
+
### Changed
|
|
47
|
+
|
|
48
|
+
- **`spec` writes a whole composition per screen size**, phone first, with
|
|
49
|
+
`regions:` and `nav:` at each — not one composition and a note about narrow
|
|
50
|
+
screens. A menu button at a width where the links fit is refused: where the
|
|
51
|
+
button sits is the project's decision, whether it exists at that width is not.
|
|
52
|
+
- **`make` finishes on three gates**: a pasted `JIG_CHECK` with no mechanical
|
|
53
|
+
errors, a region-by-region comparison with the approved mockup at each width,
|
|
54
|
+
and each size's spec fields accounted for.
|
|
55
|
+
- **`critique` operates the page** instead of only looking at it, judges the
|
|
56
|
+
`P-` patterns the spec uses, and sends its findings back to `make` until the
|
|
57
|
+
page is clean or the user accepts what is left, by id.
|
|
58
|
+
- **`decide` records what is still open** in an `Unresolved` section, and writes
|
|
59
|
+
only reasons the owner gave.
|
|
60
|
+
- **`explain` searches every line of every rule**, and the free sections of the
|
|
61
|
+
reference, not only titles and preambles.
|
|
62
|
+
- **`check` warns** when `jig.config.json` is unreadable or declares a mode the
|
|
63
|
+
token layer does not import, and counts those warnings in `JIG_CHECK`.
|
|
64
|
+
- **`L-01`'s squint test runs on a grayscale render** where a browser exists;
|
|
65
|
+
reading the source is the fallback, not the equal.
|
|
66
|
+
- **`init --yes` says what it did not decide** — no surface mapping, and
|
|
67
|
+
re-running `init` after you declare one.
|
|
68
|
+
|
|
3
69
|
## 0.9.0
|
|
4
70
|
|
|
5
71
|
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` |
|
|
@@ -150,10 +166,13 @@ overwrites a config or brand file you have edited.
|
|
|
150
166
|
|
|
151
167
|
| Command | What it does |
|
|
152
168
|
| --- | --- |
|
|
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
|
|
169
|
+
| `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
170
|
| `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
171
|
| `check [--all] [--ci] [--json]` | Runs the rules a machine can decide. Reports findings by rule id. |
|
|
156
172
|
| `update` | Refreshes an install to a newer version, leaving alone any file you have edited. |
|
|
173
|
+
| `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. |
|
|
174
|
+
| `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. |
|
|
175
|
+
| `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
176
|
| `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
177
|
|
|
159
178
|
Flags worth knowing:
|
|
@@ -166,6 +185,7 @@ Flags worth knowing:
|
|
|
166
185
|
| `check --json` | Machine-readable findings, for tooling or for reading every finding when the terminal output elides repeats. |
|
|
167
186
|
| `init --yes` | Non-interactive; accept every derived default. |
|
|
168
187
|
| `install --scope global` | Install once for every project. |
|
|
188
|
+
| `install --hook` | Add the Stop hook (Claude Code, project scope). Off unless asked; `--no-hook` declines without being asked. |
|
|
169
189
|
|
|
170
190
|
**Run `update` unpinned:** `npx jig-ui@latest update`. The skill pins every other
|
|
171
191
|
command to the version that wrote it, so the CLI and the rules always agree;
|
|
@@ -181,11 +201,19 @@ on the result — the CLI reports, the agent applies the judgment half.
|
|
|
181
201
|
| Slash command | Equivalent |
|
|
182
202
|
| --- | --- |
|
|
183
203
|
| `/jig init` | `jig init` — then states the mode it chose and what it wired |
|
|
184
|
-
| `/jig check` | `jig check` — then applies the
|
|
204
|
+
| `/jig check` | `jig check` — then applies the 97 judgment rules and reports both halves |
|
|
185
205
|
| `/jig explain C-19` | `jig explain C-19` — prints the rule as-is, without paraphrasing it |
|
|
186
206
|
| `/jig explain contrast` | `jig explain contrast` — every rule matching a word, when you do not have an id |
|
|
187
207
|
| `/jig install --agent cursor` | `jig install --agent cursor` |
|
|
188
208
|
| `/jig update` | `jig update` |
|
|
209
|
+
| `/jig decide` | No CLI. Once per project: interviews you and writes the project-wide decisions, with a reason for each |
|
|
210
|
+
| `/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 |
|
|
211
|
+
| `/jig mockup` | No CLI. Low-fidelity design of that spec, reviewed before code — in HTML, Figma or Google Stitch, whichever you choose |
|
|
212
|
+
| `/jig make` | No CLI. High-fidelity: builds the actual page or feature from the spec and mockup |
|
|
213
|
+
| `/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 |
|
|
214
|
+
|
|
215
|
+
`decide` runs once. The other four run for each page, feature or functionality, one
|
|
216
|
+
at a time — never the whole product at once.
|
|
189
217
|
|
|
190
218
|
Where each lands:
|
|
191
219
|
|
|
@@ -234,10 +262,13 @@ that plainly involves UI usually loads it. If it does not, say so once —
|
|
|
234
262
|
Every finished piece of UI work ends with an attestation line:
|
|
235
263
|
|
|
236
264
|
```text
|
|
237
|
-
JIG_CHECK: version=<version> mode=<mode> mechanical=<pass|fail|skipped>:<n> judgment=<ran|skipped>
|
|
265
|
+
JIG_CHECK: version=<version> mode=<mode> mechanical=<pass|fail|skipped>:<n> warnings=<n> judgment=<ran|skipped>:<n> files=<n> styled=<n>
|
|
238
266
|
```
|
|
239
267
|
|
|
240
268
|
`jig check` emits the same line for the half it can do, with `judgment=not-run`.
|
|
269
|
+
`mechanical=pass` means no errors; `warnings=` is counted beside it, because the
|
|
270
|
+
mobile detectors warn rather than fail CI and a page can carry `pass:0` while
|
|
271
|
+
not working on a phone.
|
|
241
272
|
If an agent reports `judgment=ran`, it ran the self-check at the end of
|
|
242
273
|
`rules/00-anti-patterns.md`; if it says `skipped`, it must say why.
|
|
243
274
|
|
|
@@ -330,7 +361,7 @@ treatment.
|
|
|
330
361
|
|
|
331
362
|
| File | Contents |
|
|
332
363
|
| --- | --- |
|
|
333
|
-
| `rules/00-anti-patterns.md` |
|
|
364
|
+
| `rules/00-anti-patterns.md` | 96 universal rules with corrections |
|
|
334
365
|
| `rules/01-modes.md` | `editorial` / `product` / `operator` profiles |
|
|
335
366
|
| `rules/02-tokens.md` | Token contract, naming, consumption |
|
|
336
367
|
| `rules/03-patterns.md` | Component anatomy and behaviour |
|