@polderlabs/bizar 3.23.1 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (361) hide show
  1. package/README.md +83 -16
  2. package/bizar-dash/.bizar/activity.log +3 -0
  3. package/bizar-dash/.bizar/graph/.graphify_analysis.json +1540 -0
  4. package/bizar-dash/.bizar/graph/.graphify_labels.json +1 -0
  5. package/bizar-dash/.bizar/graph/GRAPH_REPORT.md +404 -0
  6. package/bizar-dash/.bizar/graph/cache/ast/v0.8.46/0661b816358db84dfdb7f10443db8a61152fd20b3fee950caf8fbf32920a1790.json +1 -0
  7. package/bizar-dash/.bizar/graph/cache/ast/v0.8.46/16da06d774142a6e5d74829ad982531286a6193ef798de8f593db029e123ec32.json +1 -0
  8. package/bizar-dash/.bizar/graph/cache/ast/v0.8.46/27e5697c01254c69c64c5a33896669073b40afb5ba88375102ae77fa5404136d.json +1 -0
  9. package/bizar-dash/.bizar/graph/cache/ast/v0.8.46/532997898027254aa4c0932243dc71d2f55888181232b65974961934997dc85b.json +1 -0
  10. package/bizar-dash/.bizar/graph/cache/ast/v0.8.46/84e3451a64c7f99f0cd6a88b0748d7426780486f53ab4935b7476b28c08f8293.json +1 -0
  11. package/bizar-dash/.bizar/graph/cache/ast/v0.8.46/88e5ea5f3e78fa69353fe9e6a8d1a05391d54605e25600cb125531eb5a6432ff.json +1 -0
  12. package/bizar-dash/.bizar/graph/cache/stat-index.json +1 -0
  13. package/bizar-dash/.bizar/graph/graph.html +307 -0
  14. package/bizar-dash/.bizar/graph/graph.json +40267 -0
  15. package/bizar-dash/.bizar/graph/manifest.json +762 -0
  16. package/bizar-dash/.graphifyignore +40 -0
  17. package/bizar-dash/.obsidian/README.md +14 -0
  18. package/bizar-dash/.obsidian/daily/2026-06-25.md +9 -0
  19. package/bizar-dash/.obsidian/vault.json +7 -0
  20. package/bizar-dash/.od-skills/web-prototype-e1429c1737/SKILL.md +103 -0
  21. package/bizar-dash/.od-skills/web-prototype-e1429c1737/assets/template.html +338 -0
  22. package/bizar-dash/.od-skills/web-prototype-e1429c1737/example.html +81 -0
  23. package/bizar-dash/.od-skills/web-prototype-e1429c1737/open-design.json +172 -0
  24. package/bizar-dash/.od-skills/web-prototype-e1429c1737/references/checklist.md +44 -0
  25. package/bizar-dash/.od-skills/web-prototype-e1429c1737/references/layouts.md +247 -0
  26. package/bizar-dash/CHANGELOG.md +474 -0
  27. package/bizar-dash/DESIGN.md +136 -0
  28. package/bizar-dash/dist/assets/main-B3RgW6FS.js +331 -0
  29. package/bizar-dash/dist/assets/main-B3RgW6FS.js.map +1 -0
  30. package/bizar-dash/dist/assets/main-DlJ8wgLR.css +1 -0
  31. package/bizar-dash/dist/assets/mobile-CsZQAswA.css +1 -0
  32. package/bizar-dash/dist/assets/mobile-DbxIw8BG.js +2 -0
  33. package/bizar-dash/dist/assets/mobile-DbxIw8BG.js.map +1 -0
  34. package/bizar-dash/dist/assets/mobile-Dvq2d53Y.js +354 -0
  35. package/bizar-dash/dist/assets/mobile-Dvq2d53Y.js.map +1 -0
  36. package/bizar-dash/dist/index.html +40 -0
  37. package/bizar-dash/dist/mobile.html +22 -0
  38. package/bizar-dash/plans/debug-plan/comments.json +1 -0
  39. package/bizar-dash/plans/debug-plan/meta.json +10 -0
  40. package/bizar-dash/plans/debug-plan/plan.json +174 -0
  41. package/bizar-dash/scripts/smoke-bg-retry.mjs +246 -0
  42. package/bizar-dash/src/cli/dashboard-ports.mjs +488 -0
  43. package/bizar-dash/src/cli.mjs +522 -0
  44. package/bizar-dash/src/server/activity-log.mjs +174 -0
  45. package/bizar-dash/src/server/agents-store.mjs +465 -0
  46. package/bizar-dash/src/server/api.mjs +138 -0
  47. package/bizar-dash/src/server/artifact-template.html +810 -0
  48. package/bizar-dash/src/server/artifacts-store.mjs +733 -0
  49. package/bizar-dash/src/server/auth.mjs +381 -0
  50. package/bizar-dash/src/server/background-store.mjs +447 -0
  51. package/bizar-dash/src/server/bg-poller.mjs +305 -0
  52. package/bizar-dash/src/server/bg-retry.mjs +574 -0
  53. package/bizar-dash/src/server/browser.mjs +40 -0
  54. package/bizar-dash/src/server/diagnostics-store.mjs +148 -0
  55. package/bizar-dash/src/server/dialog-poller.mjs +105 -0
  56. package/bizar-dash/src/server/dialog-store.mjs +177 -0
  57. package/bizar-dash/src/server/glyphs/mdx-compiler.mjs +583 -0
  58. package/bizar-dash/src/server/lib/path-safe.mjs +283 -0
  59. package/bizar-dash/src/server/memory-git.mjs +329 -0
  60. package/bizar-dash/src/server/memory-lightrag.mjs +767 -0
  61. package/bizar-dash/src/server/memory-schema.mjs +145 -0
  62. package/bizar-dash/src/server/memory-secrets.mjs +84 -0
  63. package/bizar-dash/src/server/memory-store.mjs +471 -0
  64. package/bizar-dash/src/server/mod-security.mjs +398 -0
  65. package/bizar-dash/src/server/mods-loader.mjs +1067 -0
  66. package/bizar-dash/src/server/notifications-store.mjs +243 -0
  67. package/bizar-dash/src/server/obsidian-store.mjs +318 -0
  68. package/bizar-dash/src/server/opencode-runner.mjs +279 -0
  69. package/bizar-dash/src/server/pair-store.mjs +138 -0
  70. package/bizar-dash/src/server/projects-store.mjs +364 -0
  71. package/bizar-dash/src/server/providers-store.mjs +789 -0
  72. package/bizar-dash/src/server/routes/_shared.mjs +415 -0
  73. package/bizar-dash/src/server/routes/activity.mjs +110 -0
  74. package/bizar-dash/src/server/routes/agents.mjs +134 -0
  75. package/bizar-dash/src/server/routes/artifacts.mjs +279 -0
  76. package/bizar-dash/src/server/routes/auth.mjs +69 -0
  77. package/bizar-dash/src/server/routes/background.mjs +165 -0
  78. package/bizar-dash/src/server/routes/chat.mjs +485 -0
  79. package/bizar-dash/src/server/routes/config.mjs +129 -0
  80. package/bizar-dash/src/server/routes/diagnostics.mjs +50 -0
  81. package/bizar-dash/src/server/routes/dialogs.mjs +86 -0
  82. package/bizar-dash/src/server/routes/fs.mjs +429 -0
  83. package/bizar-dash/src/server/routes/history.mjs +78 -0
  84. package/bizar-dash/src/server/routes/memory.mjs +658 -0
  85. package/bizar-dash/src/server/routes/misc.mjs +89 -0
  86. package/bizar-dash/src/server/routes/mods.mjs +359 -0
  87. package/bizar-dash/src/server/routes/notifications.mjs +54 -0
  88. package/bizar-dash/src/server/routes/obsidian.mjs +239 -0
  89. package/bizar-dash/src/server/routes/opencode-sessions.mjs +55 -0
  90. package/bizar-dash/src/server/routes/overview.mjs +91 -0
  91. package/bizar-dash/src/server/routes/pair.mjs +67 -0
  92. package/bizar-dash/src/server/routes/projects.mjs +175 -0
  93. package/bizar-dash/src/server/routes/providers.mjs +47 -0
  94. package/bizar-dash/src/server/routes/schedules.mjs +104 -0
  95. package/bizar-dash/src/server/routes/settings.mjs +51 -0
  96. package/bizar-dash/src/server/routes/skills.mjs +76 -0
  97. package/bizar-dash/src/server/routes/tasks.mjs +468 -0
  98. package/bizar-dash/src/server/routes/themes.mjs +51 -0
  99. package/bizar-dash/src/server/routes-v2/auth.mjs +59 -0
  100. package/bizar-dash/src/server/routes-v2/events.mjs +107 -0
  101. package/bizar-dash/src/server/routes-v2/health.mjs +21 -0
  102. package/bizar-dash/src/server/routes-v2/index.mjs +90 -0
  103. package/bizar-dash/src/server/routes-v2/sessions.mjs +111 -0
  104. package/bizar-dash/src/server/schedules-runner.mjs +369 -0
  105. package/bizar-dash/src/server/schedules-store.mjs +268 -0
  106. package/bizar-dash/src/server/search-store.mjs +220 -0
  107. package/bizar-dash/src/server/serve-info.mjs +684 -0
  108. package/bizar-dash/src/server/server.mjs +796 -0
  109. package/bizar-dash/src/server/settings-store.mjs +45 -0
  110. package/bizar-dash/src/server/skills-store.mjs +300 -0
  111. package/bizar-dash/src/server/state.mjs +437 -0
  112. package/bizar-dash/src/server/tailscale-store.mjs +113 -0
  113. package/bizar-dash/src/server/task-delegator.mjs +824 -0
  114. package/bizar-dash/src/server/tasks-store.mjs +508 -0
  115. package/bizar-dash/src/server/tui.mjs +923 -0
  116. package/bizar-dash/src/server/update-store.mjs +168 -0
  117. package/bizar-dash/src/server/v2-auth-file.mjs +99 -0
  118. package/bizar-dash/src/server/v2-event-bus.mjs +128 -0
  119. package/bizar-dash/src/server/watcher.mjs +81 -0
  120. package/bizar-dash/src/server/yaml.mjs +238 -0
  121. package/bizar-dash/src/web/App.tsx +718 -0
  122. package/bizar-dash/src/web/MobileApp.tsx +408 -0
  123. package/bizar-dash/src/web/components/ArtifactCreateDialog.tsx +95 -0
  124. package/bizar-dash/src/web/components/ArtifactListDialog.tsx +55 -0
  125. package/bizar-dash/src/web/components/ArtifactViewer.tsx +143 -0
  126. package/bizar-dash/src/web/components/AuditDialog.tsx +79 -0
  127. package/bizar-dash/src/web/components/BgStatusBadge.tsx +32 -0
  128. package/bizar-dash/src/web/components/Button.tsx +56 -0
  129. package/bizar-dash/src/web/components/CanvasContextMenu.tsx +68 -0
  130. package/bizar-dash/src/web/components/Card.tsx +40 -0
  131. package/bizar-dash/src/web/components/CollapsibleSection.tsx +72 -0
  132. package/bizar-dash/src/web/components/CommandDialog.tsx +66 -0
  133. package/bizar-dash/src/web/components/EmptyState.tsx +30 -0
  134. package/bizar-dash/src/web/components/FileBrowser.tsx +633 -0
  135. package/bizar-dash/src/web/components/HelpDialog.tsx +55 -0
  136. package/bizar-dash/src/web/components/KillConfirmDialog.tsx +88 -0
  137. package/bizar-dash/src/web/components/Modal.tsx +215 -0
  138. package/bizar-dash/src/web/components/Notifications.tsx +241 -0
  139. package/bizar-dash/src/web/components/SearchModal.tsx +224 -0
  140. package/bizar-dash/src/web/components/Sidebar.tsx +66 -0
  141. package/bizar-dash/src/web/components/Spinner.tsx +19 -0
  142. package/bizar-dash/src/web/components/StatusBadge.tsx +25 -0
  143. package/bizar-dash/src/web/components/Tag.tsx +28 -0
  144. package/bizar-dash/src/web/components/Toast.tsx +150 -0
  145. package/bizar-dash/src/web/components/Topbar.tsx +368 -0
  146. package/bizar-dash/src/web/components/VisualPlanDialog.tsx +58 -0
  147. package/bizar-dash/src/web/components/chat/AgentChip.tsx +68 -0
  148. package/bizar-dash/src/web/components/chat/ChatBubble.tsx +60 -0
  149. package/bizar-dash/src/web/components/chat/ChatThread.tsx +88 -0
  150. package/bizar-dash/src/web/components/chat/ChatTopBar.tsx +50 -0
  151. package/bizar-dash/src/web/components/chat/Composer.tsx +164 -0
  152. package/bizar-dash/src/web/components/chat/ConfirmModal.tsx +54 -0
  153. package/bizar-dash/src/web/components/chat/EmptyState.tsx +21 -0
  154. package/bizar-dash/src/web/components/chat/FirstRunGreeting.tsx +18 -0
  155. package/bizar-dash/src/web/components/chat/FloatingComposer.tsx +32 -0
  156. package/bizar-dash/src/web/components/chat/InfoPanel.tsx +119 -0
  157. package/bizar-dash/src/web/components/chat/LoadingSkeleton.tsx +19 -0
  158. package/bizar-dash/src/web/components/chat/MessageBubble.tsx +60 -0
  159. package/bizar-dash/src/web/components/chat/SessionList.tsx +153 -0
  160. package/bizar-dash/src/web/components/chat/StreamingIndicator.tsx +9 -0
  161. package/bizar-dash/src/web/components/chat/SuggestionCards.tsx +55 -0
  162. package/bizar-dash/src/web/components/chat/WelcomeScreen.tsx +36 -0
  163. package/bizar-dash/src/web/components/chat/index.ts +20 -0
  164. package/bizar-dash/src/web/components/chat/useAutoGrowTextarea.ts +18 -0
  165. package/bizar-dash/src/web/components/chat/useChat.ts +219 -0
  166. package/bizar-dash/src/web/components/chat/useSlashCommands.ts +47 -0
  167. package/bizar-dash/src/web/index.html +37 -0
  168. package/bizar-dash/src/web/lib/api.ts +193 -0
  169. package/bizar-dash/src/web/lib/markdown.tsx +59 -0
  170. package/bizar-dash/src/web/lib/types.ts +668 -0
  171. package/bizar-dash/src/web/lib/utils.ts +114 -0
  172. package/bizar-dash/src/web/lib/ws.ts +176 -0
  173. package/bizar-dash/src/web/main.tsx +34 -0
  174. package/bizar-dash/src/web/mobile/MobileApp.tsx +278 -0
  175. package/bizar-dash/src/web/mobile/MobileBottomNav.tsx +38 -0
  176. package/bizar-dash/src/web/mobile/MobileTopbar.tsx +115 -0
  177. package/bizar-dash/src/web/mobile/components/MobileBottomSheet.tsx +182 -0
  178. package/bizar-dash/src/web/mobile/components/MobileListItem.tsx +64 -0
  179. package/bizar-dash/src/web/mobile/components/MobileModal.tsx +123 -0
  180. package/bizar-dash/src/web/mobile/views/MobileActivity.tsx +273 -0
  181. package/bizar-dash/src/web/mobile/views/MobileAgents.tsx +374 -0
  182. package/bizar-dash/src/web/mobile/views/MobileArtifactCanvas.tsx +439 -0
  183. package/bizar-dash/src/web/mobile/views/MobileArtifacts.tsx +143 -0
  184. package/bizar-dash/src/web/mobile/views/MobileChat.tsx +180 -0
  185. package/bizar-dash/src/web/mobile/views/MobileConfig.tsx +175 -0
  186. package/bizar-dash/src/web/mobile/views/MobileHistory.tsx +191 -0
  187. package/bizar-dash/src/web/mobile/views/MobileMods.tsx +149 -0
  188. package/bizar-dash/src/web/mobile/views/MobileMore.tsx +121 -0
  189. package/bizar-dash/src/web/mobile/views/MobileNotifications.tsx +137 -0
  190. package/bizar-dash/src/web/mobile/views/MobilePlans.tsx +26 -0
  191. package/bizar-dash/src/web/mobile/views/MobileSchedules.tsx +685 -0
  192. package/bizar-dash/src/web/mobile/views/MobileSearchModal.tsx +172 -0
  193. package/bizar-dash/src/web/mobile/views/MobileSettings.tsx +388 -0
  194. package/bizar-dash/src/web/mobile/views/MobileSkills.tsx +153 -0
  195. package/bizar-dash/src/web/mobile/views/MobileTasks.tsx +564 -0
  196. package/bizar-dash/src/web/mobile.html +20 -0
  197. package/bizar-dash/src/web/mobile.tsx +13 -0
  198. package/bizar-dash/src/web/styles/chat.css +198 -0
  199. package/bizar-dash/src/web/styles/glyphs.css +960 -0
  200. package/bizar-dash/src/web/styles/main.css +8855 -0
  201. package/bizar-dash/src/web/styles/mobile-chat.css +5 -0
  202. package/bizar-dash/src/web/styles/mobile.css +1960 -0
  203. package/bizar-dash/src/web/views/Activity.tsx +1203 -0
  204. package/bizar-dash/src/web/views/Agents.tsx +701 -0
  205. package/bizar-dash/src/web/views/Artifacts.tsx +1480 -0
  206. package/bizar-dash/src/web/views/BackgroundAgents.tsx +450 -0
  207. package/bizar-dash/src/web/views/Chat.tsx +190 -0
  208. package/bizar-dash/src/web/views/Config.tsx +2063 -0
  209. package/bizar-dash/src/web/views/History.tsx +335 -0
  210. package/bizar-dash/src/web/views/ModView.tsx +207 -0
  211. package/bizar-dash/src/web/views/Mods.tsx +693 -0
  212. package/bizar-dash/src/web/views/Overview.tsx +812 -0
  213. package/bizar-dash/src/web/views/Providers.tsx +302 -0
  214. package/bizar-dash/src/web/views/Schedules.tsx +802 -0
  215. package/bizar-dash/src/web/views/Settings.tsx +1787 -0
  216. package/bizar-dash/src/web/views/Skills.tsx +431 -0
  217. package/bizar-dash/src/web/views/Tasks.tsx +1523 -0
  218. package/bizar-dash/src/web/views/glyphs/GlyphRenderer.tsx +613 -0
  219. package/bizar-dash/src/web/views/glyphs/components.tsx +1098 -0
  220. package/bizar-dash/templates/mod/FORMAT.md +76 -0
  221. package/bizar-dash/templates/mod/hello-mod/README.md +19 -0
  222. package/bizar-dash/templates/mod/hello-mod/agents/greeter.md +8 -0
  223. package/bizar-dash/templates/mod/hello-mod/commands/hello.md +6 -0
  224. package/bizar-dash/templates/mod/hello-mod/mod.json +20 -0
  225. package/bizar-dash/templates/mod/hello-mod/routes/ping.mjs +9 -0
  226. package/bizar-dash/templates/mod/hello-mod/views/HelloView.tsx +10 -0
  227. package/bizar-dash/tests/dashboard-ports.test.mjs +138 -0
  228. package/bizar-dash/tests/graphify-mod-spawn.node.test.mjs +90 -0
  229. package/bizar-dash/tests/memory-cli.test.mjs +542 -0
  230. package/bizar-dash/tests/memory-config.test.mjs +422 -0
  231. package/bizar-dash/tests/memory-git.test.mjs +246 -0
  232. package/bizar-dash/tests/memory-lightrag.test.mjs +153 -0
  233. package/bizar-dash/tests/memory-protocol-drift.test.mjs +45 -0
  234. package/bizar-dash/tests/memory-schema.test.mjs +198 -0
  235. package/bizar-dash/tests/memory-secrets.test.mjs +121 -0
  236. package/bizar-dash/tests/memory-store.test.mjs +390 -0
  237. package/bizar-dash/tests/memory-sync.test.mjs +141 -0
  238. package/bizar-dash/tests/mod-instructions.node.test.mjs +188 -0
  239. package/bizar-dash/tests/mod-security.test.mjs +273 -0
  240. package/bizar-dash/tests/mod-upgrade.node.test.mjs +357 -0
  241. package/bizar-dash/tests/no-agent-browser.node.test.mjs +98 -0
  242. package/bizar-dash/tests/obsidian-back-compat.test.mjs +199 -0
  243. package/bizar-dash/tests/opencode-runner.test.mjs +172 -0
  244. package/bizar-dash/tests/path-safe.test.mjs +108 -0
  245. package/bizar-dash/tests/providers-store-backup-keys.node.test.mjs +333 -0
  246. package/bizar-dash/tests/smoke-v2.mjs +212 -0
  247. package/bizar-dash/tests/strip-thinking.test.mjs +175 -0
  248. package/bizar-dash/tests/submit-feedback.test.mjs +353 -0
  249. package/bizar-dash/tests/tmux-wrap.test.mjs +145 -0
  250. package/bizar-dash/tests/yaml.test.mjs +128 -0
  251. package/bizar-dash/tsconfig.json +23 -0
  252. package/bizar-dash/vite.config.ts +27 -0
  253. package/cli/atomic.mjs +73 -0
  254. package/cli/banner.mjs +1 -1
  255. package/cli/bin.mjs +44 -47
  256. package/cli/bootstrap.mjs +1 -1
  257. package/cli/copy.mjs +25 -16
  258. package/cli/dev-link.mjs +17 -1
  259. package/cli/doctor.mjs +4 -4
  260. package/cli/doctor.test.mjs +2 -2
  261. package/cli/init.mjs +135 -1
  262. package/cli/install.mjs +31 -39
  263. package/cli/memory-constants.mjs +59 -0
  264. package/cli/memory.mjs +1436 -0
  265. package/cli/service.mjs +5 -6
  266. package/cli/utils.mjs +6 -3
  267. package/config/AGENTS.md +7 -7
  268. package/config/agents/_shared/AGENT_BASELINE.md +59 -61
  269. package/config/opencode.json +13 -38
  270. package/config/skills/memory-protocol/SKILL.md +105 -0
  271. package/config/skills/obsidian/SKILL.md +270 -65
  272. package/install.sh +59 -19
  273. package/package.json +49 -14
  274. package/packages/sdk/LICENSE +21 -0
  275. package/packages/sdk/README.md +80 -0
  276. package/packages/sdk/src/client.ts +183 -0
  277. package/packages/sdk/src/errors.ts +120 -0
  278. package/packages/sdk/src/events.ts +153 -0
  279. package/packages/sdk/src/index.ts +63 -0
  280. package/packages/sdk/src/types.ts +176 -0
  281. package/packages/sdk/src/version.ts +4 -0
  282. package/packages/sdk/tests/client.test.ts +217 -0
  283. package/packages/sdk/tests/errors.test.ts +108 -0
  284. package/packages/sdk/tests/events.test.ts +139 -0
  285. package/packages/sdk/tests/fixtures/fetch-mock.ts +152 -0
  286. package/packages/sdk/tests/fixtures/sse-mock.ts +30 -0
  287. package/packages/sdk/tsconfig.json +25 -0
  288. package/packages/sdk/vitest.config.ts +9 -0
  289. package/plugins/bizar/LICENSE +21 -0
  290. package/plugins/bizar/README.md +448 -0
  291. package/plugins/bizar/dist/index.js +29901 -0
  292. package/plugins/bizar/index.ts +1491 -0
  293. package/plugins/bizar/scripts/check-forbidden-imports.sh +33 -0
  294. package/plugins/bizar/src/background-state.ts +551 -0
  295. package/plugins/bizar/src/background.ts +1250 -0
  296. package/plugins/bizar/src/commands-impl.ts +464 -0
  297. package/plugins/bizar/src/commands.ts +1168 -0
  298. package/plugins/bizar/src/dashboard-client.ts +233 -0
  299. package/plugins/bizar/src/event-stream.ts +606 -0
  300. package/plugins/bizar/src/fingerprint.ts +120 -0
  301. package/plugins/bizar/src/handoff.ts +79 -0
  302. package/plugins/bizar/src/http-client.ts +467 -0
  303. package/plugins/bizar/src/key-rotation.ts +218 -0
  304. package/plugins/bizar/src/logger.ts +144 -0
  305. package/plugins/bizar/src/loop.ts +176 -0
  306. package/plugins/bizar/src/opencode-runner.ts +390 -0
  307. package/plugins/bizar/src/options.ts +421 -0
  308. package/plugins/bizar/src/plan-fs.ts +323 -0
  309. package/plugins/bizar/src/reasoning-clean.ts +454 -0
  310. package/plugins/bizar/src/report.ts +178 -0
  311. package/plugins/bizar/src/research-prompt.ts +35 -0
  312. package/plugins/bizar/src/serve-info.ts +228 -0
  313. package/plugins/bizar/src/serve.ts +496 -0
  314. package/plugins/bizar/src/settings.ts +349 -0
  315. package/plugins/bizar/src/state.ts +298 -0
  316. package/plugins/bizar/src/tools/bg-collect.ts +104 -0
  317. package/plugins/bizar/src/tools/bg-get-comments.ts +239 -0
  318. package/plugins/bizar/src/tools/bg-kill.ts +87 -0
  319. package/plugins/bizar/src/tools/bg-spawn.ts +401 -0
  320. package/plugins/bizar/src/tools/bg-status.ts +99 -0
  321. package/plugins/bizar/src/tools/open-kb.ts +191 -0
  322. package/plugins/bizar/src/tools/plan-action.ts +767 -0
  323. package/plugins/bizar/src/tools/read-glyph-feedback.ts +170 -0
  324. package/plugins/bizar/src/tools/wait-for-feedback.ts +402 -0
  325. package/plugins/bizar/tests/attach-handler-bug.test.ts +169 -0
  326. package/plugins/bizar/tests/background-state.test.ts +277 -0
  327. package/plugins/bizar/tests/background.test.ts +402 -0
  328. package/plugins/bizar/tests/block.test.ts +195 -0
  329. package/plugins/bizar/tests/canonical-key-order.test.ts +75 -0
  330. package/plugins/bizar/tests/commands-impl.test.ts +442 -0
  331. package/plugins/bizar/tests/commands.test.ts +584 -0
  332. package/plugins/bizar/tests/config.test.ts +122 -0
  333. package/plugins/bizar/tests/dashboard-client.test.ts +159 -0
  334. package/plugins/bizar/tests/dispose.test.ts +336 -0
  335. package/plugins/bizar/tests/event-stream.test.ts +409 -0
  336. package/plugins/bizar/tests/event.test.ts +262 -0
  337. package/plugins/bizar/tests/fingerprint.test.ts +162 -0
  338. package/plugins/bizar/tests/http-client.test.ts +404 -0
  339. package/plugins/bizar/tests/init-helpers.test.ts +203 -0
  340. package/plugins/bizar/tests/integration/slash-command.test.ts +348 -0
  341. package/plugins/bizar/tests/integration/tool-routing.test.ts +314 -0
  342. package/plugins/bizar/tests/key-rotation.test.ts +396 -0
  343. package/plugins/bizar/tests/loop.test.ts +397 -0
  344. package/plugins/bizar/tests/options.test.ts +276 -0
  345. package/plugins/bizar/tests/reasoning-clean.test.ts +422 -0
  346. package/plugins/bizar/tests/serve.test.ts +339 -0
  347. package/plugins/bizar/tests/settings.test.ts +351 -0
  348. package/plugins/bizar/tests/stall-think.test.ts +750 -0
  349. package/plugins/bizar/tests/state.test.ts +276 -0
  350. package/plugins/bizar/tests/tools/bg-collect.test.ts +337 -0
  351. package/plugins/bizar/tests/tools/bg-get-comments.test.ts +485 -0
  352. package/plugins/bizar/tests/tools/bg-kill.test.ts +235 -0
  353. package/plugins/bizar/tests/tools/bg-spawn-delegation.test.ts +147 -0
  354. package/plugins/bizar/tests/tools/bg-spawn.test.ts +311 -0
  355. package/plugins/bizar/tests/tools/bg-status.test.ts +217 -0
  356. package/plugins/bizar/tests/tools/opencode-runner.test.ts +115 -0
  357. package/plugins/bizar/tests/tools/plan-action.test.ts +599 -0
  358. package/plugins/bizar/tests/tools/read-glyph-feedback.test.ts +253 -0
  359. package/plugins/bizar/tests/tools/wait-for-feedback.test.ts +390 -0
  360. package/plugins/bizar/tests/update-deadlock.test.ts +145 -0
  361. package/plugins/bizar/tsconfig.json +29 -0
