@adia-ai/a2ui-corpus 0.3.2 → 0.3.4

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 (183) hide show
  1. package/CHANGELOG.md +89 -0
  2. package/README.md +64 -0
  3. package/catalog-a2ui_0_9.json +721 -39
  4. package/catalog-a2ui_0_9_rules.txt +29 -0
  5. package/chunks/_index.json +5 -5
  6. package/chunks/agent-activity-feed.json +1 -1
  7. package/chunks/agent-reasoning-collapsed.json +1 -1
  8. package/chunks/auth-account-deleted-actions.json +1 -1
  9. package/chunks/auth-account-deleted.json +1 -1
  10. package/chunks/auth-card-content.json +1 -1
  11. package/chunks/auth-card-header.json +1 -1
  12. package/chunks/auth-email-entry.json +1 -1
  13. package/chunks/auth-email-verify-confirm.json +1 -1
  14. package/chunks/auth-email-verify.json +1 -1
  15. package/chunks/auth-forbidden-actions.json +1 -1
  16. package/chunks/auth-forbidden.json +1 -1
  17. package/chunks/auth-invite-actions.json +1 -1
  18. package/chunks/auth-invite-team-card.json +1 -1
  19. package/chunks/auth-link-expired-form.json +1 -1
  20. package/chunks/auth-link-expired.json +1 -1
  21. package/chunks/auth-locked-account.json +1 -1
  22. package/chunks/auth-locked-recovery-options.json +1 -1
  23. package/chunks/auth-mfa-enrollment-submit.json +1 -1
  24. package/chunks/auth-mfa-enrollment.json +1 -1
  25. package/chunks/auth-mfa-fallback-actions.json +1 -1
  26. package/chunks/auth-mfa-recovery.json +1 -1
  27. package/chunks/auth-new-password-form.json +1 -1
  28. package/chunks/auth-new-password.json +1 -1
  29. package/chunks/auth-oauth-fallback-actions.json +1 -1
  30. package/chunks/auth-oauth-interstitial.json +1 -1
  31. package/chunks/auth-password-challenge.json +1 -1
  32. package/chunks/auth-password-reset-form.json +1 -1
  33. package/chunks/auth-password-reset.json +1 -1
  34. package/chunks/auth-profile-form.json +1 -1
  35. package/chunks/auth-profile-setup.json +1 -1
  36. package/chunks/auth-reset-sent.json +1 -1
  37. package/chunks/auth-session-expired-actions.json +1 -1
  38. package/chunks/auth-session-expired.json +1 -1
  39. package/chunks/auth-signin-card-email.json +1 -1
  40. package/chunks/auth-signin-card-magic-link.json +1 -1
  41. package/chunks/auth-signin-card-mfa.json +1 -1
  42. package/chunks/auth-signin-card-otp.json +1 -1
  43. package/chunks/auth-signin-card-password.json +1 -1
  44. package/chunks/auth-signin-card-recovery.json +1 -1
  45. package/chunks/auth-signout-actions.json +1 -1
  46. package/chunks/auth-signout.json +1 -1
  47. package/chunks/auth-signup-email-entry.json +1 -1
  48. package/chunks/auth-signup-entry.json +1 -1
  49. package/chunks/auth-signup-social-auths.json +1 -1
  50. package/chunks/auth-signup-verify.json +1 -1
  51. package/chunks/auth-social-auths.json +1 -1
  52. package/chunks/auth-sso-providers.json +1 -1
  53. package/chunks/auth-sso-required.json +1 -1
  54. package/chunks/auth-team-invite.json +1 -1
  55. package/chunks/chat-streaming-surface.json +1 -1
  56. package/chunks/{command-palette-grouped.json → command-palette.json} +2 -2
  57. package/chunks/commerce-pricing-tiers.json +1 -1
  58. package/chunks/conversion-funnel-6step.json +1 -1
  59. package/chunks/dashboard-acquisition-panel.json +1 -1
  60. package/chunks/dashboard-admin-page.json +2 -2
  61. package/chunks/dashboard-audience-kpis.json +1 -1
  62. package/chunks/dashboard-audience-panel.json +1 -1
  63. package/chunks/dashboard-behavior-panel.json +1 -1
  64. package/chunks/dashboard-chart-recent.json +1 -1
  65. package/chunks/dashboard-cohort-retention.json +1 -1
  66. package/chunks/dashboard-conversion-panel.json +1 -1
  67. package/chunks/dashboard-country-list.json +1 -1
  68. package/chunks/dashboard-filter-bar.json +1 -1
  69. package/chunks/dashboard-funnel.json +1 -1
  70. package/chunks/dashboard-kpi-grid.json +1 -1
  71. package/chunks/dashboard-notifications-feed.json +1 -1
  72. package/chunks/dashboard-notifications-panel.json +1 -1
  73. package/chunks/dashboard-overview-panel.json +1 -1
  74. package/chunks/dashboard-page-header.json +1 -1
  75. package/chunks/dashboard-pages-table.json +1 -1
  76. package/chunks/dashboard-quick-actions.json +1 -1
  77. package/chunks/dashboard-reports-panel.json +1 -1
  78. package/chunks/dashboard-reports-table.json +1 -1
  79. package/chunks/dashboard-spark-cards.json +1 -1
  80. package/chunks/dashboard-storage-card.json +1 -1
  81. package/chunks/dashboard-tabs.json +1 -1
  82. package/chunks/dashboard-team-actions-storage.json +1 -1
  83. package/chunks/dashboard-team-list.json +1 -1
  84. package/chunks/dashboard-traffic-channels.json +1 -1
  85. package/chunks/dashboard-transactions-table.json +1 -1
  86. package/chunks/destructive-confirm-modal.json +1 -1
  87. package/chunks/drawer-2fa-key.json +1 -1
  88. package/chunks/drawer-2fa-sms.json +1 -1
  89. package/chunks/drawer-2fa-totp.json +1 -1
  90. package/chunks/drawer-cancel-sub.json +1 -1
  91. package/chunks/drawer-change-plan.json +1 -1
  92. package/chunks/drawer-custom-roles.json +1 -1
  93. package/chunks/drawer-data-start.json +1 -1
  94. package/chunks/drawer-delete-account.json +1 -1
  95. package/chunks/drawer-delete-workspace.json +1 -1
  96. package/chunks/drawer-discord.json +1 -1
  97. package/chunks/drawer-figma.json +1 -1
  98. package/chunks/drawer-first-dashboard.json +1 -1
  99. package/chunks/drawer-gcal.json +1 -1
  100. package/chunks/drawer-github.json +1 -1
  101. package/chunks/drawer-invite.json +1 -1
  102. package/chunks/drawer-payment-method.json +1 -1
  103. package/chunks/drawer-report.json +1 -1
  104. package/chunks/drawer-revoke-session.json +1 -1
  105. package/chunks/drawer-role.json +1 -1
  106. package/chunks/drawer-slack.json +1 -1
  107. package/chunks/drawer-smtp.json +1 -1
  108. package/chunks/drawer-source.json +1 -1
  109. package/chunks/drawer-transaction.json +1 -1
  110. package/chunks/editor-code-pane.json +1 -1
  111. package/chunks/editor-page-shell.json +1 -1
  112. package/chunks/editor-preview-pane.json +1 -1
  113. package/chunks/error-404-actions.json +1 -1
  114. package/chunks/error-404.json +1 -1
  115. package/chunks/error-500-actions.json +1 -1
  116. package/chunks/error-500.json +1 -1
  117. package/chunks/error-maintenance-actions.json +1 -1
  118. package/chunks/error-maintenance.json +1 -1
  119. package/chunks/error-page-shell.json +1 -1
  120. package/chunks/form-page-shell.json +4 -4
  121. package/chunks/kanban-board-3col.json +1 -1
  122. package/chunks/marketing-hero-cta.json +1 -1
  123. package/chunks/marketing-page-shell.json +1 -1
  124. package/chunks/member-edit-drawer.json +1 -1
  125. package/chunks/onb-completion.json +1 -1
  126. package/chunks/onb-extension-install.json +1 -1
  127. package/chunks/onb-hero-welcome.json +1 -1
  128. package/chunks/onb-import-picker.json +1 -1
  129. package/chunks/onb-mobile-handoff.json +1 -1
  130. package/chunks/onb-notification-prefs.json +1 -1
  131. package/chunks/onb-persona-picker.json +1 -1
  132. package/chunks/onb-provider-tiles.json +1 -1
  133. package/chunks/onb-settings-review.json +1 -1
  134. package/chunks/onb-step-footer.json +1 -1
  135. package/chunks/onb-step-header.json +1 -1
  136. package/chunks/onb-step-progress.json +1 -1
  137. package/chunks/onb-step-shell.json +1 -1
  138. package/chunks/onb-story-pane.json +1 -1
  139. package/chunks/onb-tutorial-steps.json +1 -1
  140. package/chunks/playground-a2ui.json +1 -1
  141. package/chunks/playground-app-shell.json +1 -1
  142. package/chunks/playground-chat.json +1 -1
  143. package/chunks/playground-construct-canvas.json +1 -1
  144. package/chunks/playground-gen-ui.json +1 -1
  145. package/chunks/playground-render-preview.json +1 -1
  146. package/chunks/playground-streams-bridge.json +2 -2
  147. package/chunks/playground-table-toolbar.json +1 -1
  148. package/chunks/reg-address-form.json +1 -1
  149. package/chunks/reg-billing-card.json +1 -1
  150. package/chunks/reg-brand-scrape.json +1 -1
  151. package/chunks/reg-departments-toggle.json +1 -1
  152. package/chunks/reg-extended-profile.json +1 -1
  153. package/chunks/reg-final-done.json +1 -1
  154. package/chunks/reg-helpdesk-grid.json +1 -1
  155. package/chunks/reg-import-picker.json +1 -1
  156. package/chunks/reg-integrations-grid.json +1 -1
  157. package/chunks/reg-invite-form.json +1 -1
  158. package/chunks/reg-legal-entity.json +1 -1
  159. package/chunks/reg-org-chart-review.json +1 -1
  160. package/chunks/reg-profile-identity.json +1 -1
  161. package/chunks/reg-step-footer.json +1 -1
  162. package/chunks/reg-step-header.json +1 -1
  163. package/chunks/reg-step-progress.json +1 -1
  164. package/chunks/reg-step-shell.json +1 -1
  165. package/chunks/reg-story-pane.json +1 -1
  166. package/chunks/reg-success-summary.json +1 -1
  167. package/chunks/reg-team-size.json +1 -1
  168. package/chunks/reg-usecase-picker.json +1 -1
  169. package/chunks/reg-workspace-name.json +1 -1
  170. package/chunks/settings-billing-plan.json +1 -1
  171. package/chunks/settings-general-form.json +1 -1
  172. package/chunks/settings-integrations.json +1 -1
  173. package/chunks/settings-members-invite.json +1 -1
  174. package/chunks/settings-notifications.json +1 -1
  175. package/chunks/settings-page-shell.json +1 -1
  176. package/chunks/settings-profile-security.json +1 -1
  177. package/chunks/user-profile-card.json +1 -1
  178. package/chunks/users-table-badge.json +1 -1
  179. package/compositions/{form → forms}/data-import-wizard.json +1 -1
  180. package/exemplars/README.md +49 -0
  181. package/fragments/layout/auth-card-header.json +64 -0
  182. package/package.json +2 -2
  183. package/scripts/chunk-library.js +14 -6
