@reqvire-org/ads 0.4.6 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +265 -420
- package/dist/accessibility-declarations.mjs +43 -0
- package/dist/active-clock.d.mts +30 -0
- package/dist/active-clock.mjs +26 -17
- package/dist/ads-errors.mjs +3421 -0
- package/dist/ads-view-choices.mjs +17 -0
- package/dist/ads-views.mjs +12 -0
- package/dist/analysis/captured-content.mjs +16 -0
- package/dist/analysis/compiler-options.mjs +3 -7
- package/dist/analysis/context.mjs +14 -20
- package/dist/analysis/controller-gates.mjs +119 -0
- package/dist/analysis/design-usage.mjs +126 -0
- package/dist/analysis/file-tree.mjs +44 -29
- package/dist/analysis/framework-imports.mjs +62 -0
- package/dist/analysis/glyph-macros.mjs +103 -0
- package/dist/analysis/helpers.mjs +119 -91
- package/dist/analysis/impact.mjs +25 -12
- package/dist/analysis/inputs.mjs +19 -13
- package/dist/analysis/mock-check.mjs +98 -0
- package/dist/analysis/module-graph.mjs +156 -0
- package/dist/analysis/module-resolvers.mjs +30 -28
- package/dist/analysis/native-adapter.mjs +139 -146
- package/dist/analysis/native-boundary.mjs +52 -0
- package/dist/analysis/native-project.mjs +331 -231
- package/dist/analysis/native-session.mjs +20 -0
- package/dist/analysis/owner-accessibility.mjs +74 -0
- package/dist/analysis/owner-analysis-cache.mjs +125 -0
- package/dist/analysis/owner-analysis-key.mjs +114 -0
- package/dist/analysis/owner-choices.mjs +763 -0
- package/dist/analysis/owner-composition.mjs +612 -0
- package/dist/analysis/owner-discovery.mjs +164 -0
- package/dist/analysis/owner-failures.mjs +19 -0
- package/dist/analysis/owner-outcomes.mjs +42 -0
- package/dist/analysis/owner-reuse.mjs +100 -0
- package/dist/analysis/owner-source.mjs +1506 -0
- package/dist/analysis/public-imports.mjs +31 -0
- package/dist/analysis/queries.mjs +72 -54
- package/dist/analysis/runtime-setters.mjs +114 -0
- package/dist/analysis/scenario-keys.mjs +151 -0
- package/dist/analysis/service.mjs +111 -70
- package/dist/analysis/standalone.mjs +40 -37
- package/dist/analysis/styling-ownership.mjs +276 -0
- package/dist/analysis/svg-attributes.mjs +199 -0
- package/dist/analysis/syntax.mjs +82 -78
- package/dist/analysis/visual-bindings.mjs +68 -0
- package/dist/analysis/worker-protocol.mjs +302 -0
- package/dist/analysis/worker.mjs +234 -166
- package/dist/api-signature.mjs +53 -0
- package/dist/app-icon-checks.mjs +298 -0
- package/dist/app-icon-declaration.d.mts +53 -0
- package/dist/app-icon-declaration.mjs +66 -0
- package/dist/asset-binding.mjs +35 -0
- package/dist/asset-catalog.mjs +83 -0
- package/dist/asset-declaration.d.mts +42 -0
- package/dist/asset-declaration.mjs +108 -0
- package/dist/asset-macro.d.mts +63 -0
- package/dist/asset-macro.mjs +22 -0
- package/dist/asset-model.mjs +74 -0
- package/dist/asset-usage.mjs +14 -0
- package/dist/asset-view-facts.mjs +41 -0
- package/dist/authoring-macro.d.mts +11 -0
- package/dist/authoring-macro.mjs +21 -0
- package/dist/autocomplete-hints.mjs +31 -0
- package/dist/availability.mjs +9 -0
- package/dist/behavior-macro.d.mts +31 -0
- package/dist/behavior-macro.mjs +3 -0
- package/dist/behavior-registry.mjs +358 -0
- package/dist/boundaries.mjs +50 -212
- package/dist/browser-runtime.mjs +73 -0
- package/dist/browser-test.d.mts +3 -0
- package/dist/browser-test.mjs +2 -0
- package/dist/bun-bundler.mjs +10 -0
- package/dist/bun-compiler.mjs +30 -18
- package/dist/bun-runtime.mjs +4 -0
- package/dist/bun-worker.mjs +10 -4
- package/dist/capture/request.mjs +81 -0
- package/dist/capture/worker.mjs +69 -40
- package/dist/capture/worker.page.mjs +6 -0
- package/dist/capture-store.mjs +159 -75
- package/dist/capture.mjs +232 -95
- package/dist/check-service.mjs +27 -33
- package/dist/check.mjs +200 -904
- package/dist/cli-arguments.mjs +278 -0
- package/dist/cli.mjs +374 -304
- package/dist/color-values.mjs +294 -242
- package/dist/composed-contrast.mjs +628 -0
- package/dist/config.mjs +162 -454
- package/dist/construction-output.mjs +217 -0
- package/dist/construction-spec.d.mts +712 -0
- package/dist/construction-spec.mjs +937 -0
- package/dist/css-length.mjs +80 -0
- package/dist/css-quantity.mjs +173 -0
- package/dist/deletion-model.mjs +56 -0
- package/dist/deletion-plan.mjs +364 -0
- package/dist/dependency-manifest.mjs +56 -0
- package/dist/design-context-model.d.mts +61 -0
- package/dist/design-context-model.mjs +79 -0
- package/dist/design-contexts.mjs +105 -0
- package/dist/design-foundation.mjs +527 -0
- package/dist/design-inputs.mjs +156 -0
- package/dist/design-modules.mjs +27 -0
- package/dist/design-rejection.d.mts +23 -0
- package/dist/design-rejection.mjs +29 -0
- package/dist/design-system-closure.mjs +108 -0
- package/dist/design-usage.mjs +48 -0
- package/dist/development-modules.mjs +2 -0
- package/dist/development-runtime.mjs +0 -7
- package/dist/digest.mjs +2 -0
- package/dist/draft-boundary.mjs +1 -27
- package/dist/draft-workspace.mjs +11 -5
- package/dist/emit/accept.mjs +33 -0
- package/dist/emit/app-icon-emission.mjs +124 -0
- package/dist/emit/app-icon-render.mjs +126 -0
- package/dist/emit/asset-imports.mjs +18 -0
- package/dist/emit/cli-report.mjs +97 -0
- package/dist/emit/contract.mjs +136 -0
- package/dist/emit/emission.mjs +175 -0
- package/dist/emit/font-emission.mjs +91 -0
- package/dist/emit/foundation-sheet.mjs +55 -0
- package/dist/emit/icon-containers.mjs +46 -0
- package/dist/emit/integrity.mjs +61 -0
- package/dist/emit/lock.mjs +66 -0
- package/dist/emit/namespace.mjs +79 -0
- package/dist/emit/operation-reply.mjs +3 -0
- package/dist/emit/operation.mjs +36 -0
- package/dist/emit/output-location.mjs +20 -0
- package/dist/emit/output-package.mjs +7 -0
- package/dist/emit/owner-emission-cache.mjs +52 -0
- package/dist/emit/palette-module.mjs +19 -0
- package/dist/emit/palette-refresh.mjs +77 -0
- package/dist/emit/preview-emitter.mjs +110 -0
- package/dist/emit/preview-tree.mjs +174 -0
- package/dist/emit/scheduler.mjs +75 -0
- package/dist/emit/service.mjs +249 -0
- package/dist/emit/sync.mjs +38 -0
- package/dist/emit/watch.mjs +74 -0
- package/dist/emit/writer.mjs +102 -0
- package/dist/evidence.mjs +6 -8
- package/dist/example-babel.mjs +7 -0
- package/dist/example-literals.mjs +88 -0
- package/dist/finding-rules.mjs +71 -77
- package/dist/focus-checks.mjs +93 -0
- package/dist/font-checks.mjs +143 -0
- package/dist/font-declaration.d.mts +54 -0
- package/dist/font-declaration.mjs +77 -0
- package/dist/font-macro.d.mts +32 -0
- package/dist/font-macro.mjs +6 -0
- package/dist/font-model.mjs +37 -0
- package/dist/form-states.mjs +82 -0
- package/dist/foundation-macro.d.mts +108 -0
- package/dist/foundation-macro.mjs +6 -0
- package/dist/frame-regions.mjs +190 -0
- package/dist/glyph-set-declaration.d.mts +27 -0
- package/dist/glyph-set-declaration.mjs +36 -0
- package/dist/grid-checks.mjs +94 -0
- package/dist/grid-facts.mjs +92 -0
- package/dist/grid-lowering.mjs +257 -0
- package/dist/guard/cli.mjs +51 -0
- package/dist/guard/config.mjs +67 -0
- package/dist/guard/files.mjs +31 -0
- package/dist/guard/index.mjs +3 -0
- package/dist/guard/run.mjs +56 -0
- package/dist/guard/tsconfig.declarations.json +13 -0
- package/dist/index.mjs +2 -7
- package/dist/init-project.mjs +134 -0
- package/dist/init.mjs +225 -261
- package/dist/input-digests.mjs +216 -0
- package/dist/input-scope.mjs +18 -41
- package/dist/inspected-svg.d.mts +28 -0
- package/dist/inspected-svg.mjs +40 -0
- package/dist/inventories.mjs +149 -0
- package/dist/inventory-query.mjs +15 -0
- package/dist/investigations.mjs +177 -99
- package/dist/json.d.mts +10 -0
- package/dist/json.mjs +36 -0
- package/dist/linaria/atomic-processor.json +96 -0
- package/dist/linaria/atomic-processor.mjs +2452 -0
- package/dist/linaria/backend-identity.mjs +26 -0
- package/dist/linaria/compatibility.json +61 -0
- package/dist/linaria/css-shape.mjs +94 -0
- package/dist/linaria/custom-property-css.mjs +56 -0
- package/dist/linaria/delivery.mjs +111 -0
- package/dist/linaria/direct-extract.mjs +43 -0
- package/dist/linaria/extraction-cache.mjs +31 -0
- package/dist/linaria/extraction-model.mjs +5 -0
- package/dist/linaria/fingerprint.mjs +183 -0
- package/dist/linaria/pair-manifest.json +2315 -0
- package/dist/linaria/persisted-extraction-cache.mjs +352 -0
- package/dist/linaria/preservation.mjs +13 -0
- package/dist/linaria/priority-emitted-rank.mjs +40 -0
- package/dist/linaria/priority-manifest.mjs +87 -0
- package/dist/linaria/priority-table.mjs +47 -0
- package/dist/linaria/priority-tiers.mjs +27 -0
- package/dist/linaria/processor-host.mjs +42 -0
- package/dist/linaria/processor-runtime.mjs +36 -0
- package/dist/linaria-processor-NOTICES.md +147 -0
- package/dist/lowering-components.mjs +14 -0
- package/dist/lowering-effects.mjs +38 -0
- package/dist/lowering-emitter.mjs +29 -0
- package/dist/lowering-hidden.mjs +30 -0
- package/dist/lowering-layer.mjs +141 -0
- package/dist/lowering-motion.mjs +37 -0
- package/dist/lowering-normalize.mjs +194 -0
- package/dist/lowering-overlaps.mjs +328 -0
- package/dist/lowering-paint.mjs +32 -0
- package/dist/lowering-properties.mjs +144 -0
- package/dist/lowering-region-layout.mjs +191 -0
- package/dist/lowering-serialize.mjs +40 -0
- package/dist/lowering-session.mjs +130 -0
- package/dist/lowering-tiers.mjs +23 -0
- package/dist/lowering-transitions.mjs +39 -0
- package/dist/mcp/ads-mcp.mjs +423 -0
- package/dist/mcp/apps.mjs +3 -25
- package/dist/mcp/behavior-pages.mjs +58 -51
- package/dist/mcp/build-status.mjs +242 -254
- package/dist/mcp/catalog.mjs +21 -128
- package/dist/mcp/compiler-channel.mjs +280 -0
- package/dist/mcp/context.mjs +50 -40
- package/dist/mcp/deletions.mjs +147 -0
- package/dist/mcp/draft-discovery.mjs +43 -38
- package/dist/mcp/drafts.mjs +654 -755
- package/dist/mcp/execution-context.mjs +33 -22
- package/dist/mcp/execution-coordinator.mjs +367 -354
- package/dist/mcp/execution-results.mjs +440 -173
- package/dist/mcp/mutation-limits.mjs +1 -2
- package/dist/mcp/mutations.mjs +515 -553
- package/dist/mcp/patch.mjs +117 -75
- package/dist/mcp/preview-http.bundle.js +3 -7
- package/dist/mcp/preview-http.mjs +220 -107
- package/dist/mcp/preview-owner-guard.mjs +81 -43
- package/dist/mcp/preview-watch.mjs +492 -353
- package/dist/mcp/preview-widget.bundle.js +42 -46
- package/dist/mcp/preview-work.mjs +25 -13
- package/dist/mcp/prompts.mjs +22 -16
- package/dist/mcp/resource-loader.js +1 -1
- package/dist/mcp/result-pages.mjs +94 -54
- package/dist/mcp/sandbox-host.mjs +41 -19
- package/dist/mcp/server-discovery.mjs +96 -0
- package/dist/mcp/server-guides.mjs +43 -0
- package/dist/mcp/server-host.mjs +203 -0
- package/dist/mcp/server-observation.mjs +225 -0
- package/dist/mcp/server-project.mjs +371 -0
- package/dist/mcp/server-resources.mjs +466 -0
- package/dist/mcp/server-shared.mjs +79 -0
- package/dist/mcp/server-tools.mjs +791 -0
- package/dist/mcp/server.mjs +2 -2794
- package/dist/mcp/showcase-host.mjs +209 -135
- package/dist/mcp/showcase-http.mjs +50 -28
- package/dist/mcp/skills.mjs +32 -36
- package/dist/mcp/text-diff.mjs +18 -36
- package/dist/measured-geometry.mjs +157 -0
- package/dist/motion-model.mjs +50 -0
- package/dist/non-text-contrast.mjs +118 -0
- package/dist/owner-analysis-check.mjs +651 -0
- package/dist/owner-design.mjs +15 -0
- package/dist/owner-errors.mjs +200 -0
- package/dist/owner-lowering.mjs +186 -0
- package/dist/owner-scenarios.mjs +832 -0
- package/dist/ownership-model.d.mts +6 -0
- package/dist/ownership-model.mjs +124 -0
- package/dist/package-declarations.mjs +34 -0
- package/dist/paint-contrast.mjs +181 -0
- package/dist/palette-generated.mjs +101 -116
- package/dist/pictogram-model.mjs +13 -51
- package/dist/placeholder-contrast.mjs +34 -0
- package/dist/platform-features.mjs +377 -0
- package/dist/press-scale.mjs +26 -0
- package/dist/preview-bun.mjs +335 -406
- package/dist/preview-compile-inputs.mjs +78 -0
- package/dist/preview-contexts.mjs +7 -0
- package/dist/preview-failure.mjs +20 -10
- package/dist/preview-files.mjs +18 -36
- package/dist/preview-imports.mjs +76 -70
- package/dist/preview-incremental.mjs +322 -222
- package/dist/preview-inputs.mjs +28 -19
- package/dist/preview-manifest-update.mjs +67 -49
- package/dist/preview-requests.mjs +10 -17
- package/dist/preview-resources.mjs +275 -323
- package/dist/preview-scope.mjs +15 -17
- package/dist/preview-source.mjs +182 -0
- package/dist/preview-spatial.mjs +27 -0
- package/dist/profile-macro.d.mts +41 -0
- package/dist/profile-macro.mjs +6 -0
- package/dist/profile-model.d.mts +65 -0
- package/dist/profile-model.mjs +213 -0
- package/dist/profile-view-facts.mjs +42 -0
- package/dist/program-cache.mjs +9 -7
- package/dist/project-boundary.mjs +8 -13
- package/dist/project-documents.mjs +25 -29
- package/dist/property-registrations.mjs +44 -35
- package/dist/public-catalog.mjs +76 -0
- package/dist/recipe-defaults.mjs +117 -0
- package/dist/recipe-macro.d.mts +400 -0
- package/dist/recipe-macro.mjs +23 -0
- package/dist/recipe-model.d.mts +26 -0
- package/dist/recipe-model.mjs +190 -0
- package/dist/region-lowering.mjs +523 -0
- package/dist/registration-css.mjs +41 -0
- package/dist/registration-roles.mjs +35 -0
- package/dist/render-audit/axe-run.page.mjs +28 -0
- package/dist/render-audit/first-render.page.mjs +35 -0
- package/dist/render-audit/image-shape.page.mjs +42 -0
- package/dist/render-audit/layout-overflow.page.mjs +240 -0
- package/dist/render-audit/layout-shift.page.mjs +36 -0
- package/dist/render-audit/non-text-contrast.page.mjs +138 -0
- package/dist/render-audit/render-states.mjs +66 -293
- package/dist/render-audit/render-states.page.mjs +177 -0
- package/dist/render-audit/text-scale.mjs +42 -0
- package/dist/render-audit/text-scale.page.mjs +25 -0
- package/dist/render-audit/worker.mjs +125 -112
- package/dist/render-audit/worker.page.mjs +21 -0
- package/dist/render-audit.mjs +465 -500
- package/dist/resource-limits.mjs +185 -212
- package/dist/result.d.mts +34 -0
- package/dist/result.mjs +60 -0
- package/dist/role-vocabulary.d.mts +224 -0
- package/dist/role-vocabulary.mjs +223 -0
- package/dist/runtime-paint-contrast.mjs +97 -0
- package/dist/runtime-paint.mjs +42 -0
- package/dist/runtime-requirements.mjs +10 -11
- package/dist/runtime-style.mjs +21 -0
- package/dist/scenario-groups.mjs +42 -33
- package/dist/scenario-inspector.mjs +4 -4
- package/dist/scenario-kit.d.mts +79 -0
- package/dist/scenario-kit.mjs +18 -0
- package/dist/scenario-registry-model.mjs +2 -0
- package/dist/scenario-registry.mjs +89 -108
- package/dist/scenarios-compiler.mjs +901 -642
- package/dist/showcase/ads-views.mjs +103 -0
- package/dist/showcase/assets-view.mjs +221 -0
- package/dist/showcase/client.bundle.js +222 -59
- package/dist/showcase/guide-controls.d.mts +28 -0
- package/dist/showcase/guide-controls.mjs +31 -0
- package/dist/showcase/http-client.bundle.js +172 -9
- package/dist/showcase/index.html +1 -1
- package/dist/showcase/preview-frame.css +16 -0
- package/dist/showcase/preview-frame.d.mts +5 -0
- package/dist/showcase/preview-frame.mjs +4 -0
- package/dist/showcase/preview-root.d.mts +2 -0
- package/dist/showcase/preview-root.mjs +9 -0
- package/dist/showcase/profiles-view.mjs +280 -0
- package/dist/showcase/project-rules.mjs +9 -0
- package/dist/showcase/sandbox.bundle.js +1 -1
- package/dist/showcase/scenario-page.d.mts +39 -0
- package/dist/showcase/scenario-page.mjs +90 -0
- package/dist/showcase/style.css +2 -0
- package/dist/showcase/token-sample.mjs +46 -0
- package/dist/showcase/tokens-view.mjs +185 -0
- package/dist/showcase/ui/apple-touch-icon-9zwv3w79.png +0 -0
- package/dist/showcase/{favicon.ico → ui/favicon-c2c9kvtf.ico} +0 -0
- package/dist/showcase/ui/icon-192-t5zh7mxx.png +0 -0
- package/dist/showcase/ui/icon-512-ed6yz0n0.png +0 -0
- package/dist/showcase/ui/ui.css +1 -1353
- package/dist/showcase/ui/ui.js +165 -1064
- package/dist/showcase-http-routes.mjs +28 -21
- package/dist/skills/README.md +26 -26
- package/dist/skills/ads-designer/README.md +1 -1
- package/dist/skills/ads-designer/SKILL.md +311 -550
- package/dist/skills/ads-designer/references/accessibility.md +162 -114
- package/dist/skills/ads-designer/references/atomic-styles.md +61 -273
- package/dist/skills/ads-designer/references/behaviors.md +144 -278
- package/dist/skills/ads-designer/references/branding.md +132 -222
- package/dist/skills/ads-designer/references/captures.md +13 -7
- package/dist/skills/ads-designer/references/cli.md +80 -63
- package/dist/skills/ads-designer/references/contracts.md +218 -286
- package/dist/skills/ads-designer/references/design-craft.md +1 -1
- package/dist/skills/ads-designer/references/design-data.md +299 -323
- package/dist/skills/ads-designer/references/drafts.md +83 -22
- package/dist/skills/ads-designer/references/evidence.md +2 -1
- package/dist/skills/ads-designer/references/forms.md +199 -0
- package/dist/skills/ads-designer/references/guarded-editing.md +37 -48
- package/dist/skills/ads-designer/references/layers.md +64 -76
- package/dist/skills/ads-designer/references/layout.md +185 -330
- package/dist/skills/ads-designer/references/mobile.md +2 -2
- package/dist/skills/ads-designer/references/motion.md +30 -25
- package/dist/skills/ads-designer/references/performance.md +48 -49
- package/dist/skills/ads-designer/references/pictograms.md +62 -127
- package/dist/skills/ads-designer/references/recipes.md +307 -0
- package/dist/skills/ads-designer/references/review.md +51 -95
- package/dist/skills/ads-designer/references/runtimes.md +34 -33
- package/dist/skills/ads-designer/references/scenarios.md +255 -216
- package/dist/skills/ads-designer/references/stress-test.md +13 -5
- package/dist/skills/ads-designer/references/validation.md +28 -21
- package/dist/skills/ads-designer/references/workflows.md +7 -5
- package/dist/skills/ads-import/SKILL.md +29 -29
- package/dist/skills/ads-import/references/atomic-styles.md +61 -273
- package/dist/skills/ads-import/references/behaviors.md +144 -278
- package/dist/skills/ads-import/references/branding.md +24 -41
- package/dist/skills/ads-import/references/captures.md +13 -7
- package/dist/skills/ads-import/references/cli.md +80 -63
- package/dist/skills/ads-import/references/compatibility.md +3 -3
- package/dist/skills/ads-import/references/contracts.md +218 -286
- package/dist/skills/ads-import/references/design-data.md +299 -323
- package/dist/skills/ads-import/references/drafts.md +83 -22
- package/dist/skills/ads-import/references/evidence.md +2 -1
- package/dist/skills/ads-import/references/forms.md +199 -0
- package/dist/skills/ads-import/references/guarded-editing.md +37 -48
- package/dist/skills/ads-import/references/implementation.md +20 -20
- package/dist/skills/ads-import/references/layers.md +64 -76
- package/dist/skills/ads-import/references/layout.md +185 -330
- package/dist/skills/ads-import/references/recipes.md +307 -0
- package/dist/skills/ads-import/references/review.md +51 -95
- package/dist/skills/ads-import/references/runtimes.md +34 -33
- package/dist/skills/ads-import/references/scenarios.md +255 -216
- package/dist/skills/ads-import/references/tokens.md +26 -17
- package/dist/skills/ads-import/references/validation.md +28 -21
- package/dist/skills/ads-import/references/workflows.md +7 -5
- package/dist/skills/ads-migrate/SKILL.md +20 -5
- package/dist/skills/ads-migrate/references/0.4.1-to-0.4.2.md +6 -0
- package/dist/skills/ads-migrate/references/0.4.6-to-0.4.7.md +46 -0
- package/dist/skills/ads-migrate/references/0.4.7-to-0.5.0-boundary.md +71 -0
- package/dist/skills/ads-migrate/references/0.4.7-to-0.5.0-grid.md +204 -0
- package/dist/skills/ads-migrate/references/0.4.7-to-0.5.0.md +727 -0
- package/dist/skills/ads-port/SKILL.md +27 -28
- package/dist/skills/ads-port/references/atomic-styles.md +61 -273
- package/dist/skills/ads-port/references/behaviors.md +144 -278
- package/dist/skills/ads-port/references/captures.md +13 -7
- package/dist/skills/ads-port/references/cli.md +80 -63
- package/dist/skills/ads-port/references/contracts.md +218 -286
- package/dist/skills/ads-port/references/design-data.md +299 -323
- package/dist/skills/ads-port/references/drafts.md +83 -22
- package/dist/skills/ads-port/references/evidence.md +2 -1
- package/dist/skills/ads-port/references/forms.md +199 -0
- package/dist/skills/ads-port/references/guarded-editing.md +37 -48
- package/dist/skills/ads-port/references/layers.md +64 -76
- package/dist/skills/ads-port/references/layout.md +185 -330
- package/dist/skills/ads-port/references/lint-and-docs.md +2 -3
- package/dist/skills/ads-port/references/native-implementation.md +23 -33
- package/dist/skills/ads-port/references/recipes.md +307 -0
- package/dist/skills/ads-port/references/review.md +51 -95
- package/dist/skills/ads-port/references/runtimes.md +34 -33
- package/dist/skills/ads-port/references/scenarios.md +255 -216
- package/dist/skills/ads-port/references/validation.md +28 -21
- package/dist/skills/ads-port/references/workflows.md +7 -5
- package/dist/source-inventory.mjs +33 -0
- package/dist/source-values.mjs +272 -262
- package/dist/spatial-css.mjs +403 -0
- package/dist/spatial-metadata.mjs +11 -11
- package/dist/spatial-model.mjs +422 -0
- package/dist/spatial-reading.mjs +127 -0
- package/dist/stage-timing.mjs +27 -0
- package/dist/starter-files.mjs +155 -0
- package/dist/starter-overlay.mjs +189 -0
- package/dist/starters/preact/design-system/assets/avatars/avatar.ads.ts +10 -0
- package/dist/starters/preact/design-system/assets/avatars/member.svg +1 -0
- package/dist/starters/preact/design-system/assets/brand/emblem.ads.ts +18 -0
- package/dist/starters/preact/design-system/assets/brand/emblem.svg +4 -0
- package/dist/starters/preact/design-system/assets/brand/iris-emblem.ads.ts +14 -0
- package/dist/starters/preact/design-system/assets/brand/iris-emblem.svg +4 -0
- package/dist/starters/preact/design-system/assets/brand/mark.ads.ts +14 -0
- package/dist/starters/preact/design-system/assets/brand/mark.svg +1 -0
- package/dist/starters/preact/design-system/assets/glyphs/arrow.ads.ts +14 -0
- package/dist/starters/preact/design-system/assets/glyphs/arrow.svg +1 -0
- package/dist/starters/preact/design-system/assets/glyphs/chevron-20.svg +1 -0
- package/dist/starters/preact/design-system/assets/glyphs/chevron-24.svg +1 -0
- package/dist/starters/preact/design-system/assets/glyphs/chevron.ads.ts +20 -0
- package/dist/starters/preact/design-system/assets/glyphs/close.ads.ts +13 -0
- package/dist/starters/preact/design-system/assets/glyphs/close.svg +1 -0
- package/dist/starters/preact/design-system/assets/glyphs/favorite.ads.ts +23 -0
- package/dist/starters/preact/design-system/assets/glyphs/favorite.normal.svg +1 -0
- package/dist/starters/preact/design-system/assets/glyphs/favorite.selected.svg +1 -0
- package/dist/starters/preact/design-system/assets/glyphs/search.ads.ts +10 -0
- package/dist/starters/preact/design-system/assets/glyphs/search.svg +1 -0
- package/dist/starters/preact/design-system/assets/illustrations/journey.ads.ts +32 -0
- package/dist/starters/preact/design-system/assets/illustrations/journey.contrast.svg +6 -0
- package/dist/starters/preact/design-system/assets/illustrations/journey.dark.svg +13 -0
- package/dist/starters/preact/design-system/assets/illustrations/journey.light.svg +13 -0
- package/dist/starters/preact/design-system/assets/logos/harbor-pay.ads.ts +17 -0
- package/dist/starters/preact/design-system/assets/logos/harbor-pay.dark.svg +10 -0
- package/dist/starters/preact/design-system/assets/logos/harbor-pay.light.svg +10 -0
- package/dist/starters/preact/design-system/assets/logos/lumen-cloud.ads.ts +15 -0
- package/dist/starters/preact/design-system/assets/logos/lumen-cloud.dark.svg +9 -0
- package/dist/starters/preact/design-system/assets/logos/lumen-cloud.light.svg +9 -0
- package/dist/starters/preact/design-system/assets/status/error.svg +1 -0
- package/dist/starters/preact/design-system/assets/status/outcomes.ads.ts +31 -0
- package/dist/starters/preact/design-system/assets/status/status.ads.ts +16 -0
- package/dist/starters/preact/design-system/assets/status/success.svg +1 -0
- package/dist/starters/preact/design-system/assets/status/sync-status.ads.ts +14 -0
- package/dist/starters/preact/design-system/assets/status/sync-status.svg +7 -0
- package/dist/starters/preact/design-system/assets/status/warning.svg +1 -0
- package/dist/starters/preact/design-system/components/Actions/Button/Button.ads.scenario.tsx +12 -0
- package/dist/starters/preact/design-system/components/Actions/Button/Button.tsx +198 -0
- package/dist/starters/preact/design-system/components/Actions/IconButton/IconButton.tsx +95 -0
- package/dist/starters/preact/design-system/components/Actions/ToggleTile/ToggleTile.ads.scenario.tsx +22 -0
- package/dist/starters/preact/design-system/components/Actions/ToggleTile/ToggleTile.tsx +60 -0
- package/dist/starters/preact/design-system/components/Containers/Disclosure/Disclosure.ads.scenario.tsx +24 -0
- package/dist/starters/preact/design-system/components/Containers/Disclosure/Disclosure.tsx +50 -0
- package/dist/starters/preact/design-system/components/Content/Artwork/Artwork.ads.scenario.tsx +8 -0
- package/dist/starters/preact/design-system/components/Content/Artwork/Artwork.tsx +110 -0
- package/dist/starters/preact/design-system/components/Content/BarChart/BarChart.ads.scenario.tsx +25 -0
- package/dist/starters/preact/design-system/components/Content/BarChart/BarChart.tsx +72 -0
- package/dist/starters/preact/design-system/components/Content/GuideGrid/GuideGrid.ads.scenario.tsx +8 -0
- package/dist/starters/preact/design-system/components/Content/GuideGrid/GuideGrid.tsx +43 -0
- package/dist/starters/preact/design-system/components/Content/Icon/Icon.ads.scenario.tsx +21 -0
- package/dist/starters/preact/design-system/components/Content/Icon/Icon.tsx +41 -0
- package/dist/starters/preact/design-system/components/Content/Icon/glyphs/arrow.tsx +10 -0
- package/dist/starters/preact/design-system/components/Content/Icon/glyphs/close.tsx +10 -0
- package/dist/starters/preact/design-system/components/Content/Icon/glyphs/search.tsx +10 -0
- package/dist/starters/preact/design-system/components/Content/Image/Image.ads.fixture.ts +9 -0
- package/dist/starters/preact/design-system/components/Content/Image/Image.ads.scenario.tsx +12 -0
- package/dist/starters/preact/design-system/components/Content/Image/Image.tsx +83 -0
- package/dist/starters/preact/design-system/components/Content/InspectedGlyph/InspectedGlyph.ads.scenario.tsx +27 -0
- package/dist/starters/preact/design-system/components/Content/InspectedGlyph/InspectedGlyph.tsx +46 -0
- package/dist/starters/preact/design-system/components/Content/PartnerLogo/PartnerLogo.ads.scenario.tsx +17 -0
- package/dist/starters/preact/design-system/components/Content/PartnerLogo/PartnerLogo.tsx +41 -0
- package/dist/starters/preact/design-system/components/Content/StatusIcon/StatusIcon.ads.scenario.tsx +20 -0
- package/dist/starters/preact/design-system/components/Content/StatusIcon/StatusIcon.tsx +37 -0
- package/dist/starters/preact/design-system/components/Forms/TextField/TextField.ads.scenario.tsx +24 -0
- package/dist/starters/preact/design-system/components/Forms/TextField/TextField.tsx +173 -0
- package/dist/starters/preact/design-system/components/Identity/Identity.ads.scenario.tsx +13 -0
- package/dist/starters/preact/design-system/components/Identity/Identity.tsx +146 -0
- package/dist/starters/preact/design-system/components/Overlays/Menu/Menu.ads.scenario.tsx +27 -0
- package/dist/starters/preact/design-system/components/Overlays/Menu/Menu.tsx +194 -0
- package/dist/starters/preact/design-system/components/Overlays/Popover/Popover.ads.scenario.tsx +19 -0
- package/dist/starters/preact/design-system/components/Overlays/Popover/Popover.tsx +37 -0
- package/dist/starters/preact/design-system/controllers/FormField/FormField.ads.behavior.ts +70 -0
- package/dist/starters/preact/design-system/controllers/FormField/FormField.behavior.spec.ts +237 -0
- package/dist/starters/preact/design-system/controllers/FormField/FormField.ts +343 -0
- package/dist/starters/preact/design-system/controllers/FormField/useFormField.ts +70 -0
- package/dist/starters/preact/design-system/controllers/Palette/Palette.ts +165 -0
- package/dist/starters/preact/design-system/foundation.ads.ts +22 -0
- package/dist/starters/preact/design-system/index.ts +51 -0
- package/dist/starters/preact/design-system/mocks/ConstructionProofs/ConstructionProofs.ads.fixture.ts +5 -0
- package/dist/starters/preact/design-system/mocks/ConstructionProofs/ConstructionProofs.ads.scenario.tsx +22 -0
- package/dist/starters/preact/design-system/mocks/Inspector/Inspector.ads.fixture.ts +12 -0
- package/dist/starters/preact/design-system/mocks/Inspector/Inspector.ads.scenario.tsx +21 -0
- package/dist/starters/preact/design-system/mocks/Workspace/Layouts.ads.scenario.tsx +24 -0
- package/dist/starters/preact/design-system/mocks/Workspace/Media.ads.scenario.tsx +24 -0
- package/dist/starters/preact/design-system/mocks/Workspace/Stress.ads.scenario.tsx +36 -0
- package/dist/starters/preact/design-system/mocks/Workspace/Workspace.ads.fixture.ts +13 -0
- package/dist/starters/preact/design-system/mocks/Workspace/Workspace.ads.scenario.tsx +27 -0
- package/dist/starters/preact/design-system/mocks/Workspace/media/ads.svg +1 -0
- package/dist/starters/preact/design-system/palette.generated.ts +188 -0
- package/dist/starters/preact/design-system/patterns/ArtworkCatalogue/ArtworkCatalogue/ArtworkCatalogue.tsx +73 -0
- package/dist/starters/preact/design-system/patterns/ConstructionWorkbench/ConstructionWorkbench/ConstructionWorkbench.ads.scenario.tsx +23 -0
- package/dist/starters/preact/design-system/patterns/ConstructionWorkbench/ConstructionWorkbench/ConstructionWorkbench.tsx +94 -0
- package/dist/starters/preact/design-system/patterns/Forms/InviteMember/InviteMember.ads.scenario.tsx +21 -0
- package/dist/starters/preact/design-system/patterns/Forms/InviteMember/InviteMember.tsx +137 -0
- package/dist/starters/preact/design-system/patterns/Inspector/Inspector/Inspector.ads.scenario.tsx +22 -0
- package/dist/starters/preact/design-system/patterns/Inspector/Inspector/Inspector.tsx +248 -0
- package/dist/starters/preact/design-system/patterns/Shell/Shell.ads.scenario.tsx +26 -0
- package/dist/starters/preact/design-system/patterns/Shell/Shell.tsx +254 -261
- package/dist/starters/preact/design-system/patterns/Workspace/Workspace/Workspace.ads.scenario.tsx +28 -0
- package/dist/starters/preact/design-system/patterns/Workspace/Workspace/Workspace.tsx +105 -0
- package/dist/starters/preact/design-system/patterns/Workspace/Workspace/WorkspacePanels.tsx +179 -0
- package/dist/starters/preact/design-system/profiles/Containers/containers.ads.ts +67 -0
- package/dist/starters/preact/design-system/profiles/Containers/frames.ads.ts +32 -0
- package/dist/starters/preact/design-system/profiles/Containers/geometry.ads.ts +30 -0
- package/dist/starters/preact/design-system/profiles/Containers/spacing.ads.ts +26 -0
- package/dist/starters/preact/design-system/profiles/Controls/controls.ads.ts +157 -0
- package/dist/starters/preact/design-system/profiles/Controls/frames.ads.ts +50 -0
- package/dist/starters/preact/design-system/profiles/Controls/spacing.ads.ts +29 -0
- package/dist/starters/preact/design-system/profiles/Focus/keyboard.ads.ts +13 -0
- package/dist/starters/preact/design-system/profiles/Identity/identity.ads.ts +25 -0
- package/dist/starters/preact/design-system/profiles/Identity/spacing.ads.ts +22 -0
- package/dist/starters/preact/design-system/profiles/Layout/grid.ads.ts +69 -0
- package/dist/starters/preact/design-system/profiles/Layout/inspector.ads.ts +146 -0
- package/dist/starters/preact/design-system/profiles/Layout/overlays.ads.ts +94 -0
- package/dist/starters/preact/design-system/profiles/Layout/regions.ads.ts +296 -0
- package/dist/starters/preact/design-system/profiles/Motion/feedback.ads.ts +92 -0
- package/dist/starters/preact/design-system/profiles/Surfaces/controls.ads.ts +142 -0
- package/dist/starters/preact/design-system/profiles/Surfaces/document.ads.ts +2 -0
- package/dist/starters/preact/design-system/profiles/Surfaces/materials.ads.ts +18 -0
- package/dist/starters/preact/design-system/profiles/Surfaces/surfaces.ads.ts +48 -0
- package/dist/starters/preact/design-system/profiles/Typography/details.ads.ts +19 -0
- package/dist/starters/preact/design-system/profiles/Typography/document.ads.ts +2 -0
- package/dist/starters/preact/design-system/profiles/Typography/headings.ads.ts +15 -0
- package/dist/starters/preact/design-system/profiles/Typography/text.ads.ts +73 -0
- package/dist/starters/preact/design-system/profiles/Visuals/artwork.ads.ts +46 -0
- package/dist/starters/preact/design-system/profiles/Visuals/charts.ads.ts +31 -0
- package/dist/starters/preact/design-system/profiles/Visuals/content.ads.ts +52 -0
- package/dist/starters/preact/design-system/profiles/Visuals/glyphs.ads.ts +35 -0
- package/dist/starters/preact/design-system/profiles/Visuals/identity.ads.ts +24 -0
- package/dist/starters/preact/design-system/tokens/Artwork/paint.ads.css +7 -0
- package/dist/starters/preact/design-system/tokens/Artwork/visual-size.ads.css +12 -0
- package/dist/starters/preact/design-system/tokens/Brand/paint.ads.css +7 -0
- package/dist/starters/preact/design-system/tokens/Charts/paint.ads.css +19 -0
- package/dist/starters/preact/design-system/tokens/Containers/border-width.ads.css +1 -0
- package/dist/starters/preact/design-system/tokens/Containers/content-gap.ads.css +5 -0
- package/dist/starters/preact/design-system/tokens/Containers/frame-inset.ads.css +6 -0
- package/dist/starters/preact/design-system/tokens/Containers/frame-size.ads.css +11 -0
- package/dist/starters/preact/design-system/tokens/Containers/radius.ads.css +1 -0
- package/dist/starters/preact/design-system/tokens/Controls/border-width.ads.css +4 -0
- package/dist/starters/preact/design-system/tokens/Controls/content-gap.ads.css +6 -0
- package/dist/starters/preact/design-system/tokens/Controls/control-min-size.ads.css +17 -0
- package/dist/starters/preact/design-system/tokens/Controls/frame-inset.ads.css +21 -0
- package/dist/starters/preact/design-system/tokens/Controls/radius.ads.css +1 -0
- package/dist/starters/preact/design-system/tokens/Controls/target-min-size.ads.css +2 -0
- package/dist/starters/preact/design-system/tokens/Controls/visual-size.ads.css +2 -0
- package/dist/starters/preact/design-system/tokens/Focus/border-width.ads.css +1 -0
- package/dist/starters/preact/design-system/tokens/Focus/focus-offset.ads.css +1 -0
- package/dist/starters/preact/design-system/tokens/Foundation/spacing.ads.css +20 -0
- package/dist/starters/preact/design-system/tokens/Grid/grid-gutter.ads.css +6 -0
- package/dist/starters/preact/design-system/tokens/Grid/layer.ads.css +2 -0
- package/dist/starters/preact/design-system/tokens/Grid/layout-size.ads.css +15 -0
- package/dist/starters/preact/design-system/tokens/Grid/spacing.ads.css +12 -0
- package/dist/starters/preact/design-system/tokens/Grid/track-count.ads.css +1 -0
- package/dist/starters/preact/design-system/tokens/Identity/content-gap.ads.css +6 -0
- package/dist/starters/preact/design-system/tokens/Identity/visual-size.ads.css +1 -0
- package/dist/starters/preact/design-system/tokens/Motion/duration.ads.css +6 -0
- package/dist/starters/preact/design-system/tokens/Motion/easing.ads.css +5 -0
- package/dist/starters/preact/design-system/tokens/Motion/motion-angle.ads.css +1 -0
- package/dist/starters/preact/design-system/tokens/Motion/motion-distance.ads.css +2 -0
- package/dist/starters/preact/design-system/tokens/Motion/motion-scale.ads.css +9 -0
- package/dist/starters/preact/design-system/tokens/Surfaces/blur.ads.css +2 -0
- package/dist/starters/preact/design-system/tokens/Surfaces/gradient.ads.css +2 -0
- package/dist/starters/preact/design-system/tokens/Surfaces/opacity.ads.css +2 -0
- package/dist/starters/preact/design-system/tokens/Surfaces/paint.ads.css +58 -0
- package/dist/starters/preact/design-system/tokens/Surfaces/shadow.ads.css +20 -0
- package/dist/starters/preact/design-system/tokens/Typography/font-family.ads.css +1 -0
- package/dist/starters/preact/design-system/tokens/Typography/font-features.ads.css +1 -0
- package/dist/starters/preact/design-system/tokens/Typography/font-size.ads.css +9 -0
- package/dist/starters/preact/design-system/tokens/Typography/font-stretch.ads.css +1 -0
- package/dist/starters/preact/design-system/tokens/Typography/font-variations.ads.css +1 -0
- package/dist/starters/preact/design-system/tokens/Typography/font-weight.ads.css +1 -0
- package/dist/starters/preact/design-system/tokens/Typography/letter-spacing.ads.css +1 -0
- package/dist/starters/preact/design-system/tokens/Typography/line-height.ads.css +11 -0
- package/dist/starters/preact/design-system/tokens/Typography/word-spacing.ads.css +1 -0
- package/dist/starters/preact/starter.json +11 -0
- package/dist/starters/react/design-system/assets/avatars/avatar.ads.ts +10 -0
- package/dist/starters/react/design-system/assets/avatars/member.svg +1 -0
- package/dist/starters/react/design-system/assets/brand/emblem.ads.ts +18 -0
- package/dist/starters/react/design-system/assets/brand/emblem.svg +4 -0
- package/dist/starters/react/design-system/assets/brand/iris-emblem.ads.ts +14 -0
- package/dist/starters/react/design-system/assets/brand/iris-emblem.svg +4 -0
- package/dist/starters/react/design-system/assets/brand/mark.ads.ts +14 -0
- package/dist/starters/react/design-system/assets/brand/mark.svg +1 -0
- package/dist/starters/react/design-system/assets/glyphs/arrow.ads.ts +14 -0
- package/dist/starters/react/design-system/assets/glyphs/arrow.svg +1 -0
- package/dist/starters/react/design-system/assets/glyphs/chevron-20.svg +1 -0
- package/dist/starters/react/design-system/assets/glyphs/chevron-24.svg +1 -0
- package/dist/starters/react/design-system/assets/glyphs/chevron.ads.ts +20 -0
- package/dist/starters/react/design-system/assets/glyphs/close.ads.ts +13 -0
- package/dist/starters/react/design-system/assets/glyphs/close.svg +1 -1
- package/dist/starters/react/design-system/assets/glyphs/favorite.ads.ts +23 -0
- package/dist/starters/react/design-system/assets/glyphs/favorite.normal.svg +1 -0
- package/dist/starters/react/design-system/assets/glyphs/favorite.selected.svg +1 -0
- package/dist/starters/react/design-system/assets/glyphs/search.ads.ts +10 -0
- package/dist/starters/react/design-system/assets/glyphs/search.svg +1 -1
- package/dist/starters/react/design-system/assets/illustrations/journey.ads.ts +32 -0
- package/dist/starters/react/design-system/assets/illustrations/journey.contrast.svg +6 -0
- package/dist/starters/react/design-system/assets/illustrations/journey.dark.svg +13 -0
- package/dist/starters/react/design-system/assets/illustrations/journey.light.svg +13 -0
- package/dist/starters/react/design-system/assets/logos/harbor-pay.ads.ts +17 -0
- package/dist/starters/react/design-system/assets/logos/harbor-pay.dark.svg +10 -0
- package/dist/starters/react/design-system/assets/logos/harbor-pay.light.svg +10 -0
- package/dist/starters/react/design-system/assets/logos/lumen-cloud.ads.ts +15 -0
- package/dist/starters/react/design-system/assets/logos/lumen-cloud.dark.svg +9 -0
- package/dist/starters/react/design-system/assets/logos/lumen-cloud.light.svg +9 -0
- package/dist/starters/react/design-system/assets/status/error.svg +1 -0
- package/dist/starters/react/design-system/assets/status/outcomes.ads.ts +31 -0
- package/dist/starters/react/design-system/assets/status/status.ads.ts +16 -0
- package/dist/starters/react/design-system/assets/status/success.svg +1 -0
- package/dist/starters/react/design-system/assets/status/sync-status.ads.ts +14 -0
- package/dist/starters/react/design-system/assets/status/sync-status.svg +7 -0
- package/dist/starters/react/design-system/assets/status/warning.svg +1 -0
- package/dist/starters/react/design-system/components/Actions/Button/Button.ads.scenario.tsx +11 -12
- package/dist/starters/react/design-system/components/Actions/Button/Button.tsx +187 -45
- package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.tsx +83 -48
- package/dist/starters/react/design-system/components/Actions/ToggleTile/ToggleTile.ads.scenario.tsx +22 -0
- package/dist/starters/react/design-system/components/Actions/ToggleTile/ToggleTile.tsx +60 -0
- package/dist/starters/react/design-system/components/Containers/Disclosure/Disclosure.ads.scenario.tsx +24 -0
- package/dist/starters/react/design-system/components/Containers/Disclosure/Disclosure.tsx +50 -0
- package/dist/starters/react/design-system/components/Content/Artwork/Artwork.ads.scenario.tsx +8 -0
- package/dist/starters/react/design-system/components/Content/Artwork/Artwork.tsx +110 -0
- package/dist/starters/react/design-system/components/Content/BarChart/BarChart.ads.scenario.tsx +25 -0
- package/dist/starters/react/design-system/components/Content/BarChart/BarChart.tsx +72 -0
- package/dist/starters/react/design-system/components/Content/GuideGrid/GuideGrid.ads.scenario.tsx +8 -0
- package/dist/starters/react/design-system/components/Content/GuideGrid/GuideGrid.tsx +43 -0
- package/dist/starters/react/design-system/components/Content/Icon/Icon.ads.scenario.tsx +21 -16
- package/dist/starters/react/design-system/components/Content/Icon/Icon.tsx +32 -33
- package/dist/starters/react/design-system/components/Content/Icon/glyphs/arrow.tsx +10 -0
- package/dist/starters/react/design-system/components/Content/Icon/glyphs/close.tsx +10 -0
- package/dist/starters/react/design-system/components/Content/Icon/glyphs/search.tsx +10 -0
- package/dist/starters/react/design-system/components/Content/Image/Image.ads.fixture.ts +9 -2
- package/dist/starters/react/design-system/components/Content/Image/Image.ads.scenario.tsx +10 -11
- package/dist/starters/react/design-system/components/Content/Image/Image.tsx +74 -42
- package/dist/starters/react/design-system/components/Content/InspectedGlyph/InspectedGlyph.ads.scenario.tsx +27 -0
- package/dist/starters/react/design-system/components/Content/InspectedGlyph/InspectedGlyph.tsx +46 -0
- package/dist/starters/react/design-system/components/Content/PartnerLogo/PartnerLogo.ads.scenario.tsx +17 -0
- package/dist/starters/react/design-system/components/Content/PartnerLogo/PartnerLogo.tsx +41 -0
- package/dist/starters/react/design-system/components/Content/StatusIcon/StatusIcon.ads.scenario.tsx +20 -0
- package/dist/starters/react/design-system/components/Content/StatusIcon/StatusIcon.tsx +37 -0
- package/dist/starters/react/design-system/components/Forms/TextField/TextField.ads.scenario.tsx +23 -12
- package/dist/starters/react/design-system/components/Forms/TextField/TextField.tsx +161 -49
- package/dist/starters/react/design-system/components/Identity/Identity.ads.scenario.tsx +13 -0
- package/dist/starters/react/design-system/components/Identity/Identity.tsx +146 -0
- package/dist/starters/react/design-system/components/Overlays/Menu/Menu.ads.scenario.tsx +27 -0
- package/dist/starters/react/design-system/components/Overlays/Menu/Menu.tsx +194 -0
- package/dist/starters/react/design-system/components/Overlays/Popover/Popover.ads.scenario.tsx +19 -0
- package/dist/starters/react/design-system/components/Overlays/Popover/Popover.tsx +37 -0
- package/dist/starters/react/design-system/controllers/FormField/FormField.ads.behavior.ts +70 -0
- package/dist/starters/react/design-system/controllers/FormField/FormField.behavior.spec.ts +237 -0
- package/dist/starters/react/design-system/controllers/FormField/FormField.ts +343 -0
- package/dist/starters/react/design-system/controllers/FormField/useFormField.ts +70 -0
- package/dist/starters/react/design-system/controllers/Palette/Palette.ts +5 -4
- package/dist/starters/react/design-system/foundation.ads.ts +22 -0
- package/dist/starters/react/design-system/index.ts +51 -12
- package/dist/starters/react/design-system/mocks/ConstructionProofs/ConstructionProofs.ads.fixture.ts +5 -0
- package/dist/starters/react/design-system/mocks/ConstructionProofs/ConstructionProofs.ads.scenario.tsx +22 -0
- package/dist/starters/react/design-system/mocks/Inspector/Inspector.ads.fixture.ts +12 -0
- package/dist/starters/react/design-system/mocks/Inspector/Inspector.ads.scenario.tsx +21 -0
- package/dist/starters/react/design-system/mocks/Workspace/Layouts.ads.scenario.tsx +24 -0
- package/dist/starters/react/design-system/mocks/Workspace/Media.ads.scenario.tsx +24 -0
- package/dist/starters/react/design-system/mocks/Workspace/Stress.ads.scenario.tsx +36 -0
- package/dist/starters/react/design-system/mocks/Workspace/Workspace.ads.fixture.ts +13 -0
- package/dist/starters/react/design-system/mocks/Workspace/Workspace.ads.scenario.tsx +27 -0
- package/dist/starters/react/design-system/mocks/Workspace/media/ads.svg +1 -0
- package/dist/starters/react/design-system/palette.generated.ts +188 -0
- package/dist/starters/react/design-system/patterns/ArtworkCatalogue/ArtworkCatalogue/ArtworkCatalogue.tsx +73 -0
- package/dist/starters/react/design-system/patterns/ConstructionWorkbench/ConstructionWorkbench/ConstructionWorkbench.ads.scenario.tsx +23 -0
- package/dist/starters/react/design-system/patterns/ConstructionWorkbench/ConstructionWorkbench/ConstructionWorkbench.tsx +94 -0
- package/dist/starters/react/design-system/patterns/Forms/InviteMember/InviteMember.ads.scenario.tsx +21 -0
- package/dist/starters/react/design-system/patterns/Forms/InviteMember/InviteMember.tsx +137 -0
- package/dist/starters/react/design-system/patterns/Inspector/Inspector/Inspector.ads.scenario.tsx +22 -0
- package/dist/starters/react/design-system/patterns/Inspector/Inspector/Inspector.tsx +248 -0
- package/dist/starters/react/design-system/patterns/Shell/Shell.ads.scenario.tsx +26 -21
- package/dist/starters/react/design-system/patterns/Shell/Shell.tsx +255 -261
- package/dist/starters/react/design-system/patterns/Workspace/Workspace/Workspace.ads.scenario.tsx +28 -0
- package/dist/starters/react/design-system/patterns/Workspace/Workspace/Workspace.tsx +105 -0
- package/dist/starters/react/design-system/patterns/Workspace/Workspace/WorkspacePanels.tsx +179 -0
- package/dist/starters/react/design-system/profiles/Containers/containers.ads.ts +67 -0
- package/dist/starters/react/design-system/profiles/Containers/frames.ads.ts +32 -0
- package/dist/starters/react/design-system/profiles/Containers/geometry.ads.ts +30 -0
- package/dist/starters/react/design-system/profiles/Containers/spacing.ads.ts +26 -0
- package/dist/starters/react/design-system/profiles/Controls/controls.ads.ts +157 -0
- package/dist/starters/react/design-system/profiles/Controls/frames.ads.ts +50 -0
- package/dist/starters/react/design-system/profiles/Controls/spacing.ads.ts +29 -0
- package/dist/starters/react/design-system/profiles/Focus/keyboard.ads.ts +13 -0
- package/dist/starters/react/design-system/profiles/Identity/identity.ads.ts +25 -0
- package/dist/starters/react/design-system/profiles/Identity/spacing.ads.ts +22 -0
- package/dist/starters/react/design-system/profiles/Layout/grid.ads.ts +69 -0
- package/dist/starters/react/design-system/profiles/Layout/inspector.ads.ts +146 -0
- package/dist/starters/react/design-system/profiles/Layout/overlays.ads.ts +94 -0
- package/dist/starters/react/design-system/profiles/Layout/regions.ads.ts +296 -0
- package/dist/starters/react/design-system/profiles/Motion/feedback.ads.ts +92 -0
- package/dist/starters/react/design-system/profiles/Surfaces/controls.ads.ts +142 -0
- package/dist/starters/react/design-system/profiles/Surfaces/document.ads.ts +2 -0
- package/dist/starters/react/design-system/profiles/Surfaces/materials.ads.ts +18 -0
- package/dist/starters/react/design-system/profiles/Surfaces/surfaces.ads.ts +48 -0
- package/dist/starters/react/design-system/profiles/Typography/details.ads.ts +19 -0
- package/dist/starters/react/design-system/profiles/Typography/document.ads.ts +2 -0
- package/dist/starters/react/design-system/profiles/Typography/headings.ads.ts +15 -0
- package/dist/starters/react/design-system/profiles/Typography/text.ads.ts +73 -0
- package/dist/starters/react/design-system/profiles/Visuals/artwork.ads.ts +46 -0
- package/dist/starters/react/design-system/profiles/Visuals/charts.ads.ts +31 -0
- package/dist/starters/react/design-system/profiles/Visuals/content.ads.ts +52 -0
- package/dist/starters/react/design-system/profiles/Visuals/glyphs.ads.ts +35 -0
- package/dist/starters/react/design-system/profiles/Visuals/identity.ads.ts +24 -0
- package/dist/starters/react/design-system/tokens/Artwork/paint.ads.css +7 -0
- package/dist/starters/react/design-system/tokens/Artwork/visual-size.ads.css +12 -0
- package/dist/starters/react/design-system/tokens/Brand/paint.ads.css +7 -0
- package/dist/starters/react/design-system/tokens/Charts/paint.ads.css +19 -0
- package/dist/starters/react/design-system/tokens/Containers/border-width.ads.css +1 -0
- package/dist/starters/react/design-system/tokens/Containers/content-gap.ads.css +5 -0
- package/dist/starters/react/design-system/tokens/Containers/frame-inset.ads.css +6 -0
- package/dist/starters/react/design-system/tokens/Containers/frame-size.ads.css +11 -0
- package/dist/starters/react/design-system/tokens/Containers/radius.ads.css +1 -0
- package/dist/starters/react/design-system/tokens/Controls/border-width.ads.css +4 -0
- package/dist/starters/react/design-system/tokens/Controls/content-gap.ads.css +6 -0
- package/dist/starters/react/design-system/tokens/Controls/control-min-size.ads.css +17 -0
- package/dist/starters/react/design-system/tokens/Controls/frame-inset.ads.css +21 -0
- package/dist/starters/react/design-system/tokens/Controls/radius.ads.css +1 -0
- package/dist/starters/react/design-system/tokens/Controls/target-min-size.ads.css +2 -0
- package/dist/starters/react/design-system/tokens/Controls/visual-size.ads.css +2 -0
- package/dist/starters/react/design-system/tokens/Focus/border-width.ads.css +1 -0
- package/dist/starters/react/design-system/tokens/Focus/focus-offset.ads.css +1 -0
- package/dist/starters/react/design-system/tokens/Foundation/spacing.ads.css +20 -0
- package/dist/starters/react/design-system/tokens/Grid/grid-gutter.ads.css +6 -0
- package/dist/starters/react/design-system/tokens/Grid/layer.ads.css +2 -0
- package/dist/starters/react/design-system/tokens/Grid/layout-size.ads.css +15 -0
- package/dist/starters/react/design-system/tokens/Grid/spacing.ads.css +12 -0
- package/dist/starters/react/design-system/tokens/Grid/track-count.ads.css +1 -0
- package/dist/starters/react/design-system/tokens/Identity/content-gap.ads.css +6 -0
- package/dist/starters/react/design-system/tokens/Identity/visual-size.ads.css +1 -0
- package/dist/starters/react/design-system/tokens/Motion/duration.ads.css +6 -0
- package/dist/starters/react/design-system/tokens/Motion/easing.ads.css +5 -0
- package/dist/starters/react/design-system/tokens/Motion/motion-angle.ads.css +1 -0
- package/dist/starters/react/design-system/tokens/Motion/motion-distance.ads.css +2 -0
- package/dist/starters/react/design-system/tokens/Motion/motion-scale.ads.css +9 -0
- package/dist/starters/react/design-system/tokens/Surfaces/blur.ads.css +2 -0
- package/dist/starters/react/design-system/tokens/Surfaces/gradient.ads.css +2 -0
- package/dist/starters/react/design-system/tokens/Surfaces/opacity.ads.css +2 -0
- package/dist/starters/react/design-system/tokens/Surfaces/paint.ads.css +58 -0
- package/dist/starters/react/design-system/tokens/Surfaces/shadow.ads.css +20 -0
- package/dist/starters/react/design-system/tokens/Typography/font-family.ads.css +1 -0
- package/dist/starters/react/design-system/tokens/Typography/font-features.ads.css +1 -0
- package/dist/starters/react/design-system/tokens/Typography/font-size.ads.css +9 -0
- package/dist/starters/react/design-system/tokens/Typography/font-stretch.ads.css +1 -0
- package/dist/starters/react/design-system/tokens/Typography/font-variations.ads.css +1 -0
- package/dist/starters/react/design-system/tokens/Typography/font-weight.ads.css +1 -0
- package/dist/starters/react/design-system/tokens/Typography/letter-spacing.ads.css +1 -0
- package/dist/starters/react/design-system/tokens/Typography/line-height.ads.css +11 -0
- package/dist/starters/react/design-system/tokens/Typography/word-spacing.ads.css +1 -0
- package/dist/starters/react/starter.json +11 -0
- package/dist/state-conditions.d.mts +51 -0
- package/dist/state-conditions.mjs +67 -0
- package/dist/static-values.mjs +94 -0
- package/dist/surface-contrast.mjs +194 -0
- package/dist/target-size.mjs +177 -0
- package/dist/task-cache.mjs +142 -136
- package/dist/task-worker.mjs +18 -18
- package/dist/test-boundaries.mjs +50 -189
- package/dist/token-checks.mjs +21 -0
- package/dist/token-dtcg.mjs +135 -0
- package/dist/token-expression.mjs +19 -0
- package/dist/token-inventory.mjs +146 -0
- package/dist/token-operations.mjs +37 -0
- package/dist/token-overlap.mjs +29 -0
- package/dist/token-provenance.mjs +260 -0
- package/dist/token-references.mjs +71 -0
- package/dist/token-registrations.mjs +116 -0
- package/dist/token-resolution.mjs +38 -0
- package/dist/token-sections.mjs +123 -0
- package/dist/token-shapes.mjs +121 -0
- package/dist/token-sheet-check.mjs +54 -0
- package/dist/token-type-check.mjs +89 -0
- package/dist/token-view-facts.mjs +62 -0
- package/dist/tsconfig.declarations.json +24 -0
- package/dist/types/css-tree.d.ts +45 -0
- package/dist/ui-framework.mjs +34 -34
- package/dist/units.mjs +186 -226
- package/dist/unknown.d.mts +9 -0
- package/dist/unknown.mjs +13 -0
- package/dist/validation-checks.mjs +62 -71
- package/dist/validation-inputs.mjs +287 -184
- package/dist/validation.mjs +132 -159
- package/dist/verification/browser.d.mts +21 -25
- package/dist/verification/browser.mjs +281 -124
- package/dist/verification/browser.page.d.mts +22 -0
- package/dist/verification/browser.page.mjs +19 -0
- package/dist/verification/paint-audit.page.d.mts +55 -0
- package/dist/verification/paint-audit.page.mjs +144 -0
- package/dist/verification/playwright-reporter.mjs +160 -0
- package/dist/verification/preview-startup.d.mts +51 -0
- package/dist/verification/preview-startup.mjs +76 -0
- package/dist/verification/request.d.mts +28 -0
- package/dist/verification/request.mjs +30 -0
- package/dist/verification/unit-preload.mjs +37 -0
- package/dist/verification.mjs +574 -607
- package/docs/ADS.md +562 -565
- package/docs/ARCHITECTURE.md +1857 -1345
- package/docs/ASSETS.md +416 -0
- package/docs/BEHAVIORS.md +339 -370
- package/docs/CACHING.md +365 -154
- package/docs/CHANGELOG.md +171 -21
- package/docs/COMPARISON.md +21 -26
- package/docs/DESIGN-REFERENCES.md +39 -26
- package/docs/GUIDE.md +2306 -1288
- package/docs/LANGUAGE.md +893 -0
- package/docs/LOWERING.md +168 -0
- package/docs/MCP.md +1461 -1179
- package/docs/MOTION.md +265 -0
- package/docs/PROFILE-KINDS.md +390 -0
- package/docs/PROFILES.md +176 -0
- package/docs/RULES.md +559 -0
- package/docs/STARTER.md +167 -0
- package/docs/TOKEN-ROLES.md +375 -0
- package/docs/benchmarks/README.md +26 -27
- package/package.json +59 -45
- package/dist/a11y.mjs +0 -187
- package/dist/assets.mjs +0 -159
- package/dist/atomic-composition.mjs +0 -337
- package/dist/atomic-trace.mjs +0 -162
- package/dist/behavior-libraries.mjs +0 -162
- package/dist/behaviors.mjs +0 -306
- package/dist/brand-assets.mjs +0 -458
- package/dist/brands.mjs +0 -141
- package/dist/component-contrast.mjs +0 -256
- package/dist/construction-styles.cjs +0 -10
- package/dist/contracts/foundation.json +0 -211
- package/dist/contracts/tokens.json +0 -52
- package/dist/contracts.d.mts +0 -30
- package/dist/contrast-composition.mjs +0 -80
- package/dist/contrast-styles.mjs +0 -88
- package/dist/control-padding.mjs +0 -113
- package/dist/css-values.mjs +0 -27
- package/dist/declarative-flow.mjs +0 -244
- package/dist/design-values.mjs +0 -173
- package/dist/font-rules.mjs +0 -108
- package/dist/fonts-generated.mjs +0 -112
- package/dist/foundation-views.mjs +0 -242
- package/dist/foundation.mjs +0 -154
- package/dist/generated-entries.mjs +0 -198
- package/dist/html.mjs +0 -30
- package/dist/icons.mjs +0 -154
- package/dist/image-attributes.mjs +0 -187
- package/dist/image-size.mjs +0 -28
- package/dist/layers.mjs +0 -461
- package/dist/layout-widths.mjs +0 -332
- package/dist/linaria/atomic-css.cjs +0 -2
- package/dist/linaria/atomic-styled.cjs +0 -2
- package/dist/linaria/preserve-values.cjs +0 -58
- package/dist/linaria/spatial-inputs.cjs +0 -56
- package/dist/linaria.d.mts +0 -1
- package/dist/linaria.mjs +0 -9
- package/dist/lockup-composition.mjs +0 -44
- package/dist/lockup-model.cjs +0 -64
- package/dist/paint-contracts.mjs +0 -216
- package/dist/pictograms.mjs +0 -52
- package/dist/public-api.mjs +0 -121
- package/dist/public-props.mjs +0 -91
- package/dist/render-audit/axe-run.mjs +0 -17
- package/dist/render-audit/first-render.mjs +0 -40
- package/dist/render-audit/image-shape.mjs +0 -46
- package/dist/render-audit/layout-overflow.mjs +0 -167
- package/dist/render-audit/layout-shift.mjs +0 -32
- package/dist/render-audit/non-text-contrast.mjs +0 -151
- package/dist/render-audit/pictograms.mjs +0 -88
- package/dist/render-color-probe.mjs +0 -202
- package/dist/render-composition.mjs +0 -186
- package/dist/runtime-contracts.mjs +0 -506
- package/dist/scenario-program.mjs +0 -19
- package/dist/scenario-selectors.mjs +0 -237
- package/dist/scenario-slots.mjs +0 -217
- package/dist/scenario-trace.mjs +0 -314
- package/dist/scenarios-vite.d.mts +0 -2
- package/dist/scenarios-vite.mjs +0 -2
- package/dist/scenarios.mjs +0 -616
- package/dist/selector-match.mjs +0 -94
- package/dist/showcase/comparison.js +0 -48
- package/dist/showcase/connection.js +0 -10
- package/dist/showcase/draft-navigation.js +0 -59
- package/dist/showcase/foundation-view.css +0 -58
- package/dist/showcase/foundation-view.mjs +0 -255
- package/dist/showcase/guide-controls.ads.review.mjs +0 -32
- package/dist/showcase/http-connection.js +0 -86
- package/dist/showcase/http-preview.js +0 -81
- package/dist/showcase/icons.js +0 -2
- package/dist/showcase/navigation.js +0 -13
- package/dist/showcase/pictogram-view.mjs +0 -53
- package/dist/showcase/preview-frame.ads.review.css +0 -46
- package/dist/showcase/preview-frame.ads.review.d.mts +0 -11
- package/dist/showcase/preview-frame.ads.review.mjs +0 -22
- package/dist/showcase/preview-state.js +0 -11
- package/dist/showcase/refresh-scheduler.js +0 -23
- package/dist/showcase/resource-reader.js +0 -37
- package/dist/showcase-coverage.mjs +0 -139
- package/dist/source-symbols.mjs +0 -4
- package/dist/spatial-composition.mjs +0 -322
- package/dist/spatial-contexts.cjs +0 -56
- package/dist/spatial-css.cjs +0 -351
- package/dist/spatial-inputs.cjs +0 -80
- package/dist/spatial-model.cjs +0 -322
- package/dist/spatial.mjs +0 -21
- package/dist/stage-timing.cjs +0 -21
- package/dist/starters/preact/design-system/patterns/Conversation/Conversation.tsx +0 -105
- package/dist/starters/preact/design-system/review/demo-frame/DemoFrame.ads.review.tsx +0 -7
- package/dist/starters/preact/design-system/review/screen-frame/ScreenFrame.ads.review.tsx +0 -10
- package/dist/starters/preact/design-system/showcase/mcp/main.ads.mount.tsx +0 -8
- package/dist/starters/preact/ds.config.json +0 -37
- package/dist/starters/preact/package.json +0 -35
- package/dist/starters/preact/src/vite-env.d.ts +0 -7
- package/dist/starters/preact/tsconfig.json +0 -35
- package/dist/starters/preact/vite.config.ts +0 -23
- package/dist/starters/react/ADS.md +0 -286
- package/dist/starters/react/README.md +0 -184
- package/dist/starters/react/biome.css.json +0 -21
- package/dist/starters/react/design-system/assets/brand/README.md +0 -41
- package/dist/starters/react/design-system/assets/brand/app-icon.svg +0 -4
- package/dist/starters/react/design-system/assets/brand/logo.dark.svg +0 -6
- package/dist/starters/react/design-system/assets/brand/logo.svg +0 -6
- package/dist/starters/react/design-system/assets/glyphs/README.md +0 -15
- package/dist/starters/react/design-system/assets/glyphs/aliases.json +0 -1
- package/dist/starters/react/design-system/assets/glyphs/check.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/chevron-down.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/chevron-right.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/external-link.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/info.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/menu.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/plus.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/warning.svg +0 -1
- package/dist/starters/react/design-system/assets/pictograms/catalog.ads.json +0 -13
- package/dist/starters/react/design-system/assets/pictograms/journey.dark.svg +0 -7
- package/dist/starters/react/design-system/assets/pictograms/journey.svg +0 -7
- package/dist/starters/react/design-system/components/Actions/Button/Button.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/components/Actions/Button/Button.ads.fixture.ts +0 -1
- package/dist/starters/react/design-system/components/Actions/Button/README.md +0 -12
- package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.ads.fixture.ts +0 -9
- package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.ads.scenario.tsx +0 -16
- package/dist/starters/react/design-system/components/Actions/IconButton/README.md +0 -17
- package/dist/starters/react/design-system/components/Content/Icon/Icon.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/components/Content/Icon/Icon.ads.fixture.ts +0 -6
- package/dist/starters/react/design-system/components/Content/Icon/README.md +0 -17
- package/dist/starters/react/design-system/components/Content/Icon/glyphs.ts +0 -17
- package/dist/starters/react/design-system/components/Content/Image/Image.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/components/Content/Image/README.md +0 -20
- package/dist/starters/react/design-system/components/Content/Logo/Logo.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/components/Content/Logo/Logo.ads.fixture.ts +0 -1
- package/dist/starters/react/design-system/components/Content/Logo/Logo.ads.scenario.tsx +0 -12
- package/dist/starters/react/design-system/components/Content/Logo/Logo.tsx +0 -35
- package/dist/starters/react/design-system/components/Content/Logo/README.md +0 -12
- package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.ads.fixture.ts +0 -1
- package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.ads.scenario.tsx +0 -7
- package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.tsx +0 -26
- package/dist/starters/react/design-system/components/Forms/TextField/README.md +0 -14
- package/dist/starters/react/design-system/components/Forms/TextField/TextField.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/components/Forms/TextField/TextField.ads.fixture.ts +0 -6
- package/dist/starters/react/design-system/composition/Search/SearchPage/README.md +0 -4
- package/dist/starters/react/design-system/composition/Search/SearchPage/SearchPage.ads.fixture.ts +0 -7
- package/dist/starters/react/design-system/composition/Search/SearchPage/SearchPage.ads.scenario.tsx +0 -16
- package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/README.md +0 -5
- package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/WorkspacePage.ads.fixture.ts +0 -13
- package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/WorkspacePage.ads.scenario.tsx +0 -22
- package/dist/starters/react/design-system/controllers/Palette/Palette.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.fixture.ts +0 -7
- package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.scenario.tsx +0 -15
- package/dist/starters/react/design-system/patterns/Conversation/Conversation.tsx +0 -105
- package/dist/starters/react/design-system/patterns/Conversation/README.md +0 -9
- package/dist/starters/react/design-system/patterns/Search/SearchBar/README.md +0 -12
- package/dist/starters/react/design-system/patterns/Search/SearchBar/SearchBar.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/patterns/Search/SearchBar/SearchBar.ads.fixture.ts +0 -1
- package/dist/starters/react/design-system/patterns/Search/SearchBar/SearchBar.ads.scenario.tsx +0 -11
- package/dist/starters/react/design-system/patterns/Search/SearchBar/SearchBar.tsx +0 -41
- package/dist/starters/react/design-system/patterns/Shell/Floating.ads.fixture.ts +0 -5
- package/dist/starters/react/design-system/patterns/Shell/Floating.ads.scenario.tsx +0 -21
- package/dist/starters/react/design-system/patterns/Shell/README.md +0 -43
- package/dist/starters/react/design-system/patterns/Shell/Shell.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/patterns/Shell/Shell.ads.fixture.ts +0 -5
- package/dist/starters/react/design-system/review/demo-frame/DemoFrame.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/review/demo-frame/DemoFrame.ads.review.tsx +0 -7
- package/dist/starters/react/design-system/review/index.ads.review.ts +0 -4
- package/dist/starters/react/design-system/review/region-block/RegionBlock.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/review/region-block/RegionBlock.ads.review.tsx +0 -6
- package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.ads.review.tsx +0 -10
- package/dist/starters/react/design-system/showcase/mcp/main.ads.mount.tsx +0 -10
- package/dist/starters/react/design-system/styles.css +0 -7
- package/dist/starters/react/design-system/tokens/base.css +0 -36
- package/dist/starters/react/design-system/tokens/catalog.ads.json +0 -1221
- package/dist/starters/react/design-system/tokens/colors.css +0 -215
- package/dist/starters/react/design-system/tokens/elevation.css +0 -53
- package/dist/starters/react/design-system/tokens/spacing.css +0 -87
- package/dist/starters/react/design-system/tokens/spatial.ads.json +0 -70
- package/dist/starters/react/design-system/tokens/themes.generated.css +0 -142
- package/dist/starters/react/design-system/tokens/themes.generated.ts +0 -402
- package/dist/starters/react/design-system/tokens/typography.css +0 -31
- package/dist/starters/react/ds.config.json +0 -37
- package/dist/starters/react/gitignore.template +0 -8
- package/dist/starters/react/package.json +0 -39
- package/dist/starters/react/scripts/build-mcp-previews.mjs +0 -3
- package/dist/starters/react/src/vite-env.d.ts +0 -7
- package/dist/starters/react/tsconfig.build.json +0 -20
- package/dist/starters/react/tsconfig.json +0 -34
- package/dist/starters/react/vite.config.ts +0 -23
- package/dist/style-boundaries.mjs +0 -106
- package/dist/style-token-rules.mjs +0 -51
- package/dist/themes-generated.mjs +0 -161
- package/dist/themes-watch.mjs +0 -83
- package/dist/themes.mjs +0 -360
- package/dist/token-export.mjs +0 -94
- package/dist/token-origins.mjs +0 -24
- package/dist/token-policy.mjs +0 -26
- package/dist/token-quality.mjs +0 -149
- package/dist/token-samples.mjs +0 -19
- package/dist/tokens.mjs +0 -194
- package/dist/unit-contracts.mjs +0 -396
- package/dist/usage.mjs +0 -184
- package/dist/verification/playwright-reporter.cjs +0 -87
- package/docs/CONTRACTS.md +0 -285
- package/docs/HTTP-SHOWCASE-POC.md +0 -397
- package/docs/SPATIAL-CHECKS.md +0 -69
- package/docs/benchmarks/http-showcase-optimized.json +0 -1879
- package/docs/benchmarks/http-showcase-profile.json +0 -308
- package/docs/benchmarks/http-showcase.json +0 -3069
- /package/dist/{starters/react/design-system/assets/fonts/.gitkeep → analysis/semantic.mjs} +0 -0
- /package/dist/{starters/react/design-system/controllers/.gitkeep → lowering-model.mjs} +0 -0
- /package/dist/showcase/{favicon.svg → ui/favicon-scavmehf.svg} +0 -0
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -1,586 +1,744 @@
|
|
|
1
1
|
# Architecture
|
|
2
2
|
|
|
3
|
-
ADS makes shared design standards a tooling contract
|
|
4
|
-
the project. Coding agents
|
|
5
|
-
keep
|
|
6
|
-
patterns, token values
|
|
3
|
+
ADS makes shared design standards a tooling contract and keeps the UI source in
|
|
4
|
+
the project. Coding agents build and change that source directly. The tools
|
|
5
|
+
keep each change inside a defined architecture. The project owns its components,
|
|
6
|
+
patterns, token values and branding.
|
|
7
7
|
|
|
8
8
|
ADS manages project-owned UI for websites and MCP Apps. Both use the same public
|
|
9
9
|
components, patterns, controllers, tokens and styles. The consuming application
|
|
10
|
-
supplies data, actions, mounting and integration,
|
|
11
|
-
The ADS showcase renders
|
|
12
|
-
and registered checks
|
|
13
|
-
Normal application checks verify website integration.
|
|
14
|
-
|
|
15
|
-
This document explains the what, why
|
|
16
|
-
the enforceable contract
|
|
17
|
-
[
|
|
10
|
+
supplies data, actions, mounting and integration, and serves its own MCP Apps.
|
|
11
|
+
The ADS showcase renders the real implementations in isolated HTTP frames. Its
|
|
12
|
+
previews and registered checks are evidence for the states and conditions they
|
|
13
|
+
exercise. Normal application checks verify website integration.
|
|
14
|
+
|
|
15
|
+
This document explains the what, the why and the high-level how.
|
|
16
|
+
[ADS.md](ADS.md) defines the enforceable contract. [GUIDE.md](GUIDE.md) covers
|
|
17
|
+
tool integration, configuration and commands. [MCP.md](MCP.md) covers the MCP
|
|
18
|
+
surface. Component-local READMEs cover APIs, lifecycle, tests and provenance.
|
|
19
|
+
|
|
20
|
+
## ADS closes what it has to prove
|
|
21
|
+
|
|
22
|
+
**ADS closes a form where a proof depends on understanding it, and reports what
|
|
23
|
+
it cannot evaluate.** This is the rule behind every check and every change to
|
|
24
|
+
them. It decides, for each thing an author can write, whether an unlisted form
|
|
25
|
+
is an error or a review item.
|
|
26
|
+
|
|
27
|
+
- **A proof depends on the form: closed.** The form is a finite list. An
|
|
28
|
+
unlisted form is an **error** that names the supported forms. The remedy is
|
|
29
|
+
an ADS change that adds the form with its grammar, checks, lowering,
|
|
30
|
+
documentation and tests. Recipe and profile fields, `when` selectors, token
|
|
31
|
+
roles, breakpoint units, and the colour, shadow and gradient forms a token
|
|
32
|
+
reference may sit in are closed. Each has positions with different meanings,
|
|
33
|
+
and ADS cannot say what belongs where in a form it does not know.
|
|
34
|
+
- **No proof depends on the form: open, and reported.** The value is accepted,
|
|
35
|
+
every rule that still applies is enforced, and what ADS cannot evaluate is a
|
|
36
|
+
**review item**, never silently passed. A token's own numeric value is open:
|
|
37
|
+
a reference in it follows one contract (its own role, or `spacing` where that
|
|
38
|
+
route exists) inside any CSS function. So `env(safe-area-inset-left,
|
|
39
|
+
var(--space-4))` or a function a browser shipped last month needs no ADS
|
|
40
|
+
release. Its role is still checked; its value is reviewed as unevaluable.
|
|
41
|
+
|
|
42
|
+
So a new CSS function is usable in a token's numeric value at once, and inside
|
|
43
|
+
a colour, shadow or gradient only once ADS lists it. See
|
|
44
|
+
[the token-role reference](TOKEN-ROLES.md#functions-a-token-value-may-use).
|
|
45
|
+
|
|
46
|
+
For ADS development this means:
|
|
47
|
+
|
|
48
|
+
- Before closing a form, name the proof that needs it. Do not close a form for
|
|
49
|
+
uniformity: a refusal that proves nothing only blocks valid design.
|
|
50
|
+
- Before leaving a form open, confirm that nothing ADS guarantees reads through
|
|
51
|
+
it, and that the unevaluable case is reported.
|
|
52
|
+
- A closed form has no "for now" fallback for unlisted input. In review, a new
|
|
53
|
+
permissive branch inside a closed form is a defect, and so is a new refusal
|
|
54
|
+
with no proof behind it.
|
|
55
|
+
- An agent or developer who meets a refusal in a project uses a supported form,
|
|
56
|
+
which the error names. If the design needs the unlisted one, that is an ADS
|
|
57
|
+
change to request, not a check to work around.
|
|
18
58
|
|
|
19
59
|
## Shared tooling, project-owned design
|
|
20
60
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
content; verification, approval and activation belong to the host.
|
|
26
|
-
|
|
27
|
-
The shared layer supplies architectural rules, token definitions, checks,
|
|
28
|
-
skills, and setup. Components, patterns, themes, and examples are authored in
|
|
29
|
-
the project or brought in through explicit imports and adaptations.
|
|
30
|
-
|
|
31
|
-
This lets standards evolve without tying the product's UI to a centrally
|
|
32
|
-
distributed component catalogue. A project can change its implementation,
|
|
33
|
-
branding, or external dependencies while retaining compatible contracts.
|
|
34
|
-
Tool updates preserve local values and customized source; content updates have
|
|
35
|
-
their own reviewed lifecycle.
|
|
36
|
-
|
|
37
|
-
ADS is opinionated about tooling and ownership. Linaria is required for the
|
|
38
|
-
component and pattern styling pipeline. Visual choices belong to the project.
|
|
39
|
-
ADS's tools run on Bun 1.4.1+ and compile MCP previews independently of the
|
|
40
|
-
application's build tools. The project may use Node or Bun: what it imports from
|
|
41
|
-
ADS in its own build, lint or Playwright specs works under Node. Project scripts
|
|
42
|
-
and behavior profiles retain their explicit interpreter commands; `command:
|
|
43
|
-
"runtime"` runs on ADS's Bun. This tooling choice is separate
|
|
44
|
-
from the UI framework and adds no Node/Bun dependency to deployed components.
|
|
61
|
+
The shared layer supplies the architectural rules, the authoring macros, the
|
|
62
|
+
compiler, the checks, the skills and the setup. The project authors its
|
|
63
|
+
components, patterns, themes and examples, or brings them in through explicit
|
|
64
|
+
imports and adaptations.
|
|
45
65
|
|
|
46
|
-
|
|
66
|
+
This split lets standards change without a centrally distributed component
|
|
67
|
+
catalogue. A project can change its implementation, branding or external
|
|
68
|
+
dependencies and keep compatible contracts. A tool update preserves local values
|
|
69
|
+
and customized source. A content update has its own reviewed lifecycle.
|
|
47
70
|
|
|
48
|
-
ADS
|
|
49
|
-
native API from Bun. Analysis, orchestration and preview compilation all run on
|
|
50
|
-
Bun; registered application commands retain their explicit runtimes. Generated
|
|
51
|
-
applications retain their TypeScript 5.9.3 dependency and their own `tsc`; ADS's
|
|
52
|
-
compiler is a separate nested package when necessary.
|
|
71
|
+
ADS is opinionated about tooling and ownership, not about visual choices:
|
|
53
72
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
The
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
before modifying them. Spatial guards and foundation discovery use
|
|
116
|
-
`spatial.mjs` over these helpers. The pure `spatial-model.cjs` compiler does no
|
|
117
|
-
filesystem I/O. `spatial-inputs.cjs` retains a bounded cache of immutable models
|
|
118
|
-
by contents, without branch paths or ASTs. Linaria's build adapter captures at
|
|
119
|
-
the build/extraction boundary, and Bun previews track spatial contents and token
|
|
120
|
-
sheet membership, including layouts introduced by evaluated interpolations.
|
|
121
|
-
`spatial-contexts.cjs` validates bounded conditional token graphs and shares immutable
|
|
122
|
-
context models. `spatial-css.cjs` normalizes supported ordinary CSS placement and protects
|
|
123
|
-
generated geometry. Its bounded 256-entry cache contains only immutable selector-text
|
|
124
|
-
facts, including finite functional branches and attribute targets; it retains no source
|
|
125
|
-
trees or project paths. Keyframe effects join the same target/property checks.
|
|
126
|
-
`spatial-composition.mjs` binds those facts to existing native JSX
|
|
127
|
-
nodes and owned component calls; it creates no compiler or independent syntax tree.
|
|
128
|
-
Standalone extraction checks algebra; acceptance adds the owned composition evidence.
|
|
129
|
-
|
|
130
|
-
The spatial design and starter defaults draw on IBM Carbon's 2x Grid. The
|
|
131
|
-
[design references](DESIGN-REFERENCES.md) record adopted concepts, the consulted
|
|
132
|
-
source revision, and attribution boundaries. ADS's compiler and analysis services
|
|
133
|
-
are separate from Carbon's Sass/React grid packages; consumers own their definitions.
|
|
134
|
-
|
|
135
|
-
File-local accessibility and image-attribute checks consume the main check's source
|
|
136
|
-
inventory and captured native ASTs. Their findings are memoized by immutable source
|
|
137
|
-
tree; they create no separate syntax parser or filesystem scan. Font checking and
|
|
138
|
-
preload generation share captured CSS trees and parsed face facts. Token values,
|
|
139
|
-
current preload configuration and actual style uses are evaluated separately on
|
|
140
|
-
each operation, so changing a consumer or theme cannot reuse an unrelated result.
|
|
141
|
-
Optional text (including absence) and CSS trees have weak captured-revision ownership;
|
|
142
|
-
new revisions invalidate them, while repeated reads on the same revision share data.
|
|
143
|
-
|
|
144
|
-
Do not create compiler programs, native clients, path-keyed semantic caches or
|
|
145
|
-
independent AST parsers in new rules. `memoFact` lives for one fenced request;
|
|
146
|
-
`memoProgram` is only for facts determined by an immutable program/tree or captured
|
|
147
|
-
revision, with weak ownership. Return
|
|
148
|
-
copies when exposing cached mutable results. A boundary test prevents rule modules
|
|
149
|
-
from constructing programs or importing native transports. Library inspection
|
|
150
|
-
APIs are asynchronous and use the same native session implementation. Await
|
|
151
|
-
`checkProject`, `inspectTokens`, contract/scenario inspection and import
|
|
152
|
-
resolution. Direct library callers acquire a context through `standalone.mjs`;
|
|
153
|
-
they do not select a different engine. Syntax-only work uses the native API's
|
|
154
|
-
bounded source-file leases. There is one compiler implementation.
|
|
155
|
-
|
|
156
|
-
Semantic calls go through `analysis/queries.mjs`, which shares pending promises
|
|
157
|
-
and batches independent symbol/type queries. Await source and semantic lookups;
|
|
158
|
-
ordinary syntax predicates remain synchronous. Use the ordered async traversal
|
|
159
|
-
and collection helpers when callbacks perform semantic work, so short-circuit
|
|
160
|
-
checks and diagnostic order remain deterministic.
|
|
161
|
-
Use `walkValuesAsync` for CSS values: returning false prunes that function's
|
|
162
|
-
children. `walkAsync` follows PostCSS's different contract, stopping the walk.
|
|
163
|
-
Resolve named subjects through `localValueDeclarations` instead of enumerating
|
|
164
|
-
all symbols in scope. Resolving declarations for a global symbol inventory can
|
|
165
|
-
load the compiler libraries unnecessarily and exhaust memory.
|
|
166
|
-
|
|
167
|
-
`bun run test:analysis` verifies native analysis, cache invalidation, production
|
|
168
|
-
draft acceptance and computed-CSS compilation without browser rendering or
|
|
169
|
-
registered behavior execution. The [analysis benchmark](../scripts/benchmarks/analysis/README.md)
|
|
170
|
-
runs the current engine serially with correctness assertions and time/memory
|
|
171
|
-
regression gates when a compatible baseline is supplied. Its acceptance fixtures
|
|
172
|
-
disable scripts, registered behavior execution and rendering so measurements
|
|
173
|
-
include input capture, branching, guards and publication without browser work.
|
|
174
|
-
[AGENTS.md](../AGENTS.md#mandatory-analysis-benchmarks) requires both inventory
|
|
175
|
-
sizes for relevant changes. Browser and component behavior suites remain
|
|
176
|
-
separate from these engine measurements.
|
|
177
|
-
|
|
178
|
-
Changed-scope validation follows shared source trees and native import resolution.
|
|
179
|
-
Its successful full baseline also retains plain dependency closures, so later
|
|
180
|
-
selection includes consumers from both the previous and current revisions.
|
|
181
|
-
Deleted inputs without previous evidence, unknown ownership, computed imports
|
|
182
|
-
and shared configuration widen selection conservatively. This selects what to
|
|
183
|
-
audit; it does not replace browser evidence or grant a passing result.
|
|
184
|
-
The project declares React or native Preact in `ds.config.json` and uses the
|
|
185
|
-
matching compiler and mount adapter. Both integrate with the required styling
|
|
186
|
-
and validation pipeline; additional frameworks need explicit tooling support.
|
|
187
|
-
|
|
188
|
-
A design system can start from the starter that ships inside the same ADS package:
|
|
189
|
-
`ads init --framework react|preact --include-starter`, run inside an existing project, adds
|
|
190
|
-
`dist/starters/react` and its generated Preact overlay
|
|
191
|
-
where the project has nothing, so it always matches the tool version that checks it. It
|
|
192
|
-
never replaces a project file or writes a lockfile. Skills carry no starter copy; they
|
|
193
|
-
point agents to `ads init --include-starter`. The starter is a working base: a
|
|
194
|
-
token foundation in six groups (color ramps with AA-checked roles, type,
|
|
195
|
-
space and sizing, shape and elevation, motion, layout with a column grid), brand artwork
|
|
196
|
-
with Brand previews, an icon set, and one example of each layer.
|
|
73
|
+
- Design is declared through ADS's typed macros. ADS compiles it into plain
|
|
74
|
+
modules and CSS.
|
|
75
|
+
- Visual choices belong to the project.
|
|
76
|
+
- ADS's tools run on Bun 1.4.1 or later. ADS compiles MCP previews
|
|
77
|
+
independently of the application's build tools.
|
|
78
|
+
|
|
79
|
+
### ADS is self-sufficient
|
|
80
|
+
|
|
81
|
+
ADS needs nothing from the project to do its job:
|
|
82
|
+
|
|
83
|
+
- ADS ships its own Playwright. Playwright's own installer installs the browser
|
|
84
|
+
on first need.
|
|
85
|
+
- ADS runs unit specs with its own Bun and browser.
|
|
86
|
+
- ADS runs strict specs with its own Playwright test runner.
|
|
87
|
+
- ADS takes no command, runner or framework from configuration. A project
|
|
88
|
+
setting can only tune ADS (a budget, a browser choice).
|
|
89
|
+
|
|
90
|
+
### The design system is its own package
|
|
91
|
+
|
|
92
|
+
The design system is a folder with its own `package.json`, `ds.config.json`,
|
|
93
|
+
`tsconfig.json` and `design-system/`, where ADS is a development dependency.
|
|
94
|
+
Applications consume its emitted output and never install ADS. Several
|
|
95
|
+
applications install the design package as a copy (git reference, tarball or
|
|
96
|
+
registry) and get its committed `dist/`. One application can instead keep the
|
|
97
|
+
design package in a folder and have it emit into the application's source. The
|
|
98
|
+
[guide](GUIDE.md#set-up-a-design-package) covers both layouts.
|
|
99
|
+
|
|
100
|
+
Either way the emitted modules resolve the framework from the application's own
|
|
101
|
+
`node_modules`, so there is one React (or Preact). A copy carries none of the
|
|
102
|
+
design package's development dependencies, and output in the application's
|
|
103
|
+
source resolves upward from there.
|
|
104
|
+
|
|
105
|
+
The design package declares what its output imports: `dependencies`, and
|
|
106
|
+
`peerDependencies` for what the application must share.
|
|
107
|
+
`package-dependency-undeclared` checks it, and `ads-dependencies.json` lists it
|
|
108
|
+
for the application.
|
|
109
|
+
|
|
110
|
+
What an application imports from ADS in its own build works under Node. The Bun
|
|
111
|
+
tooling choice is separate from the UI framework and adds no Node or Bun
|
|
112
|
+
dependency to deployed components.
|
|
113
|
+
|
|
114
|
+
### Frameworks and the starter
|
|
115
|
+
|
|
116
|
+
The project declares its framework in `ds.config.json`: React or native Preact.
|
|
117
|
+
The framework's own JSX runtime and hooks module type the owners, emission
|
|
118
|
+
writes its JSX runtime, and a package of the other framework is an error.
|
|
119
|
+
Additional frameworks need explicit tooling support.
|
|
120
|
+
|
|
121
|
+
There is one starter source (`starter/`, written for React). The build copies it
|
|
122
|
+
to `dist/starters/react/` and generates the native Preact starter
|
|
123
|
+
`dist/starters/preact/` through an overlay (`src/starter-overlay.mts`). The
|
|
124
|
+
overlay stops the build on a React API without a declared Preact counterpart.
|
|
125
|
+
|
|
126
|
+
A design system starts from the starter inside the same ADS package, so it
|
|
127
|
+
always matches the tool version that checks it. `ads init --framework react`
|
|
128
|
+
(or `preact`), run inside an existing project, copies the declared file set of
|
|
129
|
+
the framework's starter into an empty or absent design-system folder. It never
|
|
130
|
+
replaces a project file, edits `.gitignore` or writes a lockfile. Skills carry
|
|
131
|
+
no starter copy.
|
|
132
|
+
|
|
133
|
+
### No production runtime
|
|
197
134
|
|
|
198
135
|
ADS checks run during development and builds. The tool adds no production UI
|
|
199
|
-
runtime.
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
|
212
|
-
|
|
|
213
|
-
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
the
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
and
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
and
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
136
|
+
runtime.
|
|
137
|
+
|
|
138
|
+
The ownership boundaries preserve the project's optimization strategy. Lazy
|
|
139
|
+
loading, code splitting, memoized data, caching, worker execution and
|
|
140
|
+
cancellable work can stay behind public APIs. A shared screen pattern does not
|
|
141
|
+
require eager loading of its renderer, and application services do not move
|
|
142
|
+
into the design system.
|
|
143
|
+
|
|
144
|
+
## Tokens, profiles and recipes
|
|
145
|
+
|
|
146
|
+
Design moves through four kinds of source. Each has one job:
|
|
147
|
+
|
|
148
|
+
| Source | Defines |
|
|
149
|
+
| --- | --- |
|
|
150
|
+
| Role token sheets (`tokens/<group>/<role>.ads.css`) | Shared primitive and semantic values; the filename declares the role |
|
|
151
|
+
| Profiles (`profiles/<group>/*.ads.ts`) | Named, typed combinations of token values for one design responsibility, with explicit composition |
|
|
152
|
+
| Recipes (`recipe()`, `combineRecipes()` in a component or pattern) | Owner-local construction: frame, arrangement, parts and alignment, selecting profiles |
|
|
153
|
+
| `foundation.ads.ts` | The document's text, surface and reset, and the design system's themes and brands |
|
|
154
|
+
|
|
155
|
+
TypeScript beside a recipe handles markup and behavior. Asset declarations
|
|
156
|
+
(`assets/<group>/*.ads.ts` beside their SVG drawings) give artwork a shared
|
|
157
|
+
identity, paint contract, variants and optical anchors.
|
|
158
|
+
|
|
159
|
+
Every declaration uses a typed Bun macro from `@reqvire-org/ads`: `recipe`,
|
|
160
|
+
`profile`, `asset`, `font` or `foundation`. A `font()` declaration beside its
|
|
161
|
+
files makes a font family part of the design system.
|
|
162
|
+
|
|
163
|
+
Recipes select profiles and use closed structural choices. Mocks under
|
|
164
|
+
`mocks/` are mocks of the application's screens: they render public components
|
|
165
|
+
and patterns with explicit props and carry no design, not even through
|
|
166
|
+
profiles. The part of their check that concerns design use
|
|
167
|
+
(`src/analysis/design-usage.mts`) is pure and knows nothing about mocks, so an
|
|
168
|
+
application's own source can later be checked with the same code.
|
|
169
|
+
|
|
170
|
+
Groups organize files and showcase navigation. They are not reference
|
|
171
|
+
namespaces: profile names are globally unique, and references cross groups
|
|
172
|
+
without imports.
|
|
173
|
+
|
|
174
|
+
### Themes, brands and input modality are token contexts
|
|
175
|
+
|
|
176
|
+
Token sheets set default values on `:root`. A theme or brand sets values again
|
|
177
|
+
on `:root[data-theme="…"]`, `:root[data-brand="…"]` or both. Themes and brands
|
|
178
|
+
are only value sets over the same token names. A theme sets the color mode and
|
|
179
|
+
a brand sets identity values. So a white-label product needs one brand per
|
|
180
|
+
customer, not one theme per customer and mode.
|
|
181
|
+
|
|
182
|
+
`foundation.ads.ts` declares the themes and brands in order; the first is the
|
|
183
|
+
default. It is the one list that checks, previews, the render audit, capture
|
|
184
|
+
and `ads_status` read.
|
|
185
|
+
|
|
186
|
+
Input modality is also a token context, not a recipe construct. A token sheet
|
|
187
|
+
that overrides size tokens under `@media (pointer: coarse)` gives touch screens
|
|
188
|
+
larger controls the same way `:root[data-theme]` gives a theme its colours.
|
|
189
|
+
The token checks evaluate the overrides of each `@media`/`@supports` condition
|
|
190
|
+
crossed with every theme and brand (`tokenDefinitionContexts`,
|
|
191
|
+
`src/design-foundation.mts`). So target size, contrast and token types are
|
|
192
|
+
proven for touch values too, and emission carries the overrides unchanged.
|
|
193
|
+
Owners read the same tokens and need no modality branch.
|
|
194
|
+
|
|
195
|
+
### Theme and brand sections
|
|
196
|
+
|
|
197
|
+
Themes and brands are also ADS's subtree mechanism. With
|
|
198
|
+
`foundation({ sections: true })`, `data-theme` or `data-brand` on any element
|
|
199
|
+
switches every token below it. A dark footer on a light page is a nested theme
|
|
200
|
+
section, not a parallel set of "on dark" tokens or component variants.
|
|
201
|
+
|
|
202
|
+
A theme is the unit for sections because it is the unit the checks prove. Every
|
|
203
|
+
token sheet value is evaluated, and the contrast of every surface pair is
|
|
204
|
+
proven, in each theme, brand and brand × theme context. A section can therefore
|
|
205
|
+
only select a context whose whole colour mode already passes. ADS has no finer
|
|
206
|
+
construct, such as a surface that sets the colours its descendants read
|
|
207
|
+
(selected rows, tinted banners): it would need its own context in those proofs.
|
|
208
|
+
Explicit choices on the child cover those cases.
|
|
209
|
+
|
|
210
|
+
Sections are opt-in because of their cost: the section rules add CSS to every
|
|
211
|
+
owner sheet, and a design system that switches only `<html>` gains nothing from
|
|
212
|
+
them.
|
|
213
|
+
|
|
214
|
+
Authors write the contexts on `:root` only; emission applies them to sections
|
|
215
|
+
(`src/token-sections.mts`). The flag is part of the declared contexts, so it is
|
|
216
|
+
in the foundation's identity and an edit re-emits every sheet. Without the flag
|
|
217
|
+
the emitted bytes carry no toggle, section rule or section `color-scheme`.
|
|
218
|
+
|
|
219
|
+
- **Toggles.** Selectors cannot find the nearest ancestor on two independent
|
|
220
|
+
axes, so each axis travels as inherited toggle custom properties:
|
|
221
|
+
`--ads-theme-dark`, `--ads-brand-iris`, and `--ads-root-theme` for the base.
|
|
222
|
+
- **Selecting a state.** A section with the attribute, or the root without it
|
|
223
|
+
(following `followSystemTheme`), sets that state's toggle to the
|
|
224
|
+
guaranteed-invalid `initial` and the axis's other toggles to the empty value.
|
|
225
|
+
- **Alternatives.** One zero-specificity rule on `[data-theme], [data-brand]`
|
|
226
|
+
declares each context-dependent token, and each token that reads one, as one
|
|
227
|
+
alternative per state: `var(--ads-theme-dark, <dark value>)`. Theme
|
|
228
|
+
alternatives nest inside brand ones for a token that varies with both. Only
|
|
229
|
+
the selected state's fallback substitutes.
|
|
230
|
+
- **Values.** The values are written on the section element, so a token that
|
|
231
|
+
reads another resolves with the section's values. They are the cascade the
|
|
232
|
+
root gets (`contextDefinitions`, the same values the checks evaluate).
|
|
233
|
+
Conditional overrides sit in their own section rule under the same at-rules.
|
|
234
|
+
- **Reset.** The default theme and brand select the base state, so a default
|
|
235
|
+
section inside another context resets.
|
|
236
|
+
- **Placement.** Every owner sheet carries the toggles and section rules of its
|
|
237
|
+
own token closure, as it carries its root token rules. `foundation.css` adds
|
|
238
|
+
each theme's `color-scheme` on sections.
|
|
239
|
+
|
|
240
|
+
The namespaced emission (the showcase UI drawn inside a project's preview)
|
|
241
|
+
writes no section rules: the hosting document's sections belong to the project.
|
|
242
|
+
|
|
243
|
+
### Token provenance
|
|
244
|
+
|
|
245
|
+
Token provenance is an authored-edge check. It is separate from
|
|
246
|
+
context-dependent value evaluation.
|
|
247
|
+
|
|
248
|
+
- `src/token-references.mts` owns the parsed expression and reference facts per
|
|
249
|
+
immutable foundation.
|
|
250
|
+
- `src/token-provenance.mts` applies role routes and operation/composite
|
|
251
|
+
positions to every declaration and fallback.
|
|
252
|
+
- `src/token-operations.mts` shares operation syntax between provenance and
|
|
253
|
+
emission. Value resolution and invariant quantum checks stay with their input
|
|
254
|
+
adapters.
|
|
255
|
+
|
|
256
|
+
The check needs no filesystem or semantic query. `tokenChecks()` caches the
|
|
257
|
+
report with the foundation. An owner edit reuses the report; changed captured
|
|
258
|
+
token bytes form a new foundation.
|
|
259
|
+
|
|
260
|
+
A reference that is declared nowhere uses the `token-css/token-missing`
|
|
261
|
+
identity, also for unused definitions. Derivative display duplicates are
|
|
262
|
+
suppressed. In inventories, shape facts stay unresolved; they are not labeled
|
|
263
|
+
valid.
|
|
264
|
+
|
|
265
|
+
### What an owner declares
|
|
266
|
+
|
|
267
|
+
Components and patterns cannot author design measurements, paints or local
|
|
268
|
+
token aliases, and cannot read tokens directly.
|
|
269
|
+
|
|
270
|
+
**Runtime values.** What an owner can only know at runtime is declared in its
|
|
271
|
+
recipe:
|
|
272
|
+
|
|
273
|
+
- `measured` geometry, such as the position of an anchored popup or the track
|
|
274
|
+
of a splitter.
|
|
275
|
+
- `paints` chosen from data among a finite set of paint-role tokens, such as a
|
|
276
|
+
chart series.
|
|
277
|
+
|
|
278
|
+
Each compiles to an owner-private custom property that the owner writes through
|
|
279
|
+
a typed setter. The values therefore stay inside the checks: the property list,
|
|
280
|
+
profile conflicts, and the contrast of every declared paint.
|
|
281
|
+
|
|
282
|
+
**Interaction properties.** These are compile-time recipe fields with no
|
|
283
|
+
runtime:
|
|
284
|
+
|
|
285
|
+
- The `normalize` of a root or part declares a cursor, touch action or text
|
|
286
|
+
selection from a closed set.
|
|
287
|
+
- The arrangement of a scrolling element declares scroll snap.
|
|
288
|
+
|
|
289
|
+
Analysis reads them from the captured source, and lowering writes them as
|
|
290
|
+
ordinary atomic declarations.
|
|
291
|
+
|
|
292
|
+
**Runtime state.** Runtime state enters in two ways only. The owner's own state
|
|
293
|
+
attribute selects a `when` variant that is compiled beforehand
|
|
294
|
+
(`&[data-dragging="true"] > .grip`). The measured setters carry the geometry
|
|
295
|
+
that a drag computes.
|
|
296
|
+
|
|
297
|
+
**Scroll snap.** Snap follows ownership. The scrolling element takes
|
|
298
|
+
`scroll-snap-type`. The children it places take `scroll-snap-align` from its
|
|
299
|
+
arrangement, as a grid places its cells. A child never snaps itself.
|
|
300
|
+
|
|
301
|
+
**Root press.** A root press (`transition: ["scale"]` with the `scale` endpoint
|
|
302
|
+
of a root `when` entry) lowers like a glyph's press and joins the root's
|
|
303
|
+
transition set. Its review, `review/press-scale-large-surface`
|
|
304
|
+
(`src/press-scale.mts`), is the one press check that reads token values. It
|
|
305
|
+
reads them only for a `frame: "container"` root that presses. Other owners stay
|
|
306
|
+
token-independent, so their analyses survive token edits.
|
|
307
|
+
|
|
308
|
+
### Composed contrast
|
|
309
|
+
|
|
310
|
+
Another owner often paints the backdrop of the text an owner renders.
|
|
311
|
+
`component-contrast` (`src/composed-contrast.mts`) checks text against the
|
|
312
|
+
backdrop it is rendered on. [ADS.md](ADS.md#composed-text-contrast) defines the
|
|
313
|
+
rule and its unresolved cases. This section explains how owners stay
|
|
314
|
+
independent.
|
|
315
|
+
|
|
316
|
+
**Composition facts.** Each owner's checked outcome carries plain composition
|
|
317
|
+
facts (`src/analysis/owner-composition.mts`), read from its captured AST after
|
|
318
|
+
its analysis accepted it:
|
|
319
|
+
|
|
320
|
+
- Every text position, prop it renders in place and component placement.
|
|
321
|
+
- The owned elements above each, in every reachable choice, enumerated jointly
|
|
322
|
+
over what those elements read: their surface profiles by name, text fields,
|
|
323
|
+
top-layer or covering-cell flow, `hidden`, `aria-disabled`, `disabled` and
|
|
324
|
+
`data-theme`.
|
|
325
|
+
- The literal arguments of each placement.
|
|
326
|
+
|
|
327
|
+
The child records what it offers; the parent records what it renders. No
|
|
328
|
+
owner's analysis reads another's facts. So no owner key gains another owner's
|
|
329
|
+
dependency (unlike the public rows `alignRows` reads), and owners stay
|
|
330
|
+
token-independent. A failed owner contributes no facts; its own error fails the
|
|
331
|
+
check.
|
|
332
|
+
|
|
333
|
+
**The join.** A revision-level join in the revision's memoized check follows
|
|
334
|
+
each text outward through slots and placements, and onto the document surface
|
|
335
|
+
for every component the barrel exports. It resolves the colour and backdrop in
|
|
336
|
+
every token context through the shared paint mechanism
|
|
337
|
+
(`src/paint-contrast.mts`). An element's `data-theme`/`data-brand` restricts its
|
|
338
|
+
subtree to that context only when the foundation declares `sections: true`;
|
|
339
|
+
either way `foundation.css` repaints the element with the document surface.
|
|
340
|
+
|
|
341
|
+
**Boundaries.** A boundary is a placement above which neither paint is known.
|
|
342
|
+
A pair that the elements below a boundary decide is checked; a side that
|
|
343
|
+
reaches it is `component-contrast-unresolved` at the placement.
|
|
344
|
+
|
|
345
|
+
- A component of the placing owner's own file is expanded only when its facts
|
|
346
|
+
show it passes its children through: it renders `children` in place, passes
|
|
347
|
+
it on, or spreads its props into a placement. Any other same-file component
|
|
348
|
+
ends the chain at its placement.
|
|
349
|
+
- Plain modules record no composition facts, only the design-system components
|
|
350
|
+
their markup places. These are read from the revision's program beside the
|
|
351
|
+
other plain-module checks, each revision, so no owner outcome changes. The
|
|
352
|
+
join ends those components' chains at each such placement.
|
|
353
|
+
|
|
354
|
+
A native control's pair is the user agent's, and skipped, only when neither its
|
|
355
|
+
colour nor any background between the text and its fill comes from the design
|
|
356
|
+
system.
|
|
357
|
+
|
|
358
|
+
### Data and behavior ownership
|
|
359
|
+
|
|
360
|
+
Business data is a separate input. Each layer owns one kind of responsibility:
|
|
361
|
+
|
|
362
|
+
| Layer | Owns |
|
|
363
|
+
| --- | --- |
|
|
364
|
+
| Component | One cohesive UI capability: control semantics, input handling, focus, accessibility and state mechanics |
|
|
365
|
+
| Pattern | Reusable layout and mock: it arranges capabilities into a reusable structure or workflow |
|
|
366
|
+
| Application container | Domain data, routing, application effects and callbacks, supplied through public APIs |
|
|
367
|
+
| Application adapter | Live business-data loading, authentication, stores, routing, caching and refresh policy |
|
|
368
|
+
|
|
369
|
+
Import count, element count and implementation size do not decide the layer.
|
|
370
|
+
|
|
371
|
+
Components and patterns receive typed inputs and callbacks. They can invoke an
|
|
372
|
+
injected callback or service to request work, and present its loading and error
|
|
373
|
+
state. The consumer keeps ownership of the data source.
|
|
374
|
+
|
|
375
|
+
UI mechanics stay with their owner. Lazy implementation imports, asset loading,
|
|
376
|
+
measured geometry and cancellable layout workers are compatible with this
|
|
377
|
+
boundary.
|
|
378
|
+
|
|
379
|
+
A visual change preserves the interaction contract unless the behavior is
|
|
380
|
+
changed deliberately. A disabled control stays disabled across themes and
|
|
381
|
+
brands. A field keeps its label association and error semantics.
|
|
382
|
+
|
|
383
|
+
When a project adapts external UI, it uses its own text, spacing and other
|
|
384
|
+
profiles even when their values differ from the reference. It adds a shared
|
|
385
|
+
role or profile only for a missing design decision, and documents intentional
|
|
386
|
+
visual differences. Acceptance checks required behavior and project
|
|
387
|
+
consistency. Exact upstream pixels apply only when explicitly requested.
|
|
388
|
+
|
|
389
|
+
## Owners compile to plain modules
|
|
390
|
+
|
|
391
|
+
`ads check` analyzes every owner the public barrel reaches, on one captured
|
|
392
|
+
revision. It reads the design inputs and type-checks the owners. It analyzes,
|
|
393
|
+
lowers and compiles each construction. Then it resolves the token CSS that the
|
|
394
|
+
construction uses.
|
|
395
|
+
|
|
396
|
+
Lowering turns a recipe into atomic declarations through one typed emission
|
|
397
|
+
boundary. The boundary rejects unregistered properties and normalizes competing
|
|
398
|
+
writes.
|
|
399
|
+
|
|
400
|
+
### Extraction
|
|
401
|
+
|
|
402
|
+
ADS extracts the declarations to classes with the processor of
|
|
403
|
+
`@linaria/atomic`, called directly on the resolved CSS (`src/linaria/`). No
|
|
404
|
+
project module is generated, transformed or evaluated, and there is no
|
|
405
|
+
build-time tag resolver.
|
|
406
|
+
|
|
407
|
+
The processor runs only inside ADS's process:
|
|
408
|
+
|
|
409
|
+
- The build bundles the processor, with exactly the modules it imports, into
|
|
410
|
+
`dist/linaria/atomic-processor.mjs` (`scripts/linaria-processor-bundle.mjs`).
|
|
411
|
+
The published package therefore depends on no `@linaria` package.
|
|
412
|
+
- `postcss` stays external and resolves to ADS's own pinned dependency.
|
|
413
|
+
- The bundle reads no files and no environment. The package index of
|
|
414
|
+
`@wyw-in-js/shared` (with its module-resolution helpers) is replaced by the
|
|
415
|
+
five members the processor imports, and `debug` by a silent logger.
|
|
416
|
+
- A manifest beside the bundle records its SHA-256 and the reviewed fingerprint
|
|
417
|
+
of the bundled packages (`src/linaria/compatibility.json`).
|
|
418
|
+
- A source checkout loads the installed package instead of the bundle.
|
|
419
|
+
|
|
420
|
+
Extraction results are cached in memory and on disk
|
|
421
|
+
([caching](CACHING.md#persisted-extraction-cache)).
|
|
422
|
+
|
|
423
|
+
### Text layout
|
|
424
|
+
|
|
425
|
+
Text layout is part of lowering. It is decided at compile time without text
|
|
426
|
+
measurement:
|
|
427
|
+
|
|
428
|
+
- Wrapping.
|
|
429
|
+
- Balanced or pretty line breaks (`text-wrap`).
|
|
430
|
+
- One-line truncation.
|
|
431
|
+
- A multi-line clamp (`line-clamp` beside the `-webkit-box` form that browsers
|
|
432
|
+
implement).
|
|
433
|
+
- Reserved lines (`min-block-size` in `lh` of the part's own line height).
|
|
434
|
+
|
|
435
|
+
Each property is registered in the emission inventory
|
|
436
|
+
(`src/lowering-properties.mts`). `text-wrap` is a progressive enhancement: a
|
|
437
|
+
browser without it wraps normally, so ADS writes no fallback.
|
|
438
|
+
|
|
439
|
+
ADS cannot know the length of a text. So the cut-off content of a clamp is a
|
|
440
|
+
review fact: the full text must stay reachable. The rule against a clamp on a
|
|
441
|
+
control or its label reads the rendered elements in owner analysis.
|
|
442
|
+
|
|
443
|
+
### What `ads emit` writes
|
|
444
|
+
|
|
445
|
+
`ads emit` writes what the check compiled ([file list](ADS.md#emission)). Each
|
|
446
|
+
owner's module has its class expressions replaced by compiled classes and a
|
|
447
|
+
side-effect import of its own stylesheet. `fonts.ts` is the declared fonts'
|
|
448
|
+
preload list. `app-icons.ts` holds the application icon's link tags and
|
|
449
|
+
manifest icons. `ads-contract.json` records every emitted file's digest and the
|
|
450
|
+
platform features the emitted CSS uses.
|
|
451
|
+
|
|
452
|
+
The output is plain TypeScript and CSS that an application builds with its own
|
|
453
|
+
bundler and without ADS. ADS owns the output folder, never reads it as an input,
|
|
454
|
+
writes only changed files and swaps the tree in whole. The
|
|
455
|
+
[guide](GUIDE.md#emitting-the-design-system) covers the folder, watch mode and
|
|
456
|
+
exit codes.
|
|
457
|
+
|
|
458
|
+
### The foundation has a narrow styling role
|
|
459
|
+
|
|
460
|
+
`foundation.ads.ts` declares the document's shared responsibilities: the reset,
|
|
461
|
+
the `text` and `surface` profiles applied to the document, the default focus
|
|
462
|
+
indicator, the themes and brands, the generated palette and the application
|
|
463
|
+
icon ([fields](ADS.md#foundation-declaration)).
|
|
464
|
+
|
|
465
|
+
Emission writes them once as `foundation.css`. The sheet contains:
|
|
466
|
+
|
|
467
|
+
- One `@font-face` per declared font face.
|
|
468
|
+
- The reset.
|
|
469
|
+
- The text and surface fields on `body`. The surface is also on `[data-theme]`
|
|
470
|
+
and `[data-brand]`, so a nested context repaints.
|
|
471
|
+
- The focus indicator on `:focus-visible` at zero specificity.
|
|
472
|
+
- `color-scheme` per declared theme. With `followSystemTheme`, the rules of the
|
|
473
|
+
first light and first dark theme repeat for a root without `data-theme`,
|
|
474
|
+
under the matching `prefers-color-scheme`. With `sections: true`, each
|
|
475
|
+
theme's `color-scheme` is also on nested `data-theme` sections, with the
|
|
476
|
+
section rules of the token closure
|
|
477
|
+
([sections](#theme-and-brand-sections)).
|
|
478
|
+
- The page scroll lock behind a modal dialog, when an owner needs it.
|
|
479
|
+
- The tokens that these rules use.
|
|
480
|
+
|
|
481
|
+
The emitted barrel imports `foundation.css` first. Components and patterns own
|
|
482
|
+
their layout, appearance, states and animations in their recipes. The
|
|
483
|
+
foundation holds no component treatment.
|
|
484
|
+
|
|
485
|
+
### The platform feature inventory
|
|
486
|
+
|
|
487
|
+
`src/platform-features.mts` registers the platform feature inventory. Each
|
|
488
|
+
listed feature names:
|
|
489
|
+
|
|
490
|
+
- The CSS constructs that use it: properties, the value keywords it names,
|
|
491
|
+
at-rules, media features, pseudo-classes and pseudo-elements, units and
|
|
492
|
+
functions.
|
|
493
|
+
- Its vendor-prefixed forms. Prefixed companions (`PREFIXED_COMPANIONS`) are the
|
|
494
|
+
prefixed forms of their feature.
|
|
495
|
+
- How the output degrades in a browser without it.
|
|
496
|
+
|
|
497
|
+
The CSS core (CSS 2.1 and the long-established CSS3 modules) is a second,
|
|
498
|
+
unlisted set.
|
|
499
|
+
|
|
500
|
+
The contract builder reads the final emitted sheets with that registry. The
|
|
501
|
+
record therefore holds whatever lowering, the foundation sheet and the
|
|
502
|
+
project's own token values wrote, attributed to the owner beside each sheet. A
|
|
503
|
+
construct in neither set is recorded as unrecognized; it is not dropped.
|
|
504
|
+
|
|
505
|
+
Two controls stop a new lowered construct from shipping unlisted. A unit test
|
|
506
|
+
requires a classification for every property the lowering inventory registers.
|
|
507
|
+
The emitted starter and fixtures are held to the inventory in both directions.
|
|
508
|
+
|
|
509
|
+
The registry states facts, never browser versions. ADS has no declared browser
|
|
510
|
+
targets: the application checks the recorded features against its own targets.
|
|
511
|
+
|
|
512
|
+
### Why compile at build time
|
|
513
|
+
|
|
514
|
+
The choice serves performance as well as ownership:
|
|
515
|
+
|
|
516
|
+
- Styles are compiled at build time. The browser does no render-time CSS
|
|
517
|
+
generation and no stylesheet injection.
|
|
518
|
+
- Each owner's stylesheet carries only the token CSS and atomic rules it uses.
|
|
519
|
+
The import of an owner's module loads the owner's own sheet.
|
|
520
|
+
- The output's `package.json` declares only the stylesheets as side effects. A
|
|
521
|
+
bundler that honours the declaration (measured with Vite) drops the sheet of
|
|
522
|
+
an unused owner with its module, even through the barrel. Bun.build keeps
|
|
523
|
+
every reached sheet.
|
|
524
|
+
- Atomic extraction deduplicates identical declarations.
|
|
525
|
+
- The browser applies theme and brand values to compiled rules, so a context
|
|
526
|
+
change needs no runtime CSS generator.
|
|
527
|
+
- CSS can be cached separately from JavaScript.
|
|
528
|
+
|
|
529
|
+
### The generated palette
|
|
530
|
+
|
|
531
|
+
Code that draws on a canvas or with WebGL reads theme colors as values from
|
|
532
|
+
`palette.generated.ts`. This generated source holds every paint-role token
|
|
533
|
+
resolved in every declared context. It exists when `foundation.ads.ts` declares
|
|
534
|
+
`palette: true`. `ads check` reports a missing, stale or undeclared palette.
|
|
535
|
+
`ads sync` creates and regenerates it
|
|
536
|
+
([guide](GUIDE.md#regenerating-generated-source)).
|
|
410
537
|
|
|
411
538
|
## Public APIs preserve the boundary
|
|
412
539
|
|
|
413
|
-
The application and project-owned preview scenarios consume
|
|
414
|
-
|
|
415
|
-
|
|
540
|
+
The application and the project-owned preview scenarios consume the project's
|
|
541
|
+
public entry. The public entry is the authored barrel `index.ts`, which names
|
|
542
|
+
each public owner; `export *` is rejected.
|
|
543
|
+
|
|
544
|
+
Components and patterns expose supported behavior and visual variants. Internal
|
|
545
|
+
construction and external implementation dependencies stay with their owner.
|
|
546
|
+
An import that leaves the design-system folder is an error, because previews,
|
|
547
|
+
drafts and emitted packages read only that folder.
|
|
416
548
|
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
549
|
+
This boundary lets the project replace or adapt an implementation and keep
|
|
550
|
+
compatible consumer APIs. Markup, accessibility, events, layout and motion
|
|
551
|
+
still need verification when an implementation changes. Imported or adapted
|
|
552
|
+
source carries its credits and applicable notices in its local guide.
|
|
421
553
|
|
|
422
554
|
## Controllers own reusable behavior
|
|
423
555
|
|
|
424
|
-
A private controller stays beside its component or pattern. Shared behavior
|
|
425
|
-
`controllers/<Name>/` as an independent edit owner
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
`
|
|
450
|
-
|
|
451
|
-
`
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
Optional `<Owner>.ads.contract.ts` modules identify public APIs or private
|
|
456
|
-
implementation symbols, named guarantees and registered execution checks. Scenario
|
|
457
|
-
`exercises` links public behavior APIs to reachable demonstrations; `covers`
|
|
458
|
-
continues to describe rendered public UI. Controllers need no artificial standalone
|
|
459
|
-
visual scenario. Static registration is separate from current passing evidence.
|
|
460
|
-
|
|
461
|
-
Manifests, checks, scenarios and fixtures are development inputs; production
|
|
462
|
-
imports only actual components/controllers and their styles. Browser checks can
|
|
463
|
-
exercise the real isolated preview. React development StrictMode uses a project development
|
|
464
|
-
harness, since production previews do not replay those effects. The
|
|
465
|
-
[behavior contract](BEHAVIORS.md) defines profiles, execution and evidence freshness.
|
|
466
|
-
|
|
467
|
-
The normal compiled import graph delivers controller dependencies through HTTP or MCP
|
|
468
|
-
resources. There is no eager global controller registry. ESM splitting and selected
|
|
469
|
-
asset loading remain in place; tree shaking depends on actual imports, exports and
|
|
470
|
-
side effects, rather than the controller directory name.
|
|
556
|
+
A private controller stays beside its component or pattern. Shared behavior
|
|
557
|
+
uses `controllers/<Name>/` as an independent edit owner: a plain module that
|
|
558
|
+
the barrel exports, with no recipe or markup.
|
|
559
|
+
|
|
560
|
+
A controller can be a plain function or class, a framework hook or a context
|
|
561
|
+
provider. Shared code does not implicitly share instances. Controllers use the
|
|
562
|
+
configured framework and the declared project dependencies. The MCP host
|
|
563
|
+
supplies no runtime.
|
|
564
|
+
|
|
565
|
+
The normal compiled import graph delivers controller dependencies through HTTP
|
|
566
|
+
or MCP resources. There is no eager global controller registry. ESM splitting
|
|
567
|
+
and selected asset loading apply. Tree shaking depends on actual imports,
|
|
568
|
+
exports and side effects, not on the controller directory name.
|
|
569
|
+
|
|
570
|
+
### Behavior checks
|
|
571
|
+
|
|
572
|
+
Behavior checks are development inputs. Production imports only the actual
|
|
573
|
+
components and controllers and their styles. Browser checks exercise the real
|
|
574
|
+
isolated preview.
|
|
575
|
+
|
|
576
|
+
ADS runs what owners register. It runs the built-in `unit`, `browser` and
|
|
577
|
+
`strict` profiles itself, with its own Bun and Playwright, and it owns evidence
|
|
578
|
+
freshness and investigations. The starter's form-field bridge
|
|
579
|
+
(`controllers/FormField`) registers unit checks.
|
|
580
|
+
|
|
581
|
+
A project that registers no behavior checks gets `{ status: "not-available",
|
|
582
|
+
reason: "no-behavior-checks", message }` from `ads behaviors`, `ads verify`,
|
|
583
|
+
the acceptance stage and `ads validate`. It never gets a pass. The
|
|
584
|
+
[behavior guide](BEHAVIORS.md#registered-checks-and-their-status) defines the
|
|
585
|
+
statuses, profiles and evidence.
|
|
471
586
|
|
|
472
587
|
## The showcase is the shared design workspace
|
|
473
588
|
|
|
589
|
+
Humans and coding agents inspect the same project through one ADS runtime.
|
|
590
|
+
Humans use the local showcase. Agents and external MCP Apps use MCP tools and
|
|
591
|
+
resources. Both reach the same services.
|
|
592
|
+
|
|
593
|
+
The shell belongs to tooling. Components, patterns, design values, scenario
|
|
594
|
+
inputs and the UI rendered inside Apps belong to the project. The tool is
|
|
595
|
+
therefore useful with an empty design system, and every implementation becomes
|
|
596
|
+
addressable when its scenario exists.
|
|
597
|
+
|
|
598
|
+
### A preview scenario is the unit of review
|
|
599
|
+
|
|
600
|
+
A component export alone can need inputs, parent context, local state or
|
|
601
|
+
callbacks to produce useful UI. A scenario supplies that development context
|
|
602
|
+
around the real public implementation. It mounts independently: no showcase
|
|
603
|
+
page, application router, store or service must start first.
|
|
604
|
+
|
|
605
|
+
A scenario file is data and subjects (`scenario`: text, named states and
|
|
606
|
+
specimens whose `render` returns owners). It lays out nothing. ADS draws the
|
|
607
|
+
page with a pattern of its own showcase design system (`ScenarioPage` in
|
|
608
|
+
`showcase-ui/`, checked by ADS like any design system), so a page cannot break
|
|
609
|
+
because of scenario markup, and it looks the same in every project. The check
|
|
610
|
+
refuses markup in a scenario file (`scenario-markup`, `src/owner-scenarios.mts`).
|
|
611
|
+
What a subject needs around it comes from the scenario kit
|
|
612
|
+
(`@reqvire-org/ads/showcase`, typed in `src/scenario-kit.mts`), whose
|
|
613
|
+
components are also showcase-ui owners.
|
|
614
|
+
|
|
615
|
+
Larger scenarios live under `mocks/` and use the same public screen
|
|
616
|
+
patterns as production. Application adapters supply live data and effects.
|
|
617
|
+
Scenario adapters supply fixture data, local state and simulated services.
|
|
618
|
+
|
|
619
|
+
**Development boundary.** These are development-only: any `.ads.` scenario,
|
|
620
|
+
fixture or exports stub, every test, and everything under `mocks/`. This
|
|
621
|
+
holds even when the file is colocated with a production component.
|
|
622
|
+
|
|
623
|
+
- Emission never writes a development module.
|
|
624
|
+
- Runtime implementation, types and styles cannot import one through aliases or
|
|
625
|
+
barrels, and the public barrel cannot export one. A production import of a
|
|
626
|
+
development module fails the module graph.
|
|
627
|
+
- Previews compile development modules from source, beside the emitted
|
|
628
|
+
production modules. Only the closure of the selected scenario and its
|
|
629
|
+
fixtures enters a preview.
|
|
630
|
+
- Derived App audit data adds no ADS dependency to production components.
|
|
631
|
+
|
|
632
|
+
Browser tests still verify mounting, states, accessibility and visual parity.
|
|
633
|
+
|
|
634
|
+
**Registry.** The server discovers one path-derived scenario registry. The
|
|
635
|
+
showcase's sections browse that same registry through MCP results. Scenarios
|
|
636
|
+
register from the owners' `*.ads.scenario.tsx` files
|
|
637
|
+
(`src/owner-scenarios.mts`), read statically from the captured revision.
|
|
638
|
+
`ads check` reports their coverage.
|
|
639
|
+
|
|
640
|
+
In a project without scenarios the registry is empty, and everything that
|
|
641
|
+
renders scenarios (captures, the render audit, preview verification) reports
|
|
642
|
+
`{ status: "not-available", reason: "no-scenarios", message }` and does not
|
|
643
|
+
pass ([showcase contract](ADS.md#showcase-contract)).
|
|
644
|
+
|
|
645
|
+
### Folder-derived navigation
|
|
646
|
+
|
|
647
|
+
The filesystem is the only grouping source:
|
|
648
|
+
|
|
649
|
+
- A nonempty container above an owner, whose non-hidden children are all real
|
|
650
|
+
directories, supplies its exact folder name as the group.
|
|
651
|
+
- An owner directory and a layer root never become groups.
|
|
652
|
+
- A direct file or symlink disqualifies a container.
|
|
653
|
+
- Nested qualifying containers form a path label such as `Forms / Selection`.
|
|
654
|
+
- Flat owners stay ungrouped, with no Default heading.
|
|
655
|
+
|
|
656
|
+
To reorganize groups, move the owners, and update imports and path-derived
|
|
657
|
+
identities where needed. No scenario or owner metadata can override the folder
|
|
658
|
+
rule.
|
|
659
|
+
|
|
660
|
+
Discovery adds an optional derived `group` to scenario results. One registry
|
|
661
|
+
feeds `ads_scenarios`, its searchable group labels, `ads://project/scenarios`
|
|
662
|
+
and the showcase. The browser only groups those results. It does not scan
|
|
663
|
+
folders and owns no second taxonomy.
|
|
664
|
+
|
|
665
|
+
Directory entries participate in discovery and build freshness. So the addition
|
|
666
|
+
or removal of a non-source file also updates the grouping, without a TSX edit.
|
|
667
|
+
Grouping grants no API visibility, render coverage or runtime behavior.
|
|
668
|
+
|
|
669
|
+
### Drafts are tracked proposals
|
|
670
|
+
|
|
474
671
|
Every MCP source change is a tracked proposal: `ads-drafts/` source in explicit
|
|
475
672
|
`.ads` files, with canonical target mappings and baseline fingerprints. Only
|
|
476
673
|
`ads_accept` of an exact draft revision writes accepted source. Production
|
|
477
|
-
discovery
|
|
478
|
-
|
|
479
|
-
Ownership makes drafts independent
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
workspaces
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
their own document-loading and CSP behavior.
|
|
546
|
-
|
|
547
|
-
The proxy and App sandbox permit native forms (`allow-forms`). This lets browser constraint validation and `submit`
|
|
548
|
-
handlers run for clicks, Enter and `requestSubmit()`. Client-side handlers retain
|
|
549
|
-
their own `preventDefault()` behavior. The App stays opaque; CSP
|
|
550
|
-
`form-action 'none'` blocks native action requests without suppressing submit
|
|
551
|
-
handlers. Hosts outside ADS choose their own sandbox and CSP permissions.
|
|
552
|
-
|
|
553
|
-
ADS's Bun preview compiler publishes a versioned dependency graph: shared runtime and
|
|
554
|
-
foundation assets, plus independently addressable scenario modules. Inside the
|
|
555
|
-
preview, the selected dependency closure loads from checked HTTP assets or
|
|
556
|
-
verified MCP resources and mounts it using the project's framework adapter. Native
|
|
557
|
-
ES modules preserve shared runtime identity, cycles and live bindings. Switching
|
|
558
|
-
scenarios unmounts the previous view while keeping unchanged dependencies cached.
|
|
559
|
-
Persistence is a host lifecycle choice; a new external widget loads the same
|
|
560
|
-
resources independently. Resource sharing is scoped to an App instance.
|
|
561
|
-
|
|
562
|
-
Resource IDs hash original bytes and the transitive graph of URLs they rewrite.
|
|
563
|
-
Cyclic module groups share a deterministic fingerprint. This makes
|
|
564
|
-
IDs independent of compiler filename hashing: rewriting a changed dependency
|
|
565
|
-
cannot put different bytes behind an existing URI. Unrelated graph branches keep
|
|
566
|
-
their IDs and caches. The App still verifies the digest of the final bytes and
|
|
567
|
-
rejects any identity collision without partially registering the new graph.
|
|
568
|
-
|
|
569
|
-
The showcase's resource bridge can recover a transient fetch failure with at most
|
|
570
|
-
three read attempts and bounded backoff. This applies only to resource reads;
|
|
571
|
-
tool calls, assertions and whole checks are never replayed. Cancellation,
|
|
572
|
-
HTTP/protocol/content errors and integrity failures remain failures. Browser
|
|
573
|
-
diagnostics record retries, and verification retains recovered startup reads in
|
|
574
|
-
its case results. Persistent transport failures still block a mutation. External
|
|
575
|
-
hosts own their transport recovery; the reusable App's integrity checks remain
|
|
576
|
-
the same.
|
|
577
|
-
|
|
578
|
-
Managed graph builders publish into `.ds/preview/sessions/<session>/`.
|
|
579
|
-
Logical scenario IDs and resource URIs stay unchanged;
|
|
580
|
-
standalone builds publish `.ds/preview/manifest.json` and cannot overwrite a live
|
|
581
|
-
session's success record. Verified compiled snapshots form a bounded shared
|
|
582
|
-
warm-start cache. Source, compiler, dependency and output hashes still gate reuse.
|
|
583
|
-
Ordinary shutdown removes owned session output while retaining that cache.
|
|
674
|
+
discovery and imports exclude drafts.
|
|
675
|
+
|
|
676
|
+
**Ownership makes drafts independent.**
|
|
677
|
+
|
|
678
|
+
- Every authored file has one owner, and an owner is in at most one open draft.
|
|
679
|
+
Concurrent clients therefore edit different owners, and drafts never share a
|
|
680
|
+
file.
|
|
681
|
+
- A draft carries only the files of its owners. A companion such as
|
|
682
|
+
`ds.config.json` joins when the draft changes it.
|
|
683
|
+
- The public barrel and `foundation.ads.ts` belong to the foundation owner. The
|
|
684
|
+
token sheets belong to the tokens owner.
|
|
685
|
+
- ADS never merges. If accepted source changes under a draft (a direct edit or
|
|
686
|
+
a Git pull), acceptance reports a baseline conflict and the draft is
|
|
687
|
+
recreated.
|
|
688
|
+
|
|
689
|
+
**Draft workspaces.** A generated preview workspace
|
|
690
|
+
(`.ds/draft-previews/<id>/project`) keeps the normal project layout and public
|
|
691
|
+
imports. It overlays the proposed owner files and the declared draft
|
|
692
|
+
dependencies. The preview of a draft is a view of its workspace, served by the
|
|
693
|
+
project's showcase:
|
|
694
|
+
|
|
695
|
+
- In comparison: `?draft=<id>`.
|
|
696
|
+
- Alone: `/draft/<id>/`, the same client with the MCP endpoint of that
|
|
697
|
+
workspace.
|
|
698
|
+
|
|
699
|
+
Only these workspaces skip acceptance validation, for fast feedback. A draft's
|
|
700
|
+
own edits and the viewed draft resync at once. Other drafts that are behind an
|
|
701
|
+
accepted-source change catch up in the background.
|
|
702
|
+
|
|
703
|
+
**Acceptance.** Acceptance fences the exact reviewed revision, builds a
|
|
704
|
+
candidate copy, and checks live inputs again before publication.
|
|
705
|
+
|
|
706
|
+
- Acceptance regenerates `palette.generated.ts` in the candidate before its
|
|
707
|
+
check, so the published change includes it.
|
|
708
|
+
- When the draft's workspace holds the same inputs as the candidate,
|
|
709
|
+
`ads check` and the browser renders run there, through the project's compiler
|
|
710
|
+
and host. A dry run followed by acceptance of the same revision therefore
|
|
711
|
+
reuses its check and audit results.
|
|
712
|
+
- After promotion, pattern and mock draft dependencies resolve to normal
|
|
713
|
+
accepted source.
|
|
714
|
+
- Unless `compile.emitOnAccept` is `false`, the published revision is emitted.
|
|
715
|
+
The emit reuses the analysis of the acceptance check
|
|
716
|
+
([MCP](MCP.md#emitting-from-mcp)).
|
|
717
|
+
|
|
718
|
+
The [draft guide](../skills/ads-designer/references/drafts.md) defines the
|
|
719
|
+
lifecycle, completion requirements, build integration and recovery.
|
|
720
|
+
|
|
721
|
+
### The HTTP shell and the preview frame
|
|
722
|
+
|
|
723
|
+
The local showcase is a minimal HTTP shell. It uses HTTP for discovery, status,
|
|
724
|
+
events, preview actions and checked assets.
|
|
725
|
+
|
|
726
|
+
- The shell discovers navigation and scoped preview actions through a narrow
|
|
727
|
+
JSON adapter over the same services that MCP uses.
|
|
728
|
+
- The HTTP browser bundle contains no MCP SDK or JSON-RPC implementation.
|
|
729
|
+
- The shell imports no project implementation and executes no project code.
|
|
730
|
+
|
|
731
|
+
**The frame.** The local preview is one persistent opaque iframe on a separate
|
|
732
|
+
loopback origin, without the extra MCP Apps proxy frame. It preserves isolation
|
|
733
|
+
and viewport behavior.
|
|
734
|
+
|
|
735
|
+
- Checked manifests use bounded revision reuse and deltas.
|
|
736
|
+
- Immutable asset URLs refer to pinned, authorized graph bytes, never to
|
|
737
|
+
filesystem paths.
|
|
738
|
+
- Ordinary modules, CSS, fonts and images load over HTTP.
|
|
739
|
+
- Worker scripts, and modules that refer to them, use verified Blob URLs: the
|
|
740
|
+
opaque sandbox cannot create workers directly from another origin.
|
|
741
|
+
- External MCP Apps use the resource adapter and the sandbox proxy.
|
|
584
742
|
|
|
585
743
|
```mermaid
|
|
586
744
|
flowchart LR
|
|
@@ -591,158 +749,295 @@ flowchart LR
|
|
|
591
749
|
MCP --> Graph
|
|
592
750
|
```
|
|
593
751
|
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
752
|
+
**Events and connections.** HTTP build reports arrive over SSE; there is no
|
|
753
|
+
periodic HTTP status poll.
|
|
754
|
+
|
|
755
|
+
- Connect, reconnect and visibility resume reconcile discovery and scoped build
|
|
756
|
+
state. An interrupted connection marks retained previews potentially stale.
|
|
757
|
+
- Frame capabilities have a separate lifetime connection and a bounded
|
|
758
|
+
reconnect grace. They retire at once on explicit close, scope removal or
|
|
759
|
+
shutdown.
|
|
760
|
+
- Captures and verification use the default local HTTP host and preserve the
|
|
761
|
+
exact viewport, revision, readiness and publication gates.
|
|
762
|
+
|
|
763
|
+
**Modes.** A started MCP server also starts the website. A browser-only showcase
|
|
764
|
+
starts the same runtime without stdio. All modes share the managed Bun
|
|
765
|
+
compiler. Shutdown closes the website, streams, frame capabilities, connections
|
|
766
|
+
and compiler.
|
|
767
|
+
|
|
768
|
+
**Sandbox.** The sandbox keeps the App opaque and still lets a scenario behave
|
|
769
|
+
as a document: an `about:srcdoc` base for inline documents, native forms
|
|
770
|
+
(`allow-forms`, with CSP `form-action 'none'`), and bundled binary assets with
|
|
771
|
+
blob reads and WebAssembly compilation but no external network access,
|
|
772
|
+
JavaScript eval or host DOM access. These rules belong to document loading and
|
|
773
|
+
change no project link or scenario handler. External hosts choose their own
|
|
774
|
+
([host boundary](MCP.md#host-boundary-and-compatibility)).
|
|
775
|
+
|
|
776
|
+
### The preview resource graph
|
|
777
|
+
|
|
778
|
+
ADS's Bun preview compiler publishes a versioned dependency graph: shared
|
|
779
|
+
runtime and foundation assets, plus independently addressable scenario modules.
|
|
780
|
+
The MCP server serves compiled bytes and does not evaluate project TSX.
|
|
781
|
+
|
|
782
|
+
**Loading and mounting.** Inside the preview, the selected dependency closure
|
|
783
|
+
loads from checked HTTP assets or verified MCP resources. A mount that ADS
|
|
784
|
+
generates for the project's framework normalizes each entry to mount/unmount
|
|
785
|
+
with native framework semantics. The choice of a framework installs none into
|
|
786
|
+
the tooling host.
|
|
787
|
+
|
|
788
|
+
- The mount hands the scenario to `mountScenarioPage`
|
|
789
|
+
(`showcase-client/scenario-page.mts`, part of `@reqvire-org/ads/preview`). It
|
|
790
|
+
draws the page with the showcase UI bundle and gives each specimen's box
|
|
791
|
+
(`[data-slot="specimen"]`) to the framework, which renders that specimen's
|
|
792
|
+
`render` as a component with the chosen state's props. Each specimen is its
|
|
793
|
+
own framework root.
|
|
794
|
+
- The scenario kit is generated for the project's framework beside the mount
|
|
795
|
+
(`generatedKit`, `src/preview-source.mts`): each kit component is a host
|
|
796
|
+
element in which ADS draws its own component; a `Container` places its
|
|
797
|
+
children in that component's content slot through a portal.
|
|
798
|
+
- The frame's root is `createPreviewRoot` (`showcase-client/preview-root.mts`).
|
|
799
|
+
The frame module is `showcase-client/preview-frame.mts`, shipped as
|
|
800
|
+
`dist/showcase/preview-frame.mjs`; a checkout uses the built frame, because
|
|
801
|
+
the page needs the built UI bundle.
|
|
802
|
+
- The root also carries the layout-guide controls
|
|
803
|
+
(`showcase-client/guide-controls.mts`).
|
|
804
|
+
- ADS views render into the same root (`showcase-client/ads-views.mts`).
|
|
805
|
+
|
|
806
|
+
Native ES modules preserve shared runtime identity, cycles and live bindings. A
|
|
807
|
+
scenario switch unmounts the previous view and keeps unchanged dependencies
|
|
808
|
+
cached. Persistence is a host lifecycle choice: a new external widget loads the
|
|
809
|
+
same resources independently. Resource sharing is scoped to an App instance.
|
|
810
|
+
|
|
811
|
+
**One shared graph.** Previews build one shared multi-entry graph on first
|
|
812
|
+
preview demand or accepted-edit preparation, then reuse it across selections
|
|
813
|
+
and unchanged restarts. The App loads the selected scenario's static dependency
|
|
814
|
+
closure; dynamic imports stay lazy. Production bundles, workers and
|
|
815
|
+
cancellation stay project-owned.
|
|
816
|
+
|
|
817
|
+
**Code inside the frame.** The code that runs inside the frame lives in
|
|
818
|
+
`preview-client/`, as strict TypeScript with no Node APIs: one transport-neutral
|
|
819
|
+
runtime (`runtime.mts`) with its resource and HTTP loaders, hot-update runtime,
|
|
820
|
+
manifest cache, grid overlay and subject stage. The build bundles it per
|
|
821
|
+
delivery:
|
|
822
|
+
|
|
823
|
+
| Bundle | Delivery |
|
|
824
|
+
| --- | --- |
|
|
825
|
+
| `dist/mcp/preview-widget.bundle.js` | The MCP App (`preview-widget.mts`) |
|
|
826
|
+
| `dist/mcp/preview-http.bundle.js` | The HTTP showcase (`preview-http.mts`) |
|
|
827
|
+
| `dist/mcp/resource-loader.js` | The loader alone |
|
|
828
|
+
|
|
829
|
+
Page code that Playwright evaluates stays in `src/` as `*.page.mts` (the paint
|
|
830
|
+
audit in `src/verification/paint-audit.page.mts`).
|
|
831
|
+
|
|
832
|
+
**Resource identity.** A resource ID hashes the original bytes and the
|
|
833
|
+
transitive graph of URLs they rewrite. Cyclic module groups share a
|
|
834
|
+
deterministic fingerprint. IDs are therefore independent of compiler filename
|
|
835
|
+
hashing: the rewrite of a changed dependency cannot put different bytes behind
|
|
836
|
+
an existing URI, and unrelated graph branches keep their IDs and caches. The
|
|
837
|
+
App still verifies the digest of the final bytes, and rejects an identity
|
|
838
|
+
collision without partially registering the new graph.
|
|
839
|
+
|
|
840
|
+
**Transient read failures.** The showcase's resource bridge recovers a
|
|
841
|
+
transient fetch failure with at most three read attempts and bounded backoff.
|
|
842
|
+
Only resource reads are retried: tool calls, assertions and whole checks are
|
|
843
|
+
never replayed. Cancellation, HTTP, protocol and content errors and integrity
|
|
844
|
+
failures stay failures, and a persistent transport failure still blocks a
|
|
845
|
+
mutation. Browser diagnostics record retries, and verification keeps recovered
|
|
846
|
+
startup reads in its case results. External hosts own their transport
|
|
847
|
+
recovery; the reusable App's integrity checks are the same.
|
|
848
|
+
|
|
849
|
+
**Published output.** Managed graph builders publish into
|
|
850
|
+
`.ds/preview/sessions/<session>/`; logical scenario IDs and resource URIs do
|
|
851
|
+
not change. A standalone build publishes `.ds/preview/manifest.json` and cannot
|
|
852
|
+
overwrite a live session's success record. Verified compiled snapshots form a
|
|
853
|
+
bounded shared warm-start cache, gated by source, compiler, dependency and
|
|
854
|
+
output hashes, which ordinary shutdown keeps
|
|
855
|
+
([output locations](MCP.md#output-locations-and-limits)).
|
|
856
|
+
|
|
857
|
+
### ADS views
|
|
858
|
+
|
|
859
|
+
`src/ads-views.mts` declares the ADS views. Each names the part of the preview
|
|
860
|
+
tree's facts file its module embeds and what it brings into the frame.
|
|
861
|
+
|
|
862
|
+
A view is laid out by showcase-ui components, which ADS checks; the view module
|
|
863
|
+
sets only the inspected project's values on them. A token's sample is
|
|
864
|
+
`TokenSample`, a profile applied as a whole is `AppliedSample`, a motion
|
|
865
|
+
profile plays on `MotionSample` (through the Web Animations API, with the
|
|
866
|
+
profile's own timing), an asset is drawn in `ArtworkSample`, and a grid is
|
|
867
|
+
shown by `GridExample` and `MiniUnitSample`. Each exposes one element
|
|
868
|
+
(`[data-slot="value"]`, `"dot"` or `"drawing"`) for the project's value. A
|
|
869
|
+
view module holds no stylesheet and no CSS rule
|
|
870
|
+
(`tests/unit/view-modules.test.ts`). The one sheet a view adds is the grid's
|
|
871
|
+
own rules from the facts, written as they are by
|
|
872
|
+
`showcase-client/project-rules.mts`.
|
|
873
|
+
|
|
874
|
+
**Foundation** (`foundation`) embeds the grids and the public module, so every
|
|
875
|
+
owner's sheet is in its frame.
|
|
876
|
+
|
|
877
|
+
**Tokens** (`tokens`, `showcase-client/tokens-view.mts`):
|
|
878
|
+
|
|
879
|
+
- It embeds the facts' `tokens` (`src/token-view-facts.mts`): the token
|
|
880
|
+
inventory's builder given no owners, so the bytes depend on the foundation
|
|
881
|
+
alone.
|
|
882
|
+
- It imports only the document sheet and the tree's preview-only
|
|
883
|
+
`ads-preview-tokens.css` (the `tokenCss` of every token, since an emitted
|
|
884
|
+
sheet carries only the tokens its owner reaches).
|
|
885
|
+
- No owner is in its module graph: an owner-only edit leaves it unchanged, and
|
|
886
|
+
a token edit rebuilds it.
|
|
887
|
+
|
|
888
|
+
**Profiles** (`profiles`, `showcase-client/profiles-view.mts`):
|
|
889
|
+
|
|
890
|
+
- It embeds the facts' `profiles` (`src/profile-view-facts.mts`): each
|
|
891
|
+
profile's kind, declaration file, the profiles it builds on, every field with
|
|
892
|
+
the profile that states it and the tokens it reads, its choices, and the
|
|
893
|
+
profiles that build on it or select it in a slot. The foundation keeps this
|
|
894
|
+
in each profile's `declared` data.
|
|
895
|
+
- It takes the same frame as the tokens view, so a field that reads one token
|
|
896
|
+
draws that token's sample in the frame's theme and brand.
|
|
897
|
+
- It lists no owners, so an owner-only edit leaves it unchanged; a profile or
|
|
898
|
+
token edit rebuilds it.
|
|
899
|
+
|
|
900
|
+
**Artwork** (`assets`, `showcase-client/assets-view.mts`):
|
|
901
|
+
|
|
902
|
+
- It embeds the facts' `assets` (`src/asset-view-facts.mts`): every asset of
|
|
903
|
+
the asset catalog with its authored drawings as text, and every glyph set.
|
|
904
|
+
- It draws each asset with `sanitizeInspectedSvg` (`src/inspected-svg.mts`),
|
|
905
|
+
the one sanitizer for inspected SVG. A frame module may import a pure module
|
|
906
|
+
of `src/`; the build rewrites that import for the built tool.
|
|
907
|
+
- It takes the token-sheets frame, so a paint slot's token colours its drawing.
|
|
908
|
+
It lists no owners.
|
|
909
|
+
- It renders one token group at a time through showcase-ui's
|
|
910
|
+
`renderSpecimenSections`: choices, role sections, and a sample column that
|
|
911
|
+
the view fills with the token's own custom property, at most 100 rows per
|
|
912
|
+
page.
|
|
913
|
+
- It reads each value from the frame's computed style.
|
|
914
|
+
- It keeps the chosen group across a rebuild through the runtime's
|
|
915
|
+
navigate/focus round trip with the host.
|
|
916
|
+
|
|
917
|
+
The explorer's token category counts the `tokens` of the preview tree's facts,
|
|
918
|
+
the list the view renders, so a warm explorer read never walks the project's
|
|
919
|
+
inputs. Before any revision is previewed, the analysis worker's `token-summary`
|
|
920
|
+
operation counts them from the design inputs only.
|
|
598
921
|
|
|
599
|
-
###
|
|
922
|
+
### Incremental compilation and refresh
|
|
600
923
|
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
patterns own their layout, skin, states and animations in Linaria.
|
|
606
|
-
|
|
607
|
-
`base.css` has a closed contract with three roles: root/body typography, canvas
|
|
608
|
-
colors and theme behavior; limited native normalization; and global accessibility
|
|
609
|
-
through focus indicators and reduced-motion rules. Selector, property and value
|
|
610
|
-
checks reject component skins and layout even when they use native selectors and
|
|
611
|
-
valid tokens. A `button` background or `body` grid belongs to a Linaria owner.
|
|
612
|
-
Document defaults also cover shared text selection and document scrollbars;
|
|
613
|
-
local control/scroll-container styling stays with its owner.
|
|
614
|
-
|
|
615
|
-
Foundation CSS passes the ordinary token-reference and visual-value checks too.
|
|
616
|
-
Parsed selectors reject component hooks, local shared-token overrides and
|
|
617
|
-
contextual selectors, including hooks concealed in `:where()` or `:is()`. The
|
|
618
|
-
policy describes CSS roles and normalization keywords, with no project classes,
|
|
619
|
-
token catalogue or sample templates. Lower specificity cannot bypass ownership.
|
|
620
|
-
Static gates establish this source contract; browser review still checks its
|
|
621
|
-
actual effects and accessibility.
|
|
924
|
+
Each connected project runtime owns one managed preview compiler process.
|
|
925
|
+
Semantic analysis uses the [shared analysis host](#semantic-analysis), not this
|
|
926
|
+
process. TSX needs compilation, and there is one preview pipeline with
|
|
927
|
+
automatic updates.
|
|
622
928
|
|
|
623
|
-
|
|
929
|
+
The compiler process hosts each draft workspace as an in-process instance,
|
|
930
|
+
listed in a control file. One scheduler runs the builds in turn: the viewed
|
|
931
|
+
draft first, then the project, then background work.
|
|
624
932
|
|
|
625
|
-
|
|
626
|
-
to produce useful UI. A scenario supplies that development context around the
|
|
627
|
-
real public implementation. It mounts independently, without opening a showcase
|
|
628
|
-
page or initializing the application's router, store or services first.
|
|
629
|
-
|
|
630
|
-
Scenarios and their fixtures live beside the component or pattern they exercise.
|
|
631
|
-
Demo framing belongs to development-only review helpers; component props describe
|
|
632
|
-
intentional product behavior and visual variants.
|
|
633
|
-
The token and brand views are tool-owned: ADS builds them from the token sheets,
|
|
634
|
-
`tokens/catalog.ads.json` (groups and sample bindings) and `assets/brand/`. The project
|
|
635
|
-
owns the data; ADS owns the presentation. The tool contains no project token list,
|
|
636
|
-
sample values or assumed visual identity.
|
|
637
|
-
Larger scenarios live under `composition/`. They use the same public screen
|
|
638
|
-
patterns as production: application adapters supply live data and effects;
|
|
639
|
-
scenario adapters supply fixture data, local state and simulated services.
|
|
640
|
-
Reassembling a second screen from shared primitives still allows design drift.
|
|
641
|
-
|
|
642
|
-
The server discovers one path-derived scenario registry. The showcase's scenario
|
|
643
|
-
sections (Brand, Tokens, Components, Patterns and Composition) browse that same registry
|
|
644
|
-
through MCP results. They do not initialize the entry or define
|
|
645
|
-
its UI. Every preview uses `?scenario=<id>`; discovered `kind` selects its section. The host supplies theme and
|
|
646
|
-
available space; the public implementation
|
|
647
|
-
supplies presentation. Several related public parts may share a scenario with
|
|
648
|
-
their required parent. Every declared token and every public renderable component
|
|
649
|
-
and pattern needs addressable coverage. Token references must exist in the real
|
|
650
|
-
foundation; claimed token/UI coverage must be reachable from the scenario entry.
|
|
651
|
-
Types, constants and utilities do not require UI scenarios.
|
|
652
|
-
Explicitly declared public children can share a parent's scenario when bounded
|
|
653
|
-
source tracing reaches them through its returned JSX and selected props/defaults.
|
|
654
|
-
Opaque conditional branches do not grant speculative coverage. Scenarios may
|
|
655
|
-
consume deliberate public class helpers when their returned styles retain
|
|
656
|
-
runtime-owned Linaria provenance; stable owner-authored hooks may accompany real
|
|
657
|
-
styles. This preserves ownership rather than granting scenario styling freedom.
|
|
658
|
-
A native element may provide semantics as the single direct child of a public
|
|
659
|
-
runtime slot when source tracing proves it is cloned with that owner's props.
|
|
660
|
-
This preserves polymorphic composition without allowing standalone scenario
|
|
661
|
-
controls, scenario styling or name-based exceptions. Selector-based composition
|
|
662
|
-
can establish the same ownership through actual returned DOM and attached runtime
|
|
663
|
-
Linaria: a positive native-tag relationship, or a `:has` relationship to a marker
|
|
664
|
-
declared by a real runtime-owned child. Broad selectors and scenario-authored
|
|
665
|
-
lookalikes grant no permission. This source proof does not establish computed
|
|
666
|
-
appearance, keyboard behavior or visual parity; browser checks remain necessary.
|
|
667
|
-
The skill-local [scenario guide](../skills/ads-designer/references/scenarios.md)
|
|
668
|
-
explains evidence, limits and diagnostics.
|
|
933
|
+
#### The emitted tree and complete revisions
|
|
669
934
|
|
|
670
|
-
|
|
935
|
+
A preview compiles the emitted output of the design system:
|
|
671
936
|
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
identities where needed. No scenario/owner metadata can override the folder rule.
|
|
680
|
-
|
|
681
|
-
Discovery adds an optional derived `group` to scenario results. One registry feeds
|
|
682
|
-
`ads_scenarios`, its searchable group labels, `ads://project/scenarios` and the
|
|
683
|
-
showcase. The browser only groups those results; it does not scan folders or own a
|
|
684
|
-
second taxonomy. Directory entries participate in discovery and build freshness,
|
|
685
|
-
so adding/removing a non-source file also updates grouping without a TSX edit.
|
|
686
|
-
Public catalogue preview IDs, edit-unit ownership and compiled
|
|
687
|
-
resource selection continue to use the real owner/scenario paths. Grouping grants
|
|
688
|
-
no API visibility, render coverage, styling permission or runtime behavior.
|
|
937
|
+
- Production modules come from a stable preview-owned tree
|
|
938
|
+
(`.ds/emitted/live/`). The tree holds the same bytes that `ads emit` writes.
|
|
939
|
+
- Scenarios, fixtures and other development files compile from source beside
|
|
940
|
+
the tree.
|
|
941
|
+
- Nothing is transformed.
|
|
942
|
+
- If a development file imports an authored production file that the tree does
|
|
943
|
+
not hold, the build fails. ADS never renders authored source silently.
|
|
689
944
|
|
|
690
|
-
|
|
945
|
+
The compiler builds only when it is told that a complete revision is in place.
|
|
946
|
+
It never builds on file events in the tree, so it never builds a mix of two
|
|
947
|
+
revisions.
|
|
948
|
+
|
|
949
|
+
- An edit of a production module holds its builds until a tree holds the edit.
|
|
950
|
+
- A compiler that starts after such an edit also holds for it, from the sources
|
|
951
|
+
the tree records.
|
|
952
|
+
- MCP replays the emitter's latest revision (or its failure) to a restarted
|
|
953
|
+
compiler.
|
|
954
|
+
- A build that a newer revision supersedes is built again. It is never reported
|
|
955
|
+
as a failure.
|
|
691
956
|
|
|
692
|
-
|
|
957
|
+
#### Watched and complete builds
|
|
958
|
+
|
|
959
|
+
`runScenarioCompiler` is the single scheduler for live feedback, source
|
|
693
960
|
validation, discovery, freshness and verified publication. Watched previews use
|
|
694
|
-
`createIncrementalPreviewBuilder`: a private Vite module graph with the same
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
the
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
and
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
961
|
+
`createIncrementalPreviewBuilder`: a private Vite module graph with the same
|
|
962
|
+
import optimization and source identities as complete builds. Unwatched builds
|
|
963
|
+
and acceptance preparation use the complete Bun builder. React Refresh and
|
|
964
|
+
native Prefresh supply component signatures and replacement.
|
|
965
|
+
|
|
966
|
+
This is preview compilation, not a second analysis engine: the shared analysis
|
|
967
|
+
service supplies discovery and checking, and the application keeps its own
|
|
968
|
+
production bundler.
|
|
969
|
+
|
|
970
|
+
- Vite runs in middleware mode, without a listening server, filesystem routes
|
|
971
|
+
or a browser websocket.
|
|
972
|
+
- The builder snapshots modules, CSS, local assets, literal lazy imports and
|
|
973
|
+
self-contained Bun worker output into the immutable `ads://assets/…` graph.
|
|
974
|
+
Module reads never compile live filesystem contents.
|
|
975
|
+
- The scheduler fences the source revision before publication. Project and
|
|
976
|
+
draft roots own separate compiler sessions.
|
|
977
|
+
- A watched graph includes the requested scenario roots and their dependencies,
|
|
978
|
+
and preserves the roots that other mounted Apps use. Untouched entries are
|
|
979
|
+
not compiled until requested. Unwatched full builds keep complete entry
|
|
980
|
+
coverage.
|
|
981
|
+
- Worker bundle reuse and the pruning of generated output trees from watches
|
|
982
|
+
are described in [MCP.md](MCP.md#warming-and-the-job-queue). The worker build
|
|
983
|
+
cache is separate from source-validation evidence.
|
|
984
|
+
|
|
985
|
+
#### Hot updates
|
|
986
|
+
|
|
987
|
+
The sandboxed iframe stays alive for compatible updates and keeps component
|
|
988
|
+
state, input values, focus and selection where the framework permits.
|
|
989
|
+
[MCP.md](MCP.md#refresh-in-the-preview-frame) lists which change refreshes in
|
|
990
|
+
place and which reopens a clean frame.
|
|
991
|
+
|
|
992
|
+
- A watched manifest's `hot.source` hashes the lowered module before immutable
|
|
993
|
+
dependency URI rewriting, so the loader can tell changed code from a changed
|
|
994
|
+
dependency address ([fields](MCP.md#output-locations-and-limits)).
|
|
995
|
+
- A bounded rewrite cache avoids reparsing unchanged compiler output and still
|
|
996
|
+
observes output membership and worker content changes.
|
|
997
|
+
- Unopened lazy branches stay unloaded. Changed hook signatures follow the
|
|
998
|
+
framework's reset semantics.
|
|
999
|
+
- A failed source check restores the last verified output and stays a failure.
|
|
1000
|
+
State retention never substitutes for validation or acceptance.
|
|
1001
|
+
|
|
1002
|
+
Production modules refresh from the emitted tree and development files from
|
|
1003
|
+
the design system: the framework refresh transforms cover both directories. An
|
|
1004
|
+
owner edit therefore replaces the emitted owner in place even when its scenario
|
|
1005
|
+
module is no refresh boundary itself (it exports its `scenario` metadata).
|
|
1006
|
+
Otherwise the update would reach the scenario and reopen the frame.
|
|
1007
|
+
|
|
1008
|
+
**Fidelity guarantee.** A hot update renders exactly what a clean render of the
|
|
1009
|
+
same revision renders. `tests/browser/hot-update-fidelity.test.mjs` holds the
|
|
1010
|
+
guarantee in the default HTTP showcase with normal Chromium settings. It
|
|
1011
|
+
compares live views that received an owner source edit, and separately token
|
|
1012
|
+
sheet edits, as hot updates against a fresh page in a fresh browser context on
|
|
1013
|
+
the same revision, selections and interactions. The frames must match pixel for
|
|
1014
|
+
pixel. Every element's classes, interaction state and computed style, and the
|
|
1015
|
+
applied sheets and their order, must be equal.
|
|
1016
|
+
|
|
1017
|
+
The one explained difference is Chromium's own: a hovered rounded control whose
|
|
1018
|
+
radius changes in place keeps slightly different corner antialiasing than a
|
|
1019
|
+
fresh paint, until the pointer enters again. For that case the hot update must
|
|
1020
|
+
equal, pixel for pixel, a clean render whose page makes the same value change
|
|
1021
|
+
in place itself.
|
|
1022
|
+
|
|
1023
|
+
**Renewal and retention.** The internal graph is renewed when configuration or
|
|
1024
|
+
dependency manifests change, when the captured original inputs of optimized
|
|
1025
|
+
dependencies change, and on source-directory membership changes that can alter
|
|
1026
|
+
resolution ([builder graph](CACHING.md#builder-graph)). It is also renewed, and
|
|
1027
|
+
the frame reopened clean at the next mount, past the retention
|
|
1028
|
+
[limits](CACHING.md#limits): 4096 retained inputs, modules or metadata records,
|
|
1029
|
+
or 64 MiB of lowered source and code or of materialized resource bodies. These
|
|
1030
|
+
are retention limits, not process RSS guarantees. Owned Vite, worker and
|
|
1031
|
+
temporary-directory lifetimes end with their builder.
|
|
1032
|
+
|
|
1033
|
+
#### Validation and publication
|
|
1034
|
+
|
|
1035
|
+
Watched compilation gives immediate visual feedback. Validation and scenario
|
|
1036
|
+
inspection run in the background on the shared asynchronous analysis host, not
|
|
1037
|
+
on an inspector-owned worker. Rapid edits replace pending work, with one
|
|
1038
|
+
verification run in flight.
|
|
1039
|
+
[MCP.md](MCP.md#verified-and-live-graphs) states the contract of the two
|
|
1040
|
+
graphs.
|
|
746
1041
|
|
|
747
1042
|
```mermaid
|
|
748
1043
|
flowchart LR
|
|
@@ -758,670 +1053,887 @@ flowchart LR
|
|
|
758
1053
|
App --> Mount[Incompatible or rollback: clean frame]
|
|
759
1054
|
```
|
|
760
1055
|
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
A
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
1056
|
+
- **Two graphs.** Live resources are fenced to the current source digest and
|
|
1057
|
+
managed session and never update accepted artifacts, the successful graph
|
|
1058
|
+
cache or `current`. Only validation and compilation that both pass against
|
|
1059
|
+
unchanged source publish the verified graph; a failure restores the last
|
|
1060
|
+
verified view.
|
|
1061
|
+
- **Recovery.** Guarded publication invalidates the compiler explicitly.
|
|
1062
|
+
Content reconciliation recovers missed atomic file replacements, so OS watch
|
|
1063
|
+
delivery cannot establish freshness.
|
|
1064
|
+
- **Request batches.** New preview requests share one input-stamp capture per
|
|
1065
|
+
batch. After that asynchronous capture, scheduling reads the current
|
|
1066
|
+
candidate, publication and registry together. A candidate that completes or
|
|
1067
|
+
is replaced during capture cannot lose a requested view or lend coverage from
|
|
1068
|
+
a retired candidate.
|
|
1069
|
+
- **Waiting.** The built-in client waits only for compiled output on
|
|
1070
|
+
interactive selections; default MCP preview calls, captures and verification
|
|
1071
|
+
wait for verified output. A pending selection never reports App readiness as
|
|
1072
|
+
verified. Discovery notifications are reconciled after validation.
|
|
1073
|
+
- **Remount or retain.** A successful global revision does not remount an
|
|
1074
|
+
unchanged selected view. The App compares its static module, style and asset
|
|
1075
|
+
closure and keeps DOM, form and scroll state when it matches. When it
|
|
1076
|
+
changes, a watched graph refreshes compatible framework boundaries, and a
|
|
1077
|
+
complete bundled graph remounts through the generated mount.
|
|
1078
|
+
- **Framing.** The visible preview keeps its framing while replacement
|
|
1079
|
+
resources load. Kind and subject framing change only after a successful
|
|
1080
|
+
mount. Structural padding is resolved before paint, including delayed
|
|
1081
|
+
framework commits, and font readiness does not temporarily restore specimen
|
|
1082
|
+
padding during reloads. The subject stage takes its subjects by selector
|
|
1083
|
+
(a scenario's specimen boxes, a view's samples), measures their border
|
|
1084
|
+
boxes, and again when the document's theme or brand changes. So a change that
|
|
1085
|
+
only moves a subject, or changes its border or padding, still moves its
|
|
1086
|
+
stage.
|
|
1087
|
+
- **Status.** The showcase's header indicator exposes compilation, checking,
|
|
1088
|
+
reload and fallback status ([showcase client](MCP.md#built-in-showcase-client)).
|
|
1089
|
+
Messages from an older selection cannot end the loading transition of an
|
|
1090
|
+
entry switch.
|
|
1091
|
+
- **Lanes.** Background acceptance, validation and checks serialize
|
|
1092
|
+
independently of the accepted/draft preview lane. They never suspend
|
|
1093
|
+
Explorer's compiler or make a cold selection wait for a browser verification
|
|
1094
|
+
suite. Published graphs stay readable while source changes compile.
|
|
1095
|
+
- **Shutdown.** Normal compiler shutdown clears the current module and worker
|
|
1096
|
+
caches and removes the scratch directory.
|
|
1097
|
+
|
|
1098
|
+
#### Scenario discovery snapshots
|
|
1099
|
+
|
|
1100
|
+
Preview discovery shares `.ds/scenario-registry.json` between the MCP host, the
|
|
1101
|
+
draft selector and the compiler processes.
|
|
1102
|
+
|
|
1103
|
+
- The snapshot holds scenario metadata and diagnostics, keyed to the full
|
|
1104
|
+
relevant source, dependency and directory revision and to the loaded ADS code
|
|
1105
|
+
and runtime.
|
|
1106
|
+
- Accepted and draft roots have separate snapshots. Draft-only edits preserve
|
|
1107
|
+
accepted registry snapshots.
|
|
1108
|
+
- A matching snapshot avoids repeated discovery during startup. Changed inputs,
|
|
1109
|
+
or a missing or corrupt snapshot, trigger fresh discovery.
|
|
1110
|
+
- Explicit registry reads fence their in-memory registry against current
|
|
1111
|
+
source, so edits and removals are visible before the next observation or
|
|
1112
|
+
reconciliation tick.
|
|
1113
|
+
- Snapshot publication fences source edits during inspection.
|
|
1114
|
+
|
|
1115
|
+
For drafts:
|
|
1116
|
+
|
|
1117
|
+
- A reopened, already known draft scenario keeps its last discovered metadata
|
|
1118
|
+
while the shared analysis service refreshes the registry.
|
|
1119
|
+
- New or missing scenario identities wait for discovery. Accepted comparison
|
|
1120
|
+
metadata is revision-fenced independently.
|
|
1121
|
+
- The response's `discovery` distinguishes current, pending and failed metadata
|
|
1122
|
+
from the exact proposal revision and the actual preview build.
|
|
1123
|
+
- Superseded worker results cannot replace newer requests. Drop and shutdown
|
|
1124
|
+
remove owned discovery state and release registered revisions.
|
|
1125
|
+
- Capture updates reuse source-fenced discovery and allocate no other semantic
|
|
1126
|
+
program.
|
|
1127
|
+
|
|
1128
|
+
Preview analysis and checks share bounded native snapshots through
|
|
1129
|
+
`analysis/service.mts`. Program acquisition delegates through
|
|
1130
|
+
`program-cache.mts`. Unchanged ASTs keep their identity; source, import and
|
|
1131
|
+
configuration edits invalidate the relevant snapshot.
|
|
1132
|
+
|
|
1133
|
+
This cache supplies no passing validation or behavior evidence: checks and
|
|
1134
|
+
acceptance inspect and validate source independently.
|
|
1135
|
+
|
|
1136
|
+
#### Draft preview startup and build reports
|
|
1137
|
+
|
|
1138
|
+
**Startup.** Draft creation queues background compiler initialization.
|
|
1139
|
+
|
|
1140
|
+
- One prewarm runs at a time. Newer pending drafts supersede unused queued work
|
|
1141
|
+
and reclaim an older unused speculative session.
|
|
1142
|
+
- Explicit preview requests share the same startup. At most four draft preview
|
|
1143
|
+
sessions are starting at one time: one more retires the oldest starting
|
|
1144
|
+
session.
|
|
1145
|
+
- File events and MCP writes synchronize warm overlays after a short debounce.
|
|
1146
|
+
A slower periodic reconciliation recovers lost events and replaced
|
|
1147
|
+
directories.
|
|
1148
|
+
- Closing ADS stops queued jobs, source watchers and every owned compiler.
|
|
1149
|
+
|
|
1150
|
+
**Reports.** Draft build reports flow from their preview hosts into the parent
|
|
1151
|
+
build resource and the proposal summaries.
|
|
1152
|
+
|
|
1153
|
+
- `ads://project/build.drafts` identifies active proposal builds, their
|
|
1154
|
+
scenario states, session and revision, freshness and scoped resource
|
|
1155
|
+
addresses. `ads_drafts` and the relevant discovery and preview results carry
|
|
1156
|
+
compact status.
|
|
1157
|
+
- A draft source edit immediately marks an existing preview queued/stale.
|
|
1158
|
+
- A build transition changes the parent resource fingerprint and emits standard
|
|
1159
|
+
resource-update notifications for build and draft subscribers, including
|
|
1160
|
+
completion and failure without another edit.
|
|
1161
|
+
- Active scoped build resources are listed and subscribable. Removal emits a
|
|
1162
|
+
final invalidation and a resource-list change.
|
|
1163
|
+
|
|
1164
|
+
**Observers.** Observers share draft events across connections, detach when
|
|
1165
|
+
closed, and serialize refreshes so overlapping file events cannot replay older
|
|
1166
|
+
state. Native report-file events notify promptly; periodic observation covers
|
|
1167
|
+
missed or replaced files. Stateless HTTP mutation handlers forward refreshes to
|
|
1168
|
+
those observers. They do not initialize fresh observation, which would
|
|
1169
|
+
misclassify each request as a source edit.
|
|
1170
|
+
|
|
1171
|
+
**Explorer.** Explorer uses these reports for its monochrome entry glyphs and
|
|
1172
|
+
refreshes its mounted Apps. Its notification scheduler keeps an already
|
|
1173
|
+
scheduled refresh's deadline, so later build notices cannot postpone a registry
|
|
1174
|
+
update indefinitely. Refreshes run one at a time; notices that arrive during a
|
|
1175
|
+
refresh form one follow-up batch that keeps any discovery request.
|
|
1176
|
+
|
|
1177
|
+
A ready draft preview is still unaccepted: discovery metadata and compiled
|
|
1178
|
+
feedback cannot establish acceptance.
|
|
1179
|
+
|
|
1180
|
+
#### Previews after accepted edits
|
|
1181
|
+
|
|
1182
|
+
Accepted MCP edits prepare previews even when no viewer has opened them
|
|
1183
|
+
([MCP](MCP.md#preparation-after-accepted-edits)).
|
|
1184
|
+
|
|
1185
|
+
- A matching checked candidate graph and scenario registry carry into the
|
|
1186
|
+
project's cache. Reuse follows content, never elapsed time.
|
|
1187
|
+
- A transferred checked graph can refresh older watcher metadata without a
|
|
1188
|
+
recompile, while a partial watched graph cannot replace the complete
|
|
1189
|
+
registry. Its full registry snapshot transfers only when the source revisions
|
|
1190
|
+
match, so a reopened compiler need not repeat discovery of accepted source.
|
|
1191
|
+
- Cache recording checks the compiled source stamp before and after it hashes
|
|
1192
|
+
dependencies. An edit that races publication therefore cannot associate
|
|
1193
|
+
previous output with newer inputs: it leaves the previous cache intact and
|
|
1194
|
+
requires the next build.
|
|
1195
|
+
- Shared dependency maps are stored once, with a fresh validation memo for each
|
|
1196
|
+
reuse operation. No file hash is kept across operations. Configuration input
|
|
1197
|
+
ordering is canonical.
|
|
1198
|
+
- A complete cache stays within the 8 MiB budget; ADS does not silently write
|
|
1199
|
+
an unreadable large file.
|
|
1200
|
+
|
|
1201
|
+
#### Production previews for acceptance
|
|
859
1202
|
|
|
860
1203
|
For managed resource previews, ADS requests the scenarios in production mode
|
|
861
|
-
through the
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
The
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
1204
|
+
through the workspace of the reviewed draft. ADS's managed compiler compiles
|
|
1205
|
+
them and its host serves them.
|
|
1206
|
+
|
|
1207
|
+
- Only a candidate without such a workspace gets a preview host of its own. Its
|
|
1208
|
+
compiler is parked after production publication, and the host keeps serving
|
|
1209
|
+
that immutable graph to registered browser verification.
|
|
1210
|
+
- In both cases the incremental graph is closed before production compilation
|
|
1211
|
+
starts.
|
|
1212
|
+
- Warming an already-current selection does not restart that compiler or wait
|
|
1213
|
+
for it.
|
|
1214
|
+
- Production reuse requires a successful production build of the exact inputs.
|
|
1215
|
+
A previously compiled development graph is not enough.
|
|
1216
|
+
- Project-owned additional commands run as configured. A standalone
|
|
1217
|
+
preview-build command belongs in the ordinary project build, not in
|
|
1218
|
+
`acceptance.scripts`.
|
|
1219
|
+
|
|
1220
|
+
Candidate inspection shares the project's native compiler through an isolated
|
|
1221
|
+
snapshot; no compiler starts per acceptance. The release of a candidate drops
|
|
1222
|
+
its adapters, resolvers and snapshot leases, and keeps live and sibling
|
|
1223
|
+
revisions valid.
|
|
1224
|
+
|
|
1225
|
+
#### The compiler process and its channel
|
|
1226
|
+
|
|
1227
|
+
If the compiler process exits, the next preview request starts one fresh child.
|
|
1228
|
+
MCP inspection stays available. Each child generation has its own status
|
|
1229
|
+
report, so independent MCP clients do not overwrite each other's build state.
|
|
1230
|
+
|
|
1231
|
+
Standalone compilation writes `.ds/build-status.json`. A compiler managed by
|
|
1232
|
+
MCP coordinates with its watcher over direct IPC
|
|
1233
|
+
(`src/mcp/compiler-channel.mts`):
|
|
1234
|
+
|
|
1235
|
+
- The channel is a private local socket: a Unix socket in a 0700 temporary
|
|
1236
|
+
directory, or a named pipe on Windows.
|
|
1237
|
+
- The socket is named with a per-launch token in the compiler's environment, so
|
|
1238
|
+
it works through any configured compiler command.
|
|
1239
|
+
- Requests and draft control go to the compiler. Build reports, full-build
|
|
1240
|
+
results and input digests come back, keyed by session and held in the MCP
|
|
1241
|
+
process.
|
|
1242
|
+
- The latest request and the draft list are replayed when a compiler connects
|
|
1243
|
+
or reconnects.
|
|
1244
|
+
- Nothing is exchanged through `.ds/` status files. Preview artifacts and
|
|
1245
|
+
resources keep their own transport.
|
|
1246
|
+
|
|
1247
|
+
Session identity separates revisions across restarts. Source and artifact
|
|
1248
|
+
digests establish freshness independently of process state.
|
|
1249
|
+
|
|
1250
|
+
**Build evidence.** Build success records the project input digest captured
|
|
1251
|
+
before compilation. Status reads verify that digest and the output bytes
|
|
1252
|
+
independently. Unchanged asset checks reuse bounded verification metadata,
|
|
1253
|
+
keyed by the expected digest and the file identity, size and nanosecond
|
|
1254
|
+
modification and change timestamps. Resource delivery still hashes the actual
|
|
1255
|
+
returned bytes.
|
|
1256
|
+
|
|
1257
|
+
#### Input sets
|
|
1258
|
+
|
|
1259
|
+
Two input sets decide freshness. Both hold only design-system inputs.
|
|
1260
|
+
|
|
1261
|
+
| Set | Used by | Contains |
|
|
1262
|
+
| --- | --- | --- |
|
|
1263
|
+
| Owned inputs | Source digests, compiled-preview cache keys; status, discovery and capture reads | `ds.config.json`, the design-system folder, and the package manifest and lockfile(s) |
|
|
1264
|
+
| Validation inputs (`validationInputFiles`) | Validation evidence and draft acceptance | The owned inputs, plus the TypeScript configuration chain, dependency-resolution configuration (`.npmrc`, `bunfig.toml`, `.yarnrc.yml`, patched dependencies, the installed-dependencies digest), the entry files of configured package scripts with their import closure, notices and `validation.inputs` |
|
|
1265
|
+
|
|
1266
|
+
The validation set is wider because validation and acceptance run the project's
|
|
1267
|
+
own scripts and copy what those scripts need into candidate workspaces. Draft
|
|
1268
|
+
preview workspaces are full copies of that set.
|
|
1269
|
+
|
|
1270
|
+
Neither set holds application source, public folders, the root `index.html` or
|
|
1271
|
+
tests outside `dsDir`. So an application, backend, native-toolchain or
|
|
1272
|
+
documentation edit never stales a validation, preview or acceptance revision.
|
|
1273
|
+
The emitted output folder is never an input.
|
|
1274
|
+
|
|
1275
|
+
Compiled-preview cache keys need no read of application source or
|
|
1276
|
+
`node_modules`. The preview compiler's own inputs are the TypeScript
|
|
1277
|
+
configuration chain and `bunfig.toml`.
|
|
1278
|
+
|
|
1279
|
+
**Widening and fences.**
|
|
1280
|
+
|
|
1281
|
+
- A change outside `dsDir` (configuration, manifest, lockfiles or tooling)
|
|
1282
|
+
widens changed-scope validation to everything.
|
|
1283
|
+
- Opaque commands declare additional files or directories through
|
|
1284
|
+
`validation.inputs`; these add to the mandatory scope.
|
|
1285
|
+
- During validation and acceptance, the source-change fence watches `dsDir`,
|
|
1286
|
+
`ds.config.json`, the manifest and lockfiles, and `validation.inputs`,
|
|
1287
|
+
alongside the captured configuration files.
|
|
1288
|
+
- Guarded edits also fence every patched file and both sides of a configuration
|
|
1289
|
+
change. Candidate commands cannot rewrite source while ADS checks it.
|
|
1290
|
+
|
|
1291
|
+
The [validation guide](../skills/ads-designer/references/validation.md) holds
|
|
1292
|
+
the operational details.
|
|
1293
|
+
|
|
1294
|
+
**The digest map.** The managed compiler is the one owner of the digest map of
|
|
1295
|
+
the owned inputs (`src/input-digests.mts`) and the only process that watches
|
|
1296
|
+
them.
|
|
1297
|
+
|
|
1298
|
+
- One full walk seeds the map.
|
|
1299
|
+
- File events on the owned folder, `ds.config.json` and the manifest and
|
|
1300
|
+
lockfiles name the files to read again. Equal size or modification time never
|
|
1301
|
+
counts as unchanged.
|
|
1302
|
+
- Additions, removals, renames, unnamed events, watcher errors and
|
|
1303
|
+
configuration changes force a full walk before the next answer. A periodic
|
|
1304
|
+
full walk (at most every 30 s) is the safety net.
|
|
1305
|
+
- The compiler sends each changed map to MCP, and marks the map pending the
|
|
1306
|
+
moment an event arrives.
|
|
1307
|
+
|
|
1308
|
+
Before a request answers from the map, MCP asks the compiler to flush: the
|
|
1309
|
+
compiler processes every file event already delivered, reads those files again
|
|
1310
|
+
and replies with its map. An edit made before a status read is therefore never
|
|
1311
|
+
reported as built. Without a reply within one second, the request walks the
|
|
1312
|
+
owned inputs.
|
|
1313
|
+
|
|
1314
|
+
MCP's status, discovery and capture reads use that map. Without a running
|
|
1315
|
+
managed compiler (CLI commands, a stopped or parked compiler) they walk the
|
|
1316
|
+
owned inputs.
|
|
1317
|
+
|
|
1318
|
+
**Draft workspaces.** Draft workspaces change only through MCP. The draft
|
|
1319
|
+
controller sends each written or removed file to the draft's hosted compiler
|
|
1320
|
+
instance over the same channel; neither the controller nor the draft instances
|
|
1321
|
+
watch files. Accepted-source changes reach open draft previews through the
|
|
1322
|
+
project map.
|
|
1323
|
+
|
|
1324
|
+
**One revision per request.** Within one read-only request (a tool call such as
|
|
1325
|
+
`ads_show_scenario`, an accepted-project resource read, an observation pass, a
|
|
1326
|
+
build-report change or a preview wait), every reader shares one revision. A
|
|
1327
|
+
wait reads it again only after the compiler's status report changes. Discovery
|
|
1328
|
+
and capture fence long work with a fresh walk. Compiler children, timers and
|
|
1329
|
+
shared discovery tasks start outside any request's revision.
|
|
1330
|
+
|
|
1331
|
+
#### Compilation is separate from test selection
|
|
1332
|
+
|
|
1333
|
+
A cached module never skips validation, and ADS does not claim per-test-case
|
|
1334
|
+
selection.
|
|
1335
|
+
|
|
1336
|
+
| Trigger | What runs |
|
|
1337
|
+
| --- | --- |
|
|
1338
|
+
| Preview refresh | The adapter's validation callback |
|
|
1339
|
+
| Draft acceptance | The draft owners' own registered behavior checks, when `acceptance.behavior` is enabled |
|
|
1340
|
+
| `ads validate` | The affected behavior owners, selected through registered input dependencies; a shared foundation change can select every owner |
|
|
1341
|
+
|
|
1342
|
+
Configured project checks run as authored. Releases run the full test suite.
|
|
1343
|
+
|
|
1344
|
+
Checks share immutable ASTs and programs, native semantic queries and
|
|
1345
|
+
request-scoped facts. A new check still observes current source and
|
|
1346
|
+
configuration. A successful report is reused only for its exact input key.
|
|
1347
|
+
Within a running process, an owner whose analysis inputs are unchanged keeps
|
|
1348
|
+
its analysis and emitted module
|
|
1349
|
+
([caching](CACHING.md#owner-analysis-reuse)).
|
|
1350
|
+
|
|
1351
|
+
The analysis service bounds active project and revision state. It closes after
|
|
1352
|
+
idle time when no registered revision pins it. Direct library clients and
|
|
1353
|
+
syntax-only clients have their own short idle cleanup. A one-shot CLI command
|
|
1354
|
+
closes its clients when it has reported, so it exits without a wait for that
|
|
1355
|
+
idle period. When one scenario inspector closes, its requests are canceled and
|
|
1356
|
+
the shared compiler of other callers stays. Persisted registry metadata has
|
|
1357
|
+
separate content checks.
|
|
968
1358
|
|
|
969
1359
|
## On-demand visual evidence
|
|
970
1360
|
|
|
971
|
-
The capture unit is a registered, independently mountable scenario or one of
|
|
972
|
-
project-declared `captureTargets`.
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
does not claim proof of painted-edge alignment or inspect opaque artwork internals.
|
|
1041
|
-
|
|
1042
|
-
`src/construction-styles.cjs` runs the pure lockup and spatial transforms for both
|
|
1043
|
-
checking and the public Linaria resolver, including preview compilation. The lockup
|
|
1044
|
-
transform in `src/lockup-model.cjs` reads no files and needs no spatial model. Generated
|
|
1045
|
-
declarations retain their rule identity for shared CSS override protection.
|
|
1046
|
-
`src/lockup-composition.mjs` binds the declaration through the existing captured native
|
|
1047
|
-
AST/class-composition analysis. It adds no compiler, source capture, disk reads or
|
|
1048
|
-
persistent rule-local cache. Preview fingerprints include the transform modules;
|
|
1049
|
-
changes cannot reuse previously compiled output. Optical review remains separate
|
|
1050
|
-
from these source-only checks and benchmarks.
|
|
1051
|
-
|
|
1052
|
-
## Build checks keep the architecture in place
|
|
1053
|
-
|
|
1054
|
-
The project build runs ADS checks before producing application or showcase
|
|
1055
|
-
output. These checks enforce token use, source ownership, public imports,
|
|
1056
|
-
showcase coverage, component state boundaries, and separation of runtime code from development
|
|
1057
|
-
fixtures. Component-specific usage rules extend the shared checks when needed.
|
|
1058
|
-
|
|
1059
|
-
Themes and brands are declared in `ds.config.json` and are only value sets: every theme and
|
|
1060
|
-
brand shares the same token names. A theme sets the color mode and a brand sets identity
|
|
1061
|
-
values (an accent ramp, a font), so a white-label product needs one brand per customer
|
|
1062
|
-
rather than one theme per customer and mode. The declaration is the one list the showcase,
|
|
1063
|
-
captures, preview host context, contrast review, render audit and token export read, so a
|
|
1064
|
-
project can add a high-contrast theme or a brand without tool changes.
|
|
1065
|
-
|
|
1066
|
-
A token that differs per theme is authored as one plain half per theme (`--x-light`,
|
|
1067
|
-
`--x-dark`) on `:root`, and a brand re-sets its halves on `[data-brand]`. ADS generates
|
|
1068
|
-
`themes.generated.css` from them: each `[data-theme]` sets inherited switch properties,
|
|
1069
|
-
and each themed token resolves from its halves through those switches on every theme and
|
|
1070
|
-
brand anchor. Custom properties inherit and resolve where they are declared, so every
|
|
1071
|
-
element takes the halves of its nearest brand and the switch of its nearest theme, at any
|
|
1072
|
-
nesting depth and in any order, with plain CSS variables. The same switches give display
|
|
1073
|
-
switches (`--display-<theme>`, `--display-brand-<brand>`) for content that belongs to one
|
|
1074
|
-
theme or brand. Theme and brand selectors are not used, in tokens or components, because
|
|
1075
|
-
CSS resolves them by specificity and order, not by nearest ancestor.
|
|
1076
|
-
|
|
1077
|
-
Because every themed value is a plain half, ADS also resolves every color token for every
|
|
1078
|
-
theme and brand ahead of time into `themes.generated.ts`. Renderers that need colors as
|
|
1079
|
-
values (Canvas, WebGL, SVG graphs) look them up there for the element's nearest context,
|
|
1080
|
-
instead of asking the browser to normalize a color per drawn item.
|
|
1081
|
-
|
|
1082
|
-
ADS findings are errors, review items or info items. An error is a rule ADS can decide: it
|
|
1083
|
-
fails `ads check`, validation and acceptance, and no setting turns it off. Token, theme, brand,
|
|
1084
|
-
glyph and accessibility rules read from tokens and source are errors: contrast between the
|
|
1085
|
-
roles that meet on screen, declared component pairs and source-proven composed text/backdrop
|
|
1086
|
-
pairs, in every theme and
|
|
1087
|
-
brand, the 2 px spacing rhythm, fixed widths built from spacing tokens, theme and brand
|
|
1088
|
-
coverage, brand artwork that is undescribed, unlicensed or unpreviewed, glyphs off the
|
|
1089
|
-
shared viewBox or with fixed colors, controls padded off their size, target size, focus,
|
|
1090
|
-
text resize, reduced motion, text spacing, image alternatives and icon-only controls. A
|
|
1091
|
-
review item names something source analysis cannot settle (overlapping atomic declarations,
|
|
1092
|
-
equal token values with possibly different roles, keyboard reach, unused artwork, color reads
|
|
1093
|
-
in a render path); it is shown with guidance and never blocks. An info item notes an analysis
|
|
1094
|
-
limit. Stale or hand-edited generated outputs are errors, since they ship.
|
|
1095
|
-
|
|
1096
|
-
The [spatial check map](SPATIAL-CHECKS.md) records GC-01–GC-06 enforcement, supported
|
|
1097
|
-
construction boundaries and focused evidence, including per-call container ancestry,
|
|
1098
|
-
placement alternatives and protection of emitted geometry.
|
|
1099
|
-
|
|
1100
|
-
Fixed minima use the spatial scale, mini/fine units, standard control/icon dimensions or
|
|
1101
|
-
explicit `layout.widthTokens` roles; their resolved minimum must fit the spatial maximum.
|
|
1102
|
-
Projects without a spatial definition may use their shared spacing primitives. The checker
|
|
1103
|
-
follows private aliases and calculated expressions. Responsive, fractional and intrinsic
|
|
1104
|
-
sizing remain supported; maximum sizes can cap otherwise fixed dimensions. Validated
|
|
1105
|
-
`@ads-layout` fixed/hybrid tracks use their own local algebra. Declared fixed roles and
|
|
1106
|
-
`layout.fixedWidthUnits` owners remain visible as review findings. The browser
|
|
1107
|
-
audit adds what source cannot show: axe-core, non-text contrast of control borders and icons,
|
|
1108
|
-
image shape and horizontal overflow at 390, 768 and 1280 px, by resizing each rendered scenario. It
|
|
1109
|
-
also narrows components and patterns to a 240 px container: a set width above the browser review threshold of 96 px
|
|
1110
|
-
that overflows it is a review item, since whether a part ever sits in a pane takes judgement.
|
|
1111
|
-
|
|
1112
|
-
Audit previews retain the same subject framing and layout as showcase previews but disable
|
|
1113
|
-
the decorative grey surround and clipped canvas layer before mounting. The preview root
|
|
1114
|
-
therefore paints the project's theme/brand canvas directly, so axe and non-text contrast
|
|
1115
|
-
resolve the real ancestor background. Authored surfaces remain intact. Image shape uses
|
|
1116
|
-
untransformed CSS dimensions: explicit ratios respect `box-sizing`, while width/height
|
|
1117
|
-
attribute ratios compare the content box, excluding border and padding.
|
|
1118
|
-
|
|
1119
|
-
Each render waits, bounded, for its content to settle before anything is measured, and says so when it
|
|
1120
|
-
did not. The audit also renders what a scenario shows only after someone acts on it. It opens what
|
|
1121
|
-
`aria-haspopup` controls open, and hovers and focuses controls for contrast. Each worker lists what
|
|
1122
|
-
every render could measure, then assigns targets in request order, so which render measures a shared
|
|
1123
|
-
control does not depend on page speed. Its result states what it covered, and what it skipped is an
|
|
1124
|
-
info item per reason. `mcp.auditPages` (1–16, default 4) sets how many pages render at once.
|
|
1125
|
-
|
|
1126
|
-
The audit runs in both gates. Draft acceptance audits the draft owners' own UI
|
|
1127
|
-
scenarios unless `acceptance.audit` is false. `ads validate` always audits every
|
|
1128
|
-
scenario its change set reaches through imports: everything with scope `all`, and
|
|
1129
|
-
with scope `changed` what changed since the last successful full run (all scenarios
|
|
1130
|
-
after shared configuration, foundation or token changes). The cost of auditing what
|
|
1131
|
-
a change reaches grows with how widely the owner is used, so it runs once for a
|
|
1132
|
-
series of drafts, before a commit or release, rather than on every acceptance. A dry run's audit is remembered by candidate revision and selection,
|
|
1133
|
-
so accepting that revision does not render again.
|
|
1134
|
-
|
|
1135
|
-
Static errors split by what they stop. A preview session the audit starts renders despite policy
|
|
1136
|
-
errors, records no pass, and reports them with the audit's findings; the audit still exits non-zero.
|
|
1137
|
-
Only errors that stop rendering block it (source and CSS syntax, project structure, the styles entry,
|
|
1138
|
-
scenario contracts). `ads check`, `ads compile`, validation and acceptance stop on every error.
|
|
1139
|
-
|
|
1140
|
-
Fonts are read from `tokens/fonts.css` and `base.css`. `ads assets` generates a module naming the files
|
|
1141
|
-
the first text uses, importing each plainly so that Vite, Bun and the preview compiler give the
|
|
1142
|
-
stylesheet's URL. `ads check` holds declared faces against the weights CSS uses. ADS writes no HTML and
|
|
1143
|
-
touches no hosting: the module's list, tags and header value are for the project to place.
|
|
1361
|
+
The capture unit is a registered, independently mountable scenario, or one of
|
|
1362
|
+
its project-declared `captureTargets`. Capture uses the same real isolated
|
|
1363
|
+
frame, fixtures and adapter as interactive review, for components, patterns
|
|
1364
|
+
and mocks. It introduces no tool-owned component templates, styling or
|
|
1365
|
+
fixture inference, so shared controllers and hooks need a visible
|
|
1366
|
+
demonstration. [MCP.md](MCP.md#screenshots-and-candidate-comparison) and each
|
|
1367
|
+
portable skill's
|
|
1368
|
+
[capture reference](../skills/ads-designer/references/captures.md) describe
|
|
1369
|
+
usage.
|
|
1370
|
+
|
|
1371
|
+
- **Hosting.** ADS owns the isolated preview hosting, App readiness and the
|
|
1372
|
+
Playwright process, with its own Playwright. The capture host is the HTTP
|
|
1373
|
+
showcase with navigation hidden, which gives the isolated preview the
|
|
1374
|
+
requested viewport. Project runtime, fonts and styles stay inside the App
|
|
1375
|
+
resource graph, and the image excludes showcase chrome.
|
|
1376
|
+
- **On request only.** Captures exist only when requested. Acceptance and its
|
|
1377
|
+
dry run take no screenshots. With no registered scenarios, `ads_capture`
|
|
1378
|
+
returns `ok: false` with `{ status: "not-available", reason: "no-scenarios",
|
|
1379
|
+
message }`.
|
|
1380
|
+
- **Two slots.** A target has at most two slots, current and candidate, with
|
|
1381
|
+
no previous slot, history or TTL. Revisions and settings are metadata, not
|
|
1382
|
+
new resource identities. A new scenario has no fabricated baseline. Stale
|
|
1383
|
+
source is identified explicitly, and deleted targets are collected. PNG,
|
|
1384
|
+
pixel and store limits and explicit clearing bound the generated storage.
|
|
1385
|
+
- **Publication.** Final freshness and conflict checks precede image
|
|
1386
|
+
publication. The pair is published as one atomic generated record under
|
|
1387
|
+
`.ds/captures/`, outside source ownership and product bundles.
|
|
1388
|
+
- **Resources.** One MCP capture index and a PNG resource template expose
|
|
1389
|
+
stable image slots. Subscriptions receive resource updates when images change
|
|
1390
|
+
or disappear.
|
|
1391
|
+
|
|
1392
|
+
These images are visual evidence for one state, not passing behavioral
|
|
1393
|
+
guarantees.
|
|
1394
|
+
|
|
1395
|
+
## Checks keep the architecture in place
|
|
1396
|
+
|
|
1397
|
+
The project build runs `ads check` before it produces application output. One
|
|
1398
|
+
check of the captured revision covers:
|
|
1399
|
+
|
|
1400
|
+
- The structure of the design system: the barrel and `foundation.ads.ts`.
|
|
1401
|
+
- The design-system import closure.
|
|
1402
|
+
- Mock ownership.
|
|
1403
|
+
- Owner analysis of everything the barrel reaches.
|
|
1404
|
+
- The declared themes and brands.
|
|
1405
|
+
- The generated palette.
|
|
1406
|
+
- The integrity of the emitted output folder against its contract.
|
|
1407
|
+
|
|
1408
|
+
Every owner is analyzed, so one check reports each failing owner. An owner that
|
|
1409
|
+
depends on the grid rows of a failed owner is reported as blocked; it is not
|
|
1410
|
+
analyzed against unknown rows. Each owner-analysis failure carries a
|
|
1411
|
+
fine-grained code, its mistake group, a repair hint and the authored position.
|
|
1412
|
+
The repair plan orders the failures by group.
|
|
1413
|
+
[ADS.md](ADS.md#design-system-checks-and-emission) defines the contract.
|
|
1414
|
+
|
|
1415
|
+
### Findings
|
|
1416
|
+
|
|
1417
|
+
ADS findings are errors, review items or info items
|
|
1418
|
+
([finding kinds](ADS.md#finding-kinds)):
|
|
1419
|
+
|
|
1420
|
+
- An **error** is a rule ADS can decide. It fails `ads check`, validation and
|
|
1421
|
+
acceptance, and no setting turns it off.
|
|
1422
|
+
- A **review item** names something analysis cannot settle, such as a scroll
|
|
1423
|
+
container nothing focuses or truncated text without a `title`. It is shown
|
|
1424
|
+
with guidance and never blocks.
|
|
1425
|
+
- An **info item** notes an analysis limit or a blocked owner.
|
|
1426
|
+
|
|
1427
|
+
A stale `palette.generated.ts` and hand-edited emitted output are errors, since
|
|
1428
|
+
they ship. Output emitted from an earlier source revision is a
|
|
1429
|
+
`generated-stale` info item, since the next emit refreshes it.
|
|
1144
1430
|
|
|
1145
1431
|
Static checks establish the policies and source formats they cover. Behavior
|
|
1146
1432
|
tests and browser review verify the resulting accessibility, layout, themes,
|
|
1147
|
-
states
|
|
1148
|
-
|
|
1149
|
-
The
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1433
|
+
states and motion. Both support agent-driven iteration.
|
|
1434
|
+
|
|
1435
|
+
### The browser render audit
|
|
1436
|
+
|
|
1437
|
+
The render audit adds what source cannot show. It also measures what the static
|
|
1438
|
+
composed check only reviews: unanalyzed wrappers, user-agent paint, opacity and
|
|
1439
|
+
scenario data. The [guide](GUIDE.md#checks-and-guards) lists each measurement
|
|
1440
|
+
and its exemptions.
|
|
1441
|
+
|
|
1442
|
+
- The audit page sets `__ADS_RENDER_AUDIT__` before the preview loads. The
|
|
1443
|
+
scenario page then mounts the specimens as the preview root's own content
|
|
1444
|
+
(`mountBare`, `showcase-client/scenario-page.mts`), with no showcase
|
|
1445
|
+
component around them; a lone subject fills the preview. Each named state is
|
|
1446
|
+
its own render: the audit page names the state before the preview loads
|
|
1447
|
+
(`__ADS_SCENARIO_STATE__`), and findings are built for each state's runs and
|
|
1448
|
+
merged (`findingsByState`, `src/render-audit.mts`).
|
|
1449
|
+
- It runs axe-core and measures non-text contrast of control borders and icons,
|
|
1450
|
+
image shape, layout shift and horizontal overflow at 390, 768 and 1280 px, by
|
|
1451
|
+
resizing each rendered scenario in every declared brand and theme.
|
|
1452
|
+
- Once per scenario it runs the [text passes](#text-passes).
|
|
1453
|
+
- It narrows components and patterns to a 240 px container. A set width above
|
|
1454
|
+
the browser review threshold of 96 px that overflows it is a review item.
|
|
1455
|
+
- Audit previews keep the subject framing and layout of showcase previews and
|
|
1456
|
+
disable the decorative surround, so axe and non-text contrast resolve the
|
|
1457
|
+
real ancestor background.
|
|
1458
|
+
- Image shape uses untransformed CSS dimensions: explicit ratios respect
|
|
1459
|
+
`box-sizing`, and width/height attribute ratios compare the content box.
|
|
1460
|
+
- Each render waits, bounded, for its content to settle, and the audit also
|
|
1461
|
+
renders interaction states (opened `aria-haspopup` overlays, hovered and
|
|
1462
|
+
focused controls).
|
|
1463
|
+
- Each worker lists what every render could measure, then assigns targets in
|
|
1464
|
+
request order, so which render measures a shared control does not depend on
|
|
1465
|
+
page speed.
|
|
1466
|
+
- The result states what was covered; what was skipped is an info item per
|
|
1467
|
+
reason.
|
|
1468
|
+
- `mcp.auditPages` (1–16, default 4) sets how many pages render at once.
|
|
1469
|
+
|
|
1470
|
+
**When it runs.** The audit runs in both gates
|
|
1471
|
+
([stages](ADS.md#validation-and-acceptance-stages)): draft acceptance audits
|
|
1472
|
+
the draft owners' own UI scenarios, and `ads validate` audits every scenario
|
|
1473
|
+
its change set reaches through imports. With scope `changed` that is what
|
|
1474
|
+
changed since the last successful full run, and all scenarios after shared
|
|
1475
|
+
configuration, foundation or token changes. A dry run's audit is remembered by
|
|
1476
|
+
candidate revision and selection, so acceptance of that revision does not
|
|
1477
|
+
render again. An audit with nothing to render is not-available, never
|
|
1478
|
+
established.
|
|
1479
|
+
|
|
1480
|
+
Previews hold only a revision that passes `ads check`. So every static error
|
|
1481
|
+
stops the audit before it renders, as it stops `ads check`, `ads compile`,
|
|
1482
|
+
validation and acceptance. Review and info items never stop it: the audit
|
|
1483
|
+
renders and reports its own findings beside them.
|
|
1484
|
+
|
|
1485
|
+
#### Text passes
|
|
1486
|
+
|
|
1487
|
+
The text passes cover WCAG 2.2 1.4.4, 1.4.10 and 1.4.12. No static rule
|
|
1488
|
+
replaces them. 1.4.12 asks that content survives the reader's spacing
|
|
1489
|
+
overrides, not that tokens carry particular values, so there is no token-name
|
|
1490
|
+
rule for it. `a11y-text-resize` proves only that text sizes follow the root,
|
|
1491
|
+
not that the layout around them keeps up. The
|
|
1492
|
+
[guide](GUIDE.md#checks-and-guards) states the override values, the viewport
|
|
1493
|
+
sizes and what each finding kind means.
|
|
1494
|
+
|
|
1495
|
+
The passes extend the layout check the worker already runs:
|
|
1496
|
+
`src/render-audit/worker.mts` calls `layoutOverflow` from
|
|
1497
|
+
`src/render-audit/layout-overflow.page.mts` at each of `overflowWidths`. Their
|
|
1498
|
+
orchestration is `src/render-audit/text-scale.mts`; the overrides are in
|
|
1499
|
+
`src/render-audit/text-scale.page.mts`.
|
|
1500
|
+
|
|
1501
|
+
1. One render per scenario runs them: the first theme and brand
|
|
1502
|
+
(`AuditApp.text`), since text does not follow colour. Its ordinary
|
|
1503
|
+
measurement at each width also measures block-axis fit
|
|
1504
|
+
(`layoutOverflow({ fit: true })`), the passes' baseline. Only its horizontal
|
|
1505
|
+
part is kept for `layout-overflow`.
|
|
1506
|
+
2. At each width, before the next resize, the worker adds one override style
|
|
1507
|
+
(`font`, then `spacing`) as the document's last, `!important` standing in
|
|
1508
|
+
for the reader's stylesheet, measures, and removes it.
|
|
1509
|
+
3. The viewport passes (`reflow`, then `zoom` to `textWidths.zoom`) resize the
|
|
1510
|
+
same page. Zoom scales px and rem alike, so layout there is the zoomed
|
|
1511
|
+
layout. The page returns to the widest width before the interaction states
|
|
1512
|
+
run.
|
|
1513
|
+
4. `layoutOverflow`'s settling wait also follows heights under `fit`, which an
|
|
1514
|
+
override changes without changing a width. Fit adds the kinds
|
|
1515
|
+
`block-clipped`, `spilled`, `overlap` and `focus-clipped` over the same
|
|
1516
|
+
exemptions. Each counts past a tolerance of a quarter of the element's font
|
|
1517
|
+
size (at least 2 px), what a tight line height already lets a glyph out.
|
|
1518
|
+
For `focus-clipped`, only controls within 16 px of a clip edge are focused,
|
|
1519
|
+
at most twice the node limit, with focus restored.
|
|
1520
|
+
5. `freshIssues` keeps only what rest does not show, by kind and selector. An
|
|
1521
|
+
override is compared against the same width. A viewport pass is compared
|
|
1522
|
+
against horizontal overflow at every width (already a `layout-overflow`
|
|
1523
|
+
finding) and fit at the widest width (the page before it was zoomed).
|
|
1524
|
+
6. `AuditRun.textScale` carries `{ pass, width, issues, counts }`.
|
|
1525
|
+
`textScaleFindings` groups them per scenario, pass, kind and element set
|
|
1526
|
+
across widths, through the same grouping as `layoutOverflowFindings`.
|
|
1527
|
+
|
|
1528
|
+
`font` and `zoom` are `a11y-text-scale`, `spacing` is
|
|
1529
|
+
`a11y-text-spacing-override` and `reflow` is `a11y-reflow`: errors with the
|
|
1530
|
+
WCAG criterion, registered in `src/finding-rules.mts` and catalogued in
|
|
1531
|
+
`src/ads-errors.mts`.
|
|
1532
|
+
|
|
1533
|
+
### Validation
|
|
1534
|
+
|
|
1535
|
+
The CLI `ads validate` and MCP `ads_validate` share one audit engine. It
|
|
1536
|
+
combines `ads check`, the configured project lint/check scripts, the registered
|
|
1537
|
+
behavior checks and the render audit.
|
|
1538
|
+
|
|
1539
|
+
- A stage with nothing to run is skipped with a not-available status and a
|
|
1540
|
+
reason code. It is never reported as passed.
|
|
1541
|
+
- A full audit establishes a content baseline. Only a successful full audit
|
|
1542
|
+
against unchanged source advances it.
|
|
1543
|
+
- A changed audit selects the affected behavior owners from that baseline.
|
|
1544
|
+
Broad or unclassified changes expand to full.
|
|
1545
|
+
- Opaque project commands keep their declared scope.
|
|
1546
|
+
- The baseline works without Git history and caches no individual test result.
|
|
1547
|
+
|
|
1548
|
+
Skills guide agents toward affected checks during editing, and toward full
|
|
1549
|
+
audits after ownership or runner migrations, before releases and for explicit
|
|
1550
|
+
complete validation.
|
|
1551
|
+
|
|
1552
|
+
**Freshness.** Freshness follows only the design-system project: the `dsDir`
|
|
1553
|
+
tree with its local import and asset dependencies and tests, and the
|
|
1554
|
+
configuration around it. [Input sets](#input-sets) defines the sets, their
|
|
1555
|
+
widening and their fences.
|
|
1556
|
+
|
|
1557
|
+
**Changed-scope selection.** Changed-scope validation follows shared source
|
|
1558
|
+
trees and native import resolution. Its successful full baseline also keeps
|
|
1559
|
+
plain dependency closures, so later selection includes consumers from both the
|
|
1560
|
+
previous and current revisions. Deleted inputs without previous evidence,
|
|
1561
|
+
unknown ownership, computed imports and shared configuration widen selection
|
|
1562
|
+
conservatively. Selection decides what to audit; it does not replace browser
|
|
1563
|
+
evidence or grant a passing result.
|
|
1564
|
+
|
|
1565
|
+
**Execution coordination.** MCP executions share a process-wide exclusive lease
|
|
1566
|
+
that spans checks, guarded mutations, child cleanup and durable result
|
|
1567
|
+
publication. A conflicting request gets a structured `ADS_VALIDATION_LOCKED`
|
|
1568
|
+
response, while Explorer and preview serving keep their independent lane. A
|
|
1569
|
+
relevant source edit aborts a working-tree run early, and such a run cannot
|
|
1570
|
+
publish a successful baseline. A small run journal supports crash recovery, and
|
|
1571
|
+
immutable run results and exact-run investigations survive reconnects and later
|
|
1572
|
+
runs under bounded retention. See
|
|
1164
1573
|
[execution coordination](MCP.md#shared-process-execution-coordination).
|
|
1165
1574
|
|
|
1166
|
-
|
|
1167
|
-
This works without Git history and does not cache individual test results. Skills
|
|
1168
|
-
guide agents toward affected checks during editing and full audits after ownership
|
|
1169
|
-
or runner migrations, before releases and for explicit complete validation.
|
|
1170
|
-
|
|
1171
|
-
Freshness follows the design system and consuming UI, their local import/asset
|
|
1172
|
-
dependencies, registered build and guard configuration, and project test inputs.
|
|
1173
|
-
Unrelated backend, native-toolchain and documentation edits do not invalidate an
|
|
1174
|
-
ADS candidate. Opaque commands declare additional files or directories through
|
|
1175
|
-
`validation.inputs`; these declarations add to the mandatory scope. Guarded edits
|
|
1176
|
-
also fence every patched file and both sides of a configuration change. Candidate
|
|
1177
|
-
commands still cannot rewrite source while checking it.
|
|
1178
|
-
|
|
1179
|
-
Tests follow the same ownership boundaries as implementation: pure ADS tests stay
|
|
1180
|
-
with their owners, marked behavior specs require registration, and private imports
|
|
1181
|
-
cannot cross owners through helpers. Application integration tests stay with their
|
|
1182
|
-
application subject. Static guards enforce these boundaries without claiming to
|
|
1183
|
-
infer arbitrary assertion intent. Operational details live in the
|
|
1184
|
-
[validation guide](../skills/ads-designer/references/validation.md).
|
|
1575
|
+
### Semantic analysis
|
|
1185
1576
|
|
|
1186
|
-
|
|
1577
|
+
ADS semantic analysis uses its own pinned TypeScript 7.1 beta asynchronous
|
|
1578
|
+
native API from Bun. Analysis, orchestration and preview compilation all run on
|
|
1579
|
+
Bun. There is one compiler implementation.
|
|
1187
1580
|
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
Prompts and packaged skills explain how to reason through Data, UX and Skin and
|
|
1192
|
-
how to inspect the real implementation before changing it.
|
|
1193
|
-
|
|
1194
|
-
The MCP runtime owns its browser hosts and preview builder lifetime. Closing the
|
|
1195
|
-
client connection releases them together; a separate ownership guard can stop
|
|
1196
|
-
detached builders after abrupt owner death. A preview process must not outlive
|
|
1197
|
-
its owner and continue publishing stale output.
|
|
1198
|
-
HTTP request instances share a source observer instead of initializing another
|
|
1199
|
-
source/build inspection for each resource read. Immutable resources retain byte
|
|
1200
|
-
integrity checks; status, build and validation requests still establish freshness.
|
|
1201
|
-
Build reports expose queued, validation, compilation and publication progress.
|
|
1202
|
-
A timed-out preview request marks the builder stalled; the next explicit request
|
|
1203
|
-
restarts it within the same MCP session. A running process alone is not freshness.
|
|
1204
|
-
|
|
1205
|
-
Opt-in MCP editing makes validation part of the write operation. The agent edits a
|
|
1206
|
-
draft of one or more owners (file contents or a Git unified diff) and accepts it. ADS
|
|
1207
|
-
resolves file ownership, takes the draft's files as they are and validates a
|
|
1208
|
-
temporary project copy with architecture checks and configured project
|
|
1209
|
-
lint/validation scripts.
|
|
1210
|
-
The temporary copy contains the relevant input graph and patched files, with room
|
|
1211
|
-
for 100,000 files / 2 GiB. Unrelated native artifacts are not copied. Declared extra
|
|
1212
|
-
inputs support project commands that read data outside the UI graph. When
|
|
1213
|
-
`acceptance.behavior` is true (the default), the draft owners' own registered behavior
|
|
1214
|
-
checks run in the isolated candidate project; the consumers of a changed shared
|
|
1215
|
-
controller run in `ads validate`.
|
|
1216
|
-
Architecture batch checks from the CLI and CI use the internal pinned Turbo runner
|
|
1217
|
-
and its installed platform binary; no global Turbo or runtime dependency installer is
|
|
1218
|
-
invoked. A task miss invokes the same asynchronous native analysis service.
|
|
1219
|
-
The MCP server, its preview compiler and registered candidates use warm checks
|
|
1220
|
-
(`check-service.mjs`) backed by that service. Native snapshots reuse unchanged
|
|
1221
|
-
ASTs and query results; an exact input-key repeat can return a remembered passing
|
|
1222
|
-
report. Local artifact
|
|
1223
|
-
reuse is enabled by default and fenced by current input/tool/runtime/Git state;
|
|
1224
|
-
gate results, browser evidence, locks and baselines are never task outputs.
|
|
1225
|
-
Project scripts remain uncached without a known deterministic contract. The warm
|
|
1226
|
-
Bun preview compiler retains its module cache; complete verified graph restoration
|
|
1227
|
-
publishes fresh build-session evidence without semantic rediscovery. See
|
|
1228
|
-
[cache controls and CI wiring](CACHING.md).
|
|
1229
|
-
|
|
1230
|
-
`acceptance.scripts` and `validation.scripts` explicitly select project scripts; no
|
|
1231
|
-
names are inferred, and `ads validate` runs both lists, so each script is listed
|
|
1232
|
-
once. Direct edits invoke `ads validate --changed`; draft acceptance records no
|
|
1233
|
-
baseline, so its owner-scoped evidence never satisfies a complete validation. The project owns its test code and runner policy;
|
|
1234
|
-
ADS owns affected-check selection, candidate hosting, progress, evidence freshness
|
|
1235
|
-
and process cleanup. One profile timeout bounds its entire runner process. Parallel
|
|
1236
|
-
workers can share that candidate host with independent App state. Partial outcomes
|
|
1237
|
-
remain diagnostic when execution is interrupted; they cannot approve a mutation.
|
|
1238
|
-
Passing checks describe their registered assertions, not every natural-language claim.
|
|
1239
|
-
Results distinguish architecture, project-build, transport, runner and assertion
|
|
1240
|
-
boundaries with structured phase/code evidence; an unclassified test exception
|
|
1241
|
-
does not become an assertion or a component defect. Acceptance explicitly lists
|
|
1242
|
-
established and unverified scope. Verification retains one latest investigation
|
|
1243
|
-
per registered check, including isolated candidates: exact input revision,
|
|
1244
|
-
observed preview revision, failing step/source, observed startup viewport,
|
|
1245
|
-
failed requests and available project-recorded artifacts. MCP exposes bounded
|
|
1246
|
-
bundle/index resources and only registered, digest-checked artifact files.
|
|
1247
|
-
Another run replaces that check's resource access; candidate evidence never
|
|
1248
|
-
certifies live source. Detailed usage lives in the portable skill-local
|
|
1249
|
-
[evidence guide](../skills/ads-designer/references/evidence.md).
|
|
1581
|
+
Registered application commands keep their explicit runtimes. Generated
|
|
1582
|
+
applications keep their own TypeScript dependency and their own `tsc`. ADS's
|
|
1583
|
+
compiler is a separate nested package when necessary.
|
|
1250
1584
|
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
`
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
changes
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1585
|
+
#### The analysis host
|
|
1586
|
+
|
|
1587
|
+
`src/analysis/service.mts` is the shared asynchronous entry point for
|
|
1588
|
+
acceptance, checks and emission, scenario discovery, behavior planning and
|
|
1589
|
+
audit selection.
|
|
1590
|
+
|
|
1591
|
+
- Each calling ADS process shares a Bun child host with plain-data IPC.
|
|
1592
|
+
- The host serializes analysis requests and owns bounded native project
|
|
1593
|
+
sessions.
|
|
1594
|
+
- One job is an inspection, check or selection request. A job can inspect many
|
|
1595
|
+
files.
|
|
1596
|
+
- Independent native queries inside a job can share pending promises and be
|
|
1597
|
+
batched.
|
|
1598
|
+
- Rendering and registered test commands execute outside this service.
|
|
1599
|
+
|
|
1600
|
+
Library inspection APIs are asynchronous and use the same native session
|
|
1601
|
+
implementation. Callers await `checkProject`, behavior inspection and import
|
|
1602
|
+
resolution. Direct library callers acquire a context through
|
|
1603
|
+
`analysis/standalone.mts`; they do not select a different engine. Syntax-only
|
|
1604
|
+
work uses the bounded source-file leases of the native API.
|
|
1605
|
+
|
|
1606
|
+
#### Snapshots, drafts and acceptance
|
|
1607
|
+
|
|
1608
|
+
Each project keeps an immutable live snapshot. Drafts branch from it with file
|
|
1609
|
+
deltas.
|
|
1610
|
+
|
|
1611
|
+
- Acceptance promotes the checked revision. Rejection releases it.
|
|
1612
|
+
- Sibling drafts cannot alter each other. A changed live generation prevents
|
|
1613
|
+
stale promotion.
|
|
1614
|
+
- Project input bytes are captured during the validation inventory read.
|
|
1615
|
+
- Imported dependencies, missing resolution targets, configuration and package
|
|
1616
|
+
changes invalidate the compiler state.
|
|
1617
|
+
- Content fences are required around operations that can overlap filesystem
|
|
1618
|
+
edits. Timestamps alone never establish freshness.
|
|
1619
|
+
- The beta compiler has an unsafe program-removal operation. ADS avoids it with
|
|
1620
|
+
bounded snapshot compaction within the same compiler process.
|
|
1621
|
+
|
|
1622
|
+
Relocated AST wrappers belong to a live project or to one draft, not to a
|
|
1623
|
+
global map of draft paths. Unchanged live trees keep their identity across
|
|
1624
|
+
revisions. The release of a draft releases its wrapper cache. Promotion creates
|
|
1625
|
+
live paths and does not mutate trees already returned to draft callers.
|
|
1626
|
+
|
|
1627
|
+
Production acceptance registers the file delta of the candidate against its
|
|
1628
|
+
live project before the check. The check, owner analysis and affected selection
|
|
1629
|
+
use that branch through the shared analysis service. Successful source
|
|
1630
|
+
publication promotes the checked snapshot. Rejected, abandoned and temporary
|
|
1631
|
+
branches are released. Configured scripts and browser evidence are separate
|
|
1632
|
+
acceptance stages with their own source-freshness requirements.
|
|
1633
|
+
|
|
1634
|
+
#### Captured inputs
|
|
1635
|
+
|
|
1636
|
+
Rules read the captured revision, never the live filesystem.
|
|
1637
|
+
|
|
1638
|
+
- Import resolution, with fixed compiler options, shares normalized specifiers
|
|
1639
|
+
by importing directory, including pending queries from sibling files. Its
|
|
1640
|
+
cache belongs to the current inventory or request. A new capture resolves
|
|
1641
|
+
against current package and configuration bytes and cannot inherit an earlier
|
|
1642
|
+
resolution by path alone.
|
|
1643
|
+
- Input capture shares compiler options and the import resolver with
|
|
1644
|
+
configuration discovery. `analysis/module-resolvers.mts` owns the native
|
|
1645
|
+
resolver leases for that capture, including pending queries. Cleanup drains
|
|
1646
|
+
them on success or failure. The syntax client stays alive until the capture
|
|
1647
|
+
releases its leases. No resolver that observes the live filesystem survives
|
|
1648
|
+
into the next capture.
|
|
1649
|
+
- Warm checks collect compiler source bytes while they compute the task input
|
|
1650
|
+
key, and pass them through `analyzeCaptured`. Registered draft branches stay
|
|
1651
|
+
authoritative. The independent post-check input capture still verifies
|
|
1652
|
+
freshness before the report is cached.
|
|
1653
|
+
- Draft preparation shares one inventory between inspection and workspace
|
|
1654
|
+
population, and keeps its targeted live conflict and path checks.
|
|
1655
|
+
- Optional inputs and immediate directory membership use `optionalSourceText`
|
|
1656
|
+
and `sourceDirectoryFiles`. Both observe the captured revision, including
|
|
1657
|
+
absence.
|
|
1658
|
+
- `sourceCss` shares read-only PostCSS trees across requests on the same
|
|
1659
|
+
captured revision. Transforms clone a tree before they modify it.
|
|
1660
|
+
- The pure grid model (`spatial-model.mts`, with `spatial-css.mts`) does no
|
|
1661
|
+
filesystem I/O. Owner analysis binds its facts through the captured native
|
|
1662
|
+
AST.
|
|
1663
|
+
|
|
1664
|
+
The spatial model borrows concepts from IBM Carbon's 2x Grid, and spacing
|
|
1665
|
+
borrows Adobe Spectrum's non-uniform scale. The
|
|
1666
|
+
[design references](DESIGN-REFERENCES.md) record what was adopted. Carbon's
|
|
1667
|
+
Sass and React grid packages are not dependencies.
|
|
1668
|
+
|
|
1669
|
+
#### Rules for rule code
|
|
1670
|
+
|
|
1671
|
+
[AGENTS.md](../AGENTS.md#extending-analysis-and-guards) states the rules for
|
|
1672
|
+
rule code and names the helpers: `analysis/helpers.mts` (`sourceAst`,
|
|
1673
|
+
`sourceText`, `symbolAt`, `valueSymbolAt`, `localValueDeclarations`, `walk`,
|
|
1674
|
+
`findNode`, `nodesOfKind`, `memoFact`, `memoProgram`), `cachedProgram`,
|
|
1675
|
+
`importResolver`, and `analysis/queries.mts` with `walkValuesAsync` and
|
|
1676
|
+
`walkAsync`. The reasons:
|
|
1677
|
+
|
|
1678
|
+
- A rule creates no compiler program, native client, path-keyed semantic cache
|
|
1679
|
+
or independent AST parser, so every rule reads the one captured revision. A
|
|
1680
|
+
boundary test prevents rule modules from constructing programs or importing
|
|
1681
|
+
native transports.
|
|
1682
|
+
- `memoFact` lives for one fenced request. `memoProgram` is only for facts
|
|
1683
|
+
determined by an immutable program/tree or captured revision, with weak
|
|
1684
|
+
ownership. A rule returns copies when it exposes cached mutable results.
|
|
1685
|
+
- `analysis/queries.mts` shares pending promises and batches independent
|
|
1686
|
+
symbol/type queries. Its ordered async helpers keep short-circuit checks and
|
|
1687
|
+
diagnostic order deterministic. Ordinary syntax predicates stay synchronous.
|
|
1688
|
+
- Named subjects resolve through `localValueDeclarations`, because enumerating
|
|
1689
|
+
all symbols in scope can load the compiler libraries and exhaust memory.
|
|
1690
|
+
|
|
1691
|
+
#### Verification and benchmarks
|
|
1692
|
+
|
|
1693
|
+
`bun run test:analysis` verifies native analysis, cache invalidation,
|
|
1694
|
+
production draft acceptance and compilation, without browser rendering or
|
|
1695
|
+
registered behavior execution. The
|
|
1696
|
+
[analysis benchmark](../scripts/benchmarks/analysis/README.md) measures the
|
|
1697
|
+
engine the same way: input capture, branching, checks and publication, without
|
|
1698
|
+
browser work. [AGENTS.md](../AGENTS.md#mandatory-analysis-benchmarks) states
|
|
1699
|
+
when it is required.
|
|
1700
|
+
|
|
1701
|
+
## MCP makes the project ADS available to agents
|
|
1702
|
+
|
|
1703
|
+
The stdio server exposes the same checks as the CLI, alongside the project's
|
|
1704
|
+
public entry, units and source guides. Bounded tools establish what exists.
|
|
1705
|
+
Explicit resource reads provide detail. Prompts and packaged skills explain how
|
|
1706
|
+
to inspect the real implementation before a change.
|
|
1288
1707
|
|
|
1289
1708
|
The architecture makes that inspection practical. A public export has an owning
|
|
1290
|
-
source and
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1709
|
+
source. Profiles and token sheets expose its visual vocabulary. Local guides
|
|
1710
|
+
explain contracts when present. An agent can discover a small set of relevant
|
|
1711
|
+
entities, read their source and mount a real scenario with its fixture context.
|
|
1712
|
+
Humans can exercise the same entry in the showcase. Inspection therefore stays
|
|
1713
|
+
connected to the implementation that reaches the application.
|
|
1295
1714
|
|
|
1296
1715
|
MCP provides a progressive interface to those sources: structured listings,
|
|
1297
1716
|
explicit detail reads, selectable workflows and rendered Apps where supported.
|
|
1298
1717
|
Reported revisions and diagnostics make preview freshness inspectable after a
|
|
1299
1718
|
change. Reading source, compiling it and interacting with it are separate forms
|
|
1300
|
-
of evidence
|
|
1301
|
-
correctness. Text
|
|
1719
|
+
of evidence. Source checks and metadata cannot establish visual or behavioral
|
|
1720
|
+
correctness. Text and resource access and the normal showcase keep the workflow
|
|
1302
1721
|
usable when a client lacks experimental presentation capabilities.
|
|
1303
1722
|
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
The
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1723
|
+
The [MCP guide](MCP.md) holds concrete setup and compatibility evidence.
|
|
1724
|
+
|
|
1725
|
+
### Skills
|
|
1726
|
+
|
|
1727
|
+
Skills ship in the package and are served as an immutable snapshot, each file
|
|
1728
|
+
under `skill://ads/<name>/`, with each digest computed from the bytes served.
|
|
1729
|
+
ADS serves content; verification, approval and activation belong to the host.
|
|
1730
|
+
[MCP.md](MCP.md#skills) states what each protocol version gets.
|
|
1731
|
+
|
|
1732
|
+
### Token inventory and public catalogue
|
|
1733
|
+
|
|
1734
|
+
The token inventory and the public catalogue have one implementation,
|
|
1735
|
+
`src/inventories.mts`, behind every surface: `ads tokens`, `ads_tokens`,
|
|
1736
|
+
`ads_catalog`, `ads://project/tokens`, `/tokens/dtcg` and `/catalog`, and the
|
|
1737
|
+
library's `inspectTokens`, `exportTokensDtcg` and `inspectCatalog`.
|
|
1738
|
+
|
|
1739
|
+
The analysis worker runs it as the `tokens`, `tokens-dtcg` and `catalog`
|
|
1740
|
+
operations on one captured revision. `token-summary` returns the token total
|
|
1741
|
+
and the groups the explorer's token category counts, from the design inputs
|
|
1742
|
+
alone. Nothing in them reads the disk.
|
|
1743
|
+
|
|
1744
|
+
**The catalogue** (`src/public-catalog.mts`) reads:
|
|
1745
|
+
|
|
1746
|
+
- The barrel's named exports through the scenario program (`publicApi` in
|
|
1747
|
+
`src/owner-scenarios.mts`), classified by the same API role that scenario
|
|
1748
|
+
`covers` and `exercises` use, with each export's signature printed by the
|
|
1749
|
+
checker (`src/api-signature.mts`).
|
|
1750
|
+
- The scenario registry and the public owners (`publicExports`).
|
|
1751
|
+
- The revision's owner analysis (`ownerRevision`, memoized on the revision and
|
|
1752
|
+
shared with `ads check`).
|
|
1753
|
+
|
|
1754
|
+
Each analyzed owner keeps its design (`src/owner-design.mts`): the profile
|
|
1755
|
+
selections its constructions' lowering read (`Lowered.profiles`, recorded by
|
|
1756
|
+
the profile access in `src/construction-output.mts`). So the catalogue reports
|
|
1757
|
+
what the owner renders, slot profiles included, not what its source mentions.
|
|
1758
|
+
|
|
1759
|
+
**The token inventory** (`src/token-inventory.mts`) reads the revision's
|
|
1760
|
+
foundation from the content-keyed design inputs:
|
|
1761
|
+
|
|
1762
|
+
- Values per context from `tokenDefinitionContexts`.
|
|
1763
|
+
- Declarations from the parsed sheets.
|
|
1764
|
+
- Profile bindings from the resolved profiles.
|
|
1765
|
+
- Value-shape status from the token checks, reused per foundation.
|
|
1766
|
+
- Owner reach from each analyzed owner's lowered constructions, followed
|
|
1767
|
+
through token references.
|
|
1768
|
+
|
|
1769
|
+
The DTCG export (`src/token-dtcg.mts`) is a pure, key-sorted function of the
|
|
1770
|
+
inventory. Paging and queries are shared (`src/inventory-query.mts`). The MCP
|
|
1771
|
+
view adds source and guide URIs, units and draft annotations. An empty
|
|
1772
|
+
inventory is `not-available`, never an empty match; design inputs that do not
|
|
1773
|
+
read are an error.
|
|
1774
|
+
|
|
1775
|
+
### Runtime lifetime
|
|
1776
|
+
|
|
1777
|
+
The MCP runtime owns its browser hosts and the lifetime of its preview builder.
|
|
1778
|
+
|
|
1779
|
+
- When the client connection closes, they are released together. A separate
|
|
1780
|
+
ownership guard can stop detached builders after abrupt owner death. A
|
|
1781
|
+
preview process must not outlive its owner and continue to publish stale
|
|
1782
|
+
output.
|
|
1783
|
+
- HTTP request instances share a source observer. They do not initialize
|
|
1784
|
+
another source/build inspection for each resource read.
|
|
1785
|
+
- Immutable resources keep byte integrity checks. Status, build and validation
|
|
1786
|
+
requests still establish freshness.
|
|
1787
|
+
- Build reports expose queued, validation, compilation and publication
|
|
1788
|
+
progress.
|
|
1789
|
+
- A timed-out preview request marks the builder stalled. The next explicit
|
|
1790
|
+
request restarts it within the same MCP session. A running process alone is
|
|
1791
|
+
not freshness.
|
|
1792
|
+
|
|
1793
|
+
### Guarded editing
|
|
1794
|
+
|
|
1795
|
+
Opt-in MCP editing makes validation part of the write operation
|
|
1796
|
+
([MCP](MCP.md#guarded-editing)). The agent edits a draft of one or more owners
|
|
1797
|
+
(file contents or a Git unified diff) and accepts it. ADS resolves file
|
|
1798
|
+
ownership, takes the draft's files as they are, and validates a temporary
|
|
1799
|
+
project copy with `ads check` and the configured project lint/validation
|
|
1800
|
+
scripts.
|
|
1801
|
+
|
|
1802
|
+
- The copy contains the relevant input graph and the patched files, within
|
|
1803
|
+
bounds. Unrelated native artifacts are not copied. Declared extra inputs
|
|
1804
|
+
support project commands that read data outside the UI graph.
|
|
1805
|
+
- When `acceptance.behavior` is true (the default), the draft owners' own
|
|
1806
|
+
registered behavior checks run in the isolated candidate project. The
|
|
1807
|
+
consumers of a changed shared controller run in `ads validate`.
|
|
1808
|
+
|
|
1809
|
+
**Edit units.** Edits stay focused without entire file bodies in model context.
|
|
1810
|
+
Peer units and unrelated owners stay outside the selected unit's edit boundary.
|
|
1811
|
+
|
|
1812
|
+
- The foundation (the public barrel and `foundation.ads.ts`), the token sheets,
|
|
1813
|
+
asset groups, guides, documentation (shared credits and license notices) and
|
|
1814
|
+
configuration (project configuration, registered guards and compiler
|
|
1815
|
+
integration) have their own units ([units](MCP.md#guarded-editing)).
|
|
1816
|
+
- Colocated notices stay with their component or asset owner. Documentation
|
|
1817
|
+
paths and UTF-8 validation grant no code or configuration ownership.
|
|
1818
|
+
- Proposed configuration settings pass the same mandatory validation. A
|
|
1819
|
+
compiler configuration change replaces the managed process and keeps the MCP
|
|
1820
|
+
connection.
|
|
1821
|
+
- Binary assets can travel as Git patch artifacts without entering model
|
|
1822
|
+
context.
|
|
1823
|
+
|
|
1824
|
+
**Coupled owners.** Genuinely coupled owners share one draft, validated as a
|
|
1825
|
+
single complete candidate and published together. A new public owner is added
|
|
1826
|
+
to the barrel in the same draft as the foundation owner. ADS removes the
|
|
1827
|
+
design-system folders an accepted deletion leaves empty.
|
|
1828
|
+
|
|
1829
|
+
**Other editors.** Editing access is independent: a direct editor can use MCP
|
|
1830
|
+
only for preview and checks, and an MCP-only editor uses enabled mutation
|
|
1831
|
+
tools. Both use ADS's compiler
|
|
1832
|
+
([editing workflows](../skills/ads-designer/references/workflows.md)). Normal
|
|
1833
|
+
build gates stay in place for source changes made through other editors, and
|
|
1834
|
+
preview review is necessary after either editing path.
|
|
1835
|
+
|
|
1836
|
+
### Guarded deletion
|
|
1837
|
+
|
|
1838
|
+
Guarded deletion (`ads_delete`, `src/mcp/deletions.mts`) removes declared
|
|
1839
|
+
targets without a visible draft, through the same publication path as
|
|
1840
|
+
acceptance and not a second workflow ([MCP](MCP.md#guarded-deletion)).
|
|
1841
|
+
|
|
1842
|
+
1. It checks the requested revision against `previewSourceRevision`, the
|
|
1843
|
+
accepted-source revision that drafts track.
|
|
1844
|
+
2. It captures the project inputs once and runs the `deletion-plan` analysis
|
|
1845
|
+
operation (`src/deletion-plan.mts`) on exactly those bytes. Targets resolve
|
|
1846
|
+
against the revision's design inputs and unit inventory. Token removals edit
|
|
1847
|
+
a clone of the shared captured CSS tree. Profile and artwork removals cut
|
|
1848
|
+
statement ranges of the captured native AST, leaving neighbouring bytes
|
|
1849
|
+
untouched. The barrel drops the deleted owners' re-exports through the
|
|
1850
|
+
shared import resolver. Surviving references in the design inputs are
|
|
1851
|
+
listed.
|
|
1852
|
+
3. Each planned file carries the digest it was derived from, and the mutation
|
|
1853
|
+
controller's candidate must hold exactly those bytes (`expectedDigest`).
|
|
1854
|
+
4. A `beforeApply` fence requires the source revision to still be the requested
|
|
1855
|
+
one at publication.
|
|
1856
|
+
|
|
1857
|
+
Open drafts that hold a changed file or owner refuse the deletion.
|
|
1858
|
+
`MutationController.apply` checks and publishes the candidate. So the ordinary
|
|
1859
|
+
`ads check` over the candidate (every captured alternative) catches references
|
|
1860
|
+
the design-input scan does not see: recipes, bindings, imports and scenarios.
|
|
1861
|
+
Emission, cancellation, dry runs and rollback behave exactly as for acceptance.
|
|
1862
|
+
Protection covers the captured ADS graph only, never consumers outside it.
|
|
1863
|
+
|
|
1864
|
+
### Checks, scripts and evidence
|
|
1865
|
+
|
|
1866
|
+
**Check execution.** Batch checks from the CLI and CI use the internal pinned
|
|
1867
|
+
Turbo runner. The MCP server, its preview compiler and registered candidates
|
|
1868
|
+
use warm checks (`check-service.mts`). Both use the same asynchronous native
|
|
1869
|
+
analysis service ([check paths](CACHING.md#check-paths)).
|
|
1870
|
+
|
|
1871
|
+
- Local artifact reuse is fenced by current input, tool, runtime and Git state.
|
|
1872
|
+
Gate results, browser evidence, locks and baselines are never task outputs.
|
|
1873
|
+
Project scripts stay uncached without a known deterministic contract.
|
|
1874
|
+
- The warm Bun preview compiler keeps its module cache. Complete verified graph
|
|
1875
|
+
restoration publishes fresh build-session evidence without semantic
|
|
1876
|
+
rediscovery.
|
|
1877
|
+
|
|
1878
|
+
**Scripts.** `acceptance.scripts` and `validation.scripts` explicitly select
|
|
1879
|
+
project scripts; no names are inferred. `ads validate` runs both lists, so each
|
|
1880
|
+
script is listed once. Direct edits invoke `ads validate --changed`. Draft
|
|
1881
|
+
acceptance records no baseline, so its owner-scoped evidence never satisfies a
|
|
1882
|
+
complete validation.
|
|
1883
|
+
|
|
1884
|
+
**Responsibilities.** The project owns its test code and runner policy. ADS
|
|
1885
|
+
owns affected-check selection, candidate hosting, progress, evidence freshness
|
|
1886
|
+
and process cleanup.
|
|
1887
|
+
|
|
1888
|
+
- One profile timeout bounds its entire runner process. Parallel workers can
|
|
1889
|
+
share the candidate host with independent App state.
|
|
1890
|
+
- Partial outcomes stay diagnostic when execution is interrupted; they cannot
|
|
1891
|
+
approve a mutation.
|
|
1892
|
+
- Passing checks describe their registered assertions, not every
|
|
1893
|
+
natural-language claim.
|
|
1894
|
+
- Results distinguish architecture, project-build, transport, runner and
|
|
1895
|
+
assertion boundaries with structured phase/code evidence. An unclassified
|
|
1896
|
+
test exception does not become an assertion or a component defect.
|
|
1897
|
+
- Acceptance explicitly lists established and unverified scope. A stage that
|
|
1898
|
+
ran nothing is listed as skipped with its not-available status, never as
|
|
1899
|
+
established, and does not block acceptance.
|
|
1900
|
+
|
|
1901
|
+
**Investigations.** Verification keeps one latest investigation per registered
|
|
1902
|
+
check, including isolated candidates
|
|
1903
|
+
([contents](BEHAVIORS.md#investigate-a-failure)). MCP exposes bounded
|
|
1904
|
+
bundle/index resources and only registered, digest-checked artifact files.
|
|
1905
|
+
Another run replaces that check's resource access, and candidate evidence never
|
|
1906
|
+
certifies live source. See the
|
|
1907
|
+
[evidence guide](../skills/ads-designer/references/evidence.md).
|
|
1908
|
+
|
|
1909
|
+
### Bounded results
|
|
1910
|
+
|
|
1911
|
+
MCP delivery is separate from validation: verification and mutation controllers
|
|
1912
|
+
use complete results to decide acceptance, and their replies are bounded
|
|
1913
|
+
summaries with a result ID. `ads_results` reads saved sections without
|
|
1914
|
+
rerunning checks. [BEHAVIORS.md](BEHAVIORS.md#read-results) states the reply,
|
|
1915
|
+
page and snapshot budgets.
|
|
1916
|
+
|
|
1917
|
+
- Cursors bind the query and the result/revision. An expired ID fails
|
|
1918
|
+
explicitly and never returns another run.
|
|
1919
|
+
- Run snapshots are immutable and persist under `.ds/tool-results/`. Evidence
|
|
1920
|
+
is collected with its result.
|
|
1921
|
+
- A storage or notification failure cannot change an accepted edit's applied
|
|
1922
|
+
state.
|
|
1923
|
+
- The budgets are payload bytes, not tokenizer estimates. MCP compatibility
|
|
1924
|
+
text can duplicate structured JSON on the wire.
|
|
1925
|
+
|
|
1926
|
+
### Experimental MCP Apps
|
|
1927
|
+
|
|
1928
|
+
Experimental MCP Apps are another development review surface. Component,
|
|
1929
|
+
pattern and mock views are project scenarios, compiled with the
|
|
1930
|
+
project's emitted CSS and public implementations.
|
|
1931
|
+
|
|
1932
|
+
- The server serves those artifacts. It does not interpret arbitrary component
|
|
1933
|
+
code and introduces no production UI dependencies.
|
|
1934
|
+
- ADS runs its Bun preview compiler itself, with no launch command.
|
|
1935
|
+
- File-change notifications let hosts refresh their views. Structured build
|
|
1936
|
+
reports distinguish running compilers from successful, current previews, and
|
|
1937
|
+
diagnostics stay readable when a host does not forward notifications.
|
|
1938
|
+
- Older clients keep tools, resources and prompts. Native skill discovery and
|
|
1939
|
+
Apps presentation depend on the capabilities of the host.
|