@reqvire-org/ads 0.4.0 → 0.4.3

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 (410) hide show
  1. package/README.md +115 -87
  2. package/dist/a11y.mjs +133 -48
  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 +142 -0
  7. package/dist/analysis/impact.mjs +20 -0
  8. package/dist/analysis/inputs.mjs +22 -0
  9. package/dist/analysis/module-resolvers.mjs +46 -0
  10. package/dist/analysis/native-adapter.mjs +180 -0
  11. package/dist/analysis/native-project.mjs +323 -0
  12. package/dist/analysis/queries.mjs +133 -0
  13. package/dist/analysis/service.mjs +153 -0
  14. package/dist/analysis/standalone.mjs +57 -0
  15. package/dist/analysis/syntax.mjs +179 -0
  16. package/dist/analysis/worker.mjs +182 -0
  17. package/dist/assets.mjs +6 -6
  18. package/dist/atomic-composition.mjs +191 -70
  19. package/dist/atomic-trace.mjs +120 -50
  20. package/dist/behavior-libraries.mjs +106 -37
  21. package/dist/behaviors.mjs +219 -77
  22. package/dist/boundaries.mjs +140 -41
  23. package/dist/brand-assets.mjs +219 -47
  24. package/dist/brands.mjs +86 -27
  25. package/dist/bun-compiler.mjs +28 -14
  26. package/dist/bun-worker.mjs +7 -5
  27. package/dist/capture/worker.mjs +15 -4
  28. package/dist/capture-store.mjs +4 -2
  29. package/dist/capture.mjs +17 -14
  30. package/dist/check-service.mjs +44 -58
  31. package/dist/check.mjs +754 -188
  32. package/dist/cli.mjs +200 -99
  33. package/dist/color-values.mjs +21 -21
  34. package/dist/component-contrast.mjs +127 -9
  35. package/dist/config.mjs +303 -135
  36. package/dist/construction-styles.cjs +10 -0
  37. package/dist/contrast-composition.mjs +134 -0
  38. package/dist/control-padding.mjs +45 -25
  39. package/dist/css-values.mjs +3 -2
  40. package/dist/declarative-flow.mjs +209 -109
  41. package/dist/design-values.mjs +136 -51
  42. package/dist/development-runtime.mjs +4 -6
  43. package/dist/draft-boundary.mjs +11 -6
  44. package/dist/evidence.mjs +1 -1
  45. package/dist/finding-rules.mjs +9 -5
  46. package/dist/font-rules.mjs +22 -17
  47. package/dist/fonts-generated.mjs +23 -16
  48. package/dist/foundation-views.mjs +242 -0
  49. package/dist/foundation.mjs +63 -39
  50. package/dist/generated-entries.mjs +101 -34
  51. package/dist/icons.mjs +79 -32
  52. package/dist/image-attributes.mjs +143 -66
  53. package/dist/image-size.mjs +1 -1
  54. package/dist/index.mjs +0 -2
  55. package/dist/init.mjs +122 -41
  56. package/dist/investigations.mjs +2 -2
  57. package/dist/layers.mjs +298 -129
  58. package/dist/layout-widths.mjs +180 -85
  59. package/dist/linaria/preserve-values.cjs +7 -0
  60. package/dist/linaria/spatial-inputs.cjs +56 -0
  61. package/dist/lockup-composition.mjs +44 -0
  62. package/dist/lockup-model.cjs +64 -0
  63. package/dist/mcp/THIRD_PARTY_NOTICES.md +51 -1
  64. package/dist/mcp/apps.mjs +4 -30
  65. package/dist/mcp/behavior-pages.mjs +72 -24
  66. package/dist/mcp/build-status.mjs +257 -64
  67. package/dist/mcp/catalog.mjs +90 -26
  68. package/dist/mcp/context.mjs +17 -18
  69. package/dist/mcp/draft-discovery.mjs +44 -21
  70. package/dist/mcp/drafts.mjs +903 -281
  71. package/dist/mcp/execution-coordinator.mjs +417 -167
  72. package/dist/mcp/execution-results.mjs +7 -7
  73. package/dist/mcp/mutations.mjs +673 -234
  74. package/dist/mcp/preview-watch.mjs +448 -170
  75. package/dist/mcp/preview-widget.bundle.js +44 -50
  76. package/dist/mcp/prompts.mjs +5 -5
  77. package/dist/mcp/result-pages.mjs +1 -1
  78. package/dist/mcp/sandbox-host.mjs +1 -1
  79. package/dist/mcp/server.mjs +2409 -577
  80. package/dist/mcp/showcase-host.mjs +165 -41
  81. package/dist/mcp/skills.mjs +1 -1
  82. package/dist/mcp/text-diff.mjs +29 -10
  83. package/dist/paint-contracts.mjs +174 -81
  84. package/dist/palette-generated.mjs +2 -2
  85. package/dist/pictogram-model.mjs +59 -0
  86. package/dist/pictograms.mjs +52 -0
  87. package/dist/preview-bun.mjs +494 -187
  88. package/dist/preview-failure.mjs +1 -1
  89. package/dist/preview-files.mjs +13 -13
  90. package/dist/preview-imports.mjs +104 -55
  91. package/dist/preview-inputs.mjs +2 -2
  92. package/dist/preview-requests.mjs +24 -0
  93. package/dist/preview-resources.mjs +288 -147
  94. package/dist/preview-scope.mjs +5 -4
  95. package/dist/program-cache.mjs +8 -34
  96. package/dist/project-documents.mjs +1 -1
  97. package/dist/public-api.mjs +69 -31
  98. package/dist/public-props.mjs +39 -22
  99. package/dist/{browser-audit → render-audit}/axe-run.mjs +3 -3
  100. package/dist/{browser-audit → render-audit}/image-shape.mjs +15 -5
  101. package/dist/{browser-audit → render-audit}/layout-overflow.mjs +86 -23
  102. package/dist/{browser-audit → render-audit}/non-text-contrast.mjs +86 -27
  103. package/dist/render-audit/pictograms.mjs +88 -0
  104. package/dist/{browser-audit → render-audit}/render-states.mjs +208 -52
  105. package/dist/{browser-audit → render-audit}/worker.mjs +98 -30
  106. package/dist/render-audit.mjs +838 -0
  107. package/dist/render-color-probe.mjs +96 -42
  108. package/dist/render-composition.mjs +164 -0
  109. package/dist/resource-limits.mjs +229 -97
  110. package/dist/runtime-contracts.mjs +467 -185
  111. package/dist/scenario-groups.mjs +22 -10
  112. package/dist/scenario-inspector.mjs +6 -43
  113. package/dist/scenario-program.mjs +8 -25
  114. package/dist/scenario-registry.mjs +72 -30
  115. package/dist/scenario-selectors.mjs +161 -64
  116. package/dist/scenario-slots.mjs +149 -56
  117. package/dist/scenario-trace.mjs +215 -109
  118. package/dist/scenarios-compiler.mjs +719 -378
  119. package/dist/scenarios-vite.d.mts +1 -3
  120. package/dist/scenarios-vite.mjs +2 -81
  121. package/dist/scenarios.mjs +421 -157
  122. package/dist/selector-match.mjs +2 -2
  123. package/dist/showcase/client.bundle.js +57 -56
  124. package/dist/showcase/draft-navigation.js +21 -3
  125. package/dist/showcase/favicon.ico +0 -0
  126. package/dist/showcase/favicon.svg +1 -0
  127. package/dist/showcase/foundation-view.css +58 -0
  128. package/dist/showcase/foundation-view.mjs +255 -0
  129. package/dist/showcase/guide-controls.ads.review.mjs +32 -0
  130. package/dist/showcase/icons.js +1 -145
  131. package/dist/showcase/index.html +3 -31
  132. package/dist/showcase/pictogram-view.mjs +53 -0
  133. package/dist/showcase/preview-frame.ads.review.css +46 -0
  134. package/dist/showcase/preview-frame.ads.review.d.mts +11 -0
  135. package/dist/showcase/preview-frame.ads.review.mjs +22 -0
  136. package/dist/showcase/preview-state.js +0 -9
  137. package/dist/showcase/refresh-scheduler.js +23 -0
  138. package/dist/showcase/style.css +5 -47
  139. package/dist/showcase/ui/ui.css +1353 -0
  140. package/dist/showcase/ui/ui.js +1064 -0
  141. package/dist/showcase-coverage.mjs +58 -37
  142. package/dist/skills/README.md +24 -23
  143. package/dist/skills/ads-designer/README.md +8 -2
  144. package/dist/skills/ads-designer/SKILL.md +143 -120
  145. package/dist/skills/ads-designer/references/accessibility.md +78 -15
  146. package/dist/skills/ads-designer/references/atomic-styles.md +4 -4
  147. package/dist/skills/ads-designer/references/behaviors.md +30 -27
  148. package/dist/skills/ads-designer/references/branding.md +101 -24
  149. package/dist/skills/ads-designer/references/captures.md +25 -0
  150. package/dist/skills/ads-designer/references/cli.md +21 -24
  151. package/dist/skills/ads-designer/references/contracts.md +7 -6
  152. package/dist/skills/ads-designer/references/design-data.md +49 -52
  153. package/dist/skills/ads-designer/references/drafts.md +20 -17
  154. package/dist/skills/ads-designer/references/evidence.md +1 -5
  155. package/dist/skills/ads-designer/references/guarded-editing.md +14 -18
  156. package/dist/skills/ads-designer/references/layers.md +1 -1
  157. package/dist/skills/ads-designer/references/layout.md +347 -0
  158. package/dist/skills/ads-designer/references/mobile.md +2 -1
  159. package/dist/skills/{ads-motion/references/performance.md → ads-designer/references/motion-performance.md} +5 -1
  160. package/dist/skills/{ads-motion/references/build.md → ads-designer/references/motion.md} +73 -5
  161. package/dist/skills/ads-designer/references/performance.md +3 -2
  162. package/dist/skills/ads-designer/references/pictograms.md +131 -0
  163. package/dist/skills/ads-designer/references/review.md +37 -34
  164. package/dist/skills/ads-designer/references/runtimes.md +33 -30
  165. package/dist/skills/ads-designer/references/scenarios.md +16 -18
  166. package/dist/skills/{ads-break-ui/references/catalog.md → ads-designer/references/stress-catalog.md} +3 -1
  167. package/dist/skills/ads-designer/references/stress-test.md +68 -0
  168. package/dist/skills/ads-designer/references/validation.md +83 -75
  169. package/dist/skills/ads-designer/references/workflows.md +8 -33
  170. package/dist/skills/ads-import/SKILL.md +43 -325
  171. package/dist/skills/ads-import/references/atomic-styles.md +4 -4
  172. package/dist/skills/ads-import/references/behaviors.md +30 -27
  173. package/dist/skills/ads-import/references/branding.md +5 -5
  174. package/dist/skills/ads-import/references/captures.md +25 -0
  175. package/dist/skills/ads-import/references/cli.md +21 -24
  176. package/dist/skills/ads-import/references/compatibility.md +1 -1
  177. package/dist/skills/ads-import/references/contracts.md +7 -6
  178. package/dist/skills/ads-import/references/design-data.md +49 -52
  179. package/dist/skills/ads-import/references/drafts.md +20 -17
  180. package/dist/skills/ads-import/references/evidence.md +1 -5
  181. package/dist/skills/ads-import/references/guarded-editing.md +14 -18
  182. package/dist/skills/ads-import/references/implementation.md +2 -1
  183. package/dist/skills/ads-import/references/layers.md +1 -1
  184. package/dist/skills/ads-import/references/layout.md +347 -0
  185. package/dist/skills/ads-import/references/review.md +37 -34
  186. package/dist/skills/ads-import/references/runtimes.md +33 -30
  187. package/dist/skills/ads-import/references/scenarios.md +16 -18
  188. package/dist/skills/ads-import/references/tokens.md +3 -3
  189. package/dist/skills/ads-import/references/validation.md +83 -75
  190. package/dist/skills/ads-import/references/workflows.md +8 -33
  191. package/dist/skills/ads-migrate/SKILL.md +56 -0
  192. package/dist/skills/ads-migrate/references/0.4.1-to-0.4.2.md +602 -0
  193. package/dist/skills/ads-port/SKILL.md +58 -344
  194. package/dist/skills/ads-port/references/atomic-styles.md +4 -4
  195. package/dist/skills/ads-port/references/behaviors.md +30 -27
  196. package/dist/skills/ads-port/references/captures.md +25 -0
  197. package/dist/skills/ads-port/references/cli.md +21 -24
  198. package/dist/skills/ads-port/references/contracts.md +7 -6
  199. package/dist/skills/ads-port/references/design-data.md +49 -52
  200. package/dist/skills/ads-port/references/drafts.md +20 -17
  201. package/dist/skills/ads-port/references/evidence.md +1 -5
  202. package/dist/skills/ads-port/references/guarded-editing.md +14 -18
  203. package/dist/skills/ads-port/references/layers.md +1 -1
  204. package/dist/skills/ads-port/references/layout.md +347 -0
  205. package/dist/skills/ads-port/references/lint-and-docs.md +8 -11
  206. package/dist/skills/ads-port/references/native-implementation.md +2 -1
  207. package/dist/skills/ads-port/references/review.md +37 -34
  208. package/dist/skills/ads-port/references/runtimes.md +33 -30
  209. package/dist/skills/ads-port/references/scenarios.md +16 -18
  210. package/dist/skills/ads-port/references/validation.md +83 -75
  211. package/dist/skills/ads-port/references/workflows.md +8 -33
  212. package/dist/source-symbols.mjs +1 -8
  213. package/dist/source-values.mjs +270 -129
  214. package/dist/spatial-composition.mjs +322 -0
  215. package/dist/spatial-contexts.cjs +56 -0
  216. package/dist/spatial-css.cjs +351 -0
  217. package/dist/spatial-inputs.cjs +80 -0
  218. package/dist/spatial-metadata.mjs +18 -0
  219. package/dist/spatial-model.cjs +322 -0
  220. package/dist/spatial.mjs +21 -0
  221. package/dist/stage-timing.cjs +20 -0
  222. package/dist/starters/preact/design-system/patterns/Conversation/Conversation.tsx +105 -0
  223. package/dist/starters/preact/design-system/patterns/Shell/Shell.tsx +275 -0
  224. package/dist/starters/preact/design-system/review/demo-frame/DemoFrame.ads.review.tsx +7 -0
  225. package/dist/starters/preact/design-system/review/screen-frame/ScreenFrame.ads.review.tsx +10 -0
  226. package/dist/starters/preact/design-system/showcase/mcp/main.ads.mount.tsx +8 -0
  227. package/dist/starters/preact/ds.config.json +25 -6
  228. package/dist/starters/preact/package.json +4 -8
  229. package/dist/starters/preact/tsconfig.json +4 -5
  230. package/dist/starters/preact/vite.config.ts +3 -3
  231. package/dist/starters/react/ADS.md +42 -47
  232. package/dist/starters/react/README.md +47 -49
  233. package/dist/starters/react/design-system/assets/pictograms/catalog.ads.json +13 -0
  234. package/dist/starters/react/design-system/assets/pictograms/journey.dark.svg +7 -0
  235. package/dist/starters/react/design-system/assets/pictograms/journey.svg +7 -0
  236. package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.tsx +18 -2
  237. package/dist/starters/react/design-system/components/Actions/IconButton/README.md +3 -0
  238. package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.ads.exports.ts +1 -0
  239. package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.ads.fixture.ts +1 -0
  240. package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.ads.scenario.tsx +7 -0
  241. package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.tsx +26 -0
  242. package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/README.md +5 -0
  243. package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/WorkspacePage.ads.fixture.ts +13 -0
  244. package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/WorkspacePage.ads.scenario.tsx +22 -0
  245. package/dist/starters/react/design-system/index.ts +2 -1
  246. package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.exports.ts +1 -0
  247. package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.fixture.ts +7 -0
  248. package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.scenario.tsx +15 -0
  249. package/dist/starters/react/design-system/patterns/Conversation/Conversation.tsx +105 -0
  250. package/dist/starters/react/design-system/patterns/Conversation/README.md +9 -0
  251. package/dist/starters/react/design-system/patterns/Shell/Floating.ads.fixture.ts +5 -0
  252. package/dist/starters/react/design-system/patterns/Shell/Floating.ads.scenario.tsx +21 -0
  253. package/dist/starters/react/design-system/patterns/Shell/README.md +43 -0
  254. package/dist/starters/react/design-system/patterns/Shell/Shell.ads.exports.ts +1 -0
  255. package/dist/starters/react/design-system/patterns/Shell/Shell.ads.fixture.ts +5 -0
  256. package/dist/starters/react/design-system/patterns/Shell/Shell.ads.scenario.tsx +21 -0
  257. package/dist/starters/react/design-system/patterns/Shell/Shell.tsx +274 -0
  258. package/dist/starters/react/design-system/review/demo-frame/DemoFrame.ads.exports.ts +1 -1
  259. package/dist/starters/react/design-system/review/demo-frame/DemoFrame.ads.review.tsx +7 -0
  260. package/dist/starters/react/design-system/review/index.ads.review.ts +4 -0
  261. package/dist/starters/react/design-system/review/region-block/RegionBlock.ads.exports.ts +1 -0
  262. package/dist/starters/react/design-system/review/region-block/RegionBlock.ads.review.tsx +6 -0
  263. package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.ads.exports.ts +1 -1
  264. package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.ads.review.tsx +10 -0
  265. package/dist/starters/react/design-system/showcase/mcp/{main.tsx → main.ads.mount.tsx} +4 -2
  266. package/dist/starters/react/design-system/tokens/catalog.ads.json +1221 -0
  267. package/dist/starters/react/design-system/tokens/colors.css +1 -1
  268. package/dist/starters/react/design-system/tokens/spacing.css +22 -32
  269. package/dist/starters/react/design-system/tokens/spatial.ads.json +70 -0
  270. package/dist/starters/react/design-system/tokens/themes.generated.ts +1 -1
  271. package/dist/starters/react/ds.config.json +25 -6
  272. package/dist/starters/react/package.json +2 -6
  273. package/dist/starters/react/tsconfig.json +2 -3
  274. package/dist/starters/react/vite.config.ts +3 -3
  275. package/dist/style-boundaries.mjs +70 -25
  276. package/dist/task-cache.mjs +173 -72
  277. package/dist/task-worker.mjs +22 -11
  278. package/dist/test-boundaries.mjs +132 -59
  279. package/dist/themes-generated.mjs +1 -1
  280. package/dist/themes-watch.mjs +57 -22
  281. package/dist/themes.mjs +176 -73
  282. package/dist/token-export.mjs +39 -14
  283. package/dist/token-policy.mjs +6 -3
  284. package/dist/token-quality.mjs +6 -6
  285. package/dist/token-samples.mjs +16 -5
  286. package/dist/tokens.mjs +71 -26
  287. package/dist/ui-framework.mjs +16 -14
  288. package/dist/unit-contracts.mjs +251 -104
  289. package/dist/units.mjs +209 -99
  290. package/dist/usage.mjs +138 -38
  291. package/dist/validation-checks.mjs +115 -38
  292. package/dist/validation-inputs.mjs +191 -78
  293. package/dist/validation.mjs +268 -102
  294. package/dist/verification/browser.mjs +27 -5
  295. package/dist/verification.mjs +711 -187
  296. package/docs/ADS.md +96 -80
  297. package/docs/ARCHITECTURE.md +368 -137
  298. package/docs/BEHAVIORS.md +29 -25
  299. package/docs/CACHING.md +77 -17
  300. package/docs/CHANGELOG.md +332 -17
  301. package/docs/CONTRACTS.md +12 -4
  302. package/docs/DESIGN-REFERENCES.md +40 -0
  303. package/docs/GUIDE.md +300 -263
  304. package/docs/MCP.md +187 -324
  305. package/docs/SPATIAL-CHECKS.md +69 -0
  306. package/docs/benchmarks/README.md +39 -0
  307. package/package.json +43 -34
  308. package/dist/browser-audit.mjs +0 -429
  309. package/dist/create.mjs +0 -48
  310. package/dist/lint-config.mjs +0 -50
  311. package/dist/mcp/project-widget.bundle.js +0 -114
  312. package/dist/mcp/reports.mjs +0 -101
  313. package/dist/mcp/widget.bundle.js +0 -147
  314. package/dist/oxlint.mjs +0 -89
  315. package/dist/preview-builder.mjs +0 -133
  316. package/dist/preview-workers.mjs +0 -184
  317. package/dist/showcase.mjs +0 -77
  318. package/dist/skills/ads-break-ui/LICENSE.upstream +0 -21
  319. package/dist/skills/ads-break-ui/README.md +0 -16
  320. package/dist/skills/ads-break-ui/SKILL.md +0 -412
  321. package/dist/skills/ads-break-ui/agents/openai.yaml +0 -4
  322. package/dist/skills/ads-break-ui/references/atomic-styles.md +0 -293
  323. package/dist/skills/ads-break-ui/references/behaviors.md +0 -412
  324. package/dist/skills/ads-break-ui/references/captures.md +0 -135
  325. package/dist/skills/ads-break-ui/references/contracts.md +0 -317
  326. package/dist/skills/ads-break-ui/references/design-data.md +0 -354
  327. package/dist/skills/ads-break-ui/references/drafts.md +0 -194
  328. package/dist/skills/ads-break-ui/references/evidence.md +0 -128
  329. package/dist/skills/ads-break-ui/references/guarded-editing.md +0 -165
  330. package/dist/skills/ads-break-ui/references/layers.md +0 -145
  331. package/dist/skills/ads-break-ui/references/reporting.md +0 -101
  332. package/dist/skills/ads-break-ui/references/review.md +0 -97
  333. package/dist/skills/ads-break-ui/references/runtimes.md +0 -203
  334. package/dist/skills/ads-break-ui/references/scenarios.md +0 -246
  335. package/dist/skills/ads-break-ui/references/validation.md +0 -166
  336. package/dist/skills/ads-break-ui/references/verification.md +0 -58
  337. package/dist/skills/ads-break-ui/references/workflows.md +0 -90
  338. package/dist/skills/ads-designer/references/reporting.md +0 -101
  339. package/dist/skills/ads-import/references/reporting.md +0 -101
  340. package/dist/skills/ads-motion/LICENSE.upstream +0 -21
  341. package/dist/skills/ads-motion/README.md +0 -22
  342. package/dist/skills/ads-motion/SKILL.md +0 -385
  343. package/dist/skills/ads-motion/agents/openai.yaml +0 -4
  344. package/dist/skills/ads-motion/references/atomic-styles.md +0 -293
  345. package/dist/skills/ads-motion/references/audit.md +0 -44
  346. package/dist/skills/ads-motion/references/behaviors.md +0 -412
  347. package/dist/skills/ads-motion/references/captures.md +0 -135
  348. package/dist/skills/ads-motion/references/contracts.md +0 -317
  349. package/dist/skills/ads-motion/references/design-data.md +0 -354
  350. package/dist/skills/ads-motion/references/drafts.md +0 -194
  351. package/dist/skills/ads-motion/references/evidence.md +0 -128
  352. package/dist/skills/ads-motion/references/guarded-editing.md +0 -165
  353. package/dist/skills/ads-motion/references/layers.md +0 -145
  354. package/dist/skills/ads-motion/references/motion-review.md +0 -35
  355. package/dist/skills/ads-motion/references/reporting.md +0 -101
  356. package/dist/skills/ads-motion/references/review.md +0 -97
  357. package/dist/skills/ads-motion/references/runtimes.md +0 -203
  358. package/dist/skills/ads-motion/references/scenarios.md +0 -246
  359. package/dist/skills/ads-motion/references/validation.md +0 -166
  360. package/dist/skills/ads-motion/references/verification.md +0 -39
  361. package/dist/skills/ads-motion/references/workflows.md +0 -90
  362. package/dist/skills/ads-port/references/reporting.md +0 -101
  363. package/dist/starters/preact/design-system/components/Layout/Grid/Grid.ads.contract.ts +0 -6
  364. package/dist/starters/preact/design-system/components/Layout/Grid/Grid.tsx +0 -76
  365. package/dist/starters/preact/design-system/review/demo-frame/DemoFrame.tsx +0 -29
  366. package/dist/starters/preact/design-system/review/screen-frame/ScreenFrame.tsx +0 -34
  367. package/dist/starters/preact/design-system/review/token-preview/TokenPreview.ads.contract.ts +0 -6
  368. package/dist/starters/preact/design-system/review/token-preview/TokenPreview.tsx +0 -137
  369. package/dist/starters/preact/design-system/showcase/mcp/main.tsx +0 -6
  370. package/dist/starters/react/design-system/brand/Icons/AppIcon/AppIcon.ads.fixture.ts +0 -7
  371. package/dist/starters/react/design-system/brand/Icons/AppIcon/AppIcon.ads.scenario.tsx +0 -4
  372. package/dist/starters/react/design-system/brand/Identity/Logo/Logo.ads.fixture.ts +0 -7
  373. package/dist/starters/react/design-system/brand/Identity/Logo/Logo.ads.scenario.tsx +0 -4
  374. package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.contract.ts +0 -6
  375. package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.exports.ts +0 -1
  376. package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.fixture.ts +0 -12
  377. package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.scenario.tsx +0 -17
  378. package/dist/starters/react/design-system/components/Layout/Grid/Grid.tsx +0 -75
  379. package/dist/starters/react/design-system/components/Layout/Grid/README.md +0 -21
  380. package/dist/starters/react/design-system/review/brand-preview/BrandPreview.ads.exports.ts +0 -1
  381. package/dist/starters/react/design-system/review/brand-preview/BrandPreview.tsx +0 -112
  382. package/dist/starters/react/design-system/review/demo-frame/DemoFrame.tsx +0 -29
  383. package/dist/starters/react/design-system/review/grid-cell/GridCell.ads.exports.ts +0 -1
  384. package/dist/starters/react/design-system/review/grid-cell/GridCell.tsx +0 -18
  385. package/dist/starters/react/design-system/review/index.ts +0 -6
  386. package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.tsx +0 -34
  387. package/dist/starters/react/design-system/review/token-preview/TokenPreview.ads.contract.ts +0 -6
  388. package/dist/starters/react/design-system/review/token-preview/TokenPreview.ads.exports.ts +0 -1
  389. package/dist/starters/react/design-system/review/token-preview/TokenPreview.tsx +0 -137
  390. package/dist/starters/react/design-system/showcase/mcp/index.html +0 -1
  391. package/dist/starters/react/design-system/tokens/Color.ads.fixture.ts +0 -124
  392. package/dist/starters/react/design-system/tokens/Color.ads.scenario.tsx +0 -4
  393. package/dist/starters/react/design-system/tokens/Layout.ads.fixture.ts +0 -39
  394. package/dist/starters/react/design-system/tokens/Layout.ads.scenario.tsx +0 -4
  395. package/dist/starters/react/design-system/tokens/Motion.ads.fixture.ts +0 -18
  396. package/dist/starters/react/design-system/tokens/Motion.ads.scenario.tsx +0 -4
  397. package/dist/starters/react/design-system/tokens/Shape.ads.fixture.ts +0 -30
  398. package/dist/starters/react/design-system/tokens/Shape.ads.scenario.tsx +0 -4
  399. package/dist/starters/react/design-system/tokens/Space.ads.fixture.ts +0 -37
  400. package/dist/starters/react/design-system/tokens/Space.ads.scenario.tsx +0 -4
  401. package/dist/starters/react/design-system/tokens/Type.ads.fixture.ts +0 -29
  402. package/dist/starters/react/design-system/tokens/Type.ads.scenario.tsx +0 -4
  403. package/dist/starters/react/package-lock.json +0 -4707
  404. package/dist/token-fixtures.mjs +0 -30
  405. package/docs/benchmarks/bun-previews.md +0 -91
  406. package/docs/benchmarks/preview-memory.md +0 -147
  407. package/docs/benchmarks/turbo-poc.md +0 -284
  408. package/docs/plans/execution-coordination.md +0 -57
  409. /package/dist/{browser-audit → render-audit}/first-render.mjs +0 -0
  410. /package/dist/{browser-audit → render-audit}/layout-shift.mjs +0 -0
