@synap-core/cli 1.8.0 → 1.11.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 (372) 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 +1594 -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 +95 -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 +6 -7
  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 +41 -14
  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 +254 -187
  32. package/dist/commands/data.js.map +1 -1
  33. package/dist/commands/diagnose.d.ts +20 -0
  34. package/dist/commands/diagnose.js +186 -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 +122 -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/doc.d.ts +14 -0
  43. package/dist/commands/doc.js +61 -4
  44. package/dist/commands/doc.js.map +1 -1
  45. package/dist/commands/doctor.d.ts +21 -0
  46. package/dist/commands/doctor.js +189 -0
  47. package/dist/commands/doctor.js.map +1 -0
  48. package/dist/commands/events.js +5 -2
  49. package/dist/commands/events.js.map +1 -1
  50. package/dist/commands/explain.d.ts +1 -1
  51. package/dist/commands/explain.js +18 -15
  52. package/dist/commands/explain.js.map +1 -1
  53. package/dist/commands/facet.d.ts +29 -0
  54. package/dist/commands/facet.js +113 -0
  55. package/dist/commands/facet.js.map +1 -0
  56. package/dist/commands/graph.js +7 -4
  57. package/dist/commands/graph.js.map +1 -1
  58. package/dist/commands/import.d.ts +38 -0
  59. package/dist/commands/import.js +471 -0
  60. package/dist/commands/import.js.map +1 -0
  61. package/dist/commands/init.js +35 -16
  62. package/dist/commands/init.js.map +1 -1
  63. package/dist/commands/keys.js +3 -4
  64. package/dist/commands/keys.js.map +1 -1
  65. package/dist/commands/knowledge.d.ts +8 -0
  66. package/dist/commands/knowledge.js +308 -33
  67. package/dist/commands/knowledge.js.map +1 -1
  68. package/dist/commands/launch.d.ts +50 -0
  69. package/dist/commands/launch.js +790 -0
  70. package/dist/commands/launch.js.map +1 -0
  71. package/dist/commands/lens.d.ts +45 -0
  72. package/dist/commands/lens.js +386 -0
  73. package/dist/commands/lens.js.map +1 -0
  74. package/dist/commands/market-authoring.d.ts +45 -0
  75. package/dist/commands/market-authoring.js +225 -0
  76. package/dist/commands/market-authoring.js.map +1 -0
  77. package/dist/commands/market.d.ts +224 -0
  78. package/dist/commands/market.js +1643 -0
  79. package/dist/commands/market.js.map +1 -0
  80. package/dist/commands/mcp.d.ts +64 -0
  81. package/dist/commands/mcp.js +265 -0
  82. package/dist/commands/mcp.js.map +1 -0
  83. package/dist/commands/observe.js +14 -11
  84. package/dist/commands/observe.js.map +1 -1
  85. package/dist/commands/open.d.ts +21 -4
  86. package/dist/commands/open.js +45 -4
  87. package/dist/commands/open.js.map +1 -1
  88. package/dist/commands/pod.d.ts +100 -0
  89. package/dist/commands/pod.js +359 -0
  90. package/dist/commands/pod.js.map +1 -0
  91. package/dist/commands/pods.d.ts +15 -0
  92. package/dist/commands/pods.js +233 -17
  93. package/dist/commands/pods.js.map +1 -1
  94. package/dist/commands/proposals-actions.js +43 -3
  95. package/dist/commands/proposals-actions.js.map +1 -1
  96. package/dist/commands/purge.d.ts +23 -0
  97. package/dist/commands/purge.js +148 -0
  98. package/dist/commands/purge.js.map +1 -0
  99. package/dist/commands/raycast.d.ts +15 -0
  100. package/dist/commands/raycast.js +153 -0
  101. package/dist/commands/raycast.js.map +1 -0
  102. package/dist/commands/sessions.js +47 -22
  103. package/dist/commands/sessions.js.map +1 -1
  104. package/dist/commands/skill-manage.d.ts +21 -0
  105. package/dist/commands/skill-manage.js +195 -0
  106. package/dist/commands/skill-manage.js.map +1 -0
  107. package/dist/commands/skills-commands.js +2 -1
  108. package/dist/commands/skills-commands.js.map +1 -1
  109. package/dist/commands/skills.js +7 -4
  110. package/dist/commands/skills.js.map +1 -1
  111. package/dist/commands/status.d.ts +3 -1
  112. package/dist/commands/status.js +166 -14
  113. package/dist/commands/status.js.map +1 -1
  114. package/dist/commands/statusline.d.ts +24 -0
  115. package/dist/commands/statusline.js +450 -0
  116. package/dist/commands/statusline.js.map +1 -0
  117. package/dist/commands/subscribe.js +2 -2
  118. package/dist/commands/subscribe.js.map +1 -1
  119. package/dist/commands/template.d.ts +42 -0
  120. package/dist/commands/template.js +191 -0
  121. package/dist/commands/template.js.map +1 -0
  122. package/dist/commands/tools.d.ts +30 -0
  123. package/dist/commands/tools.js +315 -0
  124. package/dist/commands/tools.js.map +1 -0
  125. package/dist/commands/upload.d.ts +30 -0
  126. package/dist/commands/upload.js +155 -0
  127. package/dist/commands/upload.js.map +1 -0
  128. package/dist/commands/versions.d.ts +27 -0
  129. package/dist/commands/versions.js +277 -0
  130. package/dist/commands/versions.js.map +1 -0
  131. package/dist/commands/view.js +3 -2
  132. package/dist/commands/view.js.map +1 -1
  133. package/dist/commands/whoami.d.ts +21 -0
  134. package/dist/commands/whoami.js +129 -0
  135. package/dist/commands/whoami.js.map +1 -0
  136. package/dist/index.js +894 -60
  137. package/dist/index.js.map +1 -1
  138. package/dist/lib/approval-poll.d.ts +42 -0
  139. package/dist/lib/approval-poll.js +52 -0
  140. package/dist/lib/approval-poll.js.map +1 -0
  141. package/dist/lib/auth.d.ts +29 -6
  142. package/dist/lib/auth.js +105 -94
  143. package/dist/lib/auth.js.map +1 -1
  144. package/dist/lib/bundle-version.d.ts +11 -0
  145. package/dist/lib/bundle-version.js +33 -0
  146. package/dist/lib/bundle-version.js.map +1 -0
  147. package/dist/lib/capture-lane.d.ts +30 -12
  148. package/dist/lib/capture-lane.js +73 -14
  149. package/dist/lib/capture-lane.js.map +1 -1
  150. package/dist/lib/capture-structure.d.ts +123 -0
  151. package/dist/lib/capture-structure.js +57 -0
  152. package/dist/lib/capture-structure.js.map +1 -0
  153. package/dist/lib/cp-packages.d.ts +177 -0
  154. package/dist/lib/cp-packages.js +389 -0
  155. package/dist/lib/cp-packages.js.map +1 -0
  156. package/dist/lib/describe-lens.d.ts +46 -0
  157. package/dist/lib/describe-lens.js +33 -0
  158. package/dist/lib/describe-lens.js.map +1 -0
  159. package/dist/lib/hub-client.d.ts +91 -1
  160. package/dist/lib/hub-client.js +565 -22
  161. package/dist/lib/hub-client.js.map +1 -1
  162. package/dist/lib/id.d.ts +23 -0
  163. package/dist/lib/id.js +35 -0
  164. package/dist/lib/id.js.map +1 -0
  165. package/dist/lib/installed.d.ts +51 -0
  166. package/dist/lib/installed.js +70 -0
  167. package/dist/lib/installed.js.map +1 -0
  168. package/dist/lib/next-steps.d.ts +61 -0
  169. package/dist/lib/next-steps.js +146 -0
  170. package/dist/lib/next-steps.js.map +1 -0
  171. package/dist/lib/pod.d.ts +144 -22
  172. package/dist/lib/pod.js +302 -64
  173. package/dist/lib/pod.js.map +1 -1
  174. package/dist/lib/project-ref.d.ts +95 -0
  175. package/dist/lib/project-ref.js +144 -0
  176. package/dist/lib/project-ref.js.map +1 -0
  177. package/dist/lib/project.d.ts +35 -0
  178. package/dist/lib/project.js +39 -0
  179. package/dist/lib/project.js.map +1 -0
  180. package/dist/lib/session-lens.d.ts +33 -0
  181. package/dist/lib/session-lens.js +76 -0
  182. package/dist/lib/session-lens.js.map +1 -0
  183. package/dist/lib/skill-import.d.ts +40 -0
  184. package/dist/lib/skill-import.js +203 -0
  185. package/dist/lib/skill-import.js.map +1 -0
  186. package/dist/lib/skills-installer.d.ts +17 -6
  187. package/dist/lib/skills-installer.js +133 -19
  188. package/dist/lib/skills-installer.js.map +1 -1
  189. package/dist/lib/suite.d.ts +28 -0
  190. package/dist/lib/suite.js +29 -0
  191. package/dist/lib/suite.js.map +1 -0
  192. package/dist/lib/superwhisper-import.d.ts +40 -0
  193. package/dist/lib/superwhisper-import.js +389 -0
  194. package/dist/lib/superwhisper-import.js.map +1 -0
  195. package/dist/lib/targets.d.ts +49 -1
  196. package/dist/lib/targets.js +420 -288
  197. package/dist/lib/targets.js.map +1 -1
  198. package/dist/lib/template-file.d.ts +74 -0
  199. package/dist/lib/template-file.js +140 -0
  200. package/dist/lib/template-file.js.map +1 -0
  201. package/dist/lib/unwrapList.d.ts +1 -0
  202. package/dist/lib/unwrapList.js +20 -0
  203. package/dist/lib/unwrapList.js.map +1 -0
  204. package/dist/utils/logger.d.ts +2 -0
  205. package/dist/utils/logger.js +10 -2
  206. package/dist/utils/logger.js.map +1 -1
  207. package/node_modules/@synap/hub-rest-client/dist/index.cjs +414 -34
  208. package/node_modules/@synap/hub-rest-client/dist/index.d.cts +762 -22
  209. package/node_modules/@synap/hub-rest-client/dist/index.d.ts +762 -22
  210. package/node_modules/@synap/hub-rest-client/dist/index.js +414 -34
  211. package/node_modules/@synap/hub-rest-client/package.json +1 -1
  212. package/node_modules/@synap/hub-rest-client/src/client.ts +525 -37
  213. package/node_modules/@synap/hub-rest-client/src/index.ts +42 -0
  214. package/node_modules/@synap/hub-rest-client/src/setup.ts +57 -1
  215. package/node_modules/@synap/hub-rest-client/src/types.ts +697 -37
  216. package/package.json +11 -5
  217. package/skills/agent-os/SKILL.md +218 -0
  218. package/skills/manifest.json +5 -0
  219. package/skills/onboard/SKILL.md +193 -0
  220. package/skills/synap/SKILL.md +1284 -58
  221. package/skills/synap/_order.txt +37 -0
  222. package/skills/synap/_skill.yaml +24 -0
  223. package/skills/synap/authentication.md +10 -0
  224. package/skills/synap/automations.md +264 -0
  225. package/skills/synap/capabilities.md +107 -0
  226. package/skills/synap/capture.md +50 -142
  227. package/skills/synap/cli-operations.md +107 -0
  228. package/skills/synap/common-mistakes.md +13 -0
  229. package/skills/synap/content-os.md +83 -0
  230. package/skills/synap/creative-loop.md +43 -0
  231. package/skills/synap/crm.md +117 -0
  232. package/skills/synap/diagnostics.md +35 -0
  233. package/skills/synap/digesting-a-channel.md +63 -0
  234. package/skills/synap/document-embeds.md +123 -0
  235. package/skills/synap/escalation-ladder.md +71 -0
  236. package/skills/synap/focus-sessions.md +47 -0
  237. package/skills/synap/governance-rules.md +64 -0
  238. package/skills/synap/governance.md +6 -6
  239. package/skills/synap/graph-gardening.md +21 -0
  240. package/skills/synap/inline-patterns.md +38 -0
  241. package/skills/synap/lenses.md +38 -0
  242. package/skills/synap/linking-principle.md +39 -0
  243. package/skills/synap/linking.md +1 -0
  244. package/skills/synap/mental-model.md +45 -0
  245. package/skills/synap/more.md +7 -0
  246. package/skills/synap/multi-entity-capture.md +12 -0
  247. package/skills/synap/next-action.md +37 -0
  248. package/skills/synap/north-star.md +17 -0
  249. package/skills/synap/operating-mode-rules.md +45 -0
  250. package/skills/synap/operating-mode.md +9 -0
  251. package/skills/synap/quick-reference.md +67 -0
  252. package/skills/synap/reading.md +43 -0
  253. package/skills/synap/recap.md +21 -0
  254. package/skills/synap/reflexes.md +46 -0
  255. package/skills/synap/response-style.md +21 -0
  256. package/skills/synap/scope.md +13 -0
  257. package/skills/synap/showing.md +17 -0
  258. package/skills/synap/user-model.md +25 -0
  259. package/skills/synap/viewframe-cells.md +290 -0
  260. package/skills/synap/work-flow.md +113 -0
  261. package/skills/synap/worked-examples.md +74 -0
  262. package/skills/synap/workspace-design.md +45 -0
  263. package/skills/synap/workspace-edges.md +49 -0
  264. package/skills/synap/writes.md +213 -0
  265. package/skills/synap-app/SKILL.md +319 -0
  266. package/skills/synap-app/_order.txt +5 -0
  267. package/skills/synap-app/_skill.yaml +20 -0
  268. package/skills/synap-app/creating-the-base-app.md +64 -0
  269. package/skills/synap-app/governance.md +42 -0
  270. package/skills/synap-app/install-commands.md +55 -0
  271. package/skills/synap-app/overview.md +50 -0
  272. package/skills/synap-app/using-the-sdk.md +73 -0
  273. package/skills/synap-market/SKILL.md +335 -0
  274. package/skills/synap-market/_order.txt +5 -0
  275. package/skills/synap-market/_skill.yaml +24 -0
  276. package/skills/synap-market/author-and-publish.md +75 -0
  277. package/skills/synap-market/discover-and-fetch.md +59 -0
  278. package/skills/synap-market/governance-and-catalog.md +56 -0
  279. package/skills/synap-market/install.md +55 -0
  280. package/skills/synap-market/overview.md +51 -0
  281. package/skills/synap-schema/SKILL.md +97 -6
  282. package/skills/synap-schema/_order.txt +13 -0
  283. package/skills/synap-schema/_skill.yaml +22 -0
  284. package/skills/synap-schema/before-you-touch.md +14 -0
  285. package/skills/synap-schema/common-mistakes.md +9 -0
  286. package/skills/synap-schema/creating-profiles.md +17 -0
  287. package/skills/synap-schema/discover-profiles.md +24 -0
  288. package/skills/synap-schema/entity-scope.md +8 -0
  289. package/skills/synap-schema/extend-vs-create.md +31 -0
  290. package/skills/synap-schema/more.md +6 -0
  291. package/skills/synap-schema/overlay-properties.md +22 -0
  292. package/skills/synap-schema/profiles.md +3 -0
  293. package/skills/synap-schema/property-defs.md +29 -0
  294. package/skills/synap-schema/read-before-write.md +50 -0
  295. package/skills/synap-schema/relations.md +18 -0
  296. package/skills/synap-schema/worked-example.md +30 -0
  297. package/skills/synap-ui/SKILL.md +26 -2
  298. package/skills/synap-ui/_order.txt +13 -0
  299. package/skills/synap-ui/_skill.yaml +23 -0
  300. package/skills/synap-ui/ai-companion.md +27 -0
  301. package/skills/synap-ui/arranging-bento.md +8 -0
  302. package/skills/synap-ui/before-you-build.md +20 -0
  303. package/skills/synap-ui/bento-layouts.md +35 -0
  304. package/skills/synap-ui/common-mistakes.md +10 -0
  305. package/skills/synap-ui/creating-views.md +26 -0
  306. package/skills/synap-ui/four-builds.md +24 -0
  307. package/skills/synap-ui/more.md +7 -0
  308. package/skills/synap-ui/proposing-vs-extending.md +11 -0
  309. package/skills/synap-ui/view-list.md +24 -0
  310. package/skills/synap-ui/views.md +3 -0
  311. package/skills/synap-ui/worked-example.md +18 -0
  312. package/skills/synap-ui/workspaces.md +47 -0
  313. package/templates/automations/bookmark-enrichment.automation.json +44 -0
  314. package/templates/automations/mail-feed.automation.json +86 -0
  315. package/templates/automations/url-bookmark-capture.automation.json +70 -0
  316. package/templates/skills/README.md +21 -0
  317. package/templates/skills/authoring-automations/SKILL.md +95 -0
  318. package/templates/skills/authoring-automations/reference/node-matrix.md +49 -0
  319. package/templates/skills/authoring-capabilities/SKILL.md +93 -0
  320. package/templates/skills/authoring-capabilities/reference/template-anatomy.md +70 -0
  321. package/templates/skills/authoring-playbooks/SKILL.md +102 -0
  322. package/templates/skills/authoring-playbooks/reference/stages-contract.md +35 -0
  323. package/templates/skills/authoring-playbooks/reference/worked-example.md +64 -0
  324. package/templates/skills/bookmark-enrichment/SKILL.md +40 -0
  325. package/templates/skills/coordinating-agents/SKILL.md +32 -0
  326. package/templates/skills/coordinating-branches/SKILL.md +27 -0
  327. package/templates/skills/mapping-the-server/SKILL.md +54 -0
  328. package/templates/skills/reading-client-progress/SKILL.md +65 -0
  329. package/templates/skills/routing-to-channels/SKILL.md +54 -0
  330. package/templates/skills/stellar-scf-grants-advisor/ASSOCIATE-CHEATSHEET.md +133 -0
  331. package/templates/skills/stellar-scf-grants-advisor/ASSOCIATE-ONBOARDING-GUIDE.md +761 -0
  332. package/templates/skills/stellar-scf-grants-advisor/CLIENT-FAQ.md +181 -0
  333. package/templates/skills/stellar-scf-grants-advisor/PARTNER-HANDOVER.md +130 -0
  334. package/templates/skills/stellar-scf-grants-advisor/SKILL.md +102 -0
  335. package/templates/skills/stellar-scf-grants-advisor/examples/README.md +43 -0
  336. package/templates/skills/stellar-scf-grants-advisor/examples/chat-summary-templates.md +158 -0
  337. package/templates/skills/stellar-scf-grants-advisor/examples/corpus-comparable-rows.md +136 -0
  338. package/templates/skills/stellar-scf-grants-advisor/examples/q10-team-rewrites.md +109 -0
  339. package/templates/skills/stellar-scf-grants-advisor/examples/q2-description-rewrites.md +88 -0
  340. package/templates/skills/stellar-scf-grants-advisor/examples/q6-integration-rewrites.md +107 -0
  341. package/templates/skills/stellar-scf-grants-advisor/examples/tranche-structures.md +176 -0
  342. package/templates/skills/stellar-scf-grants-advisor/reference/01-methodology.md +96 -0
  343. package/templates/skills/stellar-scf-grants-advisor/reference/02-scoring-framework.md +199 -0
  344. package/templates/skills/stellar-scf-grants-advisor/reference/03-rejection-patterns.md +241 -0
  345. package/templates/skills/stellar-scf-grants-advisor/reference/04-winner-patterns.md +120 -0
  346. package/templates/skills/stellar-scf-grants-advisor/reference/05-comeback-patterns.md +92 -0
  347. package/templates/skills/stellar-scf-grants-advisor/reference/06-budget-benchmarks.md +125 -0
  348. package/templates/skills/stellar-scf-grants-advisor/reference/07-integration-list.md +147 -0
  349. package/templates/skills/stellar-scf-grants-advisor/reference/08-abstract-fields.md +258 -0
  350. package/templates/skills/stellar-scf-grants-advisor/reference/09-build-fields.md +259 -0
  351. package/templates/skills/stellar-scf-grants-advisor/reference/10-corpus-winners.md +135 -0
  352. package/templates/skills/stellar-scf-grants-advisor/reference/11-corpus-rejects.md +267 -0
  353. package/templates/skills/stellar-scf-grants-advisor/reference/12-client-communication.md +131 -0
  354. package/templates/skills/stellar-scf-grants-advisor/reference/13-excel-output-spec.md +199 -0
  355. package/templates/skills/stellar-scf-grants-advisor/reference/14-worked-examples.md +160 -0
  356. package/templates/skills/stellar-scf-grants-advisor/templates/abstract-review-builder.py +253 -0
  357. package/templates/skills/stellar-scf-grants-advisor/templates/build-review-builder.py +213 -0
  358. package/dist/commands/connectors.d.ts +0 -31
  359. package/dist/commands/connectors.js +0 -276
  360. package/dist/commands/connectors.js.map +0 -1
  361. package/dist/commands/finish.d.ts +0 -25
  362. package/dist/commands/finish.js +0 -274
  363. package/dist/commands/finish.js.map +0 -1
  364. package/dist/commands/openclaw.d.ts +0 -40
  365. package/dist/commands/openclaw.js +0 -1148
  366. package/dist/commands/openclaw.js.map +0 -1
  367. package/dist/commands/security-audit.d.ts +0 -12
  368. package/dist/commands/security-audit.js +0 -100
  369. package/dist/commands/security-audit.js.map +0 -1
  370. package/dist/lib/hardening.d.ts +0 -18
  371. package/dist/lib/hardening.js +0 -214
  372. package/dist/lib/hardening.js.map +0 -1
