---
description: Exxat DS — any surface where Leo (AI) creates data or components uses the shared Leo generation lifecycle (inited, thinking, completed), Stop, and parent/child. No bespoke Leo loading UI.
activation: model_decision
---

<!-- Synced from .agents/rules/exxat-leo-generation.mdc - run npx exxat-ui sync-extras after Cursor rule edits -->

# Exxat DS — Leo generation

## MUST

1. **Use the shared lifecycle** `inited → thinking → completed` (`LeoGenerationState`) for every Leo-created row, card, chart, form, or section. State comes from the real request; the UI never invents progress.
2. **Wrap, don't rebuild.** Cards/charts/forms: `LeoGenerationSurface`. Sections holding other components: `LeoGenerationSection`. Tables: `DataTable leoLoading`. Do not hand-roll skeletons, shimmer, or blobs for Leo work.
3. **Offer Stop until completed.** An icon-only `Button` (`variant="ghost"`, `size="icon-xs"`, name **"Stop"**, tooltip via `Tip`) via `onStop` / `LeoStopButton`. Stop discards the undelivered result (WCAG 2.2.2).
4. **Completed is a brand check with "Leo is done"**, then the placeholder is removed and the real data renders in its place with the same shape (same column count, same `splitCount`) so layout does not jump.
5. **Parent and child.** A section is the parent, its table/chart the child. The section shows Leo working; children keep their content visible and show their own per-item progress. Parent state is **derived** from children (`useLeoGenerationGroup`). Stop on the parent stops all undelivered children; Stop on a child stops only it.
6. **Single brand colour.** `LeoBrandBackdrop` only (blobs + dots in `--brand`). No multi-hue Leo ambience on generation placeholders.
7. **Announce once.** One `<output>` status per row/surface; decorative layers (`LeoBrandBackdrop`, skeleton bars, icons) are `aria-hidden`; `aria-busy` while inited/thinking.
8. **Reduced motion.** Blob drift, dot motion, pulse, and shimmer are suppressed under `prefers-reduced-motion`; states stay readable through the label and icon.
9. **Catalog parity.** A new consumer adds an example to `/design-os/design-system/leo-generation` (or the component's own page) in all three states.

## MUST NOT

- Show a Leo placeholder with no Stop.
- Reuse `Skeleton` or a spinner for Leo work. `Skeleton` is for ordinary fetching.
- Put Leo state in the table component. Tables receive rows; the consumer owns the lifecycle.
- Nest Leo rows inside a table as parent and child. The **section** is the parent; every row in the table is a flat peer (no parent row, no indented child rows, no connector arrows).
- Add a fourth state. Stopped is an action (state returns to `null`, `stopped` flag), not a state.
- Auto-remove the completed check before it has been seen (hold ≥ ~0.9s).

## Verify

- `/design-os/design-system/leo-generation`: play each state, stop the parent, stop one child.
- Reduced motion on: no drift, no pulse.
