jig-ui 0.20.1 → 0.22.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 CHANGED
@@ -1,5 +1,125 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.22.0 (2026-09-29)
4
+
5
+ A spec and a mockup are checked before the owner says yes, a critique can wait,
6
+ and `jig ship` is where nothing is optional.
7
+
8
+ ### Added
9
+
10
+ - **A spec is checked before you are asked to confirm it.** `spec` checked
11
+ itself against the decisions, and nothing checked it against the owner's
12
+ words or the facts it states: on jig-site a confirmed spec carried seven
13
+ errors to the built page. A reader that did not write the spec now checks
14
+ each quotation given as the owner's and each fact at its source, and writes
15
+ `.jig/specs/<name>.checked.json`. The owner gets the spec with a sheet to
16
+ check it by, and an agent asked to confirm for them works from the same
17
+ sheet. The README's new "Before you confirm a spec" says what to look for.
18
+ - **The gate holds a spec back from the owner** while it gives a quotation as
19
+ the owner's that the owner never said, states a fact its reader found false,
20
+ cites a source the project does not have, or has no check of the spec as it
21
+ stands.
22
+ - **A mockup is approved against its spec, and skipping one is plain.** The
23
+ owner gets the drawing with a sheet, size by size, the spec's line beside what
24
+ the frame shows, and the README's new "Before you approve a mockup" says what
25
+ to look for. An approval or a skip is recorded in the owner's words
26
+ (`mockup: approved — "…"`), and the gate holds one they did not say. A skip
27
+ can be given to `make` or at the spec's confirmation, not only to `mockup`;
28
+ `make` then builds from the spec alone, and asks rather than finishing on a
29
+ spec nobody has said to draw or skip.
30
+
31
+ - **A critique can wait, and `ship` is where it cannot.** `check` still runs on
32
+ every `make` and `tweak`; the judgment half can run after a batch of pages or
33
+ only before shipping, and a tweak's re-judge can wait when the owner says so
34
+ (or `"critique": "at-ship"` in jig.config.json says it once). The lock now
35
+ records the page each critique judged, so nothing that waited is forgotten.
36
+ `jig ship` runs `check --all --ci` and `seo` and names every confirmed page
37
+ that owes a critique; `/jig ship` critiques each in full and runs until it
38
+ says `ready=yes`. It deploys nothing, and says what Jig does not check.
39
+ Each page can say for itself when it is critiqued: `spec` asks, last, and writes
40
+ `critique: each` or `critique: at-ship`, which wins over the project's
41
+ default. `init` asks for that default when it sets the project up; page by
42
+ page, the default, writes nothing.
43
+
44
+ ### Fixed
45
+
46
+ - **`init` merging into an edited `jig.config.json` dropped its other keys.** It
47
+ rebuilt the file from `brand` and `surfaces`, so an `exempt` list was lost
48
+ without a word. A merge now keeps every key.
49
+ - **A `/jig` command whose words hold a `<`** read as no command at all, so
50
+ the gate judged a tweak as a builder editing verdicts. The session then wrote
51
+ `verdicts.lock` by hand; the procedure now says the lock is the gate's alone.
52
+
53
+ ## 0.21.0 (2026-09-28)
54
+
55
+ Dev builds, so a fix is tried on a real project before it ships, and the gate
56
+ fixes that trial on jig-site turned up.
57
+
58
+ ### Added
59
+
60
+ - **Dev builds.** A version carrying `-dev` (`0.21.0-dev.1`) is a local build
61
+ of a fix, tried on a real project before it is released. npm has no such
62
+ version, so its skill, its commands and its Stop hook run the `jig` on PATH
63
+ rather than `npx jig-ui@<version>`; a hook that could not run would let every
64
+ agent stop unchecked. `scripts/pack-dev.mjs` packs one. Installing a release
65
+ afterwards puts the `npx` hook back in place of the dev one.
66
+
67
+ ### Fixed
68
+
69
+ - **The Stop hook refreshes only the probes it judges.** It re-rendered every
70
+ critiqued page on every stop, so a link added to jig-site's header left sixty
71
+ probe files changed on pages no one was working on, and three sessions
72
+ committed them. A page's probes are refreshed when its own critique or tweak
73
+ runs.
74
+ - **A mockup is checked before it goes to the owner.** The pause for approval
75
+ skipped the drawing check, so on jig-site two mockup sessions put a drawing
76
+ the check refused to the owner, reported the gate's blocks as "waiting on
77
+ owner review", and the owner approved a drawing the gate then refused `make`
78
+ for.
79
+ - **A region label may say its name with spaces.** "on this page" now labels the
80
+ spec's `on-this-page`; hyphens, underscores and spaces compare as one.
81
+ - **A comment after a size is a comment.** `phone: # judged at 360px` over a
82
+ full composition was refused as a one-line size.
83
+ - **A critique's report names every finding its verdict files hold.** jig-site's
84
+ Guide critique held seven and listed six; make reads the report. Checked
85
+ where the project keeps a `REPORT.md` beside the verdicts.
86
+ - **A session cannot change Jig's mode file.** A jig-site make round narrowed
87
+ `--size-rail` in `mode.editorial.css` to make three columns fit; `update`
88
+ owns that file, and a project's own values go in its brand file or stylesheet.
89
+ - **A decide amendment answers for its own reason.** Like a tweak's, only the
90
+ `**Why…:**` paragraphs it adds must quote the owner; three jig-site amendments
91
+ had to relabel an earlier round's reason before the gate let them stop.
92
+ - **A finding is fixed only where the source it cited changed.** `verdicts`
93
+ told jig-site's fourth home critique that seven findings were fixed; four had
94
+ flipped because its readers read the same unchanged lines differently. A
95
+ finding judged ok is now fixed when a line it cited (`file:line`) changed, or
96
+ its file when it cited no line, or any source when it cited nothing. The rest
97
+ are reported as judged ok though the lines they cited did not change: a
98
+ different reading, or a fix made where the finding did not point.
99
+ - **The gate asks for the verdict lock to be committed.** It writes
100
+ `verdicts.lock` when a critique or tweak stops, after the agent has committed,
101
+ so every such session on jig-site left it behind. When the verdicts are
102
+ committed and the lock is not, it stops the session once to commit it.
103
+ - **A tweak's decision quotes the owner's recorded words.** A jig-site tweak
104
+ shown a screenshot wrote an exception to `E-51` "given directly by the owner
105
+ … by reference rather than words". A tweak's new `**Why:**` now meets
106
+ `decide`'s rule (the owner's words in quotation marks, `not given`, or
107
+ `**Why (inferred):**`), and its quotations must be in tweak.json's `change`.
108
+ A reason `decide` wrote earlier is not the tweak's to answer for.
109
+ - **`spec`, `mockup` and `critique` write under `.jig/` only.** On jig-site a
110
+ critique swapped the rule its page demonstrates to get past a block, then
111
+ re-judged the page it had changed, and a mockup session wrote the site's
112
+ stylesheet. The gate stops either.
113
+ - **An approved drawing changed afterwards goes back to pending.** The session
114
+ that recorded a jig-site approval then redrew frames and moved a switch.
115
+ - **Quoted tool output is not the page's copy.** The probe's em-dash scan skips
116
+ `<pre>`, `<code>`, `<samp>` and `<kbd>`, as it skips quotations: jig-site's
117
+ home page quotes `jig check`'s real output, whose wording has one. Probe
118
+ version 9.
119
+ - **A drawing's size frames are the class `frame`, not any class containing
120
+ it.** jig-site's home drawing captioned its rule specimens `spec-frame`, and
121
+ the gate split every size frame at each one and reported regions missing.
122
+
3
123
  ## 0.20.1 (2026-09-27)