@@ -0,0 +1,49 @@
1
+ # `exemplars/` — RETIRED 2026-04-28
2
+
3
+ > **This folder is no longer harvested into the corpus.**
4
+ > Don't add `data-chunk` markers expecting them to land in
5
+ > `packages/a2ui/corpus/chunks/`. Use the `apps/<name>/app/<demo>/`
6
+ > layout instead, per ADR-0020.
7
+
8
+ ## What was here
9
+
10
+ `exemplars/` was the v0.0.x and early v0.1.x source surface for
11
+ hand-authored A2UI demonstrations: sample shells, blocks-reference
12
+ prose, prototype layouts. Each piece was a static reference for
13
+ designers and the gen-UI synthesizer's training corpus.
14
+
15
+ ## Why it was retired
16
+
17
+ Three convergent reasons (per the v0.0.6 / mcp v0.0.5 cut on 2026-04-28):
18
+
19
+ 1. **The `data-chunk` marker pipeline replaced it.** Patterns that
20
+ matter as training material now live as live HTML demos under
21
+ `apps/<name>/app/<demo>/<demo>.contents.html` with
22
+ `data-chunk="<slug>"` and `data-chunk-kind` attributes. The
23
+ harvester (`scripts/build/harvest-chunks.mjs`) extracts them into
24
+ `packages/a2ui/corpus/chunks/`.
25
+ 2. **Single source of truth.** Maintaining hand-authored exemplars
26
+ alongside live apps doubled the surface that drifts. Apps are
27
+ already the artifacts users see; harvesting from them keeps demos
28
+ and training material in sync.
29
+ 3. **Composition vs. example.** Compositions and fragments with
30
+ live `$fragment` linking moved into
31
+ `packages/a2ui/corpus/{compositions,fragments}/`; everything else
32
+ (page-level demos) is now sourced from `apps/`.
33
+
34
+ ## What's still in this folder
35
+
36
+ The 37 files (~248 KB) are kept on disk as historical reference
37
+ (audit reports, blocks-reference prose, prototype shells) — they
38
+ **don't ship** in the npm tarball (see the package.json `files`
39
+ field in `packages/a2ui/corpus/`). Consider this folder a frozen
40
+ snapshot of the pre-v0.1 era; it may be removed entirely in a
41
+ future cleanup.
42
+
43
+ ## See also
44
+
45
+ - [`packages/a2ui/corpus/README.md`](../README.md) — current corpus structure
46
+ - [`docs/specs/genui-chunk-marker.md`](../../../../docs/specs/genui-chunk-marker.md) — `data-chunk` convention
47
+ - [`.agents/skills/chunk-corpus-migration/SKILL.md`](../../../../.agents/skills/chunk-corpus-migration/SKILL.md) — corpus-migration playbook
48
+ - ADR-0020 — apps/ + co-located component demos
49
+ - Backlog item #92 (closed by this README)
@@ -0,0 +1,64 @@
1
+ {
2
+ "$schema": "../_schema.json",
3
+ "name": "auth-card-header",
4
+ "version": 1,
5
+ "kind": "fragment",
6
+ "semantic_role": "auth-titlebar",
7
+ "description": "Authentication card titlebar — centered logo (linking home), heading, and short body text. The canonical header for any auth, error, or onboarding shell card. Promoted from the chunk corpus where this exact shape appeared 23× across user-flow auth screens (sign-in, sign-up, forgot-password, MFA, account-locked, etc.) plus errors/{404,500,maintenance}.",
8
+ "shape": "Header(Column[align=center,gap=1](Image[role=logo], Text[v=heading], Text[v=body]))",
9
+ "tags": {
10
+ "purpose": ["auth-titlebar", "card-header"],
11
+ "layout": "stacked",
12
+ "alignment": "center"
13
+ },
14
+ "keywords": ["auth", "header", "title", "logo", "card", "sign-in", "sign-up", "error", "onboarding"],
15
+ "slots": [
16
+ {
17
+ "name": "logoSrc",
18
+ "targetId": "ach-logo",
19
+ "attribute": "src",
20
+ "required": true,
21
+ "description": "Path to the brand logo image (SVG preferred)"
22
+ },
23
+ {
24
+ "name": "logoAlt",
25
+ "targetId": "ach-logo",
26
+ "attribute": "alt",
27
+ "defaultValue": "Logo",
28
+ "description": "Alt text for the logo image"
29
+ },
30
+ {
31
+ "name": "heading",
32
+ "targetId": "ach-heading",
33
+ "attribute": "textContent",
34
+ "required": true,
35
+ "description": "Primary heading — auth state or error code (e.g. 'Sign in', '404 — Page not found', 'Reset your password')"
36
+ },
37
+ {
38
+ "name": "body",
39
+ "targetId": "ach-body",
40
+ "attribute": "textContent",
41
+ "description": "Short supporting copy below the heading"
42
+ }
43
+ ],
44
+ "template": [
45
+ { "id": "ach-root", "component": "Header", "children": ["ach-col"] },
46
+ { "id": "ach-col", "component": "Column", "align": "center", "gap": "1", "children": ["ach-logo", "ach-heading", "ach-body"] },
47
+ { "id": "ach-logo", "component": "Image", "src": "/icons/agent-ui-light.svg", "alt": "Logo" },
48
+ { "id": "ach-heading", "component": "Text", "variant": "heading", "textContent": "Heading" },
49
+ { "id": "ach-body", "component": "Text", "variant": "body", "textContent": "" }
50
+ ],
51
+ "links": {
52
+ "uses_components": ["Header", "Column", "Image", "Text"],
53
+ "uses_fragments": [],
54
+ "used_by": [],
55
+ "related": ["card-header-heading", "card-header-with-description"],
56
+ "spawned_from": ["chunk:auth-card-header"]
57
+ },
58
+ "metrics": {
59
+ "leverage": 23.0,
60
+ "pattern_count": 0,
61
+ "instance_count": 23,
62
+ "_provenance": "Promoted 2026-05-07 from chunks/auth-card-header.json (23 instances across user-flow auth + errors apps). See docs/reports/chunk-reconcile-2026-05-07.md for the full reconciliation context."
63
+ }
64
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adia-ai/a2ui-corpus",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "type": "module",
5
5
  "description": "AdiaUI A2UI training corpus \u2014 patterns, fragments, compositions, exemplars, eval fixtures, feedback, gap registry. Consumed by the compose engine's retrieval layer + the MCP pipeline.",
6
6
  "exports": {
@@ -38,4 +38,4 @@
38
38
  "url": "git+https://github.com/adiahealth/gen-ui-kit.git",
39
39
  "directory": "packages/a2ui/corpus"
40
40
  }
41
- }
41
+ }
@@ -146,12 +146,20 @@ export async function searchChunksAsync(query, { kind, limit = 20 } = {}) {
146
146
  if (!query || typeof query !== 'string') return [];
147
147
 
148
148
  let cosineByName = null;
149
- try {
150
- const { scoreAll, available } = await import('../../retrieval/embedding/chunk-embedding-retriever.js');
151
- if (await available()) {
152
- cosineByName = await scoreAll(query);
153
- }
154
- } catch { /* embeddings unavailable — keyword-only */ }
149
+ // Env-var override: A2UI_DISABLE_EMBEDDINGS=1 forces keyword-only mode.
150
+ // Used by `npm run eval:diff -- --engine chunk-zettel-fast` and any
151
+ // diagnostic that needs to confirm the keyword path is independently
152
+ // healthy (i.e. retrieval works even when embeddings are stale or
153
+ // missing). Default: embeddings enabled when available.
154
+ const embeddingsDisabled = process.env.A2UI_DISABLE_EMBEDDINGS === '1';
155
+ if (!embeddingsDisabled) {
156
+ try {
157
+ const { scoreAll, available } = await import('../../retrieval/embedding/chunk-embedding-retriever.js');
158
+ if (await available()) {
159
+ cosineByName = await scoreAll(query);
160
+ }
161
+ } catch { /* embeddings unavailable — keyword-only */ }
162
+ }
155
163
 
156
164
  const candidates = [];
157
165
  for (const [name, rec] of chunks) {