Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Read these when the trigger applies; they are not loaded by default.
- **Coding-agent Threads (yui-notify plugin)** → `coding-agents/yui-notify/README.md`
- **Checking how a rule is enforced** → `docs/agent-guide/harness-enforcement.md`
- **Build / run / find logs** → `docs/agent-guide/build-run.md`
- **Any UI or visual work** → `docs/agent-guide/design-context.md` (+ `PRODUCT.md`, `DESIGN.md`)
- **Any UI or visual work** → `docs/agent-guide/design-context.md` (+ `PRODUCT.md`, `DESIGN.md`, and the file under `docs/agent-guide/design/` for each component the change touches)
- **`generate_express` Express cue contract, or the `client_context` prompt-text format sent to the backend** → `docs/reference/client-context.md`
- **Adding or changing a tool the client exposes to the backend, or checking what each chat transport carries** → `docs/reference/client-tools.md`, `docs/reference/push-transport.md`
- **`POST /signals` envelope, buffering, and delivery rules, and the `/presets/<id>/` routes** → `docs/reference/signals-ingress.md`
Expand Down
10 changes: 8 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ repositories** and optional — see
- **UI: storyboard → review existing → propose → mock → implement.** Storyboard
how the user uses the change in the issue, one frame per step of each journey
it touches ([`design-context.md`](docs/agent-guide/design-context.md)). Read the existing
`src/ui/` screens plus [`DESIGN.md`](DESIGN.md) and [`PRODUCT.md`](PRODUCT.md)
before any UI work; propose the text structure, get confirmation, build a
`src/ui/` screens plus [`DESIGN.md`](DESIGN.md), the file under
[`docs/agent-guide/design/`](docs/agent-guide/design/) for each component the change touches,
and [`PRODUCT.md`](PRODUCT.md) before any UI work; propose the text structure, get
confirmation, build a
standalone mock HTML in [`mocks/`](mocks/README.md), then implement.
- **Verify before asking.** Anything observable (UI rendering, DOM state, logs)
— verify it yourself and attach the proof to the PR's **Runtime evidence**
Expand Down Expand Up @@ -202,6 +204,10 @@ A review checks every diff against the rules above and against these traps:
- **One source for the contract.** Consumers compile against
`src/contract/types.ts`. `configs/motions.json` and
`docs/guide/motions.md` change together.
- **The architecture map states today.** `pnpm map:check` checks paths and
shape, not whether a sentence is still true: grep
`docs/agent-guide/architecture/map.js` for every file, symbol and page name
the diff moved, renamed or removed.

## Finding your way

Expand Down
183 changes: 80 additions & 103 deletions DESIGN.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/agent-guide/design-context.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# YUI — Design Context

Before any UI/visual work, read [`PRODUCT.md`](../../PRODUCT.md) + [`DESIGN.md`](../../DESIGN.md). The impeccable skill (`/impeccable`) uses these as its canonical source.
Before any UI/visual work, read [`PRODUCT.md`](../../PRODUCT.md) + [`DESIGN.md`](../../DESIGN.md), and the file under [`docs/agent-guide/design/`](design/) for each component the change touches. The impeccable skill (`/impeccable`) uses these as its canonical source.

> **Workflow (mandatory):** ① Storyboard how the user uses the change, in the issue: one frame per step of each journey it touches (what the user sees, what they do, what shows next), failure paths included; a one-step change is one frame, and a frame where the character moves or performs adds its beats (the real render, the duration, the hand-over to the next beat as a cut or a crossfade with its ms, and whether input works), ② Review existing UI surfaces (`src/ui/`, `DESIGN.md`, `PRODUCT.md`) to align style and patterns, ③ Propose the UI structure/layout to the user in text for confirmation, ④ Create a **standalone mock HTML** that plays the storyboard frame by frame at the windows' real sizes (the pet window 400×600) for visual approval, then ⑤ Proceed to implementation.

Expand Down
2 changes: 2 additions & 0 deletions docs/agent-guide/design/boot-failure-notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Boot-failure notice
A dismissible floating notice (`boot-error.css`) shown when config or VRM loading fails and the transparent window would otherwise stay blank. Plate, Text guidance, and a single Float shadow preserve the legible-on-anything doctrine; a Danger uppercase title names the failure, and a quiet dismiss button removes the notice.
26 changes: 26 additions & 0 deletions docs/agent-guide/design/character-menu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Character menu
A right-click on the character opens the Character menu around her. The menu draws in its own window, the Character menu window, beside her, and the pet window never changes size for it. It is built without React, as the pet window is. Left click stays the tap gesture, and there is no long-press. Esc, a click outside the menu, a click in another app, or a closing action closes it. It never times out.

