@reqvire-org/ads 0.3.53 → 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 (401) hide show
  1. package/README.md +114 -94
  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 +6 -6
  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 +222 -79
  21. package/dist/boundaries.mjs +137 -40
  22. package/dist/brand-assets.mjs +219 -47
  23. package/dist/brands.mjs +86 -27
  24. package/dist/bun-compiler.mjs +34 -13
  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 +66 -0
  30. package/dist/check.mjs +756 -196
  31. package/dist/cli.mjs +203 -100
  32. package/dist/color-values.mjs +21 -21
  33. package/dist/component-contrast.mjs +2 -2
  34. package/dist/config.mjs +308 -163
  35. package/dist/construction-styles.cjs +10 -0
  36. package/dist/contracts.d.mts +9 -0
  37. package/dist/control-padding.mjs +45 -25
  38. package/dist/css-values.mjs +3 -2
  39. package/dist/declarative-flow.mjs +209 -109
  40. package/dist/design-values.mjs +136 -51
  41. package/dist/development-runtime.mjs +4 -6
  42. package/dist/draft-boundary.mjs +11 -6
  43. package/dist/evidence.mjs +1 -1
  44. package/dist/finding-rules.mjs +7 -5
  45. package/dist/font-rules.mjs +2 -2
  46. package/dist/fonts-generated.mjs +4 -2
  47. package/dist/foundation-views.mjs +238 -0
  48. package/dist/foundation.mjs +63 -39
  49. package/dist/generated-entries.mjs +198 -0
  50. package/dist/icons.mjs +80 -33
  51. package/dist/image-attributes.mjs +109 -36
  52. package/dist/image-size.mjs +1 -1
  53. package/dist/index.mjs +0 -2
  54. package/dist/init.mjs +128 -68
  55. package/dist/investigations.mjs +2 -2
  56. package/dist/layers.mjs +300 -127
  57. package/dist/layout-widths.mjs +180 -85
  58. package/dist/linaria/preserve-values.cjs +7 -0
  59. package/dist/linaria/spatial-inputs.cjs +56 -0
  60. package/dist/lockup-composition.mjs +44 -0
  61. package/dist/lockup-model.cjs +64 -0
  62. package/dist/mcp/THIRD_PARTY_NOTICES.md +51 -1
  63. package/dist/mcp/apps.mjs +4 -30
  64. package/dist/mcp/behavior-pages.mjs +72 -24
  65. package/dist/mcp/build-status.mjs +257 -64
  66. package/dist/mcp/catalog.mjs +91 -26
  67. package/dist/mcp/context.mjs +17 -18
  68. package/dist/mcp/draft-discovery.mjs +44 -21
  69. package/dist/mcp/drafts.mjs +978 -343
  70. package/dist/mcp/execution-coordinator.mjs +417 -167
  71. package/dist/mcp/execution-results.mjs +7 -7
  72. package/dist/mcp/mutations.mjs +701 -219
  73. package/dist/mcp/preview-watch.mjs +465 -161
  74. package/dist/mcp/preview-widget.bundle.js +44 -50
  75. package/dist/mcp/prompts.mjs +6 -6
  76. package/dist/mcp/result-pages.mjs +1 -1
  77. package/dist/mcp/sandbox-host.mjs +1 -1
  78. package/dist/mcp/server.mjs +2436 -570
  79. package/dist/mcp/showcase-host.mjs +176 -39
  80. package/dist/mcp/skills.mjs +1 -1
  81. package/dist/mcp/text-diff.mjs +29 -10
  82. package/dist/paint-contracts.mjs +174 -81
  83. package/dist/palette-generated.mjs +2 -2
  84. package/dist/preview-bun.mjs +493 -187
  85. package/dist/preview-failure.mjs +1 -1
  86. package/dist/preview-files.mjs +13 -13
  87. package/dist/preview-imports.mjs +104 -55
  88. package/dist/preview-inputs.mjs +2 -2
  89. package/dist/preview-requests.mjs +24 -0
  90. package/dist/preview-resources.mjs +288 -147
  91. package/dist/preview-scope.mjs +5 -4
  92. package/dist/program-cache.mjs +10 -0
  93. package/dist/project-documents.mjs +1 -1
  94. package/dist/public-api.mjs +70 -31
  95. package/dist/public-props.mjs +39 -22
  96. package/dist/{browser-audit → render-audit}/axe-run.mjs +3 -3
  97. package/dist/{browser-audit → render-audit}/image-shape.mjs +2 -2
  98. package/dist/{browser-audit → render-audit}/layout-overflow.mjs +86 -23
  99. package/dist/{browser-audit → render-audit}/non-text-contrast.mjs +86 -27
  100. package/dist/{browser-audit → render-audit}/render-states.mjs +208 -52
  101. package/dist/{browser-audit → render-audit}/worker.mjs +86 -30
  102. package/dist/render-audit.mjs +828 -0
  103. package/dist/render-color-probe.mjs +96 -42
  104. package/dist/resource-limits.mjs +229 -97
  105. package/dist/runtime-contracts.mjs +467 -185
  106. package/dist/scenario-groups.mjs +22 -10
  107. package/dist/scenario-inspector.mjs +6 -43
  108. package/dist/scenario-program.mjs +8 -25
  109. package/dist/scenario-registry.mjs +72 -30
  110. package/dist/scenario-selectors.mjs +161 -64
  111. package/dist/scenario-slots.mjs +149 -56
  112. package/dist/scenario-trace.mjs +215 -109
  113. package/dist/scenarios-compiler.mjs +768 -359
  114. package/dist/scenarios-vite.d.mts +1 -3
  115. package/dist/scenarios-vite.mjs +2 -81
  116. package/dist/scenarios.mjs +424 -159
  117. package/dist/selector-match.mjs +2 -2
  118. package/dist/showcase/client.bundle.js +57 -56
  119. package/dist/showcase/draft-navigation.js +18 -0
  120. package/dist/showcase/favicon.ico +0 -0
  121. package/dist/showcase/favicon.svg +1 -0
  122. package/dist/showcase/foundation-view.css +55 -0
  123. package/dist/showcase/foundation-view.mjs +252 -0
  124. package/dist/showcase/guide-controls.ads.review.mjs +32 -0
  125. package/dist/showcase/icons.js +1 -145
  126. package/dist/showcase/index.html +3 -31
  127. package/dist/showcase/preview-frame.ads.review.css +46 -0
  128. package/dist/showcase/preview-frame.ads.review.d.mts +11 -0
  129. package/dist/showcase/preview-frame.ads.review.mjs +22 -0
  130. package/dist/showcase/preview-state.js +0 -9
  131. package/dist/showcase/refresh-scheduler.js +23 -0
  132. package/dist/showcase/style.css +5 -47
  133. package/dist/showcase/ui/ui.css +1353 -0
  134. package/dist/showcase/ui/ui.js +1062 -0
  135. package/dist/showcase-coverage.mjs +58 -37
  136. package/dist/skills/README.md +24 -23
  137. package/dist/skills/ads-designer/README.md +8 -2
  138. package/dist/skills/ads-designer/SKILL.md +152 -144
  139. package/dist/skills/ads-designer/references/accessibility.md +14 -11
  140. package/dist/skills/ads-designer/references/atomic-styles.md +4 -4
  141. package/dist/skills/ads-designer/references/behaviors.md +34 -30
  142. package/dist/skills/ads-designer/references/branding.md +98 -10
  143. package/dist/skills/ads-designer/references/captures.md +31 -31
  144. package/dist/skills/ads-designer/references/cli.md +21 -20
  145. package/dist/skills/ads-designer/references/contracts.md +63 -29
  146. package/dist/skills/ads-designer/references/design-data.md +49 -52
  147. package/dist/skills/ads-designer/references/drafts.md +71 -52
  148. package/dist/skills/ads-designer/references/evidence.md +1 -5
  149. package/dist/skills/ads-designer/references/guarded-editing.md +58 -51
  150. package/dist/skills/ads-designer/references/layers.md +1 -1
  151. package/dist/skills/ads-designer/references/layout.md +347 -0
  152. package/dist/skills/ads-designer/references/mobile.md +2 -1
  153. package/dist/skills/{ads-motion/references/performance.md → ads-designer/references/motion-performance.md} +5 -1
  154. package/dist/skills/{ads-motion/references/build.md → ads-designer/references/motion.md} +73 -5
  155. package/dist/skills/ads-designer/references/performance.md +3 -2
  156. package/dist/skills/ads-designer/references/review.md +42 -38
  157. package/dist/skills/ads-designer/references/runtimes.md +33 -30
  158. package/dist/skills/ads-designer/references/scenarios.md +17 -19
  159. package/dist/skills/{ads-break-ui/references/catalog.md → ads-designer/references/stress-catalog.md} +3 -1
  160. package/dist/skills/ads-designer/references/stress-test.md +68 -0
  161. package/dist/skills/ads-designer/references/validation.md +83 -71
  162. package/dist/skills/ads-designer/references/workflows.md +19 -37
  163. package/dist/skills/ads-import/SKILL.md +43 -328
  164. package/dist/skills/ads-import/references/atomic-styles.md +4 -4
  165. package/dist/skills/ads-import/references/behaviors.md +34 -30
  166. package/dist/skills/ads-import/references/branding.md +5 -5
  167. package/dist/skills/ads-import/references/captures.md +31 -31
  168. package/dist/skills/ads-import/references/cli.md +21 -20
  169. package/dist/skills/ads-import/references/compatibility.md +1 -1
  170. package/dist/skills/ads-import/references/contracts.md +63 -29
  171. package/dist/skills/ads-import/references/design-data.md +49 -52
  172. package/dist/skills/ads-import/references/drafts.md +71 -52
  173. package/dist/skills/ads-import/references/evidence.md +1 -5
  174. package/dist/skills/ads-import/references/guarded-editing.md +58 -51
  175. package/dist/skills/ads-import/references/implementation.md +2 -1
  176. package/dist/skills/ads-import/references/layers.md +1 -1
  177. package/dist/skills/ads-import/references/layout.md +347 -0
  178. package/dist/skills/ads-import/references/review.md +42 -38
  179. package/dist/skills/ads-import/references/runtimes.md +33 -30
  180. package/dist/skills/ads-import/references/scenarios.md +17 -19
  181. package/dist/skills/ads-import/references/tokens.md +3 -3
  182. package/dist/skills/ads-import/references/validation.md +83 -71
  183. package/dist/skills/ads-import/references/workflows.md +19 -37
  184. package/dist/skills/ads-migrate/SKILL.md +56 -0
  185. package/dist/skills/ads-migrate/references/0.4.1-to-0.4.2.md +602 -0
  186. package/dist/skills/ads-port/SKILL.md +54 -346
  187. package/dist/skills/ads-port/references/atomic-styles.md +4 -4
  188. package/dist/skills/ads-port/references/behaviors.md +34 -30
  189. package/dist/skills/ads-port/references/captures.md +31 -31
  190. package/dist/skills/ads-port/references/cli.md +21 -20
  191. package/dist/skills/ads-port/references/contracts.md +63 -29
  192. package/dist/skills/ads-port/references/design-data.md +49 -52
  193. package/dist/skills/ads-port/references/drafts.md +71 -52
  194. package/dist/skills/ads-port/references/evidence.md +1 -5
  195. package/dist/skills/ads-port/references/guarded-editing.md +58 -51
  196. package/dist/skills/ads-port/references/layers.md +1 -1
  197. package/dist/skills/ads-port/references/layout.md +347 -0
  198. package/dist/skills/ads-port/references/lint-and-docs.md +8 -11
  199. package/dist/skills/ads-port/references/native-implementation.md +8 -7
  200. package/dist/skills/ads-port/references/review.md +42 -38
  201. package/dist/skills/ads-port/references/runtimes.md +33 -30
  202. package/dist/skills/ads-port/references/scenarios.md +17 -19
  203. package/dist/skills/ads-port/references/validation.md +83 -71
  204. package/dist/skills/ads-port/references/workflows.md +19 -37
  205. package/dist/source-symbols.mjs +1 -8
  206. package/dist/source-values.mjs +266 -128
  207. package/dist/spatial-composition.mjs +322 -0
  208. package/dist/spatial-contexts.cjs +56 -0
  209. package/dist/spatial-css.cjs +351 -0
  210. package/dist/spatial-inputs.cjs +80 -0
  211. package/dist/spatial-metadata.mjs +18 -0
  212. package/dist/spatial-model.cjs +322 -0
  213. package/dist/spatial.mjs +21 -0
  214. package/dist/stage-timing.cjs +20 -0
  215. package/dist/starters/preact/design-system/patterns/Conversation/Conversation.tsx +105 -0
  216. package/dist/starters/preact/design-system/patterns/Shell/Shell.tsx +275 -0
  217. package/dist/starters/preact/design-system/review/demo-frame/DemoFrame.ads.review.tsx +7 -0
  218. package/dist/starters/preact/design-system/review/screen-frame/ScreenFrame.ads.review.tsx +10 -0
  219. package/dist/starters/preact/design-system/showcase/mcp/main.ads.mount.tsx +8 -0
  220. package/dist/starters/preact/ds.config.json +24 -19
  221. package/dist/starters/preact/package.json +4 -8
  222. package/dist/starters/preact/tsconfig.json +4 -5
  223. package/dist/starters/preact/vite.config.ts +3 -3
  224. package/dist/starters/react/ADS.md +42 -47
  225. package/dist/starters/react/README.md +54 -52
  226. package/dist/starters/react/design-system/components/Actions/Button/Button.ads.exports.ts +1 -0
  227. package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.ads.exports.ts +1 -0
  228. package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.tsx +18 -2
  229. package/dist/starters/react/design-system/components/Actions/IconButton/README.md +3 -0
  230. package/dist/starters/react/design-system/components/Content/Icon/Icon.ads.exports.ts +1 -0
  231. package/dist/starters/react/design-system/components/Content/Image/Image.ads.exports.ts +1 -0
  232. package/dist/starters/react/design-system/components/Content/Logo/Logo.ads.exports.ts +1 -0
  233. package/dist/starters/react/design-system/components/Forms/TextField/TextField.ads.exports.ts +1 -0
  234. package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/README.md +5 -0
  235. package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/WorkspacePage.ads.fixture.ts +13 -0
  236. package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/WorkspacePage.ads.scenario.tsx +22 -0
  237. package/dist/starters/react/design-system/controllers/Palette/Palette.ads.exports.ts +1 -0
  238. package/dist/starters/react/design-system/index.ts +5 -8
  239. package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.exports.ts +1 -0
  240. package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.fixture.ts +7 -0
  241. package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.scenario.tsx +15 -0
  242. package/dist/starters/react/design-system/patterns/Conversation/Conversation.tsx +105 -0
  243. package/dist/starters/react/design-system/patterns/Conversation/README.md +9 -0
  244. package/dist/starters/react/design-system/patterns/Search/SearchBar/SearchBar.ads.exports.ts +1 -0
  245. package/dist/starters/react/design-system/patterns/Shell/Floating.ads.fixture.ts +5 -0
  246. package/dist/starters/react/design-system/patterns/Shell/Floating.ads.scenario.tsx +21 -0
  247. package/dist/starters/react/design-system/patterns/Shell/README.md +43 -0
  248. package/dist/starters/react/design-system/patterns/Shell/Shell.ads.exports.ts +1 -0
  249. package/dist/starters/react/design-system/patterns/Shell/Shell.ads.fixture.ts +5 -0
  250. package/dist/starters/react/design-system/patterns/Shell/Shell.ads.scenario.tsx +21 -0
  251. package/dist/starters/react/design-system/patterns/Shell/Shell.tsx +274 -0
  252. package/dist/starters/react/design-system/review/demo-frame/DemoFrame.ads.exports.ts +1 -0
  253. package/dist/starters/react/design-system/review/demo-frame/DemoFrame.ads.review.tsx +7 -0
  254. package/dist/starters/react/design-system/review/index.ads.review.ts +4 -0
  255. package/dist/starters/react/design-system/review/region-block/RegionBlock.ads.exports.ts +1 -0
  256. package/dist/starters/react/design-system/review/region-block/RegionBlock.ads.review.tsx +6 -0
  257. package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.ads.exports.ts +1 -0
  258. package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.ads.review.tsx +10 -0
  259. package/dist/starters/react/design-system/showcase/mcp/{main.tsx → main.ads.mount.tsx} +4 -2
  260. package/dist/starters/react/design-system/styles.css +1 -0
  261. package/dist/starters/react/design-system/tokens/catalog.ads.json +1221 -0
  262. package/dist/starters/react/design-system/tokens/colors.css +1 -1
  263. package/dist/starters/react/design-system/tokens/spacing.css +22 -32
  264. package/dist/starters/react/design-system/tokens/spatial.ads.json +70 -0
  265. package/dist/starters/react/design-system/tokens/themes.generated.ts +1 -1
  266. package/dist/starters/react/ds.config.json +24 -19
  267. package/dist/starters/react/package.json +2 -6
  268. package/dist/starters/react/tsconfig.json +2 -3
  269. package/dist/starters/react/vite.config.ts +3 -3
  270. package/dist/style-boundaries.mjs +73 -27
  271. package/dist/task-cache.mjs +173 -72
  272. package/dist/task-worker.mjs +22 -11
  273. package/dist/test-boundaries.mjs +133 -60
  274. package/dist/themes-generated.mjs +1 -1
  275. package/dist/themes-watch.mjs +60 -19
  276. package/dist/themes.mjs +176 -73
  277. package/dist/token-export.mjs +39 -14
  278. package/dist/token-policy.mjs +6 -3
  279. package/dist/token-quality.mjs +6 -6
  280. package/dist/token-samples.mjs +16 -5
  281. package/dist/tokens.mjs +71 -26
  282. package/dist/ui-framework.mjs +16 -14
  283. package/dist/unit-contracts.mjs +270 -89
  284. package/dist/units.mjs +215 -180
  285. package/dist/usage.mjs +138 -38
  286. package/dist/validation-checks.mjs +121 -38
  287. package/dist/validation-inputs.mjs +187 -78
  288. package/dist/validation.mjs +268 -102
  289. package/dist/verification/browser.mjs +27 -5
  290. package/dist/verification.mjs +711 -187
  291. package/docs/ADS.md +100 -89
  292. package/docs/ARCHITECTURE.md +353 -159
  293. package/docs/BEHAVIORS.md +33 -28
  294. package/docs/CACHING.md +55 -11
  295. package/docs/CHANGELOG.md +358 -17
  296. package/docs/COMPARISON.md +1 -1
  297. package/docs/CONTRACTS.md +22 -29
  298. package/docs/DESIGN-REFERENCES.md +40 -0
  299. package/docs/GUIDE.md +313 -292
  300. package/docs/MCP.md +261 -439
  301. package/docs/SPATIAL-CHECKS.md +69 -0
  302. package/docs/benchmarks/README.md +39 -0
  303. package/package.json +42 -34
  304. package/dist/browser-audit.mjs +0 -424
  305. package/dist/contract-migration.mjs +0 -110
  306. package/dist/create.mjs +0 -48
  307. package/dist/lint-config.mjs +0 -48
  308. package/dist/mcp/draft-exports.mjs +0 -40
  309. package/dist/mcp/edit-preparation.mjs +0 -115
  310. package/dist/mcp/project-widget.bundle.js +0 -114
  311. package/dist/mcp/reports.mjs +0 -101
  312. package/dist/mcp/widget.bundle.js +0 -147
  313. package/dist/oxlint.mjs +0 -88
  314. package/dist/preview-builder.mjs +0 -133
  315. package/dist/preview-workers.mjs +0 -184
  316. package/dist/showcase.mjs +0 -77
  317. package/dist/skills/ads-break-ui/LICENSE.upstream +0 -21
  318. package/dist/skills/ads-break-ui/README.md +0 -16
  319. package/dist/skills/ads-break-ui/SKILL.md +0 -415
  320. package/dist/skills/ads-break-ui/agents/openai.yaml +0 -4
  321. package/dist/skills/ads-break-ui/references/atomic-styles.md +0 -293
  322. package/dist/skills/ads-break-ui/references/behaviors.md +0 -411
  323. package/dist/skills/ads-break-ui/references/captures.md +0 -160
  324. package/dist/skills/ads-break-ui/references/contracts.md +0 -284
  325. package/dist/skills/ads-break-ui/references/design-data.md +0 -354
  326. package/dist/skills/ads-break-ui/references/drafts.md +0 -178
  327. package/dist/skills/ads-break-ui/references/evidence.md +0 -128
  328. package/dist/skills/ads-break-ui/references/guarded-editing.md +0 -154
  329. package/dist/skills/ads-break-ui/references/layers.md +0 -145
  330. package/dist/skills/ads-break-ui/references/reporting.md +0 -101
  331. package/dist/skills/ads-break-ui/references/review.md +0 -96
  332. package/dist/skills/ads-break-ui/references/runtimes.md +0 -203
  333. package/dist/skills/ads-break-ui/references/scenarios.md +0 -246
  334. package/dist/skills/ads-break-ui/references/validation.md +0 -162
  335. package/dist/skills/ads-break-ui/references/verification.md +0 -58
  336. package/dist/skills/ads-break-ui/references/workflows.md +0 -83
  337. package/dist/skills/ads-designer/references/reporting.md +0 -101
  338. package/dist/skills/ads-import/references/reporting.md +0 -101
  339. package/dist/skills/ads-motion/LICENSE.upstream +0 -21
  340. package/dist/skills/ads-motion/README.md +0 -22
  341. package/dist/skills/ads-motion/SKILL.md +0 -388
  342. package/dist/skills/ads-motion/agents/openai.yaml +0 -4
  343. package/dist/skills/ads-motion/references/atomic-styles.md +0 -293
  344. package/dist/skills/ads-motion/references/audit.md +0 -44
  345. package/dist/skills/ads-motion/references/behaviors.md +0 -411
  346. package/dist/skills/ads-motion/references/captures.md +0 -160
  347. package/dist/skills/ads-motion/references/contracts.md +0 -284
  348. package/dist/skills/ads-motion/references/design-data.md +0 -354
  349. package/dist/skills/ads-motion/references/drafts.md +0 -178
  350. package/dist/skills/ads-motion/references/evidence.md +0 -128
  351. package/dist/skills/ads-motion/references/guarded-editing.md +0 -154
  352. package/dist/skills/ads-motion/references/layers.md +0 -145
  353. package/dist/skills/ads-motion/references/motion-review.md +0 -35
  354. package/dist/skills/ads-motion/references/reporting.md +0 -101
  355. package/dist/skills/ads-motion/references/review.md +0 -96
  356. package/dist/skills/ads-motion/references/runtimes.md +0 -203
  357. package/dist/skills/ads-motion/references/scenarios.md +0 -246
  358. package/dist/skills/ads-motion/references/validation.md +0 -162
  359. package/dist/skills/ads-motion/references/verification.md +0 -39
  360. package/dist/skills/ads-motion/references/workflows.md +0 -83
  361. package/dist/skills/ads-port/references/reporting.md +0 -101
  362. package/dist/starters/preact/design-system/components/Layout/Grid/Grid.tsx +0 -76
  363. package/dist/starters/preact/design-system/review/demo-frame/DemoFrame.tsx +0 -29
  364. package/dist/starters/preact/design-system/review/screen-frame/ScreenFrame.tsx +0 -34
  365. package/dist/starters/preact/design-system/review/token-preview/TokenPreview.tsx +0 -137
  366. package/dist/starters/preact/design-system/showcase/mcp/main.tsx +0 -6
  367. package/dist/starters/react/design-system/brand/Icons/AppIcon/AppIcon.ads.fixture.ts +0 -7
  368. package/dist/starters/react/design-system/brand/Icons/AppIcon/AppIcon.ads.scenario.tsx +0 -4
  369. package/dist/starters/react/design-system/brand/Identity/Logo/Logo.ads.fixture.ts +0 -7
  370. package/dist/starters/react/design-system/brand/Identity/Logo/Logo.ads.scenario.tsx +0 -4
  371. package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.fixture.ts +0 -12
  372. package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.scenario.tsx +0 -17
  373. package/dist/starters/react/design-system/components/Layout/Grid/Grid.tsx +0 -75
  374. package/dist/starters/react/design-system/components/Layout/Grid/README.md +0 -21
  375. package/dist/starters/react/design-system/review/brand-preview/BrandPreview.tsx +0 -112
  376. package/dist/starters/react/design-system/review/demo-frame/DemoFrame.tsx +0 -29
  377. package/dist/starters/react/design-system/review/grid-cell/GridCell.tsx +0 -18
  378. package/dist/starters/react/design-system/review/index.ts +0 -5
  379. package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.tsx +0 -34
  380. package/dist/starters/react/design-system/review/token-preview/TokenPreview.tsx +0 -137
  381. package/dist/starters/react/design-system/showcase/mcp/index.html +0 -1
  382. package/dist/starters/react/design-system/tokens/Color.ads.fixture.ts +0 -124
  383. package/dist/starters/react/design-system/tokens/Color.ads.scenario.tsx +0 -4
  384. package/dist/starters/react/design-system/tokens/Layout.ads.fixture.ts +0 -39
  385. package/dist/starters/react/design-system/tokens/Layout.ads.scenario.tsx +0 -4
  386. package/dist/starters/react/design-system/tokens/Motion.ads.fixture.ts +0 -18
  387. package/dist/starters/react/design-system/tokens/Motion.ads.scenario.tsx +0 -4
  388. package/dist/starters/react/design-system/tokens/Shape.ads.fixture.ts +0 -30
  389. package/dist/starters/react/design-system/tokens/Shape.ads.scenario.tsx +0 -4
  390. package/dist/starters/react/design-system/tokens/Space.ads.fixture.ts +0 -37
  391. package/dist/starters/react/design-system/tokens/Space.ads.scenario.tsx +0 -4
  392. package/dist/starters/react/design-system/tokens/Type.ads.fixture.ts +0 -29
  393. package/dist/starters/react/design-system/tokens/Type.ads.scenario.tsx +0 -4
  394. package/dist/starters/react/package-lock.json +0 -4707
  395. package/dist/token-fixtures.mjs +0 -30
  396. package/docs/benchmarks/bun-previews.md +0 -91
  397. package/docs/benchmarks/preview-memory.md +0 -147
  398. package/docs/benchmarks/turbo-poc.md +0 -284
  399. package/docs/plans/execution-coordination.md +0 -57
  400. /package/dist/{browser-audit → render-audit}/first-render.mjs +0 -0
  401. /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
 
