@goondocks/myco 0.1.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 (308) hide show
  1. package/.claude-plugin/marketplace.json +22 -0
  2. package/.claude-plugin/plugin.json +18 -0
  3. package/CONTRIBUTING.md +143 -0
  4. package/LICENSE +21 -0
  5. package/README.md +74 -0
  6. package/commands/init.md +231 -0
  7. package/commands/setup-llm.md +89 -0
  8. package/commands/status.md +112 -0
  9. package/dist/src/agents/adapter.d.ts +76 -0
  10. package/dist/src/agents/adapter.d.ts.map +1 -0
  11. package/dist/src/agents/adapter.js +124 -0
  12. package/dist/src/agents/adapter.js.map +1 -0
  13. package/dist/src/agents/claude-code.d.ts +3 -0
  14. package/dist/src/agents/claude-code.d.ts.map +1 -0
  15. package/dist/src/agents/claude-code.js +22 -0
  16. package/dist/src/agents/claude-code.js.map +1 -0
  17. package/dist/src/agents/cursor.d.ts +3 -0
  18. package/dist/src/agents/cursor.d.ts.map +1 -0
  19. package/dist/src/agents/cursor.js +154 -0
  20. package/dist/src/agents/cursor.js.map +1 -0
  21. package/dist/src/agents/index.d.ts +6 -0
  22. package/dist/src/agents/index.d.ts.map +1 -0
  23. package/dist/src/agents/index.js +5 -0
  24. package/dist/src/agents/index.js.map +1 -0
  25. package/dist/src/agents/registry.d.ts +34 -0
  26. package/dist/src/agents/registry.d.ts.map +1 -0
  27. package/dist/src/agents/registry.js +95 -0
  28. package/dist/src/agents/registry.js.map +1 -0
  29. package/dist/src/artifacts/candidates.d.ts +20 -0
  30. package/dist/src/artifacts/candidates.d.ts.map +1 -0
  31. package/dist/src/artifacts/candidates.js +84 -0
  32. package/dist/src/artifacts/candidates.js.map +1 -0
  33. package/dist/src/artifacts/slugify.d.ts +2 -0
  34. package/dist/src/artifacts/slugify.d.ts.map +1 -0
  35. package/dist/src/artifacts/slugify.js +22 -0
  36. package/dist/src/artifacts/slugify.js.map +1 -0
  37. package/dist/src/capture/artifact-watcher.d.ts +19 -0
  38. package/dist/src/capture/artifact-watcher.d.ts.map +1 -0
  39. package/dist/src/capture/artifact-watcher.js +37 -0
  40. package/dist/src/capture/artifact-watcher.js.map +1 -0
  41. package/dist/src/capture/buffer.d.ts +20 -0
  42. package/dist/src/capture/buffer.d.ts.map +1 -0
  43. package/dist/src/capture/buffer.js +55 -0
  44. package/dist/src/capture/buffer.js.map +1 -0
  45. package/dist/src/capture/plan-detector.d.ts +15 -0
  46. package/dist/src/capture/plan-detector.d.ts.map +1 -0
  47. package/dist/src/capture/plan-detector.js +34 -0
  48. package/dist/src/capture/plan-detector.js.map +1 -0
  49. package/dist/src/capture/processor.d.ts +2 -0
  50. package/dist/src/capture/processor.d.ts.map +1 -0
  51. package/dist/src/capture/processor.js +3 -0
  52. package/dist/src/capture/processor.js.map +1 -0
  53. package/dist/src/capture/prompts/classify.md +28 -0
  54. package/dist/src/capture/prompts/debugging.md +91 -0
  55. package/dist/src/capture/prompts/exploration.md +88 -0
  56. package/dist/src/capture/prompts/extraction.md +93 -0
  57. package/dist/src/capture/prompts/implementation.md +90 -0
  58. package/dist/src/capture/prompts/prompts/classify.md +28 -0
  59. package/dist/src/capture/prompts/prompts/debugging.md +91 -0
  60. package/dist/src/capture/prompts/prompts/exploration.md +88 -0
  61. package/dist/src/capture/prompts/prompts/extraction.md +93 -0
  62. package/dist/src/capture/prompts/prompts/implementation.md +90 -0
  63. package/dist/src/capture/prompts/prompts/schema.yaml +97 -0
  64. package/dist/src/capture/prompts/prompts/session-summary.md +65 -0
  65. package/dist/src/capture/prompts/prompts/session-title.md +46 -0
  66. package/dist/src/capture/prompts/schema.yaml +97 -0
  67. package/dist/src/capture/prompts/session-summary.md +65 -0
  68. package/dist/src/capture/prompts/session-title.md +46 -0
  69. package/dist/src/capture/prompts.d.ts +77 -0
  70. package/dist/src/capture/prompts.d.ts.map +1 -0
  71. package/dist/src/capture/prompts.js +255 -0
  72. package/dist/src/capture/prompts.js.map +1 -0
  73. package/dist/src/capture/transcript-miner.d.ts +31 -0
  74. package/dist/src/capture/transcript-miner.d.ts.map +1 -0
  75. package/dist/src/capture/transcript-miner.js +61 -0
  76. package/dist/src/capture/transcript-miner.js.map +1 -0
  77. package/dist/src/cli.d.ts +3 -0
  78. package/dist/src/cli.d.ts.map +1 -0
  79. package/dist/src/cli.js +584 -0
  80. package/dist/src/cli.js.map +1 -0
  81. package/dist/src/config/loader.d.ts +4 -0
  82. package/dist/src/config/loader.d.ts.map +1 -0
  83. package/dist/src/config/loader.js +32 -0
  84. package/dist/src/config/loader.js.map +1 -0
  85. package/dist/src/config/schema.d.ts +83 -0
  86. package/dist/src/config/schema.d.ts.map +1 -0
  87. package/dist/src/config/schema.js +55 -0
  88. package/dist/src/config/schema.js.map +1 -0
  89. package/dist/src/constants.d.ts +73 -0
  90. package/dist/src/constants.d.ts.map +1 -0
  91. package/dist/src/constants.js +86 -0
  92. package/dist/src/constants.js.map +1 -0
  93. package/dist/src/context/injector.d.ts +18 -0
  94. package/dist/src/context/injector.d.ts.map +1 -0
  95. package/dist/src/context/injector.js +71 -0
  96. package/dist/src/context/injector.js.map +1 -0
  97. package/dist/src/context/relevance.d.ts +13 -0
  98. package/dist/src/context/relevance.d.ts.map +1 -0
  99. package/dist/src/context/relevance.js +44 -0
  100. package/dist/src/context/relevance.js.map +1 -0
  101. package/dist/src/daemon/batch.d.ts +22 -0
  102. package/dist/src/daemon/batch.d.ts.map +1 -0
  103. package/dist/src/daemon/batch.js +38 -0
  104. package/dist/src/daemon/batch.js.map +1 -0
  105. package/dist/src/daemon/lifecycle.d.ts +27 -0
  106. package/dist/src/daemon/lifecycle.d.ts.map +1 -0
  107. package/dist/src/daemon/lifecycle.js +50 -0
  108. package/dist/src/daemon/lifecycle.js.map +1 -0
  109. package/dist/src/daemon/lineage.d.ts +42 -0
  110. package/dist/src/daemon/lineage.d.ts.map +1 -0
  111. package/dist/src/daemon/lineage.js +116 -0
  112. package/dist/src/daemon/lineage.js.map +1 -0
  113. package/dist/src/daemon/logger.d.ts +33 -0
  114. package/dist/src/daemon/logger.d.ts.map +1 -0
  115. package/dist/src/daemon/logger.js +88 -0
  116. package/dist/src/daemon/logger.js.map +1 -0
  117. package/dist/src/daemon/main.d.ts +2 -0
  118. package/dist/src/daemon/main.d.ts.map +1 -0
  119. package/dist/src/daemon/main.js +738 -0
  120. package/dist/src/daemon/main.js.map +1 -0
  121. package/dist/src/daemon/processor.d.ts +44 -0
  122. package/dist/src/daemon/processor.d.ts.map +1 -0
  123. package/dist/src/daemon/processor.js +142 -0
  124. package/dist/src/daemon/processor.js.map +1 -0
  125. package/dist/src/daemon/server.d.ts +24 -0
  126. package/dist/src/daemon/server.d.ts.map +1 -0
  127. package/dist/src/daemon/server.js +117 -0
  128. package/dist/src/daemon/server.js.map +1 -0
  129. package/dist/src/daemon/watcher.d.ts +29 -0
  130. package/dist/src/daemon/watcher.d.ts.map +1 -0
  131. package/dist/src/daemon/watcher.js +67 -0
  132. package/dist/src/daemon/watcher.js.map +1 -0
  133. package/dist/src/hooks/client.d.ts +20 -0
  134. package/dist/src/hooks/client.d.ts.map +1 -0
  135. package/dist/src/hooks/client.js +111 -0
  136. package/dist/src/hooks/client.js.map +1 -0
  137. package/dist/src/hooks/post-tool-use.d.ts +2 -0
  138. package/dist/src/hooks/post-tool-use.d.ts.map +1 -0
  139. package/dist/src/hooks/post-tool-use.js +40 -0
  140. package/dist/src/hooks/post-tool-use.js.map +1 -0
  141. package/dist/src/hooks/read-stdin.d.ts +2 -0
  142. package/dist/src/hooks/read-stdin.d.ts.map +1 -0
  143. package/dist/src/hooks/read-stdin.js +10 -0
  144. package/dist/src/hooks/read-stdin.js.map +1 -0
  145. package/dist/src/hooks/session-end.d.ts +2 -0
  146. package/dist/src/hooks/session-end.d.ts.map +1 -0
  147. package/dist/src/hooks/session-end.js +23 -0
  148. package/dist/src/hooks/session-end.js.map +1 -0
  149. package/dist/src/hooks/session-start.d.ts +2 -0
  150. package/dist/src/hooks/session-start.d.ts.map +1 -0
  151. package/dist/src/hooks/session-start.js +49 -0
  152. package/dist/src/hooks/session-start.js.map +1 -0
  153. package/dist/src/hooks/stop.d.ts +2 -0
  154. package/dist/src/hooks/stop.d.ts.map +1 -0
  155. package/dist/src/hooks/stop.js +34 -0
  156. package/dist/src/hooks/stop.js.map +1 -0
  157. package/dist/src/hooks/user-prompt-submit.d.ts +2 -0
  158. package/dist/src/hooks/user-prompt-submit.d.ts.map +1 -0
  159. package/dist/src/hooks/user-prompt-submit.js +46 -0
  160. package/dist/src/hooks/user-prompt-submit.js.map +1 -0
  161. package/dist/src/index/fts.d.ts +16 -0
  162. package/dist/src/index/fts.d.ts.map +1 -0
  163. package/dist/src/index/fts.js +53 -0
  164. package/dist/src/index/fts.js.map +1 -0
  165. package/dist/src/index/rebuild.d.ts +4 -0
  166. package/dist/src/index/rebuild.d.ts.map +1 -0
  167. package/dist/src/index/rebuild.js +40 -0
  168. package/dist/src/index/rebuild.js.map +1 -0
  169. package/dist/src/index/sqlite.d.ts +33 -0
  170. package/dist/src/index/sqlite.d.ts.map +1 -0
  171. package/dist/src/index/sqlite.js +99 -0
  172. package/dist/src/index/sqlite.js.map +1 -0
  173. package/dist/src/index/vectors.d.ts +24 -0
  174. package/dist/src/index/vectors.d.ts.map +1 -0
  175. package/dist/src/index/vectors.js +97 -0
  176. package/dist/src/index/vectors.js.map +1 -0
  177. package/dist/src/intelligence/anthropic.d.ts +17 -0
  178. package/dist/src/intelligence/anthropic.d.ts.map +1 -0
  179. package/dist/src/intelligence/anthropic.js +36 -0
  180. package/dist/src/intelligence/anthropic.js.map +1 -0
  181. package/dist/src/intelligence/embeddings.d.ts +3 -0
  182. package/dist/src/intelligence/embeddings.d.ts.map +1 -0
  183. package/dist/src/intelligence/embeddings.js +15 -0
  184. package/dist/src/intelligence/embeddings.js.map +1 -0
  185. package/dist/src/intelligence/haiku.d.ts +17 -0
  186. package/dist/src/intelligence/haiku.d.ts.map +1 -0
  187. package/dist/src/intelligence/haiku.js +35 -0
  188. package/dist/src/intelligence/haiku.js.map +1 -0
  189. package/dist/src/intelligence/llm.d.ts +33 -0
  190. package/dist/src/intelligence/llm.d.ts.map +1 -0
  191. package/dist/src/intelligence/llm.js +26 -0
  192. package/dist/src/intelligence/llm.js.map +1 -0
  193. package/dist/src/intelligence/lm-studio.d.ts +20 -0
  194. package/dist/src/intelligence/lm-studio.d.ts.map +1 -0
  195. package/dist/src/intelligence/lm-studio.js +59 -0
  196. package/dist/src/intelligence/lm-studio.js.map +1 -0
  197. package/dist/src/intelligence/ollama.d.ts +22 -0
  198. package/dist/src/intelligence/ollama.d.ts.map +1 -0
  199. package/dist/src/intelligence/ollama.js +64 -0
  200. package/dist/src/intelligence/ollama.js.map +1 -0
  201. package/dist/src/intelligence/response.d.ts +29 -0
  202. package/dist/src/intelligence/response.d.ts.map +1 -0
  203. package/dist/src/intelligence/response.js +71 -0
  204. package/dist/src/intelligence/response.js.map +1 -0
  205. package/dist/src/intelligence/service.d.ts +18 -0
  206. package/dist/src/intelligence/service.d.ts.map +1 -0
  207. package/dist/src/intelligence/service.js +66 -0
  208. package/dist/src/intelligence/service.js.map +1 -0
  209. package/dist/src/logs/format.d.ts +6 -0
  210. package/dist/src/logs/format.d.ts.map +1 -0
  211. package/dist/src/logs/format.js +46 -0
  212. package/dist/src/logs/format.js.map +1 -0
  213. package/dist/src/logs/reader.d.ts +28 -0
  214. package/dist/src/logs/reader.d.ts.map +1 -0
  215. package/dist/src/logs/reader.js +106 -0
  216. package/dist/src/logs/reader.js.map +1 -0
  217. package/dist/src/mcp/server.d.ts +16 -0
  218. package/dist/src/mcp/server.d.ts.map +1 -0
  219. package/dist/src/mcp/server.js +305 -0
  220. package/dist/src/mcp/server.js.map +1 -0
  221. package/dist/src/mcp/tools/consolidate.d.ts +15 -0
  222. package/dist/src/mcp/tools/consolidate.d.ts.map +1 -0
  223. package/dist/src/mcp/tools/consolidate.js +49 -0
  224. package/dist/src/mcp/tools/consolidate.js.map +1 -0
  225. package/dist/src/mcp/tools/graph.d.ts +30 -0
  226. package/dist/src/mcp/tools/graph.d.ts.map +1 -0
  227. package/dist/src/mcp/tools/graph.js +106 -0
  228. package/dist/src/mcp/tools/graph.js.map +1 -0
  229. package/dist/src/mcp/tools/logs.d.ts +3 -0
  230. package/dist/src/mcp/tools/logs.d.ts.map +1 -0
  231. package/dist/src/mcp/tools/logs.js +7 -0
  232. package/dist/src/mcp/tools/logs.js.map +1 -0
  233. package/dist/src/mcp/tools/plans.d.ts +23 -0
  234. package/dist/src/mcp/tools/plans.d.ts.map +1 -0
  235. package/dist/src/mcp/tools/plans.js +63 -0
  236. package/dist/src/mcp/tools/plans.js.map +1 -0
  237. package/dist/src/mcp/tools/recall.d.ts +30 -0
  238. package/dist/src/mcp/tools/recall.d.ts.map +1 -0
  239. package/dist/src/mcp/tools/recall.js +34 -0
  240. package/dist/src/mcp/tools/recall.js.map +1 -0
  241. package/dist/src/mcp/tools/remember.d.ts +15 -0
  242. package/dist/src/mcp/tools/remember.d.ts.map +1 -0
  243. package/dist/src/mcp/tools/remember.js +18 -0
  244. package/dist/src/mcp/tools/remember.js.map +1 -0
  245. package/dist/src/mcp/tools/search.d.ts +19 -0
  246. package/dist/src/mcp/tools/search.d.ts.map +1 -0
  247. package/dist/src/mcp/tools/search.js +59 -0
  248. package/dist/src/mcp/tools/search.js.map +1 -0
  249. package/dist/src/mcp/tools/sessions.d.ts +21 -0
  250. package/dist/src/mcp/tools/sessions.d.ts.map +1 -0
  251. package/dist/src/mcp/tools/sessions.js +36 -0
  252. package/dist/src/mcp/tools/sessions.js.map +1 -0
  253. package/dist/src/mcp/tools/supersede.d.ts +14 -0
  254. package/dist/src/mcp/tools/supersede.d.ts.map +1 -0
  255. package/dist/src/mcp/tools/supersede.js +30 -0
  256. package/dist/src/mcp/tools/supersede.js.map +1 -0
  257. package/dist/src/mcp/tools/team.d.ts +16 -0
  258. package/dist/src/mcp/tools/team.d.ts.map +1 -0
  259. package/dist/src/mcp/tools/team.js +32 -0
  260. package/dist/src/mcp/tools/team.js.map +1 -0
  261. package/dist/src/obsidian/formatter.d.ts +80 -0
  262. package/dist/src/obsidian/formatter.d.ts.map +1 -0
  263. package/dist/src/obsidian/formatter.js +227 -0
  264. package/dist/src/obsidian/formatter.js.map +1 -0
  265. package/dist/src/prompts/classification.md +42 -0
  266. package/dist/src/prompts/extraction.md +45 -0
  267. package/dist/src/prompts/index.d.ts +13 -0
  268. package/dist/src/prompts/index.d.ts.map +1 -0
  269. package/dist/src/prompts/index.js +75 -0
  270. package/dist/src/prompts/index.js.map +1 -0
  271. package/dist/src/prompts/session-similarity.md +24 -0
  272. package/dist/src/prompts/summary.md +9 -0
  273. package/dist/src/prompts/title.md +8 -0
  274. package/dist/src/vault/frontmatter.d.ts +6 -0
  275. package/dist/src/vault/frontmatter.d.ts.map +1 -0
  276. package/dist/src/vault/frontmatter.js +10 -0
  277. package/dist/src/vault/frontmatter.js.map +1 -0
  278. package/dist/src/vault/observations.d.ts +10 -0
  279. package/dist/src/vault/observations.d.ts.map +1 -0
  280. package/dist/src/vault/observations.js +33 -0
  281. package/dist/src/vault/observations.js.map +1 -0
  282. package/dist/src/vault/reader.d.ts +10 -0
  283. package/dist/src/vault/reader.d.ts.map +1 -0
  284. package/dist/src/vault/reader.js +48 -0
  285. package/dist/src/vault/reader.js.map +1 -0
  286. package/dist/src/vault/resolve.d.ts +18 -0
  287. package/dist/src/vault/resolve.d.ts.map +1 -0
  288. package/dist/src/vault/resolve.js +51 -0
  289. package/dist/src/vault/resolve.js.map +1 -0
  290. package/dist/src/vault/session-id.d.ts +16 -0
  291. package/dist/src/vault/session-id.d.ts.map +1 -0
  292. package/dist/src/vault/session-id.js +29 -0
  293. package/dist/src/vault/session-id.js.map +1 -0
  294. package/dist/src/vault/types.d.ts +88 -0
  295. package/dist/src/vault/types.d.ts.map +1 -0
  296. package/dist/src/vault/types.js +94 -0
  297. package/dist/src/vault/types.js.map +1 -0
  298. package/dist/src/vault/writer.d.ts +66 -0
  299. package/dist/src/vault/writer.d.ts.map +1 -0
  300. package/dist/src/vault/writer.js +217 -0
  301. package/dist/src/vault/writer.js.map +1 -0
  302. package/hooks/hooks.json +60 -0
  303. package/package.json +52 -0
  304. package/skills/myco/SKILL.md +206 -0
  305. package/skills/myco/references/wisdom.md +61 -0
  306. package/skills/rules/SKILL.md +185 -0
  307. package/skills/rules/references/rules-bad-example.md +106 -0
  308. package/skills/rules/references/rules-good-example.md +90 -0
