@reqvire-org/ads 0.3.53 → 0.4.0
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.
- package/README.md +9 -8
- package/dist/assets.mjs +1 -1
- package/dist/behaviors.mjs +6 -5
- package/dist/boundaries.mjs +5 -5
- package/dist/browser-audit.mjs +10 -5
- package/dist/bun-compiler.mjs +14 -7
- package/dist/check-service.mjs +83 -0
- package/dist/check.mjs +16 -17
- package/dist/cli.mjs +4 -2
- package/dist/config.mjs +17 -40
- package/dist/contracts.d.mts +9 -0
- package/dist/fonts-generated.mjs +2 -0
- package/dist/generated-entries.mjs +131 -0
- package/dist/icons.mjs +1 -1
- package/dist/init.mjs +11 -32
- package/dist/layers.mjs +7 -3
- package/dist/lint-config.mjs +4 -2
- package/dist/mcp/catalog.mjs +2 -1
- package/dist/mcp/context.mjs +3 -3
- package/dist/mcp/drafts.mjs +136 -121
- package/dist/mcp/mutations.mjs +65 -19
- package/dist/mcp/preview-watch.mjs +31 -5
- package/dist/mcp/prompts.mjs +1 -1
- package/dist/mcp/server.mjs +79 -38
- package/dist/mcp/showcase-host.mjs +20 -7
- package/dist/oxlint.mjs +3 -2
- package/dist/program-cache.mjs +36 -0
- package/dist/public-api.mjs +2 -1
- package/dist/scenarios-compiler.mjs +82 -14
- package/dist/scenarios-vite.mjs +1 -1
- package/dist/scenarios.mjs +4 -3
- package/dist/showcase/client.bundle.js +1 -1
- package/dist/showcase/index.html +2 -2
- package/dist/skills/ads-break-ui/SKILL.md +25 -28
- package/dist/skills/ads-break-ui/references/behaviors.md +7 -6
- package/dist/skills/ads-break-ui/references/captures.md +7 -32
- package/dist/skills/ads-break-ui/references/contracts.md +58 -25
- package/dist/skills/ads-break-ui/references/drafts.md +59 -43
- package/dist/skills/ads-break-ui/references/evidence.md +1 -1
- package/dist/skills/ads-break-ui/references/guarded-editing.md +58 -47
- package/dist/skills/ads-break-ui/references/review.md +9 -8
- package/dist/skills/ads-break-ui/references/scenarios.md +1 -1
- package/dist/skills/ads-break-ui/references/validation.md +8 -4
- package/dist/skills/ads-break-ui/references/workflows.md +15 -8
- package/dist/skills/ads-designer/SKILL.md +25 -28
- package/dist/skills/ads-designer/references/accessibility.md +9 -5
- package/dist/skills/ads-designer/references/behaviors.md +7 -6
- package/dist/skills/ads-designer/references/captures.md +7 -32
- package/dist/skills/ads-designer/references/cli.md +5 -1
- package/dist/skills/ads-designer/references/contracts.md +58 -25
- package/dist/skills/ads-designer/references/drafts.md +59 -43
- package/dist/skills/ads-designer/references/evidence.md +1 -1
- package/dist/skills/ads-designer/references/guarded-editing.md +58 -47
- package/dist/skills/ads-designer/references/performance.md +3 -2
- package/dist/skills/ads-designer/references/review.md +9 -8
- package/dist/skills/ads-designer/references/scenarios.md +1 -1
- package/dist/skills/ads-designer/references/validation.md +8 -4
- package/dist/skills/ads-designer/references/workflows.md +15 -8
- package/dist/skills/ads-import/SKILL.md +25 -28
- package/dist/skills/ads-import/references/behaviors.md +7 -6
- package/dist/skills/ads-import/references/captures.md +7 -32
- package/dist/skills/ads-import/references/cli.md +5 -1
- package/dist/skills/ads-import/references/contracts.md +58 -25
- package/dist/skills/ads-import/references/drafts.md +59 -43
- package/dist/skills/ads-import/references/evidence.md +1 -1
- package/dist/skills/ads-import/references/guarded-editing.md +58 -47
- package/dist/skills/ads-import/references/review.md +9 -8
- package/dist/skills/ads-import/references/scenarios.md +1 -1
- package/dist/skills/ads-import/references/validation.md +8 -4
- package/dist/skills/ads-import/references/workflows.md +15 -8
- package/dist/skills/ads-motion/SKILL.md +25 -28
- package/dist/skills/ads-motion/references/behaviors.md +7 -6
- package/dist/skills/ads-motion/references/captures.md +7 -32
- package/dist/skills/ads-motion/references/contracts.md +58 -25
- package/dist/skills/ads-motion/references/drafts.md +59 -43
- package/dist/skills/ads-motion/references/evidence.md +1 -1
- package/dist/skills/ads-motion/references/guarded-editing.md +58 -47
- package/dist/skills/ads-motion/references/review.md +9 -8
- package/dist/skills/ads-motion/references/scenarios.md +1 -1
- package/dist/skills/ads-motion/references/validation.md +8 -4
- package/dist/skills/ads-motion/references/workflows.md +15 -8
- package/dist/skills/ads-port/SKILL.md +25 -28
- package/dist/skills/ads-port/references/behaviors.md +7 -6
- package/dist/skills/ads-port/references/captures.md +7 -32
- package/dist/skills/ads-port/references/cli.md +5 -1
- package/dist/skills/ads-port/references/contracts.md +58 -25
- package/dist/skills/ads-port/references/drafts.md +59 -43
- package/dist/skills/ads-port/references/evidence.md +1 -1
- package/dist/skills/ads-port/references/guarded-editing.md +58 -47
- package/dist/skills/ads-port/references/native-implementation.md +6 -6
- package/dist/skills/ads-port/references/review.md +9 -8
- package/dist/skills/ads-port/references/scenarios.md +1 -1
- package/dist/skills/ads-port/references/validation.md +8 -4
- package/dist/skills/ads-port/references/workflows.md +15 -8
- package/dist/starters/preact/design-system/components/Layout/Grid/Grid.ads.contract.ts +6 -0
- package/dist/starters/preact/design-system/review/token-preview/TokenPreview.ads.contract.ts +6 -0
- package/dist/starters/preact/ds.config.json +0 -14
- package/dist/starters/react/README.md +9 -5
- package/dist/starters/react/design-system/components/Actions/Button/Button.ads.exports.ts +1 -0
- package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.ads.exports.ts +1 -0
- package/dist/starters/react/design-system/components/Content/Icon/Icon.ads.exports.ts +1 -0
- package/dist/starters/react/design-system/components/Content/Image/Image.ads.exports.ts +1 -0
- package/dist/starters/react/design-system/components/Content/Logo/Logo.ads.exports.ts +1 -0
- package/dist/starters/react/design-system/components/Forms/TextField/TextField.ads.exports.ts +1 -0
- package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.contract.ts +6 -0
- package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.exports.ts +1 -0
- package/dist/starters/react/design-system/controllers/Palette/Palette.ads.exports.ts +1 -0
- package/dist/starters/react/design-system/index.ts +3 -7
- package/dist/starters/react/design-system/patterns/Search/SearchBar/SearchBar.ads.exports.ts +1 -0
- package/dist/starters/react/design-system/review/brand-preview/BrandPreview.ads.exports.ts +1 -0
- package/dist/starters/react/design-system/review/demo-frame/DemoFrame.ads.exports.ts +1 -0
- package/dist/starters/react/design-system/review/grid-cell/GridCell.ads.exports.ts +1 -0
- package/dist/starters/react/design-system/review/index.ts +4 -3
- package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.ads.exports.ts +1 -0
- package/dist/starters/react/design-system/review/token-preview/TokenPreview.ads.contract.ts +6 -0
- package/dist/starters/react/design-system/review/token-preview/TokenPreview.ads.exports.ts +1 -0
- package/dist/starters/react/design-system/styles.css +1 -0
- package/dist/starters/react/ds.config.json +0 -14
- package/dist/style-boundaries.mjs +7 -6
- package/dist/test-boundaries.mjs +2 -2
- package/dist/themes-watch.mjs +9 -3
- package/dist/token-fixtures.mjs +1 -1
- package/dist/unit-contracts.mjs +38 -4
- package/dist/units.mjs +16 -91
- package/dist/validation-checks.mjs +7 -1
- package/docs/ADS.md +10 -10
- package/docs/ARCHITECTURE.md +79 -43
- package/docs/BEHAVIORS.md +8 -7
- package/docs/CACHING.md +15 -6
- package/docs/CHANGELOG.md +61 -12
- package/docs/COMPARISON.md +1 -1
- package/docs/CONTRACTS.md +10 -25
- package/docs/GUIDE.md +64 -55
- package/docs/MCP.md +116 -151
- package/package.json +1 -1
- package/dist/contract-migration.mjs +0 -110
- package/dist/mcp/draft-exports.mjs +0 -40
- package/dist/mcp/edit-preparation.mjs +0 -115
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -285,8 +285,8 @@ checks retain their scope; it introduces no new package-CSS certification gate.
|
|
|
285
285
|
For example, Floating UI's `computePosition` can supply `x` and `y` to an
|
|
286
286
|
allowlisted producer's `style.setProperty("--ds-popover-x", ...)` and
|
|
287
287
|
`style.setProperty("--ds-popover-y", ...)`; project Linaria owns positioning
|
|
288
|
-
rules and visual treatment.
|
|
289
|
-
`
|
|
288
|
+
rules and visual treatment. Declare those exact properties in the owner contract's
|
|
289
|
+
`styles.writes`. Clean up positioning observers on unmount.
|
|
290
290
|
The project preview compiler bundles used library code into the normal MCP App
|
|
291
291
|
resource graph; declarations alone do not load packages or change its sandbox.
|
|
292
292
|
|
|
@@ -309,15 +309,40 @@ side effects, rather than the controller directory name.
|
|
|
309
309
|
|
|
310
310
|
## The showcase is the shared design workspace
|
|
311
311
|
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
312
|
+
Every MCP source change is a tracked proposal: `ads-drafts/` source in explicit
|
|
313
|
+
`.ads` files, with canonical target mappings and baseline fingerprints. Only
|
|
314
|
+
`ads_accept` of an exact draft revision writes accepted source. Production
|
|
315
|
+
discovery/imports exclude drafts.
|
|
316
|
+
|
|
317
|
+
Ownership makes drafts independent. Every authored file has one owner, and an owner
|
|
318
|
+
is in at most one open draft, so concurrent clients edit different owners and drafts
|
|
319
|
+
never share a file. A draft carries only its owners' files; a companion such as
|
|
320
|
+
`ds.config.json` joins when the draft changes it. Shared entries are generated from
|
|
321
|
+
owned files: the public barrel and review entry from each owner's
|
|
322
|
+
`<Owner>.ads.exports.ts` (its named re-exports, copied with rebased paths, so a product
|
|
323
|
+
build never includes an exports file), the styles entry from the canonical token sheets, the theme
|
|
324
|
+
files from the token halves. Style permissions live in the owner's contract. ADS
|
|
325
|
+
therefore never merges: if accepted source changes under a draft (a direct edit or a
|
|
326
|
+
Git pull), acceptance reports a baseline conflict and the draft is recreated.
|
|
327
|
+
|
|
328
|
+
There is one runtime and one compiler process per project. Generated preview
|
|
329
|
+
workspaces (`.ds/draft-previews/<id>/project`) retain the normal project layout and
|
|
330
|
+
public imports while overlaying proposed owner files and declared draft dependencies,
|
|
331
|
+
with the generated entries regenerated. The project's compiler process hosts each
|
|
332
|
+
draft workspace as an in-process instance listed in a control file, and one scheduler
|
|
333
|
+
runs their builds in turn: the viewed draft first, then the project, then background
|
|
334
|
+
work. A draft's preview is a view of its workspace served by the project's showcase,
|
|
335
|
+
in comparison (`?draft=<id>`) or alone (`/draft/<id>/`, the same client with that
|
|
336
|
+
workspace's MCP endpoint). Only these workspaces skip acceptance validation for fast
|
|
337
|
+
feedback. A draft's own edits and the viewed draft resync at once; other drafts
|
|
338
|
+
behind an accepted-source change catch up in the background.
|
|
339
|
+
|
|
340
|
+
Acceptance fences the exact reviewed revision, builds a candidate copy and rechecks
|
|
341
|
+
live inputs before publication. When the draft's workspace holds the same inputs as
|
|
342
|
+
the candidate, `ads check` and the browser renders run there, through the project's
|
|
343
|
+
compiler and host, so a dry run followed by acceptance of the same revision reuses its
|
|
344
|
+
check and audit results. Pattern/composition and token-group draft dependencies
|
|
345
|
+
resolve to normal accepted source after promotion.
|
|
321
346
|
The [draft guide](../skills/ads-designer/references/drafts.md) defines lifecycle,
|
|
322
347
|
completion requirements, build integration and recovery.
|
|
323
348
|
|
|
@@ -541,10 +566,10 @@ worker discovery; accepted comparison metadata is independently revision-fenced.
|
|
|
541
566
|
The response's `discovery` distinguishes current, pending and failed metadata
|
|
542
567
|
from the exact proposal revision and the actual preview build. Superseded worker
|
|
543
568
|
results cannot replace newer requests; drop/shutdown retires their state/worker.
|
|
544
|
-
Preview analysis
|
|
545
|
-
source trees across edits; module lookups are
|
|
546
|
-
cannot inherit old resolution results
|
|
547
|
-
|
|
569
|
+
Preview analysis and checks retain a bounded set of TypeScript programs and
|
|
570
|
+
unchanged source trees across edits (`program-cache.mjs`); module lookups are
|
|
571
|
+
refreshed so added/deleted files cannot inherit old resolution results, and a changed
|
|
572
|
+
file is always parsed again. Watched graphs include requested scenario roots and their dependencies,
|
|
548
573
|
preserving roots used by other mounted Apps; untouched catalogue entries are not
|
|
549
574
|
compiled until requested. Unwatched full builds retain complete entry coverage.
|
|
550
575
|
Snapshot publication fences source edits during inspection. This cache supplies
|
|
@@ -615,10 +640,12 @@ of the accepted/draft preview lane. They never suspend Explorer's compiler or
|
|
|
615
640
|
make a cold selection wait for a browser verification suite. Existing publications
|
|
616
641
|
remain readable while interactive source changes compile.
|
|
617
642
|
|
|
618
|
-
For managed resource previews, ADS requests
|
|
619
|
-
through
|
|
620
|
-
|
|
621
|
-
|
|
643
|
+
For managed resource previews, ADS requests the scenarios in production mode
|
|
644
|
+
through the reviewed draft's workspace, compiled by the project's compiler and
|
|
645
|
+
served by its host. Only a candidate without such a workspace gets a preview host
|
|
646
|
+
of its own; its compiler is parked after production publication while the host
|
|
647
|
+
continues serving that immutable graph to registered browser verification. Either
|
|
648
|
+
way the incremental graph is closed before production compilation starts.
|
|
622
649
|
Warming an already-current selection does not restart or wait for that compiler.
|
|
623
650
|
Production reuse requires a successful production build of the exact inputs,
|
|
624
651
|
not merely a previously compiled development graph. Project-owned additional
|
|
@@ -715,9 +742,9 @@ sandboxed App the requested viewport. Project runtime, fonts and styles remain
|
|
|
715
742
|
inside the App resource graph. The image excludes showcase chrome.
|
|
716
743
|
|
|
717
744
|
Captures exist only when requested. `ads_capture` replaces current and removes any
|
|
718
|
-
candidate for that scenario/target
|
|
719
|
-
|
|
720
|
-
|
|
745
|
+
candidate for that scenario/target; with a draft and its exact revision it renders
|
|
746
|
+
current and candidate under matching settings without changing live source.
|
|
747
|
+
Acceptance and its dry run take no screenshots.
|
|
721
748
|
A new scenario has no fabricated baseline. Final freshness/conflict checks precede
|
|
722
749
|
image publication. Matching accepted source promotes candidate to current.
|
|
723
750
|
|
|
@@ -817,7 +844,16 @@ did not. The audit also renders what a scenario shows only after someone acts on
|
|
|
817
844
|
`aria-haspopup` controls open, and hovers and focuses controls for contrast. Each worker lists what
|
|
818
845
|
every render could measure, then assigns targets in request order, so which render measures a shared
|
|
819
846
|
control does not depend on page speed. Its result states what it covered, and what it skipped is an
|
|
820
|
-
info item per reason.
|
|
847
|
+
info item per reason. `mcp.auditPages` (1–16, default 4) sets how many pages render at once.
|
|
848
|
+
|
|
849
|
+
The audit runs in two places. Draft acceptance audits per `acceptance.browserAudit`:
|
|
850
|
+
`"owners"` (default) the draft owners' own UI scenarios, `"affected"` every scenario
|
|
851
|
+
the change reaches through imports (all of them for shared configuration, foundation
|
|
852
|
+
or token changes), `false` none. The cost of an affected audit grows with how widely
|
|
853
|
+
the owner is used, so the full audit of everything a series of drafts reached runs as
|
|
854
|
+
a stage: `ads_validate` with the validation policy and `scope:"changed"`, before a
|
|
855
|
+
commit or release. A dry run's audit is remembered by candidate revision and selection,
|
|
856
|
+
so accepting that revision does not render again.
|
|
821
857
|
|
|
822
858
|
Static errors split by what they stop. A preview session the audit starts renders despite policy
|
|
823
859
|
errors, records no pass, and reports them with the audit's findings; the audit still exits non-zero.
|
|
@@ -900,18 +936,22 @@ Build reports expose queued, validation, compilation and publication progress.
|
|
|
900
936
|
A timed-out preview request marks the builder stalled; the next explicit request
|
|
901
937
|
restarts it within the same MCP session. A running process alone is not freshness.
|
|
902
938
|
|
|
903
|
-
Opt-in MCP editing makes validation part of the write operation. The agent
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
939
|
+
Opt-in MCP editing makes validation part of the write operation. The agent edits a
|
|
940
|
+
draft of one or more owners (file contents or a Git unified diff) and accepts it. ADS
|
|
941
|
+
resolves file ownership, takes the draft's files as they are and validates a
|
|
942
|
+
temporary project copy with architecture checks, registered lint rules and project
|
|
943
|
+
validation scripts.
|
|
908
944
|
The temporary copy contains the relevant input graph and patched files, with room
|
|
909
945
|
for 100,000 files / 2 GiB. Unrelated native artifacts are not copied. Declared extra
|
|
910
946
|
inputs support project commands that read data outside the UI graph. When
|
|
911
947
|
`acceptance.behaviorChecks` is true, affected registered behavior checks, including
|
|
912
948
|
consumers of a changed shared controller, run in the isolated candidate project.
|
|
913
|
-
Architecture batch checks use the internal pinned Turbo runner
|
|
914
|
-
platform binary; no global Turbo or runtime dependency installer is
|
|
949
|
+
Architecture batch checks from the CLI and CI use the internal pinned Turbo runner
|
|
950
|
+
and its installed platform binary; no global Turbo or runtime dependency installer is
|
|
951
|
+
invoked. The MCP server and its preview compiler instead run them in one warm worker
|
|
952
|
+
thread (`check-service.mjs`): it keeps its TypeScript programs and parsed sources, so
|
|
953
|
+
a check after an edit reparses only what changed, and an exact repeat of the same
|
|
954
|
+
inputs returns the remembered passing report. Local artifact
|
|
915
955
|
reuse is enabled by default and fenced by current input/tool/runtime/Git state;
|
|
916
956
|
policy results, browser evidence, locks and baselines are never task outputs.
|
|
917
957
|
Project scripts remain uncached without a known deterministic contract. The warm
|
|
@@ -968,18 +1008,15 @@ replace the managed process while retaining the MCP connection. Normal build gat
|
|
|
968
1008
|
remain in place for source changes made through other editors; preview review remains
|
|
969
1009
|
necessary after either editing path.
|
|
970
1010
|
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
project bindings and reports unresolved mappings. Neither preparation changes live
|
|
976
|
-
source or substitutes for guarded application and rendered review.
|
|
1011
|
+
Genuinely coupled owners share one draft (up to 64 owners), validated as a single
|
|
1012
|
+
complete candidate and published together. Token-sample reconciliation writes into
|
|
1013
|
+
a draft, preserves project bindings and reports unresolved mappings; it never
|
|
1014
|
+
changes live source or substitutes for rendered review and acceptance.
|
|
977
1015
|
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
before writing, so coupled changes do not need a guard bypass.
|
|
1016
|
+
No owner edits a shared entry. An owner's public names, its style permissions and its
|
|
1017
|
+
token sheets are its own files; ADS regenerates the barrels and the styles entry in
|
|
1018
|
+
the candidate, and deletes an empty `.gitkeep` itself when accepted source is added
|
|
1019
|
+
beneath it. Coupled changes therefore need no companion edits or guard bypass.
|
|
983
1020
|
|
|
984
1021
|
The architecture makes that inspection practical. A public export has an owning
|
|
985
1022
|
source and addressable preview coverage. Token definitions expose its visual
|
|
@@ -1080,8 +1117,7 @@ Shared token references remain visible across the project. Component state and
|
|
|
1080
1117
|
implementation variables retain their existing ownership boundaries. Project checks
|
|
1081
1118
|
may use `inspectTokenOrigins` to audit more specific shared alias relationships;
|
|
1082
1119
|
core Data/UX/Skin separation does not depend on opting into such a check. ADS does
|
|
1083
|
-
not hardcode a spacing scale or palette.
|
|
1084
|
-
ordinary owner drafts, candidate gates and rollback.
|
|
1120
|
+
not hardcode a spacing scale or palette.
|
|
1085
1121
|
|
|
1086
1122
|
Preview scheduling prunes standard generated output trees before allocating OS
|
|
1087
1123
|
watches and computing source freshness. Explicit source roots retain priority;
|
package/docs/BEHAVIORS.md
CHANGED
|
@@ -19,7 +19,8 @@ or assume a renderer/library supplied by an MCP host. The framework field select
|
|
|
19
19
|
compilation/mounting; controller checks also validate runtime imports. Type-only
|
|
20
20
|
UI references are allowed, but shared controllers cannot import component/pattern
|
|
21
21
|
runtime implementations. Keep business data in application adapters. Measured
|
|
22
|
-
style writes retain exact
|
|
22
|
+
style writes retain the exact properties declared in the owner contract's
|
|
23
|
+
`styles.writes`; they do not allow
|
|
23
24
|
shared-token overrides or an extra styling layer.
|
|
24
25
|
These gates inspect supported direct imports, markup and style boundaries.
|
|
25
26
|
External package internals and delegated DOM behavior still require source,
|
|
@@ -28,7 +29,7 @@ build and browser review; declaring a dependency does not prove it is headless.
|
|
|
28
29
|
Register owner behavior in `<Owner>.ads.contract.ts` with actual API and
|
|
29
30
|
implementation references. The
|
|
30
31
|
[contract reference](CONTRACTS.md) covers static authoring, `.ads.behavior.spec.ts`,
|
|
31
|
-
declarative `exercises
|
|
32
|
+
declarative `exercises` and required browser checks.
|
|
32
33
|
A contract declaration alone is not passing evidence. Use
|
|
33
34
|
`auditBehaviorPaints(frame)` after relevant binding updates to repeat the current
|
|
34
35
|
App's generic paint audit, in addition to assertions for the named guarantee.
|
|
@@ -36,7 +37,7 @@ App's generic paint audit, in addition to assertions for the named guarantee.
|
|
|
36
37
|
## Development boundary
|
|
37
38
|
|
|
38
39
|
Production includes real components, controllers, tokens and compiled styles.
|
|
39
|
-
Scenarios and fixtures are included only in previews.
|
|
40
|
+
Scenarios and fixtures are included only in previews. Owner contracts and test
|
|
40
41
|
files are development/tooling inputs. Runtime imports and public re-exports of
|
|
41
42
|
those inputs are rejected, including dynamic imports and aliases.
|
|
42
43
|
|
|
@@ -378,10 +379,10 @@ When `acceptance.behaviorChecks` is true, guarded mutations execute affected
|
|
|
378
379
|
registered behavior contracts after mandatory native ADS gates
|
|
379
380
|
and configured project checks, before writing source. Imported shared
|
|
380
381
|
controller changes also select dependent contracts conservatively. Rejected and
|
|
381
|
-
dry-run
|
|
382
|
-
To check a
|
|
383
|
-
|
|
384
|
-
|
|
382
|
+
dry-run acceptances publish no source changes. Verification output stays under `.ds/`.
|
|
383
|
+
To check a draft, call `ads_accept({id, revision, dryRun:true})`. This checks the
|
|
384
|
+
candidate using the acceptance policy, including affected behavior contracts and
|
|
385
|
+
their browser preview when enabled, rendered through the project's own compiler.
|
|
385
386
|
`validation.behaviorChecks` separately controls validation, while explicit
|
|
386
387
|
`ads_verify` always runs requested tests. Candidate evidence
|
|
387
388
|
is not persisted as passing evidence for live source. `ads_verify` selects checks
|
package/docs/CACHING.md
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
# Batch task caching
|
|
2
2
|
|
|
3
|
-
ADS uses its pinned Turborepo dependency internally for architecture batch tasks
|
|
4
|
-
Projects do not install Turbo, create `turbo.json`, or choose
|
|
5
|
-
Local caching is enabled out of the box for `ads check` and the
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
ADS uses its pinned Turborepo dependency internally for architecture batch tasks
|
|
4
|
+
run by the CLI and CI. Projects do not install Turbo, create `turbo.json`, or choose
|
|
5
|
+
between backends. Local caching is enabled out of the box for `ads check` and the
|
|
6
|
+
source-check stage of `ads validate`. The synchronous exported `checkProject`
|
|
7
|
+
function remains the analysis primitive.
|
|
8
|
+
|
|
9
|
+
The MCP server and its preview compiler do not start a Turbo task per check. They run
|
|
10
|
+
`ads check` in one warm worker thread (`check-service.mjs`) that keeps its TypeScript
|
|
11
|
+
programs and parsed sources (`program-cache.mjs`): a check after an edit reparses only
|
|
12
|
+
what changed, and an exact repeat of the same inputs (by the same content key the
|
|
13
|
+
Turbo task uses) returns the remembered passing report. Failing reports are not
|
|
14
|
+
remembered. Draft acceptance runs its check in the draft's preview workspace, a
|
|
15
|
+
stable path, so a dry run followed by acceptance of the same revision is an exact
|
|
16
|
+
repeat; the dry run's accessibility audit is likewise remembered by candidate
|
|
17
|
+
revision and scenario selection. ADS invokes
|
|
9
18
|
the already-installed platform binary directly. It never runs Turbo's automatic
|
|
10
19
|
repair installer; a missing binary reports `ADS_TASK_RUNTIME_MISSING` and asks
|
|
11
20
|
for dependency reinstallation with optional platform packages enabled.
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -1,34 +1,83 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.
|
|
3
|
+
## 0.4.0
|
|
4
4
|
|
|
5
5
|
<!-- ads-local-tests:start -->
|
|
6
|
-
Local verification: **
|
|
7
|
-
Tested commit: `
|
|
8
|
-
Completed 2026-11-
|
|
6
|
+
Local verification: **779/779 passed** with `ADS_TEST_BUN=1 npm test`.
|
|
7
|
+
Tested commit: `5fe8287d965f4138d4371a19f96d906c1be38bfc`; Node v24.13.0, Bun 1.4.1.
|
|
8
|
+
Completed 2026-11-04T02:37:52.914Z (2021 seconds).
|
|
9
9
|
|
|
10
10
|
<!-- ads-local-test-proof
|
|
11
11
|
{
|
|
12
12
|
"schema": 1,
|
|
13
|
-
"version": "0.
|
|
14
|
-
"commit": "
|
|
15
|
-
"sourceSha256": "
|
|
13
|
+
"version": "0.4.0",
|
|
14
|
+
"commit": "5fe8287d965f4138d4371a19f96d906c1be38bfc",
|
|
15
|
+
"sourceSha256": "a4566093dce1f89b0767ce73d1eae7ee7f41f01490409153cf9e302c32d0fa44",
|
|
16
16
|
"command": "ADS_TEST_BUN=1 npm test",
|
|
17
17
|
"result": "pass",
|
|
18
|
-
"tests":
|
|
19
|
-
"pass":
|
|
18
|
+
"tests": 779,
|
|
19
|
+
"pass": 779,
|
|
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-11-
|
|
26
|
-
"durationMs":
|
|
27
|
-
"logSha256": "
|
|
25
|
+
"completedAt": "2026-11-04T02:37:52.914Z",
|
|
26
|
+
"durationMs": 2020694,
|
|
27
|
+
"logSha256": "1f6b98b02b780248fea700a41b2a2fd191622c7d002c7c93fc3819afe1d694fb"
|
|
28
28
|
}
|
|
29
29
|
-->
|
|
30
30
|
<!-- ads-local-tests:end -->
|
|
31
31
|
|
|
32
|
+
- `mcp.previewBuildTimeoutMs` sets how long a preview waits for its build,
|
|
33
|
+
including the first build after the MCP server starts (1000–3600000 ms). The
|
|
34
|
+
default rises from 30 seconds to 5 minutes, so slower computers finish the
|
|
35
|
+
first build.
|
|
36
|
+
- Only `.ads.`-marked development files are recognized. Unmarked
|
|
37
|
+
`Scenario.tsx`, `*.scenario.*`, `*.fixture.*`, `behavior.json` and
|
|
38
|
+
`*.scenario-adapter.*` files are no longer read; behavior is declared in
|
|
39
|
+
`<Owner>.ads.contract.ts`.
|
|
40
|
+
- Drafts are the only MCP editing route: `ads_apply_patch`, `ads_apply_transaction`
|
|
41
|
+
and `ads_prepare_patch` are removed, and only `ads_accept` of an exact draft
|
|
42
|
+
revision writes accepted source. `ads_update_draft` takes a Git diff
|
|
43
|
+
(`patch`/`patchFile`) applied exactly to the draft. `ads_accept` takes `dryRun:true`.
|
|
44
|
+
`ads_prepare_token_samples` writes into a draft. Contract migration is removed.
|
|
45
|
+
- An owner is in at most one open draft, so concurrent clients edit different owners.
|
|
46
|
+
Drafts carry only their owners' files. `refresh` and three-way merging are removed:
|
|
47
|
+
a baseline conflict means the draft is dropped and recreated.
|
|
48
|
+
- Shared entries are generated. Each owner declares its public names in
|
|
49
|
+
`<Owner>.ads.exports.ts`; ADS writes the public barrel and review entry from them and
|
|
50
|
+
the styles entry from the token sheets, and `ads check` reports a stale or
|
|
51
|
+
hand-edited one (`generated-entry`). `ads init` stops before writing anything when it
|
|
52
|
+
finds a hand-written entry and says to move its exports into owners' exports files.
|
|
53
|
+
The generated barrel names each export directly from its source, so a product build
|
|
54
|
+
never includes an exports file, and it re-exports the generated font preloads
|
|
55
|
+
(`preloadFonts()` and the tag/header helpers) once `ads assets` has written
|
|
56
|
+
`tokens/fonts.preload.generated.ts`. ADS deletes an empty `.gitkeep` itself when
|
|
57
|
+
accepted source is added beneath it.
|
|
58
|
+
- Style permissions move from `ds.config.json` into the owner contract:
|
|
59
|
+
`styles.writes`, `styles.inline` and `customization` replace
|
|
60
|
+
`boundaries.styleWrites`, `inlineStyleFiles` and `boundaries.componentVariables`,
|
|
61
|
+
which are no longer accepted. Contracts are allowed for showcase owners. Application
|
|
62
|
+
code has no owner contract, so it gets no inline-style exception: measured geometry
|
|
63
|
+
belongs in a design-system owner that declares it.
|
|
64
|
+
- One runtime and one compiler per project. Draft previews are views of their
|
|
65
|
+
workspaces, compiled by the project's compiler process (viewed draft first) and
|
|
66
|
+
served by its showcase, alone at `/draft/<id>/`; no draft starts a server, port or
|
|
67
|
+
compiler. Acceptance checks and renders in the reviewed workspace. Other drafts
|
|
68
|
+
resync in the background. A custom compiler passes `runScenarioCompiler` a function of
|
|
69
|
+
the root, so the same process builds each draft with its own builder.
|
|
70
|
+
- `acceptance.browserAudit` is `"owners"` (default: the draft owners' own scenarios),
|
|
71
|
+
`"affected"` or `false`; the full audit of everything affected runs as a stage with
|
|
72
|
+
`ads_validate`. A dry run's check and audit are remembered for accepting the same
|
|
73
|
+
revision. `mcp.auditPages` (1–16, default 4) sets how many pages render at once.
|
|
74
|
+
- Faster checks: per-file facts are computed once in `ads check`, TypeScript programs
|
|
75
|
+
and parsed sources are reused across checks, the MCP server and compiler check in a
|
|
76
|
+
warm worker that remembers passing reports, and the scenario inspector stays warm
|
|
77
|
+
while previews are in use.
|
|
78
|
+
|
|
79
|
+
## 0.3.53
|
|
80
|
+
|
|
32
81
|
- **Run `ads assets` once after upgrading.** The generated font module changed, so `ads check` fails it as
|
|
33
82
|
stale (`themes-generated`) until then.
|
|
34
83
|
- **`assets.preloadFonts` names the fonts to preload.** An array of `{ family, weight }` replaces the
|
package/docs/COMPARISON.md
CHANGED
|
@@ -26,7 +26,7 @@ built-in workflows. "Custom setup" means additional project tooling or integrati
|
|
|
26
26
|
| **Agent access** | Varies; MUI provides documentation MCP. [Docs](https://mui.com/material-ui/getting-started/mcp/) | MCP registry browsing, search and installation. [Docs](https://ui.shadcn.com/docs/mcp) | MCP access to the actual project's APIs, tokens, source, rendered UI, diagnostics and verification |
|
|
27
27
|
| **Enforced shared design values** | Theme APIs and conventions; additional enforcement requires setup | Theme variables and conventions; additional enforcement requires setup | Guards enforce shared design-value ownership and token references |
|
|
28
28
|
| **Enforced architectural boundaries** | Custom setup | Custom setup | Checks dependency direction, public APIs, style ownership and application/development separation |
|
|
29
|
-
| **Guarded agent edits** | Project editing and CI workflow | Source editing plus project checks | Owner-scoped Git patches
|
|
29
|
+
| **Guarded agent edits** | Project editing and CI workflow | Source editing plus project checks | Owner-scoped drafts (file contents or Git patches), one open draft per owner, validated before acceptance. [Contract](MCP.md#guarded-editing) |
|
|
30
30
|
| **Behavior contracts and evidence** | Custom project integration | Custom project integration | Registered guarantees, configured checks and current execution evidence |
|
|
31
31
|
| **Current/candidate screenshots through MCP** | Custom integration | Custom integration | On-demand captures and visual comparison during patch dry runs |
|
|
32
32
|
| **Import compatibility and adaptation** | Project-managed integration | Registry delivery followed by project adaptation | Agent-led destination assessment and adaptation, followed by destination guards and verification |
|
package/docs/CONTRACTS.md
CHANGED
|
@@ -259,34 +259,19 @@ Shared token samples belong under the token directory. See
|
|
|
259
259
|
project-specific audits of shared alias relationships. It supplements mandatory
|
|
260
260
|
core source checks and does not enable independent local values.
|
|
261
261
|
|
|
262
|
-
##
|
|
262
|
+
## MCP editing
|
|
263
263
|
|
|
264
|
-
|
|
264
|
+
The static owner contract is the only token, paint, declarative-part and behavior
|
|
265
|
+
registration. Competing declarations fail.
|
|
265
266
|
Contracts participate in discovery, ownership, source revisions, affected-check
|
|
266
267
|
selection and candidate gates. `ads_units` exposes `contractFile`; `ads_catalog`
|
|
267
268
|
reports constrained paint paths and declarative parent/consumer/check references.
|
|
268
269
|
Use bounded file reads and paged detailed results, not repeated whole-project dumps.
|
|
269
270
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
5. Dry-run/apply with `ads_apply_patch`, or a genuinely coupled transaction.
|
|
278
|
-
|
|
279
|
-
Migration never edits live source or bypasses gates. It retains stable scenario
|
|
280
|
-
IDs, check case IDs and directory ownership. A canonical `<Owner>.ads.scenario.tsx` is the same
|
|
281
|
-
development entry as `Scenario.tsx`, even without a production entry or owner
|
|
282
|
-
contract. Explicit flat IDs and existing flat peer families remain separate.
|
|
283
|
-
An optional static `scenario.id` preserves a legacy
|
|
284
|
-
identity when a renamed filename would otherwise be ambiguous; it must stay
|
|
285
|
-
inside the owning unit and be unique. Whole-file or unimportable private behavior subjects stay
|
|
286
|
-
in legacy registration with a note until deliberately resolved. Unknown runner
|
|
287
|
-
globs, custom adapters and documentation references require review. Ambiguous
|
|
288
|
-
flat-to-directory renames stay in the legacy form with a migration note so file
|
|
289
|
-
ownership cannot silently change. Preserve
|
|
290
|
-
licenses, pending drafts and unrelated work; keep transactions within their limits.
|
|
291
|
-
There is no alternate JSON contract editor. Do not loosen a guard or make a valid
|
|
292
|
-
API private merely to complete a migration.
|
|
271
|
+
A canonical `<Dir>/<Dir>.ads.scenario.tsx` is the development entry of the
|
|
272
|
+
directory owner `<Dir>`, even without a production entry or owner contract. In a
|
|
273
|
+
folder without that entry, each `<Owner>.ads.scenario.tsx` belongs to its own flat
|
|
274
|
+
owner, and an explicit flat `scenario.id` (`<Dir>/<Dir>`) keeps the canonical file
|
|
275
|
+
a flat entry. An optional static `scenario.id` keeps an identity stable when a
|
|
276
|
+
renamed filename would otherwise be ambiguous; it must stay inside the owning unit
|
|
277
|
+
and be unique.
|