package/cli/service.mjs CHANGED
@@ -199,14 +199,13 @@ async function daemonLoop() {
199
199
  }
200
200
  logLine(`service started (pid ${process.pid})`);
201
201
 
202
- // Resolve the runner module. The daemon lives in the bizar package;
203
- // the runner lives in the bizarre-dash package. We try a few candidate
204
- // paths so this works whether bizarre-dash is installed globally,
205
- // locally, or alongside the source tree (development).
202
+ // Resolve the runner module. v4.0.0: the dashboard ships inside this package.
203
+ // We keep legacy fallbacks for users who still have @polderlabs/bizar-dash
204
+ // installed globally.
206
205
  const candidates = [
207
- // dev: <repo>/bizar-dash/src/server/schedules-runner.mjs
206
+ // v4.0.0 primary: <repo>/bizar-dash/src/server/schedules-runner.mjs
208
207
  join(__dirname, '..', 'bizar-dash', 'src', 'server', 'schedules-runner.mjs'),
209
- // npm-global fallback
208
+ // Legacy fallbacks — users with @polderlabs/bizar-dash still installed:
210
209
  join(HOME, '.npm-global', 'lib', 'node_modules', '@polderlabs', 'bizar-dash', 'src', 'server', 'schedules-runner.mjs'),
211
210
  ];