Two pill columns flank her, 88px from her centre, under one shared top. Talk, Rest, Listen and Settings sit on the right. Body, Voice, Pace and More sit on the left. Pills in a column share one width, and the gap between pills is 8px. Near a screen edge, the menu folds to one column on the open side.

The columns' top is set once when the menu opens, from the tallest list it can show, so swapping lists never moves the columns. It sits at her head, unless that would bring a column within 8px of the window bottom or the work-area bottom, whichever is higher. Then both columns shift up together.

When the shifted columns would start less than 8px below her window's top, the menu window also reaches above hers. The menu window is hidden when the menu closes. Body ›, Voice ›, Pace › and More › replace their column in place with their list and a "‹ Back" row. A second level never opens as a column outward.

Each pill is a line glyph and a label of one or two words. Pills follow an 8px grid: 36px tall, with an 18px icon and a 13px label at weight 600. The accessible name is the glossary term, so Rest is named "Do-not-disturb".

The top level holds Talk, Rest ›, Listen, Body ›, Voice ›, Pace ›, Settings and More ›. More holds Threads with its waiting count, Keep bubble, Unified chat, Terminal, Reset chat and Turn off. An item that cannot act in a window is hidden: Listen shows in the main window only, and Turn off shows only in a bound pet window. The Threads chip on the character opens Threads while something waits.

Rest › replaces the right column with its list, and a "‹ Back" row returns to the top level. While a Rest or Focus runs, the list opens with a status row, such as "Resting until 08:00" or "Focus · 18 min left", then End now. The running choice is not listed again.

The choices follow: For 1 hour, Until tonight, Until tomorrow morning, Until I turn it off, a divider, then Focus 25 min and Focus 50 min. Until tonight is not offered from 00:00 to 07:59. No row shows an end time: the Rest pill does, as "Rest · 08:00" or "Focus · 18 min", and "Quiet · 12:00" in a quiet span.

Body › lists her bodies, and Voice › lists the voices, at most five each with the current one always among them, so no list column exceeds seven rows. Each list marks the current choice with a check and ends with a "More…" that opens that settings page. Pace › sets the base pace, which GLOSSARY.md defines: Less, Normal or More. A pick applies at once. The menu then returns to the top level and stays open. Toggles inside More keep More open. Talk, Settings, a trailing "More…", Threads, Terminal and a confirmed Turn off close the menu.

Reset chat and Turn off morph in place into "Sure?" and "Cancel", with focus on Cancel.

Focus goes to the first pill when the menu opens, and focus stays inside the menu while it is open. Arrows, Tab and Shift+Tab move in reading order, and Home and End also work. Enter or Space picks. In a second level, ← or Esc goes back, and Esc at the top level closes the menu. Keys act at once, with no motion. The menu adds no global shortcut.

The plate is opaque, with a hairline edge and one Float shadow, and it has no glass. Amber marks ON states and focus only. Both columns enter together from her chest, scaling up from 0.92 as they fade in over 200ms, with no stagger, and her name only fades in. A click outside it or in another app sends everything back toward her chest at once in 140ms, and the window restores after. A right-click on her during that exit takes it back. Esc and a closing pick close it at once.

