@reqvire-org/ads 0.3.46 → 0.3.47

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 (110) hide show
  1. package/README.md +21 -11
  2. package/dist/a11y.mjs +4 -2
  3. package/dist/assets.mjs +20 -15
  4. package/dist/atomic-composition.mjs +3 -2
  5. package/dist/brand-assets.mjs +48 -11
  6. package/dist/brands.mjs +82 -0
  7. package/dist/browser-audit/worker.mjs +45 -0
  8. package/dist/browser-audit.mjs +117 -0
  9. package/dist/capture/worker.mjs +1 -0
  10. package/dist/capture-store.mjs +2 -0
  11. package/dist/capture.mjs +7 -4
  12. package/dist/check.mjs +38 -8
  13. package/dist/cli.mjs +45 -10
  14. package/dist/color-values.mjs +325 -0
  15. package/dist/config.mjs +16 -2
  16. package/dist/control-padding.mjs +93 -0
  17. package/dist/design-values.mjs +3 -2
  18. package/dist/finding-rules.mjs +61 -0
  19. package/dist/foundation.mjs +17 -4
  20. package/dist/icons.mjs +107 -0
  21. package/dist/init.mjs +3 -0
  22. package/dist/mcp/apps.mjs +9 -6
  23. package/dist/mcp/drafts.mjs +3 -0
  24. package/dist/mcp/mutations.mjs +17 -1
  25. package/dist/mcp/preview-widget.bundle.js +36 -36
  26. package/dist/mcp/project-widget.bundle.js +12 -12
  27. package/dist/mcp/server.mjs +21 -9
  28. package/dist/mcp/widget.bundle.js +17 -17
  29. package/dist/palette-generated.mjs +180 -0
  30. package/dist/preview-resources.mjs +12 -3
  31. package/dist/render-color-probe.mjs +148 -0
  32. package/dist/runtime-contracts.mjs +14 -4
  33. package/dist/scenarios.mjs +1 -1
  34. package/dist/showcase/client.bundle.js +28 -28
  35. package/dist/showcase/icons.js +146 -0
  36. package/dist/showcase/index.html +2 -1
  37. package/dist/showcase/style.css +19 -2
  38. package/dist/skills/README.md +2 -1
  39. package/dist/skills/ads-break-ui/SKILL.md +6 -5
  40. package/dist/skills/ads-break-ui/references/atomic-styles.md +12 -12
  41. package/dist/skills/ads-break-ui/references/contracts.md +13 -10
  42. package/dist/skills/ads-break-ui/references/design-data.md +137 -29
  43. package/dist/skills/ads-break-ui/references/validation.md +8 -4
  44. package/dist/skills/ads-designer/SKILL.md +23 -16
  45. package/dist/skills/ads-designer/references/accessibility.md +39 -5
  46. package/dist/skills/ads-designer/references/atomic-styles.md +12 -12
  47. package/dist/skills/ads-designer/references/branding.md +37 -10
  48. package/dist/skills/ads-designer/references/cli.md +8 -2
  49. package/dist/skills/ads-designer/references/contracts.md +13 -10
  50. package/dist/skills/ads-designer/references/design-data.md +137 -29
  51. package/dist/skills/ads-designer/references/validation.md +8 -4
  52. package/dist/skills/ads-import/SKILL.md +9 -8
  53. package/dist/skills/ads-import/references/atomic-styles.md +12 -12
  54. package/dist/skills/ads-import/references/cli.md +8 -2
  55. package/dist/skills/ads-import/references/contracts.md +13 -10
  56. package/dist/skills/ads-import/references/design-data.md +137 -29
  57. package/dist/skills/ads-import/references/tokens.md +7 -3
  58. package/dist/skills/ads-import/references/validation.md +8 -4
  59. package/dist/skills/ads-motion/SKILL.md +6 -5
  60. package/dist/skills/ads-motion/references/atomic-styles.md +12 -12
  61. package/dist/skills/ads-motion/references/contracts.md +13 -10
  62. package/dist/skills/ads-motion/references/design-data.md +137 -29
  63. package/dist/skills/ads-motion/references/validation.md +8 -4
  64. package/dist/skills/ads-port/SKILL.md +6 -5
  65. package/dist/skills/ads-port/references/atomic-styles.md +12 -12
  66. package/dist/skills/ads-port/references/cli.md +8 -2
  67. package/dist/skills/ads-port/references/contracts.md +13 -10
  68. package/dist/skills/ads-port/references/design-data.md +137 -29
  69. package/dist/skills/ads-port/references/validation.md +8 -4
  70. package/dist/starters/preact/design-system/review/token-preview/TokenPreview.tsx +11 -2
  71. package/dist/starters/react/ADS.md +43 -10
  72. package/dist/starters/react/README.md +14 -9
  73. package/dist/starters/react/design-system/assets/brand/README.md +8 -3
  74. package/dist/starters/react/design-system/assets/glyphs/README.md +4 -1
  75. package/dist/starters/react/design-system/components/Content/Icon/Icon.ads.fixture.ts +6 -1
  76. package/dist/starters/react/design-system/components/Content/Icon/Icon.ads.scenario.tsx +3 -2
  77. package/dist/starters/react/design-system/components/Content/Icon/README.md +2 -1
  78. package/dist/starters/react/design-system/components/Content/Logo/Logo.tsx +3 -9
  79. package/dist/starters/react/design-system/components/Content/Logo/README.md +4 -2
  80. package/dist/starters/react/design-system/controllers/Palette/Palette.ts +164 -0
  81. package/dist/starters/react/design-system/index.ts +3 -0
  82. package/dist/starters/react/design-system/review/brand-preview/BrandPreview.tsx +2 -5
  83. package/dist/starters/react/design-system/review/token-preview/TokenPreview.tsx +11 -2
  84. package/dist/starters/react/design-system/styles.css +1 -0
  85. package/dist/starters/react/design-system/tokens/base.css +8 -5
  86. package/dist/starters/react/design-system/tokens/colors.css +167 -175
  87. package/dist/starters/react/design-system/tokens/elevation.css +14 -21
  88. package/dist/starters/react/design-system/tokens/themes.generated.css +142 -0
  89. package/dist/starters/react/design-system/tokens/themes.generated.ts +402 -0
  90. package/dist/style-boundaries.mjs +2 -1
  91. package/dist/themes-generated.mjs +150 -0
  92. package/dist/themes-watch.mjs +42 -0
  93. package/dist/themes.mjs +214 -63
  94. package/dist/token-export.mjs +22 -11
  95. package/dist/token-policy.mjs +2 -1
  96. package/dist/token-quality.mjs +28 -25
  97. package/dist/tokens.mjs +27 -32
  98. package/dist/validation.mjs +18 -1
  99. package/dist/verification/browser.mjs +14 -3
  100. package/docs/ADS.md +41 -27
  101. package/docs/ARCHITECTURE.md +49 -22
  102. package/docs/CACHING.md +2 -3
  103. package/docs/CHANGELOG.md +97 -13
  104. package/docs/CONTRACTS.md +13 -10
  105. package/docs/GUIDE.md +89 -21
  106. package/docs/MCP.md +35 -25
  107. package/docs/benchmarks/bun-previews.md +5 -5
  108. package/docs/benchmarks/{gidi-preview-memory.md → preview-memory.md} +14 -12
  109. package/docs/benchmarks/turbo-poc.md +24 -6
  110. package/package.json +2 -1
