@adia-ai/adia-ui-factory 0.2.2 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +12 -3
- package/.mcp.json +1 -1
- package/CHANGELOG.md +12 -0
- package/README.md +24 -1
- package/bin/adia-scaffold +93 -13
- package/package.json +1 -1
- package/references/shell-embed.md +10 -0
- package/references/spa-architecture.md +7 -0
- package/skills/adia-ui-kit/CHANGELOG.md +41 -0
- package/skills/adia-ui-kit/SKILL.md +442 -0
- package/skills/adia-ui-kit/assets/figma-make/guidelines/Guidelines.md +87 -0
- package/skills/adia-ui-kit/assets/figma-make/guidelines/components.md +142 -0
- package/skills/adia-ui-kit/assets/figma-make/guidelines/styles.md +118 -0
- package/skills/adia-ui-kit/assets/figma-make/guidelines/tokens.md +120 -0
- package/skills/adia-ui-kit/assets/team-scaffold/archive-README.md +30 -0
- package/skills/adia-ui-kit/assets/team-scaffold/drafts-README.md +57 -0
- package/skills/adia-ui-kit/assets/team-scaffold/inbox-README.md +76 -0
- package/skills/adia-ui-kit/assets/team-scaffold/outbox-README.md +46 -0
- package/skills/adia-ui-kit/assets/team-scaffold/team-root.README.md +51 -0
- package/skills/adia-ui-kit/assets/team-scaffold/tickets-README.md +208 -0
- package/skills/adia-ui-kit/assets/team-scaffold/tickets-REGISTRY.md +81 -0
- package/skills/adia-ui-kit/assets/templates/AGENTS.template.md +128 -0
- package/skills/adia-ui-kit/assets/templates/CLAUDE.template.md +1 -0
- package/skills/adia-ui-kit/assets/templates/FEEDBACK-OMISSIONS-DEFENSE.template.md +150 -0
- package/skills/adia-ui-kit/assets/templates/FEEDBACK.template.md +213 -0
- package/skills/adia-ui-kit/assets/templates/RESPONSE.template.md +114 -0
- package/skills/adia-ui-kit/assets/templates/figma-make-guidelines.md +90 -0
- package/skills/adia-ui-kit/evals/adversarial-content-trust.json +83 -0
- package/skills/adia-ui-kit/evals/evals.json +55 -0
- package/skills/adia-ui-kit/evals/routing-corpus.json +121 -0
- package/skills/adia-ui-kit/evals/teach-routing-cases.json +92 -0
- package/skills/adia-ui-kit/references/capabilities.md +245 -0
- package/skills/adia-ui-kit/references/catalog-lookup.md +186 -0
- package/skills/adia-ui-kit/references/changelog-archive/CHANGELOG-v1.md +8 -0
- package/skills/adia-ui-kit/references/changelog-archive/CHANGELOG-v2.md +3585 -0
- package/skills/adia-ui-kit/references/changelog-archive/CHANGELOG-v3.md +1899 -0
- package/skills/adia-ui-kit/references/common-gotchas-consumer.md +522 -0
- package/skills/adia-ui-kit/references/component-literacy.md +291 -0
- package/skills/adia-ui-kit/references/composition.md +245 -0
- package/skills/adia-ui-kit/references/correction-loop.md +462 -0
- package/skills/adia-ui-kit/references/css-policy.md +343 -0
- package/skills/adia-ui-kit/references/decision-model.md +158 -0
- package/skills/adia-ui-kit/references/diagnostic-output.md +57 -0
- package/skills/adia-ui-kit/references/docs-catalog.md +239 -0
- package/skills/adia-ui-kit/references/exclusions.md +225 -0
- package/skills/adia-ui-kit/references/feedback-authoring.md +466 -0
- package/skills/adia-ui-kit/references/figma-make.md +244 -0
- package/skills/adia-ui-kit/references/flows-auth.md +307 -0
- package/skills/adia-ui-kit/references/flows-content.md +206 -0
- package/skills/adia-ui-kit/references/flows-data.md +348 -0
- package/skills/adia-ui-kit/references/flows-interaction.md +181 -0
- package/skills/adia-ui-kit/references/flows-shells.md +336 -0
- package/skills/adia-ui-kit/references/gap-detection.md +266 -0
- package/skills/adia-ui-kit/references/harness.md +284 -0
- package/skills/adia-ui-kit/references/loading-protocol.md +406 -0
- package/skills/adia-ui-kit/references/local-link.md +198 -0
- package/skills/adia-ui-kit/references/mcp.md +401 -0
- package/skills/adia-ui-kit/references/migration.md +116 -0
- package/skills/adia-ui-kit/references/mission.md +194 -0
- package/skills/adia-ui-kit/references/mode-routing.md +298 -0
- package/skills/adia-ui-kit/references/patterns-agent.md +223 -0
- package/skills/adia-ui-kit/references/patterns-data.md +1065 -0
- package/skills/adia-ui-kit/references/patterns-forms.md +223 -0
- package/skills/adia-ui-kit/references/patterns-layout.md +326 -0
- package/skills/adia-ui-kit/references/patterns-recipes.md +1416 -0
- package/skills/adia-ui-kit/references/patterns-shells.md +1097 -0
- package/skills/adia-ui-kit/references/patterns-traits.md +259 -0
- package/skills/adia-ui-kit/references/patterns-wiring.md +339 -0
- package/skills/adia-ui-kit/references/pev-rationale.md +137 -0
- package/skills/adia-ui-kit/references/reasoning-gate.md +146 -0
- package/skills/adia-ui-kit/references/reasoning-methodologies.md +112 -0
- package/skills/adia-ui-kit/references/recon.md +192 -0
- package/skills/adia-ui-kit/references/rendering-model.md +431 -0
- package/skills/adia-ui-kit/references/response-authoring.md +398 -0
- package/skills/adia-ui-kit/references/session-log-schema.md +203 -0
- package/skills/adia-ui-kit/references/session-log-template.md +118 -0
- package/skills/adia-ui-kit/references/setup.md +652 -0
- package/skills/adia-ui-kit/references/skill-hygiene.md +135 -0
- package/skills/adia-ui-kit/references/spec-to-ui-reasoning.md +394 -0
- package/skills/adia-ui-kit/references/state.md +229 -0
- package/skills/adia-ui-kit/references/teach-protocol.md +421 -0
- package/skills/adia-ui-kit/references/theme.md +142 -0
- package/skills/adia-ui-kit/references/version-check.md +69 -0
- package/skills/adia-ui-kit/scripts/audit-decision-trace.mjs +198 -0
- package/skills/adia-ui-kit/scripts/audit-kit-roster.mjs +366 -0
- package/skills/adia-ui-kit/scripts/changelog-archive.mjs +126 -0
- package/skills/adia-ui-kit/scripts/check-adia-versions.py +404 -0
- package/skills/adia-ui-kit/scripts/run-skill-evals.mjs +358 -0
- package/skills/adia-ui-kit/scripts/validate-session-log.mjs +242 -0
- package/skills/adia-ui-kit/skill.json +102 -0
- package/skills/adia-ui-migration/CHANGELOG.md +47 -0
- package/skills/adia-ui-migration/SKILL.md +381 -0
- package/skills/adia-ui-migration/skill.json +29 -0
- package/skills/adia-ui-spa/SKILL.md +1 -1
- package/skills/adia-ui-verify/SKILL.md +2 -2
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: loading-protocol
|
|
3
|
+
load-when: Before any procedural work — to know which references to load on demand, what the cold-start contract is, what the pre-author bundle gate triggers on, and what the harness manifest declares
|
|
4
|
+
load-size-tokens: ~6,800
|
|
5
|
+
required-for:
|
|
6
|
+
- cold-start
|
|
7
|
+
- any task crossing 2+ references
|
|
8
|
+
- any §Teach landing
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# §LoadingProtocol — Inversion / progressive disclosure (read this before browsing further)
|
|
12
|
+
|
|
13
|
+
This skill is structured as a **seed plus reference bundles**, not as a
|
|
14
|
+
monolith. SKILL.md (you are here) is the seed: it carries identity,
|
|
15
|
+
priors, posture decisions, hard rules, the harness manifest, and the
|
|
16
|
+
reference manifest. **The bulk of procedural detail lives in
|
|
17
|
+
`references/<topic>.md` files that you load on demand.**
|
|
18
|
+
|
|
19
|
+
This is *inversion*: tiny initial footprint, agent has enough harness
|
|
20
|
+
+ tooling references to discover what it needs and load it as it goes.
|
|
21
|
+
|
|
22
|
+
### Why inversion
|
|
23
|
+
|
|
24
|
+
A skill is procedural memory loaded into agent context. At ~78K
|
|
25
|
+
tokens the monolithic version of this skill consumed ~40% of a 200K
|
|
26
|
+
context window *before any work happened*. Most sessions only need
|
|
27
|
+
10-20% of the skill — a forward-authoring session doesn't need the
|
|
28
|
+
ticket pipeline, a diagnostic session doesn't need the cold-start
|
|
29
|
+
setup, etc. Loading everything to use a slice is wasteful and crowds
|
|
30
|
+
out the actual task content.
|
|
31
|
+
|
|
32
|
+
The inversion contract: **the seed teaches the agent what exists +
|
|
33
|
+
when to load it. Loading is the agent's responsibility, not the
|
|
34
|
+
skill's.**
|
|
35
|
+
|
|
36
|
+
### The loading protocol
|
|
37
|
+
|
|
38
|
+
When you (the agent) need something from this skill that isn't in the
|
|
39
|
+
seed:
|
|
40
|
+
|
|
41
|
+
1. **Check the reference manifest below** to find the right bundle.
|
|
42
|
+
Bundle names map to task categories (`patterns-shells.md`,
|
|
43
|
+
`feedback-authoring.md`, etc.).
|
|
44
|
+
2. **Load the bundle via `skill_view(name='adia-ui-kit',
|
|
45
|
+
file_path='references/<bundle>.md')`**. This is a single tool
|
|
46
|
+
call. The bundle enters context only for the section it's
|
|
47
|
+
needed.
|
|
48
|
+
3. **Do not preload bundles speculatively.** Each load has a token
|
|
49
|
+
cost. Load when the current step requires it.
|
|
50
|
+
4. **When in doubt, search the seed first.** A `grep`-style scan of
|
|
51
|
+
SKILL.md is cheaper than loading a bundle "just in case."
|
|
52
|
+
5. **If a bundle you expect doesn't exist, check the migration
|
|
53
|
+
status in the manifest** — some sections still live inline in
|
|
54
|
+
SKILL.md (mid-migration; see the §SkillHygiene token-economy
|
|
55
|
+
axis for context).
|
|
56
|
+
|
|
57
|
+
### The pre-author bundle gate (mandatory loads before generation)
|
|
58
|
+
|
|
59
|
+
The discretionary "load on demand" rule above (points 1–5) has one
|
|
60
|
+
hard exception: **shell, dashboard, and product-surface authoring tasks
|
|
61
|
+
have mandatory pre-loads.** Without them, agents systematically miss
|
|
62
|
+
the canonical 10-tag admin-shell shape, the responsive layout
|
|
63
|
+
primitives, the `[data-sidebar-toggle]` declarative attribute, and the
|
|
64
|
+
canonical KPI card composition — all of which live in bundles, not in
|
|
65
|
+
the seed.
|
|
66
|
+
|
|
67
|
+
**Trigger keywords (any of these in the user's request fires the gate):**
|
|
68
|
+
|
|
69
|
+
Direct shell/dashboard mentions:
|
|
70
|
+
`shell`, `admin shell`, `editor shell`, `chat shell`, `simple shell`,
|
|
71
|
+
`page shell`, `admin product`, `product surface`, `dashboard`,
|
|
72
|
+
`admin dashboard`, `admin UI`, `admin ui`, `the admin`, `our admin`,
|
|
73
|
+
`page anatomy`, `app shell`.
|
|
74
|
+
|
|
75
|
+
Composition verbs paired with shell/page concepts:
|
|
76
|
+
`build the whole thing`, `build it all`, `proceed to build all of it`,
|
|
77
|
+
`wire up the shell`, `compose this page`, `compose the page`,
|
|
78
|
+
`compose the shell`, `compose the admin`, `compose the dashboard`,
|
|
79
|
+
`build a KPI`, `build the dashboard`, `build the admin`,
|
|
80
|
+
`build the sidebar`, `build the topbar`, `build the layout`,
|
|
81
|
+
`lay out a page`, `lay out the dashboard`, `assemble the UI`,
|
|
82
|
+
`assemble the dashboard`, `assemble the admin`,
|
|
83
|
+
`make the admin`, `make a dashboard`, `make the UI`, `set up the shell`,
|
|
84
|
+
`set up the dashboard`, `scaffold the admin`, `scaffold a dashboard`,
|
|
85
|
+
`scaffold the page`.
|
|
86
|
+
|
|
87
|
+
Component-level mentions that imply shell composition:
|
|
88
|
+
`sidebar`, `topbar`, `statusbar`, `breadcrumb`, `nav-ui composition`,
|
|
89
|
+
`page header`, `page body`, `KPI cards`, `KPI grid`, `stat cards`,
|
|
90
|
+
`metric cards`, `dashboard cards`, `command palette`, `app rail`,
|
|
91
|
+
`nav rail`, `side navigation`, `collapse sidebar`, `resizable sidebar`,
|
|
92
|
+
`responsive layout`, `app layout`, `screen layout`.
|
|
93
|
+
|
|
94
|
+
Plural/possessive variants:
|
|
95
|
+
`our dashboard`, `their admin`, `the dashboards`, `our admins`,
|
|
96
|
+
`the operator dashboard`, `the analytics dashboard`,
|
|
97
|
+
`extend the admin`, `extend our admin`, `update the dashboard`,
|
|
98
|
+
`update the admin`, `improve the admin`, `improve the dashboard`,
|
|
99
|
+
`refactor the admin`, `refactor the dashboard`,
|
|
100
|
+
`fix the admin`, `fix the dashboard`, `redo the admin`,
|
|
101
|
+
`redo the dashboard`, `clean up the admin`, `clean up the dashboard`.
|
|
102
|
+
|
|
103
|
+
Consumer feedback patterns (user reports broken shell rendering):
|
|
104
|
+
`my dashboard looks broken`, `my admin looks broken`,
|
|
105
|
+
`the shell looks broken`, `the shell doesn't look right`,
|
|
106
|
+
`the admin doesn't look right`, `the sidebar is missing`,
|
|
107
|
+
`the topbar is missing`, `no surface contrast`, `no inset`,
|
|
108
|
+
`bleeding into content`, `looks unstyled`, `looks raw`,
|
|
109
|
+
`looks like a placeholder`, `looks unfinished`,
|
|
110
|
+
`compare against ui-kit.exe.xyz`, `vs the reference`, `vs reference`.
|
|
111
|
+
|
|
112
|
+
**Trigger discipline**: this list is INTENTIONALLY broad because the
|
|
113
|
+
FEEDBACK-41 / FEEDBACK-NN regression-class consistently traps agents
|
|
114
|
+
under context pressure who infer that "user said extend the admin so
|
|
115
|
+
this is a small edit, not a shell composition". Bias the gate toward
|
|
116
|
+
firing too often; the cost of a redundant bundle load is small, the
|
|
117
|
+
cost of a non-canonical admin-shell ship is the entire FEEDBACK-41
|
|
118
|
+
cluster.
|
|
119
|
+
|
|
120
|
+
When any trigger fires, **before writing markup**, load:
|
|
121
|
+
|
|
122
|
+
1. `patterns-recipes.md` — locate "Advanced — full markup
|
|
123
|
+
(start here for any new product surface)" (lines 188–340). Use it as
|
|
124
|
+
the baseline; subtract sections (Simple → Minimal) only when the
|
|
125
|
+
user explicitly opts out, not by default.
|
|
126
|
+
2. `patterns-shells.md` — for sidebar/topbar/breadcrumb
|
|
127
|
+
composition + the §Anti-patterns list (hand-rolled toggle, header
|
|
128
|
+
nesting, shell composition violations).
|
|
129
|
+
3. `patterns-layout.md` — for the `@bp` responsive notation
|
|
130
|
+
on `grid-ui` / `row-ui` / `col-ui` (xs=0/sm=480/md=768/lg=1024/xl=1280)
|
|
131
|
+
and the "never inline `grid-template-columns`" rule.
|
|
132
|
+
|
|
133
|
+
This is NOT a violation of point 3 above ("don't preload speculatively").
|
|
134
|
+
The "Advanced" recipe is explicitly self-described as *"start here for
|
|
135
|
+
any new product surface"* and resolves every shell-tier authoring
|
|
136
|
+
decision in one read. Loading it is the *next* step the protocol's
|
|
137
|
+
point 1 ("check the reference manifest") points at — the gate just
|
|
138
|
+
removes the discretion.
|
|
139
|
+
|
|
140
|
+
**Failure-mode receipt.** Skipping the gate produces the FEEDBACK-41
|
|
141
|
+
cluster: `slot="leading"` missing on `<admin-sidebar>`,
|
|
142
|
+
`<admin-statusbar>` missing, `<breadcrumb-ui>` missing, hand-rolled
|
|
143
|
+
`sidebar.toggle()` JS instead of declarative `[data-sidebar-toggle]`,
|
|
144
|
+
bare `<stat-ui>` instead of `<card-ui><section><stat-ui /></section>
|
|
145
|
+
</card-ui>`. Five canonical-shape defects shipped in one cold-start
|
|
146
|
+
build before the user caught it.
|
|
147
|
+
|
|
148
|
+
**Failure-mode receipt #2 (2026-05-23 claims-ui regression).** Even with
|
|
149
|
+
the FEEDBACK-41 documentation in place, claude-code-Sonnet-4.6 in a
|
|
150
|
+
consumer repo (claims-ui) shipped a NEW admin dashboard missing
|
|
151
|
+
`<admin-statusbar>` at content footer, missing `[data-spacer]` +
|
|
152
|
+
`[data-actions]` in the content topbar (no theme picker, no command
|
|
153
|
+
palette, no global action affordances), and an incomplete sidebar
|
|
154
|
+
topbar (no context-switcher menu — just plain text branding). Recipe
|
|
155
|
+
was complete; gate was not loaded; user surfaced regression via visual
|
|
156
|
+
diff against `ui-kit.exe.xyz/site/examples/admin-dashboard`. Hardening
|
|
157
|
+
that landed: this trigger keyword list was broadened to catch natural
|
|
158
|
+
phrasings like "extend the admin" / "the admin doesn't look right" /
|
|
159
|
+
"my dashboard looks broken" that the prior list missed, plus the
|
|
160
|
+
verification step below was added to stop agents who skim past the gate.
|
|
161
|
+
|
|
162
|
+
**Verification before generation (use this gate as a stop-condition):**
|
|
163
|
+
After loading the bundles, **explicitly enumerate** which of the 13
|
|
164
|
+
canonical admin-shell parts your generation will include. The
|
|
165
|
+
authoritative reference is `chat-ui:site/index.html` lines 42-120 —
|
|
166
|
+
that's the actual source that renders the live docs site at
|
|
167
|
+
`ui-kit.exe.xyz/site/examples/admin-dashboard`:
|
|
168
|
+
|
|
169
|
+
1. `<admin-shell mode="rounded borderless">` outer (or another canonical mode)
|
|
170
|
+
2. `<admin-sidebar slot="leading" resizable collapsible>` (left rail)
|
|
171
|
+
3. Sidebar's inner `<admin-topbar slot="header">` with `<select-ui avatar="…" value="…" variant="ghost">` (workspace/context switcher — NOT `<menu-ui>`; that's the legacy v0.5.x pattern from `admin-shell.examples.html`. The live docs site uses select-ui because it auto-stamps the avatar + label + caret-up-down row and has narrower API surface)
|
|
172
|
+
4. Sidebar's `<section-ui>` (the AdiaUI primitive, NOT native `<section>`) wrapping `<nav-ui>` with `<nav-item-ui>` / `<nav-group-ui>` children. The section-ui wrap is what admin-sidebar's light-DOM CSS targets for inner scroll + padding.
|
|
173
|
+
5. Sidebar's `<admin-statusbar slot="footer">` with `<select-ui avatar="…" value="…" variant="ghost">` for user menu (same primitive as #3, NOT `<menu-ui>` + `<avatar-ui>` + button-trigger)
|
|
174
|
+
6. Sidebar's `<div data-resize></div>` resize handle (REQUIRED when `resizable` attribute is on)
|
|
175
|
+
7. `<admin-content>` with inner `<admin-topbar>` containing `<button-ui data-sidebar-toggle="leading" icon="sidebar">` + `<breadcrumb-ui>` + `<span data-spacer>` + `<div data-actions>`. The toggle button uses `icon="sidebar"` attribute — NOT a child `<icon-ui>`. **Note on slot attribute:** This list uses no-slot form for `<admin-topbar>` inside `<admin-content>`. `slot="header"` is also accepted and renders identically — `<admin-content>` is light-DOM per ADR-0033, so `slot=` is inert and CSS positions `admin-topbar` by tag + DOM order regardless. `patterns-recipes.md` and `site/index.html` use `slot="header"` form for parity with substrate demos. Both forms are correct; do not "fix" one to the other.
|
|
176
|
+
8. `[data-actions]` (or new-code canonical `slot="action"`) contains `<popover-ui>` wrapping `<button-ui icon="palette" slot="trigger">` + `<theme-panel slot="content" persist parametric presets scheme-toggle>`. NOT a custom `<theme-picker-ui>` element — that doesn't exist; `theme-panel` is the actual primitive. Plus any other right-aligned action buttons (e.g. `[data-sidebar-toggle-trailing]` for the changelog rail).
|
|
177
|
+
|
|
178
|
+
**`slot="action"` vs `[data-actions]`** — `slot="action"` is the new-code canonical per `admin-topbar.yaml` (v0.6.13+); `[data-actions]` coexists for one release as a back-compat alias. New code should prefer `slot="action"`. Both render identically.
|
|
179
|
+
|
|
180
|
+
**🚨 CRITICAL CONTENT RULE — page CTAs DO NOT belong here.** The topbar trailing cluster (`slot="action"` or `[data-actions]`) carries **GLOBAL** controls only — theme picker, trailing-sidebar toggle, notifications bell, global "+ Quick add" if it spawns a global menu. **Page-scoped CTAs** like `+ New Claim`, `+ New Customer`, `Export CSV`, `Save Draft` belong in `<admin-page-header>` as `<button-ui slot="action">` children, NOT in the topbar trailing cluster. This is the FEEDBACK-58 §3 failure mode — agents follow this list, see `[data-actions]` described as "the trailing action container," and place page CTAs there. Result: every page in the app shows that one page's CTA in the global topbar (it sticks across navigation; it doesn't update). See `patterns-recipes.md` Advanced route fragment for the canonical page-CTA placement pattern.
|
|
181
|
+
9. `<admin-scroll>` wrapping optional `<aside data-subnav hidden>` + `<router-ui>` (for routed pages; place `<admin-page>` directly here for non-routed surfaces)
|
|
182
|
+
10. `<admin-page>` (inside router-ui or admin-scroll) with `<admin-page-header>` + `<admin-page-body>`
|
|
183
|
+
11. `<admin-statusbar>` at content footer for version-strip band (`<span>Name</span> <span data-spacer></span> <span>vX.Y.Z</span>` — NOT just sidebar's statusbar; the content has its own statusbar slot)
|
|
184
|
+
12. Second `<admin-sidebar slot="trailing" resizable collapsible hidden>` (right rail, hidden by default; toggled via `[data-sidebar-toggle-trailing]` buttons). Has its own `<admin-topbar slot="header">` with `<span slot="heading">` + `<button-ui slot="action">` close button.
|
|
185
|
+
13. `<admin-command>` with `<command-ui placeholder="Search pages...">` (cmd-K palette — top-level child of `<admin-shell>`, NOT nested inside `<admin-content>`; admin-command self-stamps a `<dialog>` when activated)
|
|
186
|
+
|
|
187
|
+
If your generation plan is missing any of parts 1-13, you haven't read
|
|
188
|
+
the recipe. Load `patterns-recipes.md` Advanced section
|
|
189
|
+
again — note that as of v2.27.0 (2026-05-23), the recipe was corrected
|
|
190
|
+
to align with `site/index.html` (it had previously been ambiguous,
|
|
191
|
+
naming both `<menu-ui>` and `<select-ui>` as valid context-switcher
|
|
192
|
+
patterns; site/index.html is now declared the single canonical reference).
|
|
193
|
+
|
|
194
|
+
If the user explicitly opted out of one (e.g. "minimal sidebar, no
|
|
195
|
+
statusbar"), cite the opt-out in the generation plan; without the
|
|
196
|
+
explicit opt-out, parts 1-11 are mandatory and parts 12-13 are strongly
|
|
197
|
+
recommended (the live docs site has both).
|
|
198
|
+
|
|
199
|
+
**Pair the 13-part composition with the CSS bootstrap.** A complete
|
|
200
|
+
shell generation is structural composition PLUS the matching CSS/JS
|
|
201
|
+
load. Pick one bootstrap path before generating markup:
|
|
202
|
+
|
|
203
|
+
| Consumer mode | CSS bootstrap (in `<head>` or entry file) | JS bootstrap |
|
|
204
|
+
|---------------|-------------------------------------------|--------------|
|
|
205
|
+
| **CDN-first** (CodePen, marketing, static HTML, fresh repo with no `package.json`) | Two `<link>` tags: `web-components.min.css` + `<shell>.min.css` from `cdn.jsdelivr.net/npm/@adia-ai/*` | One `<script type="module">` tag pointing at `web-modules/.../dist/everything.min.js` |
|
|
206
|
+
| **Bundler explicit-import** (production Vite/webpack) | Three `import` statements in entry: `'@adia-ai/web-components/css'` + (optional brand override) + `'@adia-ai/web-modules/shell/admin-shell.css'` | `import` statements registering primitives + shells (per §Setup) |
|
|
207
|
+
| **Bundler `/with-css` opt-in** | One `import '@adia-ai/web-modules/shell/admin-shell/with-css'` (side-effect CSS bundled in) | Same as explicit-import for JS |
|
|
208
|
+
|
|
209
|
+
The 2 CDN `<link>` tags map 1:1 to the bundler's 3-import pattern
|
|
210
|
+
(tokens+catalog → shell CSS). When generating shell markup, the bootstrap
|
|
211
|
+
choice MUST be cited alongside the composition — otherwise the consumer
|
|
212
|
+
ships canonical structure with unstyled-stacked-divs rendering. **Both
|
|
213
|
+
sides of the contract land in the same generation step.**
|
|
214
|
+
|
|
215
|
+
**Stop-condition before generation:** you have the three bundles loaded
|
|
216
|
+
AND have identified the recipe section that matches the user's task
|
|
217
|
+
(Advanced for full product, Simple if user opted out of statusbar /
|
|
218
|
+
trailing sidebar, Minimal for a skeleton app) AND have enumerated
|
|
219
|
+
which of the 8 canonical parts you're including. If you can't name
|
|
220
|
+
which section you're working from OR can't enumerate the 8 parts, you
|
|
221
|
+
haven't loaded enough.
|
|
222
|
+
|
|
223
|
+
### The harness manifest (scripts you can use)
|
|
224
|
+
|
|
225
|
+
The skill ships with its own scripts (live inside the skill folder,
|
|
226
|
+
travel with it to consumer repos) AND lives alongside substrate-side
|
|
227
|
+
scripts (live in chat-ui's `scripts/skills/`, operate on the skill
|
|
228
|
+
system itself). Both are part of the harness; knowing which is which
|
|
229
|
+
tells you where to find them and whether they're available outside
|
|
230
|
+
chat-ui.
|
|
231
|
+
|
|
232
|
+
**Skill-bundled scripts** — live in this skill's own `scripts/`
|
|
233
|
+
directory (resolve relative to the skill root; as a plugin,
|
|
234
|
+
`${CLAUDE_PLUGIN_ROOT}/skills/adia-ui-kit/scripts/`). Travel with the
|
|
235
|
+
skill to any repo that vendors it. Operate on AdiaUI repos / consumers.
|
|
236
|
+
|
|
237
|
+
| Tool | When to use | Invocation |
|
|
238
|
+
|---|---|---|
|
|
239
|
+
| `check-adia-versions.py` | Version-drift check during §Recon / §VersionCheck | `python3 scripts/check-adia-versions.py --root <path>` |
|
|
240
|
+
|
|
241
|
+
**Substrate-resident scripts** — live at `scripts/skills/` in the
|
|
242
|
+
chat-ui repo. Operate on the **skill system itself** (any skill, not
|
|
243
|
+
just adia-ui-kit), so they're substrate-internal tooling and not
|
|
244
|
+
available in consumer repos. Run via `npm run <task>` from chat-ui.
|
|
245
|
+
|
|
246
|
+
| Tool | When to use | npm task |
|
|
247
|
+
|---|---|---|
|
|
248
|
+
| `audit-skill-hygiene.mjs` | Run the 8-axis hygiene audit on a skill | `npm run audit:skill-hygiene [skill-name]` |
|
|
249
|
+
| `check-skill-patterns-sot.mjs` | Validate §Patterns SoT citations + tag vocabulary | `npm run check:skill-patterns-sot` |
|
|
250
|
+
| `check-skill-frontmatter.mjs` | Validate skill frontmatter + intra-skill refs | `npm run check:skills` |
|
|
251
|
+
| `audit-skills.mjs` | Aggregate skill metrics across the corpus | `npm run audit:skills` (if wired) |
|
|
252
|
+
| `draft-skill.mjs` | Scaffold a new skill | `npm run draft-skill <name>` (if wired) |
|
|
253
|
+
| `iterate-skill.mjs` | Apply iterative improvements to a skill | `npm run iterate-skill <name>` (if wired) |
|
|
254
|
+
|
|
255
|
+
The split is **load-bearing**: when a consumer agent in `claims-ui-v4`
|
|
256
|
+
needs to verify versions, they invoke the skill-bundled `check-adia-
|
|
257
|
+
versions.py` directly (it ships with the vendored skill). When the
|
|
258
|
+
same agent wants to audit the skill itself, that's substrate-internal
|
|
259
|
+
work and they need to be in the chat-ui repo.
|
|
260
|
+
|
|
261
|
+
### The peer-skill manifest (sibling skills you can defer to)
|
|
262
|
+
|
|
263
|
+
This skill is the **anchor** for AdiaUI agent work, but it's not the
|
|
264
|
+
only AdiaUI-related skill. The sibling skills below all live at
|
|
265
|
+
`.agents/skills/<name>/` in the substrate repo. **Defer to them
|
|
266
|
+
explicitly** when your task matches their specialty — don't
|
|
267
|
+
re-implement what they already teach.
|
|
268
|
+
|
|
269
|
+
| Peer skill | What it owns | When to defer |
|
|
270
|
+
|---|---|---|
|
|
271
|
+
| `adia-ui-authoring` | In-tree authoring engineer (absorbs `primitive-audit` + `bespoke-shell-children` + `promote-inline-to-module` + `adia-ui-code-bestpractices` + `llm-bridge-extension` + `adia-ui-author` rename) | Authoring / modifying primitives + shells + modules; extracting inline UI patterns into module-tier elements; extending the LLM bridge |
|
|
272
|
+
| `adia-ui-migration` | Mechanical sweep automation for cross-version migrations | Codebase-wide rename (`@agent-ui-kit` → `@adia-ai`, `AgentElement` → `UIElement`, `--agent-*` → `--a-*` tokens); has grep + perl-rewrite recipes |
|
|
273
|
+
| `adia-ui-a2ui` | A2UI generation pipeline substrate (absorbs `a2ui-pipeline` + `adia-ui-training` + `zettel-internals`); covers compose strategies, chunk corpus, fragment graphs, MCP server, retrieval, validator, runtime | Debugging A2UI JSON flows, generator/MCP/zettel synthesis, training data curation, eval-gap diagnosis, composition-strategy tuning |
|
|
274
|
+
| `adia-ui-release` | Autonomous release engineer (cut + publish + EXE deploy + audit-history ledger; absorbs `release-publish` + `release-notes` + `verification-sweep`) | Cutting v0.6.X / batch push / version-skip recovery / GH release authoring / full `npm run check` umbrella + interpreting results / substantive CHANGELOG authoring |
|
|
275
|
+
| `adia-ui-ops` | Operator skill for the AdiaUI substrate (absorbs `exe-dev-ops` + `ops-repo`); covers infrastructure (exe.dev VM deployment + service ops) + repo hygiene (memory layer audit, ADR rotation, postmortem sweep, stale content) | exe.dev deploy / diagnose `<host>.exe.xyz` / rotate keys / repo brain audit / `.brain/` curation / cross-cutting substrate maintenance |
|
|
276
|
+
| `dogfood-sweep` | Exploratory dogfood QA testing of UI surfaces | Hunting for visual / behavioral regressions across canonical demos |
|
|
277
|
+
|
|
278
|
+
**The deferral rule.** If a task is squarely in a peer skill's
|
|
279
|
+
specialty, **invoke that skill rather than duplicating the procedure
|
|
280
|
+
here**. Cross-skill linking is cheaper than cross-skill teaching —
|
|
281
|
+
the peer skill stays maintained at its source.
|
|
282
|
+
|
|
283
|
+
To load a peer skill: in agent harnesses that support it (`skill_view`,
|
|
284
|
+
`skill-use`, etc.):
|
|
285
|
+
|
|
286
|
+
```
|
|
287
|
+
skill_view(name='adia-ui-migration')
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
Or read directly: `.agents/skills/<name>/SKILL.md`.
|
|
291
|
+
|
|
292
|
+
### The reference manifest (bundles you can load on demand)
|
|
293
|
+
|
|
294
|
+
| Bundle | Topic | When to load | Status |
|
|
295
|
+
|---|---|---|---|
|
|
296
|
+
| `local-link.md` | `file:` symlink consumer ↔ substrate (no npm round-trip) | When iterating on substrate + consumer simultaneously | **full extract** (v2.20.0) |
|
|
297
|
+
| `mcp.md` | AdiaUI MCP server install + tool reference | When setting up generative-UI in an agent IDE | **full extract** (v2.20.0) |
|
|
298
|
+
| `rendering-model.md` | SPA / SSR / static rendering, framework integration | When target framework is Next/Nuxt/SvelteKit/Astro | **full extract** (v2.20.1) |
|
|
299
|
+
| `setup.md` | Cold-start: 8-step Vite + vanilla JS scaffold | When starting a new AdiaUI project from scratch | **full extract** (v2.20.2) |
|
|
300
|
+
| `figma-make.md` | CDN load for Figma Make / Bolt / Lovable / v0 / StackBlitz — all CSS + JS bundle URLs, kitchen-sink default, JSX caveats | When the target is Figma Make or any prompt-to-app / web-container codegen tool | **full extract** (v3.8.0) |
|
|
301
|
+
| `flows-auth.md` | Auth, registration, onboarding wizard flows | When implementing sign-in / sign-up / forgot-pw / multi-step registration / first-run onboarding | **full extract** (v2.20.3) |
|
|
302
|
+
| `flows-shells.md` | App-shell composition (admin / chat / editor) | When composing the shell-tier of a multi-route app | **full extract** (v2.20.3) |
|
|
303
|
+
| `flows-data.md` | Settings, tables, dashboard + KPI, charts | When wiring data-display surfaces | **full extract** (v2.20.3) |
|
|
304
|
+
| `flows-interaction.md` | Command palette, destructive modal, profile card, marketing hero | When wiring transient/interactive surfaces | **full extract** (v2.20.3) |
|
|
305
|
+
| `flows-content.md` | Error pages, kanban boards, agent surfaces | When wiring content-tier surfaces | **full extract** (v2.20.3) |
|
|
306
|
+
| `patterns-shells.md` | Admin / chat / editor shell patterns | When building any shell-tier composition | **full extract** (v2.20.4) |
|
|
307
|
+
| `patterns-data.md` | Tables, charts, stats, KPIs | When wiring data display | **full extract** (v2.20.4) |
|
|
308
|
+
| `patterns-forms.md` | Inputs, fields, validation | When building forms | **full extract** (v2.20.4) |
|
|
309
|
+
| `patterns-layout.md` | Grid, row, col, gap, page anatomy | When laying out content | **full extract** (v2.20.4) |
|
|
310
|
+
| `patterns-wiring.md` | data-stream, event bindings, state | When wiring components to data | **full extract** (v2.20.4) |
|
|
311
|
+
| `patterns-agent.md` | Agent-surface (chat, reasoning, activity) | When building agent UI | **full extract** (v2.20.4) |
|
|
312
|
+
| `patterns-traits.md` | Trait system + composition | When working with traits | **full extract** (v2.20.4) |
|
|
313
|
+
| `patterns-recipes.md` | Prompt-shaped recipes: admin shell anatomy, REST→component data binding, chart wiring, entity list/drawer, status badge, design-board → tokens, v0.6.18 loading, toasts | When matching a "give me the recipe for X" prompt | **full extract** (v2.20.4) |
|
|
314
|
+
| `teach-protocol.md` | §Teach posture: decision tree + 5-step landing + 7 worked examples + 7 anti-patterns for absorbing new knowledge into THIS skill | When another agent says "make adia-ui-kit aware of X" / "train the skill on Y" / "absorb this lesson" | **full extract** (v2.21.0) |
|
|
315
|
+
| `feedback-authoring.md` | Drafting upstream feedback tickets | When filing FEEDBACK-NN against substrate | full extract |
|
|
316
|
+
| `response-authoring.md` | Authoring RESPONSE-NN to inbound tickets | When responding to consumer feedback | full extract |
|
|
317
|
+
|
|
318
|
+
**Status legend:**
|
|
319
|
+
|
|
320
|
+
- *full extract* — content lives in references/, SKILL.md has a one-paragraph stub pointing here.
|
|
321
|
+
- *inline+ref* — content currently duplicated in SKILL.md and references/; migration target.
|
|
322
|
+
- *full extract (v.X.Y)* — content lives ONLY in references/; the seed has a stub. As of v2.20.4 all 12 bundles are full-extract.
|
|
323
|
+
- *inline only* — content not yet extracted; lives in SKILL.md.
|
|
324
|
+
|
|
325
|
+
The migration goal is **all reference-shaped content → references/**.
|
|
326
|
+
The seed retains: identity, priors, posture decisions, hard rules,
|
|
327
|
+
manifests, the §0-§3 phase spine, and the cross-section discipline
|
|
328
|
+
contracts (§FeedbackDiscipline, §SkillHygiene, this section).
|
|
329
|
+
|
|
330
|
+
### What stays in the seed (and why)
|
|
331
|
+
|
|
332
|
+
Seed-resident content has one of three properties:
|
|
333
|
+
|
|
334
|
+
1. **It's required at decision-time, before the agent knows what
|
|
335
|
+
task they're on.** §Mission's posture-decision rule, §Reasoning
|
|
336
|
+
Methodologies' priors, §CorrectionLoop's zeroth-question — all
|
|
337
|
+
need to be in the agent's head before any task-specific bundle
|
|
338
|
+
loads.
|
|
339
|
+
2. **It's a manifest pointing at things.** This section is itself a
|
|
340
|
+
manifest; the §Docs URL manifest is another; the capability menu
|
|
341
|
+
is a third. Manifests have to be in the seed by definition.
|
|
342
|
+
3. **It's the procedural spine** — §0 Reasoning Gate, §1 Catalog
|
|
343
|
+
Lookup, §2 Composition, §3 Validation. These are the universal
|
|
344
|
+
per-feature checkpoints; every forward-authoring task touches
|
|
345
|
+
them, so they pay their seed-cost honestly.
|
|
346
|
+
|
|
347
|
+
Everything else (recipe libraries, flow examples, command reference
|
|
348
|
+
pages, ticket-pipeline mechanics) is reference-shaped and belongs
|
|
349
|
+
in `references/`.
|
|
350
|
+
|
|
351
|
+
### What this means in practice
|
|
352
|
+
|
|
353
|
+
For a task like "build a settings page in claims-ui-v4":
|
|
354
|
+
|
|
355
|
+
```
|
|
356
|
+
LOAD ORDER (with this protocol):
|
|
357
|
+
1. SKILL.md (seed, ~? K tokens after full migration — target ~25K)
|
|
358
|
+
2. references/patterns-shells.md (settings page = shell-tier)
|
|
359
|
+
3. references/patterns-forms.md (settings = forms)
|
|
360
|
+
4. references/patterns-layout.md (grid for the form fields)
|
|
361
|
+
|
|
362
|
+
LOAD ORDER (without this protocol, pre-inversion):
|
|
363
|
+
1. SKILL.md (entire 78K tokens) — including ticket-tool, MCP install,
|
|
364
|
+
migration guide, feedback-authoring, etc., none of which apply.
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
The agent loads 3 small bundles totaling ~30K tokens on top of a ~25K
|
|
368
|
+
seed, instead of 78K of mostly-irrelevant monolith. Same coverage,
|
|
369
|
+
~40% smaller working set.
|
|
370
|
+
|
|
371
|
+
### Migration status
|
|
372
|
+
|
|
373
|
+
This section (§LoadingProtocol) is the **contract**. The migration is
|
|
374
|
+
ongoing — see the bundle manifest "Status" column. v2.19.0 added the
|
|
375
|
+
hygiene audit that measures the work; v2.20.0+ executes it
|
|
376
|
+
section-by-section.
|
|
377
|
+
|
|
378
|
+
The first proof-of-concept migration (§LocalLink + §MCP, two
|
|
379
|
+
self-contained workflow sections) ships alongside this section in
|
|
380
|
+
v2.20.0. Token savings measured: ~18KB / ~4.5K tokens reclaimed from
|
|
381
|
+
the seed with zero functional loss (the content is identical, just
|
|
382
|
+
loaded on demand).
|
|
383
|
+
|
|
384
|
+
### Anti-patterns
|
|
385
|
+
|
|
386
|
+
- **Loading every bundle at task start "just in case."** Defeats the
|
|
387
|
+
whole point. Load on need, not on possibility.
|
|
388
|
+
- **Inlining a bundle's content into a reply when the user could
|
|
389
|
+
load it themselves.** If the user is in an agentic context, give
|
|
390
|
+
them the file_path; don't paste the whole bundle.
|
|
391
|
+
- **Pre-loading bundles for ticket pipeline at the start of a
|
|
392
|
+
forward-authoring session.** The pipeline matters if the session
|
|
393
|
+
encounters substrate-fixable issues; if it doesn't, you wasted
|
|
394
|
+
the load. Wait for the trigger.
|
|
395
|
+
- **Failing to update the manifest when a new bundle is added.**
|
|
396
|
+
The manifest IS the discovery surface. An invisible bundle is no
|
|
397
|
+
better than a missing one.
|
|
398
|
+
|
|
399
|
+
### Cross-references
|
|
400
|
+
|
|
401
|
+
- §SkillHygiene — measures the cost this protocol reduces.
|
|
402
|
+
- §DiagnosticOutput — same inversion-shape, applied to consumer repos.
|
|
403
|
+
- `scripts/skills/audit-skill-hygiene.mjs` — track token-economy
|
|
404
|
+
metrics before/after each migration cut.
|
|
405
|
+
|
|
406
|
+
---
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# §LocalLink — Develop against chat-ui sources without npm round-trip
|
|
2
|
+
|
|
3
|
+
> **Loading note.** This is a reference bundle extracted from `SKILL.md`
|
|
4
|
+
> per the §LoadingProtocol inversion contract (v2.20.0+). Load via
|
|
5
|
+
> `skill_view(name='adia-ui-kit', file_path='references/local-link.md')`
|
|
6
|
+
> when you need to wire `file:` symlinks between a consumer repo and
|
|
7
|
+
> the chat-ui substrate. Skip otherwise — the seed has a one-paragraph
|
|
8
|
+
> stub.
|
|
9
|
+
|
|
10
|
+
**Why this section exists.** When you're iterating on `@adia-ai/*`
|
|
11
|
+
source AND a consumer project simultaneously, publishing to npm
|
|
12
|
+
between every change is too slow. `file:` linking points the
|
|
13
|
+
consumer's `node_modules/@adia-ai/*` directly at chat-ui's package
|
|
14
|
+
sources via symlinks — edits land without reinstall.
|
|
15
|
+
|
|
16
|
+
**This is a development workflow, not a deployment workflow.** Ship
|
|
17
|
+
to production by publishing to npm and reverting consumer `package.json`
|
|
18
|
+
to semver ranges. Linked installs are for dev only.
|
|
19
|
+
|
|
20
|
+
### Rule 1: link ALL 9, never a subset
|
|
21
|
+
|
|
22
|
+
If you link `@adia-ai/web-components` but leave `@adia-ai/llm` on a
|
|
23
|
+
semver range, npm resolves `@adia-ai/llm` to its registry version —
|
|
24
|
+
but the linked `web-components` source's `package.json` might depend
|
|
25
|
+
on a different `llm` version. You get split-lockstep where the
|
|
26
|
+
linked source and npm-resolved transitive deps disagree.
|
|
27
|
+
|
|
28
|
+
`scripts/check-adia-versions.py` will flag this with the warning:
|
|
29
|
+
"⚠ Mixed link + npm declarations risk split-lockstep …".
|
|
30
|
+
|
|
31
|
+
### Rule 2: use absolute paths
|
|
32
|
+
|
|
33
|
+
Relative paths (`file:../../gen-ui-kit/packages/web-components`) work
|
|
34
|
+
but break the moment the consumer moves on disk. Use absolute paths
|
|
35
|
+
for stability. On a Mac with your usual layout:
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@adia-ai/web-components": "file:/Users/<you>/Projects/gen-ui-kit/packages/web-components",
|
|
40
|
+
"@adia-ai/web-modules": "file:/Users/<you>/Projects/gen-ui-kit/packages/web-modules",
|
|
41
|
+
"@adia-ai/llm": "file:/Users/<you>/Projects/gen-ui-kit/packages/llm",
|
|
42
|
+
"@adia-ai/a2ui-runtime": "file:/Users/<you>/Projects/gen-ui-kit/packages/a2ui/runtime",
|
|
43
|
+
"@adia-ai/a2ui-compose": "file:/Users/<you>/Projects/gen-ui-kit/packages/a2ui/compose",
|
|
44
|
+
"@adia-ai/a2ui-corpus": "file:/Users/<you>/Projects/gen-ui-kit/packages/a2ui/corpus",
|
|
45
|
+
"@adia-ai/a2ui-mcp": "file:/Users/<you>/Projects/gen-ui-kit/packages/a2ui/mcp",
|
|
46
|
+
"@adia-ai/a2ui-retrieval": "file:/Users/<you>/Projects/gen-ui-kit/packages/a2ui/retrieval",
|
|
47
|
+
"@adia-ai/a2ui-validator": "file:/Users/<you>/Projects/gen-ui-kit/packages/a2ui/validator"
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Note the path shape: 6 of 9 live at `gen-ui-kit/packages/a2ui/<name>`
|
|
52
|
+
(not `gen-ui-kit/packages/<name>`). Easy mistake.
|
|
53
|
+
|
|
54
|
+
### Rule 3: verify symlinks after `npm install`
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
ls -la node_modules/@adia-ai/
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Every entry should have a `->` arrow indicating a symlink. If you
|
|
61
|
+
see real directories, npm copied instead of linked — edits to source
|
|
62
|
+
won't propagate. Fix:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
rm -rf node_modules/@adia-ai
|
|
66
|
+
npm install --install-links=false
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Modern npm (v8+) defaults to symlinks for absolute `file:` paths, so
|
|
70
|
+
this is rare. But if it happens, the script's
|
|
71
|
+
`⚠ copied-not-linked` marker will flag it.
|
|
72
|
+
|
|
73
|
+
### Rule 4: lockfile churn is normal
|
|
74
|
+
|
|
75
|
+
`package-lock.json` records the resolved path of every linked dep.
|
|
76
|
+
The first `npm install` after switching to `file:` links generates
|
|
77
|
+
a different lockfile than the npm-resolved version. **Don't commit
|
|
78
|
+
the linked lockfile to a shared branch** — it pins the absolute path
|
|
79
|
+
to your local filesystem and breaks for everyone else. Either:
|
|
80
|
+
|
|
81
|
+
- Commit the npm-resolved lockfile (semver ranges declared) and treat
|
|
82
|
+
the linked install as a local-dev override; OR
|
|
83
|
+
- Use `npm overrides` instead of changing `dependencies` (see
|
|
84
|
+
"Alternative: overrides" below), so the linked paths live in a
|
|
85
|
+
separate overrides block that's easier to revert.
|
|
86
|
+
|
|
87
|
+
### Verification with check-adia-versions.py
|
|
88
|
+
|
|
89
|
+
After linking, the script reports each package as `🔗 linked`:
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
@adia-ai/web-components 0.6.8 file:/Users/kimba/Proje... 0.6.8 🔗 linked
|
|
93
|
+
@adia-ai/web-modules 0.6.8 file:/Users/kimba/Proje... 0.6.8 🔗 linked
|
|
94
|
+
...
|
|
95
|
+
🔗 Linked: 9 package(s) declared as local dev link (all declared).
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Exit code stays 0 because linked = informational, not a failure.
|
|
99
|
+
Version-drift comparisons are skipped (a `file:` path has no
|
|
100
|
+
semver — the script reads the version from the linked source's
|
|
101
|
+
own `package.json` for display, but doesn't compare it to npm latest).
|
|
102
|
+
|
|
103
|
+
### Alternative: npm overrides (cleaner revert)
|
|
104
|
+
|
|
105
|
+
If you want to keep `"@adia-ai/x": "^0.6.8"` declared as your
|
|
106
|
+
intent and only override resolution for local dev:
|
|
107
|
+
|
|
108
|
+
```json
|
|
109
|
+
"dependencies": {
|
|
110
|
+
"@adia-ai/web-components": "^0.6.8",
|
|
111
|
+
"@adia-ai/web-modules": "^0.6.8"
|
|
112
|
+
},
|
|
113
|
+
"overrides": {
|
|
114
|
+
"@adia-ai/web-components": "file:/Users/<you>/Projects/gen-ui-kit/packages/web-components",
|
|
115
|
+
"@adia-ai/web-modules": "file:/Users/<you>/Projects/gen-ui-kit/packages/web-modules",
|
|
116
|
+
"@adia-ai/llm": "file:/Users/<you>/Projects/gen-ui-kit/packages/llm",
|
|
117
|
+
"@adia-ai/a2ui-runtime": "file:/Users/<you>/Projects/gen-ui-kit/packages/a2ui/runtime",
|
|
118
|
+
"@adia-ai/a2ui-compose": "file:/Users/<you>/Projects/gen-ui-kit/packages/a2ui/compose",
|
|
119
|
+
"@adia-ai/a2ui-corpus": "file:/Users/<you>/Projects/gen-ui-kit/packages/a2ui/corpus",
|
|
120
|
+
"@adia-ai/a2ui-mcp": "file:/Users/<you>/Projects/gen-ui-kit/packages/a2ui/mcp",
|
|
121
|
+
"@adia-ai/a2ui-retrieval": "file:/Users/<you>/Projects/gen-ui-kit/packages/a2ui/retrieval",
|
|
122
|
+
"@adia-ai/a2ui-validator": "file:/Users/<you>/Projects/gen-ui-kit/packages/a2ui/validator"
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Reverting to npm is a one-line delete (remove the `overrides` block,
|
|
127
|
+
`npm install`). The `dependencies` block stays canonical.
|
|
128
|
+
|
|
129
|
+
**Detection note:** `check-adia-versions.py` reads `dependencies`,
|
|
130
|
+
`devDependencies`, and `peerDependencies` only — it does NOT inspect
|
|
131
|
+
`overrides`. With this pattern, the script will show:
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
@adia-ai/web-components 0.6.8 ^0.6.8 0.6.8 ✓ ok
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
`installed` will still reflect the linked source (so `0.6.8` from
|
|
138
|
+
the linked package.json), `declared` shows the semver range, status
|
|
139
|
+
is `✓ ok`. This is correct — overrides don't change what your
|
|
140
|
+
project declares, only how it resolves. To verify the symlinks
|
|
141
|
+
are in place, fall back to `ls -la node_modules/@adia-ai/`.
|
|
142
|
+
|
|
143
|
+
### Why not `npm link`?
|
|
144
|
+
|
|
145
|
+
`npm link` (the classic global-prefix mechanism) works but has known
|
|
146
|
+
problems in multi-package scenarios:
|
|
147
|
+
|
|
148
|
+
- Peer-dependency hoisting differs between `npm link` and `npm install`
|
|
149
|
+
resolution; you can get duplicate `@adia-ai/web-components` instances
|
|
150
|
+
loaded into the same browser bundle.
|
|
151
|
+
- The global link state is invisible from `package.json` — future you
|
|
152
|
+
(and your CI) won't know the consumer is linked.
|
|
153
|
+
- Removing the link requires `npm unlink` in BOTH the source and the
|
|
154
|
+
consumer; easy to leave dangling.
|
|
155
|
+
|
|
156
|
+
`file:` and `overrides` are declarative and visible in `package.json`
|
|
157
|
+
— prefer them.
|
|
158
|
+
|
|
159
|
+
### Going back to npm
|
|
160
|
+
|
|
161
|
+
When you're done dev-iterating and want to ship from npm again:
|
|
162
|
+
|
|
163
|
+
1. Edit consumer `package.json` — replace each `file:...` with the
|
|
164
|
+
target semver range (e.g. `^0.6.8`). Or, if using `overrides`,
|
|
165
|
+
delete the `overrides` block.
|
|
166
|
+
2. `rm -rf node_modules package-lock.json`
|
|
167
|
+
3. `npm install`
|
|
168
|
+
4. Run `scripts/check-adia-versions.py` — should report `✓ all clean`.
|
|
169
|
+
|
|
170
|
+
### Switching to the `/with-css` opt-in form (since v0.6.10)
|
|
171
|
+
|
|
172
|
+
If you previously used the explicit-import 2-line form for a shell:
|
|
173
|
+
|
|
174
|
+
```js
|
|
175
|
+
import '@adia-ai/web-modules/shell/admin-shell';
|
|
176
|
+
import '@adia-ai/web-modules/shell/admin-shell.css';
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
You can collapse to the opt-in form:
|
|
180
|
+
|
|
181
|
+
```js
|
|
182
|
+
import '@adia-ai/web-modules/shell/admin-shell/with-css';
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
The functional output is identical (the opt-in form re-exports the JS
|
|
186
|
+
and side-effect-imports the CSS internally). The migration is purely
|
|
187
|
+
cosmetic — both forms tree-shake the unused shells equally, both bundle
|
|
188
|
+
the same CSS. Choose based on your team's preferred style. The same
|
|
189
|
+
opt-in shape exists for `chat-shell`, `editor-shell`, `simple-shell`.
|
|
190
|
+
|
|
191
|
+
See §CSSPolicy "Opt-in `/with-css` variants" for the full discussion.
|
|
192
|
+
|
|
193
|
+
### Cross-reference
|
|
194
|
+
|
|
195
|
+
- `multi-agent-git-staging-discipline` skill — if a peer is publishing
|
|
196
|
+
to npm while you're linked, your `package-lock.json` will diverge.
|
|
197
|
+
Hard Rule 12 (`git reset HEAD` + verify) applies double here: stage
|
|
198
|
+
EXACTLY your intent, never `git add -A`.
|