@reqvire-org/ads 0.4.3 → 0.4.4

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.
@@ -49,9 +49,13 @@ name the text token and the background source. Transparent wrappers do not hide
49
49
  ancestor background; a text node using the same token as its backdrop is still a failure.
50
50
  No explicit pair contract is required. Keep decorative brand colors separate from text
51
51
  roles when their contrast is insufficient.
52
+ String/number text props are covered, as are literal hooks with no captured paint selector
53
+ targeting them and optional classes whose alternatives have identical paint/visibility.
54
+ For example, an optional card class that only changes padding does not hide the card's
55
+ background from the contrast check.
52
56
 
53
- The composition check deliberately leaves unknown prop spreads, differing class branches,
54
- competing/conditional/descendant styles, unbound class names, gradients, opacity, filters,
57
+ The composition check deliberately leaves unknown prop spreads, differing paint branches,
58
+ competing/conditional/descendant paint styles, unresolved class values, gradients, opacity, filters,
55
59
  transforms, text shadows, dynamic visibility and missing backdrops
56
60
  unverified (`component-contrast-unresolved`). Keep legitimate component APIs; do not
57
61
  flatten them or add paint to satisfy the checker. Audit the actual composed scenario,
@@ -152,6 +152,21 @@ ADS resolves the public alias, extracts Linaria using the shared atomic tag
152
152
  resolver, and registers compiled modules, CSS, fonts, images and workers as
153
153
  immutable MCP resources. The selected ADS framework controls JSX compilation.
154
154
 
155
+ In ADS 0.4.4, watched previews use a private incremental module graph; complete
156
+ Bun builds remain the path for `ads compile` and production-mode verification.
157
+ This is internal tooling. Do not add a project Vite server, preview plugin or
158
+ new compiler process to enable it. Compatible React/Preact edits update the
159
+ existing isolated iframe and can preserve state, focus and selection. Incompatible
160
+ updates, changed hook signatures or rejected-revision recovery can reset state.
161
+ Preview-local state is not a persistence contract or verification evidence.
162
+
163
+ The preview UI reuses bounded, scope-specific manifest revisions and asks for
164
+ changed records internally. Tool results remain graph references. Full-resource
165
+ reads and older-server fallback remain supported. Restart the project's ADS
166
+ runtime and reconnect after upgrading; changing an installed package does not
167
+ replace the running compiler. HTTP asset delivery is a separate, unreleased
168
+ experiment and is not required for these improvements.
169
+
155
170
  `ads compile .` builds all production previews for project builds or CI.
156
171
  `ads compile . --watch` runs the same source scheduler continuously.
157
172
  Programmatic project setup can call `compilePreviews` from
@@ -152,6 +152,21 @@ ADS resolves the public alias, extracts Linaria using the shared atomic tag
152
152
  resolver, and registers compiled modules, CSS, fonts, images and workers as
153
153
  immutable MCP resources. The selected ADS framework controls JSX compilation.
154
154
 
155
+ In ADS 0.4.4, watched previews use a private incremental module graph; complete
156
+ Bun builds remain the path for `ads compile` and production-mode verification.
157
+ This is internal tooling. Do not add a project Vite server, preview plugin or
158
+ new compiler process to enable it. Compatible React/Preact edits update the
159
+ existing isolated iframe and can preserve state, focus and selection. Incompatible
160
+ updates, changed hook signatures or rejected-revision recovery can reset state.
161
+ Preview-local state is not a persistence contract or verification evidence.
162
+
163
+ The preview UI reuses bounded, scope-specific manifest revisions and asks for
164
+ changed records internally. Tool results remain graph references. Full-resource
165
+ reads and older-server fallback remain supported. Restart the project's ADS
166
+ runtime and reconnect after upgrading; changing an installed package does not
167
+ replace the running compiler. HTTP asset delivery is a separate, unreleased
168
+ experiment and is not required for these improvements.
169
+
155
170
  `ads compile .` builds all production previews for project builds or CI.
156
171
  `ads compile . --watch` runs the same source scheduler continuously.
157
172
  Programmatic project setup can call `compilePreviews` from
@@ -53,4 +53,5 @@ Load only the guide(s) for the requested transition.
53
53
 
54
54
  | From | To | Guide |
55
55
  |------|----|-------|
56
- | 0.4.1 | 0.4.2 (planned) | [Showcase, review boundaries and preview migration](references/0.4.1-to-0.4.2.md) |
56
+ | 0.4.1 | 0.4.2 | [Showcase, review boundaries and preview migration](references/0.4.1-to-0.4.2.md) |
57
+ | 0.4.3 | 0.4.4 | [Incremental previews and manifest reuse](references/0.4.3-to-0.4.4.md) |
@@ -1,8 +1,7 @@
1
1
  # ADS 0.4.1 → 0.4.2
