causantic 0.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 (706) hide show
  1. package/LICENSE +19 -0
  2. package/README.md +332 -0
  3. package/config.schema.json +254 -0
  4. package/dist/cli/commands/archive.d.ts +4 -0
  5. package/dist/cli/commands/archive.d.ts.map +1 -0
  6. package/dist/cli/commands/archive.js +76 -0
  7. package/dist/cli/commands/archive.js.map +1 -0
  8. package/dist/cli/commands/benchmark-collection.d.ts +8 -0
  9. package/dist/cli/commands/benchmark-collection.d.ts.map +1 -0
  10. package/dist/cli/commands/benchmark-collection.js +146 -0
  11. package/dist/cli/commands/benchmark-collection.js.map +1 -0
  12. package/dist/cli/commands/config.d.ts +3 -0
  13. package/dist/cli/commands/config.d.ts.map +1 -0
  14. package/dist/cli/commands/config.js +69 -0
  15. package/dist/cli/commands/config.js.map +1 -0
  16. package/dist/cli/commands/dashboard.d.ts +3 -0
  17. package/dist/cli/commands/dashboard.d.ts.map +1 -0
  18. package/dist/cli/commands/dashboard.js +12 -0
  19. package/dist/cli/commands/dashboard.js.map +1 -0
  20. package/dist/cli/commands/encryption.d.ts +3 -0
  21. package/dist/cli/commands/encryption.d.ts.map +1 -0
  22. package/dist/cli/commands/encryption.js +207 -0
  23. package/dist/cli/commands/encryption.js.map +1 -0
  24. package/dist/cli/commands/hook.d.ts +3 -0
  25. package/dist/cli/commands/hook.d.ts.map +1 -0
  26. package/dist/cli/commands/hook.js +35 -0
  27. package/dist/cli/commands/hook.js.map +1 -0
  28. package/dist/cli/commands/ingest.d.ts +4 -0
  29. package/dist/cli/commands/ingest.d.ts.map +1 -0
  30. package/dist/cli/commands/ingest.js +31 -0
  31. package/dist/cli/commands/ingest.js.map +1 -0
  32. package/dist/cli/commands/init.d.ts +3 -0
  33. package/dist/cli/commands/init.d.ts.map +1 -0
  34. package/dist/cli/commands/init.js +680 -0
  35. package/dist/cli/commands/init.js.map +1 -0
  36. package/dist/cli/commands/maintenance.d.ts +3 -0
  37. package/dist/cli/commands/maintenance.d.ts.map +1 -0
  38. package/dist/cli/commands/maintenance.js +67 -0
  39. package/dist/cli/commands/maintenance.js.map +1 -0
  40. package/dist/cli/commands/search.d.ts +3 -0
  41. package/dist/cli/commands/search.d.ts.map +1 -0
  42. package/dist/cli/commands/search.js +16 -0
  43. package/dist/cli/commands/search.js.map +1 -0
  44. package/dist/cli/commands/serve.d.ts +3 -0
  45. package/dist/cli/commands/serve.d.ts.map +1 -0
  46. package/dist/cli/commands/serve.js +19 -0
  47. package/dist/cli/commands/serve.js.map +1 -0
  48. package/dist/cli/commands/stats.d.ts +4 -0
  49. package/dist/cli/commands/stats.d.ts.map +1 -0
  50. package/dist/cli/commands/stats.js +49 -0
  51. package/dist/cli/commands/stats.js.map +1 -0
  52. package/dist/cli/commands/uninstall.d.ts +3 -0
  53. package/dist/cli/commands/uninstall.d.ts.map +1 -0
  54. package/dist/cli/commands/uninstall.js +10 -0
  55. package/dist/cli/commands/uninstall.js.map +1 -0
  56. package/dist/cli/index.d.ts +8 -0
  57. package/dist/cli/index.d.ts.map +1 -0
  58. package/dist/cli/index.js +86 -0
  59. package/dist/cli/index.js.map +1 -0
  60. package/dist/cli/skill-templates.d.ts +19 -0
  61. package/dist/cli/skill-templates.d.ts.map +1 -0
  62. package/dist/cli/skill-templates.js +1128 -0
  63. package/dist/cli/skill-templates.js.map +1 -0
  64. package/dist/cli/types.d.ts +10 -0
  65. package/dist/cli/types.d.ts.map +1 -0
  66. package/dist/cli/types.js +5 -0
  67. package/dist/cli/types.js.map +1 -0
  68. package/dist/cli/uninstall.d.ts +66 -0
  69. package/dist/cli/uninstall.d.ts.map +1 -0
  70. package/dist/cli/uninstall.js +490 -0
  71. package/dist/cli/uninstall.js.map +1 -0
  72. package/dist/cli/utils.d.ts +26 -0
  73. package/dist/cli/utils.d.ts.map +1 -0
  74. package/dist/cli/utils.js +105 -0
  75. package/dist/cli/utils.js.map +1 -0
  76. package/dist/clusters/cluster-manager.d.ts +96 -0
  77. package/dist/clusters/cluster-manager.d.ts.map +1 -0
  78. package/dist/clusters/cluster-manager.js +321 -0
  79. package/dist/clusters/cluster-manager.js.map +1 -0
  80. package/dist/clusters/cluster-refresh.d.ts +56 -0
  81. package/dist/clusters/cluster-refresh.d.ts.map +1 -0
  82. package/dist/clusters/cluster-refresh.js +187 -0
  83. package/dist/clusters/cluster-refresh.js.map +1 -0
  84. package/dist/clusters/hdbscan/cluster-extraction.d.ts +26 -0
  85. package/dist/clusters/hdbscan/cluster-extraction.d.ts.map +1 -0
  86. package/dist/clusters/hdbscan/cluster-extraction.js +232 -0
  87. package/dist/clusters/hdbscan/cluster-extraction.js.map +1 -0
  88. package/dist/clusters/hdbscan/core-distance-worker.d.ts +6 -0
  89. package/dist/clusters/hdbscan/core-distance-worker.d.ts.map +1 -0
  90. package/dist/clusters/hdbscan/core-distance-worker.js +54 -0
  91. package/dist/clusters/hdbscan/core-distance-worker.js.map +1 -0
  92. package/dist/clusters/hdbscan/core-distance.d.ts +26 -0
  93. package/dist/clusters/hdbscan/core-distance.d.ts.map +1 -0
  94. package/dist/clusters/hdbscan/core-distance.js +94 -0
  95. package/dist/clusters/hdbscan/core-distance.js.map +1 -0
  96. package/dist/clusters/hdbscan/distance-cache.d.ts +46 -0
  97. package/dist/clusters/hdbscan/distance-cache.d.ts.map +1 -0
  98. package/dist/clusters/hdbscan/distance-cache.js +84 -0
  99. package/dist/clusters/hdbscan/distance-cache.js.map +1 -0
  100. package/dist/clusters/hdbscan/hierarchy.d.ts +34 -0
  101. package/dist/clusters/hdbscan/hierarchy.d.ts.map +1 -0
  102. package/dist/clusters/hdbscan/hierarchy.js +442 -0
  103. package/dist/clusters/hdbscan/hierarchy.js.map +1 -0
  104. package/dist/clusters/hdbscan/incremental.d.ts +30 -0
  105. package/dist/clusters/hdbscan/incremental.d.ts.map +1 -0
  106. package/dist/clusters/hdbscan/incremental.js +130 -0
  107. package/dist/clusters/hdbscan/incremental.js.map +1 -0
  108. package/dist/clusters/hdbscan/kd-tree.d.ts +51 -0
  109. package/dist/clusters/hdbscan/kd-tree.d.ts.map +1 -0
  110. package/dist/clusters/hdbscan/kd-tree.js +130 -0
  111. package/dist/clusters/hdbscan/kd-tree.js.map +1 -0
  112. package/dist/clusters/hdbscan/min-heap.d.ts +62 -0
  113. package/dist/clusters/hdbscan/min-heap.d.ts.map +1 -0
  114. package/dist/clusters/hdbscan/min-heap.js +139 -0
  115. package/dist/clusters/hdbscan/min-heap.js.map +1 -0
  116. package/dist/clusters/hdbscan/mst.d.ts +20 -0
  117. package/dist/clusters/hdbscan/mst.d.ts.map +1 -0
  118. package/dist/clusters/hdbscan/mst.js +77 -0
  119. package/dist/clusters/hdbscan/mst.js.map +1 -0
  120. package/dist/clusters/hdbscan/probabilities.d.ts +37 -0
  121. package/dist/clusters/hdbscan/probabilities.d.ts.map +1 -0
  122. package/dist/clusters/hdbscan/probabilities.js +149 -0
  123. package/dist/clusters/hdbscan/probabilities.js.map +1 -0
  124. package/dist/clusters/hdbscan/types.d.ts +123 -0
  125. package/dist/clusters/hdbscan/types.d.ts.map +1 -0
  126. package/dist/clusters/hdbscan/types.js +5 -0
  127. package/dist/clusters/hdbscan/types.js.map +1 -0
  128. package/dist/clusters/hdbscan/union-find.d.ts +51 -0
  129. package/dist/clusters/hdbscan/union-find.d.ts.map +1 -0
  130. package/dist/clusters/hdbscan/union-find.js +115 -0
  131. package/dist/clusters/hdbscan/union-find.js.map +1 -0
  132. package/dist/clusters/hdbscan.d.ts +71 -0
  133. package/dist/clusters/hdbscan.d.ts.map +1 -0
  134. package/dist/clusters/hdbscan.js +283 -0
  135. package/dist/clusters/hdbscan.js.map +1 -0
  136. package/dist/clusters/index.d.ts +8 -0
  137. package/dist/clusters/index.d.ts.map +1 -0
  138. package/dist/clusters/index.js +8 -0
  139. package/dist/clusters/index.js.map +1 -0
  140. package/dist/config/index.d.ts +6 -0
  141. package/dist/config/index.d.ts.map +1 -0
  142. package/dist/config/index.js +6 -0
  143. package/dist/config/index.js.map +1 -0
  144. package/dist/config/loader.d.ts +105 -0
  145. package/dist/config/loader.d.ts.map +1 -0
  146. package/dist/config/loader.js +339 -0
  147. package/dist/config/loader.js.map +1 -0
  148. package/dist/config/memory-config.d.ts +109 -0
  149. package/dist/config/memory-config.d.ts.map +1 -0
  150. package/dist/config/memory-config.js +182 -0
  151. package/dist/config/memory-config.js.map +1 -0
  152. package/dist/core/benchmark-types.d.ts +62 -0
  153. package/dist/core/benchmark-types.d.ts.map +1 -0
  154. package/dist/core/benchmark-types.js +11 -0
  155. package/dist/core/benchmark-types.js.map +1 -0
  156. package/dist/core/decay-types.d.ts +111 -0
  157. package/dist/core/decay-types.d.ts.map +1 -0
  158. package/dist/core/decay-types.js +30 -0
  159. package/dist/core/decay-types.js.map +1 -0
  160. package/dist/core/index.d.ts +11 -0
  161. package/dist/core/index.d.ts.map +1 -0
  162. package/dist/core/index.js +9 -0
  163. package/dist/core/index.js.map +1 -0
  164. package/dist/core/lexical-features.d.ts +34 -0
  165. package/dist/core/lexical-features.d.ts.map +1 -0
  166. package/dist/core/lexical-features.js +155 -0
  167. package/dist/core/lexical-features.js.map +1 -0
  168. package/dist/dashboard/client/assets/index-CMUKy4f9.css +1 -0
  169. package/dist/dashboard/client/assets/index-esv8TpCN.js +168 -0
  170. package/dist/dashboard/client/index.html +14 -0
  171. package/dist/dashboard/middleware/async-handler.d.ts +11 -0
  172. package/dist/dashboard/middleware/async-handler.d.ts.map +1 -0
  173. package/dist/dashboard/middleware/async-handler.js +12 -0
  174. package/dist/dashboard/middleware/async-handler.js.map +1 -0
  175. package/dist/dashboard/middleware/error-handler.d.ts +9 -0
  176. package/dist/dashboard/middleware/error-handler.d.ts.map +1 -0
  177. package/dist/dashboard/middleware/error-handler.js +14 -0
  178. package/dist/dashboard/middleware/error-handler.js.map +1 -0
  179. package/dist/dashboard/routes/benchmark-collection.d.ts +11 -0
  180. package/dist/dashboard/routes/benchmark-collection.d.ts.map +1 -0
  181. package/dist/dashboard/routes/benchmark-collection.js +49 -0
  182. package/dist/dashboard/routes/benchmark-collection.js.map +1 -0
  183. package/dist/dashboard/routes/chunks.d.ts +3 -0
  184. package/dist/dashboard/routes/chunks.d.ts.map +1 -0
  185. package/dist/dashboard/routes/chunks.js +25 -0
  186. package/dist/dashboard/routes/chunks.js.map +1 -0
  187. package/dist/dashboard/routes/clusters.d.ts +3 -0
  188. package/dist/dashboard/routes/clusters.d.ts.map +1 -0
  189. package/dist/dashboard/routes/clusters.js +28 -0
  190. package/dist/dashboard/routes/clusters.js.map +1 -0
  191. package/dist/dashboard/routes/edges.d.ts +3 -0
  192. package/dist/dashboard/routes/edges.d.ts.map +1 -0
  193. package/dist/dashboard/routes/edges.js +32 -0
  194. package/dist/dashboard/routes/edges.js.map +1 -0
  195. package/dist/dashboard/routes/graph.d.ts +3 -0
  196. package/dist/dashboard/routes/graph.d.ts.map +1 -0
  197. package/dist/dashboard/routes/graph.js +158 -0
  198. package/dist/dashboard/routes/graph.js.map +1 -0
  199. package/dist/dashboard/routes/projects.d.ts +3 -0
  200. package/dist/dashboard/routes/projects.d.ts.map +1 -0
  201. package/dist/dashboard/routes/projects.js +9 -0
  202. package/dist/dashboard/routes/projects.js.map +1 -0
  203. package/dist/dashboard/routes/search.d.ts +3 -0
  204. package/dist/dashboard/routes/search.d.ts.map +1 -0
  205. package/dist/dashboard/routes/search.js +105 -0
  206. package/dist/dashboard/routes/search.js.map +1 -0
  207. package/dist/dashboard/routes/sessions.d.ts +3 -0
  208. package/dist/dashboard/routes/sessions.d.ts.map +1 -0
  209. package/dist/dashboard/routes/sessions.js +16 -0
  210. package/dist/dashboard/routes/sessions.js.map +1 -0
  211. package/dist/dashboard/routes/stats.d.ts +3 -0
  212. package/dist/dashboard/routes/stats.d.ts.map +1 -0
  213. package/dist/dashboard/routes/stats.js +38 -0
  214. package/dist/dashboard/routes/stats.js.map +1 -0
  215. package/dist/dashboard/server.d.ts +3 -0
  216. package/dist/dashboard/server.d.ts.map +1 -0
  217. package/dist/dashboard/server.js +85 -0
  218. package/dist/dashboard/server.js.map +1 -0
  219. package/dist/eval/annotation-schema.d.ts +41 -0
  220. package/dist/eval/annotation-schema.d.ts.map +1 -0
  221. package/dist/eval/annotation-schema.js +171 -0
  222. package/dist/eval/annotation-schema.js.map +1 -0
  223. package/dist/eval/benchmark-runner.d.ts +15 -0
  224. package/dist/eval/benchmark-runner.d.ts.map +1 -0
  225. package/dist/eval/benchmark-runner.js +93 -0
  226. package/dist/eval/benchmark-runner.js.map +1 -0
  227. package/dist/eval/cluster-evaluator.d.ts +39 -0
  228. package/dist/eval/cluster-evaluator.d.ts.map +1 -0
  229. package/dist/eval/cluster-evaluator.js +51 -0
  230. package/dist/eval/cluster-evaluator.js.map +1 -0
  231. package/dist/eval/code-nl-alignment.d.ts +25 -0
  232. package/dist/eval/code-nl-alignment.d.ts.map +1 -0
  233. package/dist/eval/code-nl-alignment.js +49 -0
  234. package/dist/eval/code-nl-alignment.js.map +1 -0
  235. package/dist/eval/collection-benchmark/graph-value.d.ts +16 -0
  236. package/dist/eval/collection-benchmark/graph-value.d.ts.map +1 -0
  237. package/dist/eval/collection-benchmark/graph-value.js +162 -0
  238. package/dist/eval/collection-benchmark/graph-value.js.map +1 -0
  239. package/dist/eval/collection-benchmark/health.d.ts +12 -0
  240. package/dist/eval/collection-benchmark/health.d.ts.map +1 -0
  241. package/dist/eval/collection-benchmark/health.js +246 -0
  242. package/dist/eval/collection-benchmark/health.js.map +1 -0
  243. package/dist/eval/collection-benchmark/history.d.ts +27 -0
  244. package/dist/eval/collection-benchmark/history.d.ts.map +1 -0
  245. package/dist/eval/collection-benchmark/history.js +134 -0
  246. package/dist/eval/collection-benchmark/history.js.map +1 -0
  247. package/dist/eval/collection-benchmark/latency.d.ts +16 -0
  248. package/dist/eval/collection-benchmark/latency.d.ts.map +1 -0
  249. package/dist/eval/collection-benchmark/latency.js +115 -0
  250. package/dist/eval/collection-benchmark/latency.js.map +1 -0
  251. package/dist/eval/collection-benchmark/reporter.d.ts +18 -0
  252. package/dist/eval/collection-benchmark/reporter.d.ts.map +1 -0
  253. package/dist/eval/collection-benchmark/reporter.js +244 -0
  254. package/dist/eval/collection-benchmark/reporter.js.map +1 -0
  255. package/dist/eval/collection-benchmark/retrieval.d.ts +15 -0
  256. package/dist/eval/collection-benchmark/retrieval.d.ts.map +1 -0
  257. package/dist/eval/collection-benchmark/retrieval.js +203 -0
  258. package/dist/eval/collection-benchmark/retrieval.js.map +1 -0
  259. package/dist/eval/collection-benchmark/runner.d.ts +20 -0
  260. package/dist/eval/collection-benchmark/runner.d.ts.map +1 -0
  261. package/dist/eval/collection-benchmark/runner.js +189 -0
  262. package/dist/eval/collection-benchmark/runner.js.map +1 -0
  263. package/dist/eval/collection-benchmark/sampler.d.ts +18 -0
  264. package/dist/eval/collection-benchmark/sampler.d.ts.map +1 -0
  265. package/dist/eval/collection-benchmark/sampler.js +186 -0
  266. package/dist/eval/collection-benchmark/sampler.js.map +1 -0
  267. package/dist/eval/collection-benchmark/tuning.d.ts +12 -0
  268. package/dist/eval/collection-benchmark/tuning.d.ts.map +1 -0
  269. package/dist/eval/collection-benchmark/tuning.js +222 -0
  270. package/dist/eval/collection-benchmark/tuning.js.map +1 -0
  271. package/dist/eval/collection-benchmark/types.d.ts +183 -0
  272. package/dist/eval/collection-benchmark/types.d.ts.map +1 -0
  273. package/dist/eval/collection-benchmark/types.js +7 -0
  274. package/dist/eval/collection-benchmark/types.js.map +1 -0
  275. package/dist/eval/context-window-test.d.ts +34 -0
  276. package/dist/eval/context-window-test.d.ts.map +1 -0
  277. package/dist/eval/context-window-test.js +59 -0
  278. package/dist/eval/context-window-test.js.map +1 -0
  279. package/dist/eval/corpus-builder.d.ts +33 -0
  280. package/dist/eval/corpus-builder.d.ts.map +1 -0
  281. package/dist/eval/corpus-builder.js +88 -0
  282. package/dist/eval/corpus-builder.js.map +1 -0
  283. package/dist/eval/experiments/boilerplate-filter.d.ts +26 -0
  284. package/dist/eval/experiments/boilerplate-filter.d.ts.map +1 -0
  285. package/dist/eval/experiments/boilerplate-filter.js +95 -0
  286. package/dist/eval/experiments/boilerplate-filter.js.map +1 -0
  287. package/dist/eval/experiments/cluster-threshold/index.d.ts +6 -0
  288. package/dist/eval/experiments/cluster-threshold/index.d.ts.map +1 -0
  289. package/dist/eval/experiments/cluster-threshold/index.js +5 -0
  290. package/dist/eval/experiments/cluster-threshold/index.js.map +1 -0
  291. package/dist/eval/experiments/cluster-threshold/run-threshold-sweep.d.ts +58 -0
  292. package/dist/eval/experiments/cluster-threshold/run-threshold-sweep.d.ts.map +1 -0
  293. package/dist/eval/experiments/cluster-threshold/run-threshold-sweep.js +246 -0
  294. package/dist/eval/experiments/cluster-threshold/run-threshold-sweep.js.map +1 -0
  295. package/dist/eval/experiments/code-focused-mode.d.ts +20 -0
  296. package/dist/eval/experiments/code-focused-mode.d.ts.map +1 -0
  297. package/dist/eval/experiments/code-focused-mode.js +66 -0
  298. package/dist/eval/experiments/code-focused-mode.js.map +1 -0
  299. package/dist/eval/experiments/edge-decay/decay-curves.d.ts +59 -0
  300. package/dist/eval/experiments/edge-decay/decay-curves.d.ts.map +1 -0
  301. package/dist/eval/experiments/edge-decay/decay-curves.js +124 -0
  302. package/dist/eval/experiments/edge-decay/decay-curves.js.map +1 -0
  303. package/dist/eval/experiments/edge-decay/index.d.ts +13 -0
  304. package/dist/eval/experiments/edge-decay/index.d.ts.map +1 -0
  305. package/dist/eval/experiments/edge-decay/index.js +16 -0
  306. package/dist/eval/experiments/edge-decay/index.js.map +1 -0
  307. package/dist/eval/experiments/edge-decay/presets.d.ts +52 -0
  308. package/dist/eval/experiments/edge-decay/presets.d.ts.map +1 -0
  309. package/dist/eval/experiments/edge-decay/presets.js +234 -0
  310. package/dist/eval/experiments/edge-decay/presets.js.map +1 -0
  311. package/dist/eval/experiments/edge-decay/reference-extractor.d.ts +34 -0
  312. package/dist/eval/experiments/edge-decay/reference-extractor.d.ts.map +1 -0
  313. package/dist/eval/experiments/edge-decay/reference-extractor.js +353 -0
  314. package/dist/eval/experiments/edge-decay/reference-extractor.js.map +1 -0
  315. package/dist/eval/experiments/edge-decay/reference-types.d.ts +131 -0
  316. package/dist/eval/experiments/edge-decay/reference-types.d.ts.map +1 -0
  317. package/dist/eval/experiments/edge-decay/reference-types.js +5 -0
  318. package/dist/eval/experiments/edge-decay/reference-types.js.map +1 -0
  319. package/dist/eval/experiments/edge-decay/retrieval-ranking.d.ts +64 -0
  320. package/dist/eval/experiments/edge-decay/retrieval-ranking.d.ts.map +1 -0
  321. package/dist/eval/experiments/edge-decay/retrieval-ranking.js +565 -0
  322. package/dist/eval/experiments/edge-decay/retrieval-ranking.js.map +1 -0
  323. package/dist/eval/experiments/edge-decay/run-experiments.d.ts +25 -0
  324. package/dist/eval/experiments/edge-decay/run-experiments.d.ts.map +1 -0
  325. package/dist/eval/experiments/edge-decay/run-experiments.js +229 -0
  326. package/dist/eval/experiments/edge-decay/run-experiments.js.map +1 -0
  327. package/dist/eval/experiments/edge-decay/simulate.d.ts +42 -0
  328. package/dist/eval/experiments/edge-decay/simulate.d.ts.map +1 -0
  329. package/dist/eval/experiments/edge-decay/simulate.js +232 -0
  330. package/dist/eval/experiments/edge-decay/simulate.js.map +1 -0
  331. package/dist/eval/experiments/edge-decay/types.d.ts +10 -0
  332. package/dist/eval/experiments/edge-decay/types.d.ts.map +1 -0
  333. package/dist/eval/experiments/edge-decay/types.js +9 -0
  334. package/dist/eval/experiments/edge-decay/types.js.map +1 -0
  335. package/dist/eval/experiments/hdbscan-sweep.d.ts +19 -0
  336. package/dist/eval/experiments/hdbscan-sweep.d.ts.map +1 -0
  337. package/dist/eval/experiments/hdbscan-sweep.js +71 -0
  338. package/dist/eval/experiments/hdbscan-sweep.js.map +1 -0
  339. package/dist/eval/experiments/single-model-run.d.ts +54 -0
  340. package/dist/eval/experiments/single-model-run.d.ts.map +1 -0
  341. package/dist/eval/experiments/single-model-run.js +120 -0
  342. package/dist/eval/experiments/single-model-run.js.map +1 -0
  343. package/dist/eval/experiments/thinking-ablation.d.ts +21 -0
  344. package/dist/eval/experiments/thinking-ablation.d.ts.map +1 -0
  345. package/dist/eval/experiments/thinking-ablation.js +68 -0
  346. package/dist/eval/experiments/thinking-ablation.js.map +1 -0
  347. package/dist/eval/experiments/topic-continuity/embedding-classifier.d.ts +55 -0
  348. package/dist/eval/experiments/topic-continuity/embedding-classifier.d.ts.map +1 -0
  349. package/dist/eval/experiments/topic-continuity/embedding-classifier.js +126 -0
  350. package/dist/eval/experiments/topic-continuity/embedding-classifier.js.map +1 -0
  351. package/dist/eval/experiments/topic-continuity/hybrid-classifier.d.ts +68 -0
  352. package/dist/eval/experiments/topic-continuity/hybrid-classifier.d.ts.map +1 -0
  353. package/dist/eval/experiments/topic-continuity/hybrid-classifier.js +175 -0
  354. package/dist/eval/experiments/topic-continuity/hybrid-classifier.js.map +1 -0
  355. package/dist/eval/experiments/topic-continuity/index.d.ts +13 -0
  356. package/dist/eval/experiments/topic-continuity/index.d.ts.map +1 -0
  357. package/dist/eval/experiments/topic-continuity/index.js +17 -0
  358. package/dist/eval/experiments/topic-continuity/index.js.map +1 -0
  359. package/dist/eval/experiments/topic-continuity/labeler.d.ts +42 -0
  360. package/dist/eval/experiments/topic-continuity/labeler.d.ts.map +1 -0
  361. package/dist/eval/experiments/topic-continuity/labeler.js +253 -0
  362. package/dist/eval/experiments/topic-continuity/labeler.js.map +1 -0
  363. package/dist/eval/experiments/topic-continuity/lexical-features.d.ts +26 -0
  364. package/dist/eval/experiments/topic-continuity/lexical-features.d.ts.map +1 -0
  365. package/dist/eval/experiments/topic-continuity/lexical-features.js +58 -0
  366. package/dist/eval/experiments/topic-continuity/lexical-features.js.map +1 -0
  367. package/dist/eval/experiments/topic-continuity/run-experiment.d.ts +40 -0
  368. package/dist/eval/experiments/topic-continuity/run-experiment.d.ts.map +1 -0
  369. package/dist/eval/experiments/topic-continuity/run-experiment.js +379 -0
  370. package/dist/eval/experiments/topic-continuity/run-experiment.js.map +1 -0
  371. package/dist/eval/experiments/topic-continuity/types.d.ts +146 -0
  372. package/dist/eval/experiments/topic-continuity/types.d.ts.map +1 -0
  373. package/dist/eval/experiments/topic-continuity/types.js +9 -0
  374. package/dist/eval/experiments/topic-continuity/types.js.map +1 -0
  375. package/dist/eval/experiments/truncation.d.ts +21 -0
  376. package/dist/eval/experiments/truncation.d.ts.map +1 -0
  377. package/dist/eval/experiments/truncation.js +59 -0
  378. package/dist/eval/experiments/truncation.js.map +1 -0
  379. package/dist/eval/experiments/types.d.ts +37 -0
  380. package/dist/eval/experiments/types.d.ts.map +1 -0
  381. package/dist/eval/experiments/types.js +13 -0
  382. package/dist/eval/experiments/types.js.map +1 -0
  383. package/dist/eval/experiments/vector-decay-shapes/curve-shapes-experiment.d.ts +10 -0
  384. package/dist/eval/experiments/vector-decay-shapes/curve-shapes-experiment.d.ts.map +1 -0
  385. package/dist/eval/experiments/vector-decay-shapes/curve-shapes-experiment.js +229 -0
  386. package/dist/eval/experiments/vector-decay-shapes/curve-shapes-experiment.js.map +1 -0
  387. package/dist/eval/experiments/vector-decay-shapes/graph-range-experiment.d.ts +12 -0
  388. package/dist/eval/experiments/vector-decay-shapes/graph-range-experiment.d.ts.map +1 -0
  389. package/dist/eval/experiments/vector-decay-shapes/graph-range-experiment.js +316 -0
  390. package/dist/eval/experiments/vector-decay-shapes/graph-range-experiment.js.map +1 -0
  391. package/dist/eval/experiments/vector-decay-shapes/hop-decay.d.ts +19 -0
  392. package/dist/eval/experiments/vector-decay-shapes/hop-decay.d.ts.map +1 -0
  393. package/dist/eval/experiments/vector-decay-shapes/hop-decay.js +127 -0
  394. package/dist/eval/experiments/vector-decay-shapes/hop-decay.js.map +1 -0
  395. package/dist/eval/experiments/vector-decay-shapes/index.d.ts +11 -0
  396. package/dist/eval/experiments/vector-decay-shapes/index.d.ts.map +1 -0
  397. package/dist/eval/experiments/vector-decay-shapes/index.js +11 -0
  398. package/dist/eval/experiments/vector-decay-shapes/index.js.map +1 -0
  399. package/dist/eval/experiments/vector-decay-shapes/path-traversal-experiment.d.ts +14 -0
  400. package/dist/eval/experiments/vector-decay-shapes/path-traversal-experiment.d.ts.map +1 -0
  401. package/dist/eval/experiments/vector-decay-shapes/path-traversal-experiment.js +274 -0
  402. package/dist/eval/experiments/vector-decay-shapes/path-traversal-experiment.js.map +1 -0
  403. package/dist/eval/experiments/vector-decay-shapes/presets.d.ts +36 -0
  404. package/dist/eval/experiments/vector-decay-shapes/presets.d.ts.map +1 -0
  405. package/dist/eval/experiments/vector-decay-shapes/presets.js +157 -0
  406. package/dist/eval/experiments/vector-decay-shapes/presets.js.map +1 -0
  407. package/dist/eval/experiments/vector-decay-shapes/run-experiment.d.ts +20 -0
  408. package/dist/eval/experiments/vector-decay-shapes/run-experiment.d.ts.map +1 -0
  409. package/dist/eval/experiments/vector-decay-shapes/run-experiment.js +504 -0
  410. package/dist/eval/experiments/vector-decay-shapes/run-experiment.js.map +1 -0
  411. package/dist/eval/experiments/vector-decay-shapes/types.d.ts +111 -0
  412. package/dist/eval/experiments/vector-decay-shapes/types.d.ts.map +1 -0
  413. package/dist/eval/experiments/vector-decay-shapes/types.js +15 -0
  414. package/dist/eval/experiments/vector-decay-shapes/types.js.map +1 -0
  415. package/dist/eval/experiments/vector-decay-sweep/index.d.ts +7 -0
  416. package/dist/eval/experiments/vector-decay-sweep/index.d.ts.map +1 -0
  417. package/dist/eval/experiments/vector-decay-sweep/index.js +7 -0
  418. package/dist/eval/experiments/vector-decay-sweep/index.js.map +1 -0
  419. package/dist/eval/experiments/vector-decay-sweep/run-sweep.d.ts +30 -0
  420. package/dist/eval/experiments/vector-decay-sweep/run-sweep.d.ts.map +1 -0
  421. package/dist/eval/experiments/vector-decay-sweep/run-sweep.js +378 -0
  422. package/dist/eval/experiments/vector-decay-sweep/run-sweep.js.map +1 -0
  423. package/dist/eval/experiments/vector-decay-sweep/types.d.ts +109 -0
  424. package/dist/eval/experiments/vector-decay-sweep/types.d.ts.map +1 -0
  425. package/dist/eval/experiments/vector-decay-sweep/types.js +16 -0
  426. package/dist/eval/experiments/vector-decay-sweep/types.js.map +1 -0
  427. package/dist/eval/metrics.d.ts +45 -0
  428. package/dist/eval/metrics.d.ts.map +1 -0
  429. package/dist/eval/metrics.js +134 -0
  430. package/dist/eval/metrics.js.map +1 -0
  431. package/dist/hooks/claudemd-generator.d.ts +62 -0
  432. package/dist/hooks/claudemd-generator.d.ts.map +1 -0
  433. package/dist/hooks/claudemd-generator.js +220 -0
  434. package/dist/hooks/claudemd-generator.js.map +1 -0
  435. package/dist/hooks/hook-utils.d.ts +84 -0
  436. package/dist/hooks/hook-utils.d.ts.map +1 -0
  437. package/dist/hooks/hook-utils.js +187 -0
  438. package/dist/hooks/hook-utils.js.map +1 -0
  439. package/dist/hooks/index.d.ts +12 -0
  440. package/dist/hooks/index.d.ts.map +1 -0
  441. package/dist/hooks/index.js +12 -0
  442. package/dist/hooks/index.js.map +1 -0
  443. package/dist/hooks/pre-compact.d.ts +58 -0
  444. package/dist/hooks/pre-compact.d.ts.map +1 -0
  445. package/dist/hooks/pre-compact.js +127 -0
  446. package/dist/hooks/pre-compact.js.map +1 -0
  447. package/dist/hooks/session-start.d.ts +62 -0
  448. package/dist/hooks/session-start.d.ts.map +1 -0
  449. package/dist/hooks/session-start.js +249 -0
  450. package/dist/hooks/session-start.js.map +1 -0
  451. package/dist/index.d.ts +22 -0
  452. package/dist/index.d.ts.map +1 -0
  453. package/dist/index.js +29 -0
  454. package/dist/index.js.map +1 -0
  455. package/dist/ingest/batch-ingest.d.ts +94 -0
  456. package/dist/ingest/batch-ingest.d.ts.map +1 -0
  457. package/dist/ingest/batch-ingest.js +167 -0
  458. package/dist/ingest/batch-ingest.js.map +1 -0
  459. package/dist/ingest/brief-debrief-detector.d.ts +74 -0
  460. package/dist/ingest/brief-debrief-detector.d.ts.map +1 -0
  461. package/dist/ingest/brief-debrief-detector.js +253 -0
  462. package/dist/ingest/brief-debrief-detector.js.map +1 -0
  463. package/dist/ingest/cross-session-linker.d.ts +39 -0
  464. package/dist/ingest/cross-session-linker.d.ts.map +1 -0
  465. package/dist/ingest/cross-session-linker.js +103 -0
  466. package/dist/ingest/cross-session-linker.js.map +1 -0
  467. package/dist/ingest/edge-creator.d.ts +62 -0
  468. package/dist/ingest/edge-creator.d.ts.map +1 -0
  469. package/dist/ingest/edge-creator.js +186 -0
  470. package/dist/ingest/edge-creator.js.map +1 -0
  471. package/dist/ingest/edge-detector.d.ts +37 -0
  472. package/dist/ingest/edge-detector.d.ts.map +1 -0
  473. package/dist/ingest/edge-detector.js +234 -0
  474. package/dist/ingest/edge-detector.js.map +1 -0
  475. package/dist/ingest/index.d.ts +14 -0
  476. package/dist/ingest/index.d.ts.map +1 -0
  477. package/dist/ingest/index.js +14 -0
  478. package/dist/ingest/index.js.map +1 -0
  479. package/dist/ingest/ingest-session.d.ts +83 -0
  480. package/dist/ingest/ingest-session.d.ts.map +1 -0
  481. package/dist/ingest/ingest-session.js +415 -0
  482. package/dist/ingest/ingest-session.js.map +1 -0
  483. package/dist/maintenance/index.d.ts +5 -0
  484. package/dist/maintenance/index.d.ts.map +1 -0
  485. package/dist/maintenance/index.js +5 -0
  486. package/dist/maintenance/index.js.map +1 -0
  487. package/dist/maintenance/scheduler.d.ts +79 -0
  488. package/dist/maintenance/scheduler.d.ts.map +1 -0
  489. package/dist/maintenance/scheduler.js +362 -0
  490. package/dist/maintenance/scheduler.js.map +1 -0
  491. package/dist/maintenance/tasks/cleanup-vectors.d.ts +10 -0
  492. package/dist/maintenance/tasks/cleanup-vectors.d.ts.map +1 -0
  493. package/dist/maintenance/tasks/cleanup-vectors.js +23 -0
  494. package/dist/maintenance/tasks/cleanup-vectors.js.map +1 -0
  495. package/dist/maintenance/tasks/index.d.ts +9 -0
  496. package/dist/maintenance/tasks/index.d.ts.map +1 -0
  497. package/dist/maintenance/tasks/index.js +9 -0
  498. package/dist/maintenance/tasks/index.js.map +1 -0
  499. package/dist/maintenance/tasks/prune-graph.d.ts +12 -0
  500. package/dist/maintenance/tasks/prune-graph.d.ts.map +1 -0
  501. package/dist/maintenance/tasks/prune-graph.js +23 -0
  502. package/dist/maintenance/tasks/prune-graph.js.map +1 -0
  503. package/dist/maintenance/tasks/scan-projects.d.ts +12 -0
  504. package/dist/maintenance/tasks/scan-projects.d.ts.map +1 -0
  505. package/dist/maintenance/tasks/scan-projects.js +31 -0
  506. package/dist/maintenance/tasks/scan-projects.js.map +1 -0
  507. package/dist/maintenance/tasks/update-clusters.d.ts +12 -0
  508. package/dist/maintenance/tasks/update-clusters.d.ts.map +1 -0
  509. package/dist/maintenance/tasks/update-clusters.js +41 -0
  510. package/dist/maintenance/tasks/update-clusters.js.map +1 -0
  511. package/dist/maintenance/tasks/vacuum.d.ts +10 -0
  512. package/dist/maintenance/tasks/vacuum.d.ts.map +1 -0
  513. package/dist/maintenance/tasks/vacuum.js +23 -0
  514. package/dist/maintenance/tasks/vacuum.js.map +1 -0
  515. package/dist/mcp/index.d.ts +7 -0
  516. package/dist/mcp/index.d.ts.map +1 -0
  517. package/dist/mcp/index.js +8 -0
  518. package/dist/mcp/index.js.map +1 -0
  519. package/dist/mcp/server.d.ts +90 -0
  520. package/dist/mcp/server.d.ts.map +1 -0
  521. package/dist/mcp/server.js +395 -0
  522. package/dist/mcp/server.js.map +1 -0
  523. package/dist/mcp/tools.d.ts +52 -0
  524. package/dist/mcp/tools.d.ts.map +1 -0
  525. package/dist/mcp/tools.js +292 -0
  526. package/dist/mcp/tools.js.map +1 -0
  527. package/dist/models/device-detector.d.ts +32 -0
  528. package/dist/models/device-detector.d.ts.map +1 -0
  529. package/dist/models/device-detector.js +123 -0
  530. package/dist/models/device-detector.js.map +1 -0
  531. package/dist/models/embedder.d.ts +60 -0
  532. package/dist/models/embedder.d.ts.map +1 -0
  533. package/dist/models/embedder.js +171 -0
  534. package/dist/models/embedder.js.map +1 -0
  535. package/dist/models/model-registry.d.ts +25 -0
  536. package/dist/models/model-registry.d.ts.map +1 -0
  537. package/dist/models/model-registry.js +56 -0
  538. package/dist/models/model-registry.js.map +1 -0
  539. package/dist/parser/chunker.d.ts +74 -0
  540. package/dist/parser/chunker.d.ts.map +1 -0
  541. package/dist/parser/chunker.js +330 -0
  542. package/dist/parser/chunker.js.map +1 -0
  543. package/dist/parser/session-reader.d.ts +75 -0
  544. package/dist/parser/session-reader.d.ts.map +1 -0
  545. package/dist/parser/session-reader.js +198 -0
  546. package/dist/parser/session-reader.js.map +1 -0
  547. package/dist/parser/turn-assembler.d.ts +18 -0
  548. package/dist/parser/turn-assembler.d.ts.map +1 -0
  549. package/dist/parser/turn-assembler.js +150 -0
  550. package/dist/parser/turn-assembler.js.map +1 -0
  551. package/dist/parser/types.d.ts +124 -0
  552. package/dist/parser/types.d.ts.map +1 -0
  553. package/dist/parser/types.js +8 -0
  554. package/dist/parser/types.js.map +1 -0
  555. package/dist/report/reporter.d.ts +18 -0
  556. package/dist/report/reporter.d.ts.map +1 -0
  557. package/dist/report/reporter.js +121 -0
  558. package/dist/report/reporter.js.map +1 -0
  559. package/dist/retrieval/cluster-expander.d.ts +30 -0
  560. package/dist/retrieval/cluster-expander.d.ts.map +1 -0
  561. package/dist/retrieval/cluster-expander.js +87 -0
  562. package/dist/retrieval/cluster-expander.js.map +1 -0
  563. package/dist/retrieval/context-assembler.d.ts +89 -0
  564. package/dist/retrieval/context-assembler.d.ts.map +1 -0
  565. package/dist/retrieval/context-assembler.js +313 -0
  566. package/dist/retrieval/context-assembler.js.map +1 -0
  567. package/dist/retrieval/index.d.ts +12 -0
  568. package/dist/retrieval/index.d.ts.map +1 -0
  569. package/dist/retrieval/index.js +12 -0
  570. package/dist/retrieval/index.js.map +1 -0
  571. package/dist/retrieval/rrf.d.ts +25 -0
  572. package/dist/retrieval/rrf.d.ts.map +1 -0
  573. package/dist/retrieval/rrf.js +56 -0
  574. package/dist/retrieval/rrf.js.map +1 -0
  575. package/dist/retrieval/session-reconstructor.d.ts +79 -0
  576. package/dist/retrieval/session-reconstructor.d.ts.map +1 -0
  577. package/dist/retrieval/session-reconstructor.js +173 -0
  578. package/dist/retrieval/session-reconstructor.js.map +1 -0
  579. package/dist/retrieval/traverser.d.ts +66 -0
  580. package/dist/retrieval/traverser.d.ts.map +1 -0
  581. package/dist/retrieval/traverser.js +160 -0
  582. package/dist/retrieval/traverser.js.map +1 -0
  583. package/dist/storage/archive.d.ts +81 -0
  584. package/dist/storage/archive.d.ts.map +1 -0
  585. package/dist/storage/archive.js +204 -0
  586. package/dist/storage/archive.js.map +1 -0
  587. package/dist/storage/audit-log.d.ts +29 -0
  588. package/dist/storage/audit-log.d.ts.map +1 -0
  589. package/dist/storage/audit-log.js +69 -0
  590. package/dist/storage/audit-log.js.map +1 -0
  591. package/dist/storage/checkpoint-store.d.ts +38 -0
  592. package/dist/storage/checkpoint-store.d.ts.map +1 -0
  593. package/dist/storage/checkpoint-store.js +76 -0
  594. package/dist/storage/checkpoint-store.js.map +1 -0
  595. package/dist/storage/chunk-store.d.ts +111 -0
  596. package/dist/storage/chunk-store.d.ts.map +1 -0
  597. package/dist/storage/chunk-store.js +298 -0
  598. package/dist/storage/chunk-store.js.map +1 -0
  599. package/dist/storage/clock-store.d.ts +80 -0
  600. package/dist/storage/clock-store.d.ts.map +1 -0
  601. package/dist/storage/clock-store.js +155 -0
  602. package/dist/storage/clock-store.js.map +1 -0
  603. package/dist/storage/cluster-store.d.ts +63 -0
  604. package/dist/storage/cluster-store.d.ts.map +1 -0
  605. package/dist/storage/cluster-store.js +219 -0
  606. package/dist/storage/cluster-store.js.map +1 -0
  607. package/dist/storage/db.d.ts +57 -0
  608. package/dist/storage/db.d.ts.map +1 -0
  609. package/dist/storage/db.js +249 -0
  610. package/dist/storage/db.js.map +1 -0
  611. package/dist/storage/decay.d.ts +125 -0
  612. package/dist/storage/decay.d.ts.map +1 -0
  613. package/dist/storage/decay.js +276 -0
  614. package/dist/storage/decay.js.map +1 -0
  615. package/dist/storage/edge-store.d.ts +75 -0
  616. package/dist/storage/edge-store.d.ts.map +1 -0
  617. package/dist/storage/edge-store.js +259 -0
  618. package/dist/storage/edge-store.js.map +1 -0
  619. package/dist/storage/embedding-cache.d.ts +51 -0
  620. package/dist/storage/embedding-cache.d.ts.map +1 -0
  621. package/dist/storage/embedding-cache.js +155 -0
  622. package/dist/storage/embedding-cache.js.map +1 -0
  623. package/dist/storage/encryption.d.ts +55 -0
  624. package/dist/storage/encryption.d.ts.map +1 -0
  625. package/dist/storage/encryption.js +130 -0
  626. package/dist/storage/encryption.js.map +1 -0
  627. package/dist/storage/index.d.ts +15 -0
  628. package/dist/storage/index.d.ts.map +1 -0
  629. package/dist/storage/index.js +20 -0
  630. package/dist/storage/index.js.map +1 -0
  631. package/dist/storage/keyword-store.d.ts +25 -0
  632. package/dist/storage/keyword-store.d.ts.map +1 -0
  633. package/dist/storage/keyword-store.js +104 -0
  634. package/dist/storage/keyword-store.js.map +1 -0
  635. package/dist/storage/migrations.d.ts +12 -0
  636. package/dist/storage/migrations.d.ts.map +1 -0
  637. package/dist/storage/migrations.js +345 -0
  638. package/dist/storage/migrations.js.map +1 -0
  639. package/dist/storage/pruner.d.ts +111 -0
  640. package/dist/storage/pruner.d.ts.map +1 -0
  641. package/dist/storage/pruner.js +280 -0
  642. package/dist/storage/pruner.js.map +1 -0
  643. package/dist/storage/schema-loader.d.ts +18 -0
  644. package/dist/storage/schema-loader.d.ts.map +1 -0
  645. package/dist/storage/schema-loader.js +62 -0
  646. package/dist/storage/schema-loader.js.map +1 -0
  647. package/dist/storage/schema.sql +133 -0
  648. package/dist/storage/types.d.ts +278 -0
  649. package/dist/storage/types.d.ts.map +1 -0
  650. package/dist/storage/types.js +14 -0
  651. package/dist/storage/types.js.map +1 -0
  652. package/dist/storage/vector-store.d.ts +213 -0
  653. package/dist/storage/vector-store.d.ts.map +1 -0
  654. package/dist/storage/vector-store.js +440 -0
  655. package/dist/storage/vector-store.js.map +1 -0
  656. package/dist/temporal/clock-compactor.d.ts +65 -0
  657. package/dist/temporal/clock-compactor.d.ts.map +1 -0
  658. package/dist/temporal/clock-compactor.js +157 -0
  659. package/dist/temporal/clock-compactor.js.map +1 -0
  660. package/dist/temporal/index.d.ts +6 -0
  661. package/dist/temporal/index.d.ts.map +1 -0
  662. package/dist/temporal/index.js +6 -0
  663. package/dist/temporal/index.js.map +1 -0
  664. package/dist/temporal/vector-clock.d.ts +143 -0
  665. package/dist/temporal/vector-clock.d.ts.map +1 -0
  666. package/dist/temporal/vector-clock.js +231 -0
  667. package/dist/temporal/vector-clock.js.map +1 -0
  668. package/dist/utils/angular-distance.d.ts +31 -0
  669. package/dist/utils/angular-distance.d.ts.map +1 -0
  670. package/dist/utils/angular-distance.js +61 -0
  671. package/dist/utils/angular-distance.js.map +1 -0
  672. package/dist/utils/array-utils.d.ts +28 -0
  673. package/dist/utils/array-utils.d.ts.map +1 -0
  674. package/dist/utils/array-utils.js +67 -0
  675. package/dist/utils/array-utils.js.map +1 -0
  676. package/dist/utils/embedding-utils.d.ts +25 -0
  677. package/dist/utils/embedding-utils.d.ts.map +1 -0
  678. package/dist/utils/embedding-utils.js +30 -0
  679. package/dist/utils/embedding-utils.js.map +1 -0
  680. package/dist/utils/errors.d.ts +143 -0
  681. package/dist/utils/errors.d.ts.map +1 -0
  682. package/dist/utils/errors.js +220 -0
  683. package/dist/utils/errors.js.map +1 -0
  684. package/dist/utils/keychain.d.ts +43 -0
  685. package/dist/utils/keychain.d.ts.map +1 -0
  686. package/dist/utils/keychain.js +82 -0
  687. package/dist/utils/keychain.js.map +1 -0
  688. package/dist/utils/logger.d.ts +50 -0
  689. package/dist/utils/logger.d.ts.map +1 -0
  690. package/dist/utils/logger.js +104 -0
  691. package/dist/utils/logger.js.map +1 -0
  692. package/dist/utils/secret-store.d.ts +110 -0
  693. package/dist/utils/secret-store.d.ts.map +1 -0
  694. package/dist/utils/secret-store.js +340 -0
  695. package/dist/utils/secret-store.js.map +1 -0
  696. package/dist/utils/secure-buffer.d.ts +66 -0
  697. package/dist/utils/secure-buffer.d.ts.map +1 -0
  698. package/dist/utils/secure-buffer.js +104 -0
  699. package/dist/utils/secure-buffer.js.map +1 -0
  700. package/dist/utils/token-counter.d.ts +13 -0
  701. package/dist/utils/token-counter.d.ts.map +1 -0
  702. package/dist/utils/token-counter.js +18 -0
  703. package/dist/utils/token-counter.js.map +1 -0
  704. package/package.json +110 -0
  705. package/src/dashboard/client/package-lock.json +3045 -0
  706. package/src/dashboard/client/package.json +30 -0