package/docs/GUIDE.md CHANGED
@@ -639,12 +639,12 @@ component state variables.
639
639
 
640
640
  Keep original artwork (SVG masters, finished PNG/JPEG/WebP images, delivered
641
641
  `.ico`/`.icns` files, in any mix) and a usage/credits/license README in
642
- `design-system/assets/brand/`, and font files in `assets/fonts/`. `ads check` warns
642
+ `design-system/assets/brand/`, and font files in `assets/fonts/`. `ads check` fails
643
643
  when artwork is undescribed in that README (`brand-readme`), the README states no
644
644
  license (`brand-license`), artwork is missing from a Brand preview
645
- (`brand-preview`), or nothing uses it (`brand-unused`). Name a dark-theme variant
646
- `<name>.dark.svg`; the component showing it renders both and hides one with a
647
- `:root[data-theme="dark"] &` selector. Brand previews are the showcase's first
645
+ (`brand-preview`), and lists artwork nothing uses for review (`brand-unused`). Name a dark-theme variant
646
+ `<name>.dark.svg`; the component showing it renders both and shows each with a display switch
647
+ (`display: var(--display-dark, block)`). Brand previews are the showcase's first
648
648
  section, **Brand**: scenarios in `brand/`, grouped by folder like components (the
649
649
  starter's `brand/Identity/Logo` and `brand/Icons/AppIcon` with the review
650
650
  `BrandPreview`). They show artwork in the current theme and the app icon at its
@@ -652,7 +652,8 @@ sizes, and have no token samples. A finished image renders only at or below its
652
652
  pixel size; ADS never enlarges it. The [branding guide](../skills/ads-designer/references/branding.md)
653
653
  (`ads://guides/branding`) covers the whole flow. Font declarations
654
654
  belong in optional `tokens/fonts.css`, imported first. The foundation entry is
655
- import-only: fonts (when present), colors, typography, spacing, elevation, base.
655
+ import-only: fonts (when present), colors, typography, spacing, elevation, base,
656
+ themes.generated.css.
656
657
  Fixed artwork colors and geometry are permitted inside SVG assets; they do not
657
658
  permit raw visual values in component or pattern styles.
658
659
 