2
2
 
3
- Status: planned next patch release. This guide describes changes from the committed
4
- 0.4.1 source to the current development tree. Confirm the target package or local
5
- build contains them before applying it; the guide does not publish 0.4.2.
3
+ This guide describes the 0.4.1-to-0.4.2 transition. Confirm the installed target
4
+ version before applying it; later transitions have their own guides.
6
5
 
7
6
  This upgrade includes source/configuration incompatibilities despite the patch
8
7
  number. Apply the relevant sections to an existing design system; a fresh starter
@@ -0,0 +1,80 @@
1
+ # ADS 0.4.3 → 0.4.4
2
+
3
+ Use the target package's changelog and installed version to confirm availability;
4
+ this guide also accompanies a local 0.4.4 release candidate.
5
+
6
+ This transition changes ADS's managed preview engine. It requires no project
7
+ source rename, token migration, configuration field or replacement mount adapter.
8
+ Keep the application's framework, build tools, TypeScript and runtime. ADS still
9
+ runs on Bun ≥1.4.1. Its internal Vite graph is private; do not add an application
10
+ Vite server or install preview plugins into the consuming project.
11
+
12
+ ## Upgrade and reconnect
13
+
14
+ 1. Record the installed ADS version and existing dependency/lockfile changes.
15
+ Upgrade with the project's package manager and retain its dependency placement,
16
+ for example `npm install --save-dev @reqvire-org/ads@0.4.4` when ADS is already
17
+ a dev dependency. Use the supplied tarball instead when testing a release candidate.
18
+ 2. Stop and restart only this project's ADS runtime using the upgraded installation;
19
+ reconnect the MCP client and reopen the showcase URL it reports. A running old
20
+ server does not acquire the new compiler by updating the package on disk.
21
+ 3. Keep drafts and project source. Compiler fingerprints invalidate incompatible
22
+ preview artifacts automatically. Do not delete `.ds/` to force a rebuild: it
23
+ can contain active drafts and evidence. Never edit generated preview files.
24
+
25
+ ## Expected preview behavior
26
+
27
+ Watched React/Preact previews now update changed modules inside the existing
28
+ isolated iframe. Compatible edits preserve ordinary component state, input text,
29
+ focus and selection. Hook-signature changes follow framework reset semantics;
30
+ incompatible exports, configuration changes, interrupted updates and rollback to
31
+ an already evaluated old revision can reopen the frame. State preservation is
32
+ conditional, not a durable application-state guarantee.
33
+
34
+ The preview can display compiled feedback before checks finish. For evidence,
35
+ wait for current verified output (`ads_show_scenario` defaults to
36
+ `waitFor:"verified"`). Visible changes, retained state and a running server do not
37
+ establish acceptance. Captures, audits, registered behaviors and exact-revision
38
+ draft acceptance retain their existing gates.
39
+
40
+ The UI reuses known manifests and requests internal resource deltas. Agent-facing
41
+ tool results still provide graph references. Clients reading the existing full
42
+ manifest resource need no change; older servers receive the full-resource fallback.
43
+ Do not persist graph metadata across projects or draft scopes in a custom host.
44
+
45
+ HTTP asset delivery, iframe removal, source-emission/V3 and experimental capture
46
+ repaint changes are outside 0.4.4. Remove proof-only flags from a production launcher
47
+ if an experiment added them; they are not required to enable incremental previews.
48
+
49
+ ## Verify the receiving project
50
+
51
+ Run the upgraded local CLI from the project root:
52
+
53
+ ```sh
54
+ bun node_modules/@reqvire-org/ads/dist/cli.mjs check .
55
+ bun node_modules/@reqvire-org/ads/dist/cli.mjs compile .
56
+ bun node_modules/@reqvire-org/ads/dist/cli.mjs validate .
57
+ ```
58
+
59
+ Run the project's typecheck, production build and relevant tests, reusing those
60
+ already registered with validation. In the real showcase, inspect a stateful
61
+ scenario before and after a compatible edit, a style/token edit, lazy content,
62
+ and scenario navigation. Review an existing draft when the project has one;
63
+ do not create or accept unrelated drafts just for migration. Check relevant
64
+ themes, viewport sizes and console/build diagnostics. Full Bun compilation and
65
+ production imports must remain valid alongside watched previews.
66
+
67
+ Ancestor-background contrast checks now cover string/number text props and
68
+ source-resolvable inert/optional layout classes. Investigate actual contrast or
69
+ unresolved-paint findings rather than suppressing them to complete the upgrade.
70
+
71
+ If preview loading fails, confirm the connected project/version, read its build
72
+ diagnostics, repair the named source and retry. For a migration regression,
73
+ preserve the failing fixture and diagnostics; restore only this upgrade's package
74
+ and lockfile changes if rollback is needed, then restart that runtime. Do not
75
+ revert unrelated edits, weaken validation or erase drafts.
76
+
77
+ Report the from/to installed versions, commands and rendered states actually
78
+ verified, unresolved findings, and the running showcase URL. Editing performance
79
+ depends on the project: the integration benchmark showed faster compatible edits
80
+ and lower transfer volume, but slower cold verification and no memory improvement.
@@ -152,6 +152,21 @@ ADS resolves the public alias, extracts Linaria using the shared atomic tag
152
152
  resolver, and registers compiled modules, CSS, fonts, images and workers as
