@reqvire-org/ads 0.3.25 → 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 (128) hide show
  1. package/README.md +28 -15
  2. package/dist/bootstrap-ds/ADS.md +28 -30
  3. package/dist/bootstrap-ds/README.md +13 -11
  4. package/dist/bootstrap-ds/design-system/assets/brand/README.md +3 -2
  5. package/dist/bootstrap-ds/ds.config.json +1 -1
  6. package/dist/bootstrap-ds/scripts/build-mcp-previews.mjs +1 -1
  7. package/dist/boundaries.mjs +0 -3
  8. package/dist/capture.mjs +1 -1
  9. package/dist/check.mjs +15 -22
  10. package/dist/config.mjs +3 -7
  11. package/dist/contract-migration.mjs +2 -2
  12. package/dist/contracts.d.mts +0 -1
  13. package/dist/design-values.mjs +81 -0
  14. package/dist/development-runtime.mjs +17 -0
  15. package/dist/evidence.mjs +1 -1
  16. package/dist/index.mjs +1 -1
  17. package/dist/init.mjs +14 -12
  18. package/dist/mcp/apps.mjs +1 -1
  19. package/dist/mcp/context.mjs +8 -7
  20. package/dist/mcp/mutations.mjs +3 -2
  21. package/dist/mcp/preview-watch.mjs +2 -1
  22. package/dist/mcp/prompts.mjs +4 -4
  23. package/dist/mcp/reports.mjs +101 -0
  24. package/dist/mcp/server.mjs +41 -3
  25. package/dist/mcp/widget.bundle.js +1 -1
  26. package/dist/paint-contracts.mjs +4 -5
  27. package/dist/preview-files.mjs +33 -0
  28. package/dist/preview-inputs.mjs +6 -5
  29. package/dist/preview-resources.mjs +1 -2
  30. package/dist/scenarios-compiler.mjs +7 -7
  31. package/dist/scenarios.mjs +14 -14
  32. package/dist/showcase/sandbox.bundle.js +1 -1
  33. package/dist/skills/README.md +14 -4
  34. package/dist/skills/ads-break-ui/SKILL.md +29 -15
  35. package/dist/skills/ads-break-ui/references/atomic-styles.md +9 -2
  36. package/dist/skills/ads-break-ui/references/behaviors.md +396 -0
  37. package/dist/skills/ads-break-ui/references/captures.md +1 -1
  38. package/dist/skills/ads-break-ui/references/contracts.md +18 -37
  39. package/dist/skills/ads-break-ui/references/design-data.md +91 -0
  40. package/dist/skills/ads-break-ui/references/evidence.md +4 -0
  41. package/dist/skills/ads-break-ui/references/guarded-editing.md +7 -11
  42. package/dist/skills/ads-break-ui/references/layers.md +16 -0
  43. package/dist/skills/ads-break-ui/references/reporting.md +101 -0
  44. package/dist/skills/ads-break-ui/references/runtimes.md +110 -0
  45. package/dist/skills/ads-break-ui/references/scenarios.md +9 -15
  46. package/dist/skills/ads-designer/README.md +6 -0
  47. package/dist/skills/ads-designer/SKILL.md +35 -20
  48. package/dist/skills/ads-designer/assets/bootstrap-ds/ADS.md +28 -30
  49. package/dist/skills/ads-designer/assets/bootstrap-ds/README.md +13 -11
  50. package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/assets/brand/README.md +3 -2
  51. package/dist/skills/ads-designer/assets/bootstrap-ds/ds.config.json +1 -1
  52. package/dist/skills/ads-designer/assets/bootstrap-ds/scripts/build-mcp-previews.mjs +1 -1
  53. package/dist/skills/ads-designer/references/atomic-styles.md +9 -2
  54. package/dist/skills/ads-designer/references/behaviors.md +396 -0
  55. package/dist/skills/ads-designer/references/captures.md +1 -1
  56. package/dist/skills/ads-designer/references/cli.md +10 -7
  57. package/dist/skills/ads-designer/references/contracts.md +18 -37
  58. package/dist/skills/ads-designer/references/design-craft.md +32 -1
  59. package/dist/skills/ads-designer/references/design-data.md +91 -0
  60. package/dist/skills/ads-designer/references/evidence.md +4 -0
  61. package/dist/skills/ads-designer/references/guarded-editing.md +7 -11
  62. package/dist/skills/ads-designer/references/layers.md +16 -0
  63. package/dist/skills/ads-designer/references/mobile.md +1 -1
  64. package/dist/skills/ads-designer/references/reporting.md +101 -0
  65. package/dist/skills/ads-designer/references/runtimes.md +110 -0
  66. package/dist/skills/ads-designer/references/scenarios.md +9 -15
  67. package/dist/skills/ads-import/SKILL.md +51 -20
  68. package/dist/skills/ads-import/agents/openai.yaml +2 -2
  69. package/dist/skills/ads-import/references/atomic-styles.md +9 -2
  70. package/dist/skills/ads-import/references/behaviors.md +396 -0
  71. package/dist/skills/ads-import/references/branding.md +1 -1
  72. package/dist/skills/ads-import/references/captures.md +1 -1
  73. package/dist/skills/ads-import/references/cli.md +10 -7
  74. package/dist/skills/ads-import/references/compatibility.md +113 -0
  75. package/dist/skills/ads-import/references/contracts.md +18 -37
  76. package/dist/skills/ads-import/references/design-data.md +91 -0
  77. package/dist/skills/ads-import/references/evidence.md +4 -0
  78. package/dist/skills/ads-import/references/guarded-editing.md +7 -11
  79. package/dist/skills/ads-import/references/implementation.md +9 -2
  80. package/dist/skills/ads-import/references/layers.md +16 -0
  81. package/dist/skills/ads-import/references/reporting.md +101 -0
  82. package/dist/skills/ads-import/references/runtimes.md +110 -0
  83. package/dist/skills/ads-import/references/scenarios.md +9 -15
  84. package/dist/skills/ads-import/references/tokens.md +11 -9
  85. package/dist/skills/ads-motion/SKILL.md +28 -14
  86. package/dist/skills/ads-motion/references/atomic-styles.md +9 -2
  87. package/dist/skills/ads-motion/references/behaviors.md +396 -0
  88. package/dist/skills/ads-motion/references/captures.md +1 -1
  89. package/dist/skills/ads-motion/references/contracts.md +18 -37
  90. package/dist/skills/ads-motion/references/design-data.md +91 -0
  91. package/dist/skills/ads-motion/references/evidence.md +4 -0
  92. package/dist/skills/ads-motion/references/guarded-editing.md +7 -11
  93. package/dist/skills/ads-motion/references/layers.md +16 -0
  94. package/dist/skills/ads-motion/references/reporting.md +101 -0
  95. package/dist/skills/ads-motion/references/runtimes.md +110 -0
  96. package/dist/skills/ads-motion/references/scenarios.md +9 -15
  97. package/dist/skills/{ads-migrate → ads-port}/SKILL.md +64 -33
  98. package/dist/skills/ads-port/agents/openai.yaml +4 -0
  99. package/dist/skills/{ads-migrate → ads-port}/references/atomic-styles.md +9 -2
  100. package/dist/skills/ads-port/references/behaviors.md +396 -0
  101. package/dist/skills/{ads-migrate → ads-port}/references/captures.md +1 -1
  102. package/dist/skills/{ads-migrate → ads-port}/references/cli.md +10 -7
  103. package/dist/skills/{ads-migrate → ads-port}/references/contracts.md +18 -37
  104. package/dist/skills/ads-port/references/design-data.md +91 -0
  105. package/dist/skills/{ads-migrate → ads-port}/references/evidence.md +4 -0
  106. package/dist/skills/{ads-migrate → ads-port}/references/guarded-editing.md +7 -11
  107. package/dist/skills/{ads-migrate → ads-port}/references/layers.md +16 -0
  108. package/dist/skills/{ads-migrate → ads-port}/references/lint-and-docs.md +5 -0
  109. package/dist/skills/{ads-migrate → ads-port}/references/native-implementation.md +49 -15
  110. package/dist/skills/ads-port/references/reporting.md +101 -0
  111. package/dist/skills/ads-port/references/runtimes.md +110 -0
  112. package/dist/skills/{ads-migrate → ads-port}/references/scenarios.md +9 -15
  113. package/dist/skills/{ads-migrate → ads-port}/references/testing.md +11 -1
  114. package/dist/tokens.mjs +5 -8
  115. package/dist/unit-contracts.mjs +1 -8
  116. package/dist/verification.mjs +4 -3
  117. package/docs/ADS.md +59 -73
  118. package/docs/ARCHITECTURE.md +68 -20
  119. package/docs/BEHAVIORS.md +46 -41
  120. package/docs/CHANGELOG.md +44 -1
  121. package/docs/COMPARISON.md +63 -0
  122. package/docs/CONTRACTS.md +18 -37
  123. package/docs/GUIDE.md +41 -23
  124. package/docs/MCP.md +100 -15
  125. package/package.json +5 -4
  126. package/dist/scoped-tokens.mjs +0 -68
  127. package/dist/skills/ads-migrate/agents/openai.yaml +0 -4
  128. /package/dist/skills/{ads-migrate → ads-port}/references/review.md +0 -0
