@reqvire-org/ads 0.3.46 → 0.3.48

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 (122) 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 +51 -0
  8. package/dist/browser-audit.mjs +147 -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/context.mjs +1 -1
  24. package/dist/mcp/drafts.mjs +3 -0
  25. package/dist/mcp/mutations.mjs +40 -1
  26. package/dist/mcp/preview-widget.bundle.js +36 -36
  27. package/dist/mcp/project-widget.bundle.js +12 -12
  28. package/dist/mcp/server.mjs +23 -11
  29. package/dist/mcp/widget.bundle.js +17 -17
  30. package/dist/palette-generated.mjs +180 -0
  31. package/dist/preview-resources.mjs +12 -3
  32. package/dist/render-color-probe.mjs +148 -0
  33. package/dist/runtime-contracts.mjs +14 -4
  34. package/dist/scenarios.mjs +1 -1
  35. package/dist/showcase/client.bundle.js +28 -28
  36. package/dist/showcase/icons.js +146 -0
  37. package/dist/showcase/index.html +2 -1
  38. package/dist/showcase/style.css +19 -2
  39. package/dist/skills/README.md +2 -1
  40. package/dist/skills/ads-break-ui/SKILL.md +6 -5
  41. package/dist/skills/ads-break-ui/references/atomic-styles.md +12 -12
  42. package/dist/skills/ads-break-ui/references/contracts.md +13 -10
  43. package/dist/skills/ads-break-ui/references/design-data.md +137 -29
  44. package/dist/skills/ads-break-ui/references/drafts.md +3 -1
  45. package/dist/skills/ads-break-ui/references/guarded-editing.md +3 -2
  46. package/dist/skills/ads-break-ui/references/validation.md +13 -4
  47. package/dist/skills/ads-designer/SKILL.md +23 -16
  48. package/dist/skills/ads-designer/references/accessibility.md +41 -5
  49. package/dist/skills/ads-designer/references/atomic-styles.md +12 -12
  50. package/dist/skills/ads-designer/references/branding.md +37 -10
  51. package/dist/skills/ads-designer/references/cli.md +8 -2
  52. package/dist/skills/ads-designer/references/contracts.md +13 -10
  53. package/dist/skills/ads-designer/references/design-data.md +137 -29
  54. package/dist/skills/ads-designer/references/drafts.md +3 -1
  55. package/dist/skills/ads-designer/references/guarded-editing.md +3 -2
  56. package/dist/skills/ads-designer/references/validation.md +13 -4
  57. package/dist/skills/ads-import/SKILL.md +9 -8
  58. package/dist/skills/ads-import/references/atomic-styles.md +12 -12
  59. package/dist/skills/ads-import/references/cli.md +8 -2
  60. package/dist/skills/ads-import/references/contracts.md +13 -10
  61. package/dist/skills/ads-import/references/design-data.md +137 -29
  62. package/dist/skills/ads-import/references/drafts.md +3 -1
  63. package/dist/skills/ads-import/references/guarded-editing.md +3 -2
  64. package/dist/skills/ads-import/references/tokens.md +7 -3
  65. package/dist/skills/ads-import/references/validation.md +13 -4
  66. package/dist/skills/ads-motion/SKILL.md +6 -5
  67. package/dist/skills/ads-motion/references/atomic-styles.md +12 -12
  68. package/dist/skills/ads-motion/references/contracts.md +13 -10
  69. package/dist/skills/ads-motion/references/design-data.md +137 -29
  70. package/dist/skills/ads-motion/references/drafts.md +3 -1
  71. package/dist/skills/ads-motion/references/guarded-editing.md +3 -2
  72. package/dist/skills/ads-motion/references/validation.md +13 -4
  73. package/dist/skills/ads-port/SKILL.md +6 -5
  74. package/dist/skills/ads-port/references/atomic-styles.md +12 -12
  75. package/dist/skills/ads-port/references/cli.md +8 -2
  76. package/dist/skills/ads-port/references/contracts.md +13 -10
  77. package/dist/skills/ads-port/references/design-data.md +137 -29
  78. package/dist/skills/ads-port/references/drafts.md +3 -1
  79. package/dist/skills/ads-port/references/guarded-editing.md +3 -2
  80. package/dist/skills/ads-port/references/validation.md +13 -4
  81. package/dist/starters/preact/design-system/review/token-preview/TokenPreview.tsx +11 -2
  82. package/dist/starters/react/ADS.md +43 -10
  83. package/dist/starters/react/README.md +14 -9
  84. package/dist/starters/react/design-system/assets/brand/README.md +8 -3
  85. package/dist/starters/react/design-system/assets/glyphs/README.md +4 -1
  86. package/dist/starters/react/design-system/components/Content/Icon/Icon.ads.fixture.ts +6 -1
  87. package/dist/starters/react/design-system/components/Content/Icon/Icon.ads.scenario.tsx +3 -2
  88. package/dist/starters/react/design-system/components/Content/Icon/README.md +2 -1
  89. package/dist/starters/react/design-system/components/Content/Logo/Logo.tsx +3 -9
  90. package/dist/starters/react/design-system/components/Content/Logo/README.md +4 -2
  91. package/dist/starters/react/design-system/controllers/Palette/Palette.ts +164 -0
  92. package/dist/starters/react/design-system/index.ts +3 -0
  93. package/dist/starters/react/design-system/review/brand-preview/BrandPreview.tsx +2 -5
  94. package/dist/starters/react/design-system/review/token-preview/TokenPreview.tsx +11 -2
  95. package/dist/starters/react/design-system/styles.css +1 -0
  96. package/dist/starters/react/design-system/tokens/base.css +8 -5
  97. package/dist/starters/react/design-system/tokens/colors.css +167 -175
  98. package/dist/starters/react/design-system/tokens/elevation.css +14 -21
  99. package/dist/starters/react/design-system/tokens/themes.generated.css +142 -0
  100. package/dist/starters/react/design-system/tokens/themes.generated.ts +402 -0
  101. package/dist/style-boundaries.mjs +2 -1
  102. package/dist/themes-generated.mjs +150 -0
  103. package/dist/themes-watch.mjs +42 -0
  104. package/dist/themes.mjs +214 -63
  105. package/dist/token-export.mjs +22 -11
  106. package/dist/token-policy.mjs +2 -1
  107. package/dist/token-quality.mjs +28 -25
  108. package/dist/tokens.mjs +27 -32
  109. package/dist/validation.mjs +17 -1
  110. package/dist/verification/browser.mjs +14 -3
  111. package/dist/verification.mjs +25 -4
  112. package/docs/ADS.md +41 -27
  113. package/docs/ARCHITECTURE.md +49 -22
  114. package/docs/CACHING.md +2 -3
  115. package/docs/CHANGELOG.md +117 -13
  116. package/docs/CONTRACTS.md +13 -10
  117. package/docs/GUIDE.md +94 -22
  118. package/docs/MCP.md +50 -30
  119. package/docs/benchmarks/bun-previews.md +5 -5
  120. package/docs/benchmarks/{gidi-preview-memory.md → preview-memory.md} +14 -12
  121. package/docs/benchmarks/turbo-poc.md +24 -6
  122. package/package.json +2 -1
