Nine moves
The basic ways a person and an agent work together, all on the same interface, and what each needs from CoUI.
Every move is drawn with one rule: what you do is solid yellow-orange; what the agent writes is violet, dotted while it waits underneath; everything shared is grey.
Each move is tagged by how far it is from the core: Core uses only the core API; System 1 needs the choices patterns (a few options, each with its probability); Stretch is an open question or a next step.
The moves
| # | Move | Tier | API | Layer on top |
|---|---|---|---|---|
| 01 | Point & say | Core | useCoRef, pointing | A reference chip in the input |
| 02 | Drag & drop | Core | useCoRef, pointing | A drop target in the input |
| 03 | Type & highlight | System 1 | useCoRef, the point tool | None: style data-co-pointed |
| 04 | Select & ask | Core | useCoRef, pointing | An inline prompt by the selection |
| 05 | Propose & review | Core | layers.approval, approvals, useCoUI().approvals | None: the app draws approve and reject |
| 06 | Watch & take over | Stretch | Layers: the person's write goes on top; layers.release() hands back | An agent cursor |
| 07 | Generate in place | Stretch | useCoState holding a constrained UI spec | <CoSlot>, rendering the spec from a catalog |
| 08 | Undo by author | Core | history.undo('agent') | None |
| 09 | Point back | Core | The point tool, pointing.agent | None: style data-co-pointed~='agent' |
01 and 09 are two directions of one state: the person writes pointing.human with the cursor, the agent writes pointing.agent with the point tool, and both read the same thing.
The layers on top go in a separate package (provisionally @coui-ai/elements), not the core. They read only public data, so an app can replace them all.
Use cases
| Use case | Tier | Scene | Moves |
|---|---|---|---|
| Shopping | Core | Point at a pair of shoes and ask for something cheaper; the agent filters to ≤ $80 and writes a comparison into the page. Adding to the cart waits for you. | 01 · 07 · 05 |
| Dashboard | Core | Point at a dip and ask why; the answer is a new chart. The date filter is one CoState both write. | 01 · 07 · 05 |
| Calendar | Core, System 1 | The agent draws free slots, and points at one to object; pick one, or drag the meeting yourself. | 05 · 09 · 02 |
| Inbox | Core | “I’m off this week”: the mails on screen are sorted again; the one you sorted stays. One key a mail. | 08 |
| Photo retouch | Core | “Like dusk, warmer” moves eleven sliders as one undo group; the one you set by hand keeps your value. | 08 |
| Docs | System 1 | Drag a sentence along a few ways to say it; dragging previews, letting go decides. | 03 |
| Design canvas | System 1, Stretch | Align two cards; the new positions show dotted. Three generated directions to drag in. | 04 · 05 · 02 |
| Agentic IDE | Stretch | Point at a broken button; the agent proposes the fix as a diff. Code is long text: a next step. | 01 · 05 · 06 |