@@ -719,6 +720,10 @@ nothing. Commit outputs and the manifest together.
719
720
  "attributes": { "fill": "none", "stroke": "currentColor" } }`. Each SVG becomes
720
721
  `glyphs[name]` with missing root attributes added; `aliases.json` beside them
721
722
  becomes `glyphAliases`. `ads assets` writes it and `ads check` fails when it is stale.
723
+ Other products' logos are not brand artwork or glyphs: keep them, in their own
724
+ colors and under their owners' trademark and usage terms, in `assets/logos/` and
725
+ show them as images (a CSS mask over `currentColor` for a muted use); ADS generates
726
+ and checks nothing there.
722
727
 
723
728
  ### Tokens, grid, icons and accessibility
724
729
 
@@ -727,23 +732,86 @@ sizing, Shape & elevation, Motion, Layout) whose roles meet WCAG 2.2 AA in both
727
732
  a container-query `Grid` on the grid tokens, and an icon set with `Icon` and
728
733
  `IconButton`. Keep the token names and change values to brand a project.
729
734
 
730
- `ads check` reviews, as warnings with locations: contrast per theme (`token-contrast`),
731
- the 2 px spacing rhythm (`token-rhythm`), duplicates within a token family
732
- (`token-overlap-review`), accessibility from tokens and source (`a11y-target-size`,
733
- `a11y-focus`, `a11y-text-resize`, `a11y-reduced-motion`, `a11y-text-spacing`,
734
- `a11y-image-alt`, `a11y-keyboard`, `a11y-icon-label`) and glyph sets (`glyph-viewbox`,
735
- `glyph-color`). The showcase's grid button overlays the project's grid on every preview.
735
+ `ads check` reports two kinds of finding. **Errors** fail `ads check`, validation and
736
+ acceptance: contrast per theme and brand (`token-contrast`), the 2 px spacing rhythm
737
+ (`token-rhythm`), accessibility from tokens and source (`a11y-target-size`, `a11y-focus`,
738
+ `a11y-text-resize`, `a11y-reduced-motion`, `a11y-text-spacing`, `a11y-image-alt`,
739
+ `a11y-icon-label`), glyph sets (`glyph-viewbox`, `glyph-color`), control padding
740
+ (`control-padding`: a control sized with `--control-height-<size>` pads its sides with
741
+ `--control-padding-<size>`, or `--control-inset` inside a track), and the theme, brand and
742
+ brand-artwork rules below. **Review items** never block; each names something only a person
743
+ can judge: `atomic-composition-review`, `token-overlap-review`, `pointer-capture-review`,
744
+ `scenario-exercise-review`, `a11y-keyboard`, `brand-unused` and `render-color-probe`.
745
+ **Info** items (`atomic-composition-limit`) note an analysis limit. There is no setting that
746
+ changes a finding's kind. The showcase's grid button overlays the project's grid on every
747
+ preview, and its **Icons** tab shows the glyph set: every glyph at the size used beside
748
+ text, each one on its grid at every `--icon-*` size with its aliases and glyph errors, and
749
+ the logos in `assets/logos/` in color and muted.
750
+
751
+ `ads audit` adds a rendered check: axe-core (WCAG A/AA rules) in every component, pattern
752
+ and composition scenario, once per declared brand and theme (`--scenario`, `--theme` and
753
+ `--brand` narrow it). Each violation is an `a11y-axe` error naming the axe rule, WCAG
754
+ criterion, themes and brands, failing elements and help link, and `ads audit` exits 1. It
755
+ needs the project's Playwright and browser, as captures do; `browserAudit: true` in a
756
+ validation or acceptance policy runs it there too.
736
757
  `ads tokens --format dtcg` exports the tokens as W3C Design Tokens JSON for design tools
737
- (`--theme <name>` for one theme's values).
738
-
739
- `themes` in `ds.config.json` declares the project's themes: a name and the color scheme
740
- browsers use for native controls; the first is the default. A theme keeps every token name
741
- and changes values under `[data-theme="<name>"]`, on `<html>` for the page or on any element
742
- for one section. The showcase's theme button steps through the declared themes, and
743
- captures, contrast reviews and the token export take a theme name. `ads check` fails on an
744
- undeclared theme name (`theme-undeclared`) and warns about a token that exists only in a
745
- theme (`theme-new-token`), a partly overridden color ramp (`theme-coverage`) and a declared
746
- theme without values (`theme-empty`).
758
+ (`--theme <name>` and `--brand <name>` select one context).
759
+
760
+ `themes` in `ds.config.json` declares the themes (a name and the color scheme for native
761
+ controls; the first is the default), and the optional `brands` the brands (the first is the
762
+ default). `data-theme="<name>"` and `data-brand="<name>"` on `<html>` theme the page, on any
763
+ element one section; each element follows its nearest theme and its nearest brand, at any
764
+ nesting depth, in every browser with CSS variables.
765
+
766
+ Write a token that differs per theme as one plain value per theme, named with the theme as
767
+ suffix, on `:root`:
768
+
769
+ ```css
770
+ :root {
771
+ --color-accent-9-light: oklch(55% .2 280);
772
+ --color-accent-9-dark: oklch(70% .16 280);
773
+ --bg-canvas-light: var(--slate-1-light); /* a half refers to halves */
774
+ --bg-canvas-dark: var(--slate-2-dark);
775
+ --accent: var(--color-accent-9); /* single values stay single */
776
+ }
777
+ [data-brand="acme"] { /* a brand sets its own halves */
778
+ --color-accent-9-light: oklch(55% .2 25);
779
+ --color-accent-9-dark: oklch(70% .16 25);
780
+ }
781
+ ```
782
+
783
+ ADS generates `tokens/themes.generated.css` from these halves and the declared themes and
784
+ brands: theme switches and one resolver per themed token. It is the last foundation import;
785
+ commit it and never edit it. `ads assets`, the showcase and the MCP server write it, the
786
+ showcase and MCP server again whenever tokens or `ds.config.json` change; `ads check` fails
787
+ when it is missing or out of date (`themes-generated`).
788
+
789
+ The generated file also defines display switches: `--display-<theme>` and, with brands,
790
+ `--display-brand-<brand>`, each `none` outside its nearest theme or brand. Show
791
+ theme- or brand-specific content with `display: var(--display-dark, block)`.
792
+ `"followSystemTheme": true` makes a page without `data-theme` take the first declared theme
793
+ whose scheme matches the OS `prefers-color-scheme`; an explicit `data-theme` wins.
794
+
795
+ Beside it ADS generates `tokens/themes.generated.ts`, written, checked and kept current
796
+ together with the CSS: every color token resolved for every theme and brand as `{ css, rgba }`
797
+ for Canvas, WebGL and SVG renderers. The starter's `controllers/Palette` reads it:
798
+ `paletteFor(element)` (the nearest theme and brand's palette), `observePalette(element,
799
+ callback)` (once per theme or brand change) and `resolveColor(element, value)` (a non-token
800
+ color, cached, without inserting elements). `render-color-probe` (review) flags color reads
801
+ from the page inside per-item render callbacks. The same module exports `themed({ light,
802
+ dark, … })` and `themedByScheme({ light, dark })` for per-theme values that come from data at
803
+ runtime; `light-dark()` is an error in token sheets, component CSS and component string
804
+ literals (`theme-light-dark`).
805
+
806
+ Errors: a token value set under `[data-theme]`, `prefers-color-scheme` or a combined brand
807
+ selector (`theme-old-form`); a component or pattern styled by a `[data-theme]` or
808
+ `[data-brand]` ancestor selector (`theme-selector`); a themed token without a half for every theme
809
+ (`theme-coverage`); a token set both as one value and as halves (`theme-half-conflict`); a
810
+ half that refers to a theme-following token instead of its half (`theme-half-reference`); a
811
+ lone half (`theme-new-token`); themes without any halves (`theme-empty`); an undeclared
812
+ brand name (`brand-undeclared`); a brand that gives a theme-following token one value
813
+ (`brand-theme-value`) or only some of its halves or ramp steps (`brand-coverage`); a token
814
+ only a brand defines (`brand-new-token`); a declared brand without values (`brand-empty`).
747
815
  See the [token guide](../skills/ads-designer/references/design-data.md) and the
748
816
  [accessibility guide](../skills/ads-designer/references/accessibility.md).
749
817
 
package/docs/MCP.md CHANGED
@@ -183,11 +183,14 @@ client assets and MCP, with no arbitrary file reader or command launcher.
183
183
  Shutdown closes both transports, subscriptions and the managed compiler.
184
184
 
185
185
  The shell is minimal: header, section tabs, collapsible left menu, a theme button that
186
- steps through the project's declared themes (`ads_status.themes`),
187
- status/diagnostics when needed, and the App slot. Its MCP client does discovery,
186
+ steps through the project's declared themes (`ads_status.themes`), a brand selector beside
187
+ it when the project declares brands (`ads_status.brands`),
188
+ status/diagnostics when needed, and the App slot. The Icons tab (shown when the project has
189
+ a glyph set) renders `ads://project/icons` natively: the glyph set, each glyph on its grid
190
+ at every icon size with aliases and glyph errors, and the logos in `assets/logos/`. Its MCP client does discovery,
188
191
  tool calls, resource forwarding and notification handling. Token categories come
