@vheins/local-memory-mcp 0.5.32 → 0.6.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 (506) hide show
  1. package/README.md +9 -6
  2. package/dist/chunk-XIJO63UU.js +3618 -0
  3. package/dist/dashboard/public/assets/{index-C8FB4maW.css → index-Bd7v94SO.css} +1 -1
  4. package/dist/dashboard/public/assets/index-Df97JpLg.js +84 -0
  5. package/dist/dashboard/public/index.html +2 -2
  6. package/dist/dashboard/server.js +790 -451
  7. package/dist/mcp/server.js +2121 -305
  8. package/dist/{mcp/prompts/definitions → prompts}/create-task.md +4 -3
  9. package/dist/{mcp/prompts/definitions → prompts}/memory-agent-core.md +2 -0
  10. package/dist/{mcp/prompts/definitions → prompts}/memory-index-policy.md +2 -0
  11. package/dist/{mcp/prompts/definitions → prompts}/review-and-audit.md +3 -1
  12. package/dist/{mcp/prompts/definitions → prompts}/review-and-post-issue.md +3 -1
  13. package/dist/prompts/task-management-guidelines.md +28 -0
  14. package/dist/{mcp/prompts/definitions → prompts}/task-memory-executor.md +6 -5
  15. package/package.json +22 -6
  16. package/dist/capabilities.d.ts +0 -22
  17. package/dist/capabilities.d.ts.map +0 -1
  18. package/dist/capabilities.js +0 -38
  19. package/dist/capabilities.js.map +0 -1
  20. package/dist/completion.d.ts +0 -25
  21. package/dist/completion.d.ts.map +0 -1
  22. package/dist/completion.js +0 -127
  23. package/dist/completion.js.map +0 -1
  24. package/dist/dashboard/dashboard.test.d.ts +0 -2
  25. package/dist/dashboard/dashboard.test.d.ts.map +0 -1
  26. package/dist/dashboard/dashboard.test.js +0 -370
  27. package/dist/dashboard/dashboard.test.js.map +0 -1
  28. package/dist/dashboard/public/assets/index-DIhCu9qA.js +0 -78
  29. package/dist/dashboard/server.d.ts +0 -3
  30. package/dist/dashboard/server.d.ts.map +0 -1
  31. package/dist/dashboard/server.js.map +0 -1
  32. package/dist/e2e.test.d.ts +0 -2
  33. package/dist/e2e.test.d.ts.map +0 -1
  34. package/dist/e2e.test.js +0 -250
  35. package/dist/e2e.test.js.map +0 -1
  36. package/dist/mcp/capabilities.d.ts +0 -22
  37. package/dist/mcp/capabilities.d.ts.map +0 -1
  38. package/dist/mcp/capabilities.js +0 -38
  39. package/dist/mcp/capabilities.js.map +0 -1
  40. package/dist/mcp/client.d.ts +0 -34
  41. package/dist/mcp/client.d.ts.map +0 -1
  42. package/dist/mcp/client.js +0 -188
  43. package/dist/mcp/client.js.map +0 -1
  44. package/dist/mcp/client.test.d.ts +0 -2
  45. package/dist/mcp/client.test.d.ts.map +0 -1
  46. package/dist/mcp/client.test.js +0 -130
  47. package/dist/mcp/client.test.js.map +0 -1
  48. package/dist/mcp/completion.d.ts +0 -25
  49. package/dist/mcp/completion.d.ts.map +0 -1
  50. package/dist/mcp/completion.js +0 -127
  51. package/dist/mcp/completion.js.map +0 -1
  52. package/dist/mcp/elicitation.d.ts +0 -24
  53. package/dist/mcp/elicitation.d.ts.map +0 -1
  54. package/dist/mcp/elicitation.js +0 -13
  55. package/dist/mcp/elicitation.js.map +0 -1
  56. package/dist/mcp/prompts/definitions/task-management-guidelines.md +0 -30
  57. package/dist/mcp/prompts/loader.d.ts +0 -10
  58. package/dist/mcp/prompts/loader.d.ts.map +0 -1
  59. package/dist/mcp/prompts/loader.js +0 -31
  60. package/dist/mcp/prompts/loader.js.map +0 -1
  61. package/dist/mcp/prompts/registry.d.ts +0 -35
  62. package/dist/mcp/prompts/registry.d.ts.map +0 -1
  63. package/dist/mcp/prompts/registry.js +0 -95
  64. package/dist/mcp/prompts/registry.js.map +0 -1
  65. package/dist/mcp/resources/index.d.ts +0 -68
  66. package/dist/mcp/resources/index.d.ts.map +0 -1
  67. package/dist/mcp/resources/index.js +0 -359
  68. package/dist/mcp/resources/index.js.map +0 -1
  69. package/dist/mcp/router.d.ts +0 -14
  70. package/dist/mcp/router.d.ts.map +0 -1
  71. package/dist/mcp/router.js +0 -255
  72. package/dist/mcp/router.js.map +0 -1
  73. package/dist/mcp/sampling.d.ts +0 -69
  74. package/dist/mcp/sampling.d.ts.map +0 -1
  75. package/dist/mcp/sampling.js +0 -13
  76. package/dist/mcp/sampling.js.map +0 -1
  77. package/dist/mcp/server.d.ts +0 -3
  78. package/dist/mcp/server.d.ts.map +0 -1
  79. package/dist/mcp/server.js.map +0 -1
  80. package/dist/mcp/session.d.ts +0 -28
  81. package/dist/mcp/session.d.ts.map +0 -1
  82. package/dist/mcp/session.js +0 -106
  83. package/dist/mcp/session.js.map +0 -1
  84. package/dist/mcp/storage/sqlite.d.ts +0 -87
  85. package/dist/mcp/storage/sqlite.d.ts.map +0 -1
  86. package/dist/mcp/storage/sqlite.js +0 -1327
  87. package/dist/mcp/storage/sqlite.js.map +0 -1
  88. package/dist/mcp/storage/vectors.d.ts +0 -19
  89. package/dist/mcp/storage/vectors.d.ts.map +0 -1
  90. package/dist/mcp/storage/vectors.js +0 -74
  91. package/dist/mcp/storage/vectors.js.map +0 -1
  92. package/dist/mcp/storage/vectors.stub.d.ts +0 -12
  93. package/dist/mcp/storage/vectors.stub.d.ts.map +0 -1
  94. package/dist/mcp/storage/vectors.stub.js +0 -88
  95. package/dist/mcp/storage/vectors.stub.js.map +0 -1
  96. package/dist/mcp/tests/client.test.d.ts +0 -2
  97. package/dist/mcp/tests/client.test.d.ts.map +0 -1
  98. package/dist/mcp/tests/client.test.js +0 -130
  99. package/dist/mcp/tests/client.test.js.map +0 -1
  100. package/dist/mcp/tests/dashboard.test.d.ts +0 -2
  101. package/dist/mcp/tests/dashboard.test.d.ts.map +0 -1
  102. package/dist/mcp/tests/dashboard.test.js +0 -370
  103. package/dist/mcp/tests/dashboard.test.js.map +0 -1
  104. package/dist/mcp/tests/detail-tools.test.d.ts +0 -2
  105. package/dist/mcp/tests/detail-tools.test.d.ts.map +0 -1
  106. package/dist/mcp/tests/detail-tools.test.js +0 -109
  107. package/dist/mcp/tests/detail-tools.test.js.map +0 -1
  108. package/dist/mcp/tests/e2e.test.d.ts +0 -2
  109. package/dist/mcp/tests/e2e.test.d.ts.map +0 -1
  110. package/dist/mcp/tests/e2e.test.js +0 -255
  111. package/dist/mcp/tests/e2e.test.js.map +0 -1
  112. package/dist/mcp/tests/index.test.d.ts +0 -2
  113. package/dist/mcp/tests/index.test.d.ts.map +0 -1
  114. package/dist/mcp/tests/index.test.js +0 -185
  115. package/dist/mcp/tests/index.test.js.map +0 -1
  116. package/dist/mcp/tests/logger.test.d.ts +0 -2
  117. package/dist/mcp/tests/logger.test.d.ts.map +0 -1
  118. package/dist/mcp/tests/logger.test.js +0 -104
  119. package/dist/mcp/tests/logger.test.js.map +0 -1
  120. package/dist/mcp/tests/memory.bulk.test.d.ts +0 -2
  121. package/dist/mcp/tests/memory.bulk.test.d.ts.map +0 -1
  122. package/dist/mcp/tests/memory.bulk.test.js +0 -53
  123. package/dist/mcp/tests/memory.bulk.test.js.map +0 -1
  124. package/dist/mcp/tests/memory.search.test.d.ts +0 -2
  125. package/dist/mcp/tests/memory.search.test.d.ts.map +0 -1
  126. package/dist/mcp/tests/memory.search.test.js +0 -181
  127. package/dist/mcp/tests/memory.search.test.js.map +0 -1
  128. package/dist/mcp/tests/normalize.test.d.ts +0 -2
  129. package/dist/mcp/tests/normalize.test.d.ts.map +0 -1
  130. package/dist/mcp/tests/normalize.test.js +0 -181
  131. package/dist/mcp/tests/normalize.test.js.map +0 -1
  132. package/dist/mcp/tests/query-expander.test.d.ts +0 -2
  133. package/dist/mcp/tests/query-expander.test.d.ts.map +0 -1
  134. package/dist/mcp/tests/query-expander.test.js +0 -33
  135. package/dist/mcp/tests/query-expander.test.js.map +0 -1
  136. package/dist/mcp/tests/router.test.d.ts +0 -2
  137. package/dist/mcp/tests/router.test.d.ts.map +0 -1
  138. package/dist/mcp/tests/router.test.js +0 -481
  139. package/dist/mcp/tests/router.test.js.map +0 -1
  140. package/dist/mcp/tests/spec_compliance.test.d.ts +0 -2
  141. package/dist/mcp/tests/spec_compliance.test.d.ts.map +0 -1
  142. package/dist/mcp/tests/spec_compliance.test.js +0 -61
  143. package/dist/mcp/tests/spec_compliance.test.js.map +0 -1
  144. package/dist/mcp/tests/sqlite.test.d.ts +0 -2
  145. package/dist/mcp/tests/sqlite.test.d.ts.map +0 -1
  146. package/dist/mcp/tests/sqlite.test.js +0 -367
  147. package/dist/mcp/tests/sqlite.test.js.map +0 -1
  148. package/dist/mcp/tests/tasks-search.test.d.ts +0 -2
  149. package/dist/mcp/tests/tasks-search.test.d.ts.map +0 -1
  150. package/dist/mcp/tests/tasks-search.test.js +0 -156
  151. package/dist/mcp/tests/tasks-search.test.js.map +0 -1
  152. package/dist/mcp/tests/tasks-transition.test.d.ts +0 -2
  153. package/dist/mcp/tests/tasks-transition.test.d.ts.map +0 -1
  154. package/dist/mcp/tests/tasks-transition.test.js +0 -174
  155. package/dist/mcp/tests/tasks-transition.test.js.map +0 -1
  156. package/dist/mcp/tests/tasks.bulk.test.d.ts +0 -2
  157. package/dist/mcp/tests/tasks.bulk.test.d.ts.map +0 -1
  158. package/dist/mcp/tests/tasks.bulk.test.js +0 -410
  159. package/dist/mcp/tests/tasks.bulk.test.js.map +0 -1
  160. package/dist/mcp/tests/tasks.e2e.test.d.ts +0 -2
  161. package/dist/mcp/tests/tasks.e2e.test.d.ts.map +0 -1
  162. package/dist/mcp/tests/tasks.e2e.test.js +0 -289
  163. package/dist/mcp/tests/tasks.e2e.test.js.map +0 -1
  164. package/dist/mcp/tests/tasks.pending-limit-refined.test.d.ts +0 -2
  165. package/dist/mcp/tests/tasks.pending-limit-refined.test.d.ts.map +0 -1
  166. package/dist/mcp/tests/tasks.pending-limit-refined.test.js +0 -72
  167. package/dist/mcp/tests/tasks.pending-limit-refined.test.js.map +0 -1
  168. package/dist/mcp/tests/v2-features.test.d.ts +0 -2
  169. package/dist/mcp/tests/v2-features.test.d.ts.map +0 -1
  170. package/dist/mcp/tests/v2-features.test.js +0 -209
  171. package/dist/mcp/tests/v2-features.test.js.map +0 -1
  172. package/dist/mcp/tools/memory.acknowledge.d.ts +0 -4
  173. package/dist/mcp/tools/memory.acknowledge.d.ts.map +0 -1
  174. package/dist/mcp/tools/memory.acknowledge.js +0 -32
  175. package/dist/mcp/tools/memory.acknowledge.js.map +0 -1
  176. package/dist/mcp/tools/memory.bulk-delete.d.ts +0 -4
  177. package/dist/mcp/tools/memory.bulk-delete.d.ts.map +0 -1
  178. package/dist/mcp/tools/memory.bulk-delete.js +0 -40
  179. package/dist/mcp/tools/memory.bulk-delete.js.map +0 -1
  180. package/dist/mcp/tools/memory.delete.d.ts +0 -9
  181. package/dist/mcp/tools/memory.delete.d.ts.map +0 -1
  182. package/dist/mcp/tools/memory.delete.js +0 -40
  183. package/dist/mcp/tools/memory.delete.js.map +0 -1
  184. package/dist/mcp/tools/memory.get.d.ts +0 -3
  185. package/dist/mcp/tools/memory.get.d.ts.map +0 -1
  186. package/dist/mcp/tools/memory.get.js +0 -24
  187. package/dist/mcp/tools/memory.get.js.map +0 -1
  188. package/dist/mcp/tools/memory.recap.d.ts +0 -4
  189. package/dist/mcp/tools/memory.recap.d.ts.map +0 -1
  190. package/dist/mcp/tools/memory.recap.js +0 -52
  191. package/dist/mcp/tools/memory.recap.js.map +0 -1
  192. package/dist/mcp/tools/memory.search.d.ts +0 -5
  193. package/dist/mcp/tools/memory.search.d.ts.map +0 -1
  194. package/dist/mcp/tools/memory.search.js +0 -144
  195. package/dist/mcp/tools/memory.search.js.map +0 -1
  196. package/dist/mcp/tools/memory.store.d.ts +0 -5
  197. package/dist/mcp/tools/memory.store.d.ts.map +0 -1
  198. package/dist/mcp/tools/memory.store.js +0 -120
  199. package/dist/mcp/tools/memory.store.js.map +0 -1
  200. package/dist/mcp/tools/memory.summarize.d.ts +0 -4
  201. package/dist/mcp/tools/memory.summarize.d.ts.map +0 -1
  202. package/dist/mcp/tools/memory.summarize.js +0 -32
  203. package/dist/mcp/tools/memory.summarize.js.map +0 -1
  204. package/dist/mcp/tools/memory.synthesize.d.ts +0 -14
  205. package/dist/mcp/tools/memory.synthesize.d.ts.map +0 -1
  206. package/dist/mcp/tools/memory.synthesize.js +0 -230
  207. package/dist/mcp/tools/memory.synthesize.js.map +0 -1
  208. package/dist/mcp/tools/memory.update.d.ts +0 -5
  209. package/dist/mcp/tools/memory.update.d.ts.map +0 -1
  210. package/dist/mcp/tools/memory.update.js +0 -74
  211. package/dist/mcp/tools/memory.update.js.map +0 -1
  212. package/dist/mcp/tools/schemas.d.ts +0 -3177
  213. package/dist/mcp/tools/schemas.d.ts.map +0 -1
  214. package/dist/mcp/tools/schemas.js +0 -1081
  215. package/dist/mcp/tools/schemas.js.map +0 -1
  216. package/dist/mcp/tools/task.bulk-manage.d.ts +0 -4
  217. package/dist/mcp/tools/task.bulk-manage.d.ts.map +0 -1
  218. package/dist/mcp/tools/task.bulk-manage.js +0 -190
  219. package/dist/mcp/tools/task.bulk-manage.js.map +0 -1
  220. package/dist/mcp/tools/task.get.d.ts +0 -3
  221. package/dist/mcp/tools/task.get.d.ts.map +0 -1
  222. package/dist/mcp/tools/task.get.js +0 -32
  223. package/dist/mcp/tools/task.get.js.map +0 -1
  224. package/dist/mcp/tools/task.manage.d.ts +0 -18
  225. package/dist/mcp/tools/task.manage.d.ts.map +0 -1
  226. package/dist/mcp/tools/task.manage.js +0 -477
  227. package/dist/mcp/tools/task.manage.js.map +0 -1
  228. package/dist/mcp/types.d.ts +0 -87
  229. package/dist/mcp/types.d.ts.map +0 -1
  230. package/dist/mcp/types.js +0 -3
  231. package/dist/mcp/types.js.map +0 -1
  232. package/dist/mcp/utils/completion.d.ts +0 -2
  233. package/dist/mcp/utils/completion.d.ts.map +0 -1
  234. package/dist/mcp/utils/completion.js +0 -28
  235. package/dist/mcp/utils/completion.js.map +0 -1
  236. package/dist/mcp/utils/git-scope.d.ts +0 -8
  237. package/dist/mcp/utils/git-scope.d.ts.map +0 -1
  238. package/dist/mcp/utils/git-scope.js +0 -38
  239. package/dist/mcp/utils/git-scope.js.map +0 -1
  240. package/dist/mcp/utils/logger.d.ts +0 -25
  241. package/dist/mcp/utils/logger.d.ts.map +0 -1
  242. package/dist/mcp/utils/logger.js +0 -152
  243. package/dist/mcp/utils/logger.js.map +0 -1
  244. package/dist/mcp/utils/mcp-response.d.ts +0 -82
  245. package/dist/mcp/utils/mcp-response.d.ts.map +0 -1
  246. package/dist/mcp/utils/mcp-response.js +0 -182
  247. package/dist/mcp/utils/mcp-response.js.map +0 -1
  248. package/dist/mcp/utils/normalize.d.ts +0 -9
  249. package/dist/mcp/utils/normalize.d.ts.map +0 -1
  250. package/dist/mcp/utils/normalize.js +0 -62
  251. package/dist/mcp/utils/normalize.js.map +0 -1
  252. package/dist/mcp/utils/pagination.d.ts +0 -6
  253. package/dist/mcp/utils/pagination.d.ts.map +0 -1
  254. package/dist/mcp/utils/pagination.js +0 -32
  255. package/dist/mcp/utils/pagination.js.map +0 -1
  256. package/dist/mcp/utils/query-expander.d.ts +0 -2
  257. package/dist/mcp/utils/query-expander.d.ts.map +0 -1
  258. package/dist/mcp/utils/query-expander.js +0 -29
  259. package/dist/mcp/utils/query-expander.js.map +0 -1
  260. package/dist/memory.bulk.test.d.ts +0 -2
  261. package/dist/memory.bulk.test.d.ts.map +0 -1
  262. package/dist/memory.bulk.test.js +0 -52
  263. package/dist/memory.bulk.test.js.map +0 -1
  264. package/dist/memory.db +0 -0
  265. package/dist/prompts/registry.d.ts +0 -314
  266. package/dist/prompts/registry.d.ts.map +0 -1
  267. package/dist/prompts/registry.js +0 -936
  268. package/dist/prompts/registry.js.map +0 -1
  269. package/dist/resources/index.d.ts +0 -68
  270. package/dist/resources/index.d.ts.map +0 -1
  271. package/dist/resources/index.js +0 -323
  272. package/dist/resources/index.js.map +0 -1
  273. package/dist/resources/index.test.d.ts +0 -2
  274. package/dist/resources/index.test.d.ts.map +0 -1
  275. package/dist/resources/index.test.js +0 -105
  276. package/dist/resources/index.test.js.map +0 -1
  277. package/dist/router.d.ts +0 -14
  278. package/dist/router.d.ts.map +0 -1
  279. package/dist/router.js +0 -242
  280. package/dist/router.js.map +0 -1
  281. package/dist/router.test.d.ts +0 -2
  282. package/dist/router.test.d.ts.map +0 -1
  283. package/dist/router.test.js +0 -122
  284. package/dist/router.test.js.map +0 -1
  285. package/dist/server.d.ts +0 -3
  286. package/dist/server.d.ts.map +0 -1
  287. package/dist/server.js +0 -338
  288. package/dist/server.js.map +0 -1
  289. package/dist/storage/sqlite.d.ts +0 -79
  290. package/dist/storage/sqlite.d.ts.map +0 -1
  291. package/dist/storage/sqlite.js +0 -1148
  292. package/dist/storage/sqlite.js.map +0 -1
  293. package/dist/storage/sqlite.test.d.ts +0 -2
  294. package/dist/storage/sqlite.test.d.ts.map +0 -1
  295. package/dist/storage/sqlite.test.js +0 -367
  296. package/dist/storage/sqlite.test.js.map +0 -1
  297. package/dist/storage/vectors.d.ts +0 -19
  298. package/dist/storage/vectors.d.ts.map +0 -1
  299. package/dist/storage/vectors.js +0 -74
  300. package/dist/storage/vectors.js.map +0 -1
  301. package/dist/storage/vectors.stub.d.ts +0 -12
  302. package/dist/storage/vectors.stub.d.ts.map +0 -1
  303. package/dist/storage/vectors.stub.js +0 -88
  304. package/dist/storage/vectors.stub.js.map +0 -1
  305. package/dist/tasks.archive.test.d.ts +0 -2
  306. package/dist/tasks.archive.test.d.ts.map +0 -1
  307. package/dist/tasks.archive.test.js +0 -75
  308. package/dist/tasks.archive.test.js.map +0 -1
  309. package/dist/tasks.bulk.test.d.ts +0 -2
  310. package/dist/tasks.bulk.test.d.ts.map +0 -1
  311. package/dist/tasks.bulk.test.js +0 -250
  312. package/dist/tasks.bulk.test.js.map +0 -1
  313. package/dist/tasks.e2e.test.d.ts +0 -2
  314. package/dist/tasks.e2e.test.d.ts.map +0 -1
  315. package/dist/tasks.e2e.test.js +0 -289
  316. package/dist/tasks.e2e.test.js.map +0 -1
  317. package/dist/tests/client.test.d.ts +0 -2
  318. package/dist/tests/client.test.d.ts.map +0 -1
  319. package/dist/tests/client.test.js +0 -130
  320. package/dist/tests/client.test.js.map +0 -1
  321. package/dist/tests/dashboard.test.d.ts +0 -2
  322. package/dist/tests/dashboard.test.d.ts.map +0 -1
  323. package/dist/tests/dashboard.test.js +0 -370
  324. package/dist/tests/dashboard.test.js.map +0 -1
  325. package/dist/tests/e2e.test.d.ts +0 -2
  326. package/dist/tests/e2e.test.d.ts.map +0 -1
  327. package/dist/tests/e2e.test.js +0 -250
  328. package/dist/tests/e2e.test.js.map +0 -1
  329. package/dist/tests/index.test.d.ts +0 -2
  330. package/dist/tests/index.test.d.ts.map +0 -1
  331. package/dist/tests/index.test.js +0 -185
  332. package/dist/tests/index.test.js.map +0 -1
  333. package/dist/tests/logger.test.d.ts +0 -2
  334. package/dist/tests/logger.test.d.ts.map +0 -1
  335. package/dist/tests/logger.test.js +0 -104
  336. package/dist/tests/logger.test.js.map +0 -1
  337. package/dist/tests/memory.bulk.test.d.ts +0 -2
  338. package/dist/tests/memory.bulk.test.d.ts.map +0 -1
  339. package/dist/tests/memory.bulk.test.js +0 -52
  340. package/dist/tests/memory.bulk.test.js.map +0 -1
  341. package/dist/tests/memory.search.test.d.ts +0 -2
  342. package/dist/tests/memory.search.test.d.ts.map +0 -1
  343. package/dist/tests/memory.search.test.js +0 -181
  344. package/dist/tests/memory.search.test.js.map +0 -1
  345. package/dist/tests/normalize.test.d.ts +0 -2
  346. package/dist/tests/normalize.test.d.ts.map +0 -1
  347. package/dist/tests/normalize.test.js +0 -181
  348. package/dist/tests/normalize.test.js.map +0 -1
  349. package/dist/tests/query-expander.test.d.ts +0 -2
  350. package/dist/tests/query-expander.test.d.ts.map +0 -1
  351. package/dist/tests/query-expander.test.js +0 -33
  352. package/dist/tests/query-expander.test.js.map +0 -1
  353. package/dist/tests/router.test.d.ts +0 -2
  354. package/dist/tests/router.test.d.ts.map +0 -1
  355. package/dist/tests/router.test.js +0 -470
  356. package/dist/tests/router.test.js.map +0 -1
  357. package/dist/tests/sqlite.test.d.ts +0 -2
  358. package/dist/tests/sqlite.test.d.ts.map +0 -1
  359. package/dist/tests/sqlite.test.js +0 -367
  360. package/dist/tests/sqlite.test.js.map +0 -1
  361. package/dist/tests/tasks-search.test.d.ts +0 -2
  362. package/dist/tests/tasks-search.test.d.ts.map +0 -1
  363. package/dist/tests/tasks-search.test.js +0 -154
  364. package/dist/tests/tasks-search.test.js.map +0 -1
  365. package/dist/tests/tasks-transition.test.d.ts +0 -2
  366. package/dist/tests/tasks-transition.test.d.ts.map +0 -1
  367. package/dist/tests/tasks-transition.test.js +0 -174
  368. package/dist/tests/tasks-transition.test.js.map +0 -1
  369. package/dist/tests/tasks.bulk.test.d.ts +0 -2
  370. package/dist/tests/tasks.bulk.test.d.ts.map +0 -1
  371. package/dist/tests/tasks.bulk.test.js +0 -254
  372. package/dist/tests/tasks.bulk.test.js.map +0 -1
  373. package/dist/tests/tasks.e2e.test.d.ts +0 -2
  374. package/dist/tests/tasks.e2e.test.d.ts.map +0 -1
  375. package/dist/tests/tasks.e2e.test.js +0 -289
  376. package/dist/tests/tasks.e2e.test.js.map +0 -1
  377. package/dist/tests/tasks.pending-limit-refined.test.d.ts +0 -2
  378. package/dist/tests/tasks.pending-limit-refined.test.d.ts.map +0 -1
  379. package/dist/tests/tasks.pending-limit-refined.test.js +0 -72
  380. package/dist/tests/tasks.pending-limit-refined.test.js.map +0 -1
  381. package/dist/tests/v2-features.test.d.ts +0 -2
  382. package/dist/tests/v2-features.test.d.ts.map +0 -1
  383. package/dist/tests/v2-features.test.js +0 -209
  384. package/dist/tests/v2-features.test.js.map +0 -1
  385. package/dist/tools/memory.acknowledge.d.ts +0 -4
  386. package/dist/tools/memory.acknowledge.d.ts.map +0 -1
  387. package/dist/tools/memory.acknowledge.js +0 -30
  388. package/dist/tools/memory.acknowledge.js.map +0 -1
  389. package/dist/tools/memory.bulk-delete.d.ts +0 -4
  390. package/dist/tools/memory.bulk-delete.d.ts.map +0 -1
  391. package/dist/tools/memory.bulk-delete.js +0 -39
  392. package/dist/tools/memory.bulk-delete.js.map +0 -1
  393. package/dist/tools/memory.delete.d.ts +0 -9
  394. package/dist/tools/memory.delete.d.ts.map +0 -1
  395. package/dist/tools/memory.delete.js +0 -39
  396. package/dist/tools/memory.delete.js.map +0 -1
  397. package/dist/tools/memory.recap.d.ts +0 -4
  398. package/dist/tools/memory.recap.d.ts.map +0 -1
  399. package/dist/tools/memory.recap.js +0 -90
  400. package/dist/tools/memory.recap.js.map +0 -1
  401. package/dist/tools/memory.search.d.ts +0 -5
  402. package/dist/tools/memory.search.d.ts.map +0 -1
  403. package/dist/tools/memory.search.js +0 -134
  404. package/dist/tools/memory.search.js.map +0 -1
  405. package/dist/tools/memory.search.test.d.ts +0 -2
  406. package/dist/tools/memory.search.test.d.ts.map +0 -1
  407. package/dist/tools/memory.search.test.js +0 -181
  408. package/dist/tools/memory.search.test.js.map +0 -1
  409. package/dist/tools/memory.store.d.ts +0 -5
  410. package/dist/tools/memory.store.d.ts.map +0 -1
  411. package/dist/tools/memory.store.js +0 -117
  412. package/dist/tools/memory.store.js.map +0 -1
  413. package/dist/tools/memory.summarize.d.ts +0 -4
  414. package/dist/tools/memory.summarize.d.ts.map +0 -1
  415. package/dist/tools/memory.summarize.js +0 -31
  416. package/dist/tools/memory.summarize.js.map +0 -1
  417. package/dist/tools/memory.synthesize.d.ts +0 -14
  418. package/dist/tools/memory.synthesize.d.ts.map +0 -1
  419. package/dist/tools/memory.synthesize.js +0 -228
  420. package/dist/tools/memory.synthesize.js.map +0 -1
  421. package/dist/tools/memory.update.d.ts +0 -5
  422. package/dist/tools/memory.update.d.ts.map +0 -1
  423. package/dist/tools/memory.update.js +0 -73
  424. package/dist/tools/memory.update.js.map +0 -1
  425. package/dist/tools/schemas.d.ts +0 -2762
  426. package/dist/tools/schemas.d.ts.map +0 -1
  427. package/dist/tools/schemas.js +0 -952
  428. package/dist/tools/schemas.js.map +0 -1
  429. package/dist/tools/task.bulk-manage.d.ts +0 -4
  430. package/dist/tools/task.bulk-manage.d.ts.map +0 -1
  431. package/dist/tools/task.bulk-manage.js +0 -146
  432. package/dist/tools/task.bulk-manage.js.map +0 -1
  433. package/dist/tools/task.manage.d.ts +0 -16
  434. package/dist/tools/task.manage.d.ts.map +0 -1
  435. package/dist/tools/task.manage.js +0 -395
  436. package/dist/tools/task.manage.js.map +0 -1
  437. package/dist/tools/tasks-transition.test.d.ts +0 -2
  438. package/dist/tools/tasks-transition.test.d.ts.map +0 -1
  439. package/dist/tools/tasks-transition.test.js +0 -174
  440. package/dist/tools/tasks-transition.test.js.map +0 -1
  441. package/dist/tools/tasks.pending-limit-refined.test.d.ts +0 -2
  442. package/dist/tools/tasks.pending-limit-refined.test.d.ts.map +0 -1
  443. package/dist/tools/tasks.pending-limit-refined.test.js +0 -72
  444. package/dist/tools/tasks.pending-limit-refined.test.js.map +0 -1
  445. package/dist/types.d.ts +0 -87
  446. package/dist/types.d.ts.map +0 -1
  447. package/dist/types.js +0 -3
  448. package/dist/types.js.map +0 -1
  449. package/dist/utils/completion.d.ts +0 -2
  450. package/dist/utils/completion.d.ts.map +0 -1
  451. package/dist/utils/completion.js +0 -28
  452. package/dist/utils/completion.js.map +0 -1
  453. package/dist/utils/git-scope.d.ts +0 -8
  454. package/dist/utils/git-scope.d.ts.map +0 -1
  455. package/dist/utils/git-scope.js +0 -38
  456. package/dist/utils/git-scope.js.map +0 -1
  457. package/dist/utils/logger.d.ts +0 -25
  458. package/dist/utils/logger.d.ts.map +0 -1
  459. package/dist/utils/logger.js +0 -152
  460. package/dist/utils/logger.js.map +0 -1
  461. package/dist/utils/logger.test.d.ts +0 -2
  462. package/dist/utils/logger.test.d.ts.map +0 -1
  463. package/dist/utils/logger.test.js +0 -76
  464. package/dist/utils/logger.test.js.map +0 -1
  465. package/dist/utils/mcp-response.d.ts +0 -96
  466. package/dist/utils/mcp-response.d.ts.map +0 -1
  467. package/dist/utils/mcp-response.js +0 -131
  468. package/dist/utils/mcp-response.js.map +0 -1
  469. package/dist/utils/normalize.d.ts +0 -9
  470. package/dist/utils/normalize.d.ts.map +0 -1
  471. package/dist/utils/normalize.js +0 -62
  472. package/dist/utils/normalize.js.map +0 -1
  473. package/dist/utils/normalize.test.d.ts +0 -2
  474. package/dist/utils/normalize.test.d.ts.map +0 -1
  475. package/dist/utils/normalize.test.js +0 -159
  476. package/dist/utils/normalize.test.js.map +0 -1
  477. package/dist/utils/pagination.d.ts +0 -6
  478. package/dist/utils/pagination.d.ts.map +0 -1
  479. package/dist/utils/pagination.js +0 -32
  480. package/dist/utils/pagination.js.map +0 -1
  481. package/dist/utils/query-expander.d.ts +0 -2
  482. package/dist/utils/query-expander.d.ts.map +0 -1
  483. package/dist/utils/query-expander.js +0 -29
  484. package/dist/utils/query-expander.js.map +0 -1
  485. package/dist/utils/query-expander.test.d.ts +0 -2
  486. package/dist/utils/query-expander.test.d.ts.map +0 -1
  487. package/dist/utils/query-expander.test.js +0 -33
  488. package/dist/utils/query-expander.test.js.map +0 -1
  489. package/dist/v2-features.test.d.ts +0 -2
  490. package/dist/v2-features.test.d.ts.map +0 -1
  491. package/dist/v2-features.test.js +0 -209
  492. package/dist/v2-features.test.js.map +0 -1
  493. /package/dist/{mcp/prompts/definitions → prompts}/architecture-design.md +0 -0
  494. /package/dist/{mcp/prompts/definitions → prompts}/documentation-sync.md +0 -0
  495. /package/dist/{mcp/prompts/definitions → prompts}/fix-suggestion.md +0 -0
  496. /package/dist/{mcp/prompts/definitions → prompts}/import-github-issues.md +0 -0
  497. /package/dist/{mcp/prompts/definitions → prompts}/learning-retrospective.md +0 -0
  498. /package/dist/{mcp/prompts/definitions → prompts}/memory-guided-review.md +0 -0
  499. /package/dist/{mcp/prompts/definitions → prompts}/project-briefing.md +0 -0
  500. /package/dist/{mcp/prompts/definitions → prompts}/root-cause-analysis.md +0 -0
  501. /package/dist/{mcp/prompts/definitions → prompts}/security-triage.md +0 -0
  502. /package/dist/{mcp/prompts/definitions → prompts}/senior-code-review.md +0 -0
  503. /package/dist/{mcp/prompts/definitions → prompts}/session-planner.md +0 -0
  504. /package/dist/{mcp/prompts/definitions → prompts}/tech-affinity-scout.md +0 -0
  505. /package/dist/{mcp/prompts/definitions → prompts}/technical-planning.md +0 -0
  506. /package/dist/{mcp/prompts/definitions → prompts}/tool-usage-guidelines.md +0 -0