@@ -0,0 +1,71 @@
1
+ # Escalation ladder — discover → invent under proposal → crystallize after proof
2
+
3
+ The always-on brief lives in `reflexes.md`. This file is the full HOW when you need more than the corner-of-your-head reminder.
4
+
5
+ ## Why it exists
6
+
7
+ Agents fail in two ways: (1) dead-end ("I can't do that") when the substrate could express the need after discovery or a proposed meta change, and (2) silent invent (minting workspaces/profiles/views without checking what already exists). The ladder is the habit that prevents both. Soft teaching only — no hard tool filtering by tier.
8
+
9
+ ## Levels
10
+
11
+ ### L0 — Reflexes (always)
12
+
13
+ Recall before non-trivial work (`synap_ask` / search). Capture durable learning after. Treat `"proposed"` as success-in-review, not an error. Orient once per session.
14
+
15
+ ### L1 — OPERATE on data
16
+
17
+ Default mode: work with what already exists.
18
+
19
+ - Capture free text, create/update entities, link, attach **known** facets
20
+ - Start/update sessions when the work is a unit with a deliverable
21
+ - Prefer existing profiles, views, capabilities, playbooks over inventing structure
22
+
23
+ ### L2 — DISCOVER before invent
24
+
25
+ When the tool list or current schema doesn't express the need — **search before minting**:
26
+
27
+ 1. `list_profiles` / `list_views` / `list_capabilities({query})` in the active lenses
28
+ 2. `market.search({query, kind?})` over `capability` | `template` | `automation` | `cell`
29
+ 3. Load the relevant skill (`load_skill` / discover_tools) if the HOW is unclear
30
+
31
+ Only if L2 returns empty for the real need do you climb to L3.
32
+
33
+ ### L3 — MUTATE the meta-model (proposal-gated)
34
+
35
+ Extend the substrate so the need becomes expressible. Always governed — expect `"proposed"`.
36
+
37
+ | Need | Prefer | Tool sketch |
38
+ | ------------------ | -------------------- | --------------------------------------------------------------------------------------- |
39
+ | Role/hat missing | Existing role attach | `define_role` only after `list_profiles` empty for that role |
40
+ | Field missing | Existing property | `create_property_def` |
41
+ | Kind missing | Closest parent kind | `create_profile` (extend, don't fork) |
42
+ | View missing | Existing view | `list_views` first, then `create_view` (recovery or proactive) |
43
+ | Domain missing | **Template** | `market.search(kind:template)` → install/propose **before** freehand `create_workspace` |
44
+ | Capability missing | Marketplace | `market.install` (always proposes for agents) |
45
+
46
+ **Template-before-workspace (hard rule in teaching):** new operational domains start as marketplace templates when one fits. Freehand workspace creation is last resort after the four workspace-design conditions hold (`workspace-design.md`). Capture never invents a workspace — placement only routes into existing lenses.
47
+
48
+ ### L4 — CRYSTALLIZE after proof
49
+
50
+ After a one-off has succeeded and is clearly repeatable:
51
+
52
+ - Session that worked → `promote_session_to_playbook`
53
+ - Cell that presents well for a type/slot → `promote_cell_to_renderer`
54
+ - Repeatable process authored deliberately → `create_playbook`
55
+
56
+ Never crystallize a speculative or failed one-off. One structural suggestion at a time; if speculative, ask first (`creative-loop.md`).
57
+
58
+ ## Decision gates (cheat sheet)
59
+
60
+ ```
61
+ Can I do it with existing data/tools?
62
+ yes → L1
63
+ no → L2 discover
64
+ found → use / install (propose) / enable
65
+ empty → L3 propose meta change (never silent invent)
66
+ Did a one-off just succeed and will recur?
67
+ yes → offer L4 (question if speculative)
68
+ no → leave it as a one-off
69
+ ```
70
+
71
+ Blocked path: **never** invent silently; **never** stop at a dead-end error — climb L2→L3 and propose. Success path: one clear structural nudge, not a cascade of schema changes.
@@ -0,0 +1,47 @@
1
+ ## Focus Sessions — Goal-Bound Work Rooms
2
+
3
+ A **focus session** is a named, multi-step work room where you and AI agents collaborate on a specific goal. Use one whenever the work has a clear end state, will take more than one exchange, or involves multiple agents.
4
+
5
+ **When to propose a session** (via the proposal system — always ask first):
6
+
7
+ - Research with 5+ sources → decision memo
8
+ - Lead generation sprint → qualified list + outreach drafts
9
+ - Incident investigation → postmortem doc
10
+ - Data import → structured knowledge base
11
+ - Any task you'd naturally call "a project" rather than "a question"
12
+
13
+ **How the AI proposes a session:**
14
+
15
+ ```
16
+ create_proposal with targetType: "focus_session"
17
+ → user reviews goal + rationale + expected outputs in ProposalReviewBoard
18
+ → on approval, session is created in focus_sessions table
19
+ → AI updates progress (0→100) via PATCH /api/hub/focus-sessions/:id { workspaceId, progress: N }
20
+ → session auto-surfaces in the Active Sessions bento widget on the user's home
21
+ ```
22
+
23
+ **Session templates** (pass as `templateId`):
24
+ `research-room` · `lead-sprint` · `decision-memo` · `import-cleanup` · `incident-room` · `campaign-intel`
25
+
26
+ **Hub Protocol REST** (for IS → backend; always include `workspaceId`):
27
+
28
+ - `POST /api/hub/focus-sessions` — create (include `correlationId` for idempotency)
29
+ - `GET /api/hub/focus-sessions/:id?workspaceId=<id>` — read
30
+ - `PATCH /api/hub/focus-sessions/:id` — update `{ workspaceId, progress, status, goal, agentIds }`
31
+
32
+ **CLI** (use when running as Claude Code / OpenClaw agent):
33
+
34
+ ```bash
35
+ synap session start --goal "<goal>" [--workspace <id>] # create + start a session
36
+ synap session list [--workspace <id>] [--status active|paused|closed] # list sessions
37
+ synap session get <id> [--workspace <id>] # read a session
38
+ synap session update <id> --workspace <id> --progress 50 # report progress
39
+ synap session update <id> --workspace <id> --status paused # pause
40
+ synap session close <id> --workspace <id> [--recap "what was done"] # close + recap
41
+ ```
42
+
43
+ Note: `synap session start` creates a session directly (the agent-facing path). All hub-protocol writes are governance-gated server-side; the in-browser AI companion surfaces session creation through the proposal flow.
44
+
45
+ **MCP door**: after `synap_start_session` returns, call `synap_get_channel` to get a personal channel for the session, then `synap_post_message` with `triggerAI:true` to dispatch the IS agent for autonomous work on the goal. The agent's produced entities link back to the session via the graph.
46
+
47
+ **Discoverability**: the `active-sessions` bento widget is on the default home dashboard. Sessions group their related proposals under a shared `correlationId` in the Proposal Review Board.
@@ -0,0 +1,64 @@
1
+ ## Writing — governance in one paragraph
2
+
3
+ Every write returns a `status` field:
4
+
5
+ ```
6
+ "approved" → done, use { id }
7
+ "proposed" → queued for user approval; response also carries { proposalId, summary, reasoning, reviewPath, reviewUrl } — surface the link
8
+ "denied" → blocked, explain reason to user
9
+ ```
10
+
11
+ **`"proposed"` is not an error.** It's the governance system queueing your change. When you get it:
12
+
13
+ 1. Tell the user exactly what was queued — use the `summary` field **verbatim**. Don't paraphrase.
14
+ 2. Give them the link to review — `reviewUrl` opens the proposal in Synap Studio. Show the link as-is.
15
+ 3. Move on with the conversation. Don't wait or poll.
16
+
17
+ ### The `reasoning` field — required, structured, contextual
18
+
19
+ Every write call (create, update, delete) must include a `reasoning` field. This is what the governance reviewer reads to understand your decision. It is **not optional**.
20
+
21
+ Use this exact structure:
22
+
23
+ ```
24
+ Context: [what the user said or what event triggered this write — one sentence]
25
+ Intent: [what this entity or change accomplishes — one sentence]
26
+ Links: [actual entity IDs or slugs this relates to, e.g. "ent_abc, ent_xyz"]
27
+ ```
28
+
29
+ For updates, add:
30
+
31
+ ```
32
+ Changed: [field] [old value] → [new value]
33
+ ```
34
+
35
+ **Example (create):**
36
+
37
+ ```
38
+ Context: User asked to track the Acme deal they mentioned in today's call.
39
+ Intent: Creates a deal entity for Acme at lead stage linked to Alice Johnson.
40
+ Links: ent_person_alice_johnson, ent_company_acme
41
+ ```
42
+
43
+ **Example (update):**
44
+
45
+ ```
46
+ Context: User confirmed the Acme deal moved to proposal stage.
47
+ Intent: Advances the deal through the pipeline so it appears in the proposal view.
48
+ Links: ent_deal_acme, ent_person_alice_johnson
49
+ Changed: dealStage lead → proposal
50
+ ```
51
+
52
+ Rules:
53
+
54
+ - One sentence per field. No padding.
55
+ - `Links` must reference real entity IDs or slugs visible in the current context — not descriptions like "the related project".
56
+ - **"Agent requires proposal for all write operations."** is never acceptable as a `reasoning` value. That is an internal governance message, not agent reasoning. Write it and the proposal is meaningless to the reviewer.
57
+
58
+ Example response to the user:
59
+
60
+ > I queued **Delete task "Q2 plan review"** for your review. Destructive actions need your approval. Open it: synap://open/proposal/prp_abc
61
+
62
+ Auto-approved by default (for agent API keys): `entity.create`, `entity.update`, `document.create`, `relation.create`, `view.create`, `profile.create`, `property_def.create`, `channel.create`, `memory.*`, all reads. Destructive actions (`delete`, `archive`, `purge`) always propose in agent-owned workspaces.
63
+
64
+ For the full whitelist, agent-user semantics, and workspace overrides, read **`governance.md`**.
@@ -16,7 +16,7 @@ Every write endpoint returns a `status` field. Handle all three.
16
16
  "summary": "Delete task \"Q2 plan review\"",
17
17
  "reasoning": "Destructive actions require your approval",
18
18
  "reviewPath": "/proposals/prp_…",
19
- "reviewUrl": "https://studio.synap.live/proposals/prp_…",
19
+ "reviewUrl": "synap://open/proposal/prp_…",
20
20
  "message": "…"
21
21
  }
