Skip to content

Jig 0.4.0

Choose a tag to compare

@timessuman timessuman released this 04 Sep 06:42
· 424 commits to main since this release
8096fbc

Jig stops copying itself into your project. It is a skill an agent reads, and 0.3.0 wrote 220KB across 17 files into every consuming repo to deliver it — roughly 200KB of that Jig's own property, read by an agent that already had it. A single-mode project now gets four files, all of them its own.

npx jig-ui@latest install --agent claude
npx jig-ui@latest init
npx jig-ui@latest check --all

Slash commands

Every command is now a slash command in your agent: /jig init, /jig check, /jig explain C-19, /jig install, /jig update. Ask normally and the skill applies itself; use the slash command when you want a specific step.

Agent Command file Scope
Claude Code .claude/commands/jig.md project or global
Cursor .cursor/commands/jig.md project or global
opencode .opencode/command/jig.md project or global
Gemini CLI .gemini/commands/jig.toml project or global
Codex ~/.codex/prompts/jig.md global only

jig explain <rule-id>

Closes the loop when a rule fires. check printed "✗ C-19 … (see rule C-19 in your installed skill's rules/)", which sent you off to open a file; explain C-19 prints it — the correction verbatim, the version it arrived in, and whether it is checked mechanically or by judgment.

It also resolves the P- pattern and M- mode specs, which no rule index contains but which agents cite constantly.

check reads CSS wherever it lives

It read .css/.scss/.less only, which for most projects meant it examined almost nothing — and said nothing about that. A Tailwind v4 fixture with bg-[#6D28D9] p-[13px] rounded-[12px] reported "No findings · 0 errors": a clean bill of health for a project where every value bypassed the token layer.

Now covered: <style> blocks across 25+ host languages (HTML, Astro, Vue, Svelte, PHP, ERB, ASP and ASP.NET, Razor, JSP, Phoenix, Liquid, Jinja, and the rest), Pug/Haml/Slim through their own indentation-delimited syntax, style="…" and style={{ }}, CSS-in-JS tagged templates, Tailwind arbitrary values, and default-palette contrast pairs.

The mechanism is extraction rather than a detector per language: everything that is not CSS is blanked preserving character positions, so a finding in a .vue file still points at the real line and all seven detectors gained host-language support without being touched.

A bare p-4 is deliberately not a finding — it resolves through a scale, and flagging it would mean flagging correct Tailwind.

A stroke-width namespace

E-28, E-29 and P-02's 3:1 shape floor all require a visible border or focus ring, and no token named a width — so each ended at a call site writing 2px by hand, which H-47 forbids. The system had a rule it made impossible to obey. --border-width-* and --focus-ring-* fix it; the focus geometry is not mode-negotiable, for the same reason --size-touch-target is not.

Also fixed

  • The skill sent agents to an unpinned CLI, so they got npm's latest rather than the version that wrote the bundle. It now names its own version — and update is deliberately not pinned, since pinning the one command whose job is moving the pin meant it could never move.
  • JIG_CHECK: named two different records. One field set now, asserted against both the CLI and the skill.
  • Brand colours were validated in light mode only, while the brand file ships a dark block. The verdict is now the worse of the two.
  • Concurrent runs lost each other's manifest entries. Fixed with a merge at write time rather than a lock — the files map is additive and per-file, so no stale-lock recovery is needed. Ten parallel processes, fifty entries, all survive.
  • Writes left mixed line endings in a file whose checksum still matched.
  • Symlinked stylesheets were invisible to the repo walk.
  • init chose a mode silently, and 01-modes.md then made that choice authoritative over an agent's own inference.
  • Every vendored file cited a licence path that no longer existed.

Upgrading

npx jig-ui@latest update

Files you have edited are left alone. Upgrading from a pre-0.4.0 install that vendored rules into .jig/? init and check detect the leftovers, report them, and — with your consent, never for a file you have edited — offer to remove just the install artifacts.

Full detail in CHANGELOG.md.