@synap-core/cli 1.8.0 → 1.10.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 (332) hide show
  1. package/dist/commands/agent-chat.d.ts +47 -0
  2. package/dist/commands/agent-chat.js +250 -0
  3. package/dist/commands/agent-chat.js.map +1 -0
  4. package/dist/commands/agent-run.js +3 -4
  5. package/dist/commands/agent-run.js.map +1 -1
  6. package/dist/commands/agents.js +85 -46
  7. package/dist/commands/agents.js.map +1 -1
  8. package/dist/commands/automation.js +2 -1
  9. package/dist/commands/automation.js.map +1 -1
  10. package/dist/commands/bridge-setup.d.ts +66 -0
  11. package/dist/commands/bridge-setup.js +1112 -0
  12. package/dist/commands/bridge-setup.js.map +1 -0
  13. package/dist/commands/cap-connections.d.ts +28 -0
  14. package/dist/commands/cap-connections.js +224 -0
  15. package/dist/commands/cap-connections.js.map +1 -0
  16. package/dist/commands/capability.d.ts +89 -0
  17. package/dist/commands/capability.js +1523 -0
  18. package/dist/commands/capability.js.map +1 -0
  19. package/dist/commands/centrality.d.ts +20 -0
  20. package/dist/commands/centrality.js +94 -0
  21. package/dist/commands/centrality.js.map +1 -0
  22. package/dist/commands/connect.d.ts +2 -0
  23. package/dist/commands/connect.js +16 -35
  24. package/dist/commands/connect.js.map +1 -1
  25. package/dist/commands/context.js +4 -6
  26. package/dist/commands/context.js.map +1 -1
  27. package/dist/commands/data-extra.d.ts +1 -0
  28. package/dist/commands/data-extra.js +34 -10
  29. package/dist/commands/data-extra.js.map +1 -1
  30. package/dist/commands/data.d.ts +4 -4
  31. package/dist/commands/data.js +241 -184
  32. package/dist/commands/data.js.map +1 -1
  33. package/dist/commands/diagnose.d.ts +20 -0
  34. package/dist/commands/diagnose.js +143 -0
  35. package/dist/commands/diagnose.js.map +1 -0
  36. package/dist/commands/digest.d.ts +17 -0
  37. package/dist/commands/digest.js +121 -0
  38. package/dist/commands/digest.js.map +1 -0
  39. package/dist/commands/discover.d.ts +2 -0
  40. package/dist/commands/discover.js +25 -8
  41. package/dist/commands/discover.js.map +1 -1
  42. package/dist/commands/events.js +2 -1
  43. package/dist/commands/events.js.map +1 -1
  44. package/dist/commands/explain.d.ts +1 -1
  45. package/dist/commands/explain.js +18 -15
  46. package/dist/commands/explain.js.map +1 -1
  47. package/dist/commands/facet.d.ts +29 -0
  48. package/dist/commands/facet.js +113 -0
  49. package/dist/commands/facet.js.map +1 -0
  50. package/dist/commands/graph.js +2 -1
  51. package/dist/commands/graph.js.map +1 -1
  52. package/dist/commands/import.d.ts +38 -0
  53. package/dist/commands/import.js +440 -0
  54. package/dist/commands/import.js.map +1 -0
  55. package/dist/commands/init.js +35 -16
  56. package/dist/commands/init.js.map +1 -1
  57. package/dist/commands/keys.js +3 -4
  58. package/dist/commands/keys.js.map +1 -1
  59. package/dist/commands/knowledge.d.ts +2 -0
  60. package/dist/commands/knowledge.js +61 -9
  61. package/dist/commands/knowledge.js.map +1 -1
  62. package/dist/commands/launch.d.ts +50 -0
  63. package/dist/commands/launch.js +790 -0
  64. package/dist/commands/launch.js.map +1 -0
  65. package/dist/commands/lens.d.ts +45 -0
  66. package/dist/commands/lens.js +386 -0
  67. package/dist/commands/lens.js.map +1 -0
  68. package/dist/commands/market.d.ts +209 -0
  69. package/dist/commands/market.js +1368 -0
  70. package/dist/commands/market.js.map +1 -0
  71. package/dist/commands/mcp.d.ts +42 -0
  72. package/dist/commands/mcp.js +184 -0
  73. package/dist/commands/mcp.js.map +1 -0
  74. package/dist/commands/observe.js +14 -11
  75. package/dist/commands/observe.js.map +1 -1
  76. package/dist/commands/open.d.ts +21 -4
  77. package/dist/commands/open.js +45 -4
  78. package/dist/commands/open.js.map +1 -1
  79. package/dist/commands/pod.d.ts +100 -0
  80. package/dist/commands/pod.js +359 -0
  81. package/dist/commands/pod.js.map +1 -0
  82. package/dist/commands/pods.d.ts +1 -0
  83. package/dist/commands/pods.js +77 -15
  84. package/dist/commands/pods.js.map +1 -1
  85. package/dist/commands/proposals-actions.js +40 -3
  86. package/dist/commands/proposals-actions.js.map +1 -1
  87. package/dist/commands/purge.d.ts +23 -0
  88. package/dist/commands/purge.js +148 -0
  89. package/dist/commands/purge.js.map +1 -0
  90. package/dist/commands/raycast.d.ts +15 -0
  91. package/dist/commands/raycast.js +153 -0
  92. package/dist/commands/raycast.js.map +1 -0
  93. package/dist/commands/sessions.js +45 -21
  94. package/dist/commands/sessions.js.map +1 -1
  95. package/dist/commands/skill-manage.d.ts +21 -0
  96. package/dist/commands/skill-manage.js +195 -0
  97. package/dist/commands/skill-manage.js.map +1 -0
  98. package/dist/commands/skills-commands.js +2 -1
  99. package/dist/commands/skills-commands.js.map +1 -1
  100. package/dist/commands/skills.js +4 -3
  101. package/dist/commands/skills.js.map +1 -1
  102. package/dist/commands/status.d.ts +3 -1
  103. package/dist/commands/status.js +166 -14
  104. package/dist/commands/status.js.map +1 -1
  105. package/dist/commands/statusline.d.ts +24 -0
  106. package/dist/commands/statusline.js +450 -0
  107. package/dist/commands/statusline.js.map +1 -0
  108. package/dist/commands/subscribe.js +2 -2
  109. package/dist/commands/subscribe.js.map +1 -1
  110. package/dist/commands/tools.d.ts +30 -0
  111. package/dist/commands/tools.js +315 -0
  112. package/dist/commands/tools.js.map +1 -0
  113. package/dist/commands/versions.d.ts +27 -0
  114. package/dist/commands/versions.js +277 -0
  115. package/dist/commands/versions.js.map +1 -0
  116. package/dist/commands/view.js +3 -2
  117. package/dist/commands/view.js.map +1 -1
  118. package/dist/commands/whoami.d.ts +21 -0
  119. package/dist/commands/whoami.js +129 -0
  120. package/dist/commands/whoami.js.map +1 -0
  121. package/dist/index.js +776 -60
  122. package/dist/index.js.map +1 -1
  123. package/dist/lib/approval-poll.d.ts +42 -0
  124. package/dist/lib/approval-poll.js +52 -0
  125. package/dist/lib/approval-poll.js.map +1 -0
  126. package/dist/lib/auth.d.ts +29 -6
  127. package/dist/lib/auth.js +105 -94
  128. package/dist/lib/auth.js.map +1 -1
  129. package/dist/lib/bundle-version.d.ts +11 -0
  130. package/dist/lib/bundle-version.js +33 -0
  131. package/dist/lib/bundle-version.js.map +1 -0
  132. package/dist/lib/capture-lane.d.ts +30 -12
  133. package/dist/lib/capture-lane.js +71 -14
  134. package/dist/lib/capture-lane.js.map +1 -1
  135. package/dist/lib/cp-packages.d.ts +121 -0
  136. package/dist/lib/cp-packages.js +218 -0
  137. package/dist/lib/cp-packages.js.map +1 -0
  138. package/dist/lib/describe-lens.d.ts +46 -0
  139. package/dist/lib/describe-lens.js +33 -0
  140. package/dist/lib/describe-lens.js.map +1 -0
  141. package/dist/lib/hub-client.d.ts +78 -1
  142. package/dist/lib/hub-client.js +474 -22
  143. package/dist/lib/hub-client.js.map +1 -1
  144. package/dist/lib/installed.d.ts +51 -0
  145. package/dist/lib/installed.js +70 -0
  146. package/dist/lib/installed.js.map +1 -0
  147. package/dist/lib/next-steps.d.ts +61 -0
  148. package/dist/lib/next-steps.js +146 -0
  149. package/dist/lib/next-steps.js.map +1 -0
  150. package/dist/lib/pod.d.ts +91 -19
  151. package/dist/lib/pod.js +222 -56
  152. package/dist/lib/pod.js.map +1 -1
  153. package/dist/lib/project-ref.d.ts +95 -0
  154. package/dist/lib/project-ref.js +144 -0
  155. package/dist/lib/project-ref.js.map +1 -0
  156. package/dist/lib/project.d.ts +35 -0
  157. package/dist/lib/project.js +39 -0
  158. package/dist/lib/project.js.map +1 -0
  159. package/dist/lib/session-lens.d.ts +33 -0
  160. package/dist/lib/session-lens.js +76 -0
  161. package/dist/lib/session-lens.js.map +1 -0
  162. package/dist/lib/skill-import.d.ts +40 -0
  163. package/dist/lib/skill-import.js +203 -0
  164. package/dist/lib/skill-import.js.map +1 -0
  165. package/dist/lib/skills-installer.d.ts +17 -6
  166. package/dist/lib/skills-installer.js +133 -19
  167. package/dist/lib/skills-installer.js.map +1 -1
  168. package/dist/lib/suite.d.ts +28 -0
  169. package/dist/lib/suite.js +29 -0
  170. package/dist/lib/suite.js.map +1 -0
  171. package/dist/lib/superwhisper-import.d.ts +40 -0
  172. package/dist/lib/superwhisper-import.js +389 -0
  173. package/dist/lib/superwhisper-import.js.map +1 -0
  174. package/dist/lib/targets.d.ts +49 -1
  175. package/dist/lib/targets.js +420 -288
  176. package/dist/lib/targets.js.map +1 -1
  177. package/dist/lib/unwrapList.d.ts +1 -0
  178. package/dist/lib/unwrapList.js +20 -0
  179. package/dist/lib/unwrapList.js.map +1 -0
  180. package/dist/utils/logger.d.ts +2 -0
  181. package/dist/utils/logger.js +10 -2
  182. package/dist/utils/logger.js.map +1 -1
  183. package/package.json +9 -4
  184. package/skills/agent-os/SKILL.md +212 -0
  185. package/skills/manifest.json +5 -0
  186. package/skills/onboard/SKILL.md +186 -0
  187. package/skills/synap/SKILL.md +1182 -37
  188. package/skills/synap/_order.txt +37 -0
  189. package/skills/synap/_skill.yaml +24 -0
  190. package/skills/synap/authentication.md +10 -0
  191. package/skills/synap/automations.md +264 -0
  192. package/skills/synap/capabilities.md +107 -0
  193. package/skills/synap/capture.md +10 -0
  194. package/skills/synap/cli-operations.md +107 -0
  195. package/skills/synap/common-mistakes.md +12 -0
  196. package/skills/synap/creative-loop.md +43 -0
  197. package/skills/synap/crm.md +117 -0
  198. package/skills/synap/diagnostics.md +35 -0
  199. package/skills/synap/digesting-a-channel.md +38 -0
  200. package/skills/synap/document-embeds.md +123 -0
  201. package/skills/synap/escalation-ladder.md +71 -0
  202. package/skills/synap/focus-sessions.md +47 -0
  203. package/skills/synap/governance-rules.md +64 -0
  204. package/skills/synap/governance.md +6 -6
  205. package/skills/synap/graph-gardening.md +21 -0
  206. package/skills/synap/inline-patterns.md +38 -0
  207. package/skills/synap/lenses.md +38 -0
  208. package/skills/synap/linking-principle.md +39 -0
  209. package/skills/synap/linking.md +1 -0
  210. package/skills/synap/mental-model.md +45 -0
  211. package/skills/synap/more.md +7 -0
  212. package/skills/synap/multi-entity-capture.md +10 -0
  213. package/skills/synap/next-action.md +37 -0
  214. package/skills/synap/north-star.md +17 -0
  215. package/skills/synap/operating-mode-rules.md +45 -0
  216. package/skills/synap/operating-mode.md +9 -0
  217. package/skills/synap/quick-reference.md +67 -0
  218. package/skills/synap/reading.md +43 -0
  219. package/skills/synap/recap.md +21 -0
  220. package/skills/synap/reflexes.md +46 -0
  221. package/skills/synap/response-style.md +21 -0
  222. package/skills/synap/scope.md +13 -0
  223. package/skills/synap/showing.md +17 -0
  224. package/skills/synap/user-model.md +25 -0
  225. package/skills/synap/viewframe-cells.md +290 -0
  226. package/skills/synap/work-flow.md +113 -0
  227. package/skills/synap/worked-examples.md +53 -0
  228. package/skills/synap/workspace-design.md +45 -0
  229. package/skills/synap/workspace-edges.md +49 -0
  230. package/skills/synap/writes.md +156 -0
  231. package/skills/synap-schema/SKILL.md +97 -6
  232. package/skills/synap-schema/_order.txt +13 -0
  233. package/skills/synap-schema/_skill.yaml +22 -0
  234. package/skills/synap-schema/before-you-touch.md +14 -0
  235. package/skills/synap-schema/common-mistakes.md +9 -0
  236. package/skills/synap-schema/creating-profiles.md +17 -0
  237. package/skills/synap-schema/discover-profiles.md +24 -0
  238. package/skills/synap-schema/entity-scope.md +8 -0
  239. package/skills/synap-schema/extend-vs-create.md +31 -0
  240. package/skills/synap-schema/more.md +6 -0
  241. package/skills/synap-schema/overlay-properties.md +22 -0
  242. package/skills/synap-schema/profiles.md +3 -0
  243. package/skills/synap-schema/property-defs.md +29 -0
  244. package/skills/synap-schema/read-before-write.md +50 -0
  245. package/skills/synap-schema/relations.md +18 -0
  246. package/skills/synap-schema/worked-example.md +30 -0
  247. package/skills/synap-ui/SKILL.md +26 -2
  248. package/skills/synap-ui/_order.txt +13 -0
  249. package/skills/synap-ui/_skill.yaml +23 -0
  250. package/skills/synap-ui/ai-companion.md +27 -0
  251. package/skills/synap-ui/arranging-bento.md +8 -0
  252. package/skills/synap-ui/before-you-build.md +20 -0
  253. package/skills/synap-ui/bento-layouts.md +35 -0
  254. package/skills/synap-ui/common-mistakes.md +10 -0
  255. package/skills/synap-ui/creating-views.md +26 -0
  256. package/skills/synap-ui/four-builds.md +24 -0
  257. package/skills/synap-ui/more.md +7 -0
  258. package/skills/synap-ui/proposing-vs-extending.md +11 -0
  259. package/skills/synap-ui/view-list.md +24 -0
  260. package/skills/synap-ui/views.md +3 -0
  261. package/skills/synap-ui/worked-example.md +18 -0
  262. package/skills/synap-ui/workspaces.md +47 -0
  263. package/templates/automations/bookmark-enrichment.automation.json +44 -0
  264. package/templates/automations/mail-feed.automation.json +86 -0
  265. package/templates/automations/url-bookmark-capture.automation.json +70 -0
  266. package/templates/skills/README.md +21 -0
  267. package/templates/skills/authoring-automations/SKILL.md +95 -0
  268. package/templates/skills/authoring-automations/reference/node-matrix.md +49 -0
  269. package/templates/skills/authoring-capabilities/SKILL.md +93 -0
  270. package/templates/skills/authoring-capabilities/reference/template-anatomy.md +70 -0
  271. package/templates/skills/authoring-playbooks/SKILL.md +102 -0
  272. package/templates/skills/authoring-playbooks/reference/stages-contract.md +35 -0
  273. package/templates/skills/authoring-playbooks/reference/worked-example.md +64 -0
  274. package/templates/skills/bookmark-enrichment/SKILL.md +40 -0
  275. package/templates/skills/coordinating-agents/SKILL.md +32 -0
  276. package/templates/skills/coordinating-branches/SKILL.md +27 -0
  277. package/templates/skills/mapping-the-server/SKILL.md +54 -0
  278. package/templates/skills/reading-client-progress/SKILL.md +65 -0
  279. package/templates/skills/routing-to-channels/SKILL.md +54 -0
  280. package/templates/skills/stellar-scf-grants-advisor/ASSOCIATE-CHEATSHEET.md +133 -0
  281. package/templates/skills/stellar-scf-grants-advisor/ASSOCIATE-ONBOARDING-GUIDE.md +761 -0
  282. package/templates/skills/stellar-scf-grants-advisor/CLIENT-FAQ.md +181 -0
  283. package/templates/skills/stellar-scf-grants-advisor/PARTNER-HANDOVER.md +130 -0
  284. package/templates/skills/stellar-scf-grants-advisor/SKILL.md +102 -0
  285. package/templates/skills/stellar-scf-grants-advisor/examples/README.md +43 -0
  286. package/templates/skills/stellar-scf-grants-advisor/examples/chat-summary-templates.md +158 -0
  287. package/templates/skills/stellar-scf-grants-advisor/examples/corpus-comparable-rows.md +136 -0
  288. package/templates/skills/stellar-scf-grants-advisor/examples/q10-team-rewrites.md +109 -0
  289. package/templates/skills/stellar-scf-grants-advisor/examples/q2-description-rewrites.md +88 -0
  290. package/templates/skills/stellar-scf-grants-advisor/examples/q6-integration-rewrites.md +107 -0
  291. package/templates/skills/stellar-scf-grants-advisor/examples/tranche-structures.md +176 -0
  292. package/templates/skills/stellar-scf-grants-advisor/reference/01-methodology.md +96 -0
  293. package/templates/skills/stellar-scf-grants-advisor/reference/02-scoring-framework.md +199 -0
  294. package/templates/skills/stellar-scf-grants-advisor/reference/03-rejection-patterns.md +241 -0
  295. package/templates/skills/stellar-scf-grants-advisor/reference/04-winner-patterns.md +120 -0
  296. package/templates/skills/stellar-scf-grants-advisor/reference/05-comeback-patterns.md +92 -0
  297. package/templates/skills/stellar-scf-grants-advisor/reference/06-budget-benchmarks.md +125 -0
  298. package/templates/skills/stellar-scf-grants-advisor/reference/07-integration-list.md +147 -0
  299. package/templates/skills/stellar-scf-grants-advisor/reference/08-abstract-fields.md +258 -0
  300. package/templates/skills/stellar-scf-grants-advisor/reference/09-build-fields.md +259 -0
  301. package/templates/skills/stellar-scf-grants-advisor/reference/10-corpus-winners.md +135 -0
  302. package/templates/skills/stellar-scf-grants-advisor/reference/11-corpus-rejects.md +267 -0
  303. package/templates/skills/stellar-scf-grants-advisor/reference/12-client-communication.md +131 -0
  304. package/templates/skills/stellar-scf-grants-advisor/reference/13-excel-output-spec.md +199 -0
  305. package/templates/skills/stellar-scf-grants-advisor/reference/14-worked-examples.md +160 -0
  306. package/templates/skills/stellar-scf-grants-advisor/templates/abstract-review-builder.py +253 -0
  307. package/templates/skills/stellar-scf-grants-advisor/templates/build-review-builder.py +213 -0
  308. package/dist/commands/connectors.d.ts +0 -31
  309. package/dist/commands/connectors.js +0 -276
  310. package/dist/commands/connectors.js.map +0 -1
  311. package/dist/commands/finish.d.ts +0 -25
  312. package/dist/commands/finish.js +0 -274
  313. package/dist/commands/finish.js.map +0 -1
  314. package/dist/commands/openclaw.d.ts +0 -40
  315. package/dist/commands/openclaw.js +0 -1148
  316. package/dist/commands/openclaw.js.map +0 -1
  317. package/dist/commands/security-audit.d.ts +0 -12
  318. package/dist/commands/security-audit.js +0 -100
  319. package/dist/commands/security-audit.js.map +0 -1
  320. package/dist/lib/hardening.d.ts +0 -18
  321. package/dist/lib/hardening.js +0 -214
  322. package/dist/lib/hardening.js.map +0 -1
  323. package/node_modules/@synap/hub-rest-client/dist/index.cjs +0 -881
  324. package/node_modules/@synap/hub-rest-client/dist/index.d.cts +0 -907
  325. package/node_modules/@synap/hub-rest-client/dist/index.d.ts +0 -907
  326. package/node_modules/@synap/hub-rest-client/dist/index.js +0 -851
  327. package/node_modules/@synap/hub-rest-client/package.json +0 -45
  328. package/node_modules/@synap/hub-rest-client/src/client.ts +0 -1143
  329. package/node_modules/@synap/hub-rest-client/src/errors.ts +0 -30
  330. package/node_modules/@synap/hub-rest-client/src/index.ts +0 -111
  331. package/node_modules/@synap/hub-rest-client/src/setup.ts +0 -77
  332. package/node_modules/@synap/hub-rest-client/src/types.ts +0 -639