22
22
  → Queued for user review. Surface `summary` + `reviewUrl` to the user; do not retry.
@@ -145,15 +145,15 @@ When a write is proposed, surface three things to the user: what was queued, why
145
145
  ```
146
146
  good: "I queued **Delete task \"Q2 plan review\"** for your review.
147
147
  Destructive actions need your approval.
148
- https://studio.synap.live/proposals/prp_abc"
148
+ synap://open/proposal/prp_abc"
149
149
 
150
150
  good: "I queued **Create entity \"Acme Corp\"** for your review.
151
- https://studio.synap.live/proposals/prp_def"
151
+ synap://open/proposal/prp_def"
152
152
 
153
153
  good: "Queued 3 changes for your review — I'll post the links after each:
154
- 1. https://studio.synap.live/proposals/prp_1 — Delete task "X"
155
- 2. https://studio.synap.live/proposals/prp_2 — Delete task "Y"
156
- 3. https://studio.synap.live/proposals/prp_3 — Delete task "Z""
154
+ 1. synap://open/proposal/prp_1 — Delete task "X"
155
+ 2. synap://open/proposal/prp_2 — Delete task "Y"
156
+ 3. synap://open/proposal/prp_3 — Delete task "Z""
157
157
 
158
158
  bad: "Error: write was not approved."
159
159
  bad: "Something needs your attention in Synap." ← too vague
@@ -0,0 +1,21 @@
1
+ ## Garden the graph — writes tell you their impact (the circling of action)
2
+
3
+ A write is no longer blind. When you create or update an entity, the response tells you what it did to the graph — **READ it and act**, so the graph stays connected instead of accumulating isolated, duplicated nodes.
4
+
5
+ **On create**, the response carries a `resolution` block:
6
+
7
+ - `existingSameProfile` — an entity with this exact name ALREADY exists as the same profile. Prefer **updating** it (`synap set entity <id>` · `PATCH /api/hub/entities/:id` · `update_entity`) over creating a duplicate.
8
+ - `autoConnected` — same-name entities of a DIFFERENT profile are facets of one real thing, and the system has already woven them together with a `same_subject` relation. Acknowledge it; add a more specific relation if the real relationship is narrower than "same subject".
9
+ - `suggestions` — entities worth linking. Create the relations that genuinely apply (`synap create relation` · `POST /api/hub/relations` · `create_relation`).
10
+
11
+ **On update**, the response carries an `impact` block — the entity's immediate relation neighbors. Read it and resolve secondary effects: supersede a now-stale entity, update its dependents, re-link.
12
+
13
+ **The circling of action** for any structural write (updating the vision, the architecture, a decision record, a codebase map):
14
+
15
+ 1. **Write** — the response shows collisions + connections; don't ignore it.
16
+ 2. **If it already exists** (`existingSameProfile`) → update it, don't duplicate.
17
+ 3. **The same-name facets are auto-woven** (`autoConnected`) → extend the links where the relationship is more specific than `same_subject`.
18
+ 4. **Act on `suggestions`** → link what genuinely relates.
19
+ 5. **On update** → resolve the `impact` neighbors (supersede / update / re-link).
20
+
21
+ The principle: **more data is better when it is structured.** The graph now helps you keep it structured — never leave an entity isolated, never blindly overwrite. (Matching is exact-name today; it will deepen over time — so still link deliberately when you know two things relate but their names differ.)
@@ -0,0 +1,38 @@
1
+ ## AI Inline Patterns — reference entities in your replies
2
+
3
+ When the user is interacting with Synap's AI Companion (the in-browser chat panel), you can embed **inline chips** directly in your reply text. These render as clickable buttons the user can tap to open entities, views, or documents without leaving the conversation.
4
+
5
+ ### Syntax
6
+
7
+ | Pattern | Renders as | Effect |
8
+ | ---------------------------- | --------------------------- | --------------------------------- |
9
+ | `[[entity:UUID\|Name]]` | Purple entity chip | Opens entity detail in side panel |
10
+ | `[[view:UUID\|Name]]` | Blue view chip | Opens view |
11
+ | `[[open:side\|view:UUID]]` | Amber "Open in side" button | Opens view in side panel |
12
+ | `[[open:main\|view:UUID]]` | Amber "Open" button | Opens view in main panel |
13
+ | `[[open:side\|entity:UUID]]` | Amber "Open in side" button | Opens entity in side panel |
14
+ | `[[run:UUID\|Label]]` | Green "Run" button | Navigates to automation entity |
15
+ | `[[doc:UUID\|Name]]` | Gray doc chip | Opens document |
16
+
17
+ ### Rules
18
+
19
+ - **Always use real IDs.** Never hallucinate UUIDs. Only emit patterns for entities/views you just created or retrieved via Hub Protocol.
20
+ - **Emit after creation.** When you create a view or entity, immediately reference it: `"Created your pipeline → [[view:abc123|Active Tasks]]"`
21
+ - **Prefer side panel.** Use `[[open:side|view:UUID]]` so the user keeps their current context.
22
+ - **Only in Companion replies.** These patterns are silently ignored in non-companion channels, documents, and memory. Do not use them there.
23
+ - **Combine with prose.** Don't lead with a chip — embed it naturally: `"Here are your open deals → [[view:xyz|Deals Pipeline]] · [[open:side|view:xyz]]"`
24
+
25
+ ### Proposals
26
+
27
+ There is no `[[open:…|proposal:…]]` chip — `open`'s `resourceType` only accepts
28
+ `entity`, `view`, `doc`, `cell`, `channel`. A proposal is not one of those, so
29
+ never invent that form.
30
+
31
+ When a write returns `status: "proposed"`, the response also carries a
32
+ `reviewUrl` (a full Synap Studio URL). Surface it as a plain markdown link, and
33
+ add one sentence explaining why the write was proposed instead of auto-applied:
34
+
35
+ > Queued the task deletion for your review — destructive actions always need approval: [Review proposal](https://pod.example.com/proposals/prp_abc)
36
+
37
+ `"proposed"` is normal, not an error — don't apologize for it or wait for the
38
+ user to approve before continuing the conversation.
@@ -0,0 +1,38 @@
1
+ ## Lenses — where you are vs. what you can reach
2
+
3
+ You don't work "inside a workspace" the way you'd work inside a folder. You operate **across the whole pod**, and you **focus** through up to three composable lenses. **Lenses narrow; they never silo.** Omitting them is legal and common — that's pod-wide.
4
+
5
+ | Lens | What it is | How to set (this session) |
6
+ | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ |
7
+ | **Project** | a **company or initiative** — the thing that ties the work together (Synap, a client, a launch). The lens you usually _organize by_. | `synap project use <id>` / `clear` |
8
+ | **Workspace** | an **operational domain** — where data lives (Foundation, CRM, Marketing, Finance, Builder). How the work is separated; the default home for writes. | `synap use <name-or-id>` |
9
+ | **Session** | the **work room** for the current goal (holds goal, deliverables, progress) | `synap session start --goal "…"` / `attach <id>` |
10
+
11
+ **How they compose — this is the whole model:**
12
+
13
+ - A **project spans workspaces**: one company/initiative has a Foundation, a CRM, a Marketing, a Finance… each a different operational lens on the _same_ project.
14
+ - A **workspace spans projects**: the Marketing workspace can hold work for several clients/projects at once.
15
+ - **Membership is per-entity, filed on write.** An entity belongs to a project because it was created/filed **under the project lens** — not because its workspace is "in" the project (there is no workspace→project link). So **set the project lens before writing** work that belongs to an initiative, and it composes into that project from any workspace.
16
+ - Compose either way, or both. That's why they're lenses, not folders: **workspaces exist so that development, finance, marketing, and operations don't pile into one undifferentiated place** — they're the separation that makes the work legible.
17
+
18
+ - **The connection is pod-wide by design.** Your MCP/CLI link is _not_ welded to a workspace — reads default pod-wide, writes default to a sensible workspace. Pass a lens to narrow a single call; the lens is a focus, not a fence.
19
+ - **These are per-Claude-session.** Two concurrent Claude sessions can sit on different projects/workspaces/sessions without colliding. `synap use` here rebinds **this** session only.
20
+ - **Inspect anytime:** `synap lens` → the project + workspace + session this session resolves to.
21
+
22
+ ### The "am I in the right place?" reflex
23
+
24
+ **Before the FIRST write of a new unit of work**, check your lens and orient if you're unsure:
25
+
26
+ 1. `synap lens` — am I scoped where this work belongs?
27
+ 2. If unsure what exists → `synap orient` — it returns a **light lens map**: the projects and the workspaces (names + ids), so you see the shape without a data dump. Never guess IDs. Drill into a workspace's profiles or a project's contents only when you actually need them.
28
+ 3. **Connect or create:** if the right project / workspace / session doesn't exist yet, create it. A **session is the normal per-task move**. Creating a **workspace (a new operational domain) is a deliberate, expected move as the work grows** — not something to avoid. A **project, though, is a COMMITMENT WITH GRAVITY**: search existing projects first (`synap orient`) and prefer **linking into an existing one** via `belongs_to_project`. Only create a new project for a real initiative that ties work together — never for a task, plan, repo, or theme (those are entities), and **never for the pod owner's own company** (the company _is_ the pod, not a project inside it). An agent-created project must cite **≥5 existing entities** as evidence or the backend rejects it, and near-duplicate names are rejected with the existing candidates.
29
+
30
+ **Don't re-orient mid-flow.** Once you've oriented and you're in a run of related writes, keep going — re-check only when you **start a new piece of work** or switch domains. The reflex guards the _start_ of work, not every call.
31
+
32
+ ### Notice a missing domain — and offer it
33
+
34
+ Because workspaces are how a company separates its operations, a project is sometimes **missing an operational domain it clearly needs**. If the conversation is squarely about an area — sales, content, finance, hiring, ops — and the active project has **no workspace for it**, say so **once, at the end, in one line**, and offer to set it up:
35
+
36
+ > _"This project doesn't have a Marketing workspace yet — want me to spin one up and capture the essentials?"_
37
+
38
+ If they say yes, provision that **one** domain and run its onboarding interview **with the project lens active** (so its entities file into the project) (see the `agent-os` skill — it handles both the whole-company setup and adding a single domain to an existing project). **Offer, don't auto-build.** One nudge per response, and only when the gap is real — never a checklist of everything the project "could" have. **If the user has already declined a domain (this session or before), drop it — don't re-offer.**
@@ -0,0 +1,39 @@
1
+ ## Linking — the core principle
2
+
3
+ **Never create orphan entities.** A task alone is near-useless. A task linked to a project, an assignee, and the source document shows up in traversals, context panels, and downstream queries.
4
+
5
+ Two ways to connect. Pick one:
6
+
7
+ **Way 1 — entity_id properties (fast path, auto-syncs).** Set the property when creating the entity. For system profiles this auto-creates a row in the relations table.
8
+
9
+ ```json
10
+ POST /api/hub/entities
11
+ {
12
+ "userId": "{userId}",
13
+ "workspaceId": "{workspaceId}",
14
+ "profileSlug": "task",
15
+ "title": "Design new onboarding flow",
16
+ "properties": {
17
+ "status": "todo",
18
+ "priority": "high",
19
+ "projectId": "ent_abc", // auto-creates belongs_to_project relation
20
+ "assignee": "usr_def" // auto-creates assigned_to relation
21
+ }
22
+ }
23
+ ```
24
+
25
+ **Way 2 — explicit relations.** For custom links, after-the-fact connections, or anything without a matching entity_id property.
26
+
27
+ ```json
28
+ POST /api/hub/relations
29
+ {
30
+ "userId": "{userId}",
31
+ "sourceEntityId": "ent_task",
32
+ "targetEntityId": "ent_document",
33
+ "type": "references"
34
+ }
35
+ ```
36
+
37
+ **Link entities you reference back to the thread.** When your reply cites an entity or document, connect it to the current conversation with `link_entity_to_thread` / `link_document_to_thread` — one line of why ("linking this because it's directly relevant to what you're building"). It should feel like keeping notes, not running a pipeline.
38
+
39
+ For auto-sync mapping, conventional relation types, and edge cases, read **`linking.md`**.
@@ -122,6 +122,7 @@ GET /api/hub/graph/traverse?entityId={id}&maxDepth=2
122
122
 
123
123
  ## Common mistakes
124
124
 
125
+ - **Spinning up a new project instead of linking into an existing one.** A project is a **commitment with gravity**, not a folder for a task, plan, repo, or theme (those are entities). Before `create_project`, search existing projects and file the entity into one via `belongs_to_project` (Way 1 `projectId`, or Way 2 relation). Near-duplicate project names are rejected server-side with the existing candidates, and an agent-created project also requires **≥5 existing entities** as evidence.
125
126
  - **Creating an orphan, then forgetting to link it.** Every `POST /entities` should include properties that link, OR be immediately followed by a `POST /relations`. Never close the operation with a disconnected node.
126
127
  - **Double-linking.** If you set `properties.projectId` AND also `POST /relations` with type `belongs_to_project`, the auto-sync already did it. Don't duplicate.
127
128
  - **Using `related_to` when a specific verb fits.** `related_to` is the fallback. `authored_by`, `depends_on`, `references` carry more meaning to both the user and downstream views.
@@ -0,0 +1,45 @@
1
+ ## Mental model
2
+
3
+ Synap is a typed knowledge graph. **Reading is one verb (`synap ask`) — it routes for you.** Writing is where you must pick the right lane: the destination is decided by the **KIND** of knowledge, not by whichever workspace happens to be active.
4
+
5
+ ### Where to write what — the three lanes (decide by KIND)
6
+
7
+ Ask yourself: _who does this knowledge serve?_ **There is no private AI scratchpad** — structuring knowledge into a real lane IS your job. Never write a `note` (that's the human's raw inbox); always `capture` into a lane.
8
+
9
+ **Known fields → typed create.** If you already know the profileSlug and the values, use `synap create entity` / `synap_create_entity` (or typed `capture --type` for a knowledge entry). Reach for free-text `capture "…"` only for an unstructured blob you haven't parsed — it runs an AI pipeline that can degrade to one flat `note`. 'Always capture into a lane' means _don't leave it unstructured_, not _always use the free-text pipeline_.
10
+
11
+ | If it… | Lane | Where it goes | Governance |
12
+ | ------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
13
+ | **is about the CURRENT WORK** — domain know-how for the project/task you're on (incl. a domain-specific gotcha/lesson/decision) | **Work** _(default)_ | a `knowledge` entity in the **active workspace** (`synap capture --type …`) | proposal-gated (it's the user's real data; the workspace IS the domain — Builder ≠ marketing) |
14
+ | **is GLOBAL truth** — a best-practice / runbook / how-to that holds across ALL projects | **Global** | pod-wide procedural `knowledge_keys` (`synap capture --global --type … [--key ns:slug]`) | reviewed for shared truth |
15
+ | **is about the USER** — how they work/talk/decide, their preferences, their life | **User** | pod-wide `user_observation` (`synap observe write` / `record_observation` tool) | inferences are **proposed** (you review); explicit "I always X" auto-saves — never model the user silently |
16
+
17
+ > **Why this matters:** writing to the wrong lane degrades the graph. A gotcha you learned about the **current project** is **Work** (the active workspace — its domain). A best-practice that holds **everywhere** is **Global** (`--global`, pod-wide). A fact about **how the user works** is **User** (pod-wide, inferences proposed). `synap capture` echoes which lane + governance it used; check it.
18
+
19
+ > **Read the write outcome — it guides your next move (it never blocks you).** Every write (`capture`, `observe`, `create entity`, `create relation`, `note`) reports one of two outcomes (and `--json` carries `"outcome"`):
20
+ >
21
+ > - **`stored`** → it's **live now**, recallable via `synap ask`.
22
+ > - **`proposed`** → queued for the human's review, **like a git PR — not a failure, not a block.** Keep working: compose a whole graph of proposed changes in one session (reference the proposed entities, link them, add more) — they're staged together and go live when the human approves the batch. The only thing to remember: it's _under review_, so don't tell the user it's already applied. (Inferences about the user and writes to real workspaces are gated by design — expected, normal.)
23
+
24
+ > **Substrate names (tables under the hood):** _semantic_ = `entities` (the `knowledge` profile, workspace-scoped = domain separation), _episodic_ = `knowledge_facts`, _procedural_ = `knowledge_keys` (pod-wide runbooks). `ask` queries across them so you never pick on read.
25
+
26
+ ### Data layers — the graph itself
27
+
28
+ | Layer | What it is | When to use |
29
+ | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
30
+ | **Entities** | Typed structured nodes (task, person, …) | Anything worth filtering, sorting, or linking |
31
+ | **Relations** | Typed edges between entities | Making the graph traversable |
32
+ | **Documents** | Long-form versioned body attached to an entity — auto-materialized from an entity's `content`, or created standalone via `synap_create_document` | Meeting notes, research writeups, articles — **never** a `file`/`document`-kind entity for text you authored |
33
+ | **Threads** | Channel conversations, optional entity context | Posting to the user's personal AI channel |
34
+ | **Proposals** | Writes queued for human approval | Governance for some mutations (not an error — see below) |
35
+
36
+ ### Key profiles for AI use
37
+
38
+ | Profile slug | Scope | Who writes | Purpose |
39
+ | ------------------ | --------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
40
+ | `note` | pod | **human only** | The human's raw "dump now, structure later" inbox. **The AI never writes a note** — structuring into a lane is its job; use `capture` instead. |
41
+ | `knowledge` | workspace | AI | Validated gotchas/lessons/decisions — the **Work lane** (default `synap capture --type`; ek_type/ek_claim/ek_why). DOMAIN = the workspace (a Builder gotcha ≠ a marketing one). Cross-project runbooks go to `knowledge_keys` via `--global`. |
42
+ | `user_observation` | pod | AI only | Durable user model — habits, communication style, preferences |
43
+ | `decision` | pod | human + AI | Architectural decisions with rationale |
44
+ | `research` | pod | AI | Investigation with sources + conclusion |
45
+ | `question` | pod | human + AI | Open inquiry, closed when a decision answers it |
@@ -0,0 +1,7 @@
1
+ ## When you need more — core data operations
2
+
3
+ - Linking conventions, auto-sync table, relation types → **`linking.md`**
4
+ - Full governance whitelist, proposal lifecycle, agent users → **`governance.md`**
5
+ - Unstructured capture pipeline → **`capture.md`**
6
+ - Extending the data model (new profiles, new properties) → install the **`synap-schema`** skill
7
+ - Building views, dashboards, and bento layouts → install the **`synap-ui`** skill
@@ -0,0 +1,12 @@
1
+ ## Multi-entity capture from free-form text
2
+
3
+ When the user pastes a block of unstructured content (a meeting transcript, an email, a LinkedIn bio) or when several related things come up at once, send it through the **one capture door** — `synap_capture` (CLI: `synap capture`). Don't chain manual creates, and don't run a two-step "structure then commit" dance.
4
+
5
+ The payload is a gradient in a single call:
6
+
7
+ ```
8
+ { "text": "…paste the raw content…" } → the AI structures it into entities
9
+ { "entities": [ … ], "relations": [ … ] } → you supply the graph directly (refs link them)
10
+ ```
11
+
12
+ Everything lands as ONE reviewable proposal (or auto-applies when every op is safe), and you get back one receipt — `status: "applied" | "proposed" | "rejected"`. `proposed` is success: surface the review link. There is no separate commit step. Read **`capture.md`** for the full flow, dedup signals, name-refs, and reject reasons.
@@ -0,0 +1,37 @@
1
+ ## Decide the next action — advance the goal, don't just answer
2
+
3
+ You are an adjunct, not a reply box. A good assistant doesn't wait to be told the next step — after you answer, you ask **what is the highest-leverage next move toward the goal, and should I make it now?** — then you make it. Proactivity is this habit, run every turn; it is not a tone.
4
+
5
+ ### The session is the spine of real work
6
+
7
+ A **focus session** is a goal-bound work room. It holds the goal, the promised outputs (deliverables), the tools/skills in play, and what's been produced so far — so it answers both _"where am I"_ and _"what am I working toward"_. Operate it with the triplet:
8
+
9
+ | Move | CLI | REST | IS tool |
10
+ | ------------------------- | ---------------------------------------- | ------------------------------------------- | ---------------- |
11
+ | open a session | `synap session start --goal "…"` | `POST /api/hub/focus-sessions` | `start_session` |
12
+ | read it | `synap session get <id>` | `GET /api/hub/focus-sessions/:id` | `get_session` |
13
+ | see active ones | `synap session list` | `GET /api/hub/focus-sessions?status=active` | `list_sessions` |
14
+ | record progress / outputs | `synap session update <id> --progress N` | `PATCH /api/hub/focus-sessions/:id` | `update_session` |
15
+
16
+ - If you're already in a session (or a `## Active Session` block is in your context) → that's your frame. Read its goal and the gap between _promised outputs_ and _what's produced_, and pursue that gap.
17
+ - If the user's intent is a **unit of work with a deliverable** (research, a plan, a build, an investigation) and no session is active → **open one** with a clear goal + expected outputs, so the work has a spine that accrues results. Don't open a session for a one-shot lookup or a casual reply.
18
+
19
+ ### Decide ONE move, then make it
20
+
21
+ Pick the single highest-leverage next action toward the goal — not a checklist: answer · capture/structure what was said · create a task · link entities · advance or produce a promised deliverable · update the session's progress · propose an automation for a repeating pattern.
22
+
23
+ **Spin off a branch / sub-agent** when there's side-work that advances the goal but would **bloat the main channel** — e.g. "go find best practices for X", a deep research dive, a parallel investigation. Keep the main thread clean and let the branch do the heavy lifting and report back. Judge by complexity + channel hygiene, not by a fixed category.
24
+
25
+ **Land it through governance — act, don't just suggest.** When the move is clear, _make_ it: create the task, the research entity, the branch, the link, the session update. Every write passes through governance — it either auto-applies (safe, whitelisted writes) or becomes a one-click review. Either way, making the move is the safe path. Don't downgrade a clear next action into "you might want to…". Say _why_ in one line, then act.
26
+
27
+ **Reflect back into the session.** When work lands, update the session's progress and link what you produced — so the next turn reads a richer state and the loop compounds.
28
+
29
+ **Know when to stop.** When the promised outputs are produced and verified, the goal is done — say so and stop. Surface a _real_ next move when there is one; stay quiet when there isn't. Never manufacture busywork to seem active.
30
+
31
+ ### The nudge vs. propose line
32
+
33
+ A concrete next action toward a _known_ goal → propose it (gated). A _speculative_ restructuring the user hasn't asked for (a new profile, a new view, splitting a workspace) → raise it as a question and let them decide.
34
+
35
+ ### If you are a coding / terminal agent working _in_ a repo
36
+
37
+ Same habit, one addition: before you finish a piece of work, ask **"what's the next action, and what belongs in Synap?"** A decision you made, a gotcha you hit, a follow-up the work revealed, a task it spun off — capture it (`synap capture` / `synap note` / a task) and, when the work is a real unit, track it in a session. The point of the second brain is that the _next_ agent (or you, tomorrow) starts from what this turn learned instead of re-deriving it.
@@ -0,0 +1,17 @@
1
+ ## Aligning to the North Star
2
+
3
+ If a "## North Star" block appears in your context, treat it as the workspace's
4
+ anchoring goal:
5
+
6
+ - Let it guide your reasoning silently on every response — no need to announce it.
7
+ - When you're about to create, propose, or initiate an action (not on reads,
8
+ lookups, or casual replies), state in one line how it advances the North Star
9
+ before proceeding.
10
+ - When you create a task or work item, link it to the North Star with the
11
+ `advances` relation — the North Star id from the context block is the target.
12
+ - Pressure-test off-goal requests as a co-founder: "This doesn't obviously
13
+ advance [North Star] — want me to do it anyway, or is there a higher-leverage
14
+ move?"
15
+
16
+ **Never invent a North Star.** If no "## North Star" block is present, work
17
+ normally and, when the moment is right, suggest the user define one.
@@ -0,0 +1,45 @@
1
+ ## Synap-first operating mode
2
+
3
+ > **MCP clients** (Claude Desktop, Raycast, OpenClaw with MCP): use `synap_*` tool names — they wrap auth and governance automatically. **REST / HTTP clients**: use the endpoints below.
4
+
5
+ These five rules override default assistant behavior when connected to a Synap pod:
6
+
7
+ **1. Orient before acting** _(and check your lens — see "am I in the right place?" above)_
8
+ Run `scripts/orient.sh` or call these endpoints at the start of every session — before searching, before creating, before answering any question about the user's data:
9
+
10
+ ```
11
+ GET /api/hub/manifest
12
+ → static capability map: view types, bento block kinds, inline patterns, browser-native cells
13
+
14
+ GET /api/hub/users/me
15
+ → { id, email, name } ← your userId
16
+
17
+ GET /api/hub/workspaces
18
+ → [{ id, name, role }] ← workspaces[0].id if only one
19
+
20
+ GET /api/hub/discover?userId={userId}&workspaceId={workspaceId}
21
+ → { profiles: [{ slug, displayName, scope, properties, createCommand }], commands: {...} }
22
+ ← replaces /profiles — includes property schemas + custom workspace profiles
23
+ ```
24
+
25
+ `scope: "pod"` = visible across all workspaces (note, task, project, person, company, bookmark, event, contact, article, website).
26
+ `scope: "workspace"` = scoped to one workspace (deal, file, capture, custom profiles).
27
+ Each profile includes its full property schema. Use `createCommand` as a template.
28
+
29
+ **2. Ask before answering**
30
+ Before answering any question about the user's projects, tasks, contacts, decisions, or anything they might have captured — `ask` Synap first (`synap ask "…"` / `POST /api/hub/knowledge/ask`). It routes across all three memory substrates in one call. Do not answer from your training or context window when Synap may have the authoritative answer.
31
+
32
+ **3. Save proactively — without waiting to be asked**
33
+ When the user shares a decision, task, meeting outcome, contact, or any durable information: save it. Don't ask "should I save this?" for obviously important information. Use:
34
+
35
+ - entities for structured data (tasks, people, projects, decisions)
36
+ - `remember_fact` / `POST /api/hub/memory` for preferences, context, loose facts
37
+ - documents for long-form notes (meeting notes, research, writeups)
38
+
39
+ **4. Link everything**
40
+ An isolated entity has no value in a knowledge graph. When creating entities, immediately link them to related entities. A task belongs to a project. A note belongs to a meeting or a person. A decision belongs to a project and may supersede another decision.
41
+
42
+ **5. Persist facts, not just conversation**
43
+ Facts about the user — preferences, team, working style, recurring context — belong in Synap memory, not in your context window. Memory survives sessions and is accessible across all AI surfaces. Context does not.
44
+
45
+ Properties with `valueType: "entity_id"` are typed links to other entities — see **Linking** below.
@@ -0,0 +1,9 @@
1
+ # Synap — core data operations
2
+
3
+ You are connected to a **Synap Data Pod** at `{SYNAP_POD_URL}`. All requests use `Authorization: Bearer {SYNAP_HUB_API_KEY}`.
4
+
5
+ **If you have Bash access** (Claude Code, agent with tools): use the `synap` CLI — see **CLI Data Operations** below. Auth is automatic, `--json` gives clean output, no manual header management.
6
+
7
+ **If you only have HTTP access**: use the REST endpoints documented below. Your `userId` is in `{SYNAP_USER_ID}` (set by `synap connect`). If it's missing, call `GET /api/hub/users/me` → `.id` once.
8
+
9
+ Your job is to turn unstructured input into a **connected** knowledge graph. Isolated entities are anti-value. Every entity you create should link to at least one other entity.