189
- from `ads_tokens.categories` (discovered token scenarios); all four sections also
190
- come from the same `ads_scenarios` registry.
192
+ from `ads_tokens.categories` (discovered token scenarios); every scenario section also
193
+ comes from the same `ads_scenarios` registry.
191
194
  It invokes the selected App tool and uses the official Apps bridge to render its
192
195
  HTML in an opaque sandbox. Project UI is never imported into the shell.
193
196
 
@@ -380,27 +383,31 @@ public exports from `components/`, `patterns/` and `controllers/`; it does not e
380
383
  guess component props. Read the exported API and owning guide. An export name
381
384
  alone does not prove that a preview renders that particular element.
382
385
 
383
- `ads://project/status`, `/build`, `/tokens`, `/catalog`, `/scenarios` and `/checks`
384
- carry project JSON detail. Behavior discovery, execution outcomes and investigation
386
+ `ads://project/status`, `/build`, `/tokens`, `/icons`, `/catalog`, `/scenarios` and
387
+ `/checks` carry project JSON detail. Behavior discovery, execution outcomes and investigation
385
388
  details are paged; their resource reads use the same bounds as their tools. Allowed project documentation/source and skill files are separate
386
389
  resources. No arbitrary filesystem reader is exposed. Prefer bounded tools for
