@reqvire-org/ads 0.4.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (394) hide show
  1. package/README.md +105 -86
  2. package/dist/a11y.mjs +108 -29
  3. package/dist/analysis/compiler-options.mjs +13 -0
  4. package/dist/analysis/context.mjs +46 -0
  5. package/dist/analysis/file-tree.mjs +52 -0
  6. package/dist/analysis/helpers.mjs +140 -0
  7. package/dist/analysis/impact.mjs +20 -0
  8. package/dist/analysis/inputs.mjs +15 -0
  9. package/dist/analysis/native-adapter.mjs +180 -0
  10. package/dist/analysis/native-project.mjs +323 -0
  11. package/dist/analysis/queries.mjs +133 -0
  12. package/dist/analysis/service.mjs +146 -0
  13. package/dist/analysis/standalone.mjs +57 -0
  14. package/dist/analysis/syntax.mjs +164 -0
  15. package/dist/analysis/worker.mjs +182 -0
  16. package/dist/assets.mjs +5 -5
  17. package/dist/atomic-composition.mjs +191 -70
  18. package/dist/atomic-trace.mjs +120 -50
  19. package/dist/behavior-libraries.mjs +106 -37
  20. package/dist/behaviors.mjs +219 -77
  21. package/dist/boundaries.mjs +135 -38
  22. package/dist/brand-assets.mjs +219 -47
  23. package/dist/brands.mjs +86 -27
  24. package/dist/bun-compiler.mjs +28 -14
  25. package/dist/bun-worker.mjs +7 -5
  26. package/dist/capture/worker.mjs +15 -4
  27. package/dist/capture-store.mjs +4 -2
  28. package/dist/capture.mjs +17 -14
  29. package/dist/check-service.mjs +40 -57
  30. package/dist/check.mjs +749 -188
  31. package/dist/cli.mjs +200 -99
  32. package/dist/color-values.mjs +21 -21
  33. package/dist/component-contrast.mjs +2 -2
  34. package/dist/config.mjs +303 -135
  35. package/dist/construction-styles.cjs +10 -0
  36. package/dist/control-padding.mjs +45 -25
  37. package/dist/css-values.mjs +3 -2
  38. package/dist/declarative-flow.mjs +209 -109
  39. package/dist/design-values.mjs +136 -51
  40. package/dist/development-runtime.mjs +4 -6
  41. package/dist/draft-boundary.mjs +11 -6
  42. package/dist/evidence.mjs +1 -1
  43. package/dist/finding-rules.mjs +7 -5
  44. package/dist/font-rules.mjs +2 -2
  45. package/dist/fonts-generated.mjs +2 -2
  46. package/dist/foundation-views.mjs +238 -0
  47. package/dist/foundation.mjs +63 -39
  48. package/dist/generated-entries.mjs +101 -34
  49. package/dist/icons.mjs +79 -32
  50. package/dist/image-attributes.mjs +109 -36
  51. package/dist/image-size.mjs +1 -1
  52. package/dist/index.mjs +0 -2
  53. package/dist/init.mjs +122 -41
  54. package/dist/investigations.mjs +2 -2
  55. package/dist/layers.mjs +298 -129
  56. package/dist/layout-widths.mjs +180 -85
  57. package/dist/linaria/preserve-values.cjs +7 -0
  58. package/dist/linaria/spatial-inputs.cjs +56 -0
  59. package/dist/lockup-composition.mjs +44 -0
  60. package/dist/lockup-model.cjs +64 -0
  61. package/dist/mcp/THIRD_PARTY_NOTICES.md +51 -1
  62. package/dist/mcp/apps.mjs +4 -30
  63. package/dist/mcp/behavior-pages.mjs +72 -24
  64. package/dist/mcp/build-status.mjs +257 -64
  65. package/dist/mcp/catalog.mjs +90 -26
  66. package/dist/mcp/context.mjs +17 -18
  67. package/dist/mcp/draft-discovery.mjs +44 -21
  68. package/dist/mcp/drafts.mjs +901 -281
  69. package/dist/mcp/execution-coordinator.mjs +417 -167
  70. package/dist/mcp/execution-results.mjs +7 -7
  71. package/dist/mcp/mutations.mjs +670 -234
  72. package/dist/mcp/preview-watch.mjs +448 -170
  73. package/dist/mcp/preview-widget.bundle.js +44 -50
  74. package/dist/mcp/prompts.mjs +5 -5
  75. package/dist/mcp/result-pages.mjs +1 -1
  76. package/dist/mcp/sandbox-host.mjs +1 -1
  77. package/dist/mcp/server.mjs +2402 -577
  78. package/dist/mcp/showcase-host.mjs +165 -41
  79. package/dist/mcp/skills.mjs +1 -1
  80. package/dist/mcp/text-diff.mjs +29 -10
  81. package/dist/paint-contracts.mjs +174 -81
  82. package/dist/palette-generated.mjs +2 -2
  83. package/dist/preview-bun.mjs +493 -187
  84. package/dist/preview-failure.mjs +1 -1
  85. package/dist/preview-files.mjs +13 -13
  86. package/dist/preview-imports.mjs +104 -55
  87. package/dist/preview-inputs.mjs +2 -2
  88. package/dist/preview-requests.mjs +24 -0
  89. package/dist/preview-resources.mjs +288 -147
  90. package/dist/preview-scope.mjs +5 -4
  91. package/dist/program-cache.mjs +8 -34
  92. package/dist/project-documents.mjs +1 -1
  93. package/dist/public-api.mjs +69 -31
  94. package/dist/public-props.mjs +39 -22
  95. package/dist/{browser-audit → render-audit}/axe-run.mjs +3 -3
  96. package/dist/{browser-audit → render-audit}/image-shape.mjs +2 -2
  97. package/dist/{browser-audit → render-audit}/layout-overflow.mjs +86 -23
  98. package/dist/{browser-audit → render-audit}/non-text-contrast.mjs +86 -27
  99. package/dist/{browser-audit → render-audit}/render-states.mjs +208 -52
  100. package/dist/{browser-audit → render-audit}/worker.mjs +86 -30
  101. package/dist/render-audit.mjs +828 -0
  102. package/dist/render-color-probe.mjs +96 -42
  103. package/dist/resource-limits.mjs +229 -97
  104. package/dist/runtime-contracts.mjs +467 -185
  105. package/dist/scenario-groups.mjs +22 -10
  106. package/dist/scenario-inspector.mjs +6 -43
  107. package/dist/scenario-program.mjs +8 -25
  108. package/dist/scenario-registry.mjs +72 -30
  109. package/dist/scenario-selectors.mjs +161 -64
  110. package/dist/scenario-slots.mjs +149 -56
  111. package/dist/scenario-trace.mjs +215 -109
  112. package/dist/scenarios-compiler.mjs +719 -378
  113. package/dist/scenarios-vite.d.mts +1 -3
  114. package/dist/scenarios-vite.mjs +2 -81
  115. package/dist/scenarios.mjs +421 -157
  116. package/dist/selector-match.mjs +2 -2
  117. package/dist/showcase/client.bundle.js +57 -56
  118. package/dist/showcase/draft-navigation.js +18 -0
  119. package/dist/showcase/favicon.ico +0 -0
  120. package/dist/showcase/favicon.svg +1 -0
  121. package/dist/showcase/foundation-view.css +55 -0
  122. package/dist/showcase/foundation-view.mjs +252 -0
  123. package/dist/showcase/guide-controls.ads.review.mjs +32 -0
  124. package/dist/showcase/icons.js +1 -145
  125. package/dist/showcase/index.html +3 -31
  126. package/dist/showcase/preview-frame.ads.review.css +46 -0
  127. package/dist/showcase/preview-frame.ads.review.d.mts +11 -0
  128. package/dist/showcase/preview-frame.ads.review.mjs +22 -0
  129. package/dist/showcase/preview-state.js +0 -9
  130. package/dist/showcase/refresh-scheduler.js +23 -0
  131. package/dist/showcase/style.css +5 -47
  132. package/dist/showcase/ui/ui.css +1353 -0
  133. package/dist/showcase/ui/ui.js +1062 -0
  134. package/dist/showcase-coverage.mjs +58 -37
  135. package/dist/skills/README.md +24 -23
  136. package/dist/skills/ads-designer/README.md +8 -2
  137. package/dist/skills/ads-designer/SKILL.md +130 -119
  138. package/dist/skills/ads-designer/references/accessibility.md +12 -13
  139. package/dist/skills/ads-designer/references/atomic-styles.md +4 -4
  140. package/dist/skills/ads-designer/references/behaviors.md +30 -27
  141. package/dist/skills/ads-designer/references/branding.md +98 -10
  142. package/dist/skills/ads-designer/references/captures.md +25 -0
  143. package/dist/skills/ads-designer/references/cli.md +21 -24
  144. package/dist/skills/ads-designer/references/contracts.md +7 -6
  145. package/dist/skills/ads-designer/references/design-data.md +49 -52
  146. package/dist/skills/ads-designer/references/drafts.md +20 -17
  147. package/dist/skills/ads-designer/references/evidence.md +1 -5
  148. package/dist/skills/ads-designer/references/guarded-editing.md +14 -18
  149. package/dist/skills/ads-designer/references/layers.md +1 -1
  150. package/dist/skills/ads-designer/references/layout.md +347 -0
  151. package/dist/skills/ads-designer/references/mobile.md +2 -1
  152. package/dist/skills/{ads-motion/references/performance.md → ads-designer/references/motion-performance.md} +5 -1
  153. package/dist/skills/{ads-motion/references/build.md → ads-designer/references/motion.md} +73 -5
  154. package/dist/skills/ads-designer/references/review.md +37 -34
  155. package/dist/skills/ads-designer/references/runtimes.md +33 -30
  156. package/dist/skills/ads-designer/references/scenarios.md +16 -18
  157. package/dist/skills/{ads-break-ui/references/catalog.md → ads-designer/references/stress-catalog.md} +3 -1
  158. package/dist/skills/ads-designer/references/stress-test.md +68 -0
  159. package/dist/skills/ads-designer/references/validation.md +83 -75
  160. package/dist/skills/ads-designer/references/workflows.md +8 -33
  161. package/dist/skills/ads-import/SKILL.md +43 -325
  162. package/dist/skills/ads-import/references/atomic-styles.md +4 -4
  163. package/dist/skills/ads-import/references/behaviors.md +30 -27
  164. package/dist/skills/ads-import/references/branding.md +5 -5
  165. package/dist/skills/ads-import/references/captures.md +25 -0
  166. package/dist/skills/ads-import/references/cli.md +21 -24
  167. package/dist/skills/ads-import/references/compatibility.md +1 -1
  168. package/dist/skills/ads-import/references/contracts.md +7 -6
  169. package/dist/skills/ads-import/references/design-data.md +49 -52
  170. package/dist/skills/ads-import/references/drafts.md +20 -17
  171. package/dist/skills/ads-import/references/evidence.md +1 -5
  172. package/dist/skills/ads-import/references/guarded-editing.md +14 -18
  173. package/dist/skills/ads-import/references/implementation.md +2 -1
  174. package/dist/skills/ads-import/references/layers.md +1 -1
  175. package/dist/skills/ads-import/references/layout.md +347 -0
  176. package/dist/skills/ads-import/references/review.md +37 -34
  177. package/dist/skills/ads-import/references/runtimes.md +33 -30
  178. package/dist/skills/ads-import/references/scenarios.md +16 -18
  179. package/dist/skills/ads-import/references/tokens.md +3 -3
  180. package/dist/skills/ads-import/references/validation.md +83 -75
  181. package/dist/skills/ads-import/references/workflows.md +8 -33
  182. package/dist/skills/ads-migrate/SKILL.md +56 -0
  183. package/dist/skills/ads-migrate/references/0.4.1-to-0.4.2.md +602 -0
  184. package/dist/skills/ads-port/SKILL.md +54 -343
  185. package/dist/skills/ads-port/references/atomic-styles.md +4 -4
  186. package/dist/skills/ads-port/references/behaviors.md +30 -27
  187. package/dist/skills/ads-port/references/captures.md +25 -0
  188. package/dist/skills/ads-port/references/cli.md +21 -24
  189. package/dist/skills/ads-port/references/contracts.md +7 -6
  190. package/dist/skills/ads-port/references/design-data.md +49 -52
  191. package/dist/skills/ads-port/references/drafts.md +20 -17
  192. package/dist/skills/ads-port/references/evidence.md +1 -5
  193. package/dist/skills/ads-port/references/guarded-editing.md +14 -18
  194. package/dist/skills/ads-port/references/layers.md +1 -1
  195. package/dist/skills/ads-port/references/layout.md +347 -0
  196. package/dist/skills/ads-port/references/lint-and-docs.md +8 -11
  197. package/dist/skills/ads-port/references/native-implementation.md +2 -1
  198. package/dist/skills/ads-port/references/review.md +37 -34
  199. package/dist/skills/ads-port/references/runtimes.md +33 -30
  200. package/dist/skills/ads-port/references/scenarios.md +16 -18
  201. package/dist/skills/ads-port/references/validation.md +83 -75
  202. package/dist/skills/ads-port/references/workflows.md +8 -33
  203. package/dist/source-symbols.mjs +1 -8
  204. package/dist/source-values.mjs +266 -128
  205. package/dist/spatial-composition.mjs +322 -0
  206. package/dist/spatial-contexts.cjs +56 -0
  207. package/dist/spatial-css.cjs +351 -0
  208. package/dist/spatial-inputs.cjs +80 -0
  209. package/dist/spatial-metadata.mjs +18 -0
  210. package/dist/spatial-model.cjs +322 -0
  211. package/dist/spatial.mjs +21 -0
  212. package/dist/stage-timing.cjs +20 -0
  213. package/dist/starters/preact/design-system/patterns/Conversation/Conversation.tsx +105 -0
  214. package/dist/starters/preact/design-system/patterns/Shell/Shell.tsx +275 -0
  215. package/dist/starters/preact/design-system/review/demo-frame/DemoFrame.ads.review.tsx +7 -0
  216. package/dist/starters/preact/design-system/review/screen-frame/ScreenFrame.ads.review.tsx +10 -0
  217. package/dist/starters/preact/design-system/showcase/mcp/main.ads.mount.tsx +8 -0
  218. package/dist/starters/preact/ds.config.json +25 -6
  219. package/dist/starters/preact/package.json +4 -8
  220. package/dist/starters/preact/tsconfig.json +4 -5
  221. package/dist/starters/preact/vite.config.ts +3 -3
  222. package/dist/starters/react/ADS.md +42 -47
  223. package/dist/starters/react/README.md +47 -49
  224. package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.tsx +18 -2
  225. package/dist/starters/react/design-system/components/Actions/IconButton/README.md +3 -0
  226. package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/README.md +5 -0
  227. package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/WorkspacePage.ads.fixture.ts +13 -0
  228. package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/WorkspacePage.ads.scenario.tsx +22 -0
  229. package/dist/starters/react/design-system/index.ts +2 -1
  230. package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.exports.ts +1 -0
  231. package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.fixture.ts +7 -0
  232. package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.scenario.tsx +15 -0
  233. package/dist/starters/react/design-system/patterns/Conversation/Conversation.tsx +105 -0
  234. package/dist/starters/react/design-system/patterns/Conversation/README.md +9 -0
  235. package/dist/starters/react/design-system/patterns/Shell/Floating.ads.fixture.ts +5 -0
  236. package/dist/starters/react/design-system/patterns/Shell/Floating.ads.scenario.tsx +21 -0
  237. package/dist/starters/react/design-system/patterns/Shell/README.md +43 -0
  238. package/dist/starters/react/design-system/patterns/Shell/Shell.ads.exports.ts +1 -0
  239. package/dist/starters/react/design-system/patterns/Shell/Shell.ads.fixture.ts +5 -0
  240. package/dist/starters/react/design-system/patterns/Shell/Shell.ads.scenario.tsx +21 -0
  241. package/dist/starters/react/design-system/patterns/Shell/Shell.tsx +274 -0
  242. package/dist/starters/react/design-system/review/demo-frame/DemoFrame.ads.exports.ts +1 -1
  243. package/dist/starters/react/design-system/review/demo-frame/DemoFrame.ads.review.tsx +7 -0
  244. package/dist/starters/react/design-system/review/index.ads.review.ts +4 -0
  245. package/dist/starters/react/design-system/review/region-block/RegionBlock.ads.exports.ts +1 -0
  246. package/dist/starters/react/design-system/review/region-block/RegionBlock.ads.review.tsx +6 -0
  247. package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.ads.exports.ts +1 -1
  248. package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.ads.review.tsx +10 -0
  249. package/dist/starters/react/design-system/showcase/mcp/{main.tsx → main.ads.mount.tsx} +4 -2
  250. package/dist/starters/react/design-system/tokens/catalog.ads.json +1221 -0
  251. package/dist/starters/react/design-system/tokens/colors.css +1 -1
  252. package/dist/starters/react/design-system/tokens/spacing.css +22 -32
  253. package/dist/starters/react/design-system/tokens/spatial.ads.json +70 -0
  254. package/dist/starters/react/design-system/tokens/themes.generated.ts +1 -1
  255. package/dist/starters/react/ds.config.json +25 -6
  256. package/dist/starters/react/package.json +2 -6
  257. package/dist/starters/react/tsconfig.json +2 -3
  258. package/dist/starters/react/vite.config.ts +3 -3
  259. package/dist/style-boundaries.mjs +70 -25
  260. package/dist/task-cache.mjs +173 -72
  261. package/dist/task-worker.mjs +22 -11
  262. package/dist/test-boundaries.mjs +132 -59
  263. package/dist/themes-generated.mjs +1 -1
  264. package/dist/themes-watch.mjs +57 -22
  265. package/dist/themes.mjs +176 -73
  266. package/dist/token-export.mjs +39 -14
  267. package/dist/token-policy.mjs +6 -3
  268. package/dist/token-quality.mjs +6 -6
  269. package/dist/token-samples.mjs +16 -5
  270. package/dist/tokens.mjs +71 -26
  271. package/dist/ui-framework.mjs +16 -14
  272. package/dist/unit-contracts.mjs +251 -104
  273. package/dist/units.mjs +208 -98
  274. package/dist/usage.mjs +138 -38
  275. package/dist/validation-checks.mjs +115 -38
  276. package/dist/validation-inputs.mjs +187 -78
  277. package/dist/validation.mjs +268 -102
  278. package/dist/verification/browser.mjs +27 -5
  279. package/dist/verification.mjs +711 -187
  280. package/docs/ADS.md +90 -79
  281. package/docs/ARCHITECTURE.md +294 -136
  282. package/docs/BEHAVIORS.md +29 -25
  283. package/docs/CACHING.md +52 -17
  284. package/docs/CHANGELOG.md +309 -17
  285. package/docs/CONTRACTS.md +12 -4
  286. package/docs/DESIGN-REFERENCES.md +40 -0
  287. package/docs/GUIDE.md +270 -258
  288. package/docs/MCP.md +181 -324
  289. package/docs/SPATIAL-CHECKS.md +69 -0
  290. package/docs/benchmarks/README.md +39 -0
  291. package/package.json +42 -34
  292. package/dist/browser-audit.mjs +0 -429
  293. package/dist/create.mjs +0 -48
  294. package/dist/lint-config.mjs +0 -50
  295. package/dist/mcp/project-widget.bundle.js +0 -114
  296. package/dist/mcp/reports.mjs +0 -101
  297. package/dist/mcp/widget.bundle.js +0 -147
  298. package/dist/oxlint.mjs +0 -89
  299. package/dist/preview-builder.mjs +0 -133
  300. package/dist/preview-workers.mjs +0 -184
  301. package/dist/showcase.mjs +0 -77
  302. package/dist/skills/ads-break-ui/LICENSE.upstream +0 -21
  303. package/dist/skills/ads-break-ui/README.md +0 -16
  304. package/dist/skills/ads-break-ui/SKILL.md +0 -412
  305. package/dist/skills/ads-break-ui/agents/openai.yaml +0 -4
  306. package/dist/skills/ads-break-ui/references/atomic-styles.md +0 -293
  307. package/dist/skills/ads-break-ui/references/behaviors.md +0 -412
  308. package/dist/skills/ads-break-ui/references/captures.md +0 -135
  309. package/dist/skills/ads-break-ui/references/contracts.md +0 -317
  310. package/dist/skills/ads-break-ui/references/design-data.md +0 -354
  311. package/dist/skills/ads-break-ui/references/drafts.md +0 -194
  312. package/dist/skills/ads-break-ui/references/evidence.md +0 -128
  313. package/dist/skills/ads-break-ui/references/guarded-editing.md +0 -165
  314. package/dist/skills/ads-break-ui/references/layers.md +0 -145
  315. package/dist/skills/ads-break-ui/references/reporting.md +0 -101
  316. package/dist/skills/ads-break-ui/references/review.md +0 -97
  317. package/dist/skills/ads-break-ui/references/runtimes.md +0 -203
  318. package/dist/skills/ads-break-ui/references/scenarios.md +0 -246
  319. package/dist/skills/ads-break-ui/references/validation.md +0 -166
  320. package/dist/skills/ads-break-ui/references/verification.md +0 -58
  321. package/dist/skills/ads-break-ui/references/workflows.md +0 -90
  322. package/dist/skills/ads-designer/references/reporting.md +0 -101
  323. package/dist/skills/ads-import/references/reporting.md +0 -101
  324. package/dist/skills/ads-motion/LICENSE.upstream +0 -21
  325. package/dist/skills/ads-motion/README.md +0 -22
  326. package/dist/skills/ads-motion/SKILL.md +0 -385
  327. package/dist/skills/ads-motion/agents/openai.yaml +0 -4
  328. package/dist/skills/ads-motion/references/atomic-styles.md +0 -293
  329. package/dist/skills/ads-motion/references/audit.md +0 -44
  330. package/dist/skills/ads-motion/references/behaviors.md +0 -412
  331. package/dist/skills/ads-motion/references/captures.md +0 -135
  332. package/dist/skills/ads-motion/references/contracts.md +0 -317
  333. package/dist/skills/ads-motion/references/design-data.md +0 -354
  334. package/dist/skills/ads-motion/references/drafts.md +0 -194
  335. package/dist/skills/ads-motion/references/evidence.md +0 -128
  336. package/dist/skills/ads-motion/references/guarded-editing.md +0 -165
  337. package/dist/skills/ads-motion/references/layers.md +0 -145
  338. package/dist/skills/ads-motion/references/motion-review.md +0 -35
  339. package/dist/skills/ads-motion/references/reporting.md +0 -101
  340. package/dist/skills/ads-motion/references/review.md +0 -97
  341. package/dist/skills/ads-motion/references/runtimes.md +0 -203
  342. package/dist/skills/ads-motion/references/scenarios.md +0 -246
  343. package/dist/skills/ads-motion/references/validation.md +0 -166
  344. package/dist/skills/ads-motion/references/verification.md +0 -39
  345. package/dist/skills/ads-motion/references/workflows.md +0 -90
  346. package/dist/skills/ads-port/references/reporting.md +0 -101
  347. package/dist/starters/preact/design-system/components/Layout/Grid/Grid.ads.contract.ts +0 -6
  348. package/dist/starters/preact/design-system/components/Layout/Grid/Grid.tsx +0 -76
  349. package/dist/starters/preact/design-system/review/demo-frame/DemoFrame.tsx +0 -29
  350. package/dist/starters/preact/design-system/review/screen-frame/ScreenFrame.tsx +0 -34
  351. package/dist/starters/preact/design-system/review/token-preview/TokenPreview.ads.contract.ts +0 -6
  352. package/dist/starters/preact/design-system/review/token-preview/TokenPreview.tsx +0 -137
  353. package/dist/starters/preact/design-system/showcase/mcp/main.tsx +0 -6
  354. package/dist/starters/react/design-system/brand/Icons/AppIcon/AppIcon.ads.fixture.ts +0 -7
  355. package/dist/starters/react/design-system/brand/Icons/AppIcon/AppIcon.ads.scenario.tsx +0 -4
  356. package/dist/starters/react/design-system/brand/Identity/Logo/Logo.ads.fixture.ts +0 -7
  357. package/dist/starters/react/design-system/brand/Identity/Logo/Logo.ads.scenario.tsx +0 -4
  358. package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.contract.ts +0 -6
  359. package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.exports.ts +0 -1
  360. package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.fixture.ts +0 -12
  361. package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.scenario.tsx +0 -17
  362. package/dist/starters/react/design-system/components/Layout/Grid/Grid.tsx +0 -75
  363. package/dist/starters/react/design-system/components/Layout/Grid/README.md +0 -21
  364. package/dist/starters/react/design-system/review/brand-preview/BrandPreview.ads.exports.ts +0 -1
  365. package/dist/starters/react/design-system/review/brand-preview/BrandPreview.tsx +0 -112
  366. package/dist/starters/react/design-system/review/demo-frame/DemoFrame.tsx +0 -29
  367. package/dist/starters/react/design-system/review/grid-cell/GridCell.ads.exports.ts +0 -1
  368. package/dist/starters/react/design-system/review/grid-cell/GridCell.tsx +0 -18
  369. package/dist/starters/react/design-system/review/index.ts +0 -6
  370. package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.tsx +0 -34
  371. package/dist/starters/react/design-system/review/token-preview/TokenPreview.ads.contract.ts +0 -6
  372. package/dist/starters/react/design-system/review/token-preview/TokenPreview.ads.exports.ts +0 -1
  373. package/dist/starters/react/design-system/review/token-preview/TokenPreview.tsx +0 -137
  374. package/dist/starters/react/design-system/showcase/mcp/index.html +0 -1
  375. package/dist/starters/react/design-system/tokens/Color.ads.fixture.ts +0 -124
  376. package/dist/starters/react/design-system/tokens/Color.ads.scenario.tsx +0 -4
  377. package/dist/starters/react/design-system/tokens/Layout.ads.fixture.ts +0 -39
  378. package/dist/starters/react/design-system/tokens/Layout.ads.scenario.tsx +0 -4
  379. package/dist/starters/react/design-system/tokens/Motion.ads.fixture.ts +0 -18
  380. package/dist/starters/react/design-system/tokens/Motion.ads.scenario.tsx +0 -4
  381. package/dist/starters/react/design-system/tokens/Shape.ads.fixture.ts +0 -30
  382. package/dist/starters/react/design-system/tokens/Shape.ads.scenario.tsx +0 -4
  383. package/dist/starters/react/design-system/tokens/Space.ads.fixture.ts +0 -37
  384. package/dist/starters/react/design-system/tokens/Space.ads.scenario.tsx +0 -4
  385. package/dist/starters/react/design-system/tokens/Type.ads.fixture.ts +0 -29
  386. package/dist/starters/react/design-system/tokens/Type.ads.scenario.tsx +0 -4
  387. package/dist/starters/react/package-lock.json +0 -4707
  388. package/dist/token-fixtures.mjs +0 -30
  389. package/docs/benchmarks/bun-previews.md +0 -91
  390. package/docs/benchmarks/preview-memory.md +0 -147
  391. package/docs/benchmarks/turbo-poc.md +0 -284
  392. package/docs/plans/execution-coordination.md +0 -57
  393. /package/dist/{browser-audit → render-audit}/first-render.mjs +0 -0
  394. /package/dist/{browser-audit → render-audit}/layout-shift.mjs +0 -0
