@alis-build/design-system 0.39.0 → 0.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -57,7 +57,7 @@ When people talk to each other in a thread (a support conversation, a group thre
57
57
  | **A new day** | A centred meta line before its first turn (`.app-thread__event`): "Today", "Yesterday", "Thursday", "2 October" |
58
58
  | **Something happened** | The same line with its 16px glyph: "Jan Krynauw took over the conversation", "Newton added Martha", "Resolved by Jan". Never a turn, never coloured |
59
59
  | **Seen** | One `.app-turn__record` inside your turn, under the newest of your bubbles anyone has read. With one other person: "Seen". With more: "Seen by Jan", "Seen by Jan and Newton", then "Seen by everyone". On that bubble only, never a tick per bubble, never ✓✓ |
60
- | **Sending** | Nothing: your bubble appears at once. Only *Didn't send* says anything |
60
+ | **Sending** | Your bubble appears when submission starts, with its captured audience and files. No Seen state before acknowledgement. Only *Didn't send* adds a delivery line |
61
61
  | **Typing** | One meta line at the end of the thread, where their turn will appear (`.app-thread__typing`): "Jan is typing", "Jan and Newton are typing". No avatar and no who-line, so it never doubles a run's |
62
62
  | **Here** | "Here now" in meta after the name, only where the conversation lists its people (its header, its participants). Never on a turn's who-line, where it goes stale. No dot: presence isn't the state of the work |
63
63
 
@@ -65,6 +65,25 @@ Alis is never typing or seen: the phases already say what Alis is doing.
65
65
 
66
66
  **One live region speaks for the thread** (`.app-thread__status`, `role="status"`, visually hidden, always present): it announces typing once when it starts, and each change to a request's state. The visible lines are not live regions: inserted and removed, they're announced unreliably.
67
67
 
68
+ ## Message audience
69
+
70
+ In the responder's view of a conversation that mixes team and customer messages,
71
+ show a separate `.app-turn__audience` meta line **under the author and time** and
72
+ above the content: `lock` **Internal** or `outgoing_mail` **External**. The icon
73
+ is decorative; the word carries the meaning. Keep it in `on-surface-variant`,
74
+ never a coloured bubble or a bracketed prefix in the message body.
75
+
76
+ - Record the audience from the sent message, not the current composer's choice.
77
+ Every message keeps its annotation, including consecutive messages from the
78
+ same person. If grouping suppresses the author line, keep the audience line.
79
+ - **Internal** means only authorised team members. **External** means visible
80
+ to the customer, including messages the customer sent. The customer's own
81
+ portal has no internal messages, counts, snippets, attachments or audience
82
+ annotations; filter these on the server, not by hiding DOM elements.
83
+ - A failed submitted turn keeps that same annotation and its captured recipient.
84
+ Try again resends the same message, never the current draft. A terminal uses
85
+ the same **Internal / External** words beneath its author/time metadata.
86
+
68
87
  ## A request
69
88
 
70
89
  **A person's request is their turn** ([AppAsk](AppAsk.md) § Who asks), on the left for everyone else and on the right for the requester. Their bubble opens with what they ask for (`.app-turn__request`: a 20px glyph naming the kind, and the request in label), then their reason in their own words. Under it, one state line (`.app-turn__line`), kept up to date for everyone in the thread:
@@ -93,7 +112,7 @@ The decision docks on the composer ([AppAsk](AppAsk.md)); the answer is your tur
93
112
 
94
113
  One line in meta where it happened (`.app-turn__line`, as the composer's):
95
114
 
96
- - **Didn't send**: under your bubble, in `error`, with Try again. The bubble stays.
115
+ - **Didn't send**: after submission, under your bubble (or attachment-only turn), in `error`, with Try again. The turn, files and captured audience stay; the editor holds only the new draft. Retry reconciles the same submission rather than creating another turn. Before-submission validation and upload failures stay in the composer ([AppComposer](AppComposer.md) § Delivery and retry).
97
116
  - **The reply failed**: what Alis wrote stays; then, in `error`, "Alis couldn't finish this reply." with Try again. No foot; the mark stays at the top, as it's still Alis's turn.
98
117
  - **You stopped Alis**: what Alis wrote stays; then "Stopped", in `on-surface-variant`, and the foot. Stopping is your choice, so it is never red.
99
118
 
@@ -155,6 +174,21 @@ Northwind 120 —</pre></li>
155
174
  <div class="app-turn__who"><span class="app-turn__avatar" aria-hidden="true">TM</span><span class="text-label">Thandi Mokoena</span><span class="text-meta">Build specialist · 09:20</span></div>
156
175
  <div class="app-turn__row"><div class="app-turn__bubble">I've got it. I'll split the index into its own step.</div></div>
157
176
  </div>
177
+ <!-- Message audiences: responder view only -->
178
+ <div class="app-thread">
179
+ <div class="app-turn app-turn--them">
180
+ <div class="app-turn__who"><span class="app-turn__avatar" aria-hidden="true">TM</span><span class="text-label">Thandi Mokoena</span><span class="text-meta">09:20</span></div>
181
+ <p class="app-turn__audience text-meta"><span class="app-icon" aria-hidden="true">lock</span>Internal</p>
182
+ <div class="app-turn__row"><div class="app-turn__bubble">The upload completed; processing still needs checking.</div></div>
183
+ </div>
184
+ <div class="app-turn app-turn--you">
185
+ <div class="app-turn__who"><span class="text-label">You</span><span class="text-meta">09:22</span></div>
186
+ <p class="app-turn__audience text-meta"><span class="app-icon" aria-hidden="true">outgoing_mail</span>External</p>
187
+ <div class="app-turn__row"><div class="app-turn__bubble">Your file is ready. Could you try again?</div></div>
188
+ <p class="app-turn__line text-meta is-error"><span class="app-icon" aria-hidden="true">error</span>Didn't send<button type="button" class="app-turn__line-action">Try again</button></p>
189
+ </div>
190
+ </div>
191
+
158
192
  <!-- Alis's who-line: the mark is the avatar -->
159
193
  <div class="app-turn__who"><span class="app-turn__avatar app-turn__avatar--alis" aria-hidden="true"><svg …></svg></span><span class="text-label">Alis</span><span class="text-meta">09:44</span></div>
160
194
 
@@ -209,4 +243,4 @@ Northwind 120 —</pre></li>
209
243
 
210
244
  ## Classes
211
245
 
212
- `.app-thread`, `.app-thread__event`, `.app-thread__typing`, `.app-thread__status`; `.app-turn`, `.app-turn--you`, `.app-turn--alis`, `.app-turn--them`, `.is-latest`; `.app-turn__about`, `.app-turn__who`, `.app-turn__avatar`, `.app-turn__avatar--alis`; `.app-turn__head`, `.app-turn__mark`, `.app-turn__status`, `.app-turn__worked`, `.app-turn__steps`, `.app-turn__step`, `.app-turn__output`, `.app-turn__caret`; `.app-turn__row`, `.app-turn__bubble`, `.app-turn__bubble--voice`, `.app-turn__tools`, `.app-turn__files`, `.app-turn__image`; `.app-turn__foot`; `.app-turn__line`, `.is-error`, `.app-turn__line-action`; `.app-turn__record`; `.app-turn__request`; `.app-voice-note`, `.is-open`, `.app-voice-note__player`, `.app-voice-note__wave`, `.is-played`, `.app-voice-note__time`, `.app-voice-note__transcript`, `.app-voice-note__more`; with `.prose` on the reply, `.app-icon-btn` and `.app-state` on the buttons, and `.app-loader.app-loader--line` on the mark while Alis thinks.
246
+ `.app-thread`, `.app-thread__event`, `.app-thread__typing`, `.app-thread__status`; `.app-turn`, `.app-turn--you`, `.app-turn--alis`, `.app-turn--them`, `.is-latest`; `.app-turn__about`, `.app-turn__who`, `.app-turn__audience`, `.app-turn__avatar`, `.app-turn__avatar--alis`; `.app-turn__head`, `.app-turn__mark`, `.app-turn__status`, `.app-turn__worked`, `.app-turn__steps`, `.app-turn__step`, `.app-turn__output`, `.app-turn__caret`; `.app-turn__row`, `.app-turn__bubble`, `.app-turn__bubble--voice`, `.app-turn__tools`, `.app-turn__files`, `.app-turn__image`; `.app-turn__foot`; `.app-turn__line`, `.is-error`, `.app-turn__line-action`; `.app-turn__record`; `.app-turn__request`; `.app-voice-note`, `.is-open`, `.app-voice-note__player`, `.app-voice-note__wave`, `.is-played`, `.app-voice-note__time`, `.app-voice-note__transcript`, `.app-voice-note__more`; with `.prose` on the reply, `.app-icon-btn` and `.app-state` on the buttons, and `.app-loader.app-loader--line` on the mark while Alis thinks.
@@ -17,6 +17,7 @@ Shared conventions: `app-state` gives anything pressable its hover, focus and pr
17
17
  | AppShell | The one navigation rail, content, optional detail pane; the brand and the account card | [AppShell.md](AppShell.md) |
18
18
  | AppTitleBar | The screen's name, verbs and route tabs; the detail bar; the filter row, where search leads | [AppTitleBar.md](AppTitleBar.md) |
19
19
  | AppEmptyState | An empty pane that invites a first step | [AppEmptyState.md](AppEmptyState.md) |
20
+ | AppSignIn | Signing in, signing up and onboarding: one card on the plain ground | [AppSignIn.md](AppSignIn.md) |
20
21
  | AppIcon | A Material Symbol, or a capability mark | [AppIcon.md](AppIcon.md) |
21
22
  | AppButton | Text in ink by default, outlined for a surface's lead, filled for the one action that commits | [AppButton.md](AppButton.md) |
22
23
  | AppIconButton | A glyph that performs one action; or a toggle | [AppIconButton.md](AppIconButton.md) |
package/email/blocks.html CHANGED
@@ -2,7 +2,7 @@
2
2
  AlisX email blocks · @alis-build/design-system. Colours are GENERATED from tokens.json
3
3
  (source/email/); do not edit them here. Rules: rules/email.md.
4
4
 
5
- Each block is a snippet for the shell's {{{body}}} slot. An email uses one or two,
5
+ Each block is a snippet for the shell's body slot. An email uses one or two,
6
6
  never a stack. Each is a product component drawn for mail, on the product's type and
7
7
  space. The classes (em-ink, em-meta, em-line, em-block, em-glyph, em-alert-*, em-term,
8
8
  em-light, em-dark) are what the shell's dark and phone styles hook onto: keep them.
@@ -108,5 +108,5 @@
108
108
  </table>
109
109
 
110
110
  <!-- ── Command · the terminal way to do the same action, behind the red caret; Alis Build only.
111
- It goes in the shell's {{{after_action}}} slot, under the button and its link, never in the body. ── -->
111
+ It goes in the shell's after_action slot, under the button and its link, never in the body. ── -->
112
112
  <div class="em-term" style="margin-top:24px;background:#27323a;border-radius:12px;padding:12px 16px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:14px;line-height:20px;color:#f4f4f2;word-break:break-all"><span style="color:#f02222">❯</span>&nbsp;{{command}}</div>
package/email/shell.html CHANGED
@@ -9,8 +9,9 @@
9
9
  <!--
10
10
  AlisX email shell · @alis-build/design-system. Colours are GENERATED from tokens.json
11
11
  (source/email/); do not edit them here. Rules: rules/email.md. Blocks: email/blocks.html.
12
- Slots are Handlebars: {{subject}} {{preheader}} {{internal}} {{headline}} {{{body}}}
13
- {{action_label}} {{action_url}} {{{after_action}}} {{reason}} {{manage_label}} {{manage_url}} {{assets_url}}.
12
+ Slots (Handlebars, named here without braces: a comment is rendered too): subject, preheader,
13
+ internal, headline, body and after_action (both HTML, in triple braces), action_label,
14
+ action_url, reason, manage_label, manage_url, assets_url.
14
15
  -->
15
16
  <link href="https://fonts.googleapis.com/css2?family=Nunito+Sans:opsz,wght@6..12,400;6..12,500;6..12,700&display=swap" rel="stylesheet">
16
17
  <style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alis-build/design-system",
3
- "version": "0.39.0",
3
+ "version": "0.41.0",
4
4
  "description": "The AlisX design system for coding agents: tokens, product CSS, component markup, capability marks, words and rules.",
5
5
  "keywords": ["alisx", "design-system", "design-tokens", "css"],
6
6
  "homepage": "https://alisx.com",
package/rules/README.md CHANGED
@@ -17,6 +17,7 @@ Read only what the job needs.
17
17
  | [register.md](register.md) | Which register a surface is in, and the voice |
18
18
  | [colour.md](colour.md) | Roles, the one action colour, status, categories |
19
19
  | [themes.md](themes.md) | Light and dark: asking for a theme, what changes, what doesn't |
20
+ | [branding.md](branding.md) | Client identity, account-to-portal inheritance, permitted role overrides and embedding |
20
21
  | [type.md](type.md) | Type roles, weights, the shapes text takes |
21
22
  | [surfaces.md](surfaces.md) | Ground, statement, instrument, lattice; depth |
22
23
  | [spacing.md](spacing.md) | The scale, targets, density |
@@ -31,6 +32,7 @@ Read only what the job needs.
31
32
  | [words.md](words.md) | One name per thing (`words.json`), who speaks, labels, the verbs for getting rid of something |
32
33
  | [icons.md](icons.md) | Material Symbols and the capability marks |
33
34
  | [shortcuts.md](shortcuts.md) | How a key is written, where it shows, the sheet, the keys that mean the same everywhere |
35
+ | [terminal.md](terminal.md) | The CLI and its TUI: what carries over, command and flag names, how text and keys are written |
34
36
  | [styling.md](styling.md) | What your own CSS may set |
35
37
  | [anti-patterns.md](anti-patterns.md) | A1–D6, and the smell test to run before handing back |
36
38
 
@@ -0,0 +1,80 @@
1
+ # Client-branded surfaces
2
+
3
+ A support portal, an interview or a shared artifact may speak for the account
4
+ that serves its customer. Keep the shared component anatomy and behaviour;
5
+ apply identity through one scoped brand profile. The Alis console keeps the
6
+ Alis theme.
7
+
8
+ ## Resolve the profile once
9
+
10
+ **System defaults → account profile → portal overrides.** Resolve each field
11
+ in that order; an absent override inherits, and removing it restores inheritance.
12
+ A validated explicit “no logo” choice is different from an omitted logo. Resolve
13
+ light and dark values separately; never use a light colour as the dark fallback.
14
+ The host product defines profile storage and the meaning of clearing a field.
15
+
16
+ - Resolve and validate the complete profile before first paint. If an override
17
+ makes a related set invalid, fall back to the last valid inherited set; do not
18
+ apply half a foreground/background pair. The brand editor names what needs
19
+ fixing and previews the effective result.
20
+ - Apply the result at the portal root, never through per-component overrides or
21
+ by changing the global Alis palette. A runtime adapter maps validated profile
22
+ fields to the existing semantic roles below. Profiles are data, not arbitrary
23
+ CSS or HTML; accept only supported colour, font and asset values.
24
+ - Scope caches and stored preferences to the account and portal. Switching
25
+ portals resolves a fresh profile rather than retaining the previous one's
26
+ logo, title or theme. The system fallback works without any profile.
27
+
28
+ ## What may change
29
+
30
+ | Profile field | Maps to | Condition |
31
+ | --- | --- | --- |
32
+ | Display name and logo | Content in the identity/header; an image with suitable accessible text | Keep aspect ratio and a text fallback; validate assets and self-host approved files |
33
+ | Action colour and its ink | `primary`, `on-primary` | Validate them together, including focus outlines and links on every permitted surface |
34
+ | Grounds and text | `background`, `surface`, `surface-container-low`, `surface-container-high`, `surface-container-highest`, `surface-variant`, `on-surface`, `on-surface-variant` | One coherent surface set per theme, preserving depth and both inks' contrast |
35
+ | Edges | `outline`, `outline-variant`, `field-edge`, `field-edge-hover` | Preserve the distinction between fields, dividers and focus |
36
+ | Selection | `secondary-container`, `on-secondary-container`, `selection-chrome` | Validate the pair and keep the non-colour selection cue |
37
+ | Typeface | `font-sans`, with a tested fallback stack | Keep the shared type sizes, line heights and weights; test long names, wrapping and loading |
38
+
39
+ Everything else stays with the system: `error`, `on-error`, `warning`, `success`,
40
+ `info`, `signal`, syntax/category/AI roles, motion, spacing, target sizes, shape
41
+ and depth. A brand accent never recolours message audiences, status labels or
42
+ whole message bubbles. If an overridden surface makes a protected semantic role
43
+ unreadable, reject that surface set rather than changing the meaning of the role.
44
+
45
+ This is the bounded exception to Alis's cyan action colour and default typeface
46
+ in [colour.md](colour.md), [type.md](type.md) and [styling.md](styling.md). All
47
+ components still consume semantic roles; no new `brand-*` role is needed in each
48
+ component. A product with existing brand variables maps them once in its adapter.
49
+
50
+ ## Theme and embedding boundaries
51
+
52
+ - Brand and light/dark preference are separate. Set `data-theme` as in
53
+ [themes.md](themes.md). A profile supplies both modes, or the unsupported mode
54
+ inherits a validated system/account theme. Do not infer mode from the logo.
55
+ - CSS custom properties do not cross an iframe. The embedded portal resolves
56
+ the same profile as its hosted page. A host theme preference may cross a
57
+ validated integration channel; accept only the documented values from the
58
+ allowed origin, never a stylesheet or arbitrary CSS.
59
+ - A dialog, menu, tooltip or preview rendered outside the branded subtree must
60
+ receive the same effective roles and theme, or render into an overlay root
61
+ inside it. Never brand all of `body` to reach one portal's overlay.
62
+ - Rebind role aliases in the same scope as the roles they depend on; a custom
63
+ property inherited from an ancestor may already have resolved its aliases.
64
+ Renderer/library themes read the effective profile too, not the unmodified
65
+ package's `themes.json`. Print and exports retain their light-theme rules.
66
+
67
+ ## Verify a profile
68
+
69
+ 1. Check normal text at 4.5:1, focus and essential graphical boundaries at 3:1,
70
+ using the actual rendered foreground/background pairs in both modes. Check
71
+ status and error text against every overridden surface as well as body text.
72
+ 2. Inspect hover, focus, disabled, selected and error states, including dialogs,
73
+ menus, image previews and the embedded page. Selection still has a second cue.
74
+ 3. Check at a narrow touch viewport and enlarged text. Brand fonts must not clip
75
+ buttons or audience/recipient labels; targets remain 48px on touch.
76
+ 4. Preview system fallback, account inheritance, portal override and removal of
77
+ that override, side by side with an unbranded Alis surface. No style leaks.
78
+
79
+ `make check` validates the shipped system roles, not a client's runtime values.
80
+ The host product must validate the effective profile before applying it.
package/rules/colour.md CHANGED
@@ -174,3 +174,9 @@ do, and spends a data colour on decoration.
174
174
  **3:1**.
175
175
  - **No colour encodes anything on its own.** Pair it with a shape, an icon or a
176
176
  label.
177
+
178
+ ## Client-facing brands
179
+
180
+ [branding.md](branding.md) defines the scoped exception for a client's action
181
+ colour and surfaces. Semantic statuses, message audiences and Alis identity keep
182
+ their jobs; a portal brand never replaces them with its accent.
package/rules/errors.md CHANGED
@@ -13,7 +13,7 @@ What went wrong?
13
13
  ├─ A value in a field → the field's error line
14
14
  │ (page.md § Forms)
15
15
  ├─ Something the person just did: a save,
16
- │ a send, a deploy, a delete → one error alert at the top of the
16
+ │ a deploy, a delete → one error alert at the top of the
17
17
  │ form or pane they acted in
18
18
  ├─ Work that failed after they moved on → the thing's own state says Failed,
19
19
  │ and the alert waits in its pane
@@ -30,12 +30,19 @@ What went wrong?
30
30
  │ returns
31
31
  ├─ They were signed out → a dialog over the screen as it was
32
32
  ├─ A new version is waiting → the one snackbar that stays
33
- └─ A message didn't send, or Alis couldn't
34
- finish a reply → the turn says so (AppTurn)
33
+ ├─ A draft fails validation before sending → the composer keeps it and explains
34
+ │ what to change (AppComposer)
35
+ ├─ A conversation attachment didn't upload → its tile keeps retry/remove
36
+ │ (AppAttachment)
37
+ └─ A submitted message didn't send, or Alis
38
+ couldn't finish a reply → the turn keeps its recovery action
39
+ (AppTurn)
35
40
  ```
36
41
 
37
42
  **One failure, one notice.** The field, or the alert, or the pane state: never
38
- two for the same thing.
43
+ two for the same thing. For conversations, follow [AppComposer](../components/AppComposer.md)
44
+ § Delivery and retry: before submission the draft owns recovery; after submission
45
+ the turn owns it. Never leave a failed turn and restore its copy to the editor.
39
46
 
40
47
  ## Never
41
48
 
@@ -115,7 +122,7 @@ neutral tile.
115
122
  - **An action taken from a row or a menu** (Delete, Pause) puts its alert at the
116
123
  top of the page, as a page-level notice ([page.md](page.md)).
117
124
  - **The alert leaves when they act again**, never on a timer.
118
- - **Work that fails later** (a deploy, an upload, a send to many people) changes
125
+ - **Work that fails later** (a deploy, a standalone upload, a send to many people) changes
119
126
  the thing's own state: its chip says Failed, and the alert waits in its pane
120
127
  with the next step ([quick-start.md](quick-start.md) § 5).
121
128
 
@@ -8,7 +8,8 @@ What the system doesn't decide yet, in one place. When you hit one, take the qui
8
8
  - **A bar of actions for several chosen rows** ("3 selected"). [AppCheckbox](../components/AppCheckbox.md) chooses them; what acts on them has no pattern yet. When some of the chosen are beyond the person's role, how the bar counts and reports them is already settled ([access.md](access.md) § Several at once).
9
9
  - **The marketing components** (`.ax-*`, alisx.com) are not in this package: it covers the product register. A layout class for a grid of lattices is missing too.
10
10
  - **What the Skill store and the Specialists offer**, beyond their one-line descriptions in [README.md](README.md). Marketing copy about them needs a product brief.
11
- - **File upload**, and a **dismissible alert**.
11
+ - **A standalone bulk uploader**, beyond conversation attachments. Conversation uploads are covered by [AppAttachment](../components/AppAttachment.md) and [AppComposer](../components/AppComposer.md).
12
+ - **A dismissible alert**.
12
13
 
13
14
  ## Open patterns
14
15
 
@@ -16,7 +17,8 @@ What the system doesn't decide yet, in one place. When you hit one, take the qui
16
17
  - **Versions of generated content.** Regenerating replaces a synthesis; keeping or comparing earlier versions has no pattern.
17
18
  - **Withdrawing a request, turning requests off, and approval chains.** A person can't withdraw a request they made, Owners can't choose whether anyone may ask, and a request that needs several approvers in turn has no pattern ([AppAsk](../components/AppAsk.md) § Who asks, [access.md](access.md) § Asking for more). An approval chain would be its own component: its parts and interaction differ.
18
19
  - **An account's own roles, and seats.** `words.json` names the roles on a thing (Owner, Editor, Viewer); an account's roles (an admin, a builder, a curator) and its seats are not in it yet. Say what the person needs in the screen's own words ("ask an admin of Acme"), and add the entries with the first change.
19
- - **Build's and Admin's words.** `words.json` names what Alis Ideate and every product share; Build's own things (an environment, a workstation, a build partner) are not in it yet. Name them as the screen already does, and add the entry with the first change ([words.md](words.md)).
20
+ - **Admin's words.** `words.json` names what Alis Ideate, Build and every product share; Admin's own things are not in it yet. Name them as the screen already does, and add the entry with the first change ([words.md](words.md)).
21
+ - **Checking a terminal's words.** `alisx-check words` reads markup; the CLI's help, `alis docs` and its TUI are plain text, so nothing checks them yet. Until it does, review them by eye against `words.json` ([terminal.md](terminal.md)).
20
22
  - **A log viewer.** "View logs" goes to the logs' own screen; there is no pattern for showing logs inside a pane.
21
23
  - **Each product's destinations** (the rows under its heading in the rail) are product content, not part of this system. Use the capability marks for the tools they name.
22
24
 
package/rules/page.md CHANGED
@@ -226,7 +226,9 @@ leads its content with it, or leaves it out. What a failure shows, and where, is
226
226
  ## Empty and entry screens
227
227
 
228
228
  - **An entry screen that addresses the user** (the Ideate home) leads with
229
- `text-welcome-title`. An empty state's headline keeps `text-page-title` even
229
+ `text-welcome-title`. Signing in, signing up and onboarding are not entry
230
+ screens: they are one card on the plain ground
231
+ ([AppSignIn](../components/AppSignIn.md)). An empty state's headline keeps `text-page-title` even
230
232
  under the title bar: it fills a pane, not the screen, and it is the one place a
231
233
  second page-title appears.
232
234
  - **When the screen's list is empty**, the title bar keeps the name and the
@@ -267,7 +269,8 @@ leads its content with it, or leaves it out. What a failure shows, and where, is
267
269
  one filled action last, on the trailing edge, and labelled with its outcome.
268
270
  - **On a page, a form is one instrument card** ([AppCard](../components/AppCard.md)):
269
271
  white, its edge, at the prose measure, its actions the card's action row. Its
270
- parts are told apart by space and a `section-title`, never by lines across it.
272
+ parts are told apart by space and a `section-title`, never by lines across it
273
+ and never by eyebrows ([type.md](type.md)).
271
274
  In a dialog the dialog is the surface.
272
275
  - **A field is labelled above**, in label type. A set of choices (tiles,
273
276
  checkboxes, radios) is labelled once, as a group, the same way.
@@ -303,6 +306,13 @@ leads its content with it, or leaves it out. What a failure shows, and where, is
303
306
  "Deleted staging"); a result someone needs to read stays as a success alert
304
307
  at the top.
305
308
  - **A switch** applies at once on its own, and with the rest on Save inside a form.
309
+ - **A provider's payment form** (Stripe's Payment Element) is themed once, from
310
+ the tokens, through its own appearance options: Nunito Sans through its fonts
311
+ option, `radius-lg`, `field-edge` and `field-edge-hover`, `primary` for focus,
312
+ `error` for errors, `on-surface` and `on-surface-variant` for ink, labels
313
+ above, no shadow. It takes literal values, not roles: read them from the page
314
+ and apply them again when the theme changes. Its structure and words stay the
315
+ provider's.
306
316
 
307
317
  ### Settings read back
308
318
 
@@ -336,7 +346,8 @@ Should this form take steps?
336
346
  - **Two to five steps, each named in a word or two.** More than five is two flows.
337
347
  - **[AppStepper](../components/AppStepper.md) leads the flow's surface**: the top
338
348
  of its card on a page, under the title in a dialog. No panel round it, and no
339
- "Step 1 of 2" beside it.
349
+ "Step 1 of 2" beside it. On a sign-in card it takes the logo's place
350
+ ([AppSignIn](../components/AppSignIn.md)).
340
351
  - **One action row at the foot.** Back is text, on the leading edge, from the
341
352
  second step. The forward action is the one filled button, last: "Continue", or
342
353
  named by its outcome when the step makes something ("Create collection") and on
@@ -380,6 +391,8 @@ Never redraw it locally or as a one-off background.
380
391
  ```
381
392
  Does this screen take the drafting field?
382
393
  ├─ An entry screen that addresses the user → yes
394
+ ├─ Sign-in, sign-up, onboarding → no: one card on the plain
395
+ │ ground (AppSignIn)
383
396
  ├─ An empty state that fills its pane,
384
397
  │ and invites a first step → yes
385
398
  ├─ An empty line in a list, drawer, form, table → no
@@ -73,6 +73,7 @@ AppShell
73
73
  | Something their role doesn't let them do | leave it out; a Viewer gets the role chip in the bar, and an empty state says who can ([access.md](access.md)) |
74
74
  | Something they did failed | one `AppAlert tone="error"` at the top of the form or pane, in words a person wrote; never a snackbar, never the machine's message |
75
75
  | Nothing yet | `AppEmptyState` filling the pane; keep the bar's name and verb, hide search and the filter row |
76
+ | Signing in, signing up, onboarding | `AppSignIn`: one card on the plain ground, never the drafting field; in steps, the stepper leads the card and the logo goes |
76
77
 
77
78
  ## 4. The values you'll reach for
78
79
 
package/rules/register.md CHANGED
@@ -7,7 +7,9 @@ What am I building?
7
7
  ├─ A screen inside Ideate, Admin or Build: a
8
8
  │ shell, thread, table, form, dialog, settings
9
9
  │ page → PRODUCT
10
- ├─ Sign-in, onboarding, an empty state, upgrade → PRODUCT, with the one
10
+ ├─ Sign-in, sign-up, onboarding → PRODUCT, one card on the
11
+ │ plain ground (AppSignIn)
12
+ ├─ An empty state, an upgrade prompt → PRODUCT, with the one
11
13
  │ crossing below
12
14
  ├─ An explainer page inside the product that
13
15
  │ sells a capability → EXPRESSIVE (below)
@@ -40,10 +42,15 @@ These are defects in the product, every time:
40
42
 
41
43
  ## The one permitted crossing
42
44
 
43
- **Sign-in, onboarding, empty states and upgrade prompts** address the user rather
45
+ **Entry screens, empty states and upgrade prompts** address the user rather
44
46
  than put them to work, so they may use the drafting field and a petrol band
45
47
  ([page.md](page.md)). Working screens do not.
46
48
 
49
+ **Sign-in, sign-up and onboarding do not cross.** Alis Identity signs people in
50
+ to other companies' apps, where the app's logo is the only brand on the page,
51
+ and AlisX's own sign-up takes the same frame so the flow never changes ground:
52
+ one card on the plain ground ([AppSignIn](../components/AppSignIn.md)).
53
+
47
54
  The test: is the person on this screen **working**, or **being spoken to**? If it
48
55
  is genuinely both, it is product with a narrative hero, not a blend.
49
56
 
@@ -31,6 +31,8 @@ side, never a plus sign and never brackets.
31
31
  is the plus key, never a separator.
32
32
  - **Keys for another app** (a setup guide: "In PowerShell, press Ctrl V") use that
33
33
  guide's platform, not the one detected.
34
+ - **In a terminal** there are no caps, so keys are written in text: `Ctrl+V`
35
+ ([terminal.md](terminal.md) § Writing text).
34
36
 
35
37
  ## Where a key shows
36
38
 
package/rules/styling.md CHANGED
@@ -34,6 +34,10 @@ are set once, in the theme, so a site only places it. A size prop at a site is a
34
34
  local override like any other: when every page has to remember `density`, the
35
35
  one that forgets looks different, and nothing tells you which one is right.
36
36
 
37
+ **Client branding** is resolved once in a scoped theme adapter, following
38
+ [branding.md](branding.md), never by restyling components at a site. Only its
39
+ listed semantic roles and validated identity fields may change.
40
+
37
41
  ## May stay at a site
38
42
 
39
43
  - **Layout.** Grid templates and placement, flex, widths and min/max sizes (never
@@ -0,0 +1,71 @@
1
+ # Terminal
2
+
3
+ **The CLI and its TUI are a surface like any screen: the same names, the same
4
+ voice, the same keys meaning the same acts.** What changes is what a terminal
5
+ can't draw: there are no caps, no chips and no reliable weight, so a few things
6
+ are written differently. This file says what carries over, what changes shape,
7
+ and how text is written.
8
+
9
+ ## What carries over
10
+
11
+ | Rule | In a terminal |
12
+ | --- | --- |
13
+ | [words.md](words.md) | As it is. Every name comes from `words.json`; Alis is named; the product speaks to "you" |
14
+ | [quick-start.md](quick-start.md) § Copy | As it is: sentence case, British spelling, plain and calm, no dashes, no emoji, no exclamation marks |
15
+ | [errors.md](errors.md) | As it is: what happened and what to do next, in a sentence a person wrote, never the machine's message alone |
16
+ | [shortcuts.md](shortcuts.md) | The principles: one list of keys, a key means one act everywhere, the keys that mean the same everywhere. How a key is written changes (below) |
17
+ | [chips-alerts.md](chips-alerts.md) | A state is said in words. One that must stand out is a coloured pill, the terminal's chip |
18
+ | Colour, type, spacing, surfaces | Don't apply. The terminal's own palette and one font. Colour carries roles only: the accent, an error, quiet text |
19
+
20
+ ## Words written for agents
21
+
22
+ Help text, `alis docs` and the readable text in JSON output (a `next` hint, an
23
+ `agent` instruction) are read by coding agents, and an agent repeats what it
24
+ reads. They use the names in `words.json`, in full sentences ([words.md](words.md)
25
+ § Name it as they know it). JSON field names, error codes and resource paths
26
+ (`ideas/*`) are code and stay as they are.
27
+
28
+ ## Command and flag names
29
+
30
+ A command or a flag is a label: it takes its name from `words.json`.
31
+
32
+ - **Names every CLI uses stay**: `login`, `logout`, `upgrade`, `version`,
33
+ `doctor`, `run`. People and agents already know them. What's on screen still
34
+ follows the glossary ("Sign in").
35
+ - **A name that a guard or a script matches never moves**: the safety flags
36
+ (`--confirm-production`, `--reveal`, `--approve`, `--yes`), the output flags
37
+ (`--json`, `--cwd`), hidden commands (the ones starting `_`, and those saved
38
+ in someone's config), and the `alis docs` topic names. A guard that stops
39
+ matching turns off without an error.
40
+ - **Any other name that clashes is renamed**, and the old one stays as a hidden
41
+ alias. Whatever matches command names (a plugin's guard, the instructions an
42
+ agent starts with) changes in the same release.
43
+ - **The command can be shorter than the name**: `alis org` manages build
44
+ environments and `alis environment` (`-e`) deployment environments. Their
45
+ help uses the full names.
46
+
47
+ ## Writing text
48
+
49
+ | Thing | How |
50
+ | --- | --- |
51
+ | Titles, actions, messages, states | Sentence case: "Deploy to production?", "Request pending" |
52
+ | Column headers | In capitals, as terminal tables are: `NAME STATUS UPDATED` |
53
+ | A state that must stand out | A coloured pill in sentence case, never capitals |
54
+ | A key combination | `Ctrl+V`, `Shift+Tab`: joined by `+`, no spaces, the letter in capitals after a modifier. A terminal has no caps to separate keys, so the plus does it |
55
+ | Named keys | Enter, Esc, Tab, Space as words; ↑ ↓ ← → as arrows |
56
+ | A single letter | As it is typed: `n` and `N` are different keys |
57
+ | Control | `Ctrl` on every platform, never ⌃: the terminal's key is Control, even on a Mac |
58
+ | A key hint | The key, then what it does: `Enter send · Ctrl+V paste image · Esc done`. No quotes around keys |
59
+ | Separators | `·` between items |
60
+ | Ellipses | `…`, never three dots |
61
+ | Finished | "Done", with the time when there is one ("Done in 2m"). Never "Done!" or "Complete" |
62
+ | ID | "ID" in text ("Product ID"); `id` only as code |
63
+ | A new error code | `UPPER_SNAKE`. Existing codes stay as they are: agents match them |
64
+
65
+ ## Before you hand it back
66
+
67
+ 1. Is every name one from `words.json`, and every state said in words?
68
+ 2. Is a key written as above, and does it do the same thing on every screen?
69
+ 3. Would an agent reading the help or a hint learn the right name?
70
+ 4. Did a renamed command keep its old name as a hidden alias, and did a guard's
71
+ or a script's name stay put?
package/rules/themes.md CHANGED
@@ -30,6 +30,13 @@ breaks the moment the theme changes.
30
30
  - A browser without `light-dark()` (before Chrome 123, Firefox 120, Safari 17.5)
31
31
  gets the light theme.
32
32
 
33
+ ## Client branding
34
+
35
+ A client-facing portal may override a bounded set of roles through a scoped,
36
+ validated profile. [branding.md](branding.md) defines account inheritance, portal
37
+ overrides, contrast checks and iframe/overlay boundaries. Light/dark remains a
38
+ separate choice; the defaults and protected semantic roles below still apply.
39
+
33
40
  ## Where the values come from
34
41
 
35
42
  | File | Holds | For |
package/rules/type.md CHANGED
@@ -42,7 +42,8 @@ Three more styles, each with one place:
42
42
  dialog or card.
43
43
  - **`text-eyebrow`**, 12/16 at 700, uppercase, 0.12em: a structural tag of four
44
44
  words at most over what follows. The lattice's label, and a group heading
45
- inside a card, a list, a menu or a panel. The only all-caps in the product.
45
+ inside a card, a list, a menu or a panel, except in a form: a form's groups
46
+ are `text-section-title`, its card included ([page.md](page.md) § Forms). The only all-caps in the product.
46
47
  Never the navigation pane's group headings, which set their own type in
47
48
  sentence case ([AppShell](../components/AppShell.md)).
48
49
  - **`text-metric-value`**, 40/48 at 700 with tabular figures: a dashboard's
@@ -68,7 +69,8 @@ What is this text doing?
68
69
  │ popover's own title → object-title
69
70
  │ a second name on the row, like the owner
70
71
  │ beside the project → supporting
71
- ├─ Heading a group of things below it → section-title; inside a card, eyebrow
72
+ ├─ Heading a group of things below it → section-title; inside a card, eyebrow;
73
+ │ in a form, section-title, card or not
72
74
  ├─ Language someone reads to understand
73
75
  │ ├─ the content of its region: a dialog's
74
76
  │ │ message, an explanation that stands alone → body
@@ -111,7 +113,7 @@ subtitle is never body.
111
113
  | A card's only title | object-title, whatever the card's size |
112
114
  | A caption naming the one block below it ("What we learned") | a key: meta in `on-surface-variant`, and the block keeps the role it would have alone. Over a list, table or set of stats it is a group heading instead |
113
115
  | A data table | headers label, on each header cell; the cell naming the row object-title; other cells supporting in ink, a second line in `on-surface-variant`; a value cell (a date, a count) meta; a sentence standing in for rows supporting. A wrapper that gives a third-party grid its type takes the cell's role |
114
- | A group heading | section-title; inside a card, eyebrow. Sentence case in the copy. Words someone typed are never eyebrow: section-title, or object-title inside a card |
116
+ | A group heading | section-title; inside a card, eyebrow, except a form's groups, which are section-title in a card too. Sentence case in the copy. Words someone typed are never eyebrow: section-title, or object-title inside a card |
115
117
  | A heading that is also a link | label |
116
118
  | A list item used as a control, its text the item itself | label |
117
119
  | An expandable section's title holding a name and a second line | object-title, then supporting in `on-surface-variant` |
package/tokens.css CHANGED
@@ -141,6 +141,7 @@
141
141
  --space-32: 32px;
142
142
  --space-48: 48px;
143
143
  --card-padding-wide: 28px;
144
+ --attachment-preview-size: 96px;
144
145
  --chat-row: 32px;
145
146
  --touch-target: 32px;
146
147
  --touch-target-coarse: 48px;
package/tokens.json CHANGED
@@ -1411,6 +1411,11 @@
1411
1411
  "value": "28px",
1412
1412
  "usage": "Card padding from 600px wide: the scale's one exception. Set once on the card, never at a site."
1413
1413
  },
1414
+ {
1415
+ "name": "attachment-preview-size",
1416
+ "value": "96px",
1417
+ "usage": "Square preview in a composer's attachment tray: leaves the image visible beside a 48px touch remove target. Sent images use AppTurn's larger preview."
1418
+ },
1414
1419
  {
1415
1420
  "name": "chat-row",
1416
1421
  "value": "32px",