387
390
  large catalogues; explicit resource reads can enter model context and a client
388
391
  may truncate large payloads.
389
392
 
390
- `ads_check` and `ads://project/checks` return nonblocking atomic composition
391
- warnings under `advisories` with `severity: "warning"`, related source declarations
392
- and `guidanceUri: "ads://guides/atomic-styles"`. Read that guide for causes and
393
- component-level fixes. The full guide lives in every ADS skill as
393
+ `ads_check` and `ads://project/checks` return errors under `diagnostics` (they fail the
394
+ check) and review items under `advisories` with `severity: "review"` (they never block),
395
+ then informational limits with `severity: "info"`; `summary` counts errors and review
396
+ items. Every finding id has one class (error, review or info), and no configuration changes
397
+ it.
398
+
399
+ Atomic composition review items (`atomic-composition-review`) carry related source
400
+ declarations and `guidanceUri: "ads://guides/atomic-styles"`. Read that guide for causes
401
+ and component-level fixes. The full guide lives in every ADS skill as
394
402
  `references/atomic-styles.md` for standalone clients; MCP serves the packaged
395
403
  [skill-local reference](../skills/ads-designer/references/atomic-styles.md).
396
- Guarded mutation results preserve these warnings without rejecting valid source.
397
- An overlap warning is a review signal; failed registered rendered checks remain
398
- blocking.
399
- Warnings can carry a `composition` source path, a statically reached DOM `target`
404
+ Guarded mutation results preserve review items without rejecting valid source; failed
405
+ registered rendered checks remain blocking.
406
+ Review items can carry a `composition` source path, a statically reached DOM `target`
400
407
  and `writingModeDependent`. Unresolved paths appear as bounded
401
408
  `atomic-composition-limit` advisories with `severity: "info"`; neither an
402
409
  informational limit nor a traced target proves a rendered failure or success.
403
- Bounded check results put warnings before informational limits; the checks
410
+ Bounded check results put review items before informational limits; the checks
404
411
  resource retains complete results.
405
412
 
406
413
  `property-registration` is a blocking architecture diagnostic for invalid or
@@ -413,18 +420,20 @@ ownership, valid initial values, browser checks and examples.
413
420
 
414
421
  ### Screenshots and candidate comparison
415
422
 
416
- `ads_capture({scenario:"<discovered ID>",target?,theme?,viewport?})` renders current
423
+ `ads_capture({scenario:"<discovered ID>",target?,theme?,brand?,viewport?})` renders current
417
424
  source in the real sandboxed App using project-local Playwright/browser. `theme` is a declared
418
425
  theme name (default: the first). Previews receive the theme in host context: `theme` carries
419
426
  the MCP Apps light/dark scheme and `adsTheme` the project theme name; hosts that send only
420
- `theme` get the first declared theme with that scheme. It returns
427
+ `theme` get the first declared theme with that scheme. `brand` is a declared brand name
428
+ (default: the first) for projects that declare brands; previews receive it as `adsBrand` and
429
+ set `data-brand` on the document. It returns
421
430
  PNG resource URIs and revision/settings metadata. The default is the full widget
422
431
  viewport; optional `captureTargets` metadata names an element within the scenario.
423
432
  Token/component/pattern/composition scenarios share this path. The tool adds no
424
433
  project-specific renderer or fixture assumptions.
425
434
 
426
435
  Patch and transaction dry runs accept `screenshot:true` plus an explicit 1–8-entry
427
- `captures:[{scenario,target?,theme?,viewport?}]` selection. Existing gates run first;
436
+ `captures:[{scenario,target?,theme?,brand?,viewport?}]` selection. Existing gates run first;
428
437
  current and candidate use matching capture settings. Source/conflict checks remain
429
438
  mandatory. No screenshots are created by ordinary patches/dry runs. A newly added
430
439
  scenario has a candidate with an explicit absent current baseline.