A list swap by the mouse crossfades. The old column fades out in 140ms, moving 8px away, while the new one fades in over 200ms, moving 8px in: from the right for a list, from the left for Back or a pick that returns to the top level. Under reduced motion the menu only fades, at the same durations. In the transparent pet window, the pills take pointer input, but not those of an old column or of a menu in its exit, and the area around them passes clicks through.
2 changes: 2 additions & 0 deletions docs/agent-guide/design/chip-column.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Chip column
The strip at the avatar's upper right (`surfaces/surfaces.css`) holds, top to bottom, the urgent signal chips, the batched signal row, the Threads chip and the delegation chip. While the speech bubble, or the shown Ask card or Settings request card, shows, the column slides up over 200ms until its last row ends 8px above that surface's top edge, its top no closer than 8px to the window's top. The rows that still do not fit hide from the bottom up, never an urgent chip, into one "+N" row in the signal pill's look that counts what they hold and takes no clicks; they return once the surface is gone. When the urgent chips leave no room above the surface for the "+N" row, every other row hides and no "+N" row shows. While the Character menu is open, the column fades out over 140ms, takes no clicks, and fades back once the menu has gone. When the column's own width, inside its left padding, is under 9rem (a pet window under 400px), every chip shows only its dot and its count: a signal pill its dot, the grouped batched row its batched total, the Threads chip its count badge and the delegation chip its dot then its count in a signal-pill-tall pill, while the "+N" row keeps its "+N", an open batched list keeps its Collapse pill as a minus, and a tap opens each chip as at full width. The grouped row's accessible name always ends with how many more it holds. Under reduced motion the column moves at once.
2 changes: 2 additions & 0 deletions docs/agent-guide/design/delegation-list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Delegation list
The backend's delegated work as rows (`chips/delegation-rows.css`), shared by the chip's popover beside the avatar and the Session section of the settings panel's History page. Each row is a dot, an ellipsized title and a tabular-nums time: the dot is Amber while the work runs, Ok once it finished, Danger when it failed and Text mute when the outcome cannot be verified; the time reads the elapsed minutes while running and "Done · 4m ago", "Failed · 4m ago" or "Outcome unverified · 4m ago" after. The character window's popover pins its right edge 8px inside the window's right edge, so the full list stays inside the window at any window width. In the Session section the rows list the client's persisted history as a stacked row of the section's group under the context readout, and a finished row that carries a summary is a chevron disclosure (`aria-expanded`) opening the worker's summary and "Took 12m" underneath; the popover's rows never open.
4 changes: 4 additions & 0 deletions docs/agent-guide/design/faces-and-the-photo-dialog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Faces and the photo dialog
A preset's face is a circle: its photo, else a dot in a hue taken from its id. A photo shows the square its crop stores, with the preset's hue behind any transparent pixels; a photo with no crop shows centred. One renderer draws every face, at 36px in the Card section, 28px in the character header and the Characters list, 20px on the name plate, and 14px to 22px in the unified chat window.

The photo dialog (`photo-dialog.css`) is a modal on the settings window: Panel background, a Hairline edge, the window's corner radius and one Float shadow, over a backdrop in the crop shade. The title, "Photo for name", sits at the title size (600) with a Text-mute caption hint on its baseline. On the left, a 360px stage on the crop stage colour holds the photo under a 300px circle: a 2px ring in the crop ring colour, the rest of the stage under the crop shade. A drag moves the photo, and the circle always stays covered. Under the stage sit a Zoom slider (1× to 7×, its value in tabular figures) and three pills: Fit the face, Whole photo, and Choose another…. On the right, "Where it shows" lists live previews at 36, 28, 22 and 20px with the place each size appears, in Text dim at the sub size. The foot carries Cancel and Use photo, both pills; Use photo is in Amber ink on an Amber-soft edge. A photo that cannot be read shows a Danger line and disables Use photo. Escape closes the dialog only.
4 changes: 4 additions & 0 deletions docs/agent-guide/design/message-window.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Message window
A separate always-on-top window (`message-window.css`) holding the speech bubble and the text input when the surfaces are popped out of the character window. 340px wide, anchored by its top-left corner and grown downward by its content: a name-plate handle, then the bubble, then the input. The plate is the bubble's name plate, here also the window's drag handle, with a hover-revealed dock button (arrows-in icon) that docks the surfaces back into the character window. The dot reads four states: idle — Text mute and dim, no label; waiting, an Ask or Settings request card showing — a "Waiting for you" label and the dot holding still in Text dim; thinking, a turn running with no speech streaming — a "Thinking" label on the plate, the dot breathing Text dim, and the input border slowly swelling to Amber with an Amber-soft ring; responding, speech streaming — a "Responding" label, the dot pulsing Amber, and the bubble border slowly swelling to Amber-soft. Under reduced motion nothing animates and the borders hold steady. The bubble tucks up under the plate's row so the plate rides the box's top-left edge and floats with it, except while the delegation list or the backlog is open; the box is height-capped at twelve lines in this window and keeps the frost, the caret, the scroll cap and the dismiss button on its top edge that it wears in the character window. Docked mode is the character-window layout, whose pop-out button beside the dismiss button pops the surfaces back out. The status pill stays with the character in both modes; the delegation chip follows the surfaces, riding the plate's row as a separate pill to its right while popped out and leaving the character window bare. The plate's row holds the plate and the delegation chip only.

