@reqvire-org/ads 0.3.26 → 0.3.28
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 +21 -10
- package/dist/bootstrap-ds/README.md +7 -5
- package/dist/bootstrap-ds/ds.config.json +1 -1
- package/dist/bootstrap-ds/scripts/build-mcp-previews.mjs +7 -8
- package/dist/capture.mjs +1 -1
- package/dist/development-runtime.mjs +17 -0
- package/dist/index.mjs +1 -1
- package/dist/init.mjs +14 -12
- package/dist/mcp/apps.mjs +1 -1
- package/dist/mcp/context.mjs +5 -4
- package/dist/mcp/mutations.mjs +3 -2
- package/dist/mcp/preview-watch.mjs +2 -1
- package/dist/mcp/preview-widget.bundle.js +6 -6
- package/dist/mcp/project-widget.bundle.js +13 -13
- package/dist/mcp/resource-loader.js +10 -1
- package/dist/mcp/server.mjs +11 -4
- package/dist/mcp/widget.bundle.js +1 -1
- package/dist/preview-builder.mjs +108 -0
- package/dist/preview-files.mjs +33 -0
- package/dist/preview-inputs.mjs +14 -6
- package/dist/scenario-groups.mjs +47 -0
- package/dist/scenarios-compiler.mjs +10 -9
- package/dist/scenarios-vite.mjs +13 -5
- package/dist/scenarios.mjs +4 -1
- package/dist/showcase/client.bundle.js +21 -21
- package/dist/showcase/navigation.js +13 -0
- package/dist/showcase/sandbox.bundle.js +1 -1
- package/dist/showcase/style.css +1 -0
- package/dist/skills/README.md +7 -1
- package/dist/skills/ads-break-ui/SKILL.md +7 -3
- package/dist/skills/ads-break-ui/references/behaviors.md +6 -3
- package/dist/skills/ads-break-ui/references/layers.md +16 -0
- package/dist/skills/ads-break-ui/references/runtimes.md +127 -0
- package/dist/skills/ads-break-ui/references/scenarios.md +19 -0
- package/dist/skills/ads-designer/README.md +6 -0
- package/dist/skills/ads-designer/SKILL.md +11 -6
- package/dist/skills/ads-designer/assets/bootstrap-ds/README.md +7 -5
- package/dist/skills/ads-designer/assets/bootstrap-ds/ds.config.json +1 -1
- package/dist/skills/ads-designer/assets/bootstrap-ds/scripts/build-mcp-previews.mjs +7 -8
- package/dist/skills/ads-designer/references/behaviors.md +6 -3
- package/dist/skills/ads-designer/references/cli.md +10 -7
- package/dist/skills/ads-designer/references/design-craft.md +31 -0
- package/dist/skills/ads-designer/references/layers.md +16 -0
- package/dist/skills/ads-designer/references/runtimes.md +127 -0
- package/dist/skills/ads-designer/references/scenarios.md +19 -0
- package/dist/skills/ads-import/SKILL.md +24 -4
- package/dist/skills/ads-import/agents/openai.yaml +2 -2
- package/dist/skills/ads-import/references/behaviors.md +6 -3
- package/dist/skills/ads-import/references/cli.md +10 -7
- package/dist/skills/ads-import/references/compatibility.md +113 -0
- package/dist/skills/ads-import/references/implementation.md +6 -0
- package/dist/skills/ads-import/references/layers.md +16 -0
- package/dist/skills/ads-import/references/runtimes.md +127 -0
- package/dist/skills/ads-import/references/scenarios.md +19 -0
- package/dist/skills/ads-motion/SKILL.md +7 -3
- package/dist/skills/ads-motion/references/behaviors.md +6 -3
- package/dist/skills/ads-motion/references/layers.md +16 -0
- package/dist/skills/ads-motion/references/runtimes.md +127 -0
- package/dist/skills/ads-motion/references/scenarios.md +19 -0
- package/dist/skills/ads-port/SKILL.md +7 -3
- package/dist/skills/ads-port/references/behaviors.md +6 -3
- package/dist/skills/ads-port/references/cli.md +10 -7
- package/dist/skills/ads-port/references/layers.md +16 -0
- package/dist/skills/ads-port/references/runtimes.md +127 -0
- package/dist/skills/ads-port/references/scenarios.md +19 -0
- package/dist/verification.mjs +4 -3
- package/docs/ADS.md +29 -2
- package/docs/ARCHITECTURE.md +85 -3
- package/docs/BEHAVIORS.md +13 -3
- package/docs/CHANGELOG.md +38 -1
- package/docs/COMPARISON.md +63 -0
- package/docs/GUIDE.md +51 -10
- package/docs/MCP.md +104 -14
- package/package.json +5 -4
package/docs/BEHAVIORS.md
CHANGED
|
@@ -142,8 +142,8 @@ command. For a project with an installed Playwright test runner:
|
|
|
142
142
|
"behaviorProfiles": {
|
|
143
143
|
"widget": {
|
|
144
144
|
"runner": "playwright",
|
|
145
|
-
"command": "
|
|
146
|
-
"args": ["
|
|
145
|
+
"command": "runtime",
|
|
146
|
+
"args": ["node_modules/@playwright/test/cli.js", "test"],
|
|
147
147
|
"mode": "browser",
|
|
148
148
|
"timeoutMs": 60000
|
|
149
149
|
}
|
|
@@ -152,7 +152,10 @@ command. For a project with an installed Playwright test runner:
|
|
|
152
152
|
}
|
|
153
153
|
```
|
|
154
154
|
|
|
155
|
-
Here `
|
|
155
|
+
Here `runtime` uses the Node or Bun interpreter that launched ADS, and the
|
|
156
|
+
project supplies the installed Playwright entry. Explicit executable commands
|
|
157
|
+
retain their meaning. A Bun package-script profile can use `command: "bun"`
|
|
158
|
+
with `args: ["--bun", "run", "test:behavior", "--"]`. The Playwright
|
|
156
159
|
configuration must discover colocated spec files. Configure browser installation
|
|
157
160
|
and any required test setup in that project. The ADS tooling host gains no
|
|
158
161
|
framework or browser dependency from a profile.
|
|
@@ -362,6 +365,13 @@ computed imports remain conservative. Barrel source changes still invalidate
|
|
|
362
365
|
dependents. ADS caches source parsing, resolution and digests within an inspection
|
|
363
366
|
only; later runs read current source again.
|
|
364
367
|
|
|
368
|
+
Test selection is at owner-contract granularity: when a registered check's input
|
|
369
|
+
dependencies intersect changed files, that owner is selected and its registered
|
|
370
|
+
checks run. A shared token/foundation edit can affect every owner. Project check
|
|
371
|
+
scripts still run as configured; ordinary live preview does not automatically run
|
|
372
|
+
browser checks and release validation runs the full suite. Persistent Vite
|
|
373
|
+
compilation and retained preview state do not imply per-test-case execution caches.
|
|
374
|
+
|
|
365
375
|
Guarded mutations execute affected registered behavior contracts after core,
|
|
366
376
|
Oxlint and configured project checks, before writing source. Imported shared
|
|
367
377
|
controller changes also select dependent contracts conservatively. Rejected and
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,43 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 0.3.28
|
|
4
|
+
|
|
5
|
+
- Group component, pattern and composition showcase navigation using folder
|
|
6
|
+
containers only. Preserve exact folder names; reject metadata overrides and
|
|
7
|
+
retain flat navigation without a Default heading. Search derived groups through
|
|
8
|
+
MCP while keeping preview IDs, edit ownership and source reads aligned. Track
|
|
9
|
+
container structure in discovery and build freshness, including non-source files.
|
|
10
|
+
- Add an opt-in persistent Vite preview builder and adopt it in the starter.
|
|
11
|
+
Reuse unaffected module transforms and retain mounted preview state when its
|
|
12
|
+
dependency closure is unchanged; keep validation and atomic source checks.
|
|
13
|
+
- Inline focused HTML without interpreting framework JavaScript strings as
|
|
14
|
+
document stylesheet links.
|
|
15
|
+
|
|
16
|
+
- Preserve transition-family properties when probing token samples. Other probes
|
|
17
|
+
still disable transitions to avoid measuring intermediate values, and every
|
|
18
|
+
probe restores the original document and sample styles.
|
|
19
|
+
|
|
20
|
+
## 0.3.27
|
|
21
|
+
|
|
22
|
+
- Bound the release suite to two test workers to avoid memory contention while
|
|
23
|
+
retaining every test, including packed Node/Bun integration checks.
|
|
24
|
+
|
|
25
|
+
- Allow compiled Apps to read bundled binary blob resources and instantiate
|
|
26
|
+
WebAssembly in the showcase/explorer sandbox. Keep external network access,
|
|
27
|
+
JavaScript eval, host DOM access and native form actions restricted.
|
|
28
|
+
|
|
29
|
+
- Exclude standard generated trees, including nested Cargo `target/`, from preview
|
|
30
|
+
watch allocation and source fingerprints. Use individual directory watches so
|
|
31
|
+
excluded descendants consume no OS watches; retain explicitly configured source roots.
|
|
32
|
+
|
|
33
|
+
- Support Bun-only project tooling alongside Node: explicit Bun setup/MCP launch,
|
|
34
|
+
Bun-forced generated checks, portable `runtime` compiler/behavior commands and
|
|
35
|
+
screenshot workers that inherit the active interpreter. Report the actual
|
|
36
|
+
runtime in status/evidence and invalidate behavior evidence across runtime changes.
|
|
37
|
+
- Infer Bun during setup when launched on Bun without an existing project manager
|
|
38
|
+
or lockfile; preserve declared project choices and explicit overrides.
|
|
39
|
+
- Exercise the installed package with Node/npm/npx unavailable, including builds,
|
|
40
|
+
MCP preview resources, guarded candidate checks, browser behavior and captures.
|
|
4
41
|
|
|
5
42
|
## 0.3.26
|
|
6
43
|
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Comparing UI approaches
|
|
2
|
+
|
|
3
|
+
ADS manages project-owned UI for websites and MCP Apps, with agent workflows and
|
|
4
|
+
architectural checks. Traditional component libraries supply maintained runtime
|
|
5
|
+
packages; shadcn/ui distributes editable source. The comparison below describes
|
|
6
|
+
built-in workflows. "Custom setup" means additional project tooling or integration.
|
|
7
|
+
|
|
8
|
+
| Feature | Traditional libraries (MUI, Mantine, AntD) | shadcn/ui | ADS |
|
|
9
|
+
|---------|-------------------------------------------|-----------|-----|
|
|
10
|
+
| **Primary role** | Provide a maintained UI library | Distribute editable component source | Build and maintain project-owned UI for websites and MCP Apps |
|
|
11
|
+
| **Distribution** | Install runtime packages through npm | Copy selected source through CLI or registries. [Docs](https://ui.shadcn.com/docs) | Author, import or port local source; install ADS as development tooling |
|
|
12
|
+
| **Code ownership** | Implementation maintained in the dependency; customize through APIs, wrappers or forks | Component files belong to your project | Components, patterns, controllers, tokens and branding belong to your project |
|
|
13
|
+
| **Logic and style** | Library-defined behavior and styling systems | Editable components, headless primitives and Tailwind styling | Project-owned behavior with shared tokens and extracted Linaria styles |
|
|
14
|
+
| **Customization** | Theme configuration, props and styling APIs. [MUI](https://mui.com/material-ui/customization/theming/), [Mantine](https://mantine.dev/theming/mantine-provider/), [AntD](https://ant.design/docs/react/customize-theme/) | Edit local source, variants and utility classes | Edit shared tokens and owned implementations within checked architectural boundaries |
|
|
15
|
+
| **Updates** | Upgrade dependencies and review changes | Integrate upstream changes while preserving local modifications | Tooling upgrades and UI-source imports have separate lifecycles |
|
|
16
|
+
| **Production bundle** | Depends on imports, dependencies, styles and build configuration | Depends on used source, dependencies and build configuration | Project source, dependencies and extracted CSS optimized by the application build; ADS adds no production UI runtime |
|
|
17
|
+
| **Build-time styling** | Varies by library | Tailwind generates CSS at build time. [Docs](https://tailwindcss.com/docs/styling-with-utility-classes) | Linaria extracts CSS at build time, avoiding runtime CSS generation for those styles |
|
|
18
|
+
| **Tree shaking and code splitting** | Depend on library packaging and application build | Local source optimized by the application build | Modular source and explicit style dependencies support JavaScript and CSS optimization |
|
|
19
|
+
| **Asset caching** | Depends on library and delivery setup | Compiled CSS and application assets can be cached | Separately extracted CSS, JavaScript and assets support independent caching |
|
|
20
|
+
| **CSS declaration reuse** | Depends on the styling system | Reusable Tailwind utilities | Atomic extraction can reuse identical declarations across components and variants |
|
|
21
|
+
| **Colocation for agent work** | Understanding changes may span dependency source, themes and wrappers | Components and styling classes live in local source | Related implementation, styles, scenarios and checks stay near their owner, reducing navigation and clarifying change scope |
|
|
22
|
+
| **Shared UI for websites and MCP Apps** | Possible through project integration | Possible through project integration | Explicit architectural support: both consume the same public UI and design contracts |
|
|
23
|
+
| **MCP App readiness and review** | Custom setup | Custom setup | Built-in showcase renders real project implementations inside sandboxed MCP Apps |
|
|
24
|
+
| **MCP preview resource reuse** | Custom setup | Custom setup | Loads the selected compiled dependency closure and reuses unchanged resources within the App instance |
|
|
25
|
+
| **Preview build caching** | Provided by project build tooling | Provided by project build tooling | Reuses successful preview output when source, compiler, dependencies and artifact hashes still match |
|
|
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
|
+
| **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
|
+
| **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 and coupled transactions validated before application. [Contract](MCP.md#guarded-editing) |
|
|
30
|
+
| **Behavior contracts and evidence** | Custom project integration | Custom project integration | Registered guarantees, configured checks and current execution evidence |
|
|
31
|
+
| **Current/candidate screenshots through MCP** | Custom integration | Custom integration | On-demand captures and visual comparison during patch dry runs |
|
|
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 |
|
|
33
|
+
| **Production MCP App serving** | Consuming application's responsibility | Consuming application's responsibility | Consuming application's responsibility; ADS manages the reusable UI and its readiness |
|
|
34
|
+
|
|
35
|
+
## Performance and ownership
|
|
36
|
+
|
|
37
|
+
The [Linaria architecture](ARCHITECTURE.md#linaria-is-the-implementation-mechanism)
|
|
38
|
+
keeps authored styles beside their implementation and extracts CSS ahead of time.
|
|
39
|
+
Colocation makes related source easier to find and review; shared token values
|
|
40
|
+
remain in the common foundation. Final tree shaking, chunking and browser caching
|
|
41
|
+
depend on the application's references, build configuration and asset delivery.
|
|
42
|
+
Unused variants are not automatically guaranteed to disappear.
|
|
43
|
+
|
|
44
|
+
[Airbnb's Linaria migration report](https://medium.com/airbnb-engineering/airbnbs-trip-to-linaria-dc169230bd12)
|
|
45
|
+
describes the value of colocated authoring, build-time extraction and separate
|
|
46
|
+
CSS caching. Its measurements concern Airbnb's workload, not promised ADS gains.
|
|
47
|
+
|
|
48
|
+
The [ADS resource pipeline](MCP.md#one-app-shared-resources) additionally
|
|
49
|
+
provides shared dependency loading and verified build caching for development
|
|
50
|
+
previews. Resource reuse is scoped to an App instance; separate host-created
|
|
51
|
+
iframes have separate runtime instances.
|
|
52
|
+
|
|
53
|
+
## Shared UI, application-owned integration
|
|
54
|
+
|
|
55
|
+
Websites and product MCP Apps use the same public components, patterns,
|
|
56
|
+
controllers, tokens and styles. The consuming application supplies data, actions,
|
|
57
|
+
mounting, MCP communication and serving. ADS's own MCP server supports
|
|
58
|
+
design-system development, inspection and review.
|
|
59
|
+
|
|
60
|
+
The ADS showcase renders the real implementation inside an MCP App. Its previews
|
|
61
|
+
and registered checks provide evidence for the exercised states and environments;
|
|
62
|
+
normal application checks verify website integration. Neither static checks nor
|
|
63
|
+
a preview of one state establishes every interaction or host's compatibility.
|
package/docs/GUIDE.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# ADS tool guide
|
|
2
2
|
|
|
3
3
|
ADS is development tooling for a project's local design system. This package
|
|
4
|
-
contains a Node CLI, shared token contract, static checks, an Oxlint plugin, and
|
|
4
|
+
contains a Node/Bun CLI, shared token contract, static checks, an Oxlint plugin, and
|
|
5
5
|
empty foundation scaffolding. It includes no component or pattern catalogue,
|
|
6
6
|
fonts, mock screens, or UI runtime dependency.
|
|
7
7
|
|
|
@@ -169,7 +169,7 @@ contexts, and exclusion of JavaScript and generated outputs.
|
|
|
169
169
|
|
|
170
170
|
## Set up an existing project
|
|
171
171
|
|
|
172
|
-
Use Node 22.12 or
|
|
172
|
+
Use Node 22.12+ or Bun 1.3.13+. Run inside the project containing `package.json`:
|
|
173
173
|
|
|
174
174
|
```sh
|
|
175
175
|
npx @reqvire-org/ads init --framework react
|
|
@@ -177,8 +177,9 @@ npm install
|
|
|
177
177
|
npm run build
|
|
178
178
|
```
|
|
179
179
|
|
|
180
|
-
For a Bun-managed project, use
|
|
181
|
-
|
|
180
|
+
For a Bun-managed project, use
|
|
181
|
+
`bunx --bun @reqvire-org/ads init --framework react`, followed by `bun install`
|
|
182
|
+
and `bun --bun run build`. Node is unnecessary. No archive or directory argument is needed for a published
|
|
182
183
|
release. `init` requires an existing project; it does not create an application.
|
|
183
184
|
For starting from zero, the `ads-designer` skill carries a standalone empty
|
|
184
185
|
React/TypeScript/Linaria application scaffold. Copy that first, then run `init`
|
|
@@ -249,7 +250,7 @@ updated lockfile. npm CI can use `npm ci`, then `npm run build`.
|
|
|
249
250
|
1. Explicit `--package-manager npm` or `--package-manager bun`.
|
|
250
251
|
2. The project's `packageManager` field.
|
|
251
252
|
3. Its Bun (`bun.lock` or `bun.lockb`) or npm (`package-lock.json`) lockfile.
|
|
252
|
-
4. The invoking runner's
|
|
253
|
+
4. The Bun runtime or invoking Bun runner's metadata, otherwise npm.
|
|
253
254
|
|
|
254
255
|
With both lockfile types and no declared package manager, specify the flag.
|
|
255
256
|
This version supports npm and Bun. It never replaces or removes a lockfile.
|
|
@@ -257,13 +258,22 @@ An existing Bun lockfile takes precedence over the npm runner used by `npx`.
|
|
|
257
258
|
For a Bun project with no lockfile or package-manager metadata yet:
|
|
258
259
|
|
|
259
260
|
```sh
|
|
260
|
-
|
|
261
|
+
bunx --bun @reqvire-org/ads init --framework react
|
|
261
262
|
bun install
|
|
262
|
-
bun run build
|
|
263
|
+
bun --bun run build
|
|
263
264
|
```
|
|
264
265
|
|
|
265
|
-
|
|
266
|
-
|
|
266
|
+
Bun is inferred from the launcher when the project has no saved manager or lockfile.
|
|
267
|
+
Use `--package-manager bun` only to override an existing project choice. Init
|
|
268
|
+
does not translate the app's existing scripts. Bun hooks explicitly use `bun --bun run` so package executables,
|
|
269
|
+
including ADS and Oxlint's JavaScript plugins, run on Bun despite Node shebangs.
|
|
270
|
+
Launch the MCP server with `bunx --bun @reqvire-org/ads mcp`, or its generated
|
|
271
|
+
`ads-mcp` script. Managed workers and screenshot capture inherit the interpreter.
|
|
272
|
+
Use `command: "runtime"` for portable preview compiler/behavior profiles;
|
|
273
|
+
explicit `node`, `bun` or other commands are respected. Project-specific tools
|
|
274
|
+
must themselves support the selected runtime. `ads_status.project.runtime`
|
|
275
|
+
reports the actual name, version and executable; package manager and UI framework
|
|
276
|
+
are separate choices.
|
|
267
277
|
|
|
268
278
|
## Migrating from DS
|
|
269
279
|
|
|
@@ -501,6 +511,37 @@ export default function Scenario() { return <Button>{fixture.label}</Button>; }
|
|
|
501
511
|
```
|
|
502
512
|
|
|
503
513
|
IDs derive from filenames; do not maintain another registry or hand-assigned IDs.
|
|
514
|
+
Showcase groups come only from folders. A folder above an owner becomes a group
|
|
515
|
+
when its non-hidden children are all real directories:
|
|
516
|
+
|
|
517
|
+
```text
|
|
518
|
+
components/
|
|
519
|
+
Forms/ # group: Forms
|
|
520
|
+
Input/
|
|
521
|
+
Input.ads.scenario.tsx
|
|
522
|
+
Select/
|
|
523
|
+
Select.ads.scenario.tsx
|
|
524
|
+
Switch/ # ungrouped owner
|
|
525
|
+
Switch.ads.scenario.tsx
|
|
526
|
+
```
|
|
527
|
+
|
|
528
|
+
The folder name is the group name, with spelling and case unchanged:
|
|
529
|
+
`form-controls/` displays as `form-controls`. The owner's own directory and the
|
|
530
|
+
layer root are never groups. The same convention applies to `patterns/` and
|
|
531
|
+
`composition/`. Nested containers appear as one label, such as
|
|
532
|
+
`Forms / Selection`. A regular file (`index.ts`, `README.md`, etc.) or a symbolic
|
|
533
|
+
link prevents that container from becoming a group. Hidden entries are ignored.
|
|
534
|
+
|
|
535
|
+
There is no grouping metadata, tag list or grouping registry. Do not add `group`
|
|
536
|
+
to the scenario export or owner contract. The optional `group` in MCP discovery
|
|
537
|
+
results is computed from folders; it is not authoring input. Change a group by
|
|
538
|
+
moving complete owner directories and updating imports, exports and any scenario,
|
|
539
|
+
behavior or capture references whose path-derived IDs change.
|
|
540
|
+
|
|
541
|
+
Ungrouped entries remain directly visible without a Default heading. Named groups
|
|
542
|
+
are collapsible and sorted alphabetically within each layer. Existing flat
|
|
543
|
+
projects continue to work without moving files. Tokens retain their categories.
|
|
544
|
+
|
|
504
545
|
Token scenarios live beside foundation CSS under the configured token directory.
|
|
505
546
|
The starter includes `tokens/Foundation.ads.scenario.tsx` and its local fixture for
|
|
506
547
|
a project-owned token review renderer. Keep its presentation in development-only `review/`:
|
|
@@ -660,7 +701,7 @@ Project rule registration is explicit:
|
|
|
660
701
|
|
|
661
702
|
Override patterns are project-relative, cannot escape the project, and configure
|
|
662
703
|
Oxlint only. They do not suppress architecture checks from `ads check`. A plugin
|
|
663
|
-
can import
|
|
704
|
+
can import development-only `loadConfig`, `importResolver`, and `styleWriteViolation`
|
|
664
705
|
from `@reqvire-org/ads` when it needs the same validated boundaries as core.
|
|
665
706
|
Unknown configuration fields fail rather than silently weakening checks.
|
|
666
707
|
|
package/docs/MCP.md
CHANGED
|
@@ -13,6 +13,12 @@ preview watcher and serves the built-in browser showcase, so the client needs
|
|
|
13
13
|
only one launch command. Source editing is disabled by default; `--mutations`
|
|
14
14
|
enables guarded ADS edits. MCP does not install skills or add a production runtime.
|
|
15
15
|
|
|
16
|
+
Websites and product MCP Apps reuse the project's public design-system UI. The
|
|
17
|
+
consuming application owns data, actions, mounting, MCP communication and serving.
|
|
18
|
+
The ADS MCP server supports development, inspection and review of that UI. Its
|
|
19
|
+
showcase renders real implementations as MCP Apps, providing evidence for the
|
|
20
|
+
exercised conditions alongside normal application integration checks.
|
|
21
|
+
|
|
16
22
|
## Built-in showcase client
|
|
17
23
|
|
|
18
24
|
Starting `ads mcp` automatically serves a loopback showcase. Its URL is printed
|
|
@@ -104,7 +110,15 @@ For **Claude Code**, add this to the project's `.mcp.json`:
|
|
|
104
110
|
Restart/reconnect the client, then ask it to inspect your design system.
|
|
105
111
|
`npx` uses the project's installed ADS version when present, or downloads the
|
|
106
112
|
published package when absent. `-y` prevents an install prompt from blocking
|
|
107
|
-
MCP startup. Node and npm must be available to the client.
|
|
113
|
+
MCP startup. For this `npx` setup, Node and npm must be available to the client.
|
|
114
|
+
|
|
115
|
+
For **Bun**, use `command = "bunx"` and
|
|
116
|
+
`args = ["--bun", "@reqvire-org/ads", "mcp"]` in Codex, or these equivalent
|
|
117
|
+
`command`/`args` values in Claude's JSON. Bun 1.3.13+ is sufficient; Node and npm
|
|
118
|
+
are unnecessary. The `--bun` flag must precede the package name so Bun executes
|
|
119
|
+
the CLI despite its Node shebang. For a local installation, the generated
|
|
120
|
+
`ads-mcp`/`ads-read-mcp` scripts explicitly select Bun too.
|
|
121
|
+
Runtime setup and diagnostics are also available in `ads://guides/runtimes`.
|
|
108
122
|
|
|
109
123
|
For **Claude Desktop**, use the same JSON in its MCP configuration and append
|
|
110
124
|
the project path to `args`, since it does not open inside your project:
|
|
@@ -190,7 +204,7 @@ The server supplies agent guidance through its instructions, tool descriptions,
|
|
|
190
204
|
| `ads_skills` | Workflow names/descriptions without loading instructions |
|
|
191
205
|
| `ads_read_skill` | Explicit text instruction/support-file reads in bounded chunks |
|
|
192
206
|
| `ads_show_tokens` | Render a discovered token scenario; legacy compilers retain the definition inspector |
|
|
193
|
-
| `ads_scenarios` | Bounded
|
|
207
|
+
| `ads_scenarios` | Bounded scenario discovery, including folder-derived groups searchable with `query` |
|
|
194
208
|
| `ads_show_scenario` | Render an exact discovered scenario with its own fixtures |
|
|
195
209
|
| `ads_behaviors` | Paged owner discovery; select a unit and detail section |
|
|
196
210
|
| `ads_verify` | Execute an owner's registered checks and record revision-bound evidence |
|
|
@@ -206,6 +220,15 @@ The server supplies agent guidance through its instructions, tool descriptions,
|
|
|
206
220
|
| `ads_read_file` | Read bounded source ranges, with owning unit and full-file digest |
|
|
207
221
|
| `ads_apply_patch` | Opt-in Git unified diff for one ADS unit, with dry-run validation |
|
|
208
222
|
|
|
223
|
+
Scenario results include `group` only when folder structure supplies one. It is
|
|
224
|
+
computed output, never scenario metadata. `ads_scenarios({query: "Forms"})` searches
|
|
225
|
+
the derived group label; `kind`, `offset` and `limit` continue to work. The full
|
|
226
|
+
`ads://project/scenarios` resource carries the same registry. Pass exact returned
|
|
227
|
+
IDs to `ads_show_scenario`; `ads_catalog.previews`, `ads_units` and source resources
|
|
228
|
+
retain the actual nested paths. A folder group is navigation, not an edit owner.
|
|
229
|
+
See [folder rules](GUIDE.md) and the
|
|
230
|
+
[architecture](ARCHITECTURE.md#folder-derived-navigation).
|
|
231
|
+
|
|
209
232
|
Listings have bounded pages and opaque cursors. The source catalogue exposes
|
|
210
233
|
public exports from `components/`, `patterns/` and `controllers/`; it does not execute TSX to
|
|
211
234
|
guess component props. Read the exported API and owning guide. An export name
|
|
@@ -710,7 +733,7 @@ initialization plus optional structured `ads-preview` logging (`loading`, `ready
|
|
|
710
733
|
"mcp": {
|
|
711
734
|
"previewManifest": ".ds/preview/manifest.json",
|
|
712
735
|
"previewWatch": {
|
|
713
|
-
"command": "
|
|
736
|
+
"command": "runtime",
|
|
714
737
|
"args": ["scripts/build-mcp-previews.mjs", "--watch"]
|
|
715
738
|
}
|
|
716
739
|
}
|
|
@@ -719,7 +742,10 @@ initialization plus optional structured `ads-preview` logging (`loading`, `ready
|
|
|
719
742
|
|
|
720
743
|
This launches the compiler directly for either npm- or Bun-managed projects.
|
|
721
744
|
The starter adapter selects the runner for validation scripts from the project's
|
|
722
|
-
`packageManager` field or Bun lockfile
|
|
745
|
+
`packageManager` field or Bun lockfile, forcing Bun for Bun scripts.
|
|
746
|
+
`command: "runtime"` uses the interpreter that launched ADS. Explicit `node`
|
|
747
|
+
or `bun` commands retain their meaning; a Node-specific project command still
|
|
748
|
+
requires Node. The same portable command is supported in behavior profiles.
|
|
723
749
|
|
|
724
750
|
Use `preact` for native Preact and a matching JSX/mount adapter. The project owns
|
|
725
751
|
framework compilation and Linaria extraction. The starter's
|
|
@@ -727,15 +753,28 @@ framework compilation and Linaria extraction. The starter's
|
|
|
727
753
|
|
|
728
754
|
- `runScenarioCompiler()` from `@reqvire-org/ads/scenarios/compiler` handles
|
|
729
755
|
scheduling, validation, source freshness, successful caches and build reporting.
|
|
730
|
-
-
|
|
731
|
-
|
|
732
|
-
|
|
756
|
+
- `createVitePreviewBuilder({ build, configure })` from
|
|
757
|
+
`@reqvire-org/ads/scenarios/vite` supplies `buildGraph`. `build` is the project's
|
|
758
|
+
Vite build function; `configure(entries, options)` returns its Vite configuration
|
|
759
|
+
with `previewEntriesPlugin()` and the project's framework/Linaria plugins.
|
|
760
|
+
It keeps one Rollup watch graph in managed development, retaining unaffected
|
|
761
|
+
module transforms. A changed entry list or project configuration resets the graph.
|
|
762
|
+
Normal non-watch builds remain one-shot and in memory.
|
|
733
763
|
Each mount imports the project's shared foundation entry. Keep that import in
|
|
734
764
|
the preview module graph so independently built token scenarios receive the
|
|
735
765
|
same shared Data as production UI.
|
|
736
766
|
- Keep `preserveEntrySignatures: "strict"`, `cssCodeSplit: true`,
|
|
737
|
-
`assetsInlineLimit: 0`, `modulePreload: false`, and `write: false
|
|
738
|
-
|
|
767
|
+
`assetsInlineLimit: 0`, `modulePreload: false`, and `write: false` in the returned
|
|
768
|
+
configuration. The helper captures watched output in private `.ds/incremental/`
|
|
769
|
+
scratch files; this is not the published graph. It removes its scratch directory
|
|
770
|
+
and closes its watcher when the compiler stops.
|
|
771
|
+
Watched builds use one module output (no output array or `output.file`). Under
|
|
772
|
+
Bun, dependency watches use polling to recover rapid native watch reattachments;
|
|
773
|
+
project `build.watch.chokidar` options can override this choice.
|
|
774
|
+
- Existing custom `buildGraph(entries, options, track)` adapters still work. The
|
|
775
|
+
optional fourth argument supplies `{ watched }`; custom adapters must include
|
|
776
|
+
the supplied dependency-tracking plugin and may expose an async `.close()`.
|
|
777
|
+
Adopt the helper explicitly to gain persistent Vite compilation.
|
|
739
778
|
- Use `linariaTagResolver` from `@reqvire-org/ads/linaria` in WyW's `tagResolver`
|
|
740
779
|
option in both the product build and preview builder. It preserves opaque
|
|
741
780
|
custom-property values through atomic extraction, including whitespace needed
|
|
@@ -746,13 +785,43 @@ framework compilation and Linaria extraction. The starter's
|
|
|
746
785
|
an unmount callback. It imports the same project foundation used in production.
|
|
747
786
|
It creates no App bridge; ADS supplies that bridge once.
|
|
748
787
|
|
|
788
|
+
To migrate an existing adapter, keep its current Vite configuration and plugins,
|
|
789
|
+
return that configuration from `configure`, and replace its fresh-build wrapper:
|
|
790
|
+
|
|
791
|
+
```js
|
|
792
|
+
import { createVitePreviewBuilder } from "@reqvire-org/ads/scenarios/vite";
|
|
793
|
+
|
|
794
|
+
await runScenarioCompiler(root, {
|
|
795
|
+
watched: process.argv.includes("--watch"),
|
|
796
|
+
validate, // retain the project's validation callback
|
|
797
|
+
compilerFiles: [import.meta.filename],
|
|
798
|
+
buildGraph: createVitePreviewBuilder({
|
|
799
|
+
build, // the project's Vite build function
|
|
800
|
+
configure(entries, options) {
|
|
801
|
+
return previewConfig(entries, options); // existing aliases, entries and plugins
|
|
802
|
+
},
|
|
803
|
+
}),
|
|
804
|
+
});
|
|
805
|
+
```
|
|
806
|
+
|
|
807
|
+
The helper adds dependency tracking and resource conversion; remove the old
|
|
808
|
+
`await build(...)` / `createPreviewResources(...)` wrapper, not its framework,
|
|
809
|
+
Linaria, shared foundation or validation configuration. Upgrade the project ADS
|
|
810
|
+
dependency and restart its managed compiler to load the helper. Merely upgrading
|
|
811
|
+
the server does not convert a custom project adapter to incremental compilation.
|
|
812
|
+
|
|
749
813
|
On first demand, the adapter builds a shared graph for all registered scenarios.
|
|
750
814
|
A selection loads only its static dependency closure. Validation and compilation
|
|
751
815
|
run together; both must succeed before publication. `.ds/preview-cache.json`
|
|
752
816
|
reuses successful validation/output only when inputs, compiler/tool code,
|
|
753
817
|
lockfile, recorded dependencies and content digests match. A source edit
|
|
754
|
-
revalidates
|
|
755
|
-
|
|
818
|
+
revalidates the project and incrementally updates the watched module graph. Both
|
|
819
|
+
must succeed against unchanged source before atomic publication; a failed or
|
|
820
|
+
superseded build cannot become current. Files outside Rollup's graph still trigger
|
|
821
|
+
validation and a reconciled build. Preview refresh retains the selected view's
|
|
822
|
+
state when its complete static module/style/asset closure is unchanged, while
|
|
823
|
+
rerunning its token/paint audits against the new manifest. Actual selected-view
|
|
824
|
+
changes remount it. Normal application builds retain their own chunking and optimization.
|
|
756
825
|
|
|
757
826
|
The graph lives beside the configured manifest, under `assets/`. Tiny
|
|
758
827
|
`.ds/scenarios/<id>/index.html` descriptors retain the reporter/registry contract;
|
|
@@ -783,6 +852,12 @@ and alias diagnostics; `ads_tokens` works even when project previews cannot buil
|
|
|
783
852
|
`mcp.previewWatch` is optional. When configured, `ads mcp` starts the project's
|
|
784
853
|
watch command on connection/use, once per MCP process. The client configuration
|
|
785
854
|
above stays the same; no second terminal or separately managed server is needed.
|
|
855
|
+
Standard output trees (`dist`, `build`, `target`, `out`, `.next`, `.nuxt`,
|
|
856
|
+
`.svelte-kit`, `.turbo`) are excluded from preview watches and freshness inputs
|
|
857
|
+
outside the configured source roots. Nested outputs are pruned before OS watches
|
|
858
|
+
are allocated. Explicit `sourceDir`/`dsDir` remain sources even when their names
|
|
859
|
+
match a default output name. Use `assets.generatedPaths` for custom outputs;
|
|
860
|
+
setup does not need to copy the built-in defaults into each project.
|
|
786
861
|
For this checkout, build the tool once and let the client launch:
|
|
787
862
|
|
|
788
863
|
```sh
|
|
@@ -798,10 +873,16 @@ the npm tool. Another project uses its own framework/build. ADS supplies no
|
|
|
798
873
|
component library and does not auto-generate lookalikes. Unconfigured projects
|
|
799
874
|
still get the token widget.
|
|
800
875
|
|
|
876
|
+
Compiled Apps may fetch their bundled `blob:` assets, including Wasm, without
|
|
877
|
+
external network access. The ADS showcase/explorer permits WebAssembly compilation
|
|
878
|
+
without JavaScript eval; external MCP hosts own their own CSP capabilities.
|
|
879
|
+
Keep renderer/transport adapters and their dependency notices explicit. A working
|
|
880
|
+
website or build alone does not establish that a binary renderer works in an App.
|
|
881
|
+
|
|
801
882
|
The configured command runs in the project root. `command` names an executable;
|
|
802
883
|
`args` is a literal argument array, with no shell parsing. Local
|
|
803
|
-
`node_modules/.bin` and the running
|
|
804
|
-
Use `
|
|
884
|
+
`node_modules/.bin` and the running interpreter's directory are added to its PATH.
|
|
885
|
+
Use `runtime` with a project script to inherit Node or Bun; Windows `.cmd`
|
|
805
886
|
wrappers require their own launcher and are not shell-executed by ADS.
|
|
806
887
|
|
|
807
888
|
Both build output streams go to stderr, keeping stdout exclusively for MCP.
|
|
@@ -1004,6 +1085,15 @@ Supporting files are read lazily via `resources/read`; directory browsing is
|
|
|
1004
1085
|
available on the newer protocol. The packaged scaffold's `.gitignore` remains
|
|
1005
1086
|
addressable at its original resource URI.
|
|
1006
1087
|
|
|
1088
|
+
`ads-import` assesses the destination and adapts selected source to its contracts.
|
|
1089
|
+
Its compatibility reference is available at
|
|
1090
|
+
`skill://ads/ads-import/references/compatibility.md`. Existing owner drafts,
|
|
1091
|
+
coupled transactions and candidate checks support the workflow; there is no
|
|
1092
|
+
separate import tool, version-based acceptance filter or compatibility certificate.
|
|
1093
|
+
The agent resolves semantic differences and reviews rendered behavior. Candidate
|
|
1094
|
+
validation uses installed project dependencies; package installation remains a
|
|
1095
|
+
project package-manager step before validating dependent changes.
|
|
1096
|
+
|
|
1007
1097
|
On protocol `2026-07-28`, discovery advertises `io.modelcontextprotocol/skills`
|
|
1008
1098
|
with directory reading and implements `skills/list`, `skills/get`, and
|
|
1009
1099
|
`resources/directory/read`. Older connections retain ordinary skill resources,
|
|
@@ -1122,7 +1212,7 @@ Both accept optional `unit`, `scenario`, agent-supplied `reporter`, and up to th
|
|
|
1122
1212
|
The server verifies evidence references and snapshots compact completion-time
|
|
1123
1213
|
metadata before the underlying execution/check slot can be replaced. Superseded
|
|
1124
1214
|
references fail explicitly. Current-project context separately captures ADS
|
|
1125
|
-
version, configured framework,
|
|
1215
|
+
version, configured framework, runtime name/version/platform, source/configuration revisions,
|
|
1126
1216
|
available build metadata and capture time. Missing metadata stays unobserved;
|
|
1127
1217
|
context and candidate evidence do not become current passing source evidence.
|
|
1128
1218
|
No source files, full logs, screenshots or trace bytes are automatically attached.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reqvire-org/ads",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.28",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A design system your agent can see and shape. Your components. Your look. Your code.",
|
|
6
6
|
"repository": {
|
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
"sync:skill-references": "node scripts/sync-skill-references.mjs",
|
|
38
38
|
"check:skill-references": "node scripts/sync-skill-references.mjs --check",
|
|
39
39
|
"lint": "npm run lint:tool",
|
|
40
|
-
"lint:tool": "npm run check:skill-starter && npm run check:skill-references && oxlint --deny-warnings src preview-client showcase-client mcp-explorer tests/*.test.mjs scripts/build-ads-tool.mjs scripts/pack-ads-tool.mjs scripts/sync-skill-references.mjs",
|
|
40
|
+
"lint:tool": "npm run check:skill-starter && npm run check:skill-references && oxlint --deny-warnings src preview-client showcase-client mcp-explorer tests/*.test.mjs tests/helpers scripts/build-ads-tool.mjs scripts/pack-ads-tool.mjs scripts/sync-skill-references.mjs",
|
|
41
41
|
"lint:project": "npm run lint:ds && npm run lint:style && npm run check:skill-starter",
|
|
42
42
|
"lint:ds": "node dist/cli.mjs lint-config && node dist/cli.mjs check && oxlint --deny-warnings --config .ds/oxlintrc.json src design-system",
|
|
43
43
|
"lint:style": "biome lint --config-path=biome.css.json .",
|
|
44
44
|
"preview": "node dist/cli.mjs showcase",
|
|
45
45
|
"preview:showcase": "node dist/cli.mjs showcase",
|
|
46
46
|
"typecheck": "tsc --noEmit",
|
|
47
|
-
"test": "npm run build && node --test tests/*.test.mjs",
|
|
47
|
+
"test": "npm run build && node --test --test-concurrency=2 tests/*.test.mjs",
|
|
48
48
|
"test:tool": "npm test",
|
|
49
49
|
"pack:tool": "node scripts/pack-ads-tool.mjs",
|
|
50
50
|
"ads": "node dist/cli.mjs",
|
|
@@ -97,7 +97,8 @@
|
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
99
|
"engines": {
|
|
100
|
-
"node": ">=22.12.0"
|
|
100
|
+
"node": ">=22.12.0",
|
|
101
|
+
"bun": ">=1.3.13"
|
|
101
102
|
},
|
|
102
103
|
"bin": {
|
|
103
104
|
"ads": "./dist/cli.mjs"
|