@@ -0,0 +1,1128 @@
1
+ /**
2
+ * SKILL.md templates for Causantic Claude Code skills.
3
+ *
4
+ * These get installed to ~/.claude/skills/causantic-<name>/SKILL.md
5
+ * by the `causantic init` wizard, replacing the old CLAUDE.md injection approach.
6
+ */
7
+ export const CAUSANTIC_SKILLS = [
8
+ {
9
+ dirName: 'causantic-recall',
10
+ content: `---
11
+ name: causantic-recall
12
+ description: "Look up context from past sessions using Causantic long-term memory. Use when asked about recent or past work, previous decisions, errors solved before, or context from prior sessions."
13
+ argument-hint: [query]
14
+ ---
15
+
16
+ # Recall Past Context
17
+
18
+ Use the \`recall\` MCP tool from \`causantic\` to look up specific context from past sessions.
19
+
20
+ ## Usage
21
+
22
+ \`\`\`
23
+ /causantic-recall What did we work on recently?
24
+ /causantic-recall authentication implementation decisions
25
+ /causantic-recall that migration bug we fixed last week
26
+ \`\`\`
27
+
28
+ ## Parameters
29
+
30
+ Pass these to the \`recall\` MCP tool:
31
+
32
+ - **query** (required): Natural language question about past work
33
+ - **range**: \`"short"\` for recent work (last few sessions), \`"long"\` for historical context
34
+ - **project**: Filter to a specific project slug (use \`/causantic-list-projects\` to discover names)
35
+
36
+ ## When to Use
37
+
38
+ - User asks about recent or past work (e.g., "What did we work on?", "What was decided about X?")
39
+ - Starting a task in an unfamiliar area — check if past sessions covered it
40
+ - Encountering an error or pattern that might have been solved before
41
+ - User references something from a previous session
42
+ - Before saying "I don't have context from previous sessions" — always try recall first
43
+
44
+ ## Guidelines
45
+
46
+ - Use \`range: "short"\` for recent work, \`range: "long"\` for historical context
47
+ - Use the \`project\` parameter to scope results to the current project when relevant
48
+ - Combine with \`/causantic-explain\` when the user needs deeper understanding of why something was done
49
+ `,
50
+ },
51
+ {
52
+ dirName: 'causantic-explain',
53
+ content: `---
54
+ name: causantic-explain
55
+ description: "Explain the history behind a topic, decision, or implementation using Causantic long-term memory. Use when asked 'why' something was done, 'how we got here', or to trace the evolution of a feature."
56
+ argument-hint: [topic]
57
+ ---
58
+
59
+ # Explain History
60
+
61
+ Use the \`explain\` MCP tool from \`causantic\` to understand the history and rationale behind topics and decisions.
62
+
63
+ ## Usage
64
+
65
+ \`\`\`
66
+ /causantic-explain why we chose SQLite for the database
67
+ /causantic-explain how the authentication system evolved
68
+ /causantic-explain the reasoning behind the project labels design
69
+ \`\`\`
70
+
71
+ ## Parameters
72
+
73
+ Pass these to the \`explain\` MCP tool:
74
+
75
+ - **query** (required): Topic, decision, or feature to explain
76
+ - **project**: Filter to a specific project slug
77
+
78
+ ## When to Use
79
+
80
+ - User asks "why" or "how did we get here"
81
+ - Need to understand rationale behind past architectural decisions
82
+ - Tracing the evolution of a feature or design pattern
83
+ - Investigating why a particular approach was chosen over alternatives
84
+
85
+ ## Guidelines
86
+
87
+ - Defaults to long-range retrieval for comprehensive history
88
+ - Returns chronological narrative of relevant context
89
+ - Best for understanding decision-making, not just facts
90
+ `,
91
+ },
92
+ {
93
+ dirName: 'causantic-predict',
94
+ content: `---
95
+ name: causantic-predict
96
+ description: "Proactively surface relevant past context based on the current discussion using Causantic long-term memory. Use at the start of complex tasks to surface prior work, related decisions, or known pitfalls."
97
+ argument-hint: [context]
98
+ ---
99
+
100
+ # Predict Relevant Context
101
+
102
+ Use the \`predict\` MCP tool from \`causantic\` to proactively surface relevant past context based on the current discussion.
103
+
104
+ ## Usage
105
+
106
+ \`\`\`
107
+ /causantic-predict
108
+ /causantic-predict refactoring the auth module
109
+ \`\`\`
110
+
111
+ ## Parameters
112
+
113
+ Pass these to the \`predict\` MCP tool:
114
+
115
+ - **query** (optional): Current task or topic context. If omitted, uses the current discussion.
116
+ - **project**: Filter to a specific project slug
117
+
118
+ ## When to Use
119
+
120
+ - At the start of complex tasks to check for relevant prior work
121
+ - When encountering an error or pattern that might have been solved before
122
+ - When working on something that likely has prior art in past sessions
123
+ - To surface context the user might not think to ask about
124
+
125
+ ## Guidelines
126
+
127
+ - Use early in a task to front-load relevant context
128
+ - Especially useful when starting unfamiliar work — past sessions may have covered it
129
+ `,
130
+ },
131
+ {
132
+ dirName: 'causantic-list-projects',
133
+ content: `---
134
+ name: causantic-list-projects
135
+ description: "List all projects stored in Causantic long-term memory with chunk counts and date ranges. Use to discover available project names for filtering recall/explain/predict queries."
136
+ ---
137
+
138
+ # List Memory Projects
139
+
140
+ Use the \`list-projects\` MCP tool from \`causantic\` to see all projects in memory.
141
+
142
+ ## Usage
143
+
144
+ \`\`\`
145
+ /causantic-list-projects
146
+ \`\`\`
147
+
148
+ ## Output
149
+
150
+ Returns a list of projects with:
151
+ - Project name (slug)
152
+ - Number of memory chunks
153
+ - Date range (first seen to last seen)
154
+
155
+ ## When to Use
156
+
157
+ - Before using project-filtered queries with \`/causantic-recall\`, \`/causantic-explain\`, or \`/causantic-predict\`
158
+ - To see what projects have been ingested into memory
159
+ - To check the coverage and recency of memory for a specific project
160
+ `,
161
+ },
162
+ {
163
+ dirName: 'causantic-reconstruct',
164
+ content: `---
165
+ name: causantic-reconstruct
166
+ description: "Reconstruct session context from Causantic long-term memory. Use to rebuild what was worked on yesterday, show the last session, or reconstruct context from a time range."
167
+ argument-hint: [time range or description]
168
+ ---
169
+
170
+ # Reconstruct Session Context
171
+
172
+ Use the \`list-sessions\` and \`reconstruct\` MCP tools from \`causantic\` to rebuild session context chronologically.
173
+
174
+ ## Usage
175
+
176
+ \`\`\`
177
+ /causantic-reconstruct what did I work on yesterday?
178
+ /causantic-reconstruct last session
179
+ /causantic-reconstruct past 3 days
180
+ /causantic-reconstruct session abc12345
181
+ \`\`\`
182
+
183
+ ## Workflow
184
+
185
+ 1. **Identify the project**: Use \`list-projects\` if the user hasn't specified one
186
+ 2. **Browse sessions**: Use \`list-sessions\` to see available sessions and their time ranges
187
+ 3. **Reconstruct**: Use \`reconstruct\` with appropriate parameters
188
+
189
+ ## Parameters for \`list-sessions\`
190
+
191
+ - **project** (required): Project slug
192
+ - **from**: Start date (ISO 8601)
193
+ - **to**: End date (ISO 8601)
194
+ - **days_back**: Look back N days
195
+
196
+ ## Parameters for \`reconstruct\`
197
+
198
+ - **project** (required): Project slug
199
+ - **session_id**: Specific session ID
200
+ - **from** / **to**: Time range (ISO 8601)
201
+ - **days_back**: Look back N days
202
+ - **previous_session**: Get the session before the current one (set to \`true\`)
203
+ - **current_session_id**: Required when \`previous_session\` is true
204
+ - **keep_newest**: Keep newest chunks when truncating (default: true)
205
+
206
+ ## Interpreting User Intent
207
+
208
+ | User says | Parameters |
209
+ |-----------|-----------|
210
+ | "yesterday" | \`days_back: 1\` |
211
+ | "past 3 days" | \`days_back: 3\` |
212
+ | "last session" | \`previous_session: true\` + current session ID |
213
+ | "session abc123" | \`session_id: "abc123"\` |
214
+ | "this week" | \`days_back: 7\` |
215
+ | "January 15" | \`from: "2025-01-15T00:00:00Z", to: "2025-01-16T00:00:00Z"\` |
216
+
217
+ ## Guidelines
218
+
219
+ - Always start with \`list-sessions\` to give the user an overview before reconstructing
220
+ - When the user says "last session", use \`previous_session: true\` — this finds the session before the current one
221
+ - Token budget is applied automatically — newest chunks are kept by default
222
+ - Results include session boundary markers for easy navigation
223
+ `,
224
+ },
225
+ {
226
+ dirName: 'causantic-resume',
227
+ content: `---
228
+ name: causantic-resume
229
+ description: "Resume interrupted work by reconstructing context from recent sessions. Use at the start of a session or when asked 'where did I leave off?'"
230
+ argument-hint: [topic or time range]
231
+ ---
232
+
233
+ # Resume Work
234
+
235
+ Reconstruct context from the most recent session(s) to help the user pick up where they left off.
236
+
237
+ ## Usage
238
+
239
+ \`\`\`
240
+ /causantic-resume
241
+ /causantic-resume the API refactor
242
+ /causantic-resume from yesterday
243
+ \`\`\`
244
+
245
+ ## Workflow
246
+
247
+ 1. **Identify the project**: Derive from the current working directory (use \`list-projects\` if ambiguous)
248
+ 2. **Reconstruct the last session**: Use \`reconstruct\` with \`previous_session: true\` to get the most recent session before this one
249
+ 3. **Summarize for the user**:
250
+ - What was being worked on (key topics/tasks)
251
+ - What was completed vs in progress
252
+ - Any explicit next steps or TODOs mentioned
253
+ - Any open issues or blockers
254
+ 4. **If the user provided a topic**: Also run \`recall\` with that topic scoped to the project
255
+
256
+ ## Interpreting User Intent
257
+
258
+ | User says | Action |
259
+ |-----------|--------|
260
+ | (nothing) | \`reconstruct\` with \`previous_session: true\` |
261
+ | "yesterday" / "last week" | \`reconstruct\` with appropriate \`days_back\` |
262
+ | a topic name | \`reconstruct\` last session + \`recall\` with that topic, \`range: "long"\` |
263
+
264
+ ## Output Format
265
+
266
+ Present a concise briefing:
267
+ - **Last session**: date and duration
268
+ - **Key work**: 1-3 bullet points
269
+ - **Status**: what was completed, what was in progress
270
+ - **Next steps**: any mentioned next steps or TODOs
271
+ - **Open issues**: any blockers or unresolved problems
272
+
273
+ ## Guidelines
274
+
275
+ - Keep the summary actionable, not exhaustive
276
+ - Highlight unfinished work prominently — that's what the user needs most
277
+ - If the last session ended mid-task, flag that clearly
278
+ `,
279
+ },
280
+ {
281
+ dirName: 'causantic-debug',
282
+ content: `---
283
+ name: causantic-debug
284
+ description: "Search past sessions for prior encounters with the current error, bug pattern, or issue. Use when stuck on an error or debugging a recurring problem."
285
+ argument-hint: [error message or description]
286
+ ---
287
+
288
+ # Debug with Memory
289
+
290
+ Search past sessions for prior encounters with the current error, bug pattern, or issue.
291
+
292
+ ## Usage
293
+
294
+ \`\`\`
295
+ /causantic-debug
296
+ /causantic-debug SQLITE_BUSY database is locked
297
+ /causantic-debug the embedder crashes on large files
298
+ \`\`\`
299
+
300
+ ## Workflow
301
+
302
+ 1. **Extract the error**: If no argument provided, extract the most recent error message or stack trace from the current conversation. If an argument is provided, use that as the search query.
303
+ 2. **Search for the error/issue**: Use \`recall\` with the error text, \`range: "long"\` to search broadly across sessions
304
+ 3. **Check for related patterns**: Use \`predict\` with the same context to surface tangentially related issues
305
+ 4. **Present findings**:
306
+ - Prior occurrences of this or similar errors
307
+ - What was tried (including failed approaches)
308
+ - What ultimately resolved it
309
+
310
+ ## Parameters
311
+
312
+ - **recall**: query = error text (from argument or extracted from conversation), range = "long", project = current project
313
+ - **predict**: context = same error text, project = current project
314
+
315
+ ## Output Format
316
+
317
+ - **Prior Occurrences**: matching past encounters with dates
318
+ - **What Was Tried**: approaches attempted, including failures
319
+ - **Resolution**: what ultimately worked
320
+ - **Related Issues**: other potentially connected problems
321
+
322
+ If no matches found, say so clearly — do not fabricate matches.
323
+
324
+ ## Guidelines
325
+
326
+ - When invoked with no arguments, scan the current conversation for the most recent error, stack trace, or failing test output and use that automatically
327
+ - Include failed approaches — knowing what didn't work is as valuable as what did
328
+ - Quote relevant snippets from past sessions rather than paraphrasing
329
+ - If memory shows a recurring pattern, flag it: "This error has appeared N times"
330
+ `,
331
+ },
332
+ {
333
+ dirName: 'causantic-context',
334
+ content: `---
335
+ name: causantic-context
336
+ description: "Deep dive into a codebase area by combining decision history, evolution, and recent activity from memory. Use when you need comprehensive background on a module, feature, or design."
337
+ argument-hint: [area or topic]
338
+ ---
339
+
340
+ # Deep Context
341
+
342
+ Build comprehensive context about a codebase area by combining decision history, evolution, and recent activity from memory.
343
+
344
+ ## Usage
345
+
346
+ \`\`\`
347
+ /causantic-context the authentication module
348
+ /causantic-context src/storage/chunk-store.ts
349
+ /causantic-context how we handle encryption
350
+ \`\`\`
351
+
352
+ ## Workflow
353
+
354
+ 1. **Get decision history**: Use \`explain\` with the topic for historical narrative and rationale
355
+ 2. **Get recent work**: Use \`recall\` with the topic and \`range: "short"\` for recent changes
356
+ 3. **Present as a structured briefing**
357
+
358
+ ## Output Format
359
+
360
+ - **Purpose**: What this area does (from memory's perspective)
361
+ - **Key Decisions**: Decisions that shaped this area, with rationale
362
+ - **Evolution**: Major changes over time
363
+ - **Constraints & Tech Debt**: Known limitations or workarounds
364
+ - **Recent Activity**: What was recently changed or discussed
365
+
366
+ ## Guidelines
367
+
368
+ - Focus on the "why" — the user can read the code for the "what"
369
+ - If memory has conflicting information across time, present the most recent and note the evolution
370
+ - If memory has little context for the area, say so honestly
371
+ `,
372
+ },
373
+ {
374
+ dirName: 'causantic-crossref',
375
+ content: `---
376
+ name: causantic-crossref
377
+ description: "Search memory across all projects to find relevant patterns, solutions, or approaches. Use for cross-project knowledge transfer and finding reusable solutions."
378
+ argument-hint: [pattern or topic]
379
+ ---
380
+
381
+ # Cross-Project Reference
382
+
383
+ Search memory across all projects to find relevant patterns, solutions, or approaches.
384
+
385
+ ## Usage
386
+
387
+ \`\`\`
388
+ /causantic-crossref rate limiting implementation
389
+ /causantic-crossref how we handle database migrations
390
+ /causantic-crossref error retry patterns
391
+ \`\`\`
392
+
393
+ ## Workflow
394
+
395
+ 1. **Search all projects**: Use \`recall\` WITHOUT a project filter, \`range: "long"\`
396
+ 2. **Surface related patterns**: Use \`predict\` without a project filter
397
+ 3. **Group by project**: Organize results by which project they came from
398
+ 4. **Highlight transferable insights**: Focus on what can be reused or adapted
399
+
400
+ ## Output Format
401
+
402
+ Group findings by project:
403
+ - **[Project A]**: relevant findings
404
+ - **[Project B]**: relevant findings
405
+ - **Transferable Patterns**: what can be reused or adapted
406
+
407
+ ## Guidelines
408
+
409
+ - Always attribute findings to their source project
410
+ - Highlight patterns that transfer well vs project-specific details
411
+ - This is inherently a broad search — expect some noise
412
+ `,
413
+ },
414
+ {
415
+ dirName: 'causantic-retro',
416
+ content: `---
417
+ name: causantic-retro
418
+ description: "Analyze patterns across past sessions to surface recurring themes, problems, and decisions. Use for retrospectives, sprint reviews, or understanding work patterns."
419
+ argument-hint: [time range or topic]
420
+ ---
421
+
422
+ # Retrospective Analysis
423
+
424
+ Analyze patterns across past sessions to surface recurring themes, problems, and decisions.
425
+
426
+ ## Usage
427
+
428
+ \`\`\`
429
+ /causantic-retro
430
+ /causantic-retro past month
431
+ /causantic-retro deployment issues
432
+ \`\`\`
433
+
434
+ ## Workflow
435
+
436
+ 1. **Determine scope**:
437
+ - Time range specified → use \`list-sessions\` with that window
438
+ - Topic specified → use \`recall\` with \`range: "long"\`
439
+ - Neither → default to \`days_back: 30\`
440
+ 2. **Gather context**: Use \`recall\` with \`range: "long"\` across the scope
441
+ 3. **Synthesize patterns**: Analyze for recurring themes
442
+
443
+ ## Output Format
444
+
445
+ - **Sessions Analyzed**: count and date range
446
+ - **Recurring Patterns**: themes across multiple sessions
447
+ - **Decisions Made**: key decisions with dates and context
448
+ - **Recurring Issues**: problems that came up more than once
449
+ - **Observations**: notable patterns in how work was done
450
+
451
+ ## Guidelines
452
+
453
+ - Synthesize, don't just dump raw memory
454
+ - Look for patterns across sessions, not just within them
455
+ - Be honest about gaps: if memory is sparse for a period, note it
456
+ - Works best with 5+ sessions of history
457
+ `,
458
+ },
459
+ {
460
+ dirName: 'causantic-cleanup',
461
+ content: `---
462
+ name: causantic-cleanup
463
+ description: "Memory-informed codebase review and cleanup plan. Combines comprehensive code analysis with historical context from Causantic memory to create an actionable cleanup plan."
464
+ ---
465
+
466
+ # Codebase Cleanup & Architecture Review
467
+
468
+ Perform a comprehensive review of the codebase and create a cleanup plan aligned to clean code and clean architecture principles, enriched with historical context from Causantic memory. Primary goals: audit dependency health (security vulnerabilities, deprecations, unmaintained projects), resolve linting errors and warnings, remove duplication, improve readability, eliminate dead code and artifacts, consolidate documentation, and enable high test coverage (70%+ target, ideally near 100%).
469
+
470
+ ## Invoke Planning Mode
471
+
472
+ **Before any analysis, enter planning mode.** The output of this skill is a plan for user approval, not immediate code changes.
473
+
474
+ ---
475
+
476
+ ## Phase 1: Codebase Discovery
477
+
478
+ ### 1.1 Project Structure Analysis
479
+ - Map the directory structure and identify architectural layers
480
+ - Identify entry points, core domain, and infrastructure boundaries
481
+ - Note the tech stack, frameworks, and key dependencies
482
+ - Find existing tests and assess current coverage
483
+
484
+ ### 1.2 Internal Dependency Analysis
485
+ - Map internal dependencies between modules/packages
486
+ - Identify circular dependencies
487
+ - Check for dependency direction violations (dependencies should point inward)
488
+ - Note coupling between modules
489
+
490
+ ### 1.3 External Dependency Health Audit
491
+
492
+ **Version Currency & Updates:**
493
+ - List all direct dependencies with current pinned version vs latest available
494
+ - Identify dependencies more than one major version behind
495
+ - Flag any dependencies with pending breaking changes in the next major version
496
+ - Check for deprecated dependencies (marked deprecated by maintainers)
497
+
498
+ **Security Vulnerabilities:**
499
+ - Run ecosystem security audit tools (\`cargo audit\`, \`npm audit\`, \`pip-audit\`, \`govulncheck\`, etc.)
500
+ - Cross-reference dependencies against known vulnerability databases (RustSec, GitHub Advisory, NIST NVD)
501
+ - Classify findings by severity: critical, high, medium, low
502
+ - For each vulnerability, note whether a patched version exists
503
+ - Check transitive (indirect) dependencies for vulnerabilities — not just direct ones
504
+
505
+ **Project Health & Sustainability:**
506
+ For each dependency, assess maintenance health signals:
507
+ - **Last release date** — flag if >12 months since last publish
508
+ - **Last commit date** — flag if >6 months since last commit to default branch
509
+ - **Open issues / PRs** — flag accumulating unanswered issues
510
+ - **Bus factor** — flag single-maintainer projects for critical dependencies
511
+ - **Download trends** — flag declining adoption (ecosystem-specific: crates.io, npm, PyPI)
512
+ - **Funding / backing** — note whether the project has organisational support or is volunteer-only
513
+ - **Ecosystem signals** — check for "looking for maintainer" notices, archived repos, or successor projects
514
+
515
+ **Risk Classification:**
516
+ Classify each dependency into:
517
+ | Risk Level | Criteria |
518
+ |-----------|----------|
519
+ | **Low** | Actively maintained, multiple contributors, backed by org, no known CVEs |
520
+ | **Medium** | Maintained but single maintainer, or infrequent releases, or minor CVEs patched |
521
+ | **High** | Unmaintained (>12 months), single maintainer gone, unpatched CVEs, or deprecated |
522
+ | **Critical** | Known exploited vulnerabilities, abandoned with no successor, or archived |
523
+
524
+ **Mitigation Strategies for High/Critical Risk:**
525
+ For each high/critical risk dependency, recommend one of:
526
+ 1. **Bump** — newer version resolves the issue
527
+ 2. **Replace** — suggest well-maintained alternative with migration path
528
+ 3. **Fork** — if no alternative exists, consider maintaining a fork
529
+ 4. **Embed** — for small or thin dependencies, inline the relevant code to eliminate the external dependency entirely (reduces supply chain risk)
530
+ 5. **Remove** — if the dependency is no longer needed
531
+
532
+ ### 1.4 Linter & Static Analysis Audit
533
+
534
+ **Run all configured linters with warnings enabled:**
535
+ Detect the project's linting tools and run them in strict/pedantic mode to surface the full picture:
536
+
537
+ | Ecosystem | Lint Command | Notes |
538
+ |-----------|-------------|-------|
539
+ | Rust | \`cargo clippy --workspace --all-features -- -W clippy::pedantic\` | Run both default and pedantic; separate findings by severity |
540
+ | TypeScript/JS | \`eslint . --max-warnings 0\` or \`biome check .\` | Check for \`eslint-disable\` comments and \`@ts-ignore\` / \`@ts-expect-error\` suppressions |
541
+ | Python | \`ruff check .\` or \`flake8 . --statistics\` | Also check \`mypy\`/\`pyright\` type errors |
542
+ | Go | \`go vet ./...\` and \`staticcheck ./...\` | Check for \`//nolint\` directives |
543
+ | General | Any project-specific linters in CI config or pre-commit hooks | Match what CI enforces |
544
+
545
+ **Classify findings:**
546
+ - **Errors** — code that won't compile, type errors, or lint rules configured as errors. These must be fixed.
547
+ - **Warnings** — potential bugs, style issues, or best practice violations. Triage by category.
548
+ - **Suppressions** — \`#[allow(...)]\`, \`// eslint-disable\`, \`@ts-ignore\`, \`# noqa\`, \`//nolint\`, etc. Audit each:
549
+ - Is the suppression still necessary? (The underlying issue may have been fixed)
550
+ - Is there a comment explaining why it's suppressed?
551
+ - Can the code be refactored to eliminate the need for suppression?
552
+
553
+ **Categorise lint findings:**
554
+
555
+ | Category | Examples | Priority |
556
+ |----------|---------|----------|
557
+ | **Correctness** | Unused results, unchecked errors, unreachable code, type mismatches | High — likely bugs |
558
+ | **Performance** | Unnecessary allocations, redundant clones, inefficient patterns | Medium — profile first |
559
+ | **Style & Idiom** | Non-idiomatic patterns, naming conventions, import ordering | Low — batch fix |
560
+ | **Complexity** | Overly complex expressions, deeply nested logic, long functions | Medium — readability |
561
+ | **Deprecation** | Use of deprecated APIs, functions, or language features | High — will break on upgrade |
562
+
563
+ **Formatter compliance:**
564
+ - Run the project formatter (\`cargo fmt\`, \`prettier\`, \`black\`, \`gofmt\`, etc.) in check mode
565
+ - Note any files that don't conform
566
+ - Check if formatting is enforced in CI — if not, recommend adding it
567
+
568
+ ### 1.5 Code Metrics Gathering
569
+ - Identify large files (>300 lines) and complex functions (>30 lines)
570
+ - Find files with high cyclomatic complexity
571
+ - Locate code with deep nesting (>3 levels)
572
+ - Note long parameter lists (>4 parameters)
573
+
574
+ \`\`\`
575
+ ✓ CHECKPOINT: Phase 1 complete - Codebase Discovery
576
+ \`\`\`
577
+
578
+ ---
579
+
580
+ ## Phase 2: Memory-Informed Context Gathering
581
+
582
+ **This phase uses Causantic memory to enrich the review with historical context.**
583
+
584
+ ### 2.1 Decision History
585
+ - Use \`explain\` to retrieve the history behind major architectural decisions
586
+ - Use \`recall\` with \`range: "long"\` to find past discussions about code quality, tech debt, and refactoring
587
+ - Document: why things are the way they are, what was tried before, what constraints exist
588
+
589
+ ### 2.2 Known Tech Debt
590
+ - Use \`recall\` with queries like "tech debt", "TODO", "workaround", "hack", "temporary" scoped to the project
591
+ - Use \`predict\` to surface areas that memory suggests are problematic
592
+ - Cross-reference memory findings with current code state
593
+
594
+ ### 2.3 Past Cleanup Attempts
595
+ - Use \`recall\` to search for previous refactoring or cleanup work
596
+ - Note what was done before, what worked, and what was abandoned
597
+ - Avoid recommending changes that were previously tried and rejected (unless circumstances changed)
598
+
599
+ ### 2.4 Dependency History
600
+ - Use \`recall\` to search for past dependency upgrade attempts, compatibility issues, or migration discussions
601
+ - Use \`explain\` to understand why specific dependency versions may be pinned
602
+ - Cross-reference memory findings with current dependency state — avoid recommending upgrades that were previously tried and caused issues
603
+
604
+ ### 2.5 Lint & Suppression History
605
+ - Use \`recall\` to search for past discussions about lint suppressions, intentional \`eslint-disable\` or \`@ts-ignore\` additions
606
+ - Check if past sessions document why certain warnings were left unfixed
607
+ - Note when memory shows a suppression was deliberately added for a specific edge case
608
+
609
+ \`\`\`
610
+ ✓ CHECKPOINT: Phase 2 complete - Memory-Informed Context Gathering
611
+ \`\`\`
612
+
613
+ ---
614
+
615
+ ## Phase 3: Documentation Review
616
+
617
+ ### 3.1 Documentation Inventory
618
+ - Locate all documentation files (README, docs/, wiki, inline docs)
619
+ - Identify documentation types: API docs, architecture docs, setup guides, user guides
620
+ - Map documentation to corresponding code/features
621
+ - Note documentation format and tooling (markdown, JSDoc, Sphinx, etc.)
622
+
623
+ ### 3.2 Documentation Quality Assessment
624
+ - Check for outdated or stale documentation (doesn't match current code)
625
+ - Identify duplicate documentation (same info in multiple places)
626
+ - Find conflicting documentation (contradictory information)
627
+ - Note incomplete documentation (missing critical sections)
628
+ - Assess documentation accessibility and discoverability
629
+
630
+ ### 3.3 Documentation Consolidation Plan
631
+ - Recommend single source of truth for each topic
632
+ - Identify documentation to merge, update, or remove
633
+ - Suggest documentation structure aligned with project architecture
634
+ - Propose automation for keeping docs in sync (doc generation, CI checks)
635
+
636
+ \`\`\`
637
+ ✓ CHECKPOINT: Phase 3 complete - Documentation Review
638
+ \`\`\`
639
+
640
+ ---
641
+
642
+ ## Phase 4: Pattern Analysis
643
+
644
+ ### 4.1 Duplication Detection
645
+ Search for:
646
+ - Exact code duplicates (copy-paste)
647
+ - Structural duplicates (same logic, different names)
648
+ - Semantic duplicates (same purpose, different implementation)
649
+ - Repeated patterns that could be abstracted
650
+
651
+ ### 4.2 Dead Code & Artifact Detection
652
+
653
+ **Dead and Unused Code:**
654
+ - Unreachable code paths
655
+ - Unused functions, methods, and classes
656
+ - Unused variables and imports
657
+ - Vestigial code from removed features
658
+ - Commented-out code blocks
659
+ - Deprecated code still present
660
+
661
+ **Debugging Artifacts:**
662
+ - Console.log, print statements, and debug output
663
+ - Hardcoded debug flags or conditions
664
+ - Debug-only code paths
665
+ - Temporary workarounds left in place
666
+
667
+ **Testing Artifacts:**
668
+ - Orphaned test files for deleted code
669
+ - Test fixtures no longer used
670
+ - Mock data files that are stale
671
+ - Test utilities that aren't called
672
+
673
+ **Outdated Artifacts:**
674
+ - Old configuration files (for removed tools/services)
675
+ - Legacy migration scripts that have been applied
676
+ - Backup files (.bak, .old, .orig)
677
+ - Generated files that should be in .gitignore
678
+ - Old build outputs or cache directories
679
+ - Stale lock files or dependency snapshots
680
+
681
+ ### 4.3 Architecture Assessment
682
+
683
+ **Clean Architecture Alignment:**
684
+ - Is domain logic independent of frameworks and infrastructure?
685
+ - Are use cases clearly defined and separated?
686
+ - Do dependencies point inward (toward domain)?
687
+ - Is the domain free of I/O and side effects?
688
+
689
+ **SOLID Principles:**
690
+ - **S**: Are there classes/modules doing too much?
691
+ - **O**: Can behaviour be extended without modification?
692
+ - **L**: Are substitutions safe across inheritance?
693
+ - **I**: Are interfaces minimal and focused?
694
+ - **D**: Are high-level modules depending on abstractions?
695
+
696
+ ### 4.4 Code Quality Assessment
697
+
698
+ **Readability:**
699
+ - Are names self-documenting?
700
+ - Is the code explicit over implicit?
701
+ - Are functions small and focused?
702
+ - Is nesting depth reasonable?
703
+
704
+ **Maintainability:**
705
+ - Can components be understood in isolation?
706
+ - Are side effects contained and explicit?
707
+ - Is state management clear?
708
+ - Are error paths handled consistently?
709
+
710
+ \`\`\`
711
+ ✓ CHECKPOINT: Phase 4 complete - Pattern Analysis
712
+ \`\`\`
713
+
714
+ ---
715
+
716
+ ## Phase 5: Testability Analysis
717
+
718
+ ### 5.1 Current Test Assessment
719
+ - Document existing test coverage percentage
720
+ - Identify test types present (unit, integration, e2e)
721
+ - Note testing frameworks and patterns in use
722
+ - Find untested critical paths
723
+
724
+ ### 5.2 Testability Barriers
725
+ Identify code that is hard to test:
726
+ - Tight coupling to infrastructure (DB, APIs, filesystem)
727
+ - Hidden dependencies (singletons, global state)
728
+ - Side effects mixed with business logic
729
+ - Large functions doing multiple things
730
+ - Missing dependency injection
731
+
732
+ ### 5.3 Coverage Gap Analysis
733
+ Prioritise untested areas by:
734
+ 1. Business criticality
735
+ 2. Change frequency
736
+ 3. Complexity/risk
737
+ 4. Ease of testing after refactor
738
+
739
+ \`\`\`
740
+ ✓ CHECKPOINT: Phase 5 complete - Testability Analysis
741
+ \`\`\`
742
+
743
+ ---
744
+
745
+ ## Phase 6: Cleanup Plan Creation
746
+
747
+ ### 6.1 Dependency Actions
748
+
749
+ **Immediate Security Fixes:**
750
+ | Dependency | Current | Fix Version | Vulnerability | Severity |
751
+ |-----------|---------|-------------|---------------|----------|
752
+ | ... | ... | ... | CVE-... | critical/high |
753
+
754
+ **Version Bumps:**
755
+ | Dependency | Current | Latest | Breaking Changes | Notes |
756
+ |-----------|---------|--------|------------------|-------|
757
+ | ... | ... | ... | yes/no | ... |
758
+
759
+ **At-Risk Dependencies:**
760
+ | Dependency | Risk Level | Issue | Recommended Action |
761
+ |-----------|-----------|-------|-------------------|
762
+ | ... | high/critical | unmaintained/deprecated/... | replace with X / embed / fork / remove |
763
+
764
+ For each at-risk dependency, include:
765
+ - Why it's flagged (specific health signals)
766
+ - Recommended alternative (if replacing), with brief comparison
767
+ - Migration complexity estimate (trivial / moderate / significant)
768
+ - If recommending embed: identify the specific functions/types used and estimate the inlining effort
769
+
770
+ ### 6.2 Lint & Static Analysis Cleanup
771
+
772
+ **Errors (must fix):**
773
+ | File | Line | Lint Rule | Message | Fix |
774
+ |------|------|-----------|---------|-----|
775
+ | ... | ... | ... | ... | ... |
776
+
777
+ **Warnings by category:**
778
+ | Category | Count | Examples | Suggested Approach |
779
+ |----------|-------|---------|-------------------|
780
+ | Correctness | N | unused Result in \`foo.ts:42\` | Fix individually — likely bugs |
781
+ | Deprecation | N | \`old_api()\` in \`bar.ts:15\` | Migrate to replacement API |
782
+ | Performance | N | unnecessary clone in \`baz.ts:88\` | Batch fix, profile first |
783
+ | Style/Idiom | N | non-idiomatic match in \`qux.ts:20\` | Batch fix in single commit |
784
+ | Complexity | N | cognitive complexity 25 in \`parse()\` | Refactor as part of Phase 4 |
785
+
786
+ **Suppression audit:**
787
+ | File | Line | Suppression | Still Needed? | Action |
788
+ |------|------|------------|---------------|--------|
789
+ | ... | ... | \`// eslint-disable\` | yes/no | keep with comment / remove / refactor |
790
+
791
+ **Formatter fixes:**
792
+ - List files not conforming to project formatter
793
+ - Recommend: run formatter and commit as standalone PR (no logic changes)
794
+
795
+ ### 6.3 Dead Code & Artifact Removal
796
+
797
+ **Immediate Removal** (safe to delete):
798
+ - Commented-out code (preserved in version control)
799
+ - Unused imports and variables
800
+ - Debug statements and logging
801
+ - Backup and temporary files
802
+ - Orphaned test files
803
+
804
+ **Careful Removal** (verify before deleting):
805
+ - Unused functions (check for dynamic calls)
806
+ - Vestigial feature code (confirm feature is truly removed)
807
+ - Old configuration (ensure not referenced)
808
+ - Deprecated code (check for external consumers)
809
+
810
+ ### 6.4 Documentation Updates
811
+
812
+ **Documentation Actions:**
813
+ | Document | Action | Reason |
814
+ |----------|--------|--------|
815
+ | ... | Keep/Update/Merge/Remove | ... |
816
+
817
+ **Consolidation Tasks:**
818
+ - Merge duplicate docs into single source
819
+ - Update outdated documentation
820
+ - Remove documentation for deleted features
821
+ - Add missing critical documentation
822
+
823
+ ### 6.5 Refactoring Opportunities
824
+
825
+ Categorise findings into:
826
+
827
+ **Quick Wins** (low effort, high impact)
828
+ - Remove dead code, unused imports, and debug statements
829
+ - Extract duplicated code into shared utilities
830
+ - Rename unclear variables/functions
831
+ - Fix obvious SOLID violations
832
+
833
+ **Structural Improvements** (medium effort)
834
+ - Extract classes/modules from large files
835
+ - Introduce missing abstractions
836
+ - Separate pure logic from side effects
837
+ - Add dependency injection where missing
838
+
839
+ **Architectural Changes** (high effort)
840
+ - Restructure to proper layers
841
+ - Extract bounded contexts
842
+ - Introduce proper interfaces/ports
843
+ - Migrate to cleaner patterns
844
+
845
+ ### 6.6 Testing Strategy
846
+
847
+ For each area, recommend:
848
+ - What test types to add (unit/integration/e2e)
849
+ - What refactoring enables testing
850
+ - Order of test introduction
851
+ - Target coverage per module
852
+
853
+ **Testing Pyramid Target:**
854
+ - Unit tests: 70-80% of tests (fast, isolated)
855
+ - Integration tests: 15-25% (component boundaries)
856
+ - E2E tests: 5-10% (critical paths only)
857
+
858
+ ### 6.7 Prioritised Backlog
859
+
860
+ Create a prioritised list considering:
861
+ 1. **Security vulnerability fixes** — patch or bump dependencies with known CVEs (critical/high first)
862
+ 2. **Lint errors & correctness warnings** — fix compiler/linter errors and correctness-category warnings (likely bugs)
863
+ 3. **At-risk dependency mitigation** — replace, embed, or fork unmaintained/deprecated dependencies
864
+ 4. **Dead code removal** — quick wins that reduce noise
865
+ 5. **Formatter & style lint fixes** — run formatter, fix style warnings (standalone PR, no logic changes)
866
+ 6. **Dependency version bumps** — bring dependencies up to date (group minor/patch bumps)
867
+ 7. **Suppression audit** — remove stale \`eslint-disable\` / \`@ts-ignore\` / \`# noqa\` directives
868
+ 8. **Unlocks testing** — refactors that enable high-value tests
869
+ 9. **Documentation consolidation** — reduce confusion and maintenance burden
870
+ 10. **High duplication** — consolidation opportunities
871
+ 11. **High complexity** — simplification targets (also addresses complexity lint warnings)
872
+ 12. **Architectural violations** — dependency direction fixes
873
+ 13. **Technical debt hotspots** — frequently changed problem areas
874
+
875
+ \`\`\`
876
+ ✓ CHECKPOINT: Phase 6 complete - Cleanup Plan Creation
877
+ \`\`\`
878
+
879
+ ---
880
+
881
+ ## Output Format
882
+
883
+ Write the plan to \`CLEANUP_PLAN.md\` in project root with:
884
+
885
+ \`\`\`markdown
886
+ # Codebase Cleanup Plan
887
+
888
+ ## Executive Summary
889
+ [2-3 paragraph overview of findings and recommended approach]
890
+
891
+ ## Current State
892
+ - **Architecture**: [assessment]
893
+ - **Test Coverage**: [current %]
894
+ - **Documentation**: [assessment]
895
+ - **Dependency Health**: [assessment — e.g., "3 critical CVEs, 5 outdated, 2 unmaintained"]
896
+ - **Lint Health**: [assessment — e.g., "0 errors, 12 warnings (3 correctness, 9 style), 5 stale suppressions"]
897
+ - **Key Issues**: [top 5-7 problems]
898
+
899
+ ## Memory Context
900
+ - **Decisions from History**: [relevant architectural decisions from memory]
901
+ - **Known Tech Debt**: [tech debt items surfaced from memory]
902
+ - **Past Attempts**: [previous cleanup/refactoring attempts and outcomes]
903
+ - **Dependency History**: [past upgrade attempts, pinning reasons]
904
+ - **Lint/Suppression History**: [deliberate suppressions, unfixed warnings context]
905
+
906
+ ## Dependency Health
907
+
908
+ ### Security Fixes (Priority)
909
+ | Dependency | Current | Fix Version | Vulnerability | Severity |
910
+ |-----------|---------|-------------|---------------|----------|
911
+ | ... | ... | ... | CVE-... | critical/high/medium |
912
+
913
+ ### At-Risk Dependencies
914
+ | Dependency | Risk | Issue | Action | Alternative / Notes |
915
+ |-----------|------|-------|--------|---------------------|
916
+ | ... | high/critical | unmaintained since YYYY | replace / embed / fork | ... |
917
+
918
+ ### Version Bumps
919
+ | Dependency | Current | Latest | Breaking | Notes |
920
+ |-----------|---------|--------|----------|-------|
921
+ | ... | ... | ... | yes/no | ... |
922
+
923
+ ## Lint & Static Analysis
924
+
925
+ ### Errors
926
+ | File:Line | Rule | Message | Fix |
927
+ |-----------|------|---------|-----|
928
+ | ... | ... | ... | ... |
929
+
930
+ ### Warnings (by category)
931
+ | Category | Count | Action |
932
+ |----------|-------|--------|
933
+ | Correctness | N | Fix individually |
934
+ | Deprecation | N | Migrate APIs |
935
+ | Performance | N | Profile then fix |
936
+ | Style | N | Batch fix |
937
+ | Complexity | N | Refactor in Phase 4 |
938
+
939
+ ### Suppression Audit
940
+ | File:Line | Suppression | Verdict | Action |
941
+ |-----------|------------|---------|--------|
942
+ | ... | \`// eslint-disable\` | stale/valid | remove / keep with comment |
943
+
944
+ ## Dead Code & Artifact Removal
945
+
946
+ ### Immediate Removal
947
+ | Item | Location | Type | Notes |
948
+ |------|----------|------|-------|
949
+ | ... | ... | dead code/debug/artifact | ... |
950
+
951
+ ### Verify Before Removal
952
+ | Item | Location | Verification Needed |
953
+ |------|----------|---------------------|
954
+ | ... | ... | ... |
955
+
956
+ ## Documentation Consolidation
957
+
958
+ ### Documents to Update
959
+ | Document | Updates Required |
960
+ |----------|------------------|
961
+ | ... | ... |
962
+
963
+ ### Documents to Remove/Merge
964
+ | Document | Action | Target |
965
+ |----------|--------|--------|
966
+ | ... | merge into | ... |
967
+
968
+ ## Refactoring Roadmap
969
+
970
+ ### Phase 0: Dependency Health (Security & Supply Chain)
971
+ | Task | Impact | Effort | Dependencies Affected |
972
+ |------|--------|--------|----------------------|
973
+ | ... | ... | ... | ... |
974
+
975
+ ### Phase 1: Cleanup (Remove Noise)
976
+ | Task | Impact | Effort | Files Affected |
977
+ |------|--------|--------|----------------|
978
+ | ... | ... | ... | ... |
979
+
980
+ ### Phase 2: Foundation (Enable Testing)
981
+ | Task | Impact | Effort | Unlocks |
982
+ |------|--------|--------|---------|
983
+ | ... | ... | ... | ... |
984
+
985
+ ### Phase 3: Consolidation (Remove Duplication)
986
+ | Task | Impact | Effort | Files Affected |
987
+ |------|--------|--------|----------------|
988
+ | ... | ... | ... | ... |
989
+
990
+ ### Phase 4: Architecture (Clean Structure)
991
+ | Task | Impact | Effort | Components |
992
+ |------|--------|--------|------------|
993
+ | ... | ... | ... | ... |
994
+
995
+ ## Testing Strategy
996
+ [Detailed testing approach per module/layer]
997
+
998
+ ## Target State
999
+ - **Test Coverage**: [target %]
1000
+ - **Architecture**: [target state description]
1001
+ - **Documentation**: [target state]
1002
+ - **Key Improvements**: [expected outcomes]
1003
+
1004
+ ## Risks & Considerations
1005
+ [Migration risks, breaking changes, dependencies]
1006
+ \`\`\`
1007
+
1008
+ ---
1009
+
1010
+ ## Guidelines
1011
+
1012
+ ### Do
1013
+ - Be specific with file paths and line references
1014
+ - Quantify duplication (e.g., "duplicated in 5 places")
1015
+ - List every piece of dead code found
1016
+ - Note all debug statements for removal
1017
+ - Explain the "why" behind each recommendation
1018
+ - Consider incremental refactoring paths
1019
+ - Check memory before recommending changes to understand why code exists as-is
1020
+ - Note when memory shows a decision was deliberate vs accidental
1021
+ - Prioritise changes that unlock testing
1022
+ - Run ecosystem-specific audit tools (cargo audit, npm audit, etc.) for security findings
1023
+ - Check GitHub/registry pages for dependency health signals (last release, contributors, issues)
1024
+ - Distinguish between direct and transitive dependency vulnerabilities
1025
+ - Provide concrete alternatives when flagging at-risk dependencies
1026
+ - Estimate migration effort when suggesting dependency replacements
1027
+ - Run linters in strict/pedantic mode to surface the full warning set, not just what CI enforces
1028
+ - Audit every lint suppression — check if still needed and has an explanatory comment
1029
+ - Categorise lint findings (correctness vs style vs performance) so fixes can be batched sensibly
1030
+ - Recommend formatter-only commits as standalone PRs to keep diffs reviewable
1031
+
1032
+ ### Don't
1033
+ - Recommend rewrites when refactoring suffices
1034
+ - Suggest changes that break existing tests
1035
+ - Over-abstract prematurely
1036
+ - Ignore existing team conventions without discussion
1037
+ - Recommend removing code that memory shows was deliberately written to handle a specific edge case
1038
+ - Recommend an approach that memory shows was tried and abandoned
1039
+ - Create a plan too large to execute incrementally
1040
+ - Remove code without checking for dynamic references
1041
+ - Delete documentation without confirming it's truly outdated
1042
+ - Bump major versions without noting breaking changes and migration steps
1043
+ - Flag a dependency as "unmaintained" just because it's stable and feature-complete (some mature libraries are intentionally low-activity)
1044
+ - Recommend replacing a dependency without verifying the alternative covers the actual usage
1045
+ - Blindly fix all pedantic lint warnings — some are noise; triage by category first
1046
+ - Remove lint suppressions without checking if the underlying issue is actually fixed
1047
+ - Mix formatter changes with logic changes in the same commit (keep diffs reviewable)
1048
+
1049
+ ### Clean Code Principles to Apply
1050
+ - Functions should do one thing
1051
+ - Names should reveal intent
1052
+ - Comments explain "why", code explains "what"
1053
+ - Error handling is a separate concern
1054
+ - Tests are first-class citizens
1055
+ - Boy Scout Rule: leave code cleaner than you found it
1056
+ - No dead code, no commented-out code, no debug leftovers
1057
+
1058
+ ### Clean Architecture Principles to Apply
1059
+ - Independence from frameworks
1060
+ - Testability without external elements
1061
+ - Independence from UI
1062
+ - Independence from database
1063
+ - Independence from external agencies
1064
+ - Dependency Rule: source code dependencies point inward
1065
+
1066
+ ---
1067
+
1068
+ ## Notes
1069
+
1070
+ - This skill produces a **plan**, not immediate changes
1071
+ - User approval required before implementing any refactoring
1072
+ - Large codebases may need multiple planning sessions by area
1073
+ - Consider breaking the plan into separate PRs for review
1074
+ - Dead code removal is often safest to do first as a separate PR
1075
+ - Documentation updates can be done in parallel with code changes
1076
+ `,
1077
+ },
1078
+ ];
1079
+ /**
1080
+ * Returns a CLAUDE.md reference block for Causantic.
1081
+ * Lists all skills and provides proactive memory usage guidance.
1082
+ */
1083
+ export function getMinimalClaudeMdBlock() {
1084
+ const CAUSANTIC_START = '<!-- CAUSANTIC_MEMORY_START -->';
1085
+ const CAUSANTIC_END = '<!-- CAUSANTIC_MEMORY_END -->';
1086
+ return `${CAUSANTIC_START}
1087
+ ## Memory (Causantic)
1088
+
1089
+ Long-term memory is available via the \`causantic\` MCP server.
1090
+
1091
+ ### Skills
1092
+ - \`/causantic-resume\` — Resume interrupted work (start-of-session briefing)
1093
+ - \`/causantic-recall [query]\` — Look up context from past sessions
1094
+ - \`/causantic-explain [topic]\` — Understand history behind decisions
1095
+ - \`/causantic-predict\` — Surface relevant past context proactively
1096
+ - \`/causantic-debug [error]\` — Search for prior encounters with an error (auto-extracts from conversation if no argument)
1097
+ - \`/causantic-context [area]\` — Deep dive into a codebase area's history
1098
+ - \`/causantic-crossref [pattern]\` — Search across all projects
1099
+ - \`/causantic-retro [scope]\` — Retrospective pattern analysis
1100
+ - \`/causantic-cleanup\` — Memory-informed codebase review and cleanup plan
1101
+ - \`/causantic-list-projects\` — Discover available projects
1102
+ - \`/causantic-reconstruct [time range]\` — Reconstruct session context by time
1103
+
1104
+ ### Proactive Memory Usage
1105
+
1106
+ **Check memory automatically (no skill needed) when:**
1107
+ - Before saying "I don't have context from previous sessions" — always try \`recall\` first
1108
+ - User references past work ("remember when...", "like we did before", "that bug from last week")
1109
+ - When stuck on an error after 2 failed attempts — use \`recall\` with the error text before trying a 3rd approach
1110
+ - User asks "why" about existing code or architecture — use \`explain\` before guessing
1111
+ - Before making significant architectural decisions — use \`recall\` to check for prior discussions
1112
+
1113
+ **Skip memory (avoid latency) when:**
1114
+ - The full context is already in the conversation
1115
+ - Simple file operations where memory adds no value
1116
+ - Git operations handled by /commit, /pr, /merge, /qa
1117
+ - The user explicitly provides all needed context
1118
+ - First attempt at resolving a new error (try solving it first, check memory if stuck)
1119
+
1120
+ ### Combining Memory with Other Tools
1121
+
1122
+ Memory provides historical context, not current code state. After retrieving memory:
1123
+ - Use file search (grep/glob) to verify remembered code still exists
1124
+ - Use \`git log\` to check if remembered decisions were superseded
1125
+ - Do not treat memory as authoritative for current file contents — always verify against the actual codebase
1126
+ ${CAUSANTIC_END}`;
1127
+ }
1128
+ //# sourceMappingURL=skill-templates.js.map