4
124
 
5
125
  `jig gate` run by hand no longer tells an agent that a passing tweak failed.
package/README.md CHANGED
@@ -377,6 +377,7 @@ overwrites a config or brand file you have edited.
377
377
  | `seo [--json]` | Audits what a search engine and a link preview read, across the whole project: a route whose metadata says `noindex` sitting in the sitemap, two pages claiming one title, a sitemap that lists nothing or lists paths a crawler drops. Whether a sitemap and a robots file exist is counted, not reported: no rule asks for either, and a site with no domain yet cannot write an honest sitemap. Needs no config, no decisions and no spec. |
378
378
  | `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. |
379
379
  | `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. |
380
+ | `ship` | Says whether the project is ready to ship, by everything Jig checks: `check --all --ci` and `seo` with no errors, and every confirmed page critiqued as it stands, with no finding you have not ruled on. Exits non-zero until it is, and names what Jig does not check. |
380
381
  | `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. |
381
382
  | `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. |
382
383
 
@@ -417,6 +418,8 @@ on the result — the CLI reports, the agent applies the judgment half.
417
418
  | `/jig mockup` | No CLI. Low-fidelity design of that spec, reviewed before code — in HTML, Figma or Google Stitch, whichever you choose |
418
419
  | `/jig make` | No CLI. High-fidelity: builds the actual page or feature from the spec and mockup |
