@reqvire-org/ads 0.4.7 → 0.5.1

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 (751) hide show
  1. package/README.md +268 -420
  2. package/dist/accessibility-declarations.mjs +43 -0
  3. package/dist/active-clock.d.mts +30 -0
  4. package/dist/active-clock.mjs +26 -17
  5. package/dist/ads-errors.mjs +3684 -0
  6. package/dist/ads-view-choices.mjs +17 -0
  7. package/dist/ads-views.mjs +12 -0
  8. package/dist/analysis/captured-content.mjs +16 -0
  9. package/dist/analysis/compiler-options.mjs +3 -7
  10. package/dist/analysis/context.mjs +14 -20
  11. package/dist/analysis/controller-gates.mjs +119 -0
  12. package/dist/analysis/design-usage.mjs +142 -0
  13. package/dist/analysis/file-tree.mjs +44 -29
  14. package/dist/analysis/framework-imports.mjs +62 -0
  15. package/dist/analysis/glyph-macros.mjs +103 -0
  16. package/dist/analysis/helpers.mjs +119 -91
  17. package/dist/analysis/impact.mjs +25 -12
  18. package/dist/analysis/inputs.mjs +19 -13
  19. package/dist/analysis/mock-check.mjs +99 -0
  20. package/dist/analysis/module-graph.mjs +156 -0
  21. package/dist/analysis/module-resolvers.mjs +30 -28
  22. package/dist/analysis/native-adapter.mjs +139 -146
  23. package/dist/analysis/native-boundary.mjs +52 -0
  24. package/dist/analysis/native-project.mjs +331 -231
  25. package/dist/analysis/native-session.mjs +20 -0
  26. package/dist/analysis/owner-accessibility.mjs +74 -0
  27. package/dist/analysis/owner-analysis-cache.mjs +125 -0
  28. package/dist/analysis/owner-analysis-key.mjs +114 -0
  29. package/dist/analysis/owner-choices.mjs +896 -0
  30. package/dist/analysis/owner-composition.mjs +636 -0
  31. package/dist/analysis/owner-controls.mjs +27 -0
  32. package/dist/analysis/owner-discovery.mjs +164 -0
  33. package/dist/analysis/owner-failures.mjs +19 -0
  34. package/dist/analysis/owner-outcomes.mjs +42 -0
  35. package/dist/analysis/owner-reuse.mjs +100 -0
  36. package/dist/analysis/owner-source.mjs +1555 -0
  37. package/dist/analysis/prose-owners.mjs +57 -0
  38. package/dist/analysis/public-imports.mjs +31 -0
  39. package/dist/analysis/queries.mjs +72 -54
  40. package/dist/analysis/runtime-setters.mjs +114 -0
  41. package/dist/analysis/scenario-keys.mjs +151 -0
  42. package/dist/analysis/service.mjs +111 -70
  43. package/dist/analysis/standalone.mjs +40 -37
  44. package/dist/analysis/styling-ownership.mjs +298 -0
  45. package/dist/analysis/svg-attributes.mjs +199 -0
  46. package/dist/analysis/syntax.mjs +82 -78
  47. package/dist/analysis/visual-bindings.mjs +68 -0
  48. package/dist/analysis/worker-protocol.mjs +302 -0
  49. package/dist/analysis/worker.mjs +234 -166
  50. package/dist/api-signature.mjs +53 -0
  51. package/dist/app-icon-checks.mjs +298 -0
  52. package/dist/app-icon-declaration.d.mts +53 -0
  53. package/dist/app-icon-declaration.mjs +66 -0
  54. package/dist/asset-binding.mjs +35 -0
  55. package/dist/asset-catalog.mjs +83 -0
  56. package/dist/asset-declaration.d.mts +42 -0
  57. package/dist/asset-declaration.mjs +108 -0
  58. package/dist/asset-macro.d.mts +63 -0
  59. package/dist/asset-macro.mjs +22 -0
  60. package/dist/asset-model.mjs +74 -0
  61. package/dist/asset-usage.mjs +14 -0
  62. package/dist/asset-view-facts.mjs +41 -0
  63. package/dist/authoring-macro.d.mts +11 -0
  64. package/dist/authoring-macro.mjs +21 -0
  65. package/dist/autocomplete-hints.mjs +31 -0
  66. package/dist/availability.mjs +9 -0
  67. package/dist/behavior-macro.d.mts +31 -0
  68. package/dist/behavior-macro.mjs +3 -0
  69. package/dist/behavior-registry.mjs +358 -0
  70. package/dist/boundaries.mjs +50 -212
  71. package/dist/browser-runtime.mjs +73 -0
  72. package/dist/browser-test.d.mts +3 -0
  73. package/dist/browser-test.mjs +2 -0
  74. package/dist/bun-bundler.mjs +10 -0
  75. package/dist/bun-compiler.mjs +30 -18
  76. package/dist/bun-runtime.mjs +4 -0
  77. package/dist/bun-worker.mjs +10 -4
  78. package/dist/capture/request.mjs +81 -0
  79. package/dist/capture/worker.mjs +69 -40
  80. package/dist/capture/worker.page.mjs +6 -0
  81. package/dist/capture-store.mjs +159 -75
  82. package/dist/capture.mjs +232 -95
  83. package/dist/check-service.mjs +27 -33
  84. package/dist/check.mjs +206 -904
  85. package/dist/cli-arguments.mjs +278 -0
  86. package/dist/cli.mjs +374 -304
  87. package/dist/color-values.mjs +294 -242
  88. package/dist/composed-contrast.mjs +648 -0
  89. package/dist/composed-keyline.mjs +107 -0
  90. package/dist/config.mjs +162 -468
  91. package/dist/construction-output.mjs +345 -0
  92. package/dist/construction-spec.d.mts +915 -0
  93. package/dist/construction-spec.mjs +1178 -0
  94. package/dist/corner-overpaint.mjs +53 -0
  95. package/dist/css-length.mjs +80 -0
  96. package/dist/css-quantity.mjs +173 -0
  97. package/dist/deletion-model.mjs +56 -0
  98. package/dist/deletion-plan.mjs +364 -0
  99. package/dist/dependency-manifest.mjs +56 -0
  100. package/dist/design-context-model.d.mts +61 -0
  101. package/dist/design-context-model.mjs +79 -0
  102. package/dist/design-contexts.mjs +105 -0
  103. package/dist/design-foundation.mjs +532 -0
  104. package/dist/design-inputs.mjs +156 -0
  105. package/dist/design-modules.mjs +27 -0
  106. package/dist/design-rejection.d.mts +23 -0
  107. package/dist/design-rejection.mjs +29 -0
  108. package/dist/design-system-closure.mjs +108 -0
  109. package/dist/design-usage.mjs +54 -0
  110. package/dist/development-modules.mjs +2 -0
  111. package/dist/development-runtime.mjs +0 -7
  112. package/dist/digest.mjs +2 -0
  113. package/dist/draft-boundary.mjs +1 -27
  114. package/dist/draft-workspace.mjs +11 -5
  115. package/dist/emit/accept.mjs +33 -0
  116. package/dist/emit/app-icon-emission.mjs +124 -0
  117. package/dist/emit/app-icon-render.mjs +126 -0
  118. package/dist/emit/asset-imports.mjs +18 -0
  119. package/dist/emit/cli-report.mjs +97 -0
  120. package/dist/emit/contract.mjs +136 -0
  121. package/dist/emit/emission.mjs +182 -0
  122. package/dist/emit/font-emission.mjs +111 -0
  123. package/dist/emit/foundation-sheet.mjs +56 -0
  124. package/dist/emit/icon-containers.mjs +46 -0
  125. package/dist/emit/integrity.mjs +61 -0
  126. package/dist/emit/lock.mjs +66 -0
  127. package/dist/emit/namespace.mjs +79 -0
  128. package/dist/emit/operation-reply.mjs +3 -0
  129. package/dist/emit/operation.mjs +36 -0
  130. package/dist/emit/output-location.mjs +20 -0
  131. package/dist/emit/output-package.mjs +7 -0
  132. package/dist/emit/owner-emission-cache.mjs +52 -0
  133. package/dist/emit/palette-module.mjs +19 -0
  134. package/dist/emit/palette-refresh.mjs +77 -0
  135. package/dist/emit/preview-emitter.mjs +110 -0
  136. package/dist/emit/preview-tree.mjs +174 -0
  137. package/dist/emit/scheduler.mjs +75 -0
  138. package/dist/emit/service.mjs +249 -0
  139. package/dist/emit/sync.mjs +38 -0
  140. package/dist/emit/watch.mjs +74 -0
  141. package/dist/emit/writer.mjs +102 -0
  142. package/dist/evidence.mjs +6 -8
  143. package/dist/example-babel.mjs +7 -0
  144. package/dist/example-literals.mjs +88 -0
  145. package/dist/finding-rules.mjs +78 -77
  146. package/dist/focus-checks.mjs +93 -0
  147. package/dist/font-checks.mjs +185 -0
  148. package/dist/font-declaration.d.mts +64 -0
  149. package/dist/font-declaration.mjs +99 -0
  150. package/dist/font-fallback.d.mts +37 -0
  151. package/dist/font-fallback.mjs +25 -0
  152. package/dist/font-macro.d.mts +42 -0
  153. package/dist/font-macro.mjs +6 -0
  154. package/dist/font-metrics.d.mts +34 -0
  155. package/dist/font-metrics.mjs +314 -0
  156. package/dist/font-model.mjs +63 -0
  157. package/dist/form-states.mjs +82 -0
  158. package/dist/foundation-macro.d.mts +108 -0
  159. package/dist/foundation-macro.mjs +6 -0
  160. package/dist/frame-regions.mjs +253 -0
  161. package/dist/glyph-set-declaration.d.mts +27 -0
  162. package/dist/glyph-set-declaration.mjs +36 -0
  163. package/dist/grid-checks.mjs +94 -0
  164. package/dist/grid-facts.mjs +148 -0
  165. package/dist/grid-lowering.mjs +263 -0
  166. package/dist/guard/cli.mjs +51 -0
  167. package/dist/guard/config.mjs +67 -0
  168. package/dist/guard/files.mjs +31 -0
  169. package/dist/guard/index.mjs +3 -0
  170. package/dist/guard/run.mjs +56 -0
  171. package/dist/guard/tsconfig.declarations.json +13 -0
  172. package/dist/index.mjs +2 -7
  173. package/dist/init-project.mjs +134 -0
  174. package/dist/init.mjs +217 -264
  175. package/dist/input-digests.mjs +109 -163
  176. package/dist/input-scope.mjs +18 -41
  177. package/dist/inspected-svg.d.mts +28 -0
  178. package/dist/inspected-svg.mjs +40 -0
  179. package/dist/inventories.mjs +149 -0
  180. package/dist/inventory-query.mjs +15 -0
  181. package/dist/investigations.mjs +177 -99
  182. package/dist/json.d.mts +10 -0
  183. package/dist/json.mjs +36 -0
  184. package/dist/linaria/atomic-processor.json +96 -0
  185. package/dist/linaria/atomic-processor.mjs +2452 -0
  186. package/dist/linaria/backend-identity.mjs +26 -0
  187. package/dist/linaria/compatibility.json +61 -0
  188. package/dist/linaria/css-shape.mjs +94 -0
  189. package/dist/linaria/custom-property-css.mjs +56 -0
  190. package/dist/linaria/delivery.mjs +111 -0
  191. package/dist/linaria/direct-extract.mjs +43 -0
  192. package/dist/linaria/extraction-cache.mjs +31 -0
  193. package/dist/linaria/extraction-model.mjs +5 -0
  194. package/dist/linaria/fingerprint.mjs +183 -0
  195. package/dist/linaria/pair-manifest.json +2315 -0
  196. package/dist/linaria/persisted-extraction-cache.mjs +352 -0
  197. package/dist/linaria/preservation.mjs +13 -0
  198. package/dist/linaria/priority-emitted-rank.mjs +40 -0
  199. package/dist/linaria/priority-manifest.mjs +87 -0
  200. package/dist/linaria/priority-table.mjs +47 -0
  201. package/dist/linaria/priority-tiers.mjs +27 -0
  202. package/dist/linaria/processor-host.mjs +42 -0
  203. package/dist/linaria/processor-runtime.mjs +36 -0
  204. package/dist/linaria-processor-NOTICES.md +147 -0
  205. package/dist/lowering-components.mjs +14 -0
  206. package/dist/lowering-effects.mjs +38 -0
  207. package/dist/lowering-emitter.mjs +29 -0
  208. package/dist/lowering-enter.mjs +31 -0
  209. package/dist/lowering-hidden.mjs +30 -0
  210. package/dist/lowering-layer.mjs +141 -0
  211. package/dist/lowering-motion.mjs +37 -0
  212. package/dist/lowering-normalize.mjs +194 -0
  213. package/dist/lowering-overlaps.mjs +328 -0
  214. package/dist/lowering-paint.mjs +32 -0
  215. package/dist/lowering-properties.mjs +165 -0
  216. package/dist/lowering-region-layout.mjs +225 -0
  217. package/dist/lowering-sequence.mjs +89 -0
  218. package/dist/lowering-serialize.mjs +40 -0
  219. package/dist/lowering-session.mjs +137 -0
  220. package/dist/lowering-tiers.mjs +23 -0
  221. package/dist/lowering-transitions.mjs +53 -0
  222. package/dist/mcp/ads-mcp.mjs +423 -0
  223. package/dist/mcp/apps.mjs +3 -25
  224. package/dist/mcp/behavior-pages.mjs +58 -51
  225. package/dist/mcp/build-status.mjs +233 -267
  226. package/dist/mcp/catalog.mjs +21 -128
  227. package/dist/mcp/compiler-channel.mjs +218 -83
  228. package/dist/mcp/context.mjs +50 -40
  229. package/dist/mcp/deletions.mjs +147 -0
  230. package/dist/mcp/draft-discovery.mjs +43 -38
  231. package/dist/mcp/drafts.mjs +635 -691
  232. package/dist/mcp/execution-context.mjs +33 -22
  233. package/dist/mcp/execution-coordinator.mjs +367 -354
  234. package/dist/mcp/execution-results.mjs +440 -173
  235. package/dist/mcp/mutation-limits.mjs +1 -2
  236. package/dist/mcp/mutations.mjs +515 -553
  237. package/dist/mcp/patch.mjs +117 -75
  238. package/dist/mcp/preview-http.bundle.js +3 -7
  239. package/dist/mcp/preview-http.mjs +220 -107
  240. package/dist/mcp/preview-owner-guard.mjs +81 -43
  241. package/dist/mcp/preview-watch.mjs +428 -365
  242. package/dist/mcp/preview-widget.bundle.js +42 -46
  243. package/dist/mcp/preview-work.mjs +25 -13
  244. package/dist/mcp/prompts.mjs +22 -16
  245. package/dist/mcp/resource-loader.js +1 -1
  246. package/dist/mcp/result-pages.mjs +94 -54
  247. package/dist/mcp/sandbox-host.mjs +41 -19
  248. package/dist/mcp/server-discovery.mjs +96 -0
  249. package/dist/mcp/server-guides.mjs +43 -0
  250. package/dist/mcp/server-host.mjs +203 -0
  251. package/dist/mcp/server-observation.mjs +225 -0
  252. package/dist/mcp/server-project.mjs +371 -0
  253. package/dist/mcp/server-resources.mjs +466 -0
  254. package/dist/mcp/server-shared.mjs +79 -0
  255. package/dist/mcp/server-tools.mjs +791 -0
  256. package/dist/mcp/server.mjs +2 -2813
  257. package/dist/mcp/showcase-host.mjs +209 -135
  258. package/dist/mcp/showcase-http.mjs +50 -28
  259. package/dist/mcp/skills.mjs +32 -36
  260. package/dist/mcp/text-diff.mjs +18 -36
  261. package/dist/measured-geometry.mjs +157 -0
  262. package/dist/motion-model.mjs +52 -0
  263. package/dist/non-text-contrast.mjs +118 -0
  264. package/dist/owner-analysis-check.mjs +711 -0
  265. package/dist/owner-design.mjs +15 -0
  266. package/dist/owner-errors.mjs +216 -0
  267. package/dist/owner-lowering.mjs +206 -0
  268. package/dist/owner-scenarios.mjs +854 -0
  269. package/dist/ownership-model.d.mts +6 -0
  270. package/dist/ownership-model.mjs +143 -0
  271. package/dist/package-declarations.mjs +34 -0
  272. package/dist/paint-contrast.mjs +186 -0
  273. package/dist/palette-generated.mjs +101 -116
  274. package/dist/pictogram-model.mjs +13 -51
  275. package/dist/placeholder-contrast.mjs +35 -0
  276. package/dist/platform-features.mjs +401 -0
  277. package/dist/press-scale.mjs +26 -0
  278. package/dist/preview-bun.mjs +334 -404
  279. package/dist/preview-compile-inputs.mjs +78 -0
  280. package/dist/preview-contexts.mjs +7 -0
  281. package/dist/preview-controls.mjs +35 -0
  282. package/dist/preview-failure.mjs +20 -10
  283. package/dist/preview-files.mjs +18 -36
  284. package/dist/preview-imports.mjs +76 -70
  285. package/dist/preview-incremental.mjs +322 -222
  286. package/dist/preview-inputs.mjs +26 -26
  287. package/dist/preview-manifest-update.mjs +67 -49
  288. package/dist/preview-requests.mjs +10 -17
  289. package/dist/preview-resources.mjs +275 -323
  290. package/dist/preview-scope.mjs +15 -17
  291. package/dist/preview-source.mjs +182 -0
  292. package/dist/preview-spatial.mjs +27 -0
  293. package/dist/profile-macro.d.mts +56 -0
  294. package/dist/profile-macro.mjs +6 -0
  295. package/dist/profile-model.d.mts +65 -0
  296. package/dist/profile-model.mjs +213 -0
  297. package/dist/profile-view-facts.mjs +93 -0
  298. package/dist/program-cache.mjs +9 -7
  299. package/dist/project-boundary.mjs +8 -13
  300. package/dist/project-documents.mjs +25 -29
  301. package/dist/property-registrations.mjs +44 -35
  302. package/dist/prose-model.d.mts +81 -0
  303. package/dist/prose-model.mjs +101 -0
  304. package/dist/public-catalog.mjs +76 -0
  305. package/dist/recipe-defaults.mjs +117 -0
  306. package/dist/recipe-macro.d.mts +502 -0
  307. package/dist/recipe-macro.mjs +23 -0
  308. package/dist/recipe-model.d.mts +26 -0
  309. package/dist/recipe-model.mjs +214 -0
  310. package/dist/region-lowering.mjs +723 -0
  311. package/dist/registration-css.mjs +41 -0
  312. package/dist/registration-roles.mjs +35 -0
  313. package/dist/render-audit/axe-run.page.mjs +28 -0
  314. package/dist/render-audit/corner-overpaint.page.mjs +54 -0
  315. package/dist/render-audit/first-render.page.mjs +35 -0
  316. package/dist/render-audit/image-shape.page.mjs +42 -0
  317. package/dist/render-audit/layout-overflow.page.mjs +240 -0
  318. package/dist/render-audit/layout-shift.page.mjs +36 -0
  319. package/dist/render-audit/non-text-contrast.page.mjs +138 -0
  320. package/dist/render-audit/render-states.mjs +66 -293
  321. package/dist/render-audit/render-states.page.mjs +177 -0
  322. package/dist/render-audit/text-scale.mjs +42 -0
  323. package/dist/render-audit/text-scale.page.mjs +25 -0
  324. package/dist/render-audit/worker.mjs +130 -112
  325. package/dist/render-audit/worker.page.mjs +21 -0
  326. package/dist/render-audit.mjs +490 -500
  327. package/dist/resource-limits.mjs +174 -223
  328. package/dist/result.d.mts +34 -0
  329. package/dist/result.mjs +60 -0
  330. package/dist/role-vocabulary.d.mts +260 -0
  331. package/dist/role-vocabulary.mjs +258 -0
  332. package/dist/runtime-paint-contrast.mjs +97 -0
  333. package/dist/runtime-paint.mjs +42 -0
  334. package/dist/runtime-requirements.mjs +10 -11
  335. package/dist/runtime-style.mjs +21 -0
  336. package/dist/scenario-groups.mjs +42 -33
  337. package/dist/scenario-inspector.mjs +4 -4
  338. package/dist/scenario-kit.d.mts +85 -0
  339. package/dist/scenario-kit.mjs +18 -0
  340. package/dist/scenario-registry-model.mjs +2 -0
  341. package/dist/scenario-registry.mjs +89 -108
  342. package/dist/scenarios-compiler.mjs +875 -662
  343. package/dist/scheme-switch.d.mts +8 -0
  344. package/dist/scheme-switch.mjs +1 -0
  345. package/dist/showcase/ads-views.mjs +166 -0
  346. package/dist/showcase/assets-view.mjs +252 -0
  347. package/dist/showcase/client.bundle.js +211 -48
  348. package/dist/showcase/guide-controls.d.mts +28 -0
  349. package/dist/showcase/guide-controls.mjs +31 -0
  350. package/dist/showcase/http-client.bundle.js +172 -9
  351. package/dist/showcase/index.html +1 -1
  352. package/dist/showcase/preview-frame.css +18 -0
  353. package/dist/showcase/preview-frame.d.mts +5 -0
  354. package/dist/showcase/preview-frame.mjs +4 -0
  355. package/dist/showcase/preview-root.d.mts +2 -0
  356. package/dist/showcase/preview-root.mjs +9 -0
  357. package/dist/showcase/profiles-view.mjs +321 -0
  358. package/dist/showcase/project-rules.mjs +9 -0
  359. package/dist/showcase/sandbox.bundle.js +1 -1
  360. package/dist/showcase/scenario-page.d.mts +49 -0
  361. package/dist/showcase/scenario-page.mjs +105 -0
  362. package/dist/showcase/style.css +2 -0
  363. package/dist/showcase/token-sample.mjs +89 -0
  364. package/dist/showcase/tokens-view.mjs +233 -0
  365. package/dist/showcase/ui/apple-touch-icon-9zwv3w79.png +0 -0
  366. package/dist/showcase/{favicon.ico → ui/favicon-c2c9kvtf.ico} +0 -0
  367. package/dist/showcase/ui/icon-192-t5zh7mxx.png +0 -0
  368. package/dist/showcase/ui/icon-512-ed6yz0n0.png +0 -0
  369. package/dist/showcase/ui/ui.css +1 -1353
  370. package/dist/showcase/ui/ui.js +165 -1064
  371. package/dist/showcase-http-routes.mjs +28 -21
  372. package/dist/skills/README.md +28 -28
  373. package/dist/skills/ads-designer/README.md +1 -1
  374. package/dist/skills/ads-designer/SKILL.md +313 -551
  375. package/dist/skills/ads-designer/references/accessibility.md +162 -114
  376. package/dist/skills/ads-designer/references/atomic-styles.md +72 -277
  377. package/dist/skills/ads-designer/references/behaviors.md +144 -280
  378. package/dist/skills/ads-designer/references/branding.md +137 -222
  379. package/dist/skills/ads-designer/references/captures.md +13 -7
  380. package/dist/skills/ads-designer/references/cli.md +80 -63
  381. package/dist/skills/ads-designer/references/contracts.md +225 -286
  382. package/dist/skills/ads-designer/references/design-craft.md +2 -2
  383. package/dist/skills/ads-designer/references/design-data.md +299 -323
  384. package/dist/skills/ads-designer/references/drafts.md +83 -22
  385. package/dist/skills/ads-designer/references/evidence.md +2 -1
  386. package/dist/skills/ads-designer/references/forms.md +199 -0
  387. package/dist/skills/ads-designer/references/guarded-editing.md +37 -48
  388. package/dist/skills/ads-designer/references/layers.md +64 -76
  389. package/dist/skills/ads-designer/references/layout.md +224 -330
  390. package/dist/skills/ads-designer/references/mobile.md +2 -2
  391. package/dist/skills/ads-designer/references/motion.md +66 -25
  392. package/dist/skills/ads-designer/references/performance.md +55 -50
  393. package/dist/skills/ads-designer/references/pictograms.md +62 -127
  394. package/dist/skills/ads-designer/references/recipes.md +368 -0
  395. package/dist/skills/ads-designer/references/review.md +51 -95
  396. package/dist/skills/ads-designer/references/runtimes.md +34 -33
  397. package/dist/skills/ads-designer/references/scenarios.md +256 -216
  398. package/dist/skills/ads-designer/references/stress-test.md +13 -5
  399. package/dist/skills/ads-designer/references/validation.md +28 -21
  400. package/dist/skills/ads-designer/references/workflows.md +7 -5
  401. package/dist/skills/ads-import/SKILL.md +29 -29
  402. package/dist/skills/ads-import/references/atomic-styles.md +72 -277
  403. package/dist/skills/ads-import/references/behaviors.md +144 -280
  404. package/dist/skills/ads-import/references/branding.md +24 -41
  405. package/dist/skills/ads-import/references/captures.md +13 -7
  406. package/dist/skills/ads-import/references/cli.md +80 -63
  407. package/dist/skills/ads-import/references/compatibility.md +3 -3
  408. package/dist/skills/ads-import/references/contracts.md +225 -286
  409. package/dist/skills/ads-import/references/design-data.md +299 -323
  410. package/dist/skills/ads-import/references/drafts.md +83 -22
  411. package/dist/skills/ads-import/references/evidence.md +2 -1
  412. package/dist/skills/ads-import/references/forms.md +199 -0
  413. package/dist/skills/ads-import/references/guarded-editing.md +37 -48
  414. package/dist/skills/ads-import/references/implementation.md +20 -20
  415. package/dist/skills/ads-import/references/layers.md +64 -76
  416. package/dist/skills/ads-import/references/layout.md +224 -330
  417. package/dist/skills/ads-import/references/recipes.md +368 -0
  418. package/dist/skills/ads-import/references/review.md +51 -95
  419. package/dist/skills/ads-import/references/runtimes.md +34 -33
  420. package/dist/skills/ads-import/references/scenarios.md +256 -216
  421. package/dist/skills/ads-import/references/tokens.md +26 -17
  422. package/dist/skills/ads-import/references/validation.md +28 -21
  423. package/dist/skills/ads-import/references/workflows.md +7 -5
  424. package/dist/skills/ads-migrate/SKILL.md +20 -5
  425. package/dist/skills/ads-migrate/references/0.4.1-to-0.4.2.md +6 -0
  426. package/dist/skills/ads-migrate/references/0.4.7-to-0.5.0-boundary.md +71 -0
  427. package/dist/skills/ads-migrate/references/0.4.7-to-0.5.0-grid.md +204 -0
  428. package/dist/skills/ads-migrate/references/0.4.7-to-0.5.0.md +727 -0
  429. package/dist/skills/ads-migrate/references/0.5.0-to-0.5.1.md +239 -0
  430. package/dist/skills/ads-port/SKILL.md +27 -28
  431. package/dist/skills/ads-port/references/atomic-styles.md +72 -277
  432. package/dist/skills/ads-port/references/behaviors.md +144 -280
  433. package/dist/skills/ads-port/references/captures.md +13 -7
  434. package/dist/skills/ads-port/references/cli.md +80 -63
  435. package/dist/skills/ads-port/references/contracts.md +225 -286
  436. package/dist/skills/ads-port/references/design-data.md +299 -323
  437. package/dist/skills/ads-port/references/drafts.md +83 -22
  438. package/dist/skills/ads-port/references/evidence.md +2 -1
  439. package/dist/skills/ads-port/references/forms.md +199 -0
  440. package/dist/skills/ads-port/references/guarded-editing.md +37 -48
  441. package/dist/skills/ads-port/references/layers.md +64 -76
  442. package/dist/skills/ads-port/references/layout.md +224 -330
  443. package/dist/skills/ads-port/references/lint-and-docs.md +2 -3
  444. package/dist/skills/ads-port/references/native-implementation.md +23 -33
  445. package/dist/skills/ads-port/references/recipes.md +368 -0
  446. package/dist/skills/ads-port/references/review.md +51 -95
  447. package/dist/skills/ads-port/references/runtimes.md +34 -33
  448. package/dist/skills/ads-port/references/scenarios.md +256 -216
  449. package/dist/skills/ads-port/references/validation.md +28 -21
  450. package/dist/skills/ads-port/references/workflows.md +7 -5
  451. package/dist/source-inventory.mjs +33 -0
  452. package/dist/source-values.mjs +272 -262
  453. package/dist/spatial-css.mjs +403 -0
  454. package/dist/spatial-metadata.mjs +11 -11
  455. package/dist/spatial-model.mjs +438 -0
  456. package/dist/spatial-reading.mjs +127 -0
  457. package/dist/stage-timing.mjs +27 -0
  458. package/dist/state-conditions.d.mts +80 -0
  459. package/dist/state-conditions.mjs +107 -0
  460. package/dist/static-values.mjs +94 -0
  461. package/dist/surface-contrast.mjs +252 -0
  462. package/dist/surface-effects.mjs +98 -0
  463. package/dist/target-size.mjs +177 -0
  464. package/dist/task-cache.mjs +142 -136
  465. package/dist/task-worker.mjs +18 -18
  466. package/dist/test-boundaries.mjs +50 -189
  467. package/dist/token-checks.mjs +21 -0
  468. package/dist/token-dtcg.mjs +136 -0
  469. package/dist/token-expression.mjs +19 -0
  470. package/dist/token-inventory.mjs +146 -0
  471. package/dist/token-operations.mjs +37 -0
  472. package/dist/token-overlap.mjs +29 -0
  473. package/dist/token-provenance.mjs +260 -0
  474. package/dist/token-references.mjs +71 -0
  475. package/dist/token-registrations.mjs +116 -0
  476. package/dist/token-resolution.mjs +38 -0
  477. package/dist/token-sections.mjs +123 -0
  478. package/dist/token-shapes.mjs +121 -0
  479. package/dist/token-sheet-check.mjs +54 -0
  480. package/dist/token-type-check.mjs +89 -0
  481. package/dist/token-view-facts.mjs +111 -0
  482. package/dist/tsconfig.declarations.json +24 -0
  483. package/dist/types/css-tree.d.ts +45 -0
  484. package/dist/ui-framework.mjs +34 -34
  485. package/dist/units.mjs +186 -226
  486. package/dist/unknown.d.mts +9 -0
  487. package/dist/unknown.mjs +13 -0
  488. package/dist/unreached-sources.mjs +5 -0
  489. package/dist/validation-checks.mjs +62 -71
  490. package/dist/validation-inputs.mjs +209 -279
  491. package/dist/validation.mjs +132 -159
  492. package/dist/verification/browser.d.mts +21 -25
  493. package/dist/verification/browser.mjs +281 -124
  494. package/dist/verification/browser.page.d.mts +22 -0
  495. package/dist/verification/browser.page.mjs +19 -0
  496. package/dist/verification/paint-audit.page.d.mts +55 -0
  497. package/dist/verification/paint-audit.page.mjs +144 -0
  498. package/dist/verification/playwright-reporter.mjs +160 -0
  499. package/dist/verification/preview-startup.d.mts +51 -0
  500. package/dist/verification/preview-startup.mjs +76 -0
  501. package/dist/verification/request.d.mts +28 -0
  502. package/dist/verification/request.mjs +30 -0
  503. package/dist/verification/unit-preload.mjs +37 -0
  504. package/dist/verification.mjs +574 -607
  505. package/docs/ADS.md +585 -565
  506. package/docs/ARCHITECTURE.md +2002 -1384
  507. package/docs/ASSETS.md +487 -0
  508. package/docs/BEHAVIORS.md +339 -370
  509. package/docs/CACHING.md +365 -154
  510. package/docs/CHANGELOG.md +462 -21
  511. package/docs/COMPARISON.md +21 -26
  512. package/docs/DESIGN-REFERENCES.md +40 -27
  513. package/docs/GUIDE.md +2473 -1292
  514. package/docs/LANGUAGE.md +1159 -0
  515. package/docs/LOWERING.md +180 -0
  516. package/docs/MCP.md +1461 -1179
  517. package/docs/MOTION.md +491 -0
  518. package/docs/PROFILE-KINDS.md +544 -0
  519. package/docs/PROFILES.md +176 -0
  520. package/docs/RULES.md +590 -0
  521. package/docs/TOKEN-ROLES.md +377 -0
  522. package/docs/benchmarks/README.md +26 -27
  523. package/package.json +59 -45
  524. package/dist/a11y.mjs +0 -187
  525. package/dist/assets.mjs +0 -159
  526. package/dist/atomic-composition.mjs +0 -337
  527. package/dist/atomic-trace.mjs +0 -162
  528. package/dist/behavior-libraries.mjs +0 -174
  529. package/dist/behaviors.mjs +0 -306
  530. package/dist/brand-assets.mjs +0 -458
  531. package/dist/brands.mjs +0 -141
  532. package/dist/component-contrast.mjs +0 -256
  533. package/dist/construction-styles.cjs +0 -10
  534. package/dist/contracts/foundation.json +0 -211
  535. package/dist/contracts/tokens.json +0 -52
  536. package/dist/contracts.d.mts +0 -30
  537. package/dist/contrast-composition.mjs +0 -80
  538. package/dist/contrast-styles.mjs +0 -88
  539. package/dist/control-padding.mjs +0 -113
  540. package/dist/css-values.mjs +0 -27
  541. package/dist/declarative-flow.mjs +0 -244
  542. package/dist/design-values.mjs +0 -173
  543. package/dist/font-rules.mjs +0 -108
  544. package/dist/fonts-generated.mjs +0 -112
  545. package/dist/foundation-views.mjs +0 -242
  546. package/dist/foundation.mjs +0 -154
  547. package/dist/generated-entries.mjs +0 -198
  548. package/dist/html.mjs +0 -30
  549. package/dist/icons.mjs +0 -154
  550. package/dist/image-attributes.mjs +0 -187
  551. package/dist/image-size.mjs +0 -28
  552. package/dist/layers.mjs +0 -461
  553. package/dist/layout-widths.mjs +0 -332
  554. package/dist/linaria/atomic-css.cjs +0 -2
  555. package/dist/linaria/atomic-styled.cjs +0 -2
  556. package/dist/linaria/preserve-values.cjs +0 -58
  557. package/dist/linaria/spatial-inputs.cjs +0 -56
  558. package/dist/linaria.d.mts +0 -1
  559. package/dist/linaria.mjs +0 -9
  560. package/dist/lockup-composition.mjs +0 -44
  561. package/dist/lockup-model.cjs +0 -64
  562. package/dist/paint-contracts.mjs +0 -216
  563. package/dist/pictograms.mjs +0 -52
  564. package/dist/public-api.mjs +0 -121
  565. package/dist/public-props.mjs +0 -91
  566. package/dist/render-audit/axe-run.mjs +0 -17
  567. package/dist/render-audit/first-render.mjs +0 -40
  568. package/dist/render-audit/image-shape.mjs +0 -46
  569. package/dist/render-audit/layout-overflow.mjs +0 -167
  570. package/dist/render-audit/layout-shift.mjs +0 -32
  571. package/dist/render-audit/non-text-contrast.mjs +0 -151
  572. package/dist/render-audit/pictograms.mjs +0 -88
  573. package/dist/render-color-probe.mjs +0 -202
  574. package/dist/render-composition.mjs +0 -186
  575. package/dist/runtime-contracts.mjs +0 -506
  576. package/dist/scenario-program.mjs +0 -19
  577. package/dist/scenario-selectors.mjs +0 -237
  578. package/dist/scenario-slots.mjs +0 -217
  579. package/dist/scenario-trace.mjs +0 -314
  580. package/dist/scenarios-vite.d.mts +0 -2
  581. package/dist/scenarios-vite.mjs +0 -2
  582. package/dist/scenarios.mjs +0 -616
  583. package/dist/selector-match.mjs +0 -94
  584. package/dist/showcase/comparison.js +0 -48
  585. package/dist/showcase/connection.js +0 -10
  586. package/dist/showcase/draft-navigation.js +0 -59
  587. package/dist/showcase/foundation-view.css +0 -58
  588. package/dist/showcase/foundation-view.mjs +0 -255
  589. package/dist/showcase/guide-controls.ads.review.mjs +0 -32
  590. package/dist/showcase/http-connection.js +0 -86
  591. package/dist/showcase/http-preview.js +0 -81
  592. package/dist/showcase/icons.js +0 -2
  593. package/dist/showcase/navigation.js +0 -13
  594. package/dist/showcase/pictogram-view.mjs +0 -53
  595. package/dist/showcase/preview-frame.ads.review.css +0 -46
  596. package/dist/showcase/preview-frame.ads.review.d.mts +0 -11
  597. package/dist/showcase/preview-frame.ads.review.mjs +0 -22
  598. package/dist/showcase/preview-state.js +0 -11
  599. package/dist/showcase/refresh-scheduler.js +0 -23
  600. package/dist/showcase/resource-reader.js +0 -37
  601. package/dist/showcase-coverage.mjs +0 -139
  602. package/dist/source-symbols.mjs +0 -4
  603. package/dist/spatial-composition.mjs +0 -322
  604. package/dist/spatial-contexts.cjs +0 -56
  605. package/dist/spatial-css.cjs +0 -351
  606. package/dist/spatial-inputs.cjs +0 -80
  607. package/dist/spatial-model.cjs +0 -322
  608. package/dist/spatial.mjs +0 -21
  609. package/dist/stage-timing.cjs +0 -21
  610. package/dist/starters/preact/design-system/patterns/Conversation/Conversation.tsx +0 -105
  611. package/dist/starters/preact/design-system/patterns/Shell/Shell.tsx +0 -275
  612. package/dist/starters/preact/design-system/review/demo-frame/DemoFrame.ads.review.tsx +0 -7
  613. package/dist/starters/preact/design-system/review/screen-frame/ScreenFrame.ads.review.tsx +0 -10
  614. package/dist/starters/preact/design-system/showcase/mcp/main.ads.mount.tsx +0 -8
  615. package/dist/starters/preact/ds.config.json +0 -37
  616. package/dist/starters/preact/package.json +0 -35
  617. package/dist/starters/preact/src/vite-env.d.ts +0 -7
  618. package/dist/starters/preact/tsconfig.json +0 -35
  619. package/dist/starters/preact/vite.config.ts +0 -23
  620. package/dist/starters/react/ADS.md +0 -286
  621. package/dist/starters/react/README.md +0 -184
  622. package/dist/starters/react/biome.css.json +0 -21
  623. package/dist/starters/react/design-system/assets/brand/README.md +0 -41
  624. package/dist/starters/react/design-system/assets/brand/app-icon.svg +0 -4
  625. package/dist/starters/react/design-system/assets/brand/logo.dark.svg +0 -6
  626. package/dist/starters/react/design-system/assets/brand/logo.svg +0 -6
  627. package/dist/starters/react/design-system/assets/glyphs/README.md +0 -15
  628. package/dist/starters/react/design-system/assets/glyphs/aliases.json +0 -1
  629. package/dist/starters/react/design-system/assets/glyphs/check.svg +0 -1
  630. package/dist/starters/react/design-system/assets/glyphs/chevron-down.svg +0 -1
  631. package/dist/starters/react/design-system/assets/glyphs/chevron-right.svg +0 -1
  632. package/dist/starters/react/design-system/assets/glyphs/close.svg +0 -1
  633. package/dist/starters/react/design-system/assets/glyphs/external-link.svg +0 -1
  634. package/dist/starters/react/design-system/assets/glyphs/info.svg +0 -1
  635. package/dist/starters/react/design-system/assets/glyphs/menu.svg +0 -1
  636. package/dist/starters/react/design-system/assets/glyphs/plus.svg +0 -1
  637. package/dist/starters/react/design-system/assets/glyphs/search.svg +0 -1
  638. package/dist/starters/react/design-system/assets/glyphs/warning.svg +0 -1
  639. package/dist/starters/react/design-system/assets/pictograms/catalog.ads.json +0 -13
  640. package/dist/starters/react/design-system/assets/pictograms/journey.dark.svg +0 -7
  641. package/dist/starters/react/design-system/assets/pictograms/journey.svg +0 -7
  642. package/dist/starters/react/design-system/components/Actions/Button/Button.ads.exports.ts +0 -1
  643. package/dist/starters/react/design-system/components/Actions/Button/Button.ads.fixture.ts +0 -1
  644. package/dist/starters/react/design-system/components/Actions/Button/Button.ads.scenario.tsx +0 -13
  645. package/dist/starters/react/design-system/components/Actions/Button/Button.tsx +0 -56
  646. package/dist/starters/react/design-system/components/Actions/Button/README.md +0 -12
  647. package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.ads.exports.ts +0 -1
  648. package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.ads.fixture.ts +0 -9
  649. package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.ads.scenario.tsx +0 -16
  650. package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.tsx +0 -60
  651. package/dist/starters/react/design-system/components/Actions/IconButton/README.md +0 -17
  652. package/dist/starters/react/design-system/components/Content/Icon/Icon.ads.exports.ts +0 -1
  653. package/dist/starters/react/design-system/components/Content/Icon/Icon.ads.fixture.ts +0 -6
  654. package/dist/starters/react/design-system/components/Content/Icon/Icon.ads.scenario.tsx +0 -16
  655. package/dist/starters/react/design-system/components/Content/Icon/Icon.tsx +0 -42
  656. package/dist/starters/react/design-system/components/Content/Icon/README.md +0 -17
  657. package/dist/starters/react/design-system/components/Content/Icon/glyphs.ts +0 -17
  658. package/dist/starters/react/design-system/components/Content/Image/Image.ads.exports.ts +0 -1
  659. package/dist/starters/react/design-system/components/Content/Image/Image.ads.fixture.ts +0 -2
  660. package/dist/starters/react/design-system/components/Content/Image/Image.ads.scenario.tsx +0 -13
  661. package/dist/starters/react/design-system/components/Content/Image/Image.tsx +0 -51
  662. package/dist/starters/react/design-system/components/Content/Image/README.md +0 -20
  663. package/dist/starters/react/design-system/components/Content/Logo/Logo.ads.exports.ts +0 -1
  664. package/dist/starters/react/design-system/components/Content/Logo/Logo.ads.fixture.ts +0 -1
  665. package/dist/starters/react/design-system/components/Content/Logo/Logo.ads.scenario.tsx +0 -12
  666. package/dist/starters/react/design-system/components/Content/Logo/Logo.tsx +0 -35
  667. package/dist/starters/react/design-system/components/Content/Logo/README.md +0 -12
  668. package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.ads.exports.ts +0 -1
  669. package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.ads.fixture.ts +0 -1
  670. package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.ads.scenario.tsx +0 -7
  671. package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.tsx +0 -26
  672. package/dist/starters/react/design-system/components/Forms/TextField/README.md +0 -14
  673. package/dist/starters/react/design-system/components/Forms/TextField/TextField.ads.exports.ts +0 -1
  674. package/dist/starters/react/design-system/components/Forms/TextField/TextField.ads.fixture.ts +0 -6
  675. package/dist/starters/react/design-system/components/Forms/TextField/TextField.ads.scenario.tsx +0 -13
  676. package/dist/starters/react/design-system/components/Forms/TextField/TextField.tsx +0 -61
  677. package/dist/starters/react/design-system/composition/Search/SearchPage/README.md +0 -4
  678. package/dist/starters/react/design-system/composition/Search/SearchPage/SearchPage.ads.fixture.ts +0 -7
  679. package/dist/starters/react/design-system/composition/Search/SearchPage/SearchPage.ads.scenario.tsx +0 -16
  680. package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/README.md +0 -5
  681. package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/WorkspacePage.ads.fixture.ts +0 -13
  682. package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/WorkspacePage.ads.scenario.tsx +0 -22
  683. package/dist/starters/react/design-system/controllers/Palette/Palette.ads.exports.ts +0 -1
  684. package/dist/starters/react/design-system/controllers/Palette/Palette.ts +0 -164
  685. package/dist/starters/react/design-system/index.ts +0 -12
  686. package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.exports.ts +0 -1
  687. package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.fixture.ts +0 -7
  688. package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.scenario.tsx +0 -15
  689. package/dist/starters/react/design-system/patterns/Conversation/Conversation.tsx +0 -105
  690. package/dist/starters/react/design-system/patterns/Conversation/README.md +0 -9
  691. package/dist/starters/react/design-system/patterns/Search/SearchBar/README.md +0 -12
  692. package/dist/starters/react/design-system/patterns/Search/SearchBar/SearchBar.ads.exports.ts +0 -1
  693. package/dist/starters/react/design-system/patterns/Search/SearchBar/SearchBar.ads.fixture.ts +0 -1
  694. package/dist/starters/react/design-system/patterns/Search/SearchBar/SearchBar.ads.scenario.tsx +0 -11
  695. package/dist/starters/react/design-system/patterns/Search/SearchBar/SearchBar.tsx +0 -41
  696. package/dist/starters/react/design-system/patterns/Shell/Floating.ads.fixture.ts +0 -5
  697. package/dist/starters/react/design-system/patterns/Shell/Floating.ads.scenario.tsx +0 -21
  698. package/dist/starters/react/design-system/patterns/Shell/README.md +0 -43
  699. package/dist/starters/react/design-system/patterns/Shell/Shell.ads.exports.ts +0 -1
  700. package/dist/starters/react/design-system/patterns/Shell/Shell.ads.fixture.ts +0 -5
  701. package/dist/starters/react/design-system/patterns/Shell/Shell.ads.scenario.tsx +0 -21
  702. package/dist/starters/react/design-system/patterns/Shell/Shell.tsx +0 -274
  703. package/dist/starters/react/design-system/review/demo-frame/DemoFrame.ads.exports.ts +0 -1
  704. package/dist/starters/react/design-system/review/demo-frame/DemoFrame.ads.review.tsx +0 -7
  705. package/dist/starters/react/design-system/review/index.ads.review.ts +0 -4
  706. package/dist/starters/react/design-system/review/region-block/RegionBlock.ads.exports.ts +0 -1
  707. package/dist/starters/react/design-system/review/region-block/RegionBlock.ads.review.tsx +0 -6
  708. package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.ads.exports.ts +0 -1
  709. package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.ads.review.tsx +0 -10
  710. package/dist/starters/react/design-system/showcase/mcp/main.ads.mount.tsx +0 -10
  711. package/dist/starters/react/design-system/styles.css +0 -7
  712. package/dist/starters/react/design-system/tokens/base.css +0 -36
  713. package/dist/starters/react/design-system/tokens/catalog.ads.json +0 -1221
  714. package/dist/starters/react/design-system/tokens/colors.css +0 -215
  715. package/dist/starters/react/design-system/tokens/elevation.css +0 -53
  716. package/dist/starters/react/design-system/tokens/spacing.css +0 -87
  717. package/dist/starters/react/design-system/tokens/spatial.ads.json +0 -70
  718. package/dist/starters/react/design-system/tokens/themes.generated.css +0 -142
  719. package/dist/starters/react/design-system/tokens/themes.generated.ts +0 -402
  720. package/dist/starters/react/design-system/tokens/typography.css +0 -31
  721. package/dist/starters/react/ds.config.json +0 -37
  722. package/dist/starters/react/gitignore.template +0 -8
  723. package/dist/starters/react/package.json +0 -39
  724. package/dist/starters/react/scripts/build-mcp-previews.mjs +0 -3
  725. package/dist/starters/react/src/vite-env.d.ts +0 -7
  726. package/dist/starters/react/tsconfig.build.json +0 -20
  727. package/dist/starters/react/tsconfig.json +0 -34
  728. package/dist/starters/react/vite.config.ts +0 -23
  729. package/dist/style-boundaries.mjs +0 -106
  730. package/dist/style-token-rules.mjs +0 -51
  731. package/dist/themes-generated.mjs +0 -161
  732. package/dist/themes-watch.mjs +0 -83
  733. package/dist/themes.mjs +0 -360
  734. package/dist/token-export.mjs +0 -94
  735. package/dist/token-origins.mjs +0 -24
  736. package/dist/token-policy.mjs +0 -26
  737. package/dist/token-quality.mjs +0 -149
  738. package/dist/token-samples.mjs +0 -19
  739. package/dist/tokens.mjs +0 -194
  740. package/dist/unit-contracts.mjs +0 -396
  741. package/dist/usage.mjs +0 -184
  742. package/dist/verification/playwright-reporter.cjs +0 -87
  743. package/docs/CONTRACTS.md +0 -285
  744. package/docs/HTTP-SHOWCASE-POC.md +0 -397
  745. package/docs/SPATIAL-CHECKS.md +0 -69
  746. package/docs/benchmarks/http-showcase-optimized.json +0 -1879
  747. package/docs/benchmarks/http-showcase-profile.json +0 -308
  748. package/docs/benchmarks/http-showcase.json +0 -3069
  749. /package/dist/{starters/react/design-system/assets/fonts/.gitkeep → analysis/semantic.mjs} +0 -0
  750. /package/dist/{starters/react/design-system/controllers/.gitkeep → lowering-model.mjs} +0 -0
  751. /package/dist/showcase/{favicon.svg → ui/favicon-scavmehf.svg} +0 -0
