@adia-ai/adia-ui-forge 0.1.3 → 0.8.1
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.
- package/.claude-plugin/plugin.json +4 -7
- package/CHANGELOG.md +35 -34
- package/README.md +35 -40
- package/agents/a2ui-engineer.md +22 -53
- package/agents/component-author.md +29 -0
- package/agents/framework-verifier.md +26 -0
- package/agents/release-engineer.md +21 -81
- package/agents/routing-corpus.json +293 -64
- package/bin/demo-postwrite-pattern-gate +94 -0
- package/bin/forge-lint +17 -2
- package/bin/sidecar-prewrite-guard +104 -0
- package/commands/deploy.md +9 -0
- package/commands/dogfood.md +10 -0
- package/commands/gen-review.md +9 -0
- package/commands/release.md +10 -0
- package/hooks/hooks.json +15 -0
- package/package.json +3 -6
- package/references/contracts/a2ui-mcp-surface.md +35 -0
- package/references/contracts/migration-guide-format.md +34 -0
- package/references/shared/content-trust.md +19 -74
- package/skills/adia-a2ui/SKILL.md +99 -0
- package/skills/{adia-ui-a2ui → adia-a2ui}/evals/routing-corpus.json +10 -10
- package/skills/adia-a2ui/references/anti-patterns.md +27 -0
- package/skills/adia-a2ui/references/chunk-authoring.md +71 -0
- package/skills/adia-a2ui/references/corpus-discipline.md +68 -0
- package/skills/adia-a2ui/references/eval-diagnostics.md +86 -0
- package/skills/adia-a2ui/references/format-extension-decisions.md +66 -0
- package/skills/adia-a2ui/references/leverage-rules.md +52 -0
- package/skills/adia-a2ui/references/mcp-pipeline-ops.md +83 -0
- package/skills/adia-a2ui/references/mcp-tool-reference.md +59 -0
- package/skills/adia-a2ui/references/pipeline-overview.md +115 -0
- package/skills/adia-a2ui/references/semantic-fail-lifting.md +74 -0
- package/skills/adia-a2ui/references/strategy-engines.md +109 -0
- package/skills/adia-a2ui/references/zettel-calibration.md +104 -0
- package/skills/adia-author/SKILL.md +112 -0
- package/skills/adia-author/evals/routing-corpus.json +222 -0
- package/skills/{adia-ui-authoring → adia-author}/references/anti-patterns.md +33 -4
- package/skills/{adia-ui-authoring → adia-author}/references/authoring-cycle.md +9 -11
- package/skills/adia-author/references/canonical-pattern-index.md +243 -0
- package/skills/{adia-ui-authoring → adia-author}/references/code-style.md +19 -21
- package/skills/adia-author/references/common-gotchas.md +129 -0
- package/skills/adia-author/references/composite-demo-protocol.md +271 -0
- package/skills/{adia-ui-authoring → adia-author}/references/css-patterns.md +19 -6
- package/skills/{adia-ui-authoring → adia-author}/references/lifecycle-patterns.md +1 -0
- package/skills/{adia-ui-authoring → adia-author}/references/llm-bridge.md +3 -5
- package/skills/{adia-ui-authoring → adia-author}/references/module-promotion.md +20 -38
- package/skills/{adia-ui-authoring → adia-author}/references/primitive-audit.md +2 -4
- package/skills/{adia-ui-authoring → adia-author}/references/shell-patterns.md +12 -18
- package/skills/{adia-ui-authoring → adia-author}/references/token-contract.md +5 -7
- package/skills/{adia-ui-authoring → adia-author}/references/worked-example.md +3 -3
- package/skills/{adia-ui-authoring → adia-author}/references/yaml-contract.md +3 -3
- package/skills/{adia-ui-authoring → adia-author}/scripts/build-canonical-pattern-index.mjs +3 -3
- package/skills/adia-deploy/SKILL.md +128 -0
- package/skills/{adia-ui-ops → adia-deploy}/references/deploy-playbooks.md +47 -30
- package/skills/adia-dogfood/SKILL.md +124 -0
- package/skills/adia-dogfood/references/admin-shell-anatomy.md +77 -0
- package/skills/adia-dogfood/references/app-shell-pitfalls.md +66 -0
- package/skills/adia-dogfood/references/card-anatomy-sweep.md +66 -0
- package/skills/adia-dogfood/references/html-attr-sweep.md +63 -0
- package/skills/adia-dogfood/references/native-leak-annotations.md +73 -0
- package/skills/adia-dogfood/references/visual-probe-triage.md +80 -0
- package/skills/{adia-ui-dogfood → adia-dogfood}/scripts/analyze.mjs +30 -14
- package/skills/adia-gen-review/SKILL.md +127 -0
- package/skills/adia-gen-review/references/corpus-html-patterns.md +279 -0
- package/skills/adia-gen-review/references/loop-protocol.md +216 -0
- package/skills/adia-gen-review/references/rubric-cosmetic.md +100 -0
- package/skills/adia-gen-review/references/rubric-decompose.md +101 -0
- package/skills/adia-gen-review/references/rubric-score.md +214 -0
- package/skills/{adia-ui-gen-review → adia-gen-review}/references/scores.schema.json +2 -2
- package/skills/{adia-ui-gen-review → adia-gen-review}/scripts/gen-review-coverage-audit.mjs +4 -4
- package/skills/{adia-ui-gen-review → adia-gen-review}/scripts/gen-review-decompose.mjs +10 -6
- package/skills/{adia-ui-gen-review → adia-gen-review}/scripts/gen-review-status.mjs +5 -5
- package/skills/{adia-ui-gen-review → adia-gen-review}/scripts/validate-cycle-scores.mjs +5 -5
- package/skills/adia-llm-internals/SKILL.md +77 -0
- package/skills/{adia-ui-llm → adia-llm-internals}/references/adapter-contract.md +4 -2
- package/skills/{adia-ui-llm → adia-llm-internals}/references/add-a-provider.md +4 -5
- package/skills/{adia-ui-llm → adia-llm-internals}/references/bridge-facade.md +10 -3
- package/skills/{adia-ui-llm → adia-llm-internals}/references/browser-proxy-boundary.md +1 -1
- package/skills/{adia-ui-llm → adia-llm-internals}/references/model-registry.md +5 -3
- package/skills/{adia-ui-llm → adia-llm-internals}/references/streaming-sse.md +2 -2
- package/skills/adia-release/SKILL.md +72 -0
- package/skills/adia-release/references/changelog-discipline.md +119 -0
- package/skills/adia-release/references/cut-procedure.md +247 -0
- package/skills/adia-release/references/gates-catalog.md +222 -0
- package/skills/adia-release/references/independent-package-release.md +52 -0
- package/skills/adia-release/references/migration-guide-authoring.md +86 -0
- package/skills/adia-release/references/notes-authoring.md +90 -0
- package/skills/adia-release/references/recovery-paths.md +106 -0
- package/skills/{adia-ui-release → adia-release}/scripts/bump.mjs +28 -3
- package/skills/{adia-ui-release → adia-release}/scripts/dispatch-publish.mjs +10 -7
- package/skills/{adia-ui-release → adia-release}/scripts/insert-stub.mjs +1 -1
- package/skills/{adia-ui-release → adia-release}/scripts/package-paths.mjs +6 -0
- package/skills/{adia-ui-release → adia-release}/scripts/promote-unreleased.mjs +1 -1
- package/skills/{adia-ui-release → adia-release}/scripts/release-pack.mjs +38 -31
- package/skills/{adia-ui-release → adia-release}/scripts/tag-lockstep.mjs +7 -3
- package/skills/adia-site-docs/SKILL.md +68 -0
- package/skills/adia-site-docs/evals/audit-report.md +30 -0
- package/skills/adia-site-docs/evals/routing-corpus.json +176 -0
- package/skills/adia-site-docs/intent.md +72 -0
- package/agents/README.md +0 -209
- package/agents/author.md +0 -56
- package/agents/repo-steward.md +0 -56
- package/agents/spec-architect.md +0 -53
- package/agents/tech-lead.md +0 -57
- package/agents/verifier.md +0 -55
- package/bin/lib/audit-axes.mjs +0 -555
- package/bin/lib/dry-run-irreversible.mjs +0 -236
- package/bin/lib/run-skill-evals.mjs +0 -487
- package/bin/lib/teach-router.mjs +0 -250
- package/commands/adia-forge-a2ui.md +0 -10
- package/commands/adia-forge-author.md +0 -10
- package/commands/adia-forge-dogfood.md +0 -8
- package/commands/adia-forge-llm.md +0 -8
- package/commands/adia-forge-orient.md +0 -10
- package/commands/adia-forge-release.md +0 -8
- package/commands/adia-forge-review.md +0 -10
- package/references/shared/pev-rationale.md +0 -64
- package/references/shared/skill-conventions.md +0 -133
- package/skills/adia-ui-a2ui/CHANGELOG.md +0 -32
- package/skills/adia-ui-a2ui/SKILL.md +0 -243
- package/skills/adia-ui-a2ui/evals/adversarial-corpus.json +0 -75
- package/skills/adia-ui-a2ui/evals/teach-routing-cases.json +0 -100
- package/skills/adia-ui-a2ui/references/anti-patterns.md +0 -24
- package/skills/adia-ui-a2ui/references/chunk-authoring.md +0 -88
- package/skills/adia-ui-a2ui/references/corpus-discipline.md +0 -56
- package/skills/adia-ui-a2ui/references/eval-diagnostics.md +0 -127
- package/skills/adia-ui-a2ui/references/fragment-graph.md +0 -91
- package/skills/adia-ui-a2ui/references/mcp-pipeline-ops.md +0 -106
- package/skills/adia-ui-a2ui/references/mcp-tool-reference.md +0 -398
- package/skills/adia-ui-a2ui/references/pipeline-overview.md +0 -175
- package/skills/adia-ui-a2ui/references/semantic-fail-lifting.md +0 -120
- package/skills/adia-ui-a2ui/references/strategy-engines.md +0 -111
- package/skills/adia-ui-a2ui/references/teach-protocol.md +0 -220
- package/skills/adia-ui-a2ui/references/zettel-calibration.md +0 -93
- package/skills/adia-ui-a2ui/scripts/audit-a2ui-roster.mjs +0 -96
- package/skills/adia-ui-a2ui/scripts/teach-route.mjs +0 -157
- package/skills/adia-ui-a2ui/skill.json +0 -38
- package/skills/adia-ui-authoring/CHANGELOG.md +0 -32
- package/skills/adia-ui-authoring/SKILL.md +0 -256
- package/skills/adia-ui-authoring/assets/case-studies/admin-shell-decomposition.md +0 -101
- package/skills/adia-ui-authoring/assets/case-studies/maxtokens-32768-discovery.md +0 -109
- package/skills/adia-ui-authoring/assets/case-studies/theme-panel-promotion.md +0 -113
- package/skills/adia-ui-authoring/evals/adversarial-design-plan-gates.json +0 -138
- package/skills/adia-ui-authoring/evals/routing-corpus.json +0 -245
- package/skills/adia-ui-authoring/references/canonical-pattern-index.md +0 -179
- package/skills/adia-ui-authoring/references/common-gotchas.md +0 -93
- package/skills/adia-ui-authoring/references/composite-demo-protocol.md +0 -1084
- package/skills/adia-ui-authoring/references/teach-protocol.md +0 -428
- package/skills/adia-ui-authoring/scripts/audit-authoring-roster.mjs +0 -148
- package/skills/adia-ui-authoring/skill.json +0 -45
- package/skills/adia-ui-dogfood/CHANGELOG.md +0 -17
- package/skills/adia-ui-dogfood/README.md +0 -62
- package/skills/adia-ui-dogfood/SKILL.md +0 -866
- package/skills/adia-ui-dogfood/skill.json +0 -40
- package/skills/adia-ui-forge/SKILL.md +0 -88
- package/skills/adia-ui-forge/evals/routing-corpus.json +0 -30
- package/skills/adia-ui-gen-review/CHANGELOG.md +0 -108
- package/skills/adia-ui-gen-review/SKILL.md +0 -266
- package/skills/adia-ui-gen-review/references/loop-protocol.md +0 -712
- package/skills/adia-ui-gen-review/references/rubric-cosmetic.md +0 -144
- package/skills/adia-ui-gen-review/references/rubric-decompose.md +0 -117
- package/skills/adia-ui-gen-review/references/rubric-score.md +0 -249
- package/skills/adia-ui-gen-review/references/teach-protocol.md +0 -214
- package/skills/adia-ui-gen-review/skill.json +0 -23
- package/skills/adia-ui-llm/CHANGELOG.md +0 -25
- package/skills/adia-ui-llm/SKILL.md +0 -165
- package/skills/adia-ui-llm/evals/adversarial-corpus.json +0 -75
- package/skills/adia-ui-llm/evals/routing-corpus.json +0 -30
- package/skills/adia-ui-llm/evals/teach-routing-cases.json +0 -73
- package/skills/adia-ui-llm/references/teach-protocol.md +0 -78
- package/skills/adia-ui-llm/scripts/audit-llm-roster.mjs +0 -93
- package/skills/adia-ui-llm/scripts/teach-route.mjs +0 -119
- package/skills/adia-ui-llm/skill.json +0 -33
- package/skills/adia-ui-ops/CHANGELOG.md +0 -291
- package/skills/adia-ui-ops/SKILL.md +0 -401
- package/skills/adia-ui-ops/references/INDEX.md +0 -158
- package/skills/adia-ui-ops/references/audit-cadence.md +0 -263
- package/skills/adia-ui-ops/references/audit-patterns/archive-link-sweep.md +0 -96
- package/skills/adia-ui-ops/references/audit-patterns/audit-history-ledger.md +0 -162
- package/skills/adia-ui-ops/references/audit-patterns/browser-bundle-node-imports.md +0 -154
- package/skills/adia-ui-ops/references/audit-patterns/changelog-unreleased-bloat.md +0 -75
- package/skills/adia-ui-ops/references/audit-patterns/coverage-gaps.md +0 -187
- package/skills/adia-ui-ops/references/audit-patterns/entry-file-coverage.md +0 -122
- package/skills/adia-ui-ops/references/audit-patterns/format-hygiene.md +0 -217
- package/skills/adia-ui-ops/references/audit-patterns/lockstep-versioning.md +0 -113
- package/skills/adia-ui-ops/references/audit-patterns/memory-fragmentation.md +0 -180
- package/skills/adia-ui-ops/references/audit-patterns/orphan-detection.md +0 -202
- package/skills/adia-ui-ops/references/audit-patterns/pointer-validation.md +0 -180
- package/skills/adia-ui-ops/references/audit-patterns/redundancy-detection.md +0 -210
- package/skills/adia-ui-ops/references/audit-patterns/spec-dating-sweep.md +0 -91
- package/skills/adia-ui-ops/references/audit-patterns/stale-content.md +0 -182
- package/skills/adia-ui-ops/references/audit-patterns/staleness-tooling.md +0 -156
- package/skills/adia-ui-ops/references/audit-patterns/token-waste-detection.md +0 -196
- package/skills/adia-ui-ops/references/doc-types/adr-pattern.md +0 -210
- package/skills/adia-ui-ops/references/doc-types/architecture-md.md +0 -190
- package/skills/adia-ui-ops/references/doc-types/changelog.md +0 -183
- package/skills/adia-ui-ops/references/doc-types/decisions-log.md +0 -146
- package/skills/adia-ui-ops/references/doc-types/plan-roadmap.md +0 -182
- package/skills/adia-ui-ops/references/doc-types/postmortem-pattern.md +0 -206
- package/skills/adia-ui-ops/references/genres/prose-and-writing.md +0 -149
- package/skills/adia-ui-ops/references/guidance/context-budget.md +0 -137
- package/skills/adia-ui-ops/references/guidance/llm-doc-writing.md +0 -116
- package/skills/adia-ui-ops/references/guidance/reliability-dial.md +0 -186
- package/skills/adia-ui-ops/references/recipes/adr-introduction.md +0 -211
- package/skills/adia-ui-ops/references/recipes/audit-existing-repo.md +0 -234
- package/skills/adia-ui-ops/references/recipes/cold-start-harvest.md +0 -263
- package/skills/adia-ui-ops/references/recipes/concurrent-learnings-merge.md +0 -158
- package/skills/adia-ui-ops/references/recipes/continuous-learning-loop.md +0 -169
- package/skills/adia-ui-ops/references/recipes/external-reference-verification.md +0 -158
- package/skills/adia-ui-ops/references/recipes/findings-index-readout.md +0 -126
- package/skills/adia-ui-ops/references/recipes/greenfield-setup.md +0 -252
- package/skills/adia-ui-ops/references/recipes/harvest-repo-brain.md +0 -169
- package/skills/adia-ui-ops/references/recipes/import-repo-brain-harvest.md +0 -153
- package/skills/adia-ui-ops/references/recipes/memory-organization.md +0 -182
- package/skills/adia-ui-ops/references/recipes/recommend-then-validate.md +0 -199
- package/skills/adia-ui-ops/references/recipes/self-healing-hooks.md +0 -366
- package/skills/adia-ui-ops/references/recipes/skill-stewardship-loop.md +0 -113
- package/skills/adia-ui-ops/references/standards/agents-md-spec.md +0 -138
- package/skills/adia-ui-ops/references/standards/claude-md-convention.md +0 -123
- package/skills/adia-ui-ops/references/standards/cross-tool-matrix.md +0 -85
- package/skills/adia-ui-ops/references/standards/readme-conventions.md +0 -232
- package/skills/adia-ui-ops/references/teach-protocol.md +0 -215
- package/skills/adia-ui-ops/scripts/audit-ops-roster.mjs +0 -104
- package/skills/adia-ui-ops/skill.json +0 -65
- package/skills/adia-ui-release/CHANGELOG.md +0 -66
- package/skills/adia-ui-release/SKILL.md +0 -323
- package/skills/adia-ui-release/assets/case-studies/2026-05-20-batch-push-v0.6.14-v0.6.15.md +0 -144
- package/skills/adia-ui-release/assets/case-studies/2026-05-20-corpus-drift-remediation-v0.6.15.md +0 -155
- package/skills/adia-ui-release/assets/case-studies/2026-05-20-version-skip-correction-v0.6.12.md +0 -114
- package/skills/adia-ui-release/assets/case-studies/2026-05-21-author-from-scratch-v0.6.18.md +0 -139
- package/skills/adia-ui-release/assets/case-studies/2026-05-21-feedback37-retraction-v0.6.21.md +0 -124
- package/skills/adia-ui-release/assets/case-studies/2026-05-21-fn1-enrichment-pass-v0.6.19.md +0 -125
- package/skills/adia-ui-release/assets/case-studies/2026-05-21-stale-test-detection-v0.6.20.md +0 -142
- package/skills/adia-ui-release/assets/case-studies/2026-05-23-freshness-gate-recovery-v0.6.32.md +0 -97
- package/skills/adia-ui-release/assets/case-studies/2026-05-26-catalog-drift-recurring-v0.6.40.md +0 -147
- package/skills/adia-ui-release/assets/templates/stub-changelog.template.md +0 -22
- package/skills/adia-ui-release/evals/evals.json +0 -164
- package/skills/adia-ui-release/references/changelog-discipline.md +0 -250
- package/skills/adia-ui-release/references/cycle-happy-path.md +0 -520
- package/skills/adia-ui-release/references/exe-deploy.md +0 -149
- package/skills/adia-ui-release/references/gates-catalog.md +0 -778
- package/skills/adia-ui-release/references/independent-package-release.md +0 -129
- package/skills/adia-ui-release/references/ledger-discipline.md +0 -232
- package/skills/adia-ui-release/references/migration-guide-authoring.md +0 -174
- package/skills/adia-ui-release/references/multi-agent-baseline.md +0 -207
- package/skills/adia-ui-release/references/notes-authoring.md +0 -212
- package/skills/adia-ui-release/references/recovery-paths.md +0 -262
- package/skills/adia-ui-release/references/rollup-notes.md +0 -208
- package/skills/adia-ui-release/references/teach-protocol.md +0 -468
- package/skills/adia-ui-release/scripts/audit-gate-roster.mjs +0 -196
- package/skills/adia-ui-release/scripts/make-ledger.mjs +0 -200
- package/skills/adia-ui-release/skill.json +0 -77
- package/skills/dogfood-sweep/CHANGELOG.md +0 -37
- package/skills/dogfood-sweep/README.md +0 -105
- package/skills/dogfood-sweep/SKILL.md +0 -1000
- package/skills/dogfood-sweep/analyze.mjs +0 -600
- package/skills/dogfood-sweep/skill.json +0 -31
- /package/skills/{adia-ui-authoring → adia-author}/references/api-contract.md +0 -0
- /package/skills/{adia-ui-release → adia-release}/scripts/assert-monorepo-root.mjs +0 -0
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
# Canonical Pattern Index — survey targets for Mode 8 (composite-demo-protocol.md)
|
|
2
|
+
|
|
3
|
+
**Auto-generated** by this skill's `scripts/build-canonical-pattern-index.mjs`. Do not edit by hand — re-run the build script (from the monorepo root) after adding new canonicals to `apps/`, `catalog/`, or `playgrounds/`.
|
|
4
|
+
|
|
5
|
+
**Total canonical `.contents.html` files**: 111
|
|
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 (5)
|
|
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` — 482 lines (from SaaS app dashboards)
|
|
22
|
+
- `apps/user-flow/app/registration/billing/billing.contents.html` — 94 lines (from User-flow templates)
|
|
23
|
+
- `catalog/ui-patterns/app/invoice-line-items/invoice-line-items.contents.html` — 91 lines (from UI-pattern atomics (catalog))
|
|
24
|
+
- `catalog/ui-patterns/app/newsletter-subscription/newsletter-subscription.contents.html` — 36 lines (from UI-pattern atomics (catalog))
|
|
25
|
+
- `catalog/ui-patterns/app/payment-method-form/payment-method-form.contents.html` — 65 lines (from UI-pattern atomics (catalog))
|
|
26
|
+
|
|
27
|
+
## dashboard (1)
|
|
28
|
+
|
|
29
|
+
> Admin dashboards (KPI grids, overview cards). Lift grid-ui responsive columns from admin-dashboard.contents.html.
|
|
30
|
+
|
|
31
|
+
- `apps/saas/app/admin-dashboard/admin-dashboard.contents.html` — 1566 lines (from SaaS app dashboards)
|
|
32
|
+
|
|
33
|
+
## settings (5)
|
|
34
|
+
|
|
35
|
+
> Settings pages (preferences, security, appearance). Lift card-ui per setting group + col-ui spacing.
|
|
36
|
+
|
|
37
|
+
- `apps/saas/app/settings-page/settings-page.contents.html` — 267 lines (from SaaS app dashboards)
|
|
38
|
+
- `apps/user-flow/app/onboarding/notification-prefs/notification-prefs.contents.html` — 65 lines (from User-flow templates)
|
|
39
|
+
- `catalog/ui-patterns/app/settings-appearance/settings-appearance.contents.html` — 13 lines (from UI-pattern atomics (catalog))
|
|
40
|
+
- `catalog/ui-patterns/app/settings-notifications/settings-notifications.contents.html` — 45 lines (from UI-pattern atomics (catalog))
|
|
41
|
+
- `catalog/page-shells/app/settings-page/settings-page.contents.html` — 30 lines (from Page-shell templates (catalog))
|
|
42
|
+
|
|
43
|
+
## auth-flow (10)
|
|
44
|
+
|
|
45
|
+
> Authentication flows (sign-in, MFA, OAuth, password reset). Lift single-column form layout from sign-in.contents.html siblings.
|
|
46
|
+
|
|
47
|
+
- `apps/user-flow/app/auth/email-change/verify/verify.contents.html` — 38 lines (from User-flow templates)
|
|
48
|
+
- `apps/user-flow/app/auth/forgot-password/forgot-password.contents.html` — 32 lines (from User-flow templates)
|
|
49
|
+
- `apps/user-flow/app/auth/oauth/callback/callback.contents.html` — 39 lines (from User-flow templates)
|
|
50
|
+
- `apps/user-flow/app/auth/reset-password/reset-password.contents.html` — 61 lines (from User-flow templates)
|
|
51
|
+
- `apps/user-flow/app/auth/sign-in/mfa/mfa.contents.html` — 40 lines (from User-flow templates)
|
|
52
|
+
- `apps/user-flow/app/auth/sign-in/otp/verify/verify.contents.html` — 38 lines (from User-flow templates)
|
|
53
|
+
- `apps/user-flow/app/auth/sign-in/password/password.contents.html` — 52 lines (from User-flow templates)
|
|
54
|
+
- `apps/user-flow/app/auth/sign-in/sign-in.contents.html` — 50 lines (from User-flow templates)
|
|
55
|
+
- `apps/user-flow/app/auth/sign-up/mfa-setup/mfa-setup.contents.html` — 64 lines (from User-flow templates)
|
|
56
|
+
- `apps/user-flow/app/auth/sign-up/verify/verify.contents.html` — 38 lines (from User-flow templates)
|
|
57
|
+
|
|
58
|
+
## onboarding-wizard (3)
|
|
59
|
+
|
|
60
|
+
> Onboarding multi-step wizards. Lift step-progress + section + cta-row pattern.
|
|
61
|
+
|
|
62
|
+
- `apps/user-flow/app/onboarding/first-action/first-action.contents.html` — 77 lines (from User-flow templates)
|
|
63
|
+
- `apps/user-flow/app/onboarding/welcome/welcome.contents.html` — 68 lines (from User-flow templates)
|
|
64
|
+
- `catalog/ui-patterns/app/onboarding-checklist/onboarding-checklist.contents.html` — 46 lines (from UI-pattern atomics (catalog))
|
|
65
|
+
|
|
66
|
+
## registration-wizard (5)
|
|
67
|
+
|
|
68
|
+
> Registration multi-step flows. Lift wizard step + form composition.
|
|
69
|
+
|
|
70
|
+
- `apps/saas/app/profile-security/profile-security.contents.html` — 524 lines (from SaaS app dashboards)
|
|
71
|
+
- `apps/user-flow/app/auth/sign-up/profile/profile.contents.html` — 51 lines (from User-flow templates)
|
|
72
|
+
- `apps/user-flow/app/auth/sign-up/sign-up.contents.html` — 45 lines (from User-flow templates)
|
|
73
|
+
- `apps/user-flow/app/registration/profile/profile.contents.html` — 51 lines (from User-flow templates)
|
|
74
|
+
- `catalog/ui-patterns/app/user-profile-card/user-profile-card.contents.html` — 34 lines (from UI-pattern atomics (catalog))
|
|
75
|
+
|
|
76
|
+
## list-with-detail (3)
|
|
77
|
+
|
|
78
|
+
> List + detail compositions (entity rows + drawer/modal detail). Lift entity-item + drawer pattern.
|
|
79
|
+
|
|
80
|
+
- `apps/saas/app/members/members.contents.html` — 447 lines (from SaaS app dashboards)
|
|
81
|
+
- `apps/user-flow/app/registration/team-size/team-size.contents.html` — 73 lines (from User-flow templates)
|
|
82
|
+
- `catalog/ui-patterns/app/users-table-badge/users-table-badge.contents.html` — 42 lines (from UI-pattern atomics (catalog))
|
|
83
|
+
|
|
84
|
+
## integrations-list (3)
|
|
85
|
+
|
|
86
|
+
> Searchable integration/connector grids. Lift grid-ui + card-ui + empty-state-inside-card pattern.
|
|
87
|
+
|
|
88
|
+
- `apps/saas/app/integrations/integrations.contents.html` — 856 lines (from SaaS app dashboards)
|
|
89
|
+
- `apps/user-flow/app/registration/integrations/integrations.contents.html` — 109 lines (from User-flow templates)
|
|
90
|
+
- `catalog/ui-patterns/app/api-key-table/api-key-table.contents.html` — 22 lines (from UI-pattern atomics (catalog))
|
|
91
|
+
|
|
92
|
+
## agent-activity (3)
|
|
93
|
+
|
|
94
|
+
> Agent activity / reasoning feeds. Lift activity-feed scroll + collapsed-reasoning pattern.
|
|
95
|
+
|
|
96
|
+
- `catalog/ui-patterns/app/agent-activity-feed/agent-activity-feed.contents.html` — 17 lines (from UI-pattern atomics (catalog))
|
|
97
|
+
- `catalog/ui-patterns/app/agent-reasoning-collapsed/agent-reasoning-collapsed.contents.html` — 13 lines (from UI-pattern atomics (catalog))
|
|
98
|
+
- `catalog/page-shells/app/agent-canvas/agent-canvas.contents.html` — 56 lines (from Page-shell templates (catalog))
|
|
99
|
+
|
|
100
|
+
## chat (3)
|
|
101
|
+
|
|
102
|
+
> Chat surfaces (thread, composer, sidebar). Lift chat-streaming-surface composition.
|
|
103
|
+
|
|
104
|
+
- `apps/genui/app/factory-chat/factory-chat.contents.html` — 48 lines (from GenUI app routes)
|
|
105
|
+
- `catalog/ui-patterns/app/chat-streaming-surface/chat-streaming-surface.contents.html` — 16 lines (from UI-pattern atomics (catalog))
|
|
106
|
+
- `catalog/page-shells/app/chat-page/chat-page.contents.html` — 67 lines (from Page-shell templates (catalog))
|
|
107
|
+
|
|
108
|
+
## editor (6)
|
|
109
|
+
|
|
110
|
+
> Editor panes (code, preview, toolbar). Lift editor-shell composition.
|
|
111
|
+
|
|
112
|
+
- `apps/genui/app/a2ui-editor/a2ui-editor.contents.html` — 261 lines (from GenUI app routes)
|
|
113
|
+
- `apps/genui/app/render-preview/render-preview.contents.html` — 74 lines (from GenUI app routes)
|
|
114
|
+
- `catalog/ui-patterns/app/editor-code-pane/editor-code-pane.contents.html` — 16 lines (from UI-pattern atomics (catalog))
|
|
115
|
+
- `catalog/ui-patterns/app/editor-preview-pane/editor-preview-pane.contents.html` — 13 lines (from UI-pattern atomics (catalog))
|
|
116
|
+
- `catalog/page-shells/app/doc-editor/doc-editor.contents.html` — 65 lines (from Page-shell templates (catalog))
|
|
117
|
+
- `catalog/page-shells/app/editor-page/editor-page.contents.html` — 25 lines (from Page-shell templates (catalog))
|
|
118
|
+
|
|
119
|
+
## kanban (2)
|
|
120
|
+
|
|
121
|
+
> Kanban / column-based boards. Lift kanban-board-3col pattern.
|
|
122
|
+
|
|
123
|
+
- `catalog/ui-patterns/app/kanban-board-3col/kanban-board-3col.contents.html` — 145 lines (from UI-pattern atomics (catalog))
|
|
124
|
+
- `catalog/page-shells/app/kanban-page/kanban-page.contents.html` — 121 lines (from Page-shell templates (catalog))
|
|
125
|
+
|
|
126
|
+
## data-table (5)
|
|
127
|
+
|
|
128
|
+
> Data tables with badges/inline actions. Lift users-table-badge composition.
|
|
129
|
+
|
|
130
|
+
- `apps/user-flow/app/onboarding/import-data/import-data.contents.html` — 70 lines (from User-flow templates)
|
|
131
|
+
- `catalog/ui-patterns/app/card-grid-images/card-grid-images.contents.html` — 91 lines (from UI-pattern atomics (catalog))
|
|
132
|
+
- `catalog/ui-patterns/app/feature-grid-icons/feature-grid-icons.contents.html` — 60 lines (from UI-pattern atomics (catalog))
|
|
133
|
+
- `catalog/ui-patterns/app/permission-matrix-table/permission-matrix-table.contents.html` — 58 lines (from UI-pattern atomics (catalog))
|
|
134
|
+
- `catalog/ui-patterns/app/sortable-search-table/sortable-search-table.contents.html` — 23 lines (from UI-pattern atomics (catalog))
|
|
135
|
+
|
|
136
|
+
## command (1)
|
|
137
|
+
|
|
138
|
+
> Command palette / global search. Lift command-palette overlay pattern.
|
|
139
|
+
|
|
140
|
+
- `catalog/ui-patterns/app/command-palette/command-palette.contents.html` — 46 lines (from UI-pattern atomics (catalog))
|
|
141
|
+
|
|
142
|
+
## overlay (2)
|
|
143
|
+
|
|
144
|
+
> Modals, drawers, popovers. Lift destructive-confirm-modal pattern for confirmations.
|
|
145
|
+
|
|
146
|
+
- `apps/user-flow/app/registration/confirmation/confirmation.contents.html` — 79 lines (from User-flow templates)
|
|
147
|
+
- `catalog/ui-patterns/app/destructive-confirm-modal/destructive-confirm-modal.contents.html` — 28 lines (from UI-pattern atomics (catalog))
|
|
148
|
+
|
|
149
|
+
## multi-step-funnel (1)
|
|
150
|
+
|
|
151
|
+
> Multi-step conversion funnels. Lift conversion-funnel-6step composition.
|
|
152
|
+
|
|
153
|
+
- `catalog/ui-patterns/app/conversion-funnel-6step/conversion-funnel-6step.contents.html` — 26 lines (from UI-pattern atomics (catalog))
|
|
154
|
+
|
|
155
|
+
## feed (2)
|
|
156
|
+
|
|
157
|
+
> Activity / event feeds. Lift activity-feed composition.
|
|
158
|
+
|
|
159
|
+
- `apps/genui/app/gen-ui-feed/gen-ui-feed.contents.html` — 392 lines (from GenUI app routes)
|
|
160
|
+
- `catalog/ui-patterns/app/order-tracking-timeline/order-tracking-timeline.contents.html` — 45 lines (from UI-pattern atomics (catalog))
|
|
161
|
+
|
|
162
|
+
## marketing (2)
|
|
163
|
+
|
|
164
|
+
> Marketing pages, hero CTAs. Lift marketing-hero-cta composition.
|
|
165
|
+
|
|
166
|
+
- `catalog/ui-patterns/app/marketing-hero-cta/marketing-hero-cta.contents.html` — 17 lines (from UI-pattern atomics (catalog))
|
|
167
|
+
- `catalog/page-shells/app/marketing-page/marketing-page.contents.html` — 55 lines (from Page-shell templates (catalog))
|
|
168
|
+
|
|
169
|
+
## error-page (6)
|
|
170
|
+
|
|
171
|
+
> Error states (404, 500, forbidden, expired). Lift centered single-card error pattern.
|
|
172
|
+
|
|
173
|
+
- `apps/user-flow/app/auth/account-deleted/account-deleted.contents.html` — 40 lines (from User-flow templates)
|
|
174
|
+
- `apps/user-flow/app/auth/account-locked/account-locked.contents.html` — 40 lines (from User-flow templates)
|
|
175
|
+
- `apps/user-flow/app/auth/forbidden/forbidden.contents.html` — 38 lines (from User-flow templates)
|
|
176
|
+
- `apps/user-flow/app/auth/link-expired/link-expired.contents.html` — 41 lines (from User-flow templates)
|
|
177
|
+
- `apps/user-flow/app/auth/session-expired/session-expired.contents.html` — 37 lines (from User-flow templates)
|
|
178
|
+
- `catalog/page-shells/app/error-page/error-page.contents.html` — 20 lines (from Page-shell templates (catalog))
|
|
179
|
+
|
|
180
|
+
## demo-playground (3)
|
|
181
|
+
|
|
182
|
+
> Internal demo + playground surfaces. Use these as reference for composition style; not always production-grade.
|
|
183
|
+
|
|
184
|
+
- `apps/genui/app/a2ui/a2ui.contents.html` — 48 lines (from GenUI app routes)
|
|
185
|
+
- `apps/genui/app/css-channel-demo/css-channel-demo.contents.html` — 70 lines (from GenUI app routes)
|
|
186
|
+
- `apps/genui/app/streams-bridge/streams-bridge.contents.html` — 80 lines (from GenUI app routes)
|
|
187
|
+
|
|
188
|
+
## other (40)
|
|
189
|
+
|
|
190
|
+
> Misc canonicals. Inspect contents.html to determine UI type.
|
|
191
|
+
|
|
192
|
+
- `apps/genui/app/gen-ui/gen-ui.contents.html` — 47 lines (from GenUI app routes)
|
|
193
|
+
- `apps/user-flow/app/auth/accept-invite/accept-invite.contents.html` — 52 lines (from User-flow templates)
|
|
194
|
+
- `apps/user-flow/app/auth/forgot-password/sent/sent.contents.html` — 33 lines (from User-flow templates)
|
|
195
|
+
- `apps/user-flow/app/auth/sign-in/magic-link/sent/sent.contents.html` — 35 lines (from User-flow templates)
|
|
196
|
+
- `apps/user-flow/app/auth/sign-in/mfa/recovery/recovery.contents.html` — 46 lines (from User-flow templates)
|
|
197
|
+
- `apps/user-flow/app/auth/sign-out/sign-out.contents.html` — 33 lines (from User-flow templates)
|
|
198
|
+
- `apps/user-flow/app/auth/sign-up/sso-only/sso-only.contents.html` — 41 lines (from User-flow templates)
|
|
199
|
+
- `apps/user-flow/app/onboarding/browser-extension/browser-extension.contents.html` — 69 lines (from User-flow templates)
|
|
200
|
+
- `apps/user-flow/app/onboarding/complete/complete.contents.html` — 82 lines (from User-flow templates)
|
|
201
|
+
- `apps/user-flow/app/onboarding/connect-source/connect-source.contents.html` — 82 lines (from User-flow templates)
|
|
202
|
+
- `apps/user-flow/app/onboarding/mobile-app/mobile-app.contents.html` — 67 lines (from User-flow templates)
|
|
203
|
+
- `apps/user-flow/app/onboarding/mode/mode.contents.html` — 50 lines (from User-flow templates)
|
|
204
|
+
- `apps/user-flow/app/onboarding/review/review.contents.html` — 301 lines (from User-flow templates)
|
|
205
|
+
- `apps/user-flow/app/registration/address/address.contents.html` — 253 lines (from User-flow templates)
|
|
206
|
+
- `apps/user-flow/app/registration/brand-scrape/brand-scrape.contents.html` — 156 lines (from User-flow templates)
|
|
207
|
+
- `apps/user-flow/app/registration/departments/departments.contents.html` — 91 lines (from User-flow templates)
|
|
208
|
+
- `apps/user-flow/app/registration/done/done.contents.html` — 281 lines (from User-flow templates)
|
|
209
|
+
- `apps/user-flow/app/registration/import/import.contents.html` — 79 lines (from User-flow templates)
|
|
210
|
+
- `apps/user-flow/app/registration/invite/invite.contents.html` — 99 lines (from User-flow templates)
|
|
211
|
+
- `apps/user-flow/app/registration/legal/legal.contents.html` — 102 lines (from User-flow templates)
|
|
212
|
+
- `apps/user-flow/app/registration/org-review/org-review.contents.html` — 247 lines (from User-flow templates)
|
|
213
|
+
- `apps/user-flow/app/registration/personal/personal.contents.html` — 146 lines (from User-flow templates)
|
|
214
|
+
- `apps/user-flow/app/registration/plan/plan.contents.html` — 128 lines (from User-flow templates)
|
|
215
|
+
- `apps/user-flow/app/registration/support/support.contents.html` — 146 lines (from User-flow templates)
|
|
216
|
+
- `apps/user-flow/app/registration/use-case/use-case.contents.html` — 77 lines (from User-flow templates)
|
|
217
|
+
- `apps/user-flow/app/registration/workspace/workspace.contents.html` — 45 lines (from User-flow templates)
|
|
218
|
+
- `catalog/ui-patterns/app/email-inbox-list/email-inbox-list.contents.html` — 135 lines (from UI-pattern atomics (catalog))
|
|
219
|
+
- `catalog/ui-patterns/app/import-mapping/import-mapping.contents.html` — 217 lines (from UI-pattern atomics (catalog))
|
|
220
|
+
- `catalog/ui-patterns/app/loading-skeleton-placeholder/loading-skeleton-placeholder.contents.html` — 62 lines (from UI-pattern atomics (catalog))
|
|
221
|
+
- `catalog/ui-patterns/app/product-card-buy/product-card-buy.contents.html` — 39 lines (from UI-pattern atomics (catalog))
|
|
222
|
+
- `catalog/ui-patterns/app/social-media-post-card/social-media-post-card.contents.html` — 31 lines (from UI-pattern atomics (catalog))
|
|
223
|
+
- `catalog/ui-patterns/app/survey-rating-form/survey-rating-form.contents.html` — 31 lines (from UI-pattern atomics (catalog))
|
|
224
|
+
- `catalog/ui-patterns/app/testimonials-avatar-cards/testimonials-avatar-cards.contents.html` — 56 lines (from UI-pattern atomics (catalog))
|
|
225
|
+
- `catalog/ui-patterns/app/tooltip-hover/tooltip-hover.contents.html` — 12 lines (from UI-pattern atomics (catalog))
|
|
226
|
+
- `catalog/page-shells/app/form-page/form-page.contents.html` — 26 lines (from Page-shell templates (catalog))
|
|
227
|
+
- `catalog/page-shells/app/gallery-page/gallery-page.contents.html` — 79 lines (from Page-shell templates (catalog))
|
|
228
|
+
- `playgrounds/admin-shell/app/admin-shell.contents.html` — 99 lines (from Playgrounds)
|
|
229
|
+
- `playgrounds/chat/app/chat.contents.html` — 49 lines (from Playgrounds)
|
|
230
|
+
- `playgrounds/composed-flow/app/composed-flow.contents.html` — 294 lines (from Playgrounds)
|
|
231
|
+
- `playgrounds/table-toolbar/app/table-toolbar.contents.html` — 31 lines (from Playgrounds)
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
## Maintenance
|
|
236
|
+
|
|
237
|
+
Re-build this index:
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
node <this-skill>/scripts/build-canonical-pattern-index.mjs # from the monorepo root
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
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`.
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Modern AdiaUI is small, declarative, and token-driven. Most of the "bugs" agents write are bugs _against the conventions_ — bare `<div>`s where `col-ui` belongs, raw `<input>` where `input-ui` belongs, hex colors where tokens belong. The conventions are not stylistic preferences; each one corresponds to a working feature (theme switching, density modes, form association, focus rings) that breaks silently when the convention is violated.
|
|
4
4
|
|
|
5
|
-
When in doubt: look up the catalog (
|
|
6
|
-
|
|
7
|
-
Absorbed from the legacy code-bestpractices skill (now a redirect; this file replaces the daily-driver content).
|
|
5
|
+
When in doubt: look up the catalog (the `lookup_component` MCP tool, or the adia-factory plugin's composition skill), pick the existing primitive, wire through tokens.
|
|
8
6
|
|
|
9
7
|
---
|
|
10
8
|
|
|
@@ -24,7 +22,7 @@ Every interactive surface, form control, layout container, and content block shi
|
|
|
24
22
|
<input type="email" />
|
|
25
23
|
```
|
|
26
24
|
|
|
27
|
-
The catalog has
|
|
25
|
+
The catalog has 127 component directories under `packages/web-components/components/`. Before composing, confirm via `get_component_map` (the a2ui MCP) that the one you want exists — and what its real prop names are.
|
|
28
26
|
|
|
29
27
|
## Layout primitives
|
|
30
28
|
|
|
@@ -116,7 +114,7 @@ Static markup written by hand uses the components directly. UIs generated from i
|
|
|
116
114
|
|
|
117
115
|
The runtime handles `createSurface` / `updateComponents` / `wireComponents` messages and binds `FormController` / `DataStreamController` controllers automatically. Don't roll your own message handler — the wiring lives in `@adia-ai/a2ui-runtime`.
|
|
118
116
|
|
|
119
|
-
For multi-turn refinement, pass back `state_id` from prior responses so the engine can chain through `parent_state_id`. See the **adia-
|
|
117
|
+
For multi-turn refinement, pass back `state_id` from prior responses so the engine can chain through `parent_state_id`. See the sibling **adia-a2ui** skill for the operator playbook.
|
|
120
118
|
|
|
121
119
|
## Two-block `@scope` CSS
|
|
122
120
|
|
|
@@ -137,8 +135,8 @@ Component CSS uses a mandatory two-block `@scope` structure. Tokens go in `:wher
|
|
|
137
135
|
}
|
|
138
136
|
|
|
139
137
|
:scope[variant="accent"] {
|
|
140
|
-
--badge-bg: var(--a-
|
|
141
|
-
--badge-fg: var(--a-
|
|
138
|
+
--badge-bg: var(--a-primary-bg); /* token override only */
|
|
139
|
+
--badge-fg: var(--a-primary-fg);
|
|
142
140
|
}
|
|
143
141
|
}
|
|
144
142
|
```
|
|
@@ -156,17 +154,17 @@ Component CSS aliases from L3 (the role × state matrix), not L2 (the family bas
|
|
|
156
154
|
```css
|
|
157
155
|
/* right — L3 alias keeps the state cascade working */
|
|
158
156
|
:scope[variant="accent"]:hover {
|
|
159
|
-
--button-bg: var(--a-
|
|
160
|
-
--button-fg: var(--a-
|
|
157
|
+
--button-bg: var(--a-primary-bg-hover);
|
|
158
|
+
--button-fg: var(--a-primary-fg-hover);
|
|
161
159
|
}
|
|
162
160
|
|
|
163
161
|
/* wrong — L2 stops the cascade */
|
|
164
162
|
:scope[variant="accent"]:hover {
|
|
165
|
-
--button-bg: var(--a-
|
|
163
|
+
--button-bg: var(--a-primary); /* loses theme + contrast wiring */
|
|
166
164
|
}
|
|
167
165
|
```
|
|
168
166
|
|
|
169
|
-
For text on filled
|
|
167
|
+
For text on filled primary discs (radio dots, step numerals), use `--a-chrome-light` — theme-stable against any fill. (`--a-primary-fg` also works post-Material-adoption — it resolves to the palette's fixed-light on-color — but `--a-chrome-light` stays correct on arbitrary/brand fills too.)
|
|
170
168
|
|
|
171
169
|
Audit procedure + chrome palette in [token-contract.md](token-contract.md).
|
|
172
170
|
|
|
@@ -174,7 +172,7 @@ Audit procedure + chrome palette in [token-contract.md](token-contract.md).
|
|
|
174
172
|
|
|
175
173
|
A **variant** is cosmetic — color, border, shadow depth. A **mode** restructures the box — direction, grid template, display type.
|
|
176
174
|
|
|
177
|
-
Variant bodies may only contain `--component-*: var(...)` lines. They must NEVER touch `padding`, `display`, `position`, `width`, `height`, `gap`, `flex`, `grid`, `overflow`, `border-radius`. Layout-changing attributes are modes, and modes require an entry in the Sanctioned Mode Attributes table at
|
|
175
|
+
Variant bodies may only contain `--component-*: var(...)` lines. They must NEVER touch `padding`, `display`, `position`, `width`, `height`, `gap`, `flex`, `grid`, `overflow`, `border-radius`. Layout-changing attributes are modes, and modes require an entry in the Sanctioned Mode Attributes table at `.claude/docs/specs/component-token-contract.md` `Modes` section.
|
|
178
176
|
|
|
179
177
|
```css
|
|
180
178
|
/* right — variant overrides tokens only */
|
|
@@ -273,7 +271,7 @@ Don't propose polyfilling native APIs already at the baseline. The runtime expec
|
|
|
273
271
|
When transparency-mixing colors, use `oklab` not `oklch` for the interpolation space — Safari < 18 had an OKLCH-with-transparent red-shift bug, and `oklab` is perceptually equivalent here:
|
|
274
272
|
|
|
275
273
|
```css
|
|
276
|
-
--code-active-line-bg: color-mix(in oklab, var(--a-
|
|
274
|
+
--code-active-line-bg: color-mix(in oklab, var(--a-primary-muted) 40%, transparent);
|
|
277
275
|
```
|
|
278
276
|
|
|
279
277
|
## Legacy avoidance
|
|
@@ -283,7 +281,7 @@ The library was renamed from `@agent-ui-kit/*` to `@adia-ai/*`; tokens went from
|
|
|
283
281
|
```js
|
|
284
282
|
// right
|
|
285
283
|
import { AdiaElement } from '@adia-ai/web-components';
|
|
286
|
-
:where(:scope) { --button-bg: var(--a-
|
|
284
|
+
:where(:scope) { --button-bg: var(--a-primary-bg); }
|
|
287
285
|
|
|
288
286
|
// wrong
|
|
289
287
|
import { NanoElement } from '@agent-ui-kit/web-components';
|
|
@@ -300,7 +298,7 @@ Other deprecated forms swept in an early cut:
|
|
|
300
298
|
- `'chat-submit'` event → `'submit'`
|
|
301
299
|
- `<field-ui error="…">` → message moves to the slotted control
|
|
302
300
|
|
|
303
|
-
For a wholesale migration, use
|
|
301
|
+
For a wholesale consumer-side migration, use `adia-migrate` (adia-factory plugin) — it reads the MIGRATION GUIDE and runs the mechanical sweeps.
|
|
304
302
|
|
|
305
303
|
## Validate, always
|
|
306
304
|
|
|
@@ -312,7 +310,7 @@ For consumer markup (HTML pages, exemplars, training data), the checks are manua
|
|
|
312
310
|
- Run the project's lint if applicable: `npx eslint <path>`.
|
|
313
311
|
- Smoke the rendered output via `npm run dev` and load the touched page.
|
|
314
312
|
|
|
315
|
-
For component source under `packages/web-components/components/**`, the gate is heavier — see [authoring-cycle.md](authoring-cycle.md) Step 5 + the full release-side gate roster in the **adia-
|
|
313
|
+
For component source under `packages/web-components/components/**`, the gate is heavier — see [authoring-cycle.md](authoring-cycle.md) Step 5 + the full release-side gate roster in the sibling **adia-release** skill.
|
|
316
314
|
|
|
317
315
|
## Cross-references
|
|
318
316
|
|
|
@@ -321,9 +319,9 @@ For component source under `packages/web-components/components/**`, the gate is
|
|
|
321
319
|
- [css-patterns.md](css-patterns.md) — full @scope + variant/mode CSS architecture
|
|
322
320
|
- [lifecycle-patterns.md](lifecycle-patterns.md) — timers, observers, popovers, listeners
|
|
323
321
|
- [token-contract.md](token-contract.md) — token audit procedure
|
|
324
|
-
- [llm-bridge.md](llm-bridge.md) —
|
|
325
|
-
- [module-promotion.md](module-promotion.md) —
|
|
322
|
+
- [llm-bridge.md](llm-bridge.md) — extend @adia-ai/llm
|
|
323
|
+
- [module-promotion.md](module-promotion.md) — promote inline → module
|
|
326
324
|
- [anti-patterns.md](anti-patterns.md) — failure-mode catalogue with file:line refs
|
|
327
|
-
- **adia-
|
|
328
|
-
- **adia-
|
|
329
|
-
- the **adia-
|
|
325
|
+
- **adia-a2ui** (sibling skill) — generator / corpus / MCP pipeline
|
|
326
|
+
- **adia-dogfood** (sibling skill) — cross-surface visual / static QA
|
|
327
|
+
- the **adia-factory** plugin — composition playbook for consumers building apps on the framework
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# Common gotchas — authoring traps
|
|
2
|
+
|
|
3
|
+
Six concrete failure modes: five from a billing-overview rebuild + multi-demo grandfather-elimination cycle (CSS/composition-layering traps, §§1–5, composite authoring specifically), plus one from the site-a2ui migration's router-race root cause (async-lifecycle sequencing, §6, any primitive or module with a multi-await lifecycle method). 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
|
+
Composite authors: read §§1–5 BEFORE Phase 3 sketch. Anyone adding an async lifecycle method (fetch, dynamic `import()`, any multi-`await` sequence) to any primitive or module: read §6. Each entry includes the pattern, the detector (if any), and the fix.
|
|
10
|
+
|
|
11
|
+
## Contents
|
|
12
|
+
|
|
13
|
+
1. [Component used without reading its CSS](#1-component-used-without-reading-its-css--and-especially-without-reading-its-composition-grammar)
|
|
14
|
+
2. [Parent CSS overriding child component's intrinsic display](#2-parent-css-overriding-child-components-intrinsic-display)
|
|
15
|
+
3. [Mixed sizes across form/control groups](#3-mixed-sizes-across-formcontrol-groups)
|
|
16
|
+
4. [minmax(min, 1fr) inside repeat() fighting container queries](#4-minmaxmin-1fr-inside-repeat-fighting-container-queries)
|
|
17
|
+
5. [Nested `<!-- ... -->` inside design-plan canonical-sketch fenced blocks](#5-nested----inside-design-plan-canonical-sketch-fenced-blocks)
|
|
18
|
+
6. [Async load/render function completing out of order](#6-async-loadrender-function-completing-out-of-order--a-guard-at-the-checkpoint-isnt-enough)
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 1. Component used without reading its CSS — and especially without reading its composition grammar
|
|
23
|
+
|
|
24
|
+
**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).
|
|
25
|
+
|
|
26
|
+
**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).
|
|
27
|
+
|
|
28
|
+
**Detector**: the component-literacy step in [composite-demo-protocol.md](composite-demo-protocol.md) (Phase 2) has you read each used primitive's `.css` before locking the choice. `audit:card-structure` catches the specific card-ui bypass; analogous strict audits don't exist yet for avatar-ui / drawer-ui / aside-ui.
|
|
29
|
+
|
|
30
|
+
**Fix**: Read the primitive's `.css` end-to-end. Identify its expected child structure (slot grammar). USE it; never invent a parallel layer.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## 2. Parent CSS overriding child component's intrinsic display
|
|
35
|
+
|
|
36
|
+
**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.
|
|
37
|
+
|
|
38
|
+
**Example**: 4 billing composites all had:
|
|
39
|
+
|
|
40
|
+
```css
|
|
41
|
+
/* WRONG — clobbers empty-state-ui's flex column */
|
|
42
|
+
:scope > [data-empty] { display: none; }
|
|
43
|
+
:scope[empty] > [data-empty] { display: block; }
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
`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.`**
|
|
47
|
+
|
|
48
|
+
**Detector**: None today. Caught by user visual review.
|
|
49
|
+
|
|
50
|
+
**Fix** — invert visibility toggle so no display value is set when shown:
|
|
51
|
+
|
|
52
|
+
```css
|
|
53
|
+
/* RIGHT — child's :scope display remains intact */
|
|
54
|
+
:scope:not([empty]) > [data-empty] { display: none; }
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## 3. Mixed sizes across form/control groups
|
|
60
|
+
|
|
61
|
+
**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.
|
|
62
|
+
|
|
63
|
+
**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.
|
|
64
|
+
|
|
65
|
+
**Detector**: None today. Caught by user visual review.
|
|
66
|
+
|
|
67
|
+
**Fix**:
|
|
68
|
+
|
|
69
|
+
- When stamping a control group, set the SAME `size` attribute on every control explicitly.
|
|
70
|
+
- 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.
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## 4. minmax(min, 1fr) inside repeat() fighting container queries
|
|
75
|
+
|
|
76
|
+
**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.
|
|
77
|
+
|
|
78
|
+
**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.
|
|
79
|
+
|
|
80
|
+
**Detector**: None today.
|
|
81
|
+
|
|
82
|
+
**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.
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## 5. Nested `<!-- ... -->` inside design-plan canonical-sketch fenced blocks
|
|
87
|
+
|
|
88
|
+
**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.
|
|
89
|
+
|
|
90
|
+
**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.
|
|
91
|
+
|
|
92
|
+
**Detector**: ✓ caught by `npm run audit:demo-pattern-source` — emits `phase_3_sketch contains an inner <!-- ... --> comment` finding.
|
|
93
|
+
|
|
94
|
+
**Fix**: Remove inner HTML comments from the canonical-sketch. Use plain text annotations or remove the doc-noise entirely.
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## 6. Async load/render function completing out of order — a guard AT the checkpoint isn't enough
|
|
99
|
+
|
|
100
|
+
**Pattern**: A lifecycle method does asynchronous work (fetch, dynamic `import()`, any `await`) BEFORE reaching a sequence/resolver checkpoint that's guarded against stale calls. The guard only checks identity/sequence AT that one checkpoint — it doesn't protect the awaits that come after it. A call that started earlier but is slow can resume, pass every checkpoint it reaches (each one, in isolation, looks current), and finish writing state AFTER a faster, later call already completed — clobbering the newer result with stale content. The bug is invisible per-checkpoint because each individual guard check "passes"; the invariant that breaks is the ORDER completions land in, not any single check's correctness.
|
|
101
|
+
|
|
102
|
+
**Example**: `router-ui`'s `#loadContent` (`packages/web-components/core/provider.js`) fetched content, then ran it through the template resolver, which itself carried the only staleness guard (checked at resolver entry). A navigation to `/site/components/button` that fetched slowly could resume after a faster later navigation to `/site/dashboard` had already rendered — the resolver's own guard had nothing to check against by the time the stale call reached it, since the fetch (before the resolver) was itself unguarded. Reproduced deterministically with a 2-second-delayed fetch: the DOM showed the Dashboard's content under `data-route-path="button"`. Three separate flake classes across the site-a2ui migration all traced back to this one mechanism (`site-a2ui/FINDINGS.md`, "Router race fully root-caused: late-resuming #loadContent steals the sequence").
|
|
103
|
+
|
|
104
|
+
**Detector**: None generic — a per-page timing repro (delay the async step past the next call's completion, then assert final state matches the LAST call issued, not the first-guarded one) is how this was actually caught; no static check flags it.
|
|
105
|
+
|
|
106
|
+
**Fix**: Claim a monotonic sequence token as the FIRST line of the function, before any `await` — not at the first checkpoint reached. Re-check the token after EVERY subsequent `await` (not just once), and return early — without writing any state or emitting any event — the moment it no longer matches. A checkpoint guard placed only where you happen to already have a natural pause point (a resolver, a render call) is not equivalent to this; it only catches staleness FOR CALLS THAT REACH THAT SPECIFIC POINT before the pause, which a slow-but-eventually-arriving call always will.
|
|
107
|
+
|
|
108
|
+
**Illustrative** (simplified from the real fix — see `provider.js:230,245,250,286` for the actual code):
|
|
109
|
+
|
|
110
|
+
```javascript
|
|
111
|
+
async #loadContent(route) {
|
|
112
|
+
const nav = ++this.#navSeq; // claimed before any await
|
|
113
|
+
const content = await fetchContent(route);
|
|
114
|
+
if (nav !== this.#navSeq) return; // re-checked after EVERY await
|
|
115
|
+
const resolved = await this.#templateResolver.resolve(content);
|
|
116
|
+
if (nav !== this.#navSeq) return;
|
|
117
|
+
// ...write state / emit route-loaded only here
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**Generalizes to**: any lifecycle method with more than one `await` where a caller can re-invoke it before the previous call finishes (route changes, search-as-you-type, tab switches, any "latest wins" async UI update) — not just routing.
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Meta-pattern across gotchas 1–5
|
|
126
|
+
|
|
127
|
+
**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.**
|
|
128
|
+
|
|
129
|
+
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. The component-literacy read is a hint, not a gate — the mechanical defenses above are the proximate fix. See [composite-demo-protocol.md](composite-demo-protocol.md) Phase 2. Gotchas #2–4 are caught only by visual review until corresponding audits are added. #6 is a distinct axis (async-lifecycle correctness, not CSS layering) — see its own Detector/Fix above.
|