@reqvire-org/ads 0.3.26 → 0.3.27
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 +1 -1
- 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/server.mjs +4 -1
- package/dist/mcp/widget.bundle.js +1 -1
- package/dist/preview-files.mjs +33 -0
- package/dist/preview-inputs.mjs +6 -5
- package/dist/scenarios-compiler.mjs +7 -7
- package/dist/showcase/sandbox.bundle.js +1 -1
- package/dist/skills/README.md +7 -1
- package/dist/skills/ads-break-ui/SKILL.md +6 -2
- 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 +110 -0
- package/dist/skills/ads-designer/README.md +6 -0
- package/dist/skills/ads-designer/SKILL.md +10 -5
- 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 +1 -1
- 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 +110 -0
- package/dist/skills/ads-import/SKILL.md +23 -3
- 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 +110 -0
- package/dist/skills/ads-motion/SKILL.md +6 -2
- 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 +110 -0
- package/dist/skills/ads-port/SKILL.md +6 -2
- 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 +110 -0
- package/dist/verification.mjs +4 -3
- package/docs/ADS.md +17 -0
- package/docs/ARCHITECTURE.md +19 -0
- package/docs/BEHAVIORS.md +6 -3
- package/docs/CHANGELOG.md +21 -1
- package/docs/COMPARISON.md +63 -0
- package/docs/GUIDE.md +20 -10
- package/docs/MCP.md +44 -6
- package/package.json +5 -4
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Node and Bun development runtimes
|
|
2
|
+
|
|
3
|
+
ADS supports Node 22.12+ and Bun 1.3.13+. A Bun project does not need Node or npm.
|
|
4
|
+
The launcher selects the interpreter; package manager and UI framework are
|
|
5
|
+
separate concerns. Preserve the target project's choices.
|
|
6
|
+
|
|
7
|
+
For a Node/npm project, run inside its package root:
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npx @reqvire-org/ads init --framework react
|
|
11
|
+
npm install
|
|
12
|
+
npm run build
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
For Bun:
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
bunx --bun @reqvire-org/ads init --framework react
|
|
19
|
+
bun install
|
|
20
|
+
bun --bun run build
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Use `--framework preact` for native Preact. Init detects an existing package
|
|
24
|
+
manager or infers Bun from its launcher when no project choice exists. Use
|
|
25
|
+
`--package-manager bun` only for an explicit override; existing project metadata
|
|
26
|
+
and lockfiles take precedence over the launcher.
|
|
27
|
+
Use the installed/pinned ADS version. Never substitute an unrelated bare package.
|
|
28
|
+
|
|
29
|
+
`--bun` is essential to an explicit Bun runtime choice: many JavaScript tools
|
|
30
|
+
have a `#!/usr/bin/env node` shebang. Bun can otherwise launch Node when it is
|
|
31
|
+
available. Generated ADS scripts force Bun, including Oxlint and its JavaScript
|
|
32
|
+
plugins. Existing application scripts and lockfiles are preserved; translate
|
|
33
|
+
nested `npm` commands when intentionally converting an application to Bun.
|
|
34
|
+
Dependency packages and custom build commands must support the chosen runtime.
|
|
35
|
+
|
|
36
|
+
For ordinary `bun run build` commands to always select Bun, the project may
|
|
37
|
+
set its own `bunfig.toml`:
|
|
38
|
+
|
|
39
|
+
```toml
|
|
40
|
+
[run]
|
|
41
|
+
bun = true
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
This is equivalent to passing `--bun` for script execution. ADS does not replace
|
|
45
|
+
an existing Bun configuration. Keep the explicit flag in MCP launch settings.
|
|
46
|
+
|
|
47
|
+
## MCP connection
|
|
48
|
+
|
|
49
|
+
For Bun, use these values in Claude's `.mcp.json` or Codex's MCP configuration:
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"command": "bunx",
|
|
54
|
+
"args": ["--bun", "@reqvire-org/ads", "mcp"]
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Add `--mutations` to enable guarded source changes and `--port 4191` when the
|
|
59
|
+
project pins its showcase port. Append a project directory when the client
|
|
60
|
+
does not launch in the package root. For a local installed tool, use the
|
|
61
|
+
generated `ads-mcp` or `ads-read-mcp` package script. Keep stdout for JSON-RPC.
|
|
62
|
+
|
|
63
|
+
## Compiler and browser workers
|
|
64
|
+
|
|
65
|
+
Use the portable command in `ds.config.json`:
|
|
66
|
+
|
|
67
|
+
```json
|
|
68
|
+
{
|
|
69
|
+
"mcp": {
|
|
70
|
+
"previewWatch": {
|
|
71
|
+
"command": "runtime",
|
|
72
|
+
"args": ["scripts/build-mcp-previews.mjs", "--watch"]
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
`runtime` means the interpreter that launched ADS, including its absolute
|
|
79
|
+
executable when available through an environment manager. It also works in
|
|
80
|
+
registered behavior profiles, with the project's installed runner entry file in
|
|
81
|
+
`args`. Explicit `node`, `bun` and custom executable commands retain their meaning;
|
|
82
|
+
ADS never silently substitutes another interpreter for them. Node-specific
|
|
83
|
+
commands still need Node, even in a Bun-managed package.
|
|
84
|
+
|
|
85
|
+
Mandatory architecture/Oxlint validation, ownership guards and screenshot workers
|
|
86
|
+
inherit ADS's interpreter. Browser tests remain project-owned Playwright specs;
|
|
87
|
+
Chromium/WebKit is a separate browser dependency, not a Node requirement. Runtime
|
|
88
|
+
identity participates in behavior evidence freshness.
|
|
89
|
+
|
|
90
|
+
For diagnosis, inspect `ads_status.project.runtime`: `name`, `version`,
|
|
91
|
+
`executable` and `binDir`. `project.commands` contains the discovered package
|
|
92
|
+
commands with the appropriate Bun flags. The MCP process and agent shell may
|
|
93
|
+
have different PATHs; use these reported values instead of scanning the machine
|
|
94
|
+
or installing another runtime without evidence.
|
|
95
|
+
|
|
96
|
+
Preview watching excludes standard output trees by default, including nested
|
|
97
|
+
Cargo `target/` directories, without allocating watches inside them. Explicit
|
|
98
|
+
`sourceDir` and `dsDir` take priority over those default output names. Register
|
|
99
|
+
custom outputs in `assets.generatedPaths`; do not copy the default list into a
|
|
100
|
+
new project's config. `ENOSPC` from `fs.watch` can mean the OS watch limit rather
|
|
101
|
+
than disk space: inspect the failing path and generated-tree traversal before
|
|
102
|
+
raising system limits or deleting files. Generated churn must not mark previews
|
|
103
|
+
stale; actual source changes must still rebuild.
|
|
104
|
+
|
|
105
|
+
Bundled binary renderers may load their forwarded `blob:` resources. ADS's
|
|
106
|
+
showcase/explorer permits WebAssembly compilation while keeping JavaScript eval
|
|
107
|
+
and undeclared network requests blocked. External MCP hosts control their CSP.
|
|
108
|
+
Test the actual renderer inside the App; a successful website build does not
|
|
109
|
+
establish binary-resource or WebAssembly support. Keep transport and resource
|
|
110
|
+
loading in explicit injected adapters or declared renderer dependencies.
|
package/dist/verification.mjs
CHANGED
|
@@ -14,6 +14,7 @@ import { inspectScenarios } from "./scenarios.mjs";
|
|
|
14
14
|
import { readPreviewManifest } from "./preview-resources.mjs";
|
|
15
15
|
import { acceptance, failure, failureCategories } from "./evidence.mjs";
|
|
16
16
|
import { investigationArtifacts, investigationUri, saveInvestigations } from "./investigations.mjs";
|
|
17
|
+
import { developmentExecutable, developmentRuntime } from "./development-runtime.mjs";
|
|
17
18
|
|
|
18
19
|
export const BEHAVIOR_URI = "ads://project/behaviors";
|
|
19
20
|
const hash = bytes => createHash("sha256").update(bytes).digest("hex");
|
|
@@ -124,8 +125,8 @@ export function behaviorInputs(options, contract, check, context = inputContext(
|
|
|
124
125
|
if (scenario) visit(path.join(options.root, scenario.file));
|
|
125
126
|
const rows = [...files].sort().map(file => [slash(path.relative(options.root, file)), context.digest(file)]);
|
|
126
127
|
for (const file of ["package-lock.json", "bun.lock", "bun.lockb", "pnpm-lock.yaml", "yarn.lock", "node_modules/.package-lock.json"]) rows.push([file, existsSync(path.join(options.root, file)) ? context.digest(path.join(options.root, file)) : null]);
|
|
127
|
-
rows.push(["profile", JSON.stringify(options.config.mcp.behaviorProfiles[check.profile])], ["
|
|
128
|
-
for (const file of ["./verification.mjs", "./verification/browser.mjs", "./verification/playwright-reporter.cjs", "./evidence.mjs", "./investigations.mjs"]) rows.push([`tool:${file}`, hash(readFileSync(new URL(file, import.meta.url)))]);
|
|
128
|
+
rows.push(["profile", JSON.stringify(options.config.mcp.behaviorProfiles[check.profile])], ["runtime", JSON.stringify(developmentRuntime())]);
|
|
129
|
+
for (const file of ["./verification.mjs", "./development-runtime.mjs", "./verification/browser.mjs", "./verification/playwright-reporter.cjs", "./evidence.mjs", "./investigations.mjs"]) rows.push([`tool:${file}`, hash(readFileSync(new URL(file, import.meta.url)))]);
|
|
129
130
|
return { revision: hash(JSON.stringify(rows)), files: rows.map(([file]) => file) };
|
|
130
131
|
}
|
|
131
132
|
|
|
@@ -181,7 +182,7 @@ export function executeDevelopmentCommand(profile, args, root, env, signal) {
|
|
|
181
182
|
if (process.platform === "win32") { const stop = spawn("taskkill", ["/pid", String(child.pid), "/T", "/F"], { stdio: "ignore" }); stop.on("error", () => child.kill("SIGKILL")); }
|
|
182
183
|
else try { process.kill(-child.pid, "SIGKILL"); } catch (error) { if (error.code !== "ESRCH") failure ??= error; }
|
|
183
184
|
};
|
|
184
|
-
child = spawn(profile.command
|
|
185
|
+
child = spawn(developmentExecutable(profile.command), args, { cwd: root, detached: process.platform !== "win32", shell: false, stdio: ["ignore", "pipe", "pipe"], windowsHide: true,
|
|
185
186
|
env: { ...process.env, ...env, PATH: [path.join(root, "node_modules/.bin"), path.dirname(process.execPath), process.env.PATH ?? ""].join(path.delimiter) } });
|
|
186
187
|
if (child.pid) {
|
|
187
188
|
guard = spawn(process.execPath, [fileURLToPath(new URL("./mcp/preview-owner-guard.mjs", import.meta.url)), String(child.pid)], { detached: process.platform !== "win32", stdio: ["pipe", "ignore", "ignore"], windowsHide: true });
|
package/docs/ADS.md
CHANGED
|
@@ -29,6 +29,12 @@ Application code imports its local public barrel, normally through `@ds`.
|
|
|
29
29
|
The default layout keeps application code in `src/` and project ADS source in
|
|
30
30
|
root `design-system/`. Configure existing alternate layouts explicitly.
|
|
31
31
|
|
|
32
|
+
Websites and MCP Apps consume the same public components, patterns, controllers,
|
|
33
|
+
tokens and styles. Application adapters own routing, stores, MCP communication,
|
|
34
|
+
tool-result mapping, mounting and serving. ADS's own MCP server supplies
|
|
35
|
+
design-system development, inspection and review. Its showcase exercises the
|
|
36
|
+
real UI inside an MCP App; normal application checks verify website integration.
|
|
37
|
+
Verification claims remain scoped to the states and environments actually tested.
|
|
32
38
|
|
|
33
39
|
Framework choice belongs to the receiving project. Linaria is required for the
|
|
34
40
|
component and pattern styling pipeline. Source checks support React and native Preact, including JSX, UI factories and
|
|
@@ -291,6 +297,17 @@ Store original branding and its usage, credits, and licenses in
|
|
|
291
297
|
`assets/brand/`, and fonts in `assets/fonts/`. Configure generated icons and
|
|
292
298
|
asset mounts as described in the [branding guide](GUIDE.md#branding).
|
|
293
299
|
|
|
300
|
+
Before importing, compare the selected source and its dependencies with the
|
|
301
|
+
destination's framework, public APIs, shared tokens, styling ownership and
|
|
302
|
+
runtime assumptions. Resolve material incompatibilities before applying the
|
|
303
|
+
affected changes; verify the integrated candidate with destination checks and
|
|
304
|
+
rendered evidence. The `ads-import` skill contains the compatibility workflow.
|
|
305
|
+
That workflow resolves source differences within the selected scope, including
|
|
306
|
+
reimplementation where needed. Source/destination version numbers do not grant
|
|
307
|
+
compatibility or restrict imports to patch releases. Required package installation
|
|
308
|
+
uses the project package manager before validating dependent runtime changes;
|
|
309
|
+
ADS candidate checks use installed dependencies and do not install them.
|
|
310
|
+
|
|
294
311
|
- Component, pattern, and style imports reuse destination values and add
|
|
295
312
|
missing shared definitions with initial values.
|
|
296
313
|
- An explicit token-values import adopts all source-provided compatible values
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -5,6 +5,13 @@ the project. Coding agents can build and evolve that source directly; the tools
|
|
|
5
5
|
keep changes within a defined architecture. The project owns its components,
|
|
6
6
|
patterns, token values, and branding.
|
|
7
7
|
|
|
8
|
+
ADS manages project-owned UI for websites and MCP Apps. Both use the same public
|
|
9
|
+
components, patterns, controllers, tokens and styles. The consuming application
|
|
10
|
+
supplies data, actions, mounting and integration, including serving its MCP Apps.
|
|
11
|
+
The ADS showcase renders those real implementations inside MCP Apps; its previews
|
|
12
|
+
and registered checks provide evidence for the exercised states and conditions.
|
|
13
|
+
Normal application checks verify website integration.
|
|
14
|
+
|
|
8
15
|
This document explains the what, why, and high-level how. [ADS.md](ADS.md) defines
|
|
9
16
|
the enforceable contract, [GUIDE.md](GUIDE.md) covers tool integration, and the
|
|
10
17
|
[working example guide](../design-system/README.md) covers implementation details.
|
|
@@ -23,6 +30,11 @@ their own reviewed lifecycle.
|
|
|
23
30
|
|
|
24
31
|
ADS is opinionated about tooling and ownership. Linaria is required for the
|
|
25
32
|
component and pattern styling pipeline. Visual choices belong to the project.
|
|
33
|
+
Development tooling runs on Node or Bun, selected by its launcher. Managed
|
|
34
|
+
workers inherit that interpreter; `command: "runtime"` gives project compilers
|
|
35
|
+
and behavior profiles the same portable choice. Explicit interpreter commands
|
|
36
|
+
retain their meaning. Runtime choice is separate from the UI framework and adds
|
|
37
|
+
no Node/Bun dependency to deployed components.
|
|
26
38
|
The project declares React or native Preact in `ds.config.json` and uses the
|
|
27
39
|
matching compiler and mount adapter. Both integrate with the required styling
|
|
28
40
|
and validation pipeline; additional frameworks need explicit tooling support.
|
|
@@ -654,3 +666,10 @@ may use `inspectTokenOrigins` to audit more specific shared alias relationships;
|
|
|
654
666
|
core Data/UX/Skin separation does not depend on opting into such a check. ADS does
|
|
655
667
|
not hardcode a spacing scale or palette. Contract/file-role migration still uses
|
|
656
668
|
ordinary owner drafts, candidate gates and rollback.
|
|
669
|
+
|
|
670
|
+
Preview scheduling prunes standard generated output trees before allocating OS
|
|
671
|
+
watches and computing source freshness. Explicit source roots retain priority;
|
|
672
|
+
custom outputs use `assets.generatedPaths`. Bundled binary assets are forwarded
|
|
673
|
+
as resources: the built-in Apps sandbox permits blob reads and WebAssembly
|
|
674
|
+
compilation without granting external network access, JavaScript eval or host
|
|
675
|
+
DOM access. External MCP hosts retain their own CSP policy.
|
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.
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 0.3.27
|
|
4
|
+
|
|
5
|
+
- Bound the release suite to two test workers to avoid memory contention while
|
|
6
|
+
retaining every test, including packed Node/Bun integration checks.
|
|
7
|
+
|
|
8
|
+
- Allow compiled Apps to read bundled binary blob resources and instantiate
|
|
9
|
+
WebAssembly in the showcase/explorer sandbox. Keep external network access,
|
|
10
|
+
JavaScript eval, host DOM access and native form actions restricted.
|
|
11
|
+
|
|
12
|
+
- Exclude standard generated trees, including nested Cargo `target/`, from preview
|
|
13
|
+
watch allocation and source fingerprints. Use individual directory watches so
|
|
14
|
+
excluded descendants consume no OS watches; retain explicitly configured source roots.
|
|
15
|
+
|
|
16
|
+
- Support Bun-only project tooling alongside Node: explicit Bun setup/MCP launch,
|
|
17
|
+
Bun-forced generated checks, portable `runtime` compiler/behavior commands and
|
|
18
|
+
screenshot workers that inherit the active interpreter. Report the actual
|
|
19
|
+
runtime in status/evidence and invalidate behavior evidence across runtime changes.
|
|
20
|
+
- Infer Bun during setup when launched on Bun without an existing project manager
|
|
21
|
+
or lockfile; preserve declared project choices and explicit overrides.
|
|
22
|
+
- Exercise the installed package with Node/npm/npx unavailable, including builds,
|
|
23
|
+
MCP preview resources, guarded candidate checks, browser behavior and captures.
|
|
4
24
|
|
|
5
25
|
## 0.3.26
|
|
6
26
|
|
|
@@ -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
|
|
|
@@ -660,7 +670,7 @@ Project rule registration is explicit:
|
|
|
660
670
|
|
|
661
671
|
Override patterns are project-relative, cannot escape the project, and configure
|
|
662
672
|
Oxlint only. They do not suppress architecture checks from `ads check`. A plugin
|
|
663
|
-
can import
|
|
673
|
+
can import development-only `loadConfig`, `importResolver`, and `styleWriteViolation`
|
|
664
674
|
from `@reqvire-org/ads` when it needs the same validated boundaries as core.
|
|
665
675
|
Unknown configuration fields fail rather than silently weakening checks.
|
|
666
676
|
|
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:
|
|
@@ -710,7 +724,7 @@ initialization plus optional structured `ads-preview` logging (`loading`, `ready
|
|
|
710
724
|
"mcp": {
|
|
711
725
|
"previewManifest": ".ds/preview/manifest.json",
|
|
712
726
|
"previewWatch": {
|
|
713
|
-
"command": "
|
|
727
|
+
"command": "runtime",
|
|
714
728
|
"args": ["scripts/build-mcp-previews.mjs", "--watch"]
|
|
715
729
|
}
|
|
716
730
|
}
|
|
@@ -719,7 +733,10 @@ initialization plus optional structured `ads-preview` logging (`loading`, `ready
|
|
|
719
733
|
|
|
720
734
|
This launches the compiler directly for either npm- or Bun-managed projects.
|
|
721
735
|
The starter adapter selects the runner for validation scripts from the project's
|
|
722
|
-
`packageManager` field or Bun lockfile
|
|
736
|
+
`packageManager` field or Bun lockfile, forcing Bun for Bun scripts.
|
|
737
|
+
`command: "runtime"` uses the interpreter that launched ADS. Explicit `node`
|
|
738
|
+
or `bun` commands retain their meaning; a Node-specific project command still
|
|
739
|
+
requires Node. The same portable command is supported in behavior profiles.
|
|
723
740
|
|
|
724
741
|
Use `preact` for native Preact and a matching JSX/mount adapter. The project owns
|
|
725
742
|
framework compilation and Linaria extraction. The starter's
|
|
@@ -783,6 +800,12 @@ and alias diagnostics; `ads_tokens` works even when project previews cannot buil
|
|
|
783
800
|
`mcp.previewWatch` is optional. When configured, `ads mcp` starts the project's
|
|
784
801
|
watch command on connection/use, once per MCP process. The client configuration
|
|
785
802
|
above stays the same; no second terminal or separately managed server is needed.
|
|
803
|
+
Standard output trees (`dist`, `build`, `target`, `out`, `.next`, `.nuxt`,
|
|
804
|
+
`.svelte-kit`, `.turbo`) are excluded from preview watches and freshness inputs
|
|
805
|
+
outside the configured source roots. Nested outputs are pruned before OS watches
|
|
806
|
+
are allocated. Explicit `sourceDir`/`dsDir` remain sources even when their names
|
|
807
|
+
match a default output name. Use `assets.generatedPaths` for custom outputs;
|
|
808
|
+
setup does not need to copy the built-in defaults into each project.
|
|
786
809
|
For this checkout, build the tool once and let the client launch:
|
|
787
810
|
|
|
788
811
|
```sh
|
|
@@ -798,10 +821,16 @@ the npm tool. Another project uses its own framework/build. ADS supplies no
|
|
|
798
821
|
component library and does not auto-generate lookalikes. Unconfigured projects
|
|
799
822
|
still get the token widget.
|
|
800
823
|
|
|
824
|
+
Compiled Apps may fetch their bundled `blob:` assets, including Wasm, without
|
|
825
|
+
external network access. The ADS showcase/explorer permits WebAssembly compilation
|
|
826
|
+
without JavaScript eval; external MCP hosts own their own CSP capabilities.
|
|
827
|
+
Keep renderer/transport adapters and their dependency notices explicit. A working
|
|
828
|
+
website or build alone does not establish that a binary renderer works in an App.
|
|
829
|
+
|
|
801
830
|
The configured command runs in the project root. `command` names an executable;
|
|
802
831
|
`args` is a literal argument array, with no shell parsing. Local
|
|
803
|
-
`node_modules/.bin` and the running
|
|
804
|
-
Use `
|
|
832
|
+
`node_modules/.bin` and the running interpreter's directory are added to its PATH.
|
|
833
|
+
Use `runtime` with a project script to inherit Node or Bun; Windows `.cmd`
|
|
805
834
|
wrappers require their own launcher and are not shell-executed by ADS.
|
|
806
835
|
|
|
807
836
|
Both build output streams go to stderr, keeping stdout exclusively for MCP.
|
|
@@ -1004,6 +1033,15 @@ Supporting files are read lazily via `resources/read`; directory browsing is
|
|
|
1004
1033
|
available on the newer protocol. The packaged scaffold's `.gitignore` remains
|
|
1005
1034
|
addressable at its original resource URI.
|
|
1006
1035
|
|
|
1036
|
+
`ads-import` assesses the destination and adapts selected source to its contracts.
|
|
1037
|
+
Its compatibility reference is available at
|
|
1038
|
+
`skill://ads/ads-import/references/compatibility.md`. Existing owner drafts,
|
|
1039
|
+
coupled transactions and candidate checks support the workflow; there is no
|
|
1040
|
+
separate import tool, version-based acceptance filter or compatibility certificate.
|
|
1041
|
+
The agent resolves semantic differences and reviews rendered behavior. Candidate
|
|
1042
|
+
validation uses installed project dependencies; package installation remains a
|
|
1043
|
+
project package-manager step before validating dependent changes.
|
|
1044
|
+
|
|
1007
1045
|
On protocol `2026-07-28`, discovery advertises `io.modelcontextprotocol/skills`
|
|
1008
1046
|
with directory reading and implements `skills/list`, `skills/get`, and
|
|
1009
1047
|
`resources/directory/read`. Older connections retain ordinary skill resources,
|
|
@@ -1122,7 +1160,7 @@ Both accept optional `unit`, `scenario`, agent-supplied `reporter`, and up to th
|
|
|
1122
1160
|
The server verifies evidence references and snapshots compact completion-time
|
|
1123
1161
|
metadata before the underlying execution/check slot can be replaced. Superseded
|
|
1124
1162
|
references fail explicitly. Current-project context separately captures ADS
|
|
1125
|
-
version, configured framework,
|
|
1163
|
+
version, configured framework, runtime name/version/platform, source/configuration revisions,
|
|
1126
1164
|
available build metadata and capture time. Missing metadata stays unobserved;
|
|
1127
1165
|
context and candidate evidence do not become current passing source evidence.
|
|
1128
1166
|
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.27",
|
|
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"
|