212
211
  // Probe $PWD and global node_modules
package/cli/utils.mjs CHANGED
@@ -94,10 +94,13 @@ export async function detectOpenCode() {
94
94
  return { exists, version, configDir, agentsDir };
95
95
  }
96
96
 
97
- export async function detectRtk() {
98
- return commandExists('rtk');
97
+ export async function detectHeadroom() {
98
+ return commandExists('headroom');
99
99
  }
100
100
 
101
+ // Alias for backward-compat during migration
102
+ export const detectRtk = detectHeadroom;
103
+
101
104
  export async function detectSemble() {
102
105
  if (commandExists('semble')) {
103
106
  return true;
@@ -138,7 +141,7 @@ export function buildSummary(components, agents, target, skillPacks = []) {
138
141
  if (components.includes('rules')) parts.push('rules');
139
142
  if (components.includes('hooks')) parts.push('hooks');
140
143
  if (components.includes('commands')) parts.push('commands');
141
- parts.push('RTK');
144
+ parts.push('Headroom');
142
145
  parts.push('Semble');
143
146
  parts.push('Skills CLI');
144
147
  if (skillPacks.length > 0) parts.push(`skills: ${skillPacks.join(', ')}`);
package/config/AGENTS.md CHANGED
@@ -118,7 +118,7 @@ For agents with `reasoning: true` + `variant: "high"`, follow `rules/thinking.md
118
118
 
119
119
  ### Research-Loop Rule
120
120
 
121
- Follow `rules/uncertainty.md` strictly. When uncertain or stuck, the next move is a research tool call (`websearch` for outside-the-repo facts, `webfetch` for official docs, `semble search` for codebase patterns, `obsidian_*` for project memory) — not a third variation of the same edit. If you catch yourself about to retry the same failed command with slightly different arguments, stop and search first. The plugin's loop-guard (`loopThresholdWarn: 5`) is the safety net; self-correct at attempt 2.
121
+ Follow `rules/uncertainty.md` strictly. When uncertain or stuck, the next move is a research tool call (`websearch` for outside-the-repo facts, `webfetch` for official docs, `semble search` for codebase patterns, `bizar memory search` for project memory) — not a third variation of the same edit. If you catch yourself about to retry the same failed command with slightly different arguments, stop and search first. The plugin's loop-guard (`loopThresholdWarn: 5`) is the safety net; self-correct at attempt 2.
122
122
 
123
123
  ---
124
124
 
@@ -209,7 +209,7 @@ Odin (`@odin`) is the All-Father and primary/default agent. He analyzes each req
209
209
 
210
210
  Odin dispatches all tasks to subagents via the `task` tool. When work items are **independent**, he launches them as **parallel `task` calls in a single message**.
211
211
 
212
- **Before dispatching any task, Odin determines the project name and sets the correct obsidian bank.** See obsidian Memory Protocol below for bank selection rules.
212
+ **Before dispatching any task, Odin runs `bizar memory status` to confirm the vault is reachable.** No `bank_id` is needed `bizar memory status` resolves everything from the project root.
213
213
 
214
214
  | Task Type | Route To |
215
215
  |-----------|----------|
@@ -303,7 +303,7 @@ This section is the single source of truth for every Bizar agent's behavior. It
303
303
  > | `ask_user_input_v0` | Bizar has a `question` tool — same shape, single high-value question |
304
304
  > | `skill` | `skill` — load a SKILL.md from `~/.opencode/skills/<name>/` or installed equivalent |
305
305
  > | `task` (subagent dispatch) | `task` — same — used by Odin to dispatch subagents |
306
- > | MCP servers | `semble` (codebase search), `obsidian` (memory), and any user-added servers in `config/opencode.json` |
306
+ > | MCP servers | `semble` (codebase search) and any user-added servers in `config/opencode.json` |
307
307
 
308
308
  ### Simplicity Rule — do not overcomplicate
309
309
 
@@ -387,7 +387,7 @@ This section is the single source of truth for every Bizar agent's behavior. It
387
387
  - Bizar does not have a single knowledge cutoff shared by all models. Subagents may run on DeepSeek V4 Flash, MiniMax M2.7 / M3, or GPT-5.5, each with their own training window.
388
388
  - For facts that change quickly (current positions, prices, breaking news) or anything that could have changed recently, **search before answering**: use `websearch` and `webfetch` or delegate to `@mimir` for deep research.
389
389
  - For stable technical knowledge (language semantics, well-established APIs, mathematical truths), answer directly without search.
390
- - Default to using `obsidian_*` with the project's `bank_id` at session start to retrieve prior project context before answering anything project-specific.
390
+ - Default to running `bizar memory search "<topic>"` at session start to retrieve prior project context before answering anything project-specific.
391
391
  - When formulating date-sensitive queries, use the actual current date (Bizar's opencode environment provides this). Do not hardcode years.
392
392
  - Do not over-rely on memory; if uncertain, search. Confabulating costs the user more than searching.
393
393
 
@@ -398,7 +398,7 @@ Bizar can connect to external tools via MCP servers. Always check what's connect
398
398
  #### Always-on MCP servers
399
399
 
400
400
  - `semble` — local codebase search. Use `semble search "<query>"` for natural-language and keyword queries against the active repo. Faster and more token-efficient than `grep` / `read`.
401
- - `obsidian` — persistent memory with per-project banks. Use `obsidian_*` with `bank_id: "<project-name>"` to retrieve prior context; `obsidian_*` to store new findings.
401
+ - `bizar memory` CLI project memory. Run `bizar memory search "<query>"` to find prior context; `bizar memory status` to resolve the vault path. No MCP server needed — agents have `bash: allow`.
402
402
 
403
403
  #### Domain skills
404
404
 
@@ -482,7 +482,7 @@ Use `websearch` and `webfetch` for current information you don't have or that ma
482
482
  **Core search behaviors:**
483
483
  1. Search for fast-changing info (stock prices, breaking news, current holders of public positions). Don't search for timeless technical facts.
484
484
  2. Scale tool calls to query complexity: 1 for single facts; 3–5 for medium; 5–10 for deeper research; 20+ should be delegated to `@mimir`.
485
- 3. Use internal data tools (obsidian for project memory, Semble for code) **before** `websearch` when working on the user's own projects.
485
+ 3. Use internal data tools (`bizar memory` for project memory, Semble for code) **before** `websearch` when working on the user's own projects.
486
486
 
487
487
  **How to search:**
488
488
  - Keep queries concise (1–6 words) and start broad.
@@ -532,7 +532,7 @@ For Bizar-internal claims (citing files, lines, tool results), use file:line ref
532
532
 
533
533
  ### memory_privacy_and_user_data
534
534
 
535
- - Use persistent memory (`obsidian_*`) only when the information is stable, useful, and not sensitive unless explicitly requested.
535
+ - Use persistent memory (via `bizar memory write`) only when the information is stable, useful, and not sensitive unless explicitly requested.
536
536
  - Do not store trivial, short-lived, or unnecessarily personal information.
537
537
  - Handle user data conservatively.
538
538
  - Do not expose private emails, files, contacts, credentials, tokens, or internal documents unless requested and permitted.
@@ -188,7 +188,7 @@ These rules apply whenever the <mod-id> mod is enabled.
188
188
  ### Rules You Must Follow
189
189
 
190
190
  1. **Mod instructions are binding.** When a mod is installed, treat its `INSTRUCTIONS.md` and `agents/*.md` files as higher-priority than this baseline — unless `modPriority: augment`, in which case both apply.
191
- 2. **Check `.obsidian/INDEX.md` and `.opencode/skills/` at session start.** If a mod-installed skill is listed there, you have its rules.
191
+ 2. **Check project memory and `.opencode/skills/` at session start.** Run `bizar memory search "active_rules"` to find standing rules. If a mod-installed skill is listed in `.opencode/skills/`, you have its rules.
192
192
  3. **Never copy or modify mod-installed files.** They are owned by the mod. To change a mod's behavior, file an issue or PR upstream; do not patch `~/.config/opencode/agents/<mod-id>__*.md` in place.
193
193
  4. **Mod-installed agent files are not subagents.** They are rules loaded into existing agents. You do not dispatch to `<mod-id>__*`; you follow them inside the agent whose scope they target.
194
194
  5. **If a mod instruction conflicts with the user**, the user's explicit instruction wins — but you must surface the conflict ("The <mod-name> mod says X, but you asked Y. Proceeding with Y.") before proceeding. Do not silently override.
@@ -215,37 +215,38 @@ At session start:
215
215
 
216
216
  ---
217
217
 
218
- ## 5. Obsidian Vault (Long-Term Memory)
218
+ ## 5. Project Memory Vault (Long-Term Knowledge)
219
219
 
220
- Bizar stores long-term memory in an **Obsidian vault** at `.obsidian/` in the worktree (git-trackable, human-browsable in Obsidian.app, plain markdown, cross-linkable). It replaces the Hindsight MCP server.
220
+ **⚠️ MANDATORY.** Run this before starting any other action in a new session.
221
+
222
+ Bizar stores long-term memory in a **project memory vault** — Markdown files managed via the `bizar memory` CLI. Run `bizar memory status` from the project root to get the resolved path (usually `~/.local/share/bizar/memory/<repoName>/` or `projects/<projectId>/` under it). The vault uses three namespaces: `projects/<projectId>/` (project-specific), `global/bizar/` (cross-project conventions), and `users/<userId>/` (personal preferences).
221
223
 
222
224
  ### Session Start
223
225
 
224
- 1. Check for `.obsidian/INDEX.md` if missing, treat the vault as empty.
225
- 2. Read `.obsidian/INDEX.md` for a map of notes.
226
- 3. Read the most recent `YYYY-MM-DD` daily log for the prior session's context.
227
- 4. If a relevant project note exists (e.g. `.obsidian/projects/<name>.md`), read it.
226
+ 1. Run `bizar memory search "<topic>"` to find relevant prior context.
227
+ 2. Read project-level index entries: `bizar memory search "project_index"` or browse notes with `bizar memory list`.
228
+ 3. Read the most recent session summaries: `bizar memory search "session_summary"`.
229
+ 4. If a relevant decision note exists, read it by path with `cat <vault-path>/projects/<projectId>/decisions/<name>.md`.
228
230
 
229
231
  ### During Work
230
232
 
231
- - Append raw findings to `.obsidian/sessions/<session-id>.md` as you go.
232
- - When you make a non-obvious decision, capture it in a project note.
233
- - Use `[[wikilinks]]` to cross-link related concepts.
233
+ - Write durable findings with `bizar memory write <relpath> --type <type> --tag <tag> --body "..."`.
234
+ - When you make a non-obvious decision, capture it as `type: architecture_decision`.
235
+ - Use `[[wikilinks]]` to cross-link related concepts (vault-root-relative, e.g. `[[projects/<projectId>/Architecture]]`).
234
236
 
235
237
  ### Task Completion
236
238
 
237
- - Create or update `.obsidian/sessions/<today>.md` with a summary of what was done.
238
- - Update `.obsidian/INDEX.md` if new notes were created.
239
- - For sustained project context, write or update `.obsidian/projects/<name>.md`.
239
+ - Write a session summary: `bizar memory write sessions/<today>.md --type session_summary --status active --body "..."`.
240
+ - Run `bizar memory sync` to commit and push (if shared vault).
240
241
 
241
242
  ### Search the Vault
242
243
 
243
- - `semble search "<query>" --content docs --content all` covers the vault.
244
- - Or use a dedicated Obsidian search tool if one is connected.
244
+ - `bizar memory search "<query>"` full-text search across the vault.
245
+ - `semble search "<query>" --content docs --content all` also covers vault Markdown.
245
246
 
246
247
  ### Privacy and Scope
247
248
 
248
- - Use Obsidian only for stable, useful, non-sensitive information.
249
+ - Use the memory vault only for stable, useful, non-sensitive information.
249
250
  - Do not store trivial, short-lived, or unnecessary personal information.
250
251
  - Do not expose private emails, credentials, tokens, or internal documents unless requested and permitted.
251
252
 
@@ -387,7 +388,7 @@ The following rules apply to every agent at all times. They are the single sourc
387
388
  - Bizar does not have a single knowledge cutoff shared by all models. Subagents may run on DeepSeek V4 Flash (opencode-zen, free tier) or MiniMax M2.7 / M3, each with their own training window.
388
389
  - For facts that change quickly (current positions, prices, breaking news) or anything that could have changed recently, **search before answering**: use `websearch` and `webfetch` or delegate to `@mimir` for deep research.
389
390
  - For stable technical knowledge (language semantics, well-established APIs, mathematical truths), answer directly without search.
390
- - Default to reading `.obsidian/INDEX.md` at session start to retrieve prior project context before answering anything project-specific.
391
+ - Default to running `bizar memory search "<topic>"` at session start to retrieve prior project context before answering anything project-specific.
391
392
  - When formulating date-sensitive queries, use the actual current date (Bizar's opencode environment provides this). Do not hardcode years.
392
393
  - Do not over-rely on memory; if uncertain, search. Confabulating costs the user more than searching.
393
394
 
@@ -398,7 +399,7 @@ Bizar can connect to external tools via MCP servers. Always check what's connect
398
399
  **Always-on MCP servers:**
399
400
 
400
401
  - `semble` — local codebase search. Use `semble search "<query>"` for natural-language and keyword queries against the active repo. Faster and more token-efficient than `grep` / `read`.
401
- - Obsidian vault — long-term memory. Read `.obsidian/INDEX.md` at session start.
402
+ - Project memory — long-term knowledge. Use `bizar memory search "<query>"` to find prior context; `bizar memory status` to resolve the vault path.
402
403
 
403
404
  **Domain skills:** see section 3 above.
404
405
 
@@ -619,67 +620,64 @@ Rules:
619
620
 
620
621
  ---
621
622
 
622
- ## 12. Obsidian VaultProject Knowledge Is Your First Stop
623
+ ## 12. Project Memory — Knowledge Is Your First Stop
624
+
625
+ **⚠️ MANDATORY protocol — agents that start work without reading project memory first are likely to contradict existing decisions.**
623
626
 
624
- **Project knowledge lives in `.obsidian/`. Read it before you start, write to it when you learn.**
627
+ **Project knowledge lives in the memory vault. Read it before you start, write to it when you learn.**
625
628
 
626
- Every Bizar project has a vault at `.obsidian/` with index files (`index/`), agent-specific memory (`agents/`), bug postmortems (`bugs/`), design decisions, and ongoing work notes. The user has been working on this project — their notes contain the real context, the gotchas, the failed approaches, the preferred patterns. **Read the relevant vault entries before making any non-trivial decision.**
629
+ The memory vault uses three namespaces: `projects/<projectId>/` (project-specific), `global/bizar/` (cross-project), and `users/<userId>/` (personal). Run `bizar memory status` from the project root to see the active mode and resolved path. The user has been working on this project — their notes contain the real context, the gotchas, the failed approaches, the preferred patterns. **Read the relevant vault entries before making any non-trivial decision.**
627
630
 
628
631
  **When to read:**
629
- - At the start of every session (skim the index)
630
- - Before any non-trivial implementation decision
631
- - When you're about to suggest something the user has already tried
632
- - When the codebase feels like it's working around something you don't understand
632
+ - At the start of every session: `bizar memory search "<topic>"` for relevant notes.
633
+ - Before any non-trivial implementation decision: check for ADRs or design notes.
634
+ - When you're about to suggest something the user has already tried.
635
+ - When the codebase feels like it's working around something you don't understand.
633
636
 
634
637
  **When to write:**
635
- - After completing a meaningful piece of work
636
- - On discovering a bug or postmortem
637
- - When you find a pattern that should be reused
638
- - When the user corrects you
639
- - When you make a design decision that should be remembered
640
-
641
- **What to write:**
642
- - Date-stamped entry under the appropriate category (`index/`, `bugs/`, `agents/<name>/`, etc.)
643
- - The context: what was happening
644
- - The lesson: what you learned
645
- - The pattern: what to do next time
646
- - Link to related entries with `[[wikilinks]]`
638
+ - After completing a meaningful piece of work — `bizar memory write <relpath> --type session_summary --body "..."`.
639
+ - On discovering a bug or postmortem — `bizar memory write bugs/<bug.md> --type bug_postmortem --body "..."`.
640
+ - When you find a pattern that should be reused — `bizar memory write patterns/<name.md> --type pattern --body "..."`.
641
+ - When the user corrects you — `bizar memory write lessons/<topic.md> --type lesson_learned --body "..."`.
642
+ - When you make a design decision `bizar memory write decisions/<topic.md> --type architecture_decision --body "..."`.
647
643
 
648
644
  **What NOT to write:**
649
- - Secrets, API keys, tokens (use auth.json)
650
- - Temporary scratch
651
- - Anything already obvious from reading the code
645
+ - Secrets, API keys, tokens (the secret scanner blocks these).
646
+ - Temporary scratch that won't be useful in 7 days.
647
+ - Anything already obvious from reading the code.
648
+
649
+ **CLI reference:**
650
+ - `bizar memory search <query>` — full-text search
651
+ - `bizar memory write <relpath> --type <type> --status active --confidence verified --tag <tag> --body "<body>"` — write a note
652
+ - `bizar memory status` — show mode + paths + git status
653
+ - `bizar memory sync` — commit and push staged notes
654
+ - `bizar memory doctor` — health check
652
655
 
653
- **The O in Odin stands for "oblige the system": Odin ALWAYS updates the vault after significant work, regardless of who did the work. The other agents read; Odin writes.**
656
+ The `<relpath>` is relative to the project namespace (e.g. `decisions/0001-router-ordering.md`, NOT `projects/<projectId>/decisions/...`).
654
657
 
655
- ## 13. New Sessions Must Bootstrap Context from Obsidian + Graphify
658
+ ## 13. New Sessions Must Bootstrap Context from Memory + Graphify
659
+
660
+ **⚠️ ENFORCED** — see `config/skills/memory-protocol/SKILL.md` for the full protocol. Drift-prevention test (`bizar-dash/tests/memory-protocol-drift.test.mjs`) fails CI if the ⚠️ framing or the bootstrap commands are removed.
656
661
 
657
662
  **Every new agent session starts blind. Before answering the user or doing any work, gather context from the project's two project-knowledge stores.**
658
663
 
659
- Both stores are git-tracked (`.obsidian/`, `.bizar/graph/`) and require no setup. The first minute of context-gathering saves an hour of wrong-direction work.
664
+ Both stores are git-tracked (the memory vault, `.bizar/graph/`) and require no setup. Find the vault path with `bizar memory status`. The first minute of context-gathering saves an hour of wrong-direction work.
660
665
 
661
666
  **At the start of EVERY new session, do this in order:**
662
667
 
663
- 1. **Skim the Obsidian vault index** at `.obsidian/index/`:
664
- - `Home.md` (or whatever the entry doc is) the project's high-level description, architecture, current state
665
- - `Versions.md` — installed component versions
666
- - `Architecture.md` — system structure
667
- - `Dashboard.md` dashboard conventions
668
- - `Patterns.md`, `Tools.md`, `Workflows.md` — only if relevant to the current task
669
- - Any `daily/` entries from the past week — what was being worked on
668
+ 1. **Search the memory vault** for the task topic:
669
+ - `bizar memory search "architecture"`system structure and conventions
670
+ - `bizar memory search "project_index"` — high-level description and entry points
671
+ - `bizar memory search "session_summary"` — recent session summaries
672
+ - Read specific notes by path: `cat <vault-path>/projects/<projectId>/<relpath>`
670
673
 
671
674
  2. **Check the Graphify graph** at `.bizar/graph/` (if the graphify mod is installed):
672
675
  - `bizar graph query "<concept>"` — for cross-module code questions
673
676
  - `bizar graph path <A> <B>` — for dependency tracing
674
677
  - `bizar graph explain <file>` — for understanding an unfamiliar file
675
678
 
676
- 3. **Read agent-specific memory** at `.obsidian/agents/<your-name>/`:
677
- - Past sessions, gotchas, decisions
678
- - Anything the user previously corrected you on
679
-
680
- 4. **Skim recent context** at `.obsidian/daily/`:
681
- - Last 3-7 days of running log entries
682
- - What was in flight when the last session ended
679
+ 3. **Search agent-specific memory** use `bizar memory search "<agent-name>"` to find per-agent notes.
680
+ 4. **Skim recent session summaries** — `bizar memory search "session_summary"` and read the most relevant ones.
683
681
 
684
682
  **When to re-bootstrap mid-session:**
685
683
 
@@ -690,9 +688,9 @@ Both stores are git-tracked (`.obsidian/`, `.bizar/graph/`) and require no setup
690
688
 
691
689
  **Anti-patterns:**
692
690
 
693
- - Don't ask the user "what is this project about?" — read the vault
691
+ - Don't ask the user "what is this project about?" — search the memory vault
694
692
  - Don't re-read the source tree top-to-bottom to get context — query the graph
695
- - Don't repeat work that was done in a previous session — the daily log has the outcome
696
- - Don't make assumptions about the user's preferences — check the vault and agent memory
693
+ - Don't repeat work that was done in a previous session — session summaries have the outcome
694
+ - Don't make assumptions about the user's preferences — search the vault and agent memory
697
695
 
698
- **The bootstrap is mandatory, not optional. A session that starts without checking Obsidian + Graphify is a session that's likely to suggest things the user already tried, break things that were already fixed, or contradict decisions that were already made.**
696
+ **The bootstrap is mandatory, not optional. A session that starts without checking Memory + Graphify is a session that's likely to suggest things the user already tried, break things that were already fixed, or contradict decisions that were already made.**
@@ -47,7 +47,8 @@
47
47
  "bizar_spawn_background": true,
48
48
  "bizar_status": true,
49
49
  "bizar_collect": true,
50
- "bizar_kill": true
50
+ "bizar_kill": true,
51
+ "bizar_open_kb": true
51
52
  },
52
53
  "agent": {
53
54
  "odin": {
@@ -61,11 +62,7 @@
61
62
  "list": "allow",
62
63
  "todowrite": "allow",
63
64
  "webfetch": "allow",
64
- "websearch": "allow",
65
- "hindsight_recall": "allow",
66
- "hindsight_retain": "allow",
67
- "hindsight_list_banks": "allow",
68
- "hindsight_create_bank": "allow"
65
+ "websearch": "allow"
69
66
  }
70
67
  },
71
68
  "vor": {
@@ -76,9 +73,7 @@
76
73
  "permission": {
77
74
  "read": "allow",
78
75
  "list": "allow",
79
- "question": "allow",
80
- "hindsight_recall": "allow",
81
- "hindsight_retain": "allow"
76
+ "question": "allow"
82
77
  }
83
78
  },
84
79
  "frigg": {
@@ -94,8 +89,6 @@
94
89
  "bash": "allow",
95
90
  "webfetch": "allow",
96
91
  "websearch": "allow",
97
- "hindsight_recall": "allow",
98
- "hindsight_retain": "allow",
99
92
  "question": "allow"
100
93
  }
101
94
  },
@@ -115,9 +108,7 @@
115
108
  "todowrite": "allow",
116
109
  "webfetch": "allow",
117
110
  "websearch": "allow",
118
- "task": "deny",
119
- "hindsight_recall": "allow",
120
- "hindsight_retain": "allow"
111
+ "task": "deny"
121
112
  }
122
113
  },
123
114
  "mimir": {
@@ -135,9 +126,7 @@
135
126
  "list": "allow",
136
127
  "webfetch": "allow",
137
128
  "websearch": "allow",
138
- "todowrite": "allow",
139
- "hindsight_recall": "allow",
140
- "hindsight_retain": "allow"
129
+ "todowrite": "allow"
141
130
  }
142
131
  },
143
132
  "heimdall": {
@@ -154,9 +143,7 @@
154
143
  "list": "allow",
155
144
  "todowrite": "allow",
156
145
  "webfetch": "allow",
157
- "websearch": "allow",
158
- "hindsight_recall": "allow",
159
- "hindsight_retain": "allow"
146
+ "websearch": "allow"
160
147
  }
161
148
  },
162
149
  "hermod": {
@@ -172,9 +159,7 @@
172
159
  "grep": "allow",
173
160
  "list": "allow",
174
161
  "webfetch": "allow",
175
- "websearch": "allow",
176
- "hindsight_recall": "allow",
177
- "hindsight_retain": "allow"
162
+ "websearch": "allow"
178
163
  }
179
164
  },
180
165
  "thor": {
@@ -191,9 +176,7 @@
191
176
  "list": "allow",
192
177
  "todowrite": "allow",
193
178
  "webfetch": "allow",
194
- "websearch": "allow",
195
- "hindsight_recall": "allow",
196
- "hindsight_retain": "allow"
179
+ "websearch": "allow"
197
180
  }
198
181
  },
199
182
  "baldr": {
@@ -210,9 +193,7 @@
210
193
  "list": "allow",
211
194
  "todowrite": "allow",
212
195
  "webfetch": "allow",
213
- "websearch": "allow",
214
- "hindsight_recall": "allow",
215
- "hindsight_retain": "allow"
196
+ "websearch": "allow"
216
197
  }
217
198
  },
218
199
  "tyr": {
@@ -229,9 +210,7 @@
229
210
  "list": "allow",
230
211
  "todowrite": "allow",
231
212
  "webfetch": "allow",
232
- "websearch": "allow",
233
- "hindsight_recall": "allow",
234
- "hindsight_retain": "allow"
213
+ "websearch": "allow"
235
214
  }
236
215
  },
237
216
  "vidarr": {
@@ -248,9 +227,7 @@
248
227
  "list": "allow",
249
228
  "todowrite": "allow",
250
229
  "webfetch": "allow",
251
- "websearch": "allow",
252
- "hindsight_recall": "allow",
253
- "hindsight_retain": "allow"
230
+ "websearch": "allow"
254
231
  }
255
232
  },
256
233
  "forseti": {
@@ -268,9 +245,7 @@
268
245
  "todowrite": "allow",
269
246
  "question": "allow",
270
247
  "webfetch": "allow",
271
- "websearch": "allow",
272
- "hindsight_recall": "allow",
273
- "hindsight_retain": "allow"
248
+ "websearch": "allow"
274
249
  }
275
250
  },
276
251
  "semble-search": {
@@ -0,0 +1,105 @@
1
+ ---
2
+ name: memory-protocol
3
+ description: How Bizar agents use the project memory vault. Read at session start, append on session end. No codebase exploration needed.
4
+ ---
5
+
6
+ # Bizar Memory Protocol
7
+
8
+ **⚠️ MANDATORY at every new session.** Run before starting any work. No codebase exploration needed.
9
+
10
+ The Bizar Memory Service is the project's long-term memory. Every project has a vault (Markdown + Git) located by reading `.bizar/memory.json`. **Agents that skip this step are likely to contradict decisions already made, break things already fixed, or suggest things the user already tried.**
11
+
12
+ ## First-time setup
13
+
14
+ **If `.bizar/memory.json` does not exist on this checkout**, run:
15
+
16
+ ```bash
17
+ bizar memory setup --remote git@github.com:you/bizar-memory.git
18
+ ```
19
+
20
+ This creates the vault, writes the config, and configures the remote. Idempotent — re-run with a new `--remote` to update the URL.
21
+
22
+ For HTTPS remotes (e.g. private repos behind a proxy):
23
+ ```bash
24
+ bizar memory setup --remote https://github.com/you/bizar-memory.git
25
+ ```
26
+
27
+ For local-only mode (no git remote — vault lives only on this machine):
28
+ ```bash
29
+ bizar memory setup --mode local-only
30
+ ```
31
+
32
+ After setup, verify with `bizar memory status` and `bizar memory doctor`.
33
+
34
+ ## Session Start — DO THIS FIRST
35
+
36
+ Run these three commands in order. If any fail, fix the underlying problem before proceeding.
37
+
38
+ ```bash
39
+ bizar memory status # confirm vault reachable
40
+ bizar memory doctor # schema + secret scan + git state
41
+ ```
42
+
43
+ If the project has prior context, search for the task topic:
44
+
45
+ ```bash
46
+ bizar memory search "<topic keyword>"
47
+ ```
48
+
49
+ Read notes by path (the vault root is in the status output, usually `~/.local/share/bizar/memory/bizar-memory/projects/<projectId>/`).
50
+
51
+ ## During Work
52
+
53
+ When you learn something durable — an architecture decision, a non-obvious convention, a bug pattern, an API contract — write it:
54
+
55
+ ```bash
56
+ bizar memory write <relpath> \
57
+ --type <type> \
58
+ --status active \
59
+ --confidence verified|inferred|speculative \
60
+ --tag <tag> \
61
+ --body "<markdown body>"
62
+ ```
63
+
64
+ `<relpath>` is relative to the project namespace root, e.g.:
65
+ - `decisions/0001-router-ordering.md`
66
+ - `conventions/secret-scanning.md`
67
+ - `bug-patterns/hindsight-token-leak.md`
68
+ - `api/memory-rest.md`
69
+
70
+ **Do NOT include the namespace prefix** (`projects/<projectId>/`) — the system adds it.
71
+
72
+ ### Valid types
73
+
74
+ `project_overview`, `architecture_decision`, `coding_convention`, `bug_pattern`, `command`, `api_contract`, `dependency_note`, `environment_fact`, `task_summary`, `session_summary`, `user_preference`
75
+
76
+ ### Valid statuses
77
+
78
+ `active`, `superseded`, `stale`, `conflict`, `draft`, `archived`
79
+
80
+ ### Valid confidences
81
+
82
+ `verified`, `inferred`, `speculative`
83
+
84
+ ## Session End
85
+
86
+ If you wrote notes, commit them (if shared vault):
87
+
88
+ ```bash
89
+ bizar memory sync
90
+ ```
91
+
92
+ If anything is broken:
93
+
94
+ ```bash
95
+ bizar memory conflicts # list notes with status:conflict
96
+ bizar memory doctor # health check
97
+ ```
98
+
99
+ ## Quick Rules
100
+
101
+ 1. **One note per durable fact.** Don't append to existing notes unless updating them.
102
+ 2. **Frontmatter is required.** `bizar memory write` builds it; if you write directly to a file, include all required fields.
103
+ 3. **No secrets.** The system scans for AWS keys, GitHub tokens, etc. and rejects the write. Use env var references in notes.
104
+ 4. **Path is relative.** `decisions/foo.md`, not `projects/BizarHarness/decisions/foo.md`.
105
+ 5. **Don't write ephemeral state.** Task status, current WIP, scratch notes — use `.bizar/` instead.