package/docs/MCP.md CHANGED
@@ -1,284 +1,240 @@
1
1
  # ADS over MCP
2
2
 
3
- For component/pattern classification and dependency/style boundary diagnostics,
4
- read `ads://guides/layers`. A component supplies one cohesive UI capability; a
5
- pattern arranges capabilities into reusable structures/workflows. Guards enforce
6
- resolved ownership boundaries, not component counts. Scenarios may compose public
7
- UI to demonstrate their subject; application adapters own store access and routing.
8
-
9
3
  `ads mcp [directory]` serves a project's local design system over stdio. It uses
10
- the same `ds.config.json`, token inspection and core checks as the CLI. It reads
11
- source and build artifacts. With a declared framework, it manages ADS's Bun
12
- preview compiler and serves the built-in browser showcase, so the client needs
13
- only one launch command. Source editing is disabled by default; `--mutations`
14
- enables guarded ADS edits. MCP does not install skills or add a production runtime.
15
-
16
- The browser starts from `ads://project/explorer`, a compact snapshot of navigation,
17
- preview-tool capabilities, draft references and build state. It subscribes to index,
18
- token and build changes rather than repeatedly fetching full semantic catalogues.
19
- Interactive previews compile independently of background checks. A preview request
20
- uses the compiler's advertised build budget plus transport overhead; changing the
21
- selection cancels its pending request. Build failures remain visible with a Retry
22
- action and do not require restarting MCP.
23
-
24
- `ads_status.behaviorLibraries` reports each explicitly allowed project package,
25
- its installed version and the ADS units that use it. Catalog entries expose their
26
- `behaviorLibraries`, following local helpers and controllers. This allowlist
27
- permits imports; it does not load packages or audit third-party dependencies.
28
- Used code is bundled by ADS's managed Bun preview compiler into the resources
29
- read by the sandboxed MCP App. Existing style and geometry boundaries still apply.
30
-
31
- Websites and product MCP Apps reuse the project's public design-system UI. The
32
- consuming application owns data, actions, mounting, MCP communication and serving.
33
- The ADS MCP server supports development, inspection and review of that UI. Its
34
- showcase renders real implementations in isolated HTTP previews, providing evidence for the
35
- exercised conditions alongside normal application integration checks.
4
+ the same `ds.config.json` and core checks as the CLI, and reads source and build
5
+ artifacts. With a declared framework, it manages ADS's Bun preview compiler and
6
+ serves the built-in browser showcase, so the client needs one launch command.
7
+ Source editing is disabled by default; `--mutations` enables guarded ADS edits.
8
+ MCP installs no skills and adds no production runtime.
9
+
10
+ Websites and product MCP Apps reuse the project's public design-system UI; the
11
+ consuming application owns data, actions, mounting, MCP communication and
12
+ serving. The ADS MCP server supports development, inspection and review of that
13
+ UI. Its showcase renders real implementations in isolated HTTP previews: evidence
14
+ for the exercised conditions, beside normal application integration checks.
36
15
 
37
16
  ### Product widgets and payload scope
38
17
 
39
18
  The local HTTP showcase does not replace product MCP Apps. Build a product widget
