@adia-ai/a2ui-validator 0.3.2 → 0.3.3

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +50 -2
  3. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -7,6 +7,34 @@ Follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
7
7
 
8
8
  _No pending changes._
9
9
 
10
+ ## [0.3.3] - 2026-05-07
11
+
12
+ **Lockstep cut.** All 9 published `@adia-ai/*` packages now share version `0.3.3`, governed by [`docs/specs/package-architecture.md` § 15](../../../docs/specs/package-architecture.md#15-versioning-policy).
13
+
14
+ ### Changed
15
+
16
+ - `version`: `0.3.2` → `0.3.3`.
17
+ - `dependencies["@adia-ai/...]`: `^0.3.0` (patch-cut asymmetry — caret already covers 0.3.x; ranges unchanged).
18
+
19
+ ### No source changes
20
+
21
+ `@adia-ai/a2ui-validator` source is byte-identical to `0.3.2`. The cut is a version bump + ride-along on the lockstep policy.
22
+
23
+ ## [0.3.2] - 2026-05-06
24
+
25
+ **9-package lockstep patch cut to v0.3.2.** All lockstep members share
26
+ one version per [`docs/specs/package-architecture.md` § 15](../../../docs/specs/package-architecture.md#15-versioning-policy).
27
+ Internal `@adia-ai/*` dep ranges unchanged at `^0.3.0`.
28
+
29
+ ### No source changes
30
+
31
+ This package's source is byte-identical to v0.3.1. The cut bumps
32
+ version only.
33
+
34
+ ### Changed
35
+
36
+ - `version`: `0.3.1` → `0.3.2`.
37
+
10
38
  ## [0.3.1] - 2026-05-06
11
39
 
12
40
  **9-package lockstep patch cut.** All 9 published `@adia-ai/*` packages bump 0.3.0 → 0.3.1 per [`docs/specs/package-architecture.md` § 15](../../../docs/specs/package-architecture.md#15-versioning-policy). Internal `@adia-ai/*` dep ranges remain at `^0.3.0` (covers `0.3.1` under semver — patch-cut asymmetry).
package/README.md CHANGED
@@ -42,13 +42,61 @@ const result = validateAgainstCatalog(messages, catalog);
42
42
  - **Semantic validator** (optional, shadow-mode) — LLM-judged output
43
43
  quality against a rubric; cached on disk by content hash.
44
44
 
45
+ ## The 18 weighted checks
46
+
47
+ `validator.js` runs 18 weighted checks that sum to 100. Default pass
48
+ threshold is `valid: score ≥ 70`. The compose eval harness uses
49
+ `combined: 0.6 × validation + 0.4 × semantic` at threshold 80, so a
50
+ high structural score with low semantic still gets rejected at
51
+ compose time.
52
+
53
+ | Check | Weight | What it catches |
54
+ |---|---:|---|
55
+ | `intentAlignment` | 13 | Output addresses the intent (LLM-free heuristic) |
56
+ | `allTypesRegistered` | 9 | Every `component` value exists in the runtime registry |
57
+ | `noOrphanedChildren` | 9 | Every `children` ID resolves to a real node |
58
+ | `validMessageFormat` | 8 | Top-level shape is valid A2UI |
59
+ | `hasRootComponent` | 7 | Exactly one root |
60
+ | `noBareDivs` | 7 | Use semantic primitives (`<card-ui>`, `<col-ui>`) not bare `<div>` |
61
+ | `cardStructure` | 6 | Card pattern: header / body / footer hierarchy |
62
+ | `flatAdjacency` | 5 | Component IDs are flat (no nested arrays) |
63
+ | `noInlineLayout` | 5 | Use `<col-ui>` / `<row-ui>` / `<grid-ui>` not inline `style="display:flex"` |
64
+ | `textContentSet` | 5 | Text components have actual content |
65
+ | `idUniqueness` | 5 | No duplicate IDs |
66
+ | `interactiveHasLabel` | 4 | Buttons / inputs have accessible labels |
67
+ | `imagesHaveAlt` | 3 | `<img>` has `alt` attribute |
68
+ | `headingHierarchy` | 3 | `h1` → `h2` → `h3` monotonic |
69
+ | `gridVsColumn` | 3 | Right primitive for the layout |
70
+ | `landmarkStructure` | 3 | Page-level `main` / `nav` / `footer` |
71
+ | `noHardcodedColors` | 3 | Token contract — `--a-chrome-*` only |
72
+ | `tabStructure` | 2 | `<tabs-ui>` has `<tab-ui>` children |
73
+ | **Total** | **100** | |
74
+
75
+ **Wiring checks** are tracked separately (don't roll into the component
76
+ score) and sum to 13: `wiringControllersExist` (3), `wiringHostsExist`
77
+ (3), `wiringHandlersExist` (3), `wiringSourcesExist` (2),
78
+ `wiringDataPathsValid` (2).
79
+
80
+ ## Status
81
+
82
+ - **Structural + catalog validation** — shipped, default-on. Single
83
+ source of truth for component-shape contracts in A2UI messages.
84
+ - **Semantic validator (Phases 1 + 2)** — shipped. LLM-judge with
85
+ `dominantPattern` (0.5 weight) + `requiredCapabilities` (0.35) +
86
+ `forbiddenNoise` (0.15). Combined-gating opt-in via
87
+ `--gate-mode combined` to the eval harness.
88
+ - **Phases 3–5** — planned per [`semantic-validator.md`](../../../docs/specs/semantic-validator.md):
89
+ rubric expansion, persisted per-intent thresholds, and judge
90
+ ensembling.
91
+
45
92
  ## Runtime
46
93
 
47
94
  - `ajv` + `ajv-formats` for structural validation.
48
95
  - `@adia-ai/a2ui-runtime` for the registry shape.
49
96
 
50
- ## Links
97
+ ## Related
51
98
 
99
+ - Spec: [`docs/specs/semantic-validator.md`](../../../docs/specs/semantic-validator.md) — canonical design narrative
100
+ - Audit: [`docs/reports/audit-validator-2026-05-06.md`](../../../docs/reports/audit-validator-2026-05-06.md) — 226-line deep-dive with check-by-check rationale + recalibration notes
52
101
  - Repo: [`adiahealth/gen-ui-kit`](https://github.com/adiahealth/gen-ui-kit)
53
- - Spec: [`docs/specs/semantic-validator.md`](https://github.com/adiahealth/gen-ui-kit/blob/main/docs/specs/semantic-validator.md)
54
102
  - CHANGELOG: [`CHANGELOG.md`](./CHANGELOG.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adia-ai/a2ui-validator",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "AdiaUI A2UI validator \u2014 JSON Schema structural validation plus catalog-aware semantic validation (component exists, props match YAML). Split out from the compose engine so non-compose tooling (tests, MCP validator tools, CI gates) can depend on validation without pulling the whole generator graph.",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -32,4 +32,4 @@
32
32
  "ajv": "^8.0.0",
33
33
  "ajv-formats": "^3.0.0"
34
34
  }
35
- }
35
+ }