Skip to content

Idiom v0.18.0

Choose a tag to compare

@mattskilly mattskilly released this 03 Nov 18:28
· 7 commits to main since this release
  • New idiom brief decides whether a request holds a design decision before a ticket is written. In a page-editor project, an agent turned "a default Pinned group users can customize" into a ticket that quietly chose a full-size pin button on every tile. The build passed review, tests and every check, and the requester rejected it on sight because it doubled the drawer's height; ten minutes of research afterwards found the small corner icon they chose. idiom brief triage "<request or draft ticket>" applies a shipped, versioned rubric (new controls, placement, hover/touch/keyboard, density, naming, per-item additions, raw URLs or IDs shown to users) with one bounded call to your configured review provider and answers no design decision with a reason, or design decision with the specific open questions, in seconds; --json returns { verdict, reason, questions }, and --no-model prints the rubric and answer shape for the calling agent to apply itself. The agent researches; idiom brief record validates its findings and options (a source URL and hands-on or read on every claim, "nothing found" instead of an empty list, 2–4 options including "don't build it" and the requester's own idea, one recommendation, a cost per option, checkable acceptance criteria) and stores .idiom/briefs/<slug>.json with a rendered <slug>.md under your ticket headings (brief.ticketTemplate, defaulting to What and why, Acceptance criteria, Out of scope, Evidence). idiom brief list and show read them back with their proposed, decided or superseded status. brief.references in .idiom/project.json names the products that set your bar; idiom init now scaffolds it empty. See docs/brief.md.
  • idiom check holds the build to its decided brief. In a page-editor project the requester decided on a small corner pin icon so the Add drawer's tiles would keep their height, and the build that came back gave every tile a full-size pin button below it. It passed every check, because only the brief's own criteria ("tile height unchanged; pin inside the tile") would have failed it. A brief's acceptance criteria may now carry assertions tied to a flow state and a selector: a size (width/height, the flow invariant vocabulary, where the pre-build size says "unchanged"), sameSizeAs a reference element, within another element's rectangle, visibleWithoutHover on touch viewports, stableOnHover (nothing outside the element moves when it is hovered) and minContrast. idiom brief record and decide reject an assertion naming a flow or state the project does not declare. Capture measures the selectors of every decided brief, including elements hidden at rest, and the new brief-mismatch check (major) reports each element that breaks one, naming the brief, the criterion and the measured values, such as .drawer-item height 100, expected 56 (tolerance 1) or .drawer-item .pin extends 44px below .tile. The check summary and report coverage list each decided brief relevant to the flow as checked, not captured, "decided, not checkable" (no assertions) or skipped (decided not to build, or decided on an option the criteria were not written for), with the reason any assertion could not be measured. idiom context lists decided briefs so agents writing code see the decision, the rendered brief shows how each criterion is checked, and idiom learn --from-brief <slug> turns a post-build rejection into state invariants from the brief's size criteria, or a ruling that names the brief; --state comes from the brief when it names one. Recapture after recording a brief. See docs/brief.md.
  • New idiom check --gate is a build gate fast enough to leave on, and every check now says where its time went. In one project a coding agent turned Idiom off in its build pipeline because it slowed every build down; the full daily check there takes about 45 minutes on one flow and 8 on another. idiom check --gate checks only what the change affects, within a budget (--budget 3m, else checks.gate.budgetMs, default 3 minutes). A change to docs, tests, CI config or lockfiles (or checks.gate.nonUi globs) exits 0 in under a second with no UI changes since <base>; skipped, and when the import graph is complete, a module no route reaches counts as non-UI too. Each affected state runs at one viewport and colour scheme unless the change touches responsive or theme styles. The probe clicks the probe's own check candidates and only those other controls that render differently from the newest stored run captured cleanly at or before the base (never an earlier gate round), using per-control fingerprints every probed run now records; the rest are reported as gate: unchanged since <run>. Before any server starts, the gate prints its plan and an estimate from stored timings (1 state × 1 viewport, probe on ≤19 controls (changed region), server started fresh, est. 29s of 3m00s budget). Over budget, it trims ordinary probe controls, widened viewports and schemes, the probe, then the lowest-ranked states, and lists every cut on stderr, in the report under Build gate, and as gate.skippedWork in --json. --reuse-server (or server.reuse: true) captures a dev server already answering at readyUrl, verified against BUILD_ID when one exists. Production flows reuse their build when the working tree's content is unchanged, even on a dirty tree. Every check now ends with one line such as Timing: 2m41s — build reused, server start 12s, capture 1m50s (probe 1m02s), checks 9.0s; slowest: probe, and --json carries the breakdown as timing. On a five-route fixture app (test/fixtures/gate-app, node scripts/measure-gate.mjs), a one-colour change to one component's stylesheet gated in 21s (1 tuple) against 38s for the full 20-tuple check. The autobuild template and both skills now recommend idiom check --gate --fail-on major in builds and a scheduled full idiom check <flow> --since-baseline. They also tell agents to report the Timing: line when Idiom is slow, not to disable it. See docs/commands.md.
  • Idiom opens menus, popovers and disclosures and checks what they reveal. Most real UI bugs live one click deep, and until now no check saw a state no flow opened: an AI panel's Attach menu could stack its Image and Link options as touching bordered buttons, show the browser's raw "Choose file / No file chosen" control, and open over the field row it created, all unreported. The interaction probe now opens every <details>, aria-haspopup and aria-expanded control it reaches (plain positioned div popovers included), follows a menu item that switches it into a new mode one step, and runs the geometry, gap, overlap and native-control checks on what it sees. Findings name where they were found, such as panel › Attach or panel › Attach › Link, and report only what opening it introduced. Two rules are new: idiom:native-control-unstyled (a default file, date, color or range input in product chrome; major for a file input) and idiom:popover-covers-control (an open popover over a field, or over the control that opened it beyond its edge). idiom coverage, coverage --states, --json and the report list the disclosures nothing opened, and why. Revealed observations run inside each control's existing probe budget; checks.probe.maxRevealed (default 12 per state) caps them and checks.probe.disclosures: false turns them off. Recapture to pick this up.
  • Agents reach for idiom brief before writing a UI ticket, and come back with a question you can answer in one click. A brief only helps if an agent uses it unprompted; in the page-editor case the agent never thought to research the control, because nothing prompted it. Triage now returns an id, and idiom brief plan <id> turns its open questions into research instructions: what to check in each reference product (hover, touch, keyboard, small screen, empty and error states), the WCAG and ARIA guidance to look for, a 10-minute, 3–6-search budget, the rules (cite every claim, label it hands-on or read, say "nothing found" rather than guess, and treat "a competitor has it" as a reason to look, not to build) and the exact JSON shape record accepts. record now returns the decision as a ready-to-ask question, recommendation first, shaped for Claude Code's AskUserQuestion, with optional short labels and ASCII sketches. It also says whether the agent may proceed on the recommendation (only when the brief is marked low-stakes and reversible and the recommendation neither overrides the requester's idea nor drops the feature) or must ask. idiom brief decide <slug> --option <id> records the choice and regenerates the ticket-ready Markdown, warning when the choice differs from the recommendation. Four MCP tools (idiom_brief_triage, idiom_brief_plan, idiom_brief_record, idiom_brief_decide) mirror the CLI. The vendored Idiom skill is now model-invocable in project installs, as it already was in the plugin, so agents can load it for any UI work, and it gains a "Before you spec UI" section; its description names the trigger. idiom init and idiom upgrade offer, only when you confirm interactively, to add a two-line instruction to CLAUDE.md or AGENTS.md. In a headless eval with the pinned-group request and no mention of Idiom, Claude Code triaged before writing a ticket in 6 of 6 runs, with or without the instruction. Re-vendor the skill with idiom upgrade. See design decision briefs.
  • New idiom brief gate warns when a ticket adds a design decision without a decided brief. The pinned-group ticket prescribed a guess ("a sibling pin button, visible without hover"), and nothing in the ticket pipeline asked whether anyone had decided it. idiom brief gate <ticket.md ...> checks each ticket when it is written. A ticket that links a brief (brief: <slug>, or brief = "<slug>" in TOML front matter) or embeds a rendered one is judged by that brief, with no model call: decided passes silently, while proposed warns that the decision is still open and superseded or an unknown slug warns too. A ticket with no brief is triaged once; if it holds a design decision, the gate lists the open questions and the commands to research them (idiom brief plan <id>, or idiom brief "<ticket>" --research). A copy fix passes after that one triage call, and research never runs. It warns first: it prints nothing when every ticket passes and exits 0 either way unless you pass --strict, and a triage that fails counts as a warning rather than blocking. --json returns { strict, warnings, tickets } for tools. Recipes for an autobuild ticket lint, a git pre-commit hook and the CLAUDE.md/AGENTS.md line are in docs/brief.md.
  • idiom brief "<request>" --research runs the research itself when no agent is driving. The brief flow assumed a coding agent would research each open question and draft the options, so anyone using Idiom from the CLI alone or in CI got a triage verdict and then nothing. With --research, Idiom triages the request, researches each open question with your review provider's web search (claude-code or codex, with the same subscription-auth and environment handling as critique), drafts the options in one tool-free call, and validates and stores the brief exactly as idiom brief record would. Each answer is checked as it arrives and an invalid one is sent back once with its issues; a second invalid answer stores nothing. The run is bounded by brief.researchBudgetMs (default 15 minutes) and brief.researchMaxSearches (default 5 per question). When it stops early it stores only what validated, as proposed with a "research incomplete" note listing the unresearched questions and no guessed options. Sources stay labelled read unless the provider says it operated the product itself. The CLI prints the run's cost (time, calls, and turns, searches and tokens when the provider reports them), and the stored brief keeps it as researchRun. A project configured only with the anthropic API provider is refused, since that provider has no web access in Idiom. See docs/brief.md.
  • Idiom catches two side-by-side buttons that open the same menu, and a disabled menu row that still lights up. On an editor's toolbar, a drag grip and a "⋯" button sat next to each other and opened the identical menu, and the menu's unavailable "Paste" row showed the same hover highlight as the rows that worked. idiom:redundant-entry-point skipped the pair because both open a menu rather than a panel, and no rule looked at highlights on disabled rows. idiom:redundant-entry-point now also reports adjacent triggers (within 16px, in one toolbar, group or row) whose menus list identical items; triggers far apart, such as a toolbar menu and a footer button with the same items, stay quiet. The new idiom:disabled-row-highlight rule (minor, disabled-highlight) reports a menu or listbox row marked disabled that takes exactly the enabled rows' hover highlight; the probe now records each opened menu's items and hovers up to three of its disabled rows. Recapture to pick both up.
  • Idiom catches a nav link that selects its whole block, and a selection frame drawn across an open dropdown. In a page editor, clicking a navigation bar's call to action or links selected the entire navigation block, and the probe counted "something got selected" as the click working. With the block selected and its dropdown open, the editor's selection frame ran straight across the menu's items. Neither was reported. The new idiom:control-selects-parent rule (major) reports a button- or link-like element whose click marks an ancestor as selected while selection and focus never reach anything matching the element; one finding per selected block lists every element that selected it. To see links and look-alike controls it never clicked before, the probe now clicks those inside a selectable container, at most 12 per state, with link navigation suppressed; their results are kept apart in probe.selectionTrials, so a guarded link is never a dead-control. The new idiom:selection-outline-crosses-popover rule (major) reports a positioned selection or focus frame whose ring crosses an open menu, listbox or popover that is stacked above the framed element, including a dropdown the probe opened. An element's own outline paints beneath such a popover and is not reported. Recapture to pick both up.
  • Idiom catches a border drawn just inside another, and names the lists your flows only ever saw empty. A colour picker drew its rounded pill trigger inside a square 1px border because a wrapper rule (.palette button { border: … }) also matched it, so every swatch showed a doubled, mismatched edge. No rule looked for that, and no flow had seeded a colour, so the palette was never rendered with content. The new idiom:nested-border rule (minor, checks.nestedBorder) reports a fully bordered box that hugs, within 4px, exactly one bordered child of a different corner radius or border style with nothing else painted between them; concentric corners and pill-in-pill count as matching, and outlines, box shadows and focus rings are not borders. idiom coverage, coverage --states, --json and the report's coverage section now also list the lists, grids, tables, feeds and editors that were empty in every captured state, so you know which to seed. Recapture to pick both up.
  • Nine kinds of false finding are gone. On a large editor app, most finding groups in a daily run were noise of nine kinds. Each is now fixed at its cause, with a regression fixture and a nearby real defect that is still found:
    • Idiom's own capture scripts no longer run in sandboxed (opaque-origin) frames, so a sandbox srcdoc preview no longer adds a blocked-script or service-worker console error. health.allow now applies to route and page states too, not only to states with steps; an allow pattern that was too broad there now takes effect.
    • A card's corner action, absolutely positioned inside the link that covers its card and on top of it, is not an element-overlap.
    • The probe never clicks an already-selected tab or option, a checked radio or menu radio, or the current item, so their no-op click is not a dead-control. Their tooltips are still sampled; switches and checkboxes are still clicked. checks.probe.respectControlIntent now adds only pressed toggles and drag handles.
    • Spacing and gap rules (field-group, spacing-rhythm, spacing in scale-conformance, adjacent-gap) skip closed <details> and hidden, inert or content-visibility: hidden subtrees.
    • New capture.hideWebdriver, and a per-flow hideWebdriver, make navigator.webdriver read false for apps that turn their motion off under automation, in route, page and step flows alike. It has no default.
    • interaction-shift treats the panel a control expanded (aria-expanded, no aria-controls) and inline validation it raised (aria-invalid fields, their messages, the form's live regions) as what the user asked for. Anything else the same click inserts is still reported.
    • By default a non-empty native title explains a control for unexplained-control: headless capture never shows the browser's own tooltip. checks.explanation: "visible" still requires a painted explanation.
    • label-off-centre tolerance is at least 1.5px, and 8% of the font size for large type, so font-metric rounding under a tighter configured tolerance is not reported. Offsets of 2px and more are still found.
    • spacing-rhythm measures past a container edge that the control itself reaches with no padding or border, and ignores skip links parked off the page.
  • idiom check shows how much of the app the interaction probe exercised. The probe aims to finish a run in 400 seconds, and on a large app most of its candidates could go unreached without any sign outside each state's observations.json. The check summary now prints, per probed state, how many controls were completed, timed out and not reached, with the most common not-reached reason, and warns when more than 10% of the run's candidates were not reached. report.md and report.html show the same under Interaction probe, and --json and MCP idiom_check carry it as coverage.probeCoverage. To trade time for coverage, set checks.probe.flowBudgetMs (default 400000) or pass --probe-budget <ms> for one run. 0 means no target: each state probes until its controls are done, within capture.maxMinutes. The default target and existing baselines are unchanged.
  • A run that cannot happen says so in one line, early, and exits 2. idiom check and idiom baseline record|accept now check the project, the finding-name registry and, when they would record a baseline from a fresh capture, a clean tree before they start the server. A refusal takes seconds instead of a full capture, and reads like baseline refused: tree dirty: src/app/page.tsx (commit or stash, or pass --all). Files Idiom writes itself (.idiom/finding-names.json, .idiom/ruling-names.json, reports, caches) and Git-ignored paths no longer make the tree dirty. A server that exits or never becomes ready now leads with server failed to start: exit 1 — <last stderr line> and a Fix: line. These setup failures exit 2, distinct from a findings gate failure (1), and --json adds a failure: { stage, cause, hint, message } object. New idiom doctor [flow] (and the idiom_doctor MCP tool) boots the server once with your settings, reports each step with its timing, and suggests the fix for a pinned port, a missing server.env variable, a port in use or a wrong readyUrl.
  • dead-control no longer treats background requests as a click's effect. Polling, autosave and analytics requests that happen to run while the probe clicks a control used to make it look live. A request now counts only when the click started it and either something visible follows or the request would change data (POST, PUT, PATCH or DELETE). A control whose click only coincides with background traffic is reported with "only background requests observed" and the request paths, without query strings.
  • A large capture no longer overloads one Claude Code critique session. The Claude Code provider used to put every screenshot and DOM excerpt in a single session, so a long flow could fill the session's context and lose evidence without saying so, twice over when the repair round ran. Each session now sees at most 20 images, 20 MB of image files and 60,000 characters of DOM excerpts. A larger capture is split by state across several sessions, each with its own repair round; a single screenshot or excerpt too large for any session is left out. When that happens, report.md and report.html say so in one line under the model layer, naming what was left out and why, and the review result and sweep.json record it as evidence limits. If every screenshot would be left out, the provider fails and the review degrades with the limit named. Captures within the limits run exactly as before.
  • A stalled Claude Code critique no longer hangs idiom review. The Claude Code child had no time limit, so a session that stopped responding left the review waiting with no result and no way out but Ctrl-C. Each claude -p critique call is now bounded to 10 minutes (the repair round, when one runs, gets its own 10 minutes). When the bound expires, Idiom stops the process and treats the stall like any other provider failure: it switches to model.fallback if you configured one, otherwise it writes a degraded report with the deterministic findings, prints a warning saying the session did not finish within 10 minutes, and exits 0. A timed-out session is not retried. Reviews that finish in time are unchanged.
  • The model's list of deterministic findings no longer grows without limit. Every model critique prompt repeats the deterministic findings already reported, so the model does not duplicate them, and that list grew with the number of accessibility violation nodes. A page with hundreds of them could crowd out the screenshots and DOM evidence or push a request past the provider's limit. Each prompt now lists at most 50 deterministic findings (or 20,000 characters of them), most severe first, and summarizes the rest by category and severity; the model is told those were evaluated too. When that happens, report.md and report.html say so in one line under the model layer (and per advisory pattern), and the review result, sweep.json and advisory.json record it. Smaller sets are sent exactly as before, and which findings are detected or reported is unchanged. See docs/architecture.md.
  • Token values resolve where they apply, outside your app. token-drift used to resolve declared tokens by adding probe elements to the captured page itself. An app rule such as span { color: … !important } could then turn its own colour into an accepted token value, a component that sets color-scheme: dark was judged against the page's light light-dark() values, and an app MutationObserver could react to the probes in the screenshot or console. Idiom now only reads the captured page and resolves tokens in a separate blank page, once for the body and once for each subtree that overrides color-scheme or a referenced custom property. Colours inside such a subtree are judged against that subtree's values, so its dark token colours pass and the light ones are reported there. observations.json records these as tokens.contexts and elements[].tokenContext. Recapture to pick this up.
  • A linked worktree whose finding names drifted from main still completes its review. A worktree that reviewed on its own (a benchmark or branch worktree) used to fail after a full capture with conflicting finding-name registry …: finding-N is allocated to unrelated identities, leaving no report. Now the current checkout's names win: the primary checkout's conflicting entries are skipped for the run, the run finishes, and one line on stderr says how many were skipped and from which file. Names stay the same across repeated runs. Pass --isolated-registry to check, review or baseline record|accept, or set findingNames.isolatedRegistry in .idiom/project.json, to ignore the primary's names in a throwaway worktree. A registry that cannot be read, or a conflict within the worktree's own records, still refuses — now in preflight before the server starts, including for idiom review.
  • Installing the Claude Code plugin no longer downloads Idiom's development dependencies. Claude Code installs packages for any plugin whose directory has a package.json and a lockfile, and the plugin used to be the whole repository. With bun installed, that put about 290 MB of build and test tools into the plugin cache; without it, claude plugin list warned that packages were not installed because bun was missing. The Claude plugin now lives in its own plugins/claude/ directory, so the cache holds only the plugin. After claude plugin update idiom@idiom, Claude Code removes the old version's directory, node_modules included, during its normal cleanup of unused versions. Codex and the npm package are unchanged.
  • idiom verify recognizes dates anywhere in a container, and contextual bare days and years. A date late in a long container now marks the container volatile, so its content-derived styles and height no longer read as a rendered change. A bare day of month or year (a calendar's "12", a trailing "2026") counts as temporal when the element or a near ancestor carries a date in its own text or attributes, or is a <time>; a guest count beside a date stays a real change. Masks are unchanged.
  • idiom decide --list no longer carries an instance decision to a later commit. When a finding is re-observed on a new commit, an instance decision recorded on the earlier commit no longer shows it as approved. The listing now agrees with idiom decide and idiom tickets, which already treat the new occurrence as undecided. Rule-scope decisions still apply across commits.
  • The report says which findings past the cap you can decide on. The Evaluated but not selected section listed every deferred finding with a finding-N id, so it looked like idiom decide --finding finding-N would work, but only findings recorded in an earlier run's findings.json resolve; the rest failed with unknown finding id. Each deferred entry in report.md and report.html is now marked decision target (with the exact idiom decide --finding <id> command) or report-only, and the section says the actionable findings above can be passed to idiom decide --finding. Quick and page reviews mark every deferred entry report-only. See docs/commands.md.
  • The Autobuild verifier attaches before/after images when verification fails. The ab-verify-idiom skill now deposits the paired composites with the report on a nonzero idiom verify, so a reviewer can see the regression without rerunning. It clears earlier output first; when a failure happens before any composite exists, it attaches nothing and its report says that no paired visual evidence was produced. Re-vendor the skill (idiom upgrade) to pick this up.
  • The schema reference shows Zod 4 record syntax. docs/schemas.md showed z.record(z.string()) for server.env, setup[].env, Electron launch.env and verification.params, which does not compile under Zod 4. Those examples now use z.record(keySchema, valueSchema) as the shipped schemas do, and a test keeps them in sync.