@@ -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/CONTRACTS.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Static owner contracts and development files
2
2
 
3
- Use one optional `<Owner>.ads.contract.ts` for owner-local tokens, constrained
3
+ Use one optional `<Owner>.ads.contract.ts` for constrained
4
4
  paint inputs, scoped runtime bindings, declarative parts and behavioral checks.
5
5
  The import `import type { UnitContract } from "@reqvire-org/ads/contracts"` supplies
6
6
  development typing. ADS reads its AST and resolves real symbols without importing
@@ -15,12 +15,9 @@ components/Plot/
15
15
  renderer.tsx production consumer
16
16
  paints.ts production binding producer
17
17
  types.ts production prop types
18
- tokens.css optional production token definitions
19
18
  Plot.ads.contract.ts static tool declaration
20
19
  Plot.ads.scenario.tsx demonstration
21
20
  Plot.ads.fixture.ts demonstration data
22
- Tokens.ads.scenario.tsx real owner-token samples
23
- Tokens.ads.fixture.ts sample bindings/probes
24
21
  Plot.ads.behavior.spec.ts registered browser checks
25
22
  Plot.ads.test.tsx optional unit tests
26
23
  Plot.ads.helpers.ts development-only adapters
@@ -56,7 +53,6 @@ import { paints } from "./paints";
56
53
 