153
153
  immutable MCP resources. The selected ADS framework controls JSX compilation.
154
154
 
155
+ In ADS 0.4.4, watched previews use a private incremental module graph; complete
156
+ Bun builds remain the path for `ads compile` and production-mode verification.
157
+ This is internal tooling. Do not add a project Vite server, preview plugin or
158
+ new compiler process to enable it. Compatible React/Preact edits update the
159
+ existing isolated iframe and can preserve state, focus and selection. Incompatible
160
+ updates, changed hook signatures or rejected-revision recovery can reset state.
161
+ Preview-local state is not a persistence contract or verification evidence.
162
+
163
+ The preview UI reuses bounded, scope-specific manifest revisions and asks for
164
+ changed records internally. Tool results remain graph references. Full-resource
165
+ reads and older-server fallback remain supported. Restart the project's ADS
166
+ runtime and reconnect after upgrading; changing an installed package does not
167
+ replace the running compiler. HTTP asset delivery is a separate, unreleased
168
+ experiment and is not required for these improvements.
169
+
155
170
  `ads compile .` builds all production previews for project builds or CI.
156
171
  `ads compile . --watch` runs the same source scheduler continuously.
157
172
  Programmatic project setup can call `compilePreviews` from
@@ -0,0 +1,51 @@
1
+ // The style-token rule: a CSS declaration's design values must come from tokens. Shared by
2
+ // `ads check` (owner, review and foundation CSS) and the consumer guard (application CSS).
3
+ import valueParser from "postcss-value-parser";
4
+ import { numericCssUnit, tokenLengthLiteral } from "./css-values.mjs";
5
+ import { isColorKeyword } from "./design-values.mjs";
6
+
7
+ /** Messages for one declaration. `review`: a development review file; `foundation`: a token sheet. */
8
+ export function styleTokenViolations(decl, { review = false, foundation = false } = {}) {
9
+ const violations = new Set();
10
+ if (decl.value.includes("__ds_expression__"))
11
+ violations.add(
12
+ "Cannot establish this interpolated design value from source. Use a source-resolvable shared token/mapping; unknown interpolation does not grant permission for private design values.",
13
+ );
14
+ valueParser(decl.value).walk((node) => {
15
+ if (node.type === "function" && node.value === "url") return false;
16
+ if (node.type === "word" && decl.prop.startsWith("--") && isColorKeyword(node.value))
17
+ violations.add("Component variables map shared Data; named colors also require shared tokens.");
18
+ if (
19
+ node.type === "word" &&
20
+ (/^#[\da-f]{3,8}$/i.test(node.value) ||
21
+ (tokenLengthLiteral(node.value) &&
22
+ !(
23
+ review &&
24
+ /^(?:(?:min-|max-)?(?:width|height|inline-size|block-size)|flex-basis|grid-template-columns|grid-template-rows)$/.test(decl.prop)
25
+ )) ||
26
+ ["s", "ms"].includes(numericCssUnit(node.value)))
27
+ )
28
+ violations.add(
29
+ "Use a token for colors, absolute/font-relative lengths (including ch), and durations. Unitless geometry and structural angle/viewport/container relationships remain valid.",
30
+ );
31
+ if (node.type === "function" && /^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color|color-mix|cubic-bezier)$/.test(node.value))
32
+ violations.add("Define color formulas and easing in tokens.");
33
+ if (node.type === "function" && /^(?:blur|brightness|contrast|drop-shadow|grayscale|hue-rotate|invert|saturate|sepia)$/.test(node.value))
34
+ violations.add("Define visual filter effects in tokens.");
35
+ if (node.type === "word" && /^ease(?:-in|-out|-in-out)?$/.test(node.value)) violations.add("Use a motion token for easing.");
36
+ if (
37
+ node.type === "word" &&
38
+ /^(?:color|background-color|(?:border|outline|caret|text-decoration|column-rule)(?:-[a-z]+)?-color|fill|stroke)$/.test(decl.prop) &&
39
+ /^[a-z]+$/i.test(node.value) &&
40
+ !/^(?:inherit|initial|unset|revert|currentcolor|transparent|none)$/i.test(node.value)
41
+ )
42
+ violations.add("Use a semantic color token.");
43
+ });
44
+ if (
45
+ /^(?:font-family|font-weight|z-index)$/.test(decl.prop) &&
46
+ !/^(?:var\(|inherit$|initial$|unset$|revert(?:-layer)?$|auto$)/.test(decl.value) &&
47
+ !(foundation && decl.prop === "font-weight" && /^(?:bolder|lighter)$/.test(decl.value))
48
+ )
49
+ violations.add("Use a semantic typography or layering token.");
50
+ return violations;
51
+ }
@@ -104,6 +104,11 @@ render facts. It does not execute project code or open another compiler. The con
104
104
  adapter consumes the CSS trees already parsed by the check, resolves ancestor backdrops