@@ -0,0 +1,97 @@
1
+ # Myco Observation Schema
2
+ #
3
+ # Defines the observation types that the LLM uses for classification.
4
+ # Ported from open-agent-kit's battle-tested schema.
5
+ #
6
+ # Each type has:
7
+ # - description: What this type captures (shown to LLM)
8
+ # - examples: Example observations of this type (help LLM understand)
9
+
10
+ version: "1.0"
11
+
12
+ observation_types:
13
+ gotcha:
14
+ description: "Non-obvious behaviors, edge cases, or tricky parts that could trip someone up"
15
+ examples:
16
+ - "The API returns 200 even for validation errors, check the response body for success field"
17
+ - "File paths must be absolute, relative paths silently fail"
18
+ - "The cache TTL is in seconds, not milliseconds despite the variable name"
19
+
20
+ bug_fix:
21
+ description: "Bugs that were identified and fixed, including root cause and solution"
22
+ examples:
23
+ - "Race condition in async handler - added mutex lock around shared state"
24
+ - "Off-by-one error in pagination - fixed boundary check in slice operation"
25
+ - "Memory leak from unclosed connections - added try/finally cleanup"
26
+
27
+ decision:
28
+ description: "Architecture choices, design decisions, or approach selections with rationale"
29
+ examples:
30
+ - "Chose SQLite over PostgreSQL for activity storage - simpler deployment, sufficient for single-user"
31
+ - "Using background thread instead of async for file watcher - better isolation from event loop"
32
+ - "Storing tags as comma-separated string - avoids metadata array limitations"
33
+
34
+ discovery:
35
+ description: "Important facts learned about the codebase, APIs, patterns, or conventions"
36
+ examples:
37
+ - "The config is loaded lazily on first access via __getattr__"
38
+ - "All API routes use dependency injection for state"
39
+ - "Test fixtures are shared across modules via conftest.py"
40
+
41
+ trade_off:
42
+ description: "Trade-offs that were considered, alternatives evaluated, and why current approach was chosen"
43
+ examples:
44
+ - "Chose simplicity over performance - O(n) scan acceptable for expected data size"
45
+ - "Sacrificed type safety for flexibility - using dict instead of typed model for config"
46
+ - "Accepted eventual consistency for better throughput in background processing"
47
+
48
+ activity_classifications:
49
+ exploration:
50
+ description: "Reading code, searching, understanding the codebase"
51
+ indicators:
52
+ - "Mostly Read, Grep, Glob tools"
53
+ - "Few or no file modifications"
54
+ - "Questions about how things work"
55
+
56
+ debugging:
57
+ description: "Investigating errors, fixing bugs, troubleshooting"
58
+ indicators:
59
+ - "Error messages in output"
60
+ - "Test failures"
61
+ - "Iterative fixes to same files"
62
+
63
+ implementation:
64
+ description: "Writing new code, adding features, creating new files"
65
+ indicators:
66
+ - "New files created"
67
+ - "Significant Write/Edit operations"
68
+ - "Feature-related file names"
69
+
70
+ refactoring:
71
+ description: "Modifying existing code structure without adding new functionality"
72
+ indicators:
73
+ - "Edits without new files"
74
+ - "Moving/renaming operations"
75
+ - "No new test files"
76
+
77
+ session_origin_types:
78
+ planning:
79
+ description: "Planning-phase session"
80
+ indicators:
81
+ - "High read:edit ratio"
82
+ - "Few file modifications"
83
+ investigation:
84
+ description: "Exploration/debugging session"
85
+ indicators:
86
+ - "Many file reads"
87
+ - "Minimal edits"
88
+ implementation:
89
+ description: "Active coding session"
90
+ indicators:
91
+ - "Significant file modifications"
92
+ - "Low read:edit ratio"
93
+ mixed:
94
+ description: "Combined activity types"
95
+ indicators:
96
+ - "Both reads and edits"
97
+ - "Does not fit other categories"
@@ -0,0 +1,65 @@
1
+ ---
2
+ name: session-summary
3
+ description: Generate a high-level summary of what was accomplished in the session
4
+ ---
5
+
6
+ You are summarizing a coding session to help future sessions understand what was done.
7
+
8
+ The developer working in this session is **{{developer_name}}**. Refer to them by name instead of "the user" or "the developer".
9
+
10
+ ## Session Statistics
11
+
12
+ - Duration: {{session_duration}} minutes
13
+ - Prompt batches: {{prompt_batch_count}}
14
+ - Files read: {{files_read_count}}
15
+ - Files modified: {{files_modified_count}}
16
+ - Files created: {{files_created_count}}
17
+ - Total tool calls: {{tool_calls}}
18
+ - **Session Origin Type:** {{session_origin_type}}
19
+
20
+ ## Prompt Batches
21
+
22
+ {{prompt_batches}}
23
+
24
+ ## Session Origin Type
25
+
26
+ The session origin type indicates the dominant activity pattern:
27
+ - **planning**: Primarily reading and planning, few file modifications
28
+ - **investigation**: Exploration and debugging, many reads with minimal edits
29
+ - **implementation**: Active coding with significant file modifications
30
+ - **mixed**: Combined activity patterns
31
+
32
+ When summarizing, note whether observations are planning-phase findings (may become
33
+ stale once work is implemented) versus implementation learnings (more likely to remain
34
+ relevant long-term).
35
+
36
+ ## Task
37
+
38
+ Write a concise summary of this session. You have access to both the user's prompts and the agent's actions, so capture the full picture:
39
+
40
+ - **Developer intent**: What was {{developer_name}} trying to accomplish? What was their approach or priority?
41
+ - **Key actions**: What did the agent do? Which files were modified and why?
42
+ - **Outcomes**: What was achieved? Any decisions made or problems solved?
43
+ - **Context**: Any constraints, trade-offs, or discoveries worth noting?
44
+
45
+ Be specific - include file names, feature names, and technical details when relevant.
46
+
47
+ ## Output Format
48
+
49
+ Respond with ONLY the summary text. No JSON, no code blocks, just plain text. A bulleted list is acceptable if it improves clarity.
50
+
51
+ ## Examples
52
+
53
+ Good (captures intent + actions + outcome):
54
+ - "Chris wanted to add dark mode support. Implemented theme toggle in settings/ThemeProvider.tsx using CSS variables, added useTheme hook, and updated 12 components to use theme tokens instead of hardcoded colors. Chose CSS variables over styled-components for better performance."
55
+
56
+ Good (captures debugging journey):
57
+ - "Alex reported intermittent test failures in CI. Investigated flaky tests in tests/api/, discovered race condition in database cleanup. Fixed by adding proper test isolation with transaction rollbacks. Also identified that TestClient was sharing state across tests."
58
+
59
+ Good (captures exploration with learnings):
60
+ - "Sam needed to understand the payment processing flow before adding refund support. Traced code from PaymentController through StripeService to webhook handlers. Key finding: payments use idempotency keys stored in Redis, refunds will need similar pattern."
61
+
62
+ Bad (too vague):
63
+ - "Fixed some bugs and added a feature"
64
+ - "Worked on authentication"
65
+ - "Made improvements to the codebase"
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: session-title
3
+ description: Generate a short title from a session summary
4
+ ---
5
+
6
+ Generate a short, descriptive title (6-12 words) for this coding session based on its summary.
7
+
8
+ ## Session Summary
9
+
10
+ {{session_summary}}
11
+
12
+ ## Task
13
+
14
+ Create a brief title that captures the main accomplishment or focus of this session. The title should:
15
+ - Be 6-12 words maximum
16
+ - Start with an action verb when appropriate (Add, Fix, Implement, Refactor, Debug, Update, Configure, etc.)
17
+ - Capture the primary task or feature worked on
18
+ - Be specific enough to distinguish from other sessions
19
+ - If this is a continuation session, emphasize what THIS session specifically did, not the overall goal
20
+
21
+ ## Output Format
22
+
23
+ Respond with ONLY the title text as plain text.
24
+ - No JSON
25
+ - No quotes
26
+ - No markdown
27
+ - No punctuation at the end
28
+ - No explanation or preamble
29
+
30
+ Just the title itself, nothing else.
31
+
32
+ ## Examples
33
+
34
+ Good titles:
35
+ - Add dark mode theme support
36
+ - Fix authentication token refresh bug
37
+ - Implement user profile settings page
38
+ - Refactor payment processing service
39
+ - Debug CI pipeline test failures
40
+ - Port OAK prompt templates to Myco
41
+
42
+ Bad titles (too vague):
43
+ - Working on code
44
+ - Bug fix
45
+ - Feature implementation
46
+ - Updates
@@ -0,0 +1,97 @@
1
+ # Myco Observation Schema
2
+ #
3
+ # Defines the observation types that the LLM uses for classification.
4
+ # Ported from open-agent-kit's battle-tested schema.
5
+ #
6
+ # Each type has:
7
+ # - description: What this type captures (shown to LLM)
8
+ # - examples: Example observations of this type (help LLM understand)
9
+
10
+ version: "1.0"
11
+
12
+ observation_types:
13
+ gotcha:
14
+ description: "Non-obvious behaviors, edge cases, or tricky parts that could trip someone up"
15
+ examples:
16
+ - "The API returns 200 even for validation errors, check the response body for success field"
17
+ - "File paths must be absolute, relative paths silently fail"
18
+ - "The cache TTL is in seconds, not milliseconds despite the variable name"
19
+
20
+ bug_fix:
21
+ description: "Bugs that were identified and fixed, including root cause and solution"
22
+ examples:
23
+ - "Race condition in async handler - added mutex lock around shared state"
24
+ - "Off-by-one error in pagination - fixed boundary check in slice operation"
25
+ - "Memory leak from unclosed connections - added try/finally cleanup"
26
+
27
+ decision:
28
+ description: "Architecture choices, design decisions, or approach selections with rationale"
29
+ examples:
30
+ - "Chose SQLite over PostgreSQL for activity storage - simpler deployment, sufficient for single-user"
31
+ - "Using background thread instead of async for file watcher - better isolation from event loop"
32
+ - "Storing tags as comma-separated string - avoids metadata array limitations"
33
+
34
+ discovery:
35
+ description: "Important facts learned about the codebase, APIs, patterns, or conventions"
36
+ examples:
37
+ - "The config is loaded lazily on first access via __getattr__"
38
+ - "All API routes use dependency injection for state"
39
+ - "Test fixtures are shared across modules via conftest.py"
40
+
41
+ trade_off:
42
+ description: "Trade-offs that were considered, alternatives evaluated, and why current approach was chosen"
43
+ examples:
44
+ - "Chose simplicity over performance - O(n) scan acceptable for expected data size"
45
+ - "Sacrificed type safety for flexibility - using dict instead of typed model for config"
46
+ - "Accepted eventual consistency for better throughput in background processing"
47
+
48
+ activity_classifications:
49
+ exploration:
50
+ description: "Reading code, searching, understanding the codebase"
51
+ indicators:
52
+ - "Mostly Read, Grep, Glob tools"
53
+ - "Few or no file modifications"
54
+ - "Questions about how things work"
55
+
56
+ debugging:
57
+ description: "Investigating errors, fixing bugs, troubleshooting"
58
+ indicators:
59
+ - "Error messages in output"
60
+ - "Test failures"
61
+ - "Iterative fixes to same files"
62
+
63
+ implementation:
64
+ description: "Writing new code, adding features, creating new files"
65
+ indicators:
66
+ - "New files created"
67
+ - "Significant Write/Edit operations"
68
+ - "Feature-related file names"
69
+
70
+ refactoring:
71
+ description: "Modifying existing code structure without adding new functionality"
72
+ indicators:
73
+ - "Edits without new files"
74
+ - "Moving/renaming operations"
75
+ - "No new test files"
76
+
77
+ session_origin_types:
78
+ planning:
79
+ description: "Planning-phase session"
80
+ indicators:
81
+ - "High read:edit ratio"
82
+ - "Few file modifications"
83
+ investigation:
84
+ description: "Exploration/debugging session"
85
+ indicators:
86
+ - "Many file reads"
87
+ - "Minimal edits"
88
+ implementation:
89
+ description: "Active coding session"
90
+ indicators:
91
+ - "Significant file modifications"
92
+ - "Low read:edit ratio"
93
+ mixed:
94
+ description: "Combined activity types"
95
+ indicators:
96
+ - "Both reads and edits"
97
+ - "Does not fit other categories"
@@ -0,0 +1,65 @@
1
+ ---
2
+ name: session-summary
3
+ description: Generate a high-level summary of what was accomplished in the session
4
+ ---
5
+
6
+ You are summarizing a coding session to help future sessions understand what was done.
7
+
8
+ The developer working in this session is **{{developer_name}}**. Refer to them by name instead of "the user" or "the developer".
9
+
10
+ ## Session Statistics
11
+
12
+ - Duration: {{session_duration}} minutes
13
+ - Prompt batches: {{prompt_batch_count}}
14
+ - Files read: {{files_read_count}}
15
+ - Files modified: {{files_modified_count}}
16
+ - Files created: {{files_created_count}}
17
+ - Total tool calls: {{tool_calls}}
18
+ - **Session Origin Type:** {{session_origin_type}}
19
+
20
+ ## Prompt Batches
21
+
22
+ {{prompt_batches}}
23
+
24
+ ## Session Origin Type
25
+
26
+ The session origin type indicates the dominant activity pattern:
27
+ - **planning**: Primarily reading and planning, few file modifications
28
+ - **investigation**: Exploration and debugging, many reads with minimal edits
29
+ - **implementation**: Active coding with significant file modifications
30
+ - **mixed**: Combined activity patterns
31
+
32
+ When summarizing, note whether observations are planning-phase findings (may become
33
+ stale once work is implemented) versus implementation learnings (more likely to remain
34
+ relevant long-term).
35
+
36
+ ## Task
37
+
38
+ Write a concise summary of this session. You have access to both the user's prompts and the agent's actions, so capture the full picture:
39
+
40
+ - **Developer intent**: What was {{developer_name}} trying to accomplish? What was their approach or priority?
41
+ - **Key actions**: What did the agent do? Which files were modified and why?
42
+ - **Outcomes**: What was achieved? Any decisions made or problems solved?
43
+ - **Context**: Any constraints, trade-offs, or discoveries worth noting?
44
+
45
+ Be specific - include file names, feature names, and technical details when relevant.
46
+
47
+ ## Output Format
48
+
49
+ Respond with ONLY the summary text. No JSON, no code blocks, just plain text. A bulleted list is acceptable if it improves clarity.
50
+
51
+ ## Examples
52
+
53
+ Good (captures intent + actions + outcome):
54
+ - "Chris wanted to add dark mode support. Implemented theme toggle in settings/ThemeProvider.tsx using CSS variables, added useTheme hook, and updated 12 components to use theme tokens instead of hardcoded colors. Chose CSS variables over styled-components for better performance."
55
+
56
+ Good (captures debugging journey):
57
+ - "Alex reported intermittent test failures in CI. Investigated flaky tests in tests/api/, discovered race condition in database cleanup. Fixed by adding proper test isolation with transaction rollbacks. Also identified that TestClient was sharing state across tests."
58
+
59
+ Good (captures exploration with learnings):
60
+ - "Sam needed to understand the payment processing flow before adding refund support. Traced code from PaymentController through StripeService to webhook handlers. Key finding: payments use idempotency keys stored in Redis, refunds will need similar pattern."
61
+
62
+ Bad (too vague):
63
+ - "Fixed some bugs and added a feature"
64
+ - "Worked on authentication"
65
+ - "Made improvements to the codebase"
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: session-title
3
+ description: Generate a short title from a session summary
4
+ ---
5
+
6
+ Generate a short, descriptive title (6-12 words) for this coding session based on its summary.
7
+
8
+ ## Session Summary
9
+
10
+ {{session_summary}}
11
+
12
+ ## Task
13
+
14
+ Create a brief title that captures the main accomplishment or focus of this session. The title should:
15
+ - Be 6-12 words maximum
16
+ - Start with an action verb when appropriate (Add, Fix, Implement, Refactor, Debug, Update, Configure, etc.)
17
+ - Capture the primary task or feature worked on
18
+ - Be specific enough to distinguish from other sessions
19
+ - If this is a continuation session, emphasize what THIS session specifically did, not the overall goal
20
+
21
+ ## Output Format
22
+
23
+ Respond with ONLY the title text as plain text.
24
+ - No JSON
25
+ - No quotes
26
+ - No markdown
27
+ - No punctuation at the end
28
+ - No explanation or preamble
29
+
30
+ Just the title itself, nothing else.
31
+
32
+ ## Examples
33
+
34
+ Good titles:
35
+ - Add dark mode theme support
36
+ - Fix authentication token refresh bug
37
+ - Implement user profile settings page
38
+ - Refactor payment processing service
39
+ - Debug CI pipeline test failures
40
+ - Port OAK prompt templates to Myco
41
+
42
+ Bad titles (too vague):
43
+ - Working on code
44
+ - Bug fix
45
+ - Feature implementation
46
+ - Updates
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Prompt template system for activity observation extraction.
3
+ *
4
+ * Templates are loaded from markdown files with YAML frontmatter.
5
+ * Schema is loaded from schema.yaml as the single source of truth
6
+ * for observation types and activity classifications.
7
+ *
8
+ * Ported from open-agent-kit's Python implementation.
9
+ */
10
+ export interface ObservationType {
11
+ name: string;
12
+ description: string;
13
+ examples: string[];
14
+ }
15
+ export interface ClassificationType {
16
+ name: string;
17
+ description: string;
18
+ indicators: string[];
19
+ }
20
+ export interface Schema {
21
+ version: string;
22
+ observationTypes: ObservationType[];
23
+ classificationTypes: ClassificationType[];
24
+ }
25
+ export interface PromptTemplate {
26
+ name: string;
27
+ description: string;
28
+ prompt: string;
29
+ activityFilter?: string[];
30
+ minActivities: number;
31
+ }
32
+ export interface RenderContext {
33
+ activities: string;
34
+ session_duration: string;
35
+ files_read: string;
36
+ files_modified: string;
37
+ files_created: string;
38
+ errors: string;
39
+ observation_types: string;
40
+ classification_types: string;
41
+ type_names: string;
42
+ developer_name?: string;
43
+ prompt_batch_count?: string;
44
+ files_read_count?: string;
45
+ files_modified_count?: string;
46
+ files_created_count?: string;
47
+ tool_calls?: string;
48
+ session_origin_type?: string;
49
+ prompt_batches?: string;
50
+ session_summary?: string;
51
+ tool_summary?: string;
52
+ has_errors?: string;
53
+ }
54
+ export declare function loadSchema(schemaPath?: string): Schema;
55
+ export declare function formatObservationTypes(schema: Schema): string;
56
+ export declare function formatClassificationTypes(schema: Schema): string;
57
+ export declare function getTypeNamesString(schema: Schema): string;
58
+ export declare function loadTemplate(filePath: string): PromptTemplate | null;
59
+ export declare function loadAllTemplates(promptsDir?: string): Map<string, PromptTemplate>;
60
+ export declare function selectTemplate(templates: Map<string, PromptTemplate>, toolNames: string[], hasErrors: boolean): PromptTemplate;
61
+ export type SessionOriginType = 'planning' | 'investigation' | 'implementation' | 'mixed';
62
+ export declare function classifySessionOrigin(toolNames: string[]): SessionOriginType;
63
+ export declare function renderPrompt(template: PromptTemplate, context: Partial<RenderContext>): string;
64
+ export interface ActivityEvent {
65
+ tool?: string;
66
+ tool_name?: string;
67
+ input?: Record<string, unknown>;
68
+ output?: string;
69
+ error?: string;
70
+ timestamp?: string;
71
+ }
72
+ export declare function formatActivities(events: ActivityEvent[], maxItems?: number): string;
73
+ export declare function extractFilesList(events: ActivityEvent[], toolFilter: string[]): string[];
74
+ export declare function extractErrors(events: ActivityEvent[]): string[];
75
+ export declare function extractToolNames(events: ActivityEvent[]): string[];
76
+ export declare function buildExtractionContext(events: ActivityEvent[], sessionDuration: number, schema: Schema): Partial<RenderContext>;
77
+ //# sourceMappingURL=prompts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../../src/capture/prompts.ts"],"names":[],"mappings":"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"}