@@ -1,936 +0,0 @@
1
- import { inferRepoFromSession } from "../mcp/session.js";
2
- import { rankCompletionValues } from "../utils/completion.js";
3
- import { decodeCursor, encodeCursor } from "../utils/pagination.js";
4
- export const PROMPTS = {
5
- "memory-agent-core": {
6
- name: "memory-agent-core",
7
- description: "Core behavioral contract for memory-aware agents",
8
- arguments: [],
9
- messages: [
10
- {
11
- role: "user",
12
- content: {
13
- type: "text",
14
- text: `You are a coding copilot agent working inside an active software project.
15
-
16
- Your primary goal is to help write correct, maintainable, and consistent code.
17
-
18
- You are memory-aware:
19
- - Stored memory represents durable project knowledge.
20
- - Memory is a source of truth, not a suggestion.
21
- - You must respect stored decisions and constraints.
22
-
23
- Core Behavioral Rules:
24
- 1. Never contradict stored decisions without explicitly using 'memory-update' or 'supersedes'.
25
- 2. Never repeat known mistakes documented in memory.
26
- 3. Never use memory from another repository UNLESS it shares the same technology tags (Affinity) or is marked as Global.
27
- 4. If memory conflicts with the user's new request, detect the conflict and ask for clarification or propose a 'supersedes' update.
28
- 5. After using a memory to generate code, you MUST call 'memory-acknowledge' to report its utility.
29
-
30
- Memory Usage Policy:
31
- Before generating code:
32
- 1. Search memory using 'current_file_path' and 'current_tags' (e.g., ['filament', 'react']) for maximum relevance.
33
- 2. Evaluate results based on 'type' (decision, pattern, mistake).
34
- 3. Use memory ONLY if clearly relevant. Prefer fewer, stronger memories over many weak ones.
35
-
36
- Auto-Memory Creation Policy:
37
- You MAY store memory ONLY if:
38
- - The information affects future behavior.
39
- - The knowledge is durable (e.g., architecture, styling rules, bug fixes).
40
- - You use 'tags' to categorize by technology (e.g., ['nestjs', 'typescript']).
41
-
42
- Before storing memory:
43
- - If this replaces an old rule, find the old memory ID and use 'supersedes'.
44
- - Explain briefly why it should be stored.
45
-
46
- Behave like a trusted senior engineer who remembers past decisions and protects the long-term health of the codebase across all user projects.`
47
- }
48
- }
49
- ]
50
- },
51
- "memory-index-policy": {
52
- name: "memory-index-policy",
53
- description: "Enforce strict memory discipline",
54
- arguments: [],
55
- messages: [
56
- {
57
- role: "user",
58
- content: {
59
- type: "text",
60
- text: `Do not store:
61
- - Temporary discussions or brainstorming.
62
- - Subjective opinions without consensus.
63
- - Generic coding knowledge available in public docs.
64
-
65
- Only store:
66
- - Specific project decisions (Architecture, UI/UX).
67
- - Learned patterns for this specific tech-stack.
68
- - Hard-won bug fixes (Mistakes to avoid).
69
-
70
- Memory is a permanent record, categorize it properly with tags.`
71
- }
72
- }
73
- ]
74
- },
75
- "tool-usage-guidelines": {
76
- name: "tool-usage-guidelines",
77
- description: "Prevent tool abuse and ensure data integrity",
78
- arguments: [],
79
- messages: [
80
- {
81
- role: "user",
82
- content: {
83
- type: "text",
84
- text: `Guidelines for specific tools:
85
-
86
- 1. memory-store:
87
- - Always include 'tags' for tech-stack identification.
88
- - Use 'is_global: true' only for universal preferences (e.g., "Always use tabs").
89
- - Use 'supersedes' when overriding a previous decision.
90
-
91
- 2. memory-search:
92
- - Always provide 'current_file_path' for folder-based ranking boost.
93
- - Provide 'current_tags' to pull relevant best-practices from other projects.
94
-
95
- 3. memory-acknowledge:
96
- - Mandatory feedback loop. Report 'used' if the memory helped, or 'contradictory' if you found an issue.
97
-
98
- 4. memory-update:
99
- - Use this to keep facts current. Do not create duplicates.`
100
- }
101
- }
102
- ]
103
- },
104
- "task-management-guidelines": {
105
- name: "task-management-guidelines",
106
- description: "Best practices for task tracking and progress management",
107
- arguments: [],
108
- messages: [
109
- {
110
- role: "user",
111
- content: {
112
- type: "text",
113
- text: `Guidelines for Task Management:
114
-
115
- 1. task-manage:
116
- - Use 'create' to break down complex user requests into actionable steps at the start of a session.
117
- - Use 'phase' to group tasks (e.g., 'research', 'implementation', 'testing').
118
- - Use 'priority' (1-5) to highlight critical path items.
119
- - Use 'update' to mark progress (in_progress, completed, blocked).
120
- - Use 'metadata' to store technical debt notes or implementation details.
121
-
122
- 2. Resource & Tool Usage:
123
- - MANDATORY: Always call 'task-list' at the very start of a new session to understand current progress and avoid duplicating work.
124
- - Resource: You can also read 'tasks://current' for a filtered view of active tasks for the current repository.
125
- - Coordinate: If a task is already 'in_progress', do not attempt to work on it unless specifically asked to collaborate.
126
-
127
- 3. Workflow Integration:
128
- - Plan first: Create tasks for the entire lifecycle (Research -> Strategy -> Execution -> Validation).
129
- - Atomic Updates: Update the task status to 'in_progress' immediately BEFORE calling implementation tools.
130
- - Finalize: Only mark a task as 'completed' after successful validation (tests passed). If validation fails, mark as 'blocked' or 'pending' with notes in metadata.`
131
- }
132
- }
133
- ]
134
- },
135
- "import-github-issues": {
136
- name: "import-github-issues",
137
- description: "Guide for importing GitHub Issues from the current repository as local tasks",
138
- arguments: [],
139
- messages: [
140
- {
141
- role: "user",
142
- content: {
143
- type: "text",
144
- text: `You are tasked with importing GitHub Issues from the current repository into our local task management system.
145
-
146
- Please follow these steps:
147
-
148
- 1. **Access Issues**: Use available GitHub MCP tools to list open issues for the current repository.
149
- 2. **Review Existing Tasks**: Call 'task-list' for the current repository to identify tasks already imported.
150
- 3. **Map and Create**: For each relevant issue that hasn't been imported yet:
151
- - Use 'task-manage' with action='create'.
152
- - Set 'task_code' to 'GH-{{issue_number}}' (e.g., GH-123).
153
- - Set 'title' to the issue title.
154
- - Set 'description' to the issue body (abbreviate if extremely long).
155
- - Map GitHub labels to 'tags' if applicable.
156
- - Default 'phase' to 'backlog' or 'triage'.
157
- - Set 'metadata' to include the original GitHub URL.
158
- 4. **Avoid Duplicates**: Do not import issues that already have a corresponding 'GH-{{number}}' task code in our system.
159
- 5. **Confirmation**: Provide a summary of how many tasks were successfully created.`
160
- }
161
- }
162
- ]
163
- },
164
- "project-briefing": {
165
- name: "project-briefing",
166
- description: "Onboard the agent to the current repository state",
167
- arguments: [],
168
- messages: [
169
- {
170
- role: "user",
171
- content: {
172
- type: "text",
173
- text: `I am starting a new session in the current repository.
174
-
175
- Please perform a briefing to catch up on the project:
176
- 1. **Recent Knowledge**: Call 'memory-recap' for the current repo to see the latest decisions, patterns, and mistakes recorded.
177
- 2. **Current Tasks**: Call 'task-list' to understand what is currently pending or in-progress.
178
- 3. **Context Check**: Summarize the top 3 most important architectural decisions you found.
179
- 4. **Readiness**: Tell me what you are ready to help with based on the current backlog.`
180
- }
181
- }
182
- ]
183
- },
184
- "learning-retrospective": {
185
- name: "learning-retrospective",
186
- description: "Extract durable knowledge from recent work in the current repository",
187
- arguments: [
188
- { name: "task_id", description: "Optional ID of the task just completed", required: false }
189
- ],
190
- messages: [
191
- {
192
- role: "user",
193
- content: {
194
- type: "text",
195
- text: `We have just finished some work in the current repository related to task {{task_id}}.
196
-
197
- Please reflect on the changes and identify knowledge worth keeping:
198
- 1. **Mistakes**: Did we encounter any bugs that were hard to find or caused by specific environment quirks? (Store as 'mistake')
199
- 2. **Decisions**: Did we make a choice between multiple options (e.g., library choice, UI pattern)? (Store as 'decision')
200
- 3. **Patterns**: Did we establish a repeatable way of doing things in this codebase? (Store as 'pattern')
201
-
202
- Use 'memory-store' to record any high-value findings. Be concise and use appropriate technology tags.`
203
- }
204
- }
205
- ]
206
- },
207
- "memory-guided-review": {
208
- name: "memory-guided-review",
209
- description: "Review code for compliance with stored project decisions in the current repository",
210
- arguments: [
211
- { name: "file_path", description: "Path to the file to review", required: true }
212
- ],
213
- messages: [
214
- {
215
- role: "user",
216
- content: {
217
- type: "text",
218
- text: `Please review the code in '{{file_path}}'.
219
-
220
- Your goal is to ensure compliance with our stored project knowledge for the current repository:
221
- 1. **Search Constraints**: Use 'memory-search' with current_file_path='{{file_path}}' and the current repo context to find relevant decisions and patterns.
222
- 2. **Evaluate Compliance**: Does the code follow established patterns? Does it repeat any known mistakes?
223
- 3. **Feedback**: Provide specific suggestions for improvement if you find violations of stored decisions.`
224
- }
225
- }
226
- ]
227
- },
228
- "session-planner": {
229
- name: "session-planner",
230
- description: "Break down a complex objective into atomic tasks for the current repository",
231
- arguments: [
232
- { name: "objective", description: "The high-level goal for this session", required: true }
233
- ],
234
- messages: [
235
- {
236
- role: "user",
237
- content: {
238
- type: "text",
239
- text: `Our objective for today in the current repository is: '{{objective}}'.
240
-
241
- Please act as a project manager and plan the execution:
242
- 1. **Analyze**: Break this objective down into 3-7 small, atomic, and verifiable tasks.
243
- 2. **Execute**: Use 'task-manage' with action='create' to add these to the local tracker for the current repo.
244
- 3. **Hierarchy**: Use 'parent_id' or 'depends_on' if there is a clear order of operations.
245
- 4. **Phases**: Group tasks into phases like 'research', 'implementation', and 'validation'.
246
-
247
- Display the created plan to the user when done.`
248
- }
249
- }
250
- ]
251
- },
252
- "tech-affinity-scout": {
253
- name: "tech-affinity-scout",
254
- description: "Find relevant best practices from other projects with similar tech for the current repository",
255
- arguments: [
256
- { name: "tags", description: "Comma-separated tech tags (e.g., 'react, tailwind')", required: true }
257
- ],
258
- messages: [
259
- {
260
- role: "user",
261
- content: {
262
- type: "text",
263
- text: `I am working on the current repository using [{{tags}}].
264
-
265
- Please scout for relevant knowledge from other projects:
266
- 1. **Search**: Use 'memory-search' with current_tags=[{{tags}}] and include_archived=false.
267
- 2. **Filter**: Look for 'patterns' or 'decisions' from other repositories that might apply here.
268
- 3. **Translate**: Explain how these external best practices can be adapted to our current project context.`
269
- }
270
- }
271
- ]
272
- },
273
- "documentation-sync": {
274
- name: "documentation-sync",
275
- description: "Reconcile memory decisions with local markdown files in the current repository",
276
- arguments: [],
277
- messages: [
278
- {
279
- role: "user",
280
- content: {
281
- type: "text",
282
- text: `Please verify if our local documentation (README.md, docs/*.md, .agents/documents/**/*.md, .kiro/**/*.md) is in sync with our stored memories for the current repository.
283
-
284
- Steps:
285
- 1. **Fetch Decisions**: Use 'memory-search' to find all 'decision' type memories for this repo.
286
- 2. **Read Docs**: Read the primary project documentation files including those in .agents/documents and .kiro.
287
- 3. **Identify Gaps**: Is there any durable knowledge in the memory that is MISSING from the docs? Is there any documentation that is OUTDATED based on recent decisions?
288
- 4. **Propose Updates**: Suggest specific changes to the documentation to reflect the current source of truth.`
289
- }
290
- }
291
- ]
292
- },
293
- "task-memory-executor": {
294
- name: "task-memory-executor",
295
- description: "Execute all pending tasks for the current repository, updating status and storing handoffs in the task backlog.",
296
- arguments: [],
297
- messages: [
298
- {
299
- role: "user",
300
- content: {
301
- type: "text",
302
- text: `# Skill: task-memory-executor
303
-
304
- ## Purpose
305
-
306
- You are tasked with executing all available tasks for the current repository.
307
-
308
- ## Instructions
309
-
310
- ---
311
- description: Execute all pending tasks for the current repository
312
- ---
313
-
314
- Please follow this strict execution flow:
315
-
316
- 1. **Identify Repository**: Determine the current repository name (e.g., from git config or workspace context).
317
- 2. **Fetch Tasks**: Call 'task-list' for the identified repository for statuses 'pending' and 'in_progress'.
318
- 3. **Filter Stale**: Identify 'in_progress' tasks that are **stale** (stale is defined as > 30 Minutes without update, often because an agent stopped or crashed).
319
- 4. **Process Sequentially**: For each task (all 'pending' + all 'stale in_progress') found:
320
- - **Start**: Call 'task-update' to set status='in_progress' and provide current agent/role information in the metadata.
321
- - **Execute**: Perform the work described in the task title and description.
322
- - **Inspect Codebase Logic First (MANDATORY)**: Before marking anything done, inspect the relevant code paths, call sites, configs, tests, and affected modules in the repository. Do not infer correctness from file presence alone.
323
- - **Validate Behavior (MANDATORY)**: Ensure the implementation logic satisfies the task intent and follows project standards. Validation must focus on behavior, control flow, data flow, and integration points, not just whether a file/class/function exists.
324
- - **Complete Only With Evidence**: Call 'task-update' to set status='completed' only after recording concrete evidence in the 'comment' field. The comment must include: files inspected, logic verified, checks/tests run (or why they could not run), and the exact reason the task is considered complete.
325
- - **Compact Context**: Summarize key learnings, decisions, and patterns discovered during task execution. Store critical insights as memory entries (type: 'code_fact' or 'pattern') using 'memory-store' to preserve important context while reducing token usage. Clear transient working memory that is no longer needed.
326
- - **Commit**: Perform an atomic git commit and push for the changes made in the task.
327
- - **Handoff**: Use 'task-update' to document **detailed fix steps**, milestones, project-specific knowledge gained during execution, and the validation evidence in the 'comment' or metadata fields. If the task was complex, decompose it into smaller sub-tasks and store them using 'task-create' (referencing the current task's ID as \`parent_id\`).
328
- 5. **Backlog Migration**: Once all 'pending' and 'in_progress' tasks are completed or blocked, fetch tasks with status='backlog'. If any exist, select up to 20 tasks (prioritizing by priority field) and update their status to 'pending' using 'task-update' to ensure the next agent has work ready.
329
- 6. **Report**: After processing all tasks, provide a summary of your progress.
330
-
331
- ## Mandatory Validation Rules
332
-
333
- Before a task can be marked \`completed\`, the agent **must** satisfy all applicable rules below:
334
-
335
- 1. **Read the implementation, not just the filesystem**
336
- - Inspect the actual source files related to the task.
337
- - Trace the relevant logic path end-to-end using code search and file reads.
338
- - Verify how the changed code is invoked, not just that it exists.
339
-
340
- 2. **Confirm behavior against task intent**
341
- - Compare the implementation against the task title, description, acceptance criteria, or bug report.
342
- - Check that the business logic is actually implemented and wired correctly.
343
- - If the task affects existing behavior, inspect adjacent modules and integration points for regressions.
344
-
345
- 3. **Use concrete verification**
346
- - Run targeted tests, linters, type checks, or validation scripts if available.
347
- - If automated tests cannot be run, perform a manual logic audit of all affected paths.
348
- - Document the specific verification method used in the task completion comment.
349
- `
350
- }
351
- }
352
- ]
353
- },
354
- "senior-code-review": {
355
- name: "senior-code-review",
356
- description: "Performs a comprehensive production-readiness evaluation for the current repository context",
357
- arguments: [
358
- { name: "tech_stack", description: "Target tech stack (e.g., 'Node.js + Express')", required: true },
359
- { name: "context", description: "Production context (traffic, data sensitivity, SLA, conventions)", required: false }
360
- ],
361
- messages: [
362
- {
363
- role: "user",
364
- content: {
365
- type: "text",
366
- text: `Act as a principal software engineer performing a production-readiness review for the current repository.
367
-
368
- Stack: {{tech_stack}}
369
- Context: {{context}}
370
-
371
- Please review the current code/changes against these 6 dimensions:
372
- 1. **Error Handling Completeness**
373
- 2. **Security** (Injection, Input validation, PII/Secrets)
374
- 3. **Performance** (Time/Memory complexity, DB queries)
375
- 4. **Observability** (Logging, Metrics, Tracing)
376
- 5. **Test Coverage**
377
- 6. **Documentation**
378
-
379
- For each finding, provide:
380
- - **Severity**: P0-P3
381
- - **Dimension**: One of the above
382
- - **Location**: Specific function/line
383
- - **Problem**: What is wrong and why it matters
384
- - **Fix**: Actionable recommendation
385
-
386
- Produce a **Production Readiness Verdict**: READY | READY WITH MINOR FIXES | NOT READY`
387
- }
388
- }
389
- ]
390
- },
391
- "fix-suggestion": {
392
- name: "fix-suggestion",
393
- description: "Provide a targeted, minimal fix for an identified bug with before/after code and a test case",
394
- arguments: [
395
- { name: "tech_stack", description: "Target technology stack", required: true },
396
- { name: "bug_description", description: "Description of the bug behavior", required: true },
397
- { name: "root_cause", description: "The identified root cause", required: true }
398
- ],
399
- messages: [
400
- {
401
- role: "user",
402
- content: {
403
- type: "text",
404
- text: `You are a senior software engineer generating a precise, minimal fix for a confirmed bug in the current repository.
405
-
406
- Tech stack: {{tech_stack}}
407
- Bug description: {{bug_description}}
408
- Root cause: {{root_cause}}
409
-
410
- Please provide:
411
- 1. **Fix Explanation**: Why the bug occurs and how the fix resolves it.
412
- 2. **Before Code**: Show original buggy code.
413
- 3. **After Code**: Show fixed code with explanatory comments.
414
- 4. **Fix Checklist**: Additional changes (config, migrations, etc.)
415
- 5. **Test Case**: A regression test case to verify the fix.`
416
- }
417
- }
418
- ]
419
- },
420
- "root-cause-analysis": {
421
- name: "root-cause-analysis",
422
- description: "Apply structured 5-Why analysis to trace bugs to their origin",
423
- arguments: [
424
- { name: "tech_stack", description: "Target technology stack", required: true },
425
- { name: "bug_description", description: "Observable symptom or bug behavior", required: true },
426
- { name: "symptoms", description: "Additional errors, logs, metrics", required: false }
427
- ],
428
- messages: [
429
- {
430
- role: "user",
431
- content: {
432
- type: "text",
433
- text: `You are a senior software engineer conducting a root cause analysis for a bug in the current repository.
434
-
435
- Tech stack: {{tech_stack}}
436
- Bug description: {{bug_description}}
437
- Symptoms: {{symptoms}}
438
-
439
- Apply a full **5-Why analysis**:
440
- 1. **Symptom Statement**: Technically restate the problem.
441
- 2. **5-Why Causal Chain**: Trace from symptom to the core process/design/environmental failure.
442
- 3. **Root Cause Statement**: "The root cause is [X] because [Y], which allowed [Z] to occur."
443
- 4. **Fix Recommendation**: Address the root cause, not just the symptom.
444
- 5. **Recurrence Prevention**: Suggest a monitoring or testing measure.`
445
- }
446
- }
447
- ]
448
- },
449
- "technical-planning": {
450
- name: "technical-planning",
451
- description: "Define the technical blueprint for a new feature or product",
452
- arguments: [
453
- { name: "objective", description: "The high-level goal for the plan", required: true }
454
- ],
455
- messages: [
456
- {
457
- role: "user",
458
- content: {
459
- type: "text",
460
- text: `You are tasked with creating a technical blueprint for the following objective in the current repository: '{{objective}}'.
461
-
462
- Please cover:
463
- 1. **Tech Stack**: Confirm or select the stack.
464
- 2. **Architecture**: Component layout and data flow.
465
- 3. **Domain Model**: Entities, value objects, and events.
466
- 4. **Database Schema**: Normalized tables and relationships.
467
- 5. **API Contracts**: Endpoint definitions (request/response/errors).
468
- 6. **Roadmap & Sprints**: Phased delivery plan.
469
-
470
- Present a cohesive technical design and obtain feedback before proceeding to implementation.`
471
- }
472
- }
473
- ]
474
- },
475
- "security-triage": {
476
- name: "security-triage",
477
- description: "Assess security vulnerability reports for exploitability and prioritize remediation",
478
- arguments: [
479
- { name: "tech_stack", description: "Application stack", required: true },
480
- { name: "vulnerability_report", description: "Report details (CVE, SAST, etc.)", required: true },
481
- { name: "codebase_context", description: "Component usage context", required: false }
482
- ],
483
- messages: [
484
- {
485
- role: "user",
486
- content: {
487
- type: "text",
488
- text: `Act as a senior application security engineer triaging a vulnerability for the current repository.
489
-
490
- Stack: {{tech_stack}}
491
- Report: {{vulnerability_report}}
492
- Codebase context: {{codebase_context}}
493
-
494
- Please provide:
495
- 1. **Vulnerability Classification**: Type, CVE, CVSS, and attack vector.
496
- 2. **Exploitability Assessment**: Contextual reachability and realistic scenarios.
497
- 3. **Impact Assessment**: Impact on Confidentiality, Integrity, and Availability.
498
- 4. **Remediation Priority & Fix**: Concrete priority (P0-P3) and fix steps.
499
- 5. **Verification**: How to test and verify the fix.`
500
- }
501
- }
502
- ]
503
- },
504
- "architecture-design": {
505
- name: "architecture-design",
506
- description: "Plan system architecture, component layout, and data flow",
507
- arguments: [
508
- { name: "tech_stack", description: "Technology stack", required: true },
509
- { name: "requirements", description: "Key functional and non-functional requirements", required: true }
510
- ],
511
- messages: [
512
- {
513
- role: "user",
514
- content: {
515
- type: "text",
516
- text: `Design the architecture for a system in the current repository.
517
-
518
- Stack: {{tech_stack}}
519
- Requirements: {{requirements}}
520
-
521
- Produce a comprehensive architecture overview:
522
- 1. **Component Diagram**: Major blocks and their responsibilities.
523
- 2. **Data Flow**: How information moves through the system.
524
- 3. **Key Technical Decisions**: Rationale for chosen patterns.
525
- 4. **Scalability & Reliability**: How the design handles growth and failure.
526
- 5. **Security Considerations**: Identity, data protection, and boundaries.`
527
- }
528
- }
529
- ]
530
- },
531
- "create-task": {
532
- name: "create-task",
533
- description: "Generate structured, atomic tasks in Local Memory MCP from user directives.",
534
- arguments: [],
535
- messages: [
536
- {
537
- role: "user",
538
- content: {
539
- type: "text",
540
- text: `# Skill: create-task
541
-
542
- ## Purpose
543
-
544
- You are a **Task Creation Orchestrator**. Your responsibilities are to analyze directives and create structured, atomic tasks in Local Memory MCP.
545
-
546
- ## Instructions
547
-
548
- ### 🚫 HARD CONSTRAINT: NON-EXECUTION (ABSOLUTE)
549
-
550
- You are **STRICTLY FORBIDDEN** from performing any of the following actions:
551
- * Editing any file
552
- * Creating new files
553
- * Deleting files
554
- * Running commands
555
- * Writing code implementations
556
- * Applying fixes directly
557
- * Simulating execution results
558
-
559
- **Allowed Actions:**
560
- * Read code and analyze context
561
- * Create tasks via \`mcp_local-memory_task-create\`
562
- * List tasks via \`mcp_local-memory_task-list\`
563
-
564
- ---
565
-
566
- ### ✅ ALLOWED OUTPUT (STRICT)
567
-
568
- Your output MUST ONLY consist of calls to:
569
- * \`mcp_local-memory_task-create\`
570
- * \`mcp_local-memory_task-list\`
571
-
572
- **❌ DO NOT:**
573
- * Output explanations or narrative text
574
- * Output code or plans outside MCP
575
- * Suggest fixes directly
576
-
577
- ---
578
-
579
- ### 1. PRE-ANALYSIS (MANDATORY)
580
-
581
- Before creating tasks, you MUST:
582
- 1. **Sync backlog**: Call \`mcp_local-memory_task-list\`.
583
- 2. **Context discovery**: Read relevant modules, files, endpoints, and documentation.
584
-
585
- ---
586
-
587
- ### 2. TASK DESIGN PRINCIPLES
588
-
589
- Each task MUST be:
590
- * **Atomic & Independent**: Exactly ONE logical change per task.
591
- * **Context-Rich**: Include file paths, class/function names, and API endpoints.
592
- * **Layer-Aware**: Specify if it's Database, Service, State, or UI layer.
593
- * **Contract-First**: Follow project API standards (include request/response shapes).
594
- * **Test-Ready**: Include at least one Positive and one Negative test case.
595
-
596
- ---
597
-
598
- ### 3. TASK ATTRIBUTES (MANDATORY)
599
-
600
- Each \`mcp_local-memory_task-create\` MUST include:
601
- * \`task_code\`: (FEAT-XXX / FIX-XXX / REFACTOR-XXX)
602
- * \`phase\`: (Discovery / Implementation / Testing)
603
- * \`priority\`: (1–5)
604
-
605
- #### 🔥 DESCRIPTION FORMAT (STRICT)
606
- The \`description\` field MUST follow this structure EXACTLY:
607
-
608
- #### 1. Objective
609
- * Clear goal of the task.
610
-
611
- #### 2. Scope
612
- * What is INCLUDED and EXCLUDED.
613
-
614
- #### 3. References
615
- * File paths, modules, endpoints, or documentation.
616
-
617
- #### 4. Implementation Steps
618
- * Sequential, explicit instructions for the executor.
619
-
620
- #### 5. Expected Result
621
- * Final state after implementation.
622
-
623
- #### 6. Acceptance Criteria
624
- * Checklist format (e.g., \`[ ] Condition 1\`).
625
-
626
- #### 7. Test Scenarios
627
- * **Positive Case**: Valid input -> success.
628
- * **Negative Case**: Invalid input -> failure.
629
-
630
- ---
631
-
632
- ### metadata (MANDATORY)
633
- * Required agent role.
634
- * Additional technical context.
635
-
636
- ---
637
-
638
- ### 4. MULTI-TASK HANDLING
639
- If a directive is complex:
640
- 1. Create a parent task.
641
- 2. Create child tasks using \`parent_id\` and \`depends_on\`.
642
-
643
- ---
644
-
645
- ### 5. FINAL SELF-CHECK (MANDATORY)
646
- Before finishing, validate:
647
- * ❌ No code was written.
648
- * ❌ No execution was performed.
649
- * ✅ Only MCP task operations exist.
650
-
651
- If this check fails → ABORT OUTPUT.`
652
- }
653
- }
654
- ]
655
- }
656
- };
657
- const DYNAMIC_PROMPTS = {
658
- "workspace-briefing-rich": {
659
- title: "Workspace Briefing Rich",
660
- description: "Brief the model with active roots, project summary, task backlog, and memory index for the current repository.",
661
- arguments: [
662
- {
663
- name: "repo",
664
- title: "Repository",
665
- description: "Repository name. Optional when it can be inferred from roots or the existing local memory store.",
666
- required: false,
667
- },
668
- {
669
- name: "focus",
670
- title: "Focus",
671
- description: "Optional focus area for the briefing, such as architecture, tasks, or onboarding.",
672
- required: false,
673
- },
674
- ],
675
- },
676
- "repo-architecture-context": {
677
- title: "Repo Architecture Context",
678
- description: "Ground a model with summary and recent memory resources before architecture work or review.",
679
- arguments: [
680
- {
681
- name: "repo",
682
- title: "Repository",
683
- description: "Repository name. Optional when it can be inferred from roots or the local memory store.",
684
- required: false,
685
- },
686
- ],
687
- },
688
- "active-tasks-review-rich": {
689
- title: "Active Tasks Review Rich",
690
- description: "Review the current task queue and memory context for a repository using embedded MCP resources.",
691
- arguments: [
692
- {
693
- name: "repo",
694
- title: "Repository",
695
- description: "Repository name. Optional when it can be inferred from roots or the local memory store.",
696
- required: false,
697
- },
698
- {
699
- name: "objective",
700
- title: "Objective",
701
- description: "Optional review objective, such as triage, execution planning, or blocker analysis.",
702
- required: false,
703
- },
704
- ],
705
- },
706
- };
707
- export function listPrompts(db, session, params) {
708
- const allPrompts = getPromptCatalog(db, session);
709
- const limit = normalizeLimit(params?.limit);
710
- const offset = decodeCursor(params?.cursor);
711
- const prompts = allPrompts.slice(offset, offset + limit);
712
- const nextOffset = offset + prompts.length;
713
- return {
714
- prompts,
715
- nextCursor: nextOffset < allPrompts.length ? encodeCursor(nextOffset) : undefined,
716
- };
717
- }
718
- export function getPrompt(name, args, db, session) {
719
- const promptName = String(name || "");
720
- const promptArgs = args ?? {};
721
- if (promptName in DYNAMIC_PROMPTS) {
722
- return buildDynamicPrompt(promptName, promptArgs, db, session);
723
- }
724
- const prompt = PROMPTS[promptName];
725
- if (!prompt) {
726
- throw invalidPromptParams(`Unknown prompt: ${promptName}`);
727
- }
728
- validatePromptArguments(promptName, prompt.arguments ?? [], promptArgs);
729
- const result = JSON.parse(JSON.stringify(prompt));
730
- result.title = result.title || humanizePromptName(result.name);
731
- result.messages = result.messages.map((message) => substitutePromptMessage(message, promptArgs));
732
- return result;
733
- }
734
- export function completePromptArgument(promptName, argumentName, argumentValue, contextArguments, dataSources) {
735
- const prompt = promptName in DYNAMIC_PROMPTS
736
- ? {
737
- name: promptName,
738
- arguments: DYNAMIC_PROMPTS[promptName].arguments,
739
- }
740
- : PROMPTS[promptName];
741
- if (!prompt) {
742
- throw invalidPromptParams(`Unknown prompt: ${promptName}`);
743
- }
744
- const declaredArgument = (prompt.arguments ?? []).find((entry) => entry.name === argumentName);
745
- if (!declaredArgument) {
746
- throw invalidPromptParams(`Unknown prompt argument "${argumentName}" for prompt "${promptName}"`);
747
- }
748
- if (argumentName === "repo") {
749
- return rankCompletionValues(dataSources.repos, argumentValue);
750
- }
751
- if (argumentName === "file_path") {
752
- return rankCompletionValues(dataSources.filePaths, argumentValue);
753
- }
754
- if (argumentName === "task_id") {
755
- return rankCompletionValues(dataSources.tasks.map((task) => task.id), argumentValue);
756
- }
757
- if (argumentName === "tech_stack") {
758
- return rankCompletionValues(dataSources.tags, argumentValue);
759
- }
760
- if (argumentName === "tags") {
761
- const parts = argumentValue.split(",");
762
- const activePart = parts[parts.length - 1]?.trim() ?? "";
763
- const suggestions = rankCompletionValues(dataSources.tags, activePart);
764
- if (parts.length <= 1) {
765
- return suggestions;
766
- }
767
- const prefix = parts.slice(0, -1).map((part) => part.trim()).filter(Boolean).join(", ");
768
- return suggestions.map((value) => `${prefix}, ${value}`);
769
- }
770
- return rankCompletionValues([], argumentValue);
771
- }
772
- function getPromptCatalog(db, session) {
773
- const staticPrompts = Object.values(PROMPTS).map((prompt) => ({
774
- name: prompt.name,
775
- title: humanizePromptName(prompt.name),
776
- description: prompt.description,
777
- arguments: prompt.arguments ?? [],
778
- }));
779
- const dynamicPrompts = Object.entries(DYNAMIC_PROMPTS).map(([name, prompt]) => ({
780
- name,
781
- ...prompt,
782
- }));
783
- return [...staticPrompts, ...dynamicPrompts];
784
- }
785
- function buildDynamicPrompt(name, args, db, session) {
786
- validatePromptArguments(name, DYNAMIC_PROMPTS[name].arguments, args);
787
- const repo = resolvePromptRepo(args, db, session);
788
- const focus = typeof args.focus === "string" && args.focus.trim() ? args.focus.trim() : undefined;
789
- const objective = typeof args.objective === "string" && args.objective.trim() ? args.objective.trim() : undefined;
790
- switch (name) {
791
- case "workspace-briefing-rich":
792
- return {
793
- name,
794
- title: DYNAMIC_PROMPTS[name].title,
795
- description: DYNAMIC_PROMPTS[name].description,
796
- arguments: DYNAMIC_PROMPTS[name].arguments,
797
- messages: [
798
- {
799
- role: "user",
800
- content: {
801
- type: "text",
802
- text: [
803
- `Create a grounded workspace briefing${repo ? ` for repository "${repo}"` : ""}.`,
804
- focus ? `Prioritize focus area: ${focus}.` : "Prioritize architecture decisions, active tasks, and current workspace boundaries.",
805
- "Use the attached MCP resources as primary evidence before using tools.",
806
- ].join(" "),
807
- },
808
- },
809
- createResourceMessage("session://roots", "application/json"),
810
- ...(repo ? [
811
- createResourceMessage(`memory://summary/${repo}`, "text/plain"),
812
- createResourceMessage(`tasks://current?repo=${encodeURIComponent(repo)}`, "application/json"),
813
- createResourceMessage(`memory://index?repo=${encodeURIComponent(repo)}`, "application/json"),
814
- ] : []),
815
- ],
816
- };
817
- case "repo-architecture-context":
818
- return {
819
- name,
820
- title: DYNAMIC_PROMPTS[name].title,
821
- description: DYNAMIC_PROMPTS[name].description,
822
- arguments: DYNAMIC_PROMPTS[name].arguments,
823
- messages: [
824
- {
825
- role: "user",
826
- content: {
827
- type: "text",
828
- text: repo
829
- ? `Review the attached summary and memory index for repository "${repo}" before proposing any architectural changes.`
830
- : "Review the attached workspace roots and available repository context before proposing any architectural changes.",
831
- },
832
- },
833
- createResourceMessage("session://roots", "application/json"),
834
- ...(repo ? [
835
- createResourceMessage(`memory://summary/${repo}`, "text/plain"),
836
- createResourceMessage(`memory://index?repo=${encodeURIComponent(repo)}`, "application/json"),
837
- ] : []),
838
- ],
839
- };
840
- case "active-tasks-review-rich":
841
- return {
842
- name,
843
- title: DYNAMIC_PROMPTS[name].title,
844
- description: DYNAMIC_PROMPTS[name].description,
845
- arguments: DYNAMIC_PROMPTS[name].arguments,
846
- messages: [
847
- {
848
- role: "user",
849
- content: {
850
- type: "text",
851
- text: [
852
- `Review the active task queue${repo ? ` for repository "${repo}"` : ""}.`,
853
- objective ? `Goal: ${objective}.` : "Identify the most important next actions, blockers, and stale work.",
854
- "Base the review on the attached MCP resources.",
855
- ].join(" "),
856
- },
857
- },
858
- ...(repo ? [
859
- createResourceMessage(`tasks://current?repo=${encodeURIComponent(repo)}`, "application/json"),
860
- createResourceMessage(`memory://summary/${repo}`, "text/plain"),
861
- ] : [createResourceMessage("session://roots", "application/json")]),
862
- ],
863
- };
864
- default:
865
- throw invalidPromptParams(`Unknown prompt: ${name}`);
866
- }
867
- }
868
- function createResourceMessage(uri, mimeType) {
869
- return {
870
- role: "user",
871
- content: {
872
- type: "resource",
873
- resource: {
874
- uri,
875
- mimeType,
876
- },
877
- },
878
- };
879
- }
880
- function validatePromptArguments(promptName, definitions, args) {
881
- const missing = definitions
882
- .filter((entry) => entry.required)
883
- .filter((entry) => {
884
- const value = args[entry.name];
885
- return value === undefined || value === null || (typeof value === "string" && value.trim() === "");
886
- })
887
- .map((entry) => entry.name);
888
- if (missing.length > 0) {
889
- throw invalidPromptParams(`Missing required prompt arguments for "${promptName}": ${missing.join(", ")}`);
890
- }
891
- }
892
- function substitutePromptMessage(message, args) {
893
- if (!message.content || message.content.type !== "text" || typeof message.content.text !== "string") {
894
- return message;
895
- }
896
- let text = message.content.text;
897
- for (const [key, value] of Object.entries(args)) {
898
- const placeholder = new RegExp(`\\{\\{${key}\\}\\}`, "g");
899
- text = text.replace(placeholder, String(value));
900
- }
901
- return {
902
- ...message,
903
- content: {
904
- ...message.content,
905
- text,
906
- },
907
- };
908
- }
909
- function resolvePromptRepo(args, db, session) {
910
- const argRepo = typeof args.repo === "string" && args.repo.trim() ? args.repo.trim() : undefined;
911
- if (argRepo)
912
- return argRepo;
913
- const inferredRepo = inferRepoFromSession(session);
914
- if (inferredRepo)
915
- return inferredRepo;
916
- const repos = typeof db.listRepos === "function" ? db.listRepos() : [];
917
- return repos[0];
918
- }
919
- function humanizePromptName(name) {
920
- return name
921
- .split("-")
922
- .map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1))
923
- .join(" ");
924
- }
925
- function normalizeLimit(limit) {
926
- if (typeof limit !== "number" || !Number.isFinite(limit)) {
927
- return 25;
928
- }
929
- return Math.min(100, Math.max(1, Math.trunc(limit)));
930
- }
931
- function invalidPromptParams(message) {
932
- const error = new Error(message);
933
- error.code = -32602;
934
- return error;
935
- }
936
- //# sourceMappingURL=registry.js.map