105
105
  and caches identical token-pair calculations within the check. It reports incomplete
106
106
  cascade/branch evidence explicitly; browser axe audits retain dynamic rendering coverage.
107
+ Class choices stay factored in the immutable render graph. The contrast adapter compares
108
+ all alternatives' paint facts without enumerating their Cartesian product; layout-only
109
+ choices can retain a known ancestor backdrop. Captured selector targets distinguish inert
110
+ class hooks from possible paint overrides. Native type queries identify string/number
111
+ text slots without treating arbitrary React/Preact children as plain text.
107
112
  Optional inputs and immediate directory membership use `optionalSourceText` and
108
113
  `sourceDirectoryFiles`; both observe the captured revision, including absence.
109
114
  `sourceCss` shares read-only PostCSS trees across requests on the same captured revision; transforms clone
@@ -526,6 +531,14 @@ Project JavaScript, styles, fonts and UI run only inside that App; the outer
526
531
  shell forwards resource bytes without applying project styles or executing its
527
532
  runtime. This keeps the host neutral while compositions retain their full skin.
528
533
 
534
+ Alternative HTTP preview asset delivery is deferred and excluded from this
535
+ release. Its bounded local proof improved first display, but showed no meaningful
536
+ verified-edit or acceptance gain and no clear process-memory improvement. Frame
537
+ cleanup needed an additional lifetime connection; broader framework, worker/Wasm,
538
+ resource-limit and capture/evidence coverage remains unfinished. External MCP
539
+ Apps still require the existing adapter. The released path therefore keeps MCP
540
+ resource delivery, with persistent-frame updates and bounded manifest reuse/deltas.
541
+
529
542
  The ADS host gives inline App documents an `about:srcdoc` base when the App
530
543
  provides no explicit base URL. Fragment links then stay inside their own document
531
544
  with native scrolling, history and events. The sandbox permits this local base;
@@ -677,14 +690,55 @@ no API visibility, render coverage, styling permission or runtime behavior.
677
690
 
678
691
  ### Incremental compilation and refresh
679
692
 
