# Changelog — @adia-ai/a2ui-corpus

Follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

Scope: training corpus for the A2UI pipeline. Patterns, fragments,
compositions, exemplars, held-out eval fixtures, feedback registry,
gap registry. Consumed by `@adia-ai/a2ui-retrieval` and
`@adia-ai/a2ui-mcp`.

## [Unreleased]

_Nothing yet._

---

## [0.2.1] - 2026-05-02

**Lockstep cut + chunk-corpus reorganization mega-arc + trait registry regenerated from web-components SoT.** All 8 published `@adia-ai/*` packages bump 0.2.0 → 0.2.1 per [`docs/specs/package-architecture.md` § 15](../../../docs/specs/package-architecture.md#15-versioning-policy). Patch cut — no breaking changes.

### Changed

- `version`: `0.2.0` → `0.2.1`.
- `evals/holdout-compose-from-chunks.jsonl` migrated **into** corpus from a2ui-mcp (was at `packages/a2ui/mcp/evals/`). 20-intent compose-from-chunks holdout now lives next to the corpus it tests. `evals/run.mjs` updated to load from the new home; the legacy `evals/harness.mjs` was retired (its functionality merged into `run.mjs`).

### Changed — Trait registry now generated from web-components SoT (2026-05-02)

`packages/a2ui/retrieval/catalog.js` no longer carries a hand-curated `traitRegistry` array. The trait list is loaded at module init from `packages/web-components/traits/_catalog.json` (generated by `node scripts/build/traits-catalog.mjs` in the monorepo root from live `defineTrait()` metadata). Per [ADR-0018](../../../.brain/adrs/0018-trait-source-of-truth-and-declarative-attribute.md).

Behavior changes:
- 4 phantom traits (`disabled-state`, `form-associated`, `value-sync`, `resettable`) no longer appear in MCP `get_traits` responses — they had no implementation in `traits/`. Auto-pruned by construction.
- 2 naming mismatches resolved: `resize-observer-trait` → `resize-observer`, `intersection-observer-trait` → `intersection-observer`. The catalog now uses the same names as the trait files.
- Trait entries now include the full schema (`attributes`, `events`, `config` arrays) instead of just `{ name, category, description }`. Consumers reading `getTraits()` get richer metadata. Older shape is a strict subset, no breakage.

### Changed

- **`chunk-embeddings.json` (~20 MB) and `pattern-embeddings.json` (~3 MB)
  removed from the published npm tarball.** Both files remain committed in
  git so the monorepo's own pipeline runs unchanged. Published-tarball size
  drops from ~24 MB unpacked to ~3.4 MB.

  Consumers who need embedding-based retrieval regenerate locally via
  `npm run build:embeddings:all` (requires API access to the embedding
  provider). Keyword-only retrieval (`searchChunks` / `searchPatterns`)
  works unchanged without the indexes — the embedding-aware async paths
  (`searchChunksAsync` / `searchPatternsAsync`) fall through to keyword
  scoring when the index file is absent (`chunk-embedding-retriever.js`
  returns `null` gracefully on `ENOENT`).

  Note: the prior `chunk-embedding-retriever` path (`../../corpus/chunk-embeddings.json`)
  resolves correctly inside the monorepo but breaks under a
  `node_modules/@adia-ai/a2ui-corpus/` install layout — so the embedding
  files were already unreachable to npm consumers, just heavy. This change
  surfaces that reality. Published-consumer reachability is a separate
  follow-up.

  See README § "What's committed vs generated vs published".

### Changed — Chunk corpus reorganization mega-arc (2026-05-02)

12-commit arc that re-balances the chunk corpus for retrieval precision and harvester hygiene. End state: 100 compositions, 41 fragments, 1,422 chunks, 41 MB embeddings, fragment reuse ratio 40.2% (was 29.9% pre-§37; floor: 29.9%). Eval byte-identical: zettel coverage 83% / avgScore 89 / MRR 0.986 throughout.

- **`section-with-stack` fragment promoted** — first corpus use of children-as-attribute slot binding. 43 inline `Section(Column)` pairs collapsed into the new fragment at `fragments/layout/section-with-stack.json`.
- **Multi-variant chunk split (308 → 937 per-variant chunks).** Harvester migrated from `<section>`-wrapper-tagging to inner-pattern-tagging; multi-variant artifact-items now produce one chunk per visual variant (`alert-variant-warning` vs `alert-variant-success`) instead of one bundled chunk. Embedding-probe verified the precision lift: "warning alert" → `alert-variant-warning` (0.657), "large avatar" → `avatar-size-lg` (0.639), "small primary button" → `button-size-primary-sm` (0.656).
- **Skeleton harvest** (`collapseNestedChunkContent`) — page/panel chunks with nested `data-chunk` children replace the inner content with `<!-- nested: <name> -->` so the parent chunk is a compact skeleton recording structure + which sub-chunks fill which positions. xl-bucket chunks (>10K chars): 2 → 0.
- **Harvest-side hygiene** — strip `data-chunk` attribute from output HTML; strip docs-page wrappers; de-dup adjacent slug tokens; new Case 3 in `stripChunkWrappers` for `<div data-artifact-item data-chunk>` patterns.
- **Multi-variant CSS narrowing** — `dev-chunks.css` outline narrows to `[data-artifact-container]` so the visual marker matches the harvested scope.

### Added — Under-harvest audit script (2026-05-02)

New `scripts/build/under-harvest-audit.mjs` flags pages under `site/pages/{patterns,examples,components}/` that have ≥2 substantive layout elements (`<section>`/`<card-ui>`/`<grid-ui>`) but fewer than 1-per-5KB-body `data-chunk` markers. Drives a recurring 2-week remote agent (`trig_01UEDMT1cMqCpRLU6z8LBMo4`) that opens triage PRs for under-harvested pages.

### Fixed — A2UI registry gap closure + ADR-0015 pattern migration (2026-05-02)

- **Registry additions** in `@adia-ai/a2ui-utils`: `Field`, `Rating`, `ListItem`, `NavItem`, `NavGroup`. All 5 components existed; only the registry mapping was missing. Net effect on the corpus: 28/113 hand-authored patterns previously rendered with `[unknown: X]` placeholders when imported into `/site/playground/a2ui-editor`. After: 0/113 unknown.
- **`patterns/navigation/section-subnav.json`** migrated per [ADR-0015 § Nav consolidation](../../../.brain/adrs/0015-three-tier-naming-convention.md). `SectionNav` → `Nav variant=section`; `SectionNavItem` → `NavItem`. The pattern was referencing the retired 6-element nav family.
- **`patterns/layout/weather-widget.json`** — renamed `Metric` → `Stat` (no `<metric-ui>` exists; `Stat` is the canonical metric/value/change/trend primitive).
- Smoke side-effect: zettel score bumped 91 → 92; smoke validation flipped from `valid=false score=98/91` → `valid=true score=100/92`. The registry gaps were tripping validation upstream.

Per-finding triage in [`docs/reports/playground-examples-review-2026-05-02.md`](../../../docs/reports/playground-examples-review-2026-05-02.md).

## [0.2.0] - 2026-05-02

**Lockstep cut.** All 8 published `@adia-ai/*` packages now share one
version, governed by [`docs/specs/package-architecture.md` § 15
(Versioning Policy)](../../../docs/specs/package-architecture.md#15-versioning-policy).

This release also formalizes corpus's role as **the catalog's home** —
spec § 3 first-principle 3 was rewritten in v0.6.0 of the spec to
make this explicit. Primitives produce YAML/`.a2ui.json` sidecars;
the build assembles them into `catalog-a2ui_0_9.json` here.

### Changed

- `version`: `0.0.9` → `0.2.0`.

### No source changes (data)

Corpus content (catalog, patterns, fragments, compositions, exemplars,
chunks, embeddings, eval fixtures, gap registry, feedback) is
byte-identical to 0.0.9. The cut bumps version only — corpus has no
internal `@adia-ai/*` dependencies. The `a2ui-mcp@0.1.3 → corpus@0.0.6`
caret-lock bug from the prior cut is resolved by the mcp package's
`^0.2.0` range update in this same lockstep cut.

### Touched (no behavior change)

- `scripts/run-pipeline.mjs`, `scripts/chunk-library.js`,
  `scripts/feedback-promote.js`, `scripts/feedback-report.js` — import
  paths swept to match the compose `engines/` → `strategies/` rename
  and the retrieval subdir reorganization. Pure path-string updates;
  no logic changes.

## [0.0.9] - 2026-05-01

Pure-data refresh covering the §22-25 web-components arc. Catalog
regenerated against the post-rename + post-consolidation surface;
chunks re-harvested where source pages changed. Rolls forward the
[0.0.8] cut (avatar-ui canonicalization) — the 0.0.8 bump was
prepared but never tagged + published; its content is part of this
release.

### Changed

- **Catalog regenerated against `web-components@0.0.33` surface** — 95
  yamls now include the consolidated nav family (`<nav-ui>`,
  `<nav-group-ui>`, `<nav-item-ui>` with `[variant="primary"|"section"]`)
  and the renamed module elements (`<chat-shell>` was
  `<adia-chat-ui>`; `<editor-shell>` was `<adia-editor-ui>`;
  `<admin-shell>` was `<app-shell-ui>`; `<gen-root>` was
  `<gen-ui-ui>`; `<chat-thread-ui>` was `<chat-ui>`). Element renames
  per [ADR-0015](../../../.brain/adrs/0015-three-tier-naming-convention.md);
  nav consolidation per ADR-0015 § Nav consolidation. The 6-element
  nav family (`<app-nav-*>` + `<section-nav-*>`) collapsed into 3
  primitives. Synthesizer no longer emits the renamed-away tags.
- **`yaml name:` fields swept** per
  [ADR-0016](../../../.brain/adrs/0016-class-naming-convention.md) —
  primitives now `name: UI<X>` (was `Adia<X>`); modules now
  `name: <X>` without the `Adia` prefix. Consumers reading the
  catalog to cross-reference class names get the current convention.
- **`patterns/_components.json`** refreshed to match the new
  catalog surface (component IDs, allowed children, slot vocabularies).
- **Chunks re-harvested** for the chat / playground-app-shell /
  playground-chat / playground-construct-canvas / playground-gen-ui
  source pages — these surfaces touched the renamed shells +
  consolidated nav and now emit canonical post-rename markup.
- **`scripts/extract.js`** updated to recognize the renamed elements
  + `[variant]` cascade markers when classifying chunks.

### Rolled forward from [0.0.8] (never tagged)

- **`<avatar-ui name=…>` → `<avatar-ui text=…>`** sweep across 8
  source pattern pages (31 instances). `name` is the deprecated alias
  scheduled for removal; chunks now carry the canonical attribute.
  Chunk count + shape unchanged; embedding index unaffected (only
  chunk-root attrs are indexed; `<avatar-ui>` is always nested in
  body HTML).

## [0.0.8] - 2026-05-01

Pure-data refresh. Chunk re-harvest aligns the corpus with the
canonical attribute API for `<avatar-ui>` so the synthesizer doesn't
teach consumers to emit deprecated markup.

### Changed

- Chunks re-harvested after sweeping `<avatar-ui name=…>` →
  `<avatar-ui text=…>` across 8 source pattern pages (31 instances).
  `name` is the deprecated alias scheduled for removal; chunks now
  carry the canonical attribute. Pure data change — chunk count +
  shape unchanged (761 unique / 911 instances), embedding index
  unaffected (only chunk-root attrs are indexed; `<avatar-ui>` is
  always nested in body HTML).
- Catalog regenerated against `web-components@0.0.29` surface
  (`<feed-ui>` + `<feed-item-ui>` + `<swatch-ui>` family entries
  carried through, app-shell slot-vocabulary parity reflected).

## [0.0.7] - 2026-04-28

### Added

- **Two new `page`-kind chunks**: `reg-step-shell` (registration
  multi-step wizard wrapper) and `onb-step-shell` (onboarding tour
  wrapper). Both expose four named slots — `page-story`, `page-header`,
  `page-content`, `page-footer` — that the chunk synthesizer binds
  block-kind chunks into. Five existing reusable blocks per family
  (`*-story-pane`, `*-step-header`, `*-step-footer`, `*-step-progress`,
  per-step content block) recorded as the shells' `nested` chunks.

  Page-kind catalog is now 3 (was 1): `dashboard-admin-page`,
  `reg-step-shell`, `onb-step-shell`.

  Source pages: `site/pages/examples/registration/personal/index.html`
  + `site/pages/examples/onboarding/welcome/index.html` — one canonical
  instance each. The other 18 reg + 9 onb step pages share the same
  template; replicating shell tags would produce duplicate instances
  without changing the unique-name catalog.

  Unlock: `compose_from_chunks(intent)` can now synthesize multi-step
  wizard pages and onboarding-tour pages on top of the existing
  admin-dashboard shape — 3× expansion of the page-kind catalog.

## [0.0.6] - 2026-04-28

**Retires the legacy exemplar extract → ingest path.** The chunk corpus
+ chunk-aware synthesizer (shipped 0.0.3 → 0.0.4 → 0.0.5 today) is now
the single training surface; the parallel exemplar-derived auto-ingest
that was running on every MCP server boot is gone.

### Removed

- **Stale auto-generated artifacts** under `exemplars/<category>/<name>/`:
  - `a2ui.json` (full-page A2UI extract; 9 files)
  - `chunks/*.json` per-exemplar atomic chunks (~70 files)
  These were transient build outputs of the old extract.js pipeline. The
  source `index.html` + `<name>.yaml` files stay for human reference and
  potential future use as fragment authoring.

### Changed

- The `extract.js` + `ingest.js` scripts still ship in the tarball as
  legacy tools. They no longer run by default in `run-pipeline.mjs`;
  pass `--legacy-exemplars` to opt back in. See companion mcp 0.0.5
  release notes for the runtime impact.

### What stayed the same

- Hand-authored `patterns/` (155 entries), `fragments/` (zettel graph),
  `compositions/`, `pattern-embeddings.json`, `chunk-embeddings.json`,
  `chunks/_index.json` (701 unique / 851 instances), and the
  `chunk-library` API are all unchanged.
- The `exemplars/` source HTML + `<name>.yaml` partners stay in the
  tarball — useful for reference, but no longer feed the training
  pipeline by default.

## [0.0.5] - 2026-04-28

Corpus refresh — drops a non-chunk-shaped entry and regenerates both
embedding indices. Pure-data; no schema changes; no consumer-facing
API impact beyond a slight retrieval-quality bump.

### Removed

- **`genui-feed-message` chunk** — `<col-ui id="gen-feed">` on
  `gen-ui-feed/index.html` is sample-data scaffolding (the feed
  structure varies entirely per session), not a discrete trainable
  pattern. The `data-chunk` marker was dropped; the source page
  itself stays. Inventory entry struck through, kept as a strikethrough
  audit trail.

### Changed

- **`chunks/_index.json` re-harvested** — 702 → **701 unique** chunks;
  852 → **851 instances**; by-kind `block=843, panel=7, page=1`.
- **`chunk-embeddings.json` regenerated** — 701 × 1536d (was 702).
  Same provider / model / dims; just one fewer entry.
- **`pattern-embeddings.json` regenerated** — same 113 × 1536d count;
  fresh timestamp.

## [0.0.4] - 2026-04-28

Same-day follow-up to `0.0.3` shipped earlier today. Adds **semantic
search vectors** to the corpus and ships them in the tarball so consumers
get embedding-based retrieval out of the box (no post-install build step).
Pure-data addition; no schema changes.

### Added

- **`pattern-embeddings.json`** — refreshed against the current
  113-pattern set (was last built 2026-04-23 against 109 patterns).
  OpenAI text-embedding-3-small, 1536 dims, ~3.3 MB.
- **`chunk-embeddings.json`** — NEW. 702 chunks × 1536 dims, ~20 MB.
  Embeds each chunk's name + kind + primary tag + slot names + nested
  chunk names + indexed attributes + cluster prefix. HTML body is
  deliberately NOT embedded (would dominate retrieval noise; the LLM
  gets the HTML at retrieval time).

### Changed

- `package.json` `files` field now ships both embedding indices in the
  published tarball. Tarball size grows from ~3.5 MB to ~24 MB; the
  trade-off is that consumers can use semantic search out of the box
  without re-running embedding generation.
- Companion repo tooling (not in tarball but used to generate the
  corpus):
  - `scripts/build/embeddings.mjs` — broken `import` paths fixed (the
    script had been dead since some directory move; load-env.mjs +
    embedding-provider.js were both at wrong relative paths).
  - **`scripts/build/embeddings-chunks.mjs`** — new sibling script that
    walks `chunks/<name>.json` and generates `chunk-embeddings.json`.
    Auto-detects Voyage / OpenAI / null per the same conventions as the
    pattern script. Honors `--kind`, `--batch`, `--out`, `--dry-run`.
  - `npm run build:embeddings` / `build:embeddings:chunks` /
    `build:embeddings:all` pipeline scripts.

### Performance

- The chunk-aware composition synthesizer (`@adia-ai/a2ui-mcp@0.0.3`)
  uses these embeddings via `chunk-embedding-retriever.js` (cosine
  similarity, blended 5× with keyword score). Real-LLM eval improved
  from 7/10 → **9/10 retrieval hits** out of 10 hold-out intents — only
  novel composites still need synthesis fallback.

## [0.0.3] - 2026-04-28

Same-day extension after `0.0.2` shipped. Adds the **gen-UI training-chunk
corpus** — 702 unique chunks (852 instances) harvested from `data-chunk`-marked
elements across `site/pages/*` and the corpus exemplars. Pure-data addition;
existing pattern/fragment/composition surface unchanged.

### Added (gen-UI chunks)

- **`chunks/<name>.json`** × 702 — one record per chunk; carries
  `name`, `kind` (`block` | `panel` | `page`), `primary` (outer tag),
  `slots[]` (named regions for compositional reasoning), `nested[]`
  (child chunk names), `attrs` (indexed for retrieval), `html`
  (bounding HTML, descendants intact), `source` (original file path),
  `captured_at`. Multi-instance reusable slot chunks
  (e.g. `auth-card-header`, `reg-step-header`) carry an `instances`
  array — one entry per page where the chunk appears.
- **`chunks/_index.json`** — aggregate index (metadata only, no HTML)
  for fast lookup. Records total counts, by-kind tallies, per-chunk
  pages + slot names + nested-chunk references.
- **852 chunk instances** across ~150 distinct pages (70 template +
  82 component primitive + 16 pattern). Coverage:
  `block=844, panel=7, page=1`.

### Added (companion tooling — not in tarball)

- `scripts/build/harvest-chunks.mjs` (repo root) — walks site/pages
  + corpus exemplars; depth-tracked HTML parser; writes per-chunk
  records + aggregate index. Wired into
  `packages/a2ui/corpus/scripts/run-pipeline.mjs` Step 1.
- `packages/a2ui/corpus/scripts/chunk-library.js` — in-memory loader
  for the chunk corpus; powers the new MCP retrieval tools (consumed
  by `@adia-ai/a2ui-mcp@0.0.2`).
- `npm run harvest:chunks` / `harvest:chunks:dry` — pipeline scripts.

### Convention reference

- Spec: [`docs/specs/genui-chunk-marker.md`](../../../docs/specs/genui-chunk-marker.md)
  (Draft v0.1.0) — three attributes (`data-chunk`, `data-chunk-kind`,
  `data-chunk-slot`); naming conventions per cluster; visual marker
  rules; harvester contract.
- Inventory: [`docs/specs/genui-chunk-inventory-001.md`](../../../docs/specs/genui-chunk-inventory-001.md)
  — full list with intent labels + review status.

## [0.0.2] - 2026-04-27

Three-day batch since `0.0.1`. Catalog regenerated against the
Phase 6 web-components surface (status enum, button `[color]` axis,
canonical event names); four new dashboard / data patterns; nine
prose exemplars purged of inline styles; auth-login + cta exemplars
migrated to canonical field-ui wrapping; three superseded fragments
removed. Pure-data package — no executable code change.

### Added (patterns)

- **`patterns/data/chart-card-with-trend-footer.{json,yaml}`** —
  card-ui composition with chart in body and trend-stat footer
  (KPI delta + sparkline). Dashboard pattern.
- **`patterns/data/chart-grid-with-kpis.{json,yaml}`** — grid-ui
  layout pattern with KPI cards above and chart-ui beneath, the
  canonical "dashboard above the fold" shape.
- **`patterns/data/chart-with-filter-pills.{json,yaml}`** —
  chart-ui composed with row-ui of filter pills above (segmented-ui
  / tag-ui mix), the standard chart-with-toolbar shape.
- **`patterns/data/stat-with-sparkline.{json,yaml}`** — atomic
  KPI stat pattern with inline sparkline. Used as the building
  block for `chart-card-with-trend-footer`.

### Added (authoring infrastructure)

- **`exemplars/_shell.css`** — shared body-shell + decoration-class
  stylesheet linked from the corpus exemplar root. Codifies the
  "no inline styles in exemplars" rule documented in the project
  CLAUDE.md / AGENTS.md. New exemplars link this file from their
  `index.html` and rely on `col-ui` / `row-ui` / `grid-ui` for
  layout instead of `<style>` blocks or `style="…"` attributes.

### Changed (catalog)

- **`catalog-a2ui_0_9.json`** rebuilt against the v0.0.20 / v0.0.21
  web-components yaml surface. Diff includes:
  - `status` enum on `timeline-item-ui` / `stepper-item-ui` /
    `pipeline-status-ui` (replaces the prior multi-Boolean shape).
  - `[color]` enum on `button-ui` (`default | accent | info |
    success | warning | danger`), `variant` simplified to
    style-only.
  - Canonical event names — `submit` on `chat-ui` (was
    `chat-submit`), `toggle` on `chart-legend-ui` (was
    `legend-toggle`), `change` on `swiper-ui` (was `slide-change`).
  - `error` variant alias dropped from `toast-ui` / `alert-ui` /
    `tag-ui` enums.
  - `agent-trace-ui` `[collapsed]` (was `[open]`).
  - `field-ui` `error` prop removed from props list.
  - `table-toolbar-ui` opt-out attribute names — `noFilter` /
    `noSort` / `noColumns` / `noSearch`.
- **`patterns/_components.json:3020`** — `timeline-item-ui`
  children-snippet migrated `completed active` → `status="completed"`.
  The snippet feeds the LLM bridge; the legacy form would have
  caused gen-ui to suggest deprecated attributes when generating
  timelines.
- **`patterns/_index.json`** regenerated to reflect the four new
  data patterns and a few keyword refinements.

### Changed (exemplars)

- **9 prose exemplars** (`prose/auth-login`, `prose/cta`,
  `prose/feature-grid`, `prose/footer`, `prose/hero`,
  `prose/pricing`, `prose/steps`, `prose/testimonials`) and
  **`ui/auth-login`** purged of inline `<style>` blocks and
  `style="…"` attributes. Width constraints come from `setup.js`
  setting `--page-content-max-width` via
  `setProperty`; layout from `col-ui` / `row-ui` / `grid-ui`;
  asymmetric ratios from `[columns]` + `[span]`. Shadow + decoration
  surface lifted to `_shell.css`.
- **`exemplars/prose/auth-login/index.html` + `exemplars/ui/auth-login/index.html`** —
  `<check-ui label="…">` migrated to canonical
  `<field-ui inline label="…"><check-ui name="…"></field-ui>`
  wrapping. 5 call sites total (Remember me, Trust this device,
  Terms agreement). Each migrated checkbox now serializes with a
  stable form key (`name="remember"` / `name="trust_device"` /
  `name="terms"`).
- **`exemplars/prose/cta/`** — `acme-logo` icon (fictitious; not
  in `@phosphor-icons/core`) replaced with `hexagon` across 3
  files: `index.html:21`, `a2ui.json:102`,
  `chunks/prose-cta-card-1.json:65`. Cleared the
  `Icon "acme-logo" not found in registry` warning that fired on
  every render.

### Removed (fragments)

- **`fragments/content/chart-legend.json`** — superseded by the
  `<chart-legend-ui>` primitive that landed in the web-components
  package. Inline-rendering the legend as a fragment is no longer
  the canonical path.
- **`fragments/form/rating-row.{json,yaml}`** — superseded by
  the `<rating-ui>` primitive's first-class API (label + value
  + max + readonly all on the host element).

### Verification

- `node scripts/build/components.mjs --verify` — `clean — 96 files up-to-date`.
- Catalog hash matches the rebuild script's deterministic output.
- Pattern index reverse-lookup test: every `_index.json` ref
  resolves to an existing pattern file.

---

## [0.0.1] - 2026-04-24

First public release. Pure-data package: pattern corpus,
fragment + composition library, exemplars, and held-out eval
fixtures for the A2UI generation pipeline.

### Included

- **Assembled catalog** (`catalog-a2ui_0_9.json`) — generated by
  `scripts/build-components.mjs` from the per-component YAML
  sources in `@adia-ai/web-components`. Contains component schemas,
  registry, domain classifications, fragments, compositions.
- **Rules manifest** (`catalog-a2ui_0_9_rules.txt`) — human-readable
  rules file paired with the catalog.
- **Patterns** (`patterns/`) — ~217 patterns across 11 domains
  (layout, forms, data, agent, navigation, display, container,
  settings, etc.). Indexed via `patterns/_index.json`.
- **Fragments** (`fragments/`) — reusable A2UI atoms used by
  zettel-engine composition.
- **Compositions** (`compositions/`) — templates that reference
  fragments via `$fragment` refs.
- **Exemplars** (`exemplars/`) — few-shot training examples per
  domain. Consumed by the monolithic engine's prompt assembly.
- **Held-out eval fixtures** (`evals/held-out.jsonl`) — 100 intents
  reserved from training for regression evaluation.

### Corpus state at cut

See the "Corpus state" section below for pattern counts by domain,
fragment library size, and composition coverage.

---

## Corpus state (current)

| Surface | Count |
|---|---:|
| Patterns (total) | 215 |
| Pages (exemplars) | 9 |
| Chunks | 61 |
| Components registered | 89 |
| Fragments | varies; see `fragments/` |

Domain breakdown:
- layout: 114
- forms: 38
- data: 23
- agent: 20
- navigation: 11
- display, container: 3 each
- settings, data-display, input: 1 each

## [0.1.0] — internal baseline (pre-public, predates 0.0.1)

Initial version at the time the monorepo was established. Contains:

- **Patterns** (`patterns/`) — monolithic pattern library with schema.
- **Fragments** (`fragments/`) — atomic fragments for the zettel engine (content, layout, wiring, etc.).
- **Compositions** (`compositions/`) — hand-authored compositions that reference fragments.
- **Exemplars** (`exemplars/`) — hand-authored HTML pages harvested into chunks during extraction.
- **Held-out eval set** (`evals/held-out.jsonl`) — ~100 intents with golden matches for regression testing.
- **Feedback / gaps registry** (`feedback/`, `gaps/`) — runtime-written operational learning.
- **Taxonomy / synonym registry** — concept mapping for keyword-based retrieval.

Package name still uses the legacy `@adia-ai/a2ui-corpus` scope pending rename (see root CHANGELOG for context).
