@1agh/maude 0.28.0 → 0.29.0

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 (361) hide show
  1. package/README.md +2 -2
  2. package/{plugins/design/dev-server → apps/studio}/ai-banner.tsx +1 -1
  3. package/{plugins/design/dev-server → apps/studio}/annotations-context-toolbar.tsx +286 -6
  4. package/{plugins/design/dev-server → apps/studio}/annotations-layer.tsx +1209 -122
  5. package/{plugins/design/dev-server → apps/studio}/api.ts +486 -32
  6. package/{plugins/design/dev-server → apps/studio}/artboard-activity-overlay.tsx +1 -1
  7. package/{plugins/design/dev-server → apps/studio}/artboard-marquee.tsx +1 -1
  8. package/apps/studio/bin/_motion-sample-playwright.mjs +129 -0
  9. package/{plugins/design/dev-server → apps/studio}/bin/canvas-edit.sh +1 -1
  10. package/{plugins/design/dev-server → apps/studio}/bin/draw-proof.sh +37 -2
  11. package/{plugins/design/dev-server → apps/studio}/bin/preflight.sh +1 -1
  12. package/apps/studio/bin/read-annotations.mjs +438 -0
  13. package/apps/studio/bin/read-annotations.sh +11 -0
  14. package/{plugins/design/dev-server → apps/studio}/bin/runtime-health.sh +1 -1
  15. package/{plugins/design/dev-server → apps/studio}/bin/scenario-report.mjs +1 -1
  16. package/{plugins/design/dev-server → apps/studio}/bin/screenshot.sh +62 -2
  17. package/apps/studio/bin/server-up.sh +234 -0
  18. package/apps/studio/bin/to-lottie-verify.html +68 -0
  19. package/apps/studio/bin/to-lottie.sh +128 -0
  20. package/{plugins/design/dev-server → apps/studio}/bin/visual-sanity.sh +19 -3
  21. package/{plugins/design/dev-server → apps/studio}/build.ts +5 -3
  22. package/{plugins/design/dev-server → apps/studio}/canvas-arrowheads.ts +1 -1
  23. package/{plugins/design/dev-server → apps/studio}/canvas-comment-mount.tsx +2 -2
  24. package/apps/studio/canvas-create.ts +104 -0
  25. package/{plugins/design/dev-server → apps/studio}/canvas-cursors.ts +47 -13
  26. package/{plugins/design/dev-server → apps/studio}/canvas-icons.tsx +60 -1
  27. package/{plugins/design/dev-server → apps/studio}/canvas-lib-inline.ts +1 -1
  28. package/{plugins/design/dev-server → apps/studio}/canvas-lib-resolver.ts +1 -1
  29. package/{plugins/design/dev-server → apps/studio}/canvas-lib.tsx +41 -33
  30. package/{plugins/design/dev-server → apps/studio}/canvas-shell.tsx +57 -42
  31. package/{plugins/design/dev-server → apps/studio}/client/app.jsx +1713 -530
  32. package/apps/studio/client/canvas-url.js +81 -0
  33. package/{plugins/design/dev-server → apps/studio}/client/comments-overlay.css +41 -27
  34. package/{plugins/design/dev-server → apps/studio}/client/index.html +2 -1
  35. package/apps/studio/client/styles/1-tokens-maude.css +296 -0
  36. package/apps/studio/client/styles/3-shell-maude.css +459 -0
  37. package/{plugins/design/dev-server → apps/studio}/client/styles/3-shell.css +129 -0
  38. package/apps/studio/client/styles/4-components-maude.css +74 -0
  39. package/{plugins/design/dev-server → apps/studio}/client/styles/4-components.css +357 -34
  40. package/apps/studio/client/styles/5-maude-overrides.css +123 -0
  41. package/{plugins/design/dev-server → apps/studio}/client/styles/_index.css +9 -0
  42. package/{plugins/design/dev-server → apps/studio}/client/styles.css +1 -1
  43. package/apps/studio/client/tour/overlay.jsx +191 -0
  44. package/apps/studio/client/tour/usage-tour.js +35 -0
  45. package/apps/studio/client/whats-new-seen.js +52 -0
  46. package/apps/studio/client/whats-new.jsx +250 -0
  47. package/{plugins/design/dev-server → apps/studio}/collab/index.ts +4 -4
  48. package/{plugins/design/dev-server → apps/studio}/collab/persistence.ts +1 -1
  49. package/{plugins/design/dev-server → apps/studio}/commands/annotation-strokes-command.ts +1 -1
  50. package/{plugins/design/dev-server → apps/studio}/commands/equal-spacing-command.ts +1 -1
  51. package/{plugins/design/dev-server → apps/studio}/commands/move-artboards-command.ts +1 -1
  52. package/{plugins/design/dev-server → apps/studio}/comments-overlay.tsx +25 -6
  53. package/{plugins/design/dev-server → apps/studio}/context-menu.tsx +2 -2
  54. package/{plugins/design/dev-server → apps/studio}/contextual-toolbar.tsx +4 -7
  55. package/{plugins/design/dev-server → apps/studio}/cursors-overlay.tsx +1 -1
  56. package/apps/studio/dist/client.bundle.js +22825 -0
  57. package/apps/studio/dist/comment-mount.js +1960 -0
  58. package/apps/studio/dist/runtime/lib0_decoding.js +1 -0
  59. package/apps/studio/dist/runtime/lib0_encoding.js +1 -0
  60. package/apps/studio/dist/runtime/motion.js +4 -0
  61. package/apps/studio/dist/runtime/motion_react.js +12 -0
  62. package/apps/studio/dist/runtime/pixi-js.js +3397 -0
  63. package/apps/studio/dist/runtime/react-dom.js +1 -0
  64. package/apps/studio/dist/runtime/react-dom_client.js +9 -0
  65. package/apps/studio/dist/runtime/react.js +1 -0
  66. package/apps/studio/dist/runtime/react_jsx-dev-runtime.js +1 -0
  67. package/apps/studio/dist/runtime/react_jsx-runtime.js +1 -0
  68. package/apps/studio/dist/runtime/y-protocols_awareness.js +1 -0
  69. package/apps/studio/dist/runtime/y-protocols_sync.js +1 -0
  70. package/apps/studio/dist/runtime/yjs.js +5 -0
  71. package/apps/studio/dist/styles.css +5695 -0
  72. package/{plugins/design/dev-server → apps/studio}/dom-selection.ts +75 -4
  73. package/apps/studio/draw/animate.ts +333 -0
  74. package/{plugins/design/dev-server → apps/studio}/draw/brush.ts +4 -4
  75. package/{plugins/design/dev-server → apps/studio}/draw/composition.ts +1 -1
  76. package/{plugins/design/dev-server → apps/studio}/draw/geometry.ts +1 -1
  77. package/{plugins/design/dev-server → apps/studio}/draw/index.ts +9 -6
  78. package/{plugins/design/dev-server → apps/studio}/draw/layout.ts +2 -2
  79. package/apps/studio/draw/morph.ts +204 -0
  80. package/{plugins/design/dev-server → apps/studio}/draw/optimize.ts +1 -1
  81. package/{plugins/design/dev-server → apps/studio}/draw/palette.ts +1 -1
  82. package/{plugins/design/dev-server → apps/studio}/draw/primitives.ts +1 -1
  83. package/apps/studio/draw/serialize-animate.ts +324 -0
  84. package/{plugins/design/dev-server → apps/studio}/draw/serialize.ts +9 -3
  85. package/apps/studio/draw/test/animate.test.ts +172 -0
  86. package/{plugins/design/dev-server → apps/studio}/draw/test/layout.test.ts +1 -1
  87. package/apps/studio/draw/test/morph.test.ts +107 -0
  88. package/apps/studio/draw/test/serialize-animate.test.ts +142 -0
  89. package/{plugins/design/dev-server → apps/studio}/draw/test/serialize.test.ts +1 -1
  90. package/{plugins/design/dev-server → apps/studio}/equal-spacing-detector.ts +1 -1
  91. package/{plugins/design/dev-server → apps/studio}/equal-spacing-handles.tsx +7 -29
  92. package/{plugins/design/dev-server → apps/studio}/examples/perf-100-artboards.tsx +1 -2
  93. package/{plugins/design/dev-server → apps/studio}/export-dialog.tsx +14 -2
  94. package/{plugins/design/dev-server → apps/studio}/exporters/index.ts +2 -2
  95. package/{plugins/design/dev-server → apps/studio}/http.ts +103 -2
  96. package/{plugins/design/dev-server → apps/studio}/input-router.tsx +8 -1
  97. package/{plugins/design/dev-server → apps/studio}/inspect.ts +20 -3
  98. package/{plugins/design/dev-server → apps/studio}/marquee-overlay.tsx +6 -3
  99. package/{plugins/design/dev-server → apps/studio}/participants-chrome.tsx +1 -1
  100. package/{plugins/design/dev-server → apps/studio}/paths.ts +15 -11
  101. package/{plugins/design/dev-server → apps/studio}/server.ts +19 -1
  102. package/{plugins/design/dev-server → apps/studio}/sync/index.ts +6 -6
  103. package/{plugins/design/dev-server → apps/studio}/sync/materialize.ts +2 -2
  104. package/{plugins/design/dev-server → apps/studio}/test/ai-activity.test.ts +1 -1
  105. package/{plugins/design/dev-server → apps/studio}/test/annotations-api.test.ts +1 -2
  106. package/{plugins/design/dev-server → apps/studio}/test/annotations-layer.test.ts +69 -6
  107. package/{plugins/design/dev-server → apps/studio}/test/annotations-roundtrip.test.ts +98 -1
  108. package/apps/studio/test/annotations-text-format.test.ts +396 -0
  109. package/apps/studio/test/asset-api.test.ts +149 -0
  110. package/{plugins/design/dev-server → apps/studio}/test/boot-self-heal.test.ts +1 -1
  111. package/apps/studio/test/canvas-create-api.test.ts +361 -0
  112. package/{plugins/design/dev-server → apps/studio}/test/canvas-cursors.test.ts +3 -1
  113. package/{plugins/design/dev-server → apps/studio}/test/canvas-edit.test.ts +1 -1
  114. package/{plugins/design/dev-server → apps/studio}/test/canvas-hmr-runtime.test.tsx +1 -1
  115. package/{plugins/design/dev-server → apps/studio}/test/canvas-lib-inline.test.ts +1 -1
  116. package/{plugins/design/dev-server → apps/studio}/test/canvas-lib-resolver.test.ts +2 -3
  117. package/apps/studio/test/canvas-media-drop.test.ts +158 -0
  118. package/{plugins/design/dev-server → apps/studio}/test/canvas-meta-api.test.ts +1 -2
  119. package/{plugins/design/dev-server → apps/studio}/test/canvas-origin-gate.test.ts +18 -3
  120. package/apps/studio/test/canvas-url.test.ts +99 -0
  121. package/{plugins/design/dev-server → apps/studio}/test/collab-annotations-bridge.test.ts +1 -1
  122. package/{plugins/design/dev-server → apps/studio}/test/collab-bridge.test.ts +1 -1
  123. package/{plugins/design/dev-server → apps/studio}/test/collab-room.test.ts +1 -1
  124. package/{plugins/design/dev-server → apps/studio}/test/collab-stress.test.ts +1 -1
  125. package/{plugins/design/dev-server → apps/studio}/test/comments-api.test.ts +1 -2
  126. package/{plugins/design/dev-server → apps/studio}/test/compile-entry.test.ts +1 -2
  127. package/{plugins/design/dev-server → apps/studio}/test/exporters/canva.test.ts +1 -2
  128. package/{plugins/design/dev-server → apps/studio}/test/exporters/history.test.ts +1 -2
  129. package/{plugins/design/dev-server → apps/studio}/test/exporters/pw-launch.test.ts +1 -1
  130. package/{plugins/design/dev-server → apps/studio}/test/exporters/scope.test.ts +1 -2
  131. package/{plugins/design/dev-server → apps/studio}/test/exporters/zip.test.ts +1 -2
  132. package/{plugins/design/dev-server → apps/studio}/test/git-lifecycle.test.ts +1 -2
  133. package/{plugins/design/dev-server → apps/studio}/test/handoff-static-frames.test.ts +1 -1
  134. package/{plugins/design/dev-server → apps/studio}/test/hmr-broadcast.test.ts +1 -1
  135. package/apps/studio/test/index-data-canvas-ds.test.ts +97 -0
  136. package/apps/studio/test/motion-sample.test.ts +35 -0
  137. package/{plugins/design/dev-server → apps/studio}/test/perf-harness.ts +1 -1
  138. package/{plugins/design/dev-server → apps/studio}/test/phase-3.6-smoke.test.ts +3 -1
  139. package/apps/studio/test/read-annotations.test.ts +409 -0
  140. package/{plugins/design/dev-server → apps/studio}/test/runtime-bundle.test.ts +1 -1
  141. package/{plugins/design/dev-server → apps/studio}/test/sanitize-annotation-svg.test.ts +108 -2
  142. package/{plugins/design/dev-server → apps/studio}/test/shared-doc-convergence.test.ts +2 -2
  143. package/{plugins/design/dev-server → apps/studio}/test/shared-doc-migrate.test.ts +2 -3
  144. package/{plugins/design/dev-server → apps/studio}/test/shared-doc-projection.test.ts +1 -1
  145. package/{plugins/design/dev-server → apps/studio}/test/snap-distance-pill.test.ts +1 -1
  146. package/{plugins/design/dev-server → apps/studio}/test/sync-agent.test.ts +2 -3
  147. package/{plugins/design/dev-server → apps/studio}/test/sync-atomic-write.test.ts +2 -3
  148. package/{plugins/design/dev-server → apps/studio}/test/sync-connection-state.test.ts +1 -1
  149. package/{plugins/design/dev-server → apps/studio}/test/sync-echo-guard.test.ts +1 -1
  150. package/{plugins/design/dev-server → apps/studio}/test/sync-fs-mirror.test.ts +1 -2
  151. package/{plugins/design/dev-server → apps/studio}/test/sync-hardening.test.ts +4 -5
  152. package/{plugins/design/dev-server → apps/studio}/test/sync-hubs-config.test.ts +1 -2
  153. package/{plugins/design/dev-server → apps/studio}/test/sync-runtime.test.ts +3 -8
  154. package/{plugins/design/dev-server → apps/studio}/test/sync-status.test.ts +1 -1
  155. package/{plugins/design/dev-server → apps/studio}/test/sync-untrusted.test.ts +1 -2
  156. package/apps/studio/test/tour-overlay.test.tsx +56 -0
  157. package/{plugins/design/dev-server → apps/studio}/test/use-agent-presence.test.tsx +4 -1
  158. package/{plugins/design/dev-server → apps/studio}/test/use-annotation-resize.test.ts +43 -0
  159. package/{plugins/design/dev-server → apps/studio}/test/use-snap-guides.test.ts +1 -1
  160. package/{plugins/design/dev-server → apps/studio}/test/use-tool-mode.test.tsx +4 -1
  161. package/apps/studio/test/whats-new.test.ts +101 -0
  162. package/apps/studio/text-imports.d.ts +9 -0
  163. package/{plugins/design/dev-server → apps/studio}/tool-palette.tsx +4 -69
  164. package/{plugins/design/dev-server → apps/studio}/undo-hud.tsx +1 -1
  165. package/{plugins/design/dev-server → apps/studio}/undo-stack.ts +1 -1
  166. package/{plugins/design/dev-server → apps/studio}/use-agent-presence.tsx +2 -2
  167. package/{plugins/design/dev-server → apps/studio}/use-annotation-resize.tsx +41 -12
  168. package/{plugins/design/dev-server → apps/studio}/use-annotation-selection.tsx +3 -7
  169. package/{plugins/design/dev-server → apps/studio}/use-annotations-visibility.tsx +2 -2
  170. package/{plugins/design/dev-server → apps/studio}/use-artboard-drag.tsx +2 -2
  171. package/{plugins/design/dev-server → apps/studio}/use-canvas-activity.tsx +2 -2
  172. package/apps/studio/use-canvas-media-drop.tsx +343 -0
  173. package/{plugins/design/dev-server → apps/studio}/use-collab.tsx +4 -5
  174. package/{plugins/design/dev-server → apps/studio}/use-cursor-modifiers.tsx +1 -1
  175. package/{plugins/design/dev-server → apps/studio}/use-keyboard-discipline.tsx +5 -2
  176. package/{plugins/design/dev-server → apps/studio}/use-selection-set.tsx +10 -2
  177. package/{plugins/design/dev-server → apps/studio}/use-snap-guides.tsx +1 -1
  178. package/{plugins/design/dev-server → apps/studio}/use-tool-mode.tsx +4 -2
  179. package/{plugins/design/dev-server → apps/studio}/use-undo-stack.tsx +5 -6
  180. package/apps/studio/whats-new.json +139 -0
  181. package/apps/studio/whats-new.schema.json +70 -0
  182. package/apps/studio/whats-new.ts +87 -0
  183. package/cli/bin/maude.mjs +10 -0
  184. package/cli/commands/design.mjs +84 -10
  185. package/cli/commands/design.test.mjs +133 -1
  186. package/cli/commands/help.mjs +8 -2
  187. package/cli/commands/hub.mjs +3 -3
  188. package/cli/commands/hub.test.mjs +1 -1
  189. package/cli/commands/scenario-report.mjs +2 -9
  190. package/cli/lib/cache.mjs +1 -1
  191. package/cli/lib/config-lint.mjs +1 -1
  192. package/cli/lib/copy-tree.mjs +1 -1
  193. package/cli/lib/design-link.mjs +1 -1
  194. package/cli/lib/flow-design-integration.test.mjs +2 -2
  195. package/cli/lib/gitignore-block.mjs +1 -0
  196. package/cli/lib/gitignore-block.test.mjs +2 -2
  197. package/cli/lib/plugin-cli-reachability.test.mjs +8 -7
  198. package/cli/lib/preflight.mjs +1 -1
  199. package/cli/lib/stack-detect.mjs +1 -1
  200. package/package.json +16 -16
  201. package/plugins/design/templates/_shell.html +3 -3
  202. package/plugins/design/templates/brief-board.tsx.template +61 -0
  203. package/plugins/design/templates/canvas.tsx.template +1 -1
  204. package/plugins/design/templates/design-system-inspiration/SUB-AGENT-PROMPTS.md +18 -3
  205. package/plugins/design/templates/design-system-inspiration/core/config.json.tpl +1 -1
  206. package/plugins/design/templates/design-system-inspiration/core/preview/_motion-readme.md.tpl +1 -1
  207. package/plugins/flow/.claude-plugin/config.schema.json +16 -0
  208. package/plugins/design/dev-server/bin/server-up.sh +0 -135
  209. package/plugins/design/dev-server/dist/client.bundle.js +0 -20692
  210. package/plugins/design/dev-server/dist/comment-mount.js +0 -1924
  211. package/plugins/design/dev-server/dist/runtime/lib0_decoding.js +0 -620
  212. package/plugins/design/dev-server/dist/runtime/lib0_encoding.js +0 -604
  213. package/plugins/design/dev-server/dist/runtime/motion.js +0 -4944
  214. package/plugins/design/dev-server/dist/runtime/motion_react.js +0 -10056
  215. package/plugins/design/dev-server/dist/runtime/pixi-js.js +0 -53104
  216. package/plugins/design/dev-server/dist/runtime/react-dom.js +0 -231
  217. package/plugins/design/dev-server/dist/runtime/react-dom_client.js +0 -10357
  218. package/plugins/design/dev-server/dist/runtime/react.js +0 -535
  219. package/plugins/design/dev-server/dist/runtime/react_jsx-dev-runtime.js +0 -60
  220. package/plugins/design/dev-server/dist/runtime/react_jsx-runtime.js +0 -85
  221. package/plugins/design/dev-server/dist/runtime/y-protocols_awareness.js +0 -376
  222. package/plugins/design/dev-server/dist/runtime/y-protocols_sync.js +0 -100
  223. package/plugins/design/dev-server/dist/runtime/yjs.js +0 -6687
  224. package/plugins/design/dev-server/dist/styles.css +0 -2710
  225. package/{plugins/design/dev-server → apps/studio}/activity.ts +0 -0
  226. package/{plugins/design/dev-server → apps/studio}/bin/_enumerate-artboards-playwright.mjs +0 -0
  227. package/{plugins/design/dev-server → apps/studio}/bin/_html-playwright.mjs +0 -0
  228. package/{plugins/design/dev-server → apps/studio}/bin/_pdf-playwright.mjs +0 -0
  229. package/{plugins/design/dev-server → apps/studio}/bin/_png-playwright.mjs +0 -0
  230. package/{plugins/design/dev-server → apps/studio}/bin/_pptx-playwright.mjs +0 -0
  231. package/{plugins/design/dev-server → apps/studio}/bin/_pw-launch.mjs +0 -0
  232. package/{plugins/design/dev-server → apps/studio}/bin/_screenshot-playwright.mjs +0 -0
  233. package/{plugins/design/dev-server → apps/studio}/bin/_svg-optimize.mjs +0 -0
  234. package/{plugins/design/dev-server → apps/studio}/bin/_svg-playwright.mjs +0 -0
  235. package/{plugins/design/dev-server → apps/studio}/bin/asset-sweep.sh +0 -0
  236. package/{plugins/design/dev-server → apps/studio}/bin/bootstrap-check.sh +0 -0
  237. package/{plugins/design/dev-server → apps/studio}/bin/check-runtime-bundles.sh +0 -0
  238. package/{plugins/design/dev-server → apps/studio}/bin/draw-build.sh +0 -0
  239. package/{plugins/design/dev-server → apps/studio}/bin/handoff.sh +0 -0
  240. package/{plugins/design/dev-server → apps/studio}/bin/prep.sh +0 -0
  241. package/{plugins/design/dev-server → apps/studio}/bin/slug.sh +0 -0
  242. package/{plugins/design/dev-server → apps/studio}/bin/smoke.sh +0 -0
  243. package/{plugins/design/dev-server → apps/studio}/bin/svg-optimize.sh +0 -0
  244. package/{plugins/design/dev-server → apps/studio}/boot-self-heal.ts +0 -0
  245. package/{plugins/design/dev-server → apps/studio}/canvas-build.ts +0 -0
  246. package/{plugins/design/dev-server → apps/studio}/canvas-edit.ts +0 -0
  247. package/{plugins/design/dev-server → apps/studio}/canvas-header.ts +0 -0
  248. package/{plugins/design/dev-server → apps/studio}/canvas-meta.schema.json +0 -0
  249. package/{plugins/design/dev-server → apps/studio}/canvas-pipeline.ts +0 -0
  250. package/{plugins/design/dev-server → apps/studio}/client/hmr.mjs +0 -0
  251. package/{plugins/design/dev-server → apps/studio}/client/iframe-lazy.mjs +0 -0
  252. package/{plugins/design/dev-server → apps/studio}/client/styles/0-reset.css +0 -0
  253. package/{plugins/design/dev-server → apps/studio}/client/styles/1-tokens.css +0 -0
  254. package/{plugins/design/dev-server → apps/studio}/client/styles/2-layout.css +0 -0
  255. package/{plugins/design/dev-server → apps/studio}/client/styles/5-utilities.css +0 -0
  256. package/{plugins/design/dev-server → apps/studio}/collab/ai-activity.ts +0 -0
  257. package/{plugins/design/dev-server → apps/studio}/collab/awareness-bridge.ts +1 -1
  258. package/{plugins/design/dev-server → apps/studio}/collab/git-lifecycle.ts +0 -0
  259. package/{plugins/design/dev-server → apps/studio}/collab/protocol.ts +0 -0
  260. package/{plugins/design/dev-server → apps/studio}/collab/registry.ts +0 -0
  261. package/{plugins/design/dev-server → apps/studio}/collab/room.ts +0 -0
  262. package/{plugins/design/dev-server → apps/studio}/config.schema.json +0 -0
  263. package/{plugins/design/dev-server → apps/studio}/context.ts +0 -0
  264. package/{plugins/design/dev-server → apps/studio}/dist/runtime/.min-sizes.json +0 -0
  265. package/{plugins/design/dev-server → apps/studio}/draw/test/brush.test.ts +0 -0
  266. package/{plugins/design/dev-server → apps/studio}/draw/test/composition.test.ts +0 -0
  267. package/{plugins/design/dev-server → apps/studio}/draw/test/geometry.test.ts +1 -1
  268. package/{plugins/design/dev-server → apps/studio}/draw/test/gradient.test.ts +0 -0
  269. package/{plugins/design/dev-server → apps/studio}/draw/test/optimize.test.ts +0 -0
  270. package/{plugins/design/dev-server → apps/studio}/draw/test/palette.test.ts +0 -0
  271. package/{plugins/design/dev-server → apps/studio}/draw/test/primitives.test.ts +1 -1
  272. package/{plugins/design/dev-server → apps/studio}/examples/README.md +0 -0
  273. package/{plugins/design/dev-server → apps/studio}/exporters/_browser-bundles.ts +0 -0
  274. package/{plugins/design/dev-server → apps/studio}/exporters/canva-handoff-prompt.ts +0 -0
  275. package/{plugins/design/dev-server → apps/studio}/exporters/canva.ts +0 -0
  276. package/{plugins/design/dev-server → apps/studio}/exporters/html.ts +1 -1
  277. package/{plugins/design/dev-server → apps/studio}/exporters/pdf.ts +1 -1
  278. package/{plugins/design/dev-server → apps/studio}/exporters/png.ts +1 -1
  279. package/{plugins/design/dev-server → apps/studio}/exporters/pptx.ts +1 -1
  280. package/{plugins/design/dev-server → apps/studio}/exporters/scope.ts +0 -0
  281. package/{plugins/design/dev-server → apps/studio}/exporters/svg.ts +1 -1
  282. package/{plugins/design/dev-server → apps/studio}/exporters/zip.ts +0 -0
  283. package/{plugins/design/dev-server → apps/studio}/fs-watch.ts +0 -0
  284. package/{plugins/design/dev-server → apps/studio}/handoff.ts +0 -0
  285. package/{plugins/design/dev-server → apps/studio}/history.ts +0 -0
  286. package/{plugins/design/dev-server → apps/studio}/hmr-broadcast.ts +0 -0
  287. package/{plugins/design/dev-server → apps/studio}/locator.ts +0 -0
  288. package/{plugins/design/dev-server → apps/studio}/mem.ts +0 -0
  289. package/{plugins/design/dev-server → apps/studio}/runtime-bundle.ts +0 -0
  290. package/{plugins/design/dev-server → apps/studio}/server.mjs +0 -0
  291. package/{plugins/design/dev-server → apps/studio}/sync/agent.ts +1 -1
  292. package/{plugins/design/dev-server → apps/studio}/sync/atomic-write.ts +0 -0
  293. package/{plugins/design/dev-server → apps/studio}/sync/codec.ts +0 -0
  294. package/{plugins/design/dev-server → apps/studio}/sync/connection-state.ts +0 -0
  295. package/{plugins/design/dev-server → apps/studio}/sync/echo-guard.ts +0 -0
  296. package/{plugins/design/dev-server → apps/studio}/sync/fs-mirror.ts +0 -0
  297. package/{plugins/design/dev-server → apps/studio}/sync/hubs-config.ts +0 -0
  298. package/{plugins/design/dev-server → apps/studio}/sync/migrate-seed.ts +1 -1
  299. package/{plugins/design/dev-server → apps/studio}/sync/origins.ts +0 -0
  300. package/{plugins/design/dev-server → apps/studio}/sync/projection.ts +3 -3
  301. package/{plugins/design/dev-server → apps/studio}/sync/status.ts +0 -0
  302. package/{plugins/design/dev-server → apps/studio}/sync/untrusted.ts +0 -0
  303. package/{plugins/design/dev-server → apps/studio}/test/_helpers.ts +0 -0
  304. package/{plugins/design/dev-server → apps/studio}/test/active-state.test.ts +0 -0
  305. package/{plugins/design/dev-server → apps/studio}/test/activity.test.ts +0 -0
  306. package/{plugins/design/dev-server → apps/studio}/test/annotation-strokes-command.test.ts +0 -0
  307. package/{plugins/design/dev-server → apps/studio}/test/annotations-draw-modifiers.test.ts +2 -2
  308. package/{plugins/design/dev-server → apps/studio}/test/artboard-activity-overlay.test.tsx +0 -0
  309. package/{plugins/design/dev-server → apps/studio}/test/binary-smoke.test.ts +0 -0
  310. package/{plugins/design/dev-server → apps/studio}/test/bundle-smoke.test.ts +0 -0
  311. package/{plugins/design/dev-server → apps/studio}/test/canvas-build.test.ts +0 -0
  312. package/{plugins/design/dev-server → apps/studio}/test/canvas-header.test.ts +1 -1
  313. package/{plugins/design/dev-server → apps/studio}/test/canvas-lib-motion.test.ts +0 -0
  314. package/{plugins/design/dev-server → apps/studio}/test/canvas-pipeline.test.ts +0 -0
  315. package/{plugins/design/dev-server → apps/studio}/test/canvas-route.test.ts +0 -0
  316. package/{plugins/design/dev-server → apps/studio}/test/collab-awareness-bridge.test.ts +0 -0
  317. package/{plugins/design/dev-server → apps/studio}/test/collab-loopback.test.ts +0 -0
  318. package/{plugins/design/dev-server → apps/studio}/test/collab-protocol.test.ts +2 -2
  319. package/{plugins/design/dev-server → apps/studio}/test/collab-reseed-guard.test.ts +0 -0
  320. package/{plugins/design/dev-server → apps/studio}/test/comment-mount.test.ts +0 -0
  321. package/{plugins/design/dev-server → apps/studio}/test/context-resolve-tokens.test.ts +0 -0
  322. package/{plugins/design/dev-server → apps/studio}/test/csp-canvas-shell.test.ts +0 -0
  323. package/{plugins/design/dev-server → apps/studio}/test/equal-spacing-detector.test.ts +0 -0
  324. package/{plugins/design/dev-server → apps/studio}/test/exporters/endpoint.test.ts +0 -0
  325. package/{plugins/design/dev-server → apps/studio}/test/exporters/html.test.ts +0 -0
  326. package/{plugins/design/dev-server → apps/studio}/test/exporters/pdf.test.ts +0 -0
  327. package/{plugins/design/dev-server → apps/studio}/test/exporters/png.test.ts +0 -0
  328. package/{plugins/design/dev-server → apps/studio}/test/exporters/pptx-deck.test.ts +0 -0
  329. package/{plugins/design/dev-server → apps/studio}/test/exporters/pptx.test.ts +0 -0
  330. package/{plugins/design/dev-server → apps/studio}/test/exporters/svg.test.ts +0 -0
  331. package/{plugins/design/dev-server → apps/studio}/test/fixtures/phase-20-annotations.svg +0 -0
  332. package/{plugins/design/dev-server → apps/studio}/test/fixtures/phase-21-annotations.svg +0 -0
  333. package/{plugins/design/dev-server → apps/studio}/test/fs-watch.test.ts +0 -0
  334. package/{plugins/design/dev-server → apps/studio}/test/handoff.test.ts +1 -1
  335. package/{plugins/design/dev-server → apps/studio}/test/history-rollback.test.ts +0 -0
  336. package/{plugins/design/dev-server → apps/studio}/test/hmr-classify.test.ts +0 -0
  337. package/{plugins/design/dev-server → apps/studio}/test/input-router.test.ts +2 -2
  338. package/{plugins/design/dev-server → apps/studio}/test/locator.test.ts +1 -1
  339. package/{plugins/design/dev-server → apps/studio}/test/marquee-overlay.test.ts +0 -0
  340. package/{plugins/design/dev-server → apps/studio}/test/move-artboards-command.test.ts +0 -0
  341. package/{plugins/design/dev-server → apps/studio}/test/participants-chrome.test.ts +0 -0
  342. package/{plugins/design/dev-server → apps/studio}/test/paths.test.ts +0 -0
  343. package/{plugins/design/dev-server → apps/studio}/test/runtime-bundle-error-mapping.test.ts +0 -0
  344. package/{plugins/design/dev-server → apps/studio}/test/server-lifecycle.test.ts +0 -0
  345. package/{plugins/design/dev-server → apps/studio}/test/shared-doc-foundation.test.ts +0 -0
  346. package/{plugins/design/dev-server → apps/studio}/test/sync-codec.test.ts +1 -1
  347. package/{plugins/design/dev-server → apps/studio}/test/sync-meta-codec.test.ts +1 -1
  348. package/{plugins/design/dev-server → apps/studio}/test/system-endpoint.test.ts +0 -0
  349. package/{plugins/design/dev-server → apps/studio}/test/tool-palette.test.tsx +0 -0
  350. package/{plugins/design/dev-server → apps/studio}/test/undo-stack.test.ts +2 -2
  351. package/{plugins/design/dev-server → apps/studio}/test/use-annotation-selection.test.tsx +0 -0
  352. package/{plugins/design/dev-server → apps/studio}/test/use-artboard-drag.test.ts +3 -3
  353. package/{plugins/design/dev-server → apps/studio}/test/use-canvas-activity.test.tsx +2 -2
  354. package/{plugins/design/dev-server → apps/studio}/test/use-collab.test.ts +0 -0
  355. package/{plugins/design/dev-server → apps/studio}/test/use-cursor-modifiers.test.ts +0 -0
  356. package/{plugins/design/dev-server → apps/studio}/test/use-keyboard-discipline.test.ts +0 -0
  357. package/{plugins/design/dev-server → apps/studio}/test/use-selection-set.test.tsx +1 -1
  358. package/{plugins/design/dev-server → apps/studio}/test/use-undo-stack.test.tsx +2 -2
  359. /package/{plugins/design/dev-server → apps/studio}/test/ws-handshake.test.ts +0 -0
  360. /package/{plugins/design/dev-server → apps/studio}/tsconfig.json +0 -0
  361. /package/{plugins/design/dev-server → apps/studio}/ws.ts +0 -0
