@reqvire-org/ads 0.4.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (394) hide show
  1. package/README.md +105 -86
  2. package/dist/a11y.mjs +108 -29
  3. package/dist/analysis/compiler-options.mjs +13 -0
  4. package/dist/analysis/context.mjs +46 -0
  5. package/dist/analysis/file-tree.mjs +52 -0
  6. package/dist/analysis/helpers.mjs +140 -0
  7. package/dist/analysis/impact.mjs +20 -0
  8. package/dist/analysis/inputs.mjs +15 -0
  9. package/dist/analysis/native-adapter.mjs +180 -0
  10. package/dist/analysis/native-project.mjs +323 -0
  11. package/dist/analysis/queries.mjs +133 -0
  12. package/dist/analysis/service.mjs +146 -0
  13. package/dist/analysis/standalone.mjs +57 -0
  14. package/dist/analysis/syntax.mjs +164 -0
  15. package/dist/analysis/worker.mjs +182 -0
  16. package/dist/assets.mjs +5 -5
  17. package/dist/atomic-composition.mjs +191 -70
  18. package/dist/atomic-trace.mjs +120 -50
  19. package/dist/behavior-libraries.mjs +106 -37
  20. package/dist/behaviors.mjs +219 -77
  21. package/dist/boundaries.mjs +135 -38
  22. package/dist/brand-assets.mjs +219 -47
  23. package/dist/brands.mjs +86 -27
  24. package/dist/bun-compiler.mjs +28 -14
  25. package/dist/bun-worker.mjs +7 -5
  26. package/dist/capture/worker.mjs +15 -4
  27. package/dist/capture-store.mjs +4 -2
  28. package/dist/capture.mjs +17 -14
  29. package/dist/check-service.mjs +40 -57
  30. package/dist/check.mjs +749 -188
  31. package/dist/cli.mjs +200 -99
  32. package/dist/color-values.mjs +21 -21
  33. package/dist/component-contrast.mjs +2 -2
  34. package/dist/config.mjs +303 -135
  35. package/dist/construction-styles.cjs +10 -0
  36. package/dist/control-padding.mjs +45 -25
  37. package/dist/css-values.mjs +3 -2
  38. package/dist/declarative-flow.mjs +209 -109
  39. package/dist/design-values.mjs +136 -51
  40. package/dist/development-runtime.mjs +4 -6
  41. package/dist/draft-boundary.mjs +11 -6
  42. package/dist/evidence.mjs +1 -1
  43. package/dist/finding-rules.mjs +7 -5
  44. package/dist/font-rules.mjs +2 -2
  45. package/dist/fonts-generated.mjs +2 -2
  46. package/dist/foundation-views.mjs +238 -0
  47. package/dist/foundation.mjs +63 -39
  48. package/dist/generated-entries.mjs +101 -34
  49. package/dist/icons.mjs +79 -32
  50. package/dist/image-attributes.mjs +109 -36
  51. package/dist/image-size.mjs +1 -1
  52. package/dist/index.mjs +0 -2
  53. package/dist/init.mjs +122 -41
  54. package/dist/investigations.mjs +2 -2
  55. package/dist/layers.mjs +298 -129
  56. package/dist/layout-widths.mjs +180 -85
  57. package/dist/linaria/preserve-values.cjs +7 -0
  58. package/dist/linaria/spatial-inputs.cjs +56 -0
  59. package/dist/lockup-composition.mjs +44 -0
  60. package/dist/lockup-model.cjs +64 -0
  61. package/dist/mcp/THIRD_PARTY_NOTICES.md +51 -1
  62. package/dist/mcp/apps.mjs +4 -30
  63. package/dist/mcp/behavior-pages.mjs +72 -24
  64. package/dist/mcp/build-status.mjs +257 -64
  65. package/dist/mcp/catalog.mjs +90 -26
  66. package/dist/mcp/context.mjs +17 -18
  67. package/dist/mcp/draft-discovery.mjs +44 -21
  68. package/dist/mcp/drafts.mjs +901 -281
  69. package/dist/mcp/execution-coordinator.mjs +417 -167
  70. package/dist/mcp/execution-results.mjs +7 -7
  71. package/dist/mcp/mutations.mjs +670 -234
  72. package/dist/mcp/preview-watch.mjs +448 -170
  73. package/dist/mcp/preview-widget.bundle.js +44 -50
  74. package/dist/mcp/prompts.mjs +5 -5
  75. package/dist/mcp/result-pages.mjs +1 -1
  76. package/dist/mcp/sandbox-host.mjs +1 -1
  77. package/dist/mcp/server.mjs +2402 -577
  78. package/dist/mcp/showcase-host.mjs +165 -41
  79. package/dist/mcp/skills.mjs +1 -1
  80. package/dist/mcp/text-diff.mjs +29 -10
  81. package/dist/paint-contracts.mjs +174 -81
  82. package/dist/palette-generated.mjs +2 -2
  83. package/dist/preview-bun.mjs +493 -187
  84. package/dist/preview-failure.mjs +1 -1
  85. package/dist/preview-files.mjs +13 -13
  86. package/dist/preview-imports.mjs +104 -55
  87. package/dist/preview-inputs.mjs +2 -2
  88. package/dist/preview-requests.mjs +24 -0
  89. package/dist/preview-resources.mjs +288 -147
  90. package/dist/preview-scope.mjs +5 -4
  91. package/dist/program-cache.mjs +8 -34
  92. package/dist/project-documents.mjs +1 -1
  93. package/dist/public-api.mjs +69 -31
  94. package/dist/public-props.mjs +39 -22
  95. package/dist/{browser-audit → render-audit}/axe-run.mjs +3 -3
  96. package/dist/{browser-audit → render-audit}/image-shape.mjs +2 -2
  97. package/dist/{browser-audit → render-audit}/layout-overflow.mjs +86 -23
  98. package/dist/{browser-audit → render-audit}/non-text-contrast.mjs +86 -27
  99. package/dist/{browser-audit → render-audit}/render-states.mjs +208 -52
  100. package/dist/{browser-audit → render-audit}/worker.mjs +86 -30
  101. package/dist/render-audit.mjs +828 -0
  102. package/dist/render-color-probe.mjs +96 -42
  103. package/dist/resource-limits.mjs +229 -97
  104. package/dist/runtime-contracts.mjs +467 -185
  105. package/dist/scenario-groups.mjs +22 -10
  106. package/dist/scenario-inspector.mjs +6 -43
  107. package/dist/scenario-program.mjs +8 -25
  108. package/dist/scenario-registry.mjs +72 -30
  109. package/dist/scenario-selectors.mjs +161 -64
  110. package/dist/scenario-slots.mjs +149 -56
  111. package/dist/scenario-trace.mjs +215 -109
  112. package/dist/scenarios-compiler.mjs +719 -378
  113. package/dist/scenarios-vite.d.mts +1 -3
  114. package/dist/scenarios-vite.mjs +2 -81
  115. package/dist/scenarios.mjs +421 -157
  116. package/dist/selector-match.mjs +2 -2
  117. package/dist/showcase/client.bundle.js +57 -56
  118. package/dist/showcase/draft-navigation.js +18 -0
  119. package/dist/showcase/favicon.ico +0 -0
  120. package/dist/showcase/favicon.svg +1 -0
  121. package/dist/showcase/foundation-view.css +55 -0
  122. package/dist/showcase/foundation-view.mjs +252 -0
  123. package/dist/showcase/guide-controls.ads.review.mjs +32 -0
  124. package/dist/showcase/icons.js +1 -145
  125. package/dist/showcase/index.html +3 -31
  126. package/dist/showcase/preview-frame.ads.review.css +46 -0
  127. package/dist/showcase/preview-frame.ads.review.d.mts +11 -0
  128. package/dist/showcase/preview-frame.ads.review.mjs +22 -0
  129. package/dist/showcase/preview-state.js +0 -9
  130. package/dist/showcase/refresh-scheduler.js +23 -0
  131. package/dist/showcase/style.css +5 -47
  132. package/dist/showcase/ui/ui.css +1353 -0
  133. package/dist/showcase/ui/ui.js +1062 -0
  134. package/dist/showcase-coverage.mjs +58 -37
  135. package/dist/skills/README.md +24 -23
  136. package/dist/skills/ads-designer/README.md +8 -2
  137. package/dist/skills/ads-designer/SKILL.md +130 -119
  138. package/dist/skills/ads-designer/references/accessibility.md +12 -13
  139. package/dist/skills/ads-designer/references/atomic-styles.md +4 -4
  140. package/dist/skills/ads-designer/references/behaviors.md +30 -27
  141. package/dist/skills/ads-designer/references/branding.md +98 -10
  142. package/dist/skills/ads-designer/references/captures.md +25 -0
  143. package/dist/skills/ads-designer/references/cli.md +21 -24
  144. package/dist/skills/ads-designer/references/contracts.md +7 -6
  145. package/dist/skills/ads-designer/references/design-data.md +49 -52
  146. package/dist/skills/ads-designer/references/drafts.md +20 -17
  147. package/dist/skills/ads-designer/references/evidence.md +1 -5
  148. package/dist/skills/ads-designer/references/guarded-editing.md +14 -18
  149. package/dist/skills/ads-designer/references/layers.md +1 -1
  150. package/dist/skills/ads-designer/references/layout.md +347 -0
  151. package/dist/skills/ads-designer/references/mobile.md +2 -1
  152. package/dist/skills/{ads-motion/references/performance.md → ads-designer/references/motion-performance.md} +5 -1
  153. package/dist/skills/{ads-motion/references/build.md → ads-designer/references/motion.md} +73 -5
  154. package/dist/skills/ads-designer/references/review.md +37 -34
  155. package/dist/skills/ads-designer/references/runtimes.md +33 -30
  156. package/dist/skills/ads-designer/references/scenarios.md +16 -18
  157. package/dist/skills/{ads-break-ui/references/catalog.md → ads-designer/references/stress-catalog.md} +3 -1
  158. package/dist/skills/ads-designer/references/stress-test.md +68 -0
  159. package/dist/skills/ads-designer/references/validation.md +83 -75
  160. package/dist/skills/ads-designer/references/workflows.md +8 -33
  161. package/dist/skills/ads-import/SKILL.md +43 -325
  162. package/dist/skills/ads-import/references/atomic-styles.md +4 -4
  163. package/dist/skills/ads-import/references/behaviors.md +30 -27
  164. package/dist/skills/ads-import/references/branding.md +5 -5
  165. package/dist/skills/ads-import/references/captures.md +25 -0
  166. package/dist/skills/ads-import/references/cli.md +21 -24
  167. package/dist/skills/ads-import/references/compatibility.md +1 -1
  168. package/dist/skills/ads-import/references/contracts.md +7 -6
  169. package/dist/skills/ads-import/references/design-data.md +49 -52
  170. package/dist/skills/ads-import/references/drafts.md +20 -17
  171. package/dist/skills/ads-import/references/evidence.md +1 -5
  172. package/dist/skills/ads-import/references/guarded-editing.md +14 -18
  173. package/dist/skills/ads-import/references/implementation.md +2 -1
  174. package/dist/skills/ads-import/references/layers.md +1 -1
  175. package/dist/skills/ads-import/references/layout.md +347 -0
  176. package/dist/skills/ads-import/references/review.md +37 -34
  177. package/dist/skills/ads-import/references/runtimes.md +33 -30
  178. package/dist/skills/ads-import/references/scenarios.md +16 -18
  179. package/dist/skills/ads-import/references/tokens.md +3 -3
  180. package/dist/skills/ads-import/references/validation.md +83 -75
  181. package/dist/skills/ads-import/references/workflows.md +8 -33
  182. package/dist/skills/ads-migrate/SKILL.md +56 -0
  183. package/dist/skills/ads-migrate/references/0.4.1-to-0.4.2.md +602 -0
  184. package/dist/skills/ads-port/SKILL.md +54 -343
  185. package/dist/skills/ads-port/references/atomic-styles.md +4 -4
  186. package/dist/skills/ads-port/references/behaviors.md +30 -27
  187. package/dist/skills/ads-port/references/captures.md +25 -0
  188. package/dist/skills/ads-port/references/cli.md +21 -24
  189. package/dist/skills/ads-port/references/contracts.md +7 -6
  190. package/dist/skills/ads-port/references/design-data.md +49 -52
  191. package/dist/skills/ads-port/references/drafts.md +20 -17
  192. package/dist/skills/ads-port/references/evidence.md +1 -5
  193. package/dist/skills/ads-port/references/guarded-editing.md +14 -18
  194. package/dist/skills/ads-port/references/layers.md +1 -1
  195. package/dist/skills/ads-port/references/layout.md +347 -0
  196. package/dist/skills/ads-port/references/lint-and-docs.md +8 -11
  197. package/dist/skills/ads-port/references/native-implementation.md +2 -1
  198. package/dist/skills/ads-port/references/review.md +37 -34
  199. package/dist/skills/ads-port/references/runtimes.md +33 -30
  200. package/dist/skills/ads-port/references/scenarios.md +16 -18
  201. package/dist/skills/ads-port/references/validation.md +83 -75
  202. package/dist/skills/ads-port/references/workflows.md +8 -33
  203. package/dist/source-symbols.mjs +1 -8
  204. package/dist/source-values.mjs +266 -128
  205. package/dist/spatial-composition.mjs +322 -0
  206. package/dist/spatial-contexts.cjs +56 -0
  207. package/dist/spatial-css.cjs +351 -0
  208. package/dist/spatial-inputs.cjs +80 -0
  209. package/dist/spatial-metadata.mjs +18 -0
  210. package/dist/spatial-model.cjs +322 -0
  211. package/dist/spatial.mjs +21 -0
  212. package/dist/stage-timing.cjs +20 -0
  213. package/dist/starters/preact/design-system/patterns/Conversation/Conversation.tsx +105 -0
  214. package/dist/starters/preact/design-system/patterns/Shell/Shell.tsx +275 -0
  215. package/dist/starters/preact/design-system/review/demo-frame/DemoFrame.ads.review.tsx +7 -0
  216. package/dist/starters/preact/design-system/review/screen-frame/ScreenFrame.ads.review.tsx +10 -0
  217. package/dist/starters/preact/design-system/showcase/mcp/main.ads.mount.tsx +8 -0
  218. package/dist/starters/preact/ds.config.json +25 -6
  219. package/dist/starters/preact/package.json +4 -8
  220. package/dist/starters/preact/tsconfig.json +4 -5
  221. package/dist/starters/preact/vite.config.ts +3 -3
  222. package/dist/starters/react/ADS.md +42 -47
  223. package/dist/starters/react/README.md +47 -49
  224. package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.tsx +18 -2
  225. package/dist/starters/react/design-system/components/Actions/IconButton/README.md +3 -0
  226. package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/README.md +5 -0
  227. package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/WorkspacePage.ads.fixture.ts +13 -0
  228. package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/WorkspacePage.ads.scenario.tsx +22 -0
  229. package/dist/starters/react/design-system/index.ts +2 -1
  230. package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.exports.ts +1 -0
  231. package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.fixture.ts +7 -0
  232. package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.scenario.tsx +15 -0
  233. package/dist/starters/react/design-system/patterns/Conversation/Conversation.tsx +105 -0
  234. package/dist/starters/react/design-system/patterns/Conversation/README.md +9 -0
  235. package/dist/starters/react/design-system/patterns/Shell/Floating.ads.fixture.ts +5 -0
  236. package/dist/starters/react/design-system/patterns/Shell/Floating.ads.scenario.tsx +21 -0
  237. package/dist/starters/react/design-system/patterns/Shell/README.md +43 -0
  238. package/dist/starters/react/design-system/patterns/Shell/Shell.ads.exports.ts +1 -0
  239. package/dist/starters/react/design-system/patterns/Shell/Shell.ads.fixture.ts +5 -0
  240. package/dist/starters/react/design-system/patterns/Shell/Shell.ads.scenario.tsx +21 -0
  241. package/dist/starters/react/design-system/patterns/Shell/Shell.tsx +274 -0
  242. package/dist/starters/react/design-system/review/demo-frame/DemoFrame.ads.exports.ts +1 -1
  243. package/dist/starters/react/design-system/review/demo-frame/DemoFrame.ads.review.tsx +7 -0
  244. package/dist/starters/react/design-system/review/index.ads.review.ts +4 -0
  245. package/dist/starters/react/design-system/review/region-block/RegionBlock.ads.exports.ts +1 -0
  246. package/dist/starters/react/design-system/review/region-block/RegionBlock.ads.review.tsx +6 -0
  247. package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.ads.exports.ts +1 -1
  248. package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.ads.review.tsx +10 -0
  249. package/dist/starters/react/design-system/showcase/mcp/{main.tsx → main.ads.mount.tsx} +4 -2
  250. package/dist/starters/react/design-system/tokens/catalog.ads.json +1221 -0
  251. package/dist/starters/react/design-system/tokens/colors.css +1 -1
  252. package/dist/starters/react/design-system/tokens/spacing.css +22 -32
  253. package/dist/starters/react/design-system/tokens/spatial.ads.json +70 -0
  254. package/dist/starters/react/design-system/tokens/themes.generated.ts +1 -1
  255. package/dist/starters/react/ds.config.json +25 -6
  256. package/dist/starters/react/package.json +2 -6
  257. package/dist/starters/react/tsconfig.json +2 -3
  258. package/dist/starters/react/vite.config.ts +3 -3
  259. package/dist/style-boundaries.mjs +70 -25
  260. package/dist/task-cache.mjs +173 -72
  261. package/dist/task-worker.mjs +22 -11
  262. package/dist/test-boundaries.mjs +132 -59
  263. package/dist/themes-generated.mjs +1 -1
  264. package/dist/themes-watch.mjs +57 -22
  265. package/dist/themes.mjs +176 -73
  266. package/dist/token-export.mjs +39 -14
  267. package/dist/token-policy.mjs +6 -3
  268. package/dist/token-quality.mjs +6 -6
  269. package/dist/token-samples.mjs +16 -5
  270. package/dist/tokens.mjs +71 -26
  271. package/dist/ui-framework.mjs +16 -14
  272. package/dist/unit-contracts.mjs +251 -104
  273. package/dist/units.mjs +208 -98
  274. package/dist/usage.mjs +138 -38
  275. package/dist/validation-checks.mjs +115 -38
  276. package/dist/validation-inputs.mjs +187 -78
  277. package/dist/validation.mjs +268 -102
  278. package/dist/verification/browser.mjs +27 -5
  279. package/dist/verification.mjs +711 -187
  280. package/docs/ADS.md +90 -79
  281. package/docs/ARCHITECTURE.md +294 -136
  282. package/docs/BEHAVIORS.md +29 -25
  283. package/docs/CACHING.md +52 -17
  284. package/docs/CHANGELOG.md +309 -17
  285. package/docs/CONTRACTS.md +12 -4
  286. package/docs/DESIGN-REFERENCES.md +40 -0
  287. package/docs/GUIDE.md +270 -258
  288. package/docs/MCP.md +181 -324
  289. package/docs/SPATIAL-CHECKS.md +69 -0
  290. package/docs/benchmarks/README.md +39 -0
  291. package/package.json +42 -34
  292. package/dist/browser-audit.mjs +0 -429
  293. package/dist/create.mjs +0 -48
  294. package/dist/lint-config.mjs +0 -50
  295. package/dist/mcp/project-widget.bundle.js +0 -114
  296. package/dist/mcp/reports.mjs +0 -101
  297. package/dist/mcp/widget.bundle.js +0 -147
  298. package/dist/oxlint.mjs +0 -89
  299. package/dist/preview-builder.mjs +0 -133
  300. package/dist/preview-workers.mjs +0 -184
  301. package/dist/showcase.mjs +0 -77
  302. package/dist/skills/ads-break-ui/LICENSE.upstream +0 -21
  303. package/dist/skills/ads-break-ui/README.md +0 -16
  304. package/dist/skills/ads-break-ui/SKILL.md +0 -412
  305. package/dist/skills/ads-break-ui/agents/openai.yaml +0 -4
  306. package/dist/skills/ads-break-ui/references/atomic-styles.md +0 -293
  307. package/dist/skills/ads-break-ui/references/behaviors.md +0 -412
  308. package/dist/skills/ads-break-ui/references/captures.md +0 -135
  309. package/dist/skills/ads-break-ui/references/contracts.md +0 -317
  310. package/dist/skills/ads-break-ui/references/design-data.md +0 -354
  311. package/dist/skills/ads-break-ui/references/drafts.md +0 -194
  312. package/dist/skills/ads-break-ui/references/evidence.md +0 -128
  313. package/dist/skills/ads-break-ui/references/guarded-editing.md +0 -165
  314. package/dist/skills/ads-break-ui/references/layers.md +0 -145
  315. package/dist/skills/ads-break-ui/references/reporting.md +0 -101
  316. package/dist/skills/ads-break-ui/references/review.md +0 -97
  317. package/dist/skills/ads-break-ui/references/runtimes.md +0 -203
  318. package/dist/skills/ads-break-ui/references/scenarios.md +0 -246
  319. package/dist/skills/ads-break-ui/references/validation.md +0 -166
  320. package/dist/skills/ads-break-ui/references/verification.md +0 -58
  321. package/dist/skills/ads-break-ui/references/workflows.md +0 -90
  322. package/dist/skills/ads-designer/references/reporting.md +0 -101
  323. package/dist/skills/ads-import/references/reporting.md +0 -101
  324. package/dist/skills/ads-motion/LICENSE.upstream +0 -21
  325. package/dist/skills/ads-motion/README.md +0 -22
  326. package/dist/skills/ads-motion/SKILL.md +0 -385
  327. package/dist/skills/ads-motion/agents/openai.yaml +0 -4
  328. package/dist/skills/ads-motion/references/atomic-styles.md +0 -293
  329. package/dist/skills/ads-motion/references/audit.md +0 -44
  330. package/dist/skills/ads-motion/references/behaviors.md +0 -412
  331. package/dist/skills/ads-motion/references/captures.md +0 -135
  332. package/dist/skills/ads-motion/references/contracts.md +0 -317
  333. package/dist/skills/ads-motion/references/design-data.md +0 -354
  334. package/dist/skills/ads-motion/references/drafts.md +0 -194
  335. package/dist/skills/ads-motion/references/evidence.md +0 -128
  336. package/dist/skills/ads-motion/references/guarded-editing.md +0 -165
  337. package/dist/skills/ads-motion/references/layers.md +0 -145
  338. package/dist/skills/ads-motion/references/motion-review.md +0 -35
  339. package/dist/skills/ads-motion/references/reporting.md +0 -101
  340. package/dist/skills/ads-motion/references/review.md +0 -97
  341. package/dist/skills/ads-motion/references/runtimes.md +0 -203
  342. package/dist/skills/ads-motion/references/scenarios.md +0 -246
  343. package/dist/skills/ads-motion/references/validation.md +0 -166
  344. package/dist/skills/ads-motion/references/verification.md +0 -39
  345. package/dist/skills/ads-motion/references/workflows.md +0 -90
  346. package/dist/skills/ads-port/references/reporting.md +0 -101
  347. package/dist/starters/preact/design-system/components/Layout/Grid/Grid.ads.contract.ts +0 -6
  348. package/dist/starters/preact/design-system/components/Layout/Grid/Grid.tsx +0 -76
  349. package/dist/starters/preact/design-system/review/demo-frame/DemoFrame.tsx +0 -29
  350. package/dist/starters/preact/design-system/review/screen-frame/ScreenFrame.tsx +0 -34
  351. package/dist/starters/preact/design-system/review/token-preview/TokenPreview.ads.contract.ts +0 -6
  352. package/dist/starters/preact/design-system/review/token-preview/TokenPreview.tsx +0 -137
  353. package/dist/starters/preact/design-system/showcase/mcp/main.tsx +0 -6
  354. package/dist/starters/react/design-system/brand/Icons/AppIcon/AppIcon.ads.fixture.ts +0 -7
  355. package/dist/starters/react/design-system/brand/Icons/AppIcon/AppIcon.ads.scenario.tsx +0 -4
  356. package/dist/starters/react/design-system/brand/Identity/Logo/Logo.ads.fixture.ts +0 -7
  357. package/dist/starters/react/design-system/brand/Identity/Logo/Logo.ads.scenario.tsx +0 -4
  358. package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.contract.ts +0 -6
  359. package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.exports.ts +0 -1
  360. package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.fixture.ts +0 -12
  361. package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.scenario.tsx +0 -17
  362. package/dist/starters/react/design-system/components/Layout/Grid/Grid.tsx +0 -75
  363. package/dist/starters/react/design-system/components/Layout/Grid/README.md +0 -21
  364. package/dist/starters/react/design-system/review/brand-preview/BrandPreview.ads.exports.ts +0 -1
  365. package/dist/starters/react/design-system/review/brand-preview/BrandPreview.tsx +0 -112
  366. package/dist/starters/react/design-system/review/demo-frame/DemoFrame.tsx +0 -29
  367. package/dist/starters/react/design-system/review/grid-cell/GridCell.ads.exports.ts +0 -1
  368. package/dist/starters/react/design-system/review/grid-cell/GridCell.tsx +0 -18
  369. package/dist/starters/react/design-system/review/index.ts +0 -6
  370. package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.tsx +0 -34
  371. package/dist/starters/react/design-system/review/token-preview/TokenPreview.ads.contract.ts +0 -6
  372. package/dist/starters/react/design-system/review/token-preview/TokenPreview.ads.exports.ts +0 -1
  373. package/dist/starters/react/design-system/review/token-preview/TokenPreview.tsx +0 -137
  374. package/dist/starters/react/design-system/showcase/mcp/index.html +0 -1
  375. package/dist/starters/react/design-system/tokens/Color.ads.fixture.ts +0 -124
  376. package/dist/starters/react/design-system/tokens/Color.ads.scenario.tsx +0 -4
  377. package/dist/starters/react/design-system/tokens/Layout.ads.fixture.ts +0 -39
  378. package/dist/starters/react/design-system/tokens/Layout.ads.scenario.tsx +0 -4
  379. package/dist/starters/react/design-system/tokens/Motion.ads.fixture.ts +0 -18
  380. package/dist/starters/react/design-system/tokens/Motion.ads.scenario.tsx +0 -4
  381. package/dist/starters/react/design-system/tokens/Shape.ads.fixture.ts +0 -30
  382. package/dist/starters/react/design-system/tokens/Shape.ads.scenario.tsx +0 -4
  383. package/dist/starters/react/design-system/tokens/Space.ads.fixture.ts +0 -37
  384. package/dist/starters/react/design-system/tokens/Space.ads.scenario.tsx +0 -4
  385. package/dist/starters/react/design-system/tokens/Type.ads.fixture.ts +0 -29
  386. package/dist/starters/react/design-system/tokens/Type.ads.scenario.tsx +0 -4
  387. package/dist/starters/react/package-lock.json +0 -4707
  388. package/dist/token-fixtures.mjs +0 -30
  389. package/docs/benchmarks/bun-previews.md +0 -91
  390. package/docs/benchmarks/preview-memory.md +0 -147
  391. package/docs/benchmarks/turbo-poc.md +0 -284
  392. package/docs/plans/execution-coordination.md +0 -57
  393. /package/dist/{browser-audit → render-audit}/first-render.mjs +0 -0
  394. /package/dist/{browser-audit → render-audit}/layout-shift.mjs +0 -0
