@adia-ai/adia-ui-forge 0.1.2 → 0.8.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.
Files changed (196) hide show
  1. package/.claude-plugin/plugin.json +3 -6
  2. package/CHANGELOG.md +27 -26
  3. package/README.md +35 -40
  4. package/agents/a2ui-engineer.md +26 -0
  5. package/agents/component-author.md +29 -0
  6. package/agents/framework-verifier.md +26 -0
  7. package/agents/release-engineer.md +25 -0
  8. package/agents/routing-corpus.json +318 -0
  9. package/bin/demo-postwrite-pattern-gate +94 -0
  10. package/bin/forge-lint +17 -2
  11. package/bin/sidecar-prewrite-guard +104 -0
  12. package/commands/deploy.md +9 -0
  13. package/commands/dogfood.md +10 -0
  14. package/commands/gen-review.md +9 -0
  15. package/commands/release.md +10 -0
  16. package/hooks/hooks.json +15 -0
  17. package/package.json +3 -5
  18. package/references/contracts/a2ui-mcp-surface.md +35 -0
  19. package/references/contracts/migration-guide-format.md +34 -0
  20. package/references/shared/content-trust.md +19 -74
  21. package/skills/adia-a2ui/SKILL.md +99 -0
  22. package/skills/{adia-ui-a2ui → adia-a2ui}/evals/routing-corpus.json +10 -10
  23. package/skills/adia-a2ui/references/anti-patterns.md +27 -0
  24. package/skills/adia-a2ui/references/chunk-authoring.md +71 -0
  25. package/skills/adia-a2ui/references/corpus-discipline.md +68 -0
  26. package/skills/adia-a2ui/references/eval-diagnostics.md +86 -0
  27. package/skills/adia-a2ui/references/format-extension-decisions.md +66 -0
  28. package/skills/adia-a2ui/references/leverage-rules.md +52 -0
  29. package/skills/adia-a2ui/references/mcp-pipeline-ops.md +83 -0
  30. package/skills/adia-a2ui/references/mcp-tool-reference.md +59 -0
  31. package/skills/adia-a2ui/references/pipeline-overview.md +115 -0
  32. package/skills/adia-a2ui/references/semantic-fail-lifting.md +74 -0
  33. package/skills/adia-a2ui/references/strategy-engines.md +109 -0
  34. package/skills/adia-a2ui/references/zettel-calibration.md +104 -0
  35. package/skills/adia-author/SKILL.md +112 -0
  36. package/skills/adia-author/evals/routing-corpus.json +222 -0
  37. package/skills/{adia-ui-authoring → adia-author}/references/anti-patterns.md +33 -4
  38. package/skills/{adia-ui-authoring → adia-author}/references/authoring-cycle.md +9 -11
  39. package/skills/adia-author/references/canonical-pattern-index.md +243 -0
  40. package/skills/{adia-ui-authoring → adia-author}/references/code-style.md +19 -21
  41. package/skills/adia-author/references/common-gotchas.md +129 -0
  42. package/skills/adia-author/references/composite-demo-protocol.md +271 -0
  43. package/skills/{adia-ui-authoring → adia-author}/references/css-patterns.md +19 -6
  44. package/skills/{adia-ui-authoring → adia-author}/references/lifecycle-patterns.md +1 -0
  45. package/skills/{adia-ui-authoring → adia-author}/references/llm-bridge.md +3 -5
  46. package/skills/{adia-ui-authoring → adia-author}/references/module-promotion.md +22 -40
  47. package/skills/{adia-ui-authoring → adia-author}/references/primitive-audit.md +2 -4
  48. package/skills/{adia-ui-authoring → adia-author}/references/shell-patterns.md +12 -18
  49. package/skills/{adia-ui-authoring → adia-author}/references/token-contract.md +5 -7
  50. package/skills/{adia-ui-authoring → adia-author}/references/worked-example.md +3 -3
  51. package/skills/{adia-ui-authoring → adia-author}/references/yaml-contract.md +3 -3
  52. package/skills/{adia-ui-authoring → adia-author}/scripts/build-canonical-pattern-index.mjs +3 -3
  53. package/skills/adia-deploy/SKILL.md +128 -0
  54. package/skills/adia-deploy/references/deploy-playbooks.md +276 -0
  55. package/skills/adia-dogfood/SKILL.md +124 -0
  56. package/skills/adia-dogfood/references/admin-shell-anatomy.md +77 -0
  57. package/skills/adia-dogfood/references/app-shell-pitfalls.md +66 -0
  58. package/skills/adia-dogfood/references/card-anatomy-sweep.md +66 -0
  59. package/skills/adia-dogfood/references/html-attr-sweep.md +63 -0
  60. package/skills/adia-dogfood/references/native-leak-annotations.md +73 -0
  61. package/skills/adia-dogfood/references/visual-probe-triage.md +80 -0
  62. package/skills/{adia-ui-dogfood → adia-dogfood}/scripts/analyze.mjs +30 -14
  63. package/skills/adia-gen-review/SKILL.md +127 -0
  64. package/skills/adia-gen-review/references/corpus-html-patterns.md +279 -0
  65. package/skills/adia-gen-review/references/loop-protocol.md +216 -0
  66. package/skills/adia-gen-review/references/rubric-cosmetic.md +100 -0
  67. package/skills/adia-gen-review/references/rubric-decompose.md +101 -0
  68. package/skills/adia-gen-review/references/rubric-score.md +214 -0
  69. package/skills/{adia-ui-gen-review → adia-gen-review}/references/scores.schema.json +2 -2
  70. package/skills/{adia-ui-gen-review → adia-gen-review}/scripts/gen-review-coverage-audit.mjs +4 -4
  71. package/skills/{adia-ui-gen-review → adia-gen-review}/scripts/gen-review-decompose.mjs +10 -6
  72. package/skills/{adia-ui-gen-review → adia-gen-review}/scripts/gen-review-status.mjs +5 -5
  73. package/skills/{adia-ui-gen-review → adia-gen-review}/scripts/validate-cycle-scores.mjs +5 -5
  74. package/skills/adia-llm-internals/SKILL.md +77 -0
  75. package/skills/{adia-ui-llm → adia-llm-internals}/references/adapter-contract.md +4 -2
  76. package/skills/{adia-ui-llm → adia-llm-internals}/references/add-a-provider.md +4 -5
  77. package/skills/{adia-ui-llm → adia-llm-internals}/references/bridge-facade.md +10 -3
  78. package/skills/{adia-ui-llm → adia-llm-internals}/references/browser-proxy-boundary.md +1 -1
  79. package/skills/{adia-ui-llm → adia-llm-internals}/references/model-registry.md +5 -3
  80. package/skills/{adia-ui-llm → adia-llm-internals}/references/streaming-sse.md +2 -2
  81. package/skills/adia-release/SKILL.md +72 -0
  82. package/skills/adia-release/references/changelog-discipline.md +119 -0
  83. package/skills/adia-release/references/cut-procedure.md +247 -0
  84. package/skills/adia-release/references/gates-catalog.md +222 -0
  85. package/skills/adia-release/references/independent-package-release.md +52 -0
  86. package/skills/adia-release/references/migration-guide-authoring.md +86 -0
  87. package/skills/adia-release/references/notes-authoring.md +90 -0
  88. package/skills/adia-release/references/recovery-paths.md +106 -0
  89. package/skills/{adia-ui-release → adia-release}/scripts/bump.mjs +27 -2
  90. package/skills/{adia-ui-release → adia-release}/scripts/dispatch-publish.mjs +72 -6
  91. package/skills/{adia-ui-release → adia-release}/scripts/insert-stub.mjs +6 -4
  92. package/skills/adia-release/scripts/package-paths.mjs +50 -0
  93. package/skills/{adia-ui-release → adia-release}/scripts/promote-unreleased.mjs +4 -3
  94. package/skills/{adia-ui-release → adia-release}/scripts/release-pack.mjs +48 -27
  95. package/skills/{adia-ui-release → adia-release}/scripts/tag-lockstep.mjs +15 -3
  96. package/skills/adia-site-docs/SKILL.md +68 -0
  97. package/skills/adia-site-docs/evals/audit-report.md +30 -0
  98. package/skills/adia-site-docs/evals/routing-corpus.json +176 -0
  99. package/skills/adia-site-docs/intent.md +72 -0
  100. package/bin/lib/audit-axes.mjs +0 -555
  101. package/bin/lib/dry-run-irreversible.mjs +0 -236
  102. package/bin/lib/run-skill-evals.mjs +0 -487
  103. package/bin/lib/teach-router.mjs +0 -250
  104. package/commands/adia-forge-a2ui.md +0 -10
  105. package/commands/adia-forge-author.md +0 -10
  106. package/commands/adia-forge-dogfood.md +0 -8
  107. package/commands/adia-forge-llm.md +0 -8
  108. package/commands/adia-forge-orient.md +0 -10
  109. package/commands/adia-forge-release.md +0 -8
  110. package/commands/adia-forge-review.md +0 -10
  111. package/references/shared/pev-rationale.md +0 -64
  112. package/references/shared/skill-conventions.md +0 -133
  113. package/skills/adia-ui-a2ui/CHANGELOG.md +0 -32
  114. package/skills/adia-ui-a2ui/SKILL.md +0 -243
  115. package/skills/adia-ui-a2ui/evals/adversarial-corpus.json +0 -75
  116. package/skills/adia-ui-a2ui/evals/teach-routing-cases.json +0 -100
  117. package/skills/adia-ui-a2ui/references/anti-patterns.md +0 -24
  118. package/skills/adia-ui-a2ui/references/chunk-authoring.md +0 -88
  119. package/skills/adia-ui-a2ui/references/corpus-discipline.md +0 -56
  120. package/skills/adia-ui-a2ui/references/eval-diagnostics.md +0 -127
  121. package/skills/adia-ui-a2ui/references/fragment-graph.md +0 -91
  122. package/skills/adia-ui-a2ui/references/mcp-pipeline-ops.md +0 -106
  123. package/skills/adia-ui-a2ui/references/mcp-tool-reference.md +0 -398
  124. package/skills/adia-ui-a2ui/references/pipeline-overview.md +0 -175
  125. package/skills/adia-ui-a2ui/references/semantic-fail-lifting.md +0 -120
  126. package/skills/adia-ui-a2ui/references/strategy-engines.md +0 -111
  127. package/skills/adia-ui-a2ui/references/teach-protocol.md +0 -220
  128. package/skills/adia-ui-a2ui/references/zettel-calibration.md +0 -93
  129. package/skills/adia-ui-a2ui/scripts/audit-a2ui-roster.mjs +0 -96
  130. package/skills/adia-ui-a2ui/scripts/teach-route.mjs +0 -157
  131. package/skills/adia-ui-a2ui/skill.json +0 -38
  132. package/skills/adia-ui-authoring/CHANGELOG.md +0 -32
  133. package/skills/adia-ui-authoring/SKILL.md +0 -256
  134. package/skills/adia-ui-authoring/assets/case-studies/admin-shell-decomposition.md +0 -101
  135. package/skills/adia-ui-authoring/assets/case-studies/maxtokens-32768-discovery.md +0 -109
  136. package/skills/adia-ui-authoring/assets/case-studies/theme-panel-promotion.md +0 -113
  137. package/skills/adia-ui-authoring/evals/adversarial-design-plan-gates.json +0 -138
  138. package/skills/adia-ui-authoring/evals/routing-corpus.json +0 -245
  139. package/skills/adia-ui-authoring/references/canonical-pattern-index.md +0 -179
  140. package/skills/adia-ui-authoring/references/common-gotchas.md +0 -93
  141. package/skills/adia-ui-authoring/references/composite-demo-protocol.md +0 -1084
  142. package/skills/adia-ui-authoring/references/teach-protocol.md +0 -428
  143. package/skills/adia-ui-authoring/scripts/audit-authoring-roster.mjs +0 -148
  144. package/skills/adia-ui-authoring/skill.json +0 -45
  145. package/skills/adia-ui-dogfood/CHANGELOG.md +0 -17
  146. package/skills/adia-ui-dogfood/README.md +0 -62
  147. package/skills/adia-ui-dogfood/SKILL.md +0 -866
  148. package/skills/adia-ui-dogfood/skill.json +0 -40
  149. package/skills/adia-ui-forge/SKILL.md +0 -88
  150. package/skills/adia-ui-forge/evals/routing-corpus.json +0 -30
  151. package/skills/adia-ui-gen-review/CHANGELOG.md +0 -108
  152. package/skills/adia-ui-gen-review/SKILL.md +0 -266
  153. package/skills/adia-ui-gen-review/references/loop-protocol.md +0 -712
  154. package/skills/adia-ui-gen-review/references/rubric-cosmetic.md +0 -144
  155. package/skills/adia-ui-gen-review/references/rubric-decompose.md +0 -117
  156. package/skills/adia-ui-gen-review/references/rubric-score.md +0 -249
  157. package/skills/adia-ui-gen-review/references/teach-protocol.md +0 -214
  158. package/skills/adia-ui-gen-review/skill.json +0 -22
  159. package/skills/adia-ui-llm/CHANGELOG.md +0 -25
  160. package/skills/adia-ui-llm/SKILL.md +0 -165
  161. package/skills/adia-ui-llm/evals/adversarial-corpus.json +0 -75
  162. package/skills/adia-ui-llm/evals/routing-corpus.json +0 -30
  163. package/skills/adia-ui-llm/evals/teach-routing-cases.json +0 -73
  164. package/skills/adia-ui-llm/references/teach-protocol.md +0 -78
  165. package/skills/adia-ui-llm/scripts/audit-llm-roster.mjs +0 -93
  166. package/skills/adia-ui-llm/scripts/teach-route.mjs +0 -119
  167. package/skills/adia-ui-llm/skill.json +0 -33
  168. package/skills/adia-ui-release/CHANGELOG.md +0 -23
  169. package/skills/adia-ui-release/SKILL.md +0 -295
  170. package/skills/adia-ui-release/assets/case-studies/2026-05-20-batch-push-v0.6.14-v0.6.15.md +0 -144
  171. package/skills/adia-ui-release/assets/case-studies/2026-05-20-corpus-drift-remediation-v0.6.15.md +0 -155
  172. package/skills/adia-ui-release/assets/case-studies/2026-05-20-version-skip-correction-v0.6.12.md +0 -114
  173. package/skills/adia-ui-release/assets/case-studies/2026-05-21-author-from-scratch-v0.6.18.md +0 -139
  174. package/skills/adia-ui-release/assets/case-studies/2026-05-21-feedback37-retraction-v0.6.21.md +0 -124
  175. package/skills/adia-ui-release/assets/case-studies/2026-05-21-fn1-enrichment-pass-v0.6.19.md +0 -125
  176. package/skills/adia-ui-release/assets/case-studies/2026-05-21-stale-test-detection-v0.6.20.md +0 -142
  177. package/skills/adia-ui-release/assets/case-studies/2026-05-23-freshness-gate-recovery-v0.6.32.md +0 -97
  178. package/skills/adia-ui-release/assets/case-studies/2026-05-26-catalog-drift-recurring-v0.6.40.md +0 -147
  179. package/skills/adia-ui-release/assets/templates/stub-changelog.template.md +0 -22
  180. package/skills/adia-ui-release/evals/evals.json +0 -164
  181. package/skills/adia-ui-release/references/changelog-discipline.md +0 -250
  182. package/skills/adia-ui-release/references/cycle-happy-path.md +0 -520
  183. package/skills/adia-ui-release/references/exe-deploy.md +0 -149
  184. package/skills/adia-ui-release/references/gates-catalog.md +0 -778
  185. package/skills/adia-ui-release/references/ledger-discipline.md +0 -232
  186. package/skills/adia-ui-release/references/migration-guide-authoring.md +0 -174
  187. package/skills/adia-ui-release/references/multi-agent-baseline.md +0 -207
  188. package/skills/adia-ui-release/references/notes-authoring.md +0 -212
  189. package/skills/adia-ui-release/references/recovery-paths.md +0 -215
  190. package/skills/adia-ui-release/references/rollup-notes.md +0 -208
  191. package/skills/adia-ui-release/references/teach-protocol.md +0 -468
  192. package/skills/adia-ui-release/scripts/audit-gate-roster.mjs +0 -196
  193. package/skills/adia-ui-release/scripts/make-ledger.mjs +0 -179
  194. package/skills/adia-ui-release/skill.json +0 -75
  195. /package/skills/{adia-ui-authoring → adia-author}/references/api-contract.md +0 -0
  196. /package/skills/{adia-ui-release → adia-release}/scripts/assert-monorepo-root.mjs +0 -0
