@monoes/monomindcli 1.18.15 → 2.0.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 (511) hide show
  1. package/.claude/agents/core/researcher.md +29 -24
  2. package/.claude/agents/github/code-review-swarm.md +1 -1
  3. package/.claude/agents/github/github-modes.md +1 -1
  4. package/.claude/agents/github/issue-tracker.md +1 -3
  5. package/.claude/agents/github/multi-repo-swarm.md +1 -1
  6. package/.claude/agents/github/pr-manager.md +1 -3
  7. package/.claude/agents/github/project-board-sync.md +1 -1
  8. package/.claude/agents/github/release-manager.md +1 -1
  9. package/.claude/agents/github/repo-architect.md +4 -12
  10. package/.claude/agents/github/swarm-issue.md +1 -1
  11. package/.claude/agents/github/swarm-pr.md +1 -1
  12. package/.claude/agents/github/sync-coordinator.md +1 -1
  13. package/.claude/agents/github/workflow-automation.md +1 -1
  14. package/.claude/agents/goal/goal-planner.md +1 -2
  15. package/.claude/agents/specialized/specialized-workflow-architect.md +11 -14
  16. package/.claude/agents/testing/production-validator.md +8 -7
  17. package/.claude/agents/testing/testing-evidence-collector.md +3 -1
  18. package/.claude/commands/github/issue-tracker.md +0 -2
  19. package/.claude/commands/github/pr-manager.md +0 -2
  20. package/.claude/commands/github/repo-architect.md +3 -10
  21. package/.claude/commands/mastermind/code-review.md +4 -4
  22. package/.claude/commands/mastermind/help.md +5 -5
  23. package/.claude/commands/mastermind/okf-export.md +14 -0
  24. package/.claude/commands/mastermind/okf-import.md +15 -0
  25. package/.claude/commands/workflows/README.md +0 -1
  26. package/.claude/commands/workflows/workflow-create.md +0 -1
  27. package/.claude/commands/workflows/workflow-execute.md +1 -3
  28. package/.claude/commands/workflows/workflow-export.md +0 -2
  29. package/.claude/helpers/handlers/agent-start-handler.cjs +28 -36
  30. package/.claude/helpers/handlers/capture-handler.cjs +110 -0
  31. package/.claude/helpers/handlers/edit-handler.cjs +15 -0
  32. package/.claude/helpers/handlers/gates-handler.cjs +2 -8
  33. package/.claude/helpers/handlers/route-handler.cjs +314 -245
  34. package/.claude/helpers/handlers/session-handler.cjs +182 -163
  35. package/.claude/helpers/handlers/session-restore-handler.cjs +95 -53
  36. package/.claude/helpers/handlers/task-handler.cjs +17 -160
  37. package/.claude/helpers/hook-handler.cjs +153 -16
  38. package/.claude/helpers/intelligence.cjs +255 -15
  39. package/.claude/helpers/learning-service.mjs +1 -0
  40. package/.claude/helpers/mastermind-activate.cjs +33 -51
  41. package/.claude/helpers/monolean-activate.cjs +13 -3
  42. package/.claude/helpers/monolean-propagate.cjs +7 -3
  43. package/.claude/helpers/router.cjs +122 -11
  44. package/.claude/helpers/skill-registry.json +0 -189
  45. package/.claude/skills/github-toolkit/SKILL.md +60 -0
  46. package/.claude/skills/hive-mind-advanced/SKILL.md +0 -15
  47. package/.claude/skills/hooks-automation/SKILL.md +0 -1
  48. package/.claude/skills/mastermind-skills/_protocol.md +1 -1
  49. package/.claude/skills/mastermind-skills/architect.md +5 -6
  50. package/.claude/skills/mastermind-skills/autodev.md +8 -5
  51. package/.claude/skills/mastermind-skills/build.md +1 -2
  52. package/.claude/skills/mastermind-skills/review.md +8 -5
  53. package/.claude/skills/mastermind-skills/techport.md +37 -3
  54. package/.claude/skills/memory-toolkit/SKILL.md +75 -0
  55. package/.claude/skills/monodesign/document.md +9 -6
  56. package/.claude/skills/monodesign/extract.md +1 -1
  57. package/.claude/skills/monodesign/reference/document.md +1 -1
  58. package/.claude/skills/monodesign/reference/live.md +1 -1
  59. package/.claude/skills/monolean/SKILL.md +1 -1
  60. package/.claude/skills/specialagent/SKILL.md +2 -4
  61. package/.claude/skills/swarm-advanced/SKILL.md +0 -1
  62. package/README.md +2 -5
  63. package/bin/mcp-server.js +11 -1
  64. package/dist/src/autopilot-state.d.ts.map +1 -1
  65. package/dist/src/autopilot-state.js +4 -5
  66. package/dist/src/autopilot-state.js.map +1 -1
  67. package/dist/src/browser/dashboard/server.d.ts.map +1 -1
  68. package/dist/src/browser/dashboard/server.js +69 -1
  69. package/dist/src/browser/dashboard/server.js.map +1 -1
  70. package/dist/src/browser/dashboard/ui.html +214 -1764
  71. package/dist/src/capabilities/index.d.ts +0 -2
  72. package/dist/src/capabilities/index.d.ts.map +1 -1
  73. package/dist/src/capabilities/index.js +0 -1
  74. package/dist/src/capabilities/index.js.map +1 -1
  75. package/dist/src/commands/agent-lifecycle.d.ts.map +1 -1
  76. package/dist/src/commands/agent-lifecycle.js +2 -6
  77. package/dist/src/commands/agent-lifecycle.js.map +1 -1
  78. package/dist/src/commands/agent-ops.d.ts +1 -2
  79. package/dist/src/commands/agent-ops.d.ts.map +1 -1
  80. package/dist/src/commands/agent-ops.js +1 -59
  81. package/dist/src/commands/agent-ops.js.map +1 -1
  82. package/dist/src/commands/agent.d.ts.map +1 -1
  83. package/dist/src/commands/agent.js +2 -3
  84. package/dist/src/commands/agent.js.map +1 -1
  85. package/dist/src/commands/analyze-diff.js +1 -1
  86. package/dist/src/commands/analyze-diff.js.map +1 -1
  87. package/dist/src/commands/analyze.d.ts +0 -4
  88. package/dist/src/commands/analyze.d.ts.map +1 -1
  89. package/dist/src/commands/analyze.js +1 -29
  90. package/dist/src/commands/analyze.js.map +1 -1
  91. package/dist/src/commands/browse-action.d.ts.map +1 -1
  92. package/dist/src/commands/browse-action.js +94 -2
  93. package/dist/src/commands/browse-action.js.map +1 -1
  94. package/dist/src/commands/completions.d.ts.map +1 -1
  95. package/dist/src/commands/completions.js +12 -76
  96. package/dist/src/commands/completions.js.map +1 -1
  97. package/dist/src/commands/config.d.ts.map +1 -1
  98. package/dist/src/commands/config.js +0 -6
  99. package/dist/src/commands/config.js.map +1 -1
  100. package/dist/src/commands/doctor-project-checks.d.ts +13 -3
  101. package/dist/src/commands/doctor-project-checks.d.ts.map +1 -1
  102. package/dist/src/commands/doctor-project-checks.js +131 -23
  103. package/dist/src/commands/doctor-project-checks.js.map +1 -1
  104. package/dist/src/commands/doctor.d.ts.map +1 -1
  105. package/dist/src/commands/doctor.js +6 -5
  106. package/dist/src/commands/doctor.js.map +1 -1
  107. package/dist/src/commands/guidance.d.ts +5 -1
  108. package/dist/src/commands/guidance.d.ts.map +1 -1
  109. package/dist/src/commands/guidance.js +11 -556
  110. package/dist/src/commands/guidance.js.map +1 -1
  111. package/dist/src/commands/hive-mind-comms.d.ts.map +1 -1
  112. package/dist/src/commands/hive-mind-comms.js +11 -4
  113. package/dist/src/commands/hive-mind-comms.js.map +1 -1
  114. package/dist/src/commands/hive-mind-helpers.js +2 -2
  115. package/dist/src/commands/hive-mind-helpers.js.map +1 -1
  116. package/dist/src/commands/hive-mind-ops.d.ts +1 -3
  117. package/dist/src/commands/hive-mind-ops.d.ts.map +1 -1
  118. package/dist/src/commands/hive-mind-ops.js +2 -116
  119. package/dist/src/commands/hive-mind-ops.js.map +1 -1
  120. package/dist/src/commands/hive-mind.d.ts +4 -4
  121. package/dist/src/commands/hive-mind.d.ts.map +1 -1
  122. package/dist/src/commands/hive-mind.js +11 -11
  123. package/dist/src/commands/hive-mind.js.map +1 -1
  124. package/dist/src/commands/hooks-coverage-commands.d.ts.map +1 -1
  125. package/dist/src/commands/hooks-coverage-commands.js +8 -7
  126. package/dist/src/commands/hooks-coverage-commands.js.map +1 -1
  127. package/dist/src/commands/hooks-coverage-gaps.js +1 -1
  128. package/dist/src/commands/hooks-coverage-gaps.js.map +1 -1
  129. package/dist/src/commands/hooks-coverage-routing.js +2 -2
  130. package/dist/src/commands/hooks-coverage-routing.js.map +1 -1
  131. package/dist/src/commands/hooks-extended-commands.d.ts +0 -3
  132. package/dist/src/commands/hooks-extended-commands.d.ts.map +1 -1
  133. package/dist/src/commands/hooks-extended-commands.js +0 -307
  134. package/dist/src/commands/hooks-extended-commands.js.map +1 -1
  135. package/dist/src/commands/hooks-formatting.d.ts +1 -5
  136. package/dist/src/commands/hooks-formatting.d.ts.map +1 -1
  137. package/dist/src/commands/hooks-formatting.js +1 -18
  138. package/dist/src/commands/hooks-formatting.js.map +1 -1
  139. package/dist/src/commands/hooks-workers.d.ts +1 -1
  140. package/dist/src/commands/hooks-workers.d.ts.map +1 -1
  141. package/dist/src/commands/hooks-workers.js +82 -330
  142. package/dist/src/commands/hooks-workers.js.map +1 -1
  143. package/dist/src/commands/hooks.d.ts.map +1 -1
  144. package/dist/src/commands/hooks.js +1 -12
  145. package/dist/src/commands/hooks.js.map +1 -1
  146. package/dist/src/commands/index.d.ts +2 -55
  147. package/dist/src/commands/index.d.ts.map +1 -1
  148. package/dist/src/commands/index.js +23 -216
  149. package/dist/src/commands/index.js.map +1 -1
  150. package/dist/src/commands/init-wizard.d.ts.map +1 -1
  151. package/dist/src/commands/init-wizard.js +3 -5
  152. package/dist/src/commands/init-wizard.js.map +1 -1
  153. package/dist/src/commands/init.d.ts.map +1 -1
  154. package/dist/src/commands/init.js +4 -24
  155. package/dist/src/commands/init.js.map +1 -1
  156. package/dist/src/commands/mcp.d.ts.map +1 -1
  157. package/dist/src/commands/mcp.js +32 -4
  158. package/dist/src/commands/mcp.js.map +1 -1
  159. package/dist/src/commands/memory-admin.d.ts +1 -2
  160. package/dist/src/commands/memory-admin.d.ts.map +1 -1
  161. package/dist/src/commands/memory-admin.js +1 -118
  162. package/dist/src/commands/memory-admin.js.map +1 -1
  163. package/dist/src/commands/memory-transfer.d.ts +1 -2
  164. package/dist/src/commands/memory-transfer.d.ts.map +1 -1
  165. package/dist/src/commands/memory-transfer.js +5 -171
  166. package/dist/src/commands/memory-transfer.js.map +1 -1
  167. package/dist/src/commands/memory.d.ts.map +1 -1
  168. package/dist/src/commands/memory.js +3 -6
  169. package/dist/src/commands/memory.js.map +1 -1
  170. package/dist/src/commands/neural-core.d.ts +3 -1
  171. package/dist/src/commands/neural-core.d.ts.map +1 -1
  172. package/dist/src/commands/neural-core.js +154 -15
  173. package/dist/src/commands/neural-core.js.map +1 -1
  174. package/dist/src/commands/neural-optimize.d.ts.map +1 -1
  175. package/dist/src/commands/neural-optimize.js +13 -15
  176. package/dist/src/commands/neural-optimize.js.map +1 -1
  177. package/dist/src/commands/neural-registry.d.ts +1 -1
  178. package/dist/src/commands/neural-registry.js +14 -14
  179. package/dist/src/commands/neural-registry.js.map +1 -1
  180. package/dist/src/commands/neural.d.ts +1 -1
  181. package/dist/src/commands/neural.js +6 -6
  182. package/dist/src/commands/neural.js.map +1 -1
  183. package/dist/src/commands/performance.d.ts.map +1 -1
  184. package/dist/src/commands/performance.js +68 -58
  185. package/dist/src/commands/performance.js.map +1 -1
  186. package/dist/src/commands/providers.d.ts.map +1 -1
  187. package/dist/src/commands/providers.js +77 -117
  188. package/dist/src/commands/providers.js.map +1 -1
  189. package/dist/src/commands/search-universal.d.ts +7 -1
  190. package/dist/src/commands/search-universal.d.ts.map +1 -1
  191. package/dist/src/commands/search-universal.js +59 -5
  192. package/dist/src/commands/search-universal.js.map +1 -1
  193. package/dist/src/commands/security-cve.d.ts.map +1 -1
  194. package/dist/src/commands/security-cve.js +3 -5
  195. package/dist/src/commands/security-cve.js.map +1 -1
  196. package/dist/src/commands/security-misc.d.ts +0 -1
  197. package/dist/src/commands/security-misc.d.ts.map +1 -1
  198. package/dist/src/commands/security-misc.js +69 -45
  199. package/dist/src/commands/security-misc.js.map +1 -1
  200. package/dist/src/commands/security.d.ts.map +1 -1
  201. package/dist/src/commands/security.js +2 -4
  202. package/dist/src/commands/security.js.map +1 -1
  203. package/dist/src/commands/session.d.ts.map +1 -1
  204. package/dist/src/commands/session.js +137 -281
  205. package/dist/src/commands/session.js.map +1 -1
  206. package/dist/src/commands/start.d.ts.map +1 -1
  207. package/dist/src/commands/start.js +2 -59
  208. package/dist/src/commands/start.js.map +1 -1
  209. package/dist/src/commands/status.d.ts.map +1 -1
  210. package/dist/src/commands/status.js +18 -29
  211. package/dist/src/commands/status.js.map +1 -1
  212. package/dist/src/commands/swarm.d.ts.map +1 -1
  213. package/dist/src/commands/swarm.js +113 -66
  214. package/dist/src/commands/swarm.js.map +1 -1
  215. package/dist/src/commands/task.d.ts.map +1 -1
  216. package/dist/src/commands/task.js +2 -49
  217. package/dist/src/commands/task.js.map +1 -1
  218. package/dist/src/consensus/audit-writer.d.ts.map +1 -1
  219. package/dist/src/consensus/audit-writer.js +43 -1
  220. package/dist/src/consensus/audit-writer.js.map +1 -1
  221. package/dist/src/consensus/tally.d.ts +19 -0
  222. package/dist/src/consensus/tally.d.ts.map +1 -0
  223. package/dist/src/consensus/tally.js +34 -0
  224. package/dist/src/consensus/tally.js.map +1 -0
  225. package/dist/src/index.d.ts +3 -2
  226. package/dist/src/index.d.ts.map +1 -1
  227. package/dist/src/index.js +13 -9
  228. package/dist/src/index.js.map +1 -1
  229. package/dist/src/init/claudemd-generator.d.ts.map +1 -1
  230. package/dist/src/init/claudemd-generator.js +10 -14
  231. package/dist/src/init/claudemd-generator.js.map +1 -1
  232. package/dist/src/init/executor.d.ts.map +1 -1
  233. package/dist/src/init/executor.js +42 -100
  234. package/dist/src/init/executor.js.map +1 -1
  235. package/dist/src/init/helpers-generator.d.ts.map +1 -1
  236. package/dist/src/init/helpers-generator.js +2 -22
  237. package/dist/src/init/helpers-generator.js.map +1 -1
  238. package/dist/src/init/settings-generator.d.ts.map +1 -1
  239. package/dist/src/init/settings-generator.js +0 -13
  240. package/dist/src/init/settings-generator.js.map +1 -1
  241. package/dist/src/init/statusline-generator.d.ts.map +1 -1
  242. package/dist/src/init/statusline-generator.js +62 -0
  243. package/dist/src/init/statusline-generator.js.map +1 -1
  244. package/dist/src/init/types.d.ts +3 -9
  245. package/dist/src/init/types.d.ts.map +1 -1
  246. package/dist/src/init/types.js +0 -5
  247. package/dist/src/init/types.js.map +1 -1
  248. package/dist/src/knowledge/document-pipeline.d.ts.map +1 -1
  249. package/dist/src/knowledge/document-pipeline.js +18 -8
  250. package/dist/src/knowledge/document-pipeline.js.map +1 -1
  251. package/dist/src/mcp-client.d.ts.map +1 -1
  252. package/dist/src/mcp-client.js +0 -8
  253. package/dist/src/mcp-client.js.map +1 -1
  254. package/dist/src/mcp-server.d.ts.map +1 -1
  255. package/dist/src/mcp-server.js +14 -0
  256. package/dist/src/mcp-server.js.map +1 -1
  257. package/dist/src/mcp-tools/agent-tools.d.ts.map +1 -1
  258. package/dist/src/mcp-tools/agent-tools.js +0 -17
  259. package/dist/src/mcp-tools/agent-tools.js.map +1 -1
  260. package/dist/src/mcp-tools/coherence/causal-infer.d.ts +5 -5
  261. package/dist/src/mcp-tools/coherence/causal-infer.d.ts.map +1 -1
  262. package/dist/src/mcp-tools/coherence/causal-infer.js +32 -46
  263. package/dist/src/mcp-tools/coherence/causal-infer.js.map +1 -1
  264. package/dist/src/mcp-tools/coherence/coherence-check.d.ts.map +1 -1
  265. package/dist/src/mcp-tools/coherence/coherence-check.js +1 -19
  266. package/dist/src/mcp-tools/coherence/coherence-check.js.map +1 -1
  267. package/dist/src/mcp-tools/coherence/consensus-verify.d.ts +2 -3
  268. package/dist/src/mcp-tools/coherence/consensus-verify.d.ts.map +1 -1
  269. package/dist/src/mcp-tools/coherence/consensus-verify.js +22 -20
  270. package/dist/src/mcp-tools/coherence/consensus-verify.js.map +1 -1
  271. package/dist/src/mcp-tools/coherence/memory-gate.d.ts +3 -2
  272. package/dist/src/mcp-tools/coherence/memory-gate.d.ts.map +1 -1
  273. package/dist/src/mcp-tools/coherence/memory-gate.js +32 -19
  274. package/dist/src/mcp-tools/coherence/memory-gate.js.map +1 -1
  275. package/dist/src/mcp-tools/coherence/quantum-topology.d.ts +4 -4
  276. package/dist/src/mcp-tools/coherence/quantum-topology.d.ts.map +1 -1
  277. package/dist/src/mcp-tools/coherence/quantum-topology.js +11 -17
  278. package/dist/src/mcp-tools/coherence/quantum-topology.js.map +1 -1
  279. package/dist/src/mcp-tools/coherence/spectral-analyze.d.ts +2 -3
  280. package/dist/src/mcp-tools/coherence/spectral-analyze.d.ts.map +1 -1
  281. package/dist/src/mcp-tools/coherence/spectral-analyze.js +51 -32
  282. package/dist/src/mcp-tools/coherence/spectral-analyze.js.map +1 -1
  283. package/dist/src/mcp-tools/coherence/types.d.ts +8 -11
  284. package/dist/src/mcp-tools/coherence/types.d.ts.map +1 -1
  285. package/dist/src/mcp-tools/coherence/types.js +3 -18
  286. package/dist/src/mcp-tools/coherence/types.js.map +1 -1
  287. package/dist/src/mcp-tools/embeddings-tools.d.ts.map +1 -1
  288. package/dist/src/mcp-tools/embeddings-tools.js +1 -7
  289. package/dist/src/mcp-tools/embeddings-tools.js.map +1 -1
  290. package/dist/src/mcp-tools/graphify-tools.js +2 -2
  291. package/dist/src/mcp-tools/graphify-tools.js.map +1 -1
  292. package/dist/src/mcp-tools/guidance-tools.d.ts.map +1 -1
  293. package/dist/src/mcp-tools/guidance-tools.js +9 -19
  294. package/dist/src/mcp-tools/guidance-tools.js.map +1 -1
  295. package/dist/src/mcp-tools/hive-mind-tools.d.ts +8 -1
  296. package/dist/src/mcp-tools/hive-mind-tools.d.ts.map +1 -1
  297. package/dist/src/mcp-tools/hive-mind-tools.js +198 -40
  298. package/dist/src/mcp-tools/hive-mind-tools.js.map +1 -1
  299. package/dist/src/mcp-tools/hooks-advanced.d.ts +18 -0
  300. package/dist/src/mcp-tools/hooks-advanced.d.ts.map +1 -0
  301. package/dist/src/mcp-tools/hooks-advanced.js +25 -0
  302. package/dist/src/mcp-tools/hooks-advanced.js.map +1 -0
  303. package/dist/src/mcp-tools/hooks-intelligence.d.ts +4 -8
  304. package/dist/src/mcp-tools/hooks-intelligence.d.ts.map +1 -1
  305. package/dist/src/mcp-tools/hooks-intelligence.js +33 -482
  306. package/dist/src/mcp-tools/hooks-intelligence.js.map +1 -1
  307. package/dist/src/mcp-tools/hooks-routing.d.ts +1 -3
  308. package/dist/src/mcp-tools/hooks-routing.d.ts.map +1 -1
  309. package/dist/src/mcp-tools/hooks-routing.js +96 -202
  310. package/dist/src/mcp-tools/hooks-routing.js.map +1 -1
  311. package/dist/src/mcp-tools/hooks-synthesis.d.ts +31 -0
  312. package/dist/src/mcp-tools/hooks-synthesis.d.ts.map +1 -0
  313. package/dist/src/mcp-tools/hooks-synthesis.js +196 -0
  314. package/dist/src/mcp-tools/hooks-synthesis.js.map +1 -0
  315. package/dist/src/mcp-tools/hooks-tools.d.ts.map +1 -1
  316. package/dist/src/mcp-tools/hooks-tools.js +10 -11
  317. package/dist/src/mcp-tools/hooks-tools.js.map +1 -1
  318. package/dist/src/mcp-tools/index.d.ts +0 -3
  319. package/dist/src/mcp-tools/index.d.ts.map +1 -1
  320. package/dist/src/mcp-tools/index.js +0 -4
  321. package/dist/src/mcp-tools/index.js.map +1 -1
  322. package/dist/src/mcp-tools/memory-tools.d.ts.map +1 -1
  323. package/dist/src/mcp-tools/memory-tools.js +24 -9
  324. package/dist/src/mcp-tools/memory-tools.js.map +1 -1
  325. package/dist/src/mcp-tools/monograph-tools.d.ts +6 -0
  326. package/dist/src/mcp-tools/monograph-tools.d.ts.map +1 -1
  327. package/dist/src/mcp-tools/monograph-tools.js +370 -95
  328. package/dist/src/mcp-tools/monograph-tools.js.map +1 -1
  329. package/dist/src/mcp-tools/neural-tools.d.ts +8 -9
  330. package/dist/src/mcp-tools/neural-tools.d.ts.map +1 -1
  331. package/dist/src/mcp-tools/neural-tools.js +249 -539
  332. package/dist/src/mcp-tools/neural-tools.js.map +1 -1
  333. package/dist/src/mcp-tools/performance-tools.d.ts.map +1 -1
  334. package/dist/src/mcp-tools/performance-tools.js +5 -17
  335. package/dist/src/mcp-tools/performance-tools.js.map +1 -1
  336. package/dist/src/mcp-tools/quality/coverage-analysis/prioritize-gaps.js +2 -2
  337. package/dist/src/mcp-tools/quality/coverage-analysis/prioritize-gaps.js.map +1 -1
  338. package/dist/src/mcp-tools/quality/security-compliance/detect-secrets.d.ts +4 -4
  339. package/dist/src/mcp-tools/quality-tools.d.ts +7 -2
  340. package/dist/src/mcp-tools/quality-tools.d.ts.map +1 -1
  341. package/dist/src/mcp-tools/quality-tools.js +7 -257
  342. package/dist/src/mcp-tools/quality-tools.js.map +1 -1
  343. package/dist/src/mcp-tools/security-tools.d.ts.map +1 -1
  344. package/dist/src/mcp-tools/security-tools.js +103 -0
  345. package/dist/src/mcp-tools/security-tools.js.map +1 -1
  346. package/dist/src/memory/intelligence.d.ts +9 -9
  347. package/dist/src/memory/intelligence.d.ts.map +1 -1
  348. package/dist/src/memory/intelligence.js +71 -59
  349. package/dist/src/memory/intelligence.js.map +1 -1
  350. package/dist/src/memory/memory-bridge.d.ts +1 -0
  351. package/dist/src/memory/memory-bridge.d.ts.map +1 -1
  352. package/dist/src/memory/memory-bridge.js +47 -5
  353. package/dist/src/memory/memory-bridge.js.map +1 -1
  354. package/dist/src/memory/memory-read.d.ts.map +1 -1
  355. package/dist/src/memory/memory-read.js +1 -19
  356. package/dist/src/memory/memory-read.js.map +1 -1
  357. package/dist/src/suggest.d.ts.map +1 -1
  358. package/dist/src/suggest.js +1 -12
  359. package/dist/src/suggest.js.map +1 -1
  360. package/dist/src/transfer/store/discovery.d.ts +3 -2
  361. package/dist/src/transfer/store/discovery.d.ts.map +1 -1
  362. package/dist/src/transfer/store/discovery.js +22 -70
  363. package/dist/src/transfer/store/discovery.js.map +1 -1
  364. package/dist/src/update/checker.d.ts.map +1 -1
  365. package/dist/src/update/checker.js +0 -1
  366. package/dist/src/update/checker.js.map +1 -1
  367. package/dist/src/utils/cosine-similarity.d.ts +22 -0
  368. package/dist/src/utils/cosine-similarity.d.ts.map +1 -0
  369. package/dist/src/utils/cosine-similarity.js +38 -0
  370. package/dist/src/utils/cosine-similarity.js.map +1 -0
  371. package/dist/src/utils/input-guards.d.ts +51 -0
  372. package/dist/src/utils/input-guards.d.ts.map +1 -0
  373. package/dist/src/utils/input-guards.js +223 -0
  374. package/dist/src/utils/input-guards.js.map +1 -0
  375. package/dist/src/utils/json-file.d.ts +33 -0
  376. package/dist/src/utils/json-file.d.ts.map +1 -0
  377. package/dist/src/utils/json-file.js +57 -0
  378. package/dist/src/utils/json-file.js.map +1 -0
  379. package/dist/tsconfig.tsbuildinfo +1 -1
  380. package/package.json +9 -6
  381. package/scripts/sync-claude-assets.sh +16 -20
  382. package/.claude/agents/generated/case-analyst.md +0 -50
  383. package/.claude/agents/generated/channel-intelligence-director.md +0 -87
  384. package/.claude/agents/generated/chief-growth-officer.md +0 -88
  385. package/.claude/agents/generated/churn-analyst.md +0 -53
  386. package/.claude/agents/generated/code-reviewer.md +0 -55
  387. package/.claude/agents/generated/code-validator.md +0 -57
  388. package/.claude/agents/generated/complexity-scanner.md +0 -56
  389. package/.claude/agents/generated/content-seo-strategist.md +0 -90
  390. package/.claude/agents/generated/copy-editor.md +0 -45
  391. package/.claude/agents/generated/court-reporter.md +0 -50
  392. package/.claude/agents/generated/defender.md +0 -51
  393. package/.claude/agents/generated/devbot-orchestrator.md +0 -58
  394. package/.claude/agents/generated/devbot-planner.md +0 -63
  395. package/.claude/agents/generated/developer-community-strategist.md +0 -91
  396. package/.claude/agents/generated/editor-in-chief.md +0 -45
  397. package/.claude/agents/generated/fact-checker.md +0 -45
  398. package/.claude/agents/generated/impact-assessor.md +0 -54
  399. package/.claude/agents/generated/judge.md +0 -51
  400. package/.claude/agents/generated/outreach-partnership-strategist.md +0 -90
  401. package/.claude/agents/generated/prosecutor.md +0 -51
  402. package/.claude/agents/generated/reporter.md +0 -45
  403. package/.claude/agents/generated/social-media-strategist.md +0 -91
  404. package/.claude/agents/generated/video-visual-strategist.md +0 -90
  405. package/.claude/agents/reengineer-squad/boss.md +0 -113
  406. package/.claude/agents/reengineer-squad/critic-architect.md +0 -132
  407. package/.claude/agents/reengineer-squad/git-manager.md +0 -145
  408. package/.claude/agents/reengineer-squad/idea-generator.md +0 -95
  409. package/.claude/agents/reengineer-squad/implementer.md +0 -112
  410. package/.claude/agents/reengineer-squad/integration-planner.md +0 -112
  411. package/.claude/agents/reengineer-squad/source-analyst.md +0 -103
  412. package/.claude/agents/reengineer-squad/target-analyst.md +0 -118
  413. package/.claude/agents/reengineer-squad/tester.md +0 -105
  414. package/.claude/agents/sparc/architecture.md +0 -453
  415. package/.claude/agents/sparc/pseudocode.md +0 -299
  416. package/.claude/agents/sparc/refinement.md +0 -504
  417. package/.claude/agents/sparc/specification.md +0 -258
  418. package/.claude/agents/templates/implementer-sparc-coder.md +0 -231
  419. package/.claude/commands/sparc/analyzer.md +0 -35
  420. package/.claude/commands/sparc/architect.md +0 -36
  421. package/.claude/commands/sparc/ask.md +0 -56
  422. package/.claude/commands/sparc/batch-executor.md +0 -37
  423. package/.claude/commands/sparc/code.md +0 -48
  424. package/.claude/commands/sparc/coder.md +0 -37
  425. package/.claude/commands/sparc/debug.md +0 -42
  426. package/.claude/commands/sparc/debugger.md +0 -37
  427. package/.claude/commands/sparc/designer.md +0 -36
  428. package/.claude/commands/sparc/devops.md +0 -68
  429. package/.claude/commands/sparc/docs-writer.md +0 -39
  430. package/.claude/commands/sparc/documenter.md +0 -37
  431. package/.claude/commands/sparc/innovator.md +0 -37
  432. package/.claude/commands/sparc/integration.md +0 -42
  433. package/.claude/commands/sparc/mcp.md +0 -76
  434. package/.claude/commands/sparc/memory-manager.md +0 -57
  435. package/.claude/commands/sparc/optimizer.md +0 -37
  436. package/.claude/commands/sparc/orchestrator.md +0 -70
  437. package/.claude/commands/sparc/post-deployment-monitoring-mode.md +0 -42
  438. package/.claude/commands/sparc/refinement-optimization-mode.md +0 -42
  439. package/.claude/commands/sparc/researcher.md +0 -37
  440. package/.claude/commands/sparc/reviewer.md +0 -37
  441. package/.claude/commands/sparc/security-review.md +0 -39
  442. package/.claude/commands/sparc/sparc-modes.md +0 -120
  443. package/.claude/commands/sparc/sparc.md +0 -71
  444. package/.claude/commands/sparc/spec-pseudocode.md +0 -39
  445. package/.claude/commands/sparc/supabase-admin.md +0 -301
  446. package/.claude/commands/sparc/swarm-coordinator.md +0 -50
  447. package/.claude/commands/sparc/tdd.md +0 -37
  448. package/.claude/commands/sparc/tester.md +0 -37
  449. package/.claude/commands/sparc/tutorial.md +0 -38
  450. package/.claude/commands/sparc/workflow-manager.md +0 -37
  451. package/.claude/commands/sparc.md +0 -112
  452. package/.claude/helpers/auto-memory-hook.mjs +0 -503
  453. package/.claude/skills/sparc-methodology/SKILL.md +0 -950
  454. package/dist/src/capabilities/enrichment.d.ts +0 -44
  455. package/dist/src/capabilities/enrichment.d.ts.map +0 -1
  456. package/dist/src/capabilities/enrichment.js +0 -141
  457. package/dist/src/capabilities/enrichment.js.map +0 -1
  458. package/dist/src/commands/analyze-boundaries.d.ts +0 -14
  459. package/dist/src/commands/analyze-boundaries.d.ts.map +0 -1
  460. package/dist/src/commands/analyze-boundaries.js +0 -295
  461. package/dist/src/commands/analyze-boundaries.js.map +0 -1
  462. package/dist/src/commands/analyze-graph.d.ts +0 -14
  463. package/dist/src/commands/analyze-graph.d.ts.map +0 -1
  464. package/dist/src/commands/analyze-graph.js +0 -304
  465. package/dist/src/commands/analyze-graph.js.map +0 -1
  466. package/dist/src/commands/claims.d.ts +0 -10
  467. package/dist/src/commands/claims.d.ts.map +0 -1
  468. package/dist/src/commands/claims.js +0 -650
  469. package/dist/src/commands/claims.js.map +0 -1
  470. package/dist/src/commands/daemon.d.ts +0 -8
  471. package/dist/src/commands/daemon.d.ts.map +0 -1
  472. package/dist/src/commands/daemon.js +0 -681
  473. package/dist/src/commands/daemon.js.map +0 -1
  474. package/dist/src/commands/deployment.d.ts +0 -10
  475. package/dist/src/commands/deployment.d.ts.map +0 -1
  476. package/dist/src/commands/deployment.js +0 -706
  477. package/dist/src/commands/deployment.js.map +0 -1
  478. package/dist/src/commands/enrich.d.ts +0 -10
  479. package/dist/src/commands/enrich.d.ts.map +0 -1
  480. package/dist/src/commands/enrich.js +0 -58
  481. package/dist/src/commands/enrich.js.map +0 -1
  482. package/dist/src/commands/issues.d.ts +0 -21
  483. package/dist/src/commands/issues.d.ts.map +0 -1
  484. package/dist/src/commands/issues.js +0 -575
  485. package/dist/src/commands/issues.js.map +0 -1
  486. package/dist/src/commands/workflow.d.ts +0 -8
  487. package/dist/src/commands/workflow.d.ts.map +0 -1
  488. package/dist/src/commands/workflow.js +0 -677
  489. package/dist/src/commands/workflow.js.map +0 -1
  490. package/dist/src/mcp-tools/workflow-tools.d.ts +0 -8
  491. package/dist/src/mcp-tools/workflow-tools.d.ts.map +0 -1
  492. package/dist/src/mcp-tools/workflow-tools.js +0 -717
  493. package/dist/src/mcp-tools/workflow-tools.js.map +0 -1
  494. package/dist/src/services/claim-service.d.ts +0 -198
  495. package/dist/src/services/claim-service.d.ts.map +0 -1
  496. package/dist/src/services/claim-service.js +0 -890
  497. package/dist/src/services/claim-service.js.map +0 -1
  498. package/dist/src/services/headless-worker-executor.d.ts +0 -311
  499. package/dist/src/services/headless-worker-executor.d.ts.map +0 -1
  500. package/dist/src/services/headless-worker-executor.js +0 -1183
  501. package/dist/src/services/headless-worker-executor.js.map +0 -1
  502. package/dist/src/services/worker-daemon.d.ts +0 -248
  503. package/dist/src/services/worker-daemon.d.ts.map +0 -1
  504. package/dist/src/services/worker-daemon.js +0 -1417
  505. package/dist/src/services/worker-daemon.js.map +0 -1
  506. package/dist/src/ui/.monomind/capture/active-run.json +0 -1
  507. package/dist/src/ui/.monomind/orgs/system-trial-qa/runs/real-events-1782290897.convs.jsonl +0 -3
  508. package/dist/src/ui/.monomind/orgs/system-trial-qa/runs/real-events-1782290897.jsonl +0 -11
  509. package/dist/src/ui/.monomind/orgs/system-trial-qa/runs/rigid-qa-restart-1782288201.jsonl +0 -540
  510. package/dist/src/ui/.monomind/orgs/system-trial-qa-threads.jsonl +0 -3
  511. package/dist/src/ui/.monomind/orgs/test-event-fix/runs/rigid-qa-restart-1782288201.jsonl +0 -2
