@reqvire-org/ads 0.4.0 → 0.4.2
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 +105 -86
- package/dist/a11y.mjs +108 -29
- package/dist/analysis/compiler-options.mjs +13 -0
- package/dist/analysis/context.mjs +46 -0
- package/dist/analysis/file-tree.mjs +52 -0
- package/dist/analysis/helpers.mjs +140 -0
- package/dist/analysis/impact.mjs +20 -0
- package/dist/analysis/inputs.mjs +15 -0
- package/dist/analysis/native-adapter.mjs +180 -0
- package/dist/analysis/native-project.mjs +323 -0
- package/dist/analysis/queries.mjs +133 -0
- package/dist/analysis/service.mjs +146 -0
- package/dist/analysis/standalone.mjs +57 -0
- package/dist/analysis/syntax.mjs +164 -0
- package/dist/analysis/worker.mjs +182 -0
- package/dist/assets.mjs +5 -5
- package/dist/atomic-composition.mjs +191 -70
- package/dist/atomic-trace.mjs +120 -50
- package/dist/behavior-libraries.mjs +106 -37
- package/dist/behaviors.mjs +219 -77
- package/dist/boundaries.mjs +135 -38
- package/dist/brand-assets.mjs +219 -47
- package/dist/brands.mjs +86 -27
- package/dist/bun-compiler.mjs +28 -14
- package/dist/bun-worker.mjs +7 -5
- package/dist/capture/worker.mjs +15 -4
- package/dist/capture-store.mjs +4 -2
- package/dist/capture.mjs +17 -14
- package/dist/check-service.mjs +40 -57
- package/dist/check.mjs +749 -188
- package/dist/cli.mjs +200 -99
- package/dist/color-values.mjs +21 -21
- package/dist/component-contrast.mjs +2 -2
- package/dist/config.mjs +303 -135
- package/dist/construction-styles.cjs +10 -0
- package/dist/control-padding.mjs +45 -25
- package/dist/css-values.mjs +3 -2
- package/dist/declarative-flow.mjs +209 -109
- package/dist/design-values.mjs +136 -51
- package/dist/development-runtime.mjs +4 -6
- package/dist/draft-boundary.mjs +11 -6
- package/dist/evidence.mjs +1 -1
- package/dist/finding-rules.mjs +7 -5
- package/dist/font-rules.mjs +2 -2
- package/dist/fonts-generated.mjs +2 -2
- package/dist/foundation-views.mjs +238 -0
- package/dist/foundation.mjs +63 -39
- package/dist/generated-entries.mjs +101 -34
- package/dist/icons.mjs +79 -32
- package/dist/image-attributes.mjs +109 -36
- package/dist/image-size.mjs +1 -1
- package/dist/index.mjs +0 -2
- package/dist/init.mjs +122 -41
- package/dist/investigations.mjs +2 -2
- package/dist/layers.mjs +298 -129
- package/dist/layout-widths.mjs +180 -85
- package/dist/linaria/preserve-values.cjs +7 -0
- package/dist/linaria/spatial-inputs.cjs +56 -0
- package/dist/lockup-composition.mjs +44 -0
- package/dist/lockup-model.cjs +64 -0
- package/dist/mcp/THIRD_PARTY_NOTICES.md +51 -1
- package/dist/mcp/apps.mjs +4 -30
- package/dist/mcp/behavior-pages.mjs +72 -24
- package/dist/mcp/build-status.mjs +257 -64
- package/dist/mcp/catalog.mjs +90 -26
- package/dist/mcp/context.mjs +17 -18
- package/dist/mcp/draft-discovery.mjs +44 -21
- package/dist/mcp/drafts.mjs +901 -281
- package/dist/mcp/execution-coordinator.mjs +417 -167
- package/dist/mcp/execution-results.mjs +7 -7
- package/dist/mcp/mutations.mjs +670 -234
- package/dist/mcp/preview-watch.mjs +448 -170
- package/dist/mcp/preview-widget.bundle.js +44 -50
- package/dist/mcp/prompts.mjs +5 -5
- package/dist/mcp/result-pages.mjs +1 -1
- package/dist/mcp/sandbox-host.mjs +1 -1
- package/dist/mcp/server.mjs +2402 -577
- package/dist/mcp/showcase-host.mjs +165 -41
- package/dist/mcp/skills.mjs +1 -1
- package/dist/mcp/text-diff.mjs +29 -10
- package/dist/paint-contracts.mjs +174 -81
- package/dist/palette-generated.mjs +2 -2
- package/dist/preview-bun.mjs +493 -187
- package/dist/preview-failure.mjs +1 -1
- package/dist/preview-files.mjs +13 -13
- package/dist/preview-imports.mjs +104 -55
- package/dist/preview-inputs.mjs +2 -2
- package/dist/preview-requests.mjs +24 -0
- package/dist/preview-resources.mjs +288 -147
- package/dist/preview-scope.mjs +5 -4
- package/dist/program-cache.mjs +8 -34
- package/dist/project-documents.mjs +1 -1
- package/dist/public-api.mjs +69 -31
- package/dist/public-props.mjs +39 -22
- package/dist/{browser-audit → render-audit}/axe-run.mjs +3 -3
- package/dist/{browser-audit → render-audit}/image-shape.mjs +2 -2
- package/dist/{browser-audit → render-audit}/layout-overflow.mjs +86 -23
- package/dist/{browser-audit → render-audit}/non-text-contrast.mjs +86 -27
- package/dist/{browser-audit → render-audit}/render-states.mjs +208 -52
- package/dist/{browser-audit → render-audit}/worker.mjs +86 -30
- package/dist/render-audit.mjs +828 -0
- package/dist/render-color-probe.mjs +96 -42
- package/dist/resource-limits.mjs +229 -97
- package/dist/runtime-contracts.mjs +467 -185
- package/dist/scenario-groups.mjs +22 -10
- package/dist/scenario-inspector.mjs +6 -43
- package/dist/scenario-program.mjs +8 -25
- package/dist/scenario-registry.mjs +72 -30
- package/dist/scenario-selectors.mjs +161 -64
- package/dist/scenario-slots.mjs +149 -56
- package/dist/scenario-trace.mjs +215 -109
- package/dist/scenarios-compiler.mjs +719 -378
- package/dist/scenarios-vite.d.mts +1 -3
- package/dist/scenarios-vite.mjs +2 -81
- package/dist/scenarios.mjs +421 -157
- package/dist/selector-match.mjs +2 -2
- package/dist/showcase/client.bundle.js +57 -56
- package/dist/showcase/draft-navigation.js +18 -0
- package/dist/showcase/favicon.ico +0 -0
- package/dist/showcase/favicon.svg +1 -0
- package/dist/showcase/foundation-view.css +55 -0
- package/dist/showcase/foundation-view.mjs +252 -0
- package/dist/showcase/guide-controls.ads.review.mjs +32 -0
- package/dist/showcase/icons.js +1 -145
- package/dist/showcase/index.html +3 -31
- package/dist/showcase/preview-frame.ads.review.css +46 -0
- package/dist/showcase/preview-frame.ads.review.d.mts +11 -0
- package/dist/showcase/preview-frame.ads.review.mjs +22 -0
- package/dist/showcase/preview-state.js +0 -9
- package/dist/showcase/refresh-scheduler.js +23 -0
- package/dist/showcase/style.css +5 -47
- package/dist/showcase/ui/ui.css +1353 -0
- package/dist/showcase/ui/ui.js +1062 -0
- package/dist/showcase-coverage.mjs +58 -37
- package/dist/skills/README.md +24 -23
- package/dist/skills/ads-designer/README.md +8 -2
- package/dist/skills/ads-designer/SKILL.md +130 -119
- package/dist/skills/ads-designer/references/accessibility.md +12 -13
- package/dist/skills/ads-designer/references/atomic-styles.md +4 -4
- package/dist/skills/ads-designer/references/behaviors.md +30 -27
- package/dist/skills/ads-designer/references/branding.md +98 -10
- package/dist/skills/ads-designer/references/captures.md +25 -0
- package/dist/skills/ads-designer/references/cli.md +21 -24
- package/dist/skills/ads-designer/references/contracts.md +7 -6
- package/dist/skills/ads-designer/references/design-data.md +49 -52
- package/dist/skills/ads-designer/references/drafts.md +20 -17
- package/dist/skills/ads-designer/references/evidence.md +1 -5
- package/dist/skills/ads-designer/references/guarded-editing.md +14 -18
- package/dist/skills/ads-designer/references/layers.md +1 -1
- package/dist/skills/ads-designer/references/layout.md +347 -0
- package/dist/skills/ads-designer/references/mobile.md +2 -1
- package/dist/skills/{ads-motion/references/performance.md → ads-designer/references/motion-performance.md} +5 -1
- package/dist/skills/{ads-motion/references/build.md → ads-designer/references/motion.md} +73 -5
- package/dist/skills/ads-designer/references/review.md +37 -34
- package/dist/skills/ads-designer/references/runtimes.md +33 -30
- package/dist/skills/ads-designer/references/scenarios.md +16 -18
- package/dist/skills/{ads-break-ui/references/catalog.md → ads-designer/references/stress-catalog.md} +3 -1
- package/dist/skills/ads-designer/references/stress-test.md +68 -0
- package/dist/skills/ads-designer/references/validation.md +83 -75
- package/dist/skills/ads-designer/references/workflows.md +8 -33
- package/dist/skills/ads-import/SKILL.md +43 -325
- package/dist/skills/ads-import/references/atomic-styles.md +4 -4
- package/dist/skills/ads-import/references/behaviors.md +30 -27
- package/dist/skills/ads-import/references/branding.md +5 -5
- package/dist/skills/ads-import/references/captures.md +25 -0
- package/dist/skills/ads-import/references/cli.md +21 -24
- package/dist/skills/ads-import/references/compatibility.md +1 -1
- package/dist/skills/ads-import/references/contracts.md +7 -6
- package/dist/skills/ads-import/references/design-data.md +49 -52
- package/dist/skills/ads-import/references/drafts.md +20 -17
- package/dist/skills/ads-import/references/evidence.md +1 -5
- package/dist/skills/ads-import/references/guarded-editing.md +14 -18
- package/dist/skills/ads-import/references/implementation.md +2 -1
- package/dist/skills/ads-import/references/layers.md +1 -1
- package/dist/skills/ads-import/references/layout.md +347 -0
- package/dist/skills/ads-import/references/review.md +37 -34
- package/dist/skills/ads-import/references/runtimes.md +33 -30
- package/dist/skills/ads-import/references/scenarios.md +16 -18
- package/dist/skills/ads-import/references/tokens.md +3 -3
- package/dist/skills/ads-import/references/validation.md +83 -75
- package/dist/skills/ads-import/references/workflows.md +8 -33
- package/dist/skills/ads-migrate/SKILL.md +56 -0
- package/dist/skills/ads-migrate/references/0.4.1-to-0.4.2.md +602 -0
- package/dist/skills/ads-port/SKILL.md +54 -343
- package/dist/skills/ads-port/references/atomic-styles.md +4 -4
- package/dist/skills/ads-port/references/behaviors.md +30 -27
- package/dist/skills/ads-port/references/captures.md +25 -0
- package/dist/skills/ads-port/references/cli.md +21 -24
- package/dist/skills/ads-port/references/contracts.md +7 -6
- package/dist/skills/ads-port/references/design-data.md +49 -52
- package/dist/skills/ads-port/references/drafts.md +20 -17
- package/dist/skills/ads-port/references/evidence.md +1 -5
- package/dist/skills/ads-port/references/guarded-editing.md +14 -18
- package/dist/skills/ads-port/references/layers.md +1 -1
- package/dist/skills/ads-port/references/layout.md +347 -0
- package/dist/skills/ads-port/references/lint-and-docs.md +8 -11
- package/dist/skills/ads-port/references/native-implementation.md +2 -1
- package/dist/skills/ads-port/references/review.md +37 -34
- package/dist/skills/ads-port/references/runtimes.md +33 -30
- package/dist/skills/ads-port/references/scenarios.md +16 -18
- package/dist/skills/ads-port/references/validation.md +83 -75
- package/dist/skills/ads-port/references/workflows.md +8 -33
- package/dist/source-symbols.mjs +1 -8
- package/dist/source-values.mjs +266 -128
- package/dist/spatial-composition.mjs +322 -0
- package/dist/spatial-contexts.cjs +56 -0
- package/dist/spatial-css.cjs +351 -0
- package/dist/spatial-inputs.cjs +80 -0
- package/dist/spatial-metadata.mjs +18 -0
- package/dist/spatial-model.cjs +322 -0
- package/dist/spatial.mjs +21 -0
- package/dist/stage-timing.cjs +20 -0
- package/dist/starters/preact/design-system/patterns/Conversation/Conversation.tsx +105 -0
- package/dist/starters/preact/design-system/patterns/Shell/Shell.tsx +275 -0
- package/dist/starters/preact/design-system/review/demo-frame/DemoFrame.ads.review.tsx +7 -0
- package/dist/starters/preact/design-system/review/screen-frame/ScreenFrame.ads.review.tsx +10 -0
- package/dist/starters/preact/design-system/showcase/mcp/main.ads.mount.tsx +8 -0
- package/dist/starters/preact/ds.config.json +25 -6
- package/dist/starters/preact/package.json +4 -8
- package/dist/starters/preact/tsconfig.json +4 -5
- package/dist/starters/preact/vite.config.ts +3 -3
- package/dist/starters/react/ADS.md +42 -47
- package/dist/starters/react/README.md +47 -49
- package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.tsx +18 -2
- package/dist/starters/react/design-system/components/Actions/IconButton/README.md +3 -0
- package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/README.md +5 -0
- package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/WorkspacePage.ads.fixture.ts +13 -0
- package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/WorkspacePage.ads.scenario.tsx +22 -0
- package/dist/starters/react/design-system/index.ts +2 -1
- package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.exports.ts +1 -0
- package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.fixture.ts +7 -0
- package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.scenario.tsx +15 -0
- package/dist/starters/react/design-system/patterns/Conversation/Conversation.tsx +105 -0
- package/dist/starters/react/design-system/patterns/Conversation/README.md +9 -0
- package/dist/starters/react/design-system/patterns/Shell/Floating.ads.fixture.ts +5 -0
- package/dist/starters/react/design-system/patterns/Shell/Floating.ads.scenario.tsx +21 -0
- package/dist/starters/react/design-system/patterns/Shell/README.md +43 -0
- package/dist/starters/react/design-system/patterns/Shell/Shell.ads.exports.ts +1 -0
- package/dist/starters/react/design-system/patterns/Shell/Shell.ads.fixture.ts +5 -0
- package/dist/starters/react/design-system/patterns/Shell/Shell.ads.scenario.tsx +21 -0
- package/dist/starters/react/design-system/patterns/Shell/Shell.tsx +274 -0
- package/dist/starters/react/design-system/review/demo-frame/DemoFrame.ads.exports.ts +1 -1
- package/dist/starters/react/design-system/review/demo-frame/DemoFrame.ads.review.tsx +7 -0
- package/dist/starters/react/design-system/review/index.ads.review.ts +4 -0
- package/dist/starters/react/design-system/review/region-block/RegionBlock.ads.exports.ts +1 -0
- package/dist/starters/react/design-system/review/region-block/RegionBlock.ads.review.tsx +6 -0
- package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.ads.exports.ts +1 -1
- package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.ads.review.tsx +10 -0
- package/dist/starters/react/design-system/showcase/mcp/{main.tsx → main.ads.mount.tsx} +4 -2
- package/dist/starters/react/design-system/tokens/catalog.ads.json +1221 -0
- package/dist/starters/react/design-system/tokens/colors.css +1 -1
- package/dist/starters/react/design-system/tokens/spacing.css +22 -32
- package/dist/starters/react/design-system/tokens/spatial.ads.json +70 -0
- package/dist/starters/react/design-system/tokens/themes.generated.ts +1 -1
- package/dist/starters/react/ds.config.json +25 -6
- package/dist/starters/react/package.json +2 -6
- package/dist/starters/react/tsconfig.json +2 -3
- package/dist/starters/react/vite.config.ts +3 -3
- package/dist/style-boundaries.mjs +70 -25
- package/dist/task-cache.mjs +173 -72
- package/dist/task-worker.mjs +22 -11
- package/dist/test-boundaries.mjs +132 -59
- package/dist/themes-generated.mjs +1 -1
- package/dist/themes-watch.mjs +57 -22
- package/dist/themes.mjs +176 -73
- package/dist/token-export.mjs +39 -14
- package/dist/token-policy.mjs +6 -3
- package/dist/token-quality.mjs +6 -6
- package/dist/token-samples.mjs +16 -5
- package/dist/tokens.mjs +71 -26
- package/dist/ui-framework.mjs +16 -14
- package/dist/unit-contracts.mjs +251 -104
- package/dist/units.mjs +208 -98
- package/dist/usage.mjs +138 -38
- package/dist/validation-checks.mjs +115 -38
- package/dist/validation-inputs.mjs +187 -78
- package/dist/validation.mjs +268 -102
- package/dist/verification/browser.mjs +27 -5
- package/dist/verification.mjs +711 -187
- package/docs/ADS.md +90 -79
- package/docs/ARCHITECTURE.md +294 -136
- package/docs/BEHAVIORS.md +29 -25
- package/docs/CACHING.md +52 -17
- package/docs/CHANGELOG.md +309 -17
- package/docs/CONTRACTS.md +12 -4
- package/docs/DESIGN-REFERENCES.md +40 -0
- package/docs/GUIDE.md +270 -258
- package/docs/MCP.md +181 -324
- package/docs/SPATIAL-CHECKS.md +69 -0
- package/docs/benchmarks/README.md +39 -0
- package/package.json +42 -34
- package/dist/browser-audit.mjs +0 -429
- package/dist/create.mjs +0 -48
- package/dist/lint-config.mjs +0 -50
- package/dist/mcp/project-widget.bundle.js +0 -114
- package/dist/mcp/reports.mjs +0 -101
- package/dist/mcp/widget.bundle.js +0 -147
- package/dist/oxlint.mjs +0 -89
- package/dist/preview-builder.mjs +0 -133
- package/dist/preview-workers.mjs +0 -184
- package/dist/showcase.mjs +0 -77
- package/dist/skills/ads-break-ui/LICENSE.upstream +0 -21
- package/dist/skills/ads-break-ui/README.md +0 -16
- package/dist/skills/ads-break-ui/SKILL.md +0 -412
- package/dist/skills/ads-break-ui/agents/openai.yaml +0 -4
- package/dist/skills/ads-break-ui/references/atomic-styles.md +0 -293
- package/dist/skills/ads-break-ui/references/behaviors.md +0 -412
- package/dist/skills/ads-break-ui/references/captures.md +0 -135
- package/dist/skills/ads-break-ui/references/contracts.md +0 -317
- package/dist/skills/ads-break-ui/references/design-data.md +0 -354
- package/dist/skills/ads-break-ui/references/drafts.md +0 -194
- package/dist/skills/ads-break-ui/references/evidence.md +0 -128
- package/dist/skills/ads-break-ui/references/guarded-editing.md +0 -165
- package/dist/skills/ads-break-ui/references/layers.md +0 -145
- package/dist/skills/ads-break-ui/references/reporting.md +0 -101
- package/dist/skills/ads-break-ui/references/review.md +0 -97
- package/dist/skills/ads-break-ui/references/runtimes.md +0 -203
- package/dist/skills/ads-break-ui/references/scenarios.md +0 -246
- package/dist/skills/ads-break-ui/references/validation.md +0 -166
- package/dist/skills/ads-break-ui/references/verification.md +0 -58
- package/dist/skills/ads-break-ui/references/workflows.md +0 -90
- package/dist/skills/ads-designer/references/reporting.md +0 -101
- package/dist/skills/ads-import/references/reporting.md +0 -101
- package/dist/skills/ads-motion/LICENSE.upstream +0 -21
- package/dist/skills/ads-motion/README.md +0 -22
- package/dist/skills/ads-motion/SKILL.md +0 -385
- package/dist/skills/ads-motion/agents/openai.yaml +0 -4
- package/dist/skills/ads-motion/references/atomic-styles.md +0 -293
- package/dist/skills/ads-motion/references/audit.md +0 -44
- package/dist/skills/ads-motion/references/behaviors.md +0 -412
- package/dist/skills/ads-motion/references/captures.md +0 -135
- package/dist/skills/ads-motion/references/contracts.md +0 -317
- package/dist/skills/ads-motion/references/design-data.md +0 -354
- package/dist/skills/ads-motion/references/drafts.md +0 -194
- package/dist/skills/ads-motion/references/evidence.md +0 -128
- package/dist/skills/ads-motion/references/guarded-editing.md +0 -165
- package/dist/skills/ads-motion/references/layers.md +0 -145
- package/dist/skills/ads-motion/references/motion-review.md +0 -35
- package/dist/skills/ads-motion/references/reporting.md +0 -101
- package/dist/skills/ads-motion/references/review.md +0 -97
- package/dist/skills/ads-motion/references/runtimes.md +0 -203
- package/dist/skills/ads-motion/references/scenarios.md +0 -246
- package/dist/skills/ads-motion/references/validation.md +0 -166
- package/dist/skills/ads-motion/references/verification.md +0 -39
- package/dist/skills/ads-motion/references/workflows.md +0 -90
- package/dist/skills/ads-port/references/reporting.md +0 -101
- package/dist/starters/preact/design-system/components/Layout/Grid/Grid.ads.contract.ts +0 -6
- package/dist/starters/preact/design-system/components/Layout/Grid/Grid.tsx +0 -76
- package/dist/starters/preact/design-system/review/demo-frame/DemoFrame.tsx +0 -29
- package/dist/starters/preact/design-system/review/screen-frame/ScreenFrame.tsx +0 -34
- package/dist/starters/preact/design-system/review/token-preview/TokenPreview.ads.contract.ts +0 -6
- package/dist/starters/preact/design-system/review/token-preview/TokenPreview.tsx +0 -137
- package/dist/starters/preact/design-system/showcase/mcp/main.tsx +0 -6
- package/dist/starters/react/design-system/brand/Icons/AppIcon/AppIcon.ads.fixture.ts +0 -7
- package/dist/starters/react/design-system/brand/Icons/AppIcon/AppIcon.ads.scenario.tsx +0 -4
- package/dist/starters/react/design-system/brand/Identity/Logo/Logo.ads.fixture.ts +0 -7
- package/dist/starters/react/design-system/brand/Identity/Logo/Logo.ads.scenario.tsx +0 -4
- package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.contract.ts +0 -6
- package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.fixture.ts +0 -12
- package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.scenario.tsx +0 -17
- package/dist/starters/react/design-system/components/Layout/Grid/Grid.tsx +0 -75
- package/dist/starters/react/design-system/components/Layout/Grid/README.md +0 -21
- package/dist/starters/react/design-system/review/brand-preview/BrandPreview.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/review/brand-preview/BrandPreview.tsx +0 -112
- package/dist/starters/react/design-system/review/demo-frame/DemoFrame.tsx +0 -29
- package/dist/starters/react/design-system/review/grid-cell/GridCell.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/review/grid-cell/GridCell.tsx +0 -18
- package/dist/starters/react/design-system/review/index.ts +0 -6
- package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.tsx +0 -34
- package/dist/starters/react/design-system/review/token-preview/TokenPreview.ads.contract.ts +0 -6
- package/dist/starters/react/design-system/review/token-preview/TokenPreview.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/review/token-preview/TokenPreview.tsx +0 -137
- package/dist/starters/react/design-system/showcase/mcp/index.html +0 -1
- package/dist/starters/react/design-system/tokens/Color.ads.fixture.ts +0 -124
- package/dist/starters/react/design-system/tokens/Color.ads.scenario.tsx +0 -4
- package/dist/starters/react/design-system/tokens/Layout.ads.fixture.ts +0 -39
- package/dist/starters/react/design-system/tokens/Layout.ads.scenario.tsx +0 -4
- package/dist/starters/react/design-system/tokens/Motion.ads.fixture.ts +0 -18
- package/dist/starters/react/design-system/tokens/Motion.ads.scenario.tsx +0 -4
- package/dist/starters/react/design-system/tokens/Shape.ads.fixture.ts +0 -30
- package/dist/starters/react/design-system/tokens/Shape.ads.scenario.tsx +0 -4
- package/dist/starters/react/design-system/tokens/Space.ads.fixture.ts +0 -37
- package/dist/starters/react/design-system/tokens/Space.ads.scenario.tsx +0 -4
- package/dist/starters/react/design-system/tokens/Type.ads.fixture.ts +0 -29
- package/dist/starters/react/design-system/tokens/Type.ads.scenario.tsx +0 -4
- package/dist/starters/react/package-lock.json +0 -4707
- package/dist/token-fixtures.mjs +0 -30
- package/docs/benchmarks/bun-previews.md +0 -91
- package/docs/benchmarks/preview-memory.md +0 -147
- package/docs/benchmarks/turbo-poc.md +0 -284
- package/docs/plans/execution-coordination.md +0 -57
- /package/dist/{browser-audit → render-audit}/first-render.mjs +0 -0
- /package/dist/{browser-audit → render-audit}/layout-shift.mjs +0 -0
package/docs/GUIDE.md
CHANGED
|
@@ -6,21 +6,20 @@ ordinary edits do not require drafts or acceptance. MCP-only iterative editing
|
|
|
6
6
|
uses [tracked drafts](../skills/ads-designer/references/drafts.md), rendered review
|
|
7
7
|
and exact-revision acceptance. Direct editors may choose drafts for isolation and
|
|
8
8
|
Accepted/Draft comparison too. Complete any required tracked proposals before
|
|
9
|
-
reporting the design change finished.
|
|
10
|
-
the managed ADS compiler is the default for both editing routes; external
|
|
11
|
-
builders can publish resources/evidence with `mcp.previewWatch: false`.
|
|
9
|
+
reporting the design change finished. Both editing routes use ADS's own compiler.
|
|
12
10
|
|
|
13
11
|
ADS is development tooling for a project's local design system. This package
|
|
14
|
-
contains a Bun CLI, shared token contract, native static checks
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
contains a Bun CLI, shared token contract, asynchronous native static checks and
|
|
13
|
+
foundation scaffolding. Default initialization creates an empty design system;
|
|
14
|
+
`--include-starter` adds the shared example design and application source. ADS
|
|
15
|
+
adds no runtime dependency to the application's shipped UI.
|
|
17
16
|
|
|
18
17
|
## Use ADS through MCP
|
|
19
18
|
|
|
20
19
|
Connect your coding agent using the [MCP client setup](MCP.md#connect-codex-or-claude).
|
|
21
20
|
The client launches `ads mcp` in your project; add `--mutations` to enable guarded
|
|
22
21
|
source editing. Initialization also supplies `ads-mcp` and `ads-read-mcp` launch
|
|
23
|
-
scripts. The server starts its showcase and
|
|
22
|
+
scripts. The server starts its showcase and ADS-managed preview compiler, so use
|
|
24
23
|
the returned showcase URL rather than starting a separate preview application.
|
|
25
24
|
|
|
26
25
|
An agent uses the MCP tools to inspect, edit and review the project:
|
|
@@ -29,9 +28,10 @@ An agent uses the MCP tools to inspect, edit and review the project:
|
|
|
29
28
|
mutation mode, showcase URL and build freshness.
|
|
30
29
|
2. Find public UI/behavior APIs with `ads_catalog`, inspect relevant definitions
|
|
31
30
|
with `ads_tokens`, and discover preview IDs with `ads_scenarios`. Read one
|
|
32
|
-
relevant workflow through `ads_skills` and
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
relevant workflow skill before editing: natively, or through `ads_skills` and
|
|
32
|
+
`ads_read_skill` on a 2025-era connection.
|
|
33
|
+
3. Open a discovered preview, including the token and brand views ADS renders, with `ads_show_scenario`. It
|
|
34
|
+
renders the project's actual scenario, fixtures and adapter through MCP Apps.
|
|
35
35
|
Use the returned showcase link when the client cannot render Apps.
|
|
36
36
|
4. Select the editing route, independently of `mutations.enabled`. With direct
|
|
37
37
|
source access, edit owned files and use the existing compiler/preview; run
|
|
@@ -41,27 +41,30 @@ An agent uses the MCP tools to inspect, edit and review the project:
|
|
|
41
41
|
`ads_read_file`/`ads_update_draft` (file contents or a Git diff), rendered
|
|
42
42
|
`ads_show_draft` review, an optional `ads_accept` dry run and exact-revision
|
|
43
43
|
`ads_accept`. An owner is in at most one open draft. Accept dependencies first and
|
|
44
|
-
review dependents again. After a series of accepted drafts, run
|
|
45
|
-
`ads_validate
|
|
44
|
+
review dependents again. After a series of accepted drafts, run
|
|
45
|
+
`ads_validate({scope:"changed"})`. A read-only MCP connection
|
|
46
46
|
supports direct editors; it cannot edit for an MCP-only client.
|
|
47
47
|
5. Review diagnostics, registered behavior evidence and the rendered result.
|
|
48
|
-
`ads_behaviors` discovers guarantees; `
|
|
49
|
-
checks. Recheck `ads_status.build` after changes; notifications alone do not
|
|
48
|
+
`ads_behaviors` discovers guarantees; the gates run them, and `ads verify` runs
|
|
49
|
+
one unit's checks from the CLI. Recheck `ads_status.build` after changes; notifications alone do not
|
|
50
50
|
establish current output.
|
|
51
51
|
|
|
52
|
-
After targeted diagnosis, record a suspected ADS defect with `ads_report_bug`, or
|
|
53
|
-
a missing capability with `ads_request_feature`. Supply a minimal reproduction or
|
|
54
|
-
workflow and reference exact execution/check evidence when available. Reports stay
|
|
55
|
-
local, are untriaged, and do not bypass guards. Read `ads://guides/reporting` or the
|
|
56
|
-
[portable reporting guide](../skills/ads-designer/references/reporting.md).
|
|
57
|
-
|
|
58
52
|
For an on-demand screenshot, call `ads_capture` with a discovered scenario ID and
|
|
59
53
|
optionally a named `captureTargets` element, theme and viewport. To compare a
|
|
60
54
|
draft with accepted source, pass its `draft` id and exact `revision`; acceptance and
|
|
61
55
|
its dry run create no screenshots. Capture uses project-installed
|
|
62
|
-
Playwright and its browser; ADS installs neither (`ads
|
|
56
|
+
Playwright and its browser; ADS installs neither (`ads init` declares
|
|
63
57
|
`@playwright/test`; run `npx playwright install chromium` once).
|
|
64
58
|
|
|
59
|
+
For layout inspection, add `guides:["tracks","gaps","padding","mini"]`.
|
|
60
|
+
The selectable layers are `bounds`, `tracks`, `gaps`, `padding`, `margins`, and
|
|
61
|
+
`mini`; they use the showcase overlay on all visible elements. Omit `guides` or
|
|
62
|
+
pass `[]` for a clean visual review. Guides work on components, patterns,
|
|
63
|
+
compositions and `tokens/Layout`, and are recorded in image settings. Read the
|
|
64
|
+
annotated image before requesting a clean capture: each scenario/target has one
|
|
65
|
+
current slot, so the next capture replaces it. A draft comparison uses the same
|
|
66
|
+
layers for current and candidate.
|
|
67
|
+
|
|
65
68
|
Read `ads://project/captures` and the returned PNG image URIs through MCP
|
|
66
69
|
`resources/read`. Each target keeps only current and candidate: a successful
|
|
67
70
|
standalone screenshot replaces current and clears candidate; a screenshot-enabled
|
|
@@ -118,7 +121,7 @@ patterns own presentation. A shared context provider is a behavioral API too.
|
|
|
118
121
|
Optional `<Owner>.ads.contract.ts` registers guarantees and maintained checks using actual implementation references.
|
|
119
122
|
Scenario `exercises` records demonstrations separately from rendered `covers`.
|
|
120
123
|
Use `ads behaviors --json` for discovery and `ads verify --unit <discovered-id>`
|
|
121
|
-
to run registered cases; MCP exposes `ads_behaviors
|
|
124
|
+
to run registered cases; MCP exposes `ads_behaviors`, and its gates run the cases. Tests and
|
|
122
125
|
contracts stay outside production exports. See the [complete schema and runner
|
|
123
126
|
integration](BEHAVIORS.md), including browser and React development StrictMode profiles.
|
|
124
127
|
|
|
@@ -138,9 +141,9 @@ project's existing build:
|
|
|
138
141
|
result. Static source checks do not establish complete extraction or
|
|
139
142
|
unused-style removal.
|
|
140
143
|
|
|
141
|
-
The [starter's dependencies](https://github.com/reqvire-org/ads/blob/main/starters/
|
|
142
|
-
[entry build](https://github.com/reqvire-org/ads/blob/main/starters/
|
|
143
|
-
and [
|
|
144
|
+
The [starter's dependencies](https://github.com/reqvire-org/ads/blob/main/starters/shared/package.json),
|
|
145
|
+
[entry build](https://github.com/reqvire-org/ads/blob/main/starters/shared/vite.config.ts),
|
|
146
|
+
and [native mounts](https://github.com/reqvire-org/ads/tree/main/starters)
|
|
144
147
|
provide the React/Vite setup. Merge the needed integration into an existing
|
|
145
148
|
project instead of replacing its configuration.
|
|
146
149
|
|
|
@@ -157,10 +160,11 @@ state. Configure TypeScript with `"jsx": "react-jsx"` and
|
|
|
157
160
|
|
|
158
161
|
```ts
|
|
159
162
|
esbuild: { jsx: "automatic", jsxImportSource: "preact" },
|
|
160
|
-
plugins: [wyw(), /* project plugins */],
|
|
163
|
+
plugins: [wyw({ tagResolver: linariaTagResolver }), /* project plugins */],
|
|
161
164
|
```
|
|
162
165
|
|
|
163
|
-
Apply that configuration to
|
|
166
|
+
Apply that configuration to the application build. ADS's preview compiler uses
|
|
167
|
+
the declared `framework` and shared Linaria resolver automatically. Mount preview
|
|
164
168
|
entries with `render(<Scenario />, root)` from `preact`; React entries use their
|
|
165
169
|
existing React mount. Keep Linaria's `css`/`cx` extraction; native Preact does not
|
|
166
170
|
need `@linaria/react`'s React `styled` wrapper. Use `onInput` for live text updates
|
|
@@ -171,19 +175,17 @@ attributes when the project/file JSX runtime or factory is native Preact. Preact
|
|
|
171
175
|
and exports DOM types such as `HTMLAttributes` directly; Preact 10's `JSX` type
|
|
172
176
|
namespace is also recognized by guards. See the [Preact upgrade guide](https://preactjs.com/guide/v11/upgrade-guide/).
|
|
173
177
|
|
|
174
|
-
The [
|
|
175
|
-
and its [
|
|
176
|
-
show the
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
framework transform, mount adapter, review renderers' hooks and types, and
|
|
180
|
-
`framework` field together, then init. For a Preact app without a saved framework, run
|
|
178
|
+
The [shared starter](https://github.com/reqvire-org/ads/tree/main/starters/shared)
|
|
179
|
+
and its [native generator](https://github.com/reqvire-org/ads/blob/main/scripts/build-starters.mjs)
|
|
180
|
+
show the setup. `ads init --framework preact --include-starter` adds the generated
|
|
181
|
+
Preact variant of that source. The generator changes runtime dependencies, JSX
|
|
182
|
+
settings, framework imports and the native mount together. For a Preact app without a saved framework, run
|
|
181
183
|
`ads init --framework preact`; newly generated foundation scenarios use native
|
|
182
184
|
hooks. Init preserves the application's compiler, dependencies and mount adapter.
|
|
183
185
|
|
|
184
|
-
### CSS correctness in the
|
|
186
|
+
### CSS correctness in the tool and starter
|
|
185
187
|
|
|
186
|
-
The
|
|
188
|
+
The tool and starter use Biome only for CSS, configured in
|
|
187
189
|
`biome.css.json`. Parsing rejects malformed CSS and invalid hex colors, including
|
|
188
190
|
token values. Explicit lint rules reject duplicate font names and selectors;
|
|
189
191
|
the starter also rejects duplicate properties. Formatting is disabled. ADS directly checks architecture, token usage and
|
|
@@ -209,13 +211,14 @@ For a Bun-managed project, use
|
|
|
209
211
|
`bunx @reqvire-org/ads init --framework react`, followed by `bun install`,
|
|
210
212
|
`bunx playwright install chromium` and `bun --bun run build`. Node is unnecessary. No archive or directory argument is needed for a published
|
|
211
213
|
release. `init` requires an existing project; it does not create an application.
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
214
|
+
To start from ADS's TypeScript/Linaria starter, add `--include-starter`: init also adds
|
|
215
|
+
the starter's example design system, Vite and TypeScript setup, scripts and development
|
|
216
|
+
dependencies that the project lacks. It never replaces an existing file and never writes
|
|
217
|
+
a lockfile.
|
|
215
218
|
|
|
216
219
|
Choose `--framework react` or `--framework preact` when the project has no saved
|
|
217
220
|
framework. Init persists it as `framework` in `ds.config.json`. Subsequent runs
|
|
218
|
-
reuse the saved value
|
|
221
|
+
reuse the saved value.
|
|
219
222
|
There is no implicit framework detection or default for initialization.
|
|
220
223
|
|
|
221
224
|
A conflicting flag stops init before writes. Init also checks available
|
|
@@ -266,33 +269,23 @@ An unrelated custom `lint:ds` or `assets:ds` script causes init to stop before w
|
|
|
266
269
|
rename it or integrate the checks deliberately. Writes are preflighted and do
|
|
267
270
|
not follow symlinks. Keep normal version control review of the resulting changes.
|
|
268
271
|
|
|
269
|
-
After installation, normal builds use the project's installed tool
|
|
270
|
-
|
|
271
|
-
removing `.ds/`; they do not rely on the initializing npx cache. Commit the
|
|
272
|
+
After installation, normal builds use the project's installed tool; they do not rely
|
|
273
|
+
on the initializing npx cache. Commit the
|
|
272
274
|
updated lockfile. npm CI can use `npm ci`, then `npm run build`.
|
|
273
275
|
|
|
274
276
|
## Package manager detection
|
|
275
277
|
|
|
276
|
-
`init`
|
|
278
|
+
`init` reads npm or Bun from the project:
|
|
277
279
|
|
|
278
|
-
1.
|
|
279
|
-
2.
|
|
280
|
-
3. Its Bun (`bun.lock` or `bun.lockb`) or npm (`package-lock.json`) lockfile.
|
|
281
|
-
4. The Bun runtime or invoking Bun runner's metadata, otherwise npm.
|
|
280
|
+
1. Its `packageManager` field in `package.json`.
|
|
281
|
+
2. Its Bun (`bun.lock` or `bun.lockb`) or npm (`package-lock.json`) lockfile.
|
|
282
282
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
```sh
|
|
289
|
-
bunx @reqvire-org/ads init --framework react
|
|
290
|
-
bun install
|
|
291
|
-
bun --bun run build
|
|
292
|
-
```
|
|
283
|
+
A project that declares neither stops init with an error naming what to add; with both
|
|
284
|
+
lockfile types and no `packageManager`, keep one or set the field. This version supports
|
|
285
|
+
npm and Bun. It never replaces or removes a lockfile. How ADS was launched (`npx` or
|
|
286
|
+
`bunx`) does not change the project's choice.
|
|
293
287
|
|
|
294
|
-
|
|
295
|
-
Use `--package-manager bun` only to override an existing project choice. Init
|
|
288
|
+
Init
|
|
296
289
|
does not translate the app's existing scripts. Bun hooks explicitly use `bun --bun run` so package executables,
|
|
297
290
|
including ADS, run on Bun despite Node shebangs.
|
|
298
291
|
Launch the MCP server with `bunx @reqvire-org/ads mcp`, or its generated
|
|
@@ -392,7 +385,7 @@ npm run dev:mcp-explorer
|
|
|
392
385
|
```
|
|
393
386
|
|
|
394
387
|
Open **http://127.0.0.1:4190/**. It builds ADS and starts the real stdio server,
|
|
395
|
-
its showcase and
|
|
388
|
+
its showcase and ADS-managed preview compiler. The
|
|
396
389
|
[explorer guide](../mcp-explorer/README.md) covers tools, resources, prompts, skills,
|
|
397
390
|
notifications and widget checks. Run `npm run dev:showcase` instead for normal
|
|
398
391
|
visual review. These development commands are not required in projects using
|
|
@@ -407,7 +400,7 @@ For iterative development, use the linking workflow above. From the repository r
|
|
|
407
400
|
npm install
|
|
408
401
|
npm run build
|
|
409
402
|
npm run pack:tool
|
|
410
|
-
ads_tool_package="$PWD/output/npm/reqvire-org-ads-
|
|
403
|
+
ads_tool_package="$PWD/output/npm/reqvire-org-ads-$(bun -p 'require("./package.json").version').tgz"
|
|
411
404
|
```
|
|
412
405
|
|
|
413
406
|
Then change into an existing test project containing `package.json`:
|
|
@@ -419,7 +412,7 @@ npm install
|
|
|
419
412
|
npm run build
|
|
420
413
|
```
|
|
421
414
|
|
|
422
|
-
Use `bun install` and `bun run build` for Bun. Keep npx options before `
|
|
415
|
+
Use `bun install` and `bun run build` for Bun. Keep npx options before `ads`.
|
|
423
416
|
`--tool-package` accepts an absolute local tarball path, a version, or a matching
|
|
424
417
|
package/version. A tarball becomes a `file:` development dependency, so keep it
|
|
425
418
|
available for subsequent installs. A published pinned version is portable
|
|
@@ -433,7 +426,6 @@ between machines without an archive. Routine builds need no global install.
|
|
|
433
426
|
| `ads check [directory]` | Read-only core token, source import, and style checks |
|
|
434
427
|
| `ads tokens [directory]` | List declared values and theme/media scopes |
|
|
435
428
|
| `ads assets [directory]` | Generate standard icons from `assets.iconSource` |
|
|
436
|
-
| `ads lint-config [directory]` | Generate or refresh `.ds/oxlintrc.json` |
|
|
437
429
|
| `ads mcp [directory]` | Serve tools, resources, prompts, skills and preview Apps; start the local showcase |
|
|
438
430
|
| `ads mcp --mutations` | Enable guarded edits to the local ADS, validated before application |
|
|
439
431
|
| `ads showcase [directory]` | Start the same MCP runtime and showcase for browser-only use |
|
|
@@ -446,26 +438,23 @@ Exit codes are 0 for success, 1 for check findings, and 2 for invalid
|
|
|
446
438
|
input/configuration or execution errors.
|
|
447
439
|
|
|
448
440
|
Guarded MCP editing is opt-in. Its mandatory checks and optional project
|
|
449
|
-
`acceptance.
|
|
441
|
+
`acceptance.scripts` run in a temporary project copy with installed
|
|
450
442
|
dependencies. Project scripts default to 60 seconds each; use the explicit
|
|
451
443
|
`mcp.mutationCheckTimeoutMs` budget (100–300000 ms) for measured slower builds.
|
|
452
444
|
A preview waits up to 5 minutes for its build, including the first build after the
|
|
453
445
|
MCP server starts; set `mcp.previewBuildTimeoutMs` (1000–3600000 ms) to change it.
|
|
454
446
|
Behavior profiles have a separate whole-run budget.
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
scenarios for axe-core on that host, or compiles only those scenarios when nothing
|
|
467
|
-
else needs previews. Core-only acceptance does not build the whole graph. Remove `build:mcp-previews`
|
|
468
|
-
from `acceptance.checks`; keep that script in the ordinary project build.
|
|
447
|
+
Draft acceptance runs the draft owners' own registered tests unless
|
|
448
|
+
`acceptance.behavior` is false, and their render audit unless `acceptance.audit` is
|
|
449
|
+
false. `ads validate` runs `acceptance.scripts` and then `validation.scripts`, so list
|
|
450
|
+
each script once. Both script lists default to empty; no names are inferred. Direct
|
|
451
|
+
source edits run `ads validate --changed`. See [the two gates](../skills/ads-designer/references/validation.md).
|
|
452
|
+
When acceptance runs the owners' registered behavior checks (or a capture was
|
|
453
|
+
requested), ADS builds and shares production previews with browser verification.
|
|
454
|
+
Acceptance's render audit renders the owners' UI scenarios in the candidate on that
|
|
455
|
+
host, or compiles only those scenarios when nothing else needs previews. Core-only
|
|
456
|
+
acceptance does not build the whole graph. Remove `build:mcp-previews` from
|
|
457
|
+
`acceptance.scripts`; keep that script in the ordinary project build.
|
|
469
458
|
See the [editing contract](MCP.md#guarded-editing) for unit ownership,
|
|
470
459
|
Git patches, bounded reads and preview review. Keep normal build gates enabled
|
|
471
460
|
for edits made by other tools.
|
|
@@ -484,8 +473,9 @@ including when a file is inside `tokens/`. Shared token assignments outside
|
|
|
484
473
|
`tokens/` fail. Source styles also check shared references for undeclared names.
|
|
485
474
|
It does not change values, import a theme, or synchronize definitions.
|
|
486
475
|
|
|
487
|
-
Source checks enforce the
|
|
488
|
-
reject JSX inline styling except
|
|
476
|
+
Source checks enforce the fixed `@ds` public alias for app/showcase consumers,
|
|
477
|
+
reject JSX inline styling except files declared in their owner's `styles.inline`
|
|
478
|
+
contract, and check CSS and imported
|
|
489
479
|
Linaria `css` and `styled` templates for raw visual values and namespace ownership. Private
|
|
490
480
|
ADS implementation imports and showcase-local files are allowed. The checker
|
|
491
481
|
recognizes imported aliases and shadowed bindings.
|
|
@@ -495,7 +485,7 @@ Arbitrary computed expressions, combined conditional cascade behavior, computed
|
|
|
495
485
|
module specifiers, JSX spreads, other styling engines, and renderer-specific APIs
|
|
496
486
|
need the project's existing checks and review. Continue to run its type checking,
|
|
497
487
|
component tests, and browser comparisons. Register component-specific guards as
|
|
498
|
-
explicit project scripts; include them in builds and `acceptance.
|
|
488
|
+
explicit project scripts; include them in builds and `acceptance.scripts` when
|
|
499
489
|
required. `ads check` does not invoke project linter plugins.
|
|
500
490
|
|
|
501
491
|
### Checks and guards
|
|
@@ -515,33 +505,33 @@ There is no warning level.
|
|
|
515
505
|
|---|---|
|
|
516
506
|
| `ads check` | Static token, theme, brand, accessibility, ownership, import and coverage rules; no browser |
|
|
517
507
|
| `ads audit` | axe-core (WCAG A/AA rules), ADS's non-text contrast check, `layout-shift` and `layout-overflow` at 390, 768 and 1280 px in every component, pattern and composition scenario, once per brand and theme, and in a 240 px container for components and patterns |
|
|
518
|
-
|
|
|
519
|
-
| `ads validate
|
|
520
|
-
|
|
|
521
|
-
| Stage check | After a series of accepted drafts, `ads_validate` with the validation policy and `scope:"changed"` audits everything they reached and runs the registered behavior checks |
|
|
508
|
+
| MCP acceptance | `ads_accept` checks the draft's candidate and writes no source unless it passes (`dryRun:true` writes nothing): `ads check` rules, `acceptance.scripts`, the draft owners' own registered behavior tests (`acceptance.behavior`, default `true`) and the render audit of their own UI scenarios (`acceptance.audit`, default `true`) |
|
|
509
|
+
| `ads validate` | The project gate, applying nothing: `ads check` rules, `acceptance.scripts` then `validation.scripts`, current previews, and every registered behavior test and render audit its change set reaches |
|
|
510
|
+
| `ads validate --changed` | The same for what changed since the last successful full run (configuration, foundation or token changes widen it to everything); run it after direct edits or a series of accepted drafts |
|
|
522
511
|
|
|
523
|
-
**
|
|
524
|
-
|
|
512
|
+
**Render audit.** `ads validate` always runs it over the scenarios its change set
|
|
513
|
+
reaches; draft acceptance runs it over the draft owners' own scenarios.
|
|
525
514
|
`mcp.auditPages` (1–16, default 4) sets how many pages render at once. Each `a11y-axe`,
|
|
526
|
-
`a11y-non-text-contrast`, `layout-overflow` and `layout-shift` finding is an error that fails the
|
|
515
|
+
`a11y-non-text-contrast`, `layout-overflow` and `layout-shift` finding is an error that fails the gate, and an audit that cannot run fails it with a `render-audit` error
|
|
527
516
|
naming what to install. Each `a11y-incomplete` finding is an info item that fails nothing: axe could
|
|
528
517
|
not decide that rule on those elements, so check it by hand. It names the axe rule, scenario, themes,
|
|
529
518
|
elements, and axe's reason, such as `bgGradient` for text over a gradient. The audit needs the
|
|
530
519
|
project's Playwright and a browser:
|
|
531
520
|
|
|
532
521
|
```sh
|
|
533
|
-
npm install -D @playwright/test # ads
|
|
522
|
+
npm install -D @playwright/test # ads init declares it
|
|
534
523
|
npx playwright install chromium # Bun: bunx playwright install chromium
|
|
535
524
|
```
|
|
536
525
|
|
|
537
526
|
`mcp.capture` selects `browser` (`chromium`, `firefox`, `webkit`), an installed Chrome
|
|
538
|
-
`channel` such as `"chrome"`, and `timeoutMs`. To
|
|
539
|
-
|
|
527
|
+
`channel` such as `"chrome"`, and `timeoutMs`. To turn the owners' behavior tests or
|
|
528
|
+
render audit off for draft acceptance, set them in `ds.config.json`; `ads validate`
|
|
529
|
+
always runs both:
|
|
540
530
|
|
|
541
531
|
```json
|
|
542
532
|
{
|
|
543
|
-
"acceptance": { "
|
|
544
|
-
"validation": { "
|
|
533
|
+
"acceptance": { "scripts": [], "behavior": true, "audit": false },
|
|
534
|
+
"validation": { "scripts": [], "inputs": [] }
|
|
545
535
|
}
|
|
546
536
|
```
|
|
547
537
|
|
|
@@ -551,7 +541,7 @@ component change audits only the scenarios that import it.
|
|
|
551
541
|
A render that fails because the preview dropped or was slow is retried on its own, up to 3
|
|
552
542
|
attempts, with a new browser and preview; the others keep their results, and findings never
|
|
553
543
|
cause a retry. The JSON result and the check list retried passes under `retries`, and `ads
|
|
554
|
-
audit` prints them. A scenario that still fails is a `
|
|
544
|
+
audit` prints them. A scenario that still fails is a `render-audit` error naming it and the
|
|
555
545
|
last cause, beside any findings. A project that fails validation stops the audit.
|
|
556
546
|
|
|
557
547
|
**Non-text contrast.** axe-core does not check WCAG 1.4.11, so the audit adds
|
|
@@ -605,33 +595,26 @@ set to 0 under `prefers-reduced-motion`), `a11y-text-spacing` (`--leading-normal
|
|
|
605
595
|
|
|
606
596
|
**Layout.** Widths are fluid on the grid.
|
|
607
597
|
|
|
608
|
-
`layout-fixed-width` (`ads check`) reads component, pattern and composition
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
598
|
+
`layout-fixed-width` (`ads check`) reads fixed minima in component, pattern and composition
|
|
599
|
+
styles: widths, inline sizes, flex bases and grid tracks. Fixed sizing comes from the project's
|
|
600
|
+
spatial scale, mini/fine units, standard control/icon sizes or explicit fixed-size roles.
|
|
601
|
+
Aliases and calculations retain their underlying roles, and a fixed minimum must fit the
|
|
602
|
+
spatial maximum. Projects without a spatial definition may use their shared spacing primitives.
|
|
613
603
|
|
|
614
|
-
|
|
|
604
|
+
| Construction | Result |
|
|
615
605
|
|---|---|
|
|
616
|
-
|
|
|
617
|
-
|
|
|
618
|
-
|
|
|
619
|
-
|
|
|
620
|
-
|
|
|
621
|
-
| A
|
|
622
|
-
|
|
|
623
|
-
|
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
The fix depends on the part:
|
|
630
|
-
|
|
631
|
-
- A small part stays at 96 px or less, as a plain size.
|
|
632
|
-
- A panel, column or anything else that can give way: `width: min(100%, 280px)`,
|
|
633
|
-
`flex: 1 1 280px` or a `minmax(0, 280px)` track.
|
|
634
|
-
- A part that truly stays that wide: a token listed in `layout.widthTokens`, used plainly.
|
|
606
|
+
| A fixed size from `spatial.ads.json`'s scale, including sizes above 96 px | Supported within the spatial bound |
|
|
607
|
+
| Standard control/icon size, or an alias/calculation based on a supported size | Supported within the spatial bound |
|
|
608
|
+
| A fixed minimum without a supported sizing role | `layout-fixed-width` error |
|
|
609
|
+
| `min(100%, var(--side-pane-width))`, shrinking flex bases or `minmax(0, var(--side-pane-width))` tracks | Supported responsive sizing |
|
|
610
|
+
| Percentages, fractional tracks, viewport/container units and intrinsic sizing | Supported |
|
|
611
|
+
| A maximum size, or a fixed width capped by `max-width: 100%` in the same rule | Supported cap |
|
|
612
|
+
| A token explicitly named by `layout.widthTokens` | Supported and listed for review |
|
|
613
|
+
| Fixed/hybrid tracks emitted by `@ads-layout` | Checked by local track, cap, margin and gutter algebra |
|
|
614
|
+
|
|
615
|
+
A panel can use a responsive cap or a validated hybrid region. Repeated tiles can use
|
|
616
|
+
`@ads-layout fixed`. There is no universal fixed-width pixel cutoff and no warning for a
|
|
617
|
+
legitimate responsive cap around a small part.
|
|
635
618
|
|
|
636
619
|
`layout` in `ds.config.json` has two fields:
|
|
637
620
|
|
|
@@ -647,14 +630,62 @@ The fix depends on the part:
|
|
|
647
630
|
across them) whose widths are not checked. List overlays here: dialogs, menus, popovers and
|
|
648
631
|
tooltips. There is no per-declaration exception.
|
|
649
632
|
|
|
650
|
-
`layout-declared-width`
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
entry cannot name every token or unit.
|
|
633
|
+
`layout-declared-width` lists explicit fixed roles and owners for review. A configuration
|
|
634
|
+
entry matching no token, unit or file is a `layout-config` error; an entry cannot name every
|
|
635
|
+
token or unit.
|
|
636
|
+
|
|
637
|
+
### Spatial layouts
|
|
656
638
|
|
|
657
|
-
`
|
|
639
|
+
`tokens/spatial.ads.json` defines the mini unit, sizing scale, ratios, breakpoints and gutter
|
|
640
|
+
modes. Owned Linaria styles describe layout with `@ads-layout`; ADS validates it against that
|
|
641
|
+
definition and compiles it to ordinary CSS, so placement is correct in the first render and no
|
|
642
|
+
layout wrapper component is needed. An invalid construction is a `grid-construction` error at
|
|
643
|
+
its source; an invalid definition is `grid-definition`.
|
|
644
|
+
|
|
645
|
+
| Layout | Use |
|
|
646
|
+
|---|---|
|
|
647
|
+
| `fluid` | Tracks that share the width: the breakpoint's column count, or `columns: N` |
|
|
648
|
+
| `hybrid` | Fluid tracks plus a `fixed-start` and/or `fixed-end` track (a token or `0`); `@ads-at <breakpoint> { fixed-start: …; fixed-end: … }` changes them from that breakpoint on |
|
|
649
|
+
| `fixed` | Tiles of `tile: <token>` that wrap |
|
|
650
|
+
| `flow` | A column with `row-gap`, natural content height |
|
|
651
|
+
| `inherited` | Inside a cell: continues the parent's tracks (CSS subgrid), optionally with its own `gutter` mode |
|
|
652
|
+
|
|
653
|
+
Fluid and hybrid roots also take `gutter`, `row-gap`, `margin`, `bound`, `align`, `rows` and
|
|
654
|
+
`context`. `align: start | center | end` places a capped region (`bound` other than `full`)
|
|
655
|
+
inside the available width, keeping its outer margin; the default is `center`. `rows` lists
|
|
656
|
+
1–12 row sizes, each `auto` (content height) or `fill` (shares the remaining block size), for
|
|
657
|
+
example `rows: auto fill` for a header above a body. Without `rows`, rows are implicit and
|
|
658
|
+
content-sized; ADS never invents equal rows.
|
|
659
|
+
`context: viewport` (the default) emits media queries; `context: container` applies the same
|
|
660
|
+
breakpoints to the nearest region container instead, so a layout responds to the space its
|
|
661
|
+
region has. Inherited layouts follow their parent's context.
|
|
662
|
+
|
|
663
|
+
Cells are direct children named by class or data attribute: `@ads-cell .name { … }`.
|
|
664
|
+
|
|
665
|
+
| Property | Values |
|
|
666
|
+
|---|---|
|
|
667
|
+
| `start` | A column line from 1, or `auto` to take the next free position (needs a numeric `span`). Default `1` |
|
|
668
|
+
| `span` / `end` | Columns to cover (a number or `full`), or the line to end before. Use one; a breakpoint that sets one replaces the other |
|
|
669
|
+
| `row`, `row-span` | Row line (default `auto`) and rows to cover (default 1). With `rows` declared, placement must stay within them |
|
|
670
|
+
| `visible` | `true` (default) or `false`. A hidden range compiles to a bounded query, so the element's own `display` is never overridden where it is visible |
|
|
671
|
+
| `padding`, `ratio` | A spacing token inside the cell; a supported ratio |
|
|
672
|
+
|
|
673
|
+
Two region properties:
|
|
674
|
+
|
|
675
|
+
- `container: region` makes the cell a region container for `context: container` layouts
|
|
676
|
+
inside it. A cell either continues its parent's tracks or starts a region, not both.
|
|
677
|
+
- `overlay: start | end` takes the cell out of the tracks at that breakpoint: it covers the
|
|
678
|
+
region from that inline edge and the other cells keep their tracks. `overlay: none` returns
|
|
679
|
+
it to its track. Overlays belong to root fluid or hybrid layouts.
|
|
680
|
+
|
|
681
|
+
`@ads-at <breakpoint> { start; span; end; row; row-span; overlay; visible }` changes a cell from
|
|
682
|
+
that breakpoint on. An overlay keeps its row band, so a panel placed in the body row covers the
|
|
683
|
+
body, not the header.
|
|
684
|
+
Placement is checked against the track count at every breakpoint. Outside any region
|
|
685
|
+
container, a `context: container` layout uses its narrowest placement. The starter's `Shell`
|
|
686
|
+
pattern combines hybrid tracks, overlays and a region container for its panels.
|
|
687
|
+
|
|
688
|
+
`layout-overflow` (render audit) resizes each rendered scenario, in every theme and brand, to
|
|
658
689
|
390, 768 and 1280 px. Each finding names the scenario, widths, themes, brands and elements:
|
|
659
690
|
|
|
660
691
|
- The document scrolls horizontally.
|
|
@@ -673,8 +704,8 @@ measured anyway and reported as `content-still-changing`.
|
|
|
673
704
|
The audit also renders what a scenario shows after someone acts on it, in every theme and brand.
|
|
674
705
|
Findings name the state in the selector, such as `open overlay "Edit": button` or `hover: button`.
|
|
675
706
|
The result's `coverage`, also printed as a `Covered:` line, gives what was measured. What was skipped is
|
|
676
|
-
a `
|
|
677
|
-
of its targets is a `
|
|
707
|
+
a `render-audit-skipped` info item per reason, with up to 5 examples. A render that could measure none
|
|
708
|
+
of its targets is a `render-audit-nothing-measured` review item.
|
|
678
709
|
|
|
679
710
|
- **Overlays.** It clicks each distinct control with `aria-haspopup`, up to 3 per render, once per
|
|
680
711
|
theme and brand across the audit. What opens
|
|
@@ -748,21 +779,22 @@ and binding and variable ownership are errors; Linaria atomic composition risks
|
|
|
748
779
|
`atomic-composition-review` items. See [Generic architecture guards](#generic-architecture-guards).
|
|
749
780
|
|
|
750
781
|
**Behavior.** A registered guarantee needs current passing execution evidence. `ads verify`
|
|
751
|
-
runs the registered checks against current source (`--unit` and `--check` select);
|
|
752
|
-
|
|
753
|
-
`acceptance.
|
|
782
|
+
runs the registered checks against current source (`--unit` and `--check` select);
|
|
783
|
+
`ads validate` runs every one its change set reaches, draft acceptance the draft
|
|
784
|
+
owners' own ones unless `acceptance.behavior` is `false`.
|
|
754
785
|
|
|
755
786
|
## Showcase
|
|
756
787
|
|
|
757
788
|
ADS ships a minimal browser shell, MCP client and Apps host. `ads mcp` serves the
|
|
758
789
|
website alongside its stdio connection; `ads showcase` starts the same runtime
|
|
759
790
|
for browser-only use. Run commands from the project root. Open the printed URL,
|
|
760
|
-
or use `ads_status.showcaseUrl` from an already connected runtime
|
|
761
|
-
|
|
791
|
+
or use `ads_status.showcaseUrl` from an already connected runtime: it is the URL
|
|
792
|
+
and port of the showcase that server is running. An available loopback port is
|
|
793
|
+
selected by default; `--port 4185` selects a fixed port.
|
|
762
794
|
`ads mcp --no-showcase` keeps a headless stdio server.
|
|
763
795
|
|
|
764
796
|
The client negotiates the current modern MCP protocol, discovers menus with
|
|
765
|
-
`ads_tokens`/`ads_scenarios`, invokes `
|
|
797
|
+
`ads_tokens`/`ads_scenarios`, invokes `ads_show_scenario` and renders
|
|
766
798
|
Apps through the official bridge. It refreshes menus on catalogue notifications
|
|
767
799
|
and refreshes the active scenario in the same App after a successful build. Errors identify
|
|
768
800
|
stale retained output. Its neutral header and left pane align and collapse
|
|
@@ -772,24 +804,17 @@ or direct component imports are used by this client.
|
|
|
772
804
|
The project owns implementations, colocated scenarios/fixtures, foundation
|
|
773
805
|
CSS and a framework mount adapter. ADS supplies its native Bun preview compiler.
|
|
774
806
|
The starter and init provide the mount under `design-system/showcase/mcp/`.
|
|
775
|
-
Configure the framework
|
|
807
|
+
Configure the framework; ADS compiles every scenario into one shared preview graph:
|
|
776
808
|
|
|
777
809
|
```json
|
|
778
810
|
{
|
|
779
811
|
"framework": "react",
|
|
780
812
|
"mcp": {
|
|
781
|
-
"showcaseTitle": "My Project Design System"
|
|
782
|
-
"previewManifest": ".ds/preview/manifest.json"
|
|
813
|
+
"showcaseTitle": "My Project Design System"
|
|
783
814
|
}
|
|
784
815
|
}
|
|
785
816
|
```
|
|
786
817
|
|
|
787
|
-
For direct editing with an externally managed builder, add `previewWatch: false`
|
|
788
|
-
and run `ads compile .` or manage `ads compile . --watch` outside MCP. MCP then
|
|
789
|
-
serves published resources/evidence without starting a compiler. Existing views
|
|
790
|
-
can stay visible, but changed-source evidence stays stale until a verified update
|
|
791
|
-
is published. See [editing workflows](../skills/ads-designer/references/workflows.md).
|
|
792
|
-
|
|
793
818
|
Keep the saved `framework` (`react` or `preact`), JSX transform and mount adapter
|
|
794
819
|
consistent. The optional title defaults to the project package name followed by
|
|
795
820
|
` · Design System`. The browser shell stays the same for both frameworks. There is
|
|
@@ -797,7 +822,7 @@ one managed compiler per runtime, shared by stdio and HTTP clients. It builds
|
|
|
797
822
|
a shared multi-entry graph on first demand and after source changes; the App
|
|
798
823
|
loads only the selected scenario's dependencies. TSX/Linaria compilation still
|
|
799
824
|
happens automatically. Accepted configuration-unit mutations replace the managed
|
|
800
|
-
compiler while keeping MCP connected.
|
|
825
|
+
compiler while keeping MCP connected. Configuration or dependency
|
|
801
826
|
changes may require restarting the runtime; ordinary owner/fixture/style/asset edits do not.
|
|
802
827
|
See [the compiler contract](MCP.md#one-client-command-managed-preview-builds) for revisions,
|
|
803
828
|
diagnostics, invalidation and the shared resource graph.
|
|
@@ -844,29 +869,35 @@ behavior or capture references whose path-derived IDs change.
|
|
|
844
869
|
|
|
845
870
|
Ungrouped entries remain directly visible without a Default heading. Named groups
|
|
846
871
|
are collapsible and sorted alphabetically within each layer. Existing flat
|
|
847
|
-
projects continue to work without moving files.
|
|
872
|
+
projects continue to work without moving files. Token views follow the catalogue's groups.
|
|
848
873
|
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
874
|
+
ADS renders the **Tokens** section itself from the token sheets and
|
|
875
|
+
`<dsDir>/tokens/catalog.ads.json`. Token navigation follows the same model as folders: a
|
|
876
|
+
catalogue group is a sidebar group, and each kind of token in it (color fills, text colors,
|
|
877
|
+
font families, text sizes, line heights, shadows…) is one view, `tokens/<Group>/<section>`, so a page shows one kind at a
|
|
878
|
+
time. A group with a single kind stays one view, `tokens/<Group>`; the `Layout` group stays one
|
|
879
|
+
view with the spatial reference. The section follows from each token's sample property, so there
|
|
880
|
+
is no section metadata. As on component pages, each sample sits on the project canvas in a box
|
|
881
|
+
while names and values sit on the showcase surface. The catalogue lists groups and gives each token its sample binding:
|
|
853
882
|
|
|
854
|
-
```
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
883
|
+
```json
|
|
884
|
+
{
|
|
885
|
+
"schemaVersion": 1,
|
|
886
|
+
"groups": [
|
|
887
|
+
{ "id": "Color", "title": "Color", "samples": [
|
|
888
|
+
{ "token": "--accent", "property": "background-color", "probe": "rgb(31, 97, 163)" }
|
|
889
|
+
] }
|
|
890
|
+
]
|
|
891
|
+
}
|
|
859
892
|
```
|
|
860
893
|
|
|
861
|
-
`
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
`token-scenario-render` and `token-scenario-coverage` enforce real references and
|
|
869
|
-
coverage for every token. The same source/style/import checks apply under tokens/.
|
|
894
|
+
`property` is the CSS property the view demonstrates the token with, and `probe` a valid test
|
|
895
|
+
value different from the token's own; the view checks in the browser that the property responds.
|
|
896
|
+
Tokens without a catalogue entry appear in a **Values** group with a default binding for their
|
|
897
|
+
type. The `Layout` group's view also shows the spatial definition's examples. An invalid
|
|
898
|
+
catalogue is a `foundation-catalog` error. Projects author no token scenarios or token review
|
|
899
|
+
renderers: a project scenario with a foundation view's ID fails. (An additional project scenario
|
|
900
|
+
that claims tokens is still checked by `token-scenario-reference` and `token-scenario-render`.)
|
|
870
901
|
|
|
871
902
|
Fixtures/adapters own development inputs, state, callbacks and simulated services.
|
|
872
903
|
The entry requires no browser page, application router/store or prior setup.
|
|
@@ -878,17 +909,17 @@ coverage for every public renderable component/pattern, including unused exports
|
|
|
878
909
|
Only reachable real render references count. Types/constants/utilities are
|
|
879
910
|
excluded. Scenarios and fixture helpers are development-only; runtime code and
|
|
880
911
|
the public barrel cannot import or re-export them. They define no CSS, custom
|
|
881
|
-
classes or native widget replicas.
|
|
882
|
-
patterns; the outer browser shell is tooling UI. Full-app integration harnesses
|
|
912
|
+
classes or native widget replicas. Project-specific review helpers use marked `.ads.review.*` files; the outer browser shell is tooling UI. Full-app integration harnesses
|
|
883
913
|
belong in application tests. See the [contract](ADS.md#showcase-contract).
|
|
884
914
|
|
|
885
915
|
The showcase header's **Phone viewport** toggle constrains the real preview iframe to 390 CSS pixels (or the available width on a narrower screen). It is available for patterns and compositions as well as components, keeps the mounted example and its state, and does not change the selected application host. Use it to review a responsive web shell at phone width independently of a native mobile app shell. `?viewport=phone` preserves this preview choice in a link; toggle it off to follow the available browser width. On phone browsers the catalogue starts collapsed, leaving the available width to the preview; the navigation button can reopen it. Automated captures retain their exact requested viewport.
|
|
886
916
|
|
|
887
|
-
For this checkout, `
|
|
888
|
-
`
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
917
|
+
For this checkout, `bun run dev:showcase` builds the tool and serves an initialized
|
|
918
|
+
Preact starter under ignored `.ds/playground/`. `bun run dev:react` selects React.
|
|
919
|
+
The design source is `starters/shared/`; restart after editing it to generate a new
|
|
920
|
+
playground snapshot. `bun run build:showcase` compiles that starter’s scenarios.
|
|
921
|
+
The playground and receiving projects use the same initializer and packaged source.
|
|
922
|
+
The built-in client reads discovery through MCP. Existing custom showcases
|
|
892
923
|
are preserved by init; replace their run command deliberately when migrating.
|
|
893
924
|
|
|
894
925
|
Run core and registered project checks before preview compilation, alongside
|
|
@@ -915,19 +946,16 @@ Keep original artwork (SVG masters, finished PNG/JPEG/WebP images, delivered
|
|
|
915
946
|
`.ico`/`.icns` files, in any mix) and a usage/credits/license README in
|
|
916
947
|
`design-system/assets/brand/`, and font files in `assets/fonts/`. `ads check` fails
|
|
917
948
|
when artwork is undescribed in that README (`brand-readme`), the README states no
|
|
918
|
-
license (`brand-license`), artwork
|
|
919
|
-
(`brand-preview`), and lists artwork nothing uses for review (`brand-unused`). Name a dark-theme variant
|
|
949
|
+
license (`brand-license`), and lists artwork nothing uses for review (`brand-unused`). Name a dark-theme variant
|
|
920
950
|
`<name>.dark.svg`; the component showing it renders both and shows each with a display switch
|
|
921
|
-
(`display: var(--display-dark, block)`).
|
|
922
|
-
section, **Brand
|
|
923
|
-
|
|
924
|
-
`BrandPreview`). They show artwork in the current theme and the app icon at its
|
|
925
|
-
sizes, and have no token samples. A finished image renders only at or below its own
|
|
951
|
+
(`display: var(--display-dark, block)`). ADS renders the showcase's first
|
|
952
|
+
section, **Brand** (`brand/Assets`), from the artwork in `assets/brand/` and its subfolders: artwork in the
|
|
953
|
+
current theme and the app icon at its actual sizes. Projects author no brand preview scenarios. A finished image renders only at or below its own
|
|
926
954
|
pixel size; ADS never enlarges it. The [branding guide](../skills/ads-designer/references/branding.md)
|
|
927
955
|
(`ads://guides/branding`) covers the whole flow. Font declarations
|
|
928
|
-
belong in optional `tokens/fonts.css
|
|
929
|
-
|
|
930
|
-
themes.generated.css.
|
|
956
|
+
belong in optional `tokens/fonts.css`. ADS generates the import-only foundation entry
|
|
957
|
+
(`styles.css`) from the sheets present, in this order: fonts, colors, typography, spacing,
|
|
958
|
+
elevation, base, themes.generated.css. Never edit it by hand.
|
|
931
959
|
Fixed artwork colors and geometry are permitted inside SVG assets; they do not
|
|
932
960
|
permit raw visual values in component or pattern styles.
|
|
933
961
|
|
|
@@ -1004,9 +1032,9 @@ file's source and rule in `assets/logos/README.md`.
|
|
|
1004
1032
|
|
|
1005
1033
|
### Tokens, grid, icons and accessibility
|
|
1006
1034
|
|
|
1007
|
-
`ads
|
|
1035
|
+
`ads init` starts a design system from a token foundation in six groups (Color, Type, Space &
|
|
1008
1036
|
sizing, Shape & elevation, Motion, Layout) whose roles meet WCAG 2.2 AA in both themes,
|
|
1009
|
-
a
|
|
1037
|
+
a spatial definition with `@ads-layout` constructions (see [Spatial layouts](#spatial-layouts)), and an icon set with `Icon` and
|
|
1010
1038
|
`IconButton`. Keep the token names and change values to brand a project.
|
|
1011
1039
|
|
|
1012
1040
|
`ads check` reports two kinds of finding. **Errors** fail `ads check`, validation and
|
|
@@ -1015,16 +1043,24 @@ acceptance: contrast per theme and brand (`token-contrast`), the 2 px spacing rh
|
|
|
1015
1043
|
`a11y-text-resize`, `a11y-reduced-motion`, `a11y-text-spacing`, `a11y-image-alt`,
|
|
1016
1044
|
`a11y-icon-label`), glyph sets (`glyph-viewbox`, `glyph-color`), control padding
|
|
1017
1045
|
(`control-padding`: a control sized with `--control-height-<size>` pads its sides with
|
|
1018
|
-
`--control-padding-<size>`, or `--control-inset` inside a track),
|
|
1046
|
+
`--control-padding-<size>`, or `--control-inset` inside a track), declared artwork/text
|
|
1047
|
+
relationships (`lockup-construction`), and the theme, brand and
|
|
1019
1048
|
brand-artwork rules below. **Review items** never block; each names something only a person
|
|
1020
1049
|
can judge: `atomic-composition-review`, `token-overlap-review`, `pointer-capture-review`,
|
|
1021
1050
|
`scenario-exercise-review`, `a11y-keyboard`, `brand-unused` and `render-color-probe`.
|
|
1022
1051
|
**Info** items (`atomic-composition-limit`) note an analysis limit. There is no setting that
|
|
1023
|
-
changes a finding's kind. The showcase's grid button
|
|
1024
|
-
|
|
1052
|
+
changes a finding's kind. The showcase's layout-grid button inspects actual rendered grid
|
|
1053
|
+
containers. Its **Icons** tab shows the glyph set: every glyph at the size used beside
|
|
1025
1054
|
text, each one on its grid at every `--icon-*` size with its aliases and glyph errors, and
|
|
1026
1055
|
each file in `assets/logos/` as it is, on a white and a black tile.
|
|
1027
1056
|
|
|
1057
|
+
Use `@ads-lockup` in an owned Linaria style to declare the artwork hook, text-group
|
|
1058
|
+
hook and size token for a logo/icon beside text. It centers the artwork and aligns
|
|
1059
|
+
the text runs, preserving intrinsic artwork proportions. The blocking check rejects
|
|
1060
|
+
conflicting styles and unresolved hooks; it does not restrict standalone artwork
|
|
1061
|
+
or prove optical balance. See the [worked branding example](../skills/ads-designer/references/branding.md#aligning-artwork-with-text)
|
|
1062
|
+
for markup, font trimming, browser support and review boundaries.
|
|
1063
|
+
|
|
1028
1064
|
`ads audit` runs `ads check` first. A policy error such as `layout-fixed-width` or `img-attributes`
|
|
1029
1065
|
does not stop it: it renders every scenario and reports those errors with its own, and exits 1. Only
|
|
1030
1066
|
an error that stops rendering blocks it (`source-syntax`, `css-syntax`, `project-structure`,
|
|
@@ -1035,13 +1071,13 @@ It adds a rendered check: axe-core (WCAG A/AA rules) in every component, pattern
|
|
|
1035
1071
|
and composition scenario, once per declared brand and theme (`--scenario`, `--theme` and
|
|
1036
1072
|
`--brand` narrow it). Each violation is an `a11y-axe` error naming the axe rule, WCAG
|
|
1037
1073
|
criterion, themes and brands, failing elements and help link, and `ads audit` exits 1. It
|
|
1038
|
-
needs the project's Playwright and browser, as captures do.
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
`layout-overflow` error rejects the change.
|
|
1074
|
+
needs the project's Playwright and browser, as captures do. `ads validate` runs it too,
|
|
1075
|
+
over every scenario its change set reaches; MCP draft acceptance audits the draft
|
|
1076
|
+
owners' own scenarios before writing source unless `acceptance.audit` is `false`, and an
|
|
1077
|
+
`a11y-axe`, `a11y-non-text-contrast` or `layout-overflow` error rejects the change.
|
|
1043
1078
|
`ads tokens --format dtcg` exports the tokens as W3C Design Tokens JSON for design tools
|
|
1044
|
-
(`--theme <name>` and `--brand <name>` select one context).
|
|
1079
|
+
(`--theme <name>` and `--brand <name>` select one context). MCP clients read the same export
|
|
1080
|
+
from `ads://project/tokens/dtcg` (`?theme=` and `?brand=`).
|
|
1045
1081
|
|
|
1046
1082
|
`themes` in `ds.config.json` declares the themes (a name and the color scheme for native
|
|
1047
1083
|
controls; the first is the default), and the optional `brands` the brands (the first is the
|
|
@@ -1132,7 +1168,7 @@ Application manifest metadata and other platform exports remain project-owned.
|
|
|
1132
1168
|
| Primitive state | State-variable overrides outside components; undocumented non-state component variables |
|
|
1133
1169
|
| Literal visual values | Absolute/font-relative lengths (including `ch` and root font units), durations and color/effect formulas require tokens; geometry angles and responsive viewport/container relationships remain available |
|
|
1134
1170
|
| Fixed token ownership | Foreign token names, shared token overrides, misplaced component/pattern/showcase variables, and noncanonical foundation imports |
|
|
1135
|
-
| Showcase ownership | Fixture CSS/Linaria definitions, custom JSX classes, native controls/widget roles, state styling, private CSS/aliased imports,
|
|
1171
|
+
| Showcase ownership | Fixture CSS/Linaria definitions, custom JSX classes, native controls/widget roles, state styling, private CSS/aliased imports, catalogue dependencies of a project's own showcase pages and source ownership, and runtime imports of fixtures/test helpers |
|
|
1136
1172
|
| Scenario coverage | All public renderable UI has path-discovered entries, colocated fixtures, literal metadata and reachable public render references; runtime imports of scenarios/fixtures are rejected |
|
|
1137
1173
|
| Data access | Direct global fetch/XHR/WebSocket/EventSource in ADS source is rejected; injected services, workers and lazy imports remain allowed |
|
|
1138
1174
|
| Showcase coverage | Public ADS UI referenced by production JSX/React `createElement` has showcase render references; imports and tests alone do not count |
|
|
@@ -1143,27 +1179,6 @@ queries. ADS implementations and showcase fixtures cannot import app code.
|
|
|
1143
1179
|
Private imports within ADS implementations remain allowed, including when the ADS
|
|
1144
1180
|
is nested inside `src/`. Application integration harnesses belong in test support.
|
|
1145
1181
|
|
|
1146
|
-
Projects that explicitly choose Oxlint may use the optional adapter below.
|
|
1147
|
-
Declare it as a project dependency and run `ads lint-config` followed by Oxlint
|
|
1148
|
-
in an explicit project script; ADS acceptance and validation do not run it
|
|
1149
|
-
automatically:
|
|
1150
|
-
|
|
1151
|
-
```json
|
|
1152
|
-
{
|
|
1153
|
-
"oxlint": {
|
|
1154
|
-
"plugins": [{ "name": "project", "path": "scripts/oxlint-project.mjs" }],
|
|
1155
|
-
"rules": { "project/domain-usage": "error" },
|
|
1156
|
-
"overrides": [
|
|
1157
|
-
{ "files": ["src/test/**"], "rules": { "project/domain-usage": "off" } }
|
|
1158
|
-
]
|
|
1159
|
-
}
|
|
1160
|
-
}
|
|
1161
|
-
```
|
|
1162
|
-
|
|
1163
|
-
Override patterns are project-relative, cannot escape the project, and configure
|
|
1164
|
-
Oxlint only. They do not suppress architecture checks from `ads check`. A plugin
|
|
1165
|
-
can import development-only `loadConfig`, `importResolver`, and `styleWriteViolation`
|
|
1166
|
-
from `@reqvire-org/ads` when it needs the same validated boundaries as core.
|
|
1167
1182
|
Unknown configuration fields fail rather than silently weakening checks.
|
|
1168
1183
|
|
|
1169
1184
|
Notification usage can be enforced directly by ADS, without a project lint
|
|
@@ -1182,7 +1197,7 @@ plugin or another parse/lint pass:
|
|
|
1182
1197
|
}
|
|
1183
1198
|
```
|
|
1184
1199
|
|
|
1185
|
-
`api` and `host` name exports imported from
|
|
1200
|
+
`api` and `host` name exports imported from `@ds`. ADS
|
|
1186
1201
|
recognizes named aliases and namespace imports, respecting shadowed bindings.
|
|
1187
1202
|
It rejects direct module/render calls and calls in `use server` modules, requires
|
|
1188
1203
|
a stable `id` for directly effect-created notifications with inspectable options,
|
|
@@ -1208,7 +1223,8 @@ Keep renderer-, framework-, and component-specific project guards too. The
|
|
|
1208
1223
|
shared tool does not validate a third-party graph renderer's own APIs, arbitrary
|
|
1209
1224
|
runtime spreads, or the semantic meaning of a
|
|
1210
1225
|
measured value. Register project-specific guard scripts in the existing build
|
|
1211
|
-
and
|
|
1226
|
+
and configured acceptance/validation scripts. The project's own linter remains
|
|
1227
|
+
an independent build tool.
|
|
1212
1228
|
|
|
1213
1229
|
### Project boundaries and assets
|
|
1214
1230
|
|
|
@@ -1254,7 +1270,7 @@ match. `generatedFiles` names asset-relative paths forbidden in those source
|
|
|
1254
1270
|
directories; nothing is inferred from filenames such as `favicon.ico`.
|
|
1255
1271
|
|
|
1256
1272
|
`generatedPaths` names project-relative files or directories that must not be
|
|
1257
|
-
tracked.
|
|
1273
|
+
tracked. A project's own `dist-showcase/` build output is also treated as generated;
|
|
1258
1274
|
the built-in client uses project preview artifacts under `.ds/`.
|
|
1259
1275
|
Git inspects tracked files, including nested workspaces. Outside a Git repo,
|
|
1260
1276
|
there are no tracked outputs to check; other asset checks still run. Real Git
|
|
@@ -1271,48 +1287,27 @@ Paths stay within the receiving project:
|
|
|
1271
1287
|
"schemaVersion": 1,
|
|
1272
1288
|
"sourceDir": "src",
|
|
1273
1289
|
"dsDir": "design-system",
|
|
1274
|
-
"publicAlias": "@ds",
|
|
1275
|
-
"publicEntry": "index.ts",
|
|
1276
|
-
"reviewEntry": "review/index.ts",
|
|
1277
|
-
"stylesEntry": "styles.css",
|
|
1278
|
-
"tokenDir": "tokens",
|
|
1279
1290
|
"themes": [{ "name": "light", "scheme": "light" }, { "name": "dark", "scheme": "dark" }],
|
|
1280
|
-
"layout": { "widthTokens": [], "fixedWidthUnits": [] }
|
|
1281
|
-
"oxlint": { "plugins": [], "rules": {} }
|
|
1291
|
+
"layout": { "widthTokens": [], "fixedWidthUnits": [] }
|
|
1282
1292
|
}
|
|
1283
1293
|
```
|
|
1284
1294
|
|
|
1285
1295
|
`layout` declares allowed width tokens and owners with fixed widths; see
|
|
1286
|
-
[Checks and guards](#checks-and-guards).
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1296
|
+
[Checks and guards](#checks-and-guards). Inside `dsDir` the layout is fixed:
|
|
1297
|
+
ADS generates the public barrel `index.ts`, the review entry `review/index.ads.review.ts`
|
|
1298
|
+
and the styles entry `styles.css`, and token sheets live in `tokens/`. ADS writes
|
|
1299
|
+
the barrels from the owners' `<Owner>.ads.exports.ts` files and the styles entry
|
|
1300
|
+
from the token sheets (`ads assets`, the showcase and the MCP server); `ads check`
|
|
1301
|
+
reports one that is stale or edited by hand. The app imports the design system as
|
|
1302
|
+
`@ds` and its development layer as `@ds/review`.
|
|
1291
1303
|
|
|
1292
1304
|
These source-layout defaults apply when the file is absent; the example omits
|
|
1293
1305
|
the required init-time framework choice. Run `ads init --framework react` (or
|
|
1294
|
-
`preact`) to save it. To use
|
|
1295
|
-
|
|
1306
|
+
`preact`) to save it. To use other folders, write this configuration before init. Configure TypeScript and the app bundler to resolve
|
|
1307
|
+
`@ds` to `<dsDir>/index.ts`; this file does not rewrite their configuration.
|
|
1296
1308
|
|
|
1297
1309
|
Colocate component-specific guards with their owner and register their command
|
|
1298
|
-
in the project build
|
|
1299
|
-
be configured explicitly:
|
|
1300
|
-
|
|
1301
|
-
```json
|
|
1302
|
-
{
|
|
1303
|
-
"oxlint": {
|
|
1304
|
-
"plugins": [
|
|
1305
|
-
{ "name": "project-ui", "path": "scripts/oxlint-project-ui.mjs" }
|
|
1306
|
-
],
|
|
1307
|
-
"rules": { "project-ui/feature-usage": "error" }
|
|
1308
|
-
}
|
|
1309
|
-
}
|
|
1310
|
-
```
|
|
1311
|
-
|
|
1312
|
-
Merge that section into the project configuration and explicitly run
|
|
1313
|
-
`ads lint-config` followed by the project linter.
|
|
1314
|
-
Generated configuration registers `ads/public-import`, `ads/no-inline-style`, `ads/no-app-import`, and
|
|
1315
|
-
explicit project plugins. Core tooling imports no particular component.
|
|
1310
|
+
in the project build or in `acceptance.scripts`. Core tooling imports no particular component.
|
|
1316
1311
|
Registered project configuration and build helpers may import one another;
|
|
1317
1312
|
native ADS import guards enforce this boundary. It does not
|
|
1318
1313
|
allow application code to import private ADS modules or build helpers to import
|
|
@@ -1328,8 +1323,7 @@ permissions together in its draft.
|
|
|
1328
1323
|
not broad styling exceptions. Ignore `.ds/`; generated paths refer to the project
|
|
1329
1324
|
and its locally installed tool.
|
|
1330
1325
|
|
|
1331
|
-
|
|
1332
|
-
package-manager hooks, run the installed tool directly:
|
|
1326
|
+
For native ADS gates outside package-manager hooks, run the installed tool directly:
|
|
1333
1327
|
|
|
1334
1328
|
```sh
|
|
1335
1329
|
ads check .
|
|
@@ -1379,29 +1373,47 @@ See [CONTRACTS.md](CONTRACTS.md) for exact fields, supported producer forms and
|
|
|
1379
1373
|
source/browser limits. Only `.ads.`-marked filenames are development roles.
|
|
1380
1374
|
|
|
1381
1375
|
Project scale policies remain explicit. A registered check can call
|
|
1382
|
-
`inspectTokenOrigins(inspectTokens(root), target, {stopAt: allowedSharedTokens})`
|
|
1376
|
+
`inspectTokenOrigins(await inspectTokens(root), target, {stopAt: allowedSharedTokens})`
|
|
1383
1377
|
from the tooling package. Check `aliasOnly` for strict alias-only policies across
|
|
1384
1378
|
all themes; inspect `literals`/`diagnostics` for raw values, cycles and limits.
|
|
1385
1379
|
Choose exact targets/origins and documented geometry exceptions in project code;
|
|
1386
|
-
register the command in `acceptance.
|
|
1380
|
+
register the command in `acceptance.scripts` and the normal build. ADS owns no
|
|
1387
1381
|
universal spacing scale and infers no design meaning from token names.
|
|
1388
1382
|
|
|
1389
1383
|
## Releasing the ADS tool
|
|
1390
1384
|
|
|
1391
1385
|
Run the complete tool, browser and packed npm/Bun suite locally before tagging.
|
|
1392
1386
|
Commit the implementation, documentation and package version first, then run
|
|
1393
|
-
`
|
|
1394
|
-
|
|
1395
|
-
|
|
1387
|
+
`bun run release:verify` with Bun, Chrome, and npm and Node available (the packed
|
|
1388
|
+
tests install ADS into an npm project and check the Node-facing exports). The suite
|
|
1389
|
+
runs the same grouped command as `bun run test`: one shared build, then unit,
|
|
1390
|
+
integration and browser groups. Defaults are 4 unit file workers with up to 4
|
|
1391
|
+
concurrent cases per file, 2 integration workers and 4 browser workers. All three
|
|
1392
|
+
groups overlap after the build. All per-group overrides also
|
|
1393
|
+
apply to release verification; see [test configuration](../tests/README.md).
|
|
1394
|
+
Bun's optional `[test] smol = true` in
|
|
1395
|
+
`bunfig.toml` reduces heap growth through more frequent garbage collection; it
|
|
1396
|
+
can slow tests and is not a hard limit for the runner or its compiler/browser
|
|
1397
|
+
children. Use an OS/container limit when a hard memory cap is needed.
|
|
1398
|
+
The runner rejects failed or skipped tests, and
|
|
1396
1399
|
refuses uncommitted inputs or source changes during the run.
|
|
1397
1400
|
|
|
1401
|
+
`make test` runs the same full suite; `make test-grid` uses serial compact dots
|
|
1402
|
+
and `make test-analysis` runs the focused analysis tests. `make release-verify`
|
|
1403
|
+
records release evidence and `make release-proof` verifies it. These targets
|
|
1404
|
+
enable terminal colors. Direct `bun run release:verify` also preserves colors
|
|
1405
|
+
while saving its output. To disable them, use `make test FORCE_COLOR=0` or
|
|
1406
|
+
`FORCE_COLOR=0 bun run release:verify`.
|
|
1407
|
+
|
|
1398
1408
|
A successful run writes a generated verification stamp under the matching
|
|
1399
1409
|
version in `docs/CHANGELOG.md`. It records the tested implementation commit,
|
|
1400
1410
|
command, counts, runtimes, completion time, duration, source SHA-256 and log
|
|
1401
|
-
SHA-256
|
|
1411
|
+
SHA-256, per-group counts/report hashes and explicit test-setting overrides.
|
|
1412
|
+
All three fresh JUnit reports must pass without skips. The full log remains in
|
|
1413
|
+
`output/local-tests.log`; group reports are in `output/local-tests.junit/`. Commit that stamp
|
|
1402
1414
|
and tag the resulting commit. Do not hand-author a passing stamp.
|
|
1403
1415
|
|
|
1404
|
-
`
|
|
1416
|
+
`bun run release:proof` verifies that the tested commit is an ancestor and its
|
|
1405
1417
|
source digest matches both the release tree and working inputs. Only generated
|
|
1406
1418
|
proof blocks and the machine-specific, unpackaged `.mcp.json` launcher are
|
|
1407
1419
|
excluded from the digest; other tracked changes require another local run.
|