@@ -1,179 +0,0 @@
1
- # Canonical Pattern Index — survey targets for Mode 8 (composite-demo-protocol.md)
2
-
3
- **Auto-generated** by `scripts/build-canonical-pattern-index.mjs`. Do not edit by hand — re-run the build script after adding new canonicals to `apps/`, `catalog/`, or `playgrounds/`.
4
-
5
- This file is the checked-in snapshot the build script produces; the entries below are **representative** of a typical monorepo state (file lists + line counts will differ on your tree — re-run the build to refresh). The durable content is the **UI-type taxonomy** (the section headers + the lift-guidance under each): that taxonomy is the Phase 2 survey-target schema, and `ui_type` in Phase 1 must resolve to one of these section slugs.
6
-
7
- ## How to use this index
8
-
9
- 1. From Phase 1 of [composite-demo-protocol.md](composite-demo-protocol.md), name the UI type.
10
- 2. Find the matching section below.
11
- 3. Read every `.contents.html` listed (or the closest 2-3 if the section has many).
12
- 4. Extract primitive composition per Phase 3 of the protocol.
13
- 5. Cite the path in your demo's `<!-- Pattern source: ... -->` comment.
14
-
15
- ---
16
-
17
- ## billing
18
-
19
- > Billing dashboards (current plan, invoices, payment methods, usage). Lift card-ui + section + col-ui + field-ui chain from billing.contents.html.
20
-
21
- - `apps/saas/app/billing/billing.contents.html` (from SaaS app dashboards)
22
- - `apps/user-flow/app/registration/billing/billing.contents.html` (from User-flow templates)
23
-
24
- ## dashboard
25
-
26
- > Admin dashboards (KPI grids, overview cards). Lift grid-ui responsive columns from admin-dashboard.contents.html.
27
-
28
- - `apps/saas/app/admin-dashboard/admin-dashboard.contents.html` (from SaaS app dashboards)
29
-
30
- ## settings
31
-
32
- > Settings pages (preferences, security, appearance). Lift card-ui per setting group + col-ui spacing.
33
-
34
- - `apps/saas/app/settings-page/settings-page.contents.html` (from SaaS app dashboards)
35
- - `apps/user-flow/app/onboarding/notification-prefs/notification-prefs.contents.html` (from User-flow templates)
36
- - `catalog/ui-patterns/app/settings-appearance/settings-appearance.contents.html` (from UI-pattern atomics)
37
- - `catalog/ui-patterns/app/settings-notifications/settings-notifications.contents.html` (from UI-pattern atomics)
38
- - `catalog/page-shells/app/settings-page/settings-page.contents.html` (from Page-shell templates)
39
-
40
- ## auth-flow
41
-
42
- > Authentication flows (sign-in, MFA, OAuth, password reset). Lift single-column form layout from sign-in.contents.html siblings.
43
-
44
- - `apps/user-flow/app/auth/forgot-password/forgot-password.contents.html` (from User-flow templates)
45
- - `apps/user-flow/app/auth/reset-password/reset-password.contents.html` (from User-flow templates)
46
- - `apps/user-flow/app/auth/sign-in/mfa/mfa.contents.html` (from User-flow templates)
47
- - `apps/user-flow/app/auth/sign-in/sign-in.contents.html` (from User-flow templates)
48
- - `apps/user-flow/app/auth/sign-up/mfa-setup/mfa-setup.contents.html` (from User-flow templates)
49
-
50
- ## onboarding-wizard
51
-
52
- > Onboarding multi-step wizards. Lift step-progress + section + cta-row pattern.
53
-
54
- - `apps/user-flow/app/onboarding/first-action/first-action.contents.html` (from User-flow templates)
55
- - `apps/user-flow/app/onboarding/welcome/welcome.contents.html` (from User-flow templates)
56
-
57
- ## registration-wizard
58
-
59
- > Registration multi-step flows. Lift wizard step + form composition.
60
-
61
- - `apps/saas/app/profile-security/profile-security.contents.html` (from SaaS app dashboards)
62
- - `apps/user-flow/app/auth/sign-up/profile/profile.contents.html` (from User-flow templates)
63
- - `catalog/ui-patterns/app/user-profile-card/user-profile-card.contents.html` (from UI-pattern atomics)
64
-
65
- ## list-with-detail
66
-
67
- > List + detail compositions (entity rows + drawer/modal detail). Lift entity-item + drawer pattern.
68
-
69
- - `apps/saas/app/members/members.contents.html` (from SaaS app dashboards)
70
- - `catalog/ui-patterns/app/users-table-badge/users-table-badge.contents.html` (from UI-pattern atomics)
71
-
72
- ## integrations-list
73
-
74
- > Searchable integration/connector grids. Lift grid-ui + card-ui + empty-state-inside-card pattern.
75
-
76
- - `apps/saas/app/integrations/integrations.contents.html` (from SaaS app dashboards)
77
- - `apps/user-flow/app/registration/integrations/integrations.contents.html` (from User-flow templates)
78
-
79
- ## agent-activity
80
-
81
- > Agent activity / reasoning feeds. Lift activity-feed scroll + collapsed-reasoning pattern.
82
-
83
- - `catalog/ui-patterns/app/agent-activity-feed/agent-activity-feed.contents.html` (from UI-pattern atomics)
84
- - `catalog/ui-patterns/app/agent-reasoning-collapsed/agent-reasoning-collapsed.contents.html` (from UI-pattern atomics)
85
- - `catalog/page-shells/app/agent-canvas/agent-canvas.contents.html` (from Page-shell templates)
86
-
87
- ## chat
88
-
89
- > Chat surfaces (thread, composer, sidebar). Lift chat-streaming-surface composition.
90
-
91
- - `apps/genui/app/factory-chat/factory-chat.contents.html` (from GenUI app routes)
92
- - `catalog/ui-patterns/app/chat-streaming-surface/chat-streaming-surface.contents.html` (from UI-pattern atomics)
93
- - `catalog/page-shells/app/chat-page/chat-page.contents.html` (from Page-shell templates)
94
-
95
- ## editor
96
-
97
- > Editor panes (code, preview, toolbar). Lift editor-shell composition.
98
-
99
- - `apps/genui/app/a2ui-editor/a2ui-editor.contents.html` (from GenUI app routes)
100
- - `catalog/ui-patterns/app/editor-code-pane/editor-code-pane.contents.html` (from UI-pattern atomics)
101
- - `catalog/page-shells/app/editor-page/editor-page.contents.html` (from Page-shell templates)
102
-
103
- ## kanban
104
-
105
- > Kanban / column-based boards. Lift kanban-board-3col pattern.
106
-
107
- - `catalog/ui-patterns/app/kanban-board-3col/kanban-board-3col.contents.html` (from UI-pattern atomics)
108
- - `catalog/page-shells/app/kanban-page/kanban-page.contents.html` (from Page-shell templates)
109
-
110
- ## data-table
111
-
112
- > Data tables with badges/inline actions. Lift users-table-badge composition.
113
-
114
- - `apps/user-flow/app/onboarding/import-data/import-data.contents.html` (from User-flow templates)
115
-
116
- ## command
117
-
118
- > Command palette / global search. Lift command-palette overlay pattern.
119
-
120
- - `catalog/ui-patterns/app/command-palette/command-palette.contents.html` (from UI-pattern atomics)
121
-
122
- ## overlay
123
-
124
- > Modals, drawers, popovers. Lift destructive-confirm-modal pattern for confirmations.
125
-
126
- - `apps/user-flow/app/registration/confirmation/confirmation.contents.html` (from User-flow templates)
127
- - `catalog/ui-patterns/app/destructive-confirm-modal/destructive-confirm-modal.contents.html` (from UI-pattern atomics)
128
-
129
- ## multi-step-funnel
130
-
131
- > Multi-step conversion funnels. Lift conversion-funnel-6step composition.
132
-
133
- - `catalog/ui-patterns/app/conversion-funnel-6step/conversion-funnel-6step.contents.html` (from UI-pattern atomics)
134
-
135
- ## feed
136
-
137
- > Activity / event feeds. Lift activity-feed composition.
138
-
139
- - `apps/genui/app/gen-ui-feed/gen-ui-feed.contents.html` (from GenUI app routes)
140
-
141
- ## marketing
142
-
143
- > Marketing pages, hero CTAs. Lift marketing-hero-cta composition.
144
-
145
- - `catalog/ui-patterns/app/marketing-hero-cta/marketing-hero-cta.contents.html` (from UI-pattern atomics)
146
- - `catalog/page-shells/app/marketing-page/marketing-page.contents.html` (from Page-shell templates)
147
-
148
- ## error-page
149
-
150
- > Error states (404, 500, forbidden, expired). Lift centered single-card error pattern.
151
-
152
- - `apps/user-flow/app/auth/account-locked/account-locked.contents.html` (from User-flow templates)
153
- - `apps/user-flow/app/auth/session-expired/session-expired.contents.html` (from User-flow templates)
154
- - `catalog/page-shells/app/error-page/error-page.contents.html` (from Page-shell templates)
155
-
156
- ## demo-playground
157
-
158
- > Internal demo + playground surfaces. Use these as reference for composition style; not always production-grade.
159
-
160
- - `apps/genui/app/a2ui/a2ui.contents.html` (from GenUI app routes)
161
- - `apps/genui/app/css-channel-demo/css-channel-demo.contents.html` (from GenUI app routes)
162
-
163
- ## other
164
-
165
- > Misc canonicals. Inspect contents.html to determine UI type.
166
-
167
- - Any `.contents.html` whose slug fragment matches none of the heuristics above lands here. Inspect each to determine its UI type, or extend the `inferUiType()` regex (see Maintenance).
168
-
169
- ---
170
-
171
- ## Maintenance
172
-
173
- Re-build this index:
174
-
175
- ```bash
176
- node scripts/build-canonical-pattern-index.mjs
177
- ```
178
-
179
- If a heuristic misclassifies a path (the file lands in `other` or the wrong UI type), update the `inferUiType()` regex in `scripts/build-canonical-pattern-index.mjs`.
@@ -1,93 +0,0 @@
1
- # Common gotchas — composite authoring traps
2
-
3
- Five concrete failure modes encountered across a billing-overview rebuild + multi-demo grandfather-elimination cycle. Each is the kind of bug that:
4
-
5
- - Renders visually broken without console errors
6
- - Passes existing audits silently
7
- - Is fixed in one place but recurs in others until pattern-corrected
8
-
9
- Read this BEFORE Phase 3 sketch. Each entry includes the pattern, the detector (if any), and the fix.
10
-
11
- ---
12
-
13
- ## 1. Component used without reading its CSS — and especially without reading its composition grammar
14
-
15
- **Pattern**: Stamping `<X-ui>` and relying on attributes/slots without opening `X-ui.css`. The primitive's `@scope` rules ARE part of its API contract, not implementation details. Particularly load-bearing: composition grammars (which children the primitive expects + how it lays them out).
16
-
17
- **Example**: `payment-method-list-ui` stamped three sibling `<div data-brand>/<div data-meta>/<div data-actions>` inside `<card-ui>` and re-implemented the 3-column grid via custom `@scope` rules. Bypassed card-ui's canonical `<header>` + `[slot=icon|heading|description|action]` grammar entirely. Result: visual debt downstream (50% icon-to-frame ratio, off-rhythm tag placement, fragile chrome).
18
-
19
- **Detector**: [§Phase 2.5a Component Literacy](composite-demo-protocol.md) suggests `composition_grammar` extraction from each used primitive's `.css`. `audit:card-structure` catches the specific card-ui bypass; analogous audits don't exist yet for avatar-ui / drawer-ui / aside-ui (forward work).
20
-
21
- **Fix**: Read the primitive's `.css` end-to-end. Identify its expected child structure (slot grammar). USE it; never invent a parallel layer.
22
-
23
- ---
24
-
25
- ## 2. Parent CSS overriding child component's intrinsic display
26
-
27
- **Pattern**: A parent composite hides/shows an embedded child via `display: none` ↔ `display: block` toggling. The `display: block` override beats the child's `:scope { display: flex }` from its own `@scope` (specificity 0,2,0 vs 0,1,0). Child's intrinsic layout silently collapses.
28
-
29
- **Example**: 4 billing composites all had:
30
-
31
- ```css
32
- /* WRONG — clobbers empty-state-ui's flex column */
33
- :scope > [data-empty] { display: none; }
34
- :scope[empty] > [data-empty] { display: block; }
35
- ```
36
-
37
- `empty-state-ui` declares its own `:scope { display: flex; flex-direction: column; align-items: center }`. The parent's `display: block` removed that, making icon + heading + description flow inline: **`⊡ No payment methodsAdd a method to get started.`**
38
-
39
- **Detector**: None today. Caught by user visual review.
40
-
41
- **Fix** — invert visibility toggle so no display value is set when shown:
42
-
43
- ```css
44
- /* RIGHT — child's :scope display remains intact */
45
- :scope:not([empty]) > [data-empty] { display: none; }
46
- ```
47
-
48
- ---
49
-
50
- ## 3. Mixed sizes across form/control groups
51
-
52
- **Pattern**: A composite stamps multiple form/control primitives in the same visual row (toolbar, button cluster, filter strip) without coordinating `size` attributes. Defaults differ — buttons might default `sm`, inputs default to a larger size, search-ui doesn't forward `size` to its inner input.
53
-
54
- **Example**: an invoice-history toolbar had buttons at `size='sm'` (24px), filter chips at `size='sm'` (24px), search input at default (~36px). Same row, mismatched baseline.
55
-
56
- **Detector**: None today. Caught by user visual review.
57
-
58
- **Fix**:
59
-
60
- - When stamping a control group, set the SAME `size` attribute on every control explicitly.
61
- - Wrapper primitives (search-ui wraps input-ui; select-ui wraps native select) MUST forward `[size]` to their inner control. If a wrapper doesn't forward, file a fix in the wrapper rather than working around it in the consumer.
62
-
63
- ---
64
-
65
- ## 4. minmax(min, 1fr) inside repeat() fighting container queries
66
-
67
- **Pattern**: A grid uses `repeat(N, minmax(<min>, 1fr))` with a hardcoded minimum, BUT the container also has `@container` queries that collapse columns at breakpoints. The minmax fights the breakpoints — when the container narrows, columns hit the floor and overflow before the breakpoint reduces column count.
68
-
69
- **Example**: a dashboard-layout KPI grid was `repeat(4, minmax(16em, 1fr))` plus `@container ≤48em → 2 cols` and `≤32em → 1 col`. Redundant + conflicted. Removed the minmax; container queries own the responsive collapse cleanly.
70
-
71
- **Detector**: None today.
72
-
73
- **Fix**: When a grid has container-query breakpoints, use plain `repeat(N, 1fr)`. The breakpoints handle responsive behavior; minmax is for grids WITHOUT container queries.
74
-
75
- ---
76
-
77
- ## 5. Nested `<!-- ... -->` inside design-plan canonical-sketch fenced blocks
78
-
79
- **Pattern**: The `<!-- design-plan: ... -->` block contains a fenced ` ```canonical-sketch ... ``` ` body. Authors sometimes paste HTML examples with inner `<!-- ... -->` comments into the sketch. HTML comments DON'T NEST — the inner `-->` closes the OUTER `<!-- design-plan: -->`. Trailing ` ``` --> ` then leaks as visible text on the page.
80
-
81
- **Example**: a billing-overview.examples.html had two inner comments inside its canonical-sketch (annotations + a drawer composition example). Stray ` ``` --> ` rendered above the page header.
82
-
83
- **Detector**: ✓ caught by `check:demo-pattern-source` — emits `phase_3_sketch contains an inner <!-- ... --> comment` finding.
84
-
85
- **Fix**: Remove inner HTML comments from the canonical-sketch. Use plain text annotations or remove the doc-noise entirely.
86
-
87
- ---
88
-
89
- ## Meta-pattern across all 5
90
-
91
- **Composites and primitives have layered contracts. The parent's CSS shouldn't reach into the child's layout territory. The child's CSS shouldn't fight its parent's container queries. The audit should detect the rendering hazard, not just the parsing structure.**
92
-
93
- The structural defense for #1 (composition-grammar bypass) is `npm run audit:card-structure[:strict]` / `npm run audit:avatar-structure` / `npm run audit:alert-structure` (HTML + JS `createElement` scan) plus `npm run audit:sketch-grammar` at Phase 3. Phase 2.5a Component Literacy is a literacy hint, not a gate — the mechanical defenses above are the proximate fix; pre-flight is optional enrichment. See [composite-demo-protocol.md](composite-demo-protocol.md) §Phase 2.5a for the reframing. The other four gotchas are caught only by visual review until corresponding audits are added.