Skip to content

v1.10.0 — Design gate integrity

Choose a tag to compare

@vicmaster vicmaster released this 27 Jul 15:57
· 316 commits to master since this release
318aec2

Phase 23 — Design gate integrity. Teams use framesmith canvases as a design gate: a screen may only be built when an approved canvas describes it. One downstream session proved the gate couldn't keep its own promise — canvases silently drifted from the shipped views (a radio group that was never built; a STATUS column that no longer existed), and approvals referenced canvases by name, a point-in-time judgment recorded as a permanent, unversioned fact. v1.10 makes "approved" falsifiable.

All from issues #148–#152, filed by an agent working under a real design-first gate.

Design gate integrity

canvas_version — approvals bind to a hash, not a name (#149, PR #157)

A stable content hash (sha256:<16 hex>) of the design itself — node tree, canvas tokens, components, fonts. Metadata never moves it: feedback arriving or resolving, critique stamps, and provenance changes all leave the hash unchanged, so an approval survives everything except an actual design change. Record { canvasId, versionHash } wherever your approvals live; check later with expectedHash → matches: true/false. Every canvas_list row and export result carries the same hash.

canvas_check_drift — structural drift in words (#148, PR #158)

Where canvas_sync_from_url answers how much does it look different (pixel %), this answers what diverged: re-imports the live page ephemerally and compares text runs, controls, and table shapes — never styles. Findings: missing-in-page, missing-in-canvas, control-mismatch ("the canvas has a radio group (3 options); the page has a select"), table-mismatch. Mostly-numeric text is treated as data, so live figures don't false-flag; both incidents that motivated the issue reproduce as automated findings in the test suite.

CLI: gate checks runnable from CI (#148/#149, PR #159)

npx framesmith verify <canvasIdOrName> --hash sha256:...     # exit 0 match / 1 mismatch / 2 error — Chrome-free
npx framesmith check-drift <canvasIdOrName> --url <url>      # exit 0 in-sync / 1 drift / 2 error

Flags: --project-dir (point at the CI checkout), --json, and for check-drift --viewport WxH / --selector / --wait-for. Ambiguous canvas names are an error — a gate must never check the wrong canvas. npx framesmith with no arguments is still the MCP server.

The workflow, on every agent surface (PR #160)

Connect-time instructions, init gotchas, and the guidelines now teach the ritual: picking up a canvas that describes a shipped view starts with a drift check, and findings are reconciled deliberately — update the canvas, fix the implementation, or flag the difference. Never silently annotate it away.

Hygiene fixes (same session's issues)

  • Stale evaluation cache (#150, PR #154) — the viewer's quality score and live-reload are keyed by a content hash of what evaluation actually reads, not lastModified; a hand-edited repo canvas can no longer serve a stale score that makes a correct fix look broken.
  • Silent shadow no-op (#151, PR #153) — writing shadow on a node that has shadows (the plural always wins at render time) now returns a warning on the op result in batch_design and replace_matching_properties, instead of failing silently.
  • Genre transparency (#152, PR #155) — canvas_evaluate (and canvas_autofix) report genre: { active, source, relaxed, notRelaxed }. notRelaxed lists tells a different genre would relax — the tradeoff surfaces at decision time. Rule of thumb now documented everywhere: genre follows what the screen is for (read screens with published figures → dashboard; editors/admin forms → material).

Upgrade notes

  • No breaking changes. New result fields are additive (versionHash on canvas_list rows and export results; genre on evaluate/autofix results; warning on batch_design op results).
  • Restart the npx framesmith MCP server to pick up the new tools.
  • The framesmith bin now intercepts the exact subcommands check-drift, verify, and help; all other invocations boot the MCP server unchanged.

Full changelog: v1.9.0...v1.10.0