@@ -1,30 +0,0 @@
1
- import { inspectTokens } from "./tokens.mjs";
2
- import { inspectScenarios, tokenSampleSource } from "./scenarios.mjs";
3
- import { inspectUnits } from "./units.mjs";
4
- import { validTokenSamples } from "./token-samples.mjs";
5
- import { textDiff } from "./mcp/text-diff.mjs";
6
-
7
- /** Preserve project bindings; new meanings always need project-selected inputs. */
8
- export function reconcileTokenSamples(options, {id, bindings = []}) {
9
- if (bindings.length && !validTokenSamples(bindings)) throw new Error("Bindings need distinct {token, property, probe} CSS samples.");
10
- const inventory = inspectTokens(options.root), registry = inspectScenarios(options), units = inspectUnits(options);
11
- const scenario = registry.scenarios.find(entry => entry.id === id && entry.kind === "tokens");
12
- if (!scenario) throw new Error("Select an exact token scenario ID from ads_scenarios.");
13
- const owner = units.owner(units.relative(scenario.file));
14
- const owned = new Set(inventory.tokens.filter(token => token.owner === owner).map(token => token.name));
15
- if (bindings.some(sample => !owned.has(sample.token))) throw new Error("New sample bindings must name real tokens from this scenario's owner.");
16
- const removed = scenario.samples.filter(sample => !owned.has(sample.token)).map(sample => sample.token);
17
- const samples = new Map(scenario.samples.filter(sample => owned.has(sample.token)).map(sample => [`${sample.token}:${sample.property}`, sample]));
18
- for (const sample of bindings) samples.set(`${sample.token}:${sample.property}`, sample);
19
- if (!samples.size) throw new Error("A token scenario needs at least one real sample; supply a binding or remove the obsolete scenario with an owner patch.");
20
- const represented = new Set(registry.scenarios.filter(entry => entry.kind === "tokens" && entry.id !== id).flatMap(entry => (entry.samples ?? []).map(sample => sample.token)));
21
- for (const sample of samples.values()) represented.add(sample.token);
22
- const unresolved = [...owned].filter(name => !represented.has(name));
23
- const source = tokenSampleSource(options,scenario);
24
- const list = [...samples.values()];
25
- const current = scenario.samples;
26
- const next = JSON.stringify(current) === JSON.stringify(list) ? source.content : source.content.slice(0,source.start) + JSON.stringify(list,null,2) + source.content.slice(source.end);
27
- return {unit:owner,id,file:source.file,sampleCount:list.length,removed,unresolved,
28
- patch:textDiff(source.file,source.content,next),
29
- guidance:"Bindings and probes belong to the project. No token-name/type heuristic chooses a renderer or probe. The proposed owner patch goes into a draft; review its real preview before accepting."};
30
- }
@@ -1,91 +0,0 @@
1
- # Native Bun previews: compilation, resources and restart reuse
2
-
3
- Local measurements on 23 October 2026, using the same frozen 865-file application
4
- snapshot (4,389,282 authored bytes, 151 scenarios) as the earlier memory work.
5
- The live application checkout and its installed ADS package were not patched. Real
6
- MCP Apps ran in headless Chrome. These are local observations, not service limits.
7
-
8
- ## Startup and warming
9
-
10
- | Measurement | Native Bun result |
11
- | --- | ---: |
12
- | MCP serving URL | 0.98–1.12 s |
13
- | First requested Slack settings preview compiled, including startup | 6.1–6.4 s |
14
- | All 151 views compiled, including startup | 7.7–7.9 s |
15
- | All 151 views current after native gates | 16.9–20.4 s |
16
- | Selecting an already warmed Popover, no compilation | 0.29–0.56 s |
17
- | Peak process-tree PSS, including browser verification | 2.17 GiB |
18
- | Main process RSS after semantic worker retirement | 409–413 MiB |
19
-
20
- Each run used a 4 GiB process-tree memory limit, disabled swap within that
21
- scope, and a 1,000 MiB Node heap limit. It loaded Slack settings and exercised
22
- the real Popover control after warming. Two warm-cache restarts then recovered
23
- all 151 current views in 3.8 and 4.1 seconds, with **zero Bun compiler
24
- invocations**, identical graph identity, and 313–315 MiB main-process RSS.
25
- Cached bytes are still integrity-checked and republished into each managed session.
26
-
27
- The initial sequential scheduler repeatedly bundled growing prefixes of the
28
- catalogue. An earlier run of that implementation took 206 seconds to make all
29
- 151 views current. The current scheduler compiles the prioritized view first,
30
- then the remaining graph in one background job. Jobs remain sequential in one
31
- compiler, with foreground requests ahead of queued warming. That earlier run
32
- used a 3 GiB scope and a different Node heap limit, so it is not an exact
33
- controlled timing ratio.
34
-
35
- Two restart defects were found with these checks: removed generated entry files
36
- were accidentally treated as source dependencies, and graphs followed navigation
37
- order rather than canonical discovery order. Both are covered by restart tests,
38
- including a remembered view that is not first in the catalogue.
39
-
40
- ## CSS ownership and deferred resources
41
-
42
- With all 151 scenarios compiled together, the frozen snapshot's development
43
- dependency closures contain approximately:
44
-
45
- | Preview | Owner CSS | Complete CSS dependency closure |
46
- | --- | ---: | ---: |
47
- | Popover | 5.5 kB | 18.6 kB |
48
- | MessageScroller | 1.1 kB | 43.2 kB |
49
- | Conversation pattern | 4.3 kB | 90.7 kB |
50
- | Native AppShell | 15.1 kB | 48.6 kB |
51
- | Full chat composition | — | 175.0 kB |
52
-
53
- Closures include the 6.6 kB foundation. The 53.3 kB font is a separate asset,
54
- not embedded in CSS. Development comments include source paths, so byte counts
55
- vary slightly with the isolated working directory. These are preview resources,
56
- not measurements of the consuming application's minified production output.
57
-
58
- The full chat demonstration eagerly imports every route plus voice, terminal
59
- and workflow demonstrations. Its larger closure reflects that composition;
60
- ADS cannot defer an application's ordinary static imports automatically.
61
- Pure public barrels are narrowed only when their owning package explicitly
62
- declares an applicable `sideEffects` policy. Executable/unknown barrels retain
63
- normal bundler semantics.
64
-
65
- ADS's own `composition/OnDemand` example demonstrates the supported alternative
66
- using its real shell and components. Browser tests observe actual MCP resource
67
- reads: the Details module and SummaryList CSS remain unread until Details opens,
68
- load once, and retain both page notes and left-pane state on revisit. Warming
69
- all 44 example views neither fetches unopened peers nor remounts the shell.
70
- A separate browser regression updates an opened lazy branch's CSS without
71
- changing its JavaScript bytes; the visible styles update and form state remains.
72
-
73
- ## Reproduction
74
-
75
- Use a frozen source snapshot and idle consumers; do not benchmark by editing a
76
- live developer's files. `scripts/benchmarks/preview-memory/prepare.mjs`
77
- creates isolated inputs. Set `ADS_BENCH_NATIVE=1` for the native compiler and
78
- `ADS_BENCH_OUTPUT` for the owned output directory. The monitor samples all child
79
- processes' PSS/RSS from `/proc`; run it in a bounded memory scope:
80
-
81
- ```sh
82
- ADS_BENCH_NATIVE=1 ADS_BENCH_OUTPUT=output/bun-proof \
83
- node scripts/benchmarks/preview-memory/prepare.mjs /path/to/project candidate 1
84
- ADS_BENCH_WARM=1 ADS_BENCH_BROWSER=1 ADS_BENCH_DRIVER=./preview.mjs \
85
- bun scripts/benchmarks/preview-memory/monitor.mjs output/bun-proof/candidate-1
86
- ```
87
-
88
- `tests/bun-preview.test.mjs` verifies React/Preact rendering, workers/assets,
89
- source updates and unchanged restarts. `tests/example-lazy-browser.test.mjs`
90
- checks the real example; `tests/lazy-styles-browser.test.mjs` covers CSS-only lazy
91
- updates. These focused checks supplement the complete release test suite.
@@ -1,147 +0,0 @@
1
- # Draft acceptance: memory and compiler reuse
2
-
3
- Historical ADS 0.3.35 measurement. The compiler parking and project Vite adapter
4
- described here have been superseded by independent interactive compilation and
5
- ADS-owned Bun previews; see [native preview measurements](bun-previews.md).
6
-
7
- Measured on 23 October 2026 using a frozen source snapshot of a production application and real MCP
8
- Apps in headless Chrome. the installed application package and working source were not
9
- patched. The baseline distribution matched published ADS 0.3.34 byte for byte.
10
-
11
- | Measurement | ADS 0.3.34 | Changed implementation |
12
- | --- | ---: | ---: |
13
- | Peak process-tree PSS | 7.99 GiB | 4.56 GiB |
14
- | Peak process-tree RSS | 8.82 GiB | 5.50 GiB |
15
- | Main Bun process peak PSS, including benchmark driver | 3.71 GiB | 2.11 GiB |
16
- | Idle PSS after acceptance 1 | 3.30 GiB | 1.49 GiB |
17
- | Idle PSS after acceptance 2 | 4.70 GiB | 1.71 GiB |
18
- | Acceptance 1, including all configured gates | 101.0 s | 81.3 s |
19
- | Acceptance 2, including all configured gates | 116.3 s | 81.8 s |
20
- | Reopen accepted preview after acceptance 1 | 14.3 s | 8.0 s |
21
- | Reopen accepted preview after acceptance 2 | 14.0 s | 7.4 s |
22
- | Complete two-cycle workflow | 355.7 s | 270.3 s |
23
-
24
- Peak proportional memory fell by 43%; the complete workload took 24% less time.
25
- These are local observations from this workload, not a latency or memory limit
26
- for every design system. Two cycles demonstrate substantially lower retention;
27
- they do not establish the absence of every long-session leak.
28
-
29
- ## Workload and controls
30
-
31
- Each cycle creates a Popover owner draft, adds a comment to its owned fixture,
32
- opens the actual draft App, accepts the reviewed revision, reopens the accepted
33
- App, and observes a two-second idle window. This exercises source revision
34
- changes without changing the rendered UI. The full catalog contains 151
35
- scenarios. Both cycles passed all nine acceptance gates and the selected
36
- registered Popover behavior check, with zero diagnostics or warnings.
37
-
38
- Both versions run the project's architecture checks, registered Oxlint rules,
39
- `lint:ds`, typecheck, native app build/audit, frontend tests, application browser
40
- tests and the affected registered behavior checks. The candidate configuration
41
- removes `build:mcp-previews` from `mutationChecks`; ADS performs that complete
42
- production preview build itself and shares its host/graph with verification.
43
- The adapter's validation callback still runs. No configured check was bypassed.
44
-
45
- Node v24.13.0 and Bun 1.3.13 were used. Both comparison runs had an 8 GiB systemd
46
- scope limit, no additional swap, one Playwright worker in each application runner, and
47
- `NODE_OPTIONS=--max-old-space-size=1536`. Bun's `--smol` flag was not used. PSS and
48
- RSS were sampled from `/proc` every approximately 200 ms across the MCP process,
49
- compiler, validators, browser and descendants. Idle values are medians over the
50
- two-second windows. The main-process measurement includes the same benchmark
51
- driver in both runs. Filesystem caches were not forcibly cleared.
52
-
53
- The frozen source contains 865 files. Its SHA-256 inventory identity is
54
- `b1c4de874e303f6c8a1eb976f5014fcb2589b773cc62fb9b08db8e21d99c0094`.
55
- The 286-file baseline distribution identity is
56
- `2f6f81127d585941c70b1bfd2829fdb19b9c89ba4719df08a2d8207d4f11c3e8`.
57
- Local raw results are `output/memory-benchmark/baseline-5-metrics.json`,
58
- `candidate-6-metrics.json`, `final-comparison.json` and `identities.json`.
59
-
60
- ## Findings and changes
61
-
62
- Accepted and draft compilers previously remained warm during isolated candidate
63
- validation. The main MCP process also performed candidate architecture analysis
64
- and retained semantic program state. Acceptance now parks preview compilers
65
- while keeping their published resources readable. Analysis uses a short-lived
66
- owned process; idle semantic workers retire after five seconds. Compilers resume
67
- lazily and preserve the publication session. Current accepted previews remain
68
- readable; requests requiring a new verified build wait or cancel.
69
-
70
- Production compilation now happens once in the candidate's managed compiler.
71
- The same checked graph serves its registered browser verification. Development
72
- output cannot satisfy a production-build check. Candidate source, outputs and
73
- reviewed draft revisions retain their existing publication fences.
74
-
75
- The initial lifecycle change roughly halved memory but made accepted-preview
76
- reopening slower. A real application probe explained the remaining rebuild: its full
77
- cache was 10,003,007 bytes, above the reader's 8,388,608-byte limit. It repeated
78
- the same 520 dependency hashes separately for 151 scenarios. Small fixtures
79
- had not exposed this size boundary.
80
-
81
- The cache now stores shared dependency sets once and checks shared hashes once
82
- per operation. The application's complete cache is 252,861 bytes, with 151 entries and one
83
- dependency set. Metadata transfers with matching accepted source so parked
84
- compiler restarts can reuse it. Compiler fingerprints use the same declared
85
- configuration and opaque-input boundary as guarded copies, with canonical
86
- ordering under Node and Bun. Unrelated local MCP launcher JSON is not a compiler
87
- input. Hash memos do not survive an operation or hide later edits.
88
-
89
- Validation subprocesses also have ownership guards. On Linux these retain
90
- descendant identities so detached browser web servers are cleaned up after a
91
- launcher exits or its owner is forcibly killed. A timed-out calibration exposed
92
- one such orphan in the old pipeline; the owned calibration processes were
93
- removed.
94
-
95
- ## Reproduction
96
-
97
- Use Linux, Node, Bun, Chrome and an ADS project checkout with its dependencies installed.
98
- To move the app's own Playwright server off its usual port, set `ADS_BENCH_APP_CONFIG` (its
99
- config file, relative to the project) and `ADS_BENCH_APP_PORT` (the port to replace).
100
- Build ADS first. Preparing a series freezes source and the installed baseline
101
- distribution under `output/memory-benchmark`; use a fresh `ADS_BENCH_OUTPUT`
102
- directory for a new source/dependency baseline. Preparation changes only the
103
- generated copies. It moves the application tests' port when asked (above) and adjusts the
104
- candidate's mutation-check list for managed production compilation.
105
-
106
- ```sh
107
- node scripts/build-ads-tool.mjs
108
- node scripts/benchmarks/preview-memory/prepare.mjs /path/to/project baseline 1
109
- node scripts/benchmarks/preview-memory/prepare.mjs /path/to/project candidate 1
110
- ```
111
-
112
- Run the following separately for `baseline-1` and `candidate-1`, with Node and
113
- Bun on PATH. Do not run the two workloads simultaneously.
114
-
115
- ```sh
116
- systemd-run --user --scope -p MemoryMax=8G -p MemorySwapMax=0 \
117
- timeout --kill-after=5s 900s env NODE_OPTIONS=--max-old-space-size=1536 \
118
- node scripts/benchmarks/preview-memory/monitor.mjs \
119
- output/memory-benchmark/baseline-1
120
- ```
121
-
122
- ```sh
123
- node scripts/benchmarks/preview-memory/report.mjs \
124
- output/memory-benchmark/baseline-1-metrics.json \
125
- output/memory-benchmark/candidate-1-metrics.json
126
- ```
127
-
128
- The monitor writes checkpoints during the run so an enforced memory limit does
129
- not erase the samples. `ADS_BENCH_CYCLES` controls repetitions. Set
130
- `ADS_BENCH_RUNTIME_SOURCE=1` to edit runtime Popover source instead; in this
131
- snapshot that selects 74 registered behavior checks and is a much longer
132
- workload. All selected checks remain mandatory.
133
-
134
- ## Final verification
135
-
136
- `ADS_TEST_BUN=1 npm test` passed **547/547 tests**, with zero failures,
137
- cancellations or skips, on the final source (644 seconds). Tool lint and
138
- benchmark-helper lint passed. The suite includes oversized-cache restart reuse,
139
- fresh dependency checks, Bun portability, production-versus-development reuse,
140
- catalog failure/recovery, current-view reads while parked, cancellation,
141
- configuration replacement, process ownership and read-only architecture checks.
142
-
143
- The performance samples identify their measured runtime separately from the
144
- final distribution in `output/memory-benchmark/identities.json`. Subsequent
145
- recovery and read-only hardening was included in the final full suite. These
146
- changes ship in ADS 0.3.35. Upgrade consumers before removing the standalone
147
- preview-build script from `mcp.mutationChecks`; keep it in the normal build.
@@ -1,284 +0,0 @@
1
- # Turborepo POC: immutable batch tasks
2
-
3
- Measured locally on 26 October 2026 with ADS 0.3.41, Turbo 2.11.10,
4
- Bun 1.4.1 and Node 24.13.0 on Linux x64. This is an isolated experiment;
5
- production ADS, project dependencies, policies, MCP locks and CI were not changed.
6
-
7
- ## Workload and controls
8
-
9
- The input is a frozen snapshot of a production application: 885 inventoried validation files,
10
- 5,622,703 bytes, plus copied workspace/generated inputs. Inventoried source digest:
11
- `4666c8a12353d4f60e1cd7828f8ce44a414b802b5dfdde9c18394429346ad9d6`.
12
- Local workspace imports resolve to the snapshot, not the live terminal-renderer
13
- checkout. Installed third-party dependencies are shared read-only. The live
14
- project was used only for reading/preparing this snapshot.
15
-
16
- Each pipeline executes the same three commands through a small report wrapper:
17
-
18
- - ADS architecture/source check, capturing its JSON report.
19
- - The project's complete `tsc --noEmit` typecheck.
20
- - ADS native Bun preview compilation: **129 scenarios, 318 immutable assets**.
21
-
22
- Preview compilation still performs its own mandatory ADS checks. This POC does
23
- not remove that existing duplication. Both direct and Turbo variants perform the
24
- same work. Direct warm compilation uses ADS's existing persisted preview cache;
25
- it is not forced to compile again for an artificial comparison.
26
-
27
- Turbo runs in single-package mode with local caching only and a two-task limit.
28
- Inputs conservatively include the entire frozen source, lockfile, configuration,
29
- task wrapper and recorded toolchain. Task outputs contain reports and the compiled
30
- preview graph/cache. Live build-status files, locks, run journals, acceptance
31
- baselines and verification outcomes are excluded. No remote service or CI is used.
32
-
33
- Cold means empty ADS/Turbo build caches, not an empty operating-system disk cache.
34
- Cold/edit comparisons have one trial per mode; unchanged warm comparisons have
35
- three. Tests are local observations, not service limits or statistical guarantees.
36
-
37
- ## Results
38
-
39
- | Workload | Direct sequential | Turbo, two tasks |
40
- | --- | ---: | ---: |
41
- | Cold complete pipeline | 18.737 s | 11.645 s |
42
- | Unchanged pipeline, median of three | 11.059 s | 0.070 s |
43
- | Component source edit | 17.773 s | 11.228 s |
44
- | Shared token edit | 17.671 s | 11.257 s |
45
-
46
- The three unchanged Turbo runs took 81, 70 and 69 ms, executing **zero tasks**.
47
- Direct unchanged preview compilation alone took 1.585, 1.710 and 1.541 seconds;
48
- the remaining direct time was the source check and typecheck. Warm runs are much
49
- faster because Turbo skips matching task execution, not because it compiles faster.
50
-
51
- A scheduling control separates that cache benefit from ordinary parallelism:
52
-
53
- | Cold scheduling control | Time | Sampled peak process-tree PSS |
54
- | --- | ---: | ---: |
55
- | Direct, sequential | 18.737 s | 1,937 MiB |
56
- | Turbo, sequential | 18.512 s | 1,790 MiB |
57
- | Direct, simple two-worker queue | 11.428 s | 2,815 MiB |
58
- | Turbo, two tasks | 11.645 s | 2,842 MiB |
59
-
60
- Cold timing differences between equivalent scheduling modes are small and within
61
- normal local variation. A simple two-worker queue provides essentially the same
62
- cold improvement. Turbo's demonstrated additional value is the task artifact
63
- cache, not uniquely faster scheduling.
64
-
65
- Memory is sampled through `/proc/*/smaps_rollup` every 150 ms; fast cache hits can
66
- end between samples, so their memory values should not be interpreted as precise
67
- peaks. Every benchmark phase ran inside a 6 GiB process-tree cgroup with swap
68
- disabled. The first run's whole cgroup peaked around 3 GiB, including monitoring,
69
- file-backed memory and other overhead beyond summed process PSS.
70
-
71
- ## Correctness and concurrency checks
72
-
73
- - Deleted all Turbo-variant report outputs and its entire `.ds/` directory.
74
- Turbo restored the artifacts in **82 ms**, with zero tasks executed. ADS's
75
- manifest/asset integrity reader verified all graph links, sizes and byte digests;
76
- the preview revision matched the pre-deletion revision.
77
- - Changed Badge's real default tone, then a shared `--accent` token. Each change
78
- caused all three conservative whole-snapshot tasks to miss cache and execute.
79
- The preview graph revision changed. Repeating each edited pipeline hit cache.
80
- - Introduced an actual TypeScript assignment error. Both attempts failed and
81
- executed the typechecker; a failed task was not reused as a successful result.
82
- - Started two separate Turbo invocations for the same cold source-check key.
83
- Both missed cache and **two source checks executed**, taking about 7.5 seconds
84
- each. Turbo did not combine the requests into one in-flight computation.
85
- Concurrent-run telemetry shares an observation log; use the aggregate count
86
- in `concurrency.json`, rather than summing each invocation's overlapping window.
87
-
88
- These checks establish task invalidation and restored artifact integrity for this
89
- snapshot. They do not establish browser behavior, fresh per-run verification
90
- reports, source isolation during concurrent edits, or acceptance correctness.
91
- The existing ADS coordinator was neither replaced nor bypassed in production.
92
-
93
- ## Assessment
94
-
95
- There is a clear win for repeated identical batch work: approximately **158 times
96
- faster** for this unchanged pipeline. Cold or edited work benefits from parallel
97
- execution, which ADS could also obtain with a small bounded scheduler. Two-task
98
- execution increases the memory requirement; task count alone is not a memory
99
- budget.
100
-
101
- The follow-up integration adopts Turbo as the mandatory internal backend for
102
- controlled architecture batch tasks, with local caching enabled by default. Keep
103
- ADS's source/freshness checks, result ownership, cancellation,
104
- resource budgets and acceptance publication. Keep the live preview compiler warm;
105
- this experiment does not justify launching Turbo on every edit or replacing the
106
- interactive compiler's internal graph cache. Restored assets must be republished
107
- into a current ADS session, distinguishing reused evidence from a new execution.
108
- The follow-up proofs below exercise cross-checkout restoration and browser use.
109
-
110
- This POC intentionally uses broad task inputs. It does not yet demonstrate
111
- component-granular cache reuse or safe parallel MCP acceptance/verification. Those
112
- require ADS dependency selection, isolated outputs and shared in-flight work.
113
-
114
- ## Reproduction and artifacts
115
-
116
- From the ADS checkout, use a fresh output directory and the same frozen-source
117
- input to reproduce exactly. Describe the project in a `poc.json` (paths relative to it):
118
-
119
- ```json
120
- {
121
- "project": "../my-app",
122
- "include": ["client/.generated"],
123
- "ownScopes": ["@my-app"],
124
- "edits": {
125
- "component": { "file": "design/components/Content/Badge/Badge.tsx",
126
- "from": "tone = \"neutral\"", "to": "tone = \"accent\"" },
127
- "token": { "file": "design/tokens/colors.css",
128
- "from": "--color-accent-9-light: #5b5bf7;", "to": "--color-accent-9-light: #123456;" }
129
- }
130
- }
131
- ```
132
-
133
- `include` lists generated folders outside the validation inputs that the build needs,
134
- `ownScopes` the project's own `node_modules` scopes (its workspace packages are linked from
135
- the snapshot instead), and `edits` one component and one token change, each a text
136
- replacement the run applies to measure invalidation.
137
- The runner installs pinned Turbo only inside its output directory. A new snapshot
138
- of an actively edited checkout can differ; preparation rejects detected races.
139
-
140
- ```sh
141
- export ADS_TURBO_POC_OUTPUT=output/turbo-poc-new
142
- systemd-run --user --scope -p MemoryMax=6G -p MemorySwapMax=0 \
143
- env ADS_TURBO_POC_OUTPUT="$ADS_TURBO_POC_OUTPUT" \
144
- node scripts/benchmarks/turbo-poc/run.mjs poc.json
145
- systemd-run --user --scope -p MemoryMax=6G -p MemorySwapMax=0 \
146
- env ADS_TURBO_POC_OUTPUT="$ADS_TURBO_POC_OUTPUT" \
147
- node scripts/benchmarks/turbo-poc/run.mjs poc.json --extras
148
- ```
149
-
150
- Bun and Node must be on PATH. The second command adds the equivalent cold serial
151
- and direct parallel controls to the first command's report. The measured run is
152
- retained under `output/turbo-poc/`:
153
-
154
- - `summary.json`: aggregated results and snapshot/toolchain provenance.
155
- - `measurements.json`: individual commands, timing, sampled PSS/RSS and Turbo hashes.
156
- - `concurrency.json`: both cold invocations and actual task-start records.
157
- - `logs/` and each snapshot's `.turbo/runs/`: original task logs/run summaries.
158
- - `seed/`: frozen benchmark source and exact executed task wrapper.
159
-
160
- The Turbo variant's cache occupies approximately 3.0 MB after these revisions.
161
- Generated snapshots, installed Turbo and cache artifacts are ignored by Git.
162
- The initial POC changed only these drivers and this report. The subsequent
163
- integration adds the internal source-task backend and verified preview handoff.
164
-
165
- Turbo's input/output model and local-cache behavior follow its official
166
- [caching guide](https://turborepo.dev/docs/crafting-your-repository/caching).
167
- Single-package scheduling and run summaries use its
168
- [run command](https://turborepo.dev/docs/reference/run).
169
-
170
- ## Follow-up integration proof
171
-
172
- `output/turbo-proof-2/proofs.json` records three successful integration proofs
173
- against ADS 0.3.41: a different checkout restored the complete graph, the original
174
- checkout path was removed, and an actual MCP resource browser mounted Popover and
175
- opened it. Restoring took 78 ms; invoking the existing full compiler to reestablish
176
- current-session readiness took 2,340 ms. File restoration alone was not readiness.
177
-
178
- The unreleased implementation separates that handoff from semantic discovery and
179
- compiler startup. `output/turbo-proof-3/proofs.json` repeats all three proofs with
180
- the local implementation: 129 scenarios, 318 assets, 73 ms restoration and
181
- **1,148 ms handoff**, with the same graph revision before and after and successful
182
- browser interaction. These are one-trial observations with changed implementation,
183
- not a controlled statistical estimate; further warm samples are recorded separately.
184
- The artifact set includes native graph metadata and the successful architecture
185
- artifact store, but excludes live build status and policy results. Restored evidence
186
- is republished for the destination session. Missing/corrupt input falls back safely.
187
-
188
- Two real MCP clients also proved contention, own-request cancellation, descendant
189
- cleanup (including a detached child), retry without using incomplete cache output,
190
- warm reuse, reuse after server restart, and reading the previous result by ID.
191
- A separate process was killed during validation: its detached child exited, restart
192
- recorded an interrupted result without a baseline, and a fresh retry passed. Both
193
- lifecycle proofs passed before and after the internal backend was introduced.
194
-
195
- The production change deliberately caches ADS's controlled source-analysis task.
196
- Opaque project scripts and live browser checks continue to execute under project
197
- policy; this experiment does not establish their cache contracts. Bun's warm
198
- interactive compiler and module cache remain in place. Local caching defaults on;
199
- fresh/off/location controls and opt-in remote caching are documented in
200
- [Batch task caching](../CACHING.md). GitHub CI needs CLI/cache-provider wiring,
201
- not a new ADS server/API. These proofs ran on Linux x64; other platforms have not
202
- been benchmarked here.
203
-
204
- ### Separating native restoration from batch analysis
205
-
206
- The final `output/turbo-proof-4/proofs.json` repeats all three integration proofs
207
- successfully after removing the redundant Turbo lookup from native graph restore:
208
- **72 ms** artifact restoration and **1,021 ms** separate CLI handoff/startup. The
209
- existing graph's successful validation stamp now also includes relevant Git
210
- tracking, declared installed-package manifests and semantic environment. A mismatch
211
- falls back to the guarded compile path, rather than reusing prior gate evidence.
212
-
213
- `output/turbo-proof-4/handoff.json` contains a primed, rotating-order comparison,
214
- three measured samples per arm, in one Bun process against that exact frozen graph:
215
-
216
- | Same graph and new handoff | Median | Samples |
217
- | --- | ---: | --- |
218
- | Native graph restoration, no Turbo call | **401 ms** | 410, 401, 382 ms |
219
- | Additional Turbo-cached source check, then restoration | **564 ms** | 546, 599, 564 ms |
220
- | Additional direct source analysis, then restoration | **5,329 ms** | 5,329, 5,333, 5,291 ms |
221
-
222
- The first arm is the production warm path. The other arms deliberately add a
223
- batch source check; direct analysis executes the same synchronous analysis
224
- primitive without a child-process startup. These timings isolate task-result
225
- reuse from the handoff refactor. **Turbo is not the cause of the preview-handoff
226
- speedup**: an unnecessary task lookup adds overhead to an already verified graph.
227
- Its value is skipping matching batch analysis when a validation/check operation
228
- would otherwise execute it. The complete standalone CLI includes startup costs
229
- that this within-process comparison excludes. No compilation speedup is claimed.
230
-
231
- After the initial POC has populated `output/turbo-poc/seed` and `tools`, build the
232
- current tool and run the proofs with a new output directory (Bun/Node on PATH):
233
-
234
- ```sh
235
- npm run build
236
- export ADS_TURBO_PROOF_OUTPUT=output/turbo-proof-new
237
- systemd-run --user --scope -p MemoryMax=6G -p MemorySwapMax=0 \
238
- env ADS_TURBO_PROOF_OUTPUT="$ADS_TURBO_PROOF_OUTPUT" \
239
- node scripts/benchmarks/turbo-poc/proofs.mjs
240
- systemd-run --user --scope -p MemoryMax=6G -p MemorySwapMax=0 \
241
- env ADS_TURBO_PROOF_OUTPUT="$ADS_TURBO_PROOF_OUTPUT" \
242
- bun scripts/benchmarks/turbo-poc/handoff.mjs
243
- ```
244
-
245
- The proof driver intentionally refuses existing snapshot directories. It uses the
246
- installed third-party dependencies and frozen workspace sources from the initial
247
- POC snapshot (`ADS_TURBO_POC_OUTPUT`); it never edits the live application. Failed attempts remain available
248
- under earlier output directories instead of being overwritten.
249
-
250
- ### Final implementation proof
251
-
252
- `output/turbo-proof-final/proofs.json` records all three successful integration
253
- proofs against the final internal runner, which invokes the installed Rust binary
254
- without Turbo's convenience installer. The browser proof restored 129 scenarios
255
- and 318 assets in **65 ms**, then established fresh destination readiness through a
256
- separate CLI invocation in **978 ms**. The original checkout path was unavailable.
257
- Cancellation, restart, detached-child cleanup, retained results and crash recovery
258
- all passed again. Hermit-managed Bun **1.4.2** also passed the source check on the
259
- same frozen project (`hermit-bun-1.4.2.json`).
260
-
261
- The final `handoff.json` repeats the primed, rotating comparison with three samples:
262
-
263
- | Path | Median | Samples |
264
- | --- | ---: | --- |
265
- | Native graph restoration; no Turbo call | **375 ms** | 360, 382, 375 ms |
266
- | Additional Turbo source-cache hit, then restoration | **536 ms** | 538, 536, 529 ms |
267
- | Additional executed source analysis, then restoration | **5,013 ms** | 5,075, 4,978, 5,013 ms |
268
-
269
- These measurements confirm the division: native graph restoration is the warm
270
- preview path; Turbo reuses deterministic batch analysis. It does not accelerate
271
- compilation or make the already validated graph's native handoff faster.
272
-
273
- The broad regression run exposed two compatibility defects, fixed before adoption:
274
- Vite changes `NODE_ENV` during setup, so graph stamps now capture launch environment
275
- rather than invalidating their own build; read-only inspection must work without a
276
- project output directory, so unavailable/disabled cache storage uses the same runner
277
- uncached in a temporary workspace. Dedicated regressions cover both behaviors.
278
-
279
- The final full regression run passed **624/624 tests, zero skips or failures**,
280
- with `ADS_TEST_BUN=1 npm test` in **764.8 seconds**, under an 8 GiB process-tree
281
- limit with swap disabled. `output/turbo-proof-final/validation.json` records the
282
- working-tree source fingerprint, runtime proof outcomes, timings and full-log
283
- digest; `full-tests.log` retains the original output. This is unreleased working
284
- code, not an npm release or a proof attached to a committed release tag.
@@ -1,57 +0,0 @@
1
- # Execution coordination and retained evidence
2
-
3
- Implement in ADS 0.3.41. One running ADS process coordinates all its MCP
4
- connections. Independent ADS processes on the same project are outside this
5
- lease's scope; startup must never recover or delete another live process's work.
6
-
7
- ## Agreed behavior
8
-
9
- - One exclusive execution lease covers validation (both policies and scopes),
10
- verification, guarded patches/transactions and draft acceptance. Acquisition is
11
- immediate, before checks, and release follows process cleanup and durable result
12
- publication. A caller cannot mutate accepted source while its own lease is held.
13
- - Reject contention with `ADS_VALIDATION_LOCKED`, holder/run ID, operation, client
14
- label where available, policy, requested/effective scope, units, start time,
15
- progress and nullable approximate ETA. Read-only discovery, Explorer and preview
16
- serving remain usable. Neither waiting nor parallel unit runs are in this version.
17
- - Scope changed retains full project scripts and may expand to all. Disjoint owner
18
- names do not establish independent dependencies or outputs.
19
- - Journal the run before starting work. The run ID is also its execution result ID.
20
- HTTP requests can be stateless: ownership is a run identity, with advisory client
21
- metadata, not a socket lifetime or authorization inferred from a client name.
22
- - Cancellation/disconnection initiates cleanup, holds the lease until cleanup is
23
- finished and records the terminal outcome independently of response delivery.
24
- No run is automatically resumed or replayed.
25
- - Watch relevant inputs during validation/verification. A detected source change
26
- stops work with `ADS_SOURCE_CHANGED_DURING_RUN`, added/modified/deleted paths and
27
- observed attribution. Direct editor/shell changes have unknown authorship;
28
- never infer an author. Generated output changes do not stop runs. Preserve
29
- observations already reported and never advance baselines on an interrupted run.
30
- - Persist completed results by immutable run ID and retain exact-run investigations
31
- and their artifacts. Latest indexes are convenience views, not retention limits.
32
- Reconnection and another client's completion do not invalidate a retained ID.
33
- - A new server instance recovers abandoned journal entries as interrupted after
34
- checking/cleaning recorded owned process identities. Existing ownership guards
35
- also clean children on parent death. Do not signal a reused PID. Finished results
36
- and successful baselines survive; current source freshness is checked separately.
37
- - Garbage collection runs at startup and after executions, never on client
38
- disconnect. Configurable age/count/disk limits bound completed results and owned
39
- evidence together. Protect active work and the newly returned result. Baselines
40
- are independent. Remove abandoned temporaries only when unowned. An expired ID
41
- reports `ADS_RESULT_EXPIRED`; unknown IDs are unavailable. Limits are soft only
42
- for protected active/newly completed work and the over-budget state is visible.
43
- - Status and supported resource subscriptions expose lease acquisition, progress,
44
- stopping and release. ETA is null without a defensible estimate.
45
-
46
- ## Proof and delivery
47
-
48
- Test two real MCP clients for refusal without spawning/replacing work; own
49
- cancellation and disconnect; completion racing disconnect; persisted run lookup
50
- on reconnect; source-change paths/unknown attribution and unchanged baselines;
51
- restart recovery and reused/live-process protection; bounded collection and
52
- historical investigation lookup; preview responsiveness while busy. Test known
53
- MCP write attribution separately from external changes.
54
-
55
- Update configuration, architecture, MCP guides and portable skill references.
56
- Sync skill copies, run targeted regressions then the complete local release suite,
57
- commit its proof, publish 0.3.41 and update local consumers to the published version.