AI Focus

canonical multimodal ui

Whenever teams build a visual HTML form for humans and a separate JSON tool definition for an automated assistant, the two surfaces drift out of sync—enums, required fields, or validation rules change in one place and silently break in the other. Generating both the human DOM controls and the machine-callable schema from one shared reducer guarantees identical validation and state transitions.

Hypothesis

Generating semantic HTML forms (FormData, ARIA, commandfor invokers) and WebMCP JSON tool descriptors from one declarative ACTION_DEFINITIONS object eliminates drift between human UI and machine tool execution.

What confirms it: Dispatching an identical action through the HTML form UI or the headless WebMCP console executes the same shared reducer and produces byte-identical FNV-1a state hashes.

What falsifies or bounds it: Rich multi-field validation, conditional sub-fields, or visual grouping constraints force UI-only overrides that break single-schema generation.

Single declarative action schema generating both keyboard-accessible HTML/FormData controls and WebMCP JSON tool descriptors backed by one shared FNV-1a hashed reducer. Open canonical multimodal ui full screen ↗

What this lab tests

Canonical Multimodal UI (GitHub) generates both semantic ARIA/FormData HTML controls (with Invoker commandfor actions) and WebMCP JSON tool schemas from one declarative schema backed by an FNV-1a hashed reducer to eliminate UI/API drift.

Open questions

  • How cleanly can conditional rules (if country != US show customs) from reactive-goal-ui compile into ACTION_DEFINITIONS schemas?
  • Can native <form> validation + ElementInternals serve as the authoritative runtime schema read by navigator.modelContext?

Iteration log

  • — Built split Human DOM vs. Headless WebMCP workbench with FNV-1a state-hash parity and published full verbatim ACTION_DEFINITIONS source at top of page.
  • — Reordered the dual-modality workbench above setup docs for 700px embeds, added CSP-safe DOM syntax highlighting across code and HTTP wire panes, added keyboard tab navigation, and routed static assets through the Worker with Cache-Control: no-cache and 15 passing tests.

Primitives tested: ARIA Accessibility Tree, JSON Schema, Invoker Commands, FormData, WebMCP.

This is an active lab under /labs/ and stays off the main RSS feed until graduated into a full essay.

More in post-<a> hypermedia & composable islands

Connected labs

← post-<a> hypermedia & composable islands · All labs