@@ -82,7 +82,7 @@ function usage() {
82
82
  exact commands to run next. Does NOT execute fly/docker for you —
83
83
  review the emitted files first, then run the printed command.
84
84
 
85
- fly → fly.toml (+ reuses plugins/design/hub/Dockerfile).
85
+ fly → fly.toml (+ reuses apps/hub/Dockerfile).
86
86
  --name app name (default maude-hub-<rand>)
87
87
  --region Fly region code (default iad)
88
88
  docker → docker-compose.yml + Caddyfile (universal — Lightsail, EC2,
@@ -91,7 +91,7 @@ function usage() {
91
91
 
92
92
  NOTES
93
93
  serve / token / deploy run inside a 'maude' source checkout (they read the
94
- bundled hub workspace at plugins/design/hub). Production hubs run the
94
+ bundled hub workspace at apps/hub). Production hubs run the
95
95
  published Docker image (ghcr.io/1agh/maude-hub) — see 'maude hub deploy'.
96
96
  status works from anywhere (plain HTTP GET against /health).
97
97
 
@@ -433,7 +433,7 @@ function randHex(bytes) {
433
433
  // ---------------------------------------------------------------- helpers
434
434
 
435
435
  function findHubRoot(pkgRoot) {
436
- const dev = resolve(pkgRoot, 'plugins', 'design', 'hub');
436
+ const dev = resolve(pkgRoot, 'apps', 'hub');
437
437
  if (existsSync(resolve(dev, 'package.json'))) {
438
438
  try {
439
439
  const pkg = JSON.parse(readFileSync(resolve(dev, 'package.json'), 'utf8'));
@@ -9,7 +9,7 @@ import { dirname, join, resolve } from 'node:path';
9
9
  import { test } from 'node:test';
10
10
  import { fileURLToPath } from 'node:url';
11
11
 
12
- import { readTokens } from '../../plugins/design/hub/src/tokens.mjs';
12
+ import { readTokens } from '../../apps/hub/src/tokens.mjs';
13
13
 
14
14
  const BIN = resolve(dirname(fileURLToPath(import.meta.url)), '..', 'bin', 'maude.mjs');
15
15
 
@@ -5,7 +5,7 @@ import { pathToFileURL } from 'node:url';
5
5
  // `maude scenario-report <run-dir> [--out <path>]` — deterministic cross-platform
6
6
  // scenario report generator (Phase C / DDR-061). Thin wrapper that resolves the
7
7
  // bundled generator from maude's OWN package root (NOT $CLAUDE_PLUGIN_ROOT — the
8
- // flow plugin can't reach the design plugin's dev-server dir; only the on-PATH
8
+ // flow plugin can't reach the studio app's bin dir; only the on-PATH
9
9
  // `maude` binary resolves it reliably across install shapes — see DDR-062), runs
10
10
  // it, and writes report.md. Output stdout = the written path (capture idiom).
11
11
 
@@ -22,14 +22,7 @@ export async function run({ args, pkgRoot }) {
22
22
  return;
23
23
  }
24
24
 
25
- const generatorPath = resolve(
26
- pkgRoot,
27
- 'plugins',
28
- 'design',
29
- 'dev-server',
30
- 'bin',
31
- 'scenario-report.mjs'
32
- );
25
+ const generatorPath = resolve(pkgRoot, 'apps', 'studio', 'bin', 'scenario-report.mjs');
33
26
  const { generateReport } = await import(pathToFileURL(generatorPath).href);
34
27
 
35
28
  const absRunDir = resolve(process.cwd(), runDir);
package/cli/lib/cache.mjs CHANGED
@@ -49,8 +49,8 @@ import { spawnSync } from 'node:child_process';
49
49
  import {
50
50
  existsSync,
51
51
  mkdirSync,
52
- readFileSync,
53
52
  readdirSync,
53
+ readFileSync,
54
54
  renameSync,
55
55
  rmSync,
56
56
  statSync,
@@ -16,8 +16,8 @@
16
16
 
17
17
  import { readFile } from 'node:fs/promises';
18
18
  import { resolve } from 'node:path';
19
- import addFormats from 'ajv-formats';
20
19
  import Ajv2020 from 'ajv/dist/2020.js';
20
+ import addFormats from 'ajv-formats';
21
21
 
22
22
  function levenshtein(a, b) {
23
23
  if (a === b) return 0;
@@ -1,4 +1,4 @@
1
- import { copyFile, mkdir, readFile, readdir, stat, writeFile } from 'node:fs/promises';
1
+ import { copyFile, mkdir, readdir, readFile, stat, writeFile } from 'node:fs/promises';
2
2
  import { basename, join, relative } from 'node:path';
3
3
 
4
4
  // Recursively copy `src` → `dest`. Returns { created, skipped, replaced }.
@@ -10,7 +10,7 @@
10
10
  //
11
11
  // Token NEVER lands in .design/config.json — that's git-committed.
12
12
 
13
- import { existsSync, readFileSync, readdirSync, statSync, writeFileSync } from 'node:fs';
13
+ import { existsSync, readdirSync, readFileSync, statSync, writeFileSync } from 'node:fs';
14
14
  import { dirname, resolve } from 'node:path';
15
15
  import { createInterface } from 'node:readline';
16
16
 
@@ -19,14 +19,14 @@ import assert from 'node:assert/strict';
19
19
  import { readFileSync } from 'node:fs';
20
20
  import { resolve } from 'node:path';
21
21
  import { test } from 'node:test';
22
- import addFormats from 'ajv-formats';
23
22
  import Ajv2020 from 'ajv/dist/2020.js';
23
+ import addFormats from 'ajv-formats';
24
24
  import { lintConfig } from './config-lint.mjs';
25
25
 
26
26
  const read = (p) => readFileSync(resolve(p), 'utf8');
27
27
  const readJson = (p) => JSON.parse(read(p));
28
28
 
29
- const META_SCHEMA = readJson('plugins/design/dev-server/canvas-meta.schema.json');
29
+ const META_SCHEMA = readJson('apps/studio/canvas-meta.schema.json');
30
30
  const FLOW_SCHEMA = readJson('plugins/flow/.claude-plugin/config.schema.json');
31
31
  const SKELETON = readJson('plugins/flow/templates/ai-skeleton/workflows.config.json');
32
32
 
@@ -31,6 +31,7 @@ export function buildBlock(designRel = '.design') {
31
31
  `${root}/_active.json`,
32
32
  `${root}/_sync.json`, // linked-mode offline/sync status (Task 8)
33
33
  `${root}/_history/`,
34
+ `${root}/_trash/`, // soft-deleted canvases (recoverable locally — Phase 22 delete)
34
35
  `${root}/_draw/`, // draw-agent proof canvases (regenerable — Phase 25)
35
36
  `${root}/_canvas-state/`, // per-machine canvas undo/redo + scratch state
36
37
  `${root}/_chat/`, // ACP transcripts (per-machine)
@@ -7,10 +7,10 @@ import { join } from 'node:path';
7
7
  import { test } from 'node:test';
8
8
 
9
9
  import {
10
- BEGIN_MARKER,
11
- END_MARKER,
12
10
  applyBlock,
11
+ BEGIN_MARKER,
13
12
  buildBlock,
13
+ END_MARKER,
14
14
  hasBlock,
15
15
  writeGitignoreBlock,
16
16
  } from './gitignore-block.mjs';
@@ -10,12 +10,13 @@
10
10
  // SAME file also offers a `command -v maude` fallback (the sibling-first /
11
11
  // maude-fallback pattern). This test fails loudly if a new straggler lands.
12
12
  //
13
- // DDR-062: plugin MARKDOWN must reach the dev-server bash helpers through
14
- // `maude design <verb>`, never `bash "$CLAUDE_PLUGIN_ROOT/dev-server/bin/<x>.sh"`.
15
- // The marketplace never copies the dev-server beside a plugin, and a flow
16
- // command's $CLAUDE_PLUGIN_ROOT points at plugins/flow (no dev-server/ at all).
17
- // Prose mentions of the path are fine; INVOCATIONS (bash/sh/exec/$( prefixed)
18
- // are banned.
13
+ // DDR-062: plugin MARKDOWN must reach the studio bash helpers through
14
+ // `maude design <verb>`, never `bash "$CLAUDE_PLUGIN_ROOT/dev-server/bin/<x>.sh"`
15
+ // or `bash apps/studio/bin/<x>.sh`. The marketplace never copies the studio app
16
+ // beside a plugin, and a flow command's $CLAUDE_PLUGIN_ROOT points at
17
+ // plugins/flow (no bin/ at all). Per DDR-095 the helpers live under
18
+ // apps/studio/bin (was plugins/design/dev-server/bin). Prose mentions of the
19
+ // path are fine; INVOCATIONS (bash/sh/exec/$( prefixed) are banned.
19
20
 
20
21
  import assert from 'node:assert/strict';
21
22
  import { execSync } from 'node:child_process';
@@ -43,7 +44,7 @@ test('no plugin markdown invokes a $CLAUDE_PLUGIN_ROOT/dev-server/bin/*.sh helpe
43
44
  // command substitution. Prose mentions of the path (backtick-wrapped, no verb)
44
45
  // are exempt — they don't run anything. Matches both the $CLAUDE_PLUGIN_ROOT
45
46
  // form and the repo-relative `plugins/<x>/dev-server/bin/` form.
46
- const pattern = String.raw`(bash|sh|exec) +"?(\$\{?CLAUDE_PLUGIN_ROOT\}?|plugins/[a-z]+)/dev-server/bin/[A-Za-z0-9_-]+\.sh|\$\("?\$?\{?CLAUDE_PLUGIN_ROOT\}?/dev-server/bin/[A-Za-z0-9_-]+\.sh`;
47
+ const pattern = String.raw`(bash|sh|exec) +"?(\$\{?CLAUDE_PLUGIN_ROOT\}?|plugins/[a-z]+)/dev-server/bin/[A-Za-z0-9_-]+\.sh|\$\("?\$?\{?CLAUDE_PLUGIN_ROOT\}?/dev-server/bin/[A-Za-z0-9_-]+\.sh|(bash|sh|exec) +"?[^"\n]*apps/studio/bin/[A-Za-z0-9_-]+\.sh|\$\("?[^"\n]*apps/studio/bin/[A-Za-z0-9_-]+\.sh`;
47
48
  const out = execSync(`grep -rnE '${pattern}' plugins --include='*.md' || true`, {
48
49
  encoding: 'utf8',
49
50
  });
@@ -5,7 +5,7 @@
5
5
  // Used by:
6
6
  // - cli/commands/doctor.mjs (the unified diagnostic CLI)
7
7
  // - plugins/flow/commands/init.md (the wired pre-flight Step 1)
8
- // - plugins/design/dev-server/bin/preflight.sh (which re-shells to node
8
+ // - apps/studio/bin/preflight.sh (which re-shells to node
9
9
  // for the actual checks — keeps detection logic in one place).
10
10
  //
11
11
  // Pure-ish: no process.exit; returns an envelope. printReport() is here
@@ -10,7 +10,7 @@
10
10
  //
11
11
  // Consumers: cli/commands/doctor.mjs and the drift-aware /flow:init re-run.
12
12
 
13
- import { readFile, readdir, stat } from 'node:fs/promises';
13
+ import { readdir, readFile, stat } from 'node:fs/promises';
14
14
  import { join } from 'node:path';
15
15
 
16
16
  async function fileExists(path) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1agh/maude",
3
- "version": "0.28.0",
3
+ "version": "0.29.0",
4
4
  "description": "Marketplace of Claude Code plugins by Michal Dovrtěl: `design` (canvas-first design iteration) + `flow` (generic agentic workflow loop with .ai second brain). Ships the `maude` CLI (with `mdcc` legacy alias) to scaffold workspace, run the design dev server, and manage configs.",
5
5
  "type": "module",
6
6
  "engines": {
@@ -14,16 +14,16 @@
14
14
  "mdcc": "cli/bin/mdcc.mjs",
15
15
  "maude-safe": "cli/cli-wrapper.cjs",
16
16
  "mdcc-safe": "cli/cli-wrapper.cjs",
17
- "claude-design-server": "plugins/design/dev-server/server.mjs"
17
+ "claude-design-server": "apps/studio/server.mjs"
18
18
  },
19
19
  "scripts": {
20
- "start": "bun run plugins/design/dev-server/server.ts",
21
- "dev": "bun run plugins/design/dev-server/server.ts --port 4555",
20
+ "start": "bun run apps/studio/server.ts",
21
+ "dev": "bun run apps/studio/server.ts --port 4555",
22
22
  "dev:site": "pnpm --filter @maude/site dev --port 4398",
23
23
  "build": "pnpm -r --if-present run build",
24
- "build:binary": "bun run plugins/design/dev-server/build.ts --release",
24
+ "build:binary": "bun run apps/studio/build.ts --release",
25
25
  "test": "node --test --test-reporter=spec cli/**/*.test.mjs",
26
- "test:dev-server": "cd plugins/design/dev-server && bun test",
26
+ "test:dev-server": "cd apps/studio && bun test",
27
27
  "lint": "biome check .",
28
28
  "format": "biome format --write .",
29
29
  "changeset": "changeset",
@@ -38,20 +38,20 @@
38
38
  "video:render": "cd scripts/video/final && pnpm run render",
39
39
  "video:studio": "cd scripts/video/final && pnpm run studio",
40
40
  "postinstall": "node cli/install.cjs",
41
- "prepublishOnly": "bash scripts/check-version-parity.sh && bash plugins/design/dev-server/bin/check-runtime-bundles.sh"
41
+ "prepublishOnly": "bash scripts/check-version-parity.sh && bash apps/studio/bin/check-runtime-bundles.sh"
42
42
  },
43
43
  "optionalDependencies": {
44
- "@1agh/maude-darwin-arm64": "0.28.0",
45
- "@1agh/maude-darwin-x64": "0.28.0",
46
- "@1agh/maude-linux-arm64": "0.28.0",
47
- "@1agh/maude-linux-arm64-musl": "0.28.0",
48
- "@1agh/maude-linux-x64": "0.28.0",
49
- "@1agh/maude-linux-x64-musl": "0.28.0",
50
- "@1agh/maude-win32-x64": "0.28.0"
44
+ "@1agh/maude-darwin-arm64": "0.29.0",
45
+ "@1agh/maude-darwin-x64": "0.29.0",
46
+ "@1agh/maude-linux-arm64": "0.29.0",
47
+ "@1agh/maude-linux-arm64-musl": "0.29.0",
48
+ "@1agh/maude-linux-x64": "0.29.0",
49
+ "@1agh/maude-linux-x64-musl": "0.29.0",
50
+ "@1agh/maude-win32-x64": "0.29.0"
51
51
  },
52
52
  "files": [
53
53
  "cli",
54
- "plugins/design/dev-server",
54
+ "apps/studio",
55
55
  "plugins/design/dependencies.json",
56
56
  "plugins/design/dependencies.schema.json",
57
57
  "plugins/design/templates",
@@ -85,7 +85,7 @@
85
85
  "scaffold"
86
86
  ],
87
87
  "devDependencies": {
88
- "@biomejs/biome": "^1.9.4",
88
+ "@biomejs/biome": "^2.4.16",
89
89
  "@changesets/cli": "^2.27.10",
90
90
  "@playwright/test": "^1.60.0"
91
91
  },
@@ -177,7 +177,7 @@
177
177
  // ai-activity via postMessage when embedded; the own-WS path (standalone /
178
178
  // same-origin inspector socket) is handled in connectHmr below.
179
179
  let agentEditing = false;
180
- window.addEventListener('message', function (e) {
180
+ window.addEventListener('message', (e) => {
181
181
  // DDR-078 security follow-up: only the trusted embedding parent relays
182
182
  // ai-activity. Reject canvas self-posts (which could flip the HMR gate)
183
183
  // and any non-parent source. Standalone gets it via its own WS below.
@@ -196,7 +196,7 @@
196
196
  const rt = window.__maudeCanvasRuntime;
197
197
  if (!rt || !rt.remount) { location.reload(); return; }
198
198
  import(canvasUrl + '?v=' + (version || Date.now()))
199
- .then(function (mod) {
199
+ .then((mod) => {
200
200
  if (mod && typeof mod.default === 'function') {
201
201
  rt.remount(mod.default);
202
202
  if (rt.setHolding) rt.setHolding(false);
@@ -205,7 +205,7 @@
205
205
  location.reload();
206
206
  }
207
207
  })
208
- .catch(function (err) {
208
+ .catch((err) => {
209
209
  // Build/transpile/import error → keep the current render, surface a
210
210
  // non-destructive "holding" toast. Next good build swaps it in.
211
211
  if (rt.setHolding) rt.setHolding(true, (err && (err.message || String(err))) || 'build error');
@@ -0,0 +1,61 @@
1
+ /**
2
+ * @canvas {{NAME}} — brief board
3
+ * @ds {{DS_NAME}}
4
+ * @platform {{PLATFORM}}
5
+ * @kind brief-board
6
+ * @stack React 19 · TSX · Bun.build
7
+ * @history {{HISTORY_DIR}}
8
+ *
9
+ * Annotation-only brief board (Phase 22). This canvas is born EMPTY on purpose:
10
+ * one framed reference artboard you fill with sticky notes (N), text (T), and
11
+ * arrows (A) describing what each screen should do. When you run `/design:new`
12
+ * again while this board is the active canvas, Claude reads those annotations as
13
+ * a VERBATIM brief and inserts the matching generated artboards right here, below
14
+ * this frame — the board becomes a living brief you sketch and Claude fills in.
15
+ *
16
+ * The annotation layer lives in a sibling `<slug>.annotations.svg` (NEVER in this
17
+ * file), so your notes stay floating on top across every regeneration. No design
18
+ * system tokens or classes are wired in — the board is a neutral surface; the
19
+ * generated artboards bring the DS with them on ingest.
20
+ */
21
+
22
+ import { DCArtboard, DCSection, DesignCanvas } from "@maude/canvas-lib";
23
+
24
+ export default function {{COMPONENT_NAME}}() {
25
+ return (
26
+ <DesignCanvas>
27
+ <DCSection id="brief-board" title="Brief">
28
+ <DCArtboard id="brief" label="Brief — annotate me" width={1280} height={800}>
29
+ <div
30
+ style={{
31
+ boxSizing: "border-box",
32
+ width: "100%",
33
+ height: "100%",
34
+ display: "flex",
35
+ flexDirection: "column",
36
+ alignItems: "center",
37
+ justifyContent: "center",
38
+ gap: "14px",
39
+ padding: "48px",
40
+ textAlign: "center",
41
+ fontFamily: "ui-sans-serif, system-ui, -apple-system, sans-serif",
42
+ color: "#9aa0a6",
43
+ background: "#ffffff",
44
+ border: "1.5px dashed #d4d8dd",
45
+ }}
46
+ >
47
+ <div style={{ fontSize: "22px", fontWeight: 600, color: "#5f6571" }}>
48
+ {{NAME}}
49
+ </div>
50
+ <div style={{ fontSize: "14px", color: "#8a9099" }}>{{SEED_HINT}}</div>
51
+ <div style={{ fontSize: "13px", maxWidth: "460px", lineHeight: 1.55 }}>
52
+ Drop sticky notes (N), text (T) &amp; arrows (A) here describing what
53
+ each screen should do — then run <code>/design:new</code> again to have
54
+ Claude read your notes and lay the matching artboards out right here.
55
+ </div>
56
+ </div>
57
+ </DCArtboard>
58
+ </DCSection>
59
+ </DesignCanvas>
60
+ );
61
+ }
@@ -20,7 +20,7 @@
20
20
  * The envelope primitives (`DesignCanvas`, `DCSection`, `DCArtboard`) and any
21
21
  * specimen helpers come from the dev-server-bundled canvas library via the
22
22
  * virtual specifier — the dev-server resolves it to
23
- * `plugins/design/dev-server/canvas-lib.tsx` (single source, ships with the
23
+ * `apps/studio/canvas-lib.tsx` (single source, ships with the
24
24
  * dev-server install per DDR-025), and `/design:handoff` AST-inlines the used
25
25
  * exports so the registry-item drop is self-contained. Read that file for the
26
26
  * full export surface (helpers + hooks) before reaching for new components.
@@ -1,12 +1,12 @@
1
1
  # Sub-agent prompt templates — `/design:setup-ds` Batch B + C
2
2
 
3
- > **Why this file exists.** Per Phase 3.7 Task 4 (and DDR-049), the sub-agent prompt templates that drive Batch B + C fan-out used to live inline in `plugins/design/skills/design-system/SKILL.md` (lines 662-797 pre-extraction). SKILL.md is 1000+ LOC; the prompts were buried. Extracting them here lets us audit + extend the prompts (and especially the three MANDATORY safety blocks below) without scrolling through unrelated bootstrap logic. The skill's "Batches B + C" step loads + interpolates from this file instead of inlining the template.
3
+ > **Why this file exists.** Per Phase 3.7 Task 4 (and DDR-049), the sub-agent prompt templates that drive Batch B + C fan-out used to live inline in `plugins/design/skills/design-system/SKILL.md` (lines 662-797 pre-extraction). SKILL.md is 1000+ LOC; the prompts were buried. Extracting them here lets us audit + extend the prompts (and especially the four MANDATORY safety blocks below) without scrolling through unrelated bootstrap logic. The skill's "Batches B + C" step loads + interpolates from this file instead of inlining the template.
4
4
  >
5
5
  > **Sync rule** — when this file changes, the SKILL.md reference must still resolve. The Phase 3.7 risk register mandates a CI grep check: `SKILL.md` must literally contain the string `SUB-AGENT-PROMPTS.md`. Don't rename the file without updating the skill.
6
6
 
7
7
  The prompts are grouped by **slice** (matches the roster's `fanout:` block). Each section is a self-contained sub-agent brief — copy verbatim, substitute placeholders.
8
8
 
9
- The three MANDATORY safety blocks (ANIMATION SAFETY, RELATIVE-URL SAFETY, PLACEHOLDER POLICY) appear once at the top because they apply to every slice; sub-agent prompts reference them by name (`Apply ANIMATION SAFETY below`) instead of inlining.
9
+ The four MANDATORY safety blocks (ANIMATION SAFETY, RELATIVE-URL SAFETY, PLACEHOLDER POLICY, CODE HYGIENE) appear once at the top because they apply to every slice; sub-agent prompts reference them by name (`Apply ANIMATION SAFETY below`) instead of inlining.
10
10
 
11
11
  ---
12
12
 
@@ -36,6 +36,15 @@ The three MANDATORY safety blocks (ANIMATION SAFETY, RELATIVE-URL SAFETY, PLACEH
36
36
  - **Never assume your own placeholder path is authoritative downstream.** When the roster row's `source:` is empty AND you wrote a placeholder, set `source: placeholder` in your roster update (not `source: written`). The brand-critic and the next bootstrap pass both look for `source: placeholder` rows as "consider revisiting later".
37
37
  - **Forbidden:** authoring an `S`-shaped wordmark for a product whose first letter isn't S, authoring a "hedgehog mascot" SVG because the README copy mentioned hedgehog energy. The studyfi imprint retro D-2 caught both patterns. If the production-asset sweep returned nothing AND the discovery brief didn't explicitly request a mascot, **rewrite the copy** instead of inventing the artifact.
38
38
 
39
+ ### CODE HYGIENE (mandatory — applies to EVERY TSX + CSS file in every slice)
40
+
41
+ > **Why this block exists (setup-ds Round-2 / DDR-082).** These four defects all *pass a parse / transpile-only check but break at render or assert something false* — exactly the class the structural critic can't see. Each was caught by a user mid-flow, never by the loop. The reconcile-time scaffold-integrity gates in `_bootstrap.md` grep for all four; **prevent them here so the grep finds nothing.**
42
+
43
+ - **No empty / stub files.** Every file you claim as `written` in the roster MUST carry real content — the JSDoc header, the `import "./<slug>.css"`, and a non-trivial default export. **Never** flip a roster row to `status: written` for a file you created empty or as a placeholder-to-fill-later. A 0-byte (or near-empty, < 20 B) specimen is a reconciliation **hard-fail**, the same severity as a `pending` row. The roster's `loc:` field is a claim that is verified against disk — report the *real* line count, never an aspirational one.
44
+ - **CSS comment hygiene — never write `*/` inside a `/* … */` block.** A stray `*/` (e.g. inside an example selector string, a URL, or a nested-comment attempt) closes the comment early and the trailing text becomes invalid CSS → the dev-server bundle fails with "Bundle failed" and the specimen renders unstyled. CSS has **no nested comments.** If you must show a `*/` literally in demo copy, escape it in JSX text (`{'*/'}`) — never inside a `/* */` CSS comment.
45
+ - **`React.*` requires a BINDING import.** Any use of `React.useState`, `React.useId`, `React.Fragment`, `React.useEffect`, `React.CSSProperties`, etc. MUST be backed by `import React from "react"` (default) or `import * as React from "react"` (namespace) — those are the only forms that bind the `React` identifier. A NAMED import (`import { useState } from "react"`) or a type-only import (`import type { CSSProperties } from "react"`) does **not** bind `React`, so `React.foo` still throws `ReferenceError: React is not defined` at module-eval in the browser even though it transpiles clean — a runtime crash the structural critic never sees. **Prefer named imports and call them unqualified** (`import { useId, useState } from "react"` → `useState(…)`, not `React.useState(…)`); reach for the `React.` namespace only with the default/namespace import in place. The reconcile gate flags any `React.*` whose file lacks a default/namespace React import.
46
+ - **Contrast-claim discipline — never assert a ratio you didn't compute.** Do NOT write `✓ 4.5:1`, `✓ AAA`, `passes AA`, `7:1`, etc. in a specimen, a CSS comment, or copy **unless you actually computed it** from the real token pair (WCAG relative-luminance or APCA). A hardcoded-but-wrong ratio claim is worse than no claim — it tells the reader a failing pair is safe. If you want to *demonstrate* contrast without computing, label the swatch with the token names and the OKLCH values, not a fabricated ratio. The reconcile grep flags ratio-claim substrings for verification — an unverified claim is a gate failure.
47
+
39
48
  ---
40
49
 
41
50
  ## Sub-agent prompt template (slice-agnostic — used by every Batch B + C slice)
@@ -128,6 +137,10 @@ YOUR SLICE — write these {{N}} files (absolute paths):
128
137
  … (etc.)
129
138
 
130
139
  SAFETY BLOCKS — apply to every file in your slice:
140
+ - **CODE HYGIENE** (see SUB-AGENT-PROMPTS.md). ALWAYS — applies to every TSX +
141
+ CSS file. No empty / stub files (report real `loc:`), no `*/` inside a CSS
142
+ `/* */` block, every `React.*` needs an explicit `import`, never assert a
143
+ contrast ratio you didn't compute. The reconcile gate greps for all four.
131
144
  - **ANIMATION SAFETY** (see SUB-AGENT-PROMPTS.md). Mandatory if your slice
132
145
  includes the `motion` specimen OR any file that uses `@keyframes` /
133
146
  `transition` / `animate`. Bounded geometry + sparkle-≤56px + infinite-alternate
@@ -189,7 +202,9 @@ ANTI-PATTERNS (graphic-design-critic blockers — guaranteed rejection)
189
202
  WHEN DONE
190
203
  After writing all {{N}} files:
191
204
  1. Update each row in {{absolute path to _scaffold-roster.yaml}}: change
192
- `status: pending` → `status: written, loc: <line-count>`.
205
+ `status: pending` → `status: written, loc: <line-count>`. The `loc:` is the
206
+ REAL on-disk line count — never aspirational. An empty / stub / 0-byte file
207
+ flipped to `written` is a reconciliation hard-fail (see CODE HYGIENE).
193
208
  2. **Do NOT add new rows.** If you discover a missing claim (e.g. wordmark
194
209
  referenced but no logo.tsx in roster), include "ROSTER GAP: <description>"
195
210
  in your completion message. The main agent reconciles new rows.
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://raw.githubusercontent.com/1aGh/maude/main/plugins/design/dev-server/config.schema.json",
2
+ "$schema": "https://raw.githubusercontent.com/1aGh/maude/main/apps/studio/config.schema.json",
3
3
  "name": "{{project_name}}",
4
4
  "projectLabel": "{{project_label}}",
5
5
  "designRoot": ".design",
@@ -56,7 +56,7 @@ Per DDR-049: a canvas that imports `<MotionDemo>` or any sibling motion helper f
56
56
 
57
57
  ## Cross-links
58
58
 
59
- - Library source: `plugins/design/dev-server/canvas-lib.tsx` (`MotionDemo`, `MotionTrack`, `TokenPlayback`, `ReducedMotionToggle`, `useMotionTokens`, `easingFromToken`)
59
+ - Library source: `apps/studio/canvas-lib.tsx` (`MotionDemo`, `MotionTrack`, `TokenPlayback`, `ReducedMotionToggle`, `useMotionTokens`, `easingFromToken`)
60
60
  - Library decision: `.ai/decisions/DDR-049-motion-one-as-canonical-motion-library.md`
61
61
  - Sub-agent safety block: `plugins/design/templates/design-system-inspiration/SUB-AGENT-PROMPTS.md` → ANIMATION SAFETY
62
62
  - Tokens: `colors_and_type.css.tpl` (lines around `--dur-*` + `--ease-*`)
@@ -408,6 +408,22 @@
408
408
  "mcp": { "type": "string" },
409
409
  "defaults": { "type": "object", "additionalProperties": true }
410
410
  }
411
+ },
412
+ "whatsNew": {
413
+ "type": "object",
414
+ "additionalProperties": false,
415
+ "description": "In-product \"What's New\" feed. When enabled, /flow:done offers to append a user-facing entry for the closed-out feature to `feed`, delegating to the named project skill if set. Generic + opt-in: absent or `enabled:false` → /flow:done skips it silently. Maude wires this to apps/studio/whats-new.json, surfaced in the canvas browser.",
416
+ "properties": {
417
+ "enabled": { "type": "boolean", "default": false },
418
+ "feed": {
419
+ "type": "string",
420
+ "description": "Repo-relative path to the What's New feed JSON the entry is appended to."
421
+ },
422
+ "skill": {
423
+ "type": "string",
424
+ "description": "Optional name of a project skill (in .claude/skills/) that authors the entry; /flow:done invokes it instead of inlining the append."
425
+ }
426
+ }
411
427
  }
412
428
  }
413
429
  }
@@ -1,135 +0,0 @@
1
- #!/usr/bin/env bash
2
- # server-up.sh — ensure the design dev server is running for the given repo.
3
- # Canonical recipe (was inline in `edit.md` step 2, `new.md` step 2, etc.).
4
- #
5
- # Usage:
6
- # server-up.sh [--root <repo>] [--timeout 10] [--allow-legacy]
7
- #
8
- # Reads / writes:
9
- # $DESIGN_ROOT/_server.json (PID + port the running server wrote)
10
- # $DESIGN_ROOT/_server.log (stdout/stderr of the spawned server)
11
- #
12
- # Runtime selection (DDR-020):
13
- # - Default: bun + server.ts. Hard-fails when bun is not on $PATH.
14
- # - --allow-legacy: opt-in fallback to node + server.mjs (debug only;
15
- # no TSX canvas pipeline, no HMR). Sunset in DDR-020 Phase B.
16
- #
17
- # Output: prints the port on stdout. Diagnostic lines go to stderr.
18
- # Exit: 0 = server ready / 1 = start timeout or missing runtime / 2 = bad args.
19
-
20
- REPO=""
21
- TIMEOUT=10
22
- ALLOW_LEGACY=0
23
- while [ $# -gt 0 ]; do
24
- case "$1" in
25
- --root) REPO="$2"; shift 2 ;;
26
- --timeout) TIMEOUT="$2"; shift 2 ;;
27
- --allow-legacy) ALLOW_LEGACY=1; shift ;;
28
- --help|-h)
29
- sed -n '2,21p' "$0" | sed 's/^# \?//'
30
- exit 0
31
- ;;
32
- *)
33
- echo "server-up.sh: unknown arg '$1' (try --help)" >&2
34
- exit 2
35
- ;;
36
- esac
37
- done
38
-
39
- # Resolve repo root.
40
- if [ -z "$REPO" ]; then
41
- REPO="${CLAUDE_PROJECT_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"
42
- fi
43
-
44
- # Resolve plugin root + pick a server runtime. DDR-020: bun + server.ts is
45
- # authoritative. Legacy node + server.mjs is sunset; available only behind
46
- # --allow-legacy (debug-only — no TSX canvas pipeline, no HMR).
47
- SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
48
- PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-$(cd "$SCRIPT_DIR/../.." && pwd)}"
49
- SERVER_TS="$PLUGIN_ROOT/dev-server/server.ts"
50
- SERVER_MJS="$PLUGIN_ROOT/dev-server/server.mjs"
51
- if [ ! -f "$SERVER_TS" ]; then SERVER_TS="$SCRIPT_DIR/../server.ts"; fi
52
- if [ ! -f "$SERVER_MJS" ]; then SERVER_MJS="$SCRIPT_DIR/../server.mjs"; fi
53
-
54
- RUNTIME=""
55
- RUNTIME_CMD=""
56
- if [ $ALLOW_LEGACY -eq 1 ]; then
57
- if [ ! -f "$SERVER_MJS" ]; then
58
- echo "server-up.sh: --allow-legacy requested but server.mjs not found at $SERVER_MJS" >&2
59
- exit 1
60
- fi
61
- RUNTIME="node"
62
- RUNTIME_CMD="node $SERVER_MJS"
63
- echo "server-up.sh: WARNING — running legacy server.mjs (no TSX canvas pipeline, no HMR). DDR-020 sunsets this in Phase B." >&2
64
- elif command -v bun >/dev/null 2>&1 && [ -f "$SERVER_TS" ]; then
65
- RUNTIME="bun"
66
- RUNTIME_CMD="bun $SERVER_TS"
67
- else
68
- echo "server-up.sh: bun not on \$PATH — install via https://bun.sh/install" >&2
69
- echo "server-up.sh: DDR-020 made bun authoritative; the node fallback is opt-in via --allow-legacy (debug only)." >&2
70
- exit 1
71
- fi
72
-
73
- DESIGN_ROOT="$REPO/.design"
74
- STATE="$DESIGN_ROOT/_server.json"
75
-
76
- read_port() {
77
- if command -v jq >/dev/null 2>&1; then
78
- jq -r .port "$STATE" 2>/dev/null
79
- else
80
- # Best-effort grep — jq is in repo deps but be defensive.
81
- sed -nE 's/.*"port"[[:space:]]*:[[:space:]]*([0-9]+).*/\1/p' "$STATE" 2>/dev/null | head -n1
82
- fi
83
- }
84
- read_pid() {
85
- if command -v jq >/dev/null 2>&1; then
86
- jq -r .pid "$STATE" 2>/dev/null
87
- else
88
- sed -nE 's/.*"pid"[[:space:]]*:[[:space:]]*([0-9]+).*/\1/p' "$STATE" 2>/dev/null | head -n1
89
- fi
90
- }
91
-
92
- # Step 1 — check existing.
93
- NEEDS_START=1
94
- if [ -f "$STATE" ]; then
95
- PID=$(read_pid)
96
- PORT=$(read_port)
97
- if [ -n "$PID" ] && [ -n "$PORT" ] \
98
- && kill -0 "$PID" 2>/dev/null \
99
- && curl -fs "http://localhost:$PORT/_health" >/dev/null 2>&1; then
100
- echo "✓ server alive pid=$PID port=$PORT" >&2
101
- echo "$PORT"
102
- exit 0
103
- else
104
- echo "→ stale _server.json — clearing and respawning" >&2
105
- rm -f "$STATE"
106
- fi
107
- fi
108
-
109
- # Step 2 — spawn.
110
- mkdir -p "$DESIGN_ROOT"
111
- echo "→ starting dev server: $RUNTIME_CMD --root $REPO" >&2
112
- if [ "$RUNTIME" = "bun" ]; then
113
- nohup bun "$SERVER_TS" --root "$REPO" > "$DESIGN_ROOT/_server.log" 2>&1 &
114
- elif [ "$RUNTIME" = "node" ]; then
115
- nohup node "$SERVER_MJS" --root "$REPO" > "$DESIGN_ROOT/_server.log" 2>&1 &
116
- fi
117
- disown 2>/dev/null || true
118
-
119
- # Step 3 — poll.
120
- i=0
121
- while [ $i -lt "$TIMEOUT" ]; do
122
- sleep 1
123
- i=$((i + 1))
124
- if [ -f "$STATE" ]; then
125
- PORT=$(read_port)
126
- if [ -n "$PORT" ] && curl -fs "http://localhost:$PORT/_health" >/dev/null 2>&1; then
127
- echo "✓ server started port=$PORT after ${i}s" >&2
128
- echo "$PORT"
129
- exit 0
130
- fi
131
- fi
132
- done
133
-
134
- echo "✗ server start timeout after ${TIMEOUT}s; check $DESIGN_ROOT/_server.log" >&2
135
- exit 1