@@ -39,23 +39,22 @@ uses Preact. See [implementation support](docs/GUIDE.md#implementation-support).
39
39
  project-owned scenarios and fixtures.
40
40
  - **Edit directly or through MCP**: use your editor with MCP preview/checks, or
41
41
  choose MCP-only tracked proposals and acceptance. See [editing access](docs/MCP.md#editing-access-and-compiler-ownership).
42
- - **Edit with guards** using owner patches, coupled transactions and isolated
43
- dry runs that validate architecture, lint and registered project checks.
42
+ - **Edit with guards** through drafts: one or more owners per draft, acceptance dry
43
+ runs that validate architecture, lint and registered project checks, and a stage
44
+ check that audits everything a series of drafts reached.
44
45
  - **Compare visual changes** with on-demand screenshots of current source and
45
46
  proposed candidates, exposed as MCP image resources.
46
47
  - **Iterate in tracked drafts** without rerunning acceptance checks after every
47
48
  edit. Commit proposals for PR review, compare Accepted/Draft in Explorer, and
48
49
  let the agent accept an exact reviewed revision after required checks pass.
49
50
  - **Bound command memory** with project process-tree budgets and reported kernel
50
- 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).
51
52
  - **Verify behavior** through project-owned guarantees and registered tests,
52
53
  with progress, timings and evidence tied to current source.
53
54
  - **Keep contracts explicit** for typed paint inputs, scoped data bindings and
54
55
  declarative APIs, without adding ADS to production components.
55
56
  - **Guide agents** with prompts and portable skills for building, importing,
56
57
  porting, motion and UI stress testing.
57
- - **Collect feedback** as local bug reports and feature requests with compact
58
- evidence, deduplication and submission receipts.
59
58
 
60
59
  See [using ADS through MCP](docs/GUIDE.md#use-ads-through-mcp) for the workflow and
61
60
  [visual captures](docs/MCP.md#screenshots-and-candidate-comparison) for screenshot
@@ -75,55 +74,54 @@ There is no warning level.
75
74
 
76
75
  | Area | What ADS enforces |
77
76
  |---|---|
78
- | **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. |
79
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. |
80
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. |
81
- | **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. |
82
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. |
83
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. |
84
- | **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. |
85
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. |
86
- | **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. |
87
86
  | **Behavior** | Registered guarantees need current passing execution evidence; `ads verify` runs them against current source. |
88
- | **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. |
89
88
 
90
89
  See [checks and guards](docs/GUIDE.md#checks-and-guards) for the gates, thresholds and
91
- how to turn the browser audit off.
90
+ how to turn the render audit off for draft acceptance.
92
91
 
93
- ## Create a new design system
92
+ ## Set up an existing project
94
93
 
95
- `create` copies the starter shipped in this ADS version into a new folder and sets
96
- 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.
97
98
 
98
99
  ```sh
99
- npx @reqvire-org/ads create my-design-system --framework react # or preact
100
- cd my-design-system
100
+ npx @reqvire-org/ads init --framework react
101
101
  npm install
102
- npx playwright install chromium # browser for the accessibility audit
102
+ npx playwright install chromium
103
103
  npm run build
104
- npm run dev:showcase
105
104
  ```
106
105
 
107
- With Bun: `bunx @reqvire-org/ads create my-design-system --framework preact
108
- --package-manager bun`, then `bun install`, `bunx playwright install chromium` and
109
- `bun --bun run build`. `--name` sets
110
- the package name (default: the folder name).
111
-
112
- ## 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`.
113
108
 
114
- Run **inside your project**, where `package.json` lives. Install Bun 1.4.1+ for
115
- 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:
116
114
 
117
115
  ```sh
118
- 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
119
119
  npm install
120
- npx playwright install chromium
120
+ npx playwright install chromium # browser for the accessibility audit
121
121
  npm run build
122
+ npm run dev:showcase
122
123
  ```
123
124
 
124
- Use `--framework preact` for native Preact. Init saves the choice in
125
- `ds.config.json`; later runs can use plain `ads init`.
126
-
127
125
  For a Bun project, Node is unnecessary:
128
126
 
129
127
  ```sh
@@ -134,7 +132,8 @@ bun --bun run build
134
132
  ```
135
133
 
136
134
  `--bun` keeps package executables on Bun even when they have a Node shebang.
137
- `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
138
137
  existing build. The default layout is root `design-system/`, alongside `src/`.
139
138
  It keeps your app, token values, scripts, and lockfile. Each build runs native ADS gates for tokens, styles, imports, renderer
140
139
  boundaries and asset ownership, then runs `ads assets` (configured brand icons, the
@@ -149,15 +148,14 @@ Linaria; integrate its extraction with your build as described in the
149
148
  |---------|-----|
150
149
  | `ads init --framework react` | Set up ADS in the current project; also accepts `preact`; saved choices can omit the flag |
151
150
  | `ads check` | Check tokens, styles, imports, and ADS ownership; errors fail, review items are listed |
152
- | `ads validate` | Run the configured validation policy and current-preview audit |
153
- | `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 |
154
153
  | `ads compile` | Compile all previews with Bun; `--watch` rebuilds on edits |
155
154
  | `ads tokens` | Inspect token values and themes |
156
155
  | `ads behaviors` | Inspect registered behavior guarantees and current evidence |
157
156
  | `ads verify --unit <id>` | Run an owner's registered behavior checks |
158
157
  | `ads audit` | Run axe-core in every rendered UI scenario, once per brand and theme; findings are errors |
159
158
  | `ads assets` | Generate web icons, the glyph module, `themes.generated.css` and the renderer palette `themes.generated.ts` |
160
- | `ads lint-config` | Optional integration with an explicitly configured project linter |
161
159
  | `ads mcp` | Start the stdio MCP server and its local showcase |
162
160
  | `ads showcase` | Start the same MCP runtime for browser-only inspection |
163
161
 
@@ -181,22 +179,24 @@ claude mcp add --transport stdio --scope project ads -- npx -y @reqvire-org/ads
181
179
  ```
182
180
 
183
181
  Restart your client in that project. `npx` uses its installed ADS version or
184
- 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)
185
184
  for config files and Claude Desktop setup.
186
185
 
187
186
  To let the agent edit the ADS through enforced checks, append `--mutations` to
188
- the MCP command. It accepts a Git patch for one ADS unit, including its owned scenarios and
189
- fixtures, and runs the guards before applying it. Foundation styles, original
190
- assets, guides and project configuration/guard extensions have editable units too.
191
- Coupled changes use bounded owner transactions with checks on the complete final
192
- candidate. Local owner drafts and token-sample preparation reduce patch setup;
193
- they keep source writes behind the same guards. See
187
+ the MCP command. Every change is a draft (file contents or a Git patch for its owners,
188
+ including their scenarios and fixtures), reviewed in the showcase and accepted after
189
+ the guards pass. Foundation styles, original assets, guides and project
190
+ configuration/guard extensions have editable units too. Coupled owners share one
191
+ draft, checked as one complete candidate. One runtime and one compiler serve the
192
+ project and all its draft previews. See
194
193
  [guarded editing](docs/MCP.md#guarded-editing).
195
194
 
196
195
  The server exposes public components/patterns, token values,
197
196
  source guides, controllers/hooks, architecture checks, behavioral verification,
198
197
  on-demand screenshots, workflow prompts, and packaged ADS skills.
199
- 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.
200
200
 
201
201
  Private controllers stay beside their component; shared controllers have their own
202
202
  edit units. Optional behavior contracts connect guarantees to maintained checks.
@@ -206,11 +206,11 @@ Structured failure boundaries and compact investigation bundles help agents
206
206
  inspect the failing source, requests and available artifacts while preserving
207
207
  the intended design. Each result states what it established and left unverified.
208
208
 
209
- Experimental MCP Apps show an interactive token inspector and project-built
210
- 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
211
211
  as the showcase. Text and resource access remain available without Apps support.
212
- Configure a project preview watcher in `ds.config.json` and MCP manages its
213
- 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`.
214
214
  Build status and diagnostics remain readable through tools/resources, with
215
215
  notifications for subscribed clients and explicit errors from preview tools.
216
216
  See the [MCP guide](docs/MCP.md) for Codex/Claude setup, preview builds, prompts,
@@ -222,8 +222,8 @@ To inspect an existing component through MCP:
222
222
  2. `ads_catalog` finds the component and links its owning source, available guides
223
223
  and preview IDs. `ads_tokens` explains the values it uses.
224
224
  3. `ads_scenarios` finds a preview; `ads_show_scenario` opens the real entry with its
225
- colocated fixtures. Use `ads_show_tokens` for project-owned token samples.
226
- 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
227
227
  verify the refreshed preview and exercise its relevant states.
228
228
 
229
229
  This is what makes ADS useful through MCP: small, structured discovery leads to
@@ -266,27 +266,29 @@ npm run ads-read-mcp -- --port 4191 # read-only; run one at a time
266
266
 
267
267
  Open **http://127.0.0.1:4191/**. Both commands build the local tool first and
268
268
  start stdio MCP, the showcase and the managed preview compiler.
269
- `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.
270
272
  Open the printed URL when choosing another port.
271
273
  `--port 4185` chooses a fixed port; the default chooses an available port.
272
274
  The title and left pane align; the title toggle hides/restores both. Minimize the
273
275
  header for a full preview, then refresh to restore it.
274
276
 
275
- 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
276
278
  and watches code, styles, fixtures and assets. The App loads only the selected
277
279
  scenario and its dependencies. Notifications update menus and refresh the active
278
280
  scenario after a successful build. Failures show diagnostics and identify stale
279
281
  output. `ads_tokens` inspects definitions independently of preview builds. Compilation still
280
282
  happens automatically; no separate project showcase rebuild is needed.
281
283
 
282
- For an existing app, `init` adds the showcase launch script; it does not install
283
- a preview compiler. Integrate the [starter compiler and mount adapter](docs/GUIDE.md#showcase)
284
- 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).
285
287
 
286
- There are no required showcase page files. Add a colocated scenario and fixture
287
- for tokens and each public UI owner; larger entries live under `composition/`.
288
- ADS rejects invented token names, tokens without reachable scenarios, and public
289
- 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
290
292
  of production. Full-app harnesses belong in application tests. See the
291
293
  [architecture](docs/ARCHITECTURE.md#the-showcase-is-the-shared-design-workspace),
292
294
  [contract](docs/ADS.md#showcase-contract) and [setup guide](docs/GUIDE.md#showcase).
@@ -302,8 +304,8 @@ Change values in `design-system/tokens/`, keeping the
302
304
  [themes](docs/GUIDE.md#tokens-grid-icons-and-accessibility).
303
305
 
304
306
  Keep original artwork, with its use, credits and license in a README, in
305
- `design-system/assets/brand/`; `ads check` fails on undescribed, unlicensed or
306
- 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`.
307
309
  Committed native and export icons (`assets.targets`: SVG, PNG, ICO, ICNS) and UI
308
310
  icon sets (`assets.glyphs`) are generated by `ads assets` and checked for freshness.
309
311
  Other products' logos are not brand artwork or glyphs: keep them, in their own
@@ -326,27 +328,24 @@ app's bundler. With no icon source, generation is skipped. See the
326
328
  Install skills with `npx skills`:
327
329
 
328
330
  ```sh
329
- 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
330
332
  ```
331
333
 
332
334
  For local development, install from this checkout:
333
335
 
334
336
  ```sh
335
- 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
336
338
  ```
337
339
 
338
- Acknowledgments: `ads-designer`'s craft/mobile guidance, `ads-break-ui`, and
339
- `ads-motion` adapt [Emil Kowalski's MIT-licensed skills](https://github.com/emilkowalski/skills).
340
- Their local [designer](skills/ads-designer/README.md),
341
- [break-ui](skills/ads-break-ui/README.md), and [motion](skills/ads-motion/README.md)
342
- credits record the sources and revision. Each skill keeps the upstream MIT
343
- 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.
344
344
 
345
- - [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.
346
346
  - [ads-import](skills/ads-import/SKILL.md): import external components, patterns, styles, token values, or brand artwork.
347
347
  - [ads-port](skills/ads-port/SKILL.md): port library components into your ADS using shared tokens and primitives.
348
- - [ads-break-ui](skills/ads-break-ui/SKILL.md): stress-test real components and patterns with difficult content.
349
- - [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.
350
349
 
351
350
  See the [skill guide](skills/README.md) for examples and source credits.
352
351
 
@@ -360,6 +359,15 @@ $ads-import /path/to/source-repo brand
360
359
 
361
360
  ## Development and references
362
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
+
363
371
  To develop ADS itself against another project, use the
364
372
  [npm link workflow](docs/GUIDE.md#develop-ads-locally). Consumer setup above uses the
365
373
  published package; local development uses your linked checkout.
@@ -375,18 +383,36 @@ real token/component/pattern/composition Apps, switch themes, inspect build erro
375
383
  try tools, resources, prompts and skills. See the
376
384
  [MCP explorer guide](mcp-explorer/README.md) for the small test flow.
377
385
 
378
- 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.
379
387
  The showcase is the visual/interaction review surface; automated tests also
380
388
  check tool behavior and the example build:
381
389
 
382
390
  ```sh
383
- npm test # Tool guards and packed npm install/build tests
384
- 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
385
398
  ```
386
399
 
387
- Set `ADS_TEST_BUN=1` when running `npm test` to test the installed package with
388
- Node/npm/npx unavailable, including Bun builds, MCP previews and guarded checks.
389
- 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.
390
416
 
391
417
  Tool source lives in `src/`; tests and the dummy project live in `tests/`.
392
418
 
@@ -394,23 +420,17 @@ See the [tooling contract](docs/ADS.md) and [tool guide](docs/GUIDE.md) for enfo
394
420
  and setup.
395
421
  The [dummy project](tests/fixtures/guard-project/README.md) tests the generic guards with passing and failing cases.
396
422
 
397
- There are two different starting points in this checkout:
398
-
399
- - [starters/react/](starters/react/README.md) is the React application starter, and
400
- [starters/preact/](starters/preact/) the files that replace it for Preact:
401
- a token foundation in six groups (AA contrast in both themes, a 2 px
402
- rhythm), light and dark themes declared in `ds.config.json` that apply to the page or one
403
- section at any depth, a column grid, an icon set, a brand preview with placeholder artwork, build
404
- setup, example components, a pattern and a composition, development-only review
405
- renderers, and a project preview compiler adapter. They ship in the npm package;
406
- `ads create` copies them into a new project, and `ads init` uses their foundation
407
- files when a project has no ADS.
408
- - [design-system/](design-system/README.md) is this repository's working example,
409
- with real components, patterns, and scenarios inspected through the built-in showcase. It demonstrates the architecture
410
- and helps us develop the tooling. Its UI source is excluded from the npm package
411
- 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.
412
428
 
413
429
  Licensed under [MIT](LICENSE). Adapted third-party material retains its upstream
414
430
  notices.
415
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
+
416
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
+ }