@@ -1338,12 +1347,12 @@ live source, loosen policy or add a second contract-editing protocol. See
1338
1347
  [CONTRACTS.md](CONTRACTS.md) for the static schema, compatibility and browser audits.
1339
1348
  The same guide is available at `ads://guides/contracts`.
1340
1349
 
1341
- A registered binding producer may combine two accessible color references as
1342
- `light-dark(var(--light-token), var(--dark-token))`. The App paint audit checks
1343
- both branches and their observed effect in the active color scheme. Raw colors,
1344
- undefined tokens and SVG URLs inside this color function remain invalid.
1350
+ A registered binding producer gives a per-theme value with `themed()` or
1351
+ `themedByScheme()`; its output is `var(--ads-if-<theme>, <reference>)` once per declared
1352
+ theme, in declared order. The App paint audit checks every branch and its observed effect
1353
+ in the active theme. Raw colors, undefined tokens and SVG URLs in a branch remain invalid.
1345
1354
  This derived binding form does not widen public paint-input types; use constrained
1346
- references for each theme input and verify both color schemes in browser checks.
1355
+ references for each theme input and verify every theme in browser checks.
1347
1356
 
1348
1357
  Binding `valueFrom` accepts one path or an explicit array of registered entry
1349
1358
  paths for alternative/theme paints. Parts can have multiple distinct parents and
@@ -1409,8 +1418,9 @@ scenario's failure. A retained earlier view is not current-source evidence.
1409
1418
  `ads_validate({policy:"acceptance"})` matches `ads validate --policy acceptance`:
1410
1419
  it checks the acceptance policy against current source without applying anything.
1411
1420
  Validation and acceptance keep separate baselines; acceptance cannot establish
1412
- full validation. Each policy chooses `checks` and `behaviorChecks`; skipped tests
1413
- are reported as skipped, without a passing label. Draft preview/edit triggers
1421
+ full validation. Each policy chooses `checks`, `behaviorChecks` and `browserAudit` (the
1422
+ axe-core audit of every UI scenario in every brand and theme; its `a11y-axe` findings are
1423
+ errors); skipped tests are reported as skipped, without a passing label. Draft preview/edit triggers
1414
1424
  neither policy. Explicit `ads_verify` remains independent of gating choices. The MCP tool
1415
1425
  runs trusted configured project commands with cancellation and bounded output; it
1416
1426
  is available with source mutations disabled and writes only build/evidence output
@@ -1,8 +1,8 @@
1
1
  # Native Bun previews: compilation, resources and restart reuse
2
2
 
3
- Local measurements on 23 October 2026, using the same frozen 865-file Gidi
3
+ Local measurements on 23 October 2026, using the same frozen 865-file application
4
4
  snapshot (4,389,282 authored bytes, 151 scenarios) as the earlier memory work.
5
- The live Gidi checkout and its installed ADS package were not patched. Real
5
+ The live application checkout and its installed ADS package were not patched. Real
6
6
  MCP Apps ran in headless Chrome. These are local observations, not service limits.
7
7
 
8
8
  ## Startup and warming
@@ -73,16 +73,16 @@ changing its JavaScript bytes; the visible styles update and form state remains.
73
73
  ## Reproduction
74
74
 
75
75
  Use a frozen source snapshot and idle consumers; do not benchmark by editing a
76
- live developer's files. `scripts/benchmarks/gidi-preview-memory/prepare.mjs`
76
+ live developer's files. `scripts/benchmarks/preview-memory/prepare.mjs`
77
77
  creates isolated inputs. Set `ADS_BENCH_NATIVE=1` for the native compiler and
78
78
  `ADS_BENCH_OUTPUT` for the owned output directory. The monitor samples all child
79
79
  processes' PSS/RSS from `/proc`; run it in a bounded memory scope:
80
80
 
81
81
  ```sh
82
82
  ADS_BENCH_NATIVE=1 ADS_BENCH_OUTPUT=output/bun-proof \
83
- node scripts/benchmarks/gidi-preview-memory/prepare.mjs /path/to/gidi candidate 1
83
+ node scripts/benchmarks/preview-memory/prepare.mjs /path/to/project candidate 1
84
84
  ADS_BENCH_WARM=1 ADS_BENCH_BROWSER=1 ADS_BENCH_DRIVER=./preview.mjs \
85
- bun scripts/benchmarks/gidi-preview-memory/monitor.mjs output/bun-proof/candidate-1
85
+ bun scripts/benchmarks/preview-memory/monitor.mjs output/bun-proof/candidate-1
86
86
  ```
87
87
 
88
88
  `tests/bun-preview.test.mjs` verifies React/Preact rendering, workers/assets,
@@ -1,11 +1,11 @@
1
- # Gidi draft acceptance: memory and compiler reuse
1
+ # Draft acceptance: memory and compiler reuse
2
2
 
