Skip to content

Idiom v0.23.0

Choose a tag to compare

@mattskilly mattskilly released this 15 Nov 21:25
· 2 commits to main since this release
  • A director's measurable law now configures the check that measures it. When a director said "nothing in a toolbar sits closer than 4px, glyph to glyph or glyph to button", idiom learn recorded a prose ruling that only the model reviewer read, so the offset chip that broke it still passed every deterministic check. Now learn compiles five kinds of law to configuration: a minimum gap (control-gap), no negative letter- or word-spacing (negative-spacing), centring within a tolerance (text-centering), a shared top edge or height, and equal widths for fields (both layout-invariants, through a new project-wide share invariant). A law naming a toolbar, menu, field group, form, dialog, tab list or navigation is scoped to that surface; the diff opens with one line naming the check and the scope, findings cite the law, and idiom context lists it. idiom ruling --wording compiles the same laws alongside the ruling in one confirmed diff. Words that cannot be compiled still become a ruling, in the director's words, with a line saying why. See Laws learn compiles.
  • Agents record a director's catch the moment it is said, with the MCP tool idiom_learn. A director points out UI and UX problems inside agent conversations, but recording one meant someone stopping to run idiom learn, so most catches were never recorded. Now idiom_learn takes the person's words, and optionally their screenshot, a selector and the state, records it exactly as idiom learn --yes does, and returns the record, its matched or proposed state and its rule candidate; calling it again with the same words and screenshot returns the existing record and writes nothing. The Idiom skill tells agents to call it whenever a person points out a problem and to say back what was recorded. See MCP.
  • idiom learn --harvest collects the UI corrections a director already wrote. A director teaches their agents all day, in answers to autobuild escalations and in pull request review comments, but none of it reached Idiom, so every correction had to be said twice or was never learned. Now idiom learn --harvest reads the local autobuild store's human escalation answers (offline, through ab) and the review comments, review bodies and conversation comments on the repository's recent pull requests (through gh), keeps the sentences that correct layout, spacing, copy, interaction or visual quality, and ignores build-process talk, bots and machine-written comments. The classifier is lexical, so it needs no network or model. Each correction becomes an open learned record with the director's words verbatim, its source (build and escalation, or pull request, link and file), author and date, a rule candidate, and a flow state found from the words or drafted. Harvest never writes design law or check configuration: it lists the new candidates together, and idiom learn --confirm [ids...] applies them in one pass, one diff and prompt each, marking each harvested record covered by what it became. Running it again adds nothing: records carry a source key and .idiom/harvest.json remembers where each source was read to. When pull request comments cannot be read, harvest says why and still records the autobuild answers. --dry-run, --since and --json are supported, and learn --list shows where a harvested miss came from. See harvest corrections, including how to run it on a schedule or as an autobuild finalize step.
  • idiom learn --import takes a whole catalog of misses in one pass, and --replay says how many of them Idiom now catches. A director kept 127 misses caught by eye over six weeks as a Markdown table (what was seen, the general rule, a category, how it could be checked, the state that would show it), and the only way in was one idiom learn per row, each placing, prompting and editing config. Now idiom learn --import misses.md reads every table with id, observation and rule columns (headers matched by role, ignoring case, punctuation and notes in brackets, so "what was wrong" and "general rule (checkable law)" both work; other columns optional) and writes one open observation record per row with its rule candidate, the check ids the row names, and its state: the one the state cell names, else the one its words name, else a draft state under .idiom/proposals/states/; a state cell written NEW: <description> always becomes a draft state with that description. It never prompts and never edits config or design law. Every row is imported or reported with its line and reason (blank id, observation or rule, duplicate id, too many cells, empty row, ambiguous state, unknown flow), and the summary counts created, updated and skipped rows, how many are covered by an existing rule and how many need a new state. Re-importing the file updates records by row id, keeping ids and coverage marks. learn --list --import misses filters to the import with each record's checks, and coverage now also counts a finding whose category is a check the row names. learn --replay misses reads the latest stored run of each record's state and reports "the latest checks catch N of M", naming the runs it read. See importing a table of misses.
  • Idiom catches a half-empty tile picker: a small photo pinned to one side of a stretched tile, a doubled selection ring, and a default fieldset legend. A "Photo look" picker on a visual page builder shipped with three tiles stretched to their columns, each holding a 28×28px photo at its left, a selected tile showing the photo's border inside its own selection border, and a section heading drawn as the browser's notched fieldset legend. Idiom already captured that state and reported nothing, because each rule stopped short: idiom:empty-frame only looked at boxes with nothing in them, idiom:nested-border only at frames within 4px of each other, and idiom:browser-default-style only at links, and only with a tokens file. Now idiom:empty-frame also reports a tile, card or option whose lone image is at most 35% of the frame and pinned off-centre with a strip at least half the frame wide beside it, once per group of sibling tiles, naming the frame, the media and the empty share; labelled options, media centred in its frame, and header, nav and toolbar bars are never reported. idiom:nested-border reports a selected choice (aria-pressed, aria-selected, aria-checked, checked or a selected/active/current class) whose border rings exactly one bordered image, however far apart the rings are. idiom:browser-default-style reports legends notched into their fieldset's border, with or without a tokens file. Sweeps over every state of the gate and field fixture apps at phone and desktop widths in both schemes found no new findings; the picker fixture and its correction are in docs/field-test/tile-picker.json. See rules. Recapture to pick this up.
  • Coverage names the menus, popovers, toolbars and editors no state ever opens, and drafts the state that would. On a visual page builder, no flow state ever showed the selection toolbar's menus, a multi-selection or inline editing, so no check had seen them and nobody noticed until bugs turned up there. Now captures record the interactive surfaces on each page (menu and popover triggers, disclosures, toolbars, editable text, selectable elements and multi-select containers) and whether the state shows each open, selected or focused, and idiom coverage --states lists, per flow, the ones no captured state shows active. Each comes with a draft flow state, one line of JSON to paste into the flow's states: from the state that showed it, with the steps that reach it (click and waitFor, a modified second click for a multi-selection, dblclick and focus for inline editing). They are ranked by how much UI each would reveal, capped at ten with a count of the rest, and ordered the same on every run. --json and MCP idiom_coverage carry the list as surfaces. Recapture to pick this up. See coverage.
  • Idiom measures the space inside a chip, and flags squeezed spacing on interface text. A selection toolbar shipped an offset chip that read ↑18←6, with its reset × touching the 6: a build agent had set gap: 0; word-spacing: -2px on the chip to fit a width cap. Idiom passed it, because its gap rule measures separate element boxes and cannot see text and buttons crammed together inside one control, and nothing looked at negative spacing on labels. Now idiom:control-gap (minor) measures the ink between text runs, icons and nested controls side by side inside one button, chip, pill or toolbar item and reports any pair closer than 4px, naming the control, both parts and the gap (checks.controlGap.min, up to 12px); segmented and joined groups, keycaps and symbol affixes such as $ are exempt. And idiom:negative-spacing (minor) reports a negative letter-spacing or word-spacing on interface text once, at the element that sets it; page content is left alone unless checks.negativeSpacing sets scope: "all" or lists it in include, and ignore silences a selector. Recapture to pick these up.
  • Flows reach live-editing states from the manifest alone: hover, double-click, counted and modified presses, modified clicks and held drags. Most misses on a visual editor live in states a person reaches with the pointer and keyboard (a selected block with its toolbar, a nudged block with its offset chip, a multi-selection, inline text editing, a drag in progress, a hover-only control), but flow steps had only click, fill, press, select, focus and the waits, so each of those states needed its own app-side preset. Now steps add hover, dblclick and drag (to a target selector or by an offset), click and press take modifiers (Meta for Cmd, Shift, Alt, Control, ControlOrMeta), and press takes a count from 1 to 200 (ArrowUp 18 times). A drag with "hold": true keeps the pointer down through the capture of every viewport and colour scheme and is released after the evidence is saved, so the next state starts clean; the interaction probe is skipped for that state, and only waits and assertions may follow the drag. idiom validate names the field and the fix for a bad modifier, count or selector. Existing steps and flows behave as before. See live-editing gestures.
  • idiom learn works from what a person says, with no flow state. After weeks of daily use, a director's catches produced no learned records at all, because learn refused to run without --state, and people describe a miss in words and screenshots, not state ids. Now --state is optional. With --screenshot, learn matches the screenshot to the closest stored capture of a declared state, viewport and colour scheme (annotation strokes are ignored, and a viewport shot is found inside a full-page capture), and says which one matched, how similar it is, how confident it is, and the next closest. With no screenshot, a state the words name is used, or the only declared state. When nothing matches well enough, the miss is recorded as open and learn writes a draft flow state to .idiom/proposals/states/<id>.json: it is reached from the nearest captured state and already validates, ready to paste into the flow. Every record now carries a generalised rule candidate, how it could be checked (deterministic, judged, or needs a reference), and how its state was found. learn --list shows whether each miss is open, covered by a rule or covered by a fixture, and whether its state is matched or proposed. --yes still records without prompting, so an agent can call learn mid-conversation. --state and --from-brief work as before. See learning without a state.
  • check --gate, check --changed and the core MCP tool outputs are now a written promise. Agents and CI build on check --gate --json, check --changed --json and the results of idiom_quick, idiom_check, idiom_issue and idiom_verify, but all of them were documented as experimental, so any release could change what they relied on. Now each is stable-additive for a named set of fields: the gate's three forms (skipped, plan only, ran) with decisionNeeded, decisionQuestion and the changed-path selection; and, for the MCP tools, everything an agent needs to review, fix and verify (finding identity, rule id, severity, title, target state and viewport, fix guidance, evidence paths, and verify's verdict and per-finding outcomes). Fields that are still changing, such as the gate's plan, timing and base comparisons, ranking scores and capture-artifact detail, stay experimental, and the docs give the reason for each. No payload changed shape. See stability and MCP.
  • A menu, popover or panel with no accessible name no longer fails the whole review. When the probe opened a disclosure whose trigger had no accessible name (an icon-only menu button, say), it recorded the revealed element with an empty name and then rejected the observations it had just written: idiom quick, capture, check and the MCP quick tool stopped with invalid observations … revealed.name: Too small … recapture the flow, and recapturing failed the same way. Now the revealed element is recorded and checked like any other, and findings name it unnamed popup, unnamed panel or unnamed details, or <menu> › unnamed item for an unnamed item that switches a menu's mode, never an empty name. Observation files written by earlier versions with an empty name are read without recapturing. An audit of the other page-derived text the probe and capture record (tooltip and description text, menu, palette, link and destination URLs, request methods, word-break and orphan-word words, glyph and ornament records) found no other field a page could leave blank; a fixture with unnamed and whitespace-only controls, labels, tooltips and links now round-trips through the reader.
  • One slow screenshot no longer fails a whole quick review, and its advice no longer mentions ports. On a heavy marketing page, MCP idiom_quick returned only an error: the last tile of a tall full-page screenshot had about 6 s left of the capture's shared 30 s allowance and timed out, the tool threw away the three captures that had succeeded, and the error told you to free a port or edit server settings, because the report path (Report: /Users/…) matched the port-advice pattern. Now a screenshot starts only with at least 10000 ms of its allowance left (or all of it when the allowance is smaller), and once it has started, a tall page's later tiles are each attempted while at least 1000 ms remains, so a tile that would finish is never refused. A shot or tile that really runs out is recorded as failed with screenshot out of time: …, saying how much was left after how many tiles, and the run continues. MCP idiom_quick returns the findings from the captures that succeeded, lists the failed ones in captureFailures and names them in its text with advice that matches the failure; it errors only when no capture succeeded. CLI quick follows the same rule: its final line names failed captures and the advice, and it now exits 1 when nothing captured. Timeout advice never mentions ports or server settings, and port advice now needs a real port failure. See troubleshooting.
  • idiom brief list --json carries interfaceVersion like every other payload, and deprecations warn the same way everywhere. Scripts could not detect a break in brief list --json, because it was the one payload printed as a bare array with no interfaceVersion; and nothing gave deprecated surfaces a shared warning, so each would have invented its own. Now brief list --json prints { interfaceVersion, briefs } with the same per-brief fields as before. For one release, brief list --json --array prints the old array and warns on stderr, naming the replacement and 0.24.0, the release that removes it. Every runtime deprecation warning is now one stderr line, never inside a --json payload, printed at most once per process per surface and silenced with IDIOM_NO_DEPRECATION_WARNINGS=1. See deprecation policy and upgrading.
  • idiom upgrade moves project files to the current format. Several .idiom/ files carry a format version, but nothing moved a project's files forward when a release changed a format, so every reader had to accept old versions forever and nobody was told. Now idiom upgrade checks every versioned .idiom/ file before merging skills: a current file is only read, an older one is migrated after its original is copied to .idiom/backups/upgrade-<stamp>/, an append-only log such as learned.jsonl is never rewritten (old records stay and are still read), and a file on a newer format than the installed Idiom understands is left untouched and makes upgrade exit 1 with a message to update Idiom. --dry-run lists the migrations without writing, and upgrade --json adds projectFiles. No file needs migrating today: every versioned file is at format 1. See format versions.
  • MCP tools declare their output, and idiom_doctor's is stable. Agents and MCP clients call Idiom's tools and parse their results, but nothing told them what a result contained or whether they could rely on it: tool outputs were undeclared and documented as experimental. Now every tool advertises an outputSchema in tools/list, and every successful result's structuredContent matches it and starts with interfaceVersion, so a client can validate what it gets. Text content is unchanged, and errors are unchanged: a failed call is still a tool error, not held to the schema, and structuredContent.failure is still the run-failure object. idiom_doctor's output mirrors doctor --json and is now stable-additive; the other outputs stay experimental, each with its reason in stability.
  • See whether a flow is getting better or worse, and get warned when a capture came from a dev server. A report showed one run in isolation, so nobody could tell at a glance whether a flow was improving; and captures taken against a development server (overlays, unminified timing, dev-only warnings) produced findings production never had, with nothing saying so. Now every idiom check summary ends with the flow's open blocker/major/minor counts over its last five full runs, oldest first, each with its date and commit; acknowledged and rejected findings are excluded (a rejection applies to older runs too), and a run with failed or deferred tuples is marked coverage gap: … — not comparable so missing tuples don't read as improvement. check --json carries it as trend, and idiom report prints every flow's trend and gains --json. capture and check print one warning when a captured page shows a development-server sign (a Vite or webpack client script, a Next.js or React development build, or a framework error overlay), suggest server.build with a production start command, and record the sign in run.json as devServer; set checks.devServer to "allow" to silence it. idiom init and init --validate also suggest a tablet viewport (768 or 1024 wide) when viewports skip from phone to desktop; defaults are unchanged and init --validate --json adds suggestions. All additive at interface version 1. See trend across runs and development-server warning.
  • Idiom catches a page whose content never faded in, and seven layout and type problems it could not see before. A landing page's sections were still at opacity 0 because their scroll reveal never fired: a person saw an empty page, and Idiom passed it, because every rule that reads text skips text that is not painted. Now idiom:hidden-at-rest reports a state where, once motion has settled, more than 20% of the text in the viewport (by count or by area) is at opacity under 0.1 or visibility: hidden, naming the element it sits under. Menus, tooltips, dialogs and other positioned layers, closed disclosures and screen-reader-only text are exempt; list content a state hides on purpose in its new intentionallyHidden selectors. Seven more rules measure what a person reads: idiom:edge-text (body text closer than 16px to the screen's side, 12px on phones), idiom:cramped-padding (text within 4px of its bordered or filled box, chips and badges under 24px exempt), idiom:heading-rhythm (a heading no further from the block above than from its own content), idiom:type-legibility (body text under 12px, interface text under 11px, line height under 1.2, justified text, capital runs over 30 characters, letter-spacing beyond ±0.1em, reported once per problem and size), idiom:numeric-align (a number column left-aligned or without tabular figures), idiom:ragged-row (cards in one row ending more than 8px apart) and idiom:text-occlusion (text more than 30% covered by an opaque element above it). All eight start at minor; turn each off with checks.hiddenAtRest, checks.edgeText, checks.crampedPadding, checks.headingRhythm, checks.typeLegibility, checks.numericAlign, checks.raggedRow or checks.textOcclusion. A sweep over every state of the gate and field fixture apps at phone and desktop widths in both schemes found no false positives; its only hits are real ones, number columns in the field app's tables set left-aligned in proportional figures (docs/field-test/legibility-layout.json). See rules. Recapture to pick this up.
  • Idiom catches the operating system's scrollbar inside a rounded box, links left in the browser's blue, and chrome tokens nothing applies. A styled comment box showed the system's scrollbar track and gutter inside its rounded corners once its text overflowed, every scroller in an app's chrome used native scrollbars, and the design's scrollbar colour token was applied nowhere. Screenshots hide scrollbars, so no rule saw any of it. Now idiom:native-scrollbar (minor) reports an overflowing scroller inside a box with a corner radius or its own fill that shows a space-taking scrollbar with no scrollbar-color, scrollbar-width or ::-webkit-scrollbar styling: after the state's evidence is saved, capture shows classic scrollbars just long enough to measure each track, and fills one textarea per state to test it overflowing, then puts it back. idiom:browser-default-style (minor) reports links still in the default blue or visited purple when your tokens file declares a link or accent colour, and idiom:unused-token (info) lists scrollbar, selection, caret and focus tokens in your tokens file that no applied rule in any captured state uses, once per run. Turn each off with checks.nativeScrollbar, checks.browserDefaultStyle or checks.unusedToken. A sweep over every state of the gate and field fixture apps at phone and desktop widths in both schemes found one hit, a real one: a product table that scrolls sideways inside a rounded card at phone width (docs/field-test/chrome-defaults.json). See rules. Recapture to pick this up.
  • Idiom catches an element that jumps when you open something, and a menu item that repeats a link already on the page. Opening a drawer from the top-bar logo moved the logo about 8px and shrank it from 28px to 24px, and a project menu still offered Leads and Keyboard shortcuts after both had moved to the side navigation and the Help menu. Neither was a finding: Idiom compared elements only within one state and skipped the control that was clicked, and duplicate entry points ignored where things lead. Now idiom:state-jump (minor) compares each state with the states the flow links it to (a state reached with from and its source, or toggle combinations of one base), matches elements by role and accessible name or a stable selector, and reports any that move or change size by more than 1px, the clicked control included, showing both boxes and both screenshots. Observations now record the scroll offset, so a step that scrolled the page does not read as a jump, and elements pushed together are one finding. List deliberate changes in the state's new intendedChanges selectors. idiom:redundant-entry-point now also groups navigation by destination pathname (page links, navigating clicks and the link rows of menus the probe opens) and reports a destination that a menu item repeats; two page links to one route, such as a header and a footer link, never count. checks.duplicateEntry.navigation can include the query or hash, and checks.probe.commandPalette (for example "Meta+K") makes the probe open a command palette once per state and count its entries. The rules start at minor: a sweep pairing every gate and field fixture page with each disclosure and field-test trigger, at phone and desktop widths in both schemes, found no false positives; its reports were buttons whose width changes with a busy label and sections pushed by content opening above them (docs/field-test/state-jump.json). Recapture to pick this up. See rules.

