@codemcp/workflows 5.3.0 → 6.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (451) hide show
  1. package/README.md +91 -0
  2. package/package.json +77 -17
  3. package/packages/cli/dist/chunk-R5U7XKVJ.js +16 -0
  4. package/packages/cli/dist/chunk-RTDQR2KY.js +6718 -0
  5. package/packages/cli/dist/cli-CZ4FMSWR.js +1421 -0
  6. package/packages/cli/dist/dist-KZOA4GL5.js +65 -0
  7. package/packages/cli/dist/dist-UGVUJIDN.js +14475 -0
  8. package/packages/cli/dist/index.js +21 -0
  9. package/packages/cli/package.json +28 -0
  10. package/packages/core/dist/beads-integration.d.ts +50 -0
  11. package/packages/core/dist/beads-integration.js +387 -0
  12. package/packages/core/dist/beads-integration.js.map +1 -0
  13. package/packages/core/dist/beads-state-manager.d.ts +58 -0
  14. package/packages/core/dist/beads-state-manager.js +212 -0
  15. package/packages/core/dist/beads-state-manager.js.map +1 -0
  16. package/packages/core/dist/config-manager.d.ts +24 -0
  17. package/packages/core/dist/config-manager.js +68 -0
  18. package/packages/core/dist/config-manager.js.map +1 -0
  19. package/packages/core/dist/conversation-manager.d.ts +98 -0
  20. package/packages/core/dist/conversation-manager.js +382 -0
  21. package/packages/core/dist/conversation-manager.js.map +1 -0
  22. package/packages/core/dist/file-detection-manager.d.ts +53 -0
  23. package/packages/core/dist/file-detection-manager.js +221 -0
  24. package/packages/core/dist/file-detection-manager.js.map +1 -0
  25. package/packages/core/dist/file-storage.d.ts +93 -0
  26. package/packages/core/dist/file-storage.js +301 -0
  27. package/packages/core/dist/file-storage.js.map +1 -0
  28. package/packages/core/dist/git-manager.d.ts +22 -0
  29. package/packages/core/dist/git-manager.js +123 -0
  30. package/packages/core/dist/git-manager.js.map +1 -0
  31. package/packages/core/dist/index.d.ts +24 -0
  32. package/packages/core/dist/index.js +31 -0
  33. package/packages/core/dist/index.js.map +1 -0
  34. package/packages/core/dist/instruction-generator.d.ts +40 -0
  35. package/packages/core/dist/instruction-generator.js +89 -0
  36. package/packages/core/dist/instruction-generator.js.map +1 -0
  37. package/packages/core/dist/interaction-logger.d.ts +37 -0
  38. package/packages/core/dist/interaction-logger.js +87 -0
  39. package/packages/core/dist/interaction-logger.js.map +1 -0
  40. package/packages/core/dist/interfaces/index.d.ts +9 -0
  41. package/packages/core/dist/interfaces/index.js +10 -0
  42. package/packages/core/dist/interfaces/index.js.map +1 -0
  43. package/packages/core/dist/interfaces/instruction-generator.interface.d.ts +41 -0
  44. package/packages/core/dist/interfaces/instruction-generator.interface.js +8 -0
  45. package/packages/core/dist/interfaces/instruction-generator.interface.js.map +1 -0
  46. package/packages/core/dist/interfaces/plan-manager.interface.d.ts +55 -0
  47. package/packages/core/dist/interfaces/plan-manager.interface.js +8 -0
  48. package/packages/core/dist/interfaces/plan-manager.interface.js.map +1 -0
  49. package/packages/core/dist/interfaces/task-backend-client.interface.d.ts +52 -0
  50. package/packages/core/dist/interfaces/task-backend-client.interface.js +8 -0
  51. package/packages/core/dist/interfaces/task-backend-client.interface.js.map +1 -0
  52. package/packages/core/dist/logger.d.ts +64 -0
  53. package/packages/core/dist/logger.js +283 -0
  54. package/packages/core/dist/logger.js.map +1 -0
  55. package/packages/core/dist/path-validation-utils.d.ts +75 -0
  56. package/packages/core/dist/path-validation-utils.js +238 -0
  57. package/packages/core/dist/path-validation-utils.js.map +1 -0
  58. package/packages/core/dist/persistence-interface.d.ts +91 -0
  59. package/packages/core/dist/persistence-interface.js +9 -0
  60. package/packages/core/dist/persistence-interface.js.map +1 -0
  61. package/{dist/components/beads/beads-plan-manager.d.ts → packages/core/dist/plan-manager.d.ts} +15 -15
  62. package/{dist/components/beads/beads-plan-manager.js → packages/core/dist/plan-manager.js} +66 -50
  63. package/packages/core/dist/plan-manager.js.map +1 -0
  64. package/packages/core/dist/project-docs-manager.d.ts +119 -0
  65. package/packages/core/dist/project-docs-manager.js +366 -0
  66. package/packages/core/dist/project-docs-manager.js.map +1 -0
  67. package/packages/core/dist/state-machine-loader.d.ts +61 -0
  68. package/packages/core/dist/state-machine-loader.js +273 -0
  69. package/packages/core/dist/state-machine-loader.js.map +1 -0
  70. package/packages/core/dist/state-machine-types.d.ts +64 -0
  71. package/packages/core/dist/state-machine-types.js +7 -0
  72. package/packages/core/dist/state-machine-types.js.map +1 -0
  73. package/packages/core/dist/state-machine.d.ts +52 -0
  74. package/packages/core/dist/state-machine.js +256 -0
  75. package/packages/core/dist/state-machine.js.map +1 -0
  76. package/packages/core/dist/system-prompt-generator.d.ts +14 -0
  77. package/packages/core/dist/system-prompt-generator.js +42 -0
  78. package/packages/core/dist/system-prompt-generator.js.map +1 -0
  79. package/packages/core/dist/task-backend.d.ts +45 -0
  80. package/packages/core/dist/task-backend.js +176 -0
  81. package/packages/core/dist/task-backend.js.map +1 -0
  82. package/packages/core/dist/template-manager.d.ts +61 -0
  83. package/packages/core/dist/template-manager.js +231 -0
  84. package/packages/core/dist/template-manager.js.map +1 -0
  85. package/packages/core/dist/transition-engine.d.ts +77 -0
  86. package/packages/core/dist/transition-engine.js +244 -0
  87. package/packages/core/dist/transition-engine.js.map +1 -0
  88. package/packages/core/dist/types.d.ts +54 -0
  89. package/packages/core/dist/types.js +5 -0
  90. package/packages/core/dist/workflow-manager.d.ts +89 -0
  91. package/packages/core/dist/workflow-manager.js +468 -0
  92. package/packages/core/dist/workflow-manager.js.map +1 -0
  93. package/packages/core/package.json +33 -0
  94. package/packages/docs/.vitepress/dist/.gitignore +2 -0
  95. package/packages/docs/.vitepress/dist/404.html +23 -0
  96. package/packages/docs/.vitepress/dist/assets/app.Dz3lZH3M.js +1 -0
  97. package/packages/docs/.vitepress/dist/assets/chunks/framework.DZS7lpav.js +19 -0
  98. package/packages/docs/.vitepress/dist/assets/chunks/theme.q5Ewb3F1.js +206 -0
  99. package/packages/docs/.vitepress/dist/assets/dev_ARCHITECTURE.md.da_vFDwM.js +130 -0
  100. package/packages/docs/.vitepress/dist/assets/dev_ARCHITECTURE.md.da_vFDwM.lean.js +1 -0
  101. package/packages/docs/.vitepress/dist/assets/dev_DEVELOPMENT.md.DWl9cccE.js +72 -0
  102. package/packages/docs/.vitepress/dist/assets/dev_DEVELOPMENT.md.DWl9cccE.lean.js +1 -0
  103. package/packages/docs/.vitepress/dist/assets/dev_LOGGING.md.BebvbW7z.js +34 -0
  104. package/packages/docs/.vitepress/dist/assets/dev_LOGGING.md.BebvbW7z.lean.js +1 -0
  105. package/packages/docs/.vitepress/dist/assets/dev_PUBLISHING.md.CQqbiIOF.js +1 -0
  106. package/packages/docs/.vitepress/dist/assets/dev_PUBLISHING.md.CQqbiIOF.lean.js +1 -0
  107. package/packages/docs/.vitepress/dist/assets/index.md.D6ROLohf.js +2 -0
  108. package/packages/docs/.vitepress/dist/assets/index.md.D6ROLohf.lean.js +1 -0
  109. package/packages/docs/.vitepress/dist/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 +0 -0
  110. package/packages/docs/.vitepress/dist/assets/inter-italic-cyrillic.By2_1cv3.woff2 +0 -0
  111. package/packages/docs/.vitepress/dist/assets/inter-italic-greek-ext.1u6EdAuj.woff2 +0 -0
  112. package/packages/docs/.vitepress/dist/assets/inter-italic-greek.DJ8dCoTZ.woff2 +0 -0
  113. package/packages/docs/.vitepress/dist/assets/inter-italic-latin-ext.CN1xVJS-.woff2 +0 -0
  114. package/packages/docs/.vitepress/dist/assets/inter-italic-latin.C2AdPX0b.woff2 +0 -0
  115. package/packages/docs/.vitepress/dist/assets/inter-italic-vietnamese.BSbpV94h.woff2 +0 -0
  116. package/packages/docs/.vitepress/dist/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 +0 -0
  117. package/packages/docs/.vitepress/dist/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 +0 -0
  118. package/packages/docs/.vitepress/dist/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 +0 -0
  119. package/packages/docs/.vitepress/dist/assets/inter-roman-greek.BBVDIX6e.woff2 +0 -0
  120. package/packages/docs/.vitepress/dist/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 +0 -0
  121. package/packages/docs/.vitepress/dist/assets/inter-roman-latin.Di8DUHzh.woff2 +0 -0
  122. package/packages/docs/.vitepress/dist/assets/inter-roman-vietnamese.BjW4sHH5.woff2 +0 -0
  123. package/packages/docs/.vitepress/dist/assets/mcp-interaction-pattern.VdvOPuTt.png +0 -0
  124. package/packages/docs/.vitepress/dist/assets/placeholder-demo-greenfield.B8lG_tBI.png +0 -0
  125. package/packages/docs/.vitepress/dist/assets/style.CAgdBzOq.css +1 -0
  126. package/packages/docs/.vitepress/dist/assets/user_advanced-engineering.md.MkETYNtq.js +50 -0
  127. package/packages/docs/.vitepress/dist/assets/user_advanced-engineering.md.MkETYNtq.lean.js +1 -0
  128. package/packages/docs/.vitepress/dist/assets/user_agent-setup.md.B54OLL2H.js +24 -0
  129. package/packages/docs/.vitepress/dist/assets/user_agent-setup.md.B54OLL2H.lean.js +1 -0
  130. package/packages/docs/.vitepress/dist/assets/user_beads-integration.md.BzdR5Fif.js +15 -0
  131. package/packages/docs/.vitepress/dist/assets/user_beads-integration.md.BzdR5Fif.lean.js +1 -0
  132. package/packages/docs/.vitepress/dist/assets/user_crowd-mcp-integration.md.C15kSdIJ.js +157 -0
  133. package/packages/docs/.vitepress/dist/assets/user_crowd-mcp-integration.md.C15kSdIJ.lean.js +1 -0
  134. package/packages/docs/.vitepress/dist/assets/user_custom-workflows.md.Cz4IYCXa.js +143 -0
  135. package/packages/docs/.vitepress/dist/assets/user_custom-workflows.md.Cz4IYCXa.lean.js +1 -0
  136. package/packages/docs/.vitepress/dist/assets/user_git-commit-feature.md.UcTvDR-O.js +1 -0
  137. package/packages/docs/.vitepress/dist/assets/user_git-commit-feature.md.UcTvDR-O.lean.js +1 -0
  138. package/packages/docs/.vitepress/dist/assets/user_how-it-works.md.DiOXNgaL.js +23 -0
  139. package/packages/docs/.vitepress/dist/assets/user_how-it-works.md.DiOXNgaL.lean.js +1 -0
  140. package/packages/docs/.vitepress/dist/assets/user_long-term-memory.md.DZh0tjNa.js +43 -0
  141. package/packages/docs/.vitepress/dist/assets/user_long-term-memory.md.DZh0tjNa.lean.js +1 -0
  142. package/packages/docs/.vitepress/dist/assets/user_packaged-workflows.md.s1HT89ZU.js +2 -0
  143. package/packages/docs/.vitepress/dist/assets/user_packaged-workflows.md.s1HT89ZU.lean.js +1 -0
  144. package/packages/docs/.vitepress/dist/assets/user_tutorial.md.Dmj8zLB2.js +3 -0
  145. package/packages/docs/.vitepress/dist/assets/user_tutorial.md.Dmj8zLB2.lean.js +1 -0
  146. package/packages/docs/.vitepress/dist/assets/user_workflow-selection.md.CrPGw9Hr.js +7 -0
  147. package/packages/docs/.vitepress/dist/assets/user_workflow-selection.md.CrPGw9Hr.lean.js +1 -0
  148. package/packages/docs/.vitepress/dist/assets/workflows.md.Bm5sGt3u.js +1 -0
  149. package/packages/docs/.vitepress/dist/assets/workflows.md.Bm5sGt3u.lean.js +1 -0
  150. package/packages/docs/.vitepress/dist/assets/workflows_adr.md.DEaXkbRp.js +1 -0
  151. package/packages/docs/.vitepress/dist/assets/workflows_adr.md.DEaXkbRp.lean.js +1 -0
  152. package/packages/docs/.vitepress/dist/assets/workflows_big-bang-conversion.md.BA5R1LxZ.js +1 -0
  153. package/packages/docs/.vitepress/dist/assets/workflows_big-bang-conversion.md.BA5R1LxZ.lean.js +1 -0
  154. package/packages/docs/.vitepress/dist/assets/workflows_boundary-testing.md.DBcYnMhx.js +1 -0
  155. package/packages/docs/.vitepress/dist/assets/workflows_boundary-testing.md.DBcYnMhx.lean.js +1 -0
  156. package/packages/docs/.vitepress/dist/assets/workflows_bugfix.md.CZRCL0Hp.js +1 -0
  157. package/packages/docs/.vitepress/dist/assets/workflows_bugfix.md.CZRCL0Hp.lean.js +1 -0
  158. package/packages/docs/.vitepress/dist/assets/workflows_business-analysis.md.fGLml8Hw.js +1 -0
  159. package/packages/docs/.vitepress/dist/assets/workflows_business-analysis.md.fGLml8Hw.lean.js +1 -0
  160. package/packages/docs/.vitepress/dist/assets/workflows_c4-analysis.md.Dnssqzuf.js +1 -0
  161. package/packages/docs/.vitepress/dist/assets/workflows_c4-analysis.md.Dnssqzuf.lean.js +1 -0
  162. package/packages/docs/.vitepress/dist/assets/workflows_epcc.md.M6DnIhpp.js +1 -0
  163. package/packages/docs/.vitepress/dist/assets/workflows_epcc.md.M6DnIhpp.lean.js +1 -0
  164. package/packages/docs/.vitepress/dist/assets/workflows_game-beginner.md.CNxzWLtd.js +1 -0
  165. package/packages/docs/.vitepress/dist/assets/workflows_game-beginner.md.CNxzWLtd.lean.js +1 -0
  166. package/packages/docs/.vitepress/dist/assets/workflows_greenfield.md.vx_g-WOe.js +1 -0
  167. package/packages/docs/.vitepress/dist/assets/workflows_greenfield.md.vx_g-WOe.lean.js +1 -0
  168. package/packages/docs/.vitepress/dist/assets/workflows_minor.md.DdnfwMf4.js +1 -0
  169. package/packages/docs/.vitepress/dist/assets/workflows_minor.md.DdnfwMf4.lean.js +1 -0
  170. package/packages/docs/.vitepress/dist/assets/workflows_posts.md.SOldXvq7.js +1 -0
  171. package/packages/docs/.vitepress/dist/assets/workflows_posts.md.SOldXvq7.lean.js +1 -0
  172. package/packages/docs/.vitepress/dist/assets/workflows_sdd-bugfix-crowd.md.-lSf42gJ.js +1 -0
  173. package/packages/docs/.vitepress/dist/assets/workflows_sdd-bugfix-crowd.md.-lSf42gJ.lean.js +1 -0
  174. package/packages/docs/.vitepress/dist/assets/workflows_sdd-bugfix.md.oRAsEVbc.js +1 -0
  175. package/packages/docs/.vitepress/dist/assets/workflows_sdd-bugfix.md.oRAsEVbc.lean.js +1 -0
  176. package/packages/docs/.vitepress/dist/assets/workflows_sdd-feature-crowd.md.DAtnfCAd.js +1 -0
  177. package/packages/docs/.vitepress/dist/assets/workflows_sdd-feature-crowd.md.DAtnfCAd.lean.js +1 -0
  178. package/packages/docs/.vitepress/dist/assets/workflows_sdd-feature.md.Ce3-H_g3.js +1 -0
  179. package/packages/docs/.vitepress/dist/assets/workflows_sdd-feature.md.Ce3-H_g3.lean.js +1 -0
  180. package/packages/docs/.vitepress/dist/assets/workflows_sdd-greenfield-crowd.md.8DUvcmLe.js +1 -0
  181. package/packages/docs/.vitepress/dist/assets/workflows_sdd-greenfield-crowd.md.8DUvcmLe.lean.js +1 -0
  182. package/packages/docs/.vitepress/dist/assets/workflows_sdd-greenfield.md.eEN6U0J4.js +1 -0
  183. package/packages/docs/.vitepress/dist/assets/workflows_sdd-greenfield.md.eEN6U0J4.lean.js +1 -0
  184. package/packages/docs/.vitepress/dist/assets/workflows_slides.md.Cqt-19_1.js +1 -0
  185. package/packages/docs/.vitepress/dist/assets/workflows_slides.md.Cqt-19_1.lean.js +1 -0
  186. package/packages/docs/.vitepress/dist/assets/workflows_tdd.md.BjVC69tu.js +1 -0
  187. package/packages/docs/.vitepress/dist/assets/workflows_tdd.md.BjVC69tu.lean.js +1 -0
  188. package/packages/docs/.vitepress/dist/assets/workflows_waterfall.md.CL6jTZP9.js +1 -0
  189. package/packages/docs/.vitepress/dist/assets/workflows_waterfall.md.CL6jTZP9.lean.js +1 -0
  190. package/packages/docs/.vitepress/dist/dev/ARCHITECTURE.html +155 -0
  191. package/packages/docs/.vitepress/dist/dev/DEVELOPMENT.html +97 -0
  192. package/packages/docs/.vitepress/dist/dev/LOGGING.html +59 -0
  193. package/packages/docs/.vitepress/dist/dev/PUBLISHING.html +30 -0
  194. package/packages/docs/.vitepress/dist/hashmap.json +1 -0
  195. package/packages/docs/.vitepress/dist/index.html +27 -0
  196. package/packages/docs/.vitepress/dist/user/advanced-engineering.html +75 -0
  197. package/packages/docs/.vitepress/dist/user/agent-setup.html +49 -0
  198. package/packages/docs/.vitepress/dist/user/beads-integration.html +40 -0
  199. package/packages/docs/.vitepress/dist/user/crowd-mcp-integration.html +182 -0
  200. package/packages/docs/.vitepress/dist/user/custom-workflows.html +168 -0
  201. package/packages/docs/.vitepress/dist/user/git-commit-feature.html +30 -0
  202. package/packages/docs/.vitepress/dist/user/how-it-works.html +48 -0
  203. package/packages/docs/.vitepress/dist/user/long-term-memory.html +68 -0
  204. package/packages/docs/.vitepress/dist/user/packaged-workflows.html +27 -0
  205. package/packages/docs/.vitepress/dist/user/tutorial.html +28 -0
  206. package/packages/docs/.vitepress/dist/user/workflow-selection.html +32 -0
  207. package/packages/docs/.vitepress/dist/vp-icons.css +0 -0
  208. package/packages/docs/.vitepress/dist/workflows/adr.html +26 -0
  209. package/packages/docs/.vitepress/dist/workflows/adr.yaml +157 -0
  210. package/packages/docs/.vitepress/dist/workflows/big-bang-conversion.html +26 -0
  211. package/packages/docs/.vitepress/dist/workflows/big-bang-conversion.yaml +592 -0
  212. package/packages/docs/.vitepress/dist/workflows/boundary-testing.html +26 -0
  213. package/packages/docs/.vitepress/dist/workflows/boundary-testing.yaml +376 -0
  214. package/packages/docs/.vitepress/dist/workflows/bugfix.html +26 -0
  215. package/packages/docs/.vitepress/dist/workflows/bugfix.yaml +177 -0
  216. package/packages/docs/.vitepress/dist/workflows/business-analysis.html +26 -0
  217. package/packages/docs/.vitepress/dist/workflows/business-analysis.yaml +597 -0
  218. package/packages/docs/.vitepress/dist/workflows/c4-analysis.html +26 -0
  219. package/packages/docs/.vitepress/dist/workflows/c4-analysis.yaml +471 -0
  220. package/packages/docs/.vitepress/dist/workflows/epcc.html +26 -0
  221. package/packages/docs/.vitepress/dist/workflows/epcc.yaml +183 -0
  222. package/packages/docs/.vitepress/dist/workflows/game-beginner.html +26 -0
  223. package/packages/docs/.vitepress/dist/workflows/game-beginner.yaml +434 -0
  224. package/packages/docs/.vitepress/dist/workflows/greenfield.html +26 -0
  225. package/packages/docs/.vitepress/dist/workflows/greenfield.yaml +201 -0
  226. package/packages/docs/.vitepress/dist/workflows/minor.html +26 -0
  227. package/packages/docs/.vitepress/dist/workflows/minor.yaml +138 -0
  228. package/packages/docs/.vitepress/dist/workflows/posts.html +26 -0
  229. package/packages/docs/.vitepress/dist/workflows/posts.yaml +193 -0
  230. package/packages/docs/.vitepress/dist/workflows/sdd-bugfix-crowd.html +26 -0
  231. package/packages/docs/.vitepress/dist/workflows/sdd-bugfix-crowd.yaml +608 -0
  232. package/packages/docs/.vitepress/dist/workflows/sdd-bugfix.html +26 -0
  233. package/packages/docs/.vitepress/dist/workflows/sdd-bugfix.yaml +381 -0
  234. package/packages/docs/.vitepress/dist/workflows/sdd-feature-crowd.html +26 -0
  235. package/packages/docs/.vitepress/dist/workflows/sdd-feature-crowd.yaml +713 -0
  236. package/packages/docs/.vitepress/dist/workflows/sdd-feature.html +26 -0
  237. package/packages/docs/.vitepress/dist/workflows/sdd-feature.yaml +471 -0
  238. package/packages/docs/.vitepress/dist/workflows/sdd-greenfield-crowd.html +26 -0
  239. package/packages/docs/.vitepress/dist/workflows/sdd-greenfield-crowd.yaml +336 -0
  240. package/packages/docs/.vitepress/dist/workflows/sdd-greenfield.html +26 -0
  241. package/packages/docs/.vitepress/dist/workflows/sdd-greenfield.yaml +463 -0
  242. package/packages/docs/.vitepress/dist/workflows/slides.html +26 -0
  243. package/packages/docs/.vitepress/dist/workflows/slides.yaml +237 -0
  244. package/packages/docs/.vitepress/dist/workflows/tdd.html +26 -0
  245. package/packages/docs/.vitepress/dist/workflows/tdd.yaml +160 -0
  246. package/packages/docs/.vitepress/dist/workflows/waterfall.html +26 -0
  247. package/packages/docs/.vitepress/dist/workflows/waterfall.yaml +209 -0
  248. package/packages/docs/.vitepress/dist/workflows.html +26 -0
  249. package/packages/docs/package.json +32 -0
  250. package/packages/mcp-server/dist/index.js +10546 -0
  251. package/packages/mcp-server/package.json +41 -0
  252. package/packages/visualizer/dist/WorkflowVisualizer.vue +1147 -0
  253. package/packages/visualizer/dist/index.ts +17 -0
  254. package/packages/visualizer/dist/main.ts +673 -0
  255. package/packages/visualizer/dist/services/BundledWorkflows.ts +35 -0
  256. package/packages/visualizer/dist/services/FileUploadHandler.ts +166 -0
  257. package/packages/visualizer/dist/services/WorkflowLoader.ts +198 -0
  258. package/packages/visualizer/dist/services/YamlParser.ts +248 -0
  259. package/packages/visualizer/dist/services/workflow-list.ts +23 -0
  260. package/packages/visualizer/dist/types/ui-types.ts +84 -0
  261. package/packages/visualizer/dist/types/visualization-types.ts +95 -0
  262. package/packages/visualizer/dist/types/vite-env.d.ts +12 -0
  263. package/packages/visualizer/dist/utils/DomHelpers.ts +206 -0
  264. package/packages/visualizer/dist/utils/ErrorHandler.ts +170 -0
  265. package/packages/visualizer/dist/utils/PlantUMLEncoder.ts +121 -0
  266. package/packages/visualizer/dist/visualization/DiagramRenderer.ts +430 -0
  267. package/packages/visualizer/dist/visualization/LayoutEngine.ts +339 -0
  268. package/packages/visualizer/dist/visualization/PlantUMLRenderer.ts +507 -0
  269. package/packages/visualizer/dist/visualization/StateRenderer.ts +339 -0
  270. package/packages/visualizer/dist/visualization/TransitionRenderer.ts +432 -0
  271. package/packages/visualizer/package.json +39 -0
  272. package/resources/.DS_Store +0 -0
  273. package/resources/agents/architect.yaml +61 -0
  274. package/resources/agents/business-analyst.yaml +60 -0
  275. package/resources/agents/developer.yaml +61 -0
  276. package/resources/state-machine-schema.json +114 -0
  277. package/resources/templates/architecture/arc42/arc42-template-EN.md +1077 -0
  278. package/resources/templates/architecture/arc42/images/01_2_iso-25010-topics-EN.drawio-2023.png +0 -0
  279. package/resources/templates/architecture/arc42/images/01_2_iso-25010-topics-EN.drawio.png +0 -0
  280. package/resources/templates/architecture/arc42/images/05_building_blocks-EN.png +0 -0
  281. package/resources/templates/architecture/arc42/images/08-concepts-EN.drawio.png +0 -0
  282. package/resources/templates/architecture/arc42/images/arc42-logo.png +0 -0
  283. package/resources/templates/architecture/c4.md +224 -0
  284. package/resources/templates/architecture/freestyle.md +53 -0
  285. package/resources/templates/architecture/game.md +250 -0
  286. package/resources/templates/architecture/none.md +17 -0
  287. package/resources/templates/design/comprehensive.md +207 -0
  288. package/resources/templates/design/freestyle.md +37 -0
  289. package/resources/templates/design/game.md +66 -0
  290. package/resources/templates/design/none.md +17 -0
  291. package/resources/templates/requirements/ears.md +90 -0
  292. package/resources/templates/requirements/freestyle.md +42 -0
  293. package/resources/templates/requirements/game.md +162 -0
  294. package/resources/templates/requirements/none.md +17 -0
  295. package/resources/templates/skills/POWER.md +23 -0
  296. package/resources/templates/skills/SKILL.md +19 -0
  297. package/resources/workflows/adr.yaml +157 -0
  298. package/resources/workflows/big-bang-conversion.yaml +592 -0
  299. package/resources/workflows/boundary-testing.yaml +376 -0
  300. package/resources/workflows/bugfix.yaml +177 -0
  301. package/resources/workflows/business-analysis.yaml +597 -0
  302. package/resources/workflows/c4-analysis.yaml +471 -0
  303. package/resources/workflows/epcc.yaml +183 -0
  304. package/resources/workflows/game-beginner.yaml +434 -0
  305. package/resources/workflows/greenfield.yaml +201 -0
  306. package/resources/workflows/minor.yaml +138 -0
  307. package/resources/workflows/posts.yaml +193 -0
  308. package/resources/workflows/sdd-bugfix-crowd.yaml +608 -0
  309. package/resources/workflows/sdd-bugfix.yaml +381 -0
  310. package/resources/workflows/sdd-feature-crowd.yaml +713 -0
  311. package/resources/workflows/sdd-feature.yaml +471 -0
  312. package/resources/workflows/sdd-greenfield-crowd.yaml +336 -0
  313. package/resources/workflows/sdd-greenfield.yaml +463 -0
  314. package/resources/workflows/slides.yaml +237 -0
  315. package/resources/workflows/tdd.yaml +160 -0
  316. package/resources/workflows/waterfall.yaml +209 -0
  317. package/dist/components/beads/beads-instruction-generator.d.ts +0 -44
  318. package/dist/components/beads/beads-instruction-generator.d.ts.map +0 -1
  319. package/dist/components/beads/beads-instruction-generator.js +0 -160
  320. package/dist/components/beads/beads-instruction-generator.js.map +0 -1
  321. package/dist/components/beads/beads-plan-manager.d.ts.map +0 -1
  322. package/dist/components/beads/beads-plan-manager.js.map +0 -1
  323. package/dist/components/beads/beads-task-backend-client.d.ts +0 -43
  324. package/dist/components/beads/beads-task-backend-client.d.ts.map +0 -1
  325. package/dist/components/beads/beads-task-backend-client.js +0 -175
  326. package/dist/components/beads/beads-task-backend-client.js.map +0 -1
  327. package/dist/index.d.ts +0 -9
  328. package/dist/index.d.ts.map +0 -1
  329. package/dist/index.js +0 -74
  330. package/dist/index.js.map +0 -1
  331. package/dist/notification-service.d.ts +0 -14
  332. package/dist/notification-service.d.ts.map +0 -1
  333. package/dist/notification-service.js +0 -18
  334. package/dist/notification-service.js.map +0 -1
  335. package/dist/plugin-system/beads-plugin.d.ts +0 -71
  336. package/dist/plugin-system/beads-plugin.d.ts.map +0 -1
  337. package/dist/plugin-system/beads-plugin.js +0 -465
  338. package/dist/plugin-system/beads-plugin.js.map +0 -1
  339. package/dist/plugin-system/commit-plugin.d.ts +0 -40
  340. package/dist/plugin-system/commit-plugin.d.ts.map +0 -1
  341. package/dist/plugin-system/commit-plugin.js +0 -204
  342. package/dist/plugin-system/commit-plugin.js.map +0 -1
  343. package/dist/plugin-system/index.d.ts +0 -9
  344. package/dist/plugin-system/index.d.ts.map +0 -1
  345. package/dist/plugin-system/index.js +0 -9
  346. package/dist/plugin-system/index.js.map +0 -1
  347. package/dist/plugin-system/plugin-interfaces.d.ts +0 -98
  348. package/dist/plugin-system/plugin-interfaces.d.ts.map +0 -1
  349. package/dist/plugin-system/plugin-interfaces.js +0 -9
  350. package/dist/plugin-system/plugin-interfaces.js.map +0 -1
  351. package/dist/plugin-system/plugin-registry.d.ts +0 -44
  352. package/dist/plugin-system/plugin-registry.d.ts.map +0 -1
  353. package/dist/plugin-system/plugin-registry.js +0 -132
  354. package/dist/plugin-system/plugin-registry.js.map +0 -1
  355. package/dist/resource-handlers/conversation-state.d.ts +0 -15
  356. package/dist/resource-handlers/conversation-state.d.ts.map +0 -1
  357. package/dist/resource-handlers/conversation-state.js +0 -40
  358. package/dist/resource-handlers/conversation-state.js.map +0 -1
  359. package/dist/resource-handlers/development-plan.d.ts +0 -14
  360. package/dist/resource-handlers/development-plan.d.ts.map +0 -1
  361. package/dist/resource-handlers/development-plan.js +0 -31
  362. package/dist/resource-handlers/development-plan.js.map +0 -1
  363. package/dist/resource-handlers/index.d.ts +0 -24
  364. package/dist/resource-handlers/index.d.ts.map +0 -1
  365. package/dist/resource-handlers/index.js +0 -62
  366. package/dist/resource-handlers/index.js.map +0 -1
  367. package/dist/resource-handlers/system-prompt.d.ts +0 -15
  368. package/dist/resource-handlers/system-prompt.d.ts.map +0 -1
  369. package/dist/resource-handlers/system-prompt.js +0 -40
  370. package/dist/resource-handlers/system-prompt.js.map +0 -1
  371. package/dist/resource-handlers/workflow-resource.d.ts +0 -15
  372. package/dist/resource-handlers/workflow-resource.d.ts.map +0 -1
  373. package/dist/resource-handlers/workflow-resource.js +0 -85
  374. package/dist/resource-handlers/workflow-resource.js.map +0 -1
  375. package/dist/response-renderer.d.ts +0 -30
  376. package/dist/response-renderer.d.ts.map +0 -1
  377. package/dist/response-renderer.js +0 -94
  378. package/dist/response-renderer.js.map +0 -1
  379. package/dist/server-config.d.ts +0 -34
  380. package/dist/server-config.d.ts.map +0 -1
  381. package/dist/server-config.js +0 -503
  382. package/dist/server-config.js.map +0 -1
  383. package/dist/server-helpers.d.ts +0 -70
  384. package/dist/server-helpers.d.ts.map +0 -1
  385. package/dist/server-helpers.js +0 -171
  386. package/dist/server-helpers.js.map +0 -1
  387. package/dist/server-implementation.d.ts +0 -74
  388. package/dist/server-implementation.d.ts.map +0 -1
  389. package/dist/server-implementation.js +0 -201
  390. package/dist/server-implementation.js.map +0 -1
  391. package/dist/server.d.ts +0 -6
  392. package/dist/server.d.ts.map +0 -1
  393. package/dist/server.js +0 -5
  394. package/dist/server.js.map +0 -1
  395. package/dist/tool-handlers/base-tool-handler.d.ts +0 -50
  396. package/dist/tool-handlers/base-tool-handler.d.ts.map +0 -1
  397. package/dist/tool-handlers/base-tool-handler.js +0 -81
  398. package/dist/tool-handlers/base-tool-handler.js.map +0 -1
  399. package/dist/tool-handlers/conduct-review.d.ts +0 -49
  400. package/dist/tool-handlers/conduct-review.d.ts.map +0 -1
  401. package/dist/tool-handlers/conduct-review.js +0 -104
  402. package/dist/tool-handlers/conduct-review.js.map +0 -1
  403. package/dist/tool-handlers/get-tool-info.d.ts +0 -75
  404. package/dist/tool-handlers/get-tool-info.d.ts.map +0 -1
  405. package/dist/tool-handlers/get-tool-info.js +0 -168
  406. package/dist/tool-handlers/get-tool-info.js.map +0 -1
  407. package/dist/tool-handlers/index.d.ts +0 -41
  408. package/dist/tool-handlers/index.d.ts.map +0 -1
  409. package/dist/tool-handlers/index.js +0 -71
  410. package/dist/tool-handlers/index.js.map +0 -1
  411. package/dist/tool-handlers/list-workflows.d.ts +0 -35
  412. package/dist/tool-handlers/list-workflows.d.ts.map +0 -1
  413. package/dist/tool-handlers/list-workflows.js +0 -43
  414. package/dist/tool-handlers/list-workflows.js.map +0 -1
  415. package/dist/tool-handlers/no-idea.d.ts +0 -41
  416. package/dist/tool-handlers/no-idea.d.ts.map +0 -1
  417. package/dist/tool-handlers/no-idea.js +0 -29
  418. package/dist/tool-handlers/no-idea.js.map +0 -1
  419. package/dist/tool-handlers/proceed-to-phase.d.ts +0 -41
  420. package/dist/tool-handlers/proceed-to-phase.d.ts.map +0 -1
  421. package/dist/tool-handlers/proceed-to-phase.js +0 -165
  422. package/dist/tool-handlers/proceed-to-phase.js.map +0 -1
  423. package/dist/tool-handlers/reset-development.d.ts +0 -31
  424. package/dist/tool-handlers/reset-development.d.ts.map +0 -1
  425. package/dist/tool-handlers/reset-development.js +0 -48
  426. package/dist/tool-handlers/reset-development.js.map +0 -1
  427. package/dist/tool-handlers/resume-workflow.d.ts +0 -87
  428. package/dist/tool-handlers/resume-workflow.d.ts.map +0 -1
  429. package/dist/tool-handlers/resume-workflow.js +0 -212
  430. package/dist/tool-handlers/resume-workflow.js.map +0 -1
  431. package/dist/tool-handlers/setup-project-docs.d.ts +0 -37
  432. package/dist/tool-handlers/setup-project-docs.d.ts.map +0 -1
  433. package/dist/tool-handlers/setup-project-docs.js +0 -138
  434. package/dist/tool-handlers/setup-project-docs.js.map +0 -1
  435. package/dist/tool-handlers/start-development.d.ts +0 -79
  436. package/dist/tool-handlers/start-development.d.ts.map +0 -1
  437. package/dist/tool-handlers/start-development.js +0 -484
  438. package/dist/tool-handlers/start-development.js.map +0 -1
  439. package/dist/tool-handlers/whats-next.d.ts +0 -41
  440. package/dist/tool-handlers/whats-next.d.ts.map +0 -1
  441. package/dist/tool-handlers/whats-next.js +0 -123
  442. package/dist/tool-handlers/whats-next.js.map +0 -1
  443. package/dist/types.d.ts +0 -119
  444. package/dist/types.d.ts.map +0 -1
  445. package/dist/types.js +0 -5
  446. package/dist/version-info.d.ts +0 -30
  447. package/dist/version-info.d.ts.map +0 -1
  448. package/dist/version-info.js +0 -178
  449. package/dist/version-info.js.map +0 -1
  450. package/skill/SKILL.md +0 -28
  451. /package/{dist → packages/core/dist}/types.js.map +0 -0
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Instruction Generator
3
+ *
4
+ * Creates phase-specific guidance for the LLM based on current conversation state.
5
+ * Customizes instructions based on project context and development phase.
6
+ * Supports custom state machine definitions for dynamic instruction generation.
7
+ * Handles variable substitution for project artifact references.
8
+ */
9
+ import { PlanManager } from './plan-manager.js';
10
+ import type { YamlStateMachine } from './state-machine-types.js';
11
+ import type { IInstructionGenerator, InstructionContext, GeneratedInstructions } from './interfaces/instruction-generator.interface.js';
12
+ export declare class InstructionGenerator implements IInstructionGenerator {
13
+ private projectDocsManager;
14
+ constructor(_planManager: PlanManager);
15
+ /**
16
+ * Set the state machine definition for dynamic instruction generation
17
+ */
18
+ setStateMachine(_stateMachine: YamlStateMachine): void;
19
+ /**
20
+ * Generate comprehensive instructions for the LLM
21
+ */
22
+ generateInstructions(baseInstructions: string, context: InstructionContext): Promise<GeneratedInstructions>;
23
+ /**
24
+ * Apply variable substitution to instructions
25
+ * Replaces project artifact variables with actual file paths
26
+ */
27
+ private applyVariableSubstitution;
28
+ /**
29
+ * Escape special regex characters in variable names
30
+ */
31
+ private escapeRegExp;
32
+ /**
33
+ * Enhance base instructions with context-specific information
34
+ */
35
+ private enhanceInstructions;
36
+ /**
37
+ * Capitalize phase name for display
38
+ */
39
+ private capitalizePhase;
40
+ }
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Instruction Generator
3
+ *
4
+ * Creates phase-specific guidance for the LLM based on current conversation state.
5
+ * Customizes instructions based on project context and development phase.
6
+ * Supports custom state machine definitions for dynamic instruction generation.
7
+ * Handles variable substitution for project artifact references.
8
+ */
9
+ import { ProjectDocsManager } from './project-docs-manager.js';
10
+ export class InstructionGenerator {
11
+ projectDocsManager;
12
+ constructor(_planManager) {
13
+ // planManager parameter kept for API compatibility but not stored since unused
14
+ this.projectDocsManager = new ProjectDocsManager();
15
+ }
16
+ /**
17
+ * Set the state machine definition for dynamic instruction generation
18
+ */
19
+ setStateMachine(_stateMachine) {
20
+ // stateMachine parameter kept for API compatibility but not stored since unused
21
+ return;
22
+ }
23
+ /**
24
+ * Generate comprehensive instructions for the LLM
25
+ */
26
+ async generateInstructions(baseInstructions, context) {
27
+ // Apply variable substitution to base instructions
28
+ const substitutedInstructions = this.applyVariableSubstitution(baseInstructions, context.conversationContext.projectPath, context.conversationContext.gitBranch);
29
+ // Enhance base instructions with context-specific guidance
30
+ const enhancedInstructions = await this.enhanceInstructions(substitutedInstructions, context);
31
+ return {
32
+ instructions: enhancedInstructions,
33
+ planFileGuidance: 'Task management guidance is now included in main instructions',
34
+ metadata: {
35
+ phase: context.phase,
36
+ planFilePath: context.conversationContext.planFilePath,
37
+ transitionReason: context.transitionReason,
38
+ isModeled: context.isModeled,
39
+ },
40
+ };
41
+ }
42
+ /**
43
+ * Apply variable substitution to instructions
44
+ * Replaces project artifact variables with actual file paths
45
+ */
46
+ applyVariableSubstitution(instructions, projectPath, gitBranch) {
47
+ const substitutions = this.projectDocsManager.getVariableSubstitutions(projectPath, gitBranch);
48
+ let result = instructions;
49
+ for (const [variable, value] of Object.entries(substitutions)) {
50
+ // Use global replace to handle multiple occurrences
51
+ result = result.replace(new RegExp(this.escapeRegExp(variable), 'g'), value);
52
+ }
53
+ return result;
54
+ }
55
+ /**
56
+ * Escape special regex characters in variable names
57
+ */
58
+ escapeRegExp(string) {
59
+ return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
60
+ }
61
+ /**
62
+ * Enhance base instructions with context-specific information
63
+ */
64
+ async enhanceInstructions(baseInstructions, context) {
65
+ const { phase, conversationContext, planFileExists } = context;
66
+ const phaseName = this.capitalizePhase(phase);
67
+ let workflowSection = `---
68
+ **Workflow Continuity:**
69
+ Maintain \`${conversationContext.planFilePath}\`:
70
+ - Work through tasks in the "${phaseName}" section; Focus on those tasks!
71
+ - Add newly discovered tasks; log decisions in "Key Decisions"
72
+ - DO NOT maintain tasks in other tools or documents than explicitly stated in this plan file!`;
73
+ if (!planFileExists) {
74
+ workflowSection += '\n- Note: plan file will be created on first update';
75
+ }
76
+ workflowSection += '\n\nCall `whats_next()` after each user message.';
77
+ return `## ${phaseName} Phase\n\n${baseInstructions}\n\n${workflowSection}`;
78
+ }
79
+ /**
80
+ * Capitalize phase name for display
81
+ */
82
+ capitalizePhase(phase) {
83
+ return phase
84
+ .split('_')
85
+ .map(word => word.charAt(0).toUpperCase() + word.slice(1))
86
+ .join(' ');
87
+ }
88
+ }
89
+ //# sourceMappingURL=instruction-generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instruction-generator.js","sourceRoot":"","sources":["../src/instruction-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAS/D,MAAM,OAAO,oBAAoB;IACvB,kBAAkB,CAAqB;IAE/C,YAAY,YAAyB;QACnC,+EAA+E;QAC/E,IAAI,CAAC,kBAAkB,GAAG,IAAI,kBAAkB,EAAE,CAAC;IACrD,CAAC;IAED;;OAEG;IACH,eAAe,CAAC,aAA+B;QAC7C,gFAAgF;QAChF,OAAO;IACT,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,oBAAoB,CACxB,gBAAwB,EACxB,OAA2B;QAE3B,mDAAmD;QACnD,MAAM,uBAAuB,GAAG,IAAI,CAAC,yBAAyB,CAC5D,gBAAgB,EAChB,OAAO,CAAC,mBAAmB,CAAC,WAAW,EACvC,OAAO,CAAC,mBAAmB,CAAC,SAAS,CACtC,CAAC;QAEF,2DAA2D;QAC3D,MAAM,oBAAoB,GAAG,MAAM,IAAI,CAAC,mBAAmB,CACzD,uBAAuB,EACvB,OAAO,CACR,CAAC;QAEF,OAAO;YACL,YAAY,EAAE,oBAAoB;YAClC,gBAAgB,EACd,+DAA+D;YACjE,QAAQ,EAAE;gBACR,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,YAAY,EAAE,OAAO,CAAC,mBAAmB,CAAC,YAAY;gBACtD,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;gBAC1C,SAAS,EAAE,OAAO,CAAC,SAAS;aAC7B;SACF,CAAC;IACJ,CAAC;IAED;;;OAGG;IACK,yBAAyB,CAC/B,YAAoB,EACpB,WAAmB,EACnB,SAAkB;QAElB,MAAM,aAAa,GAAG,IAAI,CAAC,kBAAkB,CAAC,wBAAwB,CACpE,WAAW,EACX,SAAS,CACV,CAAC;QAEF,IAAI,MAAM,GAAG,YAAY,CAAC;QAC1B,KAAK,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC;YAC9D,oDAAoD;YACpD,MAAM,GAAG,MAAM,CAAC,OAAO,CACrB,IAAI,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE,GAAG,CAAC,EAC5C,KAAK,CACN,CAAC;QACJ,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;OAEG;IACK,YAAY,CAAC,MAAc;QACjC,OAAO,MAAM,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;IACvD,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,mBAAmB,CAC/B,gBAAwB,EACxB,OAA2B;QAE3B,MAAM,EAAE,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC;QAE/D,MAAM,SAAS,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QAE9C,IAAI,eAAe,GAAG;;aAEb,mBAAmB,CAAC,YAAY;+BACd,SAAS;;8FAEsD,CAAC;QAE3F,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,eAAe,IAAI,qDAAqD,CAAC;QAC3E,CAAC;QAED,eAAe,IAAI,kDAAkD,CAAC;QAEtE,OAAO,MAAM,SAAS,aAAa,gBAAgB,OAAO,eAAe,EAAE,CAAC;IAC9E,CAAC;IAED;;OAEG;IACK,eAAe,CAAC,KAAa;QACnC,OAAO,KAAK;aACT,KAAK,CAAC,GAAG,CAAC;aACV,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;aACzD,IAAI,CAAC,GAAG,CAAC,CAAC;IACf,CAAC;CACF"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Interaction Logger module
3
+ *
4
+ * Handles logging of tool interactions to the database for auditing and debugging.
5
+ */
6
+ import type { IPersistence } from './persistence-interface.js';
7
+ import type { InteractionLog } from './types.js';
8
+ /**
9
+ * Handles logging of tool interactions to the database
10
+ */
11
+ export declare class InteractionLogger {
12
+ private database;
13
+ /**
14
+ * Create a new InteractionLogger
15
+ *
16
+ * @param database - Persistence instance to use for logging
17
+ */
18
+ constructor(database: IPersistence);
19
+ /**
20
+ * Log an interaction with a tool
21
+ *
22
+ * @param conversationId - ID of the conversation
23
+ * @param toolName - Name of the tool that was called
24
+ * @param inputParams - Input parameters to the tool (will be stringified)
25
+ * @param responseData - Response data from the tool (will be stringified)
26
+ * @param currentPhase - Current development phase
27
+ * @returns Promise that resolves when the log is saved
28
+ */
29
+ logInteraction(conversationId: string, toolName: string, inputParams: unknown, responseData: unknown, currentPhase: string): Promise<void>;
30
+ /**
31
+ * Get all interactions for a specific conversation
32
+ *
33
+ * @param conversationId - ID of the conversation to get logs for
34
+ * @returns Promise that resolves to an array of interaction logs
35
+ */
36
+ getInteractionsByConversationId(conversationId: string): Promise<InteractionLog[]>;
37
+ }
@@ -0,0 +1,87 @@
1
+ /**
2
+ * Interaction Logger module
3
+ *
4
+ * Handles logging of tool interactions to the database for auditing and debugging.
5
+ */
6
+ import { createLogger } from './logger.js';
7
+ const logger = createLogger('InteractionLogger');
8
+ /**
9
+ * Handles logging of tool interactions to the database
10
+ */
11
+ export class InteractionLogger {
12
+ database;
13
+ /**
14
+ * Create a new InteractionLogger
15
+ *
16
+ * @param database - Persistence instance to use for logging
17
+ */
18
+ constructor(database) {
19
+ this.database = database;
20
+ logger.debug('InteractionLogger initialized');
21
+ }
22
+ /**
23
+ * Log an interaction with a tool
24
+ *
25
+ * @param conversationId - ID of the conversation
26
+ * @param toolName - Name of the tool that was called
27
+ * @param inputParams - Input parameters to the tool (will be stringified)
28
+ * @param responseData - Response data from the tool (will be stringified)
29
+ * @param currentPhase - Current development phase
30
+ * @returns Promise that resolves when the log is saved
31
+ */
32
+ async logInteraction(conversationId, toolName, inputParams, responseData, currentPhase) {
33
+ logger.debug('Logging interaction', {
34
+ conversationId,
35
+ toolName,
36
+ currentPhase,
37
+ });
38
+ try {
39
+ const timestamp = new Date().toISOString();
40
+ const log = {
41
+ conversationId,
42
+ toolName,
43
+ inputParams: JSON.stringify(inputParams),
44
+ responseData: JSON.stringify(responseData),
45
+ currentPhase,
46
+ timestamp,
47
+ };
48
+ await this.database.logInteraction(log);
49
+ logger.info('Interaction logged successfully', {
50
+ conversationId,
51
+ toolName,
52
+ timestamp,
53
+ });
54
+ }
55
+ catch (error) {
56
+ logger.error('Failed to log interaction', error, {
57
+ conversationId,
58
+ toolName,
59
+ });
60
+ // Don't throw the error - logging should not break the main flow
61
+ }
62
+ }
63
+ /**
64
+ * Get all interactions for a specific conversation
65
+ *
66
+ * @param conversationId - ID of the conversation to get logs for
67
+ * @returns Promise that resolves to an array of interaction logs
68
+ */
69
+ async getInteractionsByConversationId(conversationId) {
70
+ logger.debug('Getting interactions by conversation ID', { conversationId });
71
+ try {
72
+ const logs = await this.database.getInteractionsByConversationId(conversationId);
73
+ logger.info('Retrieved interaction logs', {
74
+ conversationId,
75
+ count: logs.length,
76
+ });
77
+ return logs;
78
+ }
79
+ catch (error) {
80
+ logger.error('Failed to get interaction logs', error, {
81
+ conversationId,
82
+ });
83
+ throw error;
84
+ }
85
+ }
86
+ }
87
+ //# sourceMappingURL=interaction-logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interaction-logger.js","sourceRoot":"","sources":["../src/interaction-logger.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAI3C,MAAM,MAAM,GAAG,YAAY,CAAC,mBAAmB,CAAC,CAAC;AAEjD;;GAEG;AACH,MAAM,OAAO,iBAAiB;IACpB,QAAQ,CAAe;IAE/B;;;;OAIG;IACH,YAAY,QAAsB;QAChC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,MAAM,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;IAChD,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,cAAc,CAClB,cAAsB,EACtB,QAAgB,EAChB,WAAoB,EACpB,YAAqB,EACrB,YAAoB;QAEpB,MAAM,CAAC,KAAK,CAAC,qBAAqB,EAAE;YAClC,cAAc;YACd,QAAQ;YACR,YAAY;SACb,CAAC,CAAC;QAEH,IAAI,CAAC;YACH,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;YAE3C,MAAM,GAAG,GAAmB;gBAC1B,cAAc;gBACd,QAAQ;gBACR,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;gBACxC,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC;gBAC1C,YAAY;gBACZ,SAAS;aACV,CAAC;YAEF,MAAM,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;YAExC,MAAM,CAAC,IAAI,CAAC,iCAAiC,EAAE;gBAC7C,cAAc;gBACd,QAAQ;gBACR,SAAS;aACV,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,CAAC,KAAK,CAAC,2BAA2B,EAAE,KAAc,EAAE;gBACxD,cAAc;gBACd,QAAQ;aACT,CAAC,CAAC;YACH,iEAAiE;QACnE,CAAC;IACH,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,+BAA+B,CACnC,cAAsB;QAEtB,MAAM,CAAC,KAAK,CAAC,yCAAyC,EAAE,EAAE,cAAc,EAAE,CAAC,CAAC;QAE5E,IAAI,CAAC;YACH,MAAM,IAAI,GACR,MAAM,IAAI,CAAC,QAAQ,CAAC,+BAA+B,CAAC,cAAc,CAAC,CAAC;YAEtE,MAAM,CAAC,IAAI,CAAC,4BAA4B,EAAE;gBACxC,cAAc;gBACd,KAAK,EAAE,IAAI,CAAC,MAAM;aACnB,CAAC,CAAC;YAEH,OAAO,IAAI,CAAC;QACd,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,CAAC,KAAK,CAAC,gCAAgC,EAAE,KAAc,EAAE;gBAC7D,cAAc;aACf,CAAC,CAAC;YACH,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Core Component Interfaces
3
+ *
4
+ * Defines contract interfaces for core components to enable strategy pattern.
5
+ * Enables clean substitution of components based on task backend configuration.
6
+ */
7
+ export * from './plan-manager.interface.js';
8
+ export * from './instruction-generator.interface.js';
9
+ export * from './task-backend-client.interface.js';
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Core Component Interfaces
3
+ *
4
+ * Defines contract interfaces for core components to enable strategy pattern.
5
+ * Enables clean substitution of components based on task backend configuration.
6
+ */
7
+ export * from './plan-manager.interface.js';
8
+ export * from './instruction-generator.interface.js';
9
+ export * from './task-backend-client.interface.js';
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Instruction Generator Interface
3
+ *
4
+ * Defines the contract for instruction generation functionality.
5
+ * Enables strategy pattern implementation for different task backends.
6
+ */
7
+ import type { ConversationContext } from '../types.js';
8
+ import type { YamlStateMachine } from '../state-machine-types.js';
9
+ export interface InstructionContext {
10
+ phase: string;
11
+ conversationContext: ConversationContext;
12
+ transitionReason: string;
13
+ isModeled: boolean;
14
+ planFileExists: boolean;
15
+ /** Source of the instruction generation request - helps generators adapt output */
16
+ instructionSource: 'proceed_to_phase' | 'whats_next';
17
+ }
18
+ export interface GeneratedInstructions {
19
+ instructions: string;
20
+ planFileGuidance: string;
21
+ metadata: {
22
+ phase: string;
23
+ planFilePath: string;
24
+ transitionReason: string;
25
+ isModeled: boolean;
26
+ };
27
+ }
28
+ /**
29
+ * Interface for instruction generation operations
30
+ * All instruction generators must implement this interface
31
+ */
32
+ export interface IInstructionGenerator {
33
+ /**
34
+ * Set the state machine definition for dynamic instruction generation
35
+ */
36
+ setStateMachine(stateMachine: YamlStateMachine): void;
37
+ /**
38
+ * Generate comprehensive instructions for the LLM
39
+ */
40
+ generateInstructions(baseInstructions: string, context: InstructionContext): Promise<GeneratedInstructions>;
41
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Instruction Generator Interface
3
+ *
4
+ * Defines the contract for instruction generation functionality.
5
+ * Enables strategy pattern implementation for different task backends.
6
+ */
7
+ export {};
8
+ //# sourceMappingURL=instruction-generator.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instruction-generator.interface.js","sourceRoot":"","sources":["../../src/interfaces/instruction-generator.interface.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Plan Manager Interface
3
+ *
4
+ * Defines the contract for plan management functionality.
5
+ * Enables strategy pattern implementation for different task backends.
6
+ */
7
+ import type { YamlStateMachine } from '../state-machine-types.js';
8
+ import type { TaskBackendConfig } from '../task-backend.js';
9
+ export interface PlanFileInfo {
10
+ path: string;
11
+ exists: boolean;
12
+ content?: string;
13
+ }
14
+ /**
15
+ * Interface for plan management operations
16
+ * All plan managers must implement this interface
17
+ */
18
+ export interface IPlanManager {
19
+ /**
20
+ * Set the state machine definition for dynamic plan generation
21
+ */
22
+ setStateMachine(stateMachine: YamlStateMachine): void;
23
+ /**
24
+ * Set the task backend configuration
25
+ */
26
+ setTaskBackend(taskBackend: TaskBackendConfig): void;
27
+ /**
28
+ * Get plan file information
29
+ */
30
+ getPlanFileInfo(planFilePath: string): Promise<PlanFileInfo>;
31
+ /**
32
+ * Create initial plan file if it doesn't exist
33
+ */
34
+ ensurePlanFile(planFilePath: string, projectPath: string, gitBranch: string): Promise<void>;
35
+ /**
36
+ * Update plan file with new content
37
+ */
38
+ updatePlanFile(planFilePath: string, content: string): Promise<void>;
39
+ /**
40
+ * Get plan file content for LLM context
41
+ */
42
+ getPlanFileContent(planFilePath: string): Promise<string>;
43
+ /**
44
+ * Generate phase-specific plan file guidance based on state machine
45
+ */
46
+ generatePlanFileGuidance(phase: string): string;
47
+ /**
48
+ * Delete plan file
49
+ */
50
+ deletePlanFile(planFilePath: string): Promise<boolean>;
51
+ /**
52
+ * Ensure plan file is deleted (verify deletion)
53
+ */
54
+ ensurePlanFileDeleted(planFilePath: string): Promise<boolean>;
55
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Plan Manager Interface
3
+ *
4
+ * Defines the contract for plan management functionality.
5
+ * Enables strategy pattern implementation for different task backends.
6
+ */
7
+ export {};
8
+ //# sourceMappingURL=plan-manager.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan-manager.interface.js","sourceRoot":"","sources":["../../src/interfaces/plan-manager.interface.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Task Backend Client Interface
3
+ *
4
+ * Defines the contract for task backend operations (CLI commands, etc.).
5
+ * Enables clean abstraction of different task backends (beads, GitHub Issues, etc.).
6
+ */
7
+ /**
8
+ * Represents a task from the backend
9
+ */
10
+ export interface BackendTask {
11
+ id: string;
12
+ title: string;
13
+ status: 'open' | 'in_progress' | 'completed' | 'cancelled';
14
+ priority: number;
15
+ parent?: string;
16
+ children?: BackendTask[];
17
+ }
18
+ /**
19
+ * Result of task validation operations
20
+ */
21
+ export interface TaskValidationResult {
22
+ valid: boolean;
23
+ openTasks: BackendTask[];
24
+ message?: string;
25
+ }
26
+ /**
27
+ * Interface for task backend client operations
28
+ * All task backend clients must implement this interface
29
+ */
30
+ export interface ITaskBackendClient {
31
+ /**
32
+ * Check if the task backend is available and properly configured
33
+ */
34
+ isAvailable(): Promise<boolean>;
35
+ /**
36
+ * Get all open tasks for a given parent task
37
+ */
38
+ getOpenTasks(parentTaskId: string): Promise<BackendTask[]>;
39
+ /**
40
+ * Validate that all tasks under a parent are completed
41
+ * Returns validation result with details about any remaining open tasks
42
+ */
43
+ validateTasksCompleted(parentTaskId: string): Promise<TaskValidationResult>;
44
+ /**
45
+ * Create a new task under a parent
46
+ */
47
+ createTask(title: string, parentTaskId: string, priority?: number): Promise<string>;
48
+ /**
49
+ * Update task status
50
+ */
51
+ updateTaskStatus(taskId: string, status: 'open' | 'in_progress' | 'completed' | 'cancelled'): Promise<void>;
52
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Task Backend Client Interface
3
+ *
4
+ * Defines the contract for task backend operations (CLI commands, etc.).
5
+ * Enables clean abstraction of different task backends (beads, GitHub Issues, etc.).
6
+ */
7
+ export {};
8
+ //# sourceMappingURL=task-backend-client.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-backend-client.interface.js","sourceRoot":"","sources":["../../src/interfaces/task-backend-client.interface.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Logging utility for Vibe Feature MCP Server
3
+ *
4
+ * Provides structured logging with proper MCP compliance:
5
+ * - Uses stderr for all local logging (MCP requirement)
6
+ * - Supports MCP log message notifications to client
7
+ * - Provides structured logging with proper levels:
8
+ * - debug: Tracing and detailed execution flow
9
+ * - info: Success operations and important milestones
10
+ * - warn: Expected errors and recoverable issues
11
+ * - error: Caught but unexpected errors
12
+ */
13
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
14
+ export declare enum LogLevel {
15
+ DEBUG = 0,
16
+ INFO = 1,
17
+ WARN = 2,
18
+ ERROR = 3,
19
+ SILENT = 4
20
+ }
21
+ export interface LogContext {
22
+ component?: string;
23
+ conversationId?: string;
24
+ phase?: string;
25
+ operation?: string;
26
+ [key: string]: unknown;
27
+ }
28
+ /**
29
+ * Set the MCP server instance for log notifications
30
+ */
31
+ export declare function setMcpServerForLogging(server: McpServer): void;
32
+ /**
33
+ * Set the logging level from MCP client request
34
+ */
35
+ export declare function setMcpLoggingLevel(level: string): void;
36
+ declare class Logger {
37
+ private component;
38
+ private explicitLogLevel?;
39
+ constructor(component: string, logLevel?: LogLevel);
40
+ private getCurrentLogLevel;
41
+ private getLogLevelFromEnv;
42
+ private shouldLog;
43
+ private formatMessage;
44
+ /**
45
+ * Send log message to MCP client if server is available and level is appropriate
46
+ */
47
+ private sendMcpLogMessage;
48
+ debug(message: string, context?: LogContext): void;
49
+ info(message: string, context?: LogContext): void;
50
+ /**
51
+ * Send enhanced MCP notifications with better formatting for important events
52
+ */
53
+ private sendEnhancedMcpNotification;
54
+ /**
55
+ * Capitalize phase name for display
56
+ */
57
+ private capitalizePhase;
58
+ warn(message: string, context?: LogContext): void;
59
+ error(message: string, error?: Error, context?: LogContext): void;
60
+ child(childComponent: string): Logger;
61
+ }
62
+ export declare function createLogger(component: string, logLevel?: LogLevel): Logger;
63
+ export declare const logger: Logger;
64
+ export {};