3
3
  Historical ADS 0.3.35 measurement. The compiler parking and project Vite adapter
4
4
  described here have been superseded by independent interactive compilation and
5
5
  ADS-owned Bun previews; see [native preview measurements](bun-previews.md).
6
6
 
7
- Measured on 23 October 2026 using a frozen Gidi source snapshot and real MCP
8
- Apps in headless Chrome. The installed Gidi package and working source were not
7
+ Measured on 23 October 2026 using a frozen source snapshot of a production application and real MCP
8
+ Apps in headless Chrome. the installed application package and working source were not
9
9
  patched. The baseline distribution matched published ADS 0.3.34 byte for byte.
10
10
 
11
11
  | Measurement | ADS 0.3.34 | Changed implementation |
@@ -43,7 +43,7 @@ production preview build itself and shares its host/graph with verification.
43
43
  The adapter's validation callback still runs. No configured check was bypassed.
44
44
 
45
45
  Node v24.13.0 and Bun 1.3.13 were used. Both comparison runs had an 8 GiB systemd
46
- scope limit, no additional swap, one Playwright worker in each Gidi runner, and
46
+ scope limit, no additional swap, one Playwright worker in each application runner, and
47
47
  `NODE_OPTIONS=--max-old-space-size=1536`. Bun's `--smol` flag was not used. PSS and
48
48
  RSS were sampled from `/proc` every approximately 200 ms across the MCP process,
49
49
  compiler, validators, browser and descendants. Idle values are medians over the
@@ -73,13 +73,13 @@ output cannot satisfy a production-build check. Candidate source, outputs and
73
73
  reviewed draft revisions retain their existing publication fences.
74
74
 
75
75
  The initial lifecycle change roughly halved memory but made accepted-preview
76
- reopening slower. A real Gidi probe explained the remaining rebuild: its full
76
+ reopening slower. A real application probe explained the remaining rebuild: its full
77
77
  cache was 10,003,007 bytes, above the reader's 8,388,608-byte limit. It repeated
78
78
  the same 520 dependency hashes separately for 151 scenarios. Small fixtures
79
79
  had not exposed this size boundary.
80
80
 
81
81
  The cache now stores shared dependency sets once and checks shared hashes once
82
- per operation. Gidi's complete cache is 252,861 bytes, with 151 entries and one
82
+ per operation. The application's complete cache is 252,861 bytes, with 151 entries and one
83
83
  dependency set. Metadata transfers with matching accepted source so parked
84
84
  compiler restarts can reuse it. Compiler fingerprints use the same declared
85
85
  configuration and opaque-input boundary as guarded copies, with canonical
@@ -94,17 +94,19 @@ removed.
94
94
 
95
95
  ## Reproduction
96
96
 
97
- Use Linux, Node, Bun, Chrome and a Gidi checkout with its dependencies installed.
97
+ Use Linux, Node, Bun, Chrome and an ADS project checkout with its dependencies installed.
98
+ To move the app's own Playwright server off its usual port, set `ADS_BENCH_APP_CONFIG` (its
99
+ config file, relative to the project) and `ADS_BENCH_APP_PORT` (the port to replace).
98
100
  Build ADS first. Preparing a series freezes source and the installed baseline
99
101
  distribution under `output/memory-benchmark`; use a fresh `ADS_BENCH_OUTPUT`
100
102
  directory for a new source/dependency baseline. Preparation changes only the
101
- generated copies. It gives the application tests port 43087 and adjusts the
103
+ generated copies. It moves the application tests' port when asked (above) and adjusts the
102
104
  candidate's mutation-check list for managed production compilation.
103
105
 
104
106
  ```sh
105
107
  node scripts/build-ads-tool.mjs
106
- node scripts/benchmarks/gidi-preview-memory/prepare.mjs /path/to/gidi baseline 1
107
- node scripts/benchmarks/gidi-preview-memory/prepare.mjs /path/to/gidi candidate 1
108
+ node scripts/benchmarks/preview-memory/prepare.mjs /path/to/project baseline 1
109
+ node scripts/benchmarks/preview-memory/prepare.mjs /path/to/project candidate 1
108
110
  ```
109
111
 
110
112
  Run the following separately for `baseline-1` and `candidate-1`, with Node and
@@ -113,12 +115,12 @@ Bun on PATH. Do not run the two workloads simultaneously.
113
115
  ```sh
114
116
  systemd-run --user --scope -p MemoryMax=8G -p MemorySwapMax=0 \
115
117
  timeout --kill-after=5s 900s env NODE_OPTIONS=--max-old-space-size=1536 \
116
- node scripts/benchmarks/gidi-preview-memory/monitor.mjs \
118
+ node scripts/benchmarks/preview-memory/monitor.mjs \
117
119
  output/memory-benchmark/baseline-1
118
120
  ```
119
121
 
