@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.
- package/README.md +28 -15
- package/dist/bootstrap-ds/ADS.md +28 -30
- package/dist/bootstrap-ds/README.md +13 -11
- package/dist/bootstrap-ds/design-system/assets/brand/README.md +3 -2
- package/dist/bootstrap-ds/ds.config.json +1 -1
- package/dist/bootstrap-ds/scripts/build-mcp-previews.mjs +1 -1
- package/dist/boundaries.mjs +0 -3
- package/dist/capture.mjs +1 -1
- package/dist/check.mjs +15 -22
- package/dist/config.mjs +3 -7
- package/dist/contract-migration.mjs +2 -2
- package/dist/contracts.d.mts +0 -1
- package/dist/design-values.mjs +81 -0
- package/dist/development-runtime.mjs +17 -0
- package/dist/evidence.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/init.mjs +14 -12
- package/dist/mcp/apps.mjs +1 -1
- package/dist/mcp/context.mjs +8 -7
- package/dist/mcp/mutations.mjs +3 -2
- package/dist/mcp/preview-watch.mjs +2 -1
- package/dist/mcp/prompts.mjs +4 -4
- package/dist/mcp/reports.mjs +101 -0
- package/dist/mcp/server.mjs +41 -3
- package/dist/mcp/widget.bundle.js +1 -1
- package/dist/paint-contracts.mjs +4 -5
- package/dist/preview-files.mjs +33 -0
- package/dist/preview-inputs.mjs +6 -5
- package/dist/preview-resources.mjs +1 -2
- package/dist/scenarios-compiler.mjs +7 -7
- package/dist/scenarios.mjs +14 -14
- package/dist/showcase/sandbox.bundle.js +1 -1
- package/dist/skills/README.md +14 -4
- package/dist/skills/ads-break-ui/SKILL.md +29 -15
- package/dist/skills/ads-break-ui/references/atomic-styles.md +9 -2
- package/dist/skills/ads-break-ui/references/behaviors.md +396 -0
- package/dist/skills/ads-break-ui/references/captures.md +1 -1
- package/dist/skills/ads-break-ui/references/contracts.md +18 -37
- package/dist/skills/ads-break-ui/references/design-data.md +91 -0
- package/dist/skills/ads-break-ui/references/evidence.md +4 -0
- package/dist/skills/ads-break-ui/references/guarded-editing.md +7 -11
- package/dist/skills/ads-break-ui/references/layers.md +16 -0
- package/dist/skills/ads-break-ui/references/reporting.md +101 -0
- package/dist/skills/ads-break-ui/references/runtimes.md +110 -0
- package/dist/skills/ads-break-ui/references/scenarios.md +9 -15
- package/dist/skills/ads-designer/README.md +6 -0
- package/dist/skills/ads-designer/SKILL.md +35 -20
- package/dist/skills/ads-designer/assets/bootstrap-ds/ADS.md +28 -30
- package/dist/skills/ads-designer/assets/bootstrap-ds/README.md +13 -11
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/assets/brand/README.md +3 -2
- package/dist/skills/ads-designer/assets/bootstrap-ds/ds.config.json +1 -1
- package/dist/skills/ads-designer/assets/bootstrap-ds/scripts/build-mcp-previews.mjs +1 -1
- package/dist/skills/ads-designer/references/atomic-styles.md +9 -2
- package/dist/skills/ads-designer/references/behaviors.md +396 -0
- package/dist/skills/ads-designer/references/captures.md +1 -1
- package/dist/skills/ads-designer/references/cli.md +10 -7
- package/dist/skills/ads-designer/references/contracts.md +18 -37
- package/dist/skills/ads-designer/references/design-craft.md +32 -1
- package/dist/skills/ads-designer/references/design-data.md +91 -0
- package/dist/skills/ads-designer/references/evidence.md +4 -0
- package/dist/skills/ads-designer/references/guarded-editing.md +7 -11
- package/dist/skills/ads-designer/references/layers.md +16 -0
- package/dist/skills/ads-designer/references/mobile.md +1 -1
- package/dist/skills/ads-designer/references/reporting.md +101 -0
- package/dist/skills/ads-designer/references/runtimes.md +110 -0
- package/dist/skills/ads-designer/references/scenarios.md +9 -15
- package/dist/skills/ads-import/SKILL.md +51 -20
- package/dist/skills/ads-import/agents/openai.yaml +2 -2
- package/dist/skills/ads-import/references/atomic-styles.md +9 -2
- package/dist/skills/ads-import/references/behaviors.md +396 -0
- package/dist/skills/ads-import/references/branding.md +1 -1
- package/dist/skills/ads-import/references/captures.md +1 -1
- package/dist/skills/ads-import/references/cli.md +10 -7
- package/dist/skills/ads-import/references/compatibility.md +113 -0
- package/dist/skills/ads-import/references/contracts.md +18 -37
- package/dist/skills/ads-import/references/design-data.md +91 -0
- package/dist/skills/ads-import/references/evidence.md +4 -0
- package/dist/skills/ads-import/references/guarded-editing.md +7 -11
- package/dist/skills/ads-import/references/implementation.md +9 -2
- package/dist/skills/ads-import/references/layers.md +16 -0
- package/dist/skills/ads-import/references/reporting.md +101 -0
- package/dist/skills/ads-import/references/runtimes.md +110 -0
- package/dist/skills/ads-import/references/scenarios.md +9 -15
- package/dist/skills/ads-import/references/tokens.md +11 -9
- package/dist/skills/ads-motion/SKILL.md +28 -14
- package/dist/skills/ads-motion/references/atomic-styles.md +9 -2
- package/dist/skills/ads-motion/references/behaviors.md +396 -0
- package/dist/skills/ads-motion/references/captures.md +1 -1
- package/dist/skills/ads-motion/references/contracts.md +18 -37
- package/dist/skills/ads-motion/references/design-data.md +91 -0
- package/dist/skills/ads-motion/references/evidence.md +4 -0
- package/dist/skills/ads-motion/references/guarded-editing.md +7 -11
- package/dist/skills/ads-motion/references/layers.md +16 -0
- package/dist/skills/ads-motion/references/reporting.md +101 -0
- package/dist/skills/ads-motion/references/runtimes.md +110 -0
- package/dist/skills/ads-motion/references/scenarios.md +9 -15
- package/dist/skills/{ads-migrate → ads-port}/SKILL.md +64 -33
- package/dist/skills/ads-port/agents/openai.yaml +4 -0
- package/dist/skills/{ads-migrate → ads-port}/references/atomic-styles.md +9 -2
- package/dist/skills/ads-port/references/behaviors.md +396 -0
- package/dist/skills/{ads-migrate → ads-port}/references/captures.md +1 -1
- package/dist/skills/{ads-migrate → ads-port}/references/cli.md +10 -7
- package/dist/skills/{ads-migrate → ads-port}/references/contracts.md +18 -37
- package/dist/skills/ads-port/references/design-data.md +91 -0
- package/dist/skills/{ads-migrate → ads-port}/references/evidence.md +4 -0
- package/dist/skills/{ads-migrate → ads-port}/references/guarded-editing.md +7 -11
- package/dist/skills/{ads-migrate → ads-port}/references/layers.md +16 -0
- package/dist/skills/{ads-migrate → ads-port}/references/lint-and-docs.md +5 -0
- package/dist/skills/{ads-migrate → ads-port}/references/native-implementation.md +49 -15
- package/dist/skills/ads-port/references/reporting.md +101 -0
- package/dist/skills/ads-port/references/runtimes.md +110 -0
- package/dist/skills/{ads-migrate → ads-port}/references/scenarios.md +9 -15
- package/dist/skills/{ads-migrate → ads-port}/references/testing.md +11 -1
- package/dist/tokens.mjs +5 -8
- package/dist/unit-contracts.mjs +1 -8
- package/dist/verification.mjs +4 -3
- package/docs/ADS.md +59 -73
- package/docs/ARCHITECTURE.md +68 -20
- package/docs/BEHAVIORS.md +46 -41
- package/docs/CHANGELOG.md +44 -1
- package/docs/COMPARISON.md +63 -0
- package/docs/CONTRACTS.md +18 -37
- package/docs/GUIDE.md +41 -23
- package/docs/MCP.md +100 -15
- package/package.json +5 -4
- package/dist/scoped-tokens.mjs +0 -68
- package/dist/skills/ads-migrate/agents/openai.yaml +0 -4
- /package/dist/skills/{ads-migrate → ads-port}/references/review.md +0 -0
|
@@ -3,6 +3,9 @@ name: ads-motion
|
|
|
3
3
|
description: Implement, review, audit, or profile web animation in a project's local design system. Use for motion purpose, easing, timing, origins, interruptibility, reduced motion, and rendering performance while preserving token and component ownership.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
For Node/Bun setup, MCP launch and compiler workers, read
|
|
7
|
+
[runtimes.md](references/runtimes.md).
|
|
8
|
+
|
|
6
9
|
Accept a component/pattern name, file, screen, or project path and infer the mode
|
|
7
10
|
from the request. Inspect before proposing motion: read `docs/ARCHITECTURE.md` when
|
|
8
11
|
present (or the existing architecture guide), the project's ADS guide,
|
|
@@ -66,7 +69,7 @@ ADS gates. For binary/large assets, generate `git diff --binary --full-index` in
|
|
|
66
69
|
stay out of model context. Binary changes require Git. When editing is disabled,
|
|
67
70
|
use the client's normal source-editing tools.
|
|
68
71
|
For owner drafts, token-sample reconciliation, coupled transactions and local
|
|
69
|
-
|
|
72
|
+
shared Data ownership, read [guarded-editing.md](references/guarded-editing.md).
|
|
70
73
|
For on-demand current/candidate screenshots and visual dry-run review, read
|
|
71
74
|
[captures.md](references/captures.md).
|
|
72
75
|
For a rejected patch, failed check or loading error, read
|
|
@@ -84,8 +87,9 @@ renderers, build aliases or `review-import` / `review-contract` diagnostics, rea
|
|
|
84
87
|
|
|
85
88
|
A component provides one cohesive UI capability; a pattern arranges capabilities
|
|
86
89
|
into reusable structures or workflows. Components may compose components/controllers;
|
|
87
|
-
layout patterns may arrange slots. Do not classify by component count. For
|
|
88
|
-
|
|
90
|
+
layout patterns may arrange slots. Do not classify by component count. For shared
|
|
91
|
+
website/MCP App use, owner selection, or `component-dependency`,
|
|
92
|
+
`component-contract` or `component-style` diagnostics, read
|
|
89
93
|
[layer responsibilities and contracts](references/layers.md), also served as
|
|
90
94
|
`ads://guides/layers`. Preserve public APIs and documented non-state styling hooks.
|
|
91
95
|
|
|
@@ -110,11 +114,11 @@ pattern; reusable controllers use discovered `controllers/<Name>` units. Use the
|
|
|
110
114
|
project's configured framework and declared dependencies, or plain TypeScript,
|
|
111
115
|
browser APIs and local helpers. MCP hosts supply no ad hoc runtime APIs. The
|
|
112
116
|
framework setting selects compilation/mounting; controller checks also validate
|
|
113
|
-
imports. For controller/behavior work, read
|
|
114
|
-
|
|
117
|
+
imports. For controller/behavior work, read
|
|
118
|
+
[behaviors.md](references/behaviors.md), also served as `ads://guides/behaviors`. Discover registered guarantees
|
|
115
119
|
with `ads_behaviors`; use `ads_verify` for selected real checks. Optional
|
|
116
120
|
`exercises` links public behavioral APIs to scenarios; keep `covers` for rendered
|
|
117
|
-
UI. Registration and demonstration are not passing evidence.
|
|
121
|
+
UI. Registration and demonstration are not passing evidence. `<Owner>.ads.contract.ts`,
|
|
118
122
|
scenarios, fixtures and checks stay out of production exports/imports. Verify
|
|
119
123
|
current results, including lifecycle setup/cleanup/setup and the actual browser
|
|
120
124
|
profile when promised. React StrictMode needs a development harness; wrapping a
|
|
@@ -174,26 +178,27 @@ The host shows errors and marks retained output as stale. Other hosts may need a
|
|
|
174
178
|
explicit preview-tool invocation. Compilation remains project-owned and required
|
|
175
179
|
for TSX/Linaria; it is automatic, not eliminated.
|
|
176
180
|
|
|
177
|
-
Reusable review layouts belong in
|
|
181
|
+
Reusable review layouts belong in development-only `review/`, exported through
|
|
182
|
+
the separate review entry, while scenario
|
|
178
183
|
files define no CSS, custom classes or widget replicas. Keep real presentation in
|
|
179
184
|
its component/pattern owner. The tooling shell's CSS is outside that project
|
|
180
185
|
contract. Legacy custom showcase pages may be retained during migration; new
|
|
181
186
|
projects require no TokensPage/ComponentsPage/PatternsPage/CompositionPage files.
|
|
182
187
|
|
|
183
|
-
Colocate
|
|
184
|
-
|
|
185
|
-
|
|
188
|
+
Colocate `<Owner>.ads.scenario.tsx` and `<Owner>.ads.fixture.ts` with tokens and
|
|
189
|
+
each component/pattern. Put larger entries under `composition/<Name>/` with their
|
|
190
|
+
own marked scenario and fixture. Export a default
|
|
186
191
|
zero-input mountable view and literal metadata, for example
|
|
187
192
|
`export const scenario = { title: "Button states", covers: ["Button"] };`.
|
|
188
193
|
Import the real UI from the public ADS alias. Keep fixture inputs, simulated
|
|
189
194
|
services and initial state/callback adapters beside the scenario. Empty fixtures
|
|
190
195
|
are valid for an entry with no inputs. Extra development helpers use a
|
|
191
|
-
|
|
196
|
+
`<Owner>.ads.helpers.ts` file, so guards
|
|
192
197
|
recognize their role even beside runtime code. Never require a page, router or store to
|
|
193
198
|
initialize the entry. Several contextual public parts may share one scenario.
|
|
194
199
|
|
|
195
|
-
IDs derive from ADS-relative filenames: both `components/core/Button/
|
|
196
|
-
and `components/core/Button.scenario.tsx` identify `components/core/Button`.
|
|
200
|
+
IDs derive from ADS-relative filenames: both `components/core/Button/Button.ads.scenario.tsx`
|
|
201
|
+
and `components/core/Button.ads.scenario.tsx` identify `components/core/Button`.
|
|
197
202
|
Use one form, no duplicate IDs or hand-maintained registry. Renames change IDs.
|
|
198
203
|
The showcase and external hosts mount the same discovered entry. The Vite
|
|
199
204
|
adapter uses `previewEntriesPlugin` and `createPreviewResources` with
|
|
@@ -340,5 +345,14 @@ This workflow adapts Emil Kowalski's animation skills. See
|
|
|
340
345
|
|
|
341
346
|
For static owner contracts, `.ads.` development roles, typed paint/binding APIs,
|
|
342
347
|
declarative parent graphs, constrained theme bindings, private visual subject roles,
|
|
343
|
-
|
|
348
|
+
shared Data ownership and guarded migration, read
|
|
344
349
|
[contracts.md](references/contracts.md) when the task touches those contracts.
|
|
350
|
+
|
|
351
|
+
For a suspected ADS defect or missing capability after targeted investigation, read
|
|
352
|
+
[reporting.md](references/reporting.md). Record actionable observations with
|
|
353
|
+
`ads_report_bug` or `ads_request_feature`; preserve valid APIs and rejected drafts.
|
|
354
|
+
|
|
355
|
+
For Data/UX/Skin boundaries, shared token reuse and private-value diagnostics, read
|
|
356
|
+
[design-data.md](references/design-data.md). Components own mappings and mechanics,
|
|
357
|
+
not independent token catalogues. Existing project font, text and spacing roles
|
|
358
|
+
take precedence over divergent upstream constants during adaptation.
|
|
@@ -110,8 +110,7 @@ MCP delivers it inside the App document, not the outer showcase host.
|
|
|
110
110
|
ownership, and rejects conflicting schemas or registrations shared by unrelated
|
|
111
111
|
owners. Identical registrations from the same owner are permitted. Runtime
|
|
112
112
|
`--ds-*` / `--ux-*` variables stay with their runtime owner. A shared token's
|
|
113
|
-
registration belongs beside its actual definition in a foundation value sheet
|
|
114
|
-
a namespaced owner token's registration belongs in its registered `tokens.css`.
|
|
113
|
+
registration belongs beside its actual definition in a foundation value sheet.
|
|
115
114
|
Neither `base.css` nor `fonts.css` becomes a registration escape hatch. Registration
|
|
116
115
|
alone does not define a token or satisfy its sample/fixture coverage.
|
|
117
116
|
|
|
@@ -258,6 +257,14 @@ contract; an overlap warning remains a review signal.
|
|
|
258
257
|
with `severity: "warning"`. CLI checks still exit successfully when there are no
|
|
259
258
|
errors; MCP checks and mutations preserve the warning and its guidance URI.
|
|
260
259
|
|
|
260
|
+
An unchanged advisory baseline is not evidence that the affected styles are
|
|
261
|
+
correct. Triage warnings that reach an edited owner or its shared helpers against
|
|
262
|
+
the actual DOM classes and computed styles in a compiled scenario. Interaction
|
|
263
|
+
checks may pass without measuring padding, alignment or sizing. When an intended
|
|
264
|
+
layout is known, add a focused rendered assertion for that contract; when keeping
|
|
265
|
+
an overlap, state why it is intentional and which states/directions were checked.
|
|
266
|
+
Keep unresolved paths and unsupported writing modes explicit in the evidence.
|
|
267
|
+
|
|
261
268
|
The source review examines atomic Linaria templates and statically traceable
|
|
262
269
|
`cx` arguments, including aliases, local imports/re-exports, local helper returns,
|
|
263
270
|
arguments/defaults, nested composition, conditional expressions and variant-object
|
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
# Controllers and behavioral verification
|
|
2
|
+
|
|
3
|
+
Controllers own reusable UI behavior: state, subscriptions, DOM measurements and
|
|
4
|
+
lifecycle coordination. A controller may be a class, function, hook, state
|
|
5
|
+
machine or context provider. Linaria and tokens own its consumers' visual design.
|
|
6
|
+
|
|
7
|
+
Private controllers stay inside their component/pattern mutation unit. Shared
|
|
8
|
+
controllers use `design-system/controllers/<Name>/` with an `index` entry or a
|
|
9
|
+
runtime file matching the directory name. The unit ID is `controllers/<Name>`.
|
|
10
|
+
Its implementation, tests and guides can change together, including only its own
|
|
11
|
+
required public re-exports. A shared controller needs no artificial visual preview.
|
|
12
|
+
Consumers normally create separate instances; sharing implementation does not
|
|
13
|
+
implicitly share state.
|
|
14
|
+
|
|
15
|
+
Use the project's `framework` from `ds.config.json` for framework-specific APIs.
|
|
16
|
+
Plain TypeScript, browser APIs and local behavior helpers remain supported.
|
|
17
|
+
Declare external dependencies in the project package. ADS does not install them
|
|
18
|
+
or assume a renderer/library supplied by an MCP host. The framework field selects
|
|
19
|
+
compilation/mounting; controller checks also validate runtime imports. Type-only
|
|
20
|
+
UI references are allowed, but shared controllers cannot import component/pattern
|
|
21
|
+
runtime implementations. Keep business data in application adapters. Measured
|
|
22
|
+
style writes retain exact `boundaries.styleWrites` properties; they do not allow
|
|
23
|
+
shared-token overrides or an extra styling layer.
|
|
24
|
+
These gates inspect supported direct imports, markup and style boundaries.
|
|
25
|
+
External package internals and delegated DOM behavior still require source,
|
|
26
|
+
build and browser review; declaring a dependency does not prove it is headless.
|
|
27
|
+
|
|
28
|
+
Register owner behavior in `<Owner>.ads.contract.ts` with actual API and
|
|
29
|
+
implementation references. The
|
|
30
|
+
[contract reference](contracts.md) covers static authoring, `.ads.behavior.spec.ts`,
|
|
31
|
+
declarative `exercises`, required browser checks and guarded migration.
|
|
32
|
+
A contract declaration alone is not passing evidence. Use
|
|
33
|
+
`auditBehaviorPaints(frame)` after relevant binding updates to repeat the current
|
|
34
|
+
App's generic paint audit, in addition to assertions for the named guarantee.
|
|
35
|
+
|
|
36
|
+
## Development boundary
|
|
37
|
+
|
|
38
|
+
Production includes real components, controllers, tokens and compiled styles.
|
|
39
|
+
Scenarios and fixtures are included only in previews. Behavior manifests and test
|
|
40
|
+
files are development/tooling inputs. Runtime imports and public re-exports of
|
|
41
|
+
those inputs are rejected, including dynamic imports and aliases.
|
|
42
|
+
|
|
43
|
+
## Register guarantees
|
|
44
|
+
|
|
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:
|
|
48
|
+
|
|
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
|
+
},
|
|
75
|
+
},
|
|
76
|
+
} satisfies UnitContract;
|
|
77
|
+
```
|
|
78
|
+
|
|
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.
|
|
85
|
+
|
|
86
|
+
Private subjects default to the headless controller role. For an intentionally
|
|
87
|
+
visual internal renderer or binding producer, declare `role: "implementation"`
|
|
88
|
+
alongside its `implementation` reference in the contract. Its source ownership and normal runtime gates
|
|
89
|
+
still apply; registration does not make it public API. Shared `controllers/`
|
|
90
|
+
source remains headless regardless of subject metadata. See the
|
|
91
|
+
[owner contract](contracts.md#a-contract-uses-actual-implementation-references).
|
|
92
|
+
|
|
93
|
+
Static validation establishes registration and ownership, not that the guarantee
|
|
94
|
+
is true. README prose is not automatically certified. Link specific guarantees
|
|
95
|
+
when describing the evidence available for a behavior.
|
|
96
|
+
|
|
97
|
+
## Link a public API to a demonstration
|
|
98
|
+
|
|
99
|
+
Scenario `covers` retains its existing render-reference contract. Optional
|
|
100
|
+
`exercises` identifies public behavioral APIs:
|
|
101
|
+
|
|
102
|
+
```tsx
|
|
103
|
+
export const scenario = {
|
|
104
|
+
title: "Message scrolling",
|
|
105
|
+
covers: ["MessageScroller", "MessageScrollerViewport"],
|
|
106
|
+
exercises: ["useMessageScroller", "useMessageScrollerScrollable"],
|
|
107
|
+
};
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Call hooks in a rendered local scenario adapter. Calls/construction are matched by
|
|
111
|
+
resolved symbol, not a `use*` naming convention. An unused import, dead adapter or
|
|
112
|
+
metadata string does not count. Dynamically passed behavior references produce a
|
|
113
|
+
review advisory when a direct call cannot be established; verify those through
|
|
114
|
+
registered execution checks rather than changing the API for the analyzer.
|
|
115
|
+
|
|
116
|
+
Callable exports may be functions, callable objects with attached methods, or
|
|
117
|
+
factory results. ADS uses their TypeScript call/construct signatures, including
|
|
118
|
+
the project's library declarations; it does not execute modules or maintain a
|
|
119
|
+
list of recognized factory names. The fast source guard resolves ambiguous public
|
|
120
|
+
values lazily and shares that type discovery within the check. Untyped `any`
|
|
121
|
+
values and objects containing methods do not establish a callable API.
|
|
122
|
+
An invalid `exercises` entry names the offending value and fails validation while
|
|
123
|
+
retaining independent render evidence for `covers`.
|
|
124
|
+
Calls to a callable's attached methods also exercise that public receiver,
|
|
125
|
+
including statically named member calls inside reachable event-handler closures.
|
|
126
|
+
Aliases, namespace access and re-exports retain the receiver identity. Reading a
|
|
127
|
+
method or defining an unused callback does not establish an invocation.
|
|
128
|
+
|
|
129
|
+
Public APIs appear in `ads_catalog` with `apiKind: "ui"` or `"behavior"` and their
|
|
130
|
+
scenario links. `ads_behaviors` joins contracts to demonstrations and evidence.
|
|
131
|
+
A demonstrated API is not automatically a verified guarantee.
|
|
132
|
+
|
|
133
|
+
## Register execution profiles
|
|
134
|
+
|
|
135
|
+
Profiles are explicit trusted development commands in `ds.config.json`. They use
|
|
136
|
+
literal executable/argument arrays, no shell interpolation or model-supplied
|
|
137
|
+
command. For a project with an installed Playwright test runner:
|
|
138
|
+
|
|
139
|
+
```json
|
|
140
|
+
{
|
|
141
|
+
"mcp": {
|
|
142
|
+
"behaviorProfiles": {
|
|
143
|
+
"widget": {
|
|
144
|
+
"runner": "playwright",
|
|
145
|
+
"command": "runtime",
|
|
146
|
+
"args": ["node_modules/@playwright/test/cli.js", "test"],
|
|
147
|
+
"mode": "browser",
|
|
148
|
+
"timeoutMs": 60000
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
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
|
|
159
|
+
configuration must discover colocated spec files. Configure browser installation
|
|
160
|
+
and any required test setup in that project. The ADS tooling host gains no
|
|
161
|
+
framework or browser dependency from a profile.
|
|
162
|
+
|
|
163
|
+
The Playwright adapter appends selected file paths and case-tag filtering, its
|
|
164
|
+
reporter and a generated artifact directory. Unselected cases in the same spec
|
|
165
|
+
do not run. It preserves the project's worker configuration.
|
|
166
|
+
|
|
167
|
+
`timeoutMs` bounds the complete runner process for one profile, including runner
|
|
168
|
+
startup, hooks, retries and all selected cases. It is not a per-test timeout.
|
|
169
|
+
Playwright's own test/hook timeouts remain separate project settings. Set the
|
|
170
|
+
profile budget from measured suite durations with headroom; increasing it does
|
|
171
|
+
not repair a stalled assertion or cleanup.
|
|
172
|
+
|
|
173
|
+
Independent specs can use multiple Playwright workers against the same managed
|
|
174
|
+
candidate host. Each check needs its own page/context and state; avoid fixed ports,
|
|
175
|
+
shared mutable fixtures and test-order dependencies. Start with a small worker
|
|
176
|
+
count and measure on the target machine. Files normally run in parallel; tests
|
|
177
|
+
within one file normally remain sequential. ADS does not force parallelism or
|
|
178
|
+
change verification policy. See [Playwright parallelism](https://playwright.dev/docs/test-parallel).
|
|
179
|
+
Prefer readiness/assertion polling over arbitrary sleeps. Timer-only guarantees
|
|
180
|
+
may use [Playwright's clock](https://playwright.dev/docs/clock); retain real time
|
|
181
|
+
when browser motion, pointer gestures or layout timing are what the check verifies.
|
|
182
|
+
|
|
183
|
+
An ordinary test-failure exit (code 1) with a complete report and actual failing
|
|
184
|
+
cases preserves independent case outcomes: passing checks stay `passed`, failed
|
|
185
|
+
checks stay `failed`, and overall verification still blocks the mutation. The
|
|
186
|
+
report must account for every selected check, with no active cases or suite errors.
|
|
187
|
+
The same rule supports older custom reports without an explicit `complete` field
|
|
188
|
+
after normal process completion. An unexplained nonzero exit cannot certify a
|
|
189
|
+
pass, even if all reported cases claim success. Results retain `reportedStatus`
|
|
190
|
+
and `runnerExitCode` and explain the overall failure. Suite-level browser errors and
|
|
191
|
+
bounded runner output appear in diagnostics. `openBehaviorScenario` includes the
|
|
192
|
+
scenario ID and failed browser requests in startup failures; App resource errors
|
|
193
|
+
identify the resource URI. The ADS showcase retries only `resources/read` fetch
|
|
194
|
+
transport failures, with at most three attempts and 200/800 ms backoff. Recovered
|
|
195
|
+
startup reads appear in `startupDiagnostics` with retry counts and failed browser
|
|
196
|
+
requests; each retry is also logged in the browser console. This does not retry a
|
|
197
|
+
tool call, assertion, check or complete startup. HTTP/protocol/content errors,
|
|
198
|
+
integrity failures and cancellations do not retry. Persistent loading failures
|
|
199
|
+
still fail the check and block mutations. External hosts control their own
|
|
200
|
+
transport recovery.
|
|
201
|
+
|
|
202
|
+
`net::ERR_NETWORK_CHANGED` reports Chrome's network-change error, not proof that
|
|
203
|
+
the MCP endpoint restarted or that a particular interface changed. To investigate
|
|
204
|
+
an intermittent failure, correlate the saved case timestamps with Chrome's
|
|
205
|
+
network log, server availability and live interface monitoring (for example,
|
|
206
|
+
`ip -ts monitor link address route` on Linux). Interfaces being present, or stable
|
|
207
|
+
after a failure, does not establish the cause. Preserve the draft and original
|
|
208
|
+
diagnostic; do not change a component API, reference example or verification
|
|
209
|
+
policy to compensate for a resource-loading failure.
|
|
210
|
+
|
|
211
|
+
The reporter atomically publishes partial snapshots at test start/end. While a
|
|
212
|
+
run is active, `ads_status.behaviors.progress` exposes the profile, runner budget,
|
|
213
|
+
elapsed time, completed/active/pending counts, worker count when available and
|
|
214
|
+
case identities/timings. Candidate mutation verification exposes the same data at
|
|
215
|
+
`ads_status.mutations.progress`. Clients requesting MCP progress receive updates
|
|
216
|
+
and a heartbeat during the runner phase; client-side request timeouts still apply.
|
|
217
|
+
`durationMs` records completed case execution, including attempts, separately from
|
|
218
|
+
the suite's wall time. Parallel case durations can sum to more than wall time.
|
|
219
|
+
|
|
220
|
+
After a deadline, valid completed outcomes remain visible through `reportedStatus`
|
|
221
|
+
and durations, alongside active and unstarted case identities. A passed case from
|
|
222
|
+
an interrupted run has blocking status `incomplete`; real assertion failures retain
|
|
223
|
+
their own messages. No incomplete run can accept a mutation or certify a guarantee.
|
|
224
|
+
Reports and artifacts stay under the live project's `.ds/verification/` even after
|
|
225
|
+
the candidate copy is removed. This is diagnostic output, not passing live-source
|
|
226
|
+
evidence. Old/custom runners without incremental progress use `not_reported` for
|
|
227
|
+
cases whose execution state cannot be established.
|
|
228
|
+
|
|
229
|
+
Use native test tags for stable case identity:
|
|
230
|
+
|
|
231
|
+
```ts
|
|
232
|
+
import { test, expect } from "@playwright/test";
|
|
233
|
+
import { openBehaviorScenario } from "@reqvire-org/ads/verification";
|
|
234
|
+
|
|
235
|
+
test("history preserves the visible anchor", { tag: "@ads:prepend-anchor" }, async ({ page }) => {
|
|
236
|
+
const frame = await openBehaviorScenario(page, "prepend-anchor");
|
|
237
|
+
// Perform real interactions and assert the project's guarantee here.
|
|
238
|
+
await expect(frame.getByRole("region", { name: "Messages" })).toBeVisible();
|
|
239
|
+
});
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
The shown assertion is only a harness example; it does not establish anchoring.
|
|
243
|
+
Write meaningful assertions for the registered guarantee. The helper waits for
|
|
244
|
+
the current selected scenario inside the real sandboxed MCP App. It uses `load`
|
|
245
|
+
and explicit readiness, not `networkidle`: MCP keeps event connections open.
|
|
246
|
+
|
|
247
|
+
Compare reference and candidate under equivalent framing. In a reported Chrome
|
|
248
|
+
comparison, `content-visibility` initially used placeholder geometry inside a
|
|
249
|
+
cross-origin App iframe for both ADS and the upstream reference; the same content
|
|
250
|
+
measured differently as a top-level page. This is an observed browser/layout
|
|
251
|
+
condition, not evidence of an ADS defect. App readiness does not imply that every
|
|
252
|
+
off-screen item has rendered. For geometry assertions, bring the relevant content
|
|
253
|
+
into view and wait for its measured layout to settle. Record the framing and
|
|
254
|
+
visibility state; test initial placeholder behavior separately when it matters to
|
|
255
|
+
the guarantee. Wait for focus and positioning readiness before normal keyboard
|
|
256
|
+
comparisons, and test rapid input separately rather than hiding it behind delays.
|
|
257
|
+
|
|
258
|
+
`mode: "browser"` starts an isolated managed showcase on an automatic port. Test
|
|
259
|
+
requests contain its scenario URLs, and cleanup closes its host/compiler tree.
|
|
260
|
+
Mutation candidates use their own source, generated graph and server; a passing
|
|
261
|
+
test against an older fixed-port live showcase cannot validate a candidate.
|
|
262
|
+
|
|
263
|
+
Use `mode: "strict"` only for React with a project development harness that mounts
|
|
264
|
+
the relevant API in StrictMode. The production MCP App does not replay development
|
|
265
|
+
effects. This profile does not receive a production showcase URL from the helper.
|
|
266
|
+
For Preact, register its actual lifecycle tests without claiming React StrictMode.
|
|
267
|
+
The profile names record the chosen environment; ADS does not infer that a test's
|
|
268
|
+
assertions cover every lifecycle condition.
|
|
269
|
+
|
|
270
|
+
Other runners use `runner: "protocol"` (the default). ADS provides
|
|
271
|
+
`ADS_VERIFY_REQUEST` and `ADS_VERIFY_REPORT` absolute paths. Read the request's
|
|
272
|
+
`schemaVersion`, unique `runId`, `projectRoot`, `framework`, `profile`, `mode`,
|
|
273
|
+
selected `checks` and optional `scenarios` URLs. Write a bounded JSON report:
|
|
274
|
+
|
|
275
|
+
```json
|
|
276
|
+
{
|
|
277
|
+
"schemaVersion": 1,
|
|
278
|
+
"runId": "<the request's runId>",
|
|
279
|
+
"cases": [
|
|
280
|
+
{
|
|
281
|
+
"id": "prepend-anchor",
|
|
282
|
+
"file": "design-system/components/MessageScroller/MessageScroller.ads.behavior.spec.ts",
|
|
283
|
+
"status": "passed"
|
|
284
|
+
}
|
|
285
|
+
]
|
|
286
|
+
}
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
Case statuses are `passed`, `failed` or `skipped`, with optional `message` and
|
|
290
|
+
`durationMs`. Protocol runners may atomically publish intermediate reports with
|
|
291
|
+
`complete:false` and an `active` list of `{id,file,startedAt,workerIndex?}`, then
|
|
292
|
+
publish `complete:true` at completion. Older final reports without `complete`
|
|
293
|
+
remain supported after normal process completion. An explicitly incomplete report
|
|
294
|
+
cannot pass even with exit code zero. Partial reports retain the same schema/run
|
|
295
|
+
identity and size limits as final reports.
|
|
296
|
+
Cases may optionally include `failure: {category,phase,code,certainty?}`,
|
|
297
|
+
`source: {file,line,column}`, `failingStep`, `viewport`/`viewportSource`, and
|
|
298
|
+
`artifacts: [{name,mimeType,path}]`. Artifact paths are relative to the report
|
|
299
|
+
directory and must remain under that run's `artifacts/` directory. The built-in
|
|
300
|
+
Playwright reporter supplies these from actual step/startup/attachment evidence.
|
|
301
|
+
Older protocol runners can omit them; ADS preserves that lack of classification
|
|
302
|
+
instead of treating an arbitrary thrown message as an assertion.
|
|
303
|
+
`file` is project-relative. Nonzero process exit, missing cases, skipped cases,
|
|
304
|
+
wrong run IDs and unavailable reports do not pass. Test commands are trusted
|
|
305
|
+
project code; an adapter cannot prove the quality or honesty of their assertions.
|
|
306
|
+
|
|
307
|
+
## Execute and inspect evidence
|
|
308
|
+
|
|
309
|
+
Use `ads_behaviors` for bounded discovery; request an exact unit for its contract.
|
|
310
|
+
General listings return counts and short API/guarantee/scenario summaries. Exact
|
|
311
|
+
owner requests return the registered details; source reads remain available for
|
|
312
|
+
bounded inspection of large contracts. No full guide or test body is injected
|
|
313
|
+
into discovery results.
|
|
314
|
+
Call `ads_verify({unit, checks?})` for selected registered checks. Read
|
|
315
|
+
`ads://project/behaviors` for current evidence or `ads://guides/behaviors` for this
|
|
316
|
+
guide. CLI/CI equivalents are:
|
|
317
|
+
|
|
318
|
+
```sh
|
|
319
|
+
ads behaviors . --json
|
|
320
|
+
ads verify . --unit controllers/ScrollFollow
|
|
321
|
+
ads verify . --unit components/MessageScroller --check prepend-anchor --json
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
Execution has bounded output, a configured timeout, cancellation and process-tree
|
|
325
|
+
ownership. Evidence records case/profile identity, source/dependency revision,
|
|
326
|
+
completion time, report path and the available preview revision. Later input
|
|
327
|
+
changes mark results stale; changes during execution prevent a current pass.
|
|
328
|
+
Guarantees report passing only when all their checks have current passing evidence.
|
|
329
|
+
Passing applies to those cases and profiles, not every application state.
|
|
330
|
+
|
|
331
|
+
Results expose structured `failure` boundaries and explicit `acceptance` scope.
|
|
332
|
+
MCP execution replies contain counts, bounded acceptance, at most three failure
|
|
333
|
+
previews and a `resultId` (4 KiB UTF-8 JSON maximum). Use `ads_results` to read
|
|
334
|
+
selected `outcomes`, `checks`, `diagnostics` or other sections without execution.
|
|
335
|
+
Pages default to 10 rows, allow at most 20 and stay within 8 KiB; follow
|
|
336
|
+
`nextCursor` with identical selection/status. Truncated records provide
|
|
337
|
+
`recordIndex` for exact `offset`/`chars` ranges. Only the latest verification and
|
|
338
|
+
mutation snapshots are retained, independently, at most 8 MiB each. Replaced IDs
|
|
339
|
+
fail explicitly. Validation still uses complete internal outcomes.
|
|
340
|
+
|
|
341
|
+
Use `ads_investigate({unit,check,runId})` with an outcome's exact IDs for its compact
|
|
342
|
+
summary (4 KiB maximum); details, requests, browser errors and artifact metadata are separate
|
|
343
|
+
paged sections (8 KiB maximum). Truncated records support exact text ranges with
|
|
344
|
+
the recorded run ID. Saved outcomes describe completion time; compare current
|
|
345
|
+
`ads_behaviors` revisions for freshness. It includes isolated dry runs; `ads://project/investigations` lists available entries. Exact
|
|
346
|
+
input and observed preview revisions, failing step/source, startup viewport,
|
|
347
|
+
failed startup requests and available project-recorded artifacts keep diagnosis
|
|
348
|
+
separate from an inferred component defect. No artifact is invented or test
|
|
349
|
+
retried. Each check retains one latest bundle; old artifact resource access is
|
|
350
|
+
superseded. Candidate bundles remain distinct from passing live-source evidence.
|
|
351
|
+
Read the portable [evidence reference](evidence.md)
|
|
352
|
+
for category meanings, collection limits and artifact policy.
|
|
353
|
+
|
|
354
|
+
Revisions include owned files, literal import dependencies, local CSS imports and
|
|
355
|
+
asset URLs, token foundation, project/runner configuration, lockfiles and tooling.
|
|
356
|
+
Computed module selection conservatively includes all ADS owners. Environment,
|
|
357
|
+
network and other unregistered external inputs remain the runner's responsibility;
|
|
358
|
+
an evidence record is not a proof about arbitrary external state.
|
|
359
|
+
|
|
360
|
+
For named imports through simple re-export barrels, ADS follows selected bindings
|
|
361
|
+
and retains dependencies with declared side effects. This narrowing requires a
|
|
362
|
+
package `sideEffects:false` or a supported simple `sideEffects` glob array; preserve
|
|
363
|
+
CSS/global effects in that policy. Unknown policies/patterns, wildcard exports and
|
|
364
|
+
computed imports remain conservative. Barrel source changes still invalidate
|
|
365
|
+
dependents. ADS caches source parsing, resolution and digests within an inspection
|
|
366
|
+
only; later runs read current source again.
|
|
367
|
+
|
|
368
|
+
Guarded mutations execute affected registered behavior contracts after core,
|
|
369
|
+
Oxlint and configured project checks, before writing source. Imported shared
|
|
370
|
+
controller changes also select dependent contracts conservatively. Rejected and
|
|
371
|
+
dry-run patches publish no source changes. Verification output stays under `.ds/`.
|
|
372
|
+
To check a prepared draft, request its diff and pass the returned `patchFile` to
|
|
373
|
+
`ads_apply_patch` with `dryRun:true`. This checks the isolated candidate, including
|
|
374
|
+
affected behavior contracts and its configured browser preview. Candidate evidence
|
|
375
|
+
is not persisted as passing evidence for live source. `ads_verify` selects checks
|
|
376
|
+
for current source and has no draft argument.
|
|
377
|
+
|
|
378
|
+
## Packaging and performance
|
|
379
|
+
|
|
380
|
+
Controllers follow normal component/scenario imports into the project's compiled
|
|
381
|
+
resource graph. Their framework dependencies are bundled by the project compiler
|
|
382
|
+
and served through MCP resources inside the App iframe; external hosts install
|
|
383
|
+
nothing. The selected scenario loads its dependency closure. Shared modules are
|
|
384
|
+
cached within that App instance, and each separately opened App has its own runtime.
|
|
385
|
+
|
|
386
|
+
Keep ESM modules and explicit imports. Avoid an eagerly imported controller
|
|
387
|
+
registry. Tree shaking and shared chunks follow the project bundler: class methods,
|
|
388
|
+
side effects, global CSS and dynamic maps can retain extra code. Inspect emitted
|
|
389
|
+
resources instead of assuming a controller produces a minimal bundle.
|
|
390
|
+
|
|
391
|
+
Development-only `review/<Owner>` units may register the same guarantee/check
|
|
392
|
+
contracts for review presentation and controls. Subjects can name that owner's
|
|
393
|
+
separate review API or local headless helpers; checks still run registered project
|
|
394
|
+
profiles and can refer to an existing real scenario. This grants no production
|
|
395
|
+
API, catalogue entry, `covers` credit or runtime import permission. See the
|
|
396
|
+
[portable review guide](review.md).
|
|
@@ -59,7 +59,7 @@ export const scenario = {
|
|
|
59
59
|
};
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
Use attributes/selectors already owned by the real UI or its
|
|
62
|
+
Use attributes/selectors already owned by the real UI or its development-only review helper.
|
|
63
63
|
Scenarios keep their existing styling/control rules. A target is not permission
|
|
64
64
|
to add demo-only product props, custom CSS or synthetic native controls. Each
|
|
65
65
|
selector is scoped to the App iframe and must match exactly one visible element.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Static owner contracts and development files
|
|
2
2
|
|
|
3
|
-
Use one optional `<Owner>.ads.contract.ts` for
|
|
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,
|
|
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
|
|
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
|
-
|
|
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
|
-
##
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
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](design-data.md).
|
|
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
|
-
|
|
272
|
-
|
|
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.
|