package/docs/CHANGELOG.md CHANGED
@@ -1,34 +1,138 @@
1
1
  # Changelog
2
2
 
3
- ## 0.3.46
3
+ ## 0.3.48
4
4
 
5
5
  <!-- ads-local-tests:start -->
6
- Local verification: **650/650 passed** with `ADS_TEST_BUN=1 npm test`.
7
- Tested commit: `afec4852fe4b50a8fb543dfaa6b22fdd520179e6`; Node v24.13.0, Bun 1.4.1.
8
- Completed 2026-10-29T23:52:19.077Z (1010 seconds).
6
+ Local verification: **708/708 passed** with `ADS_TEST_BUN=1 npm test`.
7
+ Tested commit: `93a657387e39ce23fd85dd3ce54000b4e456dd8d`; Node v24.13.0, Bun 1.4.1.
8
+ Completed 2026-10-31T12:27:52.387Z (1286 seconds).
9
9
 
10
10
  <!-- ads-local-test-proof
11
11
  {
12
12
  "schema": 1,
13
- "version": "0.3.46",
14
- "commit": "afec4852fe4b50a8fb543dfaa6b22fdd520179e6",
15
- "sourceSha256": "91033481a35eb5f4ea30f29653b2c160f9cb66e4ccde14ca1c37f2e664d042ad",
13
+ "version": "0.3.48",
14
+ "commit": "93a657387e39ce23fd85dd3ce54000b4e456dd8d",
15
+ "sourceSha256": "08f2191456ab4f4d47ae8e9fcb7327125091f736b6c5230ae6c8dbe24ca0b838",
16
16
  "command": "ADS_TEST_BUN=1 npm test",
17
17
  "result": "pass",
18
- "tests": 650,
19
- "pass": 650,
18
+ "tests": 708,
19
+ "pass": 708,
20
20
  "fail": 0,
21
21
  "cancelled": 0,
22
22
  "skipped": 0,
23
23
  "node": "v24.13.0",
24
24
  "bun": "1.4.1",
25
- "completedAt": "2026-10-29T23:52:19.077Z",
26
- "durationMs": 1010063,
27
- "logSha256": "b212a0e52451a1d9389dc4687aaec08dd6d566df4f6b4ce4f8da63514ab09cae"
25
+ "completedAt": "2026-10-31T12:27:52.387Z",
26
+ "durationMs": 1286115,
27
+ "logSha256": "71f4f100114ac074c9445cb2ee0421783304484061b5d82289134a1b8582aa9e"
28
28
  }
29
29
  -->
30
30
  <!-- ads-local-tests:end -->
31
31
 
