@synap-core/cli 1.11.0 → 1.12.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 (452) hide show
  1. package/README.md +23 -198
  2. package/dist/build-info.json +6 -0
  3. package/dist/commands/agent-run.js +3 -2
  4. package/dist/commands/agent-run.js.map +1 -1
  5. package/dist/commands/agents.d.ts +33 -17
  6. package/dist/commands/agents.js +203 -237
  7. package/dist/commands/agents.js.map +1 -1
  8. package/dist/commands/app.d.ts +143 -0
  9. package/dist/commands/app.js +523 -0
  10. package/dist/commands/app.js.map +1 -0
  11. package/dist/commands/automate.d.ts +21 -0
  12. package/dist/commands/automate.js +42 -0
  13. package/dist/commands/automate.js.map +1 -0
  14. package/dist/commands/automation-schema.test.d.ts +16 -0
  15. package/dist/commands/automation-schema.test.js +77 -0
  16. package/dist/commands/automation-schema.test.js.map +1 -0
  17. package/dist/commands/automation.d.ts +12 -0
  18. package/dist/commands/automation.js +80 -35
  19. package/dist/commands/automation.js.map +1 -1
  20. package/dist/commands/bridge-setup.d.ts +14 -1
  21. package/dist/commands/bridge-setup.js +392 -128
  22. package/dist/commands/bridge-setup.js.map +1 -1
  23. package/dist/commands/cap-connections.d.ts +4 -4
  24. package/dist/commands/cap-connections.js +14 -14
  25. package/dist/commands/cap-connections.js.map +1 -1
  26. package/dist/commands/capability.d.ts +2 -0
  27. package/dist/commands/capability.js +218 -168
  28. package/dist/commands/capability.js.map +1 -1
  29. package/dist/commands/catalog.d.ts +275 -0
  30. package/dist/commands/catalog.js +481 -0
  31. package/dist/commands/catalog.js.map +1 -0
  32. package/dist/commands/cell.d.ts +155 -8
  33. package/dist/commands/cell.js +416 -40
  34. package/dist/commands/cell.js.map +1 -1
  35. package/dist/commands/centrality.js +1 -13
  36. package/dist/commands/centrality.js.map +1 -1
  37. package/dist/commands/connect.d.ts +38 -13
  38. package/dist/commands/connect.js +68 -167
  39. package/dist/commands/connect.js.map +1 -1
  40. package/dist/commands/connections.d.ts +3 -2
  41. package/dist/commands/connections.js +95 -25
  42. package/dist/commands/connections.js.map +1 -1
  43. package/dist/commands/context.js +7 -1
  44. package/dist/commands/context.js.map +1 -1
  45. package/dist/commands/data-extra.d.ts +34 -0
  46. package/dist/commands/data-extra.js +193 -23
  47. package/dist/commands/data-extra.js.map +1 -1
  48. package/dist/commands/data.d.ts +120 -2
  49. package/dist/commands/data.js +293 -20
  50. package/dist/commands/data.js.map +1 -1
  51. package/dist/commands/diagnose.d.ts +66 -4
  52. package/dist/commands/diagnose.js +285 -28
  53. package/dist/commands/diagnose.js.map +1 -1
  54. package/dist/commands/doc.d.ts +11 -4
  55. package/dist/commands/doc.js +39 -14
  56. package/dist/commands/doc.js.map +1 -1
  57. package/dist/commands/doctor.d.ts +112 -3
  58. package/dist/commands/doctor.js +657 -32
  59. package/dist/commands/doctor.js.map +1 -1
  60. package/dist/commands/explain.js +5 -5
  61. package/dist/commands/explain.js.map +1 -1
  62. package/dist/commands/import.d.ts +368 -13
  63. package/dist/commands/import.js +1064 -54
  64. package/dist/commands/import.js.map +1 -1
  65. package/dist/commands/init.d.ts +20 -9
  66. package/dist/commands/init.js +433 -973
  67. package/dist/commands/init.js.map +1 -1
  68. package/dist/commands/keys.d.ts +1 -0
  69. package/dist/commands/keys.js +15 -2
  70. package/dist/commands/keys.js.map +1 -1
  71. package/dist/commands/knowledge.d.ts +22 -6
  72. package/dist/commands/knowledge.js +117 -55
  73. package/dist/commands/knowledge.js.map +1 -1
  74. package/dist/commands/lens.d.ts +37 -1
  75. package/dist/commands/lens.js +192 -71
  76. package/dist/commands/lens.js.map +1 -1
  77. package/dist/commands/market-authoring.d.ts +29 -2
  78. package/dist/commands/market-authoring.js +348 -7
  79. package/dist/commands/market-authoring.js.map +1 -1
  80. package/dist/commands/market-official.d.ts +58 -0
  81. package/dist/commands/market-official.js +84 -0
  82. package/dist/commands/market-official.js.map +1 -0
  83. package/dist/commands/market.d.ts +400 -16
  84. package/dist/commands/market.js +1802 -146
  85. package/dist/commands/market.js.map +1 -1
  86. package/dist/commands/mcp.d.ts +60 -25
  87. package/dist/commands/mcp.js +251 -64
  88. package/dist/commands/mcp.js.map +1 -1
  89. package/dist/commands/open.d.ts +39 -9
  90. package/dist/commands/open.js +80 -25
  91. package/dist/commands/open.js.map +1 -1
  92. package/dist/commands/playbook.d.ts +42 -0
  93. package/dist/commands/playbook.js +162 -0
  94. package/dist/commands/playbook.js.map +1 -0
  95. package/dist/commands/pod.js +1 -1
  96. package/dist/commands/pod.js.map +1 -1
  97. package/dist/commands/pods.d.ts +5 -0
  98. package/dist/commands/pods.js +97 -116
  99. package/dist/commands/pods.js.map +1 -1
  100. package/dist/commands/proposals-actions.d.ts +62 -0
  101. package/dist/commands/proposals-actions.js +143 -8
  102. package/dist/commands/proposals-actions.js.map +1 -1
  103. package/dist/commands/proposals-await.d.ts +68 -0
  104. package/dist/commands/proposals-await.js +248 -0
  105. package/dist/commands/proposals-await.js.map +1 -0
  106. package/dist/commands/proton-setup.d.ts +73 -0
  107. package/dist/commands/proton-setup.js +577 -0
  108. package/dist/commands/proton-setup.js.map +1 -0
  109. package/dist/commands/providers.d.ts +23 -0
  110. package/dist/commands/providers.js +126 -1
  111. package/dist/commands/providers.js.map +1 -1
  112. package/dist/commands/raycast.js +6 -2
  113. package/dist/commands/raycast.js.map +1 -1
  114. package/dist/commands/rule.d.ts +150 -0
  115. package/dist/commands/rule.js +447 -0
  116. package/dist/commands/rule.js.map +1 -0
  117. package/dist/commands/session-wait.d.ts +111 -0
  118. package/dist/commands/session-wait.js +209 -0
  119. package/dist/commands/session-wait.js.map +1 -0
  120. package/dist/commands/sessions.d.ts +52 -0
  121. package/dist/commands/sessions.js +478 -58
  122. package/dist/commands/sessions.js.map +1 -1
  123. package/dist/commands/skill-manage.d.ts +21 -0
  124. package/dist/commands/skill-manage.js +136 -19
  125. package/dist/commands/skill-manage.js.map +1 -1
  126. package/dist/commands/skills.js +16 -0
  127. package/dist/commands/skills.js.map +1 -1
  128. package/dist/commands/status.d.ts +1 -4
  129. package/dist/commands/status.js +5 -34
  130. package/dist/commands/status.js.map +1 -1
  131. package/dist/commands/statusline.backoff.test.d.ts +13 -0
  132. package/dist/commands/statusline.backoff.test.js +100 -0
  133. package/dist/commands/statusline.backoff.test.js.map +1 -0
  134. package/dist/commands/statusline.js +16 -9
  135. package/dist/commands/statusline.js.map +1 -1
  136. package/dist/commands/sync-status.d.ts +12 -0
  137. package/dist/commands/sync-status.js +125 -0
  138. package/dist/commands/sync-status.js.map +1 -0
  139. package/dist/commands/templates-retire.d.ts +34 -0
  140. package/dist/commands/templates-retire.js +192 -0
  141. package/dist/commands/templates-retire.js.map +1 -0
  142. package/dist/commands/tools.js +6 -21
  143. package/dist/commands/tools.js.map +1 -1
  144. package/dist/commands/tracks.d.ts +51 -0
  145. package/dist/commands/tracks.js +291 -0
  146. package/dist/commands/tracks.js.map +1 -0
  147. package/dist/commands/update.d.ts +3 -11
  148. package/dist/commands/update.js +5 -134
  149. package/dist/commands/update.js.map +1 -1
  150. package/dist/commands/upload.d.ts +41 -3
  151. package/dist/commands/upload.js +120 -18
  152. package/dist/commands/upload.js.map +1 -1
  153. package/dist/commands/vendor.d.ts +28 -0
  154. package/dist/commands/vendor.js +110 -0
  155. package/dist/commands/vendor.js.map +1 -0
  156. package/dist/commands/versions.js +6 -0
  157. package/dist/commands/versions.js.map +1 -1
  158. package/dist/commands/view.js +10 -5
  159. package/dist/commands/view.js.map +1 -1
  160. package/dist/commands/whoami.d.ts +23 -3
  161. package/dist/commands/whoami.js +169 -23
  162. package/dist/commands/whoami.js.map +1 -1
  163. package/dist/commands/worker.d.ts +122 -0
  164. package/dist/commands/worker.js +435 -0
  165. package/dist/commands/worker.js.map +1 -0
  166. package/dist/commands/worker.test.d.ts +1 -0
  167. package/dist/commands/worker.test.js +116 -0
  168. package/dist/commands/worker.test.js.map +1 -0
  169. package/dist/commands/workspace-ops.d.ts +35 -0
  170. package/dist/commands/workspace-ops.js +153 -0
  171. package/dist/commands/workspace-ops.js.map +1 -0
  172. package/dist/index.d.ts +6 -6
  173. package/dist/index.js +900 -180
  174. package/dist/index.js.map +1 -1
  175. package/dist/lib/agent-connections.d.ts +31 -0
  176. package/dist/lib/agent-connections.js +33 -0
  177. package/dist/lib/agent-connections.js.map +1 -0
  178. package/dist/lib/agent-detect.d.ts +27 -0
  179. package/dist/lib/agent-detect.js +71 -0
  180. package/dist/lib/agent-detect.js.map +1 -0
  181. package/dist/lib/agent-door.d.ts +138 -0
  182. package/dist/lib/agent-door.js +426 -0
  183. package/dist/lib/agent-door.js.map +1 -0
  184. package/dist/lib/agents-config.d.ts +2 -0
  185. package/dist/lib/agents-config.js +4 -9
  186. package/dist/lib/agents-config.js.map +1 -1
  187. package/dist/lib/approval-poll.d.ts +31 -2
  188. package/dist/lib/approval-poll.js +20 -7
  189. package/dist/lib/approval-poll.js.map +1 -1
  190. package/dist/lib/atomic-file.d.ts +48 -0
  191. package/dist/lib/atomic-file.js +129 -0
  192. package/dist/lib/atomic-file.js.map +1 -0
  193. package/dist/lib/auth.d.ts +14 -9
  194. package/dist/lib/auth.js +44 -61
  195. package/dist/lib/auth.js.map +1 -1
  196. package/dist/lib/batch-approval.d.ts +85 -0
  197. package/dist/lib/batch-approval.js +170 -0
  198. package/dist/lib/batch-approval.js.map +1 -0
  199. package/dist/lib/capture-lane.d.ts +6 -5
  200. package/dist/lib/capture-lane.js +6 -5
  201. package/dist/lib/capture-lane.js.map +1 -1
  202. package/dist/lib/capture-structure.d.ts +230 -11
  203. package/dist/lib/capture-structure.js +251 -13
  204. package/dist/lib/capture-structure.js.map +1 -1
  205. package/dist/lib/catalog-templates.d.ts +59 -0
  206. package/dist/lib/catalog-templates.js +126 -0
  207. package/dist/lib/catalog-templates.js.map +1 -0
  208. package/dist/lib/cli-build.d.ts +19 -0
  209. package/dist/lib/cli-build.js +37 -0
  210. package/dist/lib/cli-build.js.map +1 -0
  211. package/dist/lib/conversation-headers.d.ts +18 -0
  212. package/dist/lib/conversation-headers.js +32 -0
  213. package/dist/lib/conversation-headers.js.map +1 -0
  214. package/dist/lib/cp-packages.d.ts +167 -11
  215. package/dist/lib/cp-packages.js +253 -21
  216. package/dist/lib/cp-packages.js.map +1 -1
  217. package/dist/lib/credential-class.d.ts +117 -0
  218. package/dist/lib/credential-class.js +116 -0
  219. package/dist/lib/credential-class.js.map +1 -0
  220. package/dist/lib/describe-lens.d.ts +35 -0
  221. package/dist/lib/describe-lens.js +40 -0
  222. package/dist/lib/describe-lens.js.map +1 -1
  223. package/dist/lib/device-connect.d.ts +125 -0
  224. package/dist/lib/device-connect.js +256 -0
  225. package/dist/lib/device-connect.js.map +1 -0
  226. package/dist/lib/directory-lens.d.ts +99 -0
  227. package/dist/lib/directory-lens.js +187 -0
  228. package/dist/lib/directory-lens.js.map +1 -0
  229. package/dist/lib/exporter-coverage.d.ts +71 -0
  230. package/dist/lib/exporter-coverage.js +97 -0
  231. package/dist/lib/exporter-coverage.js.map +1 -0
  232. package/dist/lib/hub-client.d.ts +29 -8
  233. package/dist/lib/hub-client.js +328 -55
  234. package/dist/lib/hub-client.js.map +1 -1
  235. package/dist/lib/init-connect.d.ts +41 -0
  236. package/dist/lib/init-connect.js +75 -0
  237. package/dist/lib/init-connect.js.map +1 -0
  238. package/dist/lib/init-exit.d.ts +24 -0
  239. package/dist/lib/init-exit.js +41 -0
  240. package/dist/lib/init-exit.js.map +1 -0
  241. package/dist/lib/init-flow.d.ts +25 -0
  242. package/dist/lib/init-flow.js +40 -0
  243. package/dist/lib/init-flow.js.map +1 -0
  244. package/dist/lib/init-handoff.d.ts +16 -0
  245. package/dist/lib/init-handoff.js +19 -0
  246. package/dist/lib/init-handoff.js.map +1 -0
  247. package/dist/lib/init-output.d.ts +18 -0
  248. package/dist/lib/init-output.js +43 -0
  249. package/dist/lib/init-output.js.map +1 -0
  250. package/dist/lib/init-pod.d.ts +45 -0
  251. package/dist/lib/init-pod.js +36 -0
  252. package/dist/lib/init-pod.js.map +1 -0
  253. package/dist/lib/installed.d.ts +210 -11
  254. package/dist/lib/installed.js +234 -36
  255. package/dist/lib/installed.js.map +1 -1
  256. package/dist/lib/key-approval.d.ts +57 -0
  257. package/dist/lib/key-approval.js +117 -0
  258. package/dist/lib/key-approval.js.map +1 -0
  259. package/dist/lib/key-diagnosis.d.ts +56 -0
  260. package/dist/lib/key-diagnosis.js +227 -0
  261. package/dist/lib/key-diagnosis.js.map +1 -0
  262. package/dist/lib/key-doctor.d.ts +136 -0
  263. package/dist/lib/key-doctor.js +286 -0
  264. package/dist/lib/key-doctor.js.map +1 -0
  265. package/dist/lib/key-locations.d.ts +120 -0
  266. package/dist/lib/key-locations.js +326 -0
  267. package/dist/lib/key-locations.js.map +1 -0
  268. package/dist/lib/key-source.d.ts +66 -0
  269. package/dist/lib/key-source.js +106 -0
  270. package/dist/lib/key-source.js.map +1 -0
  271. package/dist/lib/key-state.d.ts +70 -0
  272. package/dist/lib/key-state.js +115 -0
  273. package/dist/lib/key-state.js.map +1 -0
  274. package/dist/lib/kind-package.d.ts +181 -0
  275. package/dist/lib/kind-package.js +679 -0
  276. package/dist/lib/kind-package.js.map +1 -0
  277. package/dist/lib/knowledge-title.d.ts +24 -0
  278. package/dist/lib/knowledge-title.js +46 -0
  279. package/dist/lib/knowledge-title.js.map +1 -0
  280. package/dist/lib/knowledge-title.test.d.ts +1 -0
  281. package/dist/lib/knowledge-title.test.js +34 -0
  282. package/dist/lib/knowledge-title.test.js.map +1 -0
  283. package/dist/lib/machine-instance.d.ts +64 -0
  284. package/dist/lib/machine-instance.js +142 -0
  285. package/dist/lib/machine-instance.js.map +1 -0
  286. package/dist/lib/mcp-bridge.d.ts +42 -0
  287. package/dist/lib/mcp-bridge.js +147 -0
  288. package/dist/lib/mcp-bridge.js.map +1 -0
  289. package/dist/lib/mcp-bridge.test.d.ts +1 -0
  290. package/dist/lib/mcp-bridge.test.js +90 -0
  291. package/dist/lib/mcp-bridge.test.js.map +1 -0
  292. package/dist/lib/mcp-call.d.ts +30 -0
  293. package/dist/lib/mcp-call.js +107 -0
  294. package/dist/lib/mcp-call.js.map +1 -0
  295. package/dist/lib/mcp-snippets.d.ts +53 -0
  296. package/dist/lib/mcp-snippets.js +82 -0
  297. package/dist/lib/mcp-snippets.js.map +1 -0
  298. package/dist/lib/next-steps.d.ts +8 -0
  299. package/dist/lib/next-steps.js +31 -1
  300. package/dist/lib/next-steps.js.map +1 -1
  301. package/dist/lib/package-wire.d.ts +179 -0
  302. package/dist/lib/package-wire.js +68 -0
  303. package/dist/lib/package-wire.js.map +1 -0
  304. package/dist/lib/pair-link.d.ts +38 -0
  305. package/dist/lib/pair-link.js +68 -0
  306. package/dist/lib/pair-link.js.map +1 -0
  307. package/dist/lib/pod-wide.d.ts +40 -0
  308. package/dist/lib/pod-wide.js +46 -0
  309. package/dist/lib/pod-wide.js.map +1 -0
  310. package/dist/lib/pod.d.ts +66 -112
  311. package/dist/lib/pod.js +134 -412
  312. package/dist/lib/pod.js.map +1 -1
  313. package/dist/lib/project-ref.d.ts +9 -3
  314. package/dist/lib/project-ref.js +10 -4
  315. package/dist/lib/project-ref.js.map +1 -1
  316. package/dist/lib/review-credential.d.ts +119 -0
  317. package/dist/lib/review-credential.js +147 -0
  318. package/dist/lib/review-credential.js.map +1 -0
  319. package/dist/lib/safe-open.d.ts +49 -0
  320. package/dist/lib/safe-open.js +119 -0
  321. package/dist/lib/safe-open.js.map +1 -0
  322. package/dist/lib/session-lens.d.ts +40 -1
  323. package/dist/lib/session-lens.js +54 -4
  324. package/dist/lib/session-lens.js.map +1 -1
  325. package/dist/lib/superwhisper-import.d.ts +8 -0
  326. package/dist/lib/superwhisper-import.js +14 -7
  327. package/dist/lib/superwhisper-import.js.map +1 -1
  328. package/dist/lib/superwhisper-title.test.d.ts +1 -0
  329. package/dist/lib/superwhisper-title.test.js +18 -0
  330. package/dist/lib/superwhisper-title.test.js.map +1 -0
  331. package/dist/lib/targets.d.ts +134 -10
  332. package/dist/lib/targets.js +962 -258
  333. package/dist/lib/targets.js.map +1 -1
  334. package/dist/lib/template-file.d.ts +4 -0
  335. package/dist/lib/template-file.js.map +1 -1
  336. package/dist/lib/template-lifecycle.d.ts +217 -0
  337. package/dist/lib/template-lifecycle.js +433 -0
  338. package/dist/lib/template-lifecycle.js.map +1 -0
  339. package/dist/lib/template-steps.d.ts +88 -0
  340. package/dist/lib/template-steps.js +118 -0
  341. package/dist/lib/template-steps.js.map +1 -0
  342. package/dist/lib/time-ago.d.ts +2 -0
  343. package/dist/lib/time-ago.js +15 -0
  344. package/dist/lib/time-ago.js.map +1 -0
  345. package/dist/utils/logger.js +5 -2
  346. package/dist/utils/logger.js.map +1 -1
  347. package/package.json +23 -17
  348. package/skills/README.md +12 -10
  349. package/skills/agent-os/SKILL.md +214 -99
  350. package/skills/manifest.json +1 -1
  351. package/skills/onboard/SKILL.md +55 -26
  352. package/skills/synap/README.md +5 -8
  353. package/skills/synap/SKILL.md +1086 -283
  354. package/skills/synap/_order.txt +7 -0
  355. package/skills/synap/_skill.yaml +1 -1
  356. package/skills/synap/automations.md +15 -0
  357. package/skills/synap/capture.md +5 -0
  358. package/skills/synap/cli-operations.md +24 -18
  359. package/skills/synap/concepts.md +28 -0
  360. package/skills/synap/content-os.md +10 -1
  361. package/skills/synap/creative-loop.md +15 -10
  362. package/skills/synap/crm.md +21 -52
  363. package/skills/synap/document-embeds.md +141 -47
  364. package/skills/synap/escalation-ladder.md +20 -10
  365. package/skills/synap/focus-sessions.md +47 -21
  366. package/skills/synap/from-intent.md +142 -0
  367. package/skills/synap/governance-rules.md +4 -4
  368. package/skills/synap/governance.md +10 -7
  369. package/skills/synap/hand-off.md +33 -0
  370. package/skills/synap/inline-patterns.md +15 -7
  371. package/skills/synap/lenses.md +33 -15
  372. package/skills/synap/linking.md +41 -40
  373. package/skills/synap/mcp-remote-servers.md +64 -0
  374. package/skills/synap/mental-model.md +17 -15
  375. package/skills/synap/operating-mode-rules.md +1 -1
  376. package/skills/synap/processes.md +118 -0
  377. package/skills/synap/quick-reference.md +5 -1
  378. package/skills/synap/reading.md +3 -1
  379. package/skills/synap/reflexes.md +12 -42
  380. package/skills/synap/viewframe-cells.md +38 -5
  381. package/skills/synap/work-flow.md +1 -1
  382. package/skills/synap/work-model.md +96 -0
  383. package/skills/synap/worked-examples.md +4 -5
  384. package/skills/synap/workspace-design.md +14 -10
  385. package/skills/synap/writes.md +97 -24
  386. package/skills/synap/writing-titles.md +63 -0
  387. package/skills/synap-app/SKILL.md +2 -2
  388. package/skills/synap-app/_skill.yaml +1 -1
  389. package/skills/synap-app/install-commands.md +1 -1
  390. package/skills/synap-design/SKILL.md +474 -0
  391. package/skills/synap-design/_order.txt +4 -0
  392. package/skills/synap-design/_skill.yaml +21 -0
  393. package/skills/synap-design/loop.md +134 -0
  394. package/skills/synap-design/overview.md +44 -0
  395. package/skills/synap-design/principles.md +130 -0
  396. package/skills/synap-design/system.md +133 -0
  397. package/skills/synap-market/SKILL.md +306 -16
  398. package/skills/synap-market/_skill.yaml +1 -1
  399. package/skills/synap-market/author-and-publish.md +145 -8
  400. package/skills/synap-market/governance-and-catalog.md +7 -0
  401. package/skills/synap-market/install.md +79 -1
  402. package/skills/synap-market/overview.md +74 -6
  403. package/skills/synap-schema/SKILL.md +172 -10
  404. package/skills/synap-schema/_order.txt +2 -0
  405. package/skills/synap-schema/_skill.yaml +4 -2
  406. package/skills/synap-schema/common-mistakes.md +4 -2
  407. package/skills/synap-schema/discover-profiles.md +1 -1
  408. package/skills/synap-schema/entity-scope.md +15 -3
  409. package/skills/synap-schema/extend-first.md +29 -0
  410. package/skills/synap-schema/extend-vs-create.md +1 -1
  411. package/skills/synap-schema/intent-vocabulary-ssot.md +111 -0
  412. package/skills/synap-schema/property-types.md +1 -1
  413. package/skills/synap-schema/relations.md +1 -1
  414. package/skills/synap-ui/SKILL.md +19 -12
  415. package/skills/synap-ui/_skill.yaml +1 -1
  416. package/skills/synap-ui/ai-companion.md +1 -1
  417. package/skills/synap-ui/arranging-bento.md +2 -0
  418. package/skills/synap-ui/bento-layouts.md +10 -10
  419. package/skills/synap-ui/bento-recipes.md +313 -543
  420. package/skills/synap-ui/four-builds.md +5 -0
  421. package/skills/synap-ui/view-types.md +2 -2
  422. package/skills/synap-ui/widget-catalog.md +22 -278
  423. package/templates/automations/bookmark-enrichment.automation.json +290 -13
  424. package/templates/automations/url-bookmark-capture.automation.json +73 -11
  425. package/templates/skills/authoring-playbooks/SKILL.md +6 -3
  426. package/templates/skills/authoring-playbooks/reference/stages-contract.md +15 -0
  427. package/templates/skills/authoring-playbooks/reference/worked-example.md +3 -0
  428. package/dist/commands/infra.d.ts +0 -21
  429. package/dist/commands/infra.js +0 -262
  430. package/dist/commands/infra.js.map +0 -1
  431. package/dist/commands/template.d.ts +0 -42
  432. package/dist/commands/template.js +0 -191
  433. package/dist/commands/template.js.map +0 -1
  434. package/dist/lib/browser-auth.d.ts +0 -35
  435. package/dist/lib/browser-auth.js +0 -170
  436. package/dist/lib/browser-auth.js.map +0 -1
  437. package/dist/lib/openclaw.d.ts +0 -32
  438. package/dist/lib/openclaw.js +0 -164
  439. package/dist/lib/openclaw.js.map +0 -1
  440. package/dist/lib/seed.d.ts +0 -13
  441. package/dist/lib/seed.js +0 -135
  442. package/dist/lib/seed.js.map +0 -1
  443. package/node_modules/@synap/hub-rest-client/dist/index.cjs +0 -1261
  444. package/node_modules/@synap/hub-rest-client/dist/index.d.cts +0 -1647
  445. package/node_modules/@synap/hub-rest-client/dist/index.d.ts +0 -1647
  446. package/node_modules/@synap/hub-rest-client/dist/index.js +0 -1231
  447. package/node_modules/@synap/hub-rest-client/package.json +0 -45
  448. package/node_modules/@synap/hub-rest-client/src/client.ts +0 -1631
  449. package/node_modules/@synap/hub-rest-client/src/errors.ts +0 -30
  450. package/node_modules/@synap/hub-rest-client/src/index.ts +0 -153
  451. package/node_modules/@synap/hub-rest-client/src/setup.ts +0 -133
  452. package/node_modules/@synap/hub-rest-client/src/types.ts +0 -1299