@@ -0,0 +1,30 @@
1
+ ## Worked example — "I want to track podcasts I listen to"
2
+
3
+ 1. Inventory. `GET /profiles` → no `podcast` profile, no `podcast_episode`.
4
+ 2. Decide scope. Podcasts/episodes are pod-wide (same podcast across workspaces).
5
+ 3. Create two profiles (podcast + episode) or one (episode only, with the show as a string property)? Decide based on the user's intent. If they want to group episodes by show → two profiles. If one-level is enough → one.
6
+ 4. For two profiles:
7
+
8
+ ```
9
+ POST /profiles { slug: "podcast", displayName: "Podcast", entityScope: "pod", uiHints: { icon: "radio" } }
10
+ POST /profiles { slug: "podcast_episode", displayName: "Podcast Episode", parentProfileId: <articleId>, entityScope: "pod" }
11
+ ```
12
+
13
+ 5. Add properties on `podcast`:
14
+
15
+ ```
16
+ POST /property-defs { slug: "host", valueType: "string" }
17
+ POST /property-defs { slug: "rssUrl", valueType: "string", uiHints: { inputType: "url" } }
18
+ POST /property-defs { slug: "category", valueType: "string" }
19
+ ```
20
+
21
+ 6. Add properties on `podcast_episode`:
22
+
23
+ ```
24
+ POST /property-defs { slug: "podcastId", valueType: "entity_id", constraints: { targetProfileSlug: "podcast" } }
25
+ POST /property-defs { slug: "durationMinutes", valueType: "number" }
26
+ POST /property-defs { slug: "listenedAt", valueType: "date" }
27
+ POST /property-defs { slug: "rating", valueType: "number", constraints: { min: 1, max: 5 } }
28
+ ```
29
+
30
+ 7. Tell the user. "I added `podcast` and `podcast_episode` to your pod with linking between them. You can create your first episode now, or want me to also add a view for it?" (Hand off to the `synap-ui` skill if they say yes.)
@@ -28,6 +28,8 @@ metadata:
28
28
 