120
122
  ```sh
121
- node scripts/benchmarks/gidi-preview-memory/report.mjs \
123
+ node scripts/benchmarks/preview-memory/report.mjs \
122
124
  output/memory-benchmark/baseline-1-metrics.json \
123
125
  output/memory-benchmark/candidate-1-metrics.json
124
126
  ```
@@ -6,7 +6,7 @@ production ADS, project dependencies, policies, MCP locks and CI were not change
6
6
 
7
7
  ## Workload and controls
8
8
 
9
- The input is a frozen Neezler snapshot: 885 inventoried validation files,
9
+ The input is a frozen snapshot of a production application: 885 inventoried validation files,
10
10
  5,622,703 bytes, plus copied workspace/generated inputs. Inventoried source digest:
11
11
  `4666c8a12353d4f60e1cd7828f8ce44a414b802b5dfdde9c18394429346ad9d6`.
12
12
  Local workspace imports resolve to the snapshot, not the live terminal-renderer
@@ -114,8 +114,26 @@ require ADS dependency selection, isolated outputs and shared in-flight work.
114
114
  ## Reproduction and artifacts
115
115
 
116
116
  From the ADS checkout, use a fresh output directory and the same frozen-source
117
- input to reproduce exactly. The default input is `../csc`; another project needs
118
- its edit targets adjusted because this small POC targets Neezler's Badge/tokens.
117
+ input to reproduce exactly. Describe the project in a `poc.json` (paths relative to it):
118
+
119
+ ```json
120
+ {
121
+ "project": "../my-app",
122
+ "include": ["client/.generated"],
123
+ "ownScopes": ["@my-app"],
124
+ "edits": {
125
+ "component": { "file": "design/components/Content/Badge/Badge.tsx",
126
+ "from": "tone = \"neutral\"", "to": "tone = \"accent\"" },
127
+ "token": { "file": "design/tokens/colors.css",
128
+ "from": "--color-accent-9-light: #5b5bf7;", "to": "--color-accent-9-light: #123456;" }
129
+ }
130
+ }
131
+ ```
132
+
133
+ `include` lists generated folders outside the validation inputs that the build needs,
134
+ `ownScopes` the project's own `node_modules` scopes (its workspace packages are linked from
135
+ the snapshot instead), and `edits` one component and one token change, each a text
136
+ replacement the run applies to measure invalidation.
119
137
  The runner installs pinned Turbo only inside its output directory. A new snapshot
120
138
  of an actively edited checkout can differ; preparation rejects detected races.
121
139
 
@@ -123,10 +141,10 @@ of an actively edited checkout can differ; preparation rejects detected races.
123
141
  export ADS_TURBO_POC_OUTPUT=output/turbo-poc-new
124
142
  systemd-run --user --scope -p MemoryMax=6G -p MemorySwapMax=0 \
125
143
  env ADS_TURBO_POC_OUTPUT="$ADS_TURBO_POC_OUTPUT" \
126
- node scripts/benchmarks/turbo-poc/run.mjs /path/to/neezler
144
+ node scripts/benchmarks/turbo-poc/run.mjs poc.json
127
145
  systemd-run --user --scope -p MemoryMax=6G -p MemorySwapMax=0 \
128
146
  env ADS_TURBO_POC_OUTPUT="$ADS_TURBO_POC_OUTPUT" \
129
- node scripts/benchmarks/turbo-poc/run.mjs /path/to/neezler --extras
147
+ node scripts/benchmarks/turbo-poc/run.mjs poc.json --extras
130
148
  ```
131
149
 
132
150
  Bun and Node must be on PATH. The second command adds the equivalent cold serial
@@ -226,7 +244,7 @@ systemd-run --user --scope -p MemoryMax=6G -p MemorySwapMax=0 \
226
244
 
227
245
  The proof driver intentionally refuses existing snapshot directories. It uses the
228
246
  installed third-party dependencies and frozen workspace sources from the initial
229
- Neezler POC; it never edits the live application. Failed attempts remain available
247
+ POC snapshot (`ADS_TURBO_POC_OUTPUT`); it never edits the live application. Failed attempts remain available
230
248
  under earlier output directories instead of being overwritten.
231
249
 
232
250
  ### Final implementation proof
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reqvire-org/ads",
3
- "version": "0.3.46",
3
+ "version": "0.3.47",
4
4
  "type": "module",
5
5
  "description": "A design system your agent can see and shape. Your components. Your look. Your code.",
6
6
  "repository": {
@@ -53,6 +53,7 @@
53
53
  "dependencies": {
54
54
  "@modelcontextprotocol/server": "2.3.1",
55
55
  "@wyw-in-js/transform": "2.1.3",
56
+ "axe-core": "4.14.0",
56
57
  "css-tree": "3.2.1",
57
58
  "postcss": "^8.5.30",
58
59
  "postcss-selector-parser": "^7.1.6",