jig-ui 0.8.0 → 0.8.1

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,65 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.1
4
+
5
+ Both fixes here are the same shape: 0.8.0 corrected the instance it was looking
6
+ at and left the class alone, and in each case the commit message claimed a
7
+ verification that had only checked the file it had just edited. Both were found
8
+ by inspecting the published tarball rather than the working tree.
9
+
10
+ ### Fixed
11
+
12
+ - **Four rule files still shipped author notes.** 0.7.x removed the section
13
+ headed "Notes for the author (not for the agent)" from `00-anti-patterns.md`
14
+ after an agent read it as "license to go tighter than the shared default" and
15
+ halved the radius scale on that authority. `01-modes.md`, `03-patterns.md`,
16
+ `04-principles.md` and `05-copy.md` carried a section under the same heading
17
+ and kept shipping it to every agent that installed Jig.
18
+
19
+ `01-modes.md` was the worst of them: it told the reader to **"Change them in
20
+ `tokens/mode.*.css`"** and closed with **"it is your call"** — an invitation
21
+ to edit the token layer, which is the one thing Jig's architecture reserves
22
+ for a human. `03-patterns.md` described navigation and cards as "deliberately
23
+ absent… add them once you have built enough". `05-copy.md` pointed at
24
+ `03-brand.md`, which does not exist. The content moves to
25
+ `docs/house-positions.md` unchanged; only its audience changes.
26
+
27
+ - **`02-tokens.md` contradicted its own Tailwind fix 352 lines earlier.** The
28
+ compatibility table near the top still read *"Tailwind v4 | Wrap in
29
+ `@theme { }`"* — the exact instruction the section below it retracts with
30
+ *"Earlier versions of this file told you to, and Tailwind rejects it
31
+ outright."* The table is the part an agent reads first, so the correction
32
+ shipped underneath the error it corrected. A second, softer restatement
33
+ ("the same file can be wrapped in `@theme`") is gone too. `@theme` now first
34
+ appears in the section that explains it correctly.
35
+
36
+ - **`jig explain` rendered a dangling `---` in 14 of the 15 pattern and mode
37
+ specs.** `parse.ts` has always dropped bare separator lines; `specs.ts` is a
38
+ separate code path and never did, so every `P-` and `M-` spec that is
39
+ followed by a separator in the source carried it into the rendered body,
40
+ between the last paragraph and the footer. Spotted on `P-12`, but it was
41
+ never about `P-12`. Table separators (`| --- |`) are untouched.
42
+
43
+ - **`jig init`'s refusal without a terminal offered a way out that does not
44
+ work.** The message ended *"(To choose the mode without a terminal, write
45
+ jig.config.json first — init honours it.)"* The guard runs before any config
46
+ is read, so a config alone still exits 1. The sentence was true about mode
47
+ selection and false in a paragraph about not having a terminal, so it read as
48
+ a third alternative when it is a modifier on the first — a cold agent
49
+ followed it literally, hit the identical error, and allocated a
50
+ pseudo-terminal with Python's `pty` to get past it. It now says a config does
51
+ not replace `--yes`, and what the two do together. Nothing covered this path;
52
+ three tests now do.
53
+
54
+ ### Added
55
+
56
+ - **`check-tokens` rule 13 — no shipped rule file addresses the author.** The
57
+ guard that should have existed for the 0.7.x fix. It reads `rules/` from disk
58
+ rather than a hardcoded list, so a rule file added later cannot escape it the
59
+ way those four did, and it checks the second-person tells ("your taste", "it
60
+ is your call", "my inclination is") as well as the heading, because a rename
61
+ would otherwise defeat it. Each tell is verified to fire on reintroduction.
62
+
3
63
  ## 0.8.0
4
64
 
5
65
  Everything here was found by handing Jig to agents that had never seen it and
package/dist/index.js CHANGED
@@ -1125,6 +1125,7 @@ function parseSpecs(markdown, sourceFile) {
1125
1125
  current = null;
1126
1126
  continue;
1127
1127
  }
1128
+ if (current && /^-{3,}$/.test(line.trim())) continue;
1128
1129
  if (current) body.push(line);
1129
1130
  }
1130
1131
  push();