29
29
  You build the surfaces the user sees: views over their data, bento dashboards, full workspaces tuned for a domain. The core rule: **emergent complexity.** A workspace is a lens; a view is a lens; a bento is a composition of lenses. Everything renders through the cell system, nothing is hardcoded.
30
30
 
31
+ ---
32
+
31
33
  ## Before you build anything
32
34
 
33
35
  Always inventory. Never hallucinate view types, widget kinds, or profiles.
@@ -49,6 +51,8 @@ GET /api/hub/views?userId={userId}&workspaceId={workspaceId}
49
51
 
50
52
  Widget definitions are the source of truth for which cells are installed and how to configure them. **Never guess cell kinds.** If a cell doesn't appear in the registry, don't reference it (unless it's a browser-native cell from the manifest).
51
53
 
54
+ ---
55
+
52
56
  ## Four things you can build
53
57
 
54
58
  1. **Views** — named queries + rendering config over entities of a given profile. Kanban of tasks, gallery of articles, calendar of events.
@@ -74,6 +78,8 @@ Widget definitions are the source of truth for which cells are installed and how
74
78
  - Always `GET /api/hub/widget-definitions` first — if a cell already covers the need, use it. New cell definitions are permanent; only create when genuinely novel.
75
79
  - For the full in-frame query/mutate/shell-actions API see the `synap` skill's **ViewFrame Cells** section (or load `synap-ui:SKILL` via `GET /api/hub/skills/system?sections=synap-ui:SKILL`).
76
80
 
81
+ ---
82
+
77
83
  ## View types (16 total, 12 implemented)
78
84
 
79
85
  Pick one that matches the data's shape AND the user's intent:
@@ -99,6 +105,8 @@ Pick one that matches the data's shape AND the user's intent:
99
105
 
100
106
  Decision: the data has statuses → `kanban`. Dates → `calendar`. Many columns → `table`. Mixed types → `masonry` or `bento`. Full reference in **`view-types.md`**.
101
107
 
108
+ ---
109
+
102
110
  ## Creating a view
103
111
 
104
112
  ```json
@@ -126,6 +134,8 @@ POST /api/hub/views
126
134
 
127
135
  The `config` shape varies by view type — kanban needs `groupBy`, calendar needs a date property, gallery needs an image property. When in doubt, fetch an existing view of the same type first and mirror its structure.
128
136
 
137
+ ---
138
+
129
139
  ## Bento layouts
130
140
 
131
141
  A bento is a 12-column react-grid-layout. Blocks reference **cells** by kind.
@@ -162,6 +172,8 @@ Block kinds:
162
172
 
163
173
  Full widget catalog in **`widget-catalog.md`**. Layout patterns in **`bento-recipes.md`**.
164
174
 
175
+ ---
176
+
165
177
  ## Creating or proposing a workspace
166
178
 
167
179
  **Always ask before creating.** Workspaces are big objects with profiles, views, members, bento, and seed data. Commit only after user confirms.
@@ -210,6 +222,8 @@ The canonical flow:
210
222
 
211
223
  4. **On no**, don't commit. Offer to adjust.
212
224
 
225
+ ---
226
+
213
227
  ## Proposing vs. extending
214
228
 
215
229
  Before proposing a new workspace, ask: does one of the user's existing workspaces fit? A "Content" workspace and a "Writing" workspace are the same lens. Adding a view to the existing workspace is almost always better than creating a new one.
@@ -222,6 +236,8 @@ Create new when:
222
236
 
223
237
  Otherwise: add a view, add a bento block, add properties — don't multiply workspaces.
224
238
 
239
+ ---
240
+
225
241
  ## Worked example — "Make me a CRM"
226
242
 
227
243
  1. Inventory. User already has `person`, `contact`, `company`, `deal`, `event` profiles (all system).
@@ -241,6 +257,8 @@ Otherwise: add a view, add a bento block, add properties — don't multiply work
241
257
  4. Show to user. Confirm.
242
258
  5. Commit via `POST /workspaces`.
243
259
 
260
+ ---
261
+
244
262
  ## Arranging a bento after creation
245
263
 
246
264
  ```json
@@ -250,7 +268,9 @@ POST /api/hub/views/{bentoViewId}/arrange
250
268
 
251
269
  `bento.arrange` is auto-approved by default. Safe to run without hesitation when the user rearranges or adds widgets.
252
270
 
253
- ## Common mistakes
271
+ ---
272
+
273
+ ## Common mistakes — UI generation
254
274
 
255
275
  1. **Creating a workspace without asking.** Always propose + confirm. Workspaces are too big to auto-commit.
256
276
  2. **Guessing widget kinds.** Always `GET /widget-definitions` first. A `kind` that isn't in the registry won't render.
@@ -261,6 +281,8 @@ POST /api/hub/views/{bentoViewId}/arrange
261
281
  7. **Hardcoding config for view types you haven't checked.** Each view type's `config` shape is different. Get an example from `/views` first.
262
282
  8. **Forgetting entityScope implications.** A view on a pod-scope profile (`note`) will show entities from every workspace the user can access — filter appropriately if you want workspace-local results.
263
283
 
284
+ ---
285
+
264
286
  ## AI Companion integration
265
287
 
266
288
  When you create views or entities for the user inside the AI Companion, **always emit inline pattern chips** at the end of your reply so the user can jump directly to what you built.
@@ -289,7 +311,9 @@ These cell keys are registered in the browser app but may not appear in `GET /ap
289
311
 
290
312
  **Rule:** If a cell key is not in `GET /api/hub/widget-definitions`, do NOT reference it in bento config unless it is one of the four browser-native keys above. Unknown keys will silently fail to render.
291
313
 
292
- ## When you need more
314
+ ---
315
+
316
+ ## When you need more — UI generation
293
317
 
294
318
  - Full per-view-type `config` shapes → **`view-types.md`**
295
319
  - Complete widget/cell catalog + configSchemas → **`widget-catalog.md`**
@@ -0,0 +1,13 @@
1
+ views.md
2
+ before-you-build.md
3
+ four-builds.md
4
+ view-list.md
5
+ creating-views.md
6
+ bento-layouts.md
7
+ workspaces.md
8
+ proposing-vs-extending.md
9
+ worked-example.md
10
+ arranging-bento.md
11
+ common-mistakes.md
12
+ ai-companion.md
13
+ more.md
@@ -0,0 +1,23 @@
1
+ name: synap-ui
2
+ description: >
3
+ Use this skill when the user wants to BUILD interface in Synap — creating views,
4
+ dashboards, bento layouts, or whole workspaces over their data. Triggers:
5
+ "build me a dashboard for tracking X", "create a kanban for my projects",
6
+ "make a CRM workspace", "I want a feed view of my articles", "design a home
7
+ dashboard", "show my reading list as a gallery", "turn this into a
8
+ timeline/calendar/matrix", "generate a workspace for content creation /
9
+ sales / research / project management / fitness tracking", "arrange widgets
10
+ on my bento", "create a command / automation trigger". This skill PRESENTS
11
+ data — the underlying entities must already exist (use core `synap`) and
12
+ schema extensions happen via `synap-schema`. Always propose workspace creation
13
+ to the user before committing — workspaces are lenses on data, not silos,
14
+ and the user decides when a new lens is warranted.
15
+ metadata:
16
+ openclaw:
17
+ requires:
18
+ env: [SYNAP_HUB_API_KEY, SYNAP_POD_URL]
19
+ primaryEnv: SYNAP_HUB_API_KEY
20
+ homepage: https://synap.live
21
+ capabilities: [views, bento, workspaces, widgets]
22
+ os: [macos, linux, windows]
23
+ userInvocable: false
@@ -0,0 +1,27 @@
1
+ ## AI Companion integration
2
+
3
+ When you create views or entities for the user inside the AI Companion, **always emit inline pattern chips** at the end of your reply so the user can jump directly to what you built.
4
+
5
+ ```
6
+ // After creating a kanban view with ID "abc123":
7
+ "Created your tasks pipeline → [[view:abc123|Active Tasks]] · [[open:side|view:abc123]]"
8
+
9
+ // After creating a workspace (home bento view ID "def456"):
10
+ "Workspace ready — [[open:main|view:def456|Home Dashboard]]"
11
+
12
+ // After creating an entity (e.g. a new project):
13
+ "Project created → [[entity:proj_789|Q3 Launch]]"
14
+ ```
15
+
16
+ ### Special cell keys (browser-native)
17
+
18
+ These cell keys are registered in the browser app but may not appear in `GET /api/hub/widget-definitions` (they are Electron-native, not server-seeded):
19
+
20
+ | Cell key | Where | Notes |
21
+ | --------------- | ------------------ | ------------------------------------------------------------ |
22
+ | `ai-companion` | Browser sidebar | The Companion chat panel itself — don't embed in bentos |
23
+ | `iframe-widget` | Bento blocks | Sandboxed iframe for custom embeds; requires `src` in config |
24
+ | `entity-detail` | Side panel / modal | Generic entity detail renderer — always available |
25
+ | `entity-list` | Bento / views | List of entities for a given profile |
26
+
27
+ **Rule:** If a cell key is not in `GET /api/hub/widget-definitions`, do NOT reference it in bento config unless it is one of the four browser-native keys above. Unknown keys will silently fail to render.
@@ -0,0 +1,8 @@
1
+ ## Arranging a bento after creation
2
+
3
+ ```json
4
+ POST /api/hub/views/{bentoViewId}/arrange
5
+ { "userId": "{userId}", "blocks": [ /* full new blocks array */ ] }
6
+ ```
7
+
8
+ `bento.arrange` is auto-approved by default. Safe to run without hesitation when the user rearranges or adds widgets.
@@ -0,0 +1,20 @@
1
+ ## Before you build anything
2
+
3
+ Always inventory. Never hallucinate view types, widget kinds, or profiles.
4
+
5
+ ```
6
+ GET /api/hub/manifest
7
+ → static capability map: view types, bento block kinds, inline patterns, browser-native cells
8
+ (call once per session — no DB queries, safe to cache)
9
+
10
+ GET /api/hub/profiles?userId={userId}&workspaceId={workspaceId}
11
+ → what data exists
12
+
13
+ GET /api/hub/widget-definitions?workspaceId={workspaceId}
14
+ → [{ kind, category, label, description, configSchema, supportedContexts }]
15
+
16
+ GET /api/hub/views?userId={userId}&workspaceId={workspaceId}
17
+ → [{ id, name, type, profileSlug, config }]
18
+ ```
19
+
20
+ Widget definitions are the source of truth for which cells are installed and how to configure them. **Never guess cell kinds.** If a cell doesn't appear in the registry, don't reference it (unless it's a browser-native cell from the manifest).
@@ -0,0 +1,35 @@
1
+ ## Bento layouts
2
+
3
+ A bento is a 12-column react-grid-layout. Blocks reference **cells** by kind.
4
+
5
+ ```json
6
+ POST /api/hub/views // a bento is just a view with type="bento"
7
+ {
8
+ "userId": "{userId}",
9
+ "workspaceId": "{workspaceId}",
10
+ "name": "Content Creation Home",
11
+ "type": "bento",
12
+ "config": {
13
+ "blocks": [
14
+ { "id": "b1", "kind": "view", "viewId": "<kanbanId>",
15
+ "layout": { "x": 0, "y": 0, "w": 8, "h": 4 } },
16
+ { "id": "b2", "kind": "entity", "entityId": "ent_current_project",
17
+ "layout": { "x": 8, "y": 0, "w": 4, "h": 4 } },
18
+ { "id": "b3", "kind": "widget", "widgetKind": "quick-access",
19
+ "layout": { "x": 0, "y": 4, "w": 6, "h": 2 },
20
+ "config": { "items": [ … ] } },
21
+ { "id": "b4", "kind": "widget", "widgetKind": "stat-card",
22
+ "layout": { "x": 6, "y": 4, "w": 6, "h": 2 },
23
+ "config": { "metric": "entities_created_this_week" } }
24
+ ]
25
+ }
26
+ }
27
+ ```
28
+
29
+ Block kinds:
30
+
31
+ - `view` — embeds a saved view by `viewId`
32
+ - `entity` — renders an entity card for a specific `entityId`
33
+ - `widget` — renders a registered cell by `widgetKind` with `config`
34
+
35
+ Full widget catalog in **`widget-catalog.md`**. Layout patterns in **`bento-recipes.md`**.
@@ -0,0 +1,10 @@
1
+ ## Common mistakes — UI generation
2
+
3
+ 1. **Creating a workspace without asking.** Always propose + confirm. Workspaces are too big to auto-commit.
4
+ 2. **Guessing widget kinds.** Always `GET /widget-definitions` first. A `kind` that isn't in the registry won't render.
5
+ 3. **Reinventing views.** Check existing views first — a kanban for tasks probably exists.
6
+ 4. **Creating a new profile when UI is the real need.** Don't create `client` profile for a "contacts who are clients" view — just create a filtered view on `contact`.
7
+ 5. **Putting unrelated data in one bento.** A bento tells a story ("my week", "this project", "content pipeline"). Kitchen-sink bentos overwhelm the user.
8
+ 6. **Ignoring color/icon.** Profiles and workspaces both take `uiHints.icon` and `uiHints.color` — set them. Untitled gray workspaces feel like a bug.
9
+ 7. **Hardcoding config for view types you haven't checked.** Each view type's `config` shape is different. Get an example from `/views` first.
10
+ 8. **Forgetting entityScope implications.** A view on a pod-scope profile (`note`) will show entities from every workspace the user can access — filter appropriately if you want workspace-local results.
@@ -0,0 +1,26 @@
1
+ ## Creating a view
2
+
3
+ ```json
4
+ POST /api/hub/views
5
+ {
6
+ "userId": "{userId}",
7
+ "workspaceId": "{workspaceId}",
8
+ "name": "Active Tasks by Project",
9
+ "type": "kanban",
10
+ "profileSlug": "task",
11
+ "config": {
12
+ "groupBy": { "property": "projectId" },
13
+ "columns": [
14
+ { "slug": "title" },
15
+ { "slug": "priority" },
16
+ { "slug": "dueDate" }
17
+ ],
18
+ "filters": [
19
+ { "property": "status", "op": "in", "value": ["todo", "in-progress"] }
20
+ ],
21
+ "sort": [{ "property": "priority", "direction": "desc" }]
22
+ }
23
+ }
24
+ ```
25
+
26
+ The `config` shape varies by view type — kanban needs `groupBy`, calendar needs a date property, gallery needs an image property. When in doubt, fetch an existing view of the same type first and mirror its structure.
@@ -0,0 +1,24 @@
1
+ ## Four things you can build
2
+
3
+ 1. **Views** — named queries + rendering config over entities of a given profile. Kanban of tasks, gallery of articles, calendar of events.
4
+ 2. **Bento dashboards** — 12-col grid compositions of cells (view-cards, entity-cards, widgets). The Home dashboard is a bento. Workspace landing pages are bentos.
5
+ 3. **Workspaces** — full lenses with profiles, views, a bento, and seed entities. The biggest building block.
6
+ 4. **New cell types** (Capability B) — AI can define entirely new rendering cells when no existing widget covers the need. Cells run in a sandboxed iframe. Pod-global cells (no `workspaceId`) are available immediately in all workspaces without a proposal step.
7
+
8
+ ```json
9
+ POST /api/hub/cells/define
10
+ {
11
+ "name": "Burndown Chart",
12
+ "rendererSource": "<!DOCTYPE html>…</html>",
13
+ "typeKey": "burndown-chart",
14
+ "description": "Sprint burndown over task completions",
15
+ "defaultSize": { "w": 8, "h": 6 },
16
+ "deps": {
17
+ "recharts": "2.12.0"
18
+ }
19
+ }
20
+ ```
21
+
22
+ - `deps` pins npm packages for the esm.sh import map. Keys are npm package names; values are version strings. Max 30 entries. React 19 is always available — never put it in `deps`.
23
+ - Always `GET /api/hub/widget-definitions` first — if a cell already covers the need, use it. New cell definitions are permanent; only create when genuinely novel.
24
+ - For the full in-frame query/mutate/shell-actions API see the `synap` skill's **ViewFrame Cells** section (or load `synap-ui:SKILL` via `GET /api/hub/skills/system?sections=synap-ui:SKILL`).
@@ -0,0 +1,7 @@
1
+ ## When you need more — UI generation
2
+
3
+ - Full per-view-type `config` shapes → **`view-types.md`**
4
+ - Complete widget/cell catalog + configSchemas → **`widget-catalog.md`**
5
+ - Ready-to-reuse bento layouts for common use cases → **`bento-recipes.md`**
6
+ - Creating the underlying data → use core **`synap`** skill
7
+ - Extending profiles with new fields before building views → use **`synap-schema`** skill
@@ -0,0 +1,11 @@
1
+ ## Proposing vs. extending
2
+
3
+ Before proposing a new workspace, ask: does one of the user's existing workspaces fit? A "Content" workspace and a "Writing" workspace are the same lens. Adding a view to the existing workspace is almost always better than creating a new one.
4
+
5
+ Create new when:
6
+
7
+ - The user explicitly asks for it ("new workspace for…")
8
+ - The data and access patterns are genuinely orthogonal to existing workspaces
9
+ - A different team/collaborator set makes sense
10
+
11
+ Otherwise: add a view, add a bento block, add properties — don't multiply workspaces.
@@ -0,0 +1,24 @@
1
+ ## View types (16 total, 12 implemented)
2
+
3
+ Pick one that matches the data's shape AND the user's intent:
4
+
5
+ | Type | Implemented | When it fits |
6
+ | ---------------- | ----------- | ---------------------------------------------------------- |
7
+ | `table` | yes | Dense data, many columns, sort/filter heavy |
8
+ | `list` | yes | Scan-friendly, compact rows (tasks, notes) |
9
+ | `grid` | yes | Card grid, medium density |
10
+ | `gallery` | yes | Image-forward cards (articles, bookmarks, products) |
11
+ | `kanban` | yes | Status pipelines (tasks by status, deals by stage) |
12
+ | `matrix` | yes | 2-axis grid (priority × urgency, effort × impact) |
13
+ | `masonry`/`feed` | yes | Pinterest-style, mixed-size cards; default for Library |
14
+ | `calendar` | yes | Date-indexed data (events, tasks by dueDate) |
15
+ | `flow` | yes | Node-edge diagrams (automations, mind maps) |
16
+ | `bento` | yes | Mixed composition (a dashboard-in-view) |
17
+ | `branch_tree` | yes | Hierarchical data (project → subtasks, threads → branches) |
18
+ | `whiteboard` | yes | Free-form canvas |
19
+ | `timeline` | no | (Defer) |
20
+ | `graph` | no | (Defer) |
21
+ | `gantt` | no | (Defer) |
22
+ | `mindmap` | no | (Defer) |
23
+
24
+ Decision: the data has statuses → `kanban`. Dates → `calendar`. Many columns → `table`. Mixed types → `masonry` or `bento`. Full reference in **`view-types.md`**.
@@ -0,0 +1,3 @@
1
+ # Synap — UI generation
2
+
3
+ You build the surfaces the user sees: views over their data, bento dashboards, full workspaces tuned for a domain. The core rule: **emergent complexity.** A workspace is a lens; a view is a lens; a bento is a composition of lenses. Everything renders through the cell system, nothing is hardcoded.
@@ -0,0 +1,18 @@
1
+ ## Worked example — "Make me a CRM"
2
+
3
+ 1. Inventory. User already has `person`, `contact`, `company`, `deal`, `event` profiles (all system).
4
+ 2. No new profiles needed. The CRM is a **lens**, not new data.
5
+ 3. Propose (before committing):
6
+ - Workspace name: "CRM"
7
+ - Views:
8
+ - `Deals Pipeline` — kanban on `deal`, groupBy `stage`
9
+ - `Contacts` — table on `contact`, columns: name, role, company, lastInteraction
10
+ - `Companies` — gallery on `company` (logo-forward)
11
+ - `Upcoming Meetings` — calendar on `event`, filter `relatedToContact`
12
+ - Bento:
13
+ - Top: `deals pipeline` view (8 cols × 4 rows)
14
+ - Side: `stat-card` — "Deals in pipeline: $X" (4 cols × 2 rows)
15
+ - Side: `stat-card` — "Meetings this week: N" (4 cols × 2 rows)
16
+ - Bottom: `recent-activity` widget (12 cols × 3 rows)
17
+ 4. Show to user. Confirm.
18
+ 5. Commit via `POST /workspaces`.
@@ -0,0 +1,47 @@
1
+ ## Creating or proposing a workspace
2
+
3
+ **Always ask before creating.** Workspaces are big objects with profiles, views, members, bento, and seed data. Commit only after user confirms.
4
+
5
+ The canonical flow:
6
+
7
+ 1. **Assemble a proposal** (no API call yet):
8
+
9
+ ```js
10
+ const proposal = {
11
+ name: "Content Creation",
12
+ description: "Draft, review, and publish articles",
13
+ icon: "pen-tool",
14
+ color: "purple",
15
+ profiles: [ // reuse system profiles by slug OR include custom ones
16
+ { slug: "article", reuse: true },
17
+ { slug: "draft", displayName: "Draft", parentSlug: "article",
18
+ properties: [
19
+ { slug: "status", valueType: "string", constraints: { enum: ["idea","writing","review","published"] }, uiHints: { displayAs: "status" } },
20
+ { slug: "wordCount", valueType: "number" },
21
+ { slug: "publishDate", valueType: "date" }
22
+ ]
23
+ }
24
+ ],
25
+ views: [
26
+ { name: "Pipeline", type: "kanban", profileSlug: "draft",
27
+ config: { groupBy: { property: "status" } } },
28
+ { name: "Published", type: "gallery", profileSlug: "article",
29
+ config: { filters: [{ property: "status", op: "eq", value: "published" }] } }
30
+ ],
31
+ bento: { blocks: [ … ] },
32
+ seedEntities: [] // optional
33
+ }
34
+ ```
35
+
36
+ 2. **Show it to the user**. Compact, readable. "Here's what I'd create — 2 profiles, 2 views, a bento. Ship it?"
37
+
38
+ 3. **On yes**, commit through `/api/hub/workspaces`:
39
+
40
+ ```json
41
+ POST /api/hub/workspaces
42
+ { "userId": "{userId}", "proposal": { /* the object above */ } }
43
+ ```
44
+
45
+ This goes through governance — `workspace.create` is **always** proposal-gated even for agents (see `../synap/governance.md`). Expect `status: "proposed"` and tell the user they'll see it in Proposals.
46
+
47
+ 4. **On no**, don't commit. Offer to adjust.
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "Bookmark Enrichment (auto)",
3
+ "triggerType": "event",
4
+ "status": "active",
5
+ "triggerConfig": {
6
+ "eventPattern": "entity.create.completed",
7
+ "filters": { "profileSlug": "bookmark" }
8
+ },
9
+ "flowDefinition": {
10
+ "nodes": [
11
+ {
12
+ "id": "trigger",
13
+ "type": "trigger",
14
+ "position": { "x": 0, "y": 0 },
15
+ "data": {
16
+ "triggerType": "event",
17
+ "label": "Bookmark created",
18
+ "config": {
19
+ "eventPattern": "entity.create.completed",
20
+ "filters": { "profileSlug": "bookmark" }
21
+ }
22
+ }
23
+ },
24
+ {
25
+ "id": "enrich",
26
+ "type": "skill",
27
+ "position": { "x": 0, "y": 120 },
28
+ "data": {
29
+ "label": "Bookmark Enrichment",
30
+ "skillName": "bookmark-enrichment",
31
+ "skillTitle": "Bookmark Enrichment",
32
+ "inputMapping": {
33
+ "entityId": "{{trigger.payload.subjectId}}"
34
+ }
35
+ }
36
+ }
37
+ ],
38
+ "edges": [{ "id": "e1", "source": "trigger", "target": "enrich" }]
39
+ },
40
+ "metadata": {
41
+ "source": "bridge-template",
42
+ "note": "The skill node carries `skillName`; the CLI seed command resolves it to the live `skillId` at install time (GET /skills by name)."
43
+ }
44
+ }
@@ -0,0 +1,86 @@
1
+ {
2
+ "name": "Mail feed → Discord (AI-triaged)",
3
+ "triggerType": "cron",
4
+ "status": "draft",
5
+ "triggerConfig": { "expression": "0 */2 * * *" },
6
+ "flowDefinition": {
7
+ "nodes": [
8
+ {
9
+ "id": "trigger",
10
+ "type": "trigger",
11
+ "position": { "x": 0, "y": 0 },
12
+ "data": {
13
+ "triggerType": "cron",
14
+ "label": "Every 2 hours",
15
+ "config": { "expression": "0 */2 * * *" }
16
+ }
17
+ },
18
+ {
19
+ "id": "fetch-mail",
20
+ "type": "capability",
21
+ "position": { "x": 0, "y": 120 },
22
+ "data": {
23
+ "label": "Search Gmail (source verb)",
24
+ "verbId": "gmail_search",
25
+ "inputMapping": { "query": "newer_than:2d", "maxResults": "25" },
26
+ "connectionSelector": { "connectionId": "" }
27
+ }
28
+ },
29
+ {
30
+ "id": "triage",
31
+ "type": "capability",
32
+ "position": { "x": 0, "y": 240 },
33
+ "data": {
34
+ "label": "AI triage (batch classifier verb)",
35
+ "verbId": "ai.triage",
36
+ "inputMapping": { "emails": "{{steps.fetch-mail.output.results}}" }
37
+ }
38
+ },
39
+ {
40
+ "id": "relevant-loop",
41
+ "type": "loop",
42
+ "position": { "x": 0, "y": 360 },
43
+ "data": {
44
+ "label": "For each relevant email",
45
+ "iteratorExpression": "steps.triage.output.results",
46
+ "itemVariable": "email"
47
+ }
48
+ },
49
+ {
50
+ "id": "post-to-feed",
51
+ "type": "output",
52
+ "position": { "x": 0, "y": 480 },
53
+ "data": {
54
+ "label": "Post to the Discord-bound feed channel",
55
+ "outputType": "channel_message",
56
+ "config": {
57
+ "channelId": "<discord-bound team feed channel id>",
58
+ "content": "**{{loop.item.subject}}** — _{{loop.item.category}}_\n{{loop.item.summary}}",
59
+ "channelType": "proactive",
60
+ "metadata": {
61
+ "proactiveType": "mail-feed",
62
+ "gmailId": "{{loop.item.id}}"
63
+ }
64
+ }
65
+ }
66
+ }
67
+ ],
68
+ "edges": [
69
+ { "id": "e1", "source": "trigger", "target": "fetch-mail" },
70
+ { "id": "e2", "source": "fetch-mail", "target": "triage" },
71
+ { "id": "e3", "source": "triage", "target": "relevant-loop" },
72
+ { "id": "e4", "source": "relevant-loop", "target": "post-to-feed" }
73
+ ]
74
+ },
75
+ "metadata": {
76
+ "source": "feed-template",
77
+ "purpose": "CANONICAL example of the North Star: a FEED is an AUTOMATION that composes capability verbs. Cron → gmail_search (source verb) → AI triage (classifier verb) → loop → post relevant items to a Discord-bound feed channel. Replaces the bespoke run-mail-feed.ts worker with pure config.",
78
+ "prerequisites": [
79
+ "Wave 1 (SHIPPED): the `capability` node dispatches gmail_search (declarative) + any verb through executeCapability.",
80
+ "verb `ai.triage`: a batch email classifier verb must be seeded (today this is the mail_triage IS route; roadmap folds it into a verb). Until then, swap the triage node for a `command` node (IS task) or point verbId at the seeded classifier.",
81
+ "a connected Google account (nango-google) + set connectionSelector.connectionId to pin the mailbox.",
82
+ "a Discord-bound `branchPurpose:'team'` feed channel — put its id in the post node (or use channelType:'proactive' for the user's feed).",
83
+ "PER-ITEM filtering/AI inside the loop needs automation Wave 2 (loop body currently allows `output` only — this template does BATCH triage OUTSIDE the loop and posts via an `output.channel_message` node INSIDE the loop, which IS loop-allowed today)."
84
+ ]
85
+ }
86
+ }