@adia-ai/adia-ui-forge 0.1.2
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 +23 -0
- package/CHANGELOG.md +26 -0
- package/README.md +54 -0
- package/bin/forge-lint +263 -0
- package/bin/lib/audit-axes.mjs +555 -0
- package/bin/lib/dry-run-irreversible.mjs +236 -0
- package/bin/lib/run-skill-evals.mjs +487 -0
- package/bin/lib/teach-router.mjs +250 -0
- package/commands/adia-forge-a2ui.md +10 -0
- package/commands/adia-forge-author.md +10 -0
- package/commands/adia-forge-dogfood.md +8 -0
- package/commands/adia-forge-llm.md +8 -0
- package/commands/adia-forge-orient.md +10 -0
- package/commands/adia-forge-release.md +8 -0
- package/commands/adia-forge-review.md +10 -0
- package/hooks/hooks.json +15 -0
- package/package.json +41 -0
- package/references/shared/content-trust.md +76 -0
- package/references/shared/pev-rationale.md +64 -0
- package/references/shared/skill-conventions.md +133 -0
- package/skills/adia-ui-a2ui/CHANGELOG.md +32 -0
- package/skills/adia-ui-a2ui/SKILL.md +243 -0
- package/skills/adia-ui-a2ui/evals/adversarial-corpus.json +75 -0
- package/skills/adia-ui-a2ui/evals/routing-corpus.json +31 -0
- package/skills/adia-ui-a2ui/evals/teach-routing-cases.json +100 -0
- package/skills/adia-ui-a2ui/references/anti-patterns.md +24 -0
- package/skills/adia-ui-a2ui/references/chunk-authoring.md +88 -0
- package/skills/adia-ui-a2ui/references/corpus-discipline.md +56 -0
- package/skills/adia-ui-a2ui/references/eval-diagnostics.md +127 -0
- package/skills/adia-ui-a2ui/references/fragment-graph.md +91 -0
- package/skills/adia-ui-a2ui/references/mcp-pipeline-ops.md +106 -0
- package/skills/adia-ui-a2ui/references/mcp-tool-reference.md +398 -0
- package/skills/adia-ui-a2ui/references/pipeline-overview.md +175 -0
- package/skills/adia-ui-a2ui/references/semantic-fail-lifting.md +120 -0
- package/skills/adia-ui-a2ui/references/strategy-engines.md +111 -0
- package/skills/adia-ui-a2ui/references/teach-protocol.md +220 -0
- package/skills/adia-ui-a2ui/references/zettel-calibration.md +93 -0
- package/skills/adia-ui-a2ui/scripts/audit-a2ui-roster.mjs +96 -0
- package/skills/adia-ui-a2ui/scripts/teach-route.mjs +157 -0
- package/skills/adia-ui-a2ui/skill.json +38 -0
- package/skills/adia-ui-authoring/CHANGELOG.md +32 -0
- package/skills/adia-ui-authoring/SKILL.md +256 -0
- package/skills/adia-ui-authoring/assets/case-studies/admin-shell-decomposition.md +101 -0
- package/skills/adia-ui-authoring/assets/case-studies/maxtokens-32768-discovery.md +109 -0
- package/skills/adia-ui-authoring/assets/case-studies/theme-panel-promotion.md +113 -0
- package/skills/adia-ui-authoring/evals/adversarial-design-plan-gates.json +138 -0
- package/skills/adia-ui-authoring/evals/routing-corpus.json +245 -0
- package/skills/adia-ui-authoring/references/anti-patterns.md +606 -0
- package/skills/adia-ui-authoring/references/api-contract.md +205 -0
- package/skills/adia-ui-authoring/references/authoring-cycle.md +211 -0
- package/skills/adia-ui-authoring/references/canonical-pattern-index.md +179 -0
- package/skills/adia-ui-authoring/references/code-style.md +329 -0
- package/skills/adia-ui-authoring/references/common-gotchas.md +93 -0
- package/skills/adia-ui-authoring/references/composite-demo-protocol.md +1084 -0
- package/skills/adia-ui-authoring/references/css-patterns.md +364 -0
- package/skills/adia-ui-authoring/references/lifecycle-patterns.md +302 -0
- package/skills/adia-ui-authoring/references/llm-bridge.md +254 -0
- package/skills/adia-ui-authoring/references/module-promotion.md +289 -0
- package/skills/adia-ui-authoring/references/primitive-audit.md +123 -0
- package/skills/adia-ui-authoring/references/shell-patterns.md +561 -0
- package/skills/adia-ui-authoring/references/teach-protocol.md +428 -0
- package/skills/adia-ui-authoring/references/token-contract.md +120 -0
- package/skills/adia-ui-authoring/references/worked-example.md +351 -0
- package/skills/adia-ui-authoring/references/yaml-contract.md +224 -0
- package/skills/adia-ui-authoring/scripts/audit-authoring-roster.mjs +148 -0
- package/skills/adia-ui-authoring/scripts/build-canonical-pattern-index.mjs +199 -0
- package/skills/adia-ui-authoring/skill.json +45 -0
- package/skills/adia-ui-dogfood/CHANGELOG.md +17 -0
- package/skills/adia-ui-dogfood/README.md +62 -0
- package/skills/adia-ui-dogfood/SKILL.md +866 -0
- package/skills/adia-ui-dogfood/scripts/analyze.mjs +603 -0
- package/skills/adia-ui-dogfood/skill.json +40 -0
- package/skills/adia-ui-forge/SKILL.md +88 -0
- package/skills/adia-ui-forge/evals/routing-corpus.json +30 -0
- package/skills/adia-ui-gen-review/CHANGELOG.md +108 -0
- package/skills/adia-ui-gen-review/SKILL.md +266 -0
- package/skills/adia-ui-gen-review/references/loop-protocol.md +712 -0
- package/skills/adia-ui-gen-review/references/rubric-cosmetic.md +144 -0
- package/skills/adia-ui-gen-review/references/rubric-decompose.md +117 -0
- package/skills/adia-ui-gen-review/references/rubric-score.md +249 -0
- package/skills/adia-ui-gen-review/references/scores.schema.json +125 -0
- package/skills/adia-ui-gen-review/references/teach-protocol.md +214 -0
- package/skills/adia-ui-gen-review/scripts/gen-review-coverage-audit.mjs +127 -0
- package/skills/adia-ui-gen-review/scripts/gen-review-decompose.mjs +569 -0
- package/skills/adia-ui-gen-review/scripts/gen-review-status.mjs +176 -0
- package/skills/adia-ui-gen-review/scripts/validate-cycle-scores.mjs +198 -0
- package/skills/adia-ui-gen-review/skill.json +22 -0
- package/skills/adia-ui-llm/CHANGELOG.md +25 -0
- package/skills/adia-ui-llm/SKILL.md +165 -0
- package/skills/adia-ui-llm/evals/adversarial-corpus.json +75 -0
- package/skills/adia-ui-llm/evals/routing-corpus.json +30 -0
- package/skills/adia-ui-llm/evals/teach-routing-cases.json +73 -0
- package/skills/adia-ui-llm/references/adapter-contract.md +99 -0
- package/skills/adia-ui-llm/references/add-a-provider.md +90 -0
- package/skills/adia-ui-llm/references/bridge-facade.md +94 -0
- package/skills/adia-ui-llm/references/browser-proxy-boundary.md +89 -0
- package/skills/adia-ui-llm/references/model-registry.md +75 -0
- package/skills/adia-ui-llm/references/streaming-sse.md +95 -0
- package/skills/adia-ui-llm/references/teach-protocol.md +78 -0
- package/skills/adia-ui-llm/scripts/audit-llm-roster.mjs +93 -0
- package/skills/adia-ui-llm/scripts/teach-route.mjs +119 -0
- package/skills/adia-ui-llm/skill.json +33 -0
- package/skills/adia-ui-release/CHANGELOG.md +23 -0
- package/skills/adia-ui-release/SKILL.md +295 -0
- package/skills/adia-ui-release/assets/case-studies/2026-05-20-batch-push-v0.6.14-v0.6.15.md +144 -0
- package/skills/adia-ui-release/assets/case-studies/2026-05-20-corpus-drift-remediation-v0.6.15.md +155 -0
- package/skills/adia-ui-release/assets/case-studies/2026-05-20-version-skip-correction-v0.6.12.md +114 -0
- package/skills/adia-ui-release/assets/case-studies/2026-05-21-author-from-scratch-v0.6.18.md +139 -0
- package/skills/adia-ui-release/assets/case-studies/2026-05-21-feedback37-retraction-v0.6.21.md +124 -0
- package/skills/adia-ui-release/assets/case-studies/2026-05-21-fn1-enrichment-pass-v0.6.19.md +125 -0
- package/skills/adia-ui-release/assets/case-studies/2026-05-21-stale-test-detection-v0.6.20.md +142 -0
- package/skills/adia-ui-release/assets/case-studies/2026-05-23-freshness-gate-recovery-v0.6.32.md +97 -0
- package/skills/adia-ui-release/assets/case-studies/2026-05-26-catalog-drift-recurring-v0.6.40.md +147 -0
- package/skills/adia-ui-release/assets/templates/stub-changelog.template.md +22 -0
- package/skills/adia-ui-release/evals/evals.json +164 -0
- package/skills/adia-ui-release/references/changelog-discipline.md +250 -0
- package/skills/adia-ui-release/references/cycle-happy-path.md +520 -0
- package/skills/adia-ui-release/references/exe-deploy.md +149 -0
- package/skills/adia-ui-release/references/gates-catalog.md +778 -0
- package/skills/adia-ui-release/references/ledger-discipline.md +232 -0
- package/skills/adia-ui-release/references/migration-guide-authoring.md +174 -0
- package/skills/adia-ui-release/references/multi-agent-baseline.md +207 -0
- package/skills/adia-ui-release/references/notes-authoring.md +212 -0
- package/skills/adia-ui-release/references/recovery-paths.md +215 -0
- package/skills/adia-ui-release/references/rollup-notes.md +208 -0
- package/skills/adia-ui-release/references/teach-protocol.md +468 -0
- package/skills/adia-ui-release/scripts/assert-monorepo-root.mjs +49 -0
- package/skills/adia-ui-release/scripts/audit-gate-roster.mjs +196 -0
- package/skills/adia-ui-release/scripts/bump.mjs +118 -0
- package/skills/adia-ui-release/scripts/dispatch-publish.mjs +151 -0
- package/skills/adia-ui-release/scripts/insert-stub.mjs +127 -0
- package/skills/adia-ui-release/scripts/make-ledger.mjs +179 -0
- package/skills/adia-ui-release/scripts/promote-unreleased.mjs +88 -0
- package/skills/adia-ui-release/scripts/release-pack.mjs +350 -0
- package/skills/adia-ui-release/scripts/tag-lockstep.mjs +110 -0
- package/skills/adia-ui-release/skill.json +75 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# Primitive Audit — Mode 1 §0 gate
|
|
2
|
+
|
|
3
|
+
**This is mandatory before _every_ new component or interactive surface in `packages/web-components/components/`.** Skipping it produces work that re-derives existing wiring, hits first-paint timing races (e.g. `input-ui[prefix]` falls back to literal text before the icon registry loads — `search-ui` was built precisely to hide that), creates asymmetry across the library, and burns user trust.
|
|
4
|
+
|
|
5
|
+
The audit takes 30 seconds. Do it.
|
|
6
|
+
|
|
7
|
+
Absorbed from the legacy `primitive-audit` skill (now removed; this file replaces it).
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Step 0 — list the affordances
|
|
12
|
+
|
|
13
|
+
Take your spec / screenshot / user request and list each interactive affordance independently. For a "table header bar" like a table-toolbar, that's:
|
|
14
|
+
|
|
15
|
+
1. Title with optional count badge
|
|
16
|
+
2. Filter button → popover with per-column inputs
|
|
17
|
+
3. Sort button → popover with per-column rows
|
|
18
|
+
4. Columns visibility button → popover with checkbox list
|
|
19
|
+
5. Search field
|
|
20
|
+
|
|
21
|
+
Each line is a separate audit target.
|
|
22
|
+
|
|
23
|
+
## Step 1 — inventory the library
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
ls packages/web-components/components/
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Skim the names. Most affordances have a dedicated component already.
|
|
30
|
+
|
|
31
|
+
## Step 2 — for each affordance, grep yamls
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# Example: looking for an existing search-input primitive
|
|
35
|
+
grep -lE "search|magnifying" packages/web-components/components/*/*.yaml
|
|
36
|
+
|
|
37
|
+
# Example: looking for an existing label+control wrapper
|
|
38
|
+
grep -lE "label.*control|inline label" packages/web-components/components/*/*.yaml
|
|
39
|
+
|
|
40
|
+
# Example: looking for an action-menu / popover primitive
|
|
41
|
+
grep -lE "menu|popover|dropdown" packages/web-components/components/*/*.yaml
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Read every match's yaml top section (description + props + slots + events). Five minutes of reading saves an hour of re-implementation.
|
|
45
|
+
|
|
46
|
+
## Step 3 — known-primitive map
|
|
47
|
+
|
|
48
|
+
Treat this as the default lookup table. **If your affordance maps to a row here, use that primitive — do not roll your own.**
|
|
49
|
+
|
|
50
|
+
| Affordance | Primitive (NOT your own from scratch) |
|
|
51
|
+
| --- | --- |
|
|
52
|
+
| Search field with magnifying-glass + clear + debounce | `search-ui` |
|
|
53
|
+
| Label + form control pair | `field-ui` (use `inline` for single-row layout) |
|
|
54
|
+
| Action menu anchored to a trigger button | `menu-ui` + `menu-item-ui` (+ `menu-divider-ui`) |
|
|
55
|
+
| Content popover (free-form) anchored to a trigger | `popover-ui` |
|
|
56
|
+
| Tooltip on hover / focus | `tooltip-ui` |
|
|
57
|
+
| Toolbar with overflow → spillover popover | `toolbar-ui` + `toolbar-group-ui` |
|
|
58
|
+
| Legend bound to a chart-ui by id | `chart-legend-ui[for]` |
|
|
59
|
+
| Pagination bar | `pagination-ui` |
|
|
60
|
+
| Empty state (icon + heading + body + action) | `empty-state-ui` |
|
|
61
|
+
| Loading skeleton blocks | `skeleton-ui` |
|
|
62
|
+
| Inline code / shortcut hint | `kbd-ui` (NOT raw `<code>` / `<kbd>`) |
|
|
63
|
+
| Inline metric (label + value + change + trend) | `stat-ui` |
|
|
64
|
+
| Block of code with syntax highlighting | `code-ui` |
|
|
65
|
+
| Table data-cell formatting (badge, link, progress, date, etc.) | `cell-types.js` registry — register a new type, don't render in column.render |
|
|
66
|
+
| Filter / sort / columns / search bar above a table | `table-toolbar-ui[for]` |
|
|
67
|
+
| Tabs + panels | `tabs-ui` + `tab-ui` |
|
|
68
|
+
| Modal / drawer / toast | `modal-ui` / `drawer-ui` / `toast-ui` |
|
|
69
|
+
| Switch / checkbox / radio / segmented / toggle group | `switch-ui` / `check-ui` / `radio-ui` / `segmented-ui` / `toggle-group-ui` |
|
|
70
|
+
| Avatar / avatar group | `avatar-ui` / `avatar-group-ui` |
|
|
71
|
+
| Color / calendar / OTP picker | `color-picker-ui` / `calendar-picker-ui` / `otp-input-ui` |
|
|
72
|
+
| Stepper / timeline / progress / progress-row | `stepper-ui` / `timeline-ui` / `progress-ui` / `progress-row-ui` |
|
|
73
|
+
| Card with header / section / footer | `card-ui` (+ slot children) — don't roll a "panel" |
|
|
74
|
+
| Description-list (key/value) | `description-list-ui` |
|
|
75
|
+
| Tree / list / action-list | `tree-ui` / `list-ui` / `action-list-ui` |
|
|
76
|
+
|
|
77
|
+
If your affordance isn't in this table, run Step 2 again with better grep keywords. Only after those return nothing should you consider authoring something new.
|
|
78
|
+
|
|
79
|
+
## Step 4 — when authoring IS warranted
|
|
80
|
+
|
|
81
|
+
If an affordance genuinely has no primitive (e.g. you're building the _first_ version of a new pattern), follow `chart-legend-ui` as the canonical "companion-bound-by-`[for]`" template:
|
|
82
|
+
|
|
83
|
+
- `[for]` id-ref to the peer element
|
|
84
|
+
- Resolve via `getRootNode().getElementById()`, fall back to first sibling of the right tag
|
|
85
|
+
- Listen to peer events for state sync
|
|
86
|
+
- Dispatch state changes back via `peer.<setter>` or `peer.<method>()`
|
|
87
|
+
- NEVER duplicate state in the companion — peer remains source of truth
|
|
88
|
+
|
|
89
|
+
## Step 5 — tone & token audit (mode 5 of this skill)
|
|
90
|
+
|
|
91
|
+
After the primitive audit passes, run mode 5 (the token audit at [token-contract.md](token-contract.md)) to confirm:
|
|
92
|
+
|
|
93
|
+
- Two-block `@scope` pattern (tokens on `:where(:scope)`, styles on `:scope`)
|
|
94
|
+
- Zero raw colors (`grep -E '#[0-9a-fA-F]|rgb\(|hsl\(|oklch\(' <component>.css`)
|
|
95
|
+
- Match the canonical surface tokens of similar primitives — for any popover that visually competes with `select-ui [slot="listbox"]`, copy its surface tokens exactly: `--a-canvas-bright`, `--a-ui-border`, `--a-radius`, `--a-bg-hover`, `--a-fg-hover`, `--a-fg-subtle`. Don't pick `--a-canvas` for floating menus — it's the L2 mid-tone surface, identical luminance in both schemes.
|
|
96
|
+
|
|
97
|
+
## Past failure (do not repeat)
|
|
98
|
+
|
|
99
|
+
A `table-toolbar-ui` initial implementation rolled its own from scratch:
|
|
100
|
+
|
|
101
|
+
- Hand-stamped `<input-ui prefix="magnifying-glass">` for search → "magnifying-glass" rendered as **literal text** because the icon registry hadn't resolved at first paint. `search-ui` already wraps input-ui with the right prefix + suffix + debounced `search` event.
|
|
102
|
+
- Hand-stamped `<label>` + `<span>` + `<input-ui>` for filter rows → `field-ui inline` is the canonical label+control pair, mints `id` + `[for]` automatically.
|
|
103
|
+
- Wrote `<text-ui display>` (invalid bare attr — `display` is an enum value of `variant`, requires `<text-ui variant="display">`).
|
|
104
|
+
- Wrote popover surface as `--a-canvas` (washed-out mid-gray) instead of reading `select-ui`'s listbox tokens (`--a-canvas-bright`).
|
|
105
|
+
|
|
106
|
+
Caught only after user feedback. The audit takes 30 seconds. Do it.
|
|
107
|
+
|
|
108
|
+
## Quick reflex check before any `document.createElement('input-ui')` etc
|
|
109
|
+
|
|
110
|
+
Ask: "is there a higher-level primitive that wraps this?" 80% of the time yes. Examples:
|
|
111
|
+
|
|
112
|
+
| You're about to write | Probably want |
|
|
113
|
+
| --- | --- |
|
|
114
|
+
| `createElement('input-ui')` + `setAttribute('type', 'search')` | `createElement('search-ui')` |
|
|
115
|
+
| `createElement('input-ui')` + manual label `<span>` | `createElement('field-ui')` with `[label]` attr |
|
|
116
|
+
| `createElement('div')` + `setAttribute('popover', 'manual')` + `anchorPopover()` | `createElement('menu-ui')` (action) or `createElement('popover-ui')` (content) |
|
|
117
|
+
| `createElement('button')` + raw `<icon-ui>` + raw label | `createElement('button-ui')` with `[icon]` + `[text]` |
|
|
118
|
+
| `createElement('div')` + multiple `<text-ui>` for empty state | `createElement('empty-state-ui')` |
|
|
119
|
+
|
|
120
|
+
## Cross-references
|
|
121
|
+
|
|
122
|
+
- [authoring-cycle.md](authoring-cycle.md) — the full 5-step authoring procedure (run AFTER this audit clears)
|
|
123
|
+
- [anti-patterns.md](anti-patterns.md) — failure-mode catalogue (look up the rule a found primitive enforces)
|