Interface

  • MCP adds the experimental tool idiom_learn, and learn adds the options --import and --replay (additive). Interface version remains 1.
  • .idiom/learned.jsonl records gain an optional import field, written by learn --import; older Idiom versions stop at those records in learn --list, --covered and --fixture (see stability). learn --list --json adds importName with --import; new experimental JSON surfaces learn import and learn replay. Interface version remains 1.
  • Capture observations add optional underfilledFrames and browserDefaultLegends (additive; both experimental). browser-default-style coverage can now be ran with a reason when only its link half was skipped. Interface version remains 1.
  • coverage --states --json adds surfaces per flow, and capture observations add optional interactiveSurfaces (additive; both experimental). Interface version remains 1.
  • .idiom/learned.jsonl records gain optional candidate and placement fields and a new observation kind; learn --list --json statuses gain coverage and state. Older Idiom versions skip observation records, but stop at a known-kind record carrying the new fields in learn --list, --covered and --fixture (see stability). The learn --list text labels a run or rule mark as covered by rule … and a path mark as covered by fixture …. Interface version remains 1.
  • check --gate --json is promoted from experimental to stable-additive for its skipped, plan-only and ran forms; gate.plan's contents, gate.comparisons and gate.timing stay experimental. Interface version remains 1.
  • check --changed --json is promoted from experimental to stable-additive; each file's importChains and uncertainties, and selection.graph, stay experimental. Interface version remains 1.
  • The idiom_quick, idiom_check and idiom_issue outputs are promoted from experimental to stable-additive for the fields named in stability: the shared finding detail, the ranked issue, counts, report paths and, for idiom_check, the changed selection. idiom_quick's captureFailures stays experimental. Their advertised outputSchemas now type those promised nested fields exactly. Interface version remains 1.
  • The idiom_verify output is promoted from experimental to stable-additive for its verdict (outcome, passed, regressionFree, success) and its per-finding verdicts[] and introduced newFindings[]; outcome is now declared as its three values. Interface version remains 1.
  • The contract snapshot records each stable MCP output's promised fields instead of its whole advertised schema, so experimental fields stay free to change.
  • idiom_quick output adds optional captureFailures (additive; the output stays experimental). CLI quick exits 1 when no capture succeeded (it printed a 0-finding success before). Interface version remains 1.
  • brief list --json prints an object { interfaceVersion, briefs } instead of a bare array. Its old shape is deprecated: brief list --json --array (a new option) prints it until 0.24.0, with a warning on stderr. Runtime deprecation warnings go to stderr only, once per process per surface, and IDIOM_NO_DEPRECATION_WARNINGS silences them. Interface version remains 1 because the payload was experimental.
  • upgrade --json adds projectFiles (additive; the upgrade payload stays experimental). Interface version remains 1.
  • MCP tool outputs declare outputSchemas; every successful result's structuredContent starts with interfaceVersion. idiom_doctor's output is promoted from experimental to stable-additive (it mirrors doctor --json); the other outputs stay experimental with reasons in stability. Interface version remains 1.