680
- `runScenarioCompiler` owns scheduling, validation, freshness and publication.
681
- ADS owns preview compilation with Bun, using the project's declared React or
682
- Preact framework and shared Linaria extraction. The application keeps its own
683
- production bundler. A single scheduler warms views sequentially with foreground
684
- priority, retains compiled output, and reuses per-file transforms and worker
685
- bundles. Native ADS gates run directly; project lint/build/test commands remain
686
- explicit integration checks. Explorer navigation and metadata are served
687
- independently of compilation and validation.
693
+ `runScenarioCompiler` remains the single scheduler for live feedback, source
694
+ validation, discovery, freshness and verified publication. Watched previews use
695
+ `createIncrementalPreviewBuilder`: a private Vite module graph with the same ADS
696
+ Linaria extraction, import optimization, spatial metadata and source identities
697
+ as complete builds. React Refresh and native Prefresh supply component signatures
698
+ and replacement. This is preview compilation, not a second analysis engine.
699
+ Unwatched builds and acceptance preparation retain the complete Bun builder.
700
+ The application retains its own production bundler.
701
+
702
+ Vite runs in middleware mode without a listening server, filesystem routes or
703
+ browser websocket. The builder snapshots transformed modules, CSS, local assets,
704
+ literal lazy imports and self-contained Bun worker output into the existing
705
+ immutable `ads://assets/…` graph. Module reads never compile live filesystem
706
+ contents. The existing scheduler fences the source revision before publishing;
707
+ project and draft roots own separate compiler sessions. The shared analysis
708
+ service continues to supply discovery and checking.
709
+
710
+ Watched manifests add optional `refresh: {version: 1, epoch}` and module metadata
711
+ `hot: {id, source}`. The ID is stable within that compiler session; `source` hashes
712
+ the lowered module before immutable dependency URI rewriting. This lets the
713
+ loader distinguish changed code from a changed dependency address. A bounded
714
+ rewrite cache avoids reparsing unchanged compiler output while still observing
715
+ output membership and worker content changes.
716
+
717
+ The existing sandboxed iframe remains alive for compatible updates. Its resource
718
+ loader evaluates changed framework boundaries, updates styles, and preserves
719
+ component state, input values, focus and selection where the framework permits.
720
+ It tracks already executed lazy modules and visited views too; unopened lazy
721
+ branches remain unloaded. Navigation still mounts the selected scenario normally.
722
+ Changed hook signatures follow the framework's reset semantics. Removed or
723
+ incompatible exports, compiler/configuration epoch changes, interrupted refresh,
724
+ and restoration of an already evaluated old revision require a clean frame.
725
+ A failed source check restores the last verified output and remains a failure;
726
+ state retention is never a substitute for validation or acceptance.
727
+
728
+ The internal graph is renewed when configuration/dependency manifests or the
729
+ captured original inputs of optimized dependencies change, on source-directory
730
+ membership changes that can alter resolution, or when
731
+ its retained input/module count exceeds 4096 or retained lowered source/code
732
+ exceeds 64 MiB. Browser retained module metadata is bounded at 4096 records and
733
+ materialized resource bodies at 64 MiB, with a clean-frame reopen at the next
734
+ mount. These are retention limits, not process RSS guarantees. Owned Vite,
735
+ extraction, worker and temporary-directory lifetimes end with their builder.
736
+ See [caching](CACHING.md#preview-restoration) for the content checks.
737
+
738
+ The [preview benchmark](../scripts/benchmarks/preview/README.md) records the
739
+ integrated measurement method and results. Frame removal, the V3/source-emission
740
+ proposal and HTTP delivery remain outside this release. This integration does
741
+ not claim to fix Chromium's raw corner pixels.
688
742
 
689
743
  New preview requests share one input-stamp capture per batch. After that
690
744
  asynchronous capture, scheduling reads the current candidate, publication and
@@ -693,7 +747,7 @@ lose a requested view or reuse coverage from a retired candidate.
693
747
 
694
748
  ```mermaid
695
749
  flowchart LR
696
- Edit[Source edit] --> Compile[Compile changes with Bun]
750
+ Edit[Source edit] --> Compile[Update private module graph]
697
751
  Compile --> Validate[Validate project and inspect registry in background]
698
752
  Compile --> Live[Unverified live resources]
699
753
  Live --> App[Compare selected dependency closure]
@@ -701,8 +755,8 @@ flowchart LR
701
755
  Compile --> Publish
702
756
  Publish --> App
703
757
  Validate -->|Failure| Revert[Restore last verified view]
704
- App --> Keep[Unchanged: keep mounted view]
705
- App --> Mount[Changed: remount selected view]
758
+ App --> Keep[Compatible: refresh within persistent frame]
759
+ App --> Mount[Incompatible or rollback: clean frame]
706
760
  ```
707
761
 
708
762
  Watched compilation provides immediate visual feedback while validation and
@@ -833,9 +887,10 @@ independent of background preparation, and resource integrity checks still apply
833
887
  A successful global revision does not require remounting an unchanged selected
834
888
  view. The App compares its static module/style/asset closure, retains DOM/form/
835
889
  scroll state when that closure matches, and reruns token/paint audits against the
836
- accepted manifest. A changed selected closure remounts through the project's
837
- adapter. Native ESM resources still obey digest checks and the existing bounded
838
- revision lifecycle; this is state-preserving refresh, not component-level HMR.
890
+ accepted manifest. Watched graphs refresh compatible framework boundaries when
891
+ the selected closure changes; complete bundled graphs remount through the
892
+ project's adapter. Native ESM resources still obey digest checks and the bounded
893
+ revision lifecycle described above.
839
894
  The visible preview retains its framing while replacement resources load. Kind
840
895
  and subject framing change only after a successful mount; structural padding is
841
896
  resolved before paint, including delayed framework commits. Font readiness and
package/docs/CACHING.md CHANGED
@@ -119,7 +119,7 @@ Only immutable archives share storage; live outputs and evidence stay isolated.
119
119
 
120
120
  ## Preview restoration
121
121
 
122
- The interactive Bun compiler keeps its incremental module/graph cache. Turbo is
122
+ The watched preview compiler keeps a private incremental module graph. Turbo is
123
123
  not launched on every edit. ADS reopens a matching complete graph without semantic
124
124
  scenario discovery or compiler startup: check cached registry/dependencies, verify
125
125
  immutable assets, match the successful guard evidence already attached to the
@@ -127,6 +127,45 @@ graph against current source/tool/runtime/Git/dependency state, fence inputs, an
127
127
  publish new session metadata. This native handoff does not invoke Turbo again. Missing, changed or corrupt artifacts fall back to compiling.
128
128
  Guard failures remain failures. Old live build evidence is never restored.
129
129
 
130
+ Each project/draft builder owns its Vite graph, lowered ADS modules, Linaria
131
+ extractions, worker bundles and resource-rewrite cache. No dev server is exposed.
132
+ Before reuse it compares recorded input **contents**, including evaluated style
133
+ imports, CSS imports inlined by PostCSS, public-barrel inputs and spatial token-sheet membership. Same size and
134
+ mtime are insufficient. Package/dependency manifests, configuration and tsconfig
135
+ changes replace the graph and its refresh epoch. Original optimized-dependency
136
+ inputs, including transitive CommonJS requires, are also content checked and
137
+ renew the graph when changed. Failed requests are not published;
138
+ restored or newly added inputs are evaluated on the next request.
139
+ Design-system directory membership and source dependency directories are observed
140
+ too. Additions/deletions renew the graph and frame: a new file can outrank an old
141
+ import resolution even when every previously imported file is unchanged.
142
+ Every preview entry loads the configured project stylesheet, including generated
143
+ Token and Brand views that do not use the project's scenario mount adapter.
144
+
145
+ The resource-rewrite cache retains one entry per current output file, keyed by
146
+ its bytes, dependency/style metadata and output membership. JavaScript worker
147
+ asset bytes participate so changing a worker into an unsupported module cannot
148
+ reuse an earlier successful rewrite. Immutable output graph hashes and the
149
+ scheduler's pre/post source fences still determine publication.
150
+
151
+ Retained graph/input count over 4096 or lowered source/code over 64 MiB renews the
152
+ compiler session on its next build. The iframe separately reopens at the next
153
+ mount if retained module metadata exceeds 4096 records or materialized bodies
154
+ exceed 64 MiB. These limits bound retained objects, not total process memory.
155
+ Closing a builder releases compiler/extraction workers and its temporary
156
+ `.ds/incremental/` directory. Complete Bun verification builds remain separate.
157
+
158
+ The App keeps up to six manifest revisions and 8 MiB of serialized graph metadata
159
+ per accepted/draft scope, sharing pending reads and discarding rejected requests.
160
+ Current build/tool status authorizes reuse; the cache itself never establishes
161
+ freshness. Live-to-verified handoff can reuse identical graph records. A changed
162
+ revision requests only differences from a known base, using the server's existing
163
+ retained graph history; unavailable history falls back to a full manifest.
164
+ Scope changes and teardown clear the cache, and late responses from an old scope
165
+ cannot populate the new one. Restarted compiler sessions require new metadata even
166
+ when graph bytes are unchanged. The original full-manifest resource remains
167
+ available to older clients, and older servers work through full-resource fallback.
168
+
130
169
  ## CI wiring
131
170
 
132
171
  Use the existing CLI and persist the artifact directory. No additional ADS cache
package/docs/CHANGELOG.md CHANGED
@@ -1,61 +1,74 @@
1
1
  # Changelog
2
2
 
3
- ## 0.4.3
3
+ ## Unreleased
4
+
5
+ ## 0.4.4
4
6
 
5
7
  <!-- ads-local-tests:start -->
6
- Local verification: **833/833 passed** with `bun run test`.
7
- Tested commit: `b461dfe801b0fb0871ae814a0d75cc1e5db47b3e`; Bun 1.4.4.
8
- Completed 2026-11-07T10:14:03.979Z (798 seconds).
8
+ Local verification: **860/860 passed** with `bun run test`.
9
+ Tested commit: `d8d9b2d093ce26d140c037f90e5c9087b8fed46d`; Bun 1.4.4.
10
+ Completed 2026-11-10T14:37:34.287Z (1344 seconds).
9
11
 
10
12
  <!-- ads-local-test-proof
11
13
  {
12
14
  "schema": 3,
13
- "version": "0.4.3",
14
- "commit": "b461dfe801b0fb0871ae814a0d75cc1e5db47b3e",
15
- "sourceSha256": "049f372686fea898cb3829668c6e3071c766bd18722c9270b26d596bf5e69937",
15
+ "version": "0.4.4",
16
+ "commit": "d8d9b2d093ce26d140c037f90e5c9087b8fed46d",
17
+ "sourceSha256": "2ff7cc61caabd96b928581e79ddbc1c6df459145c0039023c2f3400947d46131",
16
18
  "command": "bun run test",
17
19
  "result": "pass",
18
- "tests": 833,
19
- "pass": 833,
20
+ "tests": 860,
21
+ "pass": 860,
20
22
  "fail": 0,
21
23
  "skipped": 0,
22
24
  "groups": [
23
25
  {
24
26
  "name": "unit",
25
- "tests": 83,
26
- "pass": 83,
27
+ "tests": 91,
28
+ "pass": 91,
27
29
  "fail": 0,
28
30
  "skipped": 0,
29
- "reportSha256": "eaa05144b54ab4d694bbd66ab29c741d46eecbdef5eb6d9d5de5805b302f05c4"
31
+ "reportSha256": "896a8879bc0071d3bc822a9a5ee6b32ba78f47c69ac81045534c39bb2e9533c5"
30
32
  },
31
33
  {
32
34
  "name": "integration",
33
- "tests": 603,
34
- "pass": 603,
35
+ "tests": 617,
36
+ "pass": 617,
35
37
  "fail": 0,
36
38
  "skipped": 0,
37
- "reportSha256": "e7bf889b404194e73f0662ddc2a789dfc45e57190bf6afa9b3f0095f4b5aa1ec"
39
+ "reportSha256": "6ad851727bd92ee38143505e045d8cc7ee3624c0861510efde7beb8f7480d528"
38
40
  },
39
41
  {
40
42
  "name": "browser",
41
- "tests": 147,
42
- "pass": 147,
43
+ "tests": 152,
44
+ "pass": 152,
43
45
  "fail": 0,
44
46
  "skipped": 0,
45
- "reportSha256": "4f08212c482bf42a7914e1e51b89964a884e730827c7eafb60a2609d3c6f5285"
47
+ "reportSha256": "af3bcf2d9aeb6d80d073763ff346ec142c476c327c9e12b4827e3964c28b841d"
46
48
  }
47
49
  ],
48
50
  "testOverrides": {
49
- "ADS_BROWSER_WORKERS": "2"
51
+ "ADS_INTEGRATION_WORKERS": "1",
52
+ "ADS_BROWSER_WORKERS": "1"
50
53
  },
51
54
  "bun": "1.4.4",
52
- "completedAt": "2026-11-07T10:14:03.979Z",
53
- "durationMs": 798441,
54
- "logSha256": "8de81a9e0439a8ee1c3a4304e300f30f20a3e8844644b56610ca916c287f9d92"
55
+ "completedAt": "2026-11-10T14:37:34.287Z",
56
+ "durationMs": 1343621,
57
+ "logSha256": "dba1d323e6a2d4da20f000f86d75d8955c490d61c55f18765656f5d5bee8ae82"
55
58
  }
56
59
  -->
57
60
  <!-- ads-local-tests:end -->
58
61
 
62
+ - Load the configured project stylesheet in generated Token and Brand previews. Track inlined CSS import dependencies by contents so same-size/same-time token edits refresh correctly; include Preact refresh helpers in the private compiler graph.
63
+ - Stop draft watcher reconciliation when its controller closes, and skip previews retired while another draft refreshes.
64
+ - Update watched previews through a private incremental module graph inside the existing isolated iframe. Preserve state and focus for compatible React/Preact edits, refresh styles and lazy branches, and reopen safely for incompatible updates or rejected revisions. Keep full Bun builds and native acceptance gates.
65
+ - Reuse known preview manifests across polling and live-to-verified handoff. Internal MCP resource updates transfer changed records, with bounded per-scope caching and a full-manifest fallback for expired history; agent-facing tool results remain graph references.
66
+ - Add the 0.4.3-to-0.4.4 migration guide and update agent runtime guidance for incremental previews, conditional state retention and verified evidence. Experimental HTTP delivery and source-emission/V3 work are excluded.
67
+
68
+ - Keep ancestor-background contrast checks active for card text supplied through string/number props, inert class hooks and optional layout-only classes. Preserve unresolved diagnostics for paint overrides and unknown children.
69
+
70
+ ## 0.4.3
71
+
59
72
  - Audit contrast on the project's canvas without decorative showcase staging, preserving subject framing. Measure image shape against its content or CSS sizing box so borders, padding and rotated bounding rectangles do not cause false failures.
60
73
 
61
74
  - Detect text contrast across source-resolvable component composition, including inherited ancestor backgrounds and forwarded children; report uncertain cascades for rendered auditing without requiring custom token-pair declarations.
package/docs/GUIDE.md CHANGED
@@ -14,6 +14,11 @@ foundation scaffolding. Default initialization creates an empty design system;
14
14
  `--include-starter` adds the shared example design and application source. ADS
15
15
  adds no runtime dependency to the application's shipped UI.
16
16
 
17
+ For an existing installation, use the [ads-migrate skill](../skills/ads-migrate/SKILL.md).
18
+ The [0.4.3 → 0.4.4 guide](../skills/ads-migrate/references/0.4.3-to-0.4.4.md)
19
+ covers dependency updates, restarting the managed runtime and checking incremental
20
+ previews without rewriting project components or deleting active drafts.
21
+
17
22
  ## Use ADS through MCP
18
23
 
19
24
  Connect your coding agent using the [MCP client setup](MCP.md#connect-codex-or-claude).
@@ -89,6 +94,13 @@ notifications. The portable [capture guide](../skills/ads-designer/references/ca
89
94
  explains screenshot setup, named targets, limits and comparison usage; MCP serves
90
95
  the same guide at `ads://guides/captures`.
91
96
 
97
+ Watched previews keep the isolated frame alive during compatible edits. Component
98
+ state, entered text and focus can survive code and style updates; changed hook
99
+ signatures follow React or Preact's reset rules. Incompatible module changes and
100
+ restoring rejected revisions may reset the preview. “Checking changes…” is live
101
+ feedback, not acceptance: source gates and selected browser checks still decide
102
+ whether the revision passes. Application production builds are unchanged.
103
+
92
104
  ## Implementation support
93
105
 
94
106
  Linaria is required for component and pattern styling. Projects choose their
@@ -599,9 +611,13 @@ there is no custom pair declaration to remember. Transparent wrappers preserve t
599
611
  backdrop; translucent token layers need a known opaque ancestor. Composed text can use a
600
612
  known inherited font size/weight. Hidden and disabled text is excluded; matching text and
601
613
  background tokens are still an error when the source proves that text is rendered.
614
+ Text supplied through a `string` or `number` prop is checked too. Literal class hooks
615
+ do not hide the backdrop when no captured paint selector targets them. Optional classes
616
+ that only change layout preserve contrast evidence; every alternative must establish
617
+ the same paint and visibility facts.
602
618
 
603
619
  This composition pass does not guess the browser cascade. Competing classes, differing
604
- class/interpolation alternatives, unknown prop spreads or components, conditional or
620
+ paint/interpolation alternatives, unknown prop spreads or components, conditional or
605
621
  descendant paint selectors, gradients, opacity, filters, out-of-flow positioning and
606
622
  missing backdrops produce `component-contrast-unresolved` info where contrast evidence
607
623
  is incomplete. SVG text, native control value/placeholder text and dynamically generated
@@ -819,13 +835,17 @@ selected by default; `--port 4185` selects a fixed port.
819
835
  The client negotiates the current modern MCP protocol, discovers menus with
820
836
  `ads_tokens`/`ads_scenarios`, invokes `ads_show_scenario` and renders
821
837
  Apps through the official bridge. It refreshes menus on catalogue notifications
822
- and refreshes the active scenario in the same App after a successful build. Errors identify
838
+ and refreshes the active scenario in the same App after a successful build.
839
+ Compatible React/Preact edits retain component state, typed values and focus.
840
+ Edits that change hook signatures or module boundaries can reset state; failed
841
+ checks restore verified output. Errors identify
823
842
  stale retained output. Its neutral header and left pane align and collapse
824
843
  together. Themes flow through the Apps host context. No project catalogue pages
825
844
  or direct component imports are used by this client.
826
845
 
827
846
  The project owns implementations, colocated scenarios/fixtures, foundation
828
- CSS and a framework mount adapter. ADS supplies its native Bun preview compiler.
847
+ CSS and a framework mount adapter. ADS runs its preview compiler on Bun, using
848
+ incremental modules for watched previews and complete bundles for verification.
829
849
  The starter and init provide the mount under `design-system/showcase/mcp/`.
830
850
  Configure the framework; ADS compiles every scenario into one shared preview graph:
831
851