40
- from named imports of the generated public design-system entry, using the
41
- application's normal framework and Linaria integration. Give the bundler the
42
- widget entry as its root; do not embed a complete design-system library or an ADS
43
- preview graph. Preserve intentional CSS and JavaScript side effects in package
44
- metadata. The application owns its MCP tool, HTML resource and actions; serving
45
- the resulting widget requires neither an ADS server nor authoring source.
46
-
47
- The [independent product MCP proof](../tests/browser/product-mcp.test.mjs) builds
48
- React and native Preact widgets from ADS-generated entries, then deletes the
49
- authored design system before starting a separate
50
- [product MCP server](../tests/fixtures/product-mcp/server.mjs). A real stdio MCP
51
- client reads its HTML resource; the official Apps bridge mounts it in Chromium
52
- and forwards a button action back to that server. The check covers generated
53
- themes, extracted styles, an inline font and artwork, and no network dependency
54
- on ADS. It rejects unrelated exported component code, CSS and artwork in the
55
- served payload, as well as review/scenario and ADS preview runtime modules.
56
-
57
- Shared foundation token/theme CSS and the selected framework, Apps SDK, font and
58
- assets remain part of the widget. This is a check of the widget's dependency
59
- closure, not a claim that every unused token declaration or SDK function has
60
- been removed. Applications using a different bundler or prebuilt library must
61
- check their actual emitted CSS and assets too; JavaScript tree shaking alone
62
- does not establish payload scope.
63
-
64
- After `bun run build`, run `bun test --parallel=1 tests/browser/product-mcp.test.mjs`.
65
- The proof prints the complete HTML, JavaScript and CSS byte counts. MCP Explorer
66
- tests separately cover ADS's development preview tools and resources; they do
67
- not substitute for this product-server check.
19
+ from named imports of the emitted design system's public barrel (`ads emit`; see
20
+ the [guide](GUIDE.md#emitting-the-design-system)) with the application's normal
21
+ bundler. Give the bundler the widget entry as its root.
22
+
23
+ - Each emitted owner module imports its own stylesheet. The widget carries the
24
+ CSS of the components it reaches, plus `foundation.css`.
25
+ - Do not embed an ADS preview graph.
26
+ - Preserve intentional CSS side effects in package metadata.
27
+ - Check the emitted CSS and assets of the built widget. JavaScript tree shaking
28
+ alone does not establish payload scope.
29
+ - The application owns its MCP tool, HTML resource and actions. Serving the
30
+ widget requires neither an ADS server nor authoring source.
68
31
 
69
32
  ## Editing access and compiler ownership
70
33
 
71
- Use [the direct editing and MCP-only workflows](../skills/ads-designer/references/workflows.md),
72
- also served as `ads://guides/workflows` and linked by `ads_status.workflow.editing`.
73
- With direct source access, an agent or human edits owned files in their normal
74
- editor and uses MCP for previews, inspection and checks. A read-only connection
75
- is sufficient; ordinary direct edits do not require drafts or `ads_accept`.
76
- With MCP-only access, enabled mutation tools provide source/draft edits and
77
- exact-revision acceptance. Without them or a separate editor, source editing is
78
- unavailable. `mutations.enabled` reports server capability, not the chosen route.
34
+ The [direct editing and MCP-only workflows](../skills/ads-designer/references/workflows.md)
35
+ are also served as `ads://guides/workflows` and linked by
36
+ `ads_status.workflow.editing`.
37
+
38
+ - **Direct source access.** An agent or a person edits owned files in a normal
39
+ editor and uses MCP for previews, inspection and checks. A read-only
40
+ connection is sufficient: ordinary direct edits need no drafts and no
41
+ `ads_accept`.
42
+ - **MCP-only access.** Enabled mutation tools provide draft edits and
43
+ exact-revision acceptance. Without them or a separate editor, source editing
44
+ is unavailable.
79
45
 
80
- Both editing routes use ADS's compiler, which the MCP server runs. Existing views
81
- may remain visible during compilation, but changed-source evidence is stale until
82
- verified updated artifacts are published. Both editing routes require current ADS/project checks and rendered review.
46
+ `mutations.enabled` reports the server capability, not the chosen route.
47
+ Both routes use ADS's compiler, which the MCP server runs, and both require
48
+ current ADS/project checks and rendered review. A view can stay visible during
49
+ compilation, but evidence for changed source is stale until ADS publishes
50
+ verified updated artifacts.
83
51
 
84
52
  ## Command memory budgets
85
53
 
86
- `resources.memoryLimitMb` in `ds.config.json` controls command memory. Missing/null
87
- selects an automatic process-tree budget of at most 6 GiB and one quarter of
88
- physical RAM, with 1 GiB of available-memory headroom and inherited Linux limits
89
- respected. A positive MiB value sets the project budget explicitly. Changing it
90
- requires restarting ADS. This field is unavailable in published 0.3.37.
54
+ `resources.memoryLimitMb` in `ds.config.json` controls command memory. A positive
55
+ MiB value sets the project budget. Missing or `null` selects an automatic
56
+ process-tree budget: at most 6 GiB and one quarter of physical RAM, with 1 GiB
57
+ of available-memory headroom, within inherited Linux limits. Restart ADS after a
58
+ change.
91
59
 
92
- CLI MCP/Explorer, compile and check/verification commands share the envelope with
93
- their descendants. Linux uses a user systemd memory scope where available,
94
- without additional swap, or keeps a finite parent envelope. A separate watchdog
95
- is the fallback; its sampling is not a hard kernel bound. `ads_status.resourceLimits`
96
- reports `memoryLimitMb`, `enforcement`, `scope` and `hardLimit`. Embedded APIs
97
- report `host-managed`, and standalone project scripts need their own limits.
98
- See [project budgets and runtime selection](../skills/ads-designer/references/runtimes.md).
60
+ The CLI commands for MCP/Explorer, compilation and check/verification share the
61
+ envelope with their descendants; standalone project scripts need their own
62
+ limits. `ads_status.resourceLimits` reports `memoryLimitMb`, `enforcement`,
63
+ `scope` and `hardLimit`. Enforcement is a user systemd memory scope on Linux
64
+ where available (without additional swap), a finite parent envelope, or a sampling watchdog, which is not
65
+ a hard kernel bound. Embedded APIs report `host-managed`.
99
66
 
100
- An exceeded command fails with `ADS_MEMORY_LIMIT` on stderr without contaminating
101
- MCP stdout. Retained source/results must be inspected before retrying. No passing
102
- result is implied by a timeout, killed worker or disconnected MCP transport.
67
+ A command that exceeds the budget fails with `ADS_MEMORY_LIMIT` on stderr; MCP
68
+ stdout stays clean. Inspect the retained source and results before a retry. A
69
+ timeout, a killed worker or a disconnected MCP transport implies no passing
70
+ result. See [project budgets and runtime selection](../skills/ads-designer/references/runtimes.md).
103
71
 
104
72
  ## Built-in showcase client
105
73
 
106
- From 0.4.5, the local showcase uses HTTP JSON endpoints and immutable checked
107
- asset URLs by default; the browser does not run an MCP client. Agents and
108
- external MCP Apps retain the existing tools, resources and protocol transports.
109
- Both use the same compiler, scoped draft services and verification gates.
110
- No project configuration or experimental flag is needed.
111
-
112
- Build reports arrive through server-sent events (SSE), with no periodic browser
113
- status polling. On interruption the retained preview is marked potentially stale;
114
- EventSource reconnects and ADS rereads current discovery/build state. Returning
115
- to a visible tab also reconciles current state. A disconnected preview is not
116
- current evidence. Captures and registered browser verification use this same
117
- local HTTP showcase and still wait for verified revisions.
118
-
74
+ Starting `ads mcp` serves a loopback showcase; no project configuration or
75
+ experimental flag is necessary.
76
+
77
+ The showcase uses HTTP JSON endpoints and immutable checked asset URLs; the
78
+ browser runs no MCP client. Agents and external MCP Apps use the MCP tools,
79
+ resources and transports. Both use the same compiler, scoped draft services and
80
+ verification gates. Captures and registered browser verification use this
81
+ showcase and wait for verified revisions.
82
+
83
+ The [guide](GUIDE.md#showcase) covers the printed URL, `ads showcase` for
84
+ browser-only work, `--port` and `ads mcp --no-showcase`. In addition:
85
+
86
+ - `ads_status.showcaseUrl` and `project.showcase.url` report the URL and port of
87
+ the showcase that the server runs.
88
+ - An HTTP MCP client can connect to `/mcp` on the same runtime while the agent
89
+ keeps stdio. Both serve the same protocol versions and share the compiler and
90
+ artifacts. Stdout carries JSON-RPC only.
91
+ - For a stable address, add `"--port", "4191"` to the server's `args` in
92
+ `.mcp.json` (or the corresponding client configuration). An occupied explicit
93
+ port fails startup: ADS neither switches ports silently nor terminates another
94
+ live client.
95
+ - The website binds to 127.0.0.1 and accepts only its own origin. It serves
96
+ packaged client assets, scoped HTTP preview services and MCP, with no
97
+ arbitrary file reader and no command launcher.
98
+ - While MCP is connected, use its showcase URL instead of a second showcase or
99
+ compiler for that project. After an ADS restart on a different port, open the
100
+ new URL.
101
+
102
+ Every registered preview uses `?scenario=<discovered-id>`;
103
+ `ads_show_scenario({id})` returns the canonical link. The client selects the
104
+ section from the scenario's discovered `kind`, never from the ID's path prefix.
105
+ A scenario's named state has a link too: `&state=<name>` opens the scenario in
106
+ that state, and choosing a state in the page's switch puts it in the address.
107
+ `ads_show_scenario({id, state})` returns that link and the `state` in its
108
+ result; `ads_scenarios` lists each scenario's `states`. A name that the
109
+ scenario does not declare is an error in the tool, and the first state in an
110
+ address.
111
+ With no registered scenarios the showcase has nothing to open, and
112
+ `ads_scenarios` says so (see [Inspect the design system](#inspect-the-design-system)).
113
+
114
+ **Shell and build state**
115
+
116
+ The browser starts from `ads://project/explorer`: a compact snapshot of
117
+ navigation, preview-tool capabilities, draft references and build state. It
118
+ subscribes to index and build changes instead of repeated fetches of full
119
+ semantic catalogues.
120
+
121
+ - The shell never imports project UI. Every scenario section comes from the
122
+ `ads_scenarios` registry, and the selected scenario opens in a persistent
123
+ opaque preview iframe. The project needs no browser-page files.
124
+ - A theme button steps through the declared themes (`ads_status.themes`), and a
125
+ brand selector lists the declared brands (`ads_status.brands`). Both come from
126
+ `foundation.ads.ts`; if ADS cannot read it, `ads_status.designContextsError`
127
+ says why.
128
+ - Interactive previews compile independently of background checks. A preview
129
+ request uses the compiler's advertised build budget plus transport overhead,
130
+ and a changed selection cancels its pending request.
131
+ - Build reports arrive through server-sent events (SSE), with no periodic status
132
+ polling. An interrupted connection marks the retained preview potentially
133
+ stale until reconnection or a return to a visible tab reconciles state. A
134
+ disconnected preview is not current evidence.
135
+ - A monochrome indicator in the upper-right header reports compilation,
136
+ checking, readiness or failure; hover or click shows details. The preview
137
+ stays interactive during background checks. An edit to the current entry uses
138
+ only the header ring; a switch to another entry shows a loading spinner in the
139
+ preview pane until that selection mounts.
140
+ - Explorer entry glyphs show not built, building, compiled/checking, ready, stale
141
+ and failed, as monochrome shapes with accessible descriptions, separately from
142
+ the Draft badge.
143
+ - A failed build shows a compact status strip below the toolbar, outside the App
144
+ canvas. Details opens the full file/line diagnostics, and Retry requests the
145
+ selected preview again, without an MCP restart. The retained view is
146
+ identified as stale. Other coding-agent hosts apply their own reload policy.
147
+ - After a catalogue change the client refreshes its menus. After a current
148
+ successful build it refreshes the active scenario inside the same App.
149
+
150
+ The [architecture](ARCHITECTURE.md#the-http-shell-and-the-preview-frame) gives
151
+ the design of the shell, its frame and its status display.
119
152
 
120
153
  ### Auto-mode tracked drafts
121
154
 
122
155
  Use the [draft workflow](../skills/ads-designer/references/drafts.md) for MCP-only
123
- iterative design, or when direct editors choose isolated tracked proposals. With `--mutations`, `ads_create_draft` creates a tracked proposal for 1–64
124
- owners; ordinary file edits or `ads_update_draft` continue it. `ads_show_draft`
125
- reuses an isolated compiler workspace and returns both an MCP App preview and
126
- browser URLs without running acceptance checks. `ads_drafts` lists only pending
127
- drafts, supports owner/query filtering and paged file mappings, and returns recent
128
- acceptance/drop events. `ads_catalog` and `ads_scenarios` annotate existing owners
129
- with draft references. `ads_tokens.tokenGroups` discovers groups for
130
- `ads_create_draft({units:["tokens"],tokenGroups:["colors"]})`.
131
-
132
- For model-visible visual evidence, pass `draft` and its exact `revision` to
133
- `ads_capture` alongside the normal scenario/target/theme/viewport selection. It
134
- captures Accepted/current and Draft/candidate PNG resources while borrowing warm
135
- preview hosts; it neither closes them nor runs draft acceptance checks. A new
136
- scenario has no current image. Source changes during capture prevent replacing
137
- the slots. Read the returned PNG resources before visual acceptance; the result
138
- is explicitly `previewOnly`, not behavioral or acceptance evidence.
139
-
140
- `ads_accept({id,revision})` validates and applies the exact reviewed revision in
141
- one operation; `dryRun:true` runs every check and writes nothing. It is the only way
142
- MCP writes accepted source. It runs `ads check`, `acceptance.scripts`, the draft
143
- owners' own registered behavior checks (`acceptance.behavior`, default true) and the
144
- render audit of the draft owners' own UI scenarios (`acceptance.audit`, default
145
- true), each scenario in every declared brand and theme, with the non-text contrast
146
- and overflow checks; any `a11y-axe`,
147
- `a11y-non-text-contrast` or `layout-overflow` error rejects acceptance. Edits during checking and baseline conflicts
148
- prevent application; failures retain the draft and return execution evidence.
149
- Successful acceptance removes draft source, records an event and resolves draft
150
- dependencies in remaining proposals. Accept dependencies first and review their
151
- dependents again. `ads_drop_draft` deletes a draft, replacing a separate refusal.
152
- There is no Iterate action or extra human approval step in auto mode.
153
-
154
- Tracked source lives in `ads-drafts/<id>/` with a `proposal.ads.draft.json`
155
- manifest and `.ads` source files. Generated mirrors, compilers and events
156
- live under ignored `.ds/`. A draft can be committed and reviewed in a PR without
157
- being imported into application source. Normal imports of marked draft source,
158
- including aliases/symlinks, fail guards; use the isolated preview overlay instead.
159
- Install the exported `developmentImportGuard()` in application Vite/Rollup builds too.
160
-
161
- Explorer keeps pending proposals in the ordinary catalogue, with Draft badges
162
- on their owners, including new owners without an accepted version. Selecting an
163
- entry with accepted and draft versions shows Split view in the preview toolbar to compare Accepted
164
- and Draft in the right pane using separate opaque preview iframes, the same scenario/theme
165
- and matched available/phone viewport widths. New-only entries show their draft
166
- without a comparison toggle. Entries without a draft also hide the toggle, and
167
- the toolbar disappears when empty. Unchanged scenarios available as explicit overlay review
168
- contexts do not acquire owner badges. The Drafts tab lists active proposals by
169
- catalogue category; selecting one opens its draft. `ads_drafts` provides draft-only MCP listing. Project
170
- code remains inside the existing sandbox; no additional iframe origin is allowed.
171
- Draft resource reads are explicitly scoped through `ads://drafts/<id>/resource`.
172
- `ads://project/drafts` supports resource subscriptions; tool outcomes and persisted
173
- events/status are the fallback when a host does not deliver notifications.
174
-
175
- For an existing preview, `ads_show_draft` reuses known scenario metadata while a
176
- worker refreshes discovery. Its `discovery.state` is `current`, `pending` or
177
- `error`; `discovery.revision` identifies the metadata snapshot, separately from
178
- the returned exact proposal `revision`. New/missing identities await discovery.
179
- The previous view may remain visible until the new compilation is available.
180
- Acceptance always runs its fresh checks against the exact reviewed revision.
181
- After 20 retained module revisions, Explorer automatically restarts the affected
182
- App to release its module cache. Draft comparison preserves the other version's
183
- mounted state and the selected scenario/theme/viewport.
184
-
185
- Build state is separate from the Draft badge. Explorer entry glyphs show not
186
- built, building, compiled/checking, ready, stale and failed using monochrome
187
- shapes with accessible descriptions. Relevant MCP results expose `build` or
188
- `preview` with `state`, `building`, `current`, `stale`, scenario/revision data and
189
- a build-resource address. `ads://project/build` includes active `drafts`; each
190
- draft's `preview.resourceUri` addresses its complete isolated build report.
191
- Subscribe to `ads://project/build`, `ads://project/drafts`, or an active draft's
192
- `preview.resourceUri` (also listed by `resources/list`): standard
193
- `notifications/resources/updated` signals progress, completion, failure and
194
- metadata refresh without another edit. Re-read the resource after a notification;
195
- hosts without notifications can poll it. A scoped subscription receives only that
196
- draft's build changes, including a final invalidation when its session is removed.
197
- Unsubscribe when leaving the view; subscribe again and read current status after
198
- reconnecting. Modern clients use `subscriptions/listen` resource filters; older
199
- clients use `resources/subscribe` and `resources/unsubscribe`. Notifications
200
- invalidate data; they do not carry the build report. Ready means compilation and
201
- its checks completed; the mounted App separately reports when rendering is ready.
202
- A ready draft remains unaccepted.
203
-
204
- Agents must finish coherent design changes by accepting required drafts. A
205
- preview-only proposal is unfinished unless the user asked to retain it. Failed
206
- checks require repair or an explicit unfinished-blocker report, never bypassing
207
- the acceptance gates.
208
-
209
- Starting `ads mcp` automatically serves a loopback showcase. Its URL is printed
210
- on stderr and returned by `ads_status.showcaseUrl`/`project.showcase.url`.
211
- The agent keeps its stdio connection; the browser connects to `/mcp` on the same
212
- runtime over HTTP. Both serve the same protocol versions and share the compiler
213
- and artifacts. Stdout remains exclusively JSON-RPC.
214
-
215
- Every registered preview uses `?scenario=<discovered-id>`, including the token and brand
216
- views ADS builds from project definitions. The client selects its section
217
- from the scenario's discovered `kind`, never from the ID's path prefix. `ads_show_scenario({id})`
218
- opens those views like any other and returns their canonical showcase link.
219
-
220
- For browser-only work, run `ads showcase` inside the project. It starts the same
221
- runtime without stdio. `--port 4185` selects a port; otherwise the OS chooses an
222
- available one. For a stable address, add `"--port", "4191"` to the server's `args`
223
- in `.mcp.json` (or the corresponding client configuration). `ads_status.showcaseUrl`
224
- always reports the URL and port of the showcase the server is running. An occupied explicit
225
- port fails startup; ADS does not silently switch ports or terminate another live
226
- client. Reuse the connected server's showcase instead of launching another one.
227
- `ads mcp --no-showcase` disables the website for headless clients.
228
- The website binds to 127.0.0.1 and accepts its own origin only. It serves packaged
229
- client assets, scoped HTTP preview services and MCP, with no arbitrary file reader or command launcher.
230
- Shutdown closes both transports, subscriptions and the managed compiler.
231
-
232
- The shell is minimal: header, section tabs, collapsible left menu, a theme button that
233
- steps through the project's declared themes (`ads_status.themes`), a brand selector beside
234
- it when the project declares brands (`ads_status.brands`),
235
- status/diagnostics when needed, and the App slot. The Icons tab (shown when the project has
236
- a glyph set) renders `ads://project/icons` natively: the glyph set, each glyph on its grid
237
- at every icon size with aliases and glyph errors, and the logos in `assets/logos/`. Its HTTP client handles discovery,
238
- scoped preview actions and SSE build events. Token categories come
239
- from `ads_tokens.categories` (the catalogue's groups); every scenario section also
240
- comes from the same `ads_scenarios` registry.
241
- It opens the selected scenario in a persistent opaque preview iframe. Project UI is never imported into the shell.
242
-
243
- The built-in client refreshes menus after catalogue changes and automatically
244
- refreshes the active scenario inside the same reusable App after a current
245
- successful build. Failed builds show a compact status strip below the toolbar,
246
- outside the App canvas. Details opens full file/line diagnostics; Retry requests
247
- the selected preview again. The retained view is identified as stale. Themes and
248
- available space flow through host context. Other coding-agent hosts retain their own reload
249
- policy. An interrupted SSE connection marks retained output potentially stale; reconnection
250
- and visibility resume reconcile current state. Reopen the URL after restarting ADS
251
- if the runtime selects a different port. Compilation remains necessary for project TSX/Linaria, performed by the
252
- managed Bun compiler on demand and after relevant source changes.
253
-
254
- Switching entries updates the scenario inside the existing App. A quiet monochrome
255
- indicator in the upper-right header reports compilation, checking, readiness or
256
- failure; hover or click reveals details. The preview remains interactive during
257
- background checks. Switching to another entry shows a loading spinner in the
258
- preview pane until that selection mounts. Editing the current entry uses only
259
- the header ring, without covering the preview. Messages from the previous
260
- selection cannot clear navigation's loading state.
261
- Token presentation comes from project-owned scenarios, fixtures and
262
- development-only review helpers, using the project's real foundation CSS and extracted
263
- styles. The App runtime contains no token sample templates or named token ordering.
264
- `ads_tokens` inspects definitions without a scenario build.
265
-
266
- There are no required browser-page files in the project. Colocated scenarios and
267
- fixtures, optional development-only review helpers, and the project's framework
268
- entry supply the presentation. Use the existing runtime URL when MCP is connected
269
- instead of starting a second compiler for that project.
270
-
271
- Development review UI lives in `review/`, behind a separate development entry;
272
- production patterns remain application UI. Discover `ads_status.project.review`
273
- and read `ads://guides/review` for imports, guarded owners and migration. Review
274
- exports are not product catalogue entries. They can frame real scenarios and
275
- render token samples without entering the deployed application's graph.
156
+ iterative design, or when a direct editor chooses isolated tracked proposals.
157
+ [Guarded editing](#guarded-editing) gives the editing procedure and the
158
+ acceptance gates.
159
+
160
+ - `ads_create_draft` (with `--mutations`) creates a tracked proposal for 1–64
161
+ owners. Ordinary file edits or `ads_update_draft` continue it.
162
+ - `ads_show_draft` reuses an isolated compiler workspace. It returns an MCP App
163
+ preview and browser URLs and runs no acceptance checks.
164
+ - `ads_drafts` lists only pending drafts, with owner/query filters and paged
165
+ file mappings, and returns recent acceptance and drop events. `ads_scenarios`
166
+ annotates registered scenarios with draft references.
167
+ - `ads_accept({id,revision})` validates and applies the exact reviewed revision
168
+ in one operation; no other tool publishes a draft. `ads_drop_draft` deletes a
169
+ draft; there is no separate refusal step.
170
+
171
+ Auto mode has no extra human approval step, with one exception: accessibility
172
+ declarations are published only after a person approves them (see
173
+ [Guarded editing](#guarded-editing)).
174
+
175
+ Finish a coherent design change by accepting its required drafts: dependencies
176
+ first, then review their dependents again. A preview-only proposal is unfinished
177
+ unless the user asked to retain it. A failed check requires a repair or an
178
+ explicit unfinished-blocker report, never a bypass of the gates. A successful
179
+ acceptance removes the draft source, records an event and resolves draft
180
+ dependencies in the remaining proposals.
181
+
182
+ **Storage.** Tracked source lives in `ads-drafts/<id>/`, with a
183
+ `proposal.ads.draft.json` manifest and `.ads` source files. Generated mirrors,
184
+ compilers and events live under the ignored `.ds/`. A draft can be committed and
185
+ reviewed in a PR; application source does not import it. An import of draft
186
+ source from the design system leaves its folder and fails `ads check`
187
+ (`import-leaves-design-system`). Use the isolated preview overlay instead.
188
+
189
+ **Explorer.** Pending proposals stay in the ordinary navigation, with Draft
190
+ badges on their owners, including new owners without an accepted version. The
191
+ Drafts tab lists active proposals by section; selecting one opens its draft.
192
+
193
+ - An entry with accepted and draft versions shows Split view in the preview
194
+ toolbar: Accepted and Draft in the right pane, in separate opaque preview
195
+ iframes, with the same scenario/theme and matched available/phone viewport
196
+ widths. It preserves the other version's mounted state and the selected
197
+ scenario/theme/viewport.
198
+ - A new-only entry shows its draft without a comparison toggle. An entry without
199
+ a draft hides the toggle, and an empty toolbar disappears. An unchanged
200
+ scenario that is only an explicit overlay review context gets no owner badge.
201
+ - Project code stays inside the sandbox; no additional iframe origin is
202
+ allowed. After 20 retained module revisions, Explorer restarts the affected
203
+ App to release its module cache.
204
+
205
+ **Discovery and build state.** For an existing preview, `ads_show_draft` reuses
206
+ the known scenario metadata while a worker refreshes discovery.
207
+ `discovery.state` is `current`, `pending` or `error`. `discovery.revision`
208
+ identifies the metadata snapshot, separately from the returned exact proposal
209
+ `revision`. New or missing identities wait for discovery. The previous view can stay
210
+ visible until the new compilation is available. Acceptance always runs fresh
211
+ checks against the exact reviewed revision.
212
+
213
+ Relevant MCP results expose `build` or `preview` with `state`, `building`,
214
+ `current`, `stale`, scenario/revision data and a build-resource address.
215
+ `ads://project/build` includes the active `drafts`; each draft's
216
+ `preview.resourceUri` addresses its complete isolated build report. Ready means
217
+ that compilation and its checks completed; the mounted App reports rendering
218
+ readiness separately. A ready draft is still unaccepted.
219
+
220
+ - Draft resource reads are scoped through `ads://drafts/<id>/resource`.
221
+ - Subscribe to `ads://project/build`, `ads://project/drafts`, or an active
222
+ draft's `preview.resourceUri` (also listed by `resources/list`).
223
+ `notifications/resources/updated` signals progress, completion, failure and
224
+ metadata refresh without another edit. Read the resource again after a
225
+ notification, or poll it if the host delivers none. Tool outcomes and
226
+ persisted events/status are the fallback.
227
+ - A scoped subscription receives only that draft's build changes, including a
228
+ final invalidation when its session is removed.
229
+ - Unsubscribe when you leave the view. After a reconnect, subscribe again and
230
+ read the current status
231
+ ([subscription methods](#protocols-notifications-and-compatibility)).
276
232
 
277
233
  ## Connect Codex or Claude
278
234
 
279
235
  Use the published package through `npx` (or `bunx` in a Bun project). ADS runs on
280
- Bun 1.4.1+, which must be installed; no ADS checkout or global installation is
281
- needed. Open your client in the project folder containing `ds.config.json`.
236
+ Bun 1.4.1+, which must be installed. No ADS checkout or global installation is
237
+ necessary. Open the client in the project folder that contains `ds.config.json`.
282
238
 
283
239
  For **Codex**, add this to the project's `.codex/config.toml`:
284
240
 
@@ -301,396 +257,509 @@ For **Claude Code**, add this to the project's `.mcp.json`:
301
257
  }
302
258
  ```
303
259
 
304
- Restart/reconnect the client, then ask it to inspect your design system.
305
- `npx` uses the project's installed ADS version when present, or downloads the
306
- published package when absent. `-y` prevents an install prompt from blocking
307
- MCP startup. For this `npx` setup, Node and npm must be available to the client.
308
-
309
- For **Bun**, use `command = "bunx"` and
310
- `args = ["@reqvire-org/ads", "mcp"]` in Codex, or these equivalent
311
- `command`/`args` values in Claude's JSON. Bun 1.4.1+ is sufficient; Node and npm
312
- are unnecessary for ADS itself. The CLI has a Bun shebang. Generated local
313
- launchers use the installed CLI while preserving interpreters selected by
314
- application check/build scripts.
315
- Runtime setup and diagnostics are also available in `ads://guides/runtimes`.
316
-
317
- For **Claude Desktop**, use the same JSON in its MCP configuration and append
318
- the project path to `args`, since it does not open inside your project:
260
+ Restart or reconnect the client, then ask it to inspect the design system.
261
+ `npx` uses the project's installed ADS version when present, and otherwise
262
+ downloads the published package. `-y` prevents an install prompt from blocking
263
+ MCP startup. This setup needs Node and npm.
264
+
265
+ For **Bun**, use `command = "bunx"` and `args = ["@reqvire-org/ads", "mcp"]` in
266
+ Codex, or the equivalent `command`/`args` values in Claude's JSON. Bun 1.4.1+ is
267
+ sufficient; ADS itself needs neither Node nor npm. Generated local launchers use
268
+ the installed CLI and preserve the interpreters that application check/build
269
+ scripts select. `ads://guides/runtimes` gives runtime setup and diagnostics.
270
+
271
+ For **Claude Desktop**, use the same JSON in its MCP configuration. It does not
272
+ open inside the project, so append the project path to `args`:
319
273
  `["-y", "@reqvire-org/ads", "mcp", "/absolute/project"]`.
320
274
  The same directory argument targets a nested frontend from another working
321
275
  directory. ADS reads that project's `ds.config.json`.
322
276
 
323
- The client launches the stdio server and its showcase automatically. No separate
324
- terminal or explorer process is needed. For browser-only inspection, run
277
+ The client launches the stdio server and its showcase; no separate terminal or
278
+ explorer process is necessary. For browser-only inspection, run
325
279
  `npx @reqvire-org/ads showcase` inside the project and open the printed URL.
326
280
 
327
281
  These configurations follow [Codex's stdio documentation](https://learn.chatgpt.com/docs/extend/mcp?surface=cli)
328
282
  and [Claude's MCP configuration](https://code.claude.com/docs/en/mcp).
329
- For tool development, use the separate [local linking workflow](GUIDE.md#develop-ads-locally)
330
- and [diagnostic explorer](../mcp-explorer/README.md).
283
+ For tool development, use the [diagnostic explorer](../mcp-explorer/README.md).
331
284
 
332
- In the ADS checkout, `npm run ads-mcp` builds and starts the local server with
333
- guarded mutations; `npm run ads-read-mcp` starts it with editing disabled. Both
334
- also start the showcase and managed preview compiler. Append `-- --port 4191`
335
- to choose **http://127.0.0.1:4191/**. When a client launches these npm scripts,
336
- use `npm --silent run ads-mcp` or `npm --silent run ads-read-mcp` to keep stdout
337
- exclusive to JSON-RPC. Consumer projects use their installed tool; these checkout
338
- scripts rebuild ADS source first.
285
+ In the ADS checkout, `npm run ads-mcp` (guarded mutations) and
286
+ `npm run ads-read-mcp` (editing disabled) build ADS and serve the playground, a
287
+ working copy of `tests/fixtures/reference-project` in `.ds/playground/`, with
288
+ the showcase and the managed preview compiler. Append `-- --port 4191` to choose
289
+ **http://127.0.0.1:4191/**. If a client launches these scripts, use
290
+ `npm --silent run ads-mcp` or `npm --silent run ads-read-mcp`, so that stdout
291
+ carries JSON-RPC only. To launch the built tool directly, run `npm run build`,
292
+ then `bun dist/cli.mjs mcp`. See [develop ADS locally](GUIDE.md#develop-ads-locally).
339
293
 
340
294
  ## Protocol surface
341
295
 
342
- Checked against the current [base specification, 2026-07-28](https://modelcontextprotocol.io/specification/2026-07-28),
296
+ ADS is checked against the current [base specification, 2026-07-28](https://modelcontextprotocol.io/specification/2026-07-28),
343
297
  the stable [Skills extension](https://github.com/modelcontextprotocol/ext-skills/blob/main/specification/stable/skills.mdx),
344
298
  and [Apps revision 2026-01-26](https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/2026-01-26/apps.mdx).
345
299
  Skills and Apps are optional negotiated extensions. A client gets the
346
- capabilities its negotiated protocol version defines.
300
+ capabilities that its negotiated protocol version defines.
347
301
 
348
302
  | Content | Protocol surface |
349
303
  |---------|------------------|
350
304
  | Discovery, checks and preview selection | `tools/list`, `tools/call`; small structured results |
351
- | Source, guides, tokens, build reports, manifests and compiled bytes | `resources/list`, `resources/read`; URI-addressed text or binary content |
305
+ | Source, guides, build reports, manifests and compiled bytes | `resources/list`, `resources/read`; URI-addressed text or binary content |
352
306
  | Packaged agent workflows and their complete file manifests | `skills/list`, `skills/get` on the Skills extension; ordinary resource/tool access on 2025-era connections |
353
307
  | Skill folders and direct children | `resources/directory/read`, gated by `directoryRead: true`; directory MIME type `inode/directory` |
354
308
  | Reusable user-selected workflow messages | `prompts/list`, `prompts/get` |
355
309
  | Interactive previews | Tool `_meta.ui.resourceUri` points to a `ui://` HTML App resource; rendering uses the Apps lifecycle and resource bridge |
356
310
  | Source/catalogue, build and resource changes | List-change and resource-update notifications; `subscriptions/listen` for the 2026 protocol and resource subscriptions for the supported 2025 protocols |
357
311
 
358
- Directory reads cover the packaged skill trees, including references and starter
359
- assets. They are not an arbitrary project filesystem browser. File manifests
360
- carry byte sizes and SHA-256 digests; each read returns the advertised snapshot.
361
- Invalid skill/directory URIs and listing cursors use protocol invalid-parameter
362
- errors. Expired asset URIs fail as unavailable resources, not successful previews.
312
+ Directory reads cover the packaged skill trees, including their references, not
313
+ the project filesystem. File manifests carry byte sizes and SHA-256 digests, and
314
+ each read returns the advertised snapshot. Invalid skill/directory URIs and
315
+ listing cursors return protocol invalid-parameter errors. An expired asset URI
316
+ fails as an unavailable resource, never as a successful preview.
363
317
 
364
- The server exposes these capabilities; each client chooses its UI, resource
365
- retrieval, prompt picker and skill activation. The showcase uses the modern
366
- protocol. The diagnostic explorer defaults to compatible mode; select
318
+ Each client chooses its UI, resource retrieval, prompt picker and skill
319
+ activation. The diagnostic explorer defaults to compatible mode; select
367
320
  **2026 · native Skills** to test native skill discovery and folder browsing.
368
321
 
369
322
  ## Tools and resources
370
323
 
371
- ### Inspect the design system
372
-
373
- Call `ads_status` to identify the connected project and preview build state.
374
- For example, find Button with
375
- `ads_catalog({ "query": "Button", "kind": "components", "limit": 5 })`, then
376
- open one of its returned preview IDs with `ads_show_scenario`. Results link to
377
- the owning source and guides; `ads_scenarios` lists available previews.
378
-
379
- `ads_tokens` inspects definitions and values. `ads_scenarios({kind: "tokens"})` lists the
380
- token views ADS builds from the token sheets and `tokens/catalog.ads.json`, which open with
381
- `ads_show_scenario`. `ads_scenarios` also lists the brand view (`kind: "brand"`, `brand/Assets`,
382
- built from `assets/brand/`), which leads the showcase. For
383
- design tools, `ads://project/tokens/dtcg` serves the same W3C Design Tokens JSON as the CLI's
384
- `ads tokens --format dtcg` (`?theme=<name>&brand=<name>` select one context; `ads_tokens`
385
- returns it as `dtcgUri`). If the client cannot render Apps, use the returned
386
- showcase URL. Build reports identify current, stale and failed output; browser
387
- review and project checks still verify behavior.
388
-
389
- Pictograms are discoverable with `ads_scenarios({kind: "pictograms"})` and preview
390
- ids `pictograms/<id>`. Their source owner is `assets/pictograms`; its drafts attach
391
- to those gallery entries. `ads://guides/pictograms` documents the catalogue, theme
392
- rules, artistic freedom and render-guard limits. They are tool-owned foundation
393
- views, not authored `.ads.scenario.tsx` files.
394
-
395
324
  The server supplies agent guidance through its instructions, tool descriptions,
396
- `ads://project/guide` and packaged ADS skills.
325
+ `ads://project/guide` and the packaged ADS skills.
397
326
 
398
327
  | Tool | Purpose |
399
328
  |------|---------|
400
329
  | `ads_status` | Project paths, watcher/build states, preview revisions and diagnostics, skills |
401
- | `ads_catalog` | Bounded search for public UI, controllers and hooks, with source/guide URIs |
402
- | `ads_tokens` | Bounded token-definition and theme inspection |
330
+ | `ads_catalog` | Paged public catalogue; filter by `kind` |
331
+ | `ads_tokens` | Paged token inventory; filter by `role`/`group`; `dtcgUri` exports DTCG |
403
332
  | `ads_skills` | 2025-era connections only: workflow names/descriptions without loading instructions |
404
333
  | `ads_read_skill` | 2025-era connections only: explicit text instruction/support-file reads in bounded chunks |
405
334
  | `ads_scenarios` | Bounded scenario discovery, including folder-derived groups searchable with `query` |
406
335
  | `ads_show_scenario` | Render an exact discovered scenario with its own fixtures |
407
336
  | `ads_behaviors` | Paged owner discovery; select a unit and detail section |
408
- | `ads_validate` | The project gate: `ads check`, project scripts, and every behavior test and render audit its scope (`all`, or `changed` since the last successful full run) reaches |
337
+ | `ads_validate` | The project gate, for scope `all` or `changed` |
409
338
  | `ads_results` | Page saved execution outcomes, diagnostics, logs and captures without rerunning |
410
339
  | `ads_investigate` | Read one check's summary, then paged requests/errors/artifacts |
411
- | `ads_capture` | On-demand PNG of a discovered scenario or named element; replace current and clear candidate |
340
+ | `ads_capture` | On-demand PNG of a discovered scenario or named element |
412
341
  | `ads_capture_clear` | Remove generated captures or discard only the candidate |
413
342
  | `ads_units` | Discover edit owners and the files belonging to one unit |
414
343
  | `ads_read_file` | Read bounded source ranges, with owning unit and full-file digest |
344
+ | `ads_drafts`, `ads_show_draft` | List tracked drafts; prepare a draft preview |
345
+ | `ads_create_draft`, `ads_update_draft`, `ads_accept`, `ads_drop_draft`, `ads_delete`, `ads_emit` | With `--mutations` only ([Guarded editing](#guarded-editing)) |
346
+
347
+ `ads://project/status`, `/build`, `/tokens`, `/tokens/dtcg`, `/catalog`,
348
+ `/scenarios` and `/checks` carry project JSON detail. Behavior discovery,
349
+ execution outcomes and investigation details are paged; their resource reads
350
+ use the same bounds as their tools. Allowed project documentation/source and
351
+ skill files are separate resources. No arbitrary filesystem reader is exposed.
415
352
 
416
- Scenario results include `group` only when folder structure supplies one. It is
417
- computed output, never scenario metadata. `ads_scenarios({query: "Forms"})` searches
418
- the derived group label; `kind`, `offset` and `limit` continue to work. The full
419
- `ads://project/scenarios` resource carries the same registry. Pass exact returned
420
- IDs to `ads_show_scenario`; `ads_catalog.previews`, `ads_units` and source resources
421
- retain the actual nested paths. A folder group is navigation, not an edit owner.
422
- See [folder rules](GUIDE.md) and the
353
+ Listings have bounded pages and opaque cursors. Prefer bounded tools for large
354
+ listings: an explicit resource read can enter model context, and a client can
355
+ truncate a large payload.
356
+
357
+ ### Inspect the design system
358
+
359
+ Call `ads_status` to identify the connected project and the preview build state.
360
+ Find the public UI or behavior to reuse or edit with `ads_catalog`, and the
361
+ tokens with `ads_tokens`. `ads_scenarios` lists the registered previews, and
362
+ `ads_show_scenario` opens one. Results link to the owning source and guides;
363
+ `ads_units` lists an owner's files. If the client cannot render Apps, use the
364
+ returned showcase URL. Build reports identify current, stale and failed output;
365
+ browser review and project checks still verify behavior.
366
+
367
+ `ads_status.sourceRevision` is the revision of the accepted ADS-owned sources
368
+ (configuration, the design system and declared public folders) that the call
369
+ read. Drafts track it, and `ads_delete` requires its targets to have been
370
+ inspected at it.
371
+
372
+ Both inventories are read from one captured revision of the current sources,
373
+ through the same analysis that `ads check` runs. Owner analysis of that revision
374
+ is shared, not repeated. Neither inventory renders anything or changes source.
375
+
376
+ #### The public catalogue
377
+
378
+ `ads_catalog` (and the full `ads://project/catalog`) lists every named export of
379
+ the public barrel (`index.ts`), values and types, in barrel order. Each item
380
+ carries:
381
+
382
+ | Field | Meaning |
383
+ |-------|---------|
384
+ | `name`, `importFrom` | The export and the specifier to import it from (`publicAlias`) |
385
+ | `kind` | `component` (rendered UI), `pattern` (rendered UI declared under `patterns/`), `controller` (a behavioral API: a hook, controller class, context provider or other callable), `value`, `type`, or `unclassified` when its type does not tell (`any`, `unknown`, generic) or its declaration does not read |
386
+ | `apiRole` | The classification scenario `covers` and `exercises` use: `ui`, `behavioral`, `value`, `undetermined`, `unresolved`, or `type` |
387
+ | `behavior` | For a behavioral API: `hook` (`use…`), `provider` (a `controllers/` export that renders its context), `class` (constructible) or `function` |
388
+ | `file`, `line`, `column`, `sourceUri` | The declaration; `sourceUri` reads it as a resource |
389
+ | `guides` | Markdown guides beside the declaration, as resources |
390
+ | `scenarios` | Registered scenarios whose `covers` or `exercises` name it; open them with `ads_show_scenario` |
391
+ | `signature` | From the type checker: `props` (each prop's name, type and whether it is optional) for UI, `callable` (parameters, return type, overload count) for a behavioral API, `type` (the printed type) for a value or type; at most 40 members (`truncated`) and 240 characters per type |
392
+ | `owner` | For an export of a public owner: `status` (`analyzed`, `failed`, `blocked` or `not-analyzed`; `ads check` reports why), `file`, and when analyzed the `profiles` its constructions read (each with its `kind` and, per choice, the `options`, the `default` and the options the owner `selected`) and the `rows` it exposes to a parent grid's `alignRows` |
393
+ | `unit`, `drafts` | The editable unit that owns the file and that unit's open drafts |
394
+
395
+ - `query` matches the name, kind, behavior form or declaration file
396
+ (case-insensitive).
397
+ - `kind` selects `components`, `patterns` or `controllers` (hooks, controllers,
398
+ context providers and other behavioral APIs).
399
+ - `limit` (1–50, default 20) and `offset` page the list. `nextOffset` names the
400
+ next page while one remains.
401
+
402
+ A barrel that does not parse is an error that names `ads check`.
403
+
404
+ #### The token inventory
405
+
406
+ `ads_tokens` (and the full `ads://project/tokens`) lists every token that the
407
+ role sheets (`tokens/**/<role>.ads.css`) declare, by group, role and name:
408
+
409
+ | Field | Meaning |
410
+ |-------|---------|
411
+ | `name`, `role`, `group`, `shape` | The custom property, its role (the sheet's name), its group (the sheet's folder below `tokens/`, `null` directly in it) and the role's value shape |
412
+ | `value` | Its `:root` value: the default theme and brand (`null` when only a theme, brand or condition declares it) |
413
+ | `values` | Its value in every unconditional context that defines it (`:root`, each theme, each brand, each brand under each theme), then each condition (`@media …`) that changes it there; each with `context` (the selector label diagnostics use), `theme`, `brand` and `condition` |
414
+ | `declarations` | Every authored declaration: `file`, `line`, `column`, `selector`, `condition` and `value` |
415
+ | `profiles` | Profiles whose fields, choices or spatial clauses bind it |
416
+ | `owners` | Owners whose constructions reach it, directly or through another token's value |
417
+ | `type` | Its value-shape status (the `token-type` rule): `valid`, `invalid`, `text-resize` or `unresolved` (with the contexts and reason), or `role-unknown` |
418
+
419
+ Each page also carries `groups` (every group with its token count and roles:
420
+ what `group` and `role` filter by), `contexts` (every context with its colour
421
+ `scheme`) and `reach` (`complete: false` with a reason when an owner was not
422
+ analyzed, so `owners` can miss it). `query` matches the name, role or group;
423
+ `role` and `group` filter exactly; `limit` and `offset` page as for the
424
+ catalogue. Design inputs that do not read are an error that names the first
425
+ finding of `ads check`.
426
+
427
+ `ads://project/tokens/dtcg` (and `dtcgUri` on every page) is the whole inventory
428
+ as a [W3C Design Tokens (DTCG)](https://www.designtokens.org/tr/2025.10/format/)
429
+ document, the same document that `ads tokens --format dtcg` prints.
430
+
431
+ The [guide](GUIDE.md#inspecting-tokens-and-the-public-api) describes its
432
+ structure. In addition:
433
+
434
+ - `$type` is `color`, `dimension`, `number`, `fontWeight`, `fontFamily`,
435
+ `duration`, `cubicBezier`, `shadow` or `gradient`. A shape that no single DTCG
436
+ type describes, such as a length or multiplier, has none.
437
+ - A `$value` that its type expresses is the DTCG object: a colour's
438
+ `colorSpace`, `components`, `alpha` and sRGB `hex`; a dimension's or
439
+ duration's `value` and `unit`; a font family list; a cubic Bézier.
440
+ - A mode key combines brand and theme (`dark`, `iris`, `iris/dark`) and
441
+ condition (`dark @media (prefers-contrast: more)`). `cssModes` lists the modes
442
+ whose value stays CSS text.
443
+
444
+ #### Results when nothing is available
445
+
446
+ If the project does not provide a feature's inputs, the result says so
447
+ explicitly instead of returning an empty match. It carries
448
+ `status: "not-available"`, a `reason` code and a human-readable `message`. It is
449
+ never a pass:
450
+
451
+ | Tool or resource | Result when nothing is available |
452
+ |------------------|----------------------------------|
453
+ | `ads_catalog`, `ads://project/catalog` | `{ status, reason: "no-catalog", message, total: 0, items: [], resourceUri }` when the design system has no public barrel or it exports nothing |
454
+ | `ads_tokens`, `ads://project/tokens` | `{ status, reason: "no-token-inventory", message, total: 0, tokens: [], groups: [], contexts: [], reach, resourceUri, dtcgUri }` when the design system has no token sheet |
455
+ | `ads://project/tokens/dtcg` | `{ status, reason: "no-token-inventory", message }` in the same case |
456
+ | `ads_scenarios`, `ads://project/scenarios` | The registry with `reason: "no-scenarios"` added while no scenario is registered |
457
+ | `ads_show_scenario` | `status: "not-available"`, `reason: "no-scenarios"` |
458
+ | `ads_capture` | `{ ok: false, status, reason: "no-scenarios", message, captures: [] }` |
459
+ | `ads_behaviors` | The page carries `reason: "no-behavior-checks"` and a `message` while no behavior check is registered ([registered checks and their status](BEHAVIORS.md#registered-checks-and-their-status)) |
460
+ | `ads_status` | `catalog` and `tokens` name their `tool` and `resourceUri` (and `dtcgUri`); `scenarios` carries `no-scenarios` when the registry is empty |
461
+
462
+ Gate stages use the same shape, with two more reasons: `none-selected` (entries
463
+ are registered, but the change set or draft reaches none of them) and
464
+ `turned-off` (the project's configuration turns the stage off). See
465
+ [Guarded editing](#guarded-editing) and
466
+ [Complete and affected validation](#complete-and-affected-validation).
467
+
468
+ #### Scenarios and check findings
469
+
470
+ `ads_scenarios` takes `query`, `kind` (`brand`, `tokens`, `components`,
471
+ `patterns` or `mocks`), `offset` and `limit`. The full
472
+ `ads://project/scenarios` resource carries the same registry. Pass exact
473
+ returned IDs to `ads_show_scenario`.
474
+
475
+ A result includes `group` only when the folder structure supplies one. `group`
476
+ is computed output, never scenario metadata; `ads_scenarios({query: "Forms"})`
477
+ searches the derived label. A folder group is navigation, not an edit owner:
478
+ `ads_units` and source resources keep the actual nested paths. See the
423
479
  [architecture](ARCHITECTURE.md#folder-derived-navigation).
424
480
 
425
- Listings have bounded pages and opaque cursors. The source catalogue exposes
426
- public exports from `components/`, `patterns/` and `controllers/`; it does not execute TSX to
427
- guess component props. Read the exported API and owning guide. An export name
428
- alone does not prove that a preview renders that particular element.
429
-
430
- `ads://project/status`, `/build`, `/tokens`, `/tokens/dtcg`, `/icons`, `/catalog`, `/scenarios` and
431
- `/checks` carry project JSON detail. Behavior discovery, execution outcomes and investigation
432
- details are paged; their resource reads use the same bounds as their tools. Allowed project documentation/source and skill files are separate
433
- resources. No arbitrary filesystem reader is exposed. Prefer bounded tools for
434
- large catalogues; explicit resource reads can enter model context and a client
435
- may truncate large payloads.
436
-
437
- `ads://project/checks` returns errors under `diagnostics` (they fail the
438
- check) and review items under `advisories` with `severity: "review"` (they never block),
439
- then informational limits with `severity: "info"`; `summary` counts errors and review
440
- items. Every finding id has one class (error, review or info), and no configuration changes
441
- it.
442
-
443
- Atomic composition review items (`atomic-composition-review`) carry related source
444
- declarations and `guidanceUri: "ads://guides/atomic-styles"`. Read that guide for causes
445
- and component-level fixes. The full guide lives in every ADS skill as
446
- `references/atomic-styles.md` for standalone clients; MCP serves the packaged
447
- [skill-local reference](../skills/ads-designer/references/atomic-styles.md).
448
- Guarded mutation results preserve review items without rejecting valid source; failed
449
- registered rendered checks remain blocking.
450
- Review items can carry a `composition` source path, a statically reached DOM `target`
451
- and `writingModeDependent`. Unresolved paths appear as bounded
452
- `atomic-composition-limit` advisories with `severity: "info"`; neither an
453
- informational limit nor a traced target proves a rendered failure or success.
454
- Bounded check results put review items before informational limits; the checks
455
- resource retains complete results.
456
-
457
- `property-registration` is a blocking architecture diagnostic for invalid or
458
- conflicting typed CSS registrations. Keep registrations in their runtime owner
459
- or beside their real token definitions; `base.css` remains a closed reset contract.
460
- Use `@reqvire-org/ads/linaria` in both product and preview extraction so each
461
- registration survives intact in the App's CSS resources. Descriptor literals are
462
- metadata; normal styling still uses tokens. Read `ads://guides/atomic-styles` for
463
- ownership, valid initial values, browser checks and examples.
481
+ `ads://project/checks` returns errors under `diagnostics` (they fail the check),
482
+ review items under `advisories` with `severity: "review"` (they never block),
483
+ then informational notes with `severity: "info"`. `summary` counts errors and
484
+ review items. Every finding id has one class, and no configuration changes it.
485
+
486
+ - An owner-analysis error carries the fine-grained ADS error `code`, its mistake
487
+ `group`, a `repair` hint and the authored position.
488
+ - What owner analysis cannot prove is a nonblocking `owner-analysis-review` item.
489
+ - An owner blocked by another owner's failure is an `owner-analysis-blocked` info
490
+ note.
491
+
492
+ See the [guide](GUIDE.md#design-system-source) for the rules that `ads check` runs.
464
493
 
465
494
  ### Screenshots and candidate comparison
466
495
 
467
- `ads_capture({scenario:"<discovered ID>",target?,theme?,brand?,viewport?,guides?})` renders current
468
- source in the real sandboxed App using project-local Playwright/browser. `theme` is a declared
469
- theme name (default: the first). Previews receive the theme in host context: `theme` carries
470
- the MCP Apps light/dark scheme and `adsTheme` the project theme name; hosts that send only
471
- `theme` get the first declared theme with that scheme. `brand` is a declared brand name
472
- (default: the first) for projects that declare brands; previews receive it as `adsBrand` and
473
- set `data-brand` on the document. It returns
474
- PNG resource URIs and revision/settings metadata. The default is the full widget
475
- viewport; optional `captureTargets` metadata names an element within the scenario.
476
- Token/component/pattern/composition scenarios share this path. The tool adds no
477
- project-specific renderer or fixture assumptions.
478
-
479
- Optional `guides` selects any of `bounds`, `tracks` (columns/rows), `gaps`
480
- (including gutters), `padding`, `margins`, and `mini` (mini-unit squares), for
481
- example `guides:["tracks","padding","mini"]`. The existing showcase overlay
482
- draws those layers on all visible elements; omitted or `[]` produces a clean
483
- image. Components, patterns, compositions and `tokens/Layout` support guides.
484
- The selection is stored in `settings.guides`, applies to both comparison images,
485
- and does not create extra capture slots. Named targets keep their existing crop.
486
-
487
- `ads_capture` with a draft `id` and exact `revision` captures current and candidate
488
- under matching settings without acceptance checks; acceptance and its dry run take
489
- no screenshots. A newly added scenario has a candidate with an explicit absent
490
- current baseline.
491
-
492
- `ads://project/captures` lists current/candidate slots, metadata and freshness.
493
- Read returned `ads://captures/{key}/{slot}` resources as `image/png` binary content;
494
- the resource template is advertised without per-revision catalogue growth.
495
- Subscriptions receive `resources/updated` for replacement/removal. Successful
496
- standalone capture replaces current and clears any prior candidate. Applying
497
- matching proposed source promotes candidate; explicit `ads_capture_clear` can
498
- discard the candidate or both slots. There is no previous/history/TTL. Source
499
- changes mark stale images; deleted targets are collected. Capture data is bounded
500
- generated output under `.ds/captures/`, not a source mutation or behavior pass.
501
-
502
- Optional `mcp.capture` selects browser, Chromium channel and runner timeout.
503
- ADS installs no browser dependencies. See `ads://guides/captures` or the portable
504
- [capture reference](../skills/ads-designer/references/captures.md) for setup, precise
505
- limits, target declarations and the guarded review workflow.
496
+ `ads_capture({scenario:"<discovered ID>",target?,theme?,brand?,state?,viewport?,guides?})`
497
+ renders current source in the real sandboxed App, with ADS's own Playwright. It
498
+ returns PNG resource URIs and revision/settings metadata. Every scenario kind
499
+ uses this path; the tool adds no project-specific renderer or fixture
500
+ assumptions.
501
+
502
+ - The default image is the full widget viewport. `target` names an element that
503
+ optional `captureTargets` metadata declares within the scenario.
504
+ - `theme` is a declared theme name (default: the first). Previews receive it in
505
+ host context: `theme` carries the MCP Apps light/dark scheme and `adsTheme` the
506
+ project theme name. A host that sends only `theme` gets the first declared
507
+ theme with that scheme.
508
+ - `brand` is a declared brand name (default: the first), for a project that
509
+ declares brands. Previews receive it as `adsBrand` and set `data-brand` on the
510
+ document.
511
+ - `state` is one of the scenario's named states (default: the first). The image
512
+ is taken once the page shows that state, and `settings.state` records it. Like
513
+ the theme, it replaces the same slot and creates no extra one.
514
+ - `guides` selects any of `bounds`, `tracks` (columns/rows), `gaps` (including
515
+ gutters), `padding`, `margins` and `mini` (mini-unit squares in the unit of the
516
+ spatial profile that the owner's grids follow), for example
517
+ `guides:["tracks","padding","mini"]`. The showcase overlay draws those layers
518
+ on all visible elements. Omitted or `[]` gives a clean image. Components,
519
+ patterns and mocks support guides. The selection is stored in
520
+ `settings.guides` and applies to both comparison images. It creates no extra
521
+ capture slots, and a named target keeps its crop.
522
+
523
+ **Draft captures.** Pass `draft` and its exact `revision` beside the normal
524
+ selection. The call captures Accepted/current and Draft/candidate PNG resources
525
+ under matching settings.
526
+
527
+ - It borrows warm preview hosts and does not close them.
528
+ - It runs no acceptance checks. Acceptance and its dry run take no screenshots.
529
+ - A new scenario has a candidate with an explicit absent current baseline.
530
+ - A source change during the capture prevents replacement of the slots.
531
+ - The result is explicitly `previewOnly`: not behavioral or acceptance evidence.
532
+ Read the returned PNG resources before visual acceptance.
533
+
534
+ **Slots and resources.** `ads://project/captures` lists the current/candidate
535
+ slots, their metadata and freshness. Read the returned
536
+ `ads://captures/{key}/{slot}` resources as `image/png` binary content; the
537
+ resource template is advertised without per-revision catalogue growth.
538
+ Subscriptions receive `resources/updated` on replacement or removal.
539
+
540
+ - A successful standalone capture replaces current and clears any prior
541
+ candidate. Applying matching proposed source promotes the candidate.
542
+ `ads_capture_clear` discards the candidate or both slots.
543
+ - There is no previous slot, history or TTL. A source change marks the images
544
+ stale, and captures of deleted targets are collected.
545
+ - Capture data is bounded generated output under `.ds/captures/`, not a source
546
+ mutation or a behavior pass.
547
+
548
+ Optional `mcp.capture` selects the browser, the Chromium channel and the runner
549
+ timeout. ADS ships Playwright and installs its browser on first need; it
550
+ installs no operating-system packages. See `ads://guides/captures` or the
551
+ portable [capture reference](../skills/ads-designer/references/captures.md) for
552
+ setup, precise limits, target declarations and the guarded review workflow.
506
553
 
507
554
  ### Behavioral verification
508
555
 
509
- Read `ads://guides/behaviors` or the [behavior guide](BEHAVIORS.md) for the contract
510
- and runner schema. `ads_behaviors({ "unit": "components/MessageScroller" })`
511
- pages an owner's checks by default; select `section: "subjects"`, `"guarantees"`,
512
- `"demonstrations"` or `"profiles"` for other details. Without a unit it lists owner
513
- summaries. Follow `nextCursor` with identical filters. Changed registrations or
514
- evidence revisions invalidate discovery cursors. `ads verify . --unit components/MessageScroller --check prepend-anchor`
515
- runs those registered cases from the CLI; over MCP the gates run them. The names here are examples, never built-in cases.
516
-
517
- `covers` describes rendered UI; optional `exercises` describes public behavioral
518
- APIs used through reachable scenario code. Neither metadata nor README prose is
519
- passing evidence. Verification runs trusted project commands from configured
520
- profiles, without installing dependencies. It is available in read-only source
521
- mode too and is annotated as executing commands/writing generated evidence.
522
- Missing/skipped cases, unavailable runners and changed inputs cannot pass.
523
- Results and subscribed resource notifications are available through
524
- `ads://project/behaviors`; explicitly re-read evidence when notifications are absent.
525
-
526
- During an `ads_validate` run, `ads_status.validation.progress` (stage `behavior`)
527
- exposes completed/active/pending checks, timings and the profile's whole-run
528
- timeout. Draft acceptance uses `ads_status.mutations.progress`. Requested MCP progress notifications also report
529
- runner activity. Profiles accept an explicit `timeoutMs` from 100 to 900000 ms
530
- (up to fifteen minutes), with a 60000 ms default. This covers the complete
531
- selected suite; each runner's individual test/hook timeouts are separate.
532
- Playwright uses the project's workers and filters selected case
533
- tags; ADS does not silently change timeout or parallelism policy. Timeout results
534
- retain partial outcomes and reports under `.ds/verification/`, but incomplete
535
- runs still block application and cannot establish passing guarantees. See the
536
- [runner and evidence details](BEHAVIORS.md#register-execution-profiles).
537
-
538
- A complete ordinary failed run preserves the actual mixed case outcomes; a
539
- single failed assertion does not turn the other checks into failures. Overall
540
- verification and guarded application still fail. Suite errors, unexplained exits,
541
- missing results and interrupted reports cannot certify passing checks.
542
-
543
- Verification and guarded-edit replies are summaries: counts, acceptance, at most
544
- three failure previews and `resultId`, within 4096 UTF-8 JSON bytes. Use:
556
+ The [behavior guide](BEHAVIORS.md) (also `ads://guides/behaviors`) describes
557
+ registered checks, the runner schema, the built-in profiles and their `timeoutMs`
558
+ budgets, run outcomes and evidence.
559
+
560
+ **Discovery.** Without a unit, `ads_behaviors` lists owner summaries.
561
+ `ads_behaviors({ "unit": "components/MessageScroller" })` pages that owner's
562
+ checks; select `section: "subjects"`, `"guarantees"`, `"demonstrations"` or
563
+ `"profiles"` for other details. Follow `nextCursor` with identical filters; a
564
+ changed registration or evidence revision invalidates discovery cursors.
565
+ `ads verify . --unit components/MessageScroller --check prepend-anchor` runs
566
+ those registered cases from the CLI; over MCP the gates run them. The names here
567
+ are examples, never built-in cases.
568
+
569
+ **Evidence.** `covers` describes rendered UI. Optional `exercises` describes
570
+ public behavioral APIs used through reachable scenario code. Neither metadata
571
+ nor README prose is passing evidence.
572
+
573
+ - ADS runs the registered checks itself, without installing project
574
+ dependencies. Verification is also available in read-only source mode, and is
575
+ annotated as executing commands and writing generated evidence.
576
+ - Missing or skipped cases, unavailable runners, changed inputs, suite errors,
577
+ unexplained exits and interrupted or timed-out runs cannot pass
578
+ ([outcomes of a run](BEHAVIORS.md#outcomes-of-a-run)).
579
+ - A profile describes the execution environment, not a proof that every
580
+ possible interaction or lifecycle is tested.
581
+ - Results and subscribed resource notifications are available through
582
+ `ads://project/behaviors`. Without notifications, read the evidence again.
583
+ - `ads_status.validation.progress` (stage `behavior`) reports an `ads_validate`
584
+ run, and `ads_status.mutations.progress` a draft acceptance. Requested MCP
585
+ progress notifications also report runner activity.
586
+ - `ads_accept` runs the draft owners' own registered checks
587
+ ([Acceptance gates](#acceptance-gates)). `ads_validate` runs the registered
588
+ checks that depend on a changed shared controller.
589
+
590
+ **Summaries and the repair plan.** Verification and guarded-edit replies are
591
+ summaries within 4096 UTF-8 JSON bytes: counts, acceptance, at most three
592
+ failure previews and `resultId`. A failed summary also carries `repair`: the
593
+ failed rules grouped by mistake, in the order to fix them (earlier groups are
594
+ often the cause of later ones). Each step names its group, `fixOrder`, who fixes
595
+ it (`fixedBy`: `author`, `rerun`, `ads-defect` or `environment`), up to two rules
596
+ with their failure count and repair hint, the guides to `read`, and `groupGuide`,
597
+ the group's page. `omitted` counts the groups and rules past those limits; the
598
+ complete list is in the `diagnostics` section. Under the byte budget the repair
599
+ hints go first, then the plan. Fix the first step, then check again.
600
+
601
+ `ads://guides/errors` is the error catalogue: how to read an error, then every
602
+ mistake group in fix order. Each group has a page, `ads://guides/errors/<group>`
603
+ (also a resource template), with its strategy and every rule it holds: the rule
604
+ statement, the repair hint and the guides that explain it. Every guide that an
605
+ error links to is a served resource.
606
+
607
+ Form-state and autocomplete findings link to `ads://guides/forms` (validation
608
+ timing, error announcement, autofill, the form-field bridge and its root
609
+ states). Recipe errors link to `ads://guides/recipes`, the recipe language for
610
+ authors and agents (profiles and slots, parts, choices and `select`, `when`
611
+ states, layouts, layers, measured values and paints, text layout, assets in
612
+ recipes, and what is rejected and why); each section has an anchor such as
613
+ `ads://guides/recipes#when`.
614
+
615
+ **Saved results.**
545
616
 
546
617
  ```js
547
618
  ads_results({resultId: "<returned ID>", section: "outcomes", status: "not_passed"})
548
619
  ads_results({resultId: "<returned ID>", section: "outcomes", status: "not_passed", cursor: "<nextCursor>"})
549
620
  ```
550
621
 
551
- Each listing defaults to 10 rows, allows at most 20 and stays within 8192 JSON
552
- bytes. A byte-limited page can contain fewer than `limit` rows; follow
553
- `nextCursor` with the same result ID, section and status. Other sections are
554
- `checks`, `advisories`, `warnings`, `changes`, `captures`, `acceptance`,
555
- `investigation` and `selection`. No page reruns validation. Rows marked
556
- `detailTruncated` can be read exactly with `recordIndex`, `offset` and `chars`
557
- (maximum 2000 UTF-16 characters); follow `nextOffset`. Read full logs only for the
558
- relevant record. JSON also remains available through `ads://results/<resultId>`;
559
- use matching query parameters for pages or ranges. `ads://project/results` lists
560
- the latest IDs. Status embeds summaries, not complete runner reports. Saved
561
- outcomes are completion-time evidence; compare revisions with `ads_behaviors`
562
- before claiming current source passed.
563
-
564
- Execution snapshots are immutable by run/result ID. They survive other clients'
565
- runs, reconnects and ADS restarts within `mcp.resultRetention`: by default 50 runs,
566
- seven days and 256 MiB of result/evidence data. Each snapshot is limited to 8 MiB;
567
- oversized reports retain a summary with an explicit warning. Storage failure keeps
568
- latest details in memory with a warning. `ADS_RESULT_EXPIRED` identifies recently
569
- collected results; the expiry tombstone index is bounded to 4096 IDs. Older unknown
570
- IDs are unavailable. These limits do not change actual acceptance/applied state.
571
-
572
- For diagnosis, take one outcome's exact `unit`, `check` and `runId` and call
573
- `ads_investigate`. The exact run ID selects retained evidence from that execution. Without a check, it
574
- lists available investigations with paging. An exact check returns a summary
575
- within 4096 JSON bytes; `section: "details"`, `"requests"`, `"browserErrors"` or `"artifacts"`
576
- returns detail pages with the same 10/20-row and 8192-byte limits. Truncated records support
577
- `recordIndex`/`offset`/`chars` with the exact `runId`; artifact URIs are read
578
- separately. It never reruns checks, including rejected candidates.
579
- `ads://project/investigations` lists available bundles; returned resource URIs expose the bundle and available registered
580
- artifacts. Exact input/observed preview revisions, source/failing step, startup
581
- viewport and failed requests separate evidence from a suspected cause.
582
- The summary's `details.failure.category` distinguishes architecture, build,
583
- transport, runner and assertion boundaries; `acceptance` names established and unverified scope.
584
- Latest-check listings are convenience indexes; exact retained run IDs and their registered artifacts remain resource-accessible. Read the portable
585
- [evidence guide](../skills/ads-designer/references/evidence.md) for collection
586
- limits and project-controlled trace/screenshot recording.
587
-
588
- Browser profiles start an isolated showcase and verify its sandboxed App using
589
- the selected candidate's sources. StrictMode profiles need a project React
590
- development harness. Profiles describe the execution environment, not a proof
591
- that every possible interaction or lifecycle has been tested.
592
-
593
- Unless `acceptance.behavior` is false, guarded mutations also run the draft owners'
594
- own registered behavior checks; `ads_validate` runs the contracts that depend on a
595
- changed shared controller. Failures reject the candidate before writing real source. Projects without contracts retain their existing checks.
622
+ - A listing has 10 rows by default and 20 at most, within 8192 JSON bytes. A
623
+ byte-limited page can hold fewer than `limit` rows. Follow `nextCursor` with
624
+ the same result ID, section and status.
625
+ - The other sections are `checks`, `diagnostics`, `advisories`, `warnings`,
626
+ `changes`, `captures`, `acceptance`, `investigation`, `selection` and `deletion`
627
+ (an `ads_delete` run's targets, source changes and output files, each row
628
+ marked by `entry`).
629
+ - A row marked `detailTruncated` can be read exactly with `recordIndex`, `offset`
630
+ and `chars` (maximum 2000 UTF-16 characters); follow `nextOffset`. Read full
631
+ logs only for the relevant record.
632
+ - No page reruns validation. The same JSON is available through
633
+ `ads://results/<resultId>`, with matching query parameters for pages or
634
+ ranges. `ads://project/results` lists the latest IDs. Status embeds summaries,
635
+ not complete runner reports.
636
+ - Saved outcomes are completion-time evidence. Compare revisions with
637
+ `ads_behaviors` before you claim that current source passed.
638
+
639
+ Each run is an immutable snapshot of at most 8 MiB, addressed by its run/result
640
+ ID; an oversized report keeps a summary with an explicit warning. Snapshots
641
+ survive other clients' runs, reconnects and ADS restarts within
642
+ `mcp.resultRetention`: by default 50 runs, seven days and 256 MiB of
643
+ result/evidence data. `ADS_RESULT_EXPIRED` identifies a recently collected
644
+ result. The expiry tombstone index holds 4096 IDs; older unknown IDs are
645
+ unavailable. If storage fails, the latest details stay in memory, with a
646
+ warning. These limits do not change the actual acceptance or applied state.
647
+
648
+ **Investigation.** Take one outcome's exact `unit`, `check` and `runId` and call
649
+ `ads_investigate`. The run ID selects the retained evidence of that execution.
650
+
651
+ - Without a check, it lists the available investigations with paging. An exact
652
+ check returns a summary within 4096 JSON bytes. `section: "details"`,
653
+ `"requests"`, `"browserErrors"` or `"artifacts"` returns detail pages with the
654
+ same 10/20-row and 8192-byte limits.
655
+ - A truncated record supports `recordIndex`/`offset`/`chars` with the exact
656
+ `runId`. Read artifact URIs separately.
657
+ - It never reruns checks, including those of rejected candidates.
658
+ - `ads://project/investigations` lists the available bundles; the returned
659
+ resource URIs expose the bundle and its registered artifacts. Latest-check
660
+ listings are convenience indexes: exact retained run IDs and their artifacts
661
+ stay resource-accessible.
662
+ - The exact input/observed preview revisions, the source and failing step, the
663
+ startup viewport and the failed requests separate evidence from a suspected
664
+ cause.
665
+ - The summary's `details.failure.category` distinguishes architecture, build,
666
+ transport, runner and assertion boundaries; `acceptance` names the established
667
+ and unverified scope ([contents](BEHAVIORS.md#investigate-a-failure)).
668
+
669
+ Read the portable [evidence guide](../skills/ads-designer/references/evidence.md)
670
+ for collection limits and project-controlled trace/screenshot recording.
596
671
 
597
672
  ## Guarded editing
598
673
 
599
- Enable editing in the MCP launch arguments and reconnect:
674
+ Editing is disabled by default. To enable it, add `--mutations` to the MCP launch
675
+ arguments and reconnect:
600
676
 
601
677
  ```sh
602
678
  npx -y @reqvire-org/ads mcp --mutations
603
679
  ```
604
680
 
605
- `ads_status.mutations` reports the mode (`route: "draft"`), checks, limits and latest
606
- result. Editing is disabled by default. Every change goes through a draft of one or
607
- more owners: `ads_create_draft`, edits through its files or `ads_update_draft`
608
- (contents, or a Git unified diff as `patch`/`patchFile`), `ads_show_draft`, then
609
- `ads_accept`. An owner is in at most one open draft; genuinely coupled owners share
610
- one draft.
611
-
612
- Find the owner with `ads_units({ "query": "Button" })`, then request its file
613
- manifest with `ads_units({ "unit": "components/core/Button" })`. IDs derive from
614
- the flat/directory colocation convention. A component or pattern unit includes
615
- its implementation and colocated scenarios, fixtures, tests and guides. A
616
- composition owns its scenario and mock inputs. Imported components and patterns
617
- remain separate owners. `tokens` is one foundation unit covering token definitions,
618
- themes and `catalog.ads.json`, whose coverage spans shared source files.
619
- Preview IDs remain separate: several token previews belong to `tokens`.
620
- Design tokens and token previews belong to the shared Data foundation. Component
621
- contracts do not register token namespaces or independent value sheets. Read
622
- `ads://guides/tokens` for state mappings, color roles, the grid, contrast/rhythm/overlap
623
- reviews and the token export; `ads://guides/branding` for brand artwork, web icons,
624
- committed targets, glyph sets and `@ads-lockup`/`lockup-construction` fixes;
625
- `ads://guides/accessibility` for the WCAG 2.2 AA
626
- guards (`token-contrast`, `component-contrast`, `a11y-*`) and the practice no tool can check;
627
- `ads://guides/layout` for `@ads-layout` constructions, regions, panels and the
628
- `grid-construction`/`grid-definition` fixes.
629
-
630
- No owner edits a shared entry. The styles entry is generated from the canonical
631
- token sheets in foundation order: adding `tokens/fonts.css` adds its import, and
632
- removing the sheet removes it. The public barrel and review entry are generated
633
- from the owners' `<Owner>.ads.exports.ts` files. A draft that edits a generated entry
634
- is refused.
635
-
636
- An owner declares its own style permissions in its contract: `styles.writes`
637
- (properties a file writes at runtime), `styles.inline` (files with inline geometry
638
- styles) and, for a component, `customization` (non-state `--ds-*` variables others may
639
- set). A JSX-to-imperative geometry change edits the source and the contract together
640
- in the owner's draft. Unused inline permissions and properties never written fail
641
- `stale-style-boundary` on the contract, so a permission cannot be declared before its
642
- implementation. `ds.config.json` holds no per-owner entries; general policy and
643
- compiler changes use the `configuration` unit.
644
-
645
- A directory owner's runtime entry (`index` or a source file matching its directory
646
- name) keeps ownership stable without its `<Dir>.ads.scenario.tsx`.
647
- A redundant standalone scenario can be removed when other registered scenarios
648
- still declare and actually render its public exports. Coverage requirements remain
649
- in force; there is no metadata waiver for uncovered UI.
650
- An empty `.gitkeep` may be deleted alongside new source in the selected owner
651
- beneath that marker. Other hidden files and nonempty markers remain blocked.
652
-
653
- The same discovery covers the rest of the project ADS:
681
+ `ads_status.mutations` reports the mode (`route: "draft"`, and
682
+ `delete: "ads_delete"` for guarded deletion), the checks, the limits and the
683
+ latest result.
684
+
685
+ Every change goes through a draft of one or more owners: `ads_create_draft`,
686
+ edits through its files or `ads_update_draft` (contents, or a Git unified diff
687
+ as `patch`/`patchFile`), `ads_show_draft`, then `ads_accept`. An owner is in at
688
+ most one open draft; coupled owners share one draft. The one exception is
689
+ removal of declared targets: `ads_delete` (see
690
+ [Guarded deletion](#guarded-deletion)) deletes them without a visible draft,
691
+ through the same candidate checks and publication fences.
692
+
693
+ MCP enforces this editing path. Direct filesystem edits stay subject to the
694
+ project's normal lint/build gates. The mutation tools are marked as model-only
695
+ writes in Apps metadata. Both ADS browser hosts reject App-initiated calls to
696
+ them; other hosts must respect that visibility.
697
+
698
+ **Units.** Find the owner with `ads_units({ "query": "Button" })`, then request
699
+ its file manifest with `ads_units({ "unit": "components/core/Button" })`. IDs
700
+ derive from the flat/directory colocation convention.
654
701
 
655
702
  | Unit | Scope |
656
703
  |------|-------|
657
- | `review/<Owner>` | Development-only frames, demo controls, local checks and their review exports file |
658
- | `foundation` | Shared ADS entry styles and root helpers |
704
+ | A component or pattern | Its implementation and colocated scenarios, fixtures, tests and guides. Imported components and patterns stay separate owners. |
705
+ | A mock | Its scenario and mock inputs |
706
+ | `tokens` | The role token sheets under `tokens/` |
707
+ | `foundation` | The public barrel `index.ts`, `foundation.ads.ts` and other root files of the design system |
659
708
  | `documentation` | ADS/project guides, shared credits and license notices, and `licenses/` text collections |
660
- | `assets/brand`, `assets/fonts`, other `assets/*` groups | Original SVG, image, font and other asset files |
709
+ | `assets/<group>` | An asset group's declarations and their SVG drawings, images and fonts |
661
710
  | `configuration` | `ds.config.json`, package/TypeScript/bundler/lint configuration, registered ADS guard modules, compiler/check entrypoints and their static local dependencies |
662
711
 
712
+ - A new public owner's draft that also exports it from the barrel spans its own
713
+ unit and `foundation`.
714
+ - A directory owner's runtime entry (`index`, or a source file that matches its
715
+ directory name) keeps ownership stable.
716
+ - ADS deletes an empty `.gitkeep` itself when accepted source is added beneath
717
+ it. A patch may also delete it with that source. Other hidden files and
718
+ nonempty markers stay blocked.
719
+ - Ordinary source and asset files of the selected unit are editable. Generated
720
+ outputs, dependency directories, Git metadata and symlink/hardlink targets are
721
+ excluded.
722
+ - Source-level suppression directives are rejected outside `configuration`;
723
+ express reviewed exceptions in project settings.
724
+ - Configuration ownership follows the project's registrations, and does not
725
+ absorb a component because a guard or compiler reads it. A guard registration,
726
+ its implementation, helpers and check script can change together.
727
+ Unregistered application code and installed dependencies keep their owners.
728
+
663
729
  The `documentation` manifest includes `filePolicy` for paths that can be created
664
730
  before they exist. One documentation patch can add `CREDITS.md`,
665
- `licenses/example.txt` and the required README links together. Conventional root
666
- `LICENSE`/`LICENCE`, `NOTICE`, `COPYING`, `COPYRIGHT` and `CREDITS` notices accept
667
- `.md`, `.txt`, or extensionless names, with optional `-`/`_` qualifiers. Shared
668
- `licenses/` collections may also live under `docs/`, `doc/`, or the configured ADS
669
- root. Their entries use `.md`/`.txt` or conventional extensionless notice names.
670
- Content must be UTF-8 without NUL bytes; Git patches preserve exact text, Unicode,
671
- line endings and final-newline state. Code/configuration, hidden/generated paths
672
- and peer-owned files retain their boundaries. A component's colocated notice stays
673
- in that component unit. Shared notices are listed as readable MCP resources, while
674
- workflow guide discovery omits provenance inventories. No asset unit is needed.
675
-
676
- Configuration ownership follows the project's registrations. It does not absorb
677
- components merely because a guard or compiler reads them. Guard registration,
678
- implementation, helpers and the associated check script can change together.
679
- Unregistered application code and installed dependencies retain their own owners.
680
-
681
- Read relevant source with `ads_read_file({ "path": "design-system/components/core/Button.tsx" })`.
682
- Reads are bounded to 12,000 UTF-16 characters. `offset`, `nextOffset`, `startLine`
683
- and `totalChars` support focused follow-up reads. The digest describes the whole
684
- file; the agent does not need to read or send the whole file.
685
-
686
- Create the owner's draft, edit it, review it and accept it:
731
+ `licenses/example.txt` and the required README links together.
732
+
733
+ - Conventional root `LICENSE`/`LICENCE`, `NOTICE`, `COPYING`, `COPYRIGHT` and
734
+ `CREDITS` notices accept `.md`, `.txt` or extensionless names, with optional
735
+ `-`/`_` qualifiers.
736
+ - Shared `licenses/` collections can also live under `docs/`, `doc/` or the
737
+ configured ADS root. Their entries use `.md`/`.txt` or conventional
738
+ extensionless notice names.
739
+ - Content must be UTF-8 without NUL bytes. Git patches preserve exact text,
740
+ Unicode, line endings and final-newline state.
741
+ - Code/configuration, hidden/generated paths and peer-owned files keep their
742
+ boundaries. A component's colocated notice stays in that component unit. No
743
+ asset unit is necessary.
744
+ - Shared notices are listed as readable MCP resources. Workflow guide discovery
745
+ omits provenance inventories.
746
+
747
+ **Reading.** Read relevant source with
748
+ `ads_read_file({ "path": "design-system/components/core/Button.tsx" })`. A read
749
+ is bounded to 12,000 UTF-16 characters. `offset`, `nextOffset`, `startLine` and
750
+ `totalChars` support focused follow-up reads. The digest describes the whole
751
+ file, so the agent need not read or send the whole file. A binary file returns
752
+ the digest and byte count without encoded content.
753
+
754
+ **Drafting.** Create the owner's draft:
687
755
 
688
756
  ```json
689
757
  { "units": ["components/core/Button"] }
690
758
  ```
691
759
 
692
- `ads_create_draft` returns the draft `id`, `revision` and its folder; edit the `.ads`
693
- files there with local tools, or send the change through `ads_update_draft`:
760
+ `ads_create_draft` returns the draft `id`, `revision` and its folder. Edit the
761
+ `.ads` files there with local tools, or send the change through
762
+ `ads_update_draft`:
694
763
 
695
764
  ```json
696
765
  {
@@ -700,60 +769,91 @@ files there with local tools, or send the change through `ads_update_draft`:
700
769
  }
701
770
  ```
702
771
 
703
- Use ordinary `diff --git`, `--- a/path`, `+++ b/path` and `@@ -old,count +new,count @@`
704
- text hunks with project-relative paths. Context and removed lines must match the
705
- draft's current proposal at the stated positions; ADS uses no fuzzy matching.
706
- `/dev/null` identifies a created or deleted file, and a new path joins its declared
707
- owner. Rename metadata and permission changes are unsupported; owned
708
- deletion/creation can move a file within its unit. For a large diff, write it to a
709
- regular file in `.ds/patches/` and pass `patchFile` instead of `patch`. Binary
710
- images, fonts and other assets go through `changes` with `encoding:"base64"`; binary
711
- `ads_read_file` results return the digest and byte count without encoded content.
712
-
713
- Review the draft with `ads_show_draft`, then check it with
714
- `ads_accept({id, revision, dryRun:true})`. This runs the normal candidate gates,
715
- including affected registered behavior checks and the acceptance accessibility audit,
716
- in the draft's workspace through ADS's managed compiler; it writes no live source and
717
- does not persist passing evidence for live inputs. Read the summary, then use its
718
- `resultId` with `ads_results` for failing `outcomes`, `diagnostics` or named pipeline
719
- `checks`; update the draft and repeat. Accept with `ads_accept({id, revision})`; the
720
- gates run again, reusing the dry run's results for the same revision.
721
-
722
- Token sample bindings are ordinary data in `tokens/catalog.ads.json`: change them in a
723
- `tokens` draft with explicit `token`, CSS `property` and `probe` entries. ADS never guesses
724
- a property from the token name, and reports entries for undefined tokens
725
- (`foundation-catalog`).
726
-
727
- For a coupled rename or upgrade, create one draft for all its owners (2–64 owners, at
728
- most 256 distinct files) and accept it once. Core checks, configured project
729
- commands, all affected behavior checks and the accessibility audit run against the
730
- final candidate. Dry runs, failures, conflicts and cancellation write no source; a
731
- publication failure rolls back prior writes. This coordinates owned source changes,
732
- not dependency installation or arbitrary application files. Install changed
772
+ - Use ordinary `diff --git`, `--- a/path`, `+++ b/path` and
773
+ `@@ -old,count +new,count @@` text hunks with project-relative paths.
774
+ - Context and removed lines must match the draft's current proposal at the
775
+ stated positions. ADS uses no fuzzy matching.
776
+ - `/dev/null` identifies a created or deleted file. A new path joins its
777
+ declared owner.
778
+ - Rename metadata and permission changes are unsupported. An owned deletion and
779
+ creation can move a file within its unit.
780
+ - For a large diff, write it to a regular file in `.ds/patches/` and pass
781
+ `patchFile` instead of `patch`.
782
+ - Binary images, fonts and other assets go through `changes` with
783
+ `encoding:"base64"`.
784
+ - A small change needs only its hunk. A complete new component's draft includes
785
+ its implementation, scenario and fixture, so that the check runs against a
786
+ complete candidate.
787
+ - A new unit uses a new `components/`, `patterns/`, `controllers/` or
788
+ `mocks/` owner ID that follows the same colocation convention.
789
+ - A draft cannot include a peer unit or capture existing peers beneath a new
790
+ directory owner. A configuration change cannot bundle unrelated component
791
+ edits.
792
+
793
+ For a coupled rename or upgrade, create one draft for all its owners (2–64
794
+ owners, at most 256 distinct files) and accept it once. Core checks, configured
795
+ project commands, all affected behavior checks and the accessibility audit run
796
+ against the final candidate. A draft coordinates owned source changes, not
797
+ dependency installation or arbitrary application files. Install changed
733
798
  dependencies before verification; candidates use the project's installed
734
799
  `node_modules`.
735
800
 
736
- Resolve ownership diagnostics by preserving the required capability in its proper
737
- layer. Demo-only sizing, borders and framing belong in a development-only review
738
- helper; a component API addition needs a runtime use case. Measured imperative
739
- geometry uses exact `styles.writes` properties in the owner's contract. After
740
- moving JSX inline geometry to imperative writes, update the contract in the same
741
- draft and check the final state. After the gates pass, verify the behavior in a
801
+ Limits: one `ads_update_draft` call takes at most 32 `changes`, each with at most
802
+ 256 KiB of content. An inline `patch` is limited to 256 KiB, a `patchFile` to
803
+ 16 MiB, and each original or resulting file to 16 MiB. Validation snapshots copy
804
+ relevant inputs only, are bounded to 100,000 files and 2 GiB, and keep the
805
+ original project's Git tracking checks.
806
+
807
+ **Review and acceptance.** Review the draft with `ads_show_draft`, then check it
808
+ with `ads_accept({id, revision, dryRun:true})`. The dry run runs the normal
809
+ candidate gates in the draft's workspace, through ADS's managed compiler. It
810
+ writes no live source and persists no passing evidence for live inputs. Read the
811
+ summary, then use its `resultId` with `ads_results` for failing `outcomes`,
812
+ `diagnostics` or named pipeline `checks`. Update the draft and repeat. Accept
813
+ with `ads_accept({id, revision})`. The gates run again; only the render audit of
814
+ the same candidate is remembered from the dry run.
815
+
816
+ To resolve a diagnostic, fix the reported source, in the order of the repair
817
+ plan. A failed acceptance requires a correction to its owner or configuration,
818
+ never a direct-write bypass. After the gates pass, verify the behavior in a
742
819
  browser.
743
820
 
744
- A small change needs only its hunk. A complete new component's draft includes its
745
- implementation, its `<Owner>.ads.exports.ts`, scenario and fixture, so coverage is
746
- checked against a complete candidate; the barrel is regenerated from the exports
747
- file. New units use a new `components/`, `patterns/`, `controllers/`, `review/` or
748
- `composition/` owner ID following the same colocation convention. A draft cannot
749
- include a peer unit or capture existing peers beneath a new directory owner, and a
750
- failed acceptance requires correcting its owner or configuration, never a direct-write
751
- bypass.
752
-
753
- Acceptance reconstructs complete candidate files and validates a temporary project
754
- copy with `ads check`. The project's `acceptance` settings select its scripts and
755
- whether the owners' behavior tests and render audit run; `ads validate` adds
756
- `validation.scripts`:
821
+ ### Acceptance gates
822
+
823
+ Acceptance reconstructs complete candidate files and validates a temporary
824
+ project copy. It first regenerates any present, out-of-date generated source
825
+ file in the candidate (`palette.generated.ts` after a colour-token or context
826
+ change), so the accepted and published change includes it. Then it runs, in
827
+ order:
828
+
829
+ 1. `ads check`. The mandatory native ADS checks run on every write.
830
+ 2. `acceptance.scripts`.
831
+ 3. The draft owners' own registered behavior checks (`acceptance.behavior`,
832
+ default true).
833
+ 4. The render audit of the draft owners' own UI scenarios (`acceptance.audit`,
834
+ default true): each scenario in every declared brand and theme, with the
835
+ non-text contrast, overflow and text checks. Any `a11y-axe`,
836
+ `a11y-non-text-contrast`, text-pass (`a11y-text-scale`,
837
+ `a11y-text-spacing-override`, `a11y-reflow`) or `layout-overflow` error rejects
838
+ acceptance. [Complete and affected validation](#complete-and-affected-validation)
839
+ gives the other audit failures.
840
+
841
+ A behavior or audit stage with nothing to run is listed in the result's `checks`
842
+ as `skipped: true` with `status: "not-available"`, a `reason` and a `message`.
843
+ The reason is `turned-off` (`acceptance.behavior` or `acceptance.audit` is
844
+ `false`), `none-selected` (checks or scenarios are registered, but none belongs
845
+ to the draft's owners), or `no-behavior-checks` or `no-scenarios` (nothing is
846
+ registered). Such a stage is never reported as passed or listed as established,
847
+ and it does not block acceptance.
848
+
849
+ Dry runs, failures, conflicts and cancellation write no source. Neither do a
850
+ malformed or mismatched patch, an edit during checking, a baseline conflict or
851
+ changed project inputs. ADS rejects a check that rewrites source. A failure
852
+ keeps the draft and returns execution evidence. A publication failure rolls
853
+ back the entries already written.
854
+
855
+ The project's `acceptance` settings select its scripts and whether the owners'
856
+ behavior tests and render audit run. `ads validate` adds `validation.scripts`:
757
857
 
758
858
  ```json
759
859
  {
@@ -763,75 +863,254 @@ whether the owners' behavior tests and render audit run; `ads validate` adds
763
863
  }
764
864
  ```
765
865
 
766
- Both script lists default to empty; script names are never inferred, and each
767
- script is listed once. `acceptance.behavior` and `acceptance.audit` default to true.
768
- An unknown field is a configuration error naming it.
769
- Managed previews are built for required behavior checks or requested captures,
770
- sharing one production graph. Core-only acceptance does not build the whole
771
- preview graph. Keep standalone preview builds in normal project builds; avoid
772
- selecting the same build twice.
773
-
774
- Every listed script must exist. An empty list still runs mandatory ADS guards; registered tests run only when the policy enables them. Scripts use the project's npm/Bun runner; installed dependencies are
775
- shared with the validation copy. These are trusted project commands, not an OS
776
- sandbox. An explicit `configuration` patch can change project commands, registered
777
- rules and reviewed exceptions; validation runs the proposed configuration and
778
- scripts. Mandatory native ADS checks still run on every write.
779
- Configuration changes cannot bundle unrelated component edits. Checks that
780
- rewrite source are rejected. Each registered project script defaults to a
781
- 60-second limit. `mcp.mutationCheckTimeoutMs` sets its explicit budget
782
- (100–300000 ms); it does not change mandatory gates or behavior-profile budgets.
783
- Timeout diagnostics identify the command, configured budget and elapsed time.
784
- The diagnostic explorer allows up to 15 minutes for the complete request.
785
-
786
- Ordinary source and asset files owned by the selected unit are editable. Generated
787
- outputs, dependency directories, Git metadata and symlink/hardlink targets are
788
- excluded. Change original branding artwork; ADS validates generation in the
789
- candidate and refreshes derived icons after application. Source-level suppression
790
- directives are rejected outside `configuration`; express reviewed exceptions in
791
- project settings. The project continues to own its architecture and extensions.
792
-
793
- One unit patch is limited to 32 entries and 256 KiB inline, or 16 MiB through
794
- `patchFile`. Each original/resulting file is limited to 16 MiB. Validation snapshots
795
- copy relevant inputs only, are bounded to 100,000 files and 2 GiB, and retain the
796
- original project's Git tracking checks. Malformed or mismatched patches, changed project inputs and
797
- cancelled checks leave source unchanged. Write failures roll back applied entries.
798
-
799
- Acceptance refreshes discovery, generated branding and previews. Configuration
800
- changes restart the shared managed compiler in place; the MCP connection stays
801
- open. Failed preview builds report diagnostics and stale output. Inspect current
802
- build status and real UI; source checks do not establish visual correctness.
803
-
804
- The mutation tool is marked as a model-only write in Apps metadata. Both browser
805
- hosts reject App-initiated calls to it; other hosts must respect that visibility.
806
- MCP enforces this editing path. Direct filesystem edits remain subject to the
807
- project's normal lint/build gates.
866
+ - Both script lists default to empty. Script names are never inferred, each
867
+ script is listed once, and every listed script must exist. An unknown field is
868
+ a configuration error that names it.
869
+ - An empty list still runs the mandatory ADS guards. Registered tests run only
870
+ when the policy enables them.
871
+ - Scripts use the project's npm/Bun runner and the installed dependencies. They
872
+ are trusted project commands, not an OS sandbox.
873
+ - An explicit `configuration` patch can change project commands, registered
874
+ rules and reviewed exceptions; validation runs the proposed configuration and
875
+ scripts.
876
+ - Each script has a 60-second limit by default; `mcp.mutationCheckTimeoutMs`
877
+ sets an explicit budget (100–300000 ms). It changes neither the mandatory
878
+ gates nor the behavior-profile budgets. A timeout diagnostic identifies the
879
+ command, the budget and the elapsed time. The diagnostic explorer allows up to
880
+ 15 minutes for the complete request.
881
+ - Managed previews are built for required behavior checks or requested
882
+ captures, and share one production graph; core-only acceptance builds no
883
+ preview graph. Keep standalone preview builds in the normal project builds.
884
+
885
+ Acceptance refreshes discovery and previews. A configuration change restarts the
886
+ shared managed compiler in place; the MCP connection stays open. A failed
887
+ preview build reports diagnostics and stale output. Inspect the current build
888
+ status and the real UI: source checks do not establish visual correctness.
889
+
890
+ ### Accessibility approval
891
+
892
+ A draft that adds or changes an `accessibility` declaration (a text-entry
893
+ control identified other than by a 3:1 boundary) is published only after a
894
+ person approves it. Removing one needs no approval, and ADS records nobody's
895
+ name.
896
+
897
+ - A dry run asks nobody. Its summary's `approval` is
898
+ `{ required: true, pending, url }`: the pending declarations (owner file,
899
+ part, selector, boundary kind, reason) and the URL of the showcase approval
900
+ view.
901
+ - `ads_accept` runs the usual gates first and asks only about a draft that
902
+ passed them all. A draft that fails a gate is rejected with that finding, and
903
+ nobody is asked.
904
+ - ADS asks through elicitation where the client supports it: a server request on
905
+ 2025-era connections, an input-required result on `2026-07-28` ones (the client
906
+ retries with the user's answer).
907
+ - After approval, the same candidate against unchanged accepted source is
908
+ published without another run of `acceptance.scripts` and the behavior tests.
909
+ Their results list `remembered: true`; the render audit is remembered as for a
910
+ dry run. If anything changed in between, every gate runs again.
911
+ - If the user declines or cancels, or the client cannot ask, the call returns
912
+ the tool error `code: "accessibility-approval-required"`, with
913
+ `pendingDeclarations` and `approvalUrl`. Nothing is published, and a retry
914
+ refuses again.
915
+ - The approval view at `approvalUrl`
916
+ (`<showcaseUrl>?draft=<id>&view=approval&revision=<revision>`) is always
917
+ available. It lists each pending declaration and what ADS verifies. Its
918
+ "Approve and accept" accepts that exact revision through the same gates. It is
919
+ a person's step that the showcase host serves, not an MCP tool. A link to
920
+ another revision approves nothing.
921
+
922
+ The server instructions and the tool description tell the model to explain the
923
+ declarations, show the link and wait. The model must never answer an elicitation
924
+ for the user, never open or automate the link and never retry past a refusal. It
925
+ confirms with `ads_drafts` after the user approves. Neither route proves that a
926
+ human is present; both are deliberate guardrails beside normal code review.
927
+
928
+ ### Emitting from MCP
929
+
930
+ A published acceptance also emits the design system into its output folder
931
+ (`compile.outDir`), unless `compile.emitOnAccept` is `false`. ADS writes the
932
+ folder after it publishes the source: from the candidate's checked emitted tree
933
+ when the published sources are that tree's revision (nothing is emitted again),
934
+ otherwise by an emission of the published source at the analysis revision that
935
+ the acceptance checked (no owner is analyzed again). The
936
+ [guide](GUIDE.md#emitting-the-design-system) describes the output.
937
+
938
+ Acceptance never depends on the emit: `ok` and `applied` describe the
939
+ acceptance, and the summary's `emit` field describes the emit:
940
+
941
+ - `{ "kind": "emitted", "revision", "outDir", "written", "unchanged", "removed",
942
+ "files", "analyzed", "serialized", "from" }`: file counts of the write.
943
+ `outDir` is project-relative. `analyzed` counts the owners that the emit itself
944
+ analyzed. The stored result's `files` lists the written and removed paths; the
945
+ summary only counts them. `from` is `candidate-tree` (the candidate's checked
946
+ tree was written; its counts are that tree's emission) or `published-source`
947
+ (the published revision was emitted).
948
+ - `{ "kind": "skipped", "reason": "emit-on-accept-disabled" }`.
949
+ - `{ "kind": "failed", "failure": { "kind", … }, "repair" }`. The failure kind
950
+ is an `ads emit` failure kind, or `exception` with a `message`. Examples:
951
+ `output-modified` for hand edits, which acceptance never overwrites;
952
+ `output-busy` while another process writes the folder; `write-failed` with the
953
+ writer's `message`; `cancelled` when the request was cancelled after
954
+ publication (the folder then holds the previous emission, never a partial
955
+ one). `repair` names the `ads emit` run that brings the folder to the published
956
+ revision.
957
+
958
+ A failed emit is never reported as emitted and is not retried. The source stays
959
+ published, and `ads check` reports the folder `generated-stale` until the repair
960
+ runs. A dry run, a rejection, a cancellation before publication and a stale
961
+ revision emit nothing and have no `emit` field.
962
+
963
+ `ads_emit({ force?: boolean })` emits the current accepted source on demand, for
964
+ example after direct source edits or to retry a failed emit. It exists on
965
+ mutation-enabled servers only and is annotated as a destructive, idempotent,
966
+ model-only write.
967
+
968
+ - `force: true` overwrites hand edits and foreign files in the output folder.
969
+ - It reports progress (`emit-capture`, `emit-check`, `emit-write`) and honors
970
+ cancellation like other long tools. A cancelled emit leaves the previous
971
+ output whole.
972
+ - Its structured result is the `ads emit --json` value: `{ "ok": true,
973
+ "revision", "outDir", "written", "unchanged", "removed", "contract", "owners",
974
+ "forced", "from" }`, or `{ "ok": false, "failure": { "kind", … } }` marked as a
975
+ tool error. `from` is `emission` for `ads_emit`. `contract` is the written
976
+ `ads-contract.json`, its `platform` section included (see
977
+ [the guide](GUIDE.md#emitting-the-design-system)).
978
+ - Emits in one server never refuse each other. One requested while another runs
979
+ for the same folder (an acceptance's, or `ads_emit`) waits as the folder's
980
+ single follow-up, which emits the source that is current when it starts.
981
+
982
+ ### Guarded deletion
983
+
984
+ `ads_delete` removes declared design targets without a visible draft that the
985
+ caller creates, reviews and accepts. It exists on mutation-enabled servers only,
986
+ and is annotated `readOnlyHint: false`, `destructiveHint: true`,
987
+ `idempotentHint: false`, model-only in Apps metadata. Targets are declared
988
+ identities, never file paths:
989
+
990
+ ```json
991
+ {
992
+ "targets": [{ "kind": "component", "id": "Actions/UnusedButton" }],
993
+ "revision": "<ads_status.sourceRevision>",
994
+ "dryRun": false
995
+ }
996
+ ```
997
+
998
+ | `kind` | `id` | Removes |
999
+ | --- | --- | --- |
1000
+ | `token` | its custom-property name (`--radius-spare`) | every declaration in the token sheets: `:root`, each theme, brand and condition, and its `@property` registration; rules left empty go, a sheet left without tokens is deleted |
1001
+ | `profile` | its globally unique name | its `profile()` export statement; neighbouring profiles in the file keep their bytes, a file left without profiles is deleted |
1002
+ | `component`, `pattern` | the qualified owner path (`Actions/Button`; `components/Actions/Button` is accepted too) | every file the owner's unit owns (implementation, private files, scenarios, fixtures, `.ads.behavior.ts` declarations), the folders it leaves empty and the public barrel's imports and re-exports of those files; shared dependencies (other owners, assets, tokens) stay |
1003
+ | `asset`, `glyph-set` | the declared name (an asset alias is refused with its canonical name) | the declaration; an asset's drawings unless another surviving asset draws them |
1004
+ | `font` | the declared family (case-insensitive) | the `font()` declaration and its face files unless another family uses them; license notices beside them stay |
1005
+
1006
+ `revision` is the accepted-source revision at which the targets were inspected:
1007
+ `ads_status.sourceRevision`. A request names 1 to 64 targets, each identity once.
1008
+
1009
+ ADS checks the deletion before it writes anything:
1010
+
1011
+ 1. The source revision must be the requested one (`delete-stale-revision`, with
1012
+ `deletion.currentRevision`, otherwise).
1013
+ 2. ADS analyzes one capture of the project inputs. Every target must resolve to
1014
+ its declarations and files (`delete-target-unknown`, `delete-target-invalid`
1015
+ or `delete-target-duplicate` otherwise). Partial removals are derived from the
1016
+ captured trees. Every planned file carries the digest of the bytes it was
1017
+ derived from; a file that changed under the plan refuses it
1018
+ (`delete-revision-changed`).
1019
+ 3. A surviving reference in the design inputs refuses it (`delete-referenced`,
1020
+ naming the referring file, line and owner `unit`): token aliases in the
1021
+ sheets, profiles that compose or bind a deleted profile or token, glyph sets
1022
+ that list a deleted asset, and the foundation's document profiles and
1023
+ font-family tokens that name a deleted font first. References between targets
1024
+ of the same request do not block it. Dependents are never deleted
1025
+ automatically.
1026
+ 4. An open draft that holds a deleted owner, or a file that the deletion
1027
+ changes, refuses it (`delete-draft-conflict`, naming the draft). Accept or
1028
+ drop it first.
1029
+ 5. The candidate is forked and gated exactly as an acceptance: `ads check` over
1030
+ every captured alternative, `acceptance.scripts`, and the deleted owners'
1031
+ behavior checks and render audit. Owner recipes, asset bindings, imports and
1032
+ scenarios that still use a deleted identity fail the check; each finding
1033
+ carries the `unit` that owns its file. The candidate must hold exactly the
1034
+ planned bytes, and a source change during the checks refuses publication
1035
+ (`delete-stale-revision`). A cancellation, a rejection and a dry run publish
1036
+ nothing.
1037
+
1038
+ On success, ADS publishes the source first. Then it writes the output folder
1039
+ from the candidate's checked tree, exactly as after an acceptance
1040
+ ([Emitting from MCP](#emitting-from-mcp)): dependents are emitted again, the
1041
+ generated barrel, CSS and contract are updated, the deleted targets' obsolete
1042
+ output is removed, and output still used elsewhere stays. An emit failure is
1043
+ reported in `emit`, never as a completed emission. ADS stops at the emitted
1044
+ files.
1045
+
1046
+ The reply is an execution summary (`ads_results` reads its `checks`,
1047
+ `diagnostics` and `changes`) with a `deletion` report: `revision` (requested),
1048
+ `dryRun`, `deleted`, `targets` (each `kind`, `id`, owner `unit`, and the counts of
1049
+ files it `removes` and `edits`), `source` (each planned path and `delete` or
1050
+ `edit`), `checkedRevision` (the candidate checked), `emittedRevision`, `output`
1051
+ (`outDir`, written and removed counts, and the first removed files) and `scope`.
1052
+ The stored result keeps every declaration site and output path. `dryRun: true`
1053
+ plans and checks everything, and reports blocking references and the planned
1054
+ source changes without publishing source or output.
1055
+
1056
+ Dependency protection covers the captured ADS graph only (the design system, its
1057
+ scenarios and declared inputs). It cannot prove that separately maintained
1058
+ applications, or consumers of a published package, have stopped importing a
1059
+ removed public export. The reply's `scope` says so.
808
1060
 
809
1061
  ## Experimental Apps
810
1062
 
811
- `ads_scenarios` discovers path-derived IDs for token, component, pattern and
812
- composition scenarios. `ads_catalog` links public exports to their coverage.
813
- `covers` can include public children reached through the rendered parent's
814
- returned JSX with known props/defaults. Public class helpers require verified
815
- runtime Linaria provenance; `exercises` alone grants no class permission. The
816
- `ads://guides/scenarios` resource and each skill's
817
- [local scenario reference](../skills/ads-designer/references/scenarios.md) describe
818
- the bounded checks and diagnostics.
819
- `ads_show_scenario({id})` selects an independently mountable entry with its own
820
- fixtures, or a token or brand view. The tool contains no project
821
- token templates or copied values.
822
-
823
- Both tools default to `waitFor: "verified"`. The showcase requests
824
- `waitFor: "compiled"` to browse live feedback or the last verified graph while
825
- checks run. That mode can return `build.current: false`; it is visual feedback,
826
- not successful verification evidence. It does not alter capture, behavior or
827
- guarded-edit acceptance.
828
- Registered browser verification URLs and `openPreviewScenario` explicitly select
829
- `waitFor=verified`; captures also retain verified readiness.
1063
+ `ads_scenarios` discovers path-derived IDs for registered scenarios.
1064
+ `ads_show_scenario({id, state?})` selects an independently mountable entry with
1065
+ its own fixtures, or an ADS view. `state` names one of the scenario's states: the
1066
+ result carries it, and the App shows the scenario in that state.
1067
+
1068
+ Invoke an App's entry **tool** to ask a capable host to render it. Reading its
1069
+ HTML resource is a data read, not evidence of a rendered view. When Apps are
1070
+ unavailable, the tool result provides a bounded descriptor and the runtime's
1071
+ showcase URL. The same MCP process serves that website, unless it was started
1072
+ with `--no-showcase`. See the
1073
+ [MCP Apps specification](https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/2026-01-26/apps.mdx).
1074
+
1075
+ ADS views are explorer entries that ADS generates from the previewed revision.
1076
+ `ads://project/explorer` lists them after the scenarios, with their own `kind`
1077
+ and `view`:
1078
+
1079
+ - `{ id: "foundation", kind: "foundation", view: "foundation" }`: each spatial
1080
+ profile's grid, from the preview tree's `ads-preview-facts.json`.
1081
+ - `{ id: "tokens", kind: "tokens", view: "tokens" }`: every token of the
1082
+ inventory by group and role, from the same file's `tokens` and the tree's
1083
+ `ads-preview-tokens.css`.
1084
+ - `{ id: "profiles", kind: "profiles", view: "profiles" }`: every profile by
1085
+ kind, with what it builds on, the profile that states each field and the
1086
+ tokens the fields read, from the same file's `profiles`.
1087
+ - `{ id: "assets", kind: "assets", view: "assets" }`: every declared asset by
1088
+ group and every glyph set, drawn from the authored SVG, from the same file's
1089
+ `assets`.
1090
+
1091
+ The explorer's `categories` list the tokens view as the token category, with
1092
+ `count`, the number of tokens that the view lists: the previewed revision's
1093
+ facts, read without walking the project's inputs, or, before a revision is
1094
+ previewed, the inventory's size without owner analysis (on a design input that
1095
+ does not read, `count: 0` with `countError`).
1096
+
1097
+ ADS views are not registered scenarios: `ads_scenarios`,
1098
+ `ads://project/scenarios` and scenario coverage do not list them, while the
1099
+ build status and the preview manifest report their previews like a scenario's.
1100
+ The tool contains no project token templates or copied values.
1101
+
1102
+ Both tools default to `waitFor: "verified"`. Registered browser verification
1103
+ URLs and `openPreviewScenario` select `waitFor=verified` explicitly, and captures
1104
+ also keep verified readiness. The showcase requests `waitFor: "compiled"` to
1105
+ browse live feedback or the last verified graph while checks run. That mode can
1106
+ return `build.current: false`. It is visual feedback, not successful
1107
+ verification evidence, and it does not alter capture, behavior or guarded-edit
1108
+ acceptance.
830
1109
 
831
1110
  ### One App, shared resources
832
1111
 
833
1112
  With the resource compiler enabled, both tools link **`ui://ads/preview`**. Their
834
- small structured result identifies the selection and current build:
1113
+ small structured result identifies the selection and the current build:
835
1114
 
836
1115
  ```json
837
1116
  {
@@ -843,8 +1122,8 @@ small structured result identifies the selection and current build:
843
1122
  }
844
1123
  ```
845
1124
 
846
- The example omits catalogue/build detail. Executable bytes are not embedded in
847
- the tool result. `resources/read` supplies these registered resources:
1125
+ The example omits catalogue/build detail. The tool result embeds no executable
1126
+ bytes. `resources/read` supplies these registered resources:
848
1127
 
849
1128
  | URI | Content and owner |
850
1129
  |-----|-------------------|
@@ -853,319 +1132,358 @@ the tool result. `resources/read` supplies these registered resources:
853
1132
  | `ads://preview/live` | Current-source compiled feedback while checks are pending; explicitly unverified |
854
1133
  | `ads://preview/manifest{?from}` / `ads://preview/live{?from}` | Internal UI updates relative to a known SHA-256 graph revision |
855
1134
  | `ads://assets/<hash>.js` | Compiled shared runtime or scenario module |
856
- | `ads://assets/<hash>.css` | Extracted foundation or scenario styles |
1135
+ | `ads://assets/<hash>.css` | Compiled foundation or scenario styles |
857
1136
  | `ads://assets/<hash>.woff2` (and other asset types) | Binary font/image/worker assets |
858
1137
  | `ui://ads/previews/<id>` | Same App seeded with that scenario for direct resource access |
859
1138
 
860
- The manifest has `schemaVersion: 1`, `framework`, `revision`, watcher `session`,
861
- `scenarios: [{id,title,kind,module}]`, and an `assets` map. Each asset records its
862
- MIME type, byte size, SHA-256 digest, kind, static imports, dynamic imports, styles
863
- and asset references. URIs are immutable identities; manifests publish atomically
864
- after all files exist. The server validates the graph and served bytes. Binary
865
- resources use MCP `blob` content rather than text encoding.
866
-
867
- The App retains known manifests and uses the verified `manifestRevision` from
868
- `ads://project/build` (or a current live/tool selection) to reuse one without
869
- another graph download. When a read is needed, `?from=<revision>` returns a
870
- version-1 envelope: `full` with `manifest`, `unchanged` with current metadata,
871
- or `delta` with changed/removed asset and scenario records and, when changed,
872
- scenario order. Updates name their exact `baseRevision`; the App reconstructs
873
- and validates the graph without changing its cached base. Missing/pruned history
874
- or a delta larger than the full response returns `full`. Omitting `from` still
875
- returns the original manifest shape. Live queries retain the same current-source
876
- and session checks. These exchanges stay inside the preview resource bridge;
877
- tool replies continue to carry selection/status and graph references, not graphs.
878
-
879
- The loader runs **inside the App iframe**. It reads through the host's resource
880
- bridge, verifies bytes, materializes Blob URLs and native ESM import maps, loads
881
- CSS/fonts, then invokes the selected module's `mount(container)`. It caches
882
- unchanged resources and shared runtime modules within that App. Dynamic imports
883
- load their own dependency closure when invoked. Bun's self-contained worker
884
- output remains a separate asset; workers must be stopped by their owner.
885
- Preview workers are compiled as self-contained classic scripts: Chrome rejects
886
- module Blob worker fetches in opaque origins, so the resource compiler adapts those
887
- self-contained preview constructors to classic workers. Production worker mode
888
- is untouched. The managed compiler rejects worker output with unresolved module
889
- imports; previews require self-contained worker output.
890
-
891
- The built-in showcase keeps this App alive across selections. It unmounts the
892
- previous scenario before mounting the next; scenario state resets while runtime
893
- and unchanged styles/fonts are reused. External hosts may create a fresh App for
894
- each tool call. Each fresh App loads independently through the same contract.
895
- There is no special local direct-artifact rendering path.
896
-
897
- `ads://project/checks` returns blocking `diagnostics` separately from nonblocking
898
- `advisories`.
899
- For example, `pointer-capture-review` reports capture without a locally visible
900
- capture-loss handler. Cleanup can be delegated; inspect it and test cancellation,
901
- capture loss and teardown. A local handler suppresses that advisory but does not
902
- prove correct behavior. Accepted mutations also return bounded advisories.
1139
+ **Manifest.** The manifest has `schemaVersion: 1`, `framework`, `revision`,
1140
+ watcher `session`, `scenarios: [{id,title,kind,module}]` and an `assets` map.
1141
+ Each asset records its MIME type, byte size, SHA-256 digest, kind, static
1142
+ imports, dynamic imports, styles and asset references. URIs are immutable
1143
+ identities. A manifest is published atomically after all its files exist. The
1144
+ server validates the graph and the served bytes. Binary resources use MCP `blob`
1145
+ content, not text encoding.
1146
+
1147
+ **Updates.** The App keeps known manifests. It uses the verified
1148
+ `manifestRevision` from `ads://project/build` (or a current live/tool selection)
1149
+ to reuse one without another graph download. When a read is needed,
1150
+ `?from=<revision>` returns a version-1 envelope: `full` with `manifest`,
1151
+ `unchanged` with current metadata, or `delta` with changed/removed asset and
1152
+ scenario records and, when changed, the scenario order.
1153
+
1154
+ - An update names its exact `baseRevision`. The App reconstructs and validates
1155
+ the graph without changing its cached base.
1156
+ - Missing or pruned history, or a delta larger than the full response, returns
1157
+ `full`. Without `from`, the read returns the plain manifest shape.
1158
+ - Live queries keep the same current-source and session checks.
1159
+ - These exchanges stay inside the preview resource bridge. Tool replies carry
1160
+ selection/status and graph references, not graphs.
1161
+
1162
+ **Loader.** The loader runs **inside the App iframe**. It reads through the
1163
+ host's resource bridge, verifies bytes, materializes Blob URLs and native ESM
1164
+ import maps, loads CSS/fonts, then invokes the selected module's
1165
+ `mount(container)`. It caches unchanged resources and shared runtime modules
1166
+ within that App; a dynamic import loads its own dependency closure when invoked.
1167
+ The built-in showcase keeps the App alive across selections: it unmounts the
1168
+ previous scenario, resets scenario state and reuses the runtime and unchanged
1169
+ styles/fonts. An external host can create a fresh App for each tool call, which
1170
+ loads through the same contract. There is no special local direct-artifact
1171
+ rendering path ([architecture](ARCHITECTURE.md#the-preview-resource-graph)).
1172
+
1173
+ **Workers.** Bun's self-contained worker output is a separate asset, and the
1174
+ owner of a worker must stop it. Chrome rejects module Blob worker fetches in
1175
+ opaque origins, so preview worker constructors are adapted to classic workers.
1176
+ The managed compiler rejects worker output with unresolved module imports.
1177
+ Production worker mode is untouched.
903
1178
 
904
1179
  ### Host boundary and compatibility
905
1180
 
906
- The showcase's packaged shell retains its own minimal CSS and navigation. It
1181
+ The showcase's packaged shell has its own minimal CSS and navigation, and
907
1182
  contains no project runtime, fonts, styles or rendered UI. A second loopback
908
- origin hosts the sandbox proxy; that proxy creates an opaque inner App iframe
1183
+ origin hosts the sandbox proxy. That proxy creates an opaque inner App iframe
909
1184
  and forwards the standard Apps bridge messages. The diagnostic explorer follows
910
- the same sandbox model. Only the App materializes and executes project resources.
911
-
912
- Both ADS hosts allow native form validation and submission events through all
913
- iframe layers. Client-side forms use their intended `submit` handlers and
914
- `preventDefault()`. CSP `form-action 'none'` blocks native action requests;
915
- `allow-forms` grants neither host DOM access nor top-level navigation. External
916
- hosts choose their own permissions. See the portable
1185
+ the same sandbox model. Only the App materializes and executes project
1186
+ resources.
1187
+
1188
+ **Forms and fragment links.** Both ADS hosts allow native form validation and
1189
+ submission events through all iframe layers, so client-side forms use their
1190
+ intended `submit` handlers and `preventDefault()`. CSP `form-action 'none'`
1191
+ blocks native action requests; `allow-forms` grants neither host DOM access nor
1192
+ top-level navigation. For an inline document without an explicit App base URL,
1193
+ ADS supplies `<base href="about:srcdoc">` and permits the local `about:` base
1194
+ scheme in CSP, so bare and named fragment links keep native in-document
1195
+ navigation and state. An explicit App base stays subject to the declared CSP
1196
+ origins. External hosts choose their own permissions and own this behavior in
1197
+ their loaders; a scenario click handler added for it would conceal a host
1198
+ defect. See the portable
917
1199
  [scenario guide](../skills/ads-designer/references/scenarios.md#forms-inside-apps)
918
1200
  for verification and diagnosis.
919
1201
 
920
- For inline documents without an explicit App base URL, ADS supplies
921
- `<base href="about:srcdoc">` and permits the local `about:` base scheme in CSP.
922
- Bare and named fragment links retain native in-document navigation and state.
923
- Explicit App bases remain subject to declared CSP origins. External hosts own this behavior in
924
- their loaders; adding scenario click handlers would conceal a host defect.
925
-
926
- Hosts need Apps support, server resource forwarding, native ESM/import maps and
927
- a CSP permitting declared `blob:` script/style/font/worker resources. Project
928
- previews declare no network connections. The host may enforce stricter policy;
929
- missing capabilities or blocked loads must show an error. Use the returned local
930
- showcase URL when an external host cannot render the App. Actual local browser
931
- and native-client evidence is recorded in [compatibility notes](#protocols-notifications-and-compatibility).
932
-
933
- Host context selects the project's light/dark theme and conveys available space.
934
- It does not silently replace project tokens/fonts with a host palette.
935
- Compositions retain the complete project skin. App readiness uses standard Apps
936
- initialization plus optional structured `ads-preview` logging (`loading`,
937
- `checking`, `reverting`, `ready`, `error`); no custom parent-window readiness
938
- message is required. `checking` never establishes verified App readiness. The
939
- showcase puts these states in a small monochrome header indicator with tooltip
940
- and expandable details; it keeps status and loading overlays out of the widget
941
- area. Other Apps hosts retain the in-App status fallback.
1202
+ **Host requirements.** A host needs Apps support, server resource forwarding,
1203
+ native ESM/import maps and a CSP that permits the declared `blob:`
1204
+ script/style/font/worker resources.
1205
+
1206
+ - Project previews declare no network connections. The host can enforce a
1207
+ stricter policy. A missing capability or a blocked load must show an error.
1208
+ - If an external host cannot render the App, use the returned local showcase
1209
+ URL. [Protocols, notifications and compatibility](#protocols-notifications-and-compatibility)
1210
+ describes how to verify a host.
1211
+ - Compiled Apps can fetch their bundled `blob:` assets, including Wasm, without
1212
+ external network access. The ADS showcase/explorer permits WebAssembly
1213
+ compilation without JavaScript eval; an external MCP host owns its own CSP
1214
+ capabilities.
1215
+ - Keep renderer/transport adapters and their dependency notices explicit. A
1216
+ working website or build alone does not establish that a binary renderer works
1217
+ in an App.
1218
+
1219
+ **Context and readiness.** Host context selects the project's light/dark theme
1220
+ and conveys available space. It does not replace project tokens/fonts with a
1221
+ host palette; mocks keep the complete project skin. App readiness uses
1222
+ standard Apps initialization plus optional structured `ads-preview` logging
1223
+ (`loading`, `checking`, `reverting`, `ready`, `error`), with no custom
1224
+ parent-window readiness message. `checking` never establishes verified App
1225
+ readiness. The showcase shows these states in its header indicator and keeps
1226
+ status and loading overlays out of the widget area; other Apps hosts use the
1227
+ in-App status fallback.
942
1228
 
943
1229
  ### ADS-owned preview compiler
944
1230
 
945
- ADS runs on Bun 1.4.1+ and compiles previews independently of the application's
946
- bundler. Watched previews use a private incremental module graph; complete
947
- unwatched previews use Bun builds. Configure `framework`; ADS supplies its compiler and
948
- publishes the graph to `.ds/preview/`:
1231
+ ADS compiles previews independently of the application's bundler. Watched
1232
+ previews use a private incremental module graph; complete unwatched previews use
1233
+ Bun builds. Configure `framework` (`"react"` or `"preact"`). ADS supplies its
1234
+ compiler and publishes the graph to `.ds/preview/`:
949
1235
 
950
1236
  ```json
951
1237
  {"framework":"react"}
952
1238
  ```
953
1239
 
954
- Use `preact` for native Preact. The project retains its framework mount in
955
- `showcase/mcp/main.ads.mount.tsx` under the ADS root. It exports
956
- `mountScenario(Scenario,container)` and returns cleanup. ADS selects the framework JSX
957
- runtime, resolves the public alias and extracts Linaria through the shared tag
958
- resolver. Project application build settings stay under project control.
1240
+ Previews compile from the design system's emitted preview tree: the same
1241
+ compiled modules and stylesheets that `ads emit` writes, so no style transform
1242
+ runs in the preview compiler. ADS generates the framework mount (the scenario
1243
+ rendered into the preview root, with cleanup), selects the framework JSX runtime
1244
+ and resolves the public alias. The project supplies no mount file and keeps
1245
+ control of its application build settings.
959
1246
 
960
- Run `ads compile .` for production previews or `ads compile . --watch` for a
1247
+ Run `ads compile .` for production previews, or `ads compile . --watch` for a
961
1248
  continuous compiler. Project setup can call `compilePreviews` from
962
1249
  `@reqvire-org/ads/scenarios/compile`. Projects can integrate `ads check`,
963
- `ads verify` and `ads validate` into their own build/test/CI scripts. ADS acceptance
964
- always runs native gates; `acceptance.scripts`, `acceptance.behavior` and
965
- `acceptance.audit` choose additional scripts and whether the owners' tests and audit run. Oxlint is not an ADS gate dependency.
966
-
967
- MCP warms the prioritized view first, then warms remaining views sequentially
968
- through the retained module graph, without delaying service startup. One compiler job runs
969
- at a time; foreground selections take priority over queued warming. Compiled views stay cached; unchanged warmed navigation
970
- needs no compilation. Linaria transforms and worker bundles reuse source and
971
- transitive dependency hashes. Worker compilation also uses Bun and temporary
972
- worker compiler processes release their heaps after output is captured.
973
-
974
- The build resource includes `warmup: {state,completed,total,failed}` and optional
975
- `manifestRevision`, identifying the integrity-checked verified graph for its
976
- session. The revision alone does not authorize freshness: the selected entry's
977
- `current` and live status still govern rendering. Build changes
978
- notify supported MCP subscribers and Explorer updates automatically. Warming and
979
- acceptance never suspend the interactive compiler. Cached output remains visible
980
- while changed source compiles and validates.
981
-
982
- On first demand or accepted-edit preparation, the adapter builds a shared graph for all registered scenarios.
983
- A selection loads only its static dependency closure. Both validation and compilation
984
- must succeed before verified publication. Watched compilation
985
- can publish a separate live graph first, with `build.live.validated: false` and
986
- `build.current: false`. Live reads require the current source digest and session;
987
- they write no accepted scenario artifact or successful graph cache. The App
988
- renders that feedback while checks run and restores the last verified graph on
989
- failure. Validation and semantic registry inspection run off the visual update
990
- path; new checks start after compilation, and rapid edits coalesce behind one
991
- verification run. Compiled syntax errors
992
- surface immediately. `.ds/preview-cache.json`
993
- reuses successful validation/output only when inputs, compiler/tool code,
994
- lockfile, recorded dependencies and content digests match. A source edit
995
- revalidates the project and incrementally updates the watched module graph. Both
996
- must succeed against unchanged source before verified atomic publication; a failed or
997
- superseded build cannot become current. Files outside the compiled module graph still trigger
998
- validation and a reconciled build. Preview refresh retains the iframe and compatible component state across
999
- source and style edits, including loaded lazy branches. Token/paint audits rerun
1000
- against the new manifest. React Refresh and native Prefresh determine compatible
1001
- component/hook updates. Incompatible exports, compiler changes or added/removed
1002
- source files that require renewing import resolution reopen the
1003
- isolated frame; rejected revisions also use a clean frame when restoring already
1004
- executed old code. Navigation to another scenario mounts that scenario normally. Normal application builds retain their own chunking and optimization.
1005
-
1006
- Accepted MCP edits enqueue preparation even without an open preview. Matching
1007
- validated candidate graphs seed the same project cache; location-dependent,
1008
- missing or incompatible output falls back to the normal compiler. A connected
1009
- showcase opportunistically prefetches changed peers' static resources after the
1010
- selected view paints, using its existing integrity-checked byte cache. This does
1011
- not import modules, attach styles or mount hidden examples; dynamic imports stay
1012
- lazy. Preparation is bounded and never establishes passing evidence by itself.
1013
-
1014
- Graph assets live in the manifest's sibling `assets/` directory. Standalone
1015
- compilation writes `.ds/preview/manifest.json`; managed builders use private
1016
- directories under `.ds/preview/sessions/`. Tiny
1017
- `.ds/scenarios/<id>/index.html` descriptors retain the reporter/registry contract;
1018
- they are not standalone runnable previews. Six previous graph revisions retain
1019
- old assets for in-flight reads; older references expire with a refresh error.
1020
- Watched manifests carry `refresh: {version: 1, epoch}` and module records carry
1021
- `hot: {id, source}`: a session-stable logical ID and SHA-256 of the module before
1022
- resource-address rewriting. Complete manifests omit these optional fields.
1023
- The App rejects malformed/duplicate refresh identities. Watched Apps bound
1024
- retained metadata to 4096 records and materialized resources to 64 MiB; complete
1025
- bundled Apps retain the 20 selected-module-revision limit. At the next mount the
1026
- built-in host recreates the App when a limit is exceeded; external hosts receive
1027
- `ADS_PREVIEW_REOPEN`. In-flight superseded refresh also requires a clean frame. Manifest size is capped at 2 MiB and individual resources
1028
- at 16 MiB; those development transport limits do not alter production bundles.
1250
+ `ads verify` and `ads validate` into their own build/test/CI scripts. Oxlint is
1251
+ not an ADS gate dependency.
1252
+
1253
+ The [architecture](ARCHITECTURE.md#incremental-compilation-and-refresh) gives
1254
+ the design of the compiler. The following subsections state its contract.
1255
+
1256
+ #### Warming and the job queue
1257
+
1258
+ MCP warms the prioritized view first, then the remaining views sequentially
1259
+ through the retained module graph, without a delay to service startup.
1260
+
1261
+ - One compiler job runs at a time. Foreground selections take priority over
1262
+ queued warming. Warming and acceptance never suspend the interactive compiler.
1263
+ - Compiled views stay cached: unchanged warmed navigation needs no compilation,
1264
+ and cached output stays visible while changed source compiles and validates.
1265
+ - Worker bundles reuse source and transitive dependency hashes. Worker
1266
+ compilation also uses Bun, and temporary worker compiler processes release
1267
+ their heaps after the output is captured.
1268
+ - Standard output trees (`dist`, `build`, `target`, `out`, `.next`, `.nuxt`,
1269
+ `.svelte-kit`, `.turbo`) are excluded from preview watches and freshness inputs
1270
+ outside the configured `dsDir`. Nested outputs are pruned before OS watches
1271
+ are allocated. An explicit `dsDir` stays a source even when its name matches a
1272
+ default output name. Use `assets.generatedPaths` for custom outputs; setup need
1273
+ not copy the built-in defaults into each project.
1274
+ - The build resource includes `warmup: {state,completed,total,failed}` and
1275
+ optional `manifestRevision`, which identifies the integrity-checked verified
1276
+ graph for its session. The revision alone does not authorize freshness: the
1277
+ selected entry's `current` and live status still govern rendering. Build
1278
+ changes notify supported MCP subscribers, and Explorer updates automatically.
1279
+
1280
+ #### Verified and live graphs
1281
+
1282
+ On first demand or accepted-edit preparation, the adapter builds a shared graph
1283
+ for all registered scenarios. A selection loads only its static dependency
1284
+ closure.
1285
+
1286
+ - A source edit revalidates the project and incrementally updates the watched
1287
+ module graph. Validation and compilation must both succeed against unchanged
1288
+ source before verified atomic publication. A failed or superseded build cannot
1289
+ become current.
1290
+ - Watched compilation can publish a separate live graph first, with
1291
+ `build.live.validated: false` and `build.current: false`. A live read requires
1292
+ the current source digest and session, and writes no accepted scenario
1293
+ artifact or successful graph cache.
1294
+ - The App renders live feedback while checks run and restores the last verified
1295
+ graph on failure.
1296
+ - Validation and semantic registry inspection run off the visual update path.
1297
+ New checks start after compilation, and rapid edits coalesce behind one
1298
+ verification run. Compiled syntax errors surface immediately.
1299
+ - A file outside the compiled module graph still triggers validation and a
1300
+ reconciled build.
1301
+ - `.ds/preview-cache.json` reuses successful validation/output only when inputs,
1302
+ compiler/tool code, lockfile, recorded dependencies and content digests match.
1303
+
1304
+ #### Refresh in the preview frame
1305
+
1306
+ A refresh keeps the iframe and compatible component state across source and
1307
+ style edits, including loaded lazy branches. React Refresh and native Prefresh
1308
+ determine compatible component/hook updates.
1309
+
1310
+ - An owner edit refreshes the emitted owner in place, and a token sheet edit
1311
+ replaces its style sheet in place. Either renders exactly what a fresh page
1312
+ renders for the same revision, theme, brand, viewport and interaction state,
1313
+ pixel for pixel and in every element's computed style (see
1314
+ [hot-update fidelity](ARCHITECTURE.md#incremental-compilation-and-refresh)).
1315
+ - Incompatible exports, compiler changes, or added/removed source files that
1316
+ require new import resolution reopen the isolated frame.
1317
+ - A rejected revision uses a clean frame when it restores old code that already
1318
+ executed. An in-flight superseded refresh also requires a clean frame.
1319
+ - Navigation to another scenario mounts that scenario normally. Normal
1320
+ application builds keep their own chunking and optimization.
1321
+
1322
+ #### Preparation after accepted edits
1323
+
1324
+ An accepted MCP edit enqueues preparation even without an open preview. A
1325
+ matching validated candidate graph seeds the same project cache;
1326
+ location-dependent, missing or incompatible output falls back to the normal
1327
+ compiler. After the selected view paints, a connected showcase prefetches the
1328
+ static resources of changed peers through its integrity-checked byte cache. The
1329
+ prefetch does not import modules, attach styles or mount hidden examples, and
1330
+ dynamic imports stay lazy. Preparation is bounded and never establishes passing
1331
+ evidence by itself.
1332
+
1333
+ #### Output locations and limits
1334
+
1335
+ - Standalone compilation writes `.ds/preview/manifest.json`. Graph assets live in
1336
+ the manifest's sibling `assets/` directory.
1337
+ - Managed builders use private directories under `.ds/preview/sessions/` for
1338
+ their resource graphs and HTML descriptors. A managed build and a standalone
1339
+ build cannot overwrite each other's success record.
1340
+ - Tiny `.ds/scenarios/<id>/index.html` descriptors keep the reporter/registry
1341
+ contract. They are not standalone runnable previews.
1342
+ - The compiler caches at most six verified graph snapshots under
1343
+ `.ds/preview-graphs/` and cleans its session output on ordinary shutdown.
1344
+ These are generated files: do not track them or use them as source.
1345
+ - Six previous graph revisions keep old assets for in-flight reads. Older
1346
+ references expire with a refresh error.
1347
+ - A watched manifest carries `refresh: {version: 1, epoch}`, and its module
1348
+ records carry `hot: {id, source}`: a session-stable logical ID and the SHA-256
1349
+ of the module before resource-address rewriting. A complete manifest omits
1350
+ these optional fields. The App rejects malformed or duplicate refresh
1351
+ identities.
1352
+ - A watched App bounds retained metadata to 4096 records and materialized
1353
+ resources to 64 MiB. A complete bundled App keeps the 20
1354
+ selected-module-revision limit. Past a limit, the built-in host recreates the
1355
+ App at the next mount, and an external host receives `ADS_PREVIEW_REOPEN`.
1356
+ - A manifest is capped at 2 MiB and a resource at 16 MiB. These development
1357
+ transport limits do not alter production bundles.
1029
1358
 
1030
1359
  ### One client command, managed preview builds
1031
1360
 
1032
- With a declared framework, `ads mcp` starts ADS's watched preview
1033
- compiler and warms the prioritized view followed by the remaining graph in
1034
- the background. Jobs run sequentially; foreground selections have priority. The client configuration above stays the same; no second terminal
1035
- or separately managed server is needed. The same compiler also builds every draft
1036
- preview after the project's selected view. Existing views can remain visible while
1037
- building; source changes make their evidence stale until a verified update is
1038
- published.
1039
- Standard output trees (`dist`, `build`, `target`, `out`, `.next`, `.nuxt`,
1040
- `.svelte-kit`, `.turbo`) are excluded from preview watches and freshness inputs
1041
- outside the configured source roots. Nested outputs are pruned before OS watches
1042
- are allocated. Explicit `sourceDir`/`dsDir` remain sources even when their names
1043
- match a default output name. Use `assets.generatedPaths` for custom outputs;
1044
- setup does not need to copy the built-in defaults into each project.
1045
- For this checkout, build the tool once and let the client launch:
1361
+ With a declared framework, `ads mcp` starts ADS's watched preview compiler. The
1362
+ client configuration in [Connect Codex or Claude](#connect-codex-or-claude) stays
1363
+ the same: no second terminal or separately managed server is necessary.
1046
1364
 
1047
- ```sh
1048
- npm run build
1049
- bun dist/cli.mjs mcp
1050
- ```
1051
-
1052
- The resource adapter retains compiled views and rebuilds them after source
1053
- changes using one compiler process. Apps load their selected dependency closure.
1054
- React and native Preact projects supply a mount adapter; ADS supplies compilation,
1055
- Linaria extraction and publication. The application keeps its own build tools.
1056
- Unconfigured projects still get the token widget.
1365
+ - One compiler process keeps the compiled views and rebuilds them after source
1366
+ changes. It also builds every draft preview, after the project's selected
1367
+ view. Apps load their selected dependency closure.
1368
+ - ADS supplies compilation, the framework mount and publication. The application
1369
+ keeps its own build tools.
1370
+ - Both build output streams go to stderr. MCP tools accept no executable or
1371
+ command arguments.
1057
1372
 
1058
- Compiled Apps may fetch their bundled `blob:` assets, including Wasm, without
1059
- external network access. The ADS showcase/explorer permits WebAssembly compilation
1060
- without JavaScript eval; external MCP hosts own their own CSP capabilities.
1061
- Keep renderer/transport adapters and their dependency notices explicit. A working
1062
- website or build alone does not establish that a binary renderer works in an App.
1063
-
1064
- Both build output streams go to stderr, keeping stdout exclusively for MCP.
1065
- Opening an App waits up to 30 seconds for validated current output. A matching
1373
+ **Waiting and recovery.** A preview waits up to 5 minutes for validated current
1374
+ output; `mcp.previewBuildTimeoutMs` (1000–3600000 ms) changes that. A matching
1066
1375
  success cache is republished in the new watcher session without recompilation;
1067
- merely finding an older HTML file is insufficient. Managed resource graphs and
1068
- HTML descriptors use private session output; standalone builds publish under
1069
- `.ds/preview/`. One cannot overwrite the other's success record. The
1070
- compiler caches at most six verified graph snapshots under `.ds/preview-graphs/`
1071
- and cleans its session output on ordinary shutdown. These are generated files;
1072
- do not track or use them as source. A timeout leaves the watcher running: inspect the
1073
- logs and invoke the preview again. `ads_status` distinguishes watcher process
1074
- state from reported build state. Token inspection and other ordinary tools
1075
- remain available after a build failure. Invalid scenario metadata at startup and
1076
- later source/validation failures remain reported while the compiler watches for
1077
- repairs. A successful edit recovers without reconnecting MCP. If the child process
1078
- exits, fix the reported failure and invoke the preview again: concurrent requests share one
1079
- fresh child and session. ADS does not run an unattended crash/restart loop.
1080
-
1081
- Changes to loaded compiler code or dependencies produce `ADS_PREVIEW_RESTART`;
1082
- the next preview invocation restarts only the builder and validates current inputs.
1083
- Managed configuration changes replace the compiler through the same supervisor.
1084
- Updating ADS server code itself still requires reconnecting the MCP client to load
1085
- the new package. Normal component, fixture and style edits remain automatic.
1086
-
1087
- ADS closes both network hosts and stops the managed watcher and its compiler
1088
- subprocesses when the stdio wire closes, including EOF or broken output, or it
1089
- receives SIGINT/SIGTERM. Active browser subscriptions do not retain the runtime.
1090
- A small independent ownership guard watches a pipe from MCP; owner death closes
1091
- that pipe even after SIGKILL. The guard terminates the owned compiler process
1092
- group, escalates for stubborn descendants, then exits. It is disarmed on ordinary
1093
- shutdown; `ads_status.compiler.guardPid` identifies it while running. This requires
1094
- no second user command. MCP tools accept no executable or command arguments.
1376
+ an older HTML file alone is insufficient.
1377
+
1378
+ - A timeout leaves the watcher running. Inspect the logs and invoke the preview
1379
+ again.
1380
+ - `ads_status` distinguishes the watcher process state from the reported build
1381
+ state. Ordinary tools stay available after a build failure.
1382
+ - Invalid scenario metadata at startup, and later source/validation failures,
1383
+ stay reported while the compiler watches for repairs. A successful edit
1384
+ recovers without an MCP reconnect.
1385
+ - If the child process exits, fix the reported source, configuration or
1386
+ dependency failure and invoke the preview again. Concurrent requests share one
1387
+ fresh child and session. ADS runs no unattended crash/restart loop.
1388
+ - A change to loaded compiler code or dependencies produces
1389
+ `ADS_PREVIEW_RESTART`: the next preview invocation restarts only the builder
1390
+ and validates the current inputs. A managed configuration change replaces the
1391
+ compiler through the same supervisor. An update of ADS server code requires an
1392
+ MCP client reconnect.
1393
+
1394
+ **Shutdown.** ADS closes both network hosts and stops the managed watcher and its
1395
+ compiler subprocesses when the stdio wire closes (including EOF or broken
1396
+ output) or when it receives SIGINT/SIGTERM. Active browser subscriptions do not
1397
+ keep the runtime alive.
1398
+
1399
+ A small independent ownership guard watches a pipe from MCP: owner death closes
1400
+ that pipe, even after SIGKILL. The guard then terminates the owned
1401
+ compiler process group, escalates for stubborn descendants and exits. It is
1402
+ disarmed on ordinary shutdown, and `ads_status.compiler.guardPid` identifies it
1403
+ while it runs. No second user command is necessary.
1095
1404
 
1096
1405
  ### When a component changes
1097
1406
 
1098
- Edit the owned component/pattern and its fixture. The managed watcher rebuilds
1099
- the artifacts when their source changes. It is a child process supervised by
1100
- MCP; the client launches only `ads mcp`. ADS's compiler owns extraction and rebuilding, while MCP watches the resulting
1101
- artifacts and serves them.
1102
-
1103
- The MCP server detects the new artifact and sends resource-change notifications.
1104
- The built-in host forwards the current selection after a successful build;
1105
- the App reads the new manifest and remounts the scenario. Invoking the preview
1106
- tool again also works in compatible external hosts. The App checks freshness
1107
- every two seconds when notifications are unavailable.
1108
- No ADS package release or skill reinstall is needed for project component changes.
1407
+ Edit the owned component/pattern and its fixture. The managed watcher, a child
1408
+ process that MCP supervises, rebuilds the artifacts; MCP serves them and sends
1409
+ resource-change notifications. After a successful build, the built-in host
1410
+ forwards the current selection, and the App reads the new manifest and remounts
1411
+ the scenario. In a compatible external host, invoke the preview tool again. The
1412
+ App checks freshness every two seconds when notifications are unavailable. A
1413
+ project component change needs no ADS package release or skill reinstall.
1109
1414
 
1110
1415
  ### When code or styles break
1111
1416
 
1112
- Use `ads_status.build` or the `ads://project/build` resource to inspect
1113
- `building`, `ready` or `error` states, each preview's build revision, last successful revision,
1114
- availability, freshness and diagnostics. Diagnostic positions are one-based.
1115
- Tool summaries include the first three diagnostics per preview, capped at 1,000
1116
- characters each, with counts and truncation flags; the build resource retains
1117
- the complete bounded report.
1118
- After source changes, unchanged output cannot remain current.
1119
- Such previews retain their last successful revision and output,
1120
- but report `current: false`, `stale: true` and `ADS_PREVIEW_STALE_SOURCE` while
1121
- awaiting the current build. Changes during compilation also invalidate success.
1122
-
1123
- Accepted drafts explicitly invalidate the managed compiler after publication. Filesystem events provide fast updates; one-second
1124
- input reconciliation recovers missed atomic replacements without touching source
1125
- or restarting MCP. Keep the ADS package used by managed compilation and MCP
1126
- consistent; reports without source evidence cannot establish freshness.
1127
-
1128
- On each status transition MCP sends `notifications/resources/updated` to build
1129
- resource subscribers. Connections using the supported 2025 protocols use `resources/subscribe`; 2026
1130
- connections use the SDK's `subscriptions/listen`. The notification identifies
1131
- the resource to read; it does not carry the diagnostics. This follows the
1417
+ Use `ads_status.build` or the `ads://project/build` resource to inspect the
1418
+ `building`, `ready` or `error` state, each preview's build revision, last
1419
+ successful revision, availability, freshness and diagnostics.
1420
+
1421
+ - Diagnostic positions are one-based. A tool summary includes the first three
1422
+ diagnostics per preview, capped at 1,000 characters each, with counts and
1423
+ truncation flags. The build resource keeps the complete bounded report.
1424
+ - Partial or empty scenario discovery also exposes project-level diagnostics
1425
+ through `ads://project/build`.
1426
+ - A build error carries optional `failure: {scope, phase}` metadata. `scope` is
1427
+ `project`, `graph` or `scenario`; `phase` is `validation`, `discovery` or
1428
+ `build`. A failed project gate blocks verification across previews; it does
1429
+ not establish that every component failed compilation. Diagnostics keep their
1430
+ owning source file, line, column and rule code. Explorer labels project
1431
+ validation explicitly, and shows the selected preview's errors, never an
1432
+ unrelated scenario's failure.
1433
+
1434
+ **Freshness.** When previews compile from the emitted tree, the build status
1435
+ also carries `freshness`: `current` with its `revision` (the preview tree holds
1436
+ the current revision), or `stale` with `shown` and the `reason` (the previews
1437
+ show an earlier one). The reason is `emitting`, `emit-failed` with the check or
1438
+ emission failure, or `tree-failed`. A failing check never replaces the last good
1439
+ preview; the showcase marks that preview stale, with the failure's findings in
1440
+ its status details.
1441
+
1442
+ - After a source change, unchanged output cannot stay current. Such a preview
1443
+ keeps its last successful revision and output, but reports `current: false`,
1444
+ `stale: true` and `ADS_PREVIEW_STALE_SOURCE` while it waits for the current
1445
+ build. A change during compilation also invalidates success.
1446
+ - When build status is unavailable, freshness is `unreported` (`current: false`,
1447
+ `stale: null`). This does not establish a usable current preview. Request the
1448
+ preview to start ADS's managed compiler, and inspect its diagnostics.
1449
+ - An accepted draft explicitly invalidates the managed compiler after
1450
+ publication. Filesystem events provide fast updates. A one-second input
1451
+ reconciliation recovers missed atomic replacements without touching source or
1452
+ restarting MCP.
1453
+ - Keep the ADS package that managed compilation uses consistent with the one MCP
1454
+ uses. A report without source evidence cannot establish freshness.
1455
+
1456
+ **Notifications.** On each status transition MCP sends
1457
+ `notifications/resources/updated` to build resource subscribers
1458
+ ([subscription methods](#protocols-notifications-and-compatibility)). The
1459
+ notification identifies the resource to read and does not carry the
1460
+ diagnostics. An unchanged resource catalogue needs no list-change notification
1461
+ for a build status update. The host controls whether a notification starts an
1462
+ agent turn. This follows the
1132
1463
  [resource subscription contract](https://modelcontextprotocol.io/specification/2025-11-25/server/resources#subscriptions).
1133
- An unchanged resource catalogue needs no list-change notification for a build
1134
- status update. The host controls whether a notification starts an agent turn.
1135
-
1136
- Preview tools wait while a reported build is pending. A reported failure returns
1137
- `isError: true`, readable file/line messages and structured build diagnostics,
1138
- including the build resource URI. Scenario-specific App resources also refuse a
1139
- failed build even when older output remains on disk. The reusable bootstrap and
1140
- retained immutable assets stay readable so an existing App can report freshness;
1141
- readability alone does not establish a current preview. After a successful rebuild the same
1142
- tool works again without restarting MCP. If the watcher itself exits, its
1143
- failure is reported; after fixing the source, configuration or dependency failure,
1144
- invoke the preview again to start a fresh managed compiler. Partial or empty scenario discovery also exposes project-level
1145
- diagnostics through `ads://project/build`.
1146
-
1147
- Already-mounted Apps show rebuilding, failure or a newer available revision
1148
- when the host permits server resource reads. They check build status every two
1149
- seconds and stop on teardown. Resource Apps automatically mount a new successful
1150
- graph without replacing their iframe; failed builds leave the earlier view marked
1151
- stale. The built-in host recreates the App after its retained-module limit. Other hosts can also reinvoke the tool or reload the App. Token source
1152
- inspection is independent of component build failures.
1153
-
1154
- When build status is unavailable, freshness is `unreported`
1155
- (`current: false`, `stale: null`). This does not establish a usable current
1156
- preview; request the preview to start ADS's managed compiler and inspect its
1157
- diagnostics. A running process or an existing HTML file is not proof of current
1158
- source. `ads://project/checks` separately reports source/CSS
1159
- syntax and architecture violations. Typechecks, behavior tests and browser
1160
- review still cover runtime exceptions, incorrect layout and motion. MCP does
1161
- not repair source automatically.
1162
1464
 
1163
- Invoke an App's entry **tool** to ask a capable host to render it. Reading its
1164
- HTML resource is a data read, not evidence of a rendered view. When Apps are
1165
- unavailable, tool results provide a bounded descriptor and the runtime's
1166
- showcase URL. The same MCP process already serves that website, unless started
1167
- with `--no-showcase`.
1168
- See the [MCP Apps specification](https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/2026-01-26/apps.mdx).
1465
+ **Tools and mounted Apps.** A preview tool waits while a reported build is
1466
+ pending. A reported failure returns `isError: true`, readable file/line messages
1467
+ and structured build diagnostics, including the build resource URI. After a
1468
+ successful rebuild the same tool works again.
1469
+
1470
+ - A scenario-specific App resource also refuses a failed build, even when older
1471
+ output is still on disk. The reusable bootstrap and retained immutable assets
1472
+ stay readable so that an existing App can report freshness; readability alone
1473
+ does not establish a current preview.
1474
+ - A mounted App shows rebuilding, failure or a newer available revision when the
1475
+ host permits server resource reads. It checks the build status every two
1476
+ seconds and stops on teardown.
1477
+ - A resource App mounts a new successful graph without replacing its iframe; a
1478
+ failed build leaves the earlier view marked stale. The built-in host recreates
1479
+ the App after its retained-module limit. Another host can invoke the tool
1480
+ again or reload the App.
1481
+
1482
+ A running process, an existing HTML file or a retained earlier view is not proof
1483
+ of current source. `ads://project/checks` reports `ads check` findings
1484
+ separately. Typechecks, behavior tests and browser review still cover runtime
1485
+ exceptions, incorrect layout and motion. MCP does not repair source
1486
+ automatically.
1169
1487
 
1170
1488
  ## Prompts
1171
1489
 
@@ -1173,258 +1491,222 @@ See the [MCP Apps specification](https://github.com/modelcontextprotocol/ext-app
1173
1491
  |--------|-------------------|-----|
1174
1492
  | `ads-design` | `request` | Plan and implement a project-owned ADS change |
1175
1493
  | `ads-inspect` | `element` | Discover an existing element, its API and relevant view |
1176
- | `ads-show` | `target` | Choose tokens or an exact discovered scenario ID |
1177
- | Each of the five ADS skill names | `request` | Select that workflow and its skill resource |
1494
+ | `ads-show` | `target` | Choose an exact discovered scenario ID |
1495
+ | Each of the four ADS skill names (`ads-designer`, `ads-import`, `ads-port`, `ads-migrate`) | `request` | Select that workflow and its skill resource |
1178
1496
 
1179
1497
  Example: get `ads-inspect` with `element="Button states in both themes"`, or
1180
1498
  `ads-port` with `request` containing the upstream component-library URL.
1499
+
1181
1500
  Prompts explain Data/UX/Skin ownership, public API reuse, fixture boundaries,
1182
1501
  which tools select widgets, progressive skill reads and validation. They guide
1183
- reasoning rather than inventing another component implementation.
1184
-
1185
- Hosts choose whether prompt pickers/methods reach the agent. If unavailable,
1186
- the agent can use the same tools and selected skill resources directly. Prompt
1187
- retrieval itself does not execute the workflow or change project files.
1502
+ reasoning and do not invent another component implementation. The host chooses
1503
+ whether prompt pickers/methods reach the agent. If they do not, the agent can
1504
+ use the same tools and selected skill resources directly. Prompt retrieval does
1505
+ not execute the workflow or change project files.
1188
1506
 
1189
1507
  ## Skills
1190
1508
 
1191
- The npm distribution includes the five ADS skills, references, empty designer
1192
- scaffold, credits and upstream notices. Each `skill://ads/<name>/SKILL.md` has
1193
- a complete manifest of file URIs, UTF-8 byte lengths and SHA-256 digests.
1194
- Supporting files are read lazily via `resources/read`; directory browsing is
1195
- available on `2026-07-28`. The packaged scaffold's `.gitignore` remains
1196
- addressable at its original resource URI.
1197
-
1198
- `ads-import` assesses the destination and adapts selected source to its contracts.
1199
- Its compatibility reference is available at
1200
- `skill://ads/ads-import/references/compatibility.md`. Existing owner drafts,
1201
- coupled multi-owner drafts and candidate checks support the workflow; there is no
1202
- separate import tool, version-based acceptance filter or compatibility certificate.
1203
- The agent resolves semantic differences and reviews rendered behavior. Candidate
1204
- validation uses installed project dependencies; package installation remains a
1205
- project package-manager step before validating dependent changes.
1206
-
1207
- On protocol `2026-07-28`, discovery advertises `io.modelcontextprotocol/skills`
1208
- with directory reading and implements `skills/list`, `skills/get`, and
1209
- `resources/directory/read`, and lists no skill tools. 2025-era connections, which
1210
- have no native skills, get ordinary skill resources plus `ads_skills` and
1211
- `ads_read_skill`; their metadata listing does not pretend to be native skill activation. Relative references resolve from the skill URI.
1212
-
1213
- The host controls integrity verification, user approval and activation. Reading
1214
- `SKILL.md` through ordinary resources/tools does not prove activation. Local
1215
- installation with `npx skills` remains supported independently. See the
1216
- [Skills extension specification](https://github.com/modelcontextprotocol/ext-skills/blob/main/specification/stable/skills.mdx).
1509
+ The npm distribution includes the four ADS skills (`ads-designer`, `ads-import`,
1510
+ `ads-port`, `ads-migrate`) with their references, credits and upstream notices.
1511
+ Each `skill://ads/<name>/SKILL.md` has a complete manifest of file URIs, UTF-8
1512
+ byte lengths and SHA-256 digests. Supporting files are read lazily through
1513
+ `resources/read`. Relative references resolve from the skill URI.
1514
+
1515
+ - On protocol `2026-07-28`, discovery advertises `io.modelcontextprotocol/skills`
1516
+ with directory reading. ADS implements `skills/list`, `skills/get` and
1517
+ `resources/directory/read`, and lists no skill tools.
1518
+ - 2025-era connections have no native skills. They get ordinary skill resources
1519
+ plus `ads_skills` and `ads_read_skill`. Their metadata listing is not native
1520
+ skill activation.
1521
+ - The host controls integrity verification, user approval and activation.
1522
+ Reading `SKILL.md` through ordinary resources/tools does not prove activation.
1523
+ - Local installation with `npx skills` is supported independently. See the
1524
+ [Skills extension specification](https://github.com/modelcontextprotocol/ext-skills/blob/main/specification/stable/skills.mdx).
1525
+
1526
+ `ads-import` assesses the destination and adapts selected source to its
1527
+ contracts (`skill://ads/ads-import/references/compatibility.md`). It uses owner
1528
+ drafts, coupled multi-owner drafts and candidate checks: there is no separate
1529
+ import tool, version-based acceptance filter or compatibility certificate.
1530
+ Candidate validation uses installed project dependencies, so install packages
1531
+ before you validate dependent changes.
1217
1532
 
1218
1533
  ## Protocols, notifications and compatibility
1219
1534
 
1220
1535
  ADS serves the same protocol versions on stdio and on HTTP: `2026-07-28` through
1221
1536
  discovery and per-request metadata, and `2024-10-07`, `2024-11-05`, `2025-03-26`,
1222
- `2025-06-18` and `2025-11-25` through the initialize lifecycle. Over HTTP a
1537
+ `2025-06-18` and `2025-11-25` through the initialize lifecycle. Over HTTP, a
1223
1538
  2025-era client gets a session (`Mcp-Session-Id`) with its GET stream for server
1224
1539
  notifications, as the 2025 Streamable HTTP transport defines. A client gets what
1225
- its negotiated version defines; only features that version lacks, such as native
1226
- Skills or `subscriptions/listen`, are unavailable to it. Apps use their separate
1227
- `2026-01-26` UI handshake.
1228
-
1229
- Project source changes invalidate catalogue caches and notify resource
1230
- list/read subscribers. Artifact and build-status changes notify preview/build
1231
- subscribers without rediscovering unchanged source. Configured preview changes
1232
- also notify the tool catalog.
1233
- Publishing a changed asset catalogue also sends a resource-list notification;
1234
- status-only transitions with unchanged resource identities need only updates.
1235
- The server polls file metadata once a second, so replaced files and newly added
1236
- directories are detected. On `2026-07-28` connections, notifications use the SDK's
1237
- `subscriptions/listen`; 2025-era connections, on stdio or in an HTTP session, get
1238
- list-change and subscribed-resource notifications. Hosts may require a manual
1239
- refresh.
1240
-
1241
- Client support varies by product and version. Ordinary tools and resources
1242
- remain available without Apps or native Skills support. ADS uses bounded tool
1243
- results and separate resource reads; previews also return showcase links for
1244
- clients without Apps. Native Skills support is optional.
1245
-
1246
- Automated tests verify both protocol eras on both transports, resource/skill integrity, prompt
1247
- retrieval, bounded tools, initial preview readiness, managed rebuilds, process
1248
- cleanup and resource notifications. SDK and
1249
- browser-host tests are distinct from a real Codex/Claude session. In a new host,
1250
- verify tools, explicit resources, an App entry tool and its UI handshake,
1251
- Refresh/theme behavior, notifications, prompts, then native Skills separately.
1252
- Record the client build and negotiated protocol; HTML delivery or ordinary
1253
- instruction reads alone do not establish Apps/Skills activation.
1254
-
1255
- ### Token sample verification
1256
-
1257
- Token views take their bindings from `tokens/catalog.ads.json`: each record has
1258
- `{ token, property, probe }`. The same bindings travel in the compiled resource manifest or
1259
- self-contained App seed.
1260
-
1261
- The view marks its styled sample elements with `data-ads-token` and
1262
- `data-ads-property`. After mounting and font loading, the App uses the browser's CSS
1263
- engine to validate each declared binding and project-supplied probe, then checks
1264
- that changing the token changes the sample's computed property. It restores token
1265
- values synchronously. Failures remain visible and are emitted through App logging
1266
- when the host supports it; a failed sample is not reported as ready.
1267
-
1268
- Source checks establish structural coverage. Browser verification happens when the
1269
- App actually renders, for the active scenario and theme. It is not a pre-write
1270
- browser test in the mutation server and does not establish every interaction or
1271
- pixel-level visual quality. Hosts without Apps retain static diagnostics and the
1272
- showcase URL; they cannot claim rendered verification from a source check alone.
1273
- For browser automation, wait for the selected App's ready/error state. The
1274
- showcase's live notification stream makes `networkidle` unsuitable. Tall previews
1275
- scroll inside the App document; verify their last sample remains reachable.
1276
-
1277
- Existing projects migrate their token fixtures from name lists to explicit sample
1278
- records, pass those records into their public renderer, and add the sample markers.
1279
- Rebuild previews with the updated compiler so the contract is included in resources.
1280
- Tool updates do not overwrite existing project-owned scenarios or renderers.
1281
-
1282
- ### Static owner contract discovery
1283
-
1284
- `ads_units` includes `contractFile` for a single `<Owner>.ads.contract.ts`.
1285
- `ads_catalog` identifies declarative APIs and their parent/consumer/check links,
1286
- and registered constrained paint-input paths. Declarative summaries include
1287
- `consumerCount` and up to four `consumers`, with their rendering roots; read the
1288
- contract source for additional relationships. Read the relevant source range;
1289
- these summaries establish registration, not completed verification. Detailed
1290
- results remain bounded and paged.
1291
-
1292
- See [CONTRACTS.md](CONTRACTS.md) for the static schema, compatibility and render audits.
1293
- The same guide is available at `ads://guides/contracts`.
1294
-
1295
- A registered binding producer gives a per-theme value with `themed()` or
1296
- `themedByScheme()`; its output is `var(--ads-if-<theme>, <reference>)` once per declared
1297
- theme, in declared order. The App paint audit checks every branch and its observed effect
1298
- in the active theme. Raw colors, undefined tokens and SVG URLs in a branch remain invalid.
1299
- This derived binding form does not widen public paint-input types; use constrained
1300
- references for each theme input and verify every theme in browser checks.
1301
-
1302
- Binding `valueFrom` accepts one path or an explicit array of registered entry
1303
- paths for alternative/theme paints. Parts can have multiple distinct parents and
1304
- registered nested parents, anchored at rendering roots. `exercises` records
1305
- reachable use; registered browser checks establish the effects. Private visual
1306
- behavior subjects use explicit `role: "implementation"`; headless defaults and
1307
- shared-controller gates remain enabled. See [CONTRACTS.md](CONTRACTS.md).
1308
-
1309
- Build errors carry optional `failure: {scope, phase}` metadata. `scope` is
1310
- `project`, `graph` or `scenario`; `phase` is `validation`, `discovery` or `build`.
1311
- A failed project gate blocks verification across previews; it does not establish
1312
- that every component failed compilation. Diagnostics retain their owning source
1313
- file, line, column and rule code. Explorer labels project validation explicitly
1314
- and shows errors for the selected preview rather than borrowing an unrelated
1315
- scenario's failure. A retained earlier view is not current-source evidence.
1540
+ its negotiated version defines. Only features that the version lacks, such as
1541
+ native Skills or `subscriptions/listen`, are unavailable to it. Apps use their
1542
+ separate `2026-01-26` UI handshake.
1543
+
1544
+ **Notifications**
1545
+
1546
+ - A project source change invalidates catalogue caches and notifies resource
1547
+ list/read subscribers.
1548
+ - An artifact or build-status change notifies preview/build subscribers without
1549
+ rediscovery of unchanged source. A configured preview change also notifies the
1550
+ tool catalog.
1551
+ - Publication of a changed asset catalogue also sends a resource-list
1552
+ notification. A status-only transition with unchanged resource identities
1553
+ needs only updates.
1554
+ - The server polls file metadata once a second, so it detects replaced files and
1555
+ newly added directories.
1556
+ - `2026-07-28` connections use the SDK's `subscriptions/listen` with resource
1557
+ filters. 2025-era connections, on stdio or in an HTTP session, use
1558
+ `resources/subscribe` and `resources/unsubscribe` and get list-change and
1559
+ subscribed-resource notifications.
1560
+ - A host can require a manual refresh.
1561
+
1562
+ **Compatibility**
1563
+
1564
+ Client support varies by product and version. Ordinary tools and resources stay
1565
+ available without Apps or native Skills support. ADS uses bounded tool results
1566
+ and separate resource reads, and previews also return showcase links for clients
1567
+ without Apps.
1568
+
1569
+ ADS's SDK and browser-host tests are distinct from a real Codex/Claude session.
1570
+ In a new host, verify tools,
1571
+ explicit resources, an App entry tool and its UI handshake, Refresh/theme
1572
+ behavior, notifications and prompts, then native Skills separately. Record the
1573
+ client build and the negotiated protocol. HTML delivery or ordinary instruction
1574
+ reads alone do not establish Apps/Skills activation.
1316
1575
 
1317
1576
  ## Complete and affected validation
1318
1577
 
1319
1578
  `ads_validate({})` and `ads validate` share the full validation engine.
1320
- `ads_validate({scope:"changed"})` matches `ads validate --changed`.
1321
- `ads validate` is the project gate: `ads check`, `acceptance.scripts` then
1322
- `validation.scripts`, current production previews, and every registered behavior test
1323
- and render audit its change set reaches; it writes nothing. With scope `all` that is
1324
- everything; with `scope:"changed"` it is what changed since the last successful full
1325
- run (configuration, foundation or token changes widen it to everything), the check to
1326
- run after direct edits or a series of accepted drafts. `acceptance.behavior` and
1327
- `acceptance.audit` affect draft acceptance only. Its `a11y-axe`,
1328
- `a11y-non-text-contrast` and `layout-overflow` findings are errors, and skipped tests
1329
- are reported as skipped, without a passing label. Draft preview/edit runs no gate.
1330
- Draft acceptance checks its candidate before writing source: `ads check`,
1331
- `acceptance.scripts`, and the draft owners' own behavior tests and render audit.
1332
- `mcp.auditPages` (1–16, default 4) sets how many pages render at once. Any `a11y-axe`, `a11y-non-text-contrast` or
1333
- `layout-overflow` error, a scenario that fails all 3 attempts (`render-audit`, naming it and the
1334
- last cause, with retried passes listed under `retries`), or an audit that
1335
- cannot run (`render-audit`: no project Playwright or browser; the message names what to
1336
- install), rejects the change; findings are in `diagnostics` and the
1337
- `render-audit` check lists the audited scenarios, themes, brands and
1338
- timing. The MCP tool
1339
- runs trusted configured project commands with cancellation and bounded output; it
1340
- is available with source mutations disabled and writes only build/evidence output
1341
- when project commands honor their checking contract. Summaries include scope,
1342
- requestedScope, fallback reason, sourceRevision, current, elapsedMs and resultId.
1343
- Read diagnostics/checks/outcomes with `ads_results`; progress and the latest
1344
- validation summary are in `ads_status.validation`. Retention is latest per kind:
1345
- validation and mutation are independent.
1579
+ `ads_validate({scope:"changed"})` matches `ads validate --changed`. This is the
1580
+ project gate: `ads check`, `acceptance.scripts` then `validation.scripts`,
1581
+ current production previews, and every registered behavior test and render
1582
+ audit that its change set reaches. It writes no source.
1583
+
1584
+ - Scope `all` reaches everything: the configured scripts, the registered
1585
+ guarantees and every UI scenario.
1586
+ - `scope:"changed"` reaches what changed since the last successful full run. Run
1587
+ it after direct edits or a series of accepted drafts. It narrows the behavior
1588
+ owners and the audited scenarios; the core check and the opaque project
1589
+ scripts stay complete.
1590
+ - Configuration, foundation or token changes, and any change outside `dsDir`
1591
+ (such as the manifest, lockfiles or tooling), widen `changed` to everything.
1592
+ - Neither mode rewrites npm test commands or treats compiled live previews as
1593
+ verification evidence.
1594
+ - `fresh: true` runs `ads check` again instead of using a remembered result.
1595
+ - `acceptance.behavior` and `acceptance.audit` affect draft acceptance only.
1596
+ Draft acceptance checks its own candidate
1597
+ ([Acceptance gates](#acceptance-gates)). Draft preview and edit run no gate.
1598
+
1599
+ **Render audit.** In both gates, each of these rejects the change:
1600
+
1601
+ - any `a11y-axe`, `a11y-non-text-contrast`, text-pass or `layout-overflow` error;
1602
+ - a scenario that fails all 3 attempts (`render-audit`, naming it and the last
1603
+ cause, with retried passes listed under `retries`);
1604
+ - an audit that cannot run (`render-audit-unavailable`: ADS could not install or
1605
+ start its browser; the message names the install command).
1606
+
1607
+ The findings are in `diagnostics`, and the `render-audit` check lists the audited
1608
+ scenarios, themes, brands and timing. `mcp.auditPages` (1–16, default 4) sets how
1609
+ many pages render at once.
1610
+
1611
+ **Skipped stages.** Skipped tests are reported as skipped, without a passing
1612
+ label. A stage with nothing to run (the managed previews, verified previews,
1613
+ registered behavior checks or render audit) is listed in `checks` as for
1614
+ [acceptance](#acceptance-gates), with `no-scenarios`, `no-behavior-checks` or
1615
+ `none-selected` (the change set reaches none of the registered entries).
1616
+
1617
+ **Execution.** The tool runs trusted configured project commands with
1618
+ cancellation and bounded output. It is available with source mutations disabled,
1619
+ and writes only build/evidence output when the project commands honor their
1620
+ checking contract. A summary includes `scope`, `requestedScope`, the fallback
1621
+ reason, `sourceRevision`, `current`, `elapsedMs` and `resultId`. Read
1622
+ diagnostics, checks and outcomes with `ads_results`. `ads_status.validation`
1623
+ holds the progress and the latest validation summary. Status keeps the latest
1624
+ summary per kind, validation and mutation independently; each run's result stays
1625
+ readable by ID within `mcp.resultRetention`.
1346
1626
 
1347
1627
  Read `ads://guides/validation` for trigger guidance, baseline expansion, test
1348
- boundaries, script selection and limits. Full runs include configured scripts,
1349
- registered guarantees and every UI scenario; changed mode narrows behavior owners and
1350
- audited scenarios while core and opaque project scripts remain complete. Neither mode rewrites npm test commands
1351
- or treats compiled live previews as verification evidence.
1352
-
1353
- Source freshness covers the configured ADS and UI roots, public assets, local
1354
- imports/workers/assets, registered configuration and command entrypoints, package
1355
- manifests/locks/patches, and supported project tests with their dependencies.
1356
- Unrelated native/backend/documentation changes do not reject an ADS mutation or
1357
- stale its preview. Every patched file remains protected, including documentation.
1358
- Changes to either the original or proposed configuration's inputs reject a stale
1359
- candidate; validation commands that write candidate source still fail.
1360
- Unrelated source symlinks are omitted from the temporary copy; tracked source
1361
- paths retain their symlink checks.
1362
- The HTTP host uses its shared observer for change detection. Serving immutable
1363
- resource bytes does not initialize a second source/build scan per request, and
1364
- still verifies the resource digest. Explicit status and validation retain their
1365
- freshness checks.
1366
-
1367
- For opaque command inputs that static imports cannot reveal, add project-relative
1368
- files or directories to `validation.inputs`, for example:
1628
+ boundaries, script selection and limits.
1629
+
1630
+ **Source freshness.** Freshness covers only the design-system project: the
1631
+ `dsDir` tree with its local imports/workers/assets and tests, `ds.config.json`,
1632
+ the TypeScript configuration chain, registered configuration and package-script
1633
+ entry files with their imports, package manifests/locks/patches with
1634
+ dependency-resolution configuration, notices and `validation.inputs`
1635
+ ([input sets](ARCHITECTURE.md#input-sets)).
1636
+
1637
+ - Application source, public directories, the root `index.html` and tests
1638
+ outside `dsDir` are not inputs. Application, native/backend and documentation
1639
+ changes neither reject an ADS mutation nor make its preview stale.
1640
+ - Every patched file stays protected, including documentation. A change to the
1641
+ inputs of either the original or the proposed configuration rejects a stale
1642
+ candidate. A validation command that writes candidate source fails.
1643
+ - Unrelated source symlinks are omitted from the temporary copy. Tracked source
1644
+ paths keep their symlink checks.
1645
+ - The HTTP host uses its shared observer for change detection. Serving immutable
1646
+ resource bytes starts no second source/build scan per request, and still
1647
+ verifies the resource digest. Explicit status and validation keep their
1648
+ freshness checks.
1649
+
1650
+ For opaque command inputs that static imports cannot reveal, add
1651
+ project-relative files or directories to `validation.inputs`, for example:
1369
1652
 
1370
1653
  ```json
1371
1654
  { "validation": { "inputs": ["schemas/ui.json", "tools/check-data"] } }
1372
1655
  ```
1373
1656
 
1374
- These are additive source paths, not globs or exclusions. Missing paths are tracked
1375
- so later creation invalidates evidence. Dependencies, metadata and generated output
1376
- are not source inputs. The setting defaults to an empty list and accepts up to 200
1377
- unique canonical paths below the project root. Declare data read dynamically by
1378
- selected commands; ADS cannot infer arbitrary filesystem access inside a command.
1657
+ These are additive source paths, not globs or exclusions. A missing path is
1658
+ tracked, so its later creation invalidates evidence. Dependencies, metadata and
1659
+ generated output are not source inputs. The setting defaults to an empty list
1660
+ and accepts up to 200 unique canonical paths below the project root. Declare the
1661
+ data that selected commands read dynamically: ADS cannot infer arbitrary
1662
+ filesystem access inside a command.
1379
1663
 
1380
1664
  ## Shared-process execution coordination
1381
1665
 
1382
- One ADS process has an exclusive execution lease shared by its HTTP and stdio
1383
- clients. `ads_validate` (both scopes) and `ads_accept` acquire
1384
- it before work and retain it
1385
- through child/ownership-guard cleanup and result publication. Changed scope still
1386
- runs full project scripts. Parallel units and `wait: true` are not supported.
1387
-
1388
- A conflicting call is a tool error with `code: "ADS_VALIDATION_LOCKED"` and `lock`:
1389
- run ID, instance ID, operation, owner/client label where known, requested
1390
- and effective scope, units, start time and progress. Client labels (including optional request `_meta["ads/clientId"]`)
1391
- are advisory metadata, not authentication. Stateless HTTP requests do not define
1392
- persistent client sessions. The run ID is the result ID; any connected project
1393
- client can read retained evidence by ID after reconnecting.
1394
-
1395
- `ads_status.execution` exposes the lock, server instance and retention state.
1396
- Status resource subscriptions receive acquisition, progress, stopping and release
1397
- updates. Read-only discovery, Explorer and preview delivery stay available.
1398
- Accepted-source writes from every client, including the holder, contend for the
1399
- same lease. Draft creation/editing affects separate proposals and remains usable.
1400
-
1401
- Relevant source changes during working-tree validation/verification initiate early
1402
- shutdown with `ADS_SOURCE_CHANGED_DURING_RUN`. Results name changed paths,
1403
- added/modified/deleted classification and observed attribution; external editors
1404
- have unknown authorship. While stopping, contention responses include these details.
1405
- Generated outputs are excluded. Completed observations remain inspectable, and a
1406
- stopped run cannot establish acceptance or publish a full-policy baseline. Guarded
1407
- candidate edits retain their existing source-conflict checks before publication.
1408
-
1409
- The durable journal under `.ds/execution-runs/` records work before it starts.
1410
- Cancellation and request disconnect initiate cleanup and save a terminal result
1411
- even when its response cannot be delivered. On restart, orphaned recorded process
1412
- identities are checked before cleanup; PID reuse is not authority. Active work in
1413
- another live process is not recovered. Unfinished abandoned runs become interrupted
1414
- and never auto-resume. Existing EOF ownership guards also terminate child trees.
1415
-
1416
- Collection runs at startup and after executions. Results, retained investigations
1417
- and owned verification folders expire together; baselines are independent. Active
1418
- runs and the just-returned result are protected (temporary over-budget state is
1419
- reported). Abandoned known mutation workspaces are removed during recovery;
1420
- unreferenced old verification folders are removed after the configured age.
1421
- No cleanup is triggered solely by a client disconnect. Independent ADS processes
1422
- on the same project are outside this process-local coordination guarantee.
1423
-
1424
- ## Experimental browser transport
1425
-
1426
- The isolated HTTP experiment replaces MCP in the showcase browser, including
1427
- discovery, status, events and preview actions. Agents retain MCP against the
1428
- same engine. Preview isolation still uses a persistent iframe. See the
1429
- [scope, endpoint boundary and proof checklist](HTTP-SHOWCASE-POC.md). This is not
1430
- part of the 0.4.4 release.
1666
+ One ADS process has an exclusive execution lease, shared by its HTTP and stdio
1667
+ clients. `ads_validate` (both scopes), `ads_accept` and `ads_delete` acquire it
1668
+ before work and hold it through child/ownership-guard cleanup and result
1669
+ publication.
1670
+
1671
+ - Accepted-source writes from every client, including the holder, contend for
1672
+ the same lease. Draft creation and editing affect separate proposals and stay
1673
+ usable. Read-only discovery, Explorer and preview delivery stay available.
1674
+ - Changed scope still runs the full project scripts. Parallel units and
1675
+ `wait: true` are not supported.
1676
+ - A conflicting call is a tool error with `code: "ADS_VALIDATION_LOCKED"` and
1677
+ `lock`: run ID, instance ID, operation, owner/client label where known,
1678
+ requested and effective scope, units, start time and progress.
1679
+ - Client labels (including optional request `_meta["ads/clientId"]`) are
1680
+ advisory metadata, not authentication. Stateless HTTP requests define no
1681
+ persistent client sessions.
1682
+ - The run ID is the result ID. Any connected project client can read the
1683
+ retained evidence by ID after a reconnect.
1684
+ - `ads_status.execution` exposes the lock, the server instance and the retention
1685
+ state. Status resource subscriptions receive acquisition, progress, stopping
1686
+ and release updates.
1687
+
1688
+ **Source changes during a run.** A relevant source change during working-tree
1689
+ validation/verification starts an early shutdown with
1690
+ `ADS_SOURCE_CHANGED_DURING_RUN`. Results name the changed paths, their
1691
+ added/modified/deleted classification and the observed attribution; external
1692
+ editors have unknown authorship. While the run stops, contention responses
1693
+ include these details. Generated outputs are excluded. Completed observations
1694
+ stay inspectable, but a stopped run cannot establish acceptance or publish a
1695
+ full-policy baseline. Guarded candidate edits keep their own source-conflict
1696
+ checks before publication.
1697
+
1698
+ **Journal and recovery.** The durable journal under `.ds/execution-runs/` records
1699
+ work before it starts. Cancellation and request disconnect start cleanup and
1700
+ save a terminal result, even when its response cannot be delivered. On restart,
1701
+ ADS checks orphaned recorded process identities before cleanup; PID reuse is not
1702
+ authority. Active work in another live process is not recovered. Unfinished
1703
+ abandoned runs become interrupted and never resume automatically.
1704
+
1705
+ **Collection.** Collection runs at startup and after executions. Results,
1706
+ retained investigations and owned verification folders expire together;
1707
+ baselines are independent. Active runs and the just-returned result are
1708
+ protected, and a temporary over-budget state is reported. Abandoned known
1709
+ mutation workspaces are removed during recovery. Unreferenced old verification
1710
+ folders are removed after the configured age. A client disconnect alone triggers
1711
+ no cleanup. Independent ADS processes on the same project are outside this
1712
+ process-local coordination guarantee.