32
+ - **MCP acceptance runs the browser accessibility audit.** When the acceptance policy sets
33
+ `browserAudit: true`, `ads_accept`, `ads_apply_patch` and `ads_apply_transaction` run the
34
+ axe-core audit on the candidate before writing any source, in every declared brand and
35
+ theme. It audits only the UI scenarios the change can reach: those owned by a changed
36
+ unit and those whose import closure includes a changed file (the `@ds` barrel narrows to
37
+ the imported names when the project declares `sideEffects`). Configuration, foundation,
38
+ token and asset changes audit every UI scenario. The audit renders on the candidate
39
+ preview host that behavior checks or captures already built, or on a candidate host that
40
+ compiles only the selected scenarios. Any `a11y-axe` error rejects the change: nothing is
41
+ written, the result is `ok:false`, findings are in `diagnostics` (as in validation), and
42
+ the `browser-accessibility-audit` check records counts, scenarios, themes, brands, the
43
+ audited scenario IDs, the selection mode and `elapsedMs`. An audit that cannot run (no
44
+ project Playwright or browser) rejects acceptance with a `browser-audit` diagnostic.
45
+ Without `browserAudit`, acceptance is unchanged and starts no browser.
46
+ - The audit renders up to four scenario pages at once per theme.
47
+ - The Icons tab reserves the alias line on every glyph card, so the grids line up; a long
48
+ alias list is truncated with the full list as its tooltip.
49
+
50
+ ## 0.3.47
51
+
52
+ - **Findings are errors, review items or info items.** Errors fail `ads check`,
53
+ validation and acceptance; review items (`atomic-composition-review`, `token-overlap-review`,
54
+ `pointer-capture-review`, `scenario-exercise-review`, `a11y-keyboard`, `brand-unused`,
55
+ `render-color-probe`) are listed with guidance and never block; info items
56
+ (`atomic-composition-limit`) note an analysis limit. `src/finding-rules.mjs` classifies
57
+ every finding id. Every rule that was a warning and that ADS can decide is now an error:
58
+ `token-contrast`, `token-rhythm`, `a11y-target-size`, `a11y-focus`, `a11y-text-resize`,
59
+ `a11y-reduced-motion`, `a11y-text-spacing`, `a11y-image-alt`, `a11y-icon-label`,
60
+ `glyph-viewbox`, `glyph-color`, `brand-readme`, `brand-license`, `brand-preview` and the
61
+ theme and brand rules. CLI output reads `[error:…]` and `[review:…]` with a count of
62
+ each; JSON review items carry `severity: "review"`. No setting changes a finding's kind:
63
+ `enforce` is removed, and a `ds.config.json` that sets it fails to load.
64
+ - **Themes are written as per-theme halves.** A token that differs per theme has one plain
65
+ value per declared theme on `:root` (`--color-accent-9-light`, `--color-accent-9-dark`).
66
+ ADS generates `tokens/themes.generated.css` (theme switches and one resolver per themed
67
+ token), the last foundation import. `ads assets` writes it, and the showcase and MCP
68
+ server rewrite it whenever tokens or `ds.config.json` change; `ads check` fails when it
69
+ is missing or stale (`themes-generated`). `data-theme` on any element themes that
70
+ section and follows the nearest ancestor at any depth, with plain CSS variables. Values
71
+ under `[data-theme]` or `prefers-color-scheme` are an error (`theme-old-form`); a themed
72
+ token needs a half for every theme (`theme-coverage`); new errors
73
+ `theme-half-reference`, `theme-half-conflict`; `theme-undeclared` is gone. Projects
74
+ rewrite their token sheets; there is no migration.
75
+ - **Display switches.** The generated file defines `--display-<theme>` and
76
+ `--display-brand-<brand>`, `none` outside the nearest theme or brand: show a dark logo
77
+ with `display: var(--display-dark, block)`. Styling a component by a `[data-theme]` or
78
+ `[data-brand]` ancestor selector is an error (`theme-selector`), since it ignores the
79
+ nearest section. The starter's Logo and BrandPreview use the switches.
80
+ - **Renderer palette** (issue #1). ADS generates `tokens/themes.generated.ts` with the CSS:
81
+ every color token resolved for every theme and brand as `{ css, rgba }` (aliases, halves,
82
+ `color-mix()` and all CSS color syntaxes; per-channel sRGB clipping as canvas does;
83
+ unresolvable tokens listed in `unresolved`), with `contexts`, `themeSchemes`,
84
+ `themed()` and `themedByScheme()`. The starter's `controllers/Palette` gives
85
+ `paletteFor(element)`, `paletteContext(element)`, `observePalette(element, callback)` and
86
+ `resolveColor(element, value)`. In a 300-node hover benchmark, per-node color probing
87
+ took ~300 ms per 1,000 lookups with 6,000 DOM insertions; the palette takes ~0.2 ms
88
+ with none. Palette colors
89
+ match Chrome within 1/255 per channel. `render-color-probe` (review) flags color reads
90
+ from the page in per-item render paths. Existing projects get the file on the next
91
+ `ads assets` or showcase/MCP start; until then `ads check` reports it missing.
92
+ - **Runtime per-theme values** use `themed({ light, dark, … })` or `themedByScheme({ light,
93
+ dark })` from `themes.generated.ts`, which follow the nearest theme like token halves and
94
+ work with any number of themes. `light-dark()` is an error in token sheets, component CSS
95
+ and component string literals (`theme-light-dark`), and binding producers no longer accept
96
+ `light-dark()` templates; they accept these helpers over declared fields.
97
+ - **`followSystemTheme: true`** makes a page without `data-theme` follow the OS
98
+ `prefers-color-scheme`, taking the first declared theme with that scheme; an explicit
99
+ `data-theme` wins.
100
+ - **Brands.** `brands` in `ds.config.json` (the first is the default) adds a brand axis
101
+ beside the themes: a brand sets its own values, with every half of a themed token it
102
+ changes, on `[data-brand="<name>"]`. Brand and theme are independent and each follows
103
+ the nearest ancestor. The showcase has a brand selector, captures and previews take a
104
+ brand, contrast is checked for every brand in every theme, and
105
+ `ads tokens --format dtcg --brand <name>` exports one. Errors `brand-undeclared`,
106
+ `brand-theme-value`, `brand-coverage`, `brand-new-token`, `brand-empty`.
107
+ - **`ads audit`** runs axe-core (WCAG A/AA rules) in every component, pattern and
108
+ composition scenario, in every brand and theme, and reports `a11y-axe` errors with the
109
+ rule, WCAG criterion, failing elements and help link; it exits 1 on findings.
110
+ `browserAudit: true` in a validation or acceptance policy runs it there.
111
+ - **`control-padding`** (error): a control sized with `--control-height-<size>` pads its
112
+ sides with `--control-padding-<size>`, or `--control-inset` inside a track, never with a
113
+ `--space-*` step.
114
+ - **Icons tab.** The showcase renders the glyph set natively: every glyph at the size used
115
+ beside text, each glyph on its grid at every `--icon-*` size with its aliases and glyph
116
+ errors, a search by name or alias, and the logos in `assets/logos/` in color and muted.
117
+ It refreshes when glyphs, aliases, logos or icon tokens change. The starter's Icon
118
+ scenario now shows the component in use instead of cataloguing the set.
119
+ - **Other products' logos** live in `assets/logos/`, apart from brand artwork and glyphs:
120
+ they keep their owners' colors and render as images (or a mask over `currentColor` when
121
+ muted). ADS generates and checks nothing there.
122
+ - `ads check` reports `glyph-aliases` errors (invalid `aliases.json`, an alias naming a
123
+ missing glyph) with their line; `ads assets` fails with the same message.
124
+ - Fixed: a cached or warm-retained preview graph reused its scenario metadata by id, so a
125
+ graph built before discovery found a scenario's paint bindings kept serving it without
126
+ them while the compiled bytes were unchanged. Cached and retained graphs now take
127
+ `paintBindings`, `paintAudit`, title, kind and samples from the current registry, and a
128
+ cached graph whose metadata differs is rebuilt.
129
+ - The starters' token preview draws a column-count token (`--grid-columns-*`) as that many
130
+ columns.
131
+ - The starter's `base.css` locks page scrolling while a modal `<dialog>` is open
132
+ (`html:has(:modal)`) and keeps the scrollbar's space (`scrollbar-gutter: stable`).
133
+
134
+ ## 0.3.46
135
+
32
136
  - The starter has a token foundation in six groups meeting WCAG 2.2 AA:
33
137
  Color (six 12-step ramps redefined for dark, semantic roles aliasing ramp steps,
34
138
  success/warning/danger/info sets), Type (16 px body, modular ladder fluid from 3xl,
@@ -301,7 +405,7 @@ Completed 2026-10-29T23:52:19.077Z (1010 seconds).
301
405
  from build budgets, and keep configuration replacements parked until validation
302
406
  completes. Fail malformed full-build catalogs promptly and recover complete
303
407
  catalogs after repair. Keep read-only architecture reports outside the project.
304
- - In the frozen Gidi acceptance workload, peak process-tree PSS fell from
408
+ - In the frozen application acceptance workload, peak process-tree PSS fell from
305
409
  7.99 to 4.56 GiB and two complete draft/accept cycles fell from 355.7 to
306
410
  270.3 seconds, retaining all validation gates. See the
307
411
  [benchmark report](https://github.com/reqvire-org/ads/blob/v0.3.35/docs/benchmarks/gidi-preview-memory.md).
package/docs/CONTRACTS.md CHANGED
@@ -162,11 +162,14 @@ valueFrom: ["paint", "scheme.day", "scheme.night"],
162
162
  ```
163
163
 
164
164
  Register each matching `config.*.<path>` in `paintInputs`. The producer may write
165
- one declared field, or an exact `light-dark(${entry.scheme.day}, ${entry.scheme.night})`
166
- template over two declared fields. The normal key/map/root proof still applies.
167
- Raw constants, undeclared fields, extra writes and unknown transforms are rejected.
168
- The browser audit checks actual accessible color references in both branches;
169
- a local SVG URL or `none` is not a CSS color inside `light-dark()`.
165
+ one declared field, or a per-theme value built with the generated helpers from
166
+ `tokens/themes.generated.ts`: `themed({ light: entry.scheme.day, dark: entry.scheme.night })`
167
+ (keys exactly the declared themes) or `themedByScheme({ light: …, dark: … })` (each theme
168
+ takes the value for its color scheme). Every value is a declared field and the argument is
169
+ an object literal without spreads. The normal key/map/root proof still applies. Raw
170
+ constants, undeclared fields, `light-dark()`, extra writes and unknown transforms are
171
+ rejected. The browser audit checks an accessible color reference in every theme's branch;
172
+ a local SVG URL or `none` is not a color there.
170
173
 
171
174
  Families cannot overlap shared tokens, private runtime
172
175
  prefixes or other bindings. A broad family such as `--color-${key}` grants no
@@ -175,12 +178,12 @@ cannot be established. Registered paint consumers list their allowed binding IDs
175
178
  borrowing a peer's binding family or private runtime variable remains invalid. Bindings are scoped
176
179
  to their actual root; portals outside it need deliberate project integration.
177
180
 
178
- A registered binding producer may combine two accessible color references as
179
- `light-dark(var(--light-token), var(--dark-token))`. The App paint audit checks
180
- both branches and their observed effect in the active color scheme. Raw colors,
181
- undefined tokens and SVG URLs inside this color function remain invalid.
181
+ A registered binding producer gives a per-theme value with `themed()` or
182
+ `themedByScheme()`; its output is `var(--ads-if-<theme>, <reference>)` once per declared
183
+ theme, in declared order. The App paint audit checks every branch and its observed effect
184
+ in the active theme. Raw colors, undefined tokens and SVG URLs in a branch remain invalid.
182
185
  This derived binding form does not widen public paint-input types; use constrained
183
- references for each theme input and verify both color schemes in browser checks.
186
+ references for each theme input and verify every theme in browser checks.
184
187
 
185
188
  The App audit checks current mounted instances, accessible values, local SVG
186
189
  resources and computed paint-property responses. Visibility and complete rendered
package/docs/GUIDE.md CHANGED
@@ -444,7 +444,9 @@ can run `ads validate --policy acceptance`; ordinary `ads validate` selects the
444
444
  validation policy. See [policy guidance](../skills/ads-designer/references/validation.md).
445
445
  When the acceptance policy requires affected registered behavior checks (or
446
446
  a capture was requested), ADS builds and shares production previews with browser
447
- verification. Core-only acceptance does not build the whole graph. Remove `build:mcp-previews`
447
+ verification. `acceptance.browserAudit` renders the candidate's affected UI scenarios
448
+ for the axe-core audit on that host, or compiles only those scenarios when nothing
449
+ else needs previews. Core-only acceptance does not build the whole graph. Remove `build:mcp-previews`
448
450
  from `acceptance.checks`; keep that script in the ordinary project build.
449
451
  See the [editing contract](MCP.md#guarded-editing) for unit ownership,
450
452
  Git patches, bounded reads and preview review. Keep normal build gates enabled
@@ -639,12 +641,12 @@ component state variables.
639
641
 
640
642
  Keep original artwork (SVG masters, finished PNG/JPEG/WebP images, delivered
641
643
  `.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
644
+ `design-system/assets/brand/`, and font files in `assets/fonts/`. `ads check` fails
643
645
  when artwork is undescribed in that README (`brand-readme`), the README states no
644
646
  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
647
+ (`brand-preview`), and lists artwork nothing uses for review (`brand-unused`). Name a dark-theme variant
648
+ `<name>.dark.svg`; the component showing it renders both and shows each with a display switch
649
+ (`display: var(--display-dark, block)`). Brand previews are the showcase's first
648
650
  section, **Brand**: scenarios in `brand/`, grouped by folder like components (the
649
651
  starter's `brand/Identity/Logo` and `brand/Icons/AppIcon` with the review
650
652
  `BrandPreview`). They show artwork in the current theme and the app icon at its
@@ -652,7 +654,8 @@ sizes, and have no token samples. A finished image renders only at or below its
652
654
  pixel size; ADS never enlarges it. The [branding guide](../skills/ads-designer/references/branding.md)
653
655
  (`ads://guides/branding`) covers the whole flow. Font declarations
654
656
  belong in optional `tokens/fonts.css`, imported first. The foundation entry is
655
- import-only: fonts (when present), colors, typography, spacing, elevation, base.
657
+ import-only: fonts (when present), colors, typography, spacing, elevation, base,
658
+ themes.generated.css.
656
659
  Fixed artwork colors and geometry are permitted inside SVG assets; they do not
657
660
  permit raw visual values in component or pattern styles.
658
661
 
@@ -719,6 +722,10 @@ nothing. Commit outputs and the manifest together.
719
722
  "attributes": { "fill": "none", "stroke": "currentColor" } }`. Each SVG becomes
720
723
  `glyphs[name]` with missing root attributes added; `aliases.json` beside them
721
724
  becomes `glyphAliases`. `ads assets` writes it and `ads check` fails when it is stale.
725
+ Other products' logos are not brand artwork or glyphs: keep them, in their own
726
+ colors and under their owners' trademark and usage terms, in `assets/logos/` and
727
+ show them as images (a CSS mask over `currentColor` for a muted use); ADS generates
728
+ and checks nothing there.
722
729
 
723
730
  ### Tokens, grid, icons and accessibility
724
731
 
@@ -727,23 +734,88 @@ sizing, Shape & elevation, Motion, Layout) whose roles meet WCAG 2.2 AA in both
727
734
  a container-query `Grid` on the grid tokens, and an icon set with `Icon` and
728
735
  `IconButton`. Keep the token names and change values to brand a project.
729
736
 
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.
737
+ `ads check` reports two kinds of finding. **Errors** fail `ads check`, validation and
738
+ acceptance: contrast per theme and brand (`token-contrast`), the 2 px spacing rhythm
739
+ (`token-rhythm`), accessibility from tokens and source (`a11y-target-size`, `a11y-focus`,
740
+ `a11y-text-resize`, `a11y-reduced-motion`, `a11y-text-spacing`, `a11y-image-alt`,
741
+ `a11y-icon-label`), glyph sets (`glyph-viewbox`, `glyph-color`), control padding
742
+ (`control-padding`: a control sized with `--control-height-<size>` pads its sides with
743
+ `--control-padding-<size>`, or `--control-inset` inside a track), and the theme, brand and
744
+ brand-artwork rules below. **Review items** never block; each names something only a person
745
+ can judge: `atomic-composition-review`, `token-overlap-review`, `pointer-capture-review`,
746
+ `scenario-exercise-review`, `a11y-keyboard`, `brand-unused` and `render-color-probe`.
747
+ **Info** items (`atomic-composition-limit`) note an analysis limit. There is no setting that
748
+ changes a finding's kind. The showcase's grid button overlays the project's grid on every
749
+ preview, and its **Icons** tab shows the glyph set: every glyph at the size used beside
750
+ text, each one on its grid at every `--icon-*` size with its aliases and glyph errors, and
751
+ the logos in `assets/logos/` in color and muted.
752
+
753
+ `ads audit` adds a rendered check: axe-core (WCAG A/AA rules) in every component, pattern
754
+ and composition scenario, once per declared brand and theme (`--scenario`, `--theme` and
755
+ `--brand` narrow it). Each violation is an `a11y-axe` error naming the axe rule, WCAG
756
+ criterion, themes and brands, failing elements and help link, and `ads audit` exits 1. It
757
+ needs the project's Playwright and browser, as captures do; `browserAudit: true` in a
758
+ validation or acceptance policy runs it there too. With `acceptance.browserAudit`, MCP
759
+ draft acceptance and guarded patches audit the candidate's affected scenarios before
760
+ writing source, and an `a11y-axe` error rejects the change.
736
761
  `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`).
762
+ (`--theme <name>` and `--brand <name>` select one context).
763
+
764
+ `themes` in `ds.config.json` declares the themes (a name and the color scheme for native
765
+ controls; the first is the default), and the optional `brands` the brands (the first is the
766
+ default). `data-theme="<name>"` and `data-brand="<name>"` on `<html>` theme the page, on any
767
+ element one section; each element follows its nearest theme and its nearest brand, at any
768
+ nesting depth, in every browser with CSS variables.
769
+
770
+ Write a token that differs per theme as one plain value per theme, named with the theme as
771
+ suffix, on `:root`:
772
+
773
+ ```css
774
+ :root {
775
+ --color-accent-9-light: oklch(55% .2 280);
776
+ --color-accent-9-dark: oklch(70% .16 280);
777
+ --bg-canvas-light: var(--slate-1-light); /* a half refers to halves */
778
+ --bg-canvas-dark: var(--slate-2-dark);
779
+ --accent: var(--color-accent-9); /* single values stay single */
780
+ }
781
+ [data-brand="acme"] { /* a brand sets its own halves */
782
+ --color-accent-9-light: oklch(55% .2 25);
783
+ --color-accent-9-dark: oklch(70% .16 25);
784
+ }
785
+ ```
786
+
787
+ ADS generates `tokens/themes.generated.css` from these halves and the declared themes and
788
+ brands: theme switches and one resolver per themed token. It is the last foundation import;
789
+ commit it and never edit it. `ads assets`, the showcase and the MCP server write it, the
790
+ showcase and MCP server again whenever tokens or `ds.config.json` change; `ads check` fails
791
+ when it is missing or out of date (`themes-generated`).
792
+
793
+ The generated file also defines display switches: `--display-<theme>` and, with brands,
794
+ `--display-brand-<brand>`, each `none` outside its nearest theme or brand. Show
795
+ theme- or brand-specific content with `display: var(--display-dark, block)`.
796
+ `"followSystemTheme": true` makes a page without `data-theme` take the first declared theme
797
+ whose scheme matches the OS `prefers-color-scheme`; an explicit `data-theme` wins.
798
+
799
+ Beside it ADS generates `tokens/themes.generated.ts`, written, checked and kept current
800
+ together with the CSS: every color token resolved for every theme and brand as `{ css, rgba }`
801
+ for Canvas, WebGL and SVG renderers. The starter's `controllers/Palette` reads it:
802
+ `paletteFor(element)` (the nearest theme and brand's palette), `observePalette(element,
803
+ callback)` (once per theme or brand change) and `resolveColor(element, value)` (a non-token
804
+ color, cached, without inserting elements). `render-color-probe` (review) flags color reads
805
+ from the page inside per-item render callbacks. The same module exports `themed({ light,
806
+ dark, … })` and `themedByScheme({ light, dark })` for per-theme values that come from data at
807
+ runtime; `light-dark()` is an error in token sheets, component CSS and component string
808
+ literals (`theme-light-dark`).
809
+
810
+ Errors: a token value set under `[data-theme]`, `prefers-color-scheme` or a combined brand
811
+ selector (`theme-old-form`); a component or pattern styled by a `[data-theme]` or
812
+ `[data-brand]` ancestor selector (`theme-selector`); a themed token without a half for every theme
813
+ (`theme-coverage`); a token set both as one value and as halves (`theme-half-conflict`); a
814
+ half that refers to a theme-following token instead of its half (`theme-half-reference`); a
815
+ lone half (`theme-new-token`); themes without any halves (`theme-empty`); an undeclared
816
+ brand name (`brand-undeclared`); a brand that gives a theme-following token one value
817
+ (`brand-theme-value`) or only some of its halves or ramp steps (`brand-coverage`); a token
818
+ only a brand defines (`brand-new-token`); a declared brand without values (`brand-empty`).
747
819
  See the [token guide](../skills/ads-designer/references/design-data.md) and the
748
820
  [accessibility guide](../skills/ads-designer/references/accessibility.md).
749
821
 
package/docs/MCP.md CHANGED
@@ -96,7 +96,9 @@ is explicitly `previewOnly`, not behavioral or acceptance evidence.
96
96
 
97
97
  `ads_accept({id,revision})` validates and applies the exact reviewed revision in
98
98
  one operation. Architecture, configured project commands and affected
99
- behavior checks remain mandatory. Edits during checking and baseline conflicts
99
+ behavior checks remain mandatory. When `acceptance.browserAudit` is true, axe-core
100
+ also renders the candidate's affected UI scenarios in every declared brand and
101
+ theme; any `a11y-axe` error rejects acceptance. Edits during checking and baseline conflicts
100
102
  prevent application; failures retain the draft and return execution evidence.
101
103
  Successful acceptance removes draft source, records an event and resolves draft
102
104
  dependencies in remaining proposals. Accept dependencies first and review their
@@ -183,11 +185,14 @@ client assets and MCP, with no arbitrary file reader or command launcher.
183
185
  Shutdown closes both transports, subscriptions and the managed compiler.
184
186
 
185
187
  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,
188
+ steps through the project's declared themes (`ads_status.themes`), a brand selector beside
189
+ it when the project declares brands (`ads_status.brands`),
190
+ status/diagnostics when needed, and the App slot. The Icons tab (shown when the project has
191
+ a glyph set) renders `ads://project/icons` natively: the glyph set, each glyph on its grid
192
+ at every icon size with aliases and glyph errors, and the logos in `assets/logos/`. Its MCP client does discovery,
188
193
  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.
194
+ from `ads_tokens.categories` (discovered token scenarios); every scenario section also
195
+ comes from the same `ads_scenarios` registry.
191
196
  It invokes the selected App tool and uses the official Apps bridge to render its
192
197
  HTML in an opaque sandbox. Project UI is never imported into the shell.
193
198
 
@@ -380,27 +385,31 @@ public exports from `components/`, `patterns/` and `controllers/`; it does not e
380
385
  guess component props. Read the exported API and owning guide. An export name
381
386
  alone does not prove that a preview renders that particular element.
382
387
 
383
- `ads://project/status`, `/build`, `/tokens`, `/catalog`, `/scenarios` and `/checks`
384
- carry project JSON detail. Behavior discovery, execution outcomes and investigation
388
+ `ads://project/status`, `/build`, `/tokens`, `/icons`, `/catalog`, `/scenarios` and
389
+ `/checks` carry project JSON detail. Behavior discovery, execution outcomes and investigation
385
390
  details are paged; their resource reads use the same bounds as their tools. Allowed project documentation/source and skill files are separate
386
391
  resources. No arbitrary filesystem reader is exposed. Prefer bounded tools for
387
392
  large catalogues; explicit resource reads can enter model context and a client
388
393
  may truncate large payloads.
389
394
 
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
395
+ `ads_check` and `ads://project/checks` return errors under `diagnostics` (they fail the
396
+ check) and review items under `advisories` with `severity: "review"` (they never block),
397
+ then informational limits with `severity: "info"`; `summary` counts errors and review
398
+ items. Every finding id has one class (error, review or info), and no configuration changes
399
+ it.
400
+
401
+ Atomic composition review items (`atomic-composition-review`) carry related source
402
+ declarations and `guidanceUri: "ads://guides/atomic-styles"`. Read that guide for causes
403
+ and component-level fixes. The full guide lives in every ADS skill as
394
404
  `references/atomic-styles.md` for standalone clients; MCP serves the packaged
395
405
  [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`
406
+ Guarded mutation results preserve review items without rejecting valid source; failed
407
+ registered rendered checks remain blocking.
408
+ Review items can carry a `composition` source path, a statically reached DOM `target`
400
409
  and `writingModeDependent`. Unresolved paths appear as bounded
401
410
  `atomic-composition-limit` advisories with `severity: "info"`; neither an
402
411
  informational limit nor a traced target proves a rendered failure or success.
403
- Bounded check results put warnings before informational limits; the checks
412
+ Bounded check results put review items before informational limits; the checks
404
413
  resource retains complete results.
405
414
 
406
415
  `property-registration` is a blocking architecture diagnostic for invalid or
@@ -413,18 +422,20 @@ ownership, valid initial values, browser checks and examples.
413
422
 
414
423
  ### Screenshots and candidate comparison
415
424
 
416
- `ads_capture({scenario:"<discovered ID>",target?,theme?,viewport?})` renders current
425
+ `ads_capture({scenario:"<discovered ID>",target?,theme?,brand?,viewport?})` renders current
417
426
  source in the real sandboxed App using project-local Playwright/browser. `theme` is a declared
418
427
  theme name (default: the first). Previews receive the theme in host context: `theme` carries
419
428
  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
429
+ `theme` get the first declared theme with that scheme. `brand` is a declared brand name
430
+ (default: the first) for projects that declare brands; previews receive it as `adsBrand` and
431
+ set `data-brand` on the document. It returns
421
432
  PNG resource URIs and revision/settings metadata. The default is the full widget
422
433
  viewport; optional `captureTargets` metadata names an element within the scenario.
423
434
  Token/component/pattern/composition scenarios share this path. The tool adds no
424
435
  project-specific renderer or fixture assumptions.
425
436
 
426
437
  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;
438
+ `captures:[{scenario,target?,theme?,brand?,viewport?}]` selection. Existing gates run first;
428
439
  current and candidate use matching capture settings. Source/conflict checks remain
429
440
  mandatory. No screenshots are created by ordinary patches/dry runs. A newly added
430
441
  scenario has a candidate with an explicit absent current baseline.
@@ -664,7 +675,8 @@ using the client's local file tools, then call
664
675
  freshness and owner paths and returns a `patchFile`; it changes no live source.
665
676
  Pass that `patchFile` to `ads_apply_patch` with `dryRun:true` to validate before
666
677
  applying. This runs the normal candidate gates, including affected registered
667
- behavior checks against an isolated candidate and its configured browser preview.
678
+ behavior checks against an isolated candidate and its configured browser preview
679
+ and, when `acceptance.browserAudit` is true, the candidate accessibility audit.
668
680
  It writes no live source and does not persist passing evidence for live inputs.
669
681
  Read the summary, then use its `resultId` with `ads_results` for failing
670
682
  `outcomes`, `diagnostics` or named pipeline `checks`; update the draft, diff again
@@ -697,8 +709,9 @@ For a coupled rename or upgrade, call `ads_apply_transaction`:
697
709
  It accepts 2–64 distinct owners, at most 256 distinct files and 16 MiB of combined
698
710
  Git diff text. Each patch obeys its own ownership/companion rules. Patches apply
699
711
  in order inside one candidate; shared-entry hunks in a later patch must match
700
- the earlier candidate's content. Core checks, configured project commands
701
- and all affected behavior checks run against the final candidate. No intermediate
712
+ the earlier candidate's content. Core checks, configured project commands,
713
+ all affected behavior checks and, when `acceptance.browserAudit` is true, the
714
+ accessibility audit run against the final candidate. No intermediate
702
715
  candidate is published. Dry runs, failures, conflicts and cancellation write no
703
716
  source; a publication failure rolls back prior writes. This coordinates owned
704
717
  source migrations, not dependency installation or arbitrary application files.
@@ -1338,12 +1351,12 @@ live source, loosen policy or add a second contract-editing protocol. See
1338
1351
  [CONTRACTS.md](CONTRACTS.md) for the static schema, compatibility and browser audits.
1339
1352
  The same guide is available at `ads://guides/contracts`.
1340
1353
 
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.
1354
+ A registered binding producer gives a per-theme value with `themed()` or
1355
+ `themedByScheme()`; its output is `var(--ads-if-<theme>, <reference>)` once per declared
1356
+ theme, in declared order. The App paint audit checks every branch and its observed effect
1357
+ in the active theme. Raw colors, undefined tokens and SVG URLs in a branch remain invalid.
1345
1358
  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.
1359
+ references for each theme input and verify every theme in browser checks.
1347
1360
 
1348
1361
  Binding `valueFrom` accepts one path or an explicit array of registered entry
1349
1362
  paths for alternative/theme paints. Parts can have multiple distinct parents and
@@ -1409,9 +1422,16 @@ scenario's failure. A retained earlier view is not current-source evidence.
1409
1422
  `ads_validate({policy:"acceptance"})` matches `ads validate --policy acceptance`:
1410
1423
  it checks the acceptance policy against current source without applying anything.
1411
1424
  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
1414
- neither policy. Explicit `ads_verify` remains independent of gating choices. The MCP tool
1425
+ full validation. Each policy chooses `checks`, `behaviorChecks` and `browserAudit` (the
1426
+ axe-core audit of every UI scenario in every brand and theme; its `a11y-axe` findings are
1427
+ errors); skipped tests are reported as skipped, without a passing label. Draft preview/edit triggers
1428
+ neither policy. Draft acceptance, `ads_apply_patch` and `ads_apply_transaction` run
1429
+ the acceptance policy on their candidate: with `acceptance.browserAudit` they audit
1430
+ the candidate's affected UI scenarios (all of them after configuration, foundation,
1431
+ token or asset changes) before writing source. Any `a11y-axe` error, or an audit that
1432
+ cannot run (`browser-audit`), rejects the change; findings are in `diagnostics` and the
1433
+ `browser-accessibility-audit` check lists the audited scenarios, themes, brands and
1434
+ timing. Explicit `ads_verify` remains independent of gating choices. The MCP tool
1415
1435
  runs trusted configured project commands with cancellation and bounded output; it
1416
1436
  is available with source mutations disabled and writes only build/evidence output
1417
1437
  when project commands honor their checking contract. Summaries include policy, scope,
@@ -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
  ```