@adia-ai/adia-ui-forge 0.8.5 → 0.8.6
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 +1 -1
- package/CHANGELOG.md +11 -0
- package/README.md +13 -4
- package/agents/a2ui-builder.corpus.json +35 -0
- package/agents/a2ui-builder.md +37 -0
- package/agents/component-author.corpus.json +40 -0
- package/agents/component-author.md +10 -1
- package/agents/framework-reviewer.corpus.json +35 -0
- package/agents/{framework-verifier.md → framework-reviewer.md} +15 -7
- package/agents/release-builder.corpus.json +39 -0
- package/agents/release-builder.md +39 -0
- package/agents/routing-corpus.json +38 -38
- package/commands/release.md +5 -3
- package/package.json +1 -1
- package/skills/adia-a2ui/SKILL.md +27 -6
- package/skills/adia-a2ui/evals/routing-corpus.json +36 -29
- package/skills/adia-a2ui/references/zettel-calibration.md +5 -5
- package/skills/adia-author/SKILL.md +15 -8
- package/skills/adia-author/evals/routing-corpus.json +39 -218
- package/skills/adia-author/references/authoring-cycle.md +19 -0
- package/skills/adia-author/references/code-style.md +0 -1
- package/skills/adia-author/references/llm-bridge.md +7 -0
- package/skills/adia-author/references/worked-example.md +18 -2
- package/skills/adia-deploy/SKILL.md +33 -18
- package/skills/adia-deploy/evals/routing-corpus.json +33 -142
- package/skills/adia-dogfood/SKILL.md +10 -3
- package/skills/adia-dogfood/evals/routing-corpus.json +30 -142
- package/skills/adia-dogfood/references/admin-shell-anatomy.md +1 -1
- package/skills/adia-gen-review/SKILL.md +18 -7
- package/skills/adia-gen-review/evals/routing-corpus.json +30 -142
- package/skills/adia-gen-review/scripts/gen-review-decompose.mjs +5 -0
- package/skills/adia-llm-internals/SKILL.md +10 -6
- package/skills/adia-llm-internals/evals/routing-corpus.json +33 -142
- package/skills/adia-llm-internals/references/bridge-facade.md +2 -2
- package/skills/adia-llm-internals/references/streaming-sse.md +1 -1
- package/skills/adia-release/SKILL.md +40 -17
- package/skills/adia-release/evals/routing-corpus.json +35 -0
- package/skills/adia-release/references/changelog-discipline.md +14 -8
- package/skills/adia-release/references/cut-procedure.md +48 -28
- package/skills/adia-release/references/independent-package-release.md +1 -1
- package/skills/adia-release/scripts/insert-stub.mjs +1 -1
- package/skills/adia-release/scripts/release-pack.mjs +42 -14
- package/skills/adia-site-docs/SKILL.md +6 -1
- package/skills/adia-site-docs/evals/routing-corpus.json +35 -173
- package/skills/adia-ssr/SKILL.md +32 -14
- package/skills/adia-ssr/evals/routing-corpus.json +32 -136
- package/skills/adia-ssr/references/consumer-workarounds.md +33 -15
- package/skills/adia-ssr/references/failure-shapes.md +49 -7
- package/skills/adia-ssr/references/guard-patterns.md +41 -0
- package/skills/adia-ssr/references/status-ledger.md +5 -7
- package/skills/adia-ssr/references/test-without-linkedom.md +28 -12
- package/agents/a2ui-engineer.md +0 -26
- package/agents/release-engineer.md +0 -26
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: adia-a2ui
|
|
3
3
|
description: >-
|
|
4
|
-
Maintains the A2UI pipeline (packages/a2ui/): chunk corpus,
|
|
5
|
-
strategies,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
Maintains the A2UI pipeline (packages/a2ui/): the harvested chunk corpus,
|
|
5
|
+
compose strategies (zettel, chunk-zettel, free-form, monolithic), retrieval,
|
|
6
|
+
validator, calibration, evals, the a2ui MCP server. Use when asked to
|
|
7
|
+
author/harvest/fix chunks, tune STRONG_MATCH or zettel thresholds, validate
|
|
8
|
+
an A2UI document, diagnose an eval gap/regression or lift a semantic fail,
|
|
9
|
+
add or change MCP tools (generate_ui, compose_from_chunks,
|
|
10
|
+
check_anti_patterns, refine_composition), scan anti-patterns, run pipeline
|
|
11
|
+
ops, or when a component's A2UI contract can't express a content shape. NOT
|
|
12
|
+
for app screens (adia-compose), runtime gen-UI app features (adia-genui),
|
|
13
|
+
primitive authoring (adia-author), or gallery scoring (adia-gen-review).
|
|
9
14
|
disable-model-invocation: false
|
|
10
15
|
user-invocable: true
|
|
11
16
|
---
|
|
@@ -73,7 +78,7 @@ Unmatched work defaults to pipeline-overview and re-classifies from there.
|
|
|
73
78
|
Full structural gate after any pipeline change:
|
|
74
79
|
|
|
75
80
|
```bash
|
|
76
|
-
node scripts/build/components.mjs --verify # "clean — N files up-to-date" (
|
|
81
|
+
node scripts/build/components.mjs --verify # "clean — N files up-to-date" (the N is the gate; dir count drifts, don't pin it)
|
|
77
82
|
npm run verify:traits # 100% coverage
|
|
78
83
|
npm run smoke:engines
|
|
79
84
|
npm run smoke:register-engine # 11/11
|
|
@@ -109,3 +114,19 @@ intent → retrieval (chunk / composition search)
|
|
|
109
114
|
Every change touches exactly one stage; identify which before patching. History
|
|
110
115
|
for any constant or decision lives in git and PR descriptions
|
|
111
116
|
(`git log -S STRONG_MATCH_THRESHOLD -- packages/a2ui`).
|
|
117
|
+
|
|
118
|
+
## Pipeline Change Record — the output contract
|
|
119
|
+
|
|
120
|
+
Every change reports:
|
|
121
|
+
|
|
122
|
+
| Field | Value |
|
|
123
|
+
| --- | --- |
|
|
124
|
+
| Stage touched | retrieval \| strategy engine (zettel/chunk-zettel/free-form/monolithic) \| composer \| validator \| MCP surface |
|
|
125
|
+
| Narrowest gate run | the specific check for the touched stage, + result |
|
|
126
|
+
| Full sequence | `npm run smoke:engines` + `npm run test:a2ui` result |
|
|
127
|
+
| Floors before → after | cov/avg/MRR (zettel) or cov/avg/F1 (free-form) or cov/avg (monolithic) |
|
|
128
|
+
| Re-baseline | no / yes — if yes, the PR that ratified the new floor |
|
|
129
|
+
|
|
130
|
+
Done when every row is filled and the cited gates are green. NOT done: a
|
|
131
|
+
floor number changed with no before/after comparison, or a threshold tweak
|
|
132
|
+
with no root-cause note for why the floor moved.
|
|
@@ -1,31 +1,38 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
2
|
+
"positives": [
|
|
3
|
+
"validate this A2UI document",
|
|
4
|
+
"harvest a chunk from this HTML demo",
|
|
5
|
+
"zettel coverage dropped after the last change",
|
|
6
|
+
"should this repeated subtree become its own chunk",
|
|
7
|
+
"tune the STRONG_MATCH threshold",
|
|
8
|
+
"run check_anti_patterns on this rendered HTML",
|
|
9
|
+
"refine composition with an OAuth row",
|
|
10
|
+
"MRR dropped in the chunk retrieval eval",
|
|
11
|
+
"add an MCP tool to the a2ui server",
|
|
12
|
+
"audit the training data corpus for drift",
|
|
13
|
+
"diagnose this eval gap and regression",
|
|
14
|
+
"run the MCP pipeline: generate_ui then validate_schema",
|
|
15
|
+
"lift a semantic fail under sixty",
|
|
16
|
+
"why did the composer emit composition-match instead of composition-synthesized"
|
|
17
|
+
],
|
|
18
|
+
"negatives": [
|
|
19
|
+
"build a settings page from existing primitives",
|
|
20
|
+
"add a slot to button-ui and update its yaml contract",
|
|
21
|
+
"cut a release and bump the version tag",
|
|
22
|
+
"score the generated UI quality in apps/genui",
|
|
23
|
+
"run a broad visual QA sweep across site and playgrounds",
|
|
24
|
+
"fix the @adia-ai/llm SSE adapter",
|
|
25
|
+
"explain how React state management works",
|
|
26
|
+
"compose a settings screen from catalog primitives",
|
|
27
|
+
"mount gen-root and wire data resolvers for end users at runtime",
|
|
28
|
+
"edit the getting-started docs page on the site"
|
|
29
|
+
],
|
|
30
|
+
"_measured": {
|
|
31
|
+
"as_of": "2026-07-18",
|
|
32
|
+
"scorer": "routing_eval.py (nonoun-plugins/forge)",
|
|
33
|
+
"f1": 0.783,
|
|
34
|
+
"precision": 1.0,
|
|
35
|
+
"recall": 0.643,
|
|
36
|
+
"exit_code": 0
|
|
37
|
+
}
|
|
31
38
|
}
|
|
@@ -8,7 +8,7 @@ is calibrated against the held-out intent set or production telemetry.
|
|
|
8
8
|
|
|
9
9
|
## `STRONG_MATCH_THRESHOLD = 40`
|
|
10
10
|
|
|
11
|
-
- **File**: `packages/a2ui/compose/strategies/zettel/generator-adapter.js
|
|
11
|
+
- **File**: `packages/a2ui/compose/strategies/zettel/generator-adapter.js` (`grep -n STRONG_MATCH_THRESHOLD`)
|
|
12
12
|
- **Raised**: 22 → 40 post-incident.
|
|
13
13
|
- **Reason**: at 22, login-form / signup-form played verbatim too often →
|
|
14
14
|
repetitive output. At 40, only near-perfect retrievals (chart-dashboard=48,
|
|
@@ -29,7 +29,7 @@ is calibrated against the held-out intent set or production telemetry.
|
|
|
29
29
|
|
|
30
30
|
## `STRONG_RETRIEVAL_SCORE = 8`
|
|
31
31
|
|
|
32
|
-
- **File**: `chunk-synthesizer.js
|
|
32
|
+
- **File**: `chunk-synthesizer.js` (`grep -n STRONG_RETRIEVAL_SCORE`)
|
|
33
33
|
- **Scale**: corpus-size-**independent** absolute keyword score from
|
|
34
34
|
`chunk-library.js#keywordScore()`: first name-word matches a token **+10**,
|
|
35
35
|
full-query substring **+5**, whole-word token in name **+3**, substring /
|
|
@@ -46,7 +46,7 @@ is calibrated against the held-out intent set or production telemetry.
|
|
|
46
46
|
|
|
47
47
|
## `PRE_SEARCH_LIMIT = 30`
|
|
48
48
|
|
|
49
|
-
- **Files**: `chunk-synthesizer.js
|
|
49
|
+
- **Files**: `chunk-synthesizer.js` + `chunk-refiner.js` (`grep -n PRE_SEARCH_LIMIT`)
|
|
50
50
|
- **Reason**: token-budget mitigation — pre-filter the catalog before the LLM
|
|
51
51
|
sees it; the full catalog per prompt would burn tens of thousands of tokens.
|
|
52
52
|
- **Synthesizer**: kind-aware allocation —
|
|
@@ -61,7 +61,7 @@ is calibrated against the held-out intent set or production telemetry.
|
|
|
61
61
|
|
|
62
62
|
## `SCOPE_DRIFT_RATIO = 1.5` + `SCOPE_DRIFT_MIN_ACTUAL = 20`
|
|
63
63
|
|
|
64
|
-
- **File**: `chunk-synthesizer.js
|
|
64
|
+
- **File**: `chunk-synthesizer.js` (exported; `grep -n SCOPE_DRIFT`)
|
|
65
65
|
- Composed envelope's component count > 1.5× the sum of bound chunks' counts
|
|
66
66
|
auto-fires a `scope-drift` issue — catches LLM creative expansion that
|
|
67
67
|
hallucinates components beyond the bound chunks.
|
|
@@ -70,7 +70,7 @@ is calibrated against the held-out intent set or production telemetry.
|
|
|
70
70
|
|
|
71
71
|
## `DEFAULT_MAX_ATTEMPTS = 2`
|
|
72
72
|
|
|
73
|
-
- **Files**: `chunk-refiner.js
|
|
73
|
+
- **Files**: `chunk-refiner.js` + `chunk-synthesizer.js` (`grep -n DEFAULT_MAX_ATTEMPTS`)
|
|
74
74
|
- Validator-driven retry budget. After 2 failed validations the engine emits
|
|
75
75
|
`synthesis-failed`.
|
|
76
76
|
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: adia-author
|
|
3
3
|
description: >-
|
|
4
|
-
Author or modify
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
Author or modify AdiaUI framework source inside the monorepo — primitives
|
|
5
|
+
(packages/web-components), shells/composites (packages/web-modules), yaml
|
|
6
|
+
SoTs, demos. Use when asked to add a new primitive component, add or fix a prop/slot/
|
|
7
|
+
attribute/CSS variant, update a component's yaml, build or fix a shell
|
|
8
|
+
(chat-shell, admin-shell, editor-shell — sidebar/pane/bespoke-tier
|
|
9
|
+
composition), promote or extract repeated inline content into a shared
|
|
10
|
+
module, audit a component's four-axis contract/token usage/lifecycle
|
|
11
|
+
(connected/disconnected symmetry) for drift, or author/write a demo or
|
|
12
|
+
examples.html for a component or composite. NOT for composing app screens
|
|
13
|
+
from primitives (adia-compose), A2UI pipeline internals (adia-a2ui),
|
|
14
|
+
@adia-ai/llm adapter/streaming/bridge internals (adia-llm-internals), or
|
|
15
|
+
site/pages docs pages (adia-site-docs).
|
|
9
16
|
disable-model-invocation: false
|
|
10
17
|
user-invocable: true
|
|
11
18
|
---
|
|
@@ -14,7 +21,9 @@ user-invocable: true
|
|
|
14
21
|
|
|
15
22
|
Guard rails for code that lands INSIDE the adia-ui monorepo: primitives
|
|
16
23
|
(`packages/web-components/`), shells and composites (`packages/web-modules/`),
|
|
17
|
-
their `<name>.yaml` SoTs,
|
|
24
|
+
their `<name>.yaml` SoTs, and composite demos. `@adia-ai/llm` internals
|
|
25
|
+
(adapters, streaming, the bridge) are `adia-llm-internals`'s charter, not
|
|
26
|
+
this skill's — route there.
|
|
18
27
|
Light-DOM is load-bearing: `slot=` attributes are decorative metadata,
|
|
19
28
|
positioning is CSS by tag + ancestor + DOM order — never `::slotted()`,
|
|
20
29
|
`::part()`, or shadow DOM. `.claude/docs/specs/component-token-contract.md`
|
|
@@ -30,7 +39,6 @@ wins any tie with this skill. Monorepo source read while authoring (yaml, CSS,
|
|
|
30
39
|
| Shell / bespoke cluster child (`<admin-*>` `<chat-*>` `<editor-*>` `<simple-*>`) | [shell-patterns.md](references/shell-patterns.md) |
|
|
31
40
|
| Promote repeated inline UI → shared module | [module-promotion.md](references/module-promotion.md) |
|
|
32
41
|
| Contract / token / lifecycle drift audit on an existing component | [token-contract.md](references/token-contract.md) + [anti-patterns.md](references/anti-patterns.md) |
|
|
33
|
-
| Extend `@adia-ai/llm` (provider, streaming, proxy) | [llm-bridge.md](references/llm-bridge.md) |
|
|
34
42
|
| Demo for a composite/module — any `packages/web-modules/**/*.{examples,contents}.html` | [composite-demo-protocol.md](references/composite-demo-protocol.md) — NOT the primitive or promotion paths; they lack the canonical-survey discipline |
|
|
35
43
|
| Convention question ("is this idiomatic?") | [code-style.md](references/code-style.md) — cite the rule, don't expand it inline |
|
|
36
44
|
|
|
@@ -82,7 +90,6 @@ citation mechanically on every web-modules demo write; the
|
|
|
82
90
|
| Shell | render `packages/web-modules/<cluster>/<name>/<name>.html`; `node scripts/dev/audit-native-primitive-leak.mjs --include=<surface>`; `node scripts/dev/audit-shell-composition.mjs --include=<surface>` for `<admin-shell>` composites |
|
|
83
91
|
| Inline → module promotion | source page renders identically post-refactor (visual sweep + DOM diff) + native-primitive-leak audit on the touched surface |
|
|
84
92
|
| Drift audit | the findings report itself; gates run once a fix is applied |
|
|
85
|
-
| LLM-bridge extension | a real client round-trip parses + returns (`npm run check:lockstep` + `npm run smoke:engines`) |
|
|
86
93
|
| Composite demo | `npm run audit:demo-pattern-source:strict` + `npm run qa:design-coherence:strict` + (8b) `npm run qa:rendered-dom:emit -- --slug=<slug>` |
|
|
87
94
|
|
|
88
95
|
Full structural-gate sequence after any primitive / shell / promotion work:
|
|
@@ -1,222 +1,43 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"should_route_to_author": true,
|
|
22
|
-
"expected_shape": "new-primitive",
|
|
23
|
-
"rationale": "Canonical new-primitive task shape."
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"id": "author-new-primitive-02",
|
|
27
|
-
"phrase": "build a new <toggle-ui> component from scratch",
|
|
28
|
-
"should_route_to_author": true,
|
|
29
|
-
"expected_shape": "new-primitive",
|
|
30
|
-
"rationale": "'build a <foo-ui>' phrasing."
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"id": "author-new-primitive-03",
|
|
34
|
-
"phrase": "create a new primitive web component in packages/web-components",
|
|
35
|
-
"should_route_to_author": true,
|
|
36
|
-
"expected_shape": "new-primitive",
|
|
37
|
-
"rationale": "Explicit packages/web-components path mention."
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
{
|
|
41
|
-
"id": "author-modify-01",
|
|
42
|
-
"phrase": "add a new prop to table-ui",
|
|
43
|
-
"should_route_to_author": true,
|
|
44
|
-
"expected_shape": "modify-primitive",
|
|
45
|
-
"rationale": "Modify existing primitive — add a prop."
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"id": "author-modify-02",
|
|
49
|
-
"phrase": "fix the CSS in card-ui to handle the new bleed variant",
|
|
50
|
-
"should_route_to_author": true,
|
|
51
|
-
"expected_shape": "modify-primitive",
|
|
52
|
-
"rationale": "Modify existing primitive CSS."
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"id": "author-modify-03",
|
|
56
|
-
"phrase": "update the input-ui yaml to add a placeholder attribute",
|
|
57
|
-
"should_route_to_author": true,
|
|
58
|
-
"expected_shape": "modify-primitive",
|
|
59
|
-
"rationale": "Update the yaml SoT for an existing primitive."
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
{
|
|
63
|
-
"id": "author-shell-01",
|
|
64
|
-
"phrase": "build the chat-shell composition with the new sidebar slot",
|
|
65
|
-
"should_route_to_author": true,
|
|
66
|
-
"expected_shape": "shell",
|
|
67
|
-
"rationale": "Shell authoring."
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"id": "author-shell-02",
|
|
71
|
-
"phrase": "author a new web-module shell at packages/web-modules/editor/editor-shell",
|
|
72
|
-
"should_route_to_author": true,
|
|
73
|
-
"expected_shape": "shell",
|
|
74
|
-
"rationale": "Explicit web-modules + shell."
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
"id": "author-shell-03",
|
|
78
|
-
"phrase": "add a pane behaviour to admin-shell per the bespoke shell-tier convention",
|
|
79
|
-
"should_route_to_author": true,
|
|
80
|
-
"expected_shape": "shell",
|
|
81
|
-
"rationale": "Bespoke shell-tier (ADR-0023 shape) work."
|
|
82
|
-
},
|
|
83
|
-
|
|
84
|
-
{
|
|
85
|
-
"id": "author-promote-01",
|
|
86
|
-
"phrase": "promote this inline content to a shared web-modules module",
|
|
87
|
-
"should_route_to_author": true,
|
|
88
|
-
"expected_shape": "module-promotion",
|
|
89
|
-
"rationale": "Promote inline → module."
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"id": "author-promote-02",
|
|
93
|
-
"phrase": "this content keeps repeating across apps, extract to a shared module",
|
|
94
|
-
"should_route_to_author": true,
|
|
95
|
-
"expected_shape": "module-promotion",
|
|
96
|
-
"rationale": "Repetition trigger."
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
"id": "author-promote-03",
|
|
100
|
-
"phrase": "lift this billing-summary block from apps/saas to web-modules",
|
|
101
|
-
"should_route_to_author": true,
|
|
102
|
-
"expected_shape": "module-promotion",
|
|
103
|
-
"rationale": "Lift inline page content to a reusable module."
|
|
104
|
-
},
|
|
105
|
-
|
|
106
|
-
{
|
|
107
|
-
"id": "author-audit-01",
|
|
108
|
-
"phrase": "audit the four-axis contract for table-ui",
|
|
109
|
-
"should_route_to_author": true,
|
|
110
|
-
"expected_shape": "drift-audit",
|
|
111
|
-
"rationale": "Contract drift audit."
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"id": "author-audit-02",
|
|
115
|
-
"phrase": "check the token usage in card-ui for drift",
|
|
116
|
-
"should_route_to_author": true,
|
|
117
|
-
"expected_shape": "drift-audit",
|
|
118
|
-
"rationale": "Token audit procedure."
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
"id": "author-audit-03",
|
|
122
|
-
"phrase": "lifecycle audit on dropdown-ui — symmetric connected/disconnected?",
|
|
123
|
-
"should_route_to_author": true,
|
|
124
|
-
"expected_shape": "drift-audit",
|
|
125
|
-
"rationale": "Lifecycle audit."
|
|
126
|
-
},
|
|
127
|
-
|
|
128
|
-
{
|
|
129
|
-
"id": "author-llm-01",
|
|
130
|
-
"phrase": "extend the LLM bridge to add a new provider",
|
|
131
|
-
"should_route_to_author": true,
|
|
132
|
-
"expected_shape": "llm-bridge",
|
|
133
|
-
"rationale": "Extend @adia-ai/llm."
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
"id": "author-llm-02",
|
|
137
|
-
"phrase": "modify createAdapter in @adia-ai/llm to add chunk-shape support",
|
|
138
|
-
"should_route_to_author": true,
|
|
139
|
-
"expected_shape": "llm-bridge",
|
|
140
|
-
"rationale": "Explicit createAdapter + @adia-ai/llm mention."
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
"id": "author-llm-03",
|
|
144
|
-
"phrase": "set up the LLM-bridge surface for a new tool-call provider",
|
|
145
|
-
"should_route_to_author": true,
|
|
146
|
-
"expected_shape": "llm-bridge",
|
|
147
|
-
"rationale": "LLM-bridge trigger phrase."
|
|
148
|
-
},
|
|
149
|
-
|
|
150
|
-
{
|
|
151
|
-
"id": "author-demo-01",
|
|
152
|
-
"phrase": "author a demo for the billing-overview composite",
|
|
153
|
-
"should_route_to_author": true,
|
|
154
|
-
"expected_shape": "composite-demo",
|
|
155
|
-
"rationale": "Composite-demo authoring."
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
"id": "author-demo-02",
|
|
159
|
-
"phrase": "compose the examples.html for dashboard-layout",
|
|
160
|
-
"should_route_to_author": true,
|
|
161
|
-
"expected_shape": "composite-demo",
|
|
162
|
-
"rationale": "'compose examples.html for Y' trigger."
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
"id": "author-demo-03",
|
|
166
|
-
"phrase": "write the demo for <integrations-page-ui> in packages/web-modules/settings",
|
|
167
|
-
"should_route_to_author": true,
|
|
168
|
-
"expected_shape": "composite-demo",
|
|
169
|
-
"rationale": "'write the demo for <module-ui>' + web-modules path."
|
|
170
|
-
},
|
|
171
|
-
|
|
172
|
-
{
|
|
173
|
-
"id": "author-adv-01",
|
|
174
|
-
"phrase": "compose this Figma mock into AdiaUI components for our consumer app",
|
|
175
|
-
"should_route_to_author": false,
|
|
176
|
-
"expected_alternative": "adia-compose (adia-factory plugin)",
|
|
177
|
-
"rationale": "Adversarial — consumer-side composition (screens FROM existing primitives). The description NEG-fences it."
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
"id": "author-adv-02",
|
|
181
|
-
"phrase": "cut a release of the next version and publish the npm packages",
|
|
182
|
-
"should_route_to_author": false,
|
|
183
|
-
"expected_alternative": "adia-release",
|
|
184
|
-
"rationale": "Adversarial — release territory."
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
"id": "author-adv-03",
|
|
188
|
-
"phrase": "tune the zettel composition coverage; eval is at 38%",
|
|
189
|
-
"should_route_to_author": false,
|
|
190
|
-
"expected_alternative": "adia-a2ui",
|
|
191
|
-
"rationale": "Adversarial — a2ui pipeline internals (compose strategies, eval coverage)."
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
"id": "author-adv-04",
|
|
195
|
-
"phrase": "build a user profile card with avatar and edit actions",
|
|
196
|
-
"should_route_to_author": false,
|
|
197
|
-
"expected_alternative": "adia-compose (adia-factory plugin)",
|
|
198
|
-
"rationale": "Adversarial — canonical consumer-composition task (build UI from intent)."
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
"id": "author-adv-05",
|
|
202
|
-
"phrase": "deploy the api service to the hosting platform",
|
|
203
|
-
"should_route_to_author": false,
|
|
204
|
-
"expected_alternative": "adia-deploy",
|
|
205
|
-
"rationale": "Adversarial — deployment/ops territory."
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
"id": "author-adv-06",
|
|
209
|
-
"phrase": "explain how React hooks work",
|
|
210
|
-
"should_route_to_author": false,
|
|
211
|
-
"expected_alternative": null,
|
|
212
|
-
"rationale": "Adversarial — generic framework knowledge; no AdiaUI skill should activate."
|
|
213
|
-
}
|
|
2
|
+
"positives": [
|
|
3
|
+
"add a new button-ui primitive component",
|
|
4
|
+
"build a new <toggle-ui> component from scratch",
|
|
5
|
+
"create a new primitive web component in packages/web-components",
|
|
6
|
+
"add a new prop to table-ui",
|
|
7
|
+
"fix the CSS in card-ui to handle the new bleed variant",
|
|
8
|
+
"update the input-ui yaml to add a placeholder attribute",
|
|
9
|
+
"build the chat-shell composition with the new sidebar slot",
|
|
10
|
+
"author a new web-module shell at packages/web-modules/editor/editor-shell",
|
|
11
|
+
"add a pane behaviour to admin-shell per the bespoke shell-tier convention",
|
|
12
|
+
"promote this inline content to a shared web-modules module",
|
|
13
|
+
"this content keeps repeating across apps, extract to a shared module",
|
|
14
|
+
"lift this billing-summary block from apps/saas to web-modules",
|
|
15
|
+
"audit the four-axis contract for table-ui",
|
|
16
|
+
"check the token usage in card-ui for drift",
|
|
17
|
+
"lifecycle audit on dropdown-ui \u2014 symmetric connected/disconnected?",
|
|
18
|
+
"author a demo for the billing-overview composite",
|
|
19
|
+
"compose the examples.html for dashboard-layout",
|
|
20
|
+
"write the demo for <integrations-page-ui> in packages/web-modules/settings"
|
|
214
21
|
],
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
"
|
|
218
|
-
"
|
|
219
|
-
"
|
|
220
|
-
"
|
|
22
|
+
"negatives": [
|
|
23
|
+
"compose this Figma mock into AdiaUI components for our consumer app",
|
|
24
|
+
"cut a release of the next version and publish the npm packages",
|
|
25
|
+
"tune the zettel composition coverage; eval is at 38%",
|
|
26
|
+
"build a user profile card with avatar and edit actions",
|
|
27
|
+
"deploy the api service to the hosting platform",
|
|
28
|
+
"explain how React hooks work",
|
|
29
|
+
"the gemini adapter is dropping usage tokens on streamed responses",
|
|
30
|
+
"fix the openai stopReason mapping in the llm client",
|
|
31
|
+
"extend the LLM bridge to add a new provider",
|
|
32
|
+
"modify createAdapter in @adia-ai/llm to add chunk-shape support",
|
|
33
|
+
"set up the LLM-bridge surface for a new tool-call provider"
|
|
34
|
+
],
|
|
35
|
+
"_measured": {
|
|
36
|
+
"as_of": "2026-07-18",
|
|
37
|
+
"scorer": "routing_eval.py (nonoun-plugins/forge)",
|
|
38
|
+
"f1": 0.971,
|
|
39
|
+
"precision": 1.0,
|
|
40
|
+
"recall": 0.944,
|
|
41
|
+
"exit_code": 0
|
|
221
42
|
}
|
|
222
43
|
}
|
|
@@ -184,6 +184,24 @@ Before declaring the work done, run through this checklist. If anything fails, f
|
|
|
184
184
|
- [ ] Cached DOM refs (`this.#fooEl`) are nulled in `disconnected()`.
|
|
185
185
|
- [ ] Class declares `disconnected()` exactly once.
|
|
186
186
|
|
|
187
|
+
## Step 4b — Author the yaml SoT (+ regenerate the sidecar)
|
|
188
|
+
|
|
189
|
+
A component isn't just its `.js`/`.css` — the `<name>.yaml` is the SOURCE OF
|
|
190
|
+
TRUTH the whole pipeline reads (docs site, A2UI registries, consumer
|
|
191
|
+
harnesses, `.d.ts` codegen). Every new primitive ships one; every prop/slot/
|
|
192
|
+
event change updates it. Field-by-field contract:
|
|
193
|
+
[yaml-contract.md](yaml-contract.md). Then regenerate — never hand-edit the
|
|
194
|
+
sidecar (`sidecar-prewrite-guard` blocks it anyway):
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
npm run build:components # yaml → <name>.a2ui.json + catalog + .d.ts
|
|
198
|
+
node scripts/build/components.mjs --verify # "clean — N files up-to-date"
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
A primitive also needs BOTH barrel registrations — the CSS `@import` in
|
|
202
|
+
`styles/components.css` AND the JS `export` in `components/index.js`
|
|
203
|
+
(`scripts/audit/check-components-js-barrel.mjs` gates the second).
|
|
204
|
+
|
|
187
205
|
## Step 5 — Run the project's verification gates
|
|
188
206
|
|
|
189
207
|
Before committing, run the project's verify scripts. These catch the drift-shaped bugs the checklist can miss:
|
|
@@ -206,4 +224,5 @@ If a gate fails, fix before declaring done.
|
|
|
206
224
|
- [lifecycle-patterns.md](lifecycle-patterns.md) — timers, observers, popovers, listener patterns
|
|
207
225
|
- [anti-patterns.md](anti-patterns.md) — full failure-mode catalogue, file:line refs
|
|
208
226
|
- [worked-example.md](worked-example.md) — badge-ui + counter-ui walkthroughs
|
|
227
|
+
- [yaml-contract.md](yaml-contract.md) — the `<name>.yaml` SoT schema (Step 4b)
|
|
209
228
|
- [token-contract.md](token-contract.md) — token audit (post-implementation check)
|
|
@@ -319,7 +319,6 @@ For component source under `packages/web-components/components/**`, the gate is
|
|
|
319
319
|
- [css-patterns.md](css-patterns.md) — full @scope + variant/mode CSS architecture
|
|
320
320
|
- [lifecycle-patterns.md](lifecycle-patterns.md) — timers, observers, popovers, listeners
|
|
321
321
|
- [token-contract.md](token-contract.md) — token audit procedure
|
|
322
|
-
- [llm-bridge.md](llm-bridge.md) — extend @adia-ai/llm
|
|
323
322
|
- [module-promotion.md](module-promotion.md) — promote inline → module
|
|
324
323
|
- [anti-patterns.md](anti-patterns.md) — failure-mode catalogue with file:line refs
|
|
325
324
|
- **adia-a2ui** (sibling skill) — generator / corpus / MCP pipeline
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# LLM Bridge extension — @adia-ai/llm
|
|
2
2
|
|
|
3
|
+
**Superseded 2026-07-18 — `@adia-ai/llm` internals are `adia-llm-internals`'s charter, not
|
|
4
|
+
`adia-author`'s.** That skill's references (`adapter-contract.md`, `streaming-sse.md`,
|
|
5
|
+
`model-registry.md`, `bridge-facade.md`, `browser-proxy-boundary.md`, `add-a-provider.md`)
|
|
6
|
+
are the current, maintained source — this file is kept only as a historical pointer and is
|
|
7
|
+
no longer linked from `adia-author`'s task-shape table or `code-style.md`. Route provider/
|
|
8
|
+
streaming/bridge work to `adia-llm-internals`.
|
|
9
|
+
|
|
3
10
|
Use when adding a 4th provider, modifying `createAdapter()`, changing the streaming chunk shape, or extending `packages/llm/server.js`.
|
|
4
11
|
|
|
5
12
|
This reference is about **modifying** the package. For day-to-day consumption (import + call), the README at `packages/llm/README.md` is sufficient.
|
|
@@ -8,12 +8,28 @@ A small inline container for status labels. Supports cosmetic variants (accent/s
|
|
|
8
8
|
|
|
9
9
|
### File layout
|
|
10
10
|
|
|
11
|
+
The REAL anatomy every shipped primitive carries (this example's code blocks
|
|
12
|
+
below show only the two hand-authored core files, but "copy the structure"
|
|
13
|
+
means all of these — the yaml SoT and its regenerated artifacts are not
|
|
14
|
+
optional):
|
|
15
|
+
|
|
11
16
|
```text
|
|
12
17
|
packages/web-components/components/badge/
|
|
13
|
-
badge.
|
|
14
|
-
badge.
|
|
18
|
+
badge.yaml # SoT — props/slots/events contract (yaml-contract.md); edit FIRST
|
|
19
|
+
badge.class.js # the class, non-registering export (test isolation / subclassing)
|
|
20
|
+
badge.js # side-effect registration wrapper: import class + defineIfFree()
|
|
21
|
+
badge.css # @scope'd styles
|
|
22
|
+
badge.html # standalone demo page
|
|
23
|
+
badge.examples.html # docs-site examples
|
|
24
|
+
badge.examples.md # examples prose
|
|
25
|
+
badge.a2ui.json # GENERATED from the yaml (npm run build:components) — never hand-edit
|
|
26
|
+
badge.d.ts # GENERATED types
|
|
15
27
|
```
|
|
16
28
|
|
|
29
|
+
The code below collapses the class + registration into one `badge.js` for
|
|
30
|
+
reading compactness only — a real component splits them
|
|
31
|
+
(`badge.class.js` exports, `badge.js` registers).
|
|
32
|
+
|
|
17
33
|
### `badge.js`
|
|
18
34
|
|
|
19
35
|
```javascript
|