@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
|
@@ -0,0 +1,127 @@
|
|
|
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
|
+
For incremental preview compilation, the project adapter passes
|
|
97
|
+
`createVitePreviewBuilder({ build, configure })` from
|
|
98
|
+
`@reqvire-org/ads/scenarios/vite` as `runScenarioCompiler`'s `buildGraph`.
|
|
99
|
+
`configure(entries, options)` returns the existing Vite configuration, including
|
|
100
|
+
framework/Linaria plugins, aliases and entries. The helper retains a watched
|
|
101
|
+
Rollup graph, captures private output, tracks dependencies and closes with the
|
|
102
|
+
compiler. Existing custom adapters still work; they must adopt the helper to gain
|
|
103
|
+
incremental transforms. Upgrade the project dependency and restart the builder.
|
|
104
|
+
Keep the full validation callback and production build behavior.
|
|
105
|
+
|
|
106
|
+
The App preserves selected form/scroll state across accepted unrelated graph
|
|
107
|
+
updates, reruns audits and remounts when its own module/style/asset closure changes.
|
|
108
|
+
Do not promise component-level HMR. Guarded edits select affected behavior owners
|
|
109
|
+
from their input dependencies and run their registered checks; project scripts
|
|
110
|
+
remain as configured and releases run the complete suite. Incremental compilation
|
|
111
|
+
alone does not make arbitrary lint/typecheck/test scripts incremental.
|
|
112
|
+
|
|
113
|
+
Preview watching excludes standard output trees by default, including nested
|
|
114
|
+
Cargo `target/` directories, without allocating watches inside them. Explicit
|
|
115
|
+
`sourceDir` and `dsDir` take priority over those default output names. Register
|
|
116
|
+
custom outputs in `assets.generatedPaths`; do not copy the default list into a
|
|
117
|
+
new project's config. `ENOSPC` from `fs.watch` can mean the OS watch limit rather
|
|
118
|
+
than disk space: inspect the failing path and generated-tree traversal before
|
|
119
|
+
raising system limits or deleting files. Generated churn must not mark previews
|
|
120
|
+
stale; actual source changes must still rebuild.
|
|
121
|
+
|
|
122
|
+
Bundled binary renderers may load their forwarded `blob:` resources. ADS's
|
|
123
|
+
showcase/explorer permits WebAssembly compilation while keeping JavaScript eval
|
|
124
|
+
and undeclared network requests blocked. External MCP hosts control their CSP.
|
|
125
|
+
Test the actual renderer inside the App; a successful website build does not
|
|
126
|
+
establish binary-resource or WebAssembly support. Keep transport and resource
|
|
127
|
+
loading in explicit injected adapters or declared renderer dependencies.
|
|
@@ -23,6 +23,25 @@ on-demand element screenshots. It grants no render/behavior coverage and no extr
|
|
|
23
23
|
styling permission. Use [captures.md](captures.md) for current/candidate review,
|
|
24
24
|
target selection, resource reads and storage lifecycle.
|
|
25
25
|
|
|
26
|
+
## Folder-derived showcase groups
|
|
27
|
+
|
|
28
|
+
Components, patterns and compositions use container folders to organize
|
|
29
|
+
navigation: `components/Forms/Input/Input.ads.scenario.tsx` appears under
|
|
30
|
+
**Forms** when `Forms/` contains only real directories. Hidden entries are ignored;
|
|
31
|
+
a regular file such as `index.ts` or `README.md`, or a symlink, prevents that
|
|
32
|
+
container from becoming a group. An owner's own directory and layer root never
|
|
33
|
+
form a group. Nested containers produce one path label: **Forms / Selection**.
|
|
34
|
+
Folder spelling and case are preserved: `form-controls/` displays `form-controls`.
|
|
35
|
+
|
|
36
|
+
Folders are the only grouping source. Do not add `group` metadata to a scenario
|
|
37
|
+
or owner contract. MCP's optional `group` field is computed discovery output;
|
|
38
|
+
`ads_scenarios(query: "Forms")` searches it along with existing scenario fields.
|
|
39
|
+
Use returned IDs with `ads_show_scenario`; `ads_catalog` previews, `ads_units` and
|
|
40
|
+
source resources retain the actual nested owner paths. Ungrouped entries remain
|
|
41
|
+
visible with no Default heading. Flat layouts keep working; tokens retain their
|
|
42
|
+
categories. When moving an owner, update its imports/public exports and any
|
|
43
|
+
references to changed path-derived scenario, behavior or capture IDs.
|
|
44
|
+
|
|
26
45
|
## Fragment links inside Apps
|
|
27
46
|
|
|
28
47
|
Keep intended `href="#"` and named fragments in the project API and fixtures.
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ads-import
|
|
3
|
-
description: "Import selected components, patterns, styles,
|
|
3
|
+
description: "Import selected source ADS components, patterns, styles, brand artwork or theme values into a project's design system. Check compatibility with the destination's framework, dependencies, APIs and token policy before applying. Preserve behavior, credits and license notices."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
For Node/Bun setup, MCP launch and compiler workers, read
|
|
7
|
+
[runtimes.md](references/runtimes.md).
|
|
8
|
+
|
|
6
9
|
# ADS Import
|
|
7
10
|
|
|
8
11
|
When ADS MCP is connected, use `ads_status`/`ads_catalog` to inspect the destination
|
|
@@ -62,12 +65,13 @@ renderers, build aliases or `review-import` / `review-contract` diagnostics, rea
|
|
|
62
65
|
|
|
63
66
|
A component provides one cohesive UI capability; a pattern arranges capabilities
|
|
64
67
|
into reusable structures or workflows. Components may compose components/controllers;
|
|
65
|
-
layout patterns may arrange slots. Do not classify by component count. For
|
|
66
|
-
|
|
68
|
+
layout patterns may arrange slots. Do not classify by component count. For shared
|
|
69
|
+
website/MCP App use, owner selection, or `component-dependency`,
|
|
70
|
+
`component-contract` or `component-style` diagnostics, read
|
|
67
71
|
[layer responsibilities and contracts](references/layers.md), also served as
|
|
68
72
|
`ads://guides/layers`. Preserve public APIs and documented non-state styling hooks.
|
|
69
73
|
|
|
70
|
-
For parent/child `covers`, conditional-control review, reference comparisons,
|
|
74
|
+
For folder-group navigation, parent/child `covers`, conditional-control review, reference comparisons,
|
|
71
75
|
public style-helper use, native slot/selector composition, fragment navigation,
|
|
72
76
|
or `scenario-render` / `showcase-control` / `showcase-class` findings, read [scenario contracts](references/scenarios.md). Its verification
|
|
73
77
|
examples explain API visibility, reference baselines and state-transition checks.
|
|
@@ -191,6 +195,22 @@ Build a working import inventory: selected items, their transitive runtime/style
|
|
|
191
195
|
dependencies, assets, external packages, source guides, and relevant tests/rules.
|
|
192
196
|
Use source exports and dependency edges to distinguish public items from helpers.
|
|
193
197
|
|
|
198
|
+
## Establish destination compatibility
|
|
199
|
+
|
|
200
|
+
Before preparing changes, read [compatibility.md](references/compatibility.md)
|
|
201
|
+
and compare the selected source with the destination's actual contracts. Identify
|
|
202
|
+
what fits, what needs scoped adaptation, and what remains unresolved. The source
|
|
203
|
+
using ADS or passing its own checks does not establish destination compatibility.
|
|
204
|
+
Preserve destination policy while resolving framework/dependency requirements,
|
|
205
|
+
public API collisions, token meanings, styling ownership and runtime assumptions.
|
|
206
|
+
Resolve source differences within the import, including scoped reimplementation
|
|
207
|
+
when needed; the user need not restart with another skill. Use source/destination
|
|
208
|
+
versions to investigate changed contracts, not as a patch/minor/major acceptance
|
|
209
|
+
filter. Keep destination policy and requested capabilities intact. Resolve material
|
|
210
|
+
conflicts before applying the affected import. Verify the integrated candidate
|
|
211
|
+
with destination checks and rendered evidence, then report what was established
|
|
212
|
+
and any remaining limits.
|
|
213
|
+
|
|
194
214
|
## Shared token contract and theme values
|
|
195
215
|
|
|
196
216
|
Read [tokens.md](references/tokens.md). Shared token names, meanings, and value
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "ADS Import"
|
|
3
|
-
short_description: "Import ADS
|
|
4
|
-
default_prompt: "Use $ads-import
|
|
3
|
+
short_description: "Import ADS source after checking destination compatibility"
|
|
4
|
+
default_prompt: "Use $ads-import to check selected source ADS items, artwork or theme values against the destination's contracts, integrate compatible source and verify the result in the destination."
|
|
@@ -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.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Run ADS tooling
|
|
1
|
+
# Run ADS tooling with Node or Bun
|
|
2
2
|
|
|
3
|
-
Use
|
|
3
|
+
Use the project's runtime for setup or ad hoc checks alongside this skill's research,
|
|
4
4
|
implementation, documentation, and verification workflow. ADS must be a project
|
|
5
5
|
development dependency, and its checks must run before the project's build.
|
|
6
6
|
Routine builds use the local CLI.
|
|
@@ -27,11 +27,14 @@ Use `--framework preact` for native Preact. A saved `framework` in
|
|
|
27
27
|
required, including for an older config. Init preserves existing framework
|
|
28
28
|
tooling and rejects conflicting saved/JSX settings instead of converting it.
|
|
29
29
|
|
|
30
|
-
Use the confirmed package name/version if different. For
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
Use the confirmed package name/version if different. For a Bun project, use
|
|
31
|
+
`bunx --bun @reqvire-org/ads init --framework react`, `bun install` and
|
|
32
|
+
`bun --bun run build`. Bun 1.3.13+ suffices; Node is unnecessary. Init detects
|
|
33
|
+
`packageManager` or `bun.lock`/`bun.lockb`, then defaults to Bun when launched
|
|
34
|
+
with Bun. See [runtimes.md](runtimes.md)
|
|
35
|
+
for MCP configuration and portable compiler/behavior commands.
|
|
36
|
+
Use `--package-manager bun` only for an explicit override. Preserve the project's
|
|
37
|
+
existing package-manager policy and lockfile.
|
|
35
38
|
|
|
36
39
|
`init` accepts no directory argument and requires an existing `package.json`.
|
|
37
40
|
For starting from zero, copy the bundled `ads-designer` application scaffold
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# Check compatibility with the receiving ADS
|
|
2
|
+
|
|
3
|
+
The destination defines the integration contract. Read its configuration, public
|
|
4
|
+
APIs, relevant owner guides, shared token roles, package declarations and normal
|
|
5
|
+
app/preview build commands. Compare those with the selected source and its real
|
|
6
|
+
dependency closure. A shared ADS version, familiar export name or successful
|
|
7
|
+
source build is evidence about the source, not proof that it fits the destination.
|
|
8
|
+
|
|
9
|
+
Keep the comparison scoped to the request. Runtime imports need framework and
|
|
10
|
+
dependency analysis; a token-values or brand-only import needs the applicable
|
|
11
|
+
theme, asset and build checks without unrelated component research.
|
|
12
|
+
|
|
13
|
+
Record source and destination ADS versions when available, alongside the resolved
|
|
14
|
+
source revision. Versions help locate changed contracts; there is no patch-only
|
|
15
|
+
acceptance rule or automatic rejection across minor/major versions. Check what
|
|
16
|
+
the installed destination tooling actually supports, including contract schemas
|
|
17
|
+
and framework behavior. A source's newer tool version does not authorize upgrading
|
|
18
|
+
the destination or copying its configuration.
|
|
19
|
+
|
|
20
|
+
## Compare the contracts that matter
|
|
21
|
+
|
|
22
|
+
| Concern | Destination compatibility evidence |
|
|
23
|
+
|---------|------------------------------------|
|
|
24
|
+
| Framework and build | Configured framework, JSX, hooks, event/ref behavior, package/peer versions and extraction work in both application and preview builds. Any required SSR/hydration behavior is preserved. |
|
|
25
|
+
| Public APIs and dependencies | Existing components/controllers satisfy the needed semantics, providers and lifecycle. New dependencies fit declared versions; names and exports have an explicit destination owner. |
|
|
26
|
+
| Tokens and themes | Map roles by meaning, type, state and theme behavior. Different values for equivalent roles are expected; item imports use destination values. Add only missing shared decisions. |
|
|
27
|
+
| Styling and ownership | Linaria owns the imported styles under the destination's layer rules. Source resets, theme providers, private-selector overrides or independent value sheets do not introduce another visual policy. |
|
|
28
|
+
| Runtime assumptions | Application stores, routing and backend services remain application inputs. The implementation declares needed dependencies and does not assume globals, styles or libraries supplied by an MCP host. |
|
|
29
|
+
| Assets and provenance | Fonts, images and other required assets resolve through the destination build and preview resource policy. Retain applicable licenses and upstream notices. |
|
|
30
|
+
|
|
31
|
+
Inspect existing consumers before replacing a destination export or dependency.
|
|
32
|
+
Matching names or TypeScript signatures do not establish matching behavior.
|
|
33
|
+
Apply the selected value policy: an explicit `tokens` request authorizes compatible
|
|
34
|
+
source values, while an item or artwork import preserves the destination theme.
|
|
35
|
+
Follow [tokens.md](tokens.md) for semantic mappings and theme-scope conflicts.
|
|
36
|
+
|
|
37
|
+
Assess the destination's intended website and MCP App contexts through the same
|
|
38
|
+
public UI API. Use existing showcase evidence for the exercised MCP App conditions
|
|
39
|
+
and relevant application checks for website integration. Keep MCP communication,
|
|
40
|
+
tool-result mapping and serving in application adapters; follow the
|
|
41
|
+
[shared UI boundary](layers.md#share-ui-across-websites-and-mcp-apps). Add targeted
|
|
42
|
+
verification for uncovered assumptions instead of creating a separate component
|
|
43
|
+
implementation or duplicating the showcase pipeline.
|
|
44
|
+
|
|
45
|
+
## Decide before applying
|
|
46
|
+
|
|
47
|
+
Use a compact working comparison: source requirement, destination evidence,
|
|
48
|
+
planned adaptation and how it will be verified. No extra manifest is required.
|
|
49
|
+
|
|
50
|
+
- **Compatible:** the selected source fits the destination's contracts.
|
|
51
|
+
- **Adaptable within the import:** integrate paths/exports, map equivalent roles,
|
|
52
|
+
reuse verified public APIs and adapt supported framework/styling differences
|
|
53
|
+
while preserving required behavior. Keep those changes in the selected scope.
|
|
54
|
+
- **Unresolved:** evidence is missing or requirements conflict. Investigate the
|
|
55
|
+
affected boundary before deciding that the source cannot fit.
|
|
56
|
+
- **Conflicting requirements:** preserving the requested capability would require
|
|
57
|
+
changing destination policy or an existing consumer contract. Keep that import
|
|
58
|
+
unapplied and explain the concrete conflict and available choices. Ask for the
|
|
59
|
+
decision that changes scope; do not ask again for routine integration already
|
|
60
|
+
authorized by the import request.
|
|
61
|
+
|
|
62
|
+
For example, React source entering a native Preact ADS needs an assessment of its
|
|
63
|
+
hooks, JSX, events and dependencies. A renderer alias does not establish that
|
|
64
|
+
compatibility. The required adaptation remains part of this import request.
|
|
65
|
+
Do not silently migrate the destination framework, replace its token scale,
|
|
66
|
+
broaden guard exceptions or drop capabilities to make the import pass.
|
|
67
|
+
|
|
68
|
+
## Resolve differences within the import
|
|
69
|
+
|
|
70
|
+
For each mismatch, identify the source capability that must survive, choose a
|
|
71
|
+
destination-compatible implementation, and name the check that will establish
|
|
72
|
+
it. Start with verified destination APIs and shared roles. Adapt the selected
|
|
73
|
+
source where reuse does not preserve its contract, including rewriting framework
|
|
74
|
+
or styling code when necessary. Follow [implementation.md](implementation.md)
|
|
75
|
+
for dependency, behavior, ownership and provenance requirements.
|
|
76
|
+
|
|
77
|
+
For substantial reimplementation, consult `ads-port` guidance when available;
|
|
78
|
+
the user does not need to restart the request under another skill. Keep the same
|
|
79
|
+
selected capabilities, source revision and destination policy. A standalone
|
|
80
|
+
`ads-import` installation can follow its own implementation reference and source
|
|
81
|
+
research without requiring another installed skill. Record material API changes
|
|
82
|
+
and preserve applicable upstream notices even after rewriting the implementation.
|
|
83
|
+
|
|
84
|
+
Prepare one owner draft at a time. Use a coupled transaction when, for example,
|
|
85
|
+
a genuinely missing shared role and its component must change together. Inspect
|
|
86
|
+
the failing validation boundary, revise the affected owner, and validate again.
|
|
87
|
+
An assertion failure calls for implementation investigation; a resource-loading
|
|
88
|
+
or runner failure calls for infrastructure diagnosis. Neither justifies relaxing
|
|
89
|
+
destination guards. Stop and report when a required capability cannot be expressed
|
|
90
|
+
or verified with the available destination tooling.
|
|
91
|
+
|
|
92
|
+
## Verify in the destination
|
|
93
|
+
|
|
94
|
+
Prepare the integrated candidate and run destination architecture, lint, type,
|
|
95
|
+
build and applicable behavior checks. Through MCP, use the existing guarded
|
|
96
|
+
dry-run workflow; there is no separate compatibility tool or certification flag.
|
|
97
|
+
Inspect the real public API in destination scenarios and actual consumer context,
|
|
98
|
+
including relevant themes, states, asset loads and teardown. Compare behavior
|
|
99
|
+
against the source separately from intentional destination-theme differences.
|
|
100
|
+
|
|
101
|
+
Passing static checks establishes only their tested boundaries. Report material
|
|
102
|
+
adaptations, remaining conflicts, checks run and unverified requirements. Record
|
|
103
|
+
durable integration decisions beside the imported owner's public contract; avoid
|
|
104
|
+
requiring a separate compatibility report for every import.
|
|
105
|
+
|
|
106
|
+
Candidate validation uses the project's installed dependencies. It does not
|
|
107
|
+
install packages, and a dry run is not a dependency-installation sandbox. When
|
|
108
|
+
new dependencies are required, use the project's package-manager workflow to
|
|
109
|
+
prepare compatible declarations, the lockfile and installed packages before
|
|
110
|
+
validating dependent runtime changes. Keep package installation out of validation
|
|
111
|
+
scripts. ADS config/source edits still follow their discovered mutation owners;
|
|
112
|
+
use the client package-manager tools for installation. If those tools are
|
|
113
|
+
unavailable, report the exact prerequisite instead of claiming a validated import.
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# Selected implementation import
|
|
2
2
|
|
|
3
|
+
Establish [destination compatibility](compatibility.md) before preparing changes.
|
|
4
|
+
Recheck the affected assumptions when the dependency closure or adaptation changes.
|
|
5
|
+
|
|
3
6
|
## Follow the real dependency closure
|
|
4
7
|
|
|
5
8
|
Start at each selected public export and inspect its imports, re-exports, side
|
|
@@ -24,6 +27,9 @@ essential CSS extraction, assets, or code generation without replacing the
|
|
|
24
27
|
whole build configuration. External runtime dependencies of the copied code
|
|
25
28
|
remain real dependencies;
|
|
26
29
|
do not disguise a wrapper as a fully native independent implementation.
|
|
30
|
+
Install required packages through the project package-manager workflow before
|
|
31
|
+
validating dependent runtime changes. Guarded candidate checks use existing
|
|
32
|
+
installed dependencies; they must not run installation as a validation step.
|
|
27
33
|
|
|
28
34
|
Do not copy real product data, routes, network services, or application imports
|
|
29
35
|
into reusable primitives/patterns. Use documented slots, props, and callbacks
|
|
@@ -30,6 +30,22 @@ Do not classify by import count, JSX element count, names or file length. Review
|
|
|
30
30
|
the capability and its consumer contract. Preserve valid APIs when tracing is
|
|
31
31
|
inconclusive; do not make an export private or add a product prop just to pass.
|
|
32
32
|
|
|
33
|
+
## Share UI across websites and MCP Apps
|
|
34
|
+
|
|
35
|
+
Build and adapt UI through the project's public design-system APIs. Websites
|
|
36
|
+
and MCP Apps use the same components, patterns, controllers, tokens and styles.
|
|
37
|
+
Application adapters supply data and actions and own mounting, routing, stores,
|
|
38
|
+
MCP communication, tool-result mapping and serving. Keep those integrations out
|
|
39
|
+
of reusable UI implementations. ADS's own MCP server supports design-system
|
|
40
|
+
development, inspection and rendered review.
|
|
41
|
+
|
|
42
|
+
The ADS showcase renders the real public implementation inside an MCP App.
|
|
43
|
+
Its previews and registered checks provide evidence for the exercised states,
|
|
44
|
+
themes, sizes and environment. Relevant application checks verify website
|
|
45
|
+
integration. Reuse existing verification; add targeted checks when a change
|
|
46
|
+
exposes an uncovered requirement. Record what was actually verified, including
|
|
47
|
+
any remaining host or integration assumptions.
|
|
48
|
+
|
|
33
49
|
## Demonstrate the production implementation
|
|
34
50
|
|
|
35
51
|
Product patterns are reusable application UI, not showcase replicas. A scenario
|
|
@@ -0,0 +1,127 @@
|
|
|
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
|
+
For incremental preview compilation, the project adapter passes
|
|
97
|
+
`createVitePreviewBuilder({ build, configure })` from
|
|
98
|
+
`@reqvire-org/ads/scenarios/vite` as `runScenarioCompiler`'s `buildGraph`.
|
|
99
|
+
`configure(entries, options)` returns the existing Vite configuration, including
|
|
100
|
+
framework/Linaria plugins, aliases and entries. The helper retains a watched
|
|
101
|
+
Rollup graph, captures private output, tracks dependencies and closes with the
|
|
102
|
+
compiler. Existing custom adapters still work; they must adopt the helper to gain
|
|
103
|
+
incremental transforms. Upgrade the project dependency and restart the builder.
|
|
104
|
+
Keep the full validation callback and production build behavior.
|
|
105
|
+
|
|
106
|
+
The App preserves selected form/scroll state across accepted unrelated graph
|
|
107
|
+
updates, reruns audits and remounts when its own module/style/asset closure changes.
|
|
108
|
+
Do not promise component-level HMR. Guarded edits select affected behavior owners
|
|
109
|
+
from their input dependencies and run their registered checks; project scripts
|
|
110
|
+
remain as configured and releases run the complete suite. Incremental compilation
|
|
111
|
+
alone does not make arbitrary lint/typecheck/test scripts incremental.
|
|
112
|
+
|
|
113
|
+
Preview watching excludes standard output trees by default, including nested
|
|
114
|
+
Cargo `target/` directories, without allocating watches inside them. Explicit
|
|
115
|
+
`sourceDir` and `dsDir` take priority over those default output names. Register
|
|
116
|
+
custom outputs in `assets.generatedPaths`; do not copy the default list into a
|
|
117
|
+
new project's config. `ENOSPC` from `fs.watch` can mean the OS watch limit rather
|
|
118
|
+
than disk space: inspect the failing path and generated-tree traversal before
|
|
119
|
+
raising system limits or deleting files. Generated churn must not mark previews
|
|
120
|
+
stale; actual source changes must still rebuild.
|
|
121
|
+
|
|
122
|
+
Bundled binary renderers may load their forwarded `blob:` resources. ADS's
|
|
123
|
+
showcase/explorer permits WebAssembly compilation while keeping JavaScript eval
|
|
124
|
+
and undeclared network requests blocked. External MCP hosts control their CSP.
|
|
125
|
+
Test the actual renderer inside the App; a successful website build does not
|
|
126
|
+
establish binary-resource or WebAssembly support. Keep transport and resource
|
|
127
|
+
loading in explicit injected adapters or declared renderer dependencies.
|
|
@@ -23,6 +23,25 @@ on-demand element screenshots. It grants no render/behavior coverage and no extr
|
|
|
23
23
|
styling permission. Use [captures.md](captures.md) for current/candidate review,
|
|
24
24
|
target selection, resource reads and storage lifecycle.
|
|
25
25
|
|
|
26
|
+
## Folder-derived showcase groups
|
|
27
|
+
|
|
28
|
+
Components, patterns and compositions use container folders to organize
|
|
29
|
+
navigation: `components/Forms/Input/Input.ads.scenario.tsx` appears under
|
|
30
|
+
**Forms** when `Forms/` contains only real directories. Hidden entries are ignored;
|
|
31
|
+
a regular file such as `index.ts` or `README.md`, or a symlink, prevents that
|
|
32
|
+
container from becoming a group. An owner's own directory and layer root never
|
|
33
|
+
form a group. Nested containers produce one path label: **Forms / Selection**.
|
|
34
|
+
Folder spelling and case are preserved: `form-controls/` displays `form-controls`.
|
|
35
|
+
|
|
36
|
+
Folders are the only grouping source. Do not add `group` metadata to a scenario
|
|
37
|
+
or owner contract. MCP's optional `group` field is computed discovery output;
|
|
38
|
+
`ads_scenarios(query: "Forms")` searches it along with existing scenario fields.
|
|
39
|
+
Use returned IDs with `ads_show_scenario`; `ads_catalog` previews, `ads_units` and
|
|
40
|
+
source resources retain the actual nested owner paths. Ungrouped entries remain
|
|
41
|
+
visible with no Default heading. Flat layouts keep working; tokens retain their
|
|
42
|
+
categories. When moving an owner, update its imports/public exports and any
|
|
43
|
+
references to changed path-derived scenario, behavior or capture IDs.
|
|
44
|
+
|
|
26
45
|
## Fragment links inside Apps
|
|
27
46
|
|
|
28
47
|
Keep intended `href="#"` and named fragments in the project API and fixtures.
|
|
@@ -3,6 +3,9 @@ name: ads-motion
|
|
|
3
3
|
description: Implement, review, audit, or profile web animation in a project's local design system. Use for motion purpose, easing, timing, origins, interruptibility, reduced motion, and rendering performance while preserving token and component ownership.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
For Node/Bun setup, MCP launch and compiler workers, read
|
|
7
|
+
[runtimes.md](references/runtimes.md).
|
|
8
|
+
|
|
6
9
|
Accept a component/pattern name, file, screen, or project path and infer the mode
|
|
7
10
|
from the request. Inspect before proposing motion: read `docs/ARCHITECTURE.md` when
|
|
8
11
|
present (or the existing architecture guide), the project's ADS guide,
|
|
@@ -84,12 +87,13 @@ renderers, build aliases or `review-import` / `review-contract` diagnostics, rea
|
|
|
84
87
|
|
|
85
88
|
A component provides one cohesive UI capability; a pattern arranges capabilities
|
|
86
89
|
into reusable structures or workflows. Components may compose components/controllers;
|
|
87
|
-
layout patterns may arrange slots. Do not classify by component count. For
|
|
88
|
-
|
|
90
|
+
layout patterns may arrange slots. Do not classify by component count. For shared
|
|
91
|
+
website/MCP App use, owner selection, or `component-dependency`,
|
|
92
|
+
`component-contract` or `component-style` diagnostics, read
|
|
89
93
|
[layer responsibilities and contracts](references/layers.md), also served as
|
|
90
94
|
`ads://guides/layers`. Preserve public APIs and documented non-state styling hooks.
|
|
91
95
|
|
|
92
|
-
For parent/child `covers`, conditional-control review, reference comparisons,
|
|
96
|
+
For folder-group navigation, parent/child `covers`, conditional-control review, reference comparisons,
|
|
93
97
|
public style-helper use, native slot/selector composition, fragment navigation,
|
|
94
98
|
or `scenario-render` / `showcase-control` / `showcase-class` findings, read [scenario contracts](references/scenarios.md). Its verification
|
|
95
99
|
examples explain API visibility, reference baselines and state-transition checks.
|
|
@@ -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.
|