Skip to main content

Completed GenUI Registry Contract

Purpose

This contract defines the safe component vocabulary an AI workflow may use when generating UI. The model can propose components, but deterministic code validates the schema and the frontend renders only approved components.

Registry rules

  • Components are versioned.
  • Required accessibility props are enforced by schema.
  • Raw HTML and arbitrary script/style props are forbidden.
  • Components must have deterministic loading, error, and empty states.
  • Components must log render success, validation failure, and fallback reason.
  • New components require design-system and security review.

Component registry

ComponentVersionPurposeRequired propsRisk class
PolicyAnswerCard1.0Show cited policy answertitle, summary, citations, confidencelow
ComparisonTable1.0Compare optionscaption, columns, rowsmedium
ApprovalPanel1.0Human approval for tool actionactionName, riskSummary, preview, confirmLabelhigh
TaskChecklist1.0Show workflow progressitems, currentStep, statuslow
SourceDrawer1.0Inspect retrieval sourcessources, selectedSourceIdmedium

Example schema shape

{
"type": "PolicyAnswerCard",
"version": "1.0",
"props": {
"title": "Refund eligibility",
"summary": "The customer may qualify for a partial refund if the request is within the policy window.",
"confidence": "medium",
"citations": [
{
"sourceId": "policy-refunds-2026",
"title": "Refund Policy",
"section": "Partial refunds",
"url": "/sources/policy-refunds-2026"
}
]
}
}

Validation requirements

RuleFailure behavior
Unknown component typeRender fallback card and log unknown_component.
Unsupported versionRender fallback and log unsupported_version.
Missing required propRender fallback and log schema error.
Citation required but missingRender "answer needs review" state.
Row count exceeds limitTruncate with disclosure or reject based on component policy.
Unsafe text payloadEscape as text; never render as raw HTML.

Accessibility contract

ComponentAccessibility requirement
PolicyAnswerCardheading level provided by renderer context; citations are keyboard reachable.
ComparisonTablecaption required; column headers required; row count constrained.
ApprovalPanelfocus moves to panel on risk escalation; destructive confirmation is explicit.
TaskChecklistcurrent step and completion state are announced.
SourceDrawerfocus trap, escape close, return focus to opener.

Observability contract

Every generated component render emits:

  • conversation id
  • workflow id
  • component type
  • schema version
  • validation result
  • fallback reason if any
  • render latency
  • user correction or dismissal if any

Release gate

A registry change can ship only when:

  • schema fixtures pass
  • accessibility contract is reviewed
  • fallback behavior is tested
  • eval suite includes at least three valid and three invalid examples
  • telemetry fields are documented

Source lens

Use this contract with Part XIII generative UI architecture, React GenUI implementation patterns, completed GenUI launch review, and the GenUI capstone solution pack.