@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.
Files changed (59) hide show
  1. package/README.md +21 -10
  2. package/dist/bootstrap-ds/README.md +7 -5
  3. package/dist/bootstrap-ds/ds.config.json +1 -1
  4. package/dist/bootstrap-ds/scripts/build-mcp-previews.mjs +1 -1
  5. package/dist/capture.mjs +1 -1
  6. package/dist/development-runtime.mjs +17 -0
  7. package/dist/index.mjs +1 -1
  8. package/dist/init.mjs +14 -12
  9. package/dist/mcp/apps.mjs +1 -1
  10. package/dist/mcp/context.mjs +5 -4
  11. package/dist/mcp/mutations.mjs +3 -2
  12. package/dist/mcp/preview-watch.mjs +2 -1
  13. package/dist/mcp/server.mjs +4 -1
  14. package/dist/mcp/widget.bundle.js +1 -1
  15. package/dist/preview-files.mjs +33 -0
  16. package/dist/preview-inputs.mjs +6 -5
  17. package/dist/scenarios-compiler.mjs +7 -7
  18. package/dist/showcase/sandbox.bundle.js +1 -1
  19. package/dist/skills/README.md +7 -1
  20. package/dist/skills/ads-break-ui/SKILL.md +6 -2
  21. package/dist/skills/ads-break-ui/references/behaviors.md +6 -3
  22. package/dist/skills/ads-break-ui/references/layers.md +16 -0
  23. package/dist/skills/ads-break-ui/references/runtimes.md +110 -0
  24. package/dist/skills/ads-designer/README.md +6 -0
  25. package/dist/skills/ads-designer/SKILL.md +10 -5
  26. package/dist/skills/ads-designer/assets/bootstrap-ds/README.md +7 -5
  27. package/dist/skills/ads-designer/assets/bootstrap-ds/ds.config.json +1 -1
  28. package/dist/skills/ads-designer/assets/bootstrap-ds/scripts/build-mcp-previews.mjs +1 -1
  29. package/dist/skills/ads-designer/references/behaviors.md +6 -3
  30. package/dist/skills/ads-designer/references/cli.md +10 -7
  31. package/dist/skills/ads-designer/references/design-craft.md +31 -0
  32. package/dist/skills/ads-designer/references/layers.md +16 -0
  33. package/dist/skills/ads-designer/references/runtimes.md +110 -0
  34. package/dist/skills/ads-import/SKILL.md +23 -3
  35. package/dist/skills/ads-import/agents/openai.yaml +2 -2
  36. package/dist/skills/ads-import/references/behaviors.md +6 -3
  37. package/dist/skills/ads-import/references/cli.md +10 -7
  38. package/dist/skills/ads-import/references/compatibility.md +113 -0
  39. package/dist/skills/ads-import/references/implementation.md +6 -0
  40. package/dist/skills/ads-import/references/layers.md +16 -0
  41. package/dist/skills/ads-import/references/runtimes.md +110 -0
  42. package/dist/skills/ads-motion/SKILL.md +6 -2
  43. package/dist/skills/ads-motion/references/behaviors.md +6 -3
  44. package/dist/skills/ads-motion/references/layers.md +16 -0
  45. package/dist/skills/ads-motion/references/runtimes.md +110 -0
  46. package/dist/skills/ads-port/SKILL.md +6 -2
  47. package/dist/skills/ads-port/references/behaviors.md +6 -3
  48. package/dist/skills/ads-port/references/cli.md +10 -7
  49. package/dist/skills/ads-port/references/layers.md +16 -0
  50. package/dist/skills/ads-port/references/runtimes.md +110 -0
  51. package/dist/verification.mjs +4 -3
  52. package/docs/ADS.md +17 -0
  53. package/docs/ARCHITECTURE.md +19 -0
  54. package/docs/BEHAVIORS.md +6 -3
  55. package/docs/CHANGELOG.md +21 -1
  56. package/docs/COMPARISON.md +63 -0
  57. package/docs/GUIDE.md +20 -10
  58. package/docs/MCP.md +44 -6
  59. package/package.json +5 -4
@@ -1,6 +1,6 @@
1
- # Run ADS tooling through npx
1
+ # Run ADS tooling with Node or Bun
2
2
 
3
- Use npx for setup or ad hoc checks alongside this skill's research,
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 an existing Bun
31
- project, the same init command detects `packageManager` or `bun.lock`/`bun.lockb`;
32
- then use `bun install` and `bun run build`. Node 22.12 or newer remains required.
33
- Only use `--package-manager bun` when the project has no Bun marker yet or needs
34
- an explicit override. Preserve its existing package-manager policy and lockfile.
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,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.
@@ -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,8 +87,9 @@ 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 owner
88
- selection or `component-dependency`, `component-contract` or `component-style`, read
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
 
@@ -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": "npm",
146
- "args": ["run", "test:behavior", "--"],
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 `test:behavior` invokes the project's local `playwright test`. Its Playwright
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.
@@ -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,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.
@@ -3,6 +3,9 @@ name: ads-port
3
3
  description: "Port existing library components into a coherent project-owned ADS, reusing shared tokens and primitives while preserving required behavior. Use for native adaptation from a library URL, with reference comparison and provenance; not dependency installation or wrapping."
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 Port
7
10
 
8
11
  The result should be one coherent project design system. Reuse its shared tokens,
@@ -71,8 +74,9 @@ renderers, build aliases or `review-import` / `review-contract` diagnostics, rea
71
74
 
72
75
  A component provides one cohesive UI capability; a pattern arranges capabilities
73
76
  into reusable structures or workflows. Components may compose components/controllers;
74
- layout patterns may arrange slots. Do not classify by component count. For owner
75
- selection or `component-dependency`, `component-contract` or `component-style`, read
77
+ layout patterns may arrange slots. Do not classify by component count. For shared
78
+ website/MCP App use, owner selection, or `component-dependency`,
79
+ `component-contract` or `component-style` diagnostics, read
76
80
  [layer responsibilities and contracts](references/layers.md), also served as
77
81
  `ads://guides/layers`. Preserve public APIs and documented non-state styling hooks.
78
82
 
@@ -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": "npm",
146
- "args": ["run", "test:behavior", "--"],
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 `test:behavior` invokes the project's local `playwright test`. Its Playwright
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 through npx
1
+ # Run ADS tooling with Node or Bun
2
2
 
3
- Use npx for setup or ad hoc checks alongside this skill's research,
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 an existing Bun
31
- project, the same init command detects `packageManager` or `bun.lock`/`bun.lockb`;
32
- then use `bun install` and `bun run build`. Node 22.12 or newer remains required.
33
- Only use `--package-manager bun` when the project has no Bun marker yet or needs
34
- an explicit override. Preserve its existing package-manager policy and lockfile.
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
@@ -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