@adia-ai/adia-ui-factory 0.2.2 → 0.2.3

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.
Files changed (94) hide show
  1. package/.claude-plugin/plugin.json +12 -3
  2. package/CHANGELOG.md +8 -0
  3. package/README.md +24 -1
  4. package/bin/adia-scaffold +93 -13
  5. package/package.json +2 -2
  6. package/references/shell-embed.md +10 -0
  7. package/references/spa-architecture.md +7 -0
  8. package/skills/adia-ui-kit/CHANGELOG.md +41 -0
  9. package/skills/adia-ui-kit/SKILL.md +442 -0
  10. package/skills/adia-ui-kit/assets/figma-make/guidelines/Guidelines.md +87 -0
  11. package/skills/adia-ui-kit/assets/figma-make/guidelines/components.md +142 -0
  12. package/skills/adia-ui-kit/assets/figma-make/guidelines/styles.md +118 -0
  13. package/skills/adia-ui-kit/assets/figma-make/guidelines/tokens.md +120 -0
  14. package/skills/adia-ui-kit/assets/team-scaffold/archive-README.md +30 -0
  15. package/skills/adia-ui-kit/assets/team-scaffold/drafts-README.md +57 -0
  16. package/skills/adia-ui-kit/assets/team-scaffold/inbox-README.md +76 -0
  17. package/skills/adia-ui-kit/assets/team-scaffold/outbox-README.md +46 -0
  18. package/skills/adia-ui-kit/assets/team-scaffold/team-root.README.md +51 -0
  19. package/skills/adia-ui-kit/assets/team-scaffold/tickets-README.md +208 -0
  20. package/skills/adia-ui-kit/assets/team-scaffold/tickets-REGISTRY.md +81 -0
  21. package/skills/adia-ui-kit/assets/templates/AGENTS.template.md +128 -0
  22. package/skills/adia-ui-kit/assets/templates/CLAUDE.template.md +1 -0
  23. package/skills/adia-ui-kit/assets/templates/FEEDBACK-OMISSIONS-DEFENSE.template.md +150 -0
  24. package/skills/adia-ui-kit/assets/templates/FEEDBACK.template.md +213 -0
  25. package/skills/adia-ui-kit/assets/templates/RESPONSE.template.md +114 -0
  26. package/skills/adia-ui-kit/assets/templates/figma-make-guidelines.md +90 -0
  27. package/skills/adia-ui-kit/evals/adversarial-content-trust.json +83 -0
  28. package/skills/adia-ui-kit/evals/evals.json +55 -0
  29. package/skills/adia-ui-kit/evals/routing-corpus.json +121 -0
  30. package/skills/adia-ui-kit/evals/teach-routing-cases.json +92 -0
  31. package/skills/adia-ui-kit/references/capabilities.md +245 -0
  32. package/skills/adia-ui-kit/references/catalog-lookup.md +186 -0
  33. package/skills/adia-ui-kit/references/changelog-archive/CHANGELOG-v1.md +8 -0
  34. package/skills/adia-ui-kit/references/changelog-archive/CHANGELOG-v2.md +3585 -0
  35. package/skills/adia-ui-kit/references/changelog-archive/CHANGELOG-v3.md +1899 -0
  36. package/skills/adia-ui-kit/references/common-gotchas-consumer.md +522 -0
  37. package/skills/adia-ui-kit/references/component-literacy.md +291 -0
  38. package/skills/adia-ui-kit/references/composition.md +245 -0
  39. package/skills/adia-ui-kit/references/correction-loop.md +462 -0
  40. package/skills/adia-ui-kit/references/css-policy.md +343 -0
  41. package/skills/adia-ui-kit/references/decision-model.md +158 -0
  42. package/skills/adia-ui-kit/references/diagnostic-output.md +57 -0
  43. package/skills/adia-ui-kit/references/docs-catalog.md +239 -0
  44. package/skills/adia-ui-kit/references/exclusions.md +225 -0
  45. package/skills/adia-ui-kit/references/feedback-authoring.md +466 -0
  46. package/skills/adia-ui-kit/references/figma-make.md +244 -0
  47. package/skills/adia-ui-kit/references/flows-auth.md +307 -0
  48. package/skills/adia-ui-kit/references/flows-content.md +206 -0
  49. package/skills/adia-ui-kit/references/flows-data.md +348 -0
  50. package/skills/adia-ui-kit/references/flows-interaction.md +181 -0
  51. package/skills/adia-ui-kit/references/flows-shells.md +336 -0
  52. package/skills/adia-ui-kit/references/gap-detection.md +266 -0
  53. package/skills/adia-ui-kit/references/harness.md +284 -0
  54. package/skills/adia-ui-kit/references/loading-protocol.md +406 -0
  55. package/skills/adia-ui-kit/references/local-link.md +198 -0
  56. package/skills/adia-ui-kit/references/mcp.md +401 -0
  57. package/skills/adia-ui-kit/references/migration.md +116 -0
  58. package/skills/adia-ui-kit/references/mission.md +194 -0
  59. package/skills/adia-ui-kit/references/mode-routing.md +298 -0
  60. package/skills/adia-ui-kit/references/patterns-agent.md +223 -0
  61. package/skills/adia-ui-kit/references/patterns-data.md +1066 -0
  62. package/skills/adia-ui-kit/references/patterns-forms.md +223 -0
  63. package/skills/adia-ui-kit/references/patterns-layout.md +326 -0
  64. package/skills/adia-ui-kit/references/patterns-recipes.md +1416 -0
  65. package/skills/adia-ui-kit/references/patterns-shells.md +1097 -0
  66. package/skills/adia-ui-kit/references/patterns-traits.md +259 -0
  67. package/skills/adia-ui-kit/references/patterns-wiring.md +339 -0
  68. package/skills/adia-ui-kit/references/pev-rationale.md +137 -0
  69. package/skills/adia-ui-kit/references/reasoning-gate.md +146 -0
  70. package/skills/adia-ui-kit/references/reasoning-methodologies.md +112 -0
  71. package/skills/adia-ui-kit/references/recon.md +192 -0
  72. package/skills/adia-ui-kit/references/rendering-model.md +431 -0
  73. package/skills/adia-ui-kit/references/response-authoring.md +398 -0
  74. package/skills/adia-ui-kit/references/session-log-schema.md +203 -0
  75. package/skills/adia-ui-kit/references/session-log-template.md +118 -0
  76. package/skills/adia-ui-kit/references/setup.md +652 -0
  77. package/skills/adia-ui-kit/references/skill-hygiene.md +135 -0
  78. package/skills/adia-ui-kit/references/spec-to-ui-reasoning.md +394 -0
  79. package/skills/adia-ui-kit/references/state.md +229 -0
  80. package/skills/adia-ui-kit/references/teach-protocol.md +421 -0
  81. package/skills/adia-ui-kit/references/theme.md +142 -0
  82. package/skills/adia-ui-kit/references/version-check.md +69 -0
  83. package/skills/adia-ui-kit/scripts/audit-decision-trace.mjs +198 -0
  84. package/skills/adia-ui-kit/scripts/audit-kit-roster.mjs +366 -0
  85. package/skills/adia-ui-kit/scripts/changelog-archive.mjs +126 -0
  86. package/skills/adia-ui-kit/scripts/check-adia-versions.py +404 -0
  87. package/skills/adia-ui-kit/scripts/run-skill-evals.mjs +358 -0
  88. package/skills/adia-ui-kit/scripts/validate-session-log.mjs +242 -0
  89. package/skills/adia-ui-kit/skill.json +102 -0
  90. package/skills/adia-ui-migration/CHANGELOG.md +47 -0
  91. package/skills/adia-ui-migration/SKILL.md +381 -0
  92. package/skills/adia-ui-migration/skill.json +29 -0
  93. package/skills/adia-ui-spa/SKILL.md +1 -1
  94. package/skills/adia-ui-verify/SKILL.md +2 -2
