@reqvire-org/ads 0.0.0-stage → 0.3.0
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/LICENSE +21 -0
- package/README.md +284 -2
- package/dist/assets.mjs +52 -0
- package/dist/bootstrap-ds/ADS.md +203 -0
- package/dist/bootstrap-ds/README.md +98 -0
- package/dist/bootstrap-ds/biome.css.json +21 -0
- package/dist/bootstrap-ds/design-system/assets/brand/README.md +28 -0
- package/dist/bootstrap-ds/design-system/assets/fonts/.gitkeep +0 -0
- package/dist/bootstrap-ds/design-system/components/.gitkeep +0 -0
- package/dist/bootstrap-ds/design-system/composition/.gitkeep +0 -0
- package/dist/bootstrap-ds/design-system/index.ts +5 -0
- package/dist/bootstrap-ds/design-system/patterns/.gitkeep +0 -0
- package/dist/bootstrap-ds/design-system/showcase/mcp/index.html +1 -0
- package/dist/bootstrap-ds/design-system/showcase/mcp/main.tsx +8 -0
- package/dist/bootstrap-ds/design-system/styles.css +5 -0
- package/dist/bootstrap-ds/design-system/tokens/Foundation.fixture.ts +47 -0
- package/dist/bootstrap-ds/design-system/tokens/Foundation.scenario.tsx +14 -0
- package/dist/bootstrap-ds/design-system/tokens/base.css +27 -0
- package/dist/bootstrap-ds/design-system/tokens/colors.css +29 -0
- package/dist/bootstrap-ds/design-system/tokens/elevation.css +15 -0
- package/dist/bootstrap-ds/design-system/tokens/spacing.css +15 -0
- package/dist/bootstrap-ds/design-system/tokens/typography.css +13 -0
- package/dist/bootstrap-ds/ds.config.json +13 -0
- package/dist/bootstrap-ds/gitignore.template +8 -0
- package/dist/bootstrap-ds/package-lock.json +4660 -0
- package/dist/bootstrap-ds/package.json +41 -0
- package/dist/bootstrap-ds/scripts/build-mcp-previews.mjs +33 -0
- package/dist/bootstrap-ds/src/vite-env.d.ts +7 -0
- package/dist/bootstrap-ds/tsconfig.build.json +12 -0
- package/dist/bootstrap-ds/tsconfig.json +20 -0
- package/dist/bootstrap-ds/vite.config.ts +21 -0
- package/dist/boundaries.mjs +130 -0
- package/dist/brand-assets.mjs +82 -0
- package/dist/check.mjs +222 -0
- package/dist/cli.mjs +106 -0
- package/dist/config.mjs +181 -0
- package/dist/contracts/tokens.json +52 -0
- package/dist/html.mjs +30 -0
- package/dist/index.mjs +9 -0
- package/dist/init.mjs +194 -0
- package/dist/lint-config.mjs +40 -0
- package/dist/mcp/THIRD_PARTY_NOTICES.md +786 -0
- package/dist/mcp/apps.mjs +53 -0
- package/dist/mcp/build-status.mjs +164 -0
- package/dist/mcp/catalog.mjs +65 -0
- package/dist/mcp/context.mjs +69 -0
- package/dist/mcp/mutations.mjs +301 -0
- package/dist/mcp/patch.mjs +114 -0
- package/dist/mcp/preview-watch.mjs +169 -0
- package/dist/mcp/preview-widget.bundle.js +113 -0
- package/dist/mcp/project-widget.bundle.js +113 -0
- package/dist/mcp/prompts.mjs +28 -0
- package/dist/mcp/resource-loader.js +138 -0
- package/dist/mcp/sandbox-host.mjs +22 -0
- package/dist/mcp/server.mjs +377 -0
- package/dist/mcp/showcase-host.mjs +68 -0
- package/dist/mcp/skills.mjs +77 -0
- package/dist/mcp/widget.bundle.js +150 -0
- package/dist/oxlint.mjs +81 -0
- package/dist/preview-resources.mjs +198 -0
- package/dist/project-documents.mjs +27 -0
- package/dist/public-props.mjs +74 -0
- package/dist/scenarios-compiler.mjs +287 -0
- package/dist/scenarios-vite.d.mts +3 -0
- package/dist/scenarios-vite.mjs +71 -0
- package/dist/scenarios.mjs +212 -0
- package/dist/showcase/client.bundle.js +127 -0
- package/dist/showcase/index.html +17 -0
- package/dist/showcase/sandbox.js +30 -0
- package/dist/showcase/style.css +7 -0
- package/dist/showcase-coverage.mjs +118 -0
- package/dist/showcase.mjs +77 -0
- package/dist/skills/README.md +68 -0
- package/dist/skills/ads-assimilate/SKILL.md +292 -0
- package/dist/skills/ads-assimilate/agents/openai.yaml +4 -0
- package/dist/skills/ads-assimilate/references/cli.md +111 -0
- package/dist/skills/ads-assimilate/references/lint-and-docs.md +87 -0
- package/dist/skills/ads-assimilate/references/native-implementation.md +98 -0
- package/dist/skills/ads-assimilate/references/testing.md +107 -0
- package/dist/skills/ads-break-ui/LICENSE.upstream +21 -0
- package/dist/skills/ads-break-ui/README.md +16 -0
- package/dist/skills/ads-break-ui/SKILL.md +235 -0
- package/dist/skills/ads-break-ui/agents/openai.yaml +4 -0
- package/dist/skills/ads-break-ui/references/catalog.md +135 -0
- package/dist/skills/ads-break-ui/references/verification.md +48 -0
- package/dist/skills/ads-designer/LICENSE.upstream +21 -0
- package/dist/skills/ads-designer/README.md +19 -0
- package/dist/skills/ads-designer/SKILL.md +400 -0
- package/dist/skills/ads-designer/agents/openai.yaml +4 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/ADS.md +203 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/README.md +98 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/biome.css.json +21 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/assets/brand/README.md +28 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/assets/fonts/.gitkeep +0 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/components/.gitkeep +0 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/composition/.gitkeep +0 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/index.ts +5 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/patterns/.gitkeep +0 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/showcase/mcp/index.html +1 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/showcase/mcp/main.tsx +8 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/styles.css +5 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/Foundation.fixture.ts +47 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/Foundation.scenario.tsx +14 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/base.css +27 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/colors.css +29 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/elevation.css +15 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/spacing.css +15 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/typography.css +13 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/ds.config.json +13 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/gitignore.template +8 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/package-lock.json +4660 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/package.json +41 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/scripts/build-mcp-previews.mjs +33 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/src/vite-env.d.ts +7 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/tsconfig.build.json +12 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/tsconfig.json +20 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/vite.config.ts +21 -0
- package/dist/skills/ads-designer/references/cli.md +111 -0
- package/dist/skills/ads-designer/references/design-craft.md +65 -0
- package/dist/skills/ads-designer/references/mobile.md +73 -0
- package/dist/skills/ads-import/SKILL.md +335 -0
- package/dist/skills/ads-import/agents/openai.yaml +4 -0
- package/dist/skills/ads-import/references/branding.md +44 -0
- package/dist/skills/ads-import/references/cli.md +111 -0
- package/dist/skills/ads-import/references/implementation.md +111 -0
- package/dist/skills/ads-import/references/tokens.md +96 -0
- package/dist/skills/ads-motion/LICENSE.upstream +21 -0
- package/dist/skills/ads-motion/README.md +22 -0
- package/dist/skills/ads-motion/SKILL.md +217 -0
- package/dist/skills/ads-motion/agents/openai.yaml +4 -0
- package/dist/skills/ads-motion/references/audit.md +44 -0
- package/dist/skills/ads-motion/references/build.md +81 -0
- package/dist/skills/ads-motion/references/performance.md +55 -0
- package/dist/skills/ads-motion/references/review.md +35 -0
- package/dist/skills/ads-motion/references/verification.md +39 -0
- package/dist/token-policy.mjs +10 -0
- package/dist/tokens.mjs +142 -0
- package/dist/ui-framework.mjs +59 -0
- package/dist/units.mjs +168 -0
- package/docs/ADS.md +310 -0
- package/docs/ARCHITECTURE.md +311 -0
- package/docs/CHANGELOG.md +106 -0
- package/docs/GUIDE.md +722 -0
- package/docs/MCP.md +690 -0
- package/package.json +107 -4
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Shared token contract and value imports
|
|
2
|
+
|
|
3
|
+
## Distinguish identity from value
|
|
4
|
+
|
|
5
|
+
A shared contract defines token names, meanings, categories, expected value types,
|
|
6
|
+
and alias relationships. Project themes supply concrete values and overrides.
|
|
7
|
+
For example, `--accent` remains the accent-color token when one project uses
|
|
8
|
+
rose and another uses blue. That value difference does not require a new token
|
|
9
|
+
name, a namespace, or a conflict prompt.
|
|
10
|
+
|
|
11
|
+
Read source/target token directories, style entries, theme definitions, typed
|
|
12
|
+
registries/helpers, and generation inputs. Follow imports outside the nominal
|
|
13
|
+
token directory. Inventory the complete shared contract, including unused names,
|
|
14
|
+
theme/media conditions, aliases, and fallback chains. Use available schema
|
|
15
|
+
metadata and documentation; infer carefully when only CSS definitions exist.
|
|
16
|
+
|
|
17
|
+
A source with different names or incompatible meanings/types needs an explicit
|
|
18
|
+
mapping to the destination contract. A color and a dimension sharing a name are
|
|
19
|
+
a real incompatibility; two colors with different values are a normal theme
|
|
20
|
+
difference. Resolve genuinely ambiguous mappings or migrations with the user.
|
|
21
|
+
Keep canonical shared names and document needed compatibility aliases. Avoid
|
|
22
|
+
creating a second source-prefixed token vocabulary as the default solution.
|
|
23
|
+
|
|
24
|
+
## Component, pattern, and style imports
|
|
25
|
+
|
|
26
|
+
Preserve every existing destination value, including starter defaults, theme
|
|
27
|
+
overrides, and value fallbacks. Source values are not imported automatically just
|
|
28
|
+
because a component uses them. Rewrite source references only when canonical
|
|
29
|
+
names differ under an agreed semantic mapping.
|
|
30
|
+
|
|
31
|
+
Synchronize missing shared definitions from the source contract. Add initial
|
|
32
|
+
values for those new names, relevant aliases/theme overrides, and typed registry
|
|
33
|
+
entries. Source defaults can initialize missing values; alias-based values should
|
|
34
|
+
resolve against the destination's existing tokens. Preserve target-only contract
|
|
35
|
+
extensions and update maintained generation inputs instead of generated files.
|
|
36
|
+
|
|
37
|
+
For a truly empty destination, introduce the initial contract and values needed
|
|
38
|
+
to use it. For an existing destination, update its registry/helpers and stylesheet
|
|
39
|
+
entry narrowly rather than replacing the entire token directory or source API.
|
|
40
|
+
Private measured component variables travel with the selected runtime component;
|
|
41
|
+
they are not shared theme values.
|
|
42
|
+
|
|
43
|
+
Reuse destination font and asset values when their tokens already exist. Copy
|
|
44
|
+
assets only when required by a new definition or selected implementation, and
|
|
45
|
+
retain applicable notices. Keep source resets and global element styling from
|
|
46
|
+
overwriting destination theme behavior during an item import.
|
|
47
|
+
|
|
48
|
+
## Explicit `tokens` mode imports values
|
|
49
|
+
|
|
50
|
+
ADS token names and prefixes are fixed. New definitions must follow the existing
|
|
51
|
+
architecture; components use `--ds-*`, patterns `--ux-*`, and owned scenario review layouts
|
|
52
|
+
`--ux-*` (`--showcase-*` is reserved, not permission for fixture CSS). Never add source-brand aliases or configurable prefix support.
|
|
53
|
+
Normalize nonconforming source references to canonical ADS names during import,
|
|
54
|
+
preserving destination values unless this mode explicitly requests changes.
|
|
55
|
+
|
|
56
|
+
`tokens` requests all source-provided values, including unused tokens and supported
|
|
57
|
+
theme/media variants. Do not ask for individual token selection. Apply those
|
|
58
|
+
values to compatible shared names, add missing definitions, and preserve target-only
|
|
59
|
+
tokens and variants that the source does not define. Brand artwork is a separate
|
|
60
|
+
`brand` selection; fonts required by imported values remain in scope. An item import can also
|
|
61
|
+
include source values when the user explicitly requests both.
|
|
62
|
+
|
|
63
|
+
This request authorizes the value changes. Do not ask again simply because an
|
|
64
|
+
existing destination value will change. Clarify only unresolved semantic/type
|
|
65
|
+
incompatibilities or genuinely ambiguous theme-scope mapping. Report the actual
|
|
66
|
+
changes and validate affected consumers.
|
|
67
|
+
|
|
68
|
+
Import aliases as value relationships, preserving their theme resolution rather
|
|
69
|
+
than flattening them to literals. Convert values to the destination format when
|
|
70
|
+
needed, including canonical reference names, units, and theme selectors. Use
|
|
71
|
+
syntax-aware edits; substring replacement can corrupt similarly named tokens.
|
|
72
|
+
Retain the destination's registry/API shape and adapt existing static value maps
|
|
73
|
+
or SSR fallbacks when they need to agree with the imported values.
|
|
74
|
+
|
|
75
|
+
Bring font declarations/assets required by the new values and resolve URLs from
|
|
76
|
+
their new owners. Preserve notices and integrate existing extraction/asset-copy
|
|
77
|
+
tooling. Value import does not require copying unrelated reset rules, global
|
|
78
|
+
element styles, theme-provider implementations, build configurations, or other
|
|
79
|
+
components. Integrate only the mechanisms necessary to apply the values correctly.
|
|
80
|
+
|
|
81
|
+
## Verify the chosen mode
|
|
82
|
+
|
|
83
|
+
For item imports, check that existing values and overrides remain unchanged,
|
|
84
|
+
missing shared definitions are represented, and all imported references resolve
|
|
85
|
+
through the canonical contract. Compare behavior/motion mechanics separately
|
|
86
|
+
from intentional destination-theme visual differences.
|
|
87
|
+
|
|
88
|
+
For value imports, account for every source-provided value and variant. Check
|
|
89
|
+
effective theme values, alias cycles/fallbacks, asset/font paths, registry/SSR
|
|
90
|
+
consistency, and stylesheet order. A CSS build can succeed while undefined custom
|
|
91
|
+
properties fall back or render incorrectly.
|
|
92
|
+
|
|
93
|
+
Run relevant target checks and inspect existing/imported consumers for text
|
|
94
|
+
metrics, spacing, colors, focus, layering, and motion where applicable. Record
|
|
95
|
+
contract additions, value-import provenance, source revision, assets/notices,
|
|
96
|
+
and significant theme effects in shared ADS documentation.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Emil Kowalski
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Credits
|
|
2
|
+
|
|
3
|
+
Adapted from [Emil Kowalski's skills](https://github.com/emilkowalski/skills),
|
|
4
|
+
revision `2d228630ba1446365f614a108cb8252f1feda202`.
|
|
5
|
+
|
|
6
|
+
| Upstream source at that revision | Material adapted here |
|
|
7
|
+
|----------------------------------|-----------------------|
|
|
8
|
+
| [animate](https://github.com/emilkowalski/skills/tree/2d228630ba1446365f614a108cb8252f1feda202/skills/animate) | Purpose/frequency, driver choice, easing/timing guidance, interaction recipes |
|
|
9
|
+
| [review-animations](https://github.com/emilkowalski/skills/tree/2d228630ba1446365f614a108cb8252f1feda202/skills/review-animations) | Review categories and before/after/why reporting |
|
|
10
|
+
| [improve-animations](https://github.com/emilkowalski/skills/tree/2d228630ba1446365f614a108cb8252f1feda202/skills/improve-animations) | Source audit and executable implementation plans |
|
|
11
|
+
| [find-animation-opportunities](https://github.com/emilkowalski/skills/tree/2d228630ba1446365f614a108cb8252f1feda202/skills/find-animation-opportunities) | Purposeful, limited recommendations grounded in existing interactions |
|
|
12
|
+
| [animation-performance](https://github.com/emilkowalski/skills/tree/2d228630ba1446365f614a108cb8252f1feda202/skills/animation-performance) and [performance cheatsheet](https://github.com/emilkowalski/skills/blob/2d228630ba1446365f614a108cb8252f1feda202/performance-cheatsheet.md) | Property/driver analysis, profiling, layout and style cost, cleanup |
|
|
13
|
+
|
|
14
|
+
The local guides adapt these workflows to project-owned ADS source, shared token
|
|
15
|
+
semantics, local motion values, public APIs, measured geometry boundaries,
|
|
16
|
+
documented exceptions, and real build/browser checks. They do not copy upstream
|
|
17
|
+
library-selection instructions or require its libraries and numeric defaults.
|
|
18
|
+
|
|
19
|
+
[LICENSE.upstream](LICENSE.upstream) retains the full MIT license and
|
|
20
|
+
Copyright (c) 2026 Emil Kowalski for copied/adapted upstream material. Keep it
|
|
21
|
+
with that material on redistribution. It does not license unrelated project
|
|
22
|
+
code or a separately studied component library.
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ads-motion
|
|
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
|
+
---
|
|
5
|
+
|
|
6
|
+
Accept a component/pattern name, file, screen, or project path and infer the mode
|
|
7
|
+
from the request. Inspect before proposing motion: read `docs/ARCHITECTURE.md` when
|
|
8
|
+
present (or the existing architecture guide), the project's ADS guide,
|
|
9
|
+
public exports, item README, motion tokens, styles, and relevant state logic.
|
|
10
|
+
Preserve its framework and existing animation stack. Author component/pattern
|
|
11
|
+
CSS motion in the required Linaria pipeline; keep dynamic geometry within the
|
|
12
|
+
project's documented boundaries.
|
|
13
|
+
|
|
14
|
+
React and native Preact are supported. Preserve the target runtime in both
|
|
15
|
+
production and scenario builds; never alias React to Preact just to shrink a
|
|
16
|
+
preview. Native Preact uses its own JSX transform, hooks and DOM events (live
|
|
17
|
+
text updates use `onInput`). Native SVG uses DOM names such as `stroke-width`,
|
|
18
|
+
not React presentation aliases. Keep Linaria extraction and the same public APIs.
|
|
19
|
+
The shipped empty starter uses React; the tool repository's working example
|
|
20
|
+
uses Preact. Neither is a component dependency of the receiving project.
|
|
21
|
+
|
|
22
|
+
ADS is tooling only. Work on project-owned source; do not install a component
|
|
23
|
+
library or animation dependency merely because an upstream example uses one.
|
|
24
|
+
Use the actual local public API for demos and tests. An empty ADS needs a defined
|
|
25
|
+
interaction/component before motion can be implemented.
|
|
26
|
+
|
|
27
|
+
## Choose the mode
|
|
28
|
+
|
|
29
|
+
When ADS MCP is connected, use `ads_status`/`ads_catalog` to find public UI, guides
|
|
30
|
+
and addressable scenarios. Registered Apps render real project fixtures, while
|
|
31
|
+
`ads_tokens` inspects motion values. Use the normal showcase for unsupported
|
|
32
|
+
host behavior and performance measurement; HTML delivery does not verify motion.
|
|
33
|
+
Resolve served skill references relative to this `SKILL.md` URI and load them
|
|
34
|
+
lazily. Ordinary instruction reads do not establish native skill activation.
|
|
35
|
+
Use the returned `projectRoot` and `project.commands`; the connected ADS may be
|
|
36
|
+
inside a different or nested repository. Inspect the selected public API, owning
|
|
37
|
+
source/available guides and relevant tokens, then mount its discovered scenario.
|
|
38
|
+
Metadata and source reads do not prove rendered behavior.
|
|
39
|
+
|
|
40
|
+
When `ads_status.mutations.enabled`, discover the owner with `ads_units`, read
|
|
41
|
+
relevant ranges with `ads_read_file` and send only a Git unified diff through
|
|
42
|
+
`ads_apply_patch({ unit, patch, dryRun })`. A unit includes its own implementation,
|
|
43
|
+
scenarios and fixtures; imported peers remain separate. `tokens` is the token
|
|
44
|
+
foundation unit. Unit discovery and file ownership are distinct from preview IDs.
|
|
45
|
+
Include only that owner's required re-exports in the public entry. Use
|
|
46
|
+
`dryRun: true` to inspect validation; applying re-runs the gates. Fix rejected
|
|
47
|
+
patches in their owner. Shared styles/helpers use `foundation`, root guides use
|
|
48
|
+
`documentation`, and branding/fonts use their discovered `assets/*` unit.
|
|
49
|
+
Intentional configuration, rule exceptions, registered guard code and compiler
|
|
50
|
+
changes use `configuration`; validate the proposed settings and keep mandatory
|
|
51
|
+
ADS gates. For binary/large assets, generate `git diff --binary --full-index` into
|
|
52
|
+
`.ds/patches/<name>.patch` and send `patchFile` instead of inline `patch`, so bytes
|
|
53
|
+
stay out of model context. Binary changes require Git. When editing is disabled,
|
|
54
|
+
use the client's normal source-editing tools.
|
|
55
|
+
|
|
56
|
+
Before trusting a preview after edits, check `ads_status.build` or
|
|
57
|
+
`ads://project/build`. Fix build diagnostics in owned source; an older view or
|
|
58
|
+
unreported freshness is not evidence of current code. Notifications may not
|
|
59
|
+
reach the agent.
|
|
60
|
+
|
|
61
|
+
| Request | Reference | Outcome |
|
|
62
|
+
|---------|-----------|---------|
|
|
63
|
+
| Build or change an animation | [build.md](references/build.md) | Implement purposeful motion in its owning component/pattern |
|
|
64
|
+
| Review existing motion | [review.md](references/review.md) | Findings grounded in source and observed behavior |
|
|
65
|
+
| Audit a component or screen, or find opportunities | [audit.md](references/audit.md) | Prioritized findings or a concrete implementation plan when requested |
|
|
66
|
+
| Investigate jank or rendering cost | [performance.md](references/performance.md) | Evidence, a focused fix when requested, and a comparison |
|
|
67
|
+
|
|
68
|
+
Load the relevant reference and [verification.md](references/verification.md);
|
|
69
|
+
do not read all mode guides for a small task. A review/audit reports findings;
|
|
70
|
+
implement when requested. If a request spans modes, use only those needed to
|
|
71
|
+
complete it. Resolve routine choices from project contracts and existing
|
|
72
|
+
authorization; ask only for a material unresolved product decision.
|
|
73
|
+
|
|
74
|
+
## Keep ADS ownership
|
|
75
|
+
|
|
76
|
+
Use the project showcase as the shared motion review surface for agents and
|
|
77
|
+
humans. Use the connected MCP runtime URL or start `ads showcase`, with a configured
|
|
78
|
+
project preview compiler. Keep the frame
|
|
79
|
+
minimal and neutral. Showcase/scenario files define no CSS, custom classes, or
|
|
80
|
+
widget markup; change the owning ADS pattern when a layout is needed.
|
|
81
|
+
Scenarios use the same public ADS source,
|
|
82
|
+
tokens, and styles as the app. Add repeatable triggers and relevant states,
|
|
83
|
+
interruption cases, and reduced-motion examples; do not build separate demo
|
|
84
|
+
animations or reproduce a control inside the mock. Fix motion in the shared
|
|
85
|
+
owner so both consumers receive it. Run ADS/project guards for both builds and
|
|
86
|
+
give a full running URL or exact command for review. Static guards and a still
|
|
87
|
+
screenshot do not establish animation quality or parity.
|
|
88
|
+
|
|
89
|
+
The showcase is a minimal shell plus an MCP client and Apps host, supplied by ADS
|
|
90
|
+
tooling. It discovers Tokens/Components/Patterns/Composition entries through MCP
|
|
91
|
+
tools and renders their scenarios in the preview App. Navigation, theme and
|
|
92
|
+
pane/header visibility belong to the tool client. Do not create page files,
|
|
93
|
+
copy its shell into the project or assemble a second catalogue/rendering pipeline.
|
|
94
|
+
|
|
95
|
+
When MCP is connected, open the running URL from `ads_status`. Otherwise run the
|
|
96
|
+
installed `ads showcase` or the project's `dev:showcase` script. Do not launch a
|
|
97
|
+
second runtime/compiler for the same connected project. A configured project
|
|
98
|
+
preview watcher publishes a shared graph on first demand and after source
|
|
99
|
+
changes. The built-in client refreshes discovery and the active scenario in the
|
|
100
|
+
same App after a successful build. Shared runtime, foundation CSS, fonts and
|
|
101
|
+
selected scenario modules load through MCP
|
|
102
|
+
resources inside the sandboxed App. Never inject project styles/runtime into
|
|
103
|
+
the outer host. Keep the configured framework, compiler and mount/unmount adapter
|
|
104
|
+
consistent; scenario teardown must release owned timers, portals and workers.
|
|
105
|
+
The host shows errors and marks retained output as stale. Other hosts may need an
|
|
106
|
+
explicit preview-tool invocation. Compilation remains project-owned and required
|
|
107
|
+
for TSX/Linaria; it is automatic, not eliminated.
|
|
108
|
+
|
|
109
|
+
Reusable review layouts belong in public project ADS patterns, while scenario
|
|
110
|
+
files define no CSS, custom classes or widget replicas. Keep real presentation in
|
|
111
|
+
its component/pattern owner. The tooling shell's CSS is outside that project
|
|
112
|
+
contract. Legacy custom showcase pages may be retained during migration; new
|
|
113
|
+
projects require no TokensPage/ComponentsPage/PatternsPage/CompositionPage files.
|
|
114
|
+
|
|
115
|
+
Colocate `Scenario.tsx` and `fixture.ts` with tokens and each component/pattern; flat owners
|
|
116
|
+
may use `<Owner>.scenario.tsx` and `<Owner>.fixture.ts`. Put larger entries under
|
|
117
|
+
`composition/<Name>/Scenario.tsx` with their own `fixture.ts`. Export a default
|
|
118
|
+
zero-input mountable view and literal metadata, for example
|
|
119
|
+
`export const scenario = { title: "Button states", covers: ["Button"] };`.
|
|
120
|
+
Import the real UI from the public ADS alias. Keep fixture inputs, simulated
|
|
121
|
+
services and initial state/callback adapters beside the scenario. Empty fixtures
|
|
122
|
+
are valid for an entry with no inputs. Extra development helpers use a
|
|
123
|
+
`scenario/` or `fixtures/` subfolder, or `<Owner>.scenario-adapter.ts`, so guards
|
|
124
|
+
recognize their role even beside runtime code. Never require a page, router or store to
|
|
125
|
+
initialize the entry. Several contextual public parts may share one scenario.
|
|
126
|
+
|
|
127
|
+
IDs derive from ADS-relative filenames: both `components/core/Button/Scenario.tsx`
|
|
128
|
+
and `components/core/Button.scenario.tsx` identify `components/core/Button`.
|
|
129
|
+
Use one form, no duplicate IDs or hand-maintained registry. Renames change IDs.
|
|
130
|
+
The showcase and external hosts mount the same discovered entry. The Vite
|
|
131
|
+
adapter uses `previewEntriesPlugin` and `createPreviewResources` with
|
|
132
|
+
`runScenarioCompiler` to publish the shared graph. Its framework mount adapter
|
|
133
|
+
returns cleanup; the project owns rendering and Linaria extraction. The older
|
|
134
|
+
`scenarioRegistryPlugin` is only for retained legacy browsers. MCP discovers
|
|
135
|
+
metadata without importing executable TSX. Existing apps need an explicitly
|
|
136
|
+
integrated compiler; init alone adds no compiler or extraction setup.
|
|
137
|
+
Use `ads_scenarios` (query/kind/limit) and `ads_show_scenario({id})` to open an exact
|
|
138
|
+
entry. Check its build freshness; HTML delivery is not browser verification.
|
|
139
|
+
If Apps or resource forwarding are unavailable, open that scenario in the real
|
|
140
|
+
showcase, using the tool result's URL. Do not build a preview-only replica.
|
|
141
|
+
|
|
142
|
+
For a production screen, find and render the application's public screen pattern.
|
|
143
|
+
Its owner supplies structure, controls, layout and presentation. Scenario fixtures
|
|
144
|
+
supply data/state/callbacks. Move shared presentation into a pattern if needed,
|
|
145
|
+
preserving existing behavior and lazy imports, workers, caching and cancellation.
|
|
146
|
+
Do not reassemble an alternative screen or substitute placeholder content.
|
|
147
|
+
Screen reuse remains skill guidance, not a dedicated screen-parity lint.
|
|
148
|
+
|
|
149
|
+
Resolve `scenario-contract`, `scenario-render` and `scenario-coverage` findings
|
|
150
|
+
with meaningful entries. Every public renderable component and pattern needs an
|
|
151
|
+
addressable scenario, including unused exports; types/constants/utilities do not.
|
|
152
|
+
Only public render references reachable from the default entry count. Tests and
|
|
153
|
+
unused imports/functions do not. Static reachability does not prove successful
|
|
154
|
+
mounting, correct content, every branch/state or visual parity: open each affected
|
|
155
|
+
entry independently and verify real behavior at narrow/wide sizes in both themes.
|
|
156
|
+
The older `showcase-coverage` policy separately checks application references.
|
|
157
|
+
|
|
158
|
+
Token previews use that same scenario pipeline. Colocate a token scenario and
|
|
159
|
+
fixture under the configured token directory. Use static metadata
|
|
160
|
+
`{ title: "Typography", covers: ["TokenSamples"], tokens: fixture.tokens }` with
|
|
161
|
+
literal const fixture fields; names/sample text are fixture data, values come
|
|
162
|
+
from the real foundation CSS. Reuse a public project review pattern for styled
|
|
163
|
+
samples. The minimal starter's foundation value scenario can have `covers: []`.
|
|
164
|
+
Every declared token needs reachable scenario coverage; adding/removing a token
|
|
165
|
+
requires fixture updates. Fix `token-scenario-reference`, `token-scenario-render`
|
|
166
|
+
and `token-scenario-coverage` findings. Metadata and unused fixture fields do not
|
|
167
|
+
count. Discover exact token IDs with `ads_scenarios({kind:"tokens"})`; mount them
|
|
168
|
+
with `ads_show_scenario({id})` or `ads_show_tokens({category:id})`. With the shared
|
|
169
|
+
resource compiler, omitting category opens the first project token scenario.
|
|
170
|
+
Legacy compilers retain the generic definition inspector. Use `ads_tokens` for
|
|
171
|
+
source definitions and values; inspecting definitions does not prove UI parity.
|
|
172
|
+
The tool keeps the shared naming contract; sample templates and their token
|
|
173
|
+
lists belong to the project.
|
|
174
|
+
|
|
175
|
+
Scenarios, colocated fixtures and helpers are development-only. Never export them
|
|
176
|
+
from the runtime barrel or import them in production, including through aliases,
|
|
177
|
+
re-exports or dynamic imports. They may not import application stores, routers,
|
|
178
|
+
providers or HTTP clients. Live business data is application-owned; UI uses typed
|
|
179
|
+
inputs or injected services/callbacks. Direct global fetch/XHR/WebSocket/EventSource
|
|
180
|
+
is rejected; custom clients and computed access require review/project guards.
|
|
181
|
+
Use local simulated services in fixtures. Tests may import fixtures; load real
|
|
182
|
+
foundation CSS rather than assigning shared token values in JavaScript. Keep
|
|
183
|
+
full-app integration harnesses and workflow coverage in application test support.
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
Register component/project Oxlint plugins and rules in `ds.config.json`. Use
|
|
188
|
+
scoped `oxlint.overrides` for justified file-specific settings; never edit
|
|
189
|
+
`.ds/oxlintrc.json`. These overrides configure Oxlint, not the independent
|
|
190
|
+
architecture checks in `ads check`. Measured renderer properties and documented
|
|
191
|
+
non-state hooks use explicit `boundaries`; shared token writes and primitive
|
|
192
|
+
state overrides cannot be allowlisted. Add generic architectural protections to
|
|
193
|
+
ADS core and keep domain/component-specific rules registered in project setup.
|
|
194
|
+
|
|
195
|
+
- Motion constants belong in the project's token layer. Shared token meanings
|
|
196
|
+
stay compatible across projects; values can differ. Reuse a fitting token or
|
|
197
|
+
add a narrowly scoped one. Do not alter global timing to tune one component.
|
|
198
|
+
- Components own state motion, layout, focus, gestures, and reduced-motion
|
|
199
|
+
behavior. Patterns own composition transitions. Applications supply state,
|
|
200
|
+
data, and callbacks through public props.
|
|
201
|
+
- Preserve documented exceptions and accepted upstream parity. A Sonner-derived
|
|
202
|
+
stack may deliberately use a 400 ms curve and height transitions; generic
|
|
203
|
+
duration/property advice is not enough to classify that as a defect.
|
|
204
|
+
- Measured geometry may use a private, documented, allowlisted boundary.
|
|
205
|
+
Keep visual policy in tokens and styles. A performance recommendation to write
|
|
206
|
+
`element.style.transform` is not permission to bypass local architecture rules.
|
|
207
|
+
- Add component-local lint only for statically provable misuse of the public
|
|
208
|
+
contract. Profiling, perceptual quality, and arbitrary duration thresholds
|
|
209
|
+
cannot be reliably enforced by a blanket lint rule.
|
|
210
|
+
|
|
211
|
+
Record public behavior, token hooks, important motion choices, validation,
|
|
212
|
+
source links/revision, and accepted differences in the item's local README.
|
|
213
|
+
Preserve copyright and applicable license notices for copied/adapted source;
|
|
214
|
+
native integration does not by itself make that material independent.
|
|
215
|
+
|
|
216
|
+
This workflow adapts Emil Kowalski's animation skills. See
|
|
217
|
+
[README.md](README.md) and [LICENSE.upstream](LICENSE.upstream) for provenance.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Audit or plan motion
|
|
2
|
+
|
|
3
|
+
Start with the requested component/screen, not the entire repository. Map its
|
|
4
|
+
public inputs, state transitions, motion tokens, styles, geometry helpers,
|
|
5
|
+
timers, cleanup, and tests. Read nearby call sites to understand frequency and
|
|
6
|
+
composition. Track documented tradeoffs and accepted upstream comparisons.
|
|
7
|
+
|
|
8
|
+
Review using the categories in [review.md](review.md). Expand into rendering
|
|
9
|
+
performance only where observations or source evidence justify it; use
|
|
10
|
+
[performance.md](performance.md) if profiling is requested. An audit does not
|
|
11
|
+
silently apply production changes or rewrite configuration.
|
|
12
|
+
|
|
13
|
+
## Opportunities
|
|
14
|
+
|
|
15
|
+
When requested, suggest a small set of motion opportunities grounded in actual
|
|
16
|
+
state changes: new content, removal, selection, disclosure, or spatial movement.
|
|
17
|
+
For each, explain the user purpose, frequency, owner, and reduced-motion state.
|
|
18
|
+
Reject ideas that delay frequent input, duplicate existing feedback, or require
|
|
19
|
+
an unrelated library. It is valid to recommend no new animation.
|
|
20
|
+
|
|
21
|
+
## Implementation plans
|
|
22
|
+
|
|
23
|
+
If a plan is requested, make it executable against the inspected source:
|
|
24
|
+
|
|
25
|
+
1. Name the problem and its reproduction, including observed vs source-only
|
|
26
|
+
evidence. Record the revision or inspected snapshot; do not invent a Git
|
|
27
|
+
commit when the project has no committed source.
|
|
28
|
+
2. Identify owner files, public API implications, existing tokens, and any new
|
|
29
|
+
token definitions. Explain the intended state transitions and cancellation.
|
|
30
|
+
3. Describe the smallest coherent implementation, including geometry and exit
|
|
31
|
+
cleanup. Give exact changes where they resolve ambiguity; keep raw visual
|
|
32
|
+
constants in the token layer rather than embedding them in component samples.
|
|
33
|
+
4. List regression cases, real project commands, browser comparisons, and
|
|
34
|
+
practical limitations. Include reduced motion, interruption, and relevant
|
|
35
|
+
pointer/keyboard paths.
|
|
36
|
+
5. Record accepted differences, affected neighbors, source credits/notices, and
|
|
37
|
+
the local README updates needed after implementation.
|
|
38
|
+
|
|
39
|
+
Write a plan file only when the task or project workflow calls for one. Do not
|
|
40
|
+
create a parallel documentation tree for a small review. When implementation is
|
|
41
|
+
authorized, recheck the current source, execute the relevant plan, and update
|
|
42
|
+
the documentation to match what actually shipped. Ask only when a required
|
|
43
|
+
decision remains unresolved; routine implementation does not need another
|
|
44
|
+
confirmation after the user has already asked for it.
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Implement motion
|
|
2
|
+
|
|
3
|
+
## Decide what motion explains
|
|
4
|
+
|
|
5
|
+
Identify the trigger, user purpose, affected state, and expected frequency.
|
|
6
|
+
Motion can show where a surface came from, confirm input, connect changing
|
|
7
|
+
states, or preserve context when layout changes. Skip decorative movement that
|
|
8
|
+
slows a repeated task. Frequent keyboard navigation usually benefits from
|
|
9
|
+
immediate state changes; test the actual workflow before adding travel/delay.
|
|
10
|
+
|
|
11
|
+
Describe the start, end, interrupted, dismissed, and reduced-motion states.
|
|
12
|
+
Decide when content becomes interactive and when it can unmount. Avoid invisible
|
|
13
|
+
focusable controls and completion callbacks that fire for a canceled transition.
|
|
14
|
+
Animation must not delay the underlying action or make controls unusable.
|
|
15
|
+
|
|
16
|
+
## Choose the driver
|
|
17
|
+
|
|
18
|
+
Use the project's existing approach. CSS transitions suit retargetable state
|
|
19
|
+
changes; keyframes suit a fixed sequence; WAAPI can give explicit cancellation
|
|
20
|
+
and completion; an existing motion runtime may help with gestures, springs, or
|
|
21
|
+
presence. Add a dependency only when the task needs it and simpler existing
|
|
22
|
+
mechanisms do not cover the interaction. Check current official API/browser
|
|
23
|
+
documentation before relying on version-specific behavior.
|
|
24
|
+
|
|
25
|
+
Prefer transform and opacity when they express the desired effect. A real
|
|
26
|
+
height change, accordion, or variable-height stack may need measured layout.
|
|
27
|
+
Keep those reads/writes in the existing geometry boundary and verify their cost.
|
|
28
|
+
Don't replace an agreed interaction with a visual approximation just to avoid
|
|
29
|
+
layout animation. Animate a wrapper when its child already owns a transform.
|
|
30
|
+
|
|
31
|
+
For rapid toggling, retarget from the current presentation rather than replaying
|
|
32
|
+
an entry keyframe from zero. Use the owning state machine to distinguish pending,
|
|
33
|
+
entered, leaving, and removed states. Handle completion, interruption, reduced
|
|
34
|
+
motion, and unmount without leaking listeners or stranding hidden content.
|
|
35
|
+
|
|
36
|
+
## Tune through tokens
|
|
37
|
+
|
|
38
|
+
These are starting ranges from the upstream guidance, not pass/fail rules:
|
|
39
|
+
|
|
40
|
+
| Interaction | Typical starting point | What to assess |
|
|
41
|
+
|-------------|------------------------|----------------|
|
|
42
|
+
| Press/hover feedback | 100–200 ms | Input feels immediate; keyboard activation remains equivalent |
|
|
43
|
+
| Menu, tooltip, small popover | 150–250 ms | Origin follows its trigger/placement; nearby repeat tooltips can be immediate |
|
|
44
|
+
| Dialog or surface transition | 200–300 ms | Distance and scale stay restrained; exit can be quicker |
|
|
45
|
+
| Large drawer or notification stack | Component-specific, sometimes 300–500 ms | Travel, coupled states, and established parity justify the timing |
|
|
46
|
+
|
|
47
|
+
Choose existing tokens by their meaning and effect, not just the closest number.
|
|
48
|
+
If needed, define raw duration, easing, distance, or scale in the token layer and
|
|
49
|
+
consume it through the owner's styles. Preserve theme values unless the request
|
|
50
|
+
is explicitly a token-values/theme change.
|
|
51
|
+
|
|
52
|
+
Use deceleration for a newly appearing surface and an origin tied to its source.
|
|
53
|
+
Use balanced easing for a continuous move between visible positions, and linear
|
|
54
|
+
motion for an elapsed-time indicator. Springs can suit direct manipulation
|
|
55
|
+
when already supported; decorative bounce should not obscure a frequently used
|
|
56
|
+
control. Keep neighboring interactions coherent without forcing one curve on
|
|
57
|
+
all mechanics.
|
|
58
|
+
|
|
59
|
+
## Interaction recipes to adapt
|
|
60
|
+
|
|
61
|
+
- Button: a restrained press state, kept inside the primitive. Begin visual
|
|
62
|
+
feedback on press; commit ordinary click actions on release/activation so
|
|
63
|
+
cancellation and keyboard behavior remain intact.
|
|
64
|
+
- Popover/menu: a small opacity/scale transition from the trigger edge. Keep
|
|
65
|
+
placement flips, portal location, focus, and dismissal in the existing API.
|
|
66
|
+
- Dialog/drawer: animate its surface and overlay as coordinated states. Verify
|
|
67
|
+
scroll locking, focus trap/restoration, and repeated open/close during entry.
|
|
68
|
+
- Accordion: animate the content container while maintaining correct expanded
|
|
69
|
+
state and hidden/focus behavior. Handle changing content after measurement.
|
|
70
|
+
- Notification stack: use the actual host/store and documented lifecycle.
|
|
71
|
+
Exercise variable heights, additions during exit, hover/focus expansion,
|
|
72
|
+
swipe cancel/dismiss, loading completion, and timers. Do not assume the API or
|
|
73
|
+
lifetime rules are identical to Sonner.
|
|
74
|
+
- Tabs: keep the selected content readable and keyboard state immediate.
|
|
75
|
+
Animate the indicator only if it helps locate the new selection; don't add
|
|
76
|
+
presence transitions that duplicate active content for assistive technology.
|
|
77
|
+
|
|
78
|
+
Honor the local reduced-motion policy. Depending on the interaction, use instant
|
|
79
|
+
state changes or a restrained opacity change; remove travel, bounce, or looping
|
|
80
|
+
motion where required. Preserve all information and lifecycle behavior when
|
|
81
|
+
transitions have no duration. Don't require animation merely to provide feedback.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Investigate animation performance
|
|
2
|
+
|
|
3
|
+
Treat source inspection as a hypothesis. Reproduce the reported interaction
|
|
4
|
+
with realistic content/load and profile it before claiming a performance cause.
|
|
5
|
+
Record browser, device, viewport, fixture size, motion preference, driver, and
|
|
6
|
+
test conditions. A desktop screenshot cannot establish smoothness on mobile.
|
|
7
|
+
|
|
8
|
+
## Find the bottleneck
|
|
9
|
+
|
|
10
|
+
Inspect a short performance recording around the actual interaction:
|
|
11
|
+
|
|
12
|
+
- Long main-thread tasks and JavaScript cost, including per-frame React renders.
|
|
13
|
+
- Repeated style recalculation, forced synchronous layout, paint, and raster work.
|
|
14
|
+
- Frame cadence and whether a pause correlates with network/data work rather
|
|
15
|
+
than the animation itself.
|
|
16
|
+
- Animated property, driver, affected subtree, layer count, and cancellation.
|
|
17
|
+
|
|
18
|
+
Transform/opacity often avoid layout and paint, but compositing is not guaranteed
|
|
19
|
+
by a property name or `translate3d`. Filters, clips, layer size, stacking contexts,
|
|
20
|
+
the driver, and browser can change the result. Test a claim that a particular
|
|
21
|
+
animation runs off the main thread in the actual supported runtime.
|
|
22
|
+
|
|
23
|
+
CPU throttling helps expose main-thread cost; it is not an accurate weak-GPU or
|
|
24
|
+
real-device simulation. State that limit. Do not report a frame-rate improvement
|
|
25
|
+
without comparable recordings or measurements.
|
|
26
|
+
|
|
27
|
+
## Fix the measured cause
|
|
28
|
+
|
|
29
|
+
Keep reads and writes separated to avoid layout thrashing. Reuse measured
|
|
30
|
+
geometry when it stays valid, and update it when content/viewport changes.
|
|
31
|
+
Avoid rerendering a large tree every pointer frame when the local documented
|
|
32
|
+
geometry/animation boundary can carry transient displacement instead.
|
|
33
|
+
|
|
34
|
+
Inherited custom-property updates can broaden style recalculation, depending
|
|
35
|
+
on scope and dependencies. Narrow their scope where possible and measure.
|
|
36
|
+
Direct property writes or a different driver may help in some cases, but do not
|
|
37
|
+
bypass the project's style guard. If a new measured boundary is necessary,
|
|
38
|
+
document its property allowlist and validate its enforcement. Keep color,
|
|
39
|
+
typography, timing, easing, and scale policy in tokens and owner styles.
|
|
40
|
+
|
|
41
|
+
For expensive blur/shadow/paint effects, first reduce the affected area or avoid
|
|
42
|
+
animating the expensive property if that preserves the intended appearance.
|
|
43
|
+
Do not remove an established visual interaction solely on general advice.
|
|
44
|
+
Use `will-change` only when measurement supports it, scope it narrowly, and
|
|
45
|
+
remove temporary hints when appropriate. Permanent layer promotion can increase
|
|
46
|
+
memory and raster cost.
|
|
47
|
+
|
|
48
|
+
Handle cleanup for animation frames, listeners, observers, animation handles,
|
|
49
|
+
and exit callbacks. Keep loading/hidden-document timer behavior aligned with
|
|
50
|
+
the item contract. Reduced motion should preserve lifecycle correctness rather
|
|
51
|
+
than relying on a transition event that never occurs.
|
|
52
|
+
|
|
53
|
+
Compare the same case before/after. Verify normal content, rapid interruption,
|
|
54
|
+
focus, reduced motion, and relevant gesture states. Report measurements and
|
|
55
|
+
remaining limits separately from subjective visual observations.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Review motion
|
|
2
|
+
|
|
3
|
+
Read the item's local README before treating a choice as accidental. Compare
|
|
4
|
+
the source state machine with actual rendered behavior when a browser is
|
|
5
|
+
available. Mark source-only conclusions and untested performance hypotheses.
|
|
6
|
+
|
|
7
|
+
Assess the following where applicable:
|
|
8
|
+
|
|
9
|
+
| Area | Look for |
|
|
10
|
+
|------|----------|
|
|
11
|
+
| Purpose/frequency | A clear relationship to the action; repeated work is not slowed |
|
|
12
|
+
| Easing | Entry decelerates naturally; continuous movement and elapsed-time motion use suitable curves |
|
|
13
|
+
| Timing | Feedback starts promptly; total choreography fits its distance and task |
|
|
14
|
+
| Origin/distance | Placement and scale point to the real trigger without excessive travel |
|
|
15
|
+
| Continuity | Reversal and repeated updates retarget without snapping or restarting |
|
|
16
|
+
| Lifecycle | Exit, cancellation, unmount, and zero-duration states clean up correctly |
|
|
17
|
+
| Accessibility | Motion preference, focus, hidden content, and keyboard behavior remain correct |
|
|
18
|
+
| Ownership | Motion uses tokens and owner styles; consumers do not override internals |
|
|
19
|
+
| Cost | Measured rendering work matches the problem; no per-frame work is assumed harmless |
|
|
20
|
+
|
|
21
|
+
The upstream guidance favors short transitions, restrained scale, and transform/
|
|
22
|
+
opacity. Apply those as defaults with context. A documented 400 ms stack,
|
|
23
|
+
measured height transition, or necessary loading loop is not inherently broken.
|
|
24
|
+
Likewise, a transition below 300 ms is not automatically good. Verify whether an
|
|
25
|
+
exception preserves the intended experience and has acceptable observed cost.
|
|
26
|
+
|
|
27
|
+
Present only actionable findings. Include file/line, trigger, observed behavior,
|
|
28
|
+
expected behavior, why the difference matters, and a concrete owner-level fix.
|
|
29
|
+
For timing/easing proposals, name the current and proposed token policy and its
|
|
30
|
+
scope. If a token is shared, identify affected neighbors before changing values.
|
|
31
|
+
|
|
32
|
+
Use a before/after/why comparison for implemented fixes. Separate behavior
|
|
33
|
+
defects, visual refinements, and profiling questions so a suspicion is not
|
|
34
|
+
reported as a proved performance failure. If no defect is found, say what was
|
|
35
|
+
checked and what remains unverified. Do not invent findings to fill a checklist.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Verify motion in the project
|
|
2
|
+
|
|
3
|
+
Read the target's package scripts and component guide. Use existing lint,
|
|
4
|
+
typecheck, build, and meaningful behavior tests; tooling checks do not prove
|
|
5
|
+
focus, timers, gestures, or animation quality. Do not assume that this checkout's
|
|
6
|
+
`build:project` or `test:toast` script exists in another project.
|
|
7
|
+
|
|
8
|
+
For source-only review, state that rendered behavior was not checked. For
|
|
9
|
+
implementation or profiling, use an isolated browser context and the real
|
|
10
|
+
showcase/app public API. A fake HTML replica cannot validate the implementation.
|
|
11
|
+
Preserve the user's open tabs. Stop temporary servers unless a running preview
|
|
12
|
+
was requested.
|
|
13
|
+
|
|
14
|
+
## Interaction coverage
|
|
15
|
+
|
|
16
|
+
Exercise the changed behavior and relevant boundaries:
|
|
17
|
+
|
|
18
|
+
- Enter, update, exit, reopen, and reversal while a transition is in progress.
|
|
19
|
+
- Rapid repeated input and simultaneous additions/removals where supported.
|
|
20
|
+
- Variable content height, narrow containers, viewport changes, and theme.
|
|
21
|
+
- Keyboard activation, focus entry/restoration, hidden-content inertness, and
|
|
22
|
+
pointer/touch cancellation where the component owns those mechanics.
|
|
23
|
+
- Reduced motion, zero-duration cleanup, unmount, and background/foreground
|
|
24
|
+
timers where those affect the local contract.
|
|
25
|
+
|
|
26
|
+
Observe transition start, intermediate states, and settled state. A final-state
|
|
27
|
+
screenshot misses jumps, delayed exits, and interruption defects. Use recordings,
|
|
28
|
+
sampled frames, or timing assertions when they answer the actual question.
|
|
29
|
+
|
|
30
|
+
If matching an external reference, use the actual pinned upstream package in an
|
|
31
|
+
isolated harness with comparable inputs, options, viewport, and interactions.
|
|
32
|
+
Record version, dependencies, and license notices. Keep that harness out of the
|
|
33
|
+
production bundle and remove temporary copies/processes when comparison is done.
|
|
34
|
+
Document intended differences rather than silently losing accepted parity.
|
|
35
|
+
|
|
36
|
+
Put API/motion rationale, token hooks, accepted differences, meaningful tests,
|
|
37
|
+
and provenance in the component-local README. Shared architecture and the
|
|
38
|
+
geometry/lint contract belong in the project ADS guide. Add local lint only when
|
|
39
|
+
it establishes a concrete misuse and has accepted/rejected regression cases.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
|
|
3
|
+
export const tokenContract = JSON.parse(readFileSync(new URL("./contracts/tokens.json", import.meta.url), "utf8"));
|
|
4
|
+
|
|
5
|
+
export function isSharedToken(name) {
|
|
6
|
+
return name in tokenContract.tokens || tokenContract.naming.names.includes(name)
|
|
7
|
+
|| tokenContract.naming.prefixes.some((prefix) => name.startsWith(prefix) && name.length > prefix.length);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const foundationFiles = ["fonts.css", "colors.css", "typography.css", "spacing.css", "elevation.css", "base.css"];
|