419
420
  | `/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 |
421
+ | `/jig tweak` | No CLI. A small change to a built page that its approved mockup does not show: decided if it is a decision, specced, built, and re-judged where it could matter |
422
+ | `/jig ship` | `jig ship` — then critiques every page that owes one, puts the findings to you, and runs again until the project is ready |
420
423
 
421
424
  `decide` runs once. The other four run for each page, feature or functionality, one
422
425
  at a time — never the whole product at once.
@@ -445,6 +448,145 @@ convention for *skills*, not a harness with a command system of its own, so
445
448
  there is no file to write and nothing that would read one. Ask in plain language
446
449
  instead; the skill still loads.
447
450
 
451
+ ### Before you confirm a spec
452
+
453
+ `spec` checks its own work before it asks you: every decision it cites exists,
454
+ no field hands the choice to nobody ("as appropriate", "decided by the design
455
+ system"), and nothing contradicts `DECISIONS.md`. What it cannot check is whether
456
+ it is right about you and about the world. Your yes is what `make` builds from
457
+ without asking again, and `critique` compares the page to the spec, never the
458
+ spec to what is true. An error you confirm reaches the page intact.
459
+
460
+ So before you are asked, a reader that did not write the spec checks it: each
461
+ quotation it gives as yours against what you said, and each fact against the
462
+ source it names. You get the spec with a sheet: your words and where you said
463
+ them, each fact with its source (the ones nobody could check first), the copy
464
+ the page will show as written, your conditions beside the lines that carry
465
+ them, and what is left for you to decide. With the Stop hook, the spec is not
466
+ put to you with a quotation you never said, a fact its reader found false, or a
467
+ sheet of an earlier version of the spec.
468
+
469
+ The sheet makes checking quick. It does not replace it. Read the spec for these
470
+ before you say yes:
471
+
472
+ - **Your words are yours.** Every quotation it gives as yours is something you
473
+ said, and nothing reads as your ruling that you did not give. What the agent
474
+ worked out for itself is labelled as its own.
475
+ - **Every fact holds up at its source.** Where the spec says how something works
476
+ (your product, an API, an existing page, a tool you depend on), open the source
477
+ and check. One habit of your project stated as a general rule is a fact nobody
478
+ decided.
479
+ - **Words the page will show are words you would ship.** Headings, labels and
480
+ any copy the spec writes out are built as written. Read them as the person
481
+ arriving would. A sentence about how the page works (what a control costs to
482
+ use, where a choice is stored) is a note for the builder, not copy.
483
+ - **Conditions you gave are there, as you gave them.** "Three columns from 1280
484
+ up" is written as 1280, not moved to a width that was easier to build.
485
+ - **V1 is small, and `later:` holds what you cut.** Nothing you set aside has
486
+ come back in.
487
+ - **Every size says what you expect to see.** The phone is written in full,
488
+ first. Each `same-as:` gives a reason that is true, and `nav:` at every size is
489
+ the navigation you would expect there.
490
+ - **States cover what the page will meet.** Empty, one, a lot, loading, failure:
491
+ whichever the page can actually be in.
492
+ - **Open questions were asked, not answered for you.** A spec touching an item
493
+ under `Unresolved` in `DECISIONS.md` carries your answer, and a field reading
494
+ `unspecified — make chooses one it can defend` is one you can decide now.
495
+ - **A page that exists is described as built.** Its regions are the ones on the
496
+ page today, and anywhere it contradicts your decisions is said plainly.
497
+
498
+ When something fails, say what is wrong. The spec is revised and shown to you
499
+ again, and nothing is built until you confirm it.
500
+
501
+ **Handing the check to an agent.** You can ask your agent to check a spec and
502
+ confirm it for you. It works from the same sheet and confirms only what it
503
+ checked itself: it opens every source marked unchecked and any it doubts, reads
504
+ the copy as the person arriving would, and holds each condition to your words.
505
+ What it could not check, it names to you instead of confirming. An agent's yes
506
+ is still yours, so read what it says it did not check.
507
+
508
+ ### Before you approve a mockup
509
+
510
+ A mockup is the confirmed spec, drawn: one page, at every size the spec names,
511
+ in grey. So the first thing to check is that it matches the spec. The Stop hook
512
+ already checks that every region and navigation the spec names is labelled in
513
+ each size's frame, and holds the drawing back from you until it is. What a label
514
+ check cannot see is whether each is drawn the way the spec says, and that is
515
+ yours.
516
+
517
+ You get the drawing with a sheet, size by size: the spec's line beside what the
518
+ frame shows. Read it for these before you approve:
519
+
520
+ - **Every size matches its line in the spec.** The order of the regions, what
521
+ comes first, what sits with what, where each one is. A region that is present
522
+ but in the wrong place is not a match.
523
+ - **The navigation at each size is what the spec's `nav:` says.**
524
+ - **Nothing extra.** No region the spec does not list, and nothing from
525
+ `later:`.
526
+ - **The spec's states are drawn** where one changes the layout: empty, error, a
527
+ lot.
528
+ - **What a drawing cannot show is named, from your spec.** If your spec says a
529
+ part stays in place on scroll, or opens and closes, the sheet names it so you
530
+ approve that too. If your spec says nothing of the kind, there is nothing to
531
+ name.
532
+ - **Now that you see it, the spec is still what you want.** If it is not, the
533
+ spec changes first and the drawing is redrawn from it, so the two never
534
+ disagree.
535
+ - **A condition you attach is written into the spec, in your words,** before
536
+ the approval is recorded. `make` builds from the spec, not from the
537
+ conversation.
538
+ - **You are not approving colour, type or exact spacing.** Those come from the
539
+ tokens; a grey drawing settles none of them.
540
+
541
+ Your approval is recorded as your own words, `mockup: approved — "…"`, and with
542
+ the Stop hook it cannot be recorded in words you did not say.
543
+
544
+ **Handing the check to an agent.** It renders every frame, compares each with
545
+ its line in the spec, confirms only what it checked, and names to you what it
546
+ could not.
547
+
548
+ **Skipping the mockup.** A mockup is not required. Say so, to `mockup`, to
549
+ `make`, or when you confirm the spec, and it is recorded as `mockup: skipped —
550
+ "your words"`. `make` then builds from the spec alone, `critique` compares the
551
+ page to the spec alone, and nothing waits on a drawing. What `make` will not do
552
+ is decide for you: on a spec whose mockup nobody has approved or skipped, it asks
553
+ which. With no drawing, the spec is all there is to build from, so the check
554
+ before you confirm it carries all the weight.
555
+
556
+ ### When to critique, and shipping
557
+
558
+ `check` runs on every `make` and every `tweak`. It is mechanical, it takes
559
+ seconds, and it catches a hard-coded colour before it spreads. `critique` is the
560
+ judgment half, and it can wait: a page judged once, as it stands, gets the
561
+ verdicts it would have got straight after it was built. Critique a page after
562
+ each build, after a batch of pages, or only before you ship. The one page worth
563
+ judging early is one that sets up what later pages reuse, a header or a card: a
564
+ finding in it found late is fixed in every page built on it.
565
+
566
+ A `tweak` re-judges what its change could affect, and that can wait too when you
567
+ say so. `init` asks when you set the project up, and writes
568
+ `"critique": "each"` or `"critique": "at-ship"` to `jig.config.json` to say it once
569
+ for the project (the default, page by page, writes nothing); on a project already
570
+ set up, add the key yourself. Add `critique: each` or `critique: at-ship` in a page's spec to say it
571
+ for that page: a header every page reuses judged each time, the chapters of a
572
+ guide left for `ship`. `spec` asks you which, at the end of its questions, and
573
+ says why now is worth it for a page others reuse. The spec wins where it says
574
+ either. Neither stops you
575
+ critiquing any page whenever you like, and `ship` judges every one.
576
+
577
+ Waiting is tracked, not forgotten. The verdict lock records the page each
578
+ critique judged, so Jig knows every page that changed since, every tweak that
579
+ left its re-judge for later, and every page never judged. `/jig ship` is where
580
+ none of it is optional: `jig ship` runs `check --all --ci` and `seo`, and names
581
+ each page that owes a critique; the agent critiques each one in full, with
582
+ readers that have not seen the conversation, and puts the findings to you. Each
583
+ is fixed, or ruled on by you in your own words. It runs until `jig ship` says
584
+ `ready=yes`.
585
+
586
+ `ship` does not deploy anything, and it is not a security review. Jig has no
587
+ rules for security, performance or what a real screen reader does, and its report
588
+ says so on every run.
589
+
448
590
  ## What a search engine reads
449
591
 
450
592
  A page's title, description and preview text are copy, and they drift because a
@@ -655,7 +797,13 @@ Drop this in the project root so mode selection does not require asking on every
655
797
  // `check` names the pattern and its match count on every run, and says so
656
798
  // when one is excusing enough files to look like a mistake. Nothing is ever
657
799
  // exempt by default: this list is the only source.
658
- "exempt": ["src/components/og-card.tsx", "src/cv/pdf/**"]
800
+ "exempt": ["src/components/og-card.tsx", "src/cv/pdf/**"],
801
+
802
+ // When pages are critiqued. Leave it out to decide each time; "at-ship"
803
+ // says once that critiques and a tweak's re-judge wait for `/jig ship`,
804
+ // which will not pass until every page is judged as it stands. A page's
805
+ // spec can say otherwise for itself: `critique: each` or `critique: at-ship`.
806
+ "critique": "at-ship"
659
807
  }
660
808
  ```
661
809