@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
@@ -14,6 +14,7 @@ import { inspectScenarios } from "./scenarios.mjs";
14
14
  import { readPreviewManifest } from "./preview-resources.mjs";
15
15
  import { acceptance, failure, failureCategories } from "./evidence.mjs";
16
16
  import { investigationArtifacts, investigationUri, saveInvestigations } from "./investigations.mjs";
17
+ import { developmentExecutable, developmentRuntime } from "./development-runtime.mjs";
17
18
 
18
19
  export const BEHAVIOR_URI = "ads://project/behaviors";
19
20
  const hash = bytes => createHash("sha256").update(bytes).digest("hex");
@@ -124,8 +125,8 @@ export function behaviorInputs(options, contract, check, context = inputContext(
124
125
  if (scenario) visit(path.join(options.root, scenario.file));
125
126
  const rows = [...files].sort().map(file => [slash(path.relative(options.root, file)), context.digest(file)]);
126
127
  for (const file of ["package-lock.json", "bun.lock", "bun.lockb", "pnpm-lock.yaml", "yarn.lock", "node_modules/.package-lock.json"]) rows.push([file, existsSync(path.join(options.root, file)) ? context.digest(path.join(options.root, file)) : null]);
127
- rows.push(["profile", JSON.stringify(options.config.mcp.behaviorProfiles[check.profile])], ["node", process.version]);
128
- for (const file of ["./verification.mjs", "./verification/browser.mjs", "./verification/playwright-reporter.cjs", "./evidence.mjs", "./investigations.mjs"]) rows.push([`tool:${file}`, hash(readFileSync(new URL(file, import.meta.url)))]);
128
+ rows.push(["profile", JSON.stringify(options.config.mcp.behaviorProfiles[check.profile])], ["runtime", JSON.stringify(developmentRuntime())]);
129
+ for (const file of ["./verification.mjs", "./development-runtime.mjs", "./verification/browser.mjs", "./verification/playwright-reporter.cjs", "./evidence.mjs", "./investigations.mjs"]) rows.push([`tool:${file}`, hash(readFileSync(new URL(file, import.meta.url)))]);
129
130
  return { revision: hash(JSON.stringify(rows)), files: rows.map(([file]) => file) };
130
131
  }
131
132
 
@@ -181,7 +182,7 @@ export function executeDevelopmentCommand(profile, args, root, env, signal) {
181
182
  if (process.platform === "win32") { const stop = spawn("taskkill", ["/pid", String(child.pid), "/T", "/F"], { stdio: "ignore" }); stop.on("error", () => child.kill("SIGKILL")); }
182
183
  else try { process.kill(-child.pid, "SIGKILL"); } catch (error) { if (error.code !== "ESRCH") failure ??= error; }
183
184
  };
184
- child = spawn(profile.command === "node" ? process.execPath : profile.command, args, { cwd: root, detached: process.platform !== "win32", shell: false, stdio: ["ignore", "pipe", "pipe"], windowsHide: true,
185
+ child = spawn(developmentExecutable(profile.command), args, { cwd: root, detached: process.platform !== "win32", shell: false, stdio: ["ignore", "pipe", "pipe"], windowsHide: true,
185
186
  env: { ...process.env, ...env, PATH: [path.join(root, "node_modules/.bin"), path.dirname(process.execPath), process.env.PATH ?? ""].join(path.delimiter) } });
186
187
  if (child.pid) {
187
188
  guard = spawn(process.execPath, [fileURLToPath(new URL("./mcp/preview-owner-guard.mjs", import.meta.url)), String(child.pid)], { detached: process.platform !== "win32", stdio: ["pipe", "ignore", "ignore"], windowsHide: true });
package/docs/ADS.md CHANGED
@@ -29,6 +29,12 @@ Application code imports its local public barrel, normally through `@ds`.
29
29
  The default layout keeps application code in `src/` and project ADS source in
30
30
  root `design-system/`. Configure existing alternate layouts explicitly.
31
31
 
32
+ Websites and MCP Apps consume the same public components, patterns, controllers,
33
+ tokens and styles. Application adapters own routing, stores, MCP communication,
34
+ tool-result mapping, mounting and serving. ADS's own MCP server supplies
35
+ design-system development, inspection and review. Its showcase exercises the
36
+ real UI inside an MCP App; normal application checks verify website integration.
37
+ Verification claims remain scoped to the states and environments actually tested.
32
38
 
33
39
  Framework choice belongs to the receiving project. Linaria is required for the
34
40
  component and pattern styling pipeline. Source checks support React and native Preact, including JSX, UI factories and
@@ -50,7 +56,7 @@ The shell owns section tabs, collapsible navigation, theme controls and the App
50
56
  slot. The browser host uses a separate-origin sandbox proxy; project runtimes,
51
57
  styles, fonts and UI execute/apply only in the App iframe. Components, patterns,
52
58
  token values, scenarios, fixtures and their Linaria styles remain project-owned.
53
- App presentation comes from the selected compiled scenario; reusable review layouts live in public ADS patterns. Do not recreate
59
+ App presentation comes from the selected compiled scenario; reusable review layouts live in development-only `review/` through its separate public entry. Do not recreate
54
60
  production widgets inside the client or scenario.
55
61
 
56
62
  There are four sections: Tokens, Components, Patterns and Composition. There are
@@ -72,19 +78,19 @@ Colocate development entries and fixture inputs:
72
78
  design-system/
73
79
  tokens/
74
80
  typography.css
75
- Typography.scenario.tsx
76
- Typography.fixture.ts
81
+ Typography.ads.scenario.tsx
82
+ Typography.ads.fixture.ts
77
83
  components/core/Button/
78
84
  Button.tsx
79
- Scenario.tsx
80
- fixture.ts
85
+ Button.ads.scenario.tsx
86
+ Button.ads.fixture.ts
81
87
  patterns/Editor/
82
88
  Editor.tsx
83
- Scenario.tsx
84
- fixture.ts
89
+ Editor.ads.scenario.tsx
90
+ Editor.ads.fixture.ts
85
91
  composition/Workspace/
86
- Scenario.tsx
87
- fixture.ts
92
+ Workspace.ads.scenario.tsx
93
+ Workspace.ads.fixture.ts
88
94
  showcase/mcp/ Project compiler adapter
89
95
  main.tsx
90
96
  ```
@@ -95,9 +101,8 @@ guarded public re-exports. They may use the configured framework and declared
95
101
  dependencies, plain TypeScript and browser APIs; CSS/Linaria and visual DOM belong
96
102
  to consumers. They require no artificial visual scenario.
97
103
 
98
- Optional `<Owner>.ads.contract.ts` registers behavior with actual symbol references.
99
- Legacy colocated `behavior.json` (flat: `<Owner>.behavior.json`) also registers
100
- subjects, guarantees and owner-local checks against project-configured runner
104
+ Optional `<Owner>.ads.contract.ts` registers behavior with actual symbol references:
105
+ subjects, guarantees and colocated checks against project-configured runner
101
106
  profiles. `exercises` records public behavioral APIs demonstrated by a scenario;
102
107
  `covers` retains its rendered UI contract. ADS validates references and reachable
103
108
  uses; execution evidence is separate and becomes stale when its inputs change.
@@ -105,8 +110,8 @@ Runtime imports/re-exports of manifests, tests, fixtures and scenarios are rejec
105
110
  See [controllers and behavioral verification](BEHAVIORS.md) for the schema,
106
111
  framework/dependency gates and MCP execution contract.
107
112
 
108
- Flat owners may use `Button.scenario.tsx` and `Button.fixture.ts` instead.
109
- `Scenario.tsx` exports a default independently mountable view and literal metadata
113
+ Use `<Owner>.ads.scenario.tsx` and `<Owner>.ads.fixture.ts` for new entries.
114
+ The scenario exports a default independently mountable view and literal metadata
110
115
  `export const scenario = { title: "Button states", covers: ["Button"] };`.
111
116
  Optional static `captureTargets` maps up to 20 names to CSS selectors scoped to
112
117
  that scenario's App. These support explicitly requested element screenshots; they
@@ -119,7 +124,7 @@ Token entries under the configured token directory declare
119
124
  Its colocated fixture declares literal `samples: [{ token, property, probe }]`.
120
125
  Each token must exist and have sample coverage; duplicate bindings, missing probes,
121
126
  empty covers and value-only inspectors fail. The default entry passes the declared
122
- samples to a rendered public pattern's `samples` prop. No token-name/property mapping
127
+ samples to a rendered public review renderer's `samples` prop. No token-name/property mapping
123
128
  or sample values are embedded in the tool. Display values come from foundation CSS;
124
129
  probes are isolated verification inputs owned by the fixture.
125
130
 
@@ -137,12 +142,12 @@ mandatory caller inputs or prior page initialization. Related parts may share a
137
142
  scenario containing their required public parent. Larger composition scenarios
138
143
  reuse production screen patterns; that screen reuse remains skill guidance.
139
144
 
140
- IDs derive from the ADS-relative path: `components/core/Button/Scenario.tsx` and
141
- `components/core/Button.scenario.tsx` both identify `components/core/Button`.
145
+ IDs derive from the ADS-relative path: `components/core/Button/Button.ads.scenario.tsx` and
146
+ `components/core/Button.ads.scenario.tsx` both identify `components/core/Button`.
142
147
  Use one form per owner. Renaming moves the ID. No manually assigned ID or parallel
143
- registry is maintained. Fixture files use `fixture.ts`/`<Owner>.fixture.ts`; JS,
144
- TSX or JSON equivalents are supported. An empty fixture is valid without inputs. Extra development helpers use
145
- `scenario/` or `fixtures/` subfolders, or `<Owner>.scenario-adapter.ts`.
148
+ registry is maintained. Use marked `<Owner>.ads.fixture.ts` files and
149
+ `<Owner>.ads.helpers.ts` adapters for new source. An empty fixture is valid without inputs.
150
+ All `.ads.` files stay outside the production import graph.
146
151
 
147
152
  `scenario-contract`, `scenario-render` and `scenario-coverage` checks require valid
148
153
  entries and reachable public render references for every public renderable
@@ -157,7 +162,7 @@ mounting, correct props, every branch/state or visual parity. The older
157
162
 
158
163
  `token-scenario-reference` rejects undeclared token names in metadata and reachable
159
164
  inputs. `token-scenario-render` rejects claimed tokens with no reachable input
160
- reference; `token-scenario-coverage` requires every discovered shared or owner-local token
165
+ reference; `token-scenario-coverage` requires every discovered shared token
161
166
  to have coverage. A new or removed token therefore needs a scenario/fixture
162
167
  update. All three are errors in `ads check`, run by `lint:ds` and the build.
163
168
  Coverage is static reachability, not proof that every branch actually renders
@@ -200,56 +205,27 @@ connected project's actual entry. Older tooling must be upgraded before migratio
200
205
 
201
206
  ## Shared token contract
202
207
 
203
- ### Owner-local tokens
208
+ ### Shared Data and component mappings
204
209
 
205
- New owner declarations use `tokens: { namespace, stylesheet }` in
206
- `<Owner>.ads.contract.ts`. The legacy JSON layout below remains supported.
207
- Use one authoring form per section; competing registrations fail. See the
208
- [static contract reference](CONTRACTS.md) for paint bindings, declarative APIs,
209
- marked development files and guarded migration.
210
+ Design values, semantic roles, formulas and themes have one shared source in the
211
+ configured token foundation. Independent owner-local token namespaces, value
212
+ sheets and owner-contract `tokens` sections are not supported. Components map
213
+ shared values into `--ds-*` state/implementation variables; patterns use `--ux-*`.
214
+ These variables cannot hide raw design values, including in fallbacks, themes or
215
+ statically resolved helper/import interpolation. Typography/layering checks follow
216
+ aliases to their actual CSS consumers. Measured geometry and typed instance paint
217
+ bindings retain their narrow runtime contracts; they are not static design scales.
210
218
 
211
- Shared semantics remain in the configured token foundation. Constants specific
212
- to one component or pattern may live beside it:
219
+ Shared token previews and sample coverage live under the configured token directory.
220
+ The project mount adapter imports its foundation for both runtime and independent
221
+ token previews. No owner stylesheet dependencies are injected into preview entries.
222
+ `ads_prepare_token_samples` reconciles real shared bindings from project-selected
223
+ properties/probes; it does not invent missing semantics.
213
224
 
214
- ```text
215
- components/Notice/
216
- Notice.tsx # imports ./tokens.css; UI styling stays in Linaria
217
- tokens.json # {"schemaVersion":1,"namespace":"--notice-"}
218
- tokens.css # :root { --notice-width: 356px; }
219
- Scenario.tsx
220
- fixture.ts
221
- Tokens.scenario.tsx # kind: "tokens", development-only review renderer + samples
222
- Tokens.fixture.ts
223
- ```
224
-
225
- Flat owners use `<Owner>.tokens.json` and `<Owner>.tokens.css`. A unit has one
226
- explicit namespace, unique across owners and separate from shared/runtime-variable
227
- prefixes. The stylesheet contains only namespaced custom-property definitions
228
- under root/theme conditions; imports, selectors for UI, ordinary declarations,
229
- font faces and animations remain outside it. Its runtime owner imports it, so
230
- product and preview consume the same values. Raw UI styling remains token-backed.
231
-
232
- Local token aliases may reference shared tokens or their own namespace, with
233
- undefined references and cycles rejected. Other owners consume shared tokens;
234
- they cannot redefine, write or directly consume another owner's local namespace.
235
- Measured runtime variables retain their existing exact `styleWrites` boundary.
236
- `ads_tokens` returns each token's owner, definitions and local namespace.
237
-
238
- A colocated scenario sets `kind:"tokens"` and declares real fixture `samples`
239
- consumed by a development-only review renderer. Its ID still derives from its source path.
240
- Discovery attaches its owner's registered definition sheet as `stylesheets` on
241
- the generated scenario record; `previewEntriesPlugin` imports it directly into
242
- that preview's module graph. CSS-only package side effects can then tree-shake
243
- the runtime component without dropping the token definitions. Keep the runtime
244
- CSS import for product use; the token scenario need not import or render its owner.
245
- Every local token needs this real sample coverage, just like shared tokens.
246
- Definitions, metadata, fixture and token scenario belong to the same edit unit.
247
- Manifests/fixtures are development inputs; production includes the runtime's
248
- imported CSS definitions, never the preview adapter or tooling manifest.
249
-
250
- Use `ads_prepare_token_samples` to propose sample reconciliation from explicit
251
- project property/probe bindings. The tool preserves project sample meaning and
252
- reports missing mappings instead of choosing them from token prefixes.
225
+ `token-overlap-review` warns about identical normalized shared definitions across
226
+ their declared theme scopes. It never merges semantic roles or blocks a build merely
227
+ because values coincide. Shared Data boundary violations are errors. See the
228
+ [portable Data guide](../skills/ads-designer/references/design-data.md).
253
229
 
254
230
  ### Shared definitions
255
231
 
@@ -280,8 +256,7 @@ CSS imports the approved token files in order; shared assignments belong in
280
256
  those token files, never in consumer styles or component state overrides.
281
257
 
282
258
  Typed custom-property registrations follow the same ownership. Runtime-variable
283
- `@property` metadata lives in component/pattern Linaria; shared and owner-local
284
- token registrations live beside real token definitions. Names are document-global:
259
+ `@property` metadata lives in component/pattern Linaria; shared token registrations live beside real token definitions. Names are document-global:
285
260
  unrelated owners and conflicting descriptor sets cannot claim the same name.
286
261
  Descriptors have their own CSS grammar and independent literal defaults; normal
287
262
  visual styling still uses tokens. Registration does not create token/sample
@@ -322,6 +297,17 @@ Store original branding and its usage, credits, and licenses in
322
297
  `assets/brand/`, and fonts in `assets/fonts/`. Configure generated icons and
323
298
  asset mounts as described in the [branding guide](GUIDE.md#branding).
324
299
 
300
+ Before importing, compare the selected source and its dependencies with the
301
+ destination's framework, public APIs, shared tokens, styling ownership and
302
+ runtime assumptions. Resolve material incompatibilities before applying the
303
+ affected changes; verify the integrated candidate with destination checks and
304
+ rendered evidence. The `ads-import` skill contains the compatibility workflow.
305
+ That workflow resolves source differences within the selected scope, including
306
+ reimplementation where needed. Source/destination version numbers do not grant
307
+ compatibility or restrict imports to patch releases. Required package installation
308
+ uses the project package manager before validating dependent runtime changes;
309
+ ADS candidate checks use installed dependencies and do not install them.
310
+
325
311
  - Component, pattern, and style imports reuse destination values and add
326
312
  missing shared definitions with initial values.
327
313
  - An explicit token-values import adopts all source-provided compatible values
@@ -470,8 +456,8 @@ Validate accepted and rejected cases, configuration, and false-positive limits.
470
456
 
471
457
  ## Bootstrap and updates
472
458
 
473
- The atomic composition and scenario contract guides live in each skill's
474
- `references/atomic-styles.md` and `references/scenarios.md`. The maintained copies
459
+ Portable architecture and workflow guides live in each skill's `references/`,
460
+ including shared Data, behavior contracts, atomic styles and scenarios. The maintained copies
475
461
  are in `skills/ads-designer/references/`; MCP serves those packaged references.
476
462
  `npm run sync:skill-references` copies them to the other skills for standalone use;
477
463
  `npm run check:skill-references`
@@ -482,7 +468,7 @@ Root [bootstrap-ds/](../bootstrap-ds/README.md) is the canonical empty scaffold.
482
468
  Its identical copy under `skills/ads-designer/assets/bootstrap-ds/` makes the
483
469
  skill self-contained. Run `npm run sync:skill-starter` after edits and
484
470
  `npm run check:skill-starter` to verify the copy. Both contain empty product component/composition directories and a minimal project-owned
485
- token review renderer. The scaffold pattern can be renamed or replaced; the tool
471
+ token review renderer. The scaffold review renderer can be renamed or replaced; the tool
486
472
  does not require that name or its styles and ships no product UI catalogue.
487
473
 
488
474
  Tool releases should version contract changes, rules, skills, bootstrap support,
@@ -5,6 +5,13 @@ the project. Coding agents can build and evolve that source directly; the tools
5
5
  keep changes within a defined architecture. The project owns its components,
6
6
  patterns, token values, and branding.
7
7
 
8
+ ADS manages project-owned UI for websites and MCP Apps. Both use the same public
9
+ components, patterns, controllers, tokens and styles. The consuming application
10
+ supplies data, actions, mounting and integration, including serving its MCP Apps.
11
+ The ADS showcase renders those real implementations inside MCP Apps; its previews
12
+ and registered checks provide evidence for the exercised states and conditions.
13
+ Normal application checks verify website integration.
14
+
8
15
  This document explains the what, why, and high-level how. [ADS.md](ADS.md) defines
9
16
  the enforceable contract, [GUIDE.md](GUIDE.md) covers tool integration, and the
10
17
  [working example guide](../design-system/README.md) covers implementation details.
@@ -23,6 +30,11 @@ their own reviewed lifecycle.
23
30
 
24
31
  ADS is opinionated about tooling and ownership. Linaria is required for the
25
32
  component and pattern styling pipeline. Visual choices belong to the project.
33
+ Development tooling runs on Node or Bun, selected by its launcher. Managed
34
+ workers inherit that interpreter; `command: "runtime"` gives project compilers
35
+ and behavior profiles the same portable choice. Explicit interpreter commands
36
+ retain their meaning. Runtime choice is separate from the UI framework and adds
37
+ no Node/Bun dependency to deployed components.
26
38
  The project declares React or native Preact in `ds.config.json` and uses the
27
39
  matching compiler and mount adapter. Both integrate with the required styling
28
40
  and validation pipeline; additional frameworks need explicit tooling support.
@@ -60,6 +72,20 @@ choosing their own values. Stable names let implementations move between
60
72
  projects without importing an unrelated brand. Themes evolve by changing
61
73
  values behind those names, and visual formulas have one source of truth.
62
74
 
75
+ The shared foundation is the only design-value catalogue. Components and patterns
76
+ map its roles into owned `--ds-*` and `--ux-*` variables; these namespaces cannot
77
+ introduce independent design values. Raw literals hidden by aliases, fallbacks,
78
+ themes or static helper/import interpolation follow the same source checks.
79
+ Runtime measurements and typed instance paints retain narrow, explicit contracts.
80
+ When adapting external UI, use the project's existing font, text, spacing and
81
+ other semantic roles even when their values differ from the reference. Add a
82
+ shared role only for a missing design decision, and document intentional visual
83
+ differences. Equal values alone do not prove equivalent roles: duplicate shared
84
+ definitions invite review; ownership and value-source violations are errors.
85
+ Ports should converge on that shared vocabulary, consolidating equivalent roles
86
+ introduced by their source dependencies. Acceptance checks required behavior and
87
+ project consistency; exact upstream pixels apply only when explicitly requested.
88
+
63
89
  ### UX owns the interaction contract
64
90
 
65
91
  Components own control semantics, input handling, focus, accessibility, and
@@ -186,7 +212,7 @@ conditional at-rule context for atomic `css`/`styled`. Their descriptors are sch
186
212
  metadata, not separate atomic declarations. CSS-tree validates CSS value grammar;
187
213
  PostCSS supplies source/at-rule structure. Registered names have one owner and a
188
214
  stable schema across its modules, because registration is document-global. Runtime
189
- variables are registered in owned Linaria; shared or namespaced design tokens are
215
+ variables are registered in owned Linaria; shared design tokens are
190
216
  registered beside their real value definitions. Base resets and fonts cannot own
191
217
  registrations. Descriptor literals are narrowly permitted where CSS requires an
192
218
  independent initial value; ordinary visual assignments remain token-governed.
@@ -215,8 +241,8 @@ dependencies, with no runtime supplied by the MCP host. Shared controllers do no
215
241
  import styled consumers or introduce another skin layer. Existing measurement and
216
242
  style-write boundaries still apply.
217
243
 
218
- Optional owner-local `behavior.json` contracts identify public APIs or private
219
- source/symbols, named guarantees and registered execution checks. Scenario
244
+ Optional `<Owner>.ads.contract.ts` modules identify public APIs or private
245
+ implementation symbols, named guarantees and registered execution checks. Scenario
220
246
  `exercises` links public behavior APIs to reachable demonstrations; `covers`
221
247
  continues to describe rendered public UI. Controllers need no artificial standalone
222
248
  visual scenario. Static registration is separate from current passing evidence.
@@ -459,6 +485,17 @@ Bounded tools establish what exists; explicit resource reads provide detail.
459
485
  Prompts and packaged skills explain how to reason through Data, UX and Skin and
460
486
  how to inspect the real implementation before changing it.
461
487
 
488
+ Agent feedback has a separate intake boundary. `ads_report_bug` records suspected
489
+ broken behavior; `ads_request_feature` records a missing capability and its use
490
+ case. Both save durable development metadata under the connected project's
491
+ `.ds/reports/`, with verified evidence selectors, compact snapshots and observed
492
+ version/framework/revisions. Classification remains an untriaged agent claim.
493
+ Reports grant no architecture exception, execute no submitted command and upload
494
+ nothing. Equivalent submissions reuse an ID; records do not expire or get pruned
495
+ by count. Individual records and receipts are bounded. MCP intake is submission-only:
496
+ it exposes no report-reading tools, resources, subscriptions or notifications.
497
+ See the [reporting contract](MCP.md#bug-reports-and-feature-requests).
498
+
462
499
  The MCP runtime owns its browser hosts and preview builder lifetime. Closing the
463
500
  client connection releases them together; a separate ownership guard can stop
464
501
  detached builders after abrupt owner death. A preview process must not outlive
@@ -576,27 +613,31 @@ probing those bindings and restoring them. The tool supplies no token/property
576
613
  classification or visual sample palette. A source build alone is not a rendered
577
614
  verification, and the browser check does not judge design quality.
578
615
 
579
- An optional owner-local token namespace keeps component/pattern constants beside
580
- their consumer. Its definition-only stylesheet contains root/theme custom
581
- properties and is imported by the runtime owner; UI styling remains in Linaria.
582
- Independent owner-token preview entries also import the registered definition
583
- sheet directly, so tree-shaking an unused runtime owner cannot remove their values.
584
- Namespaces, aliases, ownership and actual colocated sample coverage are checked.
585
- The shared foundation remains the cross-owner vocabulary. See the
586
- [owner-token contract](ADS.md#owner-local-tokens).
616
+ The Data pillar has one shared design catalogue in the configured token foundation.
617
+ Components/patterns own mappings (`--ds-*`/`--ux-*`) and mechanics, not independent
618
+ value sheets or token namespaces. Private variables, fallbacks, themes and static
619
+ helper/import interpolation obey the same design-value source checks. Unknown
620
+ interpolation grants no permission. Intrinsic runtime geometry and typed instance
621
+ bindings keep their existing narrow contracts. Shared token previews consume the
622
+ same foundation through the project mount adapter.
623
+
624
+ Shared tokens with identical normalized theme/condition definitions receive a
625
+ nonblocking `token-overlap-review` advisory. Equal values do not establish equal
626
+ meaning; ownership/value-source violations remain errors. See the
627
+ [shared Data contract](ADS.md#shared-data-and-component-mappings).
587
628
 
588
629
  ## Static contracts and instance data
589
630
 
590
631
  Owner-local tooling declarations use optional `<Owner>.ads.contract.ts` modules.
591
632
  ADS resolves their data and implementation symbols statically without executing
592
- project imports. Tokens and behavior share this contract with constrained paint
633
+ project imports. Behavior shares this contract with constrained paint
593
634
  inputs, instance binding families and declarative parent/consumer relationships.
594
635
  Declarative relationships form an acyclic graph: parts may have several parents
595
636
  and contain nested parts, with every chain anchored at a rendering root. Exercise
596
637
  metadata records reachable use; registered browser checks establish its effects.
597
638
  Binding producers declare each direct/derived paint path explicitly. Private
598
639
  visual implementation subjects are distinct from headless controller subjects.
599
- Legacy JSON sections remain supported; duplicate policies fail. The
640
+ Competing registrations fail. The
600
641
  [contract reference](CONTRACTS.md) specifies the authoring and analysis limits.
601
642
 
602
643
  Any `.ads.` source is development-only. Runtime implementation/types/styles cannot
@@ -607,7 +648,7 @@ scenarios and fixtures use the marked names; existing IDs remain stable.
607
648
 
608
649
  Instance bindings are distinct from static tokens and arbitrary inline styles.
609
650
  Source checks trace config origin, key validation, exact map construction and
610
- attachment to an owner root. Shared/private namespaces and consumer permissions
651
+ attachment to an owner root. Shared token and private runtime-variable ownership and consumer permissions
611
652
  remain enforced. Browser audits inspect current scoped values, paint effects and
612
653
  local SVG resources; registered checks must cover updates/removal, isolation and
613
654
  relevant themes. Registration, source-demonstrated consumption and current browser
@@ -619,9 +660,16 @@ a rendered parent. Metadata alone cannot turn a null-returning stub into verifie
619
660
  UI. Invalid scenario fields preserve independent valid coverage; unreadable
620
661
  prerequisites report that coverage is not established.
621
662
 
622
- Owner tokens are private across CSS and supported TypeScript value flows, including
623
- constants, re-exports, helper returns and paint/property sinks. Normal component
624
- composition remains valid. Namespaces are a source boundary, not CSS isolation.
625
- Ownership does not mandate a visual scale: projects may register explicit origin
626
- policies using `inspectTokenOrigins`, without ADS hardcoding spacing meanings.
627
- Migration prepares ordinary owner drafts; candidate gates and rollback still apply.
663
+ Shared token references remain visible across the project. Component state and
664
+ implementation variables retain their existing ownership boundaries. Project checks
665
+ may use `inspectTokenOrigins` to audit more specific shared alias relationships;
666
+ core Data/UX/Skin separation does not depend on opting into such a check. ADS does
667
+ not hardcode a spacing scale or palette. Contract/file-role migration still uses
668
+ ordinary owner drafts, candidate gates and rollback.
669
+
670
+ Preview scheduling prunes standard generated output trees before allocating OS
671
+ watches and computing source freshness. Explicit source roots retain priority;
672
+ custom outputs use `assets.generatedPaths`. Bundled binary assets are forwarded
673
+ as resources: the built-in Apps sandbox permits blob reads and WebAssembly
674
+ compilation without granting external network access, JavaScript eval or host
675
+ DOM access. External MCP hosts retain their own CSP policy.
package/docs/BEHAVIORS.md CHANGED
@@ -25,8 +25,8 @@ These gates inspect supported direct imports, markup and style boundaries.
25
25
  External package internals and delegated DOM behavior still require source,
26
26
  build and browser review; declaring a dependency does not prove it is headless.
27
27
 
28
- New owner registrations can live in `<Owner>.ads.contract.ts` with actual API and
29
- implementation references; legacy JSON remains supported. The
28
+ Register owner behavior in `<Owner>.ads.contract.ts` with actual API and
29
+ implementation references. The
30
30
  [contract reference](CONTRACTS.md) covers static authoring, `.ads.behavior.spec.ts`,
31
31
  declarative `exercises`, required browser checks and guarded migration.
32
32
  A contract declaration alone is not passing evidence. Use
@@ -42,48 +42,50 @@ those inputs are rejected, including dynamic imports and aliases.
42
42
 
43
43
  ## Register guarantees
44
44
 
45
- An optional `behavior.json` belongs to one directory unit. Flat units use
46
- `<Owner>.behavior.json`. Existing projects without manifests remain valid and have
47
- no implied behavioral verification. A manifest is declarative and contains no
48
- executable command:
45
+ An optional `<Owner>.ads.contract.ts` belongs to one unit. Owners without a
46
+ behavior declaration have no implied behavioral verification. ADS reads the
47
+ contract statically; it does not execute these imports or a project command:
49
48
 
50
- ```json
51
- {
52
- "schemaVersion": 1,
53
- "subjects": {
54
- "controller": { "source": "./scroller-controller.ts", "symbol": "ScrollerController" },
55
- "scroll-api": { "api": "useMessageScroller" }
49
+ ```ts
50
+ import type { UnitContract } from "@reqvire-org/ads/contracts";
51
+ import { ScrollerController } from "./scroller-controller";
52
+ import { useMessageScroller } from "./MessageScroller";
53
+
54
+ export default {
55
+ schemaVersion: 1,
56
+ behavior: {
57
+ subjects: {
58
+ controller: { implementation: ScrollerController },
59
+ "scroll-api": { api: useMessageScroller },
60
+ },
61
+ guarantees: [{
62
+ id: "prepend-anchor",
63
+ description: "Prepending history preserves the visible anchor after layout settles.",
64
+ subjects: ["controller", "scroll-api"],
65
+ checks: ["prepend-anchor"],
66
+ }],
67
+ checks: {
68
+ "prepend-anchor": {
69
+ file: "./MessageScroller.ads.behavior.spec.ts",
70
+ case: "prepend-anchor",
71
+ scenario: "components/MessageScroller",
72
+ profile: "widget",
73
+ },
74
+ },
56
75
  },
57
- "guarantees": [
58
- {
59
- "id": "prepend-anchor",
60
- "description": "Prepending history preserves the visible anchor after layout settles.",
61
- "subjects": ["controller", "scroll-api"],
62
- "checks": ["prepend-anchor"]
63
- }
64
- ],
65
- "checks": {
66
- "prepend-anchor": {
67
- "file": "./behavior.spec.ts",
68
- "case": "prepend-anchor",
69
- "scenario": "components/MessageScroller",
70
- "profile": "widget"
71
- }
72
- }
73
- }
76
+ } satisfies UnitContract;
74
77
  ```
75
78
 
76
- Names above are illustrative project choices. A subject identifies a public export
77
- through `api`, or an owner-local implementation `source` with an optional top-level
78
- `symbol`. Private subjects do not become public API. A guarantee references known
79
- subjects and checks. Each check names an owner-local test/spec file, stable case
80
- ID, registered profile and optional discovered scenario. Several guarantees may
81
- reference one check. Repeated execution identities use the same check ID.
79
+ Names above are illustrative project choices. A subject identifies a public API
80
+ or an implementation symbol owned by the unit. Private subjects do not become
81
+ public API. A guarantee references known subjects and checks. Each check names a
82
+ colocated test/spec file, stable case ID, registered profile and optional
83
+ discovered scenario. Several guarantees may reference one check. Repeated
84
+ execution identities use the same check ID.
82
85
 
83
86
  Private subjects default to the headless controller role. For an intentionally
84
87
  visual internal renderer or binding producer, declare `role: "implementation"`
85
- alongside its `implementation` reference in the TypeScript contract (or its
86
- `source`/`symbol` in legacy JSON). Its source ownership and normal runtime gates
88
+ alongside its `implementation` reference in the contract. Its source ownership and normal runtime gates
87
89
  still apply; registration does not make it public API. Shared `controllers/`
88
90
  source remains headless regardless of subject metadata. See the
89
91
  [owner contract](CONTRACTS.md#a-contract-uses-actual-implementation-references).
@@ -140,8 +142,8 @@ command. For a project with an installed Playwright test runner:
140
142
  "behaviorProfiles": {
141
143
  "widget": {
142
144
  "runner": "playwright",
143
- "command": "npm",
144
- "args": ["run", "test:behavior", "--"],
145
+ "command": "runtime",
146
+ "args": ["node_modules/@playwright/test/cli.js", "test"],
145
147
  "mode": "browser",
146
148
  "timeoutMs": 60000
147
149
  }
@@ -150,7 +152,10 @@ command. For a project with an installed Playwright test runner:
150
152
  }
151
153
  ```
152
154
 
153
- 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
154
159
  configuration must discover colocated spec files. Configure browser installation
155
160
  and any required test setup in that project. The ADS tooling host gains no
156
161
  framework or browser dependency from a profile.
@@ -274,7 +279,7 @@ selected `checks` and optional `scenarios` URLs. Write a bounded JSON report:
274
279
  "cases": [
275
280
  {
276
281
  "id": "prepend-anchor",
277
- "file": "design-system/components/MessageScroller/behavior.spec.ts",
282
+ "file": "design-system/components/MessageScroller/MessageScroller.ads.behavior.spec.ts",
278
283
  "status": "passed"
279
284
  }
280
285
  ]
package/docs/CHANGELOG.md CHANGED
@@ -1,6 +1,49 @@
1
1
  # Changelog
2
2
 
3
- ## Unreleased
3
+ ## 0.3.27
4
+
5
+ - Bound the release suite to two test workers to avoid memory contention while
6
+ retaining every test, including packed Node/Bun integration checks.
7
+
8
+ - Allow compiled Apps to read bundled binary blob resources and instantiate
9
+ WebAssembly in the showcase/explorer sandbox. Keep external network access,
10
+ JavaScript eval, host DOM access and native form actions restricted.
11
+
12
+ - Exclude standard generated trees, including nested Cargo `target/`, from preview
13
+ watch allocation and source fingerprints. Use individual directory watches so
14
+ excluded descendants consume no OS watches; retain explicitly configured source roots.
15
+
16
+ - Support Bun-only project tooling alongside Node: explicit Bun setup/MCP launch,
17
+ Bun-forced generated checks, portable `runtime` compiler/behavior commands and
18
+ screenshot workers that inherit the active interpreter. Report the actual
19
+ runtime in status/evidence and invalidate behavior evidence across runtime changes.
20
+ - Infer Bun during setup when launched on Bun without an existing project manager
21
+ or lockfile; preserve declared project choices and explicit overrides.
22
+ - Exercise the installed package with Node/npm/npx unavailable, including builds,
23
+ MCP preview resources, guarded candidate checks, browser behavior and captures.
24
+
25
+ ## 0.3.26
26
+
27
+ - Rename the external-library porting skill and MCP prompt from `ads-migrate`
28
+ to `ads-port`; update workflow discovery, installation examples and skill links.
29
+ - Make porting converge on shared project tokens and primitives, consolidating
30
+ equivalent roles introduced by source dependencies instead of requiring default
31
+ pixel parity. Document and verify intentional visual adaptations.
32
+ - Restore one shared Data vocabulary: remove owner token namespaces/value sheets
33
+ and the owner-contract token section. Keep component/pattern mappings and narrow
34
+ runtime geometry/paint contracts. This is a breaking source contract change.
35
+ - Check design values through static helper/import interpolation, custom-property
36
+ aliases, raw fallbacks and theme branches; warn on equivalent shared definitions.
37
+ - Align architecture, guides, MCP entry guidance, starter and all five portable
38
+ skills with Data, UX and Skin, shared project-role precedence, marked development
39
+ files and the separate review layer.
40
+
41
+ - Add separate `ads_report_bug` and `ads_request_feature` intake tools with shared
42
+ durable project-local storage, context/evidence snapshots and deduplication.
43
+ - Keep intake submission-only with compact ID/local-path receipts, no report-reading
44
+ tools/resources and no automatic expiry or count limit. Bound individual records.
45
+ - Add portable reporting guidance to all five skills, MCP discovery and relevant
46
+ source-proof diagnostics. Reports remain untriaged agent claims, not ADS findings.
4
47
 
5
48
  ## 0.3.25
6
49