# Upgrading

Update the CLI, run `idiom upgrade` in each project (for a global npm or bun install, that one command does both), then work through the [action-required items](#action-required-by-release) for every release you skipped. Moving from 0.x to 1.0 is covered in the [1.0 migration guide](https://idiom.build/docs/migrating-to-1.md).

## Update by install kind

For a global npm or bun install, `idiom upgrade` installs the latest release itself and then updates the project's skills; see [upgrade](https://idiom.build/docs/commands.md#upgrade). The commands below choose a specific release. Replace `<version>` with the release you want, without the `v`. The [changelog](https://github.com/mattskilly/idiom/blob/main/CHANGELOG.md) lists every release.

| Install | Update |
| --- | --- |
| npm, global | `idiom upgrade` for the latest release. For a specific one: `npm install -g https://github.com/mattskilly/idiom/releases/download/v<version>/mattskilly-idiom-<version>.tgz`, or `npm install -g @mattskilly/idiom@<version>` once npm serves that release |
| npm, project dependency | `npm install --save-dev --save-exact` with the same tarball URL, then commit the manifest and lockfile |
| bun | `idiom upgrade` for the latest global release. For a specific one: `bun add -g` with the same tarball URL, or `bun add -g @mattskilly/idiom@<version>` once npm serves it; `bun add -d --exact` for a project dependency |
| Claude Code plugin | `/plugin marketplace update idiom`, then `/plugin update idiom@idiom`, then `/reload-plugins` or a new session |
| Codex plugin | `codex plugin marketplace upgrade idiom`, then `codex plugin add idiom@idiom`, then rerun the `codex mcp add` line with the new release and start a new session |

The Codex line names the exact release:

```sh
codex mcp add idiom -- npx -y --package=https://github.com/mattskilly/idiom/releases/download/v<version>/mattskilly-idiom-<version>.tgz idiom mcp
```

Check the result with `idiom --version`, which prints `<version> (<short source commit>) · interface <n>` (releases before the interface version print only the first two parts). The [interface version](https://idiom.build/docs/stability.md) moves only when a stable command, flag, JSON field, MCP tool or project file changes incompatibly. If the new release pins a different Playwright version, install its Chromium build too ([Troubleshooting](https://idiom.build/docs/troubleshooting.md#playwright-chromium-is-missing-or-the-wrong-version)).

## Update project skills

From each project root:

```sh
idiom upgrade --dry-run
idiom upgrade
# For a pinned project dependency: npx --no-install idiom upgrade
```

`idiom upgrade` (0.16.0 and later) merges the installed release's skill templates into the project and keeps your local edits. For a global npm or bun install it first updates the CLI to the latest release and merges that release's templates; other installs print the command that updates them and merge with the installed templates. `--no-self-update` merges skills only. Commit the skills and their `.agents/skills/.idiom-pristine/` records together. Outcomes, conflicts and the manual merge workflow are in [Update and roll back](https://idiom.build/docs/update-and-roll-back) and [upgrade](https://idiom.build/docs/commands.md#upgrade). It also brings versioned `.idiom/` files to the installed release's formats, keeping each original in `.idiom/backups/`; see [format versions](https://idiom.build/docs/stability.md#format-versions-and-upgrade).

## Roll back to a pinned version

Install or pin the earlier release the same way, check it with `idiom --version`, and run `idiom upgrade` again so the skills match it. On a release that updates the CLI itself (after 0.18.0), add `--no-self-update`, or a global install moves straight back to the latest release:

```sh
npm install --save-dev --save-exact https://github.com/mattskilly/idiom/releases/download/v<version>/mattskilly-idiom-<version>.tgz
npx --no-install idiom --version
npx --no-install idiom upgrade
```

For a global install:

```sh
npm install -g @mattskilly/idiom@<version>   # or: bun add -g @mattskilly/idiom@<version>
idiom --version
idiom upgrade --no-self-update   # releases through 0.18.0: idiom upgrade
```

Releases before 0.16.0 cannot run `idiom upgrade`. To go back to one of them, restore the committed skill and pristine files from Git.

## Action required by release

What you must do after moving past each release, newest first. Everything else in the [changelog](https://github.com/mattskilly/idiom/blob/main/CHANGELOG.md) works without action. **Config** covers keys that were added or renamed or whose defaults changed, **Recapture** covers stored runs that lack new evidence ([why](https://idiom.build/docs/troubleshooting.md#findings-need-a-recapture-after-an-upgrade)), and **Skills** means run `idiom upgrade`. Each release adds its own entry here ([release process](https://github.com/mattskilly/idiom/blob/main/docs/releases.md#prepare-the-tag)).

### Unreleased

None.

### v0.24.1

- **Recapture to pick up the merged negative-spacing word-spacing finding.** A chip with negative `word-spacing` whose child has another font size is now one finding, at the chip; stored runs and baselines keep the duplicate child finding until a new capture ([negative-spacing](https://idiom.build/docs/rules.md#negative-spacing)).
- **Re-vendor the `idiom-fix` skill.** If your gate runs `skill = "idiom-fix"`, run `idiom upgrade` so `fixed.md` opens with the line saying nothing needs a human decision. `idiom doctor` now reports the gate `stale` when `idiom-fix` is wired but its skill is not installed; `idiom upgrade` installs it.
- **`paths` on the agent gate step is kept.** `idiom init --wire` and `idiom upgrade` no longer remove a `paths` list from a `kind = "agent"` `[verify.idiom-check]` step, so you can add one to skip agent start-up on non-UI changes ([Autobuild](https://idiom.build/docs/configuration.md#autobuild)). `paths` on the old `kind = "check"` step is still removed when it is migrated.

### v0.24.0

- **A gate with no baseline now stops instead of passing.** `idiom check --gate`, `idiom nightly` and `idiom verify` exit `2` with one `baseline` line when no recorded baseline is reachable from the base and the base could not be captured; before, the gate gated every open finding. Record a baseline on your target branch (`idiom baseline record <flow>`, committed), or let `idiom upgrade --yes` add the Autobuild finalize step that runs `idiom baseline advance --fetch` as builds land. The same exit applies when an app cannot start or a state's `expect` no longer matches ([unattended runs](https://idiom.build/docs/commands.md#unattended-runs-never-fail-quietly)).
- **Re-vendor skills with `idiom upgrade`.** It refreshes the `idiom-verify` skill and offers the opt-in `idiom-fix` verify step (a one-line `skill = "idiom-fix"` swap on the gate step). In a script or build agent, `idiom upgrade --yes` applies what it would offer at a prompt.
- **Recapture to pick up the negative-spacing change.** Display-size type with slightly tight tracking is no longer reported, so findings in stored runs and baselines go away only after a new capture.
- **`idiom brief list --json --array` is removed.** It was deprecated in 0.23.0. Use `idiom brief list --json` and read `.briefs` from `{ interfaceVersion, briefs }`; `--array` now exits 1 with a message naming the replacement.
- **`idiom baseline advance --json` returns every flow.** The experimental payload is now `{ target, commit, fetched?, cachePath, flows: [...] }` with a per-flow `status`, instead of one flow's fields; scripts that read it must read the flow's entry from `.flows[]`.

### v0.23.0

- **`idiom brief list --json` prints an object.** Scripts that read it must read `.briefs` from `{ interfaceVersion, briefs }` instead of the bare array. For one release, `idiom brief list --json --array` still prints the old array, with a deprecation warning on stderr; it will be removed in 0.24.0. Set `IDIOM_NO_DEPRECATION_WARNINGS=1` to silence the warning.

### v0.22.0

- **Shared decision logs:** this release can append attribution corrections (`idiom decide --reattribute`). Idiom 0.21.0 and older skip those records with a "written by a newer Idiom" note and show the original actor, so upgrade every machine that shares the log.
- **Autobuild gates:** none required. To keep gates from capturing the base branch, `idiom upgrade` offers a finalize step that runs `idiom baseline advance --fetch` as builds land ([configuration](https://idiom.build/docs/configuration.md#autobuild)).

### v0.21.0

- **Shared decision logs:** upgrade every machine and CI runner that reads `.idiom/decisions.jsonl` before anyone runs `idiom decide --ack`. Idiom 0.20.0 and older refuse a log that contains an acknowledgement; 0.21.0 and later skip record types they don't know.
- **Autobuild:** run `idiom upgrade` (or `idiom init`) and accept the shown diff to replace the old `ab-verify-idiom` agent step with the UI gate (`idiom check --gate --fail-on major --deferred warn`) and rename the verifier skill to `idiom-verify`. Until then, autobuild builds that change UI mostly skip Idiom.
- **Scripts reading results:** findings can now have severity `info`, which never counts toward a gate; `check` can exit `3` (deferred on a busy host) or `4` (a decision is needed). Accept these if your script checks a fixed list.
- **Skills:** run `idiom upgrade` so the `idiom-verify` skill checks builds that carry an Idiom design asset instead of skipping them ([attach to an autobuild ticket](https://idiom.build/docs/brief.md#attach-to-an-autobuild-ticket)).
- **Scripts:** `idiom init --yes` now also applies the default wiring plan: a marked Design QA section in `AGENTS.md` (created if absent) and an existing `CLAUDE.md`, `.cursor/rules/idiom.mdc` when `.cursor/` exists, and `.github/workflows/idiom.yml` when `.github/workflows/` exists. Hooks, the nightly schedule, the Autobuild gate and landing rule stay off under bare `--yes`. To keep a script's old behavior, add `--skip-wiring agents --skip-wiring claude --skip-wiring cursor --skip-wiring github`, or preview first with `idiom init --dry-run`. Interactive init now asks once (`Apply all selected wiring shown above?`) instead of separately for the brief line, the Autobuild gate and the optional verifier. See [init wiring](https://idiom.build/docs/commands.md#wire-agents-ci-hooks-and-autobuild).

### v0.20.0

- **Runtime:** Idiom now requires Node 22.12 or newer (the CLI library requires it). On older Node every entry point (CLI, `idiom mcp`, plugin and `npx`) exits 2 with a message naming both versions. Check with `node --version` before updating.

### v0.19.0

- **Scripts:** `idiom --version` now ends with ` · interface 1`; a script comparing the whole line should take the first word. Every `--json` payload except `brief list` gains a first key, `interfaceVersion`; a test comparing a whole payload should ignore it.
- **Decisions:** `brief-mismatch` findings accepted before this release reappear once, because their rule id now carries a hash of the assertion. Decide them again.
- **Behavior:** `idiom upgrade` now updates the CLI before merging skills. A script or CI job that installs Idiom itself should run `idiom upgrade --no-self-update`. Update notices are off when `CI` is set; elsewhere, turn them off with `IDIOM_NO_UPDATE_CHECK=1` or `"updateCheck": false`.
- **Skills:** run `idiom upgrade` for the setup-handoff and `idiom init --validate` guidance in the Idiom skill.

### v0.18.0

- **Recapture:** to pick up the new disclosure, nested-border, empty-container, redundant-entry-point, control-selects-parent and token-resolution checks, the probe coverage counts, and the probe fingerprints `idiom check --gate` compares against. Recapture after recording a brief with assertions.
- **Config:** `idiom check --gate` reads the optional `checks.gate` block (`budgetMs`, default three minutes; `nonUi`). `capture.hideWebdriver` and `checks.probe.disclosures` / `checks.probe.maxRevealed` are new.
- **Behavior:** a native `title` now explains a control for `unexplained-control` by default; set `checks.explanation: "visible"` to keep requiring a painted explanation.
- **Skills:** run `idiom upgrade` for the brief guidance in the Idiom skill and the before/after evidence in `idiom-verify`.

### v0.16.1

- **Codex:** the Codex plugin no longer starts the MCP server. Run `codex plugin marketplace upgrade idiom`, `codex plugin add idiom@idiom`, then the `codex mcp add` line for this release.

### v0.16.0

- **Skills:** first release with `idiom upgrade`. Run it once in each project so its pristine records exist for the next update.
- **Config:** new projects default `model.model` to `claude-sonnet-5-5`; existing projects keep theirs, so change it yourself if you want the newer model. `model.provider: "codex"` and `model.fallback` are new.
- **Behavior:** a capture now fails when a stylesheet declares color tokens and none of them resolves. Fix the token names it lists in `design.tokensFile`.

### v0.15.0

- **Skills:** the Idiom skill gained an explicit UI review and completion policy. Run `idiom upgrade` once you are on 0.16.0 or later.

### v0.14.0

- **Gates:** severity gates count measured and observed findings only. If a gate relied on judged model findings, add `--fail-on-judged`.
- **Recapture:** runs from before this release report reduced motion as missing in `idiom coverage --states`.

### v0.13.0

- **Gates:** `error-state-missing` and `retry-blocked` are new major checks, on by default, and can fail a `--fail-on major` gate. Configure them with `checks.failure`.
- **Config:** a repeated off-scale value now becomes one design-system question at `checks.scales.suggestAfter` occurrences (default 5). Answer it with `idiom ruling`.
- **Behavior:** a malformed ruling block in `DESIGN.md` now fails `idiom check`. Fix the block.
- **Recapture:** the failure checks need a fresh capture.

### v0.12.0

- **Gates:** `interaction-shift`, `loading-state-missing`, `double-submit` and `motion-snap` are new major rules, on by default, and `layout-shift` and overlay snaps are now major. Each can fail a `--fail-on major` gate.
- **Config:** new `checks.interactionShift`, `checks.loading.delayMs` (default 1500ms), `checks.motion.minExtentPx` (default 24px), `capture.filmstrips`, and `agent.uiGlobs` / `agent.hooks` for the Claude Code reminders.
- **Behavior:** `idiom quick` now runs the interaction probe; pass `--no-probe` for the static review.
- **Recapture:** timelines and filmstrips exist only in new captures; older runs report the timeline checks unavailable.
