@hera-al/server 1.6.1

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 (348) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +325 -0
  3. package/bundled/apple-notes/SKILL.md +77 -0
  4. package/bundled/apple-reminders/SKILL.md +96 -0
  5. package/bundled/blogwatcher/SKILL.md +69 -0
  6. package/bundled/camsnap/SKILL.md +45 -0
  7. package/bundled/discord/SKILL.md +578 -0
  8. package/bundled/gemini/SKILL.md +43 -0
  9. package/bundled/gifgrep/SKILL.md +79 -0
  10. package/bundled/github/SKILL.md +77 -0
  11. package/bundled/gog/SKILL.md +116 -0
  12. package/bundled/goplaces/SKILL.md +52 -0
  13. package/bundled/himalaya/SKILL.md +257 -0
  14. package/bundled/himalaya/references/configuration.md +184 -0
  15. package/bundled/himalaya/references/message-composition.md +199 -0
  16. package/bundled/homebrew/SKILL.md +82 -0
  17. package/bundled/local-places/SERVER_README.md +101 -0
  18. package/bundled/local-places/SKILL.md +102 -0
  19. package/bundled/local-places/pyproject.toml +21 -0
  20. package/bundled/local-places/src/local_places/__init__.py +2 -0
  21. package/bundled/local-places/src/local_places/google_places.py +314 -0
  22. package/bundled/local-places/src/local_places/main.py +65 -0
  23. package/bundled/local-places/src/local_places/schemas.py +107 -0
  24. package/bundled/markitdown/SKILL.md +96 -0
  25. package/bundled/mcporter/SKILL.md +61 -0
  26. package/bundled/merge-pr/SKILL.md +187 -0
  27. package/bundled/merge-pr/agents/openai.yaml +4 -0
  28. package/bundled/nano-banana-pro/SKILL.md +58 -0
  29. package/bundled/nano-banana-pro/scripts/generate_image.py +184 -0
  30. package/bundled/nano-pdf/SKILL.md +38 -0
  31. package/bundled/open-prose/README.md +25 -0
  32. package/bundled/open-prose/index.ts +5 -0
  33. package/bundled/open-prose/openclaw.plugin.json +11 -0
  34. package/bundled/open-prose/package.json +15 -0
  35. package/bundled/open-prose/skills/prose/LICENSE +21 -0
  36. package/bundled/open-prose/skills/prose/SKILL.md +323 -0
  37. package/bundled/open-prose/skills/prose/alt-borges.md +141 -0
  38. package/bundled/open-prose/skills/prose/alts/arabian-nights.md +358 -0
  39. package/bundled/open-prose/skills/prose/alts/borges.md +360 -0
  40. package/bundled/open-prose/skills/prose/alts/folk.md +322 -0
  41. package/bundled/open-prose/skills/prose/alts/homer.md +346 -0
  42. package/bundled/open-prose/skills/prose/alts/kafka.md +373 -0
  43. package/bundled/open-prose/skills/prose/compiler.md +2971 -0
  44. package/bundled/open-prose/skills/prose/examples/01-hello-world.prose +4 -0
  45. package/bundled/open-prose/skills/prose/examples/02-research-and-summarize.prose +6 -0
  46. package/bundled/open-prose/skills/prose/examples/03-code-review.prose +17 -0
  47. package/bundled/open-prose/skills/prose/examples/04-write-and-refine.prose +14 -0
  48. package/bundled/open-prose/skills/prose/examples/05-debug-issue.prose +20 -0
  49. package/bundled/open-prose/skills/prose/examples/06-explain-codebase.prose +17 -0
  50. package/bundled/open-prose/skills/prose/examples/07-refactor.prose +20 -0
  51. package/bundled/open-prose/skills/prose/examples/08-blog-post.prose +20 -0
  52. package/bundled/open-prose/skills/prose/examples/09-research-with-agents.prose +25 -0
  53. package/bundled/open-prose/skills/prose/examples/10-code-review-agents.prose +32 -0
  54. package/bundled/open-prose/skills/prose/examples/11-skills-and-imports.prose +27 -0
  55. package/bundled/open-prose/skills/prose/examples/12-secure-agent-permissions.prose +43 -0
  56. package/bundled/open-prose/skills/prose/examples/13-variables-and-context.prose +51 -0
  57. package/bundled/open-prose/skills/prose/examples/14-composition-blocks.prose +48 -0
  58. package/bundled/open-prose/skills/prose/examples/15-inline-sequences.prose +23 -0
  59. package/bundled/open-prose/skills/prose/examples/16-parallel-reviews.prose +19 -0
  60. package/bundled/open-prose/skills/prose/examples/17-parallel-research.prose +19 -0
  61. package/bundled/open-prose/skills/prose/examples/18-mixed-parallel-sequential.prose +36 -0
  62. package/bundled/open-prose/skills/prose/examples/19-advanced-parallel.prose +71 -0
  63. package/bundled/open-prose/skills/prose/examples/20-fixed-loops.prose +20 -0
  64. package/bundled/open-prose/skills/prose/examples/21-pipeline-operations.prose +35 -0
  65. package/bundled/open-prose/skills/prose/examples/22-error-handling.prose +51 -0
  66. package/bundled/open-prose/skills/prose/examples/23-retry-with-backoff.prose +63 -0
  67. package/bundled/open-prose/skills/prose/examples/24-choice-blocks.prose +86 -0
  68. package/bundled/open-prose/skills/prose/examples/25-conditionals.prose +114 -0
  69. package/bundled/open-prose/skills/prose/examples/26-parameterized-blocks.prose +100 -0
  70. package/bundled/open-prose/skills/prose/examples/27-string-interpolation.prose +105 -0
  71. package/bundled/open-prose/skills/prose/examples/28-automated-pr-review.prose +37 -0
  72. package/bundled/open-prose/skills/prose/examples/28-gas-town.prose +1572 -0
  73. package/bundled/open-prose/skills/prose/examples/29-captains-chair.prose +218 -0
  74. package/bundled/open-prose/skills/prose/examples/30-captains-chair-simple.prose +42 -0
  75. package/bundled/open-prose/skills/prose/examples/31-captains-chair-with-memory.prose +145 -0
  76. package/bundled/open-prose/skills/prose/examples/33-pr-review-autofix.prose +168 -0
  77. package/bundled/open-prose/skills/prose/examples/34-content-pipeline.prose +204 -0
  78. package/bundled/open-prose/skills/prose/examples/35-feature-factory.prose +296 -0
  79. package/bundled/open-prose/skills/prose/examples/36-bug-hunter.prose +237 -0
  80. package/bundled/open-prose/skills/prose/examples/37-the-forge.prose +1474 -0
  81. package/bundled/open-prose/skills/prose/examples/38-skill-scan.prose +455 -0
  82. package/bundled/open-prose/skills/prose/examples/39-architect-by-simulation.prose +277 -0
  83. package/bundled/open-prose/skills/prose/examples/40-rlm-self-refine.prose +32 -0
  84. package/bundled/open-prose/skills/prose/examples/41-rlm-divide-conquer.prose +38 -0
  85. package/bundled/open-prose/skills/prose/examples/42-rlm-filter-recurse.prose +46 -0
  86. package/bundled/open-prose/skills/prose/examples/43-rlm-pairwise.prose +50 -0
  87. package/bundled/open-prose/skills/prose/examples/44-run-endpoint-ux-test.prose +261 -0
  88. package/bundled/open-prose/skills/prose/examples/45-plugin-release.prose +159 -0
  89. package/bundled/open-prose/skills/prose/examples/45-run-endpoint-ux-test-with-remediation.prose +637 -0
  90. package/bundled/open-prose/skills/prose/examples/46-run-endpoint-ux-test-fast.prose +148 -0
  91. package/bundled/open-prose/skills/prose/examples/46-workflow-crystallizer.prose +225 -0
  92. package/bundled/open-prose/skills/prose/examples/47-language-self-improvement.prose +356 -0
  93. package/bundled/open-prose/skills/prose/examples/48-habit-miner.prose +445 -0
  94. package/bundled/open-prose/skills/prose/examples/49-prose-run-retrospective.prose +210 -0
  95. package/bundled/open-prose/skills/prose/examples/README.md +391 -0
  96. package/bundled/open-prose/skills/prose/examples/roadmap/README.md +22 -0
  97. package/bundled/open-prose/skills/prose/examples/roadmap/iterative-refinement.prose +20 -0
  98. package/bundled/open-prose/skills/prose/examples/roadmap/parallel-review.prose +18 -0
  99. package/bundled/open-prose/skills/prose/examples/roadmap/simple-pipeline.prose +17 -0
  100. package/bundled/open-prose/skills/prose/examples/roadmap/syntax/open-prose-syntax.prose +223 -0
  101. package/bundled/open-prose/skills/prose/guidance/antipatterns.md +951 -0
  102. package/bundled/open-prose/skills/prose/guidance/patterns.md +700 -0
  103. package/bundled/open-prose/skills/prose/guidance/system-prompt.md +180 -0
  104. package/bundled/open-prose/skills/prose/help.md +144 -0
  105. package/bundled/open-prose/skills/prose/lib/README.md +108 -0
  106. package/bundled/open-prose/skills/prose/lib/calibrator.prose +215 -0
  107. package/bundled/open-prose/skills/prose/lib/cost-analyzer.prose +174 -0
  108. package/bundled/open-prose/skills/prose/lib/error-forensics.prose +250 -0
  109. package/bundled/open-prose/skills/prose/lib/inspector.prose +196 -0
  110. package/bundled/open-prose/skills/prose/lib/profiler.prose +460 -0
  111. package/bundled/open-prose/skills/prose/lib/program-improver.prose +275 -0
  112. package/bundled/open-prose/skills/prose/lib/project-memory.prose +118 -0
  113. package/bundled/open-prose/skills/prose/lib/user-memory.prose +93 -0
  114. package/bundled/open-prose/skills/prose/lib/vm-improver.prose +243 -0
  115. package/bundled/open-prose/skills/prose/primitives/session.md +593 -0
  116. package/bundled/open-prose/skills/prose/prose.md +1237 -0
  117. package/bundled/open-prose/skills/prose/state/filesystem.md +498 -0
  118. package/bundled/open-prose/skills/prose/state/in-context.md +384 -0
  119. package/bundled/open-prose/skills/prose/state/postgres.md +880 -0
  120. package/bundled/open-prose/skills/prose/state/sqlite.md +574 -0
  121. package/bundled/peekaboo/SKILL.md +190 -0
  122. package/bundled/prepare-pr/SKILL.md +277 -0
  123. package/bundled/prepare-pr/agents/openai.yaml +4 -0
  124. package/bundled/review-pr/SKILL.md +228 -0
  125. package/bundled/review-pr/agents/openai.yaml +4 -0
  126. package/bundled/sag/SKILL.md +87 -0
  127. package/bundled/skill-creator/SKILL.md +370 -0
  128. package/bundled/skill-creator/license.txt +202 -0
  129. package/bundled/skill-creator/scripts/init_skill.py +378 -0
  130. package/bundled/skill-creator/scripts/package_skill.py +111 -0
  131. package/bundled/skill-creator/scripts/quick_validate.py +101 -0
  132. package/bundled/spotify-player/SKILL.md +64 -0
  133. package/bundled/ssh/SKILL.md +119 -0
  134. package/bundled/summarize/SKILL.md +87 -0
  135. package/bundled/video-frames/SKILL.md +46 -0
  136. package/bundled/video-frames/scripts/frame.sh +81 -0
  137. package/bundled/voice-call/SKILL.md +45 -0
  138. package/bundled/wacli/SKILL.md +72 -0
  139. package/bundled/weather/SKILL.md +54 -0
  140. package/dist/agent/agent-service.d.ts +88 -0
  141. package/dist/agent/agent-service.js +1 -0
  142. package/dist/agent/message-queue.d.ts +24 -0
  143. package/dist/agent/message-queue.js +1 -0
  144. package/dist/agent/prompt-builder.d.ts +58 -0
  145. package/dist/agent/prompt-builder.js +1 -0
  146. package/dist/agent/session-agent.d.ts +197 -0
  147. package/dist/agent/session-agent.js +1 -0
  148. package/dist/agent/session-db.d.ts +26 -0
  149. package/dist/agent/session-db.js +1 -0
  150. package/dist/agent/session-error-handler.d.ts +37 -0
  151. package/dist/agent/session-error-handler.js +1 -0
  152. package/dist/agent/session-manager.d.ts +19 -0
  153. package/dist/agent/session-manager.js +1 -0
  154. package/dist/agent/workspace-files.d.ts +51 -0
  155. package/dist/agent/workspace-files.js +1 -0
  156. package/dist/auth/auth-middleware.d.ts +9 -0
  157. package/dist/auth/auth-middleware.js +1 -0
  158. package/dist/auth/node-signature-db.d.ts +30 -0
  159. package/dist/auth/node-signature-db.js +1 -0
  160. package/dist/auth/token-db.d.ts +38 -0
  161. package/dist/auth/token-db.js +1 -0
  162. package/dist/browser/browser-service.d.ts +9 -0
  163. package/dist/browser/browser-service.js +1 -0
  164. package/dist/channels/channel.d.ts +2 -0
  165. package/dist/channels/channel.js +1 -0
  166. package/dist/channels/responses.d.ts +21 -0
  167. package/dist/channels/responses.js +1 -0
  168. package/dist/commands/clear.d.ts +7 -0
  169. package/dist/commands/clear.js +1 -0
  170. package/dist/commands/cmd.d.ts +7 -0
  171. package/dist/commands/cmd.js +1 -0
  172. package/dist/commands/coder.d.ts +12 -0
  173. package/dist/commands/coder.js +1 -0
  174. package/dist/commands/command-registry.d.ts +12 -0
  175. package/dist/commands/command-registry.js +1 -0
  176. package/dist/commands/command.d.ts +22 -0
  177. package/dist/commands/command.js +1 -0
  178. package/dist/commands/compact.d.ts +7 -0
  179. package/dist/commands/compact.js +1 -0
  180. package/dist/commands/customsubagents.d.ts +15 -0
  181. package/dist/commands/customsubagents.js +1 -0
  182. package/dist/commands/help.d.ts +9 -0
  183. package/dist/commands/help.js +1 -0
  184. package/dist/commands/mcp.d.ts +9 -0
  185. package/dist/commands/mcp.js +1 -0
  186. package/dist/commands/model.d.ts +22 -0
  187. package/dist/commands/model.js +1 -0
  188. package/dist/commands/models.d.ts +11 -0
  189. package/dist/commands/models.js +1 -0
  190. package/dist/commands/new.d.ts +7 -0
  191. package/dist/commands/new.js +1 -0
  192. package/dist/commands/plugin.d.ts +7 -0
  193. package/dist/commands/plugin.js +1 -0
  194. package/dist/commands/sandbox.d.ts +12 -0
  195. package/dist/commands/sandbox.js +1 -0
  196. package/dist/commands/showtool.d.ts +12 -0
  197. package/dist/commands/showtool.js +1 -0
  198. package/dist/commands/status.d.ts +24 -0
  199. package/dist/commands/status.js +1 -0
  200. package/dist/commands/stop.d.ts +10 -0
  201. package/dist/commands/stop.js +1 -0
  202. package/dist/commands/subagents.d.ts +12 -0
  203. package/dist/commands/subagents.js +1 -0
  204. package/dist/commands/usage.d.ts +25 -0
  205. package/dist/commands/usage.js +1 -0
  206. package/dist/commands/useplugin.d.ts +7 -0
  207. package/dist/commands/useplugin.js +1 -0
  208. package/dist/config-watcher.d.ts +14 -0
  209. package/dist/config-watcher.js +1 -0
  210. package/dist/config.d.ts +267 -0
  211. package/dist/config.js +1 -0
  212. package/dist/cron/cron-service.d.ts +57 -0
  213. package/dist/cron/cron-service.js +1 -0
  214. package/dist/cron/heartbeat-token.d.ts +29 -0
  215. package/dist/cron/heartbeat-token.js +1 -0
  216. package/dist/cron/schedule.d.ts +3 -0
  217. package/dist/cron/schedule.js +1 -0
  218. package/dist/cron/store.d.ts +4 -0
  219. package/dist/cron/store.js +1 -0
  220. package/dist/cron/types.d.ts +47 -0
  221. package/dist/cron/types.js +1 -0
  222. package/dist/gateway/bridge.d.ts +38 -0
  223. package/dist/gateway/bridge.js +1 -0
  224. package/dist/gateway/channel-manager.d.ts +45 -0
  225. package/dist/gateway/channel-manager.js +1 -0
  226. package/dist/gateway/channels/qr-image.d.ts +5 -0
  227. package/dist/gateway/channels/qr-image.js +1 -0
  228. package/dist/gateway/channels/telegram.d.ts +39 -0
  229. package/dist/gateway/channels/telegram.js +1 -0
  230. package/dist/gateway/channels/webchat.d.ts +51 -0
  231. package/dist/gateway/channels/webchat.js +1 -0
  232. package/dist/gateway/channels/whatsapp.d.ts +40 -0
  233. package/dist/gateway/channels/whatsapp.js +1 -0
  234. package/dist/gateway/node-registry.d.ts +38 -0
  235. package/dist/gateway/node-registry.js +1 -0
  236. package/dist/heracli/index.d.ts +3 -0
  237. package/dist/heracli/index.js +2 -0
  238. package/dist/heracli/logs.d.ts +13 -0
  239. package/dist/heracli/logs.js +1 -0
  240. package/dist/heracli/security/audit.d.ts +17 -0
  241. package/dist/heracli/security/audit.js +1 -0
  242. package/dist/heracli/security/checks/channel-policies.d.ts +6 -0
  243. package/dist/heracli/security/checks/channel-policies.js +1 -0
  244. package/dist/heracli/security/checks/credentials.d.ts +6 -0
  245. package/dist/heracli/security/checks/credentials.js +1 -0
  246. package/dist/heracli/security/checks/fs-permissions.d.ts +6 -0
  247. package/dist/heracli/security/checks/fs-permissions.js +1 -0
  248. package/dist/heracli/security/checks/network.d.ts +4 -0
  249. package/dist/heracli/security/checks/network.js +1 -0
  250. package/dist/heracli/security/report.d.ts +4 -0
  251. package/dist/heracli/security/report.js +1 -0
  252. package/dist/index.d.ts +3 -0
  253. package/dist/index.js +2 -0
  254. package/dist/installer/hera.d.ts +3 -0
  255. package/dist/installer/hera.js +2 -0
  256. package/dist/media/message-processor.d.ts +23 -0
  257. package/dist/media/message-processor.js +1 -0
  258. package/dist/memory/memory-manager.d.ts +21 -0
  259. package/dist/memory/memory-manager.js +1 -0
  260. package/dist/memory/memory-provider.d.ts +22 -0
  261. package/dist/memory/memory-provider.js +1 -0
  262. package/dist/memory/memory-search.d.ts +102 -0
  263. package/dist/memory/memory-search.js +1 -0
  264. package/dist/memory/recall-strategies.d.ts +2 -0
  265. package/dist/memory/recall-strategies.js +1 -0
  266. package/dist/nostromo/auth.d.ts +29 -0
  267. package/dist/nostromo/auth.js +1 -0
  268. package/dist/nostromo/nostromo.d.ts +23 -0
  269. package/dist/nostromo/nostromo.js +1 -0
  270. package/dist/nostromo/ui-html-layout.d.ts +3 -0
  271. package/dist/nostromo/ui-html-layout.js +1 -0
  272. package/dist/nostromo/ui-html-modals.d.ts +3 -0
  273. package/dist/nostromo/ui-html-modals.js +1 -0
  274. package/dist/nostromo/ui-js-agent.d.ts +3 -0
  275. package/dist/nostromo/ui-js-agent.js +1 -0
  276. package/dist/nostromo/ui-js-channels.d.ts +3 -0
  277. package/dist/nostromo/ui-js-channels.js +1 -0
  278. package/dist/nostromo/ui-js-competences.d.ts +3 -0
  279. package/dist/nostromo/ui-js-competences.js +1 -0
  280. package/dist/nostromo/ui-js-config.d.ts +3 -0
  281. package/dist/nostromo/ui-js-config.js +1 -0
  282. package/dist/nostromo/ui-js-core.d.ts +3 -0
  283. package/dist/nostromo/ui-js-core.js +1 -0
  284. package/dist/nostromo/ui-js-ops.d.ts +3 -0
  285. package/dist/nostromo/ui-js-ops.js +1 -0
  286. package/dist/nostromo/ui-js-prompts.d.ts +3 -0
  287. package/dist/nostromo/ui-js-prompts.js +1 -0
  288. package/dist/nostromo/ui-styles.d.ts +3 -0
  289. package/dist/nostromo/ui-styles.js +1 -0
  290. package/dist/nostromo/ui.d.ts +2 -0
  291. package/dist/nostromo/ui.js +1 -0
  292. package/dist/server.d.ts +80 -0
  293. package/dist/server.js +1 -0
  294. package/dist/stt/local-whisper.d.ts +9 -0
  295. package/dist/stt/local-whisper.js +1 -0
  296. package/dist/stt/openai-whisper.d.ts +14 -0
  297. package/dist/stt/openai-whisper.js +1 -0
  298. package/dist/stt/stt-loader.d.ts +4 -0
  299. package/dist/stt/stt-loader.js +1 -0
  300. package/dist/stt/stt-provider.d.ts +4 -0
  301. package/dist/stt/stt-provider.js +1 -0
  302. package/dist/tools/browser-tools.d.ts +9 -0
  303. package/dist/tools/browser-tools.js +1 -0
  304. package/dist/tools/cron-tools.d.ts +4 -0
  305. package/dist/tools/cron-tools.js +1 -0
  306. package/dist/tools/memory-tools.d.ts +3 -0
  307. package/dist/tools/memory-tools.js +1 -0
  308. package/dist/tools/message-tools.d.ts +5 -0
  309. package/dist/tools/message-tools.js +1 -0
  310. package/dist/tools/node-tools.d.ts +3 -0
  311. package/dist/tools/node-tools.js +1 -0
  312. package/dist/tools/server-tools.d.ts +2 -0
  313. package/dist/tools/server-tools.js +1 -0
  314. package/dist/tools/tts-tools.d.ts +3 -0
  315. package/dist/tools/tts-tools.js +1 -0
  316. package/dist/tts/tts-service.d.ts +19 -0
  317. package/dist/tts/tts-service.js +1 -0
  318. package/dist/utils/chunk.d.ts +3 -0
  319. package/dist/utils/chunk.js +1 -0
  320. package/dist/utils/logger.d.ts +16 -0
  321. package/dist/utils/logger.js +1 -0
  322. package/dist/utils/markdown/fences.d.ts +11 -0
  323. package/dist/utils/markdown/fences.js +1 -0
  324. package/dist/utils/markdown/ir.d.ts +33 -0
  325. package/dist/utils/markdown/ir.js +1 -0
  326. package/dist/utils/markdown/render.d.ts +19 -0
  327. package/dist/utils/markdown/render.js +1 -0
  328. package/dist/utils/markdown/tables.d.ts +3 -0
  329. package/dist/utils/markdown/tables.js +1 -0
  330. package/dist/utils/media-response.d.ts +29 -0
  331. package/dist/utils/media-response.js +1 -0
  332. package/dist/utils/package-paths.d.ts +5 -0
  333. package/dist/utils/package-paths.js +1 -0
  334. package/dist/utils/telegram-format.d.ts +13 -0
  335. package/dist/utils/telegram-format.js +1 -0
  336. package/installationPkg/.env.example +26 -0
  337. package/installationPkg/AGENTS.md +143 -0
  338. package/installationPkg/BOOTSTRAP.md +45 -0
  339. package/installationPkg/CBINT.json +16 -0
  340. package/installationPkg/HEARTBEAT.md +5 -0
  341. package/installationPkg/IDENTITY.md +7 -0
  342. package/installationPkg/SOUL.md +36 -0
  343. package/installationPkg/SYSTEM_PROMPT.md +55 -0
  344. package/installationPkg/SYSTEM_PROMPT_SUBAGENT.md +40 -0
  345. package/installationPkg/TOOLS.md +36 -0
  346. package/installationPkg/USER.md +11 -0
  347. package/installationPkg/config.example.yaml +291 -0
  348. package/package.json +95 -0