@@ -0,0 +1,134 @@
1
+ # The design-to-code loop
2
+
3
+ ```
4
+ catalog ──► Puck JSON ──► 3 ui-design variants ──► critique ──► a person picks one, approves
5
+ │
6
+ merged + verified ◄── gates + compare + dogfood ◄── implement from the approved design
7
+ ```
8
+
9
+ The process "Design to implementation" (Builder space) carries a design from draft to merged. A
10
+ person, or an agent asked to, starts it on the request design with `synap_run_playbook`; it does not
11
+ start itself on every new `ui-design`, because sibling variants are `ui-design`s too.
12
+
13
+ ## 1. The design is Puck JSON from real components
14
+
15
+ ```json
16
+ {
17
+ "content": [
18
+ {
19
+ "type": "SpatialPanel",
20
+ "props": { "id": "SpatialPanel-1", "title": "Agents" }
21
+ },
22
+ {
23
+ "type": "SpatialButton",
24
+ "props": {
25
+ "id": "SpatialButton-1",
26
+ "children": "Add agent",
27
+ "size": "md"
28
+ }
29
+ }
30
+ ],
31
+ "root": { "props": { "title": "Settings › Agents" } },
32
+ "zones": {}
33
+ }
34
+ ```
35
+
36
+ - `content[]` is the page, top to bottom. Each item is `{ type, props }`; `props.id` is required and
37
+ unique (`<Type>-<n>` is fine).
38
+ - `type` is a component name from the manifest, spelled exactly, and placeable (it has a story tagged
39
+ `canvas`). `props` are props it declares, with values of the declared type: an enum takes one of its
40
+ literals. Function props, `className`, `style`, `as` and raw HTML are never accepted.
41
+ - A `children` prop of type ReactNode is a slot that holds an array of blocks. Other ReactNode props
42
+ (`label`, `title`) are plain text. Keep `zones` as `{}`. `root.props` holds page settings only.
43
+ - No hex, rgb, px or font family in a prop; colour, spacing and type come from components and tokens.
44
+ - Motion is not in the props. List it in the design's `motion` property as
45
+ `[{ "trigger": "enter", "target": "SpatialPanel-1", "preset": "fade-rise" }]` with named presets only.
46
+ - Lay out every state the screen has: empty, loading, failed, full, long content. Each empty state is
47
+ OMIT, INVITE, EXPLAIN or REASSURE; a failed read is its own state with a retry.
48
+ - The canvas validates on load: an unknown `type` refuses the whole design; an undeclared or wrong prop
49
+ is stripped and listed. Check yours with the canvas's Paste JSON.
50
+
51
+ ## 2. Save it as a `ui-design` entity
52
+
53
+ Find before you create: `synap_find` for an existing `ui-design` on the same `target-surface`.
54
+
55
+ - Create with `synap_create_entity`, `profileSlug: "ui-design"`, a title, and properties:
56
+ `target-surface` (app and screen), `design-scope` (`component` or `page`), `design-goal` (the job the
57
+ screen does; the critique judges against it), `design-json`, `components-used` (the distinct `type`
58
+ values, derived from the JSON, never typed by hand), `schema-version` (`1`), `motion`,
59
+ `current-story-id` (the story of the screen as it is today, when it exists), `design-notes`.
60
+ - **Three variants by default.** One request is three designs: the request plus two siblings, sharing
61
+ one `variant-group`, `target-surface`, `design-scope` and `design-goal`. Make them genuinely
62
+ different answers (structure, density, order), not three colourings. Link each sibling to the
63
+ request with `relates_to`. If the person asks for one, make one.
64
+ - Read the person's references first (linked with `references` via `synap_link_entities`).
65
+ - Revise with `synap_update_entity`, writing `design-json` and `components-used` together.
66
+ - `proposed` is success: a person reviews the write. Do not retry.
67
+ - Never save a screenshot as the design, and never mirror components into the pod as entities.
68
+
69
+ ## 3. Critique: three tiers, not equally trusted
70
+
71
+ Every finding names a rule id from the critique rubric (`design-critique` skill); no rule id, no
72
+ finding. Write the list into each variant's `critique`.
73
+
74
+ | Tier | Who decides | May block | Applied automatically |
75
+ | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------- | --------------------------- |
76
+ | **Checked** | a tool or a measurement (axe, contrast, target size, tokens only, manifest only, named motion) | yes | the generator fixes it |
77
+ | **Pattern** | you classify what is on screen; a fixed house rule judges (marks, empty answers, doors, caps, order, one primary, AI colour, creation, raw tokens, states covered) | yes | the generator fixes it |
78
+ | **Opinion** | your judgement, tied to one named Nielsen heuristic, low confidence | never | **never**; a person decides |
79
+
80
+ - Run the tool for a Checked rule; never estimate. Unmeasured is low confidence, never a pass.
81
+ - The gate passes when every variant going to review has its critique and no open Checked or Pattern
82
+ blocker. Opinions never decide it.
83
+ - A failing gate goes back to generation; then critique again from scratch. Never edit or delete a
84
+ finding to clear the gate. Only a person dismisses.
85
+
86
+ ## 4. The human gate
87
+
88
+ `design-status`: `draft`, `in-review`, `approved`, `implementing`, `implemented`, `archived`.
89
+
90
+ - Every move is `synap_update_entity` with the new `design-status` AND `expectedStatus` set to the
91
+ status you read. A conflict means someone moved it: re-read, decide again.
92
+ - **`approved` is a person's call.** Put the design `in-review`, ask for the review, wait. A rejection
93
+ sends you back to revise.
94
+ - The person picks ONE variant. Inside the process, if they choose a sibling, write its
95
+ `design-json`, `components-used` and `motion` into the request design before approval. Archiving
96
+ the others is the person's call.
97
+
98
+ ## 5. Implement from the approved design
99
+
100
+ - Start only from `approved` (or `implementing` when the process already moved it). Draft or in
101
+ review: stop and say so. Move `approved` to `implementing` with `expectedStatus: "approved"`.
102
+ - Read it with `synap_get_entity`. For each distinct `type`, confirm the component and its props in
103
+ the catalog. A missing type or prop: stop, record it in `design-notes`, propose the component.
104
+ - Build only those components, in the order of `content[]` and its slots, with tokens only and the
105
+ named motion presets. The design gives layout, not data wiring: data still flows through the layers.
106
+ - Give the screen a story and record its id in `implemented-story-id`. Never edit `design-json` to
107
+ match what you built; revise as a new draft instead.
108
+
109
+ ## 6. Verify against the design
110
+
111
+ - Run the gates yourself and quote them: type-check, story tests (render, interaction, axe), visual
112
+ regression when a primitive changed (a moved pixel is a finding first, never a baseline update),
113
+ the token, hex and motion guards.
114
+ - **Compare Today, Design and Built.** Capture the built story and, when set, the `current-story-id`
115
+ (today) with `pnpm --filter @synap-core/storybook capture`, the one capture door; render the design on
116
+ the canvas; list every difference. Then run the Checked tier on the built story.
117
+ - Walk the screen in the running app with screenshots: WORKS, BROKEN or CANNOT-TELL.
118
+ - Open the PR and record its URL in `implementation-pr`. Inside the process stop there: Done is a
119
+ person's gate that writes `implemented`. Outside it, a move to `implemented` proposes and a person
120
+ confirms the merge. Report VERIFIED separately from NEEDS-DOGFOOD.
121
+
122
+ ## 7. Where designs are viewed
123
+
124
+ - **Team devbox, always on, built from `main`:** an index at `http://devbox:3000`, Storybook, the
125
+ Design app at `http://devbox:3007`: the Map (`#/`, every component Figma-style; tokens on its
126
+ Foundations page, also at `#/design-tokens`), the design canvas (`#/design`) and the Lab
127
+ (`#/lab`, live full experiences), and the
128
+ Storybook MCP at `http://devbox:3006/mcp`. These hosts are on the founder's private tailnet only:
129
+ an agent or pod outside it cannot reach them.
130
+ - **Locally, for unmerged work:** `pnpm --filter @synap-core/storybook storybook` from the monorepo
131
+ root (127.0.0.1:6006, MCP at `/mcp`).
132
+ - The Storybook MCP has no authentication. Reach it only on your own machine or over a private
133
+ network, never register it as a public pod MCP server. An agent on a remote pod reads the static
134
+ `/manifests/components.json` of a Storybook build instead.
@@ -0,0 +1,44 @@
1
+ # Synap design
2
+
3
+ Load this when you design, review or build any Synap UI, or a UI for a user's pod: a screen, page,
4
+ panel, section, card, component, empty state or dashboard. It is the one place the design rules live
5
+ for every agent. For views, bento dashboards and workspaces over pod data, also load `synap-ui`.
6
+
7
+ Most bad screens here are not styling failures. They are modelling failures: the object was never
8
+ named, so the screen borrowed a foreign card and inherited its verbs. Get the object and the job right
9
+ first; the layout follows from them.
10
+
11
+ ## Before anything: name the object and the job
12
+
13
+ - Write one sentence: "This surface renders ONE ___." Check that the card, row or panel you plan to
14
+ use was built for that object. If none fits, model the object; never bend a foreign one.
15
+ - Write the reader's primary job as the question they arrive with, then the secondary one. A surface
16
+ that serves its secondary job by default has failed.
17
+ - Ground truth first. Read the component that renders it today and the data the backend really
18
+ returns. Never design from a description or from memory.
19
+
20
+ ## The loop (six steps)
21
+
22
+ 1. **Discover what exists.** Query the component catalog before you design or build anything
23
+ (`system.md`). If the thing exists, even imperfectly, the work is adopt, extend or consolidate,
24
+ and the diff should shrink.
25
+ 2. **Design with real components.** A design is data, not a picture: Puck JSON whose every block is a
26
+ real component from the catalog, saved as a `ui-design` entity. Three genuinely different variants
27
+ by default. Lay out every state (`loop.md`).
28
+ 3. **Critique.** Run the three-tier rubric on each variant: Checked, Pattern, Opinion. Fix every
29
+ Checked and Pattern blocker and critique again. Opinions go to the person, never applied by you.
30
+ 4. **Human review gate.** Move the design to `in-review` and wait. `approved` is a person's call; you
31
+ never set it, and you never implement from a draft.
32
+ 5. **Implement.** Build exactly the approved design from the same components and tokens. Do not
33
+ reinterpret it.
34
+ 6. **Verify against the design.** Run the gates yourself, then compare Today, Design and Built side
35
+ by side, and walk the screen in the running app. Report what is VERIFIED (a gate proved it)
36
+ separately from what NEEDS-DOGFOOD (only a running app can show it).
37
+
38
+ ## Files
39
+
40
+ | File | Read it for |
41
+ | --------------- | ---------------------------------------------------------------------------------------------------------------------- |
42
+ | `principles.md` | how a screen is arranged: marks, empty states, doors, lists, order, actions, disclosure, colour, depth |
43
+ | `system.md` | what you build with: the catalog, tokens, the primitive table, labels, motion presets |
44
+ | `loop.md` | the design-to-code loop: the `ui-design` entity, variants, critique tiers, approval, implement, compare, where to view |
@@ -0,0 +1,130 @@
1
+ # Design principles: how a screen is arranged
2
+
3
+ Every rule here was dictated after dogfooding a screen that broke it. Apply all of them; a reviewer
4
+ checks each one.
5
+
6
+ ## 1. State is a mark, not a sentence
7
+
8
+ A reader must know where a thing stands without reading. Colour and icon first; text only to
9
+ disambiguate what the mark cannot carry.
10
+
11
+ - Derive state once, from the shared unit state: it returns a tone and a glyph, never a colour and
12
+ never a sentence. Never re-derive it locally.
13
+ - A tone has two values: a FILL for marks, dots and rails (3:1) and an INK for text and icons (4.5:1).
14
+ Never use a fill as text; it fails contrast on light palettes.
15
+ - A status that is only ever prose is a defect. If you wrote a sentence to convey state, you owed a chip.
16
+ - Reduce text everywhere. Two lines that a chip plus four words would say is slop.
17
+
18
+ ## 2. Classify every section's empty answer
19
+
20
+ Never a bare grey caption. Pick one deliberately:
21
+
22
+ | Answer | When | Render |
23
+ | ------------ | ----------------------------------------------------- | ----------------------------------------------------------------------- |
24
+ | **OMIT** | absence already says zero and the user cannot fill it | nothing at all, not even the heading |
25
+ | **INVITE** | the user can fill it | quiet empty state with the one action that fills it |
26
+ | **EXPLAIN** | only an agent fills it | why it is empty plus an escape hatch (ask the AI, open the source chat) |
27
+ | **REASSURE** | empty is the good outcome | an "All clear" state |
28
+
29
+ A failed read is none of these: it is a failed state with the retry inside it. A read in flight is a
30
+ skeleton of the real row shape. Never fold a failure into calm empty copy, and never let a failed
31
+ lookup render as "empty".
32
+
33
+ ## 3. Everything named is a door
34
+
35
+ - A count, chip, card or provenance line that names an object opens that object's own page through
36
+ the one route table. Never a scroll-to-anchor; a scroll is the absence of a detail page.
37
+ - Provenance is a door, not a caption: "Started from a chat" opens the chat; "in project X" opens X.
38
+ - Show objects, not identifiers. An object with a title is a chip that opens it. A bare id with no
39
+ title is a short mono chip with copy; never invent a label for it.
40
+ - Anything the reader is told about and cannot act on is either missing its door or should not be
41
+ on the screen.
42
+
43
+ ## 4. Lists are bounded and shaped
44
+
45
+ - Never an unbounded list in a detail screen. Cap it, then "Show all N" into a dedicated page that
46
+ carries its scope in the address.
47
+ - Shape from the item: a horizontal row of cards for browseable peers (outputs, sessions,
48
+ projects); a column for things that need a verb on each row (decisions, blocks).
49
+
50
+ ## 5. No carousel over content the page already has
51
+
52
+ A swipeable deck is undiscoverable on a phone and, when its slides repeat sections below, pure
53
+ redundancy. Slides are only for content that exists nowhere else.
54
+
55
+ ## 6. What it produced outranks how it worked
56
+
57
+ Order by what the reader came for. Outcomes sit above steps, narrative and context, never at the
58
+ bottom. Fold context, never outcomes.
59
+
60
+ ## 7. One primary action, sized like an action
61
+
62
+ - Each section has ONE primary action at `md`; secondary actions are `sm`; `xs` is only for inline,
63
+ row and toolbar actions.
64
+ - A full-width filled bar is a billboard. A single "start something" affordance is a round `+` that
65
+ opens a picker of what can be started.
66
+ - Put the primary job's remedy next to the problem, with primary weight.
67
+ - One action grammar everywhere: the same verbs through hover menu, right-click and keyboard.
68
+ Inapplicable verbs are absent, never disabled. A door the host did not supply means the affordance
69
+ does not render; never a dead button.
70
+ - No warning buttons. Warnings are banners or callouts; a risky action is `tone="danger"`.
71
+
72
+ ## 8. Progressive disclosure ladder
73
+
74
+ Write the rungs before building. Each answers one question and leads to the next: what happened,
75
+ then where, then why, then the thing itself.
76
+
77
+ - The default state answers the primary question on arrival. A triage surface pre-selects the
78
+ failure; a summary surface shows the summary.
79
+ - The last rung is always the real object, never a description of it. Raw JSON is never a rung,
80
+ only an escape hatch under a menu.
81
+ - Nothing that shows nothing at rest: collapsed boxes that cost height and deliver zero information
82
+ get a pane they deserve, or go behind a rung that earns them.
83
+ - Calm default: surface attention only when it exists. An attention strip that is absent when
84
+ nothing waits beats a permanent status panel.
85
+ - Configuration is the last rung, never the first. Controls that configure the system (renderer,
86
+ layout, schema, governance) live behind a menu or in Settings. Editing the data itself (a title, a
87
+ status, a date) stays easy and inline.
88
+ - Max two levels of disclosure on a dashboard.
89
+
90
+ ## 9. Object creation: the minimum to exist, then the detail page
91
+
92
+ Ask only what the object needs to exist, land on its detail page, configure there. No wizards. A
93
+ "+ New" that does not actually create is a lie; a create menu offers the types, and each lands on
94
+ the new object.
95
+
96
+ ## 10. Honesty
97
+
98
+ - No empty shells, no fabricated labels, provenance or defaults, no success state the data cannot
99
+ prove. A rejected clipboard write never shows "Copied".
100
+ - Aggregates state their scope ("across the 20 most recent runs").
101
+ - Enumerate states before building: loading, each kind of empty, failed, one item, very long label,
102
+ very many items, live, narrow. Truncated text needs a way to read it whole.
103
+
104
+ ## 11. Colour, depth and shape
105
+
106
+ - **Tokens only.** Colours, spacing, radius, type and motion come from `--synap-*` tokens (or the
107
+ components that use them). Never a hex, rgba, px, ratio, weight or font-family literal.
108
+ - **90% neutral, 10% accent.** Colour is earned: an element gets accent only when it is selected,
109
+ focused, primary or AI. Icons rest neutral. Colour and icon are redundant encodings of one state,
110
+ which is what makes a mark glanceable and accessible.
111
+ - **One accent for control states.** Switches, checkboxes and selected segments use
112
+ `--synap-primary` when on, including on AI settings. Human selection is `--synap-primary`.
113
+ - **AI colour is provenance only.** `--synap-ai` (the logo yellow) marks AI-attributed or
114
+ agent-touched work, and an action that starts AI work is `primary tone="ai"`. Nothing else wears it,
115
+ and AI never wears another colour. To mark an AI section, colour its icon or heading, not its
116
+ controls. A filled AI surface is `--synap-ai-surface` under `--synap-ai-foreground`.
117
+ - **Contrast by measurement.** Text on a colour fill is picked by measured contrast (WCAG 4.5:1),
118
+ never by a luma threshold or a hard-coded white. Compute it; do not eyeball or trust a claimed ratio.
119
+ - **No shadows on in-flow surfaces.** Depth is `--synap-border-color` plus a luminance step. Only
120
+ floating layers get a restrained glass lift (glass tokens, blur, 1px border).
121
+ - **A page never paints a background.** Only the app plane and the desk ground paint
122
+ `--synap-background`; `--synap-background-surface` is a card film, never a page. A full-bleed canvas
123
+ is the one exception: it is the ground.
124
+ - **Concentric radius.** `parent_radius = child_radius + gap`. Nested rounded surfaces nest; they
125
+ never collide.
126
+ - **Interaction states.** Hover is an opacity or background change; press is `scale(0.96 to 0.98)` on
127
+ a control; focus is an outline only, never a border-width change.
128
+ - **Floating menus** take a min and a max width, never a fixed width, and use the menu or anchored
129
+ popover primitives, which portal and own focus, dismiss and keyboard.
130
+ - **Targets** are at least 24px (WCAG 2.2).
@@ -0,0 +1,133 @@
1
+ # The design system: it probably exists
2
+
3
+ The recurring defect here is "built, not mounted": the right component shipped and the screen still
4
+ hand-rolls a copy. Before you design or write a component, prove it does not already exist. If it
5
+ exists, adopt or extend it (an additive variant or optional prop), never build a parallel one.
6
+
7
+ ## 1. Query the catalog first, never your memory
8
+
9
+ The component catalog is the truth for which components exist, their imports, props and examples.
10
+ Never use a component or prop it does not document. Read it in tiers, smallest first, never a whole
11
+ manifest.
12
+
13
+ 1. **Tier 1: `synap-app/apps/storybook/inventory/CATALOG.md`** (~3.6k tokens, committed, always
14
+ fresh). One line per family: need, canonical, import, status, verdict, docs id. Find the family
15
+ for your need here. `consolidate` = build on the canonical, never on a copy; `missing` = none yet,
16
+ propose it (story first); "no public entry" = export it before using it, never deep-import;
17
+ `deprecated: Old → New` = never import Old (a tripwire fails on new imports).
18
+ 2. **Tier 2: the family card** `apps/storybook/storybook-static/agent/cards/<family-id>.md`
19
+ (≤ 800 tokens, written by `pnpm --filter @synap-core/storybook build-storybook`): the import
20
+ line, the key props with types and defaults, one or two story snippets, the copies you must not
21
+ hand-roll, the plan.
22
+ 3. **Storybook MCP** (`storybook` in `.mcp.json`): `docs-show <docs id>` from the tier-1 line for
23
+ full props and every story; `stories-find-by-component` for real usage.
24
+ 4. **Last resort: the full manifest** `/manifests/components.json` in the Storybook build
25
+ (~1.8 MB). Search it; never read it whole.
26
+
27
+ - The inventory behind tier 1 (`apps/storybook/inventory/components.json`) and its audit
28
+ (`/component-audit.json`, the `#/map` canvas) say which families have a story and which copies
29
+ still live. Storybook covers only part of the library: a family absent from Storybook is not proof
30
+ that nothing exists.
31
+ - If you can read none of these, stop and say so. Never design from what you remember a component
32
+ looks like.
33
+ - The library lacks what you need? Say so and propose the component, story first. Never fake it with
34
+ a generic box.
35
+ - A new or changed primitive ships with its story and JSDoc on the component and its props in the
36
+ same change; the story is what feeds the catalog.
37
+
38
+ ## 2. Stack by surface
39
+
40
+ | Surface | Build with |
41
+ | ---------------------- | -------------------------------------------------------------------------------------------------------- |
42
+ | shared `@synap-core/*` | headless logic plus `--synap-*` tokens; no UI-library imports |
43
+ | desktop workbench | plain CSS plus spatial-ui primitives; a third-party widget only when wrapped and themed with `--synap-*` |
44
+ | standalone apps | HeroUI plus the Synap HeroUI preset |
45
+ | mobile (relay) | its own native kit on the native design tokens |
46
+
47
+ Tamagui (`@synap-core/ui-system`) was removed. Never reintroduce it.
48
+
49
+ ## 3. The primitives (short form; the catalog is the truth)
50
+
51
+ | Need | Use | Not |
52
+ | ---------------------------------------------- | --------------------------------------------------------------------------------------------- | -------------------------------- |
53
+ | button, icon button | `SpatialButton`, `SpatialIconButton` | a raw `<button>` |
54
+ | menu, context menu, stepped picker | `SpatialMenu` | a positioned div + outside click |
55
+ | popover, floating panel, toolbar | `SpatialAnchoredPopover` | a positioned div |
56
+ | search-as-you-type list under an input | `SpatialComboBoxPopover` | an anchored popover |
57
+ | modal, drawer, confirm, form dialog | `SpatialModal`, `SpatialDrawer`, `SpatialConfirmDialog`, `SpatialFormDialog` | `role="dialog"` by hand |
58
+ | input, select, combo, number, date | `SpatialInput`, `SpatialSelect`, `SpatialComboBox`, `SpatialNumberField`, `SpatialDatePicker` | raw inputs |
59
+ | panel, card, clickable card, tabs | `SpatialPanel`, `SpatialCard` + `SpatialCardAction`, `SpatialTabStrip`, `SpatialTabs` | positioned divs |
60
+ | badge, chip, tag, avatar, progress | `SpatialStatusBadge`, `SpatialChip`, `SpatialTag`, `SpatialAvatar`, `SpatialProgressBar` | hand-rolled marks |
61
+ | image or file preview | `SpatialMediaPreview` | a raw `<img>` on a stored blob |
62
+ | dashboard page (Home, project, track, session) | the lens-page components | a local section shell or row |
63
+ | an AI turn's process | the shared turn-activity component | a local thinking box or dots |
64
+
65
+ - Overlays stay mounted to close: pass `isOpen` / `open` and let the component play its exit. Never
66
+ `{cond && <Modal/>}`.
67
+ - `SpatialMediaPreview` is a security boundary: never point an `<img>`, `<video>`, `<iframe>` or
68
+ `<object>` at a stored blob yourself.
69
+ - Third-party service marks (Telegram, Gmail, GitHub) come from the one service-mark registry. Never a
70
+ generic glyph or a hand-written service map.
71
+
72
+ ## 4. Tokens
73
+
74
+ - **Colour:** `--synap-*` only. Ink, muted, surface, border, `--synap-primary` (the one accent),
75
+ `--synap-ai` (AI provenance only), and the status tones, each a fill plus its matching ink. Filled
76
+ primary surfaces use `--synap-primary-button`, not `--synap-primary`. Brand marks and canvas shape
77
+ colours are content, exempt from tokens; everything around them tokenizes.
78
+ - **Spacing:** ONE 4px scale, web and mobile. `--synap-space-025` 2, `050` 4, `075` 6, `100` 8, `125`
79
+ 10, `150` 12, `200` 16, `250` 20, `300` 24, `400` 32, `500` 40, `600` 48, `800` 64, `1000` 80,
80
+ `1200` 96. The old 6px-base names are deprecated; never use them in new work.
81
+ - **Row heights:** `--synap-row-compact` 32 (navigation), `--synap-row` 40 (index rows),
82
+ `--synap-row-roomy` 48 (lens rows, one-line cards). Controls inside a row stay on the button scale.
83
+ - **Control sizes:** `xs` 28, `sm` 34, `md` 40, `lg` 46. Never redraw a local small button.
84
+ - **Type roles:** `display` and `title` (Fraunces), `heading`, `body`, `caption`, `label`, `num`,
85
+ `num-large`, `row-title`. In CSS use the longhand quartet
86
+ `var(--synap-type-<role>-family|-size|-weight|-leading)`; inline, spread the role object. A size alone
87
+ is `--synap-text-*`; line height `--synap-leading-*`; weight `--synap-weight-*`. When size, weight and
88
+ leading together match a role, use the role.
89
+ - **Radius:** `--synap-radius-1` 6 (keycaps, smallest chips), `-2` 8 (icon tiles, small badges), `-3`
90
+ 12 (rows, menu items), `-4` 16 (cards, panels), `--synap-radius-round` for pills (buttons, chips,
91
+ search bars, avatars). Same component class, same radius, everywhere; then apply concentric radius.
92
+ - **Grid chrome on a canvas:** `--synap-grid` and `--synap-grid-strong`, never a grey literal.
93
+
94
+ ## 5. Labels go through the vocabulary door
95
+
96
+ Never hand-write a label map for an object kind, action or status, and never capitalise a raw token
97
+ at the call site. One door, `@synap-core/types/vocabulary`:
98
+
99
+ | Need | Use |
100
+ | ------------------------ | ---------------------------------- |
101
+ | object kind to noun | `resolveObjectNoun(kind)` |
102
+ | action to verb | `resolveActionLabel(action, mood)` |
103
+ | lifecycle state to label | `resolveStatusLabel(status)` |
104
+ | tool name to words | `resolveToolLabel(toolName, mood)` |
105
+ | any token to words | `humanizeToken(token)` |
106
+ | "verb noun" title | `buildObjectActionTitle({...})` |
107
+ | third-party service name | `resolveServiceName(id)` |
108
+
109
+ - Verbs have two moods: imperative ("Create") for buttons and pending proposals; past ("Created") for
110
+ history, feeds and receipts. Never collapse them.
111
+ - Unknown values humanize, never leak. A raw token (`entity.create`, `in_review`) shown to a person
112
+ is a defect.
113
+ - Dates, durations, sizes, empty-state sentences and domain-specific phrasings are not vocabulary;
114
+ keep them local.
115
+
116
+ ## 6. Motion: the named presets only
117
+
118
+ Motion is one closed, named menu. A design or an agent says "fade-rise on enter", never a duration,
119
+ easing or keyframe. Each preset carries a REQUIRED reduced-motion fallback, and the reader's OS
120
+ setting always applies.
121
+
122
+ | Preset | Use it for | Reduced motion |
123
+ | --------------- | ---------------------------------------------------------------- | ------------------- |
124
+ | `fade` | backdrops, swapped content, anything that appears without moving | plays as-is |
125
+ | `fade-rise` | a card, dialog or toast arriving in the reading flow | `fade` |
126
+ | `scale-in` | menus, popovers, pickers | `fade` |
127
+ | `slide-in-side` | drawers and side panels | `fade` |
128
+ | `collapse` | accordions, disclosures | instant (end state) |
129
+ | `list-stagger` | lists, boards, grids | `fade`, no stagger |
130
+
131
+ - Code uses the preset component and the preset names from `@synap-core/web/motion`; never a raw
132
+ duration or easing in a `transition` or `animation` (a guard ratchets them).
133
+ - Adding a preset is a design decision for a person, not something you do inline.