@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.
- package/.claude-plugin/plugin.json +3 -6
- package/CHANGELOG.md +27 -26
- package/README.md +35 -40
- package/agents/a2ui-engineer.md +26 -0
- package/agents/component-author.md +29 -0
- package/agents/framework-verifier.md +26 -0
- package/agents/release-engineer.md +25 -0
- package/agents/routing-corpus.json +318 -0
- 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 -5
- 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 +22 -40
- 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-deploy/references/deploy-playbooks.md +276 -0
- 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 +27 -2
- package/skills/{adia-ui-release → adia-release}/scripts/dispatch-publish.mjs +72 -6
- package/skills/{adia-ui-release → adia-release}/scripts/insert-stub.mjs +6 -4
- package/skills/adia-release/scripts/package-paths.mjs +50 -0
- package/skills/{adia-ui-release → adia-release}/scripts/promote-unreleased.mjs +4 -3
- package/skills/{adia-ui-release → adia-release}/scripts/release-pack.mjs +48 -27
- package/skills/{adia-ui-release → adia-release}/scripts/tag-lockstep.mjs +15 -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/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 -22
- 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-release/CHANGELOG.md +0 -23
- package/skills/adia-ui-release/SKILL.md +0 -295
- 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/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 -215
- 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 -179
- package/skills/adia-ui-release/skill.json +0 -75
- /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
|
@@ -196,7 +196,7 @@ Or, if the component already defines state-aware tokens in `:where(:scope)`, reu
|
|
|
196
196
|
/* WRONG — button.css */
|
|
197
197
|
@scope (button-ui) {
|
|
198
198
|
:where(:scope) {
|
|
199
|
-
--btn-bg: var(--a-
|
|
199
|
+
--btn-bg: var(--a-primary-bg); /* ← stem mismatch */
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
202
|
```
|
|
@@ -206,7 +206,7 @@ Or, if the component already defines state-aware tokens in `:where(:scope)`, reu
|
|
|
206
206
|
```css
|
|
207
207
|
@scope (button-ui) {
|
|
208
208
|
:where(:scope) {
|
|
209
|
-
--button-bg: var(--a-
|
|
209
|
+
--button-bg: var(--a-primary-bg);
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
```
|
|
@@ -229,7 +229,7 @@ Or, if the component already defines state-aware tokens in `:where(:scope)`, reu
|
|
|
229
229
|
|
|
230
230
|
**What went wrong:** `variant="button"` changes the layout (square buttons with specific dimensions) — that's a mode, not a variant.
|
|
231
231
|
|
|
232
|
-
**Fix:** add `pagination-ui[variant="button"]` to the Sanctioned Mode Attributes table in
|
|
232
|
+
**Fix:** add `pagination-ui[variant="button"]` to the Sanctioned Mode Attributes table in `.claude/docs/specs/component-token-contract.md`. Document the layout change as intentional.
|
|
233
233
|
|
|
234
234
|
Alternative: refactor to make the attribute cosmetic — if possible.
|
|
235
235
|
|
|
@@ -239,7 +239,7 @@ Alternative: refactor to make the attribute cosmetic — if possible.
|
|
|
239
239
|
/* WRONG — missing the :where(:scope) token block */
|
|
240
240
|
@scope (button-ui) {
|
|
241
241
|
:scope {
|
|
242
|
-
--button-bg: var(--a-
|
|
242
|
+
--button-bg: var(--a-primary-bg);
|
|
243
243
|
background: var(--button-bg);
|
|
244
244
|
display: inline-flex;
|
|
245
245
|
}
|
|
@@ -597,6 +597,35 @@ disconnected() {
|
|
|
597
597
|
|
|
598
598
|
---
|
|
599
599
|
|
|
600
|
+
## Rapid-fire anti-patterns (mined from incident history)
|
|
601
|
+
|
|
602
|
+
One line each; every entry is a shipped bug or a CRITICAL gate. Same axes as above, too small for a full entry.
|
|
603
|
+
|
|
604
|
+
### API / silent-failure class
|
|
605
|
+
|
|
606
|
+
- **Components silently accept ANY made-up attribute and no-op** (`text-ui muted`, `card-ui hover-elevate`, `description-list-ui variant="columns"`) — check the component's yaml for the real prop list before authoring any attribute.
|
|
607
|
+
- **`empty-state-ui` takes `[heading]`, not `[title]`** — `title=` becomes the invisible native tooltip and the message never renders (the AP-04 collision in the wild).
|
|
608
|
+
- **A hardcoded `open` on a `showModal` overlay (`modal-ui` / `drawer-ui`) bricks the whole page** — no console error; only a live click / `elementFromPoint` probe catches it.
|
|
609
|
+
- **Set `select-ui.options = [...]` for dynamic options, never `appendChild(<option>)`** — the listbox popover is stamped around the INITIAL `<option>` children at connect; later-appended options land outside it as visible flow content.
|
|
610
|
+
- **`<thead>/<tbody>/<tr>/<th>/<td>` are foster-parented OUT of the DOM inside any non-`<table>` ancestor, including custom elements** — gone before JS runs; never author them inside a custom element.
|
|
611
|
+
|
|
612
|
+
### UIElement / reactivity class
|
|
613
|
+
|
|
614
|
+
- **Declaring `textContent` / `innerHTML` / `className` / `id` in `static properties` breaks the native accessor** — `installProps` swaps it for a signal, so `el.textContent = ''` becomes a signal write, not a child-wipe.
|
|
615
|
+
- **`customElements.whenDefined(tag)` never rejects; an unimported tag never resolves** — a `Promise.all([...]).then(bootstrap)` gate hangs forever with no console error (chrome renders via tag-keyed CSS; the page is just "empty").
|
|
616
|
+
- **A MutationObserver that watches its own host AND mutates it in the callback hangs** — drain with `this.#observer.takeRecords()` after every absorb pass.
|
|
617
|
+
- **A document-listening trait must NOT re-emit the same-named event on its host with `bubbles: true`** — the bubble re-reaches document and re-fires the handler (infinite loop); use distinct incoming vs outgoing names.
|
|
618
|
+
- **Parent `render()` that filters children by an attribute the child sets in its OWN `connected()` races the upgrade** — match by tag name too.
|
|
619
|
+
- **Sync icon-registry checks (`isIconName` / `hasIcon`) at connect race the async manifest on static (non-Vite) deploys** — pair with `whenIconRegistryReady` deferred re-stamping.
|
|
620
|
+
|
|
621
|
+
### Registration / packaging class
|
|
622
|
+
|
|
623
|
+
- **Composites render internal `*-ui` tags the author never wrote** (`chat-input-ui` stamps `textarea-ui` + `select-ui`) — a consumer importing only the composite must also import those primitives (or the cluster barrel `packages/web-modules/<cluster>/index.js`) or they stay unregistered and collapse to 0px.
|
|
624
|
+
- **A NEW yaml prop with `reflect: true` is not load-bearing alone** — the class's `static properties` block is hand-authored, not codegen'd from yaml; add both.
|
|
625
|
+
- **Every `[slot="X"]` a component's CSS positions MUST be declared in the yaml `slots:` block** (including auto-stamped internal slots) — the slot-vocab-vs-CSS audit in `npm run check` fails CRITICAL otherwise.
|
|
626
|
+
- **A new primitive's CSS must be registered in `packages/web-components/styles/components.css`** (the hand-maintained CSS aggregator) — separate from the `components/index.js` JS barrel; miss it and the element registers but renders unstyled.
|
|
627
|
+
- **A primitive that programmatically creates a form-bearing primitive needs a `COMPOSITION_PAIR` entry in `scripts/release/check-composes-passthrough.mjs`** or the passthrough gate flags it.
|
|
628
|
+
|
|
600
629
|
## Meta-pattern: the "just this once" trap
|
|
601
630
|
|
|
602
631
|
All of these bugs started as "just this once" exceptions — a component author thought "I'll fix it later," or "this component is special," or "the linter isn't catching it so it's fine." Each "just this once" became a template for the next author.
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
# Authoring cycle —
|
|
1
|
+
# Authoring cycle — author a NEW primitive or MODIFY an existing one
|
|
2
2
|
|
|
3
|
-
The 5-step procedure run AFTER [primitive-audit.md](primitive-audit.md) clears (
|
|
4
|
-
|
|
5
|
-
Absorbed from the legacy author skill's Workflow section.
|
|
3
|
+
The 5-step procedure run AFTER [primitive-audit.md](primitive-audit.md) clears (new primitive) — or jumping straight to Step 2 when modifying an existing one.
|
|
6
4
|
|
|
7
5
|
---
|
|
8
6
|
|
|
@@ -10,7 +8,7 @@ Absorbed from the legacy author skill's Workflow section.
|
|
|
10
8
|
|
|
11
9
|
Before writing or editing, load these four files. They are the ground truth:
|
|
12
10
|
|
|
13
|
-
-
|
|
11
|
+
- `.claude/docs/specs/component-token-contract.md` — the authoritative invariants. Skim the whole thing if you haven't read it this session; focus on "Variants vs Modes" and "Sanctioned Mode Attributes" if you're adding a new layout-affecting attribute.
|
|
14
12
|
- `packages/web-components/core/element.js` — `AdiaElement` base class. The `static properties` schema, `connected()`/`disconnected()`/`render()` lifecycle, and attribute-mapping conventions are all defined here.
|
|
15
13
|
- `packages/web-components/core/form.js` — `AdiaFormElement`. Only needed if the new component participates in forms (inputs, selects, checkboxes, etc.).
|
|
16
14
|
- At least one good-citizen reference that matches the shape of what you're building. Pick from: `button-ui`, `card-ui`, `input-ui`, `textarea-ui`, `check-ui`. Read both the `.js` and the `.css`.
|
|
@@ -19,7 +17,7 @@ Before writing or editing, load these four files. They are the ground truth:
|
|
|
19
17
|
|
|
20
18
|
Before typing, answer:
|
|
21
19
|
|
|
22
|
-
1. **Is this cosmetic or structural?** If the change affects `display`, `flex-direction`, `grid-template`, `padding`, layout geometry — it's a mode, not a variant. Modes require an entry in the Sanctioned Mode Attributes table (
|
|
20
|
+
1. **Is this cosmetic or structural?** If the change affects `display`, `flex-direction`, `grid-template`, `padding`, layout geometry — it's a mode, not a variant. Modes require an entry in the Sanctioned Mode Attributes table (`.claude/docs/specs/component-token-contract.md` `Modes` section). Do not introduce undocumented layout-changing variants.
|
|
23
21
|
|
|
24
22
|
2. **Does the new prop fit the Boolean-default-false rule?** If the default behavior is "on," negate the prop name before writing (`closable` is wrong if closable is the default; `permanent` is right).
|
|
25
23
|
|
|
@@ -43,7 +41,7 @@ These rules are the distilled lessons from a 5-iteration audit. Each one corresp
|
|
|
43
41
|
|
|
44
42
|
5. **Reserved-name anti-patterns.** Avoid: `title` (collides with HTML tooltip attribute), `active` on parent components (use `value` for a selection or `step` for an index — per-item `active` on children is fine), `error` in variant names (use `danger`; reserve `error` for validation state), `disabled` on non-form-participating components (use `readonly`), `multiple` with exclusion semantics (use a negated positive like `single`).
|
|
45
43
|
|
|
46
|
-
6. **Element tag ends in `-ui`; JS class is `Adia<Component>`.** `<foo-ui>` ↔ `class AdiaFoo extends AdiaElement`. Three-way consistency: filename, class name, custom-element tag. The sanctioned `-n` carve-out is `cot-ui` (the chain-of-thought streaming component); `nav-ui` was deprecated in favor of the `-ui` replacements. New `-n` tags require a contract-doc update — see
|
|
44
|
+
6. **Element tag ends in `-ui`; JS class is `Adia<Component>`.** `<foo-ui>` ↔ `class AdiaFoo extends AdiaElement`. Three-way consistency: filename, class name, custom-element tag. The sanctioned `-n` carve-out is `cot-ui` (the chain-of-thought streaming component); `nav-ui` was deprecated in favor of the `-ui` replacements. New `-n` tags require a contract-doc update — see `.claude/docs/specs/component-token-contract.md`.
|
|
47
45
|
|
|
48
46
|
### CSS
|
|
49
47
|
|
|
@@ -80,7 +78,7 @@ These rules are the distilled lessons from a 5-iteration audit. Each one corresp
|
|
|
80
78
|
|
|
81
79
|
5. **Component tokens follow `--<tag-stem>-<prop>`.** `--button-bg`, not `--btn-bg`. Files hosting multiple `@scope` blocks (e.g. `layout.css` with `col-ui`, `row-ui`, `stack-ui`) use each scope's own stem (`--col-gap`, `--row-gap`, `--stack-gap`).
|
|
82
80
|
|
|
83
|
-
6. **Consume L3, not L2.** In a variant/state body, alias from the role×state matrix, not the family base. Right: `--button-fg-hover: var(--a-
|
|
81
|
+
6. **Consume L3, not L2.** In a variant/state body, alias from the role×state matrix, not the family base. Right: `--button-fg-hover: var(--a-primary-fg-hover)`. Wrong: `--button-fg: var(--a-primary)`.
|
|
84
82
|
|
|
85
83
|
7. **No BEM, no `::part()`, no `::slotted()`.** AdiaUI is light-DOM; the shadow-DOM escape hatches don't apply. Slots are styled through slotted attribute selectors (`:scope > [slot="foo"]`), not `::slotted()`.
|
|
86
84
|
|
|
@@ -196,16 +194,16 @@ npm run verify:palette # CVD thresholds across theme × scheme
|
|
|
196
194
|
node -c path/to/new/file.js # JS syntax check
|
|
197
195
|
```
|
|
198
196
|
|
|
199
|
-
The full release-side gate roster lives in the **adia-
|
|
197
|
+
The full release-side gate roster lives in the sibling **adia-release** skill; run its pre-flight sweep after any structural change.
|
|
200
198
|
|
|
201
199
|
If a gate fails, fix before declaring done.
|
|
202
200
|
|
|
203
201
|
## Cross-references
|
|
204
202
|
|
|
205
|
-
- [primitive-audit.md](primitive-audit.md) —
|
|
203
|
+
- [primitive-audit.md](primitive-audit.md) — the §0 gate (run BEFORE this)
|
|
206
204
|
- [api-contract.md](api-contract.md) — deep dive on prop naming, type choices, reflection policy
|
|
207
205
|
- [css-patterns.md](css-patterns.md) — exhaustive CSS architecture (@scope, variants, modes)
|
|
208
206
|
- [lifecycle-patterns.md](lifecycle-patterns.md) — timers, observers, popovers, listener patterns
|
|
209
207
|
- [anti-patterns.md](anti-patterns.md) — full failure-mode catalogue, file:line refs
|
|
210
208
|
- [worked-example.md](worked-example.md) — badge-ui + counter-ui walkthroughs
|
|
211
|
-
- [token-contract.md](token-contract.md) —
|
|
209
|
+
- [token-contract.md](token-contract.md) — token audit (post-implementation check)
|
|
@@ -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
|