A rule, as a rule, is only useful if a reader can see what it permits, what it forbids and what enforces it. Where the model stops explains why we draw the lines where we do. This companion sets out the lines themselves: who decides each part of a screen, how figures reach it, and what contains anything a model writes.
Two commitments run through all of it. The model never types a figure a user will rely on, and nothing a model writes can act on its own.
1. Who decides what
Every part of a generated screen has one owner, and the owner gets less freedom the more a mistake would cost.
| Decision | Who makes it | What bounds it |
|---|---|---|
| Which cards appear in an answer | the model | the closed card catalog |
| Where each card sits in the prose | the model | an embed tag; cards it doesn't place fall to a grid below the answer |
| The figures inside a card, table or chart | the system of record | tool output, computed by code |
| Which cards a page can show | the client | the client sends the list with every run |
| The layout of a whole desk | the model drafts it, a person accepts it | the frontend validates the draft before anything is saved |
| How a model-written HTML report looks | the model | an opaque-origin sandbox with no network |
| What a button does | the server | the model can name an action; the server assigns what it does |
2. Figures
The model never types a figure a user will rely on. It chooses where figures go, and code puts them there.
| Where a figure appears | How it gets there |
|---|---|
| A card | a deterministic projection of tool output |
| A table in an answer | embedded by reference to the source document, <table id="…" index="0"/>, never retyped |
| A custom card | a saved script computes it on every load, with no model in the loop |
| A chart | the chart must cite source documents fetched in the same run, or it is refused |
| A report's source list | built by code from the real document records, never written by the model |
The exception is a "record" card, such as a trade ticket or a thesis, whose fields the model fills, like a form. Those fields are typed, carry source ids and are drawn by typed components. Prose claims carry citations (section 5).
3. Closed vocabularies
Wherever the model names something the UI will act on, it chooses from a closed list with one source of truth.
| Vocabulary | Examples | Held together by |
|---|---|---|
| Inline embed tags in an answer | <cite>, <chart/>, <table/>, <artifact/> | one parser pattern on each side |
| Card kinds | stock performance, options positioning, a volatility surface | a backend registry, checked in the client build (section 8) |
| Custom-card blocks | table, stats, feed, tabs, picker | an exported list that the save gate, the client parser and the model's instructions are all tested against |
| Control parameters | ticker, date_range, watchlist, option_legs | one enum, mirrored by type |
An unknown name is never guessed at. It is dropped, demoted to text or shown as an unrenderable card (section 11).
4. The client owns the catalog
On dashboard pages, the client tells the backend which cards it may produce, on every run.
The list comes from the deployment, the organization's data entitlements, feature flags and the user's chosen persona. The backend keeps it in state and never puts it in prompt text, so it limits what the model may emit without relying on the model to respect it. The frontend validates again before anything is drawn or saved.
Permission to the data itself is checked on the server, in three places:
| Check | Where it runs |
|---|---|
| Who the user is | the server verifies the signed token when the connection opens and builds the user's identity from it; no field in a request can change it |
| A user's own data, such as a portfolio | the tool takes the user from that identity, and the query matches only rows that user owns |
| Restricted datasets and tools | the tool checks the organization's access before it reads, and refuses if the check fails or errors |
A deployment can also install a gate that checks every tool against the organization's entitlement records, fetched on the server when the token is validated.
5. Citations
Claims in an answer cite the documents the run retrieved, and nothing else counts as a citation.
| Step | Rule |
|---|---|
| Writing | the model cites with a claim tag; the platform converts each one to a canonical citation, in answers and in report files alike |
| Showing | a document has two audiences. Its title and content are shown verbatim in the audit panel and fed to the model, so nothing internal may be written into them. Guidance meant only for the model goes in a separate field the panel never shows |
| Reconciling | a citation to a document the run didn't retrieve is shown as plain text |
| Auditing | a citation opens a chain from the claim back through derived documents to the raw source |
6. Containment of what the model writes
Model-written content is contained by where it renders. We don't rely on inspecting what it says.
| Content | Where it renders | What it cannot do |
|---|---|---|
| Markdown answers | a renderer with no raw-HTML support | run HTML; fetch an image (images render as their alt text); open a link without a confirmation that shows the full URL |
| Custom-card markup | parsed as XML into the closed block list, drawn by our own components | run script; make a request before the user clicks |
| HTML reports | an iframe with sandbox="allow-scripts" and never allow-same-origin, served from a route whose CSP has no connect-src | read cookies or storage, touch the page around it, or reach the network |
| Code the model runs | a sandbox with no network | send data anywhere |
The HTML frame loads a static shell route and receives the report as a single string message, so the HTML never round-trips through a backend. We use a route rather than srcdoc because an srcdoc frame would inherit the application's nonce-based content policy, and a report's own scripts could never run. Writing the HTML into the page would give model markup our origin and our session. A route lets the frame carry its own policy: inline scripts, one charting CDN and Google Fonts, no connect-src, and form-action 'none'.
7. Actions
Generated UI may propose an action. It may never define one.
A custom card's action gets its id from the server when the card is saved. The client dispatches it by id, behind a confirmation. There are no client-side expressions, so model markup has no path to
unsafe-eval.A change to a portfolio, watchlist, account or desk arrives as a proposal card. The client commits it with its own request when the user accepts. The backend has no write path for these.
Sharing, revising a shared card, saving it into a shared pulse, creating a team-wide pulse and any connector action that changes something on another service run only when the person's own message asks for it.
Return and post-login URLs pass one same-origin check. The media proxy needs a session, fetches only public addresses, checks every redirect hop and never forwards credentials.
8. The wire contract
Backend and client agree on every payload, and the build fails when they don't.
| Rule | How it holds |
|---|---|
| One registry of card kinds | the backend lists every kind it can emit |
| No silent schema drift | exported schemas are checked in CI; a shape change without a re-export fails the build |
| The client can draw everything the backend sends | every chat card kind the backend registers must be drawable by the client, or the client build fails |
| New payloads don't break old clients | generative payloads ride as additive keys on the state frame; a client that doesn't know a key renders nothing for it |
| Runtime checks never break the screen | both sides validate a copy after the write and report anything off-contract, once per run per kind |
| Every run ends | every stream ends in a "done" frame or an error, enforced on both sides |
Generative payloads ride as additive keys because a new top-level message type would be dropped by every client until a coordinated frontend release. Cards, output files, plan and decision frames and narration all travel as keys inside the state frame. A client that doesn't know a key yet renders nothing for it, so the backend can ship a new kind of payload without breaking anyone, and the client build check above makes sure the frontend catches up before the payload matters.
9. Charts
A chart is an ECharts configuration that the backend treats as opaque, behind arithmetic gates only.
| Rule | Why |
|---|---|
| The option is passed through, never re-typed | re-typing it would limit charts to the types the backend happens to model |
| The only gates are arithmetic: the option is non-empty, has a series or a dataset, and its source ids ground in this run's documents | density or style checks would reimplement ECharts, and every false positive refuses a chart that would have rendered |
| The payload carries its own format discriminator; one without it is legacy and passes through byte for byte | every saved run holds legacy charts, and they must render forever |
| A chart the model draws in its own sandbox is never shown | it is context for the model; only a validated chart payload reaches the screen |
10. Streaming
Nothing half-finished is shown as if it were finished.
| What streams | Rule |
|---|---|
| Report files | stream from the tool-call arguments as the model types them, before the tool runs, and are reconciled with the written file afterward. The client reads the argument deltas and never parses a partial buffer as JSON |
| HTML reports | paint only once the file is confirmed, so a half-written layout never shows |
| Embed tags in an answer | a trailing partial chart, citation, table or card tag is cut on every render; unresolved citations bind when the final state frame arrives |
| Custom cards | the data paints first; the narrative shows a skeleton until it arrives |
| Briefs, charts and documents | three states: undefined is a skeleton, a value is content, and null is an em-dash. A settled-empty field never spins. |
11. Fallbacks
Every layer has a defined behavior for what it doesn't recognize, and every fallback is reported.
| Situation | Behavior |
|---|---|
| A card kind the client can't draw | an "unrenderable" panel, never a blank space |
| A card with no data | a degraded empty state |
| A citation that doesn't resolve | demoted to plain text |
| An embed tag the renderer doesn't know | unwrapped, so its text shows and nothing executes |
12. How the rules are checked
Each rule is tested where it lives.
| Layer | Check |
|---|---|
| What the model decides | decision evals on the agent backend: which cards it selects, where it anchors them, whether injected instructions take effect. No LLM judges content, and "not measured" never counts as a pass |
| How cards render | a Playwright harness renders every card kind at a 400px floor and checks seven properties of each |
| How the client honors the contract | unit tests in CI on every pull request; a known failure is marked expected to fail, so the marker turns red the moment it's fixed |
| How it all fits together | finished conversations are replayed through the real page, with no model and no backend, to check that every card draws and no raw tag leaks |