@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,178 +0,0 @@
1
- # Tracked drafts and auto-mode acceptance
2
-
3
- Use this workflow for MCP-only iterative design, or when a direct editor chooses
4
- tracked proposals for isolation and comparison. Ordinary direct source edits use
5
- the separate [direct editing workflow](workflows.md#direct-design-system-code-access)
6
- and do not require draft acceptance. Auto mode means the agent reviews the
7
- rendered result and accepts it; it does not introduce a human approval gate.
8
- Human acceptance controls are not part of this version.
9
-
10
- ## Complete a coherent design change
11
-
12
- A unit of design work can span several components, a pattern or an entire view.
13
- Do not finish that work with its intended changes left only in drafts. Review,
14
- validate and accept all required drafts before reporting the change complete.
15
- Accept dependency drafts first, then review their dependents again. If checks or
16
- baseline conflicts block acceptance, fix them and continue. If progress requires
17
- missing user input or an external change, report the work as unfinished, with the
18
- exact draft and blocker. Never silently drop requested work or accept a failing
19
- draft to meet this completion rule. Leave a draft intentionally only when the
20
- user asks to retain a proposal for later review.
21
-
22
- ## Source and lifecycle
23
-
24
- `ads_create_draft({units:["components/Button"], title:"Button spacing"})` creates
25
- `ads-drafts/<id>/proposal.ads.draft.json` and `.ads` draft sources.
26
- For example, `Button.tsx.ads` maps to the normal `Button.tsx` target. The final
27
- `.ads` extension keeps proposed code out of default TypeScript/lint discovery,
28
- without editing project tsconfig files. The manifest remains
29
- `proposal.ads.draft.json`. These are ordinary tracked project files: commit them and review them in a PR.
30
-
31
- A draft may group up to 64 owners and 256 tracked files. For related changes,
32
- use one multi-owner draft: its previews share a compiler workspace and acceptance
33
- validates the combined candidate once, then applies all changes together. The
34
- existing source and patch byte budgets still apply.
35
-
36
- A Git checkout is not required to create or recover a draft. Refresh uses the
37
- installed Git executable for three-way text merging. Restarting ADS or cloning the
38
- project discovers the same source. Generated compiler workspaces and execution
39
- events remain under ignored `.ds/`; an interrupted check is never a pass.
40
-
41
- The manifest maps each proposed file to its normal project target and records
42
- its baseline fingerprint, original baseline source and owner. Baseline files under
43
- `bases/` are recovery data; edit only the proposed `files/` source. Edit returned source files with local file
44
- tools. `ads_read_file` reads mapped draft source in bounded ranges.
45
- `ads_update_draft` registers additions/deletions or edits source for remote
46
- clients; pass the current revision from `ads_drafts`. `content:null` proposes a
47
- deletion. Binary content uses `encoding:"base64"`; acceptance uses Git's existing
48
- binary patch support. Do not edit accepted source to iterate a proposal.
49
-
50
- `ads_drafts` lists only drafts. Filter by unit/query, page with offset/limit, or
51
- pass id to inspect file mappings. Catalogue and scenario entries expose their
52
- draft references. `ads_tokens` also lists tokenGroups derived from token CSS
53
- files. For a group draft, create `{units:["tokens"],tokenGroups:["colors"]}` using
54
- the actual returned IDs. Shared tokens remain owned by `tokens`; groups do not
55
- create component-local value catalogues.
56
-
57
- ## Preview and dependencies
58
-
59
- Call `ads_show_draft({id,scenario?})`, then inspect its actual `showcaseUrl` in a
60
- browser. The preview reuses an isolated compiler workspace across edits and does
61
- not run acceptance checks. Up to four draft compiler sessions stay warm; opening
62
- more reclaims an older generated workspace without deleting its tracked proposal.
63
- Creation queues compiler prewarming without delaying its response. Bursts of
64
- creations coalesce, and only one queued compiler initializes at a time. A newer
65
- speculative prewarm reclaims the older unused one; explicitly opened sessions
66
- remain warm within the four-session bound. MCP edits
67
- and direct draft-file edits notify warm previews through file events; periodic
68
- reconciliation recovers missed events. Watched builds compile requested scenarios
69
- and their dependencies, retaining roots used by other open previews. Full builds
70
- and validation still cover the complete configured scope. Incremental semantic
71
- analysis reuses unchanged TypeScript source trees without caching passing checks.
72
- Reopening a known scenario renders through the existing compiler while a worker
73
- refreshes catalogue metadata. Read `discovery.state` (`current`, `pending`,
74
- `error`) and its metadata revision separately from the exact proposal revision.
75
- New/missing scenario identities wait for fresh discovery. A previous preview may
76
- stay visible until compilation finishes; pending/stale output is not evidence.
77
- Preview workspaces follow current project inputs, including deletions, and overlay
78
- only actual draft changes. A restarted session rebuilds its disposable workspace;
79
- a missing workspace is recreated. Accept/drop removes it even after a restart,
80
- and startup prunes workspaces whose proposals no longer exist.
81
- When discovery fails, `ads_show_draft` returns the draft's own diagnostics and
82
- `diagnosticsUri`; the accepted `ads://project/scenarios` is a different registry.
83
- Read the scoped URI even when the compiler could not start.
84
-
85
- If accepted source advanced, use
86
- `ads_update_draft({id,revision,refresh:true})` after accepted source changes.
87
- Stored originals allow non-overlapping text edits and independent owner exports
88
- to merge. Untouched copies advance to current source. Overlaps return
89
- `refreshed:false` plus file diagnostics and leave the proposal unchanged; resolve
90
- them deliberately by passing `refresh:true` with `changes` containing the
91
- resolved contents of those existing files and their owners. Refresh separately
92
- from dependency changes. Non-overlapping JSON object fields merge structurally;
93
- conflicting arrays/values remain explicit. Older drafts without originals can refresh untouched files,
94
- but overlapping changed files require explicit resolution. Review the new
95
- revision and preview after every successful refresh.
96
- Reopen after edits to obtain the current revision.
97
- Compilation is feedback, not passing behavior/visual evidence.
98
-
99
- For model-visible images, use `ads_capture({scenario,draft:id,revision,...settings})`
100
- and read the returned PNG resource URIs. This captures Accepted/current and
101
- Draft/candidate without acceptance checks; new scenarios have only a candidate.
102
- The candidate records the exact proposal revision. Edits during capture prevent
103
- publication of its image slots. Captures establish appearance at those settings,
104
- not passing acceptance or behavioral checks.
105
-
106
- A pattern draft may use a component draft; a composition may use component,
107
- pattern and token drafts. Declare their IDs in `dependencies` when creating or
108
- updating the dependent draft. Keep normal `@ds` imports in all implementations
109
- and scenarios. The preview overlays the proposed files at canonical paths; no
110
- project code imports `.ads` draft source. Cycles, missing dependencies and
111
- overlapping non-barrel edits are errors. Use one coupled draft for overlapping
112
- changes. A coupled draft may declare up to 64 existing/new owners.
113
-
114
- Accept dependencies first. ADS removes resolved dependency IDs from dependent
115
- manifests and their previews use the final accepted implementation automatically.
116
- Independent shared-barrel exports are merged; overlapping source changes remain
117
- explicit conflicts. Review the dependent's new revision before accepting it.
118
- If a dependency is dropped, correct the remaining draft's dependency list.
119
-
120
- DS Explorer keeps drafts in the ordinary Tokens, Components, Patterns and
121
- Composition navigation. A Draft badge marks an owner with a pending proposal,
122
- whether or not it has an accepted version. Select that entry and use the header
123
- Split view toggle to compare Accepted and Draft in the right pane. Both use the
124
- same scenario/theme and available or phone viewport width. New owners appear
125
- in their normal section; without an accepted counterpart they show only the
126
- draft and disable comparison. There is no separate Drafts tab or scenario picker.
127
- An isolated overlay can also render an unchanged scenario as an explicit review
128
- context; that alone does not give its owner a Draft badge. Use `ads_drafts` for
129
- draft-only MCP listing.
130
-
131
- After 20 retained module revisions, Explorer restarts the affected App to release
132
- its module cache, then restores the selected scenario/theme/viewport. Comparison
133
- keeps the other version mounted; no manual reload or draft acceptance is needed.
134
-
135
- Explorer entry glyphs separately show preview build states in monochrome: not
136
- built, building, compiled/checking, ready, stale and failed. MCP draft summaries
137
- include `preview` and preview calls include `build`; inspect `building`,
138
- `current`, `stale`, scenario revisions and `preview.resourceUri` for detail.
139
- Subscribe to `ads://project/build` and `ads://project/drafts` for standard
140
- resource-update notifications on completion, failure and metadata refresh, or
141
- subscribe only to an active draft's `preview.resourceUri` for its isolated report.
142
- Modern clients use `subscriptions/listen` resource filters; older clients use
143
- `resources/subscribe`. Re-read notified resources to update the existing view;
144
- unsubscribe on teardown and resubscribe/read after reconnect. Removal invalidates
145
- the scoped resource. Poll when the host does not forward notifications.
146
- Build completion and mounted-App rendering readiness are separate. Ready draft
147
- output remains unaccepted. Review the
148
- current rendered revision and complete acceptance before finishing the change.
149
-
150
- ## Accept or drop
151
-
152
- After rendered review, call `ads_accept({id,revision})` once. It checks that exact
153
- revision, runs mandatory ADS guards plus `acceptance.checks` and, when
154
- `acceptance.behaviorChecks` is enabled, affected registered behavior checks against an isolated candidate, and applies passing changes at
155
- their normal paths. Unless `acceptance.browserAudit` is false it also runs the axe-core
156
- audit on the candidate's affected UI scenarios; an `a11y-axe` error rejects the draft.
157
- Fix it in the component and accept the new revision. Changes during checking or baseline conflicts prevent
158
- application. Successful acceptance removes the proposal and records an event.
159
- There is no separate Apply or Iterate action. A failed attempt retains the draft;
160
- inspect its returned resultId with `ads_results` and fix the reported boundary.
161
-
162
- `ads_drop_draft({id,revision})` deletes a proposal and its generated preview,
163
- without changing accepted source. Drop replaces a separate refusal action.
164
- Read `ads_status.drafts`, `ads_drafts.events` or `ads://project/drafts` to observe
165
- decisions. Resource notifications are available, but the host may not wake an
166
- agent; always use the returned outcome or persisted status as the fallback.
167
-
168
- ## Build isolation
169
-
170
- Draft presence alone must not fail an application build. Drafts are excluded from
171
- normal ADS discovery and validation inputs. ADS import guards reject direct,
172
- aliased, re-exported, dynamic and symlink imports of marked files or ads-drafts/,
173
- including attempts from scenarios/tests outside the isolated preview overlay.
174
- Install `draftImportGuard()` from `@reqvire-org/ads/scenarios/vite` in application
175
- Vite/Rollup builds as well as keeping the mandatory ADS check/build pipeline.
176
- It rejects resolved draft modules and glob-expanded module loads. Merely adding a
177
- TypeScript exclude pattern is not an import boundary. Do not export drafts, add
178
- production aliases to them, or copy draft storage into published assets.
@@ -1,128 +0,0 @@
1
- # Investigate the failing boundary
2
-
3
- Use this reference after a rejected patch, failed check or preview loading error.
4
- MCP serves it as `ads://guides/evidence`. Inspect the compact result first; fetch
5
- only the failing check's bundle or relevant artifact, rather than repeating a suite.
6
-
7
- ## Read the result correctly
8
-
9
- `failure.category` identifies a boundary, not an inferred root cause:
10
-
11
- | Category | Established observation | Next inspection |
12
- |----------|-------------------------|-----------------|
13
- | `architecture` | A source/ownership/configuration gate rejected the candidate. | Exact rule, source location and `certainty`. An inconclusive ownership proof does not establish that a valid API is wrong. |
14
- | `build` | A registered project pipeline step or compiled-resource integrity check failed. | Named command/phase, exit code, bounded output and build revision. A custom project script may contain several kinds of checks. |
15
- | `transport` | An MCP/browser resource delivery boundary failed. | Resource URI, relevant failed startup requests and observed browser errors. Do not infer a network-interface or component cause without evidence. |
16
- | `runner` | The harness, process, readiness or reporting boundary failed, or a test threw without assertion evidence. | Active/pending checks, timeout, failing step and artifacts. `certainty: "unclassified"` means ADS cannot establish the cause. |
17
- | `assertion` | A reported assertion step or token binding check failed. | Expected behavior, source location, state and trace. This can still be a test defect; compare the intended contract before editing the component. |
18
-
19
- A complete failed run can contain independent passing cases. Suite interruption,
20
- missing/skipped cases, stale inputs and an unexplained process exit cannot certify
21
- a pass. Keep the reported case outcome separate from whole-run acceptance.
22
-
23
- ## Retrieve only the evidence needed
24
-
25
- `ads_verify`, `ads_apply_patch` and `ads_apply_transaction` reply with counts,
26
- bounded acceptance, at most three failure previews and `resultId`, within 4096
27
- UTF-8 JSON bytes. Full validation still decides acceptance. Do not repeat a suite
28
- merely to recover its output, or restate the complete report in conversation.
29
-
30
- Read a relevant saved section:
31
-
32
- ```js
33
- ads_results({resultId: "<returned ID>", section: "outcomes", status: "not_passed"})
34
- // Continue only when needed, with the same section and status:
35
- ads_results({resultId: "<returned ID>", section: "outcomes", status: "not_passed", cursor: "<nextCursor>"})
36
- ```
37
-
38
- Pages default to 10 rows, allow at most 20 and stay within 8192 JSON bytes. The
39
- byte cap can return fewer rows; `nextCursor` is the continuation. Other sections
40
- are `checks` (pipeline steps), `diagnostics`, `advisories`, `warnings`, `changes`,
41
- `captures`, `acceptance`, `investigation` (mutation boundary) and `selection`.
42
- A row marked `detailTruncated` is a preview. To read that exact record, pass its
43
- `recordIndex`, the same result/section, and `offset`/`chars` (maximum 2000 UTF-16
44
- characters); follow `nextOffset`. Do not combine ranges with a cursor/status filter.
45
- Read only the relevant log range. Reading pages or ranges never executes checks.
46
-
47
- `ads://project/results` lists the latest IDs. `ads://results/<resultId>` reads a
48
- summary; matching query parameters read pages/ranges. Immutable snapshots remain
49
- readable across subsequent runs and reconnects, within `mcp.resultRetention`.
50
- Defaults are 50 runs, seven days and 256 MiB including owned browser evidence;
51
- individual snapshots remain limited to 8 MiB. `ADS_RESULT_EXPIRED` identifies a
52
- recently collected ID; older/unknown IDs are unavailable. An oversized report
53
- retains only its summary with a warning; disk failure retains latest details in
54
- server memory until shutdown.
55
- Neither changes actual acceptance or applied state. These are logical JSON byte
56
- budgets, not token estimates; compatibility text can duplicate structured JSON.
57
- Saved outcomes describe completion-time evidence, not current source freshness;
58
- compare their revisions with `ads_behaviors` before claiming a current pass.
59
-
60
- `ads_behaviors` pages owner summaries, then an exact unit's `checks`, `guarantees`,
61
- `subjects`, `demonstrations` or `profiles`. Use `nextCursor` and identical filters;
62
- changes invalidate a discovery cursor. Read a truncated contract via its
63
- `sourceFile` and bounded `ads_read_file`, rather than requesting everything.
64
-
65
- ## Get a compact investigation
66
-
67
- Take an outcome's exact owner/check/run IDs from `ads_results`, then:
68
-
69
- ```json
70
- { "unit": "components/Example", "check": "keyboard-navigation", "runId": "<outcome runId>" }
71
- ```
72
-
73
- Send this to `ads_investigate`. It reads a summary within 4096 JSON bytes, without
74
- running code. The exact run ID selects retained historical evidence from that execution.
75
- `section: "details"`, `"requests"`, `"browserErrors"` or `"artifacts"` reads separate pages
76
- (default 10/max 20 rows, at most 8192 JSON bytes); artifacts themselves require
77
- explicit resource reads. Truncated investigation records also support
78
- `recordIndex`/`offset`/`chars`; keep the exact `runId` to avoid mixing evidence.
79
- Without a check, the tool pages available investigations.
80
- `ads://project/investigations` lists available entries; the returned `resourceUri`
81
- reads the same bundle. It records:
82
-
83
- - Project versus isolated candidate, configured framework/profile and scenario.
84
- - Exact input revision and the preview revision actually observed by the helper.
85
- - `details.failingStep`, `details.source`, startup viewport and failure boundary.
86
- - Counts for separately paged relevant requests, browser errors and artifacts.
87
- - Available registered trace, screenshot or context artifact resource URIs.
88
- - Explicit `acceptance.established` and `acceptance.unverified` scope.
89
-
90
- Absent observations are `null` or empty; ADS does not invent a viewport, trace or
91
- source line. Viewport evidence is labeled `preview-startup`; a test that resizes
92
- later must collect its own failure-state evidence. Failed-request collection
93
- covers managed startup, not a complete network trace. Bodies and headers are not
94
- collected. Project-configured Playwright trace/screenshot policy controls which
95
- artifacts exist; ADS does not turn on expensive recording or rerun a failed case.
96
- Protocol runners may provide structured failure/step/location/artifact fields;
97
- older reports remain valid and their unclassified errors stay explicit.
98
-
99
- Listings show the latest bundle per registered check, including dry runs.
100
- An exact `runId` reads the retained historical bundle and artifacts. Collection
101
- expires a result and its owned evidence together; another verification alone does
102
- not revoke earlier evidence. Artifact resources
103
- are restricted to registered ordinary files under that run's output directory,
104
- bounded to 20 MiB each and checked against their recorded digest on read.
105
- Metadata is bounded to 2 MiB. Removed registrations are pruned on verification.
106
-
107
- Candidate evidence never becomes passing live-source evidence. Compare the
108
- recorded input revision with current `ads_behaviors` evidence; a bundle describes
109
- its run, and does not claim current source merely because it remains available.
110
- For a build/architecture rejection before behavior runs, inspect the mutation
111
- saved `investigation` section via `ads_results`. Status retains the compact
112
- execution summary and result ID, rather than embedding complete reports.
113
-
114
- ## Preserve the design while repairing the failure
115
-
116
- Fix the owner of the demonstrated defect. Do not privatize a valid API, introduce
117
- demo-only props, substitute a styled link, change the reference baseline or weaken
118
- verification policy to pass a tooling limitation. Preserve the draft and report
119
- the smallest source/browser reproduction when ownership remains unprovable.
120
-
121
- `acceptance` states what that result established. Core checks establish source
122
- guard acceptance; registered tests establish only their actual cases/profiles.
123
- Neither establishes untested states, visual parity, an accessibility audit or
124
- another MCP host's compatibility. Captures show an appearance, not a transition.
125
-
126
- When targeted investigation suggests a tooling defect or missing capability, read
127
- [reporting.md](reporting.md), then use the matching intake tool. Reports preserve
128
- compact evidence without certifying an ADS cause or changing validation policy.
@@ -1,154 +0,0 @@
1
- # Advanced guarded editing
2
-
3
- Choose [direct editing or MCP-only editing](workflows.md) first. This reference
4
- covers MCP's guarded patch tools, not a requirement to route direct source edits
5
- through MCP. For MCP-only iterative design, prefer [tracked drafts](drafts.md):
6
- edit and preview the proposal, then review and accept its exact revision.
7
- The disposable `.ds/patch-drafts/` copies described below are low-level patch
8
- staging for focused repairs and migrations, not tracked review proposals.
9
-
10
- Use `ads_apply_patch` for independent owner edits. `ads_prepare_patch` can create a
11
- local draft of one owner and its companions; edit that directory with local file
12
- tools, request `action:"diff"`, then apply the returned patchFile. Discard the
13
- draft afterward. Remote clients can keep sending inline Git diffs. Neither draft
14
- preparation nor diff generation validates or changes live source.
15
-
16
- To verify a draft before applying it, diff it and dry-run the returned patch:
17
-
18
- ```js
19
- ads_prepare_patch({"unit":"components/Example","action":"diff","draft":"<returned draft ID>"})
20
- ads_apply_patch({"unit":"components/Example","patchFile":"<returned patchFile>","dryRun":true})
21
- ```
22
-
23
- The dry run validates the candidate in an isolated project copy using mandatory
24
- ADS guards, `acceptance.checks` and, when `acceptance.behaviorChecks` is enabled,
25
- affected registered behavior checks. Registration alone does not require a test
26
- at acceptance. Unless `acceptance.browserAudit` is false, axe-core also audits the candidate's
27
- affected UI scenarios; `a11y-axe` errors reject the patch. See [validation policies](validation.md).
28
- Configured browser checks use that candidate's managed preview, not the live showcase. Read the summary, then page failing
29
- `outcomes`, `diagnostics` or pipeline `checks` through `ads_results` with its
30
- `resultId`. Inspect one exact outcome with `ads_investigate({unit,check,runId})`;
31
- fix the draft and diff again. See [evidence.md](evidence.md) for page/range limits.
32
- Keep `<Owner>.ads.contract.ts` and specs with their owner and use registered checks; a scratchpad
33
- run against live source cannot verify unapplied changes. After validation, apply
34
- with `dryRun:false`; ADS revalidates before writing. Dry-run evidence is not saved
35
- as passing evidence for the live project.
36
-
37
- `ads_verify({unit,checks?})` selects checks for current project source; it has no
38
- draft argument. There is no dedicated selected-check runner for drafts yet.
39
- Use a dry-run transaction for genuinely coupled draft patches.
40
-
41
- Build notifications are deferred until the showcase finishes initial discovery;
42
- a preview cannot be opened with an incomplete tool list. A missing App tool is a
43
- host-startup failure, not evidence that component behavior failed. Preserve the
44
- draft and inspect the host diagnostic.
45
-
46
- Registered project scripts default to 60 seconds each. A guarded configuration
47
- change can set `mcp.mutationCheckTimeoutMs` (100–300000 ms) after measuring build
48
- duration and contention. Timeouts name the command, budget and elapsed time;
49
- behavior-profile budgets are separate. Do not drop checks to fit either budget.
50
-
51
- Behavior-run performance belongs to both orchestration and project checks. ADS
52
- selects affected owners, filters registered Playwright case tags and shares one
53
- candidate host per run. The project owns assertions, browser setup, worker count,
54
- per-test timeouts and its profile's whole-run `timeoutMs`. The latter covers the
55
- entire runner process, not each test. Do not rewrite APIs, drop guarantees or
56
- disable checks to fit the budget. Inspect measured durations before tuning it.
57
-
58
- During verification, inspect `ads_status.behaviors.progress`; during candidate
59
- validation, inspect `ads_status.mutations.progress`. These show completed/active/
60
- pending checks and timings. MCP clients requesting progress also receive updates.
61
- A timeout retains reported case outcomes and identifies active/unstarted checks;
62
- it still blocks the mutation. `reportedStatus:"passed"` within an incomplete run
63
- is diagnostic information, not a passing guarantee. Reports/artifacts under the
64
- live project's `.ds/verification/` survive candidate cleanup. Uninstrumented custom
65
- runners may report an unknown execution state instead of claiming a case started.
66
-
67
- For independent browser specs, consider a small parallel worker count and measure
68
- on the target machine. Use separate contexts/pages, independent state and the
69
- candidate URLs provided by `openBehaviorScenario`; avoid fixed live-server URLs,
70
- shared mutable fixtures and test-order assumptions. Files can run in parallel;
71
- tests in one file remain sequential by default. Prefer readiness assertions over
72
- blanket sleeps. Fake clocks suit timer-only guarantees; keep real time for actual
73
- gesture/motion/layout guarantees. Project settings belong in guarded configuration
74
- changes; ADS does not silently raise budgets or override the worker count.
75
-
76
- If a check cannot load its MCP preview, preserve the draft and inspect the exact
77
- resource URI and failed browser requests before changing component code. The ADS
78
- showcase retries a fetch transport failure on `resources/read` at most twice
79
- (200/800 ms backoff); recovered startup reads remain visible in
80
- `startupDiagnostics`. It never retries tool calls, assertions or complete checks,
81
- and persistent failures still block application. HTTP/protocol/content errors,
82
- integrity failures and cancellation do not retry. External hosts own their
83
- transport behavior. Chrome's `ERR_NETWORK_CHANGED` does not prove an ADS restart
84
- or identify Docker/VPN churn: correlate failure timestamps with live interface
85
- events, Chrome network logs and server availability. Do not weaken checks or
86
- rewrite a valid API to hide infrastructure failures.
87
-
88
- Named barrel imports can narrow affected checks when the project accurately
89
- declares package `sideEffects`; retain CSS/global effects in that policy. Missing
90
- or unsupported policies and dynamic/wildcard dependencies stay conservative.
91
- Do not change the policy merely to suppress verification of real side effects.
92
-
93
- For registered measured-geometry style writes, use direct `element.style.transform =
94
- value` or `element.style.setProperty("--ds-measured-value", value)` with the exact
95
- file/property boundary. The current guard rejects a style-object alias such as
96
- `const style = element.style` as an escape; it does not trace the alias to later
97
- writes. Keep writes explicit when adapting local controller code. This syntax
98
- constraint is separate from deciding which measured properties belong to the
99
- controller; it does not authorize unregistered visual writes.
100
-
101
- Shared provenance uses the existing `documentation` unit. Read its `filePolicy`
102
- from `ads_units`: one patch can create `CREDITS.md`, shared `licenses/*.txt` and
103
- README links together. Conventional root credits/license/notice names support
104
- UTF-8 `.md`/`.txt` or extensionless notices; `licenses/` may also sit under
105
- `docs/`, `doc/` or the ADS root. Preserve upstream notice text exactly. Keep
106
- component/asset-local notices with their owner; reference shared notices instead
107
- of duplicating them across units. Do not create an asset group or bypass a guard
108
- to add these documents. Code/configuration and hidden/generated paths remain
109
- outside documentation ownership.
110
-
111
- For genuinely coupled changes, `ads_apply_transaction` accepts 2–64 distinct owner
112
- patches (256 distinct files and 16 MiB combined). Each patch keeps its ownership and
113
- companion restrictions. Patches apply in order; later shared-entry hunks match the
114
- earlier candidate. All guards, registered checks and affected behavior checks run
115
- on the final candidate before live source is written. Dry-run first. Rejection,
116
- conflict and cancellation publish nothing. Dependency installation remains local;
117
- the candidate uses installed node_modules. Never bypass a rejected gate directly.
118
-
119
- Static design values and formulas belong in the shared Data foundation. Components
120
- map those values with `--ds-*` variables; patterns use `--ux-*`. There are no private
121
- token namespaces/value sheets or token sections in owner contracts. Keep measured
122
- runtime geometry separate. Read [design-data.md](design-data.md) before adding a
123
- design value or repairing an ownership/value-source diagnostic.
124
-
125
- `ads_prepare_token_samples({id, bindings?})` preserves existing project samples,
126
- removes undeclared names and returns an owner patchFile. Supply explicit
127
- `{token,property,probe}` bindings for new samples; unresolved tokens stay reported.
128
- ADS does not infer visual meaning or fabricate renderers. Apply through the guard,
129
- then inspect the actual App sample effects.
130
-
131
- An empty .gitkeep can be deleted alongside new source beneath it in the selected
132
- owner. Nonempty markers and other hidden files stay protected. A redundant
133
- Scenario.tsx can be deleted when real coverage remains elsewhere; removing a
134
- scenario does not erase ownership of the unit's runtime source.
135
-
136
- Keep contextual public parts public when they are intended consumer API. Demonstrate
137
- them through their actual public composition/customization path and list their real
138
- render references in covers. Do not count internal production renders as public API
139
- coverage. Behavioral APIs use exercises and registered guarantees instead.
140
- Scenario controls still use public UI. A native link/button can supply semantics
141
- through a public runtime slot that demonstrably clones its child with owned
142
- props, or through matching runtime-owned selectors attached to the actual rendered
143
- DOM. Source ownership must be proven; an `asChild` flag or a lookalike marker is
144
- insufficient. Standalone controls and custom scenario styling remain rejected. See
145
- [scenarios.md](scenarios.md) for evidence and limits. Preserve the intended
146
- composition instead of substituting an unrelated styled control or adding a
147
- demo-only component prop. Review framing belongs in development-only `review/`, through its separate public entry.
148
-
149
- A complete runner report containing an ordinary failed assertion preserves each
150
- passing check as `passed`; the failed check remains `failed`, and overall
151
- verification still rejects the mutation. Fix the actual failing checks instead of
152
- assuming every affected owner failed. Suite errors, unexplained runner exits,
153
- missing results and interrupted runs cannot certify passing guarantees. Use the
154
- case's `reportedStatus`, message and report to distinguish these conditions.
@@ -1,145 +0,0 @@
1
- # Components, patterns and application adapters
2
-
3
- Read this when choosing an owner, moving UI between layers, or resolving
4
- `component-dependency`, `component-contract`, `component-style`, `no-app-import`
5
- or `showcase-import`. MCP also serves this guide as `ads://guides/layers`.
6
-
7
- ## Choose by responsibility
8
-
9
- A **component** provides one cohesive UI capability: semantics, input handling,
10
- focus, accessibility, states and appearance. It may compose other components and
11
- controllers. A notification using an icon, action button and spinner can still
12
- be one component.
13
-
14
- A **pattern** arranges capabilities and content slots into a reusable structure
15
- or workflow, such as navigation with search/account controls or a report screen.
16
- Layout parts may arrange `children` without importing several components.
17
- Patterns may compose other patterns. A native wrapper or a large implementation
18
- does not decide the layer.
19
-
20
- A product workflow's essential controls belong to its pattern. Require their
21
- typed models and callbacks; reserve optional action slots for extensions. Its
22
- independent scenario and registered checks must exercise those controls instead
23
- of adding them only in composition fixtures. ADS enforces the declared API and
24
- checks; it cannot infer application requirements that were never modeled.
25
-
26
- An **application adapter** supplies domain data, store access, route state and
27
- navigation/service callbacks. Domain-shaped inputs are valid in project-owned
28
- patterns; importing a particular application store/router is not.
29
-
30
- A **scenario** supplies demonstration inputs, local state and simulated services.
31
- A component scenario may compose several public components and development review helpers
32
- to demonstrate its subject. That does not turn its fixture or variant selectors
33
- into production API. Keep `covers` aligned with the scenario's subject layer.
34
-
35
- Do not classify by import count, JSX element count, names or file length. Review
36
- the capability and its consumer contract. Preserve valid APIs when tracing is
37
- inconclusive; do not make an export private or add a product prop just to pass.
38
-
39
- ## Share UI across websites and MCP Apps
40
-
41
- Build and adapt UI through the project's public design-system APIs. Websites
42
- and MCP Apps use the same components, patterns, controllers, tokens and styles.
43
- Application adapters supply data and actions and own mounting, routing, stores,
44
- MCP communication, tool-result mapping and serving. Keep those integrations out
45
- of reusable UI implementations. ADS's own MCP server supports design-system
46
- development, inspection and rendered review.
47
-
48
- The ADS showcase renders the real public implementation inside an MCP App.
49
- Its previews and registered checks provide evidence for the exercised states,
50
- themes, sizes and environment. Relevant application checks verify website
51
- integration. Reuse existing verification; add targeted checks when a change
52
- exposes an uncovered requirement. Record what was actually verified, including
53
- any remaining host or integration assumptions.
54
-
55
- ## Demonstrate the production implementation
56
-
57
- Product patterns are reusable application UI, not showcase replicas. A scenario
58
- imports the same production owner and supplies fixtures through its public API;
59
- the application supplies live data and callbacks to that API. Keep mock records,
60
- demo selections and simulated services in development files. Legitimate defaults,
61
- control labels and the pattern's own interaction logic remain with their owner.
62
-
63
- Demo framing must not replace a product pattern's styling or behavior. Browser
64
- checks should exercise both the demonstrated contract and relevant application
65
- integration; a successful showcase does not establish production parity. A new
66
- pattern need not already have an application consumer, and import counts cannot
67
- detect a duplicated implementation. Existing import guards prevent fixture/test
68
- dependencies; review and browser checks must assess hardcoded mock data and
69
- unrepresentative rendering that source ownership alone cannot prove.
70
-
71
- Review framing belongs in development-only `review/`, not production patterns.
72
- Use the separate review entry and [review.md](review.md) for the migration and
73
- build contract.
74
-
75
- ## Dependency contracts (blocking)
76
-
77
- - Component runtime may depend on components, shared controllers and lower-level
78
- helpers. It cannot depend on patterns or composition, including indirectly
79
- through aliases, forwarding exports, helpers or literal dynamic imports.
80
- Type-only pattern references do not introduce runtime dependencies.
81
- - Patterns consume component symbols published by the configured public entry,
82
- including intentional public types. A relative import of a public symbol is
83
- allowed inside the ADS; requiring a self-import through the barrel can create
84
- cycles. Private state, class blocks and implementation helpers stay internal.
85
- A public component may use its own private implementation dependencies.
86
- - Runtime code cannot import review implementations/types/styles, scenarios, fixtures or checks, including through
87
- forwarding exports. Scenarios also cannot import application source.
88
- - ADS implementations receive application data/effects through inputs and
89
- callbacks. Re-exporting application stores, routers or services from a helper
90
- does not make them part of the ADS.
91
-
92
- For example, `components/Control → shared/helper → patterns/Navigation` fails
93
- `component-dependency`. Extract a lower-level capability/controller, or move the
94
- arrangement to a pattern. `patterns/Navigation → components/Control` is valid
95
- when `Control` is public. Replacing that import with its private state helper
96
- fails `component-contract` even through a forwarding module.
97
-
98
- ## Styling contracts (blocking when ownership is established)
99
-
100
- Components own their control states and appearance. Patterns own arrangement,
101
- spacing and their own presentation. Use typed component props/variants, an
102
- intentional public class helper/hook, or registered non-state customization
103
- variables. Registration does not authorize overriding interaction policy.
104
-
105
- ```tsx
106
- // Component-owned implementation; the marker is not a consumer styling API.
107
- function Control() {
108
- return <button><span className="control-private-label">Label</span></button>;
109
- }
110
-
111
- // Pattern: rejected because it styles the component's private rendered part.
112
- const wrong = css`
113
- & .control-private-label { color: var(--text-muted); }
114
- `;
115
-
116
- // Pattern: its own arrangement remains valid.
117
- const layout = css`
118
- display: flex;
119
- gap: var(--space-4);
120
- `;
121
- ```
122
-
123
- The source guard matches component-emitted class names and unambiguous literal
124
- data markers to the selector's styled subject, including `:is()`/`:where()`.
125
- It also rejects reads of known private component variables. It does not treat
126
- an ancestor predicate or `:has()` query as styling that ancestor/descendant:
127
- `[data-layout="expanded"] > & { gap: var(--space-4); }` changes the pattern's
128
- own arrangement. Public hooks and registered non-state variables remain valid.
129
- Token definitions, namespaces and writes retain their existing guards.
130
-
131
- Opaque/computed imports, generated selectors, ambiguous shared markers, forwarded
132
- consumer classes and arbitrary service abstractions are not a complete static
133
- proof. Passing source checks does not prove that every visual override is safe.
134
- Review the real rendered states, computed styles, keyboard interactions and
135
- responsive layouts; use registered browser checks for promised behavior.
136
-
137
- ## Refactoring an owner
138
-
139
- Move runtime source, its scenarios/fixtures and guides together; update public
140
- exports, dependent imports and documented scenario IDs. Keep callers on the
141
- same intentional public API. Navigation stays in an application callback or a
142
- normal link supplied by the consumer, rather than a hidden router mutation in
143
- the pattern. Validate the complete migration with project checks, product and
144
- preview builds, and behavior tests. An existing guard rejection is not permission
145
- to write around the guarded editing workflow.