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
| Component | Version | Purpose | Required props | Risk class |
|---|---|---|---|---|
PolicyAnswerCard | 1.0 | Show cited policy answer | title, summary, citations, confidence | low |
ComparisonTable | 1.0 | Compare options | caption, columns, rows | medium |
ApprovalPanel | 1.0 | Human approval for tool action | actionName, riskSummary, preview, confirmLabel | high |
TaskChecklist | 1.0 | Show workflow progress | items, currentStep, status | low |
SourceDrawer | 1.0 | Inspect retrieval sources | sources, selectedSourceId | medium |
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
| Rule | Failure behavior |
|---|---|
| Unknown component type | Render fallback card and log unknown_component. |
| Unsupported version | Render fallback and log unsupported_version. |
| Missing required prop | Render fallback and log schema error. |
| Citation required but missing | Render "answer needs review" state. |
| Row count exceeds limit | Truncate with disclosure or reject based on component policy. |
| Unsafe text payload | Escape as text; never render as raw HTML. |
Accessibility contract
| Component | Accessibility requirement |
|---|---|
PolicyAnswerCard | heading level provided by renderer context; citations are keyboard reachable. |
ComparisonTable | caption required; column headers required; row count constrained. |
ApprovalPanel | focus moves to panel on risk escalation; destructive confirmation is explicit. |
TaskChecklist | current step and completion state are announced. |
SourceDrawer | focus 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.