@reqvire-org/ads 0.3.2 → 0.3.5
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 +12 -4
- package/dist/behaviors.mjs +157 -0
- package/dist/bootstrap-ds/ADS.md +7 -0
- package/dist/bootstrap-ds/design-system/controllers/.gitkeep +0 -0
- package/dist/boundaries.mjs +21 -23
- package/dist/check.mjs +25 -13
- package/dist/cli.mjs +18 -0
- package/dist/config.mjs +19 -3
- package/dist/css-values.mjs +26 -0
- package/dist/index.mjs +2 -0
- package/dist/init.mjs +1 -1
- package/dist/mcp/build-status.mjs +10 -3
- package/dist/mcp/catalog.mjs +11 -8
- package/dist/mcp/context.mjs +2 -2
- package/dist/mcp/mutations.mjs +11 -1
- package/dist/mcp/preview-owner-guard.mjs +29 -0
- package/dist/mcp/preview-watch.mjs +28 -4
- package/dist/mcp/preview-widget.bundle.js +2 -2
- package/dist/mcp/prompts.mjs +3 -3
- package/dist/mcp/server.mjs +61 -24
- package/dist/mcp/showcase-host.mjs +9 -5
- package/dist/oxlint.mjs +1 -1
- package/dist/public-api.mjs +39 -0
- package/dist/scenarios-compiler.mjs +17 -2
- package/dist/scenarios.mjs +27 -39
- package/dist/skills/README.md +3 -3
- package/dist/skills/ads-break-ui/SKILL.md +48 -4
- package/dist/skills/ads-designer/SKILL.md +49 -5
- package/dist/skills/ads-designer/assets/bootstrap-ds/ADS.md +7 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/controllers/.gitkeep +0 -0
- package/dist/skills/ads-designer/references/cli.md +1 -1
- package/dist/skills/ads-designer/references/design-craft.md +1 -1
- package/dist/skills/ads-import/SKILL.md +48 -4
- package/dist/skills/ads-import/references/cli.md +1 -1
- package/dist/skills/{ads-assimilate → ads-migrate}/SKILL.md +54 -10
- package/dist/skills/ads-migrate/agents/openai.yaml +4 -0
- package/dist/skills/{ads-assimilate → ads-migrate}/references/cli.md +1 -1
- package/dist/skills/{ads-assimilate → ads-migrate}/references/native-implementation.md +27 -0
- package/dist/skills/ads-motion/SKILL.md +48 -4
- package/dist/style-boundaries.mjs +59 -0
- package/dist/tokens.mjs +3 -2
- package/dist/units.mjs +56 -9
- package/dist/verification/browser.mjs +27 -0
- package/dist/verification/playwright-reporter.cjs +20 -0
- package/dist/verification.mjs +214 -0
- package/docs/ADS.md +32 -3
- package/docs/ARCHITECTURE.md +45 -4
- package/docs/BEHAVIORS.md +230 -0
- package/docs/CHANGELOG.md +48 -0
- package/docs/GUIDE.md +25 -1
- package/docs/MCP.md +76 -7
- package/package.json +4 -2
- package/dist/skills/ads-assimilate/agents/openai.yaml +0 -4
- /package/dist/skills/{ads-assimilate → ads-migrate}/references/lint-and-docs.md +0 -0
- /package/dist/skills/{ads-assimilate → ads-migrate}/references/testing.md +0 -0
|
@@ -30,7 +30,11 @@ unrelated statements. Its real re-export may accompany removal of a redundant
|
|
|
30
30
|
`export {};` placeholder; do not add empty exports. A `tokens` manifest lists the foundation
|
|
31
31
|
entry in `companionFiles`: when creating/deleting a canonical token file such as
|
|
32
32
|
`fonts.css`, include only its required import change there in the same patch.
|
|
33
|
-
Preserve other imports/comments and the canonical order.
|
|
33
|
+
Preserve other imports/comments and the canonical order. Runtime owner manifests
|
|
34
|
+
also list a `ds.config.json` companion: change only that owner's `inlineStyleFiles`
|
|
35
|
+
and `boundaries.styleWrites` entries together with its source. Unused permissions
|
|
36
|
+
fail the core checks; do not pre-register a boundary without its implementation.
|
|
37
|
+
Use `dryRun: true` to
|
|
34
38
|
inspect validation; applying re-runs the gates. Fix rejected patches in their
|
|
35
39
|
owner. Report unsupported coupled changes instead of bypassing a rejection with
|
|
36
40
|
direct source writes. Shared styles/helpers use `foundation`, root guides use
|
|
@@ -42,6 +46,23 @@ ADS gates. For binary/large assets, generate `git diff --binary --full-index` in
|
|
|
42
46
|
stay out of model context. Binary changes require Git. When editing is disabled,
|
|
43
47
|
use the client's normal source-editing tools.
|
|
44
48
|
|
|
49
|
+
|
|
50
|
+
Controllers are UI behavior owners: private helpers stay with their component or
|
|
51
|
+
pattern; reusable controllers use discovered `controllers/<Name>` units. Use the
|
|
52
|
+
project's configured framework and declared dependencies, or plain TypeScript,
|
|
53
|
+
browser APIs and local helpers. MCP hosts supply no ad hoc runtime APIs. The
|
|
54
|
+
framework setting selects compilation/mounting; controller checks also validate
|
|
55
|
+
imports. For controller/behavior work, read `ads://guides/behaviors` (offline:
|
|
56
|
+
the installed ADS package's `docs/BEHAVIORS.md`). Discover registered guarantees
|
|
57
|
+
with `ads_behaviors`; use `ads_verify` for selected real checks. Optional
|
|
58
|
+
`exercises` links public behavioral APIs to scenarios; keep `covers` for rendered
|
|
59
|
+
UI. Registration and demonstration are not passing evidence. `behavior.json`,
|
|
60
|
+
scenarios, fixtures and checks stay out of production exports/imports. Verify
|
|
61
|
+
current results, including lifecycle setup/cleanup/setup and the actual browser
|
|
62
|
+
profile when promised. React StrictMode needs a development harness; wrapping a
|
|
63
|
+
production widget cannot replay development effects. Keep dynamic behavior and
|
|
64
|
+
capabilities intact rather than rewriting them only for static coverage.
|
|
65
|
+
|
|
45
66
|
Before trusting a preview after edits, check `ads_status.build` or
|
|
46
67
|
`ads://project/build`. Fix build diagnostics in owned source; an older view or
|
|
47
68
|
unreported freshness is not evidence of current code. Notifications may not
|
|
@@ -193,6 +214,15 @@ source definitions and values; inspecting definitions does not prove UI parity.
|
|
|
193
214
|
The tool keeps the shared naming contract; sample templates and their token
|
|
194
215
|
lists belong to the project.
|
|
195
216
|
|
|
217
|
+
A public review pattern may be covered by real token or composition scenarios;
|
|
218
|
+
it needs no redundant standalone entry. Remove an optional scenario only while
|
|
219
|
+
retaining reachable render coverage. Keep directory ownership anchored by its
|
|
220
|
+
runtime entry (`index` or a file matching the directory name) or colocated fixture.
|
|
221
|
+
Import colocated image/font fixtures so MCP serves them through asset resources.
|
|
222
|
+
For a broken-image case, use a local failing fixture, rather than an external
|
|
223
|
+
network failure or a domain-specific CSP exception. Production asset APIs remain
|
|
224
|
+
unrestricted by this fixture guidance.
|
|
225
|
+
|
|
196
226
|
Scenarios, colocated fixtures and helpers are development-only. Never export them
|
|
197
227
|
from the runtime barrel or import them in production, including through aliases,
|
|
198
228
|
re-exports or dynamic imports. They may not import application stores, routers,
|
|
@@ -210,8 +240,15 @@ normalization; and global focus indicators/reduced-motion rules. Every selector
|
|
|
210
240
|
branch, property and value must fit its role. Token-backed control skins, layout,
|
|
211
241
|
interactive state rules and owner hooks are rejected even through `:where()`.
|
|
212
242
|
Do not copy an unchecked upstream preflight or turn a component repair into a reset.
|
|
213
|
-
|
|
214
|
-
|
|
243
|
+
Keep behavior and skin in their runtime owner. Put demo-only sizing and framing
|
|
244
|
+
in a public review/layout pattern; add component props for a deliberate runtime
|
|
245
|
+
API need. Preserve required capabilities while following ownership rules.
|
|
246
|
+
Use tokens for absolute/font-relative lengths, including `ch`, `ex`, `cap`, `ic`
|
|
247
|
+
and `lh`; calculations and fallback values follow the same rule. Structural
|
|
248
|
+
angle units remain available for orientation, skew and spin. Put tunable visual
|
|
249
|
+
angles in project tokens; static checks cannot infer that intent. Percentages,
|
|
250
|
+
grid fractions and viewport/container relationships retain structural use.
|
|
251
|
+
Browser review still verifies the effects.
|
|
215
252
|
|
|
216
253
|
Invalid metadata and source failures keep the managed compiler alive for repairs.
|
|
217
254
|
Read `ads_status.build` or `ads://project/build`, fix the owner, then wait for current
|
|
@@ -229,7 +266,14 @@ scoped `oxlint.overrides` for justified file-specific settings; never edit
|
|
|
229
266
|
`.ds/oxlintrc.json`. These overrides configure Oxlint, not the independent
|
|
230
267
|
architecture checks in `ads check`. Measured renderer properties and documented
|
|
231
268
|
non-state hooks use explicit `boundaries`; shared token writes and primitive
|
|
232
|
-
state overrides cannot be allowlisted.
|
|
269
|
+
state overrides cannot be allowlisted. When migrating JSX inline geometry to
|
|
270
|
+
imperative writes, port the source and replace its own boundary entries together
|
|
271
|
+
in the owner's patch. Remove obsolete `inlineStyleFiles` entries and unused
|
|
272
|
+
`styleWrites` properties; do not broaden permissions to keep a migration passing.
|
|
273
|
+
Pointer-capture advisories call for review of cancellation, capture loss and
|
|
274
|
+
teardown, including cleanup delegated to hooks. Verify actual cleanup in a browser;
|
|
275
|
+
a locally present handler alone does not prove correctness.
|
|
276
|
+
Add generic architectural protections to
|
|
233
277
|
ADS core and keep domain/component-specific rules registered in project setup.
|
|
234
278
|
|
|
235
279
|
Read [references/verification.md](references/verification.md) for viewport,
|
|
@@ -62,7 +62,11 @@ unrelated statements. Its real re-export may accompany removal of a redundant
|
|
|
62
62
|
`export {};` placeholder; do not add empty exports. A `tokens` manifest lists the foundation
|
|
63
63
|
entry in `companionFiles`: when creating/deleting a canonical token file such as
|
|
64
64
|
`fonts.css`, include only its required import change there in the same patch.
|
|
65
|
-
Preserve other imports/comments and the canonical order.
|
|
65
|
+
Preserve other imports/comments and the canonical order. Runtime owner manifests
|
|
66
|
+
also list a `ds.config.json` companion: change only that owner's `inlineStyleFiles`
|
|
67
|
+
and `boundaries.styleWrites` entries together with its source. Unused permissions
|
|
68
|
+
fail the core checks; do not pre-register a boundary without its implementation.
|
|
69
|
+
Use `dryRun: true` to
|
|
66
70
|
inspect validation; applying re-runs the gates. Fix rejected patches in their
|
|
67
71
|
owner. Report unsupported coupled changes instead of bypassing a rejection with
|
|
68
72
|
direct source writes. Shared styles/helpers use `foundation`, root guides use
|
|
@@ -74,6 +78,23 @@ ADS gates. For binary/large assets, generate `git diff --binary --full-index` in
|
|
|
74
78
|
stay out of model context. Binary changes require Git. When editing is disabled,
|
|
75
79
|
use the client's normal source-editing tools.
|
|
76
80
|
|
|
81
|
+
Controllers are UI behavior owners: private helpers stay with their component or
|
|
82
|
+
pattern; reusable controllers use discovered `controllers/<Name>` units. Use the
|
|
83
|
+
project's configured framework and declared dependencies, or plain TypeScript,
|
|
84
|
+
browser APIs and local helpers. MCP hosts supply no ad hoc runtime APIs. The
|
|
85
|
+
framework setting selects compilation/mounting; controller checks also validate
|
|
86
|
+
imports. For controller/behavior work, read `ads://guides/behaviors` (offline:
|
|
87
|
+
the installed ADS package's `docs/BEHAVIORS.md`). Discover registered guarantees
|
|
88
|
+
with `ads_behaviors`; use `ads_verify` for selected real checks. Optional
|
|
89
|
+
`exercises` links public behavioral APIs to scenarios; keep `covers` for rendered
|
|
90
|
+
UI. Registration and demonstration are not passing evidence. `behavior.json`,
|
|
91
|
+
scenarios, fixtures and checks stay out of production exports/imports. Verify
|
|
92
|
+
current results, including lifecycle setup/cleanup/setup and the actual browser
|
|
93
|
+
profile when promised. React StrictMode needs a development harness; wrapping a
|
|
94
|
+
production widget cannot replay development effects. Keep dynamic behavior and
|
|
95
|
+
capabilities intact rather than rewriting them only for static coverage.
|
|
96
|
+
|
|
97
|
+
|
|
77
98
|
Check `ads_status.previewWatch` before launching another preview builder. With a
|
|
78
99
|
managed watcher, edit owned sources, wait for the rebuild and invoke the preview
|
|
79
100
|
again; the client already starts and stops the builder through `ads mcp`. Check
|
|
@@ -149,7 +170,7 @@ Do not assume it has a particular component, hook, font, or token helper.
|
|
|
149
170
|
Record the source revision and required dependencies.
|
|
150
171
|
|
|
151
172
|
Use the ADS import workflow to bring selected existing ADS items into the target,
|
|
152
|
-
or
|
|
173
|
+
or migration to create a native component from an upstream library. Follow
|
|
153
174
|
those workflows directly if the corresponding skills are unavailable: copy
|
|
154
175
|
selected source and its dependency closure, or study/reproduce the upstream
|
|
155
176
|
contract; integrate local ownership, exports, styles, assets, credits, applicable
|
|
@@ -331,6 +352,15 @@ source definitions and values; inspecting definitions does not prove UI parity.
|
|
|
331
352
|
The tool keeps the shared naming contract; sample templates and their token
|
|
332
353
|
lists belong to the project.
|
|
333
354
|
|
|
355
|
+
A public review pattern may be covered by real token or composition scenarios;
|
|
356
|
+
it needs no redundant standalone entry. Remove an optional scenario only while
|
|
357
|
+
retaining reachable render coverage. Keep directory ownership anchored by its
|
|
358
|
+
runtime entry (`index` or a file matching the directory name) or colocated fixture.
|
|
359
|
+
Import colocated image/font fixtures so MCP serves them through asset resources.
|
|
360
|
+
For a broken-image case, use a local failing fixture, rather than an external
|
|
361
|
+
network failure or a domain-specific CSP exception. Production asset APIs remain
|
|
362
|
+
unrestricted by this fixture guidance.
|
|
363
|
+
|
|
334
364
|
Scenarios, colocated fixtures and helpers are development-only. Never export them
|
|
335
365
|
from the runtime barrel or import them in production, including through aliases,
|
|
336
366
|
re-exports or dynamic imports. They may not import application stores, routers,
|
|
@@ -348,8 +378,15 @@ normalization; and global focus indicators/reduced-motion rules. Every selector
|
|
|
348
378
|
branch, property and value must fit its role. Token-backed control skins, layout,
|
|
349
379
|
interactive state rules and owner hooks are rejected even through `:where()`.
|
|
350
380
|
Do not copy an unchecked upstream preflight or turn a component repair into a reset.
|
|
351
|
-
|
|
352
|
-
|
|
381
|
+
Keep behavior and skin in their runtime owner. Put demo-only sizing and framing
|
|
382
|
+
in a public review/layout pattern; add component props for a deliberate runtime
|
|
383
|
+
API need. Preserve required capabilities while following ownership rules.
|
|
384
|
+
Use tokens for absolute/font-relative lengths, including `ch`, `ex`, `cap`, `ic`
|
|
385
|
+
and `lh`; calculations and fallback values follow the same rule. Structural
|
|
386
|
+
angle units remain available for orientation, skew and spin. Put tunable visual
|
|
387
|
+
angles in project tokens; static checks cannot infer that intent. Percentages,
|
|
388
|
+
grid fractions and viewport/container relationships retain structural use.
|
|
389
|
+
Browser review still verifies the effects.
|
|
353
390
|
|
|
354
391
|
Invalid metadata and source failures keep the managed compiler alive for repairs.
|
|
355
392
|
Read `ads_status.build` or `ads://project/build`, fix the owner, then wait for current
|
|
@@ -367,7 +404,14 @@ scoped `oxlint.overrides` for justified file-specific settings; never edit
|
|
|
367
404
|
`.ds/oxlintrc.json`. These overrides configure Oxlint, not the independent
|
|
368
405
|
architecture checks in `ads check`. Measured renderer properties and documented
|
|
369
406
|
non-state hooks use explicit `boundaries`; shared token writes and primitive
|
|
370
|
-
state overrides cannot be allowlisted.
|
|
407
|
+
state overrides cannot be allowlisted. When migrating JSX inline geometry to
|
|
408
|
+
imperative writes, port the source and replace its own boundary entries together
|
|
409
|
+
in the owner's patch. Remove obsolete `inlineStyleFiles` entries and unused
|
|
410
|
+
`styleWrites` properties; do not broaden permissions to keep a migration passing.
|
|
411
|
+
Pointer-capture advisories call for review of cancellation, capture loss and
|
|
412
|
+
teardown, including cleanup delegated to hooks. Verify actual cleanup in a browser;
|
|
413
|
+
a locally present handler alone does not prove correctness.
|
|
414
|
+
Add generic architectural protections to
|
|
371
415
|
ADS core and keep domain/component-specific rules registered in project setup.
|
|
372
416
|
|
|
373
417
|
Examples and composition scenarios must consume the same public components, patterns,
|
|
@@ -241,3 +241,10 @@ Run `npm run build` after adding or changing components. Add meaningful tests
|
|
|
241
241
|
for stateful behavior, accessibility, gestures, or async lifecycle where needed.
|
|
242
242
|
Run `npm run dev` to inspect the real showcase. A screenshot alone does not
|
|
243
243
|
verify interaction or animation. Generated output and dependencies are not source.
|
|
244
|
+
|
|
245
|
+
Shared behavior may live in `controllers/<Name>/`; private controllers stay with
|
|
246
|
+
their component/pattern. Use the configured framework and declared dependencies.
|
|
247
|
+
Behavior contracts/checks are development-only, and scenario `exercises` links
|
|
248
|
+
public hooks to demonstrations separately from rendered `covers`. Read the
|
|
249
|
+
installed ADS package's `docs/BEHAVIORS.md` or MCP `ads://guides/behaviors` before
|
|
250
|
+
registering guarantees, profiles and verification.
|
|
File without changes
|
|
@@ -102,7 +102,7 @@ script but does not install the project preview compiler. Integrate its graph
|
|
|
102
102
|
compiler/mount adapter and configure `mcp.previewManifest` plus `mcp.previewWatch`;
|
|
103
103
|
then use the same foundation and Linaria extraction as the application. Source discovery,
|
|
104
104
|
selected component/pattern/style/brand imports, explicit theme-value imports, and
|
|
105
|
-
|
|
105
|
+
migration are agent workflows. There is no CLI `import` command. Core checks
|
|
106
106
|
do not copy source, import values, or establish behavior/motion parity; continue
|
|
107
107
|
project type checking, meaningful tests, and browser comparisons.
|
|
108
108
|
|
|
@@ -56,7 +56,7 @@ changing them to a generic default.
|
|
|
56
56
|
|
|
57
57
|
Keep typed props, examples, state behavior, token hooks, and important tradeoffs
|
|
58
58
|
in the item README. Record concrete upstream influences, authors, revision, and
|
|
59
|
-
applicable notices when importing or
|
|
59
|
+
applicable notices when importing or migrating source. Do not describe an
|
|
60
60
|
adapted implementation as independent solely because it uses native primitives.
|
|
61
61
|
|
|
62
62
|
Run the actual project's checks after changes and inspect the real consumer
|
|
@@ -26,7 +26,11 @@ unrelated statements. Its real re-export may accompany removal of a redundant
|
|
|
26
26
|
`export {};` placeholder; do not add empty exports. A `tokens` manifest lists the foundation
|
|
27
27
|
entry in `companionFiles`: when creating/deleting a canonical token file such as
|
|
28
28
|
`fonts.css`, include only its required import change there in the same patch.
|
|
29
|
-
Preserve other imports/comments and the canonical order.
|
|
29
|
+
Preserve other imports/comments and the canonical order. Runtime owner manifests
|
|
30
|
+
also list a `ds.config.json` companion: change only that owner's `inlineStyleFiles`
|
|
31
|
+
and `boundaries.styleWrites` entries together with its source. Unused permissions
|
|
32
|
+
fail the core checks; do not pre-register a boundary without its implementation.
|
|
33
|
+
Use `dryRun: true` to
|
|
30
34
|
inspect validation; applying re-runs the gates. Fix rejected patches in their
|
|
31
35
|
owner. Report unsupported coupled changes instead of bypassing a rejection with
|
|
32
36
|
direct source writes. Shared styles/helpers use `foundation`, root guides use
|
|
@@ -38,6 +42,23 @@ ADS gates. For binary/large assets, generate `git diff --binary --full-index` in
|
|
|
38
42
|
stay out of model context. Binary changes require Git. When editing is disabled,
|
|
39
43
|
use the client's normal source-editing tools.
|
|
40
44
|
|
|
45
|
+
Controllers are UI behavior owners: private helpers stay with their component or
|
|
46
|
+
pattern; reusable controllers use discovered `controllers/<Name>` units. Use the
|
|
47
|
+
project's configured framework and declared dependencies, or plain TypeScript,
|
|
48
|
+
browser APIs and local helpers. MCP hosts supply no ad hoc runtime APIs. The
|
|
49
|
+
framework setting selects compilation/mounting; controller checks also validate
|
|
50
|
+
imports. For controller/behavior work, read `ads://guides/behaviors` (offline:
|
|
51
|
+
the installed ADS package's `docs/BEHAVIORS.md`). Discover registered guarantees
|
|
52
|
+
with `ads_behaviors`; use `ads_verify` for selected real checks. Optional
|
|
53
|
+
`exercises` links public behavioral APIs to scenarios; keep `covers` for rendered
|
|
54
|
+
UI. Registration and demonstration are not passing evidence. `behavior.json`,
|
|
55
|
+
scenarios, fixtures and checks stay out of production exports/imports. Verify
|
|
56
|
+
current results, including lifecycle setup/cleanup/setup and the actual browser
|
|
57
|
+
profile when promised. React StrictMode needs a development harness; wrapping a
|
|
58
|
+
production widget cannot replay development effects. Keep dynamic behavior and
|
|
59
|
+
capabilities intact rather than rewriting them only for static coverage.
|
|
60
|
+
|
|
61
|
+
|
|
41
62
|
Before trusting a preview after edits, check `ads_status.build` or
|
|
42
63
|
`ads://project/build`. Fix build diagnostics in owned source; an older view or
|
|
43
64
|
unreported freshness is not evidence of current code. Notifications may not
|
|
@@ -298,6 +319,15 @@ source definitions and values; inspecting definitions does not prove UI parity.
|
|
|
298
319
|
The tool keeps the shared naming contract; sample templates and their token
|
|
299
320
|
lists belong to the project.
|
|
300
321
|
|
|
322
|
+
A public review pattern may be covered by real token or composition scenarios;
|
|
323
|
+
it needs no redundant standalone entry. Remove an optional scenario only while
|
|
324
|
+
retaining reachable render coverage. Keep directory ownership anchored by its
|
|
325
|
+
runtime entry (`index` or a file matching the directory name) or colocated fixture.
|
|
326
|
+
Import colocated image/font fixtures so MCP serves them through asset resources.
|
|
327
|
+
For a broken-image case, use a local failing fixture, rather than an external
|
|
328
|
+
network failure or a domain-specific CSP exception. Production asset APIs remain
|
|
329
|
+
unrestricted by this fixture guidance.
|
|
330
|
+
|
|
301
331
|
Scenarios, colocated fixtures and helpers are development-only. Never export them
|
|
302
332
|
from the runtime barrel or import them in production, including through aliases,
|
|
303
333
|
re-exports or dynamic imports. They may not import application stores, routers,
|
|
@@ -315,8 +345,15 @@ normalization; and global focus indicators/reduced-motion rules. Every selector
|
|
|
315
345
|
branch, property and value must fit its role. Token-backed control skins, layout,
|
|
316
346
|
interactive state rules and owner hooks are rejected even through `:where()`.
|
|
317
347
|
Do not copy an unchecked upstream preflight or turn a component repair into a reset.
|
|
318
|
-
|
|
319
|
-
|
|
348
|
+
Keep behavior and skin in their runtime owner. Put demo-only sizing and framing
|
|
349
|
+
in a public review/layout pattern; add component props for a deliberate runtime
|
|
350
|
+
API need. Preserve required capabilities while following ownership rules.
|
|
351
|
+
Use tokens for absolute/font-relative lengths, including `ch`, `ex`, `cap`, `ic`
|
|
352
|
+
and `lh`; calculations and fallback values follow the same rule. Structural
|
|
353
|
+
angle units remain available for orientation, skew and spin. Put tunable visual
|
|
354
|
+
angles in project tokens; static checks cannot infer that intent. Percentages,
|
|
355
|
+
grid fractions and viewport/container relationships retain structural use.
|
|
356
|
+
Browser review still verifies the effects.
|
|
320
357
|
|
|
321
358
|
Invalid metadata and source failures keep the managed compiler alive for repairs.
|
|
322
359
|
Read `ads_status.build` or `ads://project/build`, fix the owner, then wait for current
|
|
@@ -334,7 +371,14 @@ scoped `oxlint.overrides` for justified file-specific settings; never edit
|
|
|
334
371
|
`.ds/oxlintrc.json`. These overrides configure Oxlint, not the independent
|
|
335
372
|
architecture checks in `ads check`. Measured renderer properties and documented
|
|
336
373
|
non-state hooks use explicit `boundaries`; shared token writes and primitive
|
|
337
|
-
state overrides cannot be allowlisted.
|
|
374
|
+
state overrides cannot be allowlisted. When migrating JSX inline geometry to
|
|
375
|
+
imperative writes, port the source and replace its own boundary entries together
|
|
376
|
+
in the owner's patch. Remove obsolete `inlineStyleFiles` entries and unused
|
|
377
|
+
`styleWrites` properties; do not broaden permissions to keep a migration passing.
|
|
378
|
+
Pointer-capture advisories call for review of cancellation, capture loss and
|
|
379
|
+
teardown, including cleanup delegated to hooks. Verify actual cleanup in a browser;
|
|
380
|
+
a locally present handler alone does not prove correctness.
|
|
381
|
+
Add generic architectural protections to
|
|
338
382
|
ADS core and keep domain/component-specific rules registered in project setup.
|
|
339
383
|
|
|
340
384
|
Write or update the imported item's local README with public usage, required
|
|
@@ -102,7 +102,7 @@ script but does not install the project preview compiler. Integrate its graph
|
|
|
102
102
|
compiler/mount adapter and configure `mcp.previewManifest` plus `mcp.previewWatch`;
|
|
103
103
|
then use the same foundation and Linaria extraction as the application. Source discovery,
|
|
104
104
|
selected component/pattern/style/brand imports, explicit theme-value imports, and
|
|
105
|
-
|
|
105
|
+
migration are agent workflows. There is no CLI `import` command. Core checks
|
|
106
106
|
do not copy source, import values, or establish behavior/motion parity; continue
|
|
107
107
|
project type checking, meaningful tests, and browser comparisons.
|
|
108
108
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: ads-
|
|
3
|
-
description: "Implement or refine a native design-system component from a component-library URL, studying the original implementation and verifying behavior, visuals, and motion against the real reference. Use for component
|
|
2
|
+
name: ads-migrate
|
|
3
|
+
description: "Implement or refine a native design-system component from a component-library URL, studying the original implementation and verifying behavior, visuals, and motion against the real reference. Use for component migration, including local documentation and justified usage lint rules; not for simply installing or wrapping a dependency."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# ADS
|
|
6
|
+
# ADS Migrate
|
|
7
7
|
|
|
8
8
|
When ADS MCP is connected, discover public UI and addressable scenarios with
|
|
9
9
|
`ads_status`/`ads_catalog`; use `ads_tokens` for definitions and values, and
|
|
@@ -27,7 +27,11 @@ unrelated statements. Its real re-export may accompany removal of a redundant
|
|
|
27
27
|
`export {};` placeholder; do not add empty exports. A `tokens` manifest lists the foundation
|
|
28
28
|
entry in `companionFiles`: when creating/deleting a canonical token file such as
|
|
29
29
|
`fonts.css`, include only its required import change there in the same patch.
|
|
30
|
-
Preserve other imports/comments and the canonical order.
|
|
30
|
+
Preserve other imports/comments and the canonical order. Runtime owner manifests
|
|
31
|
+
also list a `ds.config.json` companion: change only that owner's `inlineStyleFiles`
|
|
32
|
+
and `boundaries.styleWrites` entries together with its source. Unused permissions
|
|
33
|
+
fail the core checks; do not pre-register a boundary without its implementation.
|
|
34
|
+
Use `dryRun: true` to
|
|
31
35
|
inspect validation; applying re-runs the gates. Fix rejected patches in their
|
|
32
36
|
owner. Report unsupported coupled changes instead of bypassing a rejection with
|
|
33
37
|
direct source writes. Shared styles/helpers use `foundation`, root guides use
|
|
@@ -39,6 +43,23 @@ ADS gates. For binary/large assets, generate `git diff --binary --full-index` in
|
|
|
39
43
|
stay out of model context. Binary changes require Git. When editing is disabled,
|
|
40
44
|
use the client's normal source-editing tools.
|
|
41
45
|
|
|
46
|
+
|
|
47
|
+
Controllers are UI behavior owners: private helpers stay with their component or
|
|
48
|
+
pattern; reusable controllers use discovered `controllers/<Name>` units. Use the
|
|
49
|
+
project's configured framework and declared dependencies, or plain TypeScript,
|
|
50
|
+
browser APIs and local helpers. MCP hosts supply no ad hoc runtime APIs. The
|
|
51
|
+
framework setting selects compilation/mounting; controller checks also validate
|
|
52
|
+
imports. For controller/behavior work, read `ads://guides/behaviors` (offline:
|
|
53
|
+
the installed ADS package's `docs/BEHAVIORS.md`). Discover registered guarantees
|
|
54
|
+
with `ads_behaviors`; use `ads_verify` for selected real checks. Optional
|
|
55
|
+
`exercises` links public behavioral APIs to scenarios; keep `covers` for rendered
|
|
56
|
+
UI. Registration and demonstration are not passing evidence. `behavior.json`,
|
|
57
|
+
scenarios, fixtures and checks stay out of production exports/imports. Verify
|
|
58
|
+
current results, including lifecycle setup/cleanup/setup and the actual browser
|
|
59
|
+
profile when promised. React StrictMode needs a development harness; wrapping a
|
|
60
|
+
production widget cannot replay development effects. Keep dynamic behavior and
|
|
61
|
+
capabilities intact rather than rewriting them only for static coverage.
|
|
62
|
+
|
|
42
63
|
Before trusting a preview after edits, check `ads_status.build` or
|
|
43
64
|
`ads://project/build`. Fix build diagnostics in owned source; an older view or
|
|
44
65
|
unreported freshness is not evidence of current code. Notifications may not
|
|
@@ -71,8 +92,8 @@ workflows. Do not look for a built-in or optional UI catalogue in the tool.
|
|
|
71
92
|
Invocation accepts a library/repository/documentation URL as its first argument:
|
|
72
93
|
|
|
73
94
|
```text
|
|
74
|
-
$ads-
|
|
75
|
-
$ads-
|
|
95
|
+
$ads-migrate <library-url> [component-name] [requirements]
|
|
96
|
+
$ads-migrate https://github.com/emilkowalski/sonner toast
|
|
76
97
|
```
|
|
77
98
|
|
|
78
99
|
The URL is the required reference, not a request to install the library into the
|
|
@@ -143,7 +164,7 @@ the scenario; larger entries belong under `composition/`. Browsing pages only
|
|
|
143
164
|
select these entries. The scenario labels, controls and review layouts are public ADS entities with defined
|
|
144
165
|
APIs. The outer shell belongs to the tool client. Showcase/scenario files define no CSS, custom classes, or widget markup.
|
|
145
166
|
Change the owning ADS pattern when a frame layout is missing; do not recreate
|
|
146
|
-
the
|
|
167
|
+
the migrated UI there or override its internals.
|
|
147
168
|
|
|
148
169
|
The showcase is a minimal shell plus an MCP client and Apps host, supplied by ADS
|
|
149
170
|
tooling. It discovers Tokens/Components/Patterns/Composition entries through MCP
|
|
@@ -241,6 +262,15 @@ source definitions and values; inspecting definitions does not prove UI parity.
|
|
|
241
262
|
The tool keeps the shared naming contract; sample templates and their token
|
|
242
263
|
lists belong to the project.
|
|
243
264
|
|
|
265
|
+
A public review pattern may be covered by real token or composition scenarios;
|
|
266
|
+
it needs no redundant standalone entry. Remove an optional scenario only while
|
|
267
|
+
retaining reachable render coverage. Keep directory ownership anchored by its
|
|
268
|
+
runtime entry (`index` or a file matching the directory name) or colocated fixture.
|
|
269
|
+
Import colocated image/font fixtures so MCP serves them through asset resources.
|
|
270
|
+
For a broken-image case, use a local failing fixture, rather than an external
|
|
271
|
+
network failure or a domain-specific CSP exception. Production asset APIs remain
|
|
272
|
+
unrestricted by this fixture guidance.
|
|
273
|
+
|
|
244
274
|
Scenarios, colocated fixtures and helpers are development-only. Never export them
|
|
245
275
|
from the runtime barrel or import them in production, including through aliases,
|
|
246
276
|
re-exports or dynamic imports. They may not import application stores, routers,
|
|
@@ -258,8 +288,15 @@ normalization; and global focus indicators/reduced-motion rules. Every selector
|
|
|
258
288
|
branch, property and value must fit its role. Token-backed control skins, layout,
|
|
259
289
|
interactive state rules and owner hooks are rejected even through `:where()`.
|
|
260
290
|
Do not copy an unchecked upstream preflight or turn a component repair into a reset.
|
|
261
|
-
|
|
262
|
-
|
|
291
|
+
Keep behavior and skin in their runtime owner. Put demo-only sizing and framing
|
|
292
|
+
in a public review/layout pattern; add component props for a deliberate runtime
|
|
293
|
+
API need. Preserve required capabilities while following ownership rules.
|
|
294
|
+
Use tokens for absolute/font-relative lengths, including `ch`, `ex`, `cap`, `ic`
|
|
295
|
+
and `lh`; calculations and fallback values follow the same rule. Structural
|
|
296
|
+
angle units remain available for orientation, skew and spin. Put tunable visual
|
|
297
|
+
angles in project tokens; static checks cannot infer that intent. Percentages,
|
|
298
|
+
grid fractions and viewport/container relationships retain structural use.
|
|
299
|
+
Browser review still verifies the effects.
|
|
263
300
|
|
|
264
301
|
Invalid metadata and source failures keep the managed compiler alive for repairs.
|
|
265
302
|
Read `ads_status.build` or `ads://project/build`, fix the owner, then wait for current
|
|
@@ -277,7 +314,14 @@ scoped `oxlint.overrides` for justified file-specific settings; never edit
|
|
|
277
314
|
`.ds/oxlintrc.json`. These overrides configure Oxlint, not the independent
|
|
278
315
|
architecture checks in `ads check`. Measured renderer properties and documented
|
|
279
316
|
non-state hooks use explicit `boundaries`; shared token writes and primitive
|
|
280
|
-
state overrides cannot be allowlisted.
|
|
317
|
+
state overrides cannot be allowlisted. When migrating JSX inline geometry to
|
|
318
|
+
imperative writes, port the source and replace its own boundary entries together
|
|
319
|
+
in the owner's patch. Remove obsolete `inlineStyleFiles` entries and unused
|
|
320
|
+
`styleWrites` properties; do not broaden permissions to keep a migration passing.
|
|
321
|
+
Pointer-capture advisories call for review of cancellation, capture loss and
|
|
322
|
+
teardown, including cleanup delegated to hooks. Verify actual cleanup in a browser;
|
|
323
|
+
a locally present handler alone does not prove correctness.
|
|
324
|
+
Add generic architectural protections to
|
|
281
325
|
ADS core and keep domain/component-specific rules registered in project setup.
|
|
282
326
|
|
|
283
327
|
Update meaningful variants, states, content, themes, and container sizes in the
|
|
@@ -102,7 +102,7 @@ script but does not install the project preview compiler. Integrate its graph
|
|
|
102
102
|
compiler/mount adapter and configure `mcp.previewManifest` plus `mcp.previewWatch`;
|
|
103
103
|
then use the same foundation and Linaria extraction as the application. Source discovery,
|
|
104
104
|
selected component/pattern/style/brand imports, explicit theme-value imports, and
|
|
105
|
-
|
|
105
|
+
migration are agent workflows. There is no CLI `import` command. Core checks
|
|
106
106
|
do not copy source, import values, or establish behavior/motion parity; continue
|
|
107
107
|
project type checking, meaningful tests, and browser comparisons.
|
|
108
108
|
|
|
@@ -55,6 +55,22 @@ target framework. With the default root ADS layout:
|
|
|
55
55
|
dimensions, positions, or transforms. Document and constrain the exception in
|
|
56
56
|
the shared architecture guard; never broaden it to arbitrary visual styles.
|
|
57
57
|
|
|
58
|
+
Preserve the reference's required capabilities while assigning each concern to
|
|
59
|
+
its owner. Demo utilities for container size, border or framing become a public
|
|
60
|
+
review/layout pattern around the real component. Add component props for a
|
|
61
|
+
deliberate runtime API requirement; missing demo layout alone is not justification.
|
|
62
|
+
For imperative geometry, register exact `styleWrites` properties. After migrating
|
|
63
|
+
from JSX inline geometry, change source and its own config companion together:
|
|
64
|
+
remove the obsolete `inlineStyleFiles` exception and register only properties the
|
|
65
|
+
implementation actually writes. Verify the final component with that boundary.
|
|
66
|
+
|
|
67
|
+
Keep presentational building blocks independent of an unnecessary form controller
|
|
68
|
+
or other state engine. Scenario adapters may own demo state and validation. When
|
|
69
|
+
a reusable controller is part of the intended product API, define and test its
|
|
70
|
+
actual contract; a similar method shape alone does not establish compatibility
|
|
71
|
+
with the reference library. Keep state updaters pure and verify submit, focus,
|
|
72
|
+
validation, reset and asynchronous behavior that the API promises.
|
|
73
|
+
|
|
58
74
|
Use current repository conventions in another target rather than assuming the
|
|
59
75
|
same framework, directory structure, or lint tooling.
|
|
60
76
|
|
|
@@ -96,3 +112,14 @@ README and in a References and credits section in the component-local README.
|
|
|
96
112
|
Link the library and the actual source/docs/articles studied, identify the
|
|
97
113
|
version or commit, name the authors, and explain the concrete influences.
|
|
98
114
|
Document material adaptations and agreed deviations beside the public contract.
|
|
115
|
+
|
|
116
|
+
## Behavioral evidence
|
|
117
|
+
|
|
118
|
+
Keep private controllers in their owner; extract a shared controller only for a
|
|
119
|
+
real reuse need. Register optional behavior guarantees and real colocated checks;
|
|
120
|
+
see `ads://guides/behaviors` or the installed package's `docs/BEHAVIORS.md`. Link
|
|
121
|
+
public hooks with scenario `exercises`, while `covers` still requires rendered UI.
|
|
122
|
+
Move reviewed scratchpad investigations into maintained owner checks. Disabling
|
|
123
|
+
StrictMode can isolate an upstream lifecycle defect; keep a development StrictMode
|
|
124
|
+
check and verify the native port's setup/cleanup/setup independently. Use first-
|
|
125
|
+
render browser cases for lazy intrinsic sizing, retaining offscreen rendering.
|
|
@@ -47,7 +47,11 @@ unrelated statements. Its real re-export may accompany removal of a redundant
|
|
|
47
47
|
`export {};` placeholder; do not add empty exports. A `tokens` manifest lists the foundation
|
|
48
48
|
entry in `companionFiles`: when creating/deleting a canonical token file such as
|
|
49
49
|
`fonts.css`, include only its required import change there in the same patch.
|
|
50
|
-
Preserve other imports/comments and the canonical order.
|
|
50
|
+
Preserve other imports/comments and the canonical order. Runtime owner manifests
|
|
51
|
+
also list a `ds.config.json` companion: change only that owner's `inlineStyleFiles`
|
|
52
|
+
and `boundaries.styleWrites` entries together with its source. Unused permissions
|
|
53
|
+
fail the core checks; do not pre-register a boundary without its implementation.
|
|
54
|
+
Use `dryRun: true` to
|
|
51
55
|
inspect validation; applying re-runs the gates. Fix rejected patches in their
|
|
52
56
|
owner. Report unsupported coupled changes instead of bypassing a rejection with
|
|
53
57
|
direct source writes. Shared styles/helpers use `foundation`, root guides use
|
|
@@ -59,6 +63,23 @@ ADS gates. For binary/large assets, generate `git diff --binary --full-index` in
|
|
|
59
63
|
stay out of model context. Binary changes require Git. When editing is disabled,
|
|
60
64
|
use the client's normal source-editing tools.
|
|
61
65
|
|
|
66
|
+
|
|
67
|
+
Controllers are UI behavior owners: private helpers stay with their component or
|
|
68
|
+
pattern; reusable controllers use discovered `controllers/<Name>` units. Use the
|
|
69
|
+
project's configured framework and declared dependencies, or plain TypeScript,
|
|
70
|
+
browser APIs and local helpers. MCP hosts supply no ad hoc runtime APIs. The
|
|
71
|
+
framework setting selects compilation/mounting; controller checks also validate
|
|
72
|
+
imports. For controller/behavior work, read `ads://guides/behaviors` (offline:
|
|
73
|
+
the installed ADS package's `docs/BEHAVIORS.md`). Discover registered guarantees
|
|
74
|
+
with `ads_behaviors`; use `ads_verify` for selected real checks. Optional
|
|
75
|
+
`exercises` links public behavioral APIs to scenarios; keep `covers` for rendered
|
|
76
|
+
UI. Registration and demonstration are not passing evidence. `behavior.json`,
|
|
77
|
+
scenarios, fixtures and checks stay out of production exports/imports. Verify
|
|
78
|
+
current results, including lifecycle setup/cleanup/setup and the actual browser
|
|
79
|
+
profile when promised. React StrictMode needs a development harness; wrapping a
|
|
80
|
+
production widget cannot replay development effects. Keep dynamic behavior and
|
|
81
|
+
capabilities intact rather than rewriting them only for static coverage.
|
|
82
|
+
|
|
62
83
|
Before trusting a preview after edits, check `ads_status.build` or
|
|
63
84
|
`ads://project/build`. Fix build diagnostics in owned source; an older view or
|
|
64
85
|
unreported freshness is not evidence of current code. Notifications may not
|
|
@@ -188,6 +209,15 @@ source definitions and values; inspecting definitions does not prove UI parity.
|
|
|
188
209
|
The tool keeps the shared naming contract; sample templates and their token
|
|
189
210
|
lists belong to the project.
|
|
190
211
|
|
|
212
|
+
A public review pattern may be covered by real token or composition scenarios;
|
|
213
|
+
it needs no redundant standalone entry. Remove an optional scenario only while
|
|
214
|
+
retaining reachable render coverage. Keep directory ownership anchored by its
|
|
215
|
+
runtime entry (`index` or a file matching the directory name) or colocated fixture.
|
|
216
|
+
Import colocated image/font fixtures so MCP serves them through asset resources.
|
|
217
|
+
For a broken-image case, use a local failing fixture, rather than an external
|
|
218
|
+
network failure or a domain-specific CSP exception. Production asset APIs remain
|
|
219
|
+
unrestricted by this fixture guidance.
|
|
220
|
+
|
|
191
221
|
Scenarios, colocated fixtures and helpers are development-only. Never export them
|
|
192
222
|
from the runtime barrel or import them in production, including through aliases,
|
|
193
223
|
re-exports or dynamic imports. They may not import application stores, routers,
|
|
@@ -205,8 +235,15 @@ normalization; and global focus indicators/reduced-motion rules. Every selector
|
|
|
205
235
|
branch, property and value must fit its role. Token-backed control skins, layout,
|
|
206
236
|
interactive state rules and owner hooks are rejected even through `:where()`.
|
|
207
237
|
Do not copy an unchecked upstream preflight or turn a component repair into a reset.
|
|
208
|
-
|
|
209
|
-
|
|
238
|
+
Keep behavior and skin in their runtime owner. Put demo-only sizing and framing
|
|
239
|
+
in a public review/layout pattern; add component props for a deliberate runtime
|
|
240
|
+
API need. Preserve required capabilities while following ownership rules.
|
|
241
|
+
Use tokens for absolute/font-relative lengths, including `ch`, `ex`, `cap`, `ic`
|
|
242
|
+
and `lh`; calculations and fallback values follow the same rule. Structural
|
|
243
|
+
angle units remain available for orientation, skew and spin. Put tunable visual
|
|
244
|
+
angles in project tokens; static checks cannot infer that intent. Percentages,
|
|
245
|
+
grid fractions and viewport/container relationships retain structural use.
|
|
246
|
+
Browser review still verifies the effects.
|
|
210
247
|
|
|
211
248
|
Invalid metadata and source failures keep the managed compiler alive for repairs.
|
|
212
249
|
Read `ads_status.build` or `ads://project/build`, fix the owner, then wait for current
|
|
@@ -224,7 +261,14 @@ scoped `oxlint.overrides` for justified file-specific settings; never edit
|
|
|
224
261
|
`.ds/oxlintrc.json`. These overrides configure Oxlint, not the independent
|
|
225
262
|
architecture checks in `ads check`. Measured renderer properties and documented
|
|
226
263
|
non-state hooks use explicit `boundaries`; shared token writes and primitive
|
|
227
|
-
state overrides cannot be allowlisted.
|
|
264
|
+
state overrides cannot be allowlisted. When migrating JSX inline geometry to
|
|
265
|
+
imperative writes, port the source and replace its own boundary entries together
|
|
266
|
+
in the owner's patch. Remove obsolete `inlineStyleFiles` entries and unused
|
|
267
|
+
`styleWrites` properties; do not broaden permissions to keep a migration passing.
|
|
268
|
+
Pointer-capture advisories call for review of cancellation, capture loss and
|
|
269
|
+
teardown, including cleanup delegated to hooks. Verify actual cleanup in a browser;
|
|
270
|
+
a locally present handler alone does not prove correctness.
|
|
271
|
+
Add generic architectural protections to
|
|
228
272
|
ADS core and keep domain/component-specific rules registered in project setup.
|
|
229
273
|
|
|
230
274
|
- Motion constants belong in the project's token layer. Shared token meanings
|