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,commandforinvokers) and WebMCP JSON tool descriptors from one declarativeACTION_DEFINITIONSobject 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.
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) fromreactive-goal-uicompile intoACTION_DEFINITIONSschemas? - Can native
<form>validation +ElementInternalsserve as the authoritative runtime schema read bynavigator.modelContext?
Iteration log
- — Built split Human DOM vs. Headless WebMCP workbench with FNV-1a state-hash parity and published full verbatim
ACTION_DEFINITIONSsource 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-cacheand 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.