@@ -1,194 +0,0 @@
1
- # Tracked drafts and auto-mode acceptance
2
-
3
- Every MCP source change goes through a draft: only `ads_accept` of an exact draft
4
- revision writes accepted source. Direct editors can choose drafts too, for isolation
5
- and comparison; ordinary direct source edits use the separate
6
- [direct editing workflow](workflows.md#direct-design-system-code-access) and do not
7
- require draft acceptance. Auto mode means the agent reviews the
8
- rendered result and accepts it; it does not introduce a human approval gate.
9
- Human acceptance controls are not part of this version.
10
-
11
- ## Complete a coherent design change
12
-
13
- A unit of design work can span several components, a pattern or an entire view.
14
- Do not finish that work with its intended changes left only in drafts. Review,
15
- validate and accept all required drafts before reporting the change complete.
16
- Accept dependency drafts first, then review their dependents again. If checks or
17
- baseline conflicts block acceptance, fix them and continue. If progress requires
18
- missing user input or an external change, report the work as unfinished, with the
19
- exact draft and blocker. Never silently drop requested work or accept a failing
20
- draft to meet this completion rule. Leave a draft intentionally only when the
21
- user asks to retain a proposal for later review.
22
-
23
- ## Source and lifecycle
24
-
25
- `ads_create_draft({units:["components/Button"], title:"Button spacing"})` creates
26
- `ads-drafts/<id>/proposal.ads.draft.json` and `.ads` draft sources.
27
- For example, `Button.tsx.ads` maps to the normal `Button.tsx` target. The final
28
- `.ads` extension keeps proposed code out of default TypeScript/lint discovery,
29
- without editing project tsconfig files. The manifest remains
30
- `proposal.ads.draft.json`. These are ordinary tracked project files: commit them and review them in a PR.
31
-
32
- A draft may group up to 64 owners and 256 tracked files. For related changes,
33
- use one multi-owner draft: its previews share a compiler workspace and acceptance
34
- validates the combined candidate once, then applies all changes together. The
35
- existing source and patch byte budgets still apply.
36
-
37
- **An owner is in at most one open draft.** Creating a draft for an owner that another
38
- open draft holds is refused and names that draft, so concurrent clients edit
39
- different owners and drafts never share a file. Accepting or dropping a draft frees
40
- its owners. To build on an unaccepted change of another owner, depend on its draft.
41
-
42
- A draft starts with only its owners' own files. A shared companion such as
43
- `ds.config.json` joins the draft when the draft changes it. Shared entries are never
44
- in a draft: the public barrel, the review entry and the styles entry are generated
45
- from the owners' `.ads.exports.ts` files and token sheets (see
46
- [contracts.md](contracts.md)).
47
-
48
- A Git checkout is not required to create or recover a draft. Restarting ADS or
49
- cloning the project discovers the same source. Generated compiler workspaces and
50
- execution events remain under ignored `.ds/`; an interrupted check is never a pass.
51
-
52
- The manifest maps each proposed file to its normal project target and records its
53
- baseline fingerprint and owner. Edit the proposed `files/` source with local file
54
- tools, or send changes through `ads_update_draft` (pass the current revision from
55
- `ads_drafts`): `changes` with contents (`content:null` proposes a deletion; binary
56
- content uses `encoding:"base64"`), or `patch`/`patchFile` with a Git unified diff
57
- written against canonical paths, applied exactly to the draft's current proposal.
58
- New paths join their declared owner. `ads_read_file` reads mapped draft source in
59
- bounded ranges. Do not edit accepted source to iterate a proposal.
60
-
61
- `ads_drafts` lists only drafts. Filter by unit/query, page with offset/limit, or
62
- pass id to inspect file mappings. Catalogue and scenario entries expose their
63
- draft references. `ads_tokens` also lists tokenGroups derived from token CSS
64
- files. For a group draft, create `{units:["tokens"],tokenGroups:["colors"]}` using
65
- the actual returned IDs. Shared tokens remain owned by `tokens`; groups do not
66
- create component-local value catalogues.
67
-
68
- ## Preview and dependencies
69
-
70
- Call `ads_show_draft({id,scenario?})`, then inspect its actual `showcaseUrl` in a
71
- browser: the project's own showcase with the draft beside its accepted version
72
- (`?draft=<id>&split=1`). `isolatedShowcaseUrl` (`/draft/<id>/` on the same host)
73
- shows the draft's workspace alone. A draft has no server, port or compiler of its
74
- own: its workspace is compiled by the project's one compiler, which builds the draft
75
- being viewed first, then the project, then background work. The preview reuses that
76
- workspace across edits and does not run acceptance checks. Up to four draft compiler sessions stay warm; opening
77
- more reclaims an older generated workspace without deleting its tracked proposal.
78
- Creation queues compiler prewarming without delaying its response. Bursts of
79
- creations coalesce, and only one queued compiler initializes at a time. A newer
80
- speculative prewarm reclaims the older unused one; explicitly opened sessions
81
- remain warm within the four-session bound. MCP edits
82
- and direct draft-file edits notify warm previews through file events; periodic
83
- reconciliation recovers missed events. Watched builds compile requested scenarios
84
- and their dependencies, retaining roots used by other open previews. Full builds
85
- and validation still cover the complete configured scope. Incremental semantic
86
- analysis reuses unchanged TypeScript source trees without caching passing checks.
87
- Reopening a known scenario renders through the existing compiler while a worker
88
- refreshes catalogue metadata. Read `discovery.state` (`current`, `pending`,
89
- `error`) and its metadata revision separately from the exact proposal revision.
90
- New/missing scenario identities wait for fresh discovery. A previous preview may
91
- stay visible until compilation finishes; pending/stale output is not evidence.
92
- Preview workspaces follow current project inputs, including deletions, and overlay
93
- only actual draft changes. A draft's own edits and the draft being viewed resync at
94
- once; other drafts behind an accepted-source change catch up in the background
95
- without delaying the viewed one. A restarted session rebuilds its disposable workspace;
96
- a missing workspace is recreated. Accept/drop removes it even after a restart,
97
- and startup prunes workspaces whose proposals no longer exist.
98
- When discovery fails, `ads_show_draft` returns the draft's own diagnostics and
99
- `diagnosticsUri`; the accepted `ads://project/scenarios` is a different registry.
100
- Read the scoped URI even when the compiler could not start.
101
-
102
- ADS does not merge. With one draft per owner, drafts never overlap; accepted source
103
- can still change underneath a draft through a direct edit or a Git pull. Then
104
- `ads_accept` refuses with a baseline conflict naming the files: drop the draft and
105
- create a new one from current source. Reopen after edits to obtain the current
106
- revision.
107
- Compilation is feedback, not passing behavior/visual evidence.
108
-
109
- For model-visible images, use `ads_capture({scenario,draft:id,revision,...settings})`
110
- and read the returned PNG resource URIs. This captures Accepted/current and
111
- Draft/candidate without acceptance checks; new scenarios have only a candidate.
112
- The candidate records the exact proposal revision. Edits during capture prevent
113
- publication of its image slots. Captures establish appearance at those settings,
114
- not passing acceptance or behavioral checks.
115
-
116
- A pattern draft may use a component draft; a composition may use component,
117
- pattern and token drafts. Declare their IDs in `dependencies` when creating or
118
- updating the dependent draft. Keep normal `@ds` imports in all implementations
119
- and scenarios. The preview overlays the proposed files at canonical paths; no
120
- project code imports `.ads` draft source. Cycles, missing dependencies and
121
- an owner held by another open draft are errors. Use one coupled draft for coupled
122
- owners. A coupled draft may declare up to 64 existing/new owners.
123
-
124
- Accept dependencies first. ADS removes resolved dependency IDs from dependent
125
- manifests and their previews use the final accepted implementation automatically;
126
- each owner's exports file feeds the generated barrel, so dependents need no barrel
127
- edit. Review the dependent's new revision before accepting it.
128
- If a dependency is dropped, correct the remaining draft's dependency list.
129
-
130
- DS Explorer keeps drafts in the ordinary Tokens, Components, Patterns and
131
- Composition navigation. A Draft badge marks an owner with a pending proposal,
132
- whether or not it has an accepted version. Select that entry and use the header
133
- Split view toggle to compare Accepted and Draft in the right pane. Both use the
134
- same scenario/theme and available or phone viewport width. New owners appear
135
- in their normal section; without an accepted counterpart they show only the
136
- draft and disable comparison. There is no separate Drafts tab or scenario picker.
137
- An isolated overlay can also render an unchanged scenario as an explicit review
138
- context; that alone does not give its owner a Draft badge. Use `ads_drafts` for
139
- draft-only MCP listing.
140
-
141
- After 20 retained module revisions, Explorer restarts the affected App to release
142
- its module cache, then restores the selected scenario/theme/viewport. Comparison
143
- keeps the other version mounted; no manual reload or draft acceptance is needed.
144
-
145
- Explorer entry glyphs separately show preview build states in monochrome: not
146
- built, building, compiled/checking, ready, stale and failed. MCP draft summaries
147
- include `preview` and preview calls include `build`; inspect `building`,
148
- `current`, `stale`, scenario revisions and `preview.resourceUri` for detail.
149
- Subscribe to `ads://project/build` and `ads://project/drafts` for standard
150
- resource-update notifications on completion, failure and metadata refresh, or
151
- subscribe only to an active draft's `preview.resourceUri` for its isolated report.
152
- Modern clients use `subscriptions/listen` resource filters; older clients use
153
- `resources/subscribe`. Re-read notified resources to update the existing view;
154
- unsubscribe on teardown and resubscribe/read after reconnect. Removal invalidates
155
- the scoped resource. Poll when the host does not forward notifications.
156
- Build completion and mounted-App rendering readiness are separate. Ready draft
157
- output remains unaccepted. Review the
158
- current rendered revision and complete acceptance before finishing the change.
159
-
160
- ## Accept or drop
161
-
162
- After rendered review, call `ads_accept({id,revision})`, or first
163
- `ads_accept({id,revision,dryRun:true})` to run every check without writing. It checks
164
- that exact revision, runs mandatory ADS guards plus `acceptance.checks` and, when
165
- `acceptance.behaviorChecks` is enabled, affected registered behavior checks, and
166
- applies passing changes at their normal paths. `acceptance.browserAudit` chooses the
167
- axe-core audit: `"owners"` (default) the draft owners' own UI scenarios, `"affected"`
168
- every scenario the change reaches, `false` none; an `a11y-axe` error rejects the
169
- draft. Checks and renders run in the draft's reviewed workspace through the project's
170
- compiler and showcase, and accepting a revision a dry run just passed reuses its
171
- results. Fix a failure in the component and accept the new revision. After a series
172
- of accepted drafts, run the full audit of everything affected as a stage:
173
- `ads_validate` with the validation policy and `scope:"changed"`. Changes during checking or baseline conflicts prevent
174
- application. Successful acceptance removes the proposal and records an event.
175
- There is no separate Apply or Iterate action. A failed attempt retains the draft;
176
- inspect its returned resultId with `ads_results` and fix the reported boundary.
177
-
178
- `ads_drop_draft({id,revision})` deletes a proposal and its generated preview,
179
- without changing accepted source. Drop replaces a separate refusal action.
180
- Read `ads_status.drafts`, `ads_drafts.events` or `ads://project/drafts` to observe
181
- decisions. Resource notifications are available, but the host may not wake an
182
- agent; always use the returned outcome or persisted status as the fallback.
183
-
184
- ## Build isolation
185
-
186
- Draft presence alone must not fail an application build. Drafts are excluded from
187
- normal ADS discovery and validation inputs. ADS import guards reject direct,
188
- aliased, re-exported, dynamic and symlink imports of marked files or ads-drafts/,
189
- including attempts from scenarios/tests outside the isolated preview overlay.
190
- Install `draftImportGuard()` from `@reqvire-org/ads/scenarios/vite` in application
191
- Vite/Rollup builds as well as keeping the mandatory ADS check/build pipeline.
192
- It rejects resolved draft modules and glob-expanded module loads. Merely adding a
193
- TypeScript exclude pattern is not an import boundary. Do not export drafts, add
194
- 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` and `ads_accept` 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,165 +0,0 @@
1
- # Advanced guarded editing
2
-
3
- Choose [direct editing or MCP-only editing](workflows.md) first. This reference
4
- covers what MCP's guarded editing checks and how; it does not require direct source
5
- edits to go through MCP. Every MCP source change goes through a [tracked draft](drafts.md):
6
- only `ads_accept` of an exact draft revision writes accepted source. There is no
7
- direct patch or transaction tool.
8
-
9
- For a focused repair, create a one-owner draft and send a Git unified diff to it:
10
-
11
- ```js
12
- ads_create_draft({"units":["components/Example"]})
13
- ads_update_draft({"id":"<id>","revision":"<revision>","patch":"--- a/design-system/components/Example.tsx\n+++ b/..."})
14
- ads_accept({"id":"<id>","revision":"<new revision>","dryRun":true})
15
- ads_accept({"id":"<id>","revision":"<new revision>"})
16
- ```
17
-
18
- Diff headers name canonical paths; hunks must match the draft's current proposal
19
- exactly (no fuzzy matching). Large diffs can go in a `.ds/patches/<name>.patch` file
20
- passed as `patchFile`. Binary files go through `changes` with `encoding:"base64"`.
21
- Coupled owners share one draft (1–64 owners); a pattern that needs an unaccepted
22
- component change depends on that component's draft instead of including its owner.
23
-
24
- `dryRun:true` runs every acceptance check on the candidate and writes nothing; the
25
- draft stays. The candidate is checked with mandatory ADS guards, `acceptance.checks`
26
- and, when `acceptance.behaviorChecks` is enabled, affected registered behavior
27
- checks. Registration alone does not require a test at acceptance.
28
- `acceptance.browserAudit` chooses the accessibility audit: `"owners"` (default) audits
29
- the draft owners' own UI scenarios, `"affected"` every scenario the change reaches,
30
- `false` none; `a11y-axe` errors reject the draft. Run the full audit of everything
31
- affected as a stage after a series of accepted drafts: `ads_validate` with the
32
- validation policy and `scope:"changed"` (see [validation policies](validation.md)).
33
-
34
- Checks and browser renders run in the draft's reviewed preview workspace, compiled by
35
- the project's one compiler and served by its one showcase. Accepting the revision a
36
- dry run just passed reuses that run's `ads check` and audit results. Read the
37
- summary, then page failing `outcomes`, `diagnostics` or pipeline `checks` through
38
- `ads_results` with its `resultId`. Inspect one exact outcome with
39
- `ads_investigate({unit,check,runId})`; fix the draft and check again. See
40
- [evidence.md](evidence.md) for page/range limits. Keep `<Owner>.ads.contract.ts` and
41
- specs with their owner and use registered checks; a scratchpad run against live
42
- source cannot verify unapplied changes. Acceptance revalidates before writing.
43
- Dry-run evidence is not saved as passing evidence for the live project.
44
-
45
- `ads_verify({unit,checks?})` selects checks for current project source; it has no
46
- draft argument.
47
-
48
- Build notifications are deferred until the showcase finishes initial discovery;
49
- a preview cannot be opened with an incomplete tool list. A missing App tool is a
50
- host-startup failure, not evidence that component behavior failed. Preserve the
51
- draft and inspect the host diagnostic.
52
-
53
- Registered project scripts default to 60 seconds each. A guarded configuration
54
- change can set `mcp.mutationCheckTimeoutMs` (100–300000 ms) after measuring build
55
- duration and contention. Timeouts name the command, budget and elapsed time;
56
- behavior-profile budgets are separate. Do not drop checks to fit either budget.
57
- A preview waits up to 5 minutes for its build, including the first build after the
58
- MCP server starts; `mcp.previewBuildTimeoutMs` (1000–3600000 ms) changes that wait.
59
- The accessibility audit renders `mcp.auditPages` pages at once (1–16, default 4).
60
-
61
- Behavior-run performance belongs to both orchestration and project checks. ADS
62
- selects affected owners, filters registered Playwright case tags and shares one
63
- candidate host per run. The project owns assertions, browser setup, worker count,
64
- per-test timeouts and its profile's whole-run `timeoutMs`. The latter covers the
65
- entire runner process, not each test. Do not rewrite APIs, drop guarantees or
66
- disable checks to fit the budget. Inspect measured durations before tuning it.
67
-
68
- During verification, inspect `ads_status.behaviors.progress`; during candidate
69
- validation, inspect `ads_status.mutations.progress`. These show completed/active/
70
- pending checks and timings. MCP clients requesting progress also receive updates.
71
- A timeout retains reported case outcomes and identifies active/unstarted checks;
72
- it still blocks the mutation. `reportedStatus:"passed"` within an incomplete run
73
- is diagnostic information, not a passing guarantee. Reports/artifacts under the
74
- live project's `.ds/verification/` survive candidate cleanup. Uninstrumented custom
75
- runners may report an unknown execution state instead of claiming a case started.
76
-
77
- For independent browser specs, consider a small parallel worker count and measure
78
- on the target machine. Use separate contexts/pages, independent state and the
79
- candidate URLs provided by `openBehaviorScenario`; avoid fixed live-server URLs,
80
- shared mutable fixtures and test-order assumptions. Files can run in parallel;
81
- tests in one file remain sequential by default. Prefer readiness assertions over
82
- blanket sleeps. Fake clocks suit timer-only guarantees; keep real time for actual
83
- gesture/motion/layout guarantees. Project settings belong in guarded configuration
84
- changes; ADS does not silently raise budgets or override the worker count.
85
-
86
- If a check cannot load its MCP preview, preserve the draft and inspect the exact
87
- resource URI and failed browser requests before changing component code. The ADS
88
- showcase retries a fetch transport failure on `resources/read` at most twice
89
- (200/800 ms backoff); recovered startup reads remain visible in
90
- `startupDiagnostics`. It never retries tool calls, assertions or complete checks,
91
- and persistent failures still block application. HTTP/protocol/content errors,
92
- integrity failures and cancellation do not retry. External hosts own their
93
- transport behavior. Chrome's `ERR_NETWORK_CHANGED` does not prove an ADS restart
94
- or identify Docker/VPN churn: correlate failure timestamps with live interface
95
- events, Chrome network logs and server availability. Do not weaken checks or
96
- rewrite a valid API to hide infrastructure failures.
97
-
98
- Named barrel imports can narrow affected checks when the project accurately
99
- declares package `sideEffects`; retain CSS/global effects in that policy. Missing
100
- or unsupported policies and dynamic/wildcard dependencies stay conservative.
101
- Do not change the policy merely to suppress verification of real side effects.
102
-
103
- For registered measured-geometry style writes, use direct `element.style.transform =
104
- value` or `element.style.setProperty("--ds-measured-value", value)` with the exact
105
- file/property boundary, declared in the owner's contract:
106
- `styles: { writes: { "./Menu.tsx": ["--ds-menu-x"] } }`. Inline JSX/factory styles
107
- for measured geometry are declared as `styles: { inline: ["./Menu.tsx"] }`, and a
108
- component's `--ds-*` variables that patterns, the showcase or the application may set
109
- as `customization: ["--ds-tabs-h"]`. `ds.config.json` holds no per-owner entries. The current guard rejects a style-object alias such as
110
- `const style = element.style` as an escape; it does not trace the alias to later
111
- writes. Keep writes explicit when adapting local controller code. This syntax
112
- constraint is separate from deciding which measured properties belong to the
113
- controller; it does not authorize unregistered visual writes.
114
-
115
- Shared provenance uses the existing `documentation` unit. Read its `filePolicy`
116
- from `ads_units`: one patch can create `CREDITS.md`, shared `licenses/*.txt` and
117
- README links together. Conventional root credits/license/notice names support
118
- UTF-8 `.md`/`.txt` or extensionless notices; `licenses/` may also sit under
119
- `docs/`, `doc/` or the ADS root. Preserve upstream notice text exactly. Keep
120
- component/asset-local notices with their owner; reference shared notices instead
121
- of duplicating them across units. Do not create an asset group or bypass a guard
122
- to add these documents. Code/configuration and hidden/generated paths remain
123
- outside documentation ownership.
124
-
125
- Static design values and formulas belong in the shared Data foundation. Components
126
- map those values with `--ds-*` variables; patterns use `--ux-*`. There are no private
127
- token namespaces/value sheets or token sections in owner contracts. Keep measured
128
- runtime geometry separate. Read [design-data.md](design-data.md) before adding a
129
- design value or repairing an ownership/value-source diagnostic.
130
-
131
- `ads_prepare_token_samples({id, bindings?, draft?})` preserves existing project
132
- samples, removes undeclared names and writes the result into a draft (the given one,
133
- or a new one for the scenario's owner). Supply explicit `{token,property,probe}`
134
- bindings for new samples; unresolved tokens stay reported. ADS does not infer visual
135
- meaning or fabricate renderers. Show the draft, inspect the actual App sample
136
- effects, then accept it.
137
-
138
- Every authored file has one owner, and drafts carry only their owners' files. Shared
139
- entries are generated: the public barrel and review entry from each owner's
140
- `<Owner>.ads.exports.ts`, the styles entry from the token sheets, and the theme
141
- files. A draft that edits a generated entry is refused. ADS deletes an empty
142
- `.gitkeep` itself when accepted source is added beneath it; owners never edit
143
- placeholders. Other hidden files stay protected. A redundant
144
- scenario can be deleted when real coverage remains elsewhere; removing a
145
- scenario does not erase ownership of the unit's runtime source.
146
-
147
- Keep contextual public parts public when they are intended consumer API. Demonstrate
148
- them through their actual public composition/customization path and list their real
149
- render references in covers. Do not count internal production renders as public API
150
- coverage. Behavioral APIs use exercises and registered guarantees instead.
151
- Scenario controls still use public UI. A native link/button can supply semantics
152
- through a public runtime slot that demonstrably clones its child with owned
153
- props, or through matching runtime-owned selectors attached to the actual rendered
154
- DOM. Source ownership must be proven; an `asChild` flag or a lookalike marker is
155
- insufficient. Standalone controls and custom scenario styling remain rejected. See
156
- [scenarios.md](scenarios.md) for evidence and limits. Preserve the intended
157
- composition instead of substituting an unrelated styled control or adding a
158
- demo-only component prop. Review framing belongs in development-only `review/`, through its separate public entry.
159
-
160
- A complete runner report containing an ordinary failed assertion preserves each
161
- passing check as `passed`; the failed check remains `failed`, and overall
162
- verification still rejects the mutation. Fix the actual failing checks instead of
163
- assuming every affected owner failed. Suite errors, unexplained runner exits,
164
- missing results and interrupted runs cannot certify passing guarantees. Use the
165
- 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.