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