The backend's reasoning shows in the message window alone, as a disclosure under the quoted line at the top of the bubble's box: a Text-mute "Reasoning" summary at the sub size, weight 500, with a chevron that turns a quarter when open, over the text at the body size in Text dim behind a 2px Hairline-strong rule, clipped at six lines and scrolling, with a blinking text cursor while it streams. Its cursor gives way to the speech caret once the reply streams. The disclosure stays closed, also while the reasoning streams: the first reasoning of a turn shows the bubble with the summary even before any speech, holding off the previous reply's dwell until the reasoning ends, and a click on the summary opens it. It closes once the reply lands. When the reasoning ends with no speech streaming or waiting on playback, the bubble takes the usual dwell (or the keep-until-dismissed hold), and hides at once when nothing is left to show, as after a stop mid-reasoning. Only the start of a reasoning stream reveals the bubble, so a dismissed bubble stays down for the rest of that reasoning.
8 changes: 8 additions & 0 deletions docs/agent-guide/design/plugins-page.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Plugins page
The Plugins page (`quick-controls/plugins/plugins-page.css`) is two sections, **Installed plugins** then **Available plugins**, over the host's snapshot and the catalog. A section head carries its state text or link at the right at the sub size: **Check for updates** as a link button in Text dim, **Checking…** with its spinner in Text dim, or the result **Updates: n** / **All up to date** in Text mute; the catalog's note and the Installed section's "Tools declared to every character's backend: n" foot sit in Text mute at the sub size.

A plugin is one group. Its head is a row with the plugin id as the label, at 0.8125rem and weight 500, beside the source badge — a pill on a Hairline edge with a 0.7rem icon, caption size, weight 500, Text dim — and the version in Text mute at the caption size in tabular figures; the description follows as an ellipsized sub-line on the same row. The switch closes the row. Server lines below it are at least 2.5rem tall: a 7px status dot in Text mute, Ok with an Ok-soft halo when running, Danger with a Danger-faint halo when failed or exited, and at 55% opacity when off; a starting server shows the 7px spinner instead. The server name is body size at weight 500, its state at the sub size in Text mute with the state word in Text dim at 600, the reason in Text dim, and **Retry** or **Restart** as a link button. The hidden-name note is Text mute at the sub size, one line per kind and holder — "Hidden tool a, b: a built-in tool uses this name" or "…: holder uses this name first" — with each hidden name in Text dim at 600. The tools disclosure is a full-width chevron row in Text dim at the sub size and weight 500, its 0.875rem chevron turning a quarter when open, over a list indented 2.05rem: a tool or skill name at the body size and weight 500 over its summary at the sub size in Text mute, with a **Skills** caption in Text mute at weight 600. The log disclosure opens a grid under it: the tail as a scrolling block of at most 8.5rem on `--yui-field` at `--yui-radius-control`, caption size, line-height 1.5, Text dim and tabular figures, and a foot in Text mute at the caption size carrying "Last lines: n" and **Open log folder**. The action row that closes the group holds **Log** on the left, then **Update to v…** or the **Updating…** spinner or a local plugin's folder path in Text mute, and **Delete** or **Remove from list** pushed to the right. **Log**, **Update to v…**, and **Delete** / **Remove from list** are link buttons at the sub size; the **Updating…** spinner and the folder path are plain text.

The consent panel opens inside the plugin's group, under its switch row, on the hover fill with 0.875rem padding (0.75rem at the foot). Its step line is two 3px bars on `--yui-track`, the reached one Text dim, with "1 / 2" at the caption size, weight 600, in tabular figures. The question is body size at weight 600. The facts are a two-column grid, 4.5rem of Text-mute labels at the sub size against Text values, holding the source badge with its review note and folder, the version, and the launch command on a `--yui-field` block at `--yui-radius-control`; a panel at most 30rem wide stacks the facts under their labels. A shield line in the Permissions page's shield icon and, for a community or local plugin, a warning line follow at the sub size in Text dim with 0.95rem icons, the community warning in Danger; **Cancel** and **Allow** close the panel as pills, **Allow** in Amber ink on an Amber-soft edge. Step 2 lists the declared tools and skills in the same list, with a Text-mute note that the backend decides whether to call a tool; a failed start shows the failed server lines and **Turn off** / **Keep on** instead.

Errors are inline lines on Danger faint at `--yui-radius-control`, sub size, with a 0.85rem warning icon and every word as sent, the plugin's and the host's alike; a **Retry** link at the right takes Danger and an underline. The catalog repeats the plugin row with an **Install** pill on its side or an **Installing…** spinner, and closes with an add row holding a plus and **Add from folder…**; while the catalog loads, two skeleton bars breathe on `--yui-hover` and `--yui-selected` under the loading status.
Loading
Loading