@@ -0,0 +1,244 @@
1
+ ---
2
+ name: figma-make
3
+ load-when: The user wants to use AdiaUI inside Figma Make (or any prompt-to-app / web-container codegen tool) and needs the CDN load options — every CSS + JS bundle URL, the recommended one-import default, and the React/JSX usage caveats
4
+ ---
5
+
6
+ # §FigmaMake — Using AdiaUI in Figma Make via CDN
7
+
8
+ > **Loading note.** Reference bundle per the §LoadingProtocol inversion
9
+ > contract. Load via
10
+ > `skill_view(name='adia-ui-kit', file_path='references/figma-make.md')`
11
+ > when the user is building in Figma Make (or a similar prompt-to-app /
12
+ > sandboxed web-container tool — Bolt, Lovable, v0, StackBlitz) and asks
13
+ > how to pull AdiaUI in over a CDN. For a raw Vite + npm project use
14
+ > `references/setup.md` instead; for the framework-agnostic CDN policy
15
+ > rationale use `references/css-policy.md` §CDN.
16
+
17
+ ## Why this works at all
18
+
19
+ AdiaUI primitives are **framework-agnostic Light-DOM custom elements**.
20
+ They register themselves with `customElements.define` and style
21
+ themselves with CSS `@scope` — there is no React/Vue/Svelte binding to
22
+ install, no build step required, no JSX wrapper. Anything that can put
23
+ a `<link>` and a `<script type="module">` in the document — which Figma
24
+ Make's generated app can — can render `<button-ui>`, `<card-ui>`,
25
+ `<admin-shell>`, etc.
26
+
27
+ That means you do **not** `npm install` anything in Make. You load two
28
+ or three CDN URLs and start writing tags.
29
+
30
+ ## The 90-second default (recommended for Make)
31
+
32
+ One CSS link + one JS module = every primitive **and** every shell, with
33
+ the icon manifest baked in. Paste into the document `<head>` (see
34
+ "Where to paste in Figma Make" below):
35
+
36
+ ```html
37
+ <!-- AdiaUI — kitchen-sink: all 100+ primitives + 4 shells + a2ui-runtime -->
38
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@adia-ai/web-components@0.7/dist/web-components.min.css">
39
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@adia-ai/web-modules@0.7/dist/shell/admin-shell.min.css">
40
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@adia-ai/web-modules@0.7/dist/everything.min.js"></script>
41
+ ```
42
+
43
+ `everything.min.js` registers all primitives + all 4 shells + the
44
+ a2ui-runtime + the icon manifest in one file — nothing else to load for
45
+ the JS side. Add only the **shell CSS for the shell tier you actually
46
+ render** (the kitchen-sink JS covers every shell, but each shell's CSS
47
+ is a separate file — see the table). If you're not using a shell at all,
48
+ drop the second `<link>` and keep just `web-components.min.css`.
49
+
50
+ ## All CDN options
51
+
52
+ Base URL: `https://cdn.jsdelivr.net/npm/` (unpkg works too — swap the
53
+ host). Use the `@0.6` **minor range** — jsdelivr auto-resolves the
54
+ latest `0.6.x` patch, tracks fixes, and won't jump to a breaking `0.7`.
55
+
56
+ ### CSS bundles
57
+
58
+ | What | URL (after the base) | Size | Load when |
59
+ |---|---|---|---|
60
+ | **All primitives + tokens + themes** | `@adia-ai/web-components@0.7/dist/web-components.min.css` | ~590 KB | **Always** — this is the base stylesheet |
61
+ | Admin shell | `@adia-ai/web-modules@0.7/dist/shell/admin-shell.min.css` | ~18 KB | Rendering `<admin-shell>` |
62
+ | Chat shell | `@adia-ai/web-modules@0.7/dist/chat/chat-shell.min.css` | ~10 KB | Rendering `<chat-shell>` |
63
+ | Editor shell | `@adia-ai/web-modules@0.7/dist/editor/editor-shell.min.css` | ~6 KB | Rendering `<editor-shell>` |
64
+ | Simple shell | `@adia-ai/web-modules@0.7/dist/simple/simple-shell.min.css` | ~0.4 KB | Rendering `<simple-shell>` |
65
+
66
+ Add **one** base stylesheet always; add a shell stylesheet only for the
67
+ shell you render. Each shell's CSS bundles every sub-component style it
68
+ needs (`admin-shell.min.css` covers `admin-sidebar` / `admin-topbar` /
69
+ `admin-page` / … — you don't load those separately).
70
+
71
+ ### JS bundles — pick exactly ONE registration path
72
+
73
+ | What | URL (after the base) | Size | Load when |
74
+ |---|---|---|---|
75
+ | **Everything (kitchen-sink)** | `@adia-ai/web-modules@0.7/dist/everything.min.js` | ~1.3 MB | **Default for Make** — all primitives + 4 shells + a2ui-runtime + icons baked in |
76
+ | Primitives only | `@adia-ai/web-components@0.7/dist/web-components.min.js` | ~1.2 MB | No shells at all — **must co-load** `icons-manifest.js` (next row) |
77
+ | Icon manifest (standalone) | `@adia-ai/web-components@0.7/dist/icons-manifest.js` | ~250 KB | Only with the primitives-only path above (it's already inside `everything.min.js`) |
78
+ | Admin shell only | `@adia-ai/web-modules@0.7/dist/shell/admin-shell.min.js` | ~15 KB | `web-components.min.js` + this one shell (advanced) |
79
+ | Chat shell only | `@adia-ai/web-modules@0.7/dist/chat/chat-shell.min.js` | ~230 KB | `web-components.min.js` + chat only |
80
+ | Editor shell only | `@adia-ai/web-modules@0.7/dist/editor/editor-shell.min.js` | ~6 KB | `web-components.min.js` + editor only |
81
+ | Simple shell only | `@adia-ai/web-modules@0.7/dist/simple/simple-shell.min.js` | ~6 KB | `web-components.min.js` + simple only |
82
+
83
+ > **Pick ONE JS path.** Loading `everything.min.js` *and* a separate
84
+ > `web-components.min.js` makes `customElements.define` throw
85
+ > "name already defined" on the dup-registered tag — the page half-boots
86
+ > then errors. For Make, just use `everything.min.js`.
87
+
88
+ > **Icons need the manifest.** Icons (`<button-ui icon="gear">`,
89
+ > `<icon-ui name="house">`) lazy-load from `@phosphor-icons/core` gated
90
+ > by `icons-manifest.js`. It's **baked into `everything.min.js`**, so the
91
+ > default path needs nothing extra. Only the primitives-only
92
+ > `web-components.min.js` path must co-load the standalone manifest URL,
93
+ > or every icon renders blank.
94
+
95
+ ## The Guidelines field (primary path — steer the generator)
96
+
97
+ Figma Make has a **Provide guidelines** field ("Give instructions to
98
+ Make so it knows how to use your context"). This is the canonical place
99
+ to make Make build with AdiaUI: paste a guidelines block that (a) tells
100
+ Make to load the CDN bundles, (b) tells it to prefer AdiaUI tags over
101
+ hand-built UI, and (c) gives the component vocabulary + usage rules.
102
+
103
+ A ready-to-paste guidelines artifact lives at
104
+ `assets/templates/figma-make-guidelines.md` — hand it to the user
105
+ verbatim (or tailor it: trim the vocabulary to the surfaces they're
106
+ building, pin the version). It encodes the setup block, the `<name>-ui`
107
+ naming rule, the grouped tag vocabulary, the 9 usage rules (the
108
+ common-mistake list — `text=` labels, `<section>` card bodies,
109
+ presence-based booleans, `class` not `className`, `nav-ui` not
110
+ `menu-ui`, `stack-ui` is z-axis, theme-via-tokens-not-Tailwind), and a
111
+ worked `<admin-shell>` example. Keep it current with the substrate — the
112
+ usage rules mirror the kit's `common-gotchas-consumer.md` + the memory
113
+ pitfalls; re-derive if a primitive's contract changes.
114
+
115
+ ### Two artifacts — pick by how the user runs Make
116
+
117
+ - **Single paste-in block** → `assets/templates/figma-make-guidelines.md`.
118
+ For the quick path: the user pastes one block into the **Provide
119
+ guidelines** field. Everything in one file.
120
+ - **Structured kit folder** → `assets/figma-make/guidelines/` (four
121
+ files: `Guidelines.md` read-first, `components.md`, `styles.md`,
122
+ `tokens.md`). This matches Figma's documented Make-kit
123
+ `guidelines/` layout ("multiple short files beat one large file";
124
+ Make discovers the folder automatically). Hand the user the whole
125
+ folder when they maintain a Make kit, or when they asked for the
126
+ `Guidelines.md` / `components.md` / `styles.md` / `tokens.md` split
127
+ by name. `Guidelines.md` carries the CDN-rollup setup block + the
128
+ read-first critical rules; the other three are the deep references.
129
+
130
+ Both encode the **same facts** (CDN rollup CSS lead, `<name>-ui` naming,
131
+ the usage-rule list, `theme` palette + `data-scheme` mode as two
132
+ SEPARATE attributes, `--a-*` tokens incl. `--a-primary` + `--a-chrome-light`
133
+ for primary fills). Keep them in sync if you edit one.
134
+
135
+ ## Where the loads actually land
136
+
137
+ Guidelines steer Make to *emit* the setup; this is where it ends up.
138
+ Figma Make generates a real web app you can edit, so the load lines go
139
+ wherever the document `<head>` is assembled. Two routes, in order of
140
+ preference:
141
+
142
+ 1. **Document head (best).** If Make exposes an `index.html` or a
143
+ "custom `<head>` / external resources" affordance, paste the three
144
+ lines from "The 90-second default" there verbatim. This is the
145
+ most robust — the elements upgrade before your app's first render.
146
+
147
+ 2. **App entry (React fallback).** If Make only gives you a React entry
148
+ (`App.tsx` / `main.tsx`) and no head access, inject at module load.
149
+ Put this at the **top** of the entry file, outside the component:
150
+
151
+ ```jsx
152
+ // AdiaUI CDN bootstrap — runs once, before first render.
153
+ const ADIA = "https://cdn.jsdelivr.net/npm/@adia-ai";
154
+ for (const href of [
155
+ `${ADIA}/web-components@0.6/dist/web-components.min.css`,
156
+ `${ADIA}/web-modules@0.6/dist/shell/admin-shell.min.css`,
157
+ ]) {
158
+ if (!document.querySelector(`link[href="${href}"]`)) {
159
+ const l = document.createElement("link");
160
+ l.rel = "stylesheet";
161
+ l.href = href;
162
+ document.head.appendChild(l);
163
+ }
164
+ }
165
+ import(/* @vite-ignore */ `${ADIA}/web-modules@0.6/dist/everything.min.js`);
166
+ ```
167
+
168
+ `import()` (dynamic) is used so the bundler doesn't try to resolve the
169
+ URL at build time. The CSS goes in via `<link>` because bundlers can't
170
+ `import` a remote `.css`.
171
+
172
+ ## Using the tags in JSX (React)
173
+
174
+ Custom elements are just lowercase-hyphenated tags — write them directly
175
+ in JSX. AdiaUI is **attribute-driven**, which is exactly what React emits
176
+ for unknown props, so the common cases just work:
177
+
178
+ ```jsx
179
+ <card-ui>
180
+ <header><h3>Plan</h3></header>
181
+ <section>
182
+ <text-ui>Pro — $29/mo</text-ui>
183
+ <button-ui variant="primary" text="Upgrade"></button-ui>
184
+ </section>
185
+ </card-ui>
186
+ ```
187
+
188
+ Caveats for the React context specifically:
189
+
190
+ - **Use `class`, not `className`, inside AdiaUI subtrees** when you hand-
191
+ write attributes — these are real DOM elements, not React host
192
+ components. (React still accepts `className` on its own `<div>`s.)
193
+ - **Booleans are presence-based.** `<switch-ui checked>` not
194
+ `checked={true}` — render the attribute only when true:
195
+ `{isOn && <switch-ui checked></switch-ui>}` or
196
+ `<switch-ui {...(isOn ? {checked: ""} : {})}></switch-ui>`.
197
+ - **Content via `text=` where the yaml says so.** `<button-ui>` renders
198
+ its label from `text="…"` (a CSS `::after`), not from JSX children —
199
+ same for `badge-ui`. `card-ui` / `kbd-ui` use the default slot
200
+ (children). When in doubt, the per-component contract is in the kit
201
+ catalog (`§1 Catalog Lookup`).
202
+ - **Events** are native `CustomEvent`s. In React 19 `onClick`-style
203
+ props bind to custom-element events; on older React add a `ref` +
204
+ `el.addEventListener('change', …)`. Most AdiaUI form elements also
205
+ emit standard `input`/`change` so the native path is usually enough.
206
+
207
+ ## Version-pin policy
208
+
209
+ - **`@0.6`** (default) — latest `0.6.x` patch, auto-tracked. Best for
210
+ Make demos and prototypes.
211
+ - **`@0.6.45`** (exact) — pin for a reproducible artifact you'll hand
212
+ off. Bump it deliberately.
213
+ - **Avoid `@latest`** — it crosses MINOR/MAJOR boundaries and can pull a
214
+ breaking change into a working prototype without warning.
215
+
216
+ All 9 `@adia-ai/*` packages move in lockstep, so the version you choose
217
+ must match across **both** `web-components` and `web-modules` URLs.
218
+
219
+ ## Quick verification
220
+
221
+ After the loads are in, drop one of each tier and reload:
222
+
223
+ ```html
224
+ <button-ui variant="primary" text="It works"></button-ui>
225
+ <card-ui><section><text-ui>Styled + registered.</text-ui></section></card-ui>
226
+ ```
227
+
228
+ - Button shows a filled primary style + label → **CSS + JS both live.**
229
+ - Unstyled / no label → CSS link missing or wrong order.
230
+ - Tag stays an empty inline element → JS bundle didn't load (check the
231
+ Network tab for the `everything.min.js` request).
232
+ - Icons blank → you're on the primitives-only path without the
233
+ `icons-manifest.js` co-load (switch to `everything.min.js`).
234
+
235
+ ## Cross-references
236
+
237
+ - `references/setup.md` §Step 0.5 — the same CDN facts for the raw-Vite
238
+ cold-start path (plus the npm-install route Make doesn't need).
239
+ - `references/css-policy.md` — why the CSS is a separate explicit load
240
+ (the Light-DOM cascade-control reason it isn't bundled into the JS).
241
+ - Live CDN guide: [ui-kit.exe.xyz/site/getting-started/cdn-usage](https://ui-kit.exe.xyz/site/getting-started/cdn-usage).
242
+ - The package READMEs (`@adia-ai/web-components`, `@adia-ai/web-modules`
243
+ on npm) carry the canonical CDN block — kept on the `@0.6` range by the
244
+ `check:cdn-pins` release gate.
@@ -0,0 +1,307 @@
1
+ # §Flows — Auth, registration, onboarding wizards
2
+
3
+ > **Loading note.** Reference bundle extracted from `SKILL.md` per the
4
+ > §LoadingProtocol inversion contract (v2.20.3+). Load via
5
+ > `skill_view(name='adia-ui-kit', file_path='references/flows-auth.md')`
6
+ > When implementing sign-in / sign-up / forgot-password / multi-step registration / first-run onboarding flows. Skip if your task doesn't involve these surfaces — the
7
+ > seed has a stub naming each flow + the load invocation.
8
+
9
+ ### Auth flows
10
+
11
+ All auth surfaces center a `<card-ui style="max-width: 32rem">`.
12
+ No app shell needed for standalone auth pages.
13
+
14
+ **Sign-in: email entry (step 1 of 2)**
15
+
16
+ ```html
17
+ <main style="min-height: 100vh; display: grid; place-items: center;">
18
+ <card-ui style="max-width: 32rem; width: 100%">
19
+ <header>
20
+ <col-ui align="center" gap="1">
21
+ <img src="/logo.svg" alt="Logo" style="height: 4rem" />
22
+ <h1>Sign in</h1>
23
+ <text-ui color="subtle">Continue with email or a connected account.</text-ui>
24
+ </col-ui>
25
+ </header>
26
+ <section>
27
+ <col-ui gap="4">
28
+ <form size="lg" action="/auth/password" method="get">
29
+ <col-ui gap="4">
30
+ <input-ui label="Email" type="email" name="email"
31
+ autocomplete="email" placeholder="you@example.com" required></input-ui>
32
+ <button-ui text="Continue with Email" variant="primary" type="submit"></button-ui>
33
+ </col-ui>
34
+ </form>
35
+ <divider-ui label="or"></divider-ui>
36
+ <col-ui gap="2">
37
+ <button-ui text="Continue with Google" icon="google-logo" variant="outline"></button-ui>
38
+ <button-ui text="Continue with GitHub" icon="github-logo" variant="outline"></button-ui>
39
+ <button-ui text="Continue with SSO" icon="buildings" variant="outline"></button-ui>
40
+ </col-ui>
41
+ <text-ui text-align="center" color="subtle" size="sm">
42
+ No account? <a href="/auth/sign-up">Sign up</a>
43
+ </text-ui>
44
+ </col-ui>
45
+ </section>
46
+ </card-ui>
47
+ </main>
48
+ ```
49
+
50
+ **Sign-in: password (step 2 of 2)**
51
+
52
+ ```html
53
+ <card-ui style="max-width: 32rem; width: 100%">
54
+ <header>
55
+ <col-ui align="center" gap="1">
56
+ <h1>Enter your password</h1>
57
+ <text-ui color="subtle">Signing in as <strong>you@example.com</strong></text-ui>
58
+ </col-ui>
59
+ </header>
60
+ <section>
61
+ <col-ui gap="6">
62
+ <form size="lg">
63
+ <col-ui gap="4">
64
+ <input-ui label="Password" type="password" name="password"
65
+ autocomplete="current-password" placeholder="••••••••" required></input-ui>
66
+ <row-ui justify="space-between" align="center">
67
+ <check-ui name="remember" label="Remember me"></check-ui>
68
+ <a href="/auth/forgot-password">Forgot password?</a>
69
+ </row-ui>
70
+ <button-ui text="Sign in" variant="primary" type="submit"></button-ui>
71
+ </col-ui>
72
+ </form>
73
+ <divider-ui label="or use a one-time code"></divider-ui>
74
+ <col-ui gap="2">
75
+ <button-ui text="Email me a magic link" icon="envelope-simple" variant="outline"></button-ui>
76
+ <button-ui text="Send me a 6-digit code" icon="number-square-six" variant="outline"></button-ui>
77
+ </col-ui>
78
+ <text-ui text-align="center" color="subtle">
79
+ <a href="/auth/sign-in">← Use a different email</a>
80
+ </text-ui>
81
+ </col-ui>
82
+ </section>
83
+ </card-ui>
84
+ ```
85
+
86
+ **Email OTP / magic-link verify**
87
+
88
+ ```html
89
+ <card-ui style="max-width: 32rem; width: 100%">
90
+ <header>
91
+ <col-ui align="center" gap="1">
92
+ <h1>Verify your email</h1>
93
+ <text-ui color="subtle">We sent a 6-digit code to <strong>you@example.com</strong>.</text-ui>
94
+ </col-ui>
95
+ </header>
96
+ <section>
97
+ <col-ui gap="6">
98
+ <col-ui align="center">
99
+ <otp-input-ui length="6" autocomplete="one-time-code"></otp-input-ui>
100
+ </col-ui>
101
+ <alert-ui variant="warning" icon="warning">
102
+ <span slot="content">Already have an account?
103
+ <a href="/auth/sign-in">Try signing in instead</a>.</span>
104
+ </alert-ui>
105
+ <text-ui text-align="center" color="subtle">
106
+ Didn't get a code? <a href="#">Resend</a>
107
+ </text-ui>
108
+ </col-ui>
109
+ </section>
110
+ </card-ui>
111
+ ```
112
+
113
+ **Forgot password + reset**
114
+
115
+ ```html
116
+ <!-- Step 1: request link -->
117
+ <card-ui style="max-width: 32rem; width: 100%">
118
+ <header><col-ui align="center" gap="1">
119
+ <h1>Forgot your password?</h1>
120
+ <text-ui color="subtle">We'll send a reset link to your email.</text-ui>
121
+ </col-ui></header>
122
+ <section>
123
+ <form size="lg" action="/auth/forgot/sent" method="get">
124
+ <col-ui gap="4">
125
+ <input-ui label="Email" type="email" name="email"
126
+ autocomplete="email" placeholder="you@example.com" required></input-ui>
127
+ <button-ui text="Send reset link" variant="primary" type="submit"></button-ui>
128
+ </col-ui>
129
+ </form>
130
+ </section>
131
+ </card-ui>
132
+
133
+ <!-- Step 2: set new password (from email link) -->
134
+ <card-ui style="max-width: 32rem; width: 100%">
135
+ <header><col-ui align="center" gap="1"><h1>Set a new password</h1></col-ui></header>
136
+ <section>
137
+ <form size="lg">
138
+ <col-ui gap="4">
139
+ <field-ui label="New password" hint="At least 12 characters">
140
+ <input-ui type="password" name="password" autocomplete="new-password" minlength="12" required></input-ui>
141
+ </field-ui>
142
+ <input-ui label="Confirm password" type="password" name="confirm"
143
+ autocomplete="new-password" required></input-ui>
144
+ <button-ui text="Set password" variant="primary" type="submit"></button-ui>
145
+ </col-ui>
146
+ </form>
147
+ </section>
148
+ </card-ui>
149
+ ```
150
+
151
+ ---
152
+
153
+
154
+ ### Registration flow (multi-step wizard)
155
+
156
+ Two-column: story pane (left) + form (right). `<step-progress-ui>` in the footer.
157
+
158
+ **Shell — wraps every step:**
159
+
160
+ ```html
161
+ <main data-reg>
162
+ <aside data-reg-story>
163
+ <a href="/"><img src="/logo.svg" alt="" /><strong>Your App</strong></a>
164
+ <div data-reg-story-content>
165
+ <h2>Step headline.</h2>
166
+ <p>Why this step matters to the user.</p>
167
+ <text-ui color="subtle" size="sm">Step 1 of 4 · Workspace setup</text-ui>
168
+ </div>
169
+ </aside>
170
+
171
+ <form data-reg-input action="/registration/next" method="get">
172
+ <header data-reg-heading>
173
+ <h1>Step title</h1>
174
+ <text-ui color="subtle">Optional sub-copy.</text-ui>
175
+ </header>
176
+ <section data-reg-form>
177
+ <!-- step-specific fields -->
178
+ </section>
179
+ <footer>
180
+ <step-progress-ui value="1" total="4" caption="Step 1 of 4"></step-progress-ui>
181
+ <div data-reg-actions>
182
+ <a href="/registration/prev">← Back</a>
183
+ <button-ui text="Continue" variant="primary" type="submit"></button-ui>
184
+ </div>
185
+ </footer>
186
+ </form>
187
+ </main>
188
+ ```
189
+
190
+ **Step: name entity (workspace / org / project)**
191
+
192
+ ```html
193
+ <section data-reg-form>
194
+ <field-ui inline label="Workspace name" hint="Letters, numbers, and spaces.">
195
+ <input-ui name="workspace" autocomplete="organization"
196
+ placeholder="Acme Inc." required></input-ui>
197
+ </field-ui>
198
+ </section>
199
+ ```
200
+
201
+ **Step: personal profile**
202
+
203
+ ```html
204
+ <section data-reg-form>
205
+ <field-ui inline label="Full name">
206
+ <input-ui name="name" autocomplete="name" placeholder="Jane Doe" required></input-ui>
207
+ </field-ui>
208
+ <field-ui inline label="Title">
209
+ <input-ui name="title" placeholder="e.g. Senior Designer"
210
+ autocomplete="organization-title"></input-ui>
211
+ </field-ui>
212
+ <field-ui inline label="Department">
213
+ <select-ui name="department">
214
+ <option value="">Pick one…</option>
215
+ <option value="engineering">Engineering</option>
216
+ <option value="product">Product</option>
217
+ <option value="design">Design</option>
218
+ </select-ui>
219
+ </field-ui>
220
+ </section>
221
+ ```
222
+
223
+ **Step: invite team**
224
+
225
+ ```html
226
+ <section data-reg-form>
227
+ <field-ui label="Email addresses">
228
+ <textarea-ui name="invites" rows="3"
229
+ placeholder="alex@acme.com, sarah@acme.com (comma or newline)"></textarea-ui>
230
+ </field-ui>
231
+ <field-ui inline label="Default role">
232
+ <select-ui name="role" value="member">
233
+ <option value="admin">Admin</option>
234
+ <option value="member">Member</option>
235
+ <option value="viewer">Viewer · read-only</option>
236
+ </select-ui>
237
+ </field-ui>
238
+ <field-ui inline label="Send welcome email">
239
+ <switch-ui name="welcome-email" checked></switch-ui>
240
+ </field-ui>
241
+ </section>
242
+ ```
243
+
244
+ ---
245
+
246
+
247
+ ### Onboarding flow (post-registration wizard)
248
+
249
+ Same two-column shell as registration (`data-onb`).
250
+ Uses `<option-card-ui>` for persona selection.
251
+
252
+ **Shell — wraps every step:**
253
+
254
+ ```html
255
+ <main data-onb>
256
+ <aside data-onb-story>
257
+ <a href="/"><img src="/logo.svg" alt="" /><strong>Your App</strong></a>
258
+ <div data-onb-story-content>
259
+ <h2>Step headline.</h2>
260
+ <p>Why this step matters.</p>
261
+ <text-ui color="subtle" size="sm">Step 2 of 5 · Setup</text-ui>
262
+ </div>
263
+ </aside>
264
+
265
+ <form data-onb-input action="/onboarding/next" method="get">
266
+ <header data-onb-heading>
267
+ <h1>Step question</h1>
268
+ <text-ui color="subtle">Pick the closest match.</text-ui>
269
+ </header>
270
+ <div data-onb-form>
271
+ <!-- step content -->
272
+ </div>
273
+ <footer>
274
+ <step-progress-ui value="2" total="5" caption="Step 2 of 5"></step-progress-ui>
275
+ <div data-onb-actions>
276
+ <a href="/onboarding/prev">← Back</a>
277
+ <button-ui text="Continue" variant="primary" type="submit"></button-ui>
278
+ </div>
279
+ </footer>
280
+ </form>
281
+ </main>
282
+ ```
283
+
284
+ **Step: persona / role picker**
285
+
286
+ ```html
287
+ <div data-onb-form>
288
+ <div role="radiogroup" aria-label="Primary role"
289
+ style="display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--a-space-3)">
290
+ <option-card-ui name="role" value="developer" required
291
+ heading="Developer" description="Wire APIs, ship features, monitor releases.">
292
+ </option-card-ui>
293
+ <option-card-ui name="role" value="designer"
294
+ heading="Designer" description="Compose patterns, review, hand off.">
295
+ </option-card-ui>
296
+ <option-card-ui name="role" value="analyst"
297
+ heading="Analyst" description="Query, chart, share insight, set alerts.">
298
+ </option-card-ui>
299
+ <option-card-ui name="role" value="admin"
300
+ heading="Admin" description="Configure, govern, manage access and billing.">
301
+ </option-card-ui>
302
+ </div>
303
+ </div>
304
+ ```
305
+
306
+ ---
307
+