package/README.md CHANGED
@@ -28,8 +28,8 @@ Data, UX, Skin, and the performance reasons behind that choice.
28
28
  ADS manages its batch-task cache internally; see [cache controls and CI wiring](docs/CACHING.md).
29
29
 
30
30
  ADS supports **React and native Preact** with the same architecture guards and
31
- MCP preview flow. The starter comes for React and for Preact; this repository’s working example
32
- uses Preact. See [implementation support](docs/GUIDE.md#implementation-support).
31
+ MCP preview flow. One shared starter generates native React and Preact projects; this repository’s
32
+ playground runs the initialized Preact starter. See [implementation support](docs/GUIDE.md#implementation-support).
33
33
 
34
34
  ## What ADS does
35
35
 
@@ -48,15 +48,13 @@ uses Preact. See [implementation support](docs/GUIDE.md#implementation-support).
48
48
  edit. Commit proposals for PR review, compare Accepted/Draft in Explorer, and
49
49
  let the agent accept an exact reviewed revision after required checks pass.
50
50
  - **Bound command memory** with project process-tree budgets and reported kernel
51
- or watchdog enforcement. See [command memory budgets](docs/MCP.md#command-memory-budgets-ads-0338).
51
+ or watchdog enforcement. See [command memory budgets](docs/MCP.md#command-memory-budgets).
52
52
  - **Verify behavior** through project-owned guarantees and registered tests,
53
53
  with progress, timings and evidence tied to current source.
54
54
  - **Keep contracts explicit** for typed paint inputs, scoped data bindings and
55
55
  declarative APIs, without adding ADS to production components.
56
56
  - **Guide agents** with prompts and portable skills for building, importing,
57
57
  porting, motion and UI stress testing.
58
- - **Collect feedback** as local bug reports and feature requests with compact
59
- evidence, deduplication and submission receipts.
60
58
 
61
59
  See [using ADS through MCP](docs/GUIDE.md#use-ads-through-mcp) for the workflow and
62
60
  [visual captures](docs/MCP.md#screenshots-and-candidate-comparison) for screenshot
@@ -76,55 +74,54 @@ There is no warning level.
76
74
 
77
75
  | Area | What ADS enforces |
78
76
  |---|---|
79
- | **Rendered accessibility** | `ads audit` runs axe-core (WCAG 2.2 AA rules) in every rendered UI scenario, once per theme and brand, plus ADS's own non-text contrast check (WCAG 1.4.11, which axe does not cover): a field or other control without its own text or icon, whose border is its only boundary, needs that border at 3:1 against the background around it, and an icon-only control needs its icon at 3:1 against its background. The audit gates `ads validate` by default, and MCP draft acceptance and guarded patches audit the candidate's affected scenarios (all of them after configuration, foundation, token or asset changes); `browserAudit: false` in a policy turns it off. It needs the project's Playwright and browser (`npx playwright install chromium`); without them the policy fails and names what to install. |
77
+ | **Rendered accessibility** | `ads audit` runs axe-core (WCAG 2.2 AA rules) in every rendered UI scenario, once per theme and brand, plus ADS's own non-text contrast check (WCAG 1.4.11, which axe does not cover): a field or other control without its own text or icon, whose border is its only boundary, needs that border at 3:1 against the background around it, and an icon-only control needs its icon at 3:1 against its background. This render audit always gates `ads validate` (every scenario its change set reaches), and MCP draft acceptance audits the draft owners' own scenarios in the candidate; `acceptance.audit: false` turns that off for acceptance. It needs the project's Playwright and browser (`npx playwright install chromium`); without them the gate fails and names what to install. |
80
78
  | **Static accessibility** | Focus styles, icon-only labels, image alt text, reduced motion, target size, text resize and text spacing are checked from source and tokens, without a browser. |
81
79
  | **Contrast** | `token-contrast` checks the role pairs that meet on screen (text on surfaces, fills with their foreground, status text on tints, focus indicators and control borders) in every theme and brand. `component-contrast` checks the pairs components and patterns make themselves: a style block (including a nested state such as `&:hover` or `&[aria-selected="true"]`) that sets both `color` and `background` to tokens, such as a status color as text on its own tint. Both resolve every CSS color syntax, including `oklch()` and `color-mix()`, and composite translucent fills over the canvas. Text needs 4.5:1; focus indicators and control borders need 3:1; disabled states are exempt. |
82
- | **Layout** | Widths are fluid on the grid. `layout-fixed-width` fails a width, `flex-basis` or grid track that cannot shrink below 96 px, in any unit, whether raw, from a token or by arithmetic; small parts use plain sizes, `min(100%, 280px)` and `%` shrink, a maximum is not read, and widths declared in `layout.widthTokens` pass and are listed for review. `layout-overflow` renders every UI scenario at 390, 768 and 1280 px and fails on horizontal page overflow and clipped content, and renders components and patterns in a 240 px container, where a set width above 96 px must fit; scrollers and ellipsis are exempt. |
80
+ | **Layout** | `@ads-layout` validates spatial definitions, placement and local bounds. Ordinary grid CSS must have provable track/placement relationships; owned JSX supplies composition and container evidence. `layout-fixed-width` checks shared sizing roles and spatial bounds, without a universal pixel cutoff. Browser overflow audits remain a separate capability, including the existing narrow-container review. |
83
81
  | **Web performance** | `img-attributes` fails a raw `<img>` without dimensions or a `loading` choice, and a `srcset` with width descriptors and no `sizes`; `asset-image-budget` fails oversized images in `assets/` (SVG 100 KB, WebP and AVIF 300 KB, JPEG 400 KB, PNG and GIF 500 KB, or `assets.imageBudgetKb`); `layout-shift` fails a rendered scenario above 0.1; `img-shape` fails an image rendered at another shape than it declares; `font-weight-missing` and `asset-font-budget` hold fonts to what is declared and a size. `ads assets` generates preloads for the fonts the first text uses, on the URLs the stylesheet requests. Page metadata, sitemaps, hosting and Lighthouse stay with the application. |
84
82
  | **Themes and brands** | One mechanism: per-theme halves (`--x-light`, `--x-dark`) and brands on `[data-brand]`. `ads assets` generates `themes.generated.css` and `.ts`; missing or conflicting halves, empty themes, stale generated files, `light-dark()` and ancestor theme selectors are errors. |
85
- | **Tokens** | Ownership, naming, rhythm, missing and scenario references; equal values in different roles are flagged for review. |
83
+ | **Tokens** | Ownership, naming, rhythm, missing references and the token catalogue (`catalog.ads.json`); equal values in different roles are flagged for review. |
86
84
  | **Architecture** | Data, UX and Skin ownership, project structure, unit and paint contracts, binding and variable ownership; Linaria atomic composition risks are flagged for review. |
87
- | **Brand assets and glyphs** | Brand coverage, licenses, READMEs and previews; glyph viewBox, color and alias rules. |
85
+ | **Brand assets and glyphs** | Brand coverage, licenses and READMEs; glyph viewBox, color and alias rules. |
88
86
  | **Behavior** | Registered guarantees need current passing execution evidence; `ads verify` runs them against current source. |
89
- | **Acceptance policy** | `ads validate --policy acceptance` applies the project's acceptance policy (core gates, its configured `acceptance.checks` scripts, affected behavior checks when enabled and the browser audit) to direct edits, the same bar MCP acceptance uses. |
87
+ | **Two gates** | Draft acceptance runs `ads check`, `acceptance.scripts`, and the draft owners' own behavior tests and render audit. `ads validate` runs `ads check`, `acceptance.scripts` then `validation.scripts`, and every behavior test and render audit its change set reaches; `--changed` narrows that to what changed since the last full run. |
90
88
 
91
89
  See [checks and guards](docs/GUIDE.md#checks-and-guards) for the gates, thresholds and
92
- how to turn the browser audit off.
90
+ how to turn the render audit off for draft acceptance.
93
91
 
94
- ## Create a new design system
92
+ ## Set up an existing project
95
93
 
96
- `create` copies the starter shipped in this ADS version into a new folder and sets
97
- it up, so the project always matches the tool that checks it:
94
+ Run **inside your project**, where `package.json` lives. The project declares its
95
+ package manager: `"packageManager"` in `package.json`, or its lockfile
96
+ (`package-lock.json` for npm, `bun.lock` for Bun). Install Bun 1.4.1+ for ADS tooling
97
+ and previews. Your application can continue using Node/npm or Bun.
98
98
 
99
99
  ```sh
100
- npx @reqvire-org/ads create my-design-system --framework react # or preact
101
- cd my-design-system
100
+ npx @reqvire-org/ads init --framework react
102
101
  npm install
103
- npx playwright install chromium # browser for the accessibility audit
102
+ npx playwright install chromium
104
103
  npm run build
105
- npm run dev:showcase
106
104
  ```
107
105
 
108
- With Bun: `bunx @reqvire-org/ads create my-design-system --framework preact
109
- --package-manager bun`, then `bun install`, `bunx playwright install chromium` and
110
- `bun --bun run build`. `--name` sets
111
- the package name (default: the folder name).
112
-
113
- ## Set up an existing project
106
+ Use `--framework preact` for native Preact. Init saves the choice in
107
+ `ds.config.json`; later runs can use plain `ads init`.
114
108
 
115
- Run **inside your project**, where `package.json` lives. Install Bun 1.4.1+ for
116
- ADS tooling and previews. Your application can continue using Node/npm or Bun.
109
+ To start a design system from ADS's starter, add `--include-starter`: init also adds
110
+ the starter's example components, patterns, compositions, review frames, Vite and
111
+ TypeScript setup, and the scripts and development dependencies they need. It adds
112
+ only what the project lacks, never replaces an existing file and never writes a
113
+ lockfile. Start from a `package.json` that declares the package manager:
117
114
 
118
115
  ```sh
119
- npx @reqvire-org/ads init --framework react
116
+ mkdir my-design-system && cd my-design-system
117
+ npm init -y && npm pkg set packageManager=npm@11.7.0 # Bun: "packageManager": "bun@1.4.1"
118
+ npx @reqvire-org/ads init --framework react --include-starter # or preact
120
119
  npm install
121
- npx playwright install chromium
120
+ npx playwright install chromium # browser for the accessibility audit
122
121
  npm run build
122
+ npm run dev:showcase
123
123
  ```
124
124
 
125
- Use `--framework preact` for native Preact. Init saves the choice in
126
- `ds.config.json`; later runs can use plain `ads init`.
127
-
128
125
  For a Bun project, Node is unnecessary:
129
126
 
130
127
  ```sh
@@ -135,7 +132,8 @@ bun --bun run build
135
132
  ```
136
133
 
137
134
  `--bun` keeps package executables on Bun even when they have a Node shebang.
138
- `init` detects npm or Bun from your project. It adds ADS (and `@playwright/test`, unless Playwright is already a dependency) as development dependencies, sets up an empty local ADS if needed, and adds ADS checks before your
135
+ `init` reads npm or Bun from your project, and stops with an error naming what to add when
136
+ the project declares neither. It adds ADS (and `@playwright/test`, unless Playwright is already a dependency) as development dependencies, sets up an empty local ADS if needed, and adds ADS checks before your
139
137
  existing build. The default layout is root `design-system/`, alongside `src/`.
140
138
  It keeps your app, token values, scripts, and lockfile. Each build runs native ADS gates for tokens, styles, imports, renderer
141
139
  boundaries and asset ownership, then runs `ads assets` (configured brand icons, the
@@ -150,15 +148,14 @@ Linaria; integrate its extraction with your build as described in the
150
148
  |---------|-----|
151
149
  | `ads init --framework react` | Set up ADS in the current project; also accepts `preact`; saved choices can omit the flag |
152
150
  | `ads check` | Check tokens, styles, imports, and ADS ownership; errors fail, review items are listed |
153
- | `ads validate` | Run the configured validation policy and current-preview audit |
154
- | `ads validate --policy acceptance` | Check the acceptance policy against direct source edits without applying changes |
151
+ | `ads validate` | Run the full gate: `ads check`, project scripts, every behavior test and the render audit |
152
+ | `ads validate --changed` | The same gate for what changed since the last successful full run |
155
153
  | `ads compile` | Compile all previews with Bun; `--watch` rebuilds on edits |
156
154
  | `ads tokens` | Inspect token values and themes |
157
155
  | `ads behaviors` | Inspect registered behavior guarantees and current evidence |
158
156
  | `ads verify --unit <id>` | Run an owner's registered behavior checks |
159
157
  | `ads audit` | Run axe-core in every rendered UI scenario, once per brand and theme; findings are errors |
160
158
  | `ads assets` | Generate web icons, the glyph module, `themes.generated.css` and the renderer palette `themes.generated.ts` |
161
- | `ads lint-config` | Optional integration with an explicitly configured project linter |
162
159
  | `ads mcp` | Start the stdio MCP server and its local showcase |
163
160
  | `ads showcase` | Start the same MCP runtime for browser-only inspection |
164
161
 
@@ -182,7 +179,8 @@ claude mcp add --transport stdio --scope project ads -- npx -y @reqvire-org/ads
182
179
  ```
183
180
 
184
181
  Restart your client in that project. `npx` uses its installed ADS version or
185
- downloads the published package. See the [MCP guide](docs/MCP.md#connect-codex-or-claude)
182
+ downloads the published package; ADS itself runs on Bun 1.4.1+, so Bun must be
183
+ installed. In a Bun project, use `bunx -y @reqvire-org/ads mcp` instead of `npx`. See the [MCP guide](docs/MCP.md#connect-codex-or-claude)
186
184
  for config files and Claude Desktop setup.
187
185
 
188
186
  To let the agent edit the ADS through enforced checks, append `--mutations` to
@@ -197,7 +195,8 @@ project and all its draft previews. See
197
195
  The server exposes public components/patterns, token values,
198
196
  source guides, controllers/hooks, architecture checks, behavioral verification,
199
197
  on-demand screenshots, workflow prompts, and packaged ADS skills.
200
- It supports older MCP clients and the newer Skills protocol.
198
+ It serves the same MCP protocol versions over stdio and HTTP: `2026-07-28`,
199
+ with native Skills, and the 2025-era versions.
201
200
 
202
201
  Private controllers stay beside their component; shared controllers have their own
203
202
  edit units. Optional behavior contracts connect guarantees to maintained checks.
@@ -207,11 +206,11 @@ Structured failure boundaries and compact investigation bundles help agents
207
206
  inspect the failing source, requests and available artifacts while preserving
208
207
  the intended design. Each result states what it established and left unverified.
209
208
 
210
- Experimental MCP Apps show an interactive token inspector and project-built
211
- token, component, pattern and composition scenarios. They use the same public implementations and fixtures
209
+ Experimental MCP Apps show the token and brand views ADS builds from project definitions and
210
+ the project's component, pattern and composition scenarios. They use the same public implementations and fixtures
212
211
  as the showcase. Text and resource access remain available without Apps support.
213
- Configure a project preview watcher in `ds.config.json` and MCP manages its
214
- startup, rebuilds and shutdown; the client launches only `ads mcp`.
212
+ Declare the project's framework in `ds.config.json`. MCP manages ADS's Bun
213
+ preview compiler, rebuilds and shutdown; the client launches only `ads mcp`.
215
214
  Build status and diagnostics remain readable through tools/resources, with
216
215
  notifications for subscribed clients and explicit errors from preview tools.
217
216
  See the [MCP guide](docs/MCP.md) for Codex/Claude setup, preview builds, prompts,
@@ -223,8 +222,8 @@ To inspect an existing component through MCP:
223
222
  2. `ads_catalog` finds the component and links its owning source, available guides
224
223
  and preview IDs. `ads_tokens` explains the values it uses.
225
224
  3. `ads_scenarios` finds a preview; `ads_show_scenario` opens the real entry with its
226
- colocated fixtures. Use `ads_show_tokens` for project-owned token samples.
227
- 4. After a change, check build freshness, run `ads_check` and project checks, then
225
+ colocated fixtures; token views are listed with `ads_scenarios({kind:"tokens"})`.
226
+ 4. After a change, check build freshness, run `ads_validate({scope:"changed"})`, then
228
227
  verify the refreshed preview and exercise its relevant states.
229
228
 
230
229
  This is what makes ADS useful through MCP: small, structured discovery leads to
@@ -267,27 +266,29 @@ npm run ads-read-mcp -- --port 4191 # read-only; run one at a time
267
266
 
268
267
  Open **http://127.0.0.1:4191/**. Both commands build the local tool first and
269
268
  start stdio MCP, the showcase and the managed preview compiler.
270
- `dev:showcase` starts the browser-only runtime and also builds the local tool.
269
+ `dev:showcase` builds the local tool, initializes its Preact starter under ignored
270
+ `.ds/playground/`, and starts the browser-only runtime. `bun run dev:react` selects React.
271
+ Edit `starters/shared/` and restart to preview source changes.
271
272
  Open the printed URL when choosing another port.
272
273
  `--port 4185` chooses a fixed port; the default chooses an available port.
273
274
  The title and left pane align; the title toggle hides/restores both. Minimize the
274
275
  header for a full preview, then refresh to restore it.
275
276
 
276
- A configured project compiler builds a shared scenario graph on first demand
277
+ ADS's managed Bun compiler builds a shared scenario graph on first demand
277
278
  and watches code, styles, fixtures and assets. The App loads only the selected
278
279
  scenario and its dependencies. Notifications update menus and refresh the active
279
280
  scenario after a successful build. Failures show diagnostics and identify stale
280
281
  output. `ads_tokens` inspects definitions independently of preview builds. Compilation still
281
282
  happens automatically; no separate project showcase rebuild is needed.
282
283
 
283
- For an existing app, `init` adds the showcase launch script; it does not install
284
- a preview compiler. Integrate the [starter compiler and mount adapter](docs/GUIDE.md#showcase)
285
- with your build. Projects from `ads create` already include that setup.
284
+ For an existing app, `init` adds showcase launch scripts and a missing native
285
+ framework mount; ADS supplies the preview compiler. Keep the application's build
286
+ integration separate. See the [showcase setup](docs/GUIDE.md#showcase).
286
287
 
287
- There are no required showcase page files. Add a colocated scenario and fixture
288
- for tokens and each public UI owner; larger entries live under `composition/`.
289
- ADS rejects invented token names, tokens without reachable scenarios, and public
290
- components/patterns without real render coverage. Development inputs stay out
288
+ There are no required showcase page files. ADS renders the Tokens and Brand views
289
+ from the token sheets, `tokens/catalog.ads.json` and `assets/brand/`. Add a colocated
290
+ scenario and fixture for each public UI owner; larger entries live under `composition/`.
291
+ ADS rejects invented token names and public components/patterns without real render coverage. Development inputs stay out
291
292
  of production. Full-app harnesses belong in application tests. See the
292
293
  [architecture](docs/ARCHITECTURE.md#the-showcase-is-the-shared-design-workspace),
293
294
  [contract](docs/ADS.md#showcase-contract) and [setup guide](docs/GUIDE.md#showcase).
@@ -303,8 +304,8 @@ Change values in `design-system/tokens/`, keeping the
303
304
  [themes](docs/GUIDE.md#tokens-grid-icons-and-accessibility).
304
305
 
305
306
  Keep original artwork, with its use, credits and license in a README, in
306
- `design-system/assets/brand/`; `ads check` fails on undescribed, unlicensed or
307
- unpreviewed artwork and lists unused artwork for review. Name dark-theme variants `<name>.dark.svg`.
307
+ `design-system/assets/brand/`; `ads check` fails on undescribed or unlicensed artwork and
308
+ lists unused artwork for review. ADS shows the artwork in the Brand view itself. Name dark-theme variants `<name>.dark.svg`.
308
309
  Committed native and export icons (`assets.targets`: SVG, PNG, ICO, ICNS) and UI
309
310
  icon sets (`assets.glyphs`) are generated by `ads assets` and checked for freshness.
310
311
  Other products' logos are not brand artwork or glyphs: keep them, in their own
@@ -327,27 +328,24 @@ app's bundler. With no icon source, generation is skipped. See the
327
328
  Install skills with `npx skills`:
328
329
 
329
330
  ```sh
330
- npx skills add reqvire-org/ads --skill ads-designer --skill ads-import --skill ads-port --skill ads-break-ui --skill ads-motion
331
+ npx skills add reqvire-org/ads --skill ads-designer --skill ads-import --skill ads-port --skill ads-migrate
331
332
  ```
332
333
 
333
334
  For local development, install from this checkout:
334
335
 
335
336
  ```sh
336
- npx skills add ./skills --skill ads-designer --skill ads-import --skill ads-port --skill ads-break-ui --skill ads-motion
337
+ npx skills add ./skills --skill ads-designer --skill ads-import --skill ads-port --skill ads-migrate
337
338
  ```
338
339
 
339
- Acknowledgments: `ads-designer`'s craft/mobile guidance, `ads-break-ui`, and
340
- `ads-motion` adapt [Emil Kowalski's MIT-licensed skills](https://github.com/emilkowalski/skills).
341
- Their local [designer](skills/ads-designer/README.md),
342
- [break-ui](skills/ads-break-ui/README.md), and [motion](skills/ads-motion/README.md)
343
- credits record the sources and revision. Each skill keeps the upstream MIT
344
- notice beside its files.
340
+ Acknowledgments: `ads-designer`'s craft, mobile, stress-testing and motion guidance
341
+ adapts [Emil Kowalski's MIT-licensed skills](https://github.com/emilkowalski/skills).
342
+ Its [credits](skills/ads-designer/README.md) record the sources and revision, and the
343
+ upstream MIT notice stays beside its files.
345
344
 
346
- - [ads-designer](skills/ads-designer/SKILL.md): start an ADS or build UI with your local ADS.
345
+ - [ads-designer](skills/ads-designer/SKILL.md): start an ADS or build UI with your local ADS, including layout, motion and stress-testing with difficult content.
347
346
  - [ads-import](skills/ads-import/SKILL.md): import external components, patterns, styles, token values, or brand artwork.
348
347
  - [ads-port](skills/ads-port/SKILL.md): port library components into your ADS using shared tokens and primitives.
349
- - [ads-break-ui](skills/ads-break-ui/SKILL.md): stress-test real components and patterns with difficult content.
350
- - [ads-motion](skills/ads-motion/SKILL.md): implement, review, audit, or profile component animation.
348
+ - [ads-migrate](skills/ads-migrate/SKILL.md): upgrade an existing design system between ADS versions, following the relevant migration guide.
351
349
 
352
350
  See the [skill guide](skills/README.md) for examples and source credits.
353
351
 
@@ -361,6 +359,15 @@ $ads-import /path/to/source-repo brand
361
359
 
362
360
  ## Development and references
363
361
 
362
+ Start with [AGENTS.md](AGENTS.md) for repository ownership, development commands,
363
+ verification and required benchmarks. The [performance guide](docs/benchmarks/README.md)
364
+ separates native analysis/acceptance measurements from preview and browser work.
365
+
366
+ `bun run dev:ui` opens ADS's own showcase design system from `showcase-ui/`, using
367
+ the current checkout's tooling. `bun run dev` opens the separate Preact starter.
368
+ The host and its UI scenarios share components; see the
369
+ [showcase UI guide](showcase-ui/README.md).
370
+
364
371
  To develop ADS itself against another project, use the
365
372
  [npm link workflow](docs/GUIDE.md#develop-ads-locally). Consumer setup above uses the
366
373
  published package; local development uses your linked checkout.
@@ -376,18 +383,36 @@ real token/component/pattern/composition Apps, switch themes, inspect build erro
376
383
  try tools, resources, prompts and skills. See the
377
384
  [MCP explorer guide](mcp-explorer/README.md) for the small test flow.
378
385
 
379
- This repository uses its own local ADS to try ideas and verify the complete flow.
386
+ This repository uses the shipped starter to verify the complete flow.
380
387
  The showcase is the visual/interaction review surface; automated tests also
381
388
  check tool behavior and the example build:
382
389
 
383
390
  ```sh
384
- npm test # Tool guards and packed npm install/build tests
385
- npm run build:project # ADS guards, type checking, example build and showcase
391
+ bun run test # Build once; unit, integration and browser groups with separate worker limits
392
+ bun run test:unit # Unit helpers: 4 file workers, up to 4 async cases per file
393
+ bun run test:integration # Native compiler, MCP/CLI and packed projects: 2 file workers
394
+ bun run test:browser # Real browser tests: 4 file workers
395
+ bun run test:grid # Compact pass/fail dots; always sequential (1 worker)
396
+ ADS_DRAFT_DEBUG=1 bun test tests/browser/drafts-browser.test.mjs # also keeps the split-view page state and a screenshot in a printed temp folder
397
+ bun run build:project # ADS guards, type checking and the initialized Preact starter build
386
398
  ```
387
399
 
388
- Set `ADS_TEST_BUN=1` when running `npm test` to test the installed package with
389
- Node/npm/npx unavailable, including Bun builds, MCP previews and guarded checks.
390
- Browser behavior/capture checks also run when a supported browser is installed.
400
+ ADS's tools and tests run on Bun. The packed-package tests install ADS into an npm
401
+ project and into a Bun project with Node unavailable, and a Node check loads the
402
+ exports a project's own build imports. Browser behavior/capture checks also run
403
+ when a supported browser is installed.
404
+
405
+ All three groups overlap after one shared build. Tune their workers with
406
+ environment variables, for example `ADS_UNIT_WORKERS=8 ADS_INTEGRATION_WORKERS=4 bun run test`.
407
+ Browser defaults to four file workers. Release verification uses the same
408
+ settings. See [test configuration](tests/README.md) for local files, CI examples
409
+ and per-group controls.
410
+
411
+ Package tests keep dependency downloads in `.ds/test-package-cache/npm` and
412
+ `.ds/test-package-cache/bun`; each run still installs the current tarball into fresh
413
+ temporary projects. `ADS_TEST_NPM_CACHE` and `ADS_TEST_BUN_CACHE` override these
414
+ locations; `npm_config_cache` and `BUN_INSTALL_CACHE_DIR` are also respected.
415
+ Point the ADS overrides at empty directories to measure a cold install.
391
416
 
392
417
  Tool source lives in `src/`; tests and the dummy project live in `tests/`.
393
418
 
@@ -395,23 +420,17 @@ See the [tooling contract](docs/ADS.md) and [tool guide](docs/GUIDE.md) for enfo
395
420
  and setup.
396
421
  The [dummy project](tests/fixtures/guard-project/README.md) tests the generic guards with passing and failing cases.
397
422
 
398
- There are two different starting points in this checkout:
399
-
400
- - [starters/react/](starters/react/README.md) is the React application starter, and
401
- [starters/preact/](starters/preact/) the files that replace it for Preact:
402
- a token foundation in six groups (AA contrast in both themes, a 2 px
403
- rhythm), light and dark themes declared in `ds.config.json` that apply to the page or one
404
- section at any depth, a column grid, an icon set, a brand preview with placeholder artwork, build
405
- setup, example components, a pattern and a composition, development-only review
406
- renderers, and a project preview compiler adapter. They ship in the npm package;
407
- `ads create` copies them into a new project, and `ads init` uses their foundation
408
- files when a project has no ADS.
409
- - [design-system/](design-system/README.md) is this repository's working example,
410
- with real components, patterns, and scenarios inspected through the built-in showcase. It demonstrates the architecture
411
- and helps us develop the tooling. Its UI source is excluded from the npm package
412
- and is not automatically copied into projects.
423
+ There is one maintained example: [the shared starter](starters/README.md).
424
+ Its tokens, assets and UI live in [starters/shared/](starters/shared/README.md);
425
+ React and Preact retain only small native mount adapters. The tool build generates
426
+ the two framework variants, `ads init --include-starter` installs them, and the
427
+ repository playground inspects an initialized copy of that same source.
413
428
 
414
429
  Licensed under [MIT](LICENSE). Adapted third-party material retains its upstream
415
430
  notices.
416
431
 
432
+ The spatial defaults and design guidance draw on IBM Carbon's 2x Grid and IBM Design
433
+ Language. See [design references and acknowledgments](docs/DESIGN-REFERENCES.md)
434
+ for the adopted concepts, source revision and treatment of third-party material.
435
+
417
436
 
package/dist/a11y.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { existsSync, readFileSync } from "node:fs";
2
2
  import path from "node:path";
3
- import ts from "typescript";
3
+ import ts from "./analysis/syntax.mjs";
4
4
  import { isDevelopmentFile, isInside, sourceFiles } from "./config.mjs";
5
5
  import { parseColor } from "./token-quality.mjs";
6
6
  import { baseDefinition } from "./themes.mjs";
@@ -11,13 +11,22 @@ import { findingSeverity } from "./finding-rules.mjs";
11
11
  // alternatives, keyboard reach, autoplaying motion), each with its WCAG reference. Keyboard reach
12
12
  // is a review item (a delegated control may handle it); the rest are errors.
13
13
 
14
- const advisory = (rule, { file, line = 1, column = 1 }, message, tokens) => ({ rule, severity: findingSeverity(rule), file, line, column, ...(tokens ? { tokens } : {}), guidanceUri: "ads://guides/accessibility", message });
14
+ const advisory = (rule, { file, line = 1, column = 1 }, message, tokens) => ({
15
+ rule,
16
+ severity: findingSeverity(rule),
17
+ file,
18
+ line,
19
+ column,
20
+ ...(tokens ? { tokens } : {}),
21
+ guidanceUri: "ads://guides/accessibility",
22
+ message,
23
+ });
15
24
  /** Pixels of a px/rem length, or null. */
16
- const pixels = value => {
25
+ const pixels = (value) => {
17
26
  const match = value.trim().match(/^(\d*\.?\d+)(px|rem)$/);
18
27
  return match ? Number(match[1]) * (match[2] === "rem" ? 16 : 1) : null;
19
28
  };
20
- const isAlias = value => value.trim().startsWith("var(");
29
+ const isAlias = (value) => value.trim().startsWith("var(");
21
30
 
22
31
  /** Token-level guards over the inventory's definitions and the foundation sheet. */
23
32
  export function a11yTokenAdvisories(tokens, { foundationFile, root } = {}) {
@@ -28,30 +37,60 @@ export function a11yTokenAdvisories(tokens, { foundationFile, root } = {}) {
28
37
  if (!root || isAlias(root.value)) continue;
29
38
  if (token.name.startsWith("--control-height-")) {
30
39
  const size = pixels(root.value);
31
- if (size !== null && size < 24) advisories.push(advisory("a11y-target-size", root, `${token.name} is ${size}px; pointer targets need at least 24×24 px (WCAG 2.5.8), 44 px where touch is common.`, [token.name]));
40
+ if (size !== null && size < 24)
41
+ advisories.push(
42
+ advisory("a11y-target-size", root, `${token.name} is ${size}px; pointer targets need at least 24×24 px (WCAG 2.5.8), 44 px where touch is common.`, [
43
+ token.name,
44
+ ]),
45
+ );
32
46
  }
33
47
  if (token.name === "--focus-w") {
34
48
  const size = pixels(root.value);
35
- if (size !== null && size < 2) advisories.push(advisory("a11y-focus", root, `--focus-w is ${size}px; focus indicators need at least 2 px to stay visible (WCAG 2.4.7, 2.4.13).`, [token.name]));
49
+ if (size !== null && size < 2)
50
+ advisories.push(
51
+ advisory("a11y-focus", root, `--focus-w is ${size}px; focus indicators need at least 2 px to stay visible (WCAG 2.4.7, 2.4.13).`, [token.name]),
52
+ );
36
53
  }
37
54
  // Font sizes, not text colors: a px size ignores the reader's browser font size.
38
55
  if (token.name.startsWith("--text-") && !parseColor(root.value) && /\d(?:\.\d+)?px\b/.test(root.value) && !/\d(?:\.\d+)?r?em\b/.test(root.value)) {
39
- advisories.push(advisory("a11y-text-resize", root, `${token.name} is ${root.value.trim()}; use rem so text follows the reader's font size (WCAG 1.4.4).`, [token.name]));
56
+ advisories.push(
57
+ advisory("a11y-text-resize", root, `${token.name} is ${root.value.trim()}; use rem so text follows the reader's font size (WCAG 1.4.4).`, [token.name]),
58
+ );
40
59
  }
41
- if (token.name.startsWith("--dur-") && !/^0(?:m?s)?$/.test(root.value.trim()) && !token.definitions.some(definition => /prefers-reduced-motion/.test(definition.scope))) {
42
- advisories.push(advisory("a11y-reduced-motion", root, `${token.name} has no value under @media (prefers-reduced-motion: reduce); set it to 0ms there (WCAG 2.3.3).`, [token.name]));
60
+ if (
61
+ token.name.startsWith("--dur-") &&
62
+ !/^0(?:m?s)?$/.test(root.value.trim()) &&
63
+ !token.definitions.some((definition) => /prefers-reduced-motion/.test(definition.scope))
64
+ ) {
65
+ advisories.push(
66
+ advisory("a11y-reduced-motion", root, `${token.name} has no value under @media (prefers-reduced-motion: reduce); set it to 0ms there (WCAG 2.3.3).`, [
67
+ token.name,
68
+ ]),
69
+ );
43
70
  }
44
71
  if (token.name === "--leading-normal") {
45
72
  const value = Number(root.value.trim());
46
- if (Number.isFinite(value) && value < 1.5) advisories.push(advisory("a11y-text-spacing", root, `--leading-normal is ${value}; body text needs a line height of at least 1.5 (WCAG 1.4.8, 1.4.12).`, [token.name]));
73
+ if (Number.isFinite(value) && value < 1.5)
74
+ advisories.push(
75
+ advisory("a11y-text-spacing", root, `--leading-normal is ${value}; body text needs a line height of at least 1.5 (WCAG 1.4.8, 1.4.12).`, [
76
+ token.name,
77
+ ]),
78
+ );
47
79
  }
48
80
  if (token.name === "--content-max") {
49
81
  const match = root.value.trim().match(/^(\d*\.?\d+)ch$/);
50
- if (match && Number(match[1]) > 80) advisories.push(advisory("a11y-text-spacing", root, `--content-max is ${match[1]}ch; keep text lines under 80 characters (WCAG 1.4.8).`, [token.name]));
82
+ if (match && Number(match[1]) > 80)
83
+ advisories.push(advisory("a11y-text-spacing", root, `--content-max is ${match[1]}ch; keep text lines under 80 characters (WCAG 1.4.8).`, [token.name]));
51
84
  }
52
85
  }
53
86
  if (foundationFile && existsSync(foundationFile) && !/:focus-visible\b/.test(readFileSync(foundationFile, "utf8"))) {
54
- advisories.push(advisory("a11y-focus", { file: path.relative(root, foundationFile).replaceAll("\\", "/") }, "The foundation styles no :focus-visible indicator; keyboard users must see where focus is (WCAG 2.4.7)."));
87
+ advisories.push(
88
+ advisory(
89
+ "a11y-focus",
90
+ { file: path.relative(root, foundationFile).replaceAll("\\", "/") },
91
+ "The foundation styles no :focus-visible indicator; keyboard users must see where focus is (WCAG 2.4.7).",
92
+ ),
93
+ );
55
94
  }
56
95
  return advisories;
57
96
  }
@@ -60,33 +99,66 @@ const nonInteractive = new Set(["div", "span", "p", "li", "section", "article",
60
99
  // Children of composite widgets: the container owns focus (aria-activedescendant or roving).
61
100
  const managedRoles = new Set(["option", "menuitem", "menuitemcheckbox", "menuitemradio", "tab", "treeitem", "row", "gridcell"]);
62
101
  /** Source guards over runtime components and patterns (not previews, fixtures or tests). */
63
- export function a11ySourceAdvisories({ root, dsRoot }) {
102
+ export async function a11ySourceAdvisories({ root, dsRoot }) {
64
103
  const advisories = [];
65
104
  const options = { root, dsRoot };
66
- const files = sourceFiles(dsRoot).filter(file => /\.[jt]sx$/.test(file) && ["components", "patterns"].some(layer => isInside(path.join(dsRoot, layer), file)) && !isDevelopmentFile(file, options) && !/\.test\.|\.spec\./.test(file));
105
+ const files = sourceFiles(dsRoot).filter(
106
+ (file) =>
107
+ /\.[jt]sx$/.test(file) &&
108
+ ["components", "patterns"].some((layer) => isInside(path.join(dsRoot, layer), file)) &&
109
+ !isDevelopmentFile(file, options) &&
110
+ !/\.test\.|\.spec\./.test(file),
111
+ );
67
112
  for (const file of files) {
68
- const text = readFileSync(file, "utf8"), relative = path.relative(root, file).replaceAll("\\", "/");
69
- const source = ts.createSourceFile(file, text, ts.ScriptTarget.Latest, true, ts.ScriptKind.TSX);
70
- const at = node => { const { line, character } = source.getLineAndCharacterOfPosition(node.getStart(source)); return { file: relative, line: line + 1, column: character + 1 }; };
71
- const visit = node => {
113
+ const text = readFileSync(file, "utf8"),
114
+ relative = path.relative(root, file).replaceAll("\\", "/");
115
+ const source = await ts.createSourceFile(file, text, ts.ScriptTarget.Latest, true, ts.ScriptKind.TSX);
116
+ const at = (node) => {
117
+ const { line, character } = source.getLineAndCharacterOfPosition(node.getStart(source));
118
+ return { file: relative, line: line + 1, column: character + 1 };
119
+ };
120
+ const visit = (node) => {
72
121
  if (ts.isJsxSelfClosingElement(node) || ts.isJsxOpeningElement(node)) {
73
122
  const tag = node.tagName.getText(source);
74
123
  const attributes = node.attributes.properties;
75
124
  const spread = attributes.some(ts.isJsxSpreadAttribute);
76
- const names = new Set(attributes.filter(ts.isJsxAttribute).map(attribute => attribute.name.getText(source)));
77
- if (tag === "img" && !spread && !names.has("alt")) advisories.push(advisory("a11y-image-alt", at(node), `<img> needs alt text, or alt="" when it is decorative (WCAG 1.1.1).`));
125
+ const names = new Set(attributes.filter(ts.isJsxAttribute).map((attribute) => attribute.name.getText(source)));
126
+ if (tag === "img" && !spread && !names.has("alt"))
127
+ advisories.push(advisory("a11y-image-alt", at(node), `<img> needs alt text, or alt="" when it is decorative (WCAG 1.1.1).`));
78
128
  // A button or link whose only content is an icon, SVG or image has no accessible name.
79
- if (ts.isJsxOpeningElement(node) && ["button", "a"].includes(tag) && !spread && !["aria-label", "aria-labelledby", "title"].some(name => names.has(name))) {
80
- const children = node.parent.children.filter(child => !(ts.isJsxText(child) && !child.text.trim()));
81
- const graphic = child => ts.isJsxSelfClosingElement(child) && (/Icon|Glyph|Svg/i.test(child.tagName.getText(source)) || ["svg", "img"].includes(child.tagName.getText(source)));
82
- if (children.length && children.every(graphic)) advisories.push(advisory("a11y-icon-label", at(node), `<${tag}> shows only an icon and has no accessible name; add aria-label (or use IconButton with a label) (WCAG 4.1.2).`));
129
+ if (
130
+ ts.isJsxOpeningElement(node) &&
131
+ ["button", "a"].includes(tag) &&
132
+ !spread &&
133
+ !["aria-label", "aria-labelledby", "title"].some((name) => names.has(name))
134
+ ) {
135
+ const children = node.parent.children.filter((child) => !(ts.isJsxText(child) && !child.text.trim()));
136
+ const graphic = (child) =>
137
+ ts.isJsxSelfClosingElement(child) &&
138
+ (/Icon|Glyph|Svg/i.test(child.tagName.getText(source)) || ["svg", "img"].includes(child.tagName.getText(source)));
139
+ if (children.length && children.every(graphic))
140
+ advisories.push(
141
+ advisory(
142
+ "a11y-icon-label",
143
+ at(node),
144
+ `<${tag}> shows only an icon and has no accessible name; add aria-label (or use IconButton with a label) (WCAG 4.1.2).`,
145
+ ),
146
+ );
83
147
  }
84
- const attribute = name => attributes.find(item => ts.isJsxAttribute(item) && item.name.getText(source) === name);
85
- const role = attribute("role")?.initializer?.getText(source).replace(/^["'{]+|["'}]+$/g, "");
148
+ const attribute = (name) => attributes.find((item) => ts.isJsxAttribute(item) && item.name.getText(source) === name);
149
+ const role = attribute("role")
150
+ ?.initializer?.getText(source)
151
+ .replace(/^["'{]+|["'}]+$/g, "");
86
152
  // A backdrop that closes on its own click repeats Escape; it is not the keyboard path.
87
153
  const backdrop = /currentTarget/.test(attribute("onClick")?.getText(source) ?? "");
88
154
  if (nonInteractive.has(tag) && !spread && names.has("onClick") && !backdrop && !managedRoles.has(role) && !(role && names.has("tabIndex"))) {
89
- advisories.push(advisory("a11y-keyboard", at(node), `<${tag} onClick> cannot be reached or used from the keyboard; use a <button>, or add role, tabIndex and a key handler (WCAG 2.1.1).`));
155
+ advisories.push(
156
+ advisory(
157
+ "a11y-keyboard",
158
+ at(node),
159
+ `<${tag} onClick> cannot be reached or used from the keyboard; use a <button>, or add role, tabIndex and a key handler (WCAG 2.1.1).`,
160
+ ),
161
+ );
90
162
  }
91
163
  }
92
164
  ts.forEachChild(node, visit);
@@ -94,8 +166,15 @@ export function a11ySourceAdvisories({ root, dsRoot }) {
94
166
  visit(source);
95
167
  // Motion that never stops must yield to the reader's reduced-motion setting.
96
168
  if (/animation(?:-iteration-count)?\s*:[^;`]*\binfinite\b/.test(text) && !/prefers-reduced-motion/.test(text)) {
97
- const index = text.search(/\binfinite\b/), line = text.slice(0, index).split("\n").length;
98
- advisories.push(advisory("a11y-reduced-motion", { file: relative, line }, "An infinite animation runs without a prefers-reduced-motion guard; stop it under @media (prefers-reduced-motion: reduce), or let the user pause it (WCAG 2.2.2, 2.3.3)."));
169
+ const index = text.search(/\binfinite\b/),
170
+ line = text.slice(0, index).split("\n").length;
171
+ advisories.push(
172
+ advisory(
173
+ "a11y-reduced-motion",
174
+ { file: relative, line },
175
+ "An infinite animation runs without a prefers-reduced-motion guard; stop it under @media (prefers-reduced-motion: reduce), or let the user pause it (WCAG 2.2.2, 2.3.3).",
176
+ ),
177
+ );
99
178
  }
100
179
  }
101
180
  return advisories;
@@ -0,0 +1,13 @@
1
+ import path from "node:path";
2
+
3
+ /** Translate a consuming project's baseUrl into native compiler path mappings.
4
+ * TypeScript 7 no longer resolves imports through baseUrl; applications may
5
+ * still build with their own earlier compiler and retain that configuration. */
6
+ export function nativeCompilerOptions(options, root) {
7
+ if (!options.baseUrl) return options;
8
+ const base = path.resolve(root, options.baseUrl);
9
+ const paths = Object.fromEntries(Object.entries(options.paths ?? {}).map(([alias, targets]) => [alias, targets.map((target) => path.resolve(base, target))]));
10
+ paths["*"] ??= [path.join(base, "*")];
11
+ const { baseUrl: _baseUrl, ...rest } = options;
12
+ return { ...rest, paths, pathsBasePath: base };
13
+ }