57
54
  export default {
58
55
  schemaVersion: 1,
59
- tokens: { namespace: "--plot-", stylesheet: "./tokens.css" },
60
56
  paintInputs: [
61
57
  { api: Plot, property: "config.*.paint", kind: "paint-reference" },
62
58
  { api: Series, property: "fill", kind: "paint-reference", bindings: ["items"] },
@@ -164,17 +160,17 @@ Raw constants, undeclared fields, extra writes and unknown transforms are reject
164
160
  The browser audit checks actual accessible color references in both branches;
165
161
  a local SVG URL or `none` is not a CSS color inside `light-dark()`.
166
162
 
167
- Families cannot overlap shared tokens, owner-token namespaces, private runtime
163
+ Families cannot overlap shared tokens, private runtime
168
164
  prefixes or other bindings. A broad family such as `--color-${key}` grants no
169
165
  shared-token exception. Use a distinct private family where collision freedom
170
166
  cannot be established. Registered paint consumers list their allowed binding IDs;
171
- borrowing a peer's family or private token remains invalid. Bindings are scoped
167
+ borrowing a peer's binding family or private runtime variable remains invalid. Bindings are scoped
172
168
  to their actual root; portals outside it need deliberate project integration.
173
169
 
174
170
  A registered binding producer may combine two accessible color references as
175
171
  `light-dark(var(--light-token), var(--dark-token))`. The App paint audit checks
176
172
  both branches and their observed effect in the active color scheme. Raw colors,
177
- unknown/private tokens and SVG URLs inside this color function remain invalid.
173
+ undefined tokens and SVG URLs inside this color function remain invalid.
178
174
  This derived binding form does not widen public paint-input types; use constrained
179
175
  references for each theme input and verify both color schemes in browser checks.
180
176
 
@@ -239,38 +235,23 @@ retained. Unreadable prerequisites report coverage as not established. Inspect
239
235
  the exact source diagnostic and bounded results; do not assume every subsequent
240
236
  missing preview means its runtime API is invalid.
241
237
 
242
- ## Local tokens and project consistency
243
-
244
- `tokens.css` remains optional production design data for component/pattern owners,
245
- imported by the runtime owner. Controllers stay headless; review uses the shared
246
- vocabulary and its own development presentation state. Only root/theme definitions belong there. Tokens require real sample
247
- coverage, including independently built owner token scenarios. One namespace
248
- cannot be shared by peer components. Private references remain private through
249
- TS constants, re-exports, helper returns, SVG/paint props and property reads/writes.
250
- Normal composition of a public component using its own tokens remains valid.
251
- Source analysis covers supported value flows; arbitrary dynamic code is not
252
- proof of ownership. CSS variables remain browser-visible; namespacing is an
253
- architecture boundary, not browser encapsulation.
254
-
255
- Ownership does not establish a project's visual scale:
256
-
257
- - A component redefining shared `--space-4` fails.
258
- - Its private `--plot-gap: 7px` can be valid component geometry.
259
- - `--plot-gap: var(--space-4)` preserves a shared scale with local meaning.
260
-
261
- Choose project policy explicitly. A registered project check can use tooling-only
262
- `inspectTokens(root)` and `inspectTokenOrigins(inventory, name, { stopAt: names })`
263
- from `@reqvire-org/ads`. `aliasOnly` verifies every theme definition follows only
264
- aliases to the explicitly selected origins; `literals` and `diagnostics` explain
265
- violations/limits. Select the exact targets and permitted shared origins. Keep
266
- intentional geometry exceptions exact with documented reasons. ADS neither
267
- infers spacing meaning from names nor prescribes a global spacing palette.
238
+ ## Shared Data and project consistency
239
+
240
+ Data has one shared design vocabulary in the configured token foundation. There
241
+ is no owner-contract token namespace or private value stylesheet. Components map
242
+ shared values into `--ds-*`; patterns use `--ux-*`. Static literals cannot bypass
243
+ this boundary through aliases, fallbacks, themes or helper/import interpolation.
244
+ Shared token samples belong under the token directory. See
245
+ [shared Data and component mappings](ADS.md#shared-data-and-component-mappings).
246
+
247
+ `inspectTokenOrigins(inventory, name, {stopAt: names})` remains available for
248
+ project-specific audits of shared alias relationships. It supplements mandatory
249
+ core source checks and does not enable independent local values.
268
250
 
269
251
  ## Migration and MCP editing
270
252
 
271
- Legacy `tokens.json`/`<Owner>.tokens.json` and `behavior.json` remain readable.
272
- Use either authoring form per section; competing declarations fail. New contracts
273
- normalize into the same discovery, ownership, source revisions, affected-check
253
+ Use the static owner contract for new registrations. Competing declarations fail.
254
+ Contracts participate in discovery, ownership, source revisions, affected-check
274
255
  selection and candidate gates. `ads_units` exposes `contractFile`; `ads_catalog`
275
256
  reports constrained paint paths and declarative parent/consumer/check references.
276
257
  Use bounded file reads and paged detailed results, not repeated whole-project dumps.
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
 
@@ -33,6 +33,12 @@ An agent uses the MCP tools to inspect, edit and review the project:
33
33
  checks. Recheck `ads_status.build` after changes; notifications alone do not
34
34
  establish current output.
35
35
 
36
+ After targeted diagnosis, record a suspected ADS defect with `ads_report_bug`, or
37
+ a missing capability with `ads_request_feature`. Supply a minimal reproduction or
38
+ workflow and reference exact execution/check evidence when available. Reports stay
39
+ local, are untriaged, and do not bypass guards. Read `ads://guides/reporting` or the
40
+ [portable reporting guide](../skills/ads-designer/references/reporting.md).
41
+
36
42
  For an on-demand screenshot, call `ads_capture` with a discovered scenario ID and
37
43
  optionally a named `captureTargets` element, theme and viewport. To compare a
38
44
  proposed change before applying it, add `screenshot:true` and an explicit
@@ -83,7 +89,7 @@ Keep private controllers with their consumer; share reusable behavior through
83
89
  project dependencies. Controllers own lifecycle/measurements while components and
84
90
  patterns own presentation. A shared context provider is a behavioral API too.
85
91
 
86
- Optional owner-local `behavior.json` registers guarantees and maintained checks.
92
+ Optional `<Owner>.ads.contract.ts` registers guarantees and maintained checks using actual implementation references.
87
93
  Scenario `exercises` records demonstrations separately from rendered `covers`.
88
94
  Use `ads behaviors --json` for discovery and `ads verify --unit <discovered-id>`
89
95
  to run registered cases; MCP exposes `ads_behaviors` and `ads_verify`. Tests and
@@ -163,7 +169,7 @@ contexts, and exclusion of JavaScript and generated outputs.
163
169
 
164
170
  ## Set up an existing project
165
171
 
166
- Use Node 22.12 or newer. Run inside the project containing `package.json`:
172
+ Use Node 22.12+ or Bun 1.3.13+. Run inside the project containing `package.json`:
167
173
 
168
174
  ```sh
169
175
  npx @reqvire-org/ads init --framework react
@@ -171,8 +177,9 @@ npm install
171
177
  npm run build
172
178
  ```
173
179
 
174
- For a Bun-managed project, use the same init command, followed by `bun install`
175
- and `bun run build`. No archive or directory argument is needed for a published
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
176
183
  release. `init` requires an existing project; it does not create an application.
177
184
  For starting from zero, the `ads-designer` skill carries a standalone empty
178
185
  React/TypeScript/Linaria application scaffold. Copy that first, then run `init`
@@ -243,7 +250,7 @@ updated lockfile. npm CI can use `npm ci`, then `npm run build`.
243
250
  1. Explicit `--package-manager npm` or `--package-manager bun`.
244
251
  2. The project's `packageManager` field.
245
252
  3. Its Bun (`bun.lock` or `bun.lockb`) or npm (`package-lock.json`) lockfile.
246
- 4. The invoking runner's package-manager metadata, otherwise npm.
253
+ 4. The Bun runtime or invoking Bun runner's metadata, otherwise npm.
247
254
 
248
255
  With both lockfile types and no declared package manager, specify the flag.
249
256
  This version supports npm and Bun. It never replaces or removes a lockfile.
@@ -251,13 +258,22 @@ An existing Bun lockfile takes precedence over the npm runner used by `npx`.
251
258
  For a Bun project with no lockfile or package-manager metadata yet:
252
259
 
253
260
  ```sh
254
- npx @reqvire-org/ads init --framework react --package-manager bun
261
+ bunx --bun @reqvire-org/ads init --framework react
255
262
  bun install
256
- bun run build
263
+ bun --bun run build
257
264
  ```
258
265
 
259
- The flag chooses the ADS hook's runner; it does not translate the app's existing
260
- scripts. Node remains required by the tool and Oxlint integration.
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.
261
277
 
262
278
  ## Migrating from DS
263
279
 
@@ -414,10 +430,10 @@ categories, undefined aliases, alias cycles, and individual theme/media
414
430
  overrides. Project-specific values and additional definitions within ADS's fixed
415
431
  naming contract are allowed. The contract's `naming` section lists the fixed
416
432
  shared families and names; projects cannot rename those shared semantics.
417
- Component/pattern constants can use an explicit unique owner-local namespace and
418
- definition-only stylesheet, with the same real-token preview completeness rules.
419
- See [owner-local tokens](ADS.md#owner-local-tokens). Unregistered foreign names
420
- remain rejected.
433
+ All design values belong in the shared foundation. Components and patterns map
434
+ shared roles into their runtime variables instead of defining independent values.
435
+ See [shared Data and component mappings](ADS.md#shared-data-and-component-mappings).
436
+ Foreign token namespaces remain rejected.
421
437
  `--ds-*`, `--ux-*`, and `--showcase-*` variables remain owned by their layers,
422
438
  including when a file is inside `tokens/`. Shared token assignments outside
423
439
  `tokens/` fail. Source styles also check shared references for undeclared names.
@@ -482,14 +498,14 @@ changes may require restarting the runtime; ordinary owner/fixture/style/asset e
482
498
  See [the compiler contract](MCP.md#configure-the-project-compiler) for revisions,
483
499
  diagnostics, invalidation and the shared resource graph.
484
500
 
485
- Colocate `Scenario.tsx` and `fixture.ts` beside tokens and each component/pattern, or use
486
- `<Owner>.scenario.tsx` and `<Owner>.fixture.ts` for flat owners. Larger entries
501
+ Colocate `<Owner>.ads.scenario.tsx` and `<Owner>.ads.fixture.ts` beside tokens and
502
+ each component/pattern. Larger entries
487
503
  live under `composition/<Name>/`. A default zero-input mountable view imports the
488
504
  real public UI and a local fixture, and exports literal metadata:
489
505
 
490
506
  ```tsx
491
507
  import { Button } from "@ds";
492
- import { fixture } from "./fixture";
508
+ import { fixture } from "./Button.ads.fixture";
493
509
  export const scenario = { title: "Button states", covers: ["Button"] };
494
510
  export default function Scenario() { return <Button>{fixture.label}</Button>; }
495
511
  ```
@@ -497,11 +513,11 @@ export default function Scenario() { return <Button>{fixture.label}</Button>; }
497
513
  IDs derive from filenames; do not maintain another registry or hand-assigned IDs.
498
514
  Token scenarios live beside foundation CSS under the configured token directory.
499
515
  The starter includes `tokens/Foundation.ads.scenario.tsx` and its local fixture for
500
- a project-owned token review renderer. Keep its presentation in that pattern:
516
+ a project-owned token review renderer. Keep its presentation in development-only `review/`:
501
517
 
502
518
  ```tsx
503
519
  import { TokenSamples } from "@ds/review";
504
- import { fixture } from "./Typography.fixture";
520
+ import { fixture } from "./Typography.ads.fixture";
505
521
  export const scenario = { title: fixture.title, covers: ["TokenSamples"], samples: fixture.samples };
506
522
  export default function Scenario() { return <TokenSamples {...fixture} />; }
507
523
  ```
@@ -552,8 +568,7 @@ in owned component/pattern styles, with tokens supplying visual values.
552
568
  ADS has fixed token names and ownership namespaces. Change values in the existing
553
569
  token files; `--accent`, `--font-sans`, `--radius-md`, and the other shared roles
554
570
  keep their meanings across projects. Foreign shared prefixes such as `--nuv-*` or
555
- `--brand-*` fail; a registered owner-local constant namespace is separate from
556
- the shared branding vocabulary. Components own `--ds-*`, patterns own `--ux-*`, and the showcase
571
+ `--brand-*` fail. There are no independent owner-local token namespaces. Components own `--ds-*`, patterns own `--ux-*`, and the showcase
557
572
  reserves `--showcase-*` for showcase boundaries. Fixture files still define no
558
573
  custom styling; the frame pattern uses `--ux-*`. Branding never assigns
559
574
  component state variables.
@@ -655,7 +670,7 @@ Project rule registration is explicit:
655
670
 
656
671
  Override patterns are project-relative, cannot escape the project, and configure
657
672
  Oxlint only. They do not suppress architecture checks from `ads check`. A plugin
658
- can import Node-only `loadConfig`, `importResolver`, and `styleWriteViolation`
673
+ can import development-only `loadConfig`, `importResolver`, and `styleWriteViolation`
659
674
  from `@reqvire-org/ads` when it needs the same validated boundaries as core.
660
675
  Unknown configuration fields fail rather than silently weakening checks.
661
676
 
@@ -787,9 +802,12 @@ Retain unrelated lint, type checking, and framework build commands.
787
802
  ## External content
788
803
 
789
804
  Use the repository's `ads-import` skill for selected external ADS source or theme
790
- values, and `ads-migrate` for a native implementation inspired by an upstream
805
+ values, and `ads-port` for a native implementation inspired by an upstream
791
806
  library. These agent workflows handle dependency closure, token mapping, motion
792
807
  comparisons, source credits, applicable notices, and local documentation.
808
+ Ports reuse the project's visual language and consolidate equivalent design roles
809
+ introduced by upstream dependencies. Verify required behavior and project
810
+ consistency; exact visual replication is an explicit requirement, not the default.
793
811
  They are agent workflows, rather than CLI import/design subcommands. Install
794
812
  them through `npx skills`, or read the packaged skills through the
795
813
  [stdio MCP server](MCP.md#skills). MCP serving does not install or automatically
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
@@ -21,8 +27,8 @@ The agent keeps its stdio connection; the browser connects to `/mcp` on the same
21
27
  runtime using HTTP and the current modern protocol. Both share the configured
22
28
  preview watcher and artifacts. Stdout remains exclusively JSON-RPC.
23
29
 
24
- Every registered preview uses `?scenario=<discovered-id>`, including token
25
- previews colocated under components or patterns. The client selects its section
30
+ Every registered preview uses `?scenario=<discovered-id>`, including shared token
31
+ previews under the configured token directory. The client selects its section
26
32
  from the scenario's discovered `kind`, never from the ID's path prefix. Existing
27
33
  `?category=<id>` links remain accepted and normalize to `?scenario=`; an explicit
28
34
  `scenario` parameter takes precedence when both are present. `ads_show_tokens`
@@ -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:
@@ -160,6 +174,11 @@ protocol. The diagnostic explorer defaults to compatible mode; select
160
174
 
161
175
  ## Tools and resources
162
176
 
177
+ For suspected ADS defects after targeted investigation, use `ads_report_bug`;
178
+ for missing capabilities, use `ads_request_feature`. They collect project-local
179
+ untriaged reports with compact context/evidence and no upstream posting. See
180
+ [bug reports and feature requests](#bug-reports-and-feature-requests).
181
+
163
182
  ### Inspect the design system
164
183
 
165
184
  Call `ads_status` to identify the connected project and preview build state.
@@ -375,8 +394,9 @@ composition owns its scenario and mock inputs. Imported components and patterns
375
394
  remain separate owners. `tokens` is one foundation unit covering token definitions,
376
395
  themes and token scenarios/fixtures, whose coverage spans shared source files.
377
396
  Preview IDs remain separate: several token previews belong to `tokens`.
378
- Unit-local token definitions and their previews stay in their component/pattern
379
- owner; see [owner tokens](ADS.md#owner-local-tokens).
397
+ Design tokens and token previews belong to the shared Data foundation. Component
398
+ contracts do not register token namespaces or independent value sheets. Read
399
+ `ads://guides/tokens` for state mappings, source checks and overlap advisories.
380
400
 
381
401
  The `tokens` manifest also returns `companionFiles` with the configured foundation
382
402
  entry path. When creating or deleting a canonical token foundation file, include
@@ -704,7 +724,7 @@ initialization plus optional structured `ads-preview` logging (`loading`, `ready
704
724
  "mcp": {
705
725
  "previewManifest": ".ds/preview/manifest.json",
706
726
  "previewWatch": {
707
- "command": "node",
727
+ "command": "runtime",
708
728
  "args": ["scripts/build-mcp-previews.mjs", "--watch"]
709
729
  }
710
730
  }
@@ -713,7 +733,10 @@ initialization plus optional structured `ads-preview` logging (`loading`, `ready
713
733
 
714
734
  This launches the compiler directly for either npm- or Bun-managed projects.
715
735
  The starter adapter selects the runner for validation scripts from the project's
716
- `packageManager` field or Bun lockfile. Node remains required by ADS.
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.
717
740
 
718
741
  Use `preact` for native Preact and a matching JSX/mount adapter. The project owns
719
742
  framework compilation and Linaria extraction. The starter's
@@ -724,10 +747,9 @@ framework compilation and Linaria extraction. The starter's
724
747
  - Its `buildGraph(entries, options, track)` adapter runs one multi-entry Vite build
725
748
  with `previewEntriesPlugin()` and `createPreviewResources()` from
726
749
  `@reqvire-org/ads/scenarios/vite`.
727
- Generated owner-token entries include `stylesheets` derived from the registered
728
- owner manifest. Pass the entries intact: the plugin imports those definition
729
- sheets even when the runtime owner is tree-shaken. A replacement entry plugin
730
- must preserve these dependencies without importing unrelated owners.
750
+ Each mount imports the project's shared foundation entry. Keep that import in
751
+ the preview module graph so independently built token scenarios receive the
752
+ same shared Data as production UI.
731
753
  - Keep `preserveEntrySignatures: "strict"`, `cssCodeSplit: true`,
732
754
  `assetsInlineLimit: 0`, `modulePreload: false`, and `write: false`. Include the
733
755
  supplied dependency-tracking plugin and the project's Linaria/framework plugins.
@@ -778,6 +800,12 @@ and alias diagnostics; `ads_tokens` works even when project previews cannot buil
778
800
  `mcp.previewWatch` is optional. When configured, `ads mcp` starts the project's
779
801
  watch command on connection/use, once per MCP process. The client configuration
780
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.
781
809
  For this checkout, build the tool once and let the client launch:
782
810
 
783
811
  ```sh
@@ -793,10 +821,16 @@ the npm tool. Another project uses its own framework/build. ADS supplies no
793
821
  component library and does not auto-generate lookalikes. Unconfigured projects
794
822
  still get the token widget.
795
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
+
796
830
  The configured command runs in the project root. `command` names an executable;
797
831
  `args` is a literal argument array, with no shell parsing. Local
798
- `node_modules/.bin` and the running Node's directory are added to its PATH.
799
- Use `node` with a project script for a portable direct launch; Windows `.cmd`
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`
800
834
  wrappers require their own launcher and are not shell-executed by ADS.
801
835
 
802
836
  Both build output streams go to stderr, keeping stdout exclusively for MCP.
@@ -981,7 +1015,7 @@ See the [MCP Apps specification](https://github.com/modelcontextprotocol/ext-app
981
1015
  | Each of the five ADS skill names | `request` | Select that workflow and its skill resource |
982
1016
 
983
1017
  Example: get `ads-inspect` with `element="Button states in both themes"`, or
984
- `ads-migrate` with `request` containing the upstream component-library URL.
1018
+ `ads-port` with `request` containing the upstream component-library URL.
985
1019
  Prompts explain Data/UX/Skin ownership, public API reuse, fixture boundaries,
986
1020
  which tools select widgets, progressive skill reads and validation. They guide
987
1021
  reasoning rather than inventing another component implementation.
@@ -999,6 +1033,15 @@ Supporting files are read lazily via `resources/read`; directory browsing is
999
1033
  available on the newer protocol. The packaged scaffold's `.gitignore` remains
1000
1034
  addressable at its original resource URI.
1001
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
+
1002
1045
  On protocol `2026-07-28`, discovery advertises `io.modelcontextprotocol/skills`
1003
1046
  with directory reading and implements `skills/list`, `skills/get`, and
1004
1047
  `resources/directory/read`. Older connections retain ordinary skill resources,
@@ -1093,7 +1136,7 @@ The same guide is available at `ads://guides/contracts`.
1093
1136
  A registered binding producer may combine two accessible color references as
1094
1137
  `light-dark(var(--light-token), var(--dark-token))`. The App paint audit checks
1095
1138
  both branches and their observed effect in the active color scheme. Raw colors,
1096
- unknown/private tokens and SVG URLs inside this color function remain invalid.
1139
+ undefined tokens and SVG URLs inside this color function remain invalid.
1097
1140
  This derived binding form does not widen public paint-input types; use constrained
1098
1141
  references for each theme input and verify both color schemes in browser checks.
1099
1142
 
@@ -1103,3 +1146,45 @@ registered nested parents, anchored at rendering roots. `exercises` records
1103
1146
  reachable use; registered browser checks establish the effects. Private visual
1104
1147
  behavior subjects use explicit `role: "implementation"`; headless defaults and
1105
1148
  shared-controller gates remain enabled. See [CONTRACTS.md](CONTRACTS.md).
1149
+
1150
+ ## Bug reports and feature requests
1151
+
1152
+ `ads_report_bug` records suspected broken existing ADS behavior after targeted
1153
+ investigation. Required fields are `title`, `expected`, `observed`, `steps` and
1154
+ `frequency` (`always`, `intermittent`, `once`, `unknown`); `suspectedCause` is optional.
1155
+ `ads_request_feature` records a legitimate workflow requiring a missing capability:
1156
+ `title`, `workflow`, `capability` and `impact` are required; `proposal` is optional.
1157
+ Both accept optional `unit`, `scenario`, agent-supplied `reporter`, and up to three
1158
+ `evidence` selectors: `{resultId}` or the exact `{unit, check, runId}`.
1159
+
1160
+ The server verifies evidence references and snapshots compact completion-time
1161
+ metadata before the underlying execution/check slot can be replaced. Superseded
1162
+ references fail explicitly. Current-project context separately captures ADS
1163
+ version, configured framework, runtime name/version/platform, source/configuration revisions,
1164
+ available build metadata and capture time. Missing metadata stays unobserved;
1165
+ context and candidate evidence do not become current passing source evidence.
1166
+ No source files, full logs, screenshots or trace bytes are automatically attached.
1167
+
1168
+ The tools save ordinary JSON at `<projectRoot>/.ds/reports/<reportId>.json`.
1169
+ They are available without `--mutations`, like other development-evidence tools,
1170
+ and write generated metadata rather than project-owned ADS source. Tool annotations
1171
+ mark them as writes. Each saved record is limited to 32 KiB. Neither tool posts to
1172
+ GitHub, sends telemetry nor changes validation policy. Reports remain `untriaged`;
1173
+ `classification: "agent-supplied"` distinguishes a claim from an established cause.
1174
+
1175
+ Equivalent submissions for the same ADS version/framework reuse the report ID,
1176
+ keep its creation time, increment `submissionCount` and replace its latest
1177
+ submission/context/evidence. This is a submission count, not independent
1178
+ reproductions. There is no automatic age/count pruning; report retention differs
1179
+ from replaceable execution evidence and screenshot slots. Archive or removal is
1180
+ an explicit maintenance action.
1181
+
1182
+ Each submission returns a compact receipt (at most 4096 JSON bytes) with
1183
+ `reportId`, `revision`, `storagePath`, `submissionCount` and deduplication status.
1184
+ The local path is relative to the connected project root. MCP intake is
1185
+ submission-only: saved reports have no listing/read tool, resource, URI template,
1186
+ subscription or notification. Inspect or share local JSON through normal project
1187
+ maintenance when needed. `ads_status.reports` identifies the two intake tools,
1188
+ storage directory and `ads://guides/reporting`, without listing report contents.
1189
+ All five skills include the same portable
1190
+ [reporting reference](../skills/ads-designer/references/reporting.md).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reqvire-org/ads",
3
- "version": "0.3.25",
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"