@@ -1,145 +0,0 @@
1
- ---
2
- name: git-manager
3
- description: Handles all git operations for the reengineer-squad — creates port/* branches per module, commits each tested task card with conventional commit messages, updates state file after each merge, never commits to main
4
- capability:
5
- role: git-manager
6
- goal: Maintain a clean, traceable git history for all ported modules — one branch per module, commits tied to task cards, state file updated atomically with each merge
7
- version: "1.0.0"
8
- expertise:
9
- - git branch management and naming conventions
10
- - conventional commit message authoring
11
- - worktree-safe operations
12
- - merge conflict detection and escalation
13
- - state file update atomicity
14
- - branch hygiene (no orphaned branches, no direct commits to main)
15
- task_types:
16
- - branch-creation
17
- - task-card-commit
18
- - branch-merge
19
- - state-file-update
20
- - branch-cleanup
21
- input_type: Tester's PASS verdict + implemented files; task card metadata; state file path
22
- output_type: Committed and merged git branch; updated portedModules in state file
23
- model_preference: haiku
24
- termination: Branch merged; state file updated; branch deleted
25
- ---
26
-
27
- # Git Manager
28
-
29
- You are the **Git Manager** of the reengineer-squad. You own all git operations. Every other role reads and writes files — you commit them. A feature isn't done until it's in version control with a clean commit history.
30
-
31
- ## Authority and Constraints
32
-
33
- - You operate **only after a Tester PASS verdict**. Never commit unvalidated code.
34
- - **Never commit to `main`** — all work goes to `port/<module-slug>` branches
35
- - Never force-push. Never amend published commits.
36
- - If you encounter a conflict you cannot auto-resolve, STOP and escalate to the Orchestrator
37
-
38
- ## Branch Naming Convention
39
-
40
- ```
41
- port/<module-slug>
42
- ```
43
-
44
- Examples:
45
- - `port/event-bus`
46
- - `port/plugin-loader`
47
- - `port/config-parser`
48
-
49
- Slugs must be lowercase, hyphen-separated, matching the module name from the inventory.
50
-
51
- ## Commit Message Convention
52
-
53
- Use conventional commit format:
54
-
55
- ```
56
- feat(port): <description> (from <source-module>)
57
- ```
58
-
59
- Examples:
60
- ```
61
- feat(port): add EventBus with typed subscribers (from upstream/event-system)
62
- feat(port): add PluginLoader with lazy resolution (from upstream/plugins)
63
- test(port): add EventBus behavioral contract tests
64
- ```
65
-
66
- For test files, use `test(port):` prefix.
67
- For fixes during re-verification, use `fix(port):`.
68
-
69
- ## Workflow Per Task Card
70
-
71
- ### 1. Ensure Branch Exists
72
- ```bash
73
- git checkout -b port/<module-slug> 2>/dev/null || git checkout port/<module-slug>
74
- ```
75
-
76
- If the branch already exists from a previous cycle iteration, check it out and verify it's based on main:
77
- ```bash
78
- git merge-base --is-ancestor main port/<module-slug> || echo "WARNING: branch diverged from main"
79
- ```
80
-
81
- ### 2. Stage the Task Card Files
82
- Stage only the files listed in the task card's `filesToCreate` and `filesToModify`:
83
- ```bash
84
- git add <file1> <file2> ...
85
- ```
86
-
87
- Do not use `git add .` — stage explicitly to avoid committing unrelated changes.
88
-
89
- ### 3. Commit with Conventional Message
90
- ```bash
91
- git commit -m "feat(port): <description> (from <source-module>)"
92
- ```
93
-
94
- If the task card includes test files, commit them in the same commit.
95
-
96
- ### 4. Merge to Main
97
- ```bash
98
- git checkout main
99
- git merge --no-ff port/<module-slug> -m "feat(port): merge <module-slug> port"
100
- ```
101
-
102
- Use `--no-ff` to preserve branch history in the merge commit.
103
-
104
- If merge fails: **escalate to Orchestrator immediately** with the conflict details.
105
-
106
- ### 5. Update State File
107
- After a successful merge, update `.monomind/orgs/reengineer-squad-state.json`:
108
- - Add to `portedModules`: `{ "name": "<module-slug>", "branch": "port/<module-slug>", "commit": "<merge commit SHA>" }`
109
- - Remove from `openTaskCards` if present
110
-
111
- ```bash
112
- git rev-parse HEAD # get merge commit SHA for state file
113
- ```
114
-
115
- ### 6. Branch Cleanup (Optional)
116
- After confirmed merge:
117
- ```bash
118
- git branch -d port/<module-slug>
119
- ```
120
-
121
- ## State File Update
122
-
123
- Read the current state file, update it atomically:
124
- ```json
125
- {
126
- "portedModules": [
127
- {
128
- "name": "module-slug",
129
- "branch": "port/module-slug",
130
- "commit": "abc123def456",
131
- "mergedAt": "ISO timestamp"
132
- }
133
- ]
134
- }
135
- ```
136
-
137
- ## On Escalation
138
-
139
- If any of these occur, STOP and report to Orchestrator:
140
- - Merge conflict that cannot be auto-resolved
141
- - Pre-commit hook failure
142
- - Branch has unexpected commits from unknown sources
143
- - State file cannot be updated (permission error, parse error)
144
-
145
- Never skip hooks or force through a broken state.
@@ -1,95 +0,0 @@
1
- ---
2
- name: idea-generator
3
- description: Runs in parallel with the Critic Architect — looks at source functionality and asks "if we designed this from scratch today, what would we build?" Surfaces novel combinations, simplifications, and alternative approaches
4
- capability:
5
- role: idea-generator
6
- goal: For each candidate module from the source project, surface at least one genuinely better or more novel approach — not just "port it cleaner" but "what if we thought about this differently?"
7
- version: "1.0.0"
8
- expertise:
9
- - first-principles design thinking
10
- - API ergonomics and developer experience
11
- - modern TypeScript/JavaScript patterns
12
- - functional programming alternatives to OOP patterns
13
- - simplification through abstraction removal
14
- - ecosystem-aware design (what libraries exist that render reimplementation unnecessary?)
15
- - composability and extensibility patterns
16
- task_types:
17
- - alternative-design-proposal
18
- - simplification-analysis
19
- - composability-improvement
20
- - ecosystem-audit
21
- - innovation-synthesis
22
- input_type: Source Analyst's module-inventory.json + novelty-flags.md; high-level description of each module's purpose
23
- output_type: innovation-proposals.md delivered to Critic Architect for consideration
24
- model_preference: opus
25
- termination: Innovation proposals written for all modules in the current batch; delivered to Critic
26
- ---
27
-
28
- # Idea Generator
29
-
30
- You are the **Idea Generator** of the reengineer-squad — the squad's creative counterpoint to the Critic Architect's rigor. You run in parallel with the Critic and feed your proposals into their evaluation.
31
-
32
- ## Your Role
33
-
34
- Your job is NOT to rubber-stamp adoption or propose incremental polish. You ask the harder question: **if we were designing this functionality from scratch today, what would we build?**
35
-
36
- Sometimes the answer is "basically what the source has, but cleaner." More often there's a better abstraction, a simpler API, or a library that renders the whole module unnecessary.
37
-
38
- ## Analysis Approach
39
-
40
- For each module in the current batch:
41
-
42
- ### 1. Understand the Core Problem
43
- Strip away the source's implementation choices. What user problem does this solve in one sentence? What is the simplest possible contract that would solve it?
44
-
45
- ### 2. Question the Abstraction Layer
46
- - Is the source's abstraction at the right level, or does it over-engineer a simple concept?
47
- - Could this be a 10-line utility instead of a 200-line class hierarchy?
48
- - Is there a functional alternative to an OOP design that would be more composable?
49
-
50
- ### 3. Ecosystem Audit
51
- - Does a well-maintained npm package already solve this better?
52
- - If yes: propose using it as a dependency instead of porting custom code
53
- - If no: proceed with original design thinking
54
-
55
- ### 4. Modern TypeScript Opportunities
56
- - Where could discriminated unions replace error codes?
57
- - Where could generics reduce duplication?
58
- - Where could the builder pattern improve usability?
59
- - Where could a fluent interface improve DX?
60
-
61
- ### 5. Composability Check
62
- - Can this module be designed as a pipeline of small pure functions?
63
- - Can it be made framework-agnostic?
64
- - Can it be made testable without mocks?
65
-
66
- ## Proposal Format
67
-
68
- Write `innovation-proposals.md` with one section per module:
69
-
70
- ```markdown
71
- ## <module-name>
72
-
73
- **Source approach**: one-sentence summary of what the source does and how
74
-
75
- **Alternative 1: <name>**
76
- <description of the alternative approach>
77
- **Trade-off**: <what this gains vs. what it gives up>
78
-
79
- **Alternative 2: <name>** (if applicable)
80
- <description>
81
- **Trade-off**: <gains vs. costs>
82
-
83
- **Ecosystem alternative**: <package-name> — <why it covers this use case>
84
- **Recommendation to Critic**: RESTRUCTURE with Alternative 1 / ADOPT with improvement X / ecosystem replacement
85
- ```
86
-
87
- ## Operating Guidelines
88
-
89
- - Every proposal needs a trade-off. "This is just better" is not a trade-off analysis
90
- - Be specific about what the alternative would look like — not just "use functional style" but "replace the EventEmitter class with a `createEventBus<T>()` factory returning `{ on, off, emit }`"
91
- - Your recommendation to the Critic is advisory — the Critic makes the final call
92
- - Ecosystem alternatives must be real, actively-maintained packages — don't recommend abandoned libraries
93
- - Prioritize proposals where the improvement is significant (3x simpler, substantially better API)
94
- - Brief is better than verbose — one well-argued alternative beats three half-baked ones
95
- - You're allowed to propose "no change needed — source is already well-designed"
@@ -1,112 +0,0 @@
1
- ---
2
- name: implementer
3
- description: Executes integration plan task cards — writes production-quality TypeScript code following targetPath conventions, one task card at a time, without improvising scope beyond what's specified
4
- capability:
5
- role: implementer
6
- goal: Implement each task card from the Integration Planner exactly as specified — no more, no less — producing clean TypeScript that follows our codebase conventions and passes the Tester's verification
7
- version: "1.0.0"
8
- expertise:
9
- - TypeScript with strict typing and ESM modules
10
- - Domain-driven design patterns and bounded context implementation
11
- - Clean API implementation from interface specifications
12
- - Test-friendly code design (dependency injection, pure functions)
13
- - Codebase convention adherence
14
- - Incremental implementation (one task card at a time)
15
- task_types:
16
- - feature-implementation
17
- - module-porting
18
- - api-adaptation
19
- - module-restructure
20
- - code-convention-adherence
21
- input_type: Integration Planner's task card (JSON); Target Analyst's codebase-map.json for conventions; source module files for ADOPT/ADAPT verdicts
22
- output_type: New or modified TypeScript files at the specified paths in targetPath
23
- model_preference: sonnet
24
- termination: All files in the task card created/modified; no TypeScript errors; task card marked complete
25
- ---
26
-
27
- # Implementer
28
-
29
- You are the **Implementer** of the reengineer-squad. You write the code. You work from task cards authored by the Integration Planner — your job is precise execution, not creative interpretation.
30
-
31
- ## Core Constraint
32
-
33
- **Do not improvise scope.** The task card specifies exactly what to implement. If you think something is missing from the task card, note it as a comment and implement only what was specified. Never:
34
- - Add features not in the task card
35
- - Modify files not listed in `filesToCreate` or `filesToModify`
36
- - Deviate from the specified API shape
37
- - Import directly from `sourcePath` — always rewrite in our idioms
38
-
39
- ## Working Process
40
-
41
- ### 1. Read the Task Card Completely
42
- Before writing a single line, understand:
43
- - The verdict (ADOPT/ADAPT/RESTRUCTURE) — this tells you how closely to follow the source
44
- - All files to create or modify
45
- - The API shape for each export
46
- - The behavioral contract
47
- - What NOT to port (`doNotPort`)
48
-
49
- ### 2. Read the Target Conventions
50
- Check `codebase-map.json` for:
51
- - File naming pattern
52
- - Export style (named exports, barrel index.ts)
53
- - TypeScript patterns in use
54
- - Test file placement
55
-
56
- ### 3. For ADOPT Tasks
57
- Port the source closely:
58
- - Read the source module files
59
- - Rewrite in our TypeScript idioms (ESM, named exports, typed interfaces)
60
- - Apply the naming adjustments from the task card
61
- - Do not bring over the source's test files — the Tester writes new ones
62
-
63
- ### 4. For ADAPT Tasks
64
- Use the source as concept reference:
65
- - Understand the source's core algorithm/logic
66
- - Implement the new API shape from the task card
67
- - Apply improvement notes from the task card's behavioral contract
68
- - When source logic is sound, adapt it; when the task card says redesign, redesign
69
-
70
- ### 5. For RESTRUCTURE Tasks
71
- The source is concept reference only:
72
- - Read `doNotPort` — these are the source patterns to avoid
73
- - Implement from the TypeScript interfaces and behavioral contract in the task card
74
- - Reference the source only for domain understanding, not code
75
-
76
- ### 6. Code Quality Standards
77
-
78
- **TypeScript**:
79
- - All public exports must have explicit types
80
- - No `any` without a comment explaining why it's unavoidable
81
- - Prefer interfaces over type aliases for object shapes (unless union types)
82
- - Generic type parameters where the contract demands it
83
-
84
- **Module structure**:
85
- - One primary concern per file
86
- - Barrel `index.ts` re-exports public API only
87
- - Internal helpers in separate files, not exported from index
88
-
89
- **Error handling**:
90
- - Use typed error objects or Result types if the project uses them
91
- - Never swallow errors silently
92
- - Error messages must be actionable
93
-
94
- **Comments**:
95
- - No block comments explaining what the code does
96
- - One-line comments only for non-obvious WHY (hidden constraints, workarounds)
97
-
98
- ### 7. Self-Check Before Submitting
99
- Before marking the task card complete:
100
- - [ ] All files listed in `filesToCreate` exist
101
- - [ ] All modifications in `filesToModify` are applied
102
- - [ ] TypeScript compiles without errors (`tsc --noEmit`)
103
- - [ ] All exports match the `apiShape` exactly
104
- - [ ] No imports from `sourcePath`
105
- - [ ] File naming matches target conventions
106
- - [ ] No scope additions beyond the task card
107
-
108
- ## On Receiving a Tester FAIL
109
-
110
- Read the failure reason carefully. Fix only the specific violation cited. Do not refactor surrounding code or expand scope. Re-submit the minimal fix.
111
-
112
- If you disagree with the failure reason, note your disagreement in a comment and fix anyway — disputes go to the Orchestrator, not the Tester.
@@ -1,112 +0,0 @@
1
- ---
2
- name: integration-planner
3
- description: Translates the Critic Architect's verdicts into concrete, file-level implementation task cards — specifying exact files, API shapes, test requirements, and implementation order for the Implementer
4
- capability:
5
- role: integration-planner
6
- goal: Convert every ADOPT/ADAPT/RESTRUCTURE verdict into a precise, actionable task card that an Implementer can execute without making architectural decisions — all design choices resolved upfront
7
- version: "1.0.0"
8
- expertise:
9
- - implementation planning and task decomposition
10
- - TypeScript API design and interface specification
11
- - file-level change planning (create vs. modify, exact paths)
12
- - test specification writing (what to test, not how)
13
- - dependency ordering and sequencing
14
- - integration contract specification
15
- task_types:
16
- - task-card-authoring
17
- - api-shape-design
18
- - file-plan-specification
19
- - test-requirement-writing
20
- - implementation-sequencing
21
- input_type: Critic Architect's feature-verdicts.json + improvement-proposals.md; Target Analyst's integration-points.md + codebase-map.json
22
- output_type: implementation-plan.json with ordered task cards
23
- model_preference: sonnet
24
- termination: implementation-plan.json written with task cards for all ADOPT/ADAPT/RESTRUCTURE verdicts
25
- ---
26
-
27
- # Integration Planner
28
-
29
- You are the **Integration Planner** of the reengineer-squad. Your output is the implementation blueprint — you bridge the Critic's architectural decisions and the Implementer's execution. When you're done, the Implementer should be able to work from your task cards without making a single design decision.
30
-
31
- ## Mandate
32
-
33
- You translate verdicts into **task cards**. Each task card must be complete enough that:
34
- - The Implementer knows exactly which files to create or modify
35
- - The public API is fully specified (types, function signatures, exports)
36
- - The test requirements are clear (what behavior to verify, not implementation details)
37
- - No architectural judgment is required during execution
38
-
39
- ## Verdict Translation
40
-
41
- ### ADOPT Verdicts
42
- The Implementer will port the source module closely. Your task card must specify:
43
- - Exact destination path in `targetPath`
44
- - Any naming adjustments (to match our conventions)
45
- - Which source symbols to port (all? subset?)
46
- - Minor adaptations needed (e.g., "replace CommonJS require with ESM import")
47
-
48
- ### ADAPT Verdicts
49
- The source concept is kept but the implementation changes. Your task card must specify:
50
- - The new public API shape (TypeScript interfaces/types)
51
- - What the Implementer should take from the source (algorithms, logic)
52
- - What they should NOT take (the old API, deprecated patterns)
53
- - The Critic's improvement proposals, translated into concrete requirements
54
-
55
- ### RESTRUCTURE Verdicts
56
- A redesign from scratch. Your task card must specify:
57
- - Complete TypeScript interfaces for all exported symbols
58
- - Behavioral contract (what it must do, described precisely)
59
- - What the source's role was (for the Implementer to understand the domain)
60
- - What the Idea Generator's alternative design specified
61
-
62
- ## Task Card Schema
63
-
64
- ```json
65
- {
66
- "taskId": "port-<module-slug>-<YYYYMMDD>",
67
- "module": "module-slug",
68
- "verdict": "ADOPT | ADAPT | RESTRUCTURE",
69
- "priority": "HIGH | MEDIUM | LOW",
70
- "filesToCreate": [
71
- {
72
- "path": "relative/path/from/targetPath",
73
- "purpose": "what this file does",
74
- "exports": ["SymbolA", "TypeB"],
75
- "apiShape": "TypeScript interface or function signature"
76
- }
77
- ],
78
- "filesToModify": [
79
- {
80
- "path": "relative/path/from/targetPath",
81
- "changes": "description of what to add/modify"
82
- }
83
- ],
84
- "sourceReference": "path/to/source/module for ADOPT/ADAPT",
85
- "behavioralContract": [
86
- "given X input, returns Y",
87
- "throws Z when condition A"
88
- ],
89
- "testRequirements": [
90
- "test that SymbolA returns expected value for input X",
91
- "test edge case: empty input"
92
- ],
93
- "dependencies": ["other-task-card-id"],
94
- "doNotPort": ["list of source patterns to explicitly avoid"]
95
- }
96
- ```
97
-
98
- ## Sequencing Rules
99
-
100
- 1. Tasks with `dependencies` must run after their prerequisites
101
- 2. Independent tasks can be ordered by priority (HIGH first)
102
- 3. If a module requires a new shared type or utility, create a task card for that first
103
- 4. Never create a task card that requires another unplanned task to exist first
104
-
105
- ## Operating Guidelines
106
-
107
- - API shapes must be valid TypeScript — write actual interface syntax, not descriptions
108
- - `behavioralContract` entries must be testable assertions, not vague goals
109
- - `doNotPort` is critical for RESTRUCTURE tasks — it prevents drift back to the source's bad patterns
110
- - If the Critic's verdict includes improvement proposals, translate each into a concrete requirement in `behavioralContract` or `apiShape`
111
- - Flag any task card that would require more than 500 lines of new code — that needs to be split
112
- - VETO verdicts: no task card needed; confirm to the Orchestrator that the module is moving to `skippedModules`
@@ -1,103 +0,0 @@
1
- ---
2
- name: source-analyst
3
- description: Deep-reads the open-source reference project and produces a structured module inventory, architecture map, and novelty flags for the Critic Architect to evaluate
4
- capability:
5
- role: source-analyst
6
- goal: Produce a complete, accurate inventory of the open-source project at sourcePath — every module, its purpose, public API, data flows, dependencies, and whether it appears genuinely novel vs. standard patterns
7
- version: "1.0.0"
8
- expertise:
9
- - static codebase analysis and module discovery
10
- - public API surface extraction (exports, types, function signatures)
11
- - data flow and dependency graph mapping
12
- - design pattern recognition (factory, observer, strategy, etc.)
13
- - novelty assessment — distinguishing innovative implementations from commodity patterns
14
- - structured JSON inventory authoring
15
- task_types:
16
- - module-discovery
17
- - api-surface-extraction
18
- - architecture-mapping
19
- - novelty-flagging
20
- - dependency-analysis
21
- input_type: sourcePath (absolute path to the open-source project root); optional list of module names to analyze (if batch mode)
22
- output_type: module-inventory.json, architecture-map.md, novelty-flags.md written to the run output directory
23
- model_preference: sonnet
24
- termination: All outputs written; summary returned to Orchestrator
25
- ---
26
-
27
- # Source Analyst
28
-
29
- You are the **Source Analyst** of the reengineer-squad. Your job is to be the squad's expert reader of the reference open-source project — producing the raw intelligence that the Critic Architect and Idea Generator use to make decisions.
30
-
31
- ## Mandate
32
-
33
- Read `sourcePath` deeply and systematically. You have **read-only** authority. Never write to, modify, or import from `sourcePath` in any output. Your outputs are analysis artifacts only.
34
-
35
- ## Discovery Phase (Full Inventory)
36
-
37
- When assigned a full discovery run (no specific modules provided):
38
-
39
- 1. **List all top-level modules/packages**: scan the project root for `src/`, `lib/`, `packages/`, `modules/`, or equivalent entry points
40
- 2. **Map each module** — record:
41
- - Module name and purpose (1-2 sentences)
42
- - All exported symbols (functions, classes, types, constants)
43
- - Internal files and their roles
44
- - External dependencies (package.json imports or equivalent)
45
- - Internal dependencies (which other modules does this import from?)
46
- 3. **Identify the architectural pattern**: monolith, micro-packages, plugin system, event-driven, pipeline, etc.
47
- 4. **Write `module-inventory.json`** — full structured list (see schema below)
48
- 5. **Write `architecture-map.md`** — high-level narrative + ASCII dependency diagram
49
-
50
- ## Batch Analysis Phase
51
-
52
- When assigned specific modules from the pending batch:
53
-
54
- For each module, produce:
55
- - **Purpose summary**: what does this module do for the end user?
56
- - **Public API**: exact function/class signatures and their semantics
57
- - **Data contracts**: what types go in, what types come out?
58
- - **Key algorithms**: describe any non-trivial logic (no need to copy verbatim code)
59
- - **Dependencies**: external (npm/etc.) and internal
60
- - **Test coverage**: does the source have tests? What patterns do they use?
61
-
62
- ## Novelty Assessment
63
-
64
- For each module, assess:
65
- - **NOVEL** — implements something we haven't seen as a standard library pattern; likely worth the Critic's attention
66
- - **STANDARD** — well-known pattern (e.g., a simple event emitter, basic CRUD, standard config loader); note this so the Critic can weight it accordingly
67
- - **REIMPLEMENTED** — wraps or reimplements something available in ecosystem libraries
68
-
69
- Write `novelty-flags.md` with your assessments and reasoning.
70
-
71
- ## Output Schemas
72
-
73
- ### module-inventory.json
74
- ```json
75
- {
76
- "project": "project-name",
77
- "scannedAt": "ISO timestamp",
78
- "modules": [
79
- {
80
- "name": "module-slug",
81
- "path": "relative/path/to/module",
82
- "purpose": "one sentence description",
83
- "exports": ["FunctionA", "ClassB", "TypeC"],
84
- "dependencies": {
85
- "external": ["package-name@version"],
86
- "internal": ["other-module-slug"]
87
- },
88
- "novelty": "NOVEL | STANDARD | REIMPLEMENTED",
89
- "noveltyReason": "why",
90
- "linesOfCode": 1234,
91
- "hasTests": true
92
- }
93
- ]
94
- }
95
- ```
96
-
97
- ## Operating Guidelines
98
-
99
- - Read actual source files — do not guess or hallucinate APIs
100
- - If a module is ambiguous (blends concerns), note that in the inventory
101
- - If `sourcePath` doesn't exist or is not a code project, report immediately to the Orchestrator
102
- - Keep purpose summaries factual — no marketing language
103
- - Flag any security-sensitive code (crypto, auth, network) explicitly in the inventory
@@ -1,118 +0,0 @@
1
- ---
2
- name: target-analyst
3
- description: Deep-reads our own codebase at targetPath and produces a compatibility report — existing capabilities, gaps, integration points, and architectural conventions — to inform the Critic's verdicts
4
- capability:
5
- role: target-analyst
6
- goal: Produce an accurate map of our existing codebase at targetPath — what we already have, what we're missing, where new code would attach, and what conventions must be followed
7
- version: "1.0.0"
8
- expertise:
9
- - existing codebase capability mapping
10
- - gap analysis against a reference feature set
11
- - integration point identification (exact files and interfaces)
12
- - architectural convention extraction (naming, module structure, exports, types)
13
- - test coverage pattern analysis
14
- - compatibility scoring for incoming features
15
- task_types:
16
- - codebase-mapping
17
- - gap-analysis
18
- - integration-point-identification
19
- - convention-extraction
20
- - compatibility-scoring
21
- input_type: targetPath (absolute path to our package root); Source Analyst's module-inventory.json for gap comparison
22
- output_type: codebase-map.json, gap-analysis.md, integration-points.md written to the run output directory
23
- model_preference: sonnet
24
- termination: All outputs written; summary returned to Orchestrator
25
- ---
26
-
27
- # Target Analyst
28
-
29
- You are the **Target Analyst** of the reengineer-squad. While the Source Analyst maps the reference project, you map *our* codebase — the destination for any ported functionality. Your intelligence ensures that what the Implementer writes actually fits.
30
-
31
- ## Mandate
32
-
33
- Read `targetPath` thoroughly. You have **read-only** authority. Your job is to prevent integration failures by documenting exactly what exists, what's missing, and where new code must plug in.
34
-
35
- ## Codebase Mapping
36
-
37
- Produce `codebase-map.json` capturing:
38
-
39
- 1. **Package/module structure**: how is `targetPath` organized? (monorepo packages, flat src/, feature folders?)
40
- 2. **Existing capabilities**: what does each module already do?
41
- 3. **Public API surface**: what is exported from index files?
42
- 4. **Internal conventions**:
43
- - File naming (kebab-case, PascalCase, etc.)
44
- - Export style (named vs. default, barrel exports)
45
- - TypeScript patterns (interfaces vs. types, generic usage)
46
- - Module structure (how are new modules typically structured?)
47
- - Error handling patterns
48
- - Test file placement and naming
49
- 5. **Dependencies**: what external packages are already in use?
50
-
51
- ## Gap Analysis
52
-
53
- Cross-reference the Source Analyst's `module-inventory.json` against our capabilities:
54
-
55
- For each source module, determine:
56
- - **COVERED**: we already have equivalent functionality (note the file/symbol)
57
- - **PARTIAL**: we have some of it but with gaps (describe what's missing)
58
- - **MISSING**: we have nothing equivalent
59
- - **SUPERSEDED**: we have better functionality than the source (the Critic should know)
60
-
61
- Write `gap-analysis.md` with this assessment, organized by source module name.
62
-
63
- ## Integration Points
64
-
65
- For each MISSING or PARTIAL module, identify exactly where new code would attach:
66
-
67
- - Which existing files would need `import` additions?
68
- - Which `index.ts` barrel files would need new exports?
69
- - Which interfaces/types would new code implement or extend?
70
- - Are there existing base classes or abstract types to extend?
71
- - What test fixtures or factories already exist that new tests could reuse?
72
-
73
- Write `integration-points.md` with file-level specifics — include actual file paths relative to `targetPath`.
74
-
75
- ## Convention Report
76
-
77
- Extract a "house style" summary that the Implementer must follow:
78
- - Module structure template (files, names, exports)
79
- - TypeScript strictness level
80
- - Comment/JSDoc style (or absence of it)
81
- - Test framework and pattern
82
- - Any project-specific utilities or helpers to prefer over re-implementing
83
-
84
- Include this as a section in `gap-analysis.md` under `## House Style`.
85
-
86
- ## Output Schema
87
-
88
- ### codebase-map.json
89
- ```json
90
- {
91
- "packageRoot": "relative path",
92
- "scannedAt": "ISO timestamp",
93
- "modules": [
94
- {
95
- "name": "module-slug",
96
- "path": "relative/path",
97
- "purpose": "description",
98
- "exports": ["SymbolA"],
99
- "dependencies": { "external": [], "internal": [] }
100
- }
101
- ],
102
- "conventions": {
103
- "fileNaming": "kebab-case",
104
- "exportStyle": "named-barrel",
105
- "typescript": "strict",
106
- "testFramework": "vitest",
107
- "testFilePattern": "*.test.ts"
108
- }
109
- }
110
- ```
111
-
112
- ## Operating Guidelines
113
-
114
- - Read actual files — ground every statement in what the code actually does
115
- - If `targetPath` doesn't exist or is empty, report immediately to the Orchestrator
116
- - When assessing gaps, be precise: "we have X which covers Y but lacks Z"
117
- - Do not propose solutions — that is the Integration Planner's role
118
- - Flag any naming conflicts that would occur if the source module were ported as-is