@reqvire-org/ads 0.4.0 → 0.4.3
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 +115 -87
- package/dist/a11y.mjs +133 -48
- 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 +142 -0
- package/dist/analysis/impact.mjs +20 -0
- package/dist/analysis/inputs.mjs +22 -0
- package/dist/analysis/module-resolvers.mjs +46 -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 +153 -0
- package/dist/analysis/standalone.mjs +57 -0
- package/dist/analysis/syntax.mjs +179 -0
- package/dist/analysis/worker.mjs +182 -0
- package/dist/assets.mjs +6 -6
- 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 +140 -41
- 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 +44 -58
- package/dist/check.mjs +754 -188
- package/dist/cli.mjs +200 -99
- package/dist/color-values.mjs +21 -21
- package/dist/component-contrast.mjs +127 -9
- package/dist/config.mjs +303 -135
- package/dist/construction-styles.cjs +10 -0
- package/dist/contrast-composition.mjs +134 -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 +9 -5
- package/dist/font-rules.mjs +22 -17
- package/dist/fonts-generated.mjs +23 -16
- package/dist/foundation-views.mjs +242 -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 +143 -66
- 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 +903 -281
- package/dist/mcp/execution-coordinator.mjs +417 -167
- package/dist/mcp/execution-results.mjs +7 -7
- package/dist/mcp/mutations.mjs +673 -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 +2409 -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/pictogram-model.mjs +59 -0
- package/dist/pictograms.mjs +52 -0
- package/dist/preview-bun.mjs +494 -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 +15 -5
- 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/render-audit/pictograms.mjs +88 -0
- package/dist/{browser-audit → render-audit}/render-states.mjs +208 -52
- package/dist/{browser-audit → render-audit}/worker.mjs +98 -30
- package/dist/render-audit.mjs +838 -0
- package/dist/render-color-probe.mjs +96 -42
- package/dist/render-composition.mjs +164 -0
- 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 +21 -3
- package/dist/showcase/favicon.ico +0 -0
- package/dist/showcase/favicon.svg +1 -0
- package/dist/showcase/foundation-view.css +58 -0
- package/dist/showcase/foundation-view.mjs +255 -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/pictogram-view.mjs +53 -0
- 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 +1064 -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 +143 -120
- package/dist/skills/ads-designer/references/accessibility.md +78 -15
- 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 +101 -24
- 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/performance.md +3 -2
- package/dist/skills/ads-designer/references/pictograms.md +131 -0
- 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 +58 -344
- 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 +270 -129
- 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/assets/pictograms/catalog.ads.json +13 -0
- package/dist/starters/react/design-system/assets/pictograms/journey.dark.svg +7 -0
- package/dist/starters/react/design-system/assets/pictograms/journey.svg +7 -0
- 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/components/Content/Pictogram/Pictogram.ads.exports.ts +1 -0
- package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.ads.fixture.ts +1 -0
- package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.ads.scenario.tsx +7 -0
- package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.tsx +26 -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 +209 -99
- package/dist/usage.mjs +138 -38
- package/dist/validation-checks.mjs +115 -38
- package/dist/validation-inputs.mjs +191 -78
- package/dist/validation.mjs +268 -102
- package/dist/verification/browser.mjs +27 -5
- package/dist/verification.mjs +711 -187
- package/docs/ADS.md +96 -80
- package/docs/ARCHITECTURE.md +368 -137
- package/docs/BEHAVIORS.md +29 -25
- package/docs/CACHING.md +77 -17
- package/docs/CHANGELOG.md +332 -17
- package/docs/CONTRACTS.md +12 -4
- package/docs/DESIGN-REFERENCES.md +40 -0
- package/docs/GUIDE.md +300 -263
- package/docs/MCP.md +187 -324
- package/docs/SPATIAL-CHECKS.md +69 -0
- package/docs/benchmarks/README.md +39 -0
- package/package.json +43 -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
|
@@ -1,412 +0,0 @@
|
|
|
1
|
-
# Controllers and behavioral verification
|
|
2
|
-
|
|
3
|
-
Controllers own reusable UI behavior: state, subscriptions, DOM measurements and
|
|
4
|
-
lifecycle coordination. A controller may be a class, function, hook, state
|
|
5
|
-
machine or context provider. Linaria and tokens own its consumers' visual design.
|
|
6
|
-
|
|
7
|
-
Private controllers stay inside their component/pattern mutation unit. Shared
|
|
8
|
-
controllers use `design-system/controllers/<Name>/` with an `index` entry or a
|
|
9
|
-
runtime file matching the directory name. The unit ID is `controllers/<Name>`.
|
|
10
|
-
Its implementation, tests and guides can change together, including only its own
|
|
11
|
-
required public re-exports. A shared controller needs no artificial visual preview.
|
|
12
|
-
Consumers normally create separate instances; sharing implementation does not
|
|
13
|
-
implicitly share state.
|
|
14
|
-
|
|
15
|
-
Use the project's `framework` from `ds.config.json` for framework-specific APIs.
|
|
16
|
-
Plain TypeScript, browser APIs and local behavior helpers remain supported.
|
|
17
|
-
Declare external dependencies in the project package. ADS does not install them
|
|
18
|
-
or assume a renderer/library supplied by an MCP host. The framework field selects
|
|
19
|
-
compilation/mounting; controller checks also validate runtime imports. Type-only
|
|
20
|
-
UI references are allowed, but shared controllers cannot import component/pattern
|
|
21
|
-
runtime implementations. Keep business data in application adapters. Measured
|
|
22
|
-
style writes retain the exact properties declared in the owner contract's
|
|
23
|
-
`styles.writes`; they do not allow
|
|
24
|
-
shared-token overrides or an extra styling layer.
|
|
25
|
-
Projects explicitly approve installed runtime packages through
|
|
26
|
-
`behaviorLibraries` in `ds.config.json`; each must also be a `package.json`
|
|
27
|
-
dependency. Components, patterns and controllers may use them directly, including
|
|
28
|
-
package subpaths. Extract a shared controller when behavior is shared. Type-only
|
|
29
|
-
and development-role imports retain their existing rules. An empty/missing list
|
|
30
|
-
allows no additional runtime packages beyond the configured framework and Linaria.
|
|
31
|
-
ADS checks declarations and installed versions, not third-party source or
|
|
32
|
-
transitive dependency trees. The preview build bundles used code normally inside
|
|
33
|
-
the MCP App sandbox. Existing project styling and measured-geometry guards keep
|
|
34
|
-
their scope; declaration creates no broad style-write permissions.
|
|
35
|
-
These gates inspect supported direct imports, markup and style boundaries.
|
|
36
|
-
External package internals and delegated DOM behavior still require source,
|
|
37
|
-
build and browser review; declaring a dependency does not prove it is headless.
|
|
38
|
-
|
|
39
|
-
Register owner behavior in `<Owner>.ads.contract.ts` with actual API and
|
|
40
|
-
implementation references. The
|
|
41
|
-
[contract reference](contracts.md) covers static authoring, `.ads.behavior.spec.ts`,
|
|
42
|
-
declarative `exercises` and required browser checks.
|
|
43
|
-
A contract declaration alone is not passing evidence. Use
|
|
44
|
-
`auditBehaviorPaints(frame)` after relevant binding updates to repeat the current
|
|
45
|
-
App's generic paint audit, in addition to assertions for the named guarantee.
|
|
46
|
-
|
|
47
|
-
## Development boundary
|
|
48
|
-
|
|
49
|
-
Production includes real components, controllers, tokens and compiled styles.
|
|
50
|
-
Scenarios and fixtures are included only in previews. Owner contracts and test
|
|
51
|
-
files are development/tooling inputs. Runtime imports and public re-exports of
|
|
52
|
-
those inputs are rejected, including dynamic imports and aliases.
|
|
53
|
-
|
|
54
|
-
## Register guarantees
|
|
55
|
-
|
|
56
|
-
An optional `<Owner>.ads.contract.ts` belongs to one unit. Owners without a
|
|
57
|
-
behavior declaration have no implied behavioral verification. ADS reads the
|
|
58
|
-
contract statically; it does not execute these imports or a project command:
|
|
59
|
-
|
|
60
|
-
```ts
|
|
61
|
-
import type { UnitContract } from "@reqvire-org/ads/contracts";
|
|
62
|
-
import { ScrollerController } from "./scroller-controller";
|
|
63
|
-
import { useMessageScroller } from "./MessageScroller";
|
|
64
|
-
|
|
65
|
-
export default {
|
|
66
|
-
schemaVersion: 1,
|
|
67
|
-
behavior: {
|
|
68
|
-
subjects: {
|
|
69
|
-
controller: { implementation: ScrollerController },
|
|
70
|
-
"scroll-api": { api: useMessageScroller },
|
|
71
|
-
},
|
|
72
|
-
guarantees: [{
|
|
73
|
-
id: "prepend-anchor",
|
|
74
|
-
description: "Prepending history preserves the visible anchor after layout settles.",
|
|
75
|
-
subjects: ["controller", "scroll-api"],
|
|
76
|
-
checks: ["prepend-anchor"],
|
|
77
|
-
}],
|
|
78
|
-
checks: {
|
|
79
|
-
"prepend-anchor": {
|
|
80
|
-
file: "./MessageScroller.ads.behavior.spec.ts",
|
|
81
|
-
case: "prepend-anchor",
|
|
82
|
-
scenario: "components/MessageScroller",
|
|
83
|
-
profile: "widget",
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
} satisfies UnitContract;
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
Names above are illustrative project choices. A subject identifies a public API
|
|
91
|
-
or an implementation symbol owned by the unit. Private subjects do not become
|
|
92
|
-
public API. A guarantee references known subjects and checks. Each check names a
|
|
93
|
-
colocated test/spec file, stable case ID, registered profile and optional
|
|
94
|
-
discovered scenario. Several guarantees may reference one check. Repeated
|
|
95
|
-
execution identities use the same check ID.
|
|
96
|
-
|
|
97
|
-
Private subjects default to the headless controller role. For an intentionally
|
|
98
|
-
visual internal renderer or binding producer, declare `role: "implementation"`
|
|
99
|
-
alongside its `implementation` reference in the contract. Its source ownership and normal runtime gates
|
|
100
|
-
still apply; registration does not make it public API. Shared `controllers/`
|
|
101
|
-
source remains headless regardless of subject metadata. See the
|
|
102
|
-
[owner contract](contracts.md#a-contract-uses-actual-implementation-references).
|
|
103
|
-
|
|
104
|
-
Static validation establishes registration and ownership, not that the guarantee
|
|
105
|
-
is true. README prose is not automatically certified. Link specific guarantees
|
|
106
|
-
when describing the evidence available for a behavior.
|
|
107
|
-
|
|
108
|
-
## Link a public API to a demonstration
|
|
109
|
-
|
|
110
|
-
Scenario `covers` retains its existing render-reference contract. Optional
|
|
111
|
-
`exercises` identifies public behavioral APIs:
|
|
112
|
-
|
|
113
|
-
```tsx
|
|
114
|
-
export const scenario = {
|
|
115
|
-
title: "Message scrolling",
|
|
116
|
-
covers: ["MessageScroller", "MessageScrollerViewport"],
|
|
117
|
-
exercises: ["useMessageScroller", "useMessageScrollerScrollable"],
|
|
118
|
-
};
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
Call hooks in a rendered local scenario adapter. Calls/construction are matched by
|
|
122
|
-
resolved symbol, not a `use*` naming convention. An unused import, dead adapter or
|
|
123
|
-
metadata string does not count. Dynamically passed behavior references produce a
|
|
124
|
-
review advisory when a direct call cannot be established; verify those through
|
|
125
|
-
registered execution checks rather than changing the API for the analyzer.
|
|
126
|
-
|
|
127
|
-
Callable exports may be functions, callable objects with attached methods, or
|
|
128
|
-
factory results. ADS uses their TypeScript call/construct signatures, including
|
|
129
|
-
the project's library declarations; it does not execute modules or maintain a
|
|
130
|
-
list of recognized factory names. The fast source guard resolves ambiguous public
|
|
131
|
-
values lazily and shares that type discovery within the check. Untyped `any`
|
|
132
|
-
values and objects containing methods do not establish a callable API.
|
|
133
|
-
An invalid `exercises` entry names the offending value and fails validation while
|
|
134
|
-
retaining independent render evidence for `covers`.
|
|
135
|
-
Calls to a callable's attached methods also exercise that public receiver,
|
|
136
|
-
including statically named member calls inside reachable event-handler closures.
|
|
137
|
-
Aliases, namespace access and re-exports retain the receiver identity. Reading a
|
|
138
|
-
method or defining an unused callback does not establish an invocation.
|
|
139
|
-
|
|
140
|
-
Public APIs appear in `ads_catalog` with `apiKind: "ui"` or `"behavior"` and their
|
|
141
|
-
scenario links. `ads_behaviors` joins contracts to demonstrations and evidence.
|
|
142
|
-
A demonstrated API is not automatically a verified guarantee.
|
|
143
|
-
|
|
144
|
-
## Register execution profiles
|
|
145
|
-
|
|
146
|
-
Profiles are explicit trusted development commands in `ds.config.json`. They use
|
|
147
|
-
literal executable/argument arrays, no shell interpolation or model-supplied
|
|
148
|
-
command. For a project with an installed Playwright test runner:
|
|
149
|
-
|
|
150
|
-
```json
|
|
151
|
-
{
|
|
152
|
-
"mcp": {
|
|
153
|
-
"behaviorProfiles": {
|
|
154
|
-
"widget": {
|
|
155
|
-
"runner": "playwright",
|
|
156
|
-
"command": "runtime",
|
|
157
|
-
"args": ["node_modules/@playwright/test/cli.js", "test"],
|
|
158
|
-
"mode": "browser",
|
|
159
|
-
"timeoutMs": 60000
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
Here `runtime` uses the Node or Bun interpreter that launched ADS, and the
|
|
167
|
-
project supplies the installed Playwright entry. Explicit executable commands
|
|
168
|
-
retain their meaning. A Bun package-script profile can use `command: "bun"`
|
|
169
|
-
with `args: ["--bun", "run", "test:behavior", "--"]`. The Playwright
|
|
170
|
-
configuration must discover colocated spec files. Configure browser installation
|
|
171
|
-
and any required test setup in that project. The ADS tooling host gains no
|
|
172
|
-
framework or browser dependency from a profile.
|
|
173
|
-
|
|
174
|
-
The Playwright adapter appends selected file paths and case-tag filtering, its
|
|
175
|
-
reporter and a generated artifact directory. Unselected cases in the same spec
|
|
176
|
-
do not run. It preserves the project's worker configuration.
|
|
177
|
-
|
|
178
|
-
`timeoutMs` bounds the complete runner process for one profile, including runner
|
|
179
|
-
startup, hooks, retries and all selected cases. It is not a per-test timeout.
|
|
180
|
-
The default is 60000 ms; explicit budgets may range from 100 to 900000 ms
|
|
181
|
-
(fifteen minutes), so larger catalogues can complete a full run.
|
|
182
|
-
Playwright's own test/hook timeouts remain separate project settings. Set the
|
|
183
|
-
profile budget from measured suite durations with headroom; increasing it does
|
|
184
|
-
not repair a stalled assertion or cleanup.
|
|
185
|
-
|
|
186
|
-
Independent specs can use multiple Playwright workers against the same managed
|
|
187
|
-
candidate host. Each check needs its own page/context and state; avoid fixed ports,
|
|
188
|
-
shared mutable fixtures and test-order dependencies. Start with a small worker
|
|
189
|
-
count and measure on the target machine. Files normally run in parallel; tests
|
|
190
|
-
within one file normally remain sequential. ADS does not force parallelism or
|
|
191
|
-
change verification policy. See [Playwright parallelism](https://playwright.dev/docs/test-parallel).
|
|
192
|
-
Prefer readiness/assertion polling over arbitrary sleeps. Timer-only guarantees
|
|
193
|
-
may use [Playwright's clock](https://playwright.dev/docs/clock); retain real time
|
|
194
|
-
when browser motion, pointer gestures or layout timing are what the check verifies.
|
|
195
|
-
|
|
196
|
-
An ordinary test-failure exit (code 1) with a complete report and actual failing
|
|
197
|
-
cases preserves independent case outcomes: passing checks stay `passed`, failed
|
|
198
|
-
checks stay `failed`, and overall verification still blocks the mutation. The
|
|
199
|
-
report must account for every selected check, with no active cases or suite errors.
|
|
200
|
-
The same rule supports older custom reports without an explicit `complete` field
|
|
201
|
-
after normal process completion. An unexplained nonzero exit cannot certify a
|
|
202
|
-
pass, even if all reported cases claim success. Results retain `reportedStatus`
|
|
203
|
-
and `runnerExitCode` and explain the overall failure. Suite-level browser errors and
|
|
204
|
-
bounded runner output appear in diagnostics. `openBehaviorScenario` includes the
|
|
205
|
-
scenario ID and failed browser requests in startup failures; App resource errors
|
|
206
|
-
identify the resource URI. The ADS showcase retries only `resources/read` fetch
|
|
207
|
-
transport failures, with at most three attempts and 200/800 ms backoff. Recovered
|
|
208
|
-
startup reads appear in `startupDiagnostics` with retry counts and failed browser
|
|
209
|
-
requests; each retry is also logged in the browser console. This does not retry a
|
|
210
|
-
tool call, assertion, check or complete startup. HTTP/protocol/content errors,
|
|
211
|
-
integrity failures and cancellations do not retry. Persistent loading failures
|
|
212
|
-
still fail the check and block mutations. External hosts control their own
|
|
213
|
-
transport recovery.
|
|
214
|
-
|
|
215
|
-
`net::ERR_NETWORK_CHANGED` reports Chrome's network-change error, not proof that
|
|
216
|
-
the MCP endpoint restarted or that a particular interface changed. To investigate
|
|
217
|
-
an intermittent failure, correlate the saved case timestamps with Chrome's
|
|
218
|
-
network log, server availability and live interface monitoring (for example,
|
|
219
|
-
`ip -ts monitor link address route` on Linux). Interfaces being present, or stable
|
|
220
|
-
after a failure, does not establish the cause. Preserve the draft and original
|
|
221
|
-
diagnostic; do not change a component API, reference example or verification
|
|
222
|
-
policy to compensate for a resource-loading failure.
|
|
223
|
-
|
|
224
|
-
The reporter atomically publishes partial snapshots at test start/end. While a
|
|
225
|
-
run is active, `ads_status.behaviors.progress` exposes the profile, runner budget,
|
|
226
|
-
elapsed time, completed/active/pending counts, worker count when available and
|
|
227
|
-
case identities/timings. Candidate mutation verification exposes the same data at
|
|
228
|
-
`ads_status.mutations.progress`. Clients requesting MCP progress receive updates
|
|
229
|
-
and a heartbeat during the runner phase; client-side request timeouts still apply.
|
|
230
|
-
`durationMs` records completed case execution, including attempts, separately from
|
|
231
|
-
the suite's wall time. Parallel case durations can sum to more than wall time.
|
|
232
|
-
|
|
233
|
-
After a deadline, valid completed outcomes remain visible through `reportedStatus`
|
|
234
|
-
and durations, alongside active and unstarted case identities. A passed case from
|
|
235
|
-
an interrupted run has blocking status `incomplete`; real assertion failures retain
|
|
236
|
-
their own messages. No incomplete run can accept a mutation or certify a guarantee.
|
|
237
|
-
Reports and artifacts stay under the live project's `.ds/verification/` even after
|
|
238
|
-
the candidate copy is removed. This is diagnostic output, not passing live-source
|
|
239
|
-
evidence. Old/custom runners without incremental progress use `not_reported` for
|
|
240
|
-
cases whose execution state cannot be established.
|
|
241
|
-
|
|
242
|
-
Use native test tags for stable case identity:
|
|
243
|
-
|
|
244
|
-
```ts
|
|
245
|
-
import { test, expect } from "@playwright/test";
|
|
246
|
-
import { openBehaviorScenario } from "@reqvire-org/ads/verification";
|
|
247
|
-
|
|
248
|
-
test("history preserves the visible anchor", { tag: "@ads:prepend-anchor" }, async ({ page }) => {
|
|
249
|
-
const frame = await openBehaviorScenario(page, "prepend-anchor");
|
|
250
|
-
// Perform real interactions and assert the project's guarantee here.
|
|
251
|
-
await expect(frame.getByRole("region", { name: "Messages" })).toBeVisible();
|
|
252
|
-
});
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
The shown assertion is only a harness example; it does not establish anchoring.
|
|
256
|
-
Write meaningful assertions for the registered guarantee. The helper waits for
|
|
257
|
-
the current selected scenario inside the real sandboxed MCP App. It uses `load`
|
|
258
|
-
and explicit readiness, not `networkidle`: MCP keeps event connections open.
|
|
259
|
-
|
|
260
|
-
Compare reference and candidate under equivalent framing. In a reported Chrome
|
|
261
|
-
comparison, `content-visibility` initially used placeholder geometry inside a
|
|
262
|
-
cross-origin App iframe for both ADS and the upstream reference; the same content
|
|
263
|
-
measured differently as a top-level page. This is an observed browser/layout
|
|
264
|
-
condition, not evidence of an ADS defect. App readiness does not imply that every
|
|
265
|
-
off-screen item has rendered. For geometry assertions, bring the relevant content
|
|
266
|
-
into view and wait for its measured layout to settle. Record the framing and
|
|
267
|
-
visibility state; test initial placeholder behavior separately when it matters to
|
|
268
|
-
the guarantee. Wait for focus and positioning readiness before normal keyboard
|
|
269
|
-
comparisons, and test rapid input separately rather than hiding it behind delays.
|
|
270
|
-
|
|
271
|
-
`mode: "browser"` starts an isolated managed showcase on an automatic port. Test
|
|
272
|
-
requests contain its scenario URLs, and cleanup closes its host/compiler tree.
|
|
273
|
-
Mutation candidates use their own source, generated graph and server; a passing
|
|
274
|
-
test against an older fixed-port live showcase cannot validate a candidate.
|
|
275
|
-
|
|
276
|
-
Use `mode: "strict"` only for React with a project development harness that mounts
|
|
277
|
-
the relevant API in StrictMode. The production MCP App does not replay development
|
|
278
|
-
effects. This profile does not receive a production showcase URL from the helper.
|
|
279
|
-
For Preact, register its actual lifecycle tests without claiming React StrictMode.
|
|
280
|
-
The profile names record the chosen environment; ADS does not infer that a test's
|
|
281
|
-
assertions cover every lifecycle condition.
|
|
282
|
-
|
|
283
|
-
Other runners use `runner: "protocol"` (the default). ADS provides
|
|
284
|
-
`ADS_VERIFY_REQUEST` and `ADS_VERIFY_REPORT` absolute paths. Read the request's
|
|
285
|
-
`schemaVersion`, unique `runId`, `projectRoot`, `framework`, `profile`, `mode`,
|
|
286
|
-
selected `checks` and optional `scenarios` URLs. Write a bounded JSON report:
|
|
287
|
-
|
|
288
|
-
```json
|
|
289
|
-
{
|
|
290
|
-
"schemaVersion": 1,
|
|
291
|
-
"runId": "<the request's runId>",
|
|
292
|
-
"cases": [
|
|
293
|
-
{
|
|
294
|
-
"id": "prepend-anchor",
|
|
295
|
-
"file": "design-system/components/MessageScroller/MessageScroller.ads.behavior.spec.ts",
|
|
296
|
-
"status": "passed"
|
|
297
|
-
}
|
|
298
|
-
]
|
|
299
|
-
}
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
Case statuses are `passed`, `failed` or `skipped`, with optional `message` and
|
|
303
|
-
`durationMs`. Protocol runners may atomically publish intermediate reports with
|
|
304
|
-
`complete:false` and an `active` list of `{id,file,startedAt,workerIndex?}`, then
|
|
305
|
-
publish `complete:true` at completion. Older final reports without `complete`
|
|
306
|
-
remain supported after normal process completion. An explicitly incomplete report
|
|
307
|
-
cannot pass even with exit code zero. Partial reports retain the same schema/run
|
|
308
|
-
identity and size limits as final reports.
|
|
309
|
-
Cases may optionally include `failure: {category,phase,code,certainty?}`,
|
|
310
|
-
`source: {file,line,column}`, `failingStep`, `viewport`/`viewportSource`, and
|
|
311
|
-
`artifacts: [{name,mimeType,path}]`. Artifact paths are relative to the report
|
|
312
|
-
directory and must remain under that run's `artifacts/` directory. The built-in
|
|
313
|
-
Playwright reporter supplies these from actual step/startup/attachment evidence.
|
|
314
|
-
Older protocol runners can omit them; ADS preserves that lack of classification
|
|
315
|
-
instead of treating an arbitrary thrown message as an assertion.
|
|
316
|
-
`file` is project-relative. Nonzero process exit, missing cases, skipped cases,
|
|
317
|
-
wrong run IDs and unavailable reports do not pass. Test commands are trusted
|
|
318
|
-
project code; an adapter cannot prove the quality or honesty of their assertions.
|
|
319
|
-
|
|
320
|
-
## Execute and inspect evidence
|
|
321
|
-
|
|
322
|
-
Use `ads_behaviors` for bounded discovery; request an exact unit for its contract.
|
|
323
|
-
General listings return counts and short API/guarantee/scenario summaries. Exact
|
|
324
|
-
owner requests return the registered details; source reads remain available for
|
|
325
|
-
bounded inspection of large contracts. No full guide or test body is injected
|
|
326
|
-
into discovery results.
|
|
327
|
-
Call `ads_verify({unit, checks?})` for selected registered checks. Read
|
|
328
|
-
`ads://project/behaviors` for current evidence or `ads://guides/behaviors` for this
|
|
329
|
-
guide. CLI/CI equivalents are:
|
|
330
|
-
|
|
331
|
-
```sh
|
|
332
|
-
ads behaviors . --json
|
|
333
|
-
ads verify . --unit controllers/ScrollFollow
|
|
334
|
-
ads verify . --unit components/MessageScroller --check prepend-anchor --json
|
|
335
|
-
```
|
|
336
|
-
|
|
337
|
-
Execution has bounded output, a configured timeout, cancellation and process-tree
|
|
338
|
-
ownership. Evidence records case/profile identity, source/dependency revision,
|
|
339
|
-
completion time, report path and the available preview revision. Later input
|
|
340
|
-
changes mark results stale; changes during execution prevent a current pass.
|
|
341
|
-
Guarantees report passing only when all their checks have current passing evidence.
|
|
342
|
-
Passing applies to those cases and profiles, not every application state.
|
|
343
|
-
|
|
344
|
-
Results expose structured `failure` boundaries and explicit `acceptance` scope.
|
|
345
|
-
MCP execution replies contain counts, bounded acceptance, at most three failure
|
|
346
|
-
previews and a `resultId` (4 KiB UTF-8 JSON maximum). Use `ads_results` to read
|
|
347
|
-
selected `outcomes`, `checks`, `diagnostics` or other sections without execution.
|
|
348
|
-
Pages default to 10 rows, allow at most 20 and stay within 8 KiB; follow
|
|
349
|
-
`nextCursor` with identical selection/status. Truncated records provide
|
|
350
|
-
`recordIndex` for exact `offset`/`chars` ranges. Immutable run snapshots remain readable across other executions and reconnects,
|
|
351
|
-
within configurable retention, at most 8 MiB each. Expired IDs fail explicitly. Validation still uses complete internal outcomes.
|
|
352
|
-
|
|
353
|
-
Use `ads_investigate({unit,check,runId})` with an outcome's exact IDs for its compact
|
|
354
|
-
summary (4 KiB maximum); details, requests, browser errors and artifact metadata are separate
|
|
355
|
-
paged sections (8 KiB maximum). Truncated records support exact text ranges with
|
|
356
|
-
the recorded run ID. Saved outcomes describe completion time; compare current
|
|
357
|
-
`ads_behaviors` revisions for freshness. It includes isolated dry runs; `ads://project/investigations` lists available entries. Exact
|
|
358
|
-
input and observed preview revisions, failing step/source, startup viewport,
|
|
359
|
-
failed startup requests and available project-recorded artifacts keep diagnosis
|
|
360
|
-
separate from an inferred component defect. No artifact is invented or test
|
|
361
|
-
retried. Latest-check listings are indexes; exact run IDs retain their historical bundles
|
|
362
|
-
and artifacts until collection. Candidate bundles remain distinct from passing live-source evidence.
|
|
363
|
-
Read the portable [evidence reference](evidence.md)
|
|
364
|
-
for category meanings, collection limits and artifact policy.
|
|
365
|
-
|
|
366
|
-
Revisions include owned files, literal import dependencies, local CSS imports and
|
|
367
|
-
asset URLs, token foundation, project/runner configuration, lockfiles and tooling.
|
|
368
|
-
Computed module selection conservatively includes all ADS owners. Environment,
|
|
369
|
-
network and other unregistered external inputs remain the runner's responsibility;
|
|
370
|
-
an evidence record is not a proof about arbitrary external state.
|
|
371
|
-
|
|
372
|
-
For named imports through simple re-export barrels, ADS follows selected bindings
|
|
373
|
-
and retains dependencies with declared side effects. This narrowing requires a
|
|
374
|
-
package `sideEffects:false` or a supported simple `sideEffects` glob array; preserve
|
|
375
|
-
CSS/global effects in that policy. Unknown policies/patterns, wildcard exports and
|
|
376
|
-
computed imports remain conservative. Barrel source changes still invalidate
|
|
377
|
-
dependents. ADS caches source parsing, resolution and digests within an inspection
|
|
378
|
-
only; later runs read current source again.
|
|
379
|
-
|
|
380
|
-
When `acceptance.behaviorChecks` is true, guarded mutations execute affected
|
|
381
|
-
registered behavior contracts after mandatory native ADS gates and
|
|
382
|
-
`acceptance.checks`, before writing source. The developer chooses gating through
|
|
383
|
-
project policy; registration alone does not require execution at acceptance.
|
|
384
|
-
`validation.behaviorChecks` separately controls audits, while explicit
|
|
385
|
-
`ads_verify` always runs the requested checks. See [validation policies](validation.md). Imported shared
|
|
386
|
-
controller changes also select dependent contracts conservatively. Rejected and
|
|
387
|
-
dry-run patches publish no source changes. Verification output stays under `.ds/`.
|
|
388
|
-
To check a draft, call `ads_accept({id, revision, dryRun:true})`. This checks the
|
|
389
|
-
candidate using the acceptance policy, including affected behavior contracts and
|
|
390
|
-
their browser preview when enabled, rendered through the project's own compiler. Candidate evidence
|
|
391
|
-
is not persisted as passing evidence for live source. `ads_verify` selects checks
|
|
392
|
-
for current source and has no draft argument.
|
|
393
|
-
|
|
394
|
-
## Packaging and performance
|
|
395
|
-
|
|
396
|
-
Controllers follow normal component/scenario imports into the project's compiled
|
|
397
|
-
resource graph. Their framework dependencies are bundled by the project compiler
|
|
398
|
-
and served through MCP resources inside the App iframe; external hosts install
|
|
399
|
-
nothing. The selected scenario loads its dependency closure. Shared modules are
|
|
400
|
-
cached within that App instance, and each separately opened App has its own runtime.
|
|
401
|
-
|
|
402
|
-
Keep ESM modules and explicit imports. Avoid an eagerly imported controller
|
|
403
|
-
registry. Tree shaking and shared chunks follow the project bundler: class methods,
|
|
404
|
-
side effects, global CSS and dynamic maps can retain extra code. Inspect emitted
|
|
405
|
-
resources instead of assuming a controller produces a minimal bundle.
|
|
406
|
-
|
|
407
|
-
Development-only `review/<Owner>` units may register the same guarantee/check
|
|
408
|
-
contracts for review presentation and controls. Subjects can name that owner's
|
|
409
|
-
separate review API or local headless helpers; checks still run registered project
|
|
410
|
-
profiles and can refer to an existing real scenario. This grants no production
|
|
411
|
-
API, catalogue entry, `covers` credit or runtime import permission. See the
|
|
412
|
-
[portable review guide](review.md).
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
# On-demand visual captures
|
|
2
|
-
|
|
3
|
-
For a [tracked draft](drafts.md), pass `draft` and its exact `revision` to
|
|
4
|
-
`ads_capture`. Accepted/current and Draft/candidate images use warm preview hosts
|
|
5
|
-
without running draft acceptance checks. The candidate records the proposal
|
|
6
|
-
revision; changed inputs prevent publication. Read the returned PNG resources
|
|
7
|
-
for model-visible review before `ads_accept`. Compilation/screenshots alone do
|
|
8
|
-
not establish behavioral or acceptance evidence.
|
|
9
|
-
|
|
10
|
-
Use captures when reviewing appearance or a proposed visual change. Discover exact
|
|
11
|
-
scenario IDs with `ads_scenarios`; these are project-owned independently mountable
|
|
12
|
-
token, component, pattern and composition views. A component export alone is not
|
|
13
|
-
a renderable fixture. Controllers/hooks need a scenario demonstrating their visible
|
|
14
|
-
effects. ADS never supplies library-specific renderers, fixtures or capture targets.
|
|
15
|
-
|
|
16
|
-
## Capture current source
|
|
17
|
-
|
|
18
|
-
```js
|
|
19
|
-
ads_capture({
|
|
20
|
-
scenario: "components/Example",
|
|
21
|
-
theme: "dark",
|
|
22
|
-
viewport: { width: 1280, height: 800 }
|
|
23
|
-
})
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
The ID above is illustrative; use one returned by discovery. `theme` names one of the
|
|
27
|
-
project's declared themes (`ads_status.themes`); the default is the first declared theme at
|
|
28
|
-
1280 × 800 CSS pixels. Capture uses the real sandboxed MCP App with the
|
|
29
|
-
requested viewport and excludes showcase navigation. The default image records
|
|
30
|
-
the complete widget viewport, including its current scroll/state; it does not
|
|
31
|
-
automatically stitch every scroll position into one image.
|
|
32
|
-
|
|
33
|
-
ADS starts an isolated showcase/compiler and an owned browser process, using the
|
|
34
|
-
connected project's installed `@playwright/test` or `playwright`. It installs no
|
|
35
|
-
dependency/browser. Chromium is the default; optional project configuration is:
|
|
36
|
-
|
|
37
|
-
```json
|
|
38
|
-
{
|
|
39
|
-
"mcp": {
|
|
40
|
-
"capture": {
|
|
41
|
-
"browser": "chromium",
|
|
42
|
-
"channel": "chrome",
|
|
43
|
-
"timeoutMs": 60000
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
Omit `channel` to use Playwright's installed Chromium. Firefox and WebKit are also
|
|
50
|
-
accepted browser choices; channel is Chromium-only. The registered browser must
|
|
51
|
-
be installed locally. This budget bounds the capture runner, including preview
|
|
52
|
-
readiness. Capture does not run the project's entire Playwright suite or require a
|
|
53
|
-
behavior manifest. Readiness uses the App bridge, fonts and settled image loads,
|
|
54
|
-
not `networkidle` (MCP maintains live connections).
|
|
55
|
-
|
|
56
|
-
## Capture a named element
|
|
57
|
-
|
|
58
|
-
Declare selectors in the scenario's static metadata:
|
|
59
|
-
|
|
60
|
-
```tsx
|
|
61
|
-
export const scenario = {
|
|
62
|
-
title: "Example",
|
|
63
|
-
covers: ["Example"],
|
|
64
|
-
captureTargets: {
|
|
65
|
-
control: '[data-testid="example-control"]'
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Use attributes/selectors already owned by the real UI or its development-only review helper.
|
|
71
|
-
Scenarios keep their existing styling/control rules. A target is not permission
|
|
72
|
-
to add demo-only product props, custom CSS or synthetic native controls. Each
|
|
73
|
-
selector is scoped to the App iframe and must match exactly one visible element.
|
|
74
|
-
Select it with `ads_capture({scenario:"<discovered ID>",target:"control"})`.
|
|
75
|
-
`captureTargets` allows up to 20 named CSS selectors. Unknown, hidden, ambiguous
|
|
76
|
-
or unrenderable targets fail explicitly; ADS does not guess a substitute element.
|
|
77
|
-
Arrange a specific interaction state through the scenario's real fixture/adapter;
|
|
78
|
-
capture itself accepts no arbitrary browser script or click sequence.
|
|
79
|
-
|
|
80
|
-
Screenshots hide the text caret and disable animations by default. Set
|
|
81
|
-
`animations:"allow"` when motion must remain active, and account for nondeterminism.
|
|
82
|
-
The same capture settings are used for both sides of a candidate comparison.
|
|
83
|
-
|
|
84
|
-
## Review a draft without accepting it
|
|
85
|
-
|
|
86
|
-
Capture the draft's exact revision beside the accepted version, without acceptance
|
|
87
|
-
checks:
|
|
88
|
-
|
|
89
|
-
```js
|
|
90
|
-
ads_capture({ scenario: "components/Example", target: "control", theme: "light", draft: "<draft id>", revision: "<draft revision>" })
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
The placeholder IDs come from discovery and `ads_drafts`. A capture is an explicit
|
|
94
|
-
call: acceptance and its dry run take no screenshots. A new scenario has only a
|
|
95
|
-
candidate image. Edits during capture prevent publication of its image slots.
|
|
96
|
-
|
|
97
|
-
## Two slots, no automatic history
|
|
98
|
-
|
|
99
|
-
The stable capture key identifies the scenario and optional named target. Theme,
|
|
100
|
-
viewport and revision are metadata, not additional resource identities.
|
|
101
|
-
|
|
102
|
-
| Successful operation | Result for that target |
|
|
103
|
-
| --- | --- |
|
|
104
|
-
| Standalone `ads_capture` | Fresh current; any earlier candidate removed |
|
|
105
|
-
| Screenshot-enabled dry run | Fresh current + candidate; replaces the old pair |
|
|
106
|
-
| Apply matching proposed source | Candidate becomes current; candidate slot cleared |
|
|
107
|
-
| `ads_capture_clear({scenario,target?,candidateOnly:true})` | Discard candidate, retain current when present |
|
|
108
|
-
| `ads_capture_clear({scenario,target?})` | Remove both slots |
|
|
109
|
-
| Remove scenario/target | Orphan images collected on resource refresh/discovery |
|
|
110
|
-
|
|
111
|
-
No previous slot, revision history or TTL is kept. Later source changes mark
|
|
112
|
-
images stale rather than silently recapturing them. New proposals replace the
|
|
113
|
-
candidate. Three limits keep storage bounded: at most 4 MiB per PNG, 8 megapixels
|
|
114
|
-
per image and 256 MiB total capture storage. Clear unneeded targets if the store
|
|
115
|
-
reaches its limit. Viewport dimensions range from 100 to 4096 pixels per axis,
|
|
116
|
-
subject to the pixel limit.
|
|
117
|
-
|
|
118
|
-
## Read resources and freshness
|
|
119
|
-
|
|
120
|
-
`ads://project/captures` lists existing slots and metadata. Each returned image URI
|
|
121
|
-
uses the template `ads://captures/{key}/{slot}`, with `slot` current or candidate.
|
|
122
|
-
Read the exact returned URI through MCP `resources/read` (or the host's resource
|
|
123
|
-
tool). The result is `image/png` with binary `blob`, not a filesystem or browser
|
|
124
|
-
URL. Use the client's image/resource viewer; do not paste base64 into model text.
|
|
125
|
-
|
|
126
|
-
Capture metadata records source/build revision, fixture owner file, settings,
|
|
127
|
-
capture time, PNG dimensions/digest and candidate proposal identity. Current is
|
|
128
|
-
stale when its source revision differs; a candidate becomes stale when its base
|
|
129
|
-
source changes. Static freshness does not prove external/live fixture data stayed
|
|
130
|
-
identical. Subscribe to the index and image URIs for `resources/updated`, including
|
|
131
|
-
candidate removal; explicitly reread when the host does not deliver notifications.
|
|
132
|
-
Absent/cleared slots return a resource-not-found diagnostic, not an old image.
|
|
133
|
-
The resource catalogue exposes one index and an image URI template, avoiding a
|
|
134
|
-
resource-list entry for every new revision. Images stay as generated development
|
|
135
|
-
data under `.ds/captures/`; none belongs in product bundles or source patches.
|