@@ -0,0 +1,445 @@
1
+ # Habit Miner
2
+ # Excavates your AI session history to find recurring workflows worth automating
3
+ # Scans .claude, .opencode, .cursor, etc. — discovers patterns, writes .prose programs
4
+ #
5
+ # BACKEND: Run with sqlite+ or postgres for incremental processing across runs
6
+ # prose run 48-habit-miner.prose --backend sqlite+
7
+ #
8
+ # KEY VM FEATURES USED:
9
+ # - persist: true on miner — remembers patterns across runs, watches them mature
10
+ # - resume: — incremental processing, only analyzes new logs since last run
11
+ # - recursive blocks — handles arbitrarily large log corpora
12
+ # - reference-based context — agents read from storage, not everything in memory
13
+
14
+ input mode: "Mode: 'full' (analyze everything), 'incremental' (new logs only), 'check' (see what's new)"
15
+ input min_frequency: "Minimum times a pattern must appear to qualify (default: 3)"
16
+ input focus: "Optional: filter to specific area (e.g., 'git', 'testing', 'refactoring')"
17
+
18
+ # ============================================================
19
+ # Agents
20
+ # ============================================================
21
+
22
+ agent scout:
23
+ model: sonnet
24
+ prompt: """
25
+ You discover AI assistant log files on the user's system.
26
+
27
+ Check common locations:
28
+ - ~/.claude/ (Claude Code)
29
+ - ~/.opencode/ (OpenCode)
30
+ - ~/.cursor/ (Cursor)
31
+ - ~/.continue/ (Continue)
32
+ - ~/.aider/ (Aider)
33
+ - ~/.copilot/ (GitHub Copilot)
34
+ - ~/.codeium/ (Codeium)
35
+ - ~/.tabnine/ (Tabnine)
36
+ - ~/.config/claude-code/
37
+ - ~/.config/github-copilot/
38
+ - ~/.local/share/*/
39
+
40
+ For each location found, report:
41
+ - Path
42
+ - Log format (jsonl, sqlite, json, etc.)
43
+ - Approximate size
44
+ - Number of sessions/files
45
+ - Date range (oldest to newest)
46
+ - NEW since last scan (if incremental)
47
+
48
+ Be thorough but respect permissions. Don't read content yet, just inventory.
49
+ """
50
+ permissions:
51
+ bash: allow
52
+ read: ["~/.claude/**", "~/.opencode/**", "~/.cursor/**", "~/.continue/**",
53
+ "~/.aider/**", "~/.copilot/**", "~/.codeium/**", "~/.tabnine/**",
54
+ "~/.config/**", "~/.local/share/**"]
55
+
56
+ agent parser:
57
+ model: sonnet
58
+ prompt: """
59
+ You parse AI assistant log files into normalized conversation format.
60
+
61
+ Handle formats:
62
+ - JSONL: one JSON object per line (Claude Code, many others)
63
+ - SQLite: query conversation tables
64
+ - JSON: array of messages or nested structure
65
+ - Markdown: conversation exports
66
+
67
+ Extract for each session:
68
+ - Session ID / timestamp
69
+ - User messages (the requests)
70
+ - Assistant actions (tools used, files modified)
71
+ - Outcome (success/failure indicators)
72
+
73
+ Normalize to common schema regardless of source format.
74
+ Track file modification times for incremental processing.
75
+ """
76
+ permissions:
77
+ bash: allow
78
+ read: ["~/.claude/**", "~/.opencode/**", "~/.cursor/**", "~/.continue/**",
79
+ "~/.aider/**", "~/.copilot/**", "~/.codeium/**", "~/.tabnine/**"]
80
+
81
+ agent miner:
82
+ model: opus
83
+ persist: true # <-- KEY: Remembers patterns across runs
84
+ prompt: """
85
+ You find and track patterns in conversation histories over time.
86
+
87
+ Your memory contains patterns from previous runs. Each pattern has:
88
+ - name: descriptive identifier
89
+ - maturity: emerging (3-5 hits) → established (6-15) → proven (16+)
90
+ - examples: representative instances
91
+ - last_seen: when pattern last appeared
92
+ - trend: growing / stable / declining
93
+
94
+ On each run:
95
+ 1. Load your memory of known patterns
96
+ 2. Process new sessions
97
+ 3. Update pattern frequencies and maturity
98
+ 4. Identify NEW emerging patterns
99
+ 5. Note patterns that are declining (not seen recently)
100
+
101
+ Patterns MATURE over time. Don't rush to automate emerging patterns.
102
+ Wait until they're established before recommending automation.
103
+ """
104
+
105
+ agent qualifier:
106
+ model: opus
107
+ prompt: """
108
+ You determine which patterns are ready for automation.
109
+
110
+ Consider MATURITY (from miner's memory):
111
+ - emerging: Too early. Note it, but don't automate yet.
112
+ - established: Good candidate. Enough data to generalize.
113
+ - proven: Strong candidate. Battle-tested pattern.
114
+
115
+ Also consider:
116
+ - COMPLEXITY: Multi-step, not trivial
117
+ - CONSISTENCY: Similar enough across instances
118
+ - AUTOMATABLE: Not too context-dependent
119
+ - VALUE: Would save meaningful time/effort
120
+
121
+ Reject patterns that are:
122
+ - Still emerging (wait for more data)
123
+ - Too simple (just run a single command)
124
+ - Too variable (every instance is different)
125
+ """
126
+
127
+ agent author:
128
+ model: opus
129
+ prompt: """
130
+ You write .prose programs from mature workflow patterns.
131
+
132
+ For each qualified pattern:
133
+ - Identify the inputs (what varies between instances)
134
+ - Identify the constants (what's always the same)
135
+ - Design appropriate agents for the workflow
136
+ - Structure phases logically
137
+ - Add error handling where needed
138
+ - Include user checkpoints at decision points
139
+
140
+ Write idiomatic OpenProse. Follow existing example patterns.
141
+ Reference the pattern's maturity level in a header comment.
142
+ """
143
+ permissions:
144
+ write: ["**/*.prose"]
145
+
146
+ agent organizer:
147
+ model: sonnet
148
+ prompt: """
149
+ You organize generated .prose programs into a coherent collection.
150
+
151
+ Tasks:
152
+ - Group related programs by domain (git, testing, docs, etc.)
153
+ - Suggest directory structure
154
+ - Create an index/README
155
+ - Identify programs that could share blocks or agents
156
+ - Note potential compositions (program A often followed by B)
157
+ """
158
+ permissions:
159
+ write: ["**/*.md", "**/*.prose"]
160
+
161
+ # ============================================================
162
+ # Recursive block for processing large log corpora
163
+ # ============================================================
164
+
165
+ block process_logs(sources, depth):
166
+ # Base case: small enough to process directly
167
+ if **fewer than 50 sessions** or depth <= 0:
168
+ output sources | pmap:
169
+ session: parser
170
+ prompt: "Parse these logs into normalized format"
171
+ context: item
172
+
173
+ # Recursive case: chunk and fan out
174
+ let chunks = session "Split sources into ~25 session batches"
175
+ context: sources
176
+
177
+ let results = []
178
+ parallel for chunk in chunks:
179
+ let chunk_result = do process_logs(chunk, depth - 1)
180
+ results = results + chunk_result
181
+
182
+ output results
183
+
184
+ # ============================================================
185
+ # Phase 0: Discovery
186
+ # ============================================================
187
+
188
+ let inventory = session: scout
189
+ prompt: """
190
+ Scan the system for AI assistant log files.
191
+ Mode: {mode}
192
+
193
+ Check all common locations. For each found, report:
194
+ - Full path
195
+ - Format detected
196
+ - Size (human readable)
197
+ - Session/file count
198
+ - Date range
199
+ - If incremental: how many NEW since last scan
200
+
201
+ Return a structured inventory.
202
+ """
203
+
204
+ # For "check" mode, just show what's available and exit
205
+ if **mode is check**:
206
+ output result = {
207
+ status: "check-complete",
208
+ inventory: inventory,
209
+ hint: "Run with mode:'incremental' to process new logs, or mode:'full' for everything"
210
+ }
211
+
212
+ input source_selection: """
213
+ ## AI Assistant Logs Found
214
+
215
+ {inventory}
216
+
217
+ ---
218
+
219
+ Mode: {mode}
220
+
221
+ Select which sources to analyze:
222
+ - List the paths you want included
223
+ - Or say "all" to analyze everything found
224
+ - Or say "none" to cancel
225
+ """
226
+
227
+ if **user selected none or wants to cancel**:
228
+ output result = {
229
+ status: "cancelled",
230
+ inventory: inventory
231
+ }
232
+ throw "User cancelled - no sources selected"
233
+
234
+ let selected_sources = session: scout
235
+ prompt: "Parse user's selection into a list of paths to analyze"
236
+ context: { inventory, source_selection, mode }
237
+
238
+ # ============================================================
239
+ # Phase 1: Parsing (with recursive chunking for scale)
240
+ # ============================================================
241
+
242
+ let parsed_sessions = do process_logs(selected_sources, 3)
243
+
244
+ let session_count = session "Count total sessions parsed"
245
+ context: parsed_sessions
246
+
247
+ # ============================================================
248
+ # Phase 2: Mining (with persistent memory)
249
+ # ============================================================
250
+
251
+ # Resume the miner with its accumulated pattern knowledge
252
+ let pattern_update = resume: miner
253
+ prompt: """
254
+ Process these new sessions against your pattern memory.
255
+
256
+ 1. Load your known patterns (with maturity levels)
257
+ 2. Match new sessions to existing patterns OR identify new ones
258
+ 3. Update frequencies, maturity levels, last_seen dates
259
+ 4. Report:
260
+ - Patterns that MATURED (crossed a threshold)
261
+ - NEW patterns emerging
262
+ - Patterns DECLINING (not seen in a while)
263
+ - Current state of all tracked patterns
264
+
265
+ Focus area (if specified): {focus}
266
+ """
267
+ context: { parsed_sessions, focus }
268
+
269
+ # ============================================================
270
+ # Phase 3: Qualification
271
+ # ============================================================
272
+
273
+ let qualified = session: qualifier
274
+ prompt: """
275
+ Review the miner's pattern update. Identify patterns ready for automation.
276
+
277
+ Minimum frequency threshold: {min_frequency}
278
+
279
+ PRIORITIZE:
280
+ 1. Patterns that just reached "established" or "proven" maturity
281
+ 2. Proven patterns not yet automated
282
+ 3. High-value patterns even if just established
283
+
284
+ SKIP:
285
+ - Emerging patterns (let them mature)
286
+ - Already-automated patterns (unless significantly evolved)
287
+ - Declining patterns (might be obsolete)
288
+
289
+ Return ranked list with reasoning.
290
+ """
291
+ context: { pattern_update, min_frequency }
292
+
293
+ if **no patterns ready for automation**:
294
+ output result = {
295
+ status: "no-new-automations",
296
+ sessions_analyzed: session_count,
297
+ pattern_update: pattern_update,
298
+ message: "Patterns are still maturing. Run again later."
299
+ }
300
+
301
+ # ============================================================
302
+ # Phase 4: User Checkpoint
303
+ # ============================================================
304
+
305
+ input pattern_selection: """
306
+ ## Patterns Ready for Automation
307
+
308
+ Analyzed {session_count} sessions.
309
+
310
+ Pattern Update:
311
+ {pattern_update}
312
+
313
+ Ready for automation:
314
+ {qualified}
315
+
316
+ ---
317
+
318
+ Which patterns should I write .prose programs for?
319
+ - List by name or number
320
+ - Or say "all" for everything qualified
321
+ - Or say "none" to let patterns mature further
322
+
323
+ You can also refine any pattern description before I write code.
324
+ """
325
+
326
+ if **user wants to wait for more maturity**:
327
+ output result = {
328
+ status: "deferred",
329
+ sessions_analyzed: session_count,
330
+ pattern_update: pattern_update,
331
+ qualified: qualified
332
+ }
333
+
334
+ let patterns_to_automate = session: qualifier
335
+ prompt: "Parse user selection into final list of patterns to automate"
336
+ context: { qualified, pattern_selection }
337
+
338
+ # ============================================================
339
+ # Phase 5: Program Generation
340
+ # ============================================================
341
+
342
+ let programs = patterns_to_automate | map:
343
+ session: author
344
+ prompt: """
345
+ Write a .prose program for this pattern.
346
+
347
+ Pattern maturity: {pattern.maturity}
348
+ Times observed: {pattern.frequency}
349
+ Representative examples: {pattern.examples}
350
+
351
+ The program should:
352
+ - Parameterize what varies between instances
353
+ - Hardcode what's always the same
354
+ - Use appropriate agents for distinct roles
355
+ - Include error handling
356
+ - Add user checkpoints at decision points
357
+
358
+ Include a header comment noting:
359
+ - Pattern maturity level
360
+ - Number of observations it's based on
361
+ - Date generated
362
+ """
363
+ context: item
364
+
365
+ # ============================================================
366
+ # Phase 6: Organization
367
+ # ============================================================
368
+
369
+ let organized = session: organizer
370
+ prompt: """
371
+ Organize the generated programs.
372
+
373
+ Tasks:
374
+ 1. Group by domain (git, testing, docs, refactoring, etc.)
375
+ 2. Suggest directory structure
376
+ 3. Create an index README with:
377
+ - Program name and one-line description
378
+ - Pattern maturity (established/proven)
379
+ - When to use it
380
+ - Example invocation
381
+ 4. Identify shared patterns that could be extracted
382
+ 5. Note programs that often chain together
383
+ """
384
+ context: programs
385
+
386
+ # ============================================================
387
+ # Phase 7: Output Location
388
+ # ============================================================
389
+
390
+ input output_location: """
391
+ ## Generated Programs
392
+
393
+ {organized}
394
+
395
+ ---
396
+
397
+ Where should I write these programs?
398
+
399
+ Options:
400
+ - A directory path (e.g., ~/my-workflows/)
401
+ - "preview" to just show them without writing
402
+ """
403
+
404
+ if **user wants preview only**:
405
+ output result = {
406
+ status: "preview",
407
+ sessions_analyzed: session_count,
408
+ pattern_update: pattern_update,
409
+ qualified: qualified,
410
+ programs: programs,
411
+ organization: organized
412
+ }
413
+
414
+ let written = session: organizer
415
+ prompt: "Write all programs to the specified location with proper structure"
416
+ context: { programs, organized, output_location }
417
+ permissions:
418
+ write: ["**/*.prose", "**/*.md"]
419
+
420
+ # ============================================================
421
+ # Output
422
+ # ============================================================
423
+
424
+ output result = {
425
+ status: "complete",
426
+
427
+ # Discovery
428
+ sources_scanned: inventory,
429
+ sources_analyzed: selected_sources,
430
+
431
+ # Analysis
432
+ sessions_analyzed: session_count,
433
+ pattern_update: pattern_update,
434
+
435
+ # Qualification
436
+ patterns_qualified: qualified,
437
+ patterns_automated: patterns_to_automate,
438
+
439
+ # Generation
440
+ programs_written: written,
441
+ organization: organized,
442
+
443
+ # For next run
444
+ next_step: "Run again with mode:'incremental' to process new logs and mature patterns"
445
+ }
@@ -0,0 +1,210 @@
1
+ # Prose Run Retrospective
2
+ # Analyzes a completed run to extract learnings and produce an improved version.
3
+
4
+ input run_id: "Path to the completed run directory"
5
+ input prose_path: "Path to the .prose file that was executed"
6
+
7
+ const PATTERNS_PATH = "prose/skills/open-prose/guidance/patterns.md"
8
+ const ANTIPATTERNS_PATH = "prose/skills/open-prose/guidance/antipatterns.md"
9
+
10
+ agent analyst:
11
+ model: sonnet
12
+ prompt: """You analyze OpenProse run artifacts to identify issues and classify outcomes.
13
+ Checklist-style evaluation: read systematically, identify issues with evidence, classify outcomes.
14
+
15
+ Classification criteria:
16
+ - success: Program completed, outputs are correct
17
+ - transient-error: External failure (API timeout, network) - not a program flaw
18
+ - architectural-issue: Structural problem in .prose design
19
+ - antipattern-instance: Program exhibits a known antipattern"""
20
+
21
+ agent extractor:
22
+ model: opus
23
+ prompt: """You extract generalizable patterns from specific experiences.
24
+ Deep reasoning: identify abstract success/failure factors, distinguish situational from generalizable,
25
+ reason about trade-offs, synthesize observations into principles.
26
+ Be conservative - avoid over-generalizing from single instances."""
27
+
28
+ parallel:
29
+ run_artifacts = session: analyst
30
+ prompt: """Read and catalog all artifacts in {run_id}.
31
+ Look for bindings/*.md, state.md, outputs/, error files.
32
+ Summarize what exists and its content."""
33
+ context:
34
+ file: "{run_id}/state.md"
35
+
36
+ source_analysis = session: analyst
37
+ prompt: """Parse the .prose file structure at {prose_path}.
38
+ Identify: inputs, agents and models, phase structure, error handling, decision points, outputs."""
39
+ context:
40
+ file: prose_path
41
+
42
+ let classification = session: analyst
43
+ prompt: """Classify the run outcome.
44
+
45
+ Run artifacts: {run_artifacts}
46
+ Source structure: {source_analysis}
47
+
48
+ Determine:
49
+ - outcome_type: success | transient-error | architectural-issue | antipattern-instance
50
+ - confidence: high | medium | low
51
+ - evidence: Specific quotes supporting classification
52
+ - summary: One-line description"""
53
+
54
+ if **classification indicates transient error (API timeout, network failure) not caused by program**:
55
+ output result = {
56
+ status: "transient-error",
57
+ classification: classification,
58
+ recommendation: "Re-run the program; no structural changes needed"
59
+ }
60
+
61
+ let improvements = session: analyst
62
+ prompt: """Identify improvement opportunities in the .prose file.
63
+
64
+ Classification: {classification}
65
+ Source structure: {source_analysis}
66
+
67
+ For each improvement:
68
+ - What: Specific change
69
+ - Why: Problem it solves
70
+ - Priority: high | medium | low
71
+
72
+ Focus on structural improvements: model selection, parallelization, error handling, context management."""
73
+ context:
74
+ file: PATTERNS_PATH
75
+ file: ANTIPATTERNS_PATH
76
+
77
+ let pattern_candidates = session: extractor
78
+ prompt: """Extract generalizable patterns from this run.
79
+
80
+ Classification: {classification}
81
+ Improvements: {improvements}
82
+
83
+ For genuinely novel patterns/antipatterns (not already in guidance):
84
+ - Name (kebab-case)
85
+ - Category
86
+ - Description
87
+ - Example code
88
+ - Rationale
89
+
90
+ Be conservative. Only propose broadly applicable patterns supported by evidence."""
91
+ context:
92
+ file: PATTERNS_PATH
93
+ file: ANTIPATTERNS_PATH
94
+
95
+ let improved_prose = session: extractor
96
+ prompt: """Write an improved version of the .prose file.
97
+
98
+ Source structure: {source_analysis}
99
+ Improvements: {improvements}
100
+
101
+ Write the complete improved file:
102
+ - Keep same purpose and inputs
103
+ - Apply identified improvements
104
+ - Follow patterns from guidance
105
+ - Add brief header comment on what changed"""
106
+ context:
107
+ file: prose_path
108
+ file: PATTERNS_PATH
109
+
110
+ if **pattern_candidates contains no novel patterns worth documenting**:
111
+ let new_patterns = { count: 0, entries: [] }
112
+ let new_antipatterns = { count: 0, entries: [] }
113
+ else:
114
+ parallel:
115
+ new_patterns = session: analyst
116
+ prompt: """Draft new pattern entries for patterns.md.
117
+
118
+ Candidates: {pattern_candidates}
119
+
120
+ For genuinely novel patterns, follow exact format from patterns.md.
121
+ Output: count, names, and full markdown entries."""
122
+ context:
123
+ file: PATTERNS_PATH
124
+
125
+ new_antipatterns = session: analyst
126
+ prompt: """Draft new antipattern entries for antipatterns.md.
127
+
128
+ Candidates: {pattern_candidates}
129
+
130
+ For genuinely novel antipatterns, follow exact format from antipatterns.md.
131
+ Output: count, names, and full markdown entries."""
132
+ context:
133
+ file: ANTIPATTERNS_PATH
134
+
135
+ input approval_response: """
136
+ ## Retrospective Complete
137
+
138
+ **Classification**: {classification.outcome_type} ({classification.confidence})
139
+ **Summary**: {classification.summary}
140
+
141
+ **Improvements**: {improvements}
142
+
143
+ **New Patterns**: {new_patterns.count} proposed
144
+ **New Antipatterns**: {new_antipatterns.count} proposed
145
+
146
+ Approve: `all` | `prose-only` | `docs-only` | `none`
147
+ """
148
+
149
+ choice **user approval**:
150
+
151
+ option "all":
152
+ session "Write improved prose"
153
+ prompt: "Write to {run_id}/outputs/improved.prose:\n{improved_prose}"
154
+ permissions:
155
+ write: ["{run_id}/outputs/*"]
156
+
157
+ if **new_patterns.count > 0**:
158
+ session "Update patterns.md"
159
+ prompt: "Append to {PATTERNS_PATH}:\n{new_patterns.entries}"
160
+ permissions:
161
+ write: [PATTERNS_PATH]
162
+
163
+ if **new_antipatterns.count > 0**:
164
+ session "Update antipatterns.md"
165
+ prompt: "Append to {ANTIPATTERNS_PATH}:\n{new_antipatterns.entries}"
166
+ permissions:
167
+ write: [ANTIPATTERNS_PATH]
168
+
169
+ output result = {
170
+ status: classification.outcome_type,
171
+ improved_prose_path: "{run_id}/outputs/improved.prose",
172
+ patterns_added: new_patterns.names,
173
+ antipatterns_added: new_antipatterns.names
174
+ }
175
+
176
+ option "prose-only":
177
+ session "Write improved prose"
178
+ prompt: "Write to {run_id}/outputs/improved.prose:\n{improved_prose}"
179
+ permissions:
180
+ write: ["{run_id}/outputs/*"]
181
+
182
+ output result = {
183
+ status: classification.outcome_type,
184
+ improved_prose_path: "{run_id}/outputs/improved.prose"
185
+ }
186
+
187
+ option "docs-only":
188
+ if **new_patterns.count > 0**:
189
+ session "Update patterns.md"
190
+ prompt: "Append to {PATTERNS_PATH}:\n{new_patterns.entries}"
191
+ permissions:
192
+ write: [PATTERNS_PATH]
193
+
194
+ if **new_antipatterns.count > 0**:
195
+ session "Update antipatterns.md"
196
+ prompt: "Append to {ANTIPATTERNS_PATH}:\n{new_antipatterns.entries}"
197
+ permissions:
198
+ write: [ANTIPATTERNS_PATH]
199
+
200
+ output result = {
201
+ status: classification.outcome_type,
202
+ patterns_added: new_patterns.names,
203
+ antipatterns_added: new_antipatterns.names
204
+ }
205
+
206
+ option "none":
207
+ output result = {
208
+ status: "review-complete",
209
+ learnings: pattern_candidates
210
+ }