jig-ui 0.21.0 → 0.23.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,139 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.23.0 (2026-09-29)
4
+
5
+ Rules for the prose a page ships and for how it moves, a spec that says what
6
+ moves and why, and a critique that reads the page against its spec both ways.
7
+
8
+ ### Added
9
+
10
+ - **Rules for the prose a page ships.** The copy rules were written for
11
+ interface strings: a label, a button, an error. A docs chapter, a guide or a
12
+ blog post was held only to those, and a paragraph could claim a figure nobody
13
+ measured, open with "In today's rapidly changing world" and restate its
14
+ introduction as its conclusion, and pass. Nine rules now cover prose longer
15
+ than a paragraph (`I-148` to `I-156`): a claim with no source, a sentence
16
+ specific in sound and empty in fact, formula openers and closers, saying it
17
+ twice, a rhetorical shape on repeat, enthusiasm the content has not earned,
18
+ stacked hedges, emoji in headings, and structure imposed on the content.
19
+ Four more cover writing a person puts their name to, a blog post or a case
20
+ study (`I-157` to `I-160`): nothing only the author could say, no point of
21
+ view, an even rhythm, and a feeling named rather than shown.
22
+ - **They judge the writing, never the writer.** A finding says the copy reads
23
+ as generic; it never says a model wrote it. Nothing is measured: rhythm and
24
+ voice have no number a check could hold, and a score would reward prose that
25
+ games it.
26
+ - **`check` catches two of them.** `I-150` warns on a short list of formula
27
+ phrases ("it is important to note", "let's dive in", "in conclusion") in the
28
+ text a reader sees, and leaves a quotation alone. `I-155` warns on an emoji
29
+ in a Markdown page's heading; in markup, `A-05` already reports it.
30
+ - **The copy checklist asks three more questions** (`L-06`): whether every
31
+ figure traces to a source, whether prose says something specific once, and
32
+ whether a long-form piece holds something only its author could say.
33
+
34
+ - **Three motion rules.** `G-161`: a layout change the user caused shows
35
+ where things went (a deleted row's neighbours slide into the gap) rather than
36
+ jumping, and stays instant when the user did not cause it. `G-162`: animate
37
+ `transform` and `opacity`, never layout, and never `all`; `check` warns on a
38
+ transition or keyframe that names a layout property or `all`, and on
39
+ Tailwind's `transition-all`. `G-163`: one thing moves at a time. Moving
40
+ within the screen takes `--ease-in-out` (`T-04`). No new tokens.
41
+ - **A spec says what moves, and why.** `motion:` lists each movement: what
42
+ moves, its trigger, and what it tells the reader. One that cannot say is cut
43
+ before it is built. The owner reads it on the confirmation sheet, `make`
44
+ builds that motion and no other, and `critique` judges the page against it.
45
+ A spec confirmed before it has none, and is judged by the rules alone.
46
+
47
+ ### Changed
48
+
49
+ - **A critique reads the page against the spec, not only the spec against the
50
+ page.** A section, a paragraph or a claim the page carries that no line of the
51
+ spec asks for, and no deviation records, is now a finding. On jig-site a
52
+ chapter carried an accurate paragraph the owner never confirmed, and two
53
+ critiques saw it and filed nothing, because it broke no rule. The fix is a
54
+ tweak that writes it into the spec for the owner to confirm, or removes it.
55
+ - **Each critique arm is told the shape of a `ruled` verdict.** An arm wrote
56
+ four that named the owner's decision only in their reason, and `verdicts`
57
+ refused them all.
58
+ - **A CLI run from a checkout reads the checkout's rules.** `prepack` copies the
59
+ rules beside the CLI package for each publish, and the copies stayed behind:
60
+ a clone that had published read the rules as they were then, and Jig's own
61
+ first test run after each rule change failed 14 tests. An installed package
62
+ still reads its own copies.
63
+ - **`jig ship` leaves a replaced spec to the spec that replaced it.**
64
+ `superseded_by: <spec>` in a spec's front matter marks it, and `ship` reports
65
+ it apart instead of as never critiqued, once it has checked the spec it names
66
+ exists. On jig-site two replaced specs were owed a critique at every `ship`,
67
+ each marked a different way by the agent that replaced it.
68
+ - **A tweak that records a decision applies it to the whole page.** The owner
69
+ rules on one instance, and the decision states a kind; the tweak now finds the
70
+ other instances on the page and fixes them in the same change. On jig-site a
71
+ decision to set every quotation mark curly fixed the one named, and four
72
+ straight marks survived to the next critique.
73
+ - **A spec's second check covers what changed.** The reader gets the earlier
74
+ record and the diff; a quotation or fact on an unchanged line, whose source
75
+ has not changed either, carries over. On jig-site every re-check reopened
76
+ every source, about $10 a round.
77
+ - **A critique has a place for what no rule names.** A difference between the
78
+ page and its spec, or a source it teaches, goes under `differences` in the
79
+ arm's verdict file and counts as a finding. On jig-site both arms of one
80
+ critique invented rule ids to carry one, and `verdicts` refused them. The
81
+ report now says what the page-against-spec pass found, "none" included, and
82
+ `verdicts` explains that a decision is judged, never `ruled`.
83
+ - **Every page is owed a critique again.** A critique judges every rule, so one
84
+ written before these sixteen is incomplete, and `jig ship` lists each page
85
+ until it is critiqued on this release.
86
+
87
+ ## 0.22.0 (2026-09-29)
88
+
89
+ A spec and a mockup are checked before the owner says yes, a critique can wait,
90
+ and `jig ship` is where nothing is optional.
91
+
92
+ ### Added
93
+
94
+ - **A spec is checked before you are asked to confirm it.** `spec` checked
95
+ itself against the decisions, and nothing checked it against the owner's
96
+ words or the facts it states: on jig-site a confirmed spec carried seven
97
+ errors to the built page. A reader that did not write the spec now checks
98
+ each quotation given as the owner's and each fact at its source, and writes
99
+ `.jig/specs/<name>.checked.json`. The owner gets the spec with a sheet to
100
+ check it by, and an agent asked to confirm for them works from the same
101
+ sheet. The README's new "Before you confirm a spec" says what to look for.
102
+ - **The gate holds a spec back from the owner** while it gives a quotation as
103
+ the owner's that the owner never said, states a fact its reader found false,
104
+ cites a source the project does not have, or has no check of the spec as it
105
+ stands.
106
+ - **A mockup is approved against its spec, and skipping one is plain.** The
107
+ owner gets the drawing with a sheet, size by size, the spec's line beside what
108
+ the frame shows, and the README's new "Before you approve a mockup" says what
109
+ to look for. An approval or a skip is recorded in the owner's words
110
+ (`mockup: approved — "…"`), and the gate holds one they did not say. A skip
111
+ can be given to `make` or at the spec's confirmation, not only to `mockup`;
112
+ `make` then builds from the spec alone, and asks rather than finishing on a
113
+ spec nobody has said to draw or skip.
114
+
115
+ - **A critique can wait, and `ship` is where it cannot.** `check` still runs on
116
+ every `make` and `tweak`; the judgment half can run after a batch of pages or
117
+ only before shipping, and a tweak's re-judge can wait when the owner says so
118
+ (or `"critique": "at-ship"` in jig.config.json says it once). The lock now
119
+ records the page each critique judged, so nothing that waited is forgotten.
120
+ `jig ship` runs `check --all --ci` and `seo` and names every confirmed page
121
+ that owes a critique; `/jig ship` critiques each in full and runs until it
122
+ says `ready=yes`. It deploys nothing, and says what Jig does not check.
123
+ Each page can say for itself when it is critiqued: `spec` asks, last, and writes
124
+ `critique: each` or `critique: at-ship`, which wins over the project's
125
+ default. `init` asks for that default when it sets the project up; page by
126
+ page, the default, writes nothing.
127
+
128
+ ### Fixed
129
+
130
+ - **`init` merging into an edited `jig.config.json` dropped its other keys.** It
131
+ rebuilt the file from `brand` and `surfaces`, so an `exempt` list was lost
132
+ without a word. A merge now keeps every key.
133
+ - **A `/jig` command whose words hold a `<`** read as no command at all, so
134
+ the gate judged a tweak as a builder editing verdicts. The session then wrote
135
+ `verdicts.lock` by hand; the procedure now says the lock is the gate's alone.
136
+
3
137
  ## 0.21.0 (2026-09-28)
4
138
 
5
139
  Dev builds, so a fix is tried on a real project before it ships, and the gate
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 143 rules, **36 can be decided by a machine** — a hard-coded colour, a
15
+ - Of the 159 rules, **39 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
- - The other **107 are judgment** — whether an empty state says anything useful,
17
+ - The other **120 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 36. Running only the agent gets you the 107 with
21
+ Running only the CLI gets you the 39. Running only the agent gets you the 120 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
 
@@ -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
 
@@ -406,7 +407,7 @@ on the result — the CLI reports, the agent applies the judgment half.
406
407
  | Slash command | Equivalent |
407
408
  | --- | --- |
408
409
  | `/jig init` | `jig init` — then states the mode it chose and what it wired |
409
- | `/jig check` | `jig check` — then applies the 107 judgment rules and reports both halves |
410
+ | `/jig check` | `jig check` — then applies the 120 judgment rules and reports both halves |
410
411
  | `/jig explain C-19` | `jig explain C-19` — prints the rule as-is, without paraphrasing it |
411
412
  | `/jig explain contrast` | `jig explain contrast` — every rule matching a word, when you do not have an id |
412
413
  | `/jig install --agent cursor` | `jig install --agent cursor` |
@@ -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,148 @@ 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
+ - **Everything that moves has a reason.** Each line of `motion:` names what
493
+ moves, what sets it off, and what it tells the reader. Cut any line that
494
+ can't say, and expect nothing on the page to move that the list leaves out.
495
+ - **Open questions were asked, not answered for you.** A spec touching an item
496
+ under `Unresolved` in `DECISIONS.md` carries your answer, and a field reading
497
+ `unspecified — make chooses one it can defend` is one you can decide now.
498
+ - **A page that exists is described as built.** Its regions are the ones on the
499
+ page today, and anywhere it contradicts your decisions is said plainly.
500
+
501
+ When something fails, say what is wrong. The spec is revised and shown to you
502
+ again, and nothing is built until you confirm it.
503
+
504
+ **Handing the check to an agent.** You can ask your agent to check a spec and
505
+ confirm it for you. It works from the same sheet and confirms only what it
506
+ checked itself: it opens every source marked unchecked and any it doubts, reads
507
+ the copy as the person arriving would, and holds each condition to your words.
508
+ What it could not check, it names to you instead of confirming. An agent's yes
509
+ is still yours, so read what it says it did not check.
510
+
511
+ ### Before you approve a mockup
512
+
513
+ A mockup is the confirmed spec, drawn: one page, at every size the spec names,
514
+ in grey. So the first thing to check is that it matches the spec. The Stop hook
515
+ already checks that every region and navigation the spec names is labelled in
516
+ each size's frame, and holds the drawing back from you until it is. What a label
517
+ check cannot see is whether each is drawn the way the spec says, and that is
518
+ yours.
519
+
520
+ You get the drawing with a sheet, size by size: the spec's line beside what the
521
+ frame shows. Read it for these before you approve:
522
+
523
+ - **Every size matches its line in the spec.** The order of the regions, what
524
+ comes first, what sits with what, where each one is. A region that is present
525
+ but in the wrong place is not a match.
526
+ - **The navigation at each size is what the spec's `nav:` says.**
527
+ - **Nothing extra.** No region the spec does not list, and nothing from
528
+ `later:`.
529
+ - **The spec's states are drawn** where one changes the layout: empty, error, a
530
+ lot.
531
+ - **What a drawing cannot show is named, from your spec.** If your spec says a
532
+ part stays in place on scroll, or opens and closes, the sheet names it so you
533
+ approve that too. If your spec says nothing of the kind, there is nothing to
534
+ name.
535
+ - **Now that you see it, the spec is still what you want.** If it is not, the
536
+ spec changes first and the drawing is redrawn from it, so the two never
537
+ disagree.
538
+ - **A condition you attach is written into the spec, in your words,** before
539
+ the approval is recorded. `make` builds from the spec, not from the
540
+ conversation.
541
+ - **You are not approving colour, type or exact spacing.** Those come from the
542
+ tokens; a grey drawing settles none of them.
543
+
544
+ Your approval is recorded as your own words, `mockup: approved — "…"`, and with
545
+ the Stop hook it cannot be recorded in words you did not say.
546
+
547
+ **Handing the check to an agent.** It renders every frame, compares each with
548
+ its line in the spec, confirms only what it checked, and names to you what it
549
+ could not.
550
+
551
+ **Skipping the mockup.** A mockup is not required. Say so, to `mockup`, to
552
+ `make`, or when you confirm the spec, and it is recorded as `mockup: skipped —
553
+ "your words"`. `make` then builds from the spec alone, `critique` compares the
554
+ page to the spec alone, and nothing waits on a drawing. What `make` will not do
555
+ is decide for you: on a spec whose mockup nobody has approved or skipped, it asks
556
+ which. With no drawing, the spec is all there is to build from, so the check
557
+ before you confirm it carries all the weight.
558
+
559
+ ### When to critique, and shipping
560
+
561
+ `check` runs on every `make` and every `tweak`. It is mechanical, it takes
562
+ seconds, and it catches a hard-coded colour before it spreads. `critique` is the
563
+ judgment half, and it can wait: a page judged once, as it stands, gets the
564
+ verdicts it would have got straight after it was built. Critique a page after
565
+ each build, after a batch of pages, or only before you ship. The one page worth
566
+ judging early is one that sets up what later pages reuse, a header or a card: a
567
+ finding in it found late is fixed in every page built on it.
568
+
569
+ A `tweak` re-judges what its change could affect, and that can wait too when you
570
+ say so. `init` asks when you set the project up, and writes
571
+ `"critique": "each"` or `"critique": "at-ship"` to `jig.config.json` to say it once
572
+ for the project (the default, page by page, writes nothing); on a project already
573
+ set up, add the key yourself. Add `critique: each` or `critique: at-ship` in a page's spec to say it
574
+ for that page: a header every page reuses judged each time, the chapters of a
575
+ guide left for `ship`. `spec` asks you which, at the end of its questions, and
576
+ says why now is worth it for a page others reuse. The spec wins where it says
577
+ either. Neither stops you
578
+ critiquing any page whenever you like, and `ship` judges every one.
579
+
580
+ Waiting is tracked, not forgotten. The verdict lock records the page each
581
+ critique judged, so Jig knows every page that changed since, every tweak that
582
+ left its re-judge for later, and every page never judged. `/jig ship` is where
583
+ none of it is optional: `jig ship` runs `check --all --ci` and `seo`, and names
584
+ each page that owes a critique; the agent critiques each one in full, with
585
+ readers that have not seen the conversation, and puts the findings to you. Each
586
+ is fixed, or ruled on by you in your own words. It runs until `jig ship` says
587
+ `ready=yes`.
588
+
589
+ `ship` does not deploy anything, and it is not a security review. Jig has no
590
+ rules for security, performance or what a real screen reader does, and its report
591
+ says so on every run.
592
+
448
593
  ## What a search engine reads
449
594
 
450
595
  A page's title, description and preview text are copy, and they drift because a
@@ -604,12 +749,12 @@ treatment.
604
749
 
605
750
  | File | Contents |
606
751
  | --- | --- |
607
- | `rules/00-anti-patterns.md` | 125 universal rules with corrections |
752
+ | `rules/00-anti-patterns.md` | 128 universal rules with corrections |
608
753
  | `rules/01-modes.md` | `editorial` / `product` / `operator` profiles |
609
754
  | `rules/02-tokens.md` | Token contract, naming, consumption |
610
755
  | `rules/03-patterns.md` | Component anatomy and behaviour |
611
756
  | `rules/04-principles.md` | Five frames + seven tiebreakers |
612
- | `rules/05-copy.md` | Interface text rules |
757
+ | `rules/05-copy.md` | Interface text rules, and the prose a page ships |
613
758
  | `examples/<ID>.html` | For every rule, a small dont and do: self-contained HTML fragments that render in a sandboxed frame. `jig explain <ID>` names the file. |
614
759
  | `<css dir>/jig/brand.*.css` | Identity. One per project. |
615
760
  | `<css dir>/jig/mode.*.css` | Density, scale, rhythm, motion |
@@ -655,7 +800,13 @@ Drop this in the project root so mode selection does not require asking on every
655
800
  // `check` names the pattern and its match count on every run, and says so
656
801
  // when one is excusing enough files to look like a mistake. Nothing is ever
657
802
  // exempt by default: this list is the only source.
658
- "exempt": ["src/components/og-card.tsx", "src/cv/pdf/**"]
803
+ "exempt": ["src/components/og-card.tsx", "src/cv/pdf/**"],
804
+
805
+ // When pages are critiqued. Leave it out to decide each time; "at-ship"
806
+ // says once that critiques and a tweak's re-judge wait for `/jig ship`,
807
+ // which will not pass until every page is judged as it stands. A page's
808
+ // spec can say otherwise for itself: `critique: each` or `critique: at-ship`.
809
+ "critique": "at-ship"
659
810
  }
660
811
  ```
661
812