jig-ui 0.17.2 → 0.17.3

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,34 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.17.3
4
+
5
+ Three defects found building jig-site's header with the full loop.
6
+
7
+ ### Fixed
8
+
9
+ - **The gate no longer asks `make` for a critique's verdicts.** A critique
10
+ counted as touched when any file in its folder changed, so a make round that
11
+ saved its probe there (`jig probe --save`) was held to that critique's
12
+ completeness. A critique written before a release that added rules has no
13
+ verdicts for them, and only `critique` may write verdicts, so the round was
14
+ blocked three times on something it was forbidden to do. A critique is now
15
+ touched only when its verdict files change.
16
+ - **`jig verdicts` accepts, and asks for, verdicts on hybrid rules with a
17
+ pass.** 0.17 gave ten code-pass rules (A-135 to A-140, A-143, A-144, A-146,
18
+ G-145) detectors and made them hybrid. Each kept its `pass: code`, because a
19
+ detector catches only some shapes of the failure, and the code arm judged
20
+ them as that field says. `verdicts` knew only judgment and mechanical ids,
21
+ so every verdict on them came back "not a rule", and a critique that did
22
+ what the rules said could not pass. A hybrid rule with a pass is now judged
23
+ in that pass, like a judgment rule: the code arm has 84 rules, not 74.
24
+ - **`jig update` refreshes a project's mode files where `init` wrote them.**
25
+ `init` has written `mode.<mode>.css` beside the brand file (for example
26
+ `src/styles/jig/`) since the token layer moved into the project's styles,
27
+ but `update` still looked for them under the pre-0.6 `.jig/tokens/`. It
28
+ found none, so every release left the old tokens in place, and nothing
29
+ said so; only `jig init --yes` refreshed them. `update` now refreshes each
30
+ untouched copy wherever `init` recorded writing it.
31
+
3
32
  ## 0.17.2
4
33
 
5
34
  Four defects found by building one page with the full loop.
package/dist/index.js CHANGED
@@ -1014,15 +1014,17 @@ function updateInitFiles(opts) {
1014
1014
  let initChanged = false;
1015
1015
  const writer = createWriter(opts.projectRoot, initFiles);
1016
1016
  for (const file of bundleFiles(opts.packageRoot, "tokens")) {
1017
- const key = relKey(".jig", "tokens", file);
1018
- if (!(key in initManifest.files)) continue;
1019
- if (isInitFileModified(opts.projectRoot, key, initManifest)) {
1020
- skipped.push(key);
1021
- continue;
1017
+ if (!file.startsWith("mode.")) continue;
1018
+ const keys = Object.keys(initManifest.files).filter((k) => k === file || k.endsWith(`/${file}`));
1019
+ for (const key of keys) {
1020
+ if (isInitFileModified(opts.projectRoot, key, initManifest)) {
1021
+ skipped.push(key);
1022
+ continue;
1023
+ }
1024
+ const content = vendorHeader(file, opts.version, "css", null) + readFileSync7(join10(tokensDir, file), "utf8");
1025
+ updated.push(writer.write(key, content));
1026
+ initChanged = true;
1022
1027
  }
1023
- const content = vendorHeader(file, opts.version, "css", null) + readFileSync7(join10(tokensDir, file), "utf8");
1024
- updated.push(writer.write(key, content));
1025
- initChanged = true;
1026
1028
  }
1027
1029
  Object.assign(initFiles, writer.files);
1028
1030
  if (initChanged) writeInitManifest(opts.projectRoot, { ...initManifest, version: opts.version, files: initFiles });
@@ -6526,7 +6528,7 @@ function verifyVerdicts(opts) {
6526
6528
  const root = opts.packageRoot ?? assetRoot();
6527
6529
  const errors = [];
6528
6530
  const index = JSON.parse(readFileSync29(join36(root, "rules.index.json"), "utf8"));
6529
- const judgment = index.filter((r) => r.bucket === "judgment");
6531
+ const judgment = index.filter((r) => r.bucket === "judgment" || r.bucket === "hybrid" && r.pass !== void 0);
6530
6532
  const screenIds = judgment.filter((r) => r.pass === "screen").map((r) => r.id);
6531
6533
  const codeIds = judgment.filter((r) => r.pass === "code").map((r) => r.id);
6532
6534
  const passOf = new Map([
@@ -6643,12 +6645,13 @@ function sessionStart(transcriptPath) {
6643
6645
  }
6644
6646
  return void 0;
6645
6647
  }
6646
- function newestMtime(dir) {
6648
+ function verdictsMtime(dir) {
6647
6649
  let newest = 0;
6648
- for (const name of readdirSync15(dir, { withFileTypes: true })) {
6649
- if (name.name === LOCK) continue;
6650
- const path = join37(dir, name.name);
6651
- newest = Math.max(newest, name.isDirectory() ? newestMtime(path) : statSync4(path).mtimeMs);
6650
+ for (const name of VERDICT_FILES) {
6651
+ try {
6652
+ newest = Math.max(newest, statSync4(join37(dir, name)).mtimeMs);
6653
+ } catch {
6654
+ }
6652
6655
  }
6653
6656
  return newest;
6654
6657
  }
@@ -6659,7 +6662,7 @@ function surfacesInPlay(root, command, transcriptPath) {
6659
6662
  const start = sessionStart(transcriptPath);
6660
6663
  if (start === void 0) return all;
6661
6664
  const current = command === "critique" ? /^\s*surface\s*:\s*(.+)$/im.exec(newestSpec(root)?.body.split(/^---\s*$/m)[1] ?? "")?.[1]?.trim().replace(/^["']|["']$/g, "") : void 0;
6662
- return all.filter((s) => s === current || newestMtime(join37(critiqueDir, s)) >= start - 1e3);
6665
+ return all.filter((s) => s === current || verdictsMtime(join37(critiqueDir, s)) >= start - 1e3);
6663
6666
  }
6664
6667
  function commandProblems(root, command) {
6665
6668
  const problems = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jig-ui",
3
- "version": "0.17.2",
3
+ "version": "0.17.3",
4
4
  "description": "A design system for coding agents. 143 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",