AI latency is a design material, not an engineering constant. This playbook writes the annotated behavior spec engineering actually needs: what streams versus appears complete, whether "thinking" is visible, skeletons versus token streams, what collapses by default, and where the stop button lives — decided per surface, on purpose.
Workflow area: AX Patterns · Tier: Advanced · Hands-on time: ~40 minutes
Static mockups can't answer the questions AI features raise: does the answer stream token-by-token or land whole? Does the user watch the reasoning or a spinner? Can they stop generation, and what remains if they do? Left unspecced, these become engineering defaults — usually "stream everything, always" — and the product feels frantic where it should feel considered. Perceived performance research is clear: a stream that starts instantly feels faster than a faster response that arrives complete, but streaming the wrong content (tables, code, prices) forces users to read a document that's still moving. This playbook makes each call explicit and hands engineering a spec instead of a shrug.
Inventory response types, not screens. List every distinct thing the surface returns: short prose, long prose, structured data, code, action proposals, mixed documents. Each type gets its own row in the spec — streaming is decided per type, never globally.
Decide stream vs. appear-complete per type. The rule of thumb: stream content users read linearly (prose, explanations) — it starts fast and reads naturally. Appear complete content users scan or verify (tables, prices, code diffs, anything with a total) — a number that might still change is a number users can't trust. Skeleton first, then complete for structured layouts, so the shape arrives before the data. Write down the decision and the reason for each row.
Spec thinking visibility in three tiers. Decide what the wait shows: silent (spinner or skeleton — right when reasoning adds nothing), status verbs ("Searching your docs… Comparing versions…" — right for multi-step tool use, because it sets accurate expectations of duration and source), or full reasoning stream (collapsed by default, expandable — right when experts audit the answer). Status verbs must be honest: a fake "Thinking deeply…" while a queue waits is trust spent on theater.
Generate the annotated spec with AI, then correct it.
You are writing a front-end behavior spec for an AI feature.
Response types and my decisions:
[PASTE TABLE: type → stream/complete/skeleton → thinking tier]
For each type, produce a spec block with:
- TRIGGER: what the user did
- T+0ms: what renders immediately (be exact: skeleton shape,
status verb, disabled states)
- DURING: streaming granularity (token/word/block), scroll
behavior (pin to bottom? user-scroll cancels pinning?),
what is interactive vs. locked
- STOP: stop-button placement, and EXACTLY what remains after
stop (partial kept + labeled? discarded?)
- COLLAPSE: what arrives collapsed (reasoning, sources, long
quotes) and the expand affordance
- FAILURE MID-STREAM: what the user sees if generation dies at 60%
Format as a table engineering can implement without asking me
anything. Mark ambiguities [DESIGNER DECISION].
Sample block worth stealing:
TYPE: long prose answer
T+0: status verb "Reading 3 sources…" within 200ms
DURING: word-level stream; auto-scroll pinned; any user scroll
unpins; input stays enabled for follow-up typing
STOP: persistent while streaming; on stop, partial output kept,
labeled "Stopped early", regenerate offered
FAILURE: partial kept + inline error "Generation failed partway —
retry from start or keep partial"
Motion-spec the two moments that sell quality. In Figma (with Figma Motion or prototype settings), spec the stream cadence — a slight ease on block arrival reads as composed; raw token jitter reads as nervous — and the complete transition: how the response settles (sources slide in, actions fade up) when generation ends. These two animations are most of "feels polished" for AI surfaces.
Walk the spec against a slow day. Re-read every row assuming 5x normal latency. Does the status verb still make sense after 20 seconds? Is there a "still working" escalation? A spec that only works at demo speed is a demo, not a spec.
Streaming is rhetoric — what you stream, what you hold back, and what you show during the wait all tell users how much to trust what's arriving; spec those decisions per response type or inherit them from whoever writes the front end.