@@ -3782,7 +3783,7 @@ async function init(opts) {
3782
3783
  const prompt = opts.prompt ?? defaultPrompt;
3783
3784
  if (!opts.yes && !opts.prompt && !process.stdin.isTTY) {
3784
3785
  throw new Error(
3785
- "'jig init' asks questions and stdin is not a terminal, so it cannot. Re-run with --yes to accept the derived defaults, or run it in a terminal. (To choose the mode without a terminal, write jig.config.json first \u2014 init honours it.)"
3786
+ "'jig init' asks questions and stdin is not a terminal, so it cannot. Re-run with --yes to accept the derived defaults, or run it in a terminal. A jig.config.json does not replace --yes, because this check runs before it is read. With both, init takes the mode from the config instead of deriving it."
3786
3787
  );
3787
3788
  }
3788
3789
  const migrateLegacy = async (report, describe) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jig-ui",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
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",
package/rules/01-modes.md CHANGED
@@ -205,17 +205,3 @@ Per project, one file supplying:
205
205
  - **Voice** — sentence case or title case, contraction policy, error-message tone.
206
206
 
207
207
  Default when no brand is supplied: warm neutral ramp anchored on `--color-bg-base` (`oklch(0.980 0.004 95)`, a warm off-white), no accent, 8px base radius (`--radius-sm`), border-led elevation. Greyscale output plus a stated question beats an invented purple (`A-01`).
208
-
209
- ---
210
-
211
- ## Notes for the author (not for the agent)
212
-
213
- **Decided, not derived.** These numbers are internally consistent and defensible, but several are judgement calls that should be tuned once you have run real work through them: the operator row height, the three section-rhythm values, and the motion durations. Change them in `tokens/mode.*.css`, never at the call site — this file describes them, `02-tokens.md` resolves them, and neither is where they live.
214
-
215
- **Where your taste is recorded here:**
216
- - The zero-JS default in `editorial` — a stronger position than most systems take, and consistent with your writing on JS-dependent forms.
217
- - Absolute-first timestamps in `operator` — that is the procurement instinct: the record is evidence before it is a convenience.
218
- - Typed confirmation for destructive operator actions, and no hover-hidden information in all-day tools.
219
- - Border-led elevation as the unbranded default.
220
-
221
- **Open question worth resolving before tokens.** `product` is currently defined as the midpoint of the other two, which is how it earns its place, but it is also the mode that most often needs to lean. A customer dashboard leans editorial; a billing admin screen leans operator. Consider whether `product` needs a documented `dense` variant, or whether such surfaces should simply be declared `operator`. My inclination is the latter — three modes you apply confidently beat five you deliberate over — but it is your call, and it affects how many token sets `02` has to emit.
@@ -48,7 +48,7 @@ They are the only token format every web framework consumes natively with no bui
48
48
  | Consumer | Usage |
49
49
  | --- | --- |
50
50
  | Plain CSS / any framework | `color: var(--color-text-strong)` |
51
- | Tailwind v4 | Wrap in `@theme { }` — generates utilities automatically |
51
+ | Tailwind v4 | `@import` the barrel flat, alongside `@import "tailwindcss"` — see [Colour architecture](#colour-architecture). Utility classes are opt-in and need an alias block |
52
52
  | CSS-in-JS (styled-components, emotion) | `color: var(--color-text-strong)` inside template literals |
53
53
  | Vue / Svelte / Angular | Identical to plain CSS, scoped or global |
54
54
  | React inline styles | `style={{ color: 'var(--color-text-strong)' }}` |
@@ -281,7 +281,7 @@ Resist per-component tokens (`--button-bg`). They multiply fast and rarely earn
281
281
 
282
282
  ## Naming contract
283
283
 
284
- Names align to Tailwind v4's theme namespaces. This is free for other frameworks — they are ordinary custom properties — and means the same file can be wrapped in `@theme` to generate utilities without any framework taking a dependency on Tailwind.
284
+ Names align to Tailwind v4's theme namespaces. This is free for other frameworks — they are ordinary custom properties — and means an alias block can expose any of them as Tailwind utilities without any framework taking a dependency on Tailwind.
285
285
 
286
286
  | Namespace | Holds | Layer |
287
287
  | --- | --- | --- |
@@ -510,17 +510,3 @@ Before writing a new component, check whether it is a composite of things that a
510
510
  A new pattern earns a place here when it has been built three times. Before then it is a component, not a pattern.
511
511
 
512
512
  Each entry states: anatomy in order, complete state list, rules that are decidable, and mode variance. If a rule cannot be checked by looking at the output, it belongs in `04-principles.md`.
513
-
514
- ---
515
-
516
- ## Notes for the author (not for the agent)
517
-
518
- **Where your taste is recorded here:**
519
- - `P-01` — the whole feedback table is a position. Toasts are over-used because they are easy to build and require no layout decisions; treating them as the narrowest case rather than the default is deliberate.
520
- - `P-03` help-text-before-control. Contested — many systems put it after. Placing it before means it is read before the user commits to typing, which matters more in forms people fill once.
521
- - `P-04` one-column forms, and the no-JS baseline for the primary action.
522
- - `P-06` stable row identity, absolute timestamps, no hover-only truncation. The procurement instinct again: the record is evidence before it is a convenience.
523
-
524
- **Deliberately absent.** Navigation, cards, tabs, and toasts-as-a-component. Navigation and cards vary too much by project to have decidable rules yet — they would produce prose, not constraints. Add them once you have built enough to see the invariant.
525
-
526
- **Worth testing before extending.** These 12 cover most of what generated UI gets wrong. Point an agent at a form and a table with `00`, `01`, `02` and `03` loaded, and compare against the same task with nothing loaded. If `P-03` and `P-05` do not visibly change the output, the rules are not decidable enough and the fix is more specificity, not more patterns.
@@ -138,17 +138,3 @@ An invented accent, a decorative animation, a gradient filling an empty space
138
138
  A codebase with one consistent approach is more maintainable than one with a better approach applied to 30% of it. Note the divergence, raise it, change it deliberately as its own work — not silently, mid-task.
139
139
 
140
140
  **This tiebreaker outranks the other six.** It does not outrank Part 1: a local convention creating a genuine accessibility risk is a defect to raise, not a convention to match.
141
-
142
- ---
143
-
144
- ## Notes for the author (not for the agent)
145
-
146
- **What changed in v0.2.** Part 1 did not exist. The file was adjudicative only — seven tiebreakers that fire when rules collide, with no method for producing a rule not yet written. That meant the system handed an agent 51 known failures and no way to recognise the 52nd. The four frames are that method.
147
-
148
- Frame 3 is the most immediately useful, because it is the only idea here that produces a number. Everything else in this system is checked by inspection; interaction cost is checked by counting, which makes it the one principle an agent can be held to objectively.
149
-
150
- Frames 1 and 2 are close to reasoning already embedded in `00` — the risk frame is *why* most of those rules exist, and the rationale requirement is the decidability test that let them in. Stating them explicitly means the next rule can be derived rather than remembered.
151
-
152
- **Tiebreaker 7 remains the one to argue about**, and now has a stated ceiling: it loses to Frame 1. Without that boundary, "match the codebase" would license inheriting anything.
153
-
154
- Tiebreakers 1 and 2 are the same instinct from two directions, and both come from outside software — a document that looks wrong gets marked and filed, never destroyed.
package/rules/05-copy.md CHANGED
@@ -141,13 +141,3 @@ See `P-01` for *where* the message goes and `F-37` for field-level validation te
141
141
  6. Numerals as figures, formatted consistently? (`I-83`)
142
142
  7. One word per concept across the whole product? (`I-87`)
143
143
  8. Every error saying what happened and what to do next? (`I-90`)
144
-
145
- ---
146
-
147
- ## Notes for the author (not for the agent)
148
-
149
- **Where your taste is recorded here:** the ban on apology words in errors, and `I-90`'s requirement that the heading and button work without the body text. Both come from the same instinct as the rest of the system — the person reading is trying to get something done, and the interface should not make them wade.
150
-
151
- `I-87` is the rule most likely to need a project-specific companion. A term list belongs in the brand file's voice section, not here; this rule only says that one must exist and be followed.
152
-
153
- Deliberately absent: tone-of-voice guidance beyond plain language. Tone is a brand decision and varies per client, so it belongs in `03-brand.md` when that file exists.