@monoes/monomindcli 2.16.2 → 2.16.3

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 (828) hide show
  1. package/.claude/agents/architecture/system-design/arch-system-design.md +4 -1
  2. package/.claude/agents/consensus/quorum-manager.md +3 -0
  3. package/.claude/agents/consensus/security-manager.md +4 -1
  4. package/.claude/agents/core/coder.md +4 -1
  5. package/.claude/agents/core/coordinator.md +3 -0
  6. package/.claude/agents/core/planner.md +4 -1
  7. package/.claude/agents/core/researcher.md +4 -1
  8. package/.claude/agents/core/reviewer.md +4 -1
  9. package/.claude/agents/core/tester.md +4 -1
  10. package/.claude/agents/design/design-monodesign.md +4 -1
  11. package/.claude/agents/engineering/engineering-ai-data-remediation-engineer.md +4 -1
  12. package/.claude/agents/engineering/engineering-ai-engineer.md +4 -1
  13. package/.claude/agents/engineering/engineering-autonomous-optimization-architect.md +3 -0
  14. package/.claude/agents/engineering/engineering-backend-architect.md +4 -1
  15. package/.claude/agents/engineering/engineering-code-reviewer.md +5 -0
  16. package/.claude/agents/engineering/engineering-data-engineer.md +4 -1
  17. package/.claude/agents/engineering/engineering-database-optimizer.md +4 -1
  18. package/.claude/agents/engineering/engineering-devops-automator.md +3 -0
  19. package/.claude/agents/engineering/engineering-embedded-firmware-engineer.md +3 -0
  20. package/.claude/agents/engineering/engineering-feishu-integration-developer.md +4 -1
  21. package/.claude/agents/engineering/engineering-frontend-developer.md +3 -0
  22. package/.claude/agents/engineering/engineering-git-workflow-master.md +4 -1
  23. package/.claude/agents/engineering/engineering-incident-response-commander.md +4 -1
  24. package/.claude/agents/engineering/engineering-mobile-app-builder.md +3 -0
  25. package/.claude/agents/engineering/engineering-rapid-prototyper.md +3 -0
  26. package/.claude/agents/engineering/engineering-security-engineer.md +4 -1
  27. package/.claude/agents/engineering/engineering-senior-developer.md +3 -0
  28. package/.claude/agents/engineering/engineering-software-architect.md +4 -1
  29. package/.claude/agents/engineering/engineering-solidity-smart-contract-engineer.md +4 -1
  30. package/.claude/agents/engineering/engineering-sre.md +3 -0
  31. package/.claude/agents/engineering/engineering-technical-writer.md +4 -1
  32. package/.claude/agents/engineering/engineering-threat-detection-engineer.md +4 -1
  33. package/.claude/agents/engineering/engineering-wechat-mini-program-developer.md +4 -1
  34. package/.claude/agents/github/github-modes.md +4 -2
  35. package/.claude/agents/github/issue-tracker.md +4 -2
  36. package/.claude/agents/github/monoswarm-code-review.md +4 -2
  37. package/.claude/agents/github/monoswarm-issue.md +5 -0
  38. package/.claude/agents/github/monoswarm-multi-repo.md +4 -1
  39. package/.claude/agents/github/monoswarm-pr.md +5 -0
  40. package/.claude/agents/github/pr-manager.md +4 -2
  41. package/.claude/agents/github/project-board-sync.md +4 -2
  42. package/.claude/agents/github/release-manager.md +4 -2
  43. package/.claude/agents/github/repo-architect.md +4 -2
  44. package/.claude/agents/github/sync-coordinator.md +4 -2
  45. package/.claude/agents/github/workflow-automation.md +4 -2
  46. package/.claude/agents/goal/goal-planner.md +16 -2
  47. package/.claude/agents/marketing/marketing-competitive-content.md +4 -1
  48. package/.claude/agents/marketing/marketing-cro-specialist.md +4 -1
  49. package/.claude/agents/marketing/marketing-email-specialist.md +4 -1
  50. package/.claude/agents/marketing/marketing-launch-strategist.md +4 -1
  51. package/.claude/agents/marketing/marketing-pricing-strategist.md +4 -1
  52. package/.claude/agents/monoswarm/collective-intelligence-coordinator.md +3 -0
  53. package/.claude/agents/monoswarm/mesh-coordinator.md +3 -0
  54. package/.claude/agents/monoswarm/monoswarm-memory-manager.md +4 -2
  55. package/.claude/agents/monoswarm/scout-explorer.md +4 -2
  56. package/.claude/agents/monoswarm/worker-specialist.md +3 -0
  57. package/.claude/agents/optimization/benchmark-suite.md +3 -0
  58. package/.claude/agents/optimization/load-balancer.md +3 -0
  59. package/.claude/agents/optimization/performance-monitor.md +3 -0
  60. package/.claude/agents/optimization/resource-allocator.md +3 -0
  61. package/.claude/agents/optimization/topology-optimizer.md +3 -0
  62. package/.claude/agents/specialists/integration-architect.md +4 -2
  63. package/.claude/agents/specialized/agentic-identity-trust.md +4 -1
  64. package/.claude/agents/specialized/agents-orchestrator.md +3 -0
  65. package/.claude/agents/specialized/automation-governance-architect.md +3 -0
  66. package/.claude/agents/specialized/blockchain-security-auditor.md +4 -1
  67. package/.claude/agents/specialized/compliance-auditor.md +4 -1
  68. package/.claude/agents/specialized/identity-graph-operator.md +4 -1
  69. package/.claude/agents/specialized/lsp-index-engineer.md +3 -0
  70. package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +5 -0
  71. package/.claude/agents/specialized/specialized-cultural-intelligence-strategist.md +3 -0
  72. package/.claude/agents/specialized/specialized-developer-advocate.md +4 -1
  73. package/.claude/agents/specialized/specialized-document-generator.md +4 -1
  74. package/.claude/agents/specialized/specialized-mcp-builder.md +3 -0
  75. package/.claude/agents/specialized/specialized-model-qa.md +4 -1
  76. package/.claude/agents/specialized/specialized-workflow-architect.md +4 -1
  77. package/.claude/agents/specialized/zk-steward.md +4 -1
  78. package/.claude/agents/templates/automation-smart-agent.md +4 -1
  79. package/.claude/agents/templates/coordinator-monoswarm-init.md +4 -1
  80. package/.claude/agents/testing/production-validator.md +3 -0
  81. package/.claude/agents/testing/tdd-london-monoswarm.md +3 -0
  82. package/.claude/agents/testing/testing-accessibility-auditor.md +4 -1
  83. package/.claude/agents/testing/testing-api-tester.md +4 -1
  84. package/.claude/agents/testing/testing-evidence-collector.md +3 -0
  85. package/.claude/agents/testing/testing-performance-benchmarker.md +4 -1
  86. package/.claude/agents/testing/testing-test-results-analyzer.md +4 -1
  87. package/.claude/agents/testing/testing-tool-evaluator.md +4 -1
  88. package/.claude/agents/testing/testing-workflow-optimizer.md +4 -1
  89. package/.claude/commands/agents/agent-types.md +7 -5
  90. package/.claude/commands/mastermind/code-review.md +5 -5
  91. package/.claude/commands/mastermind/content.md +8 -2
  92. package/.claude/commands/mastermind/createtask.md +2 -2
  93. package/.claude/commands/mastermind/do.md +18 -36
  94. package/.claude/commands/mastermind/finance.md +8 -2
  95. package/.claude/commands/mastermind/ideate.md +4 -4
  96. package/.claude/commands/mastermind/improve.md +3 -3
  97. package/.claude/commands/mastermind/marketing.md +8 -2
  98. package/.claude/commands/mastermind/master.md +63 -45
  99. package/.claude/commands/mastermind/monoswarm.md +7 -5
  100. package/.claude/commands/mastermind/ops.md +8 -2
  101. package/.claude/commands/mastermind/sales.md +8 -2
  102. package/.claude/commands/mastermind.md +7 -7
  103. package/.claude/commands/monoswarm/analysis.md +1 -1
  104. package/.claude/commands/monoswarm/development.md +1 -1
  105. package/.claude/commands/monoswarm/maintenance.md +1 -1
  106. package/.claude/commands/monoswarm/optimization.md +2 -1
  107. package/.claude/commands/monoswarm/research.md +1 -1
  108. package/.claude/commands/monoswarm/testing.md +1 -1
  109. package/.claude/commands/pair/examples.md +3 -2
  110. package/.claude/commands/pair/modes.md +3 -3
  111. package/.claude/helpers/build-skill-registry.cjs +186 -26
  112. package/.claude/helpers/handlers/agent-start-handler.cjs +3 -0
  113. package/.claude/helpers/handlers/capture-handler.cjs +22 -14
  114. package/.claude/helpers/handlers/edit-handler.cjs +1 -1
  115. package/.claude/helpers/handlers/pick-core.cjs +445 -0
  116. package/.claude/helpers/handlers/route-handler.cjs +81 -180
  117. package/.claude/helpers/handlers/session-handler.cjs +44 -62
  118. package/.claude/helpers/handlers/session-restore-handler.cjs +5 -1
  119. package/.claude/helpers/handlers/task-handler.cjs +11 -6
  120. package/.claude/helpers/hook-handler.cjs +9 -2
  121. package/.claude/helpers/jev-catalog.cjs +225 -0
  122. package/.claude/helpers/jev-picker.cjs +36 -147
  123. package/.claude/helpers/org-skill-index.cjs +230 -0
  124. package/.claude/helpers/pick-rank.cjs +221 -0
  125. package/.claude/helpers/pick-stats.cjs +413 -0
  126. package/.claude/helpers/router.cjs +7 -379
  127. package/.claude/helpers/utils/monograph-resolve.cjs +12 -4
  128. package/.claude/settings.json +51 -41
  129. package/.claude/skills/hooks-automation/SKILL.md +4 -4
  130. package/.claude/skills/mastermind-access/SKILL.md +4 -3
  131. package/.claude/skills/mastermind-activity/SKILL.md +3 -2
  132. package/.claude/skills/mastermind-adapter-manager/SKILL.md +2 -1
  133. package/.claude/skills/mastermind-adapters/SKILL.md +2 -1
  134. package/.claude/skills/mastermind-agent-detail/SKILL.md +5 -4
  135. package/.claude/skills/mastermind-agent-select/SKILL.md +99 -100
  136. package/.claude/skills/mastermind-agents/SKILL.md +2 -1
  137. package/.claude/skills/mastermind-approval-detail/SKILL.md +2 -1
  138. package/.claude/skills/mastermind-backup/SKILL.md +2 -1
  139. package/.claude/skills/mastermind-bootstrap/SKILL.md +2 -2
  140. package/.claude/skills/mastermind-budgets/SKILL.md +4 -3
  141. package/.claude/skills/mastermind-createorg/SKILL.md +23 -5
  142. package/.claude/skills/mastermind-delegation/SKILL.md +11 -19
  143. package/.claude/skills/mastermind-diagnose/SKILL.md +3 -3
  144. package/.claude/skills/mastermind-env/SKILL.md +2 -1
  145. package/.claude/skills/mastermind-environments/SKILL.md +2 -1
  146. package/.claude/skills/mastermind-execute/SKILL.md +1 -1
  147. package/.claude/skills/mastermind-export/SKILL.md +2 -1
  148. package/.claude/skills/mastermind-goal-detail/SKILL.md +3 -2
  149. package/.claude/skills/mastermind-goals/SKILL.md +3 -2
  150. package/.claude/skills/mastermind-idea/SKILL.md +52 -92
  151. package/.claude/skills/mastermind-import/SKILL.md +2 -1
  152. package/.claude/skills/mastermind-inbox/SKILL.md +3 -2
  153. package/.claude/skills/mastermind-instance/SKILL.md +3 -2
  154. package/.claude/skills/mastermind-invite-landing/SKILL.md +3 -2
  155. package/.claude/skills/mastermind-invites/SKILL.md +3 -2
  156. package/.claude/skills/mastermind-issue-detail/SKILL.md +4 -3
  157. package/.claude/skills/mastermind-issues/SKILL.md +4 -3
  158. package/.claude/skills/mastermind-join-queue/SKILL.md +5 -4
  159. package/.claude/skills/mastermind-liveness/SKILL.md +5 -4
  160. package/.claude/skills/mastermind-monitor/SKILL.md +15 -15
  161. package/.claude/skills/mastermind-my-issues/SKILL.md +2 -1
  162. package/.claude/skills/mastermind-new-agent/SKILL.md +120 -137
  163. package/.claude/skills/mastermind-org-settings/SKILL.md +6 -5
  164. package/.claude/skills/mastermind-orgs/SKILL.md +1 -0
  165. package/.claude/skills/mastermind-orgstatus/SKILL.md +2 -1
  166. package/.claude/skills/mastermind-plan-to-tasks/SKILL.md +1 -1
  167. package/.claude/skills/mastermind-plugin-manager/SKILL.md +4 -3
  168. package/.claude/skills/mastermind-plugin-settings/SKILL.md +5 -4
  169. package/.claude/skills/mastermind-plugins/SKILL.md +3 -2
  170. package/.claude/skills/mastermind-profile/SKILL.md +2 -1
  171. package/.claude/skills/mastermind-protocol/SKILL.md +3 -3
  172. package/.claude/skills/mastermind-release/SKILL.md +13 -8
  173. package/.claude/skills/mastermind-research/SKILL.md +10 -8
  174. package/.claude/skills/mastermind-review/SKILL.md +16 -11
  175. package/.claude/skills/mastermind-routine-detail/SKILL.md +2 -1
  176. package/.claude/skills/mastermind-routines/SKILL.md +3 -2
  177. package/.claude/skills/mastermind-search/SKILL.md +2 -1
  178. package/.claude/skills/mastermind-secrets/SKILL.md +3 -2
  179. package/.claude/skills/mastermind-skills/SKILL.md +2 -1
  180. package/.claude/skills/mastermind-stoporg/SKILL.md +1 -0
  181. package/.claude/skills/mastermind-tasks/SKILL.md +3 -2
  182. package/.claude/skills/mastermind-threads/SKILL.md +4 -3
  183. package/.claude/skills/mastermind-tree-control/SKILL.md +5 -4
  184. package/.claude/skills/mastermind-workspace-detail/SKILL.md +4 -3
  185. package/.claude/skills/mastermind-workspaces/SKILL.md +2 -1
  186. package/.claude/skills/monoswarm/SKILL.md +7 -5
  187. package/.claude/skills/specialagent/SKILL.md +32 -51
  188. package/dist/src/agents/registry-builder.d.ts +23 -2
  189. package/dist/src/agents/registry-builder.d.ts.map +1 -1
  190. package/dist/src/agents/registry-builder.js +64 -11
  191. package/dist/src/agents/registry-builder.js.map +1 -1
  192. package/dist/src/agents/registry-freshness.d.ts +21 -0
  193. package/dist/src/agents/registry-freshness.d.ts.map +1 -0
  194. package/dist/src/agents/registry-freshness.js +94 -0
  195. package/dist/src/agents/registry-freshness.js.map +1 -0
  196. package/dist/src/commands/agent-lifecycle.d.ts +11 -5
  197. package/dist/src/commands/agent-lifecycle.d.ts.map +1 -1
  198. package/dist/src/commands/agent-lifecycle.js +78 -42
  199. package/dist/src/commands/agent-lifecycle.js.map +1 -1
  200. package/dist/src/commands/doctor-env-checks.d.ts +18 -3
  201. package/dist/src/commands/doctor-env-checks.d.ts.map +1 -1
  202. package/dist/src/commands/doctor-env-checks.js +35 -16
  203. package/dist/src/commands/doctor-env-checks.js.map +1 -1
  204. package/dist/src/commands/doctor-fresh-install.d.ts +9 -0
  205. package/dist/src/commands/doctor-fresh-install.d.ts.map +1 -0
  206. package/dist/src/commands/doctor-fresh-install.js +43 -0
  207. package/dist/src/commands/doctor-fresh-install.js.map +1 -0
  208. package/dist/src/commands/doctor-hook-monograph-checks.d.ts +3 -1
  209. package/dist/src/commands/doctor-hook-monograph-checks.d.ts.map +1 -1
  210. package/dist/src/commands/doctor-hook-monograph-checks.js +13 -4
  211. package/dist/src/commands/doctor-hook-monograph-checks.js.map +1 -1
  212. package/dist/src/commands/doctor-hook-settings-checks.d.ts +5 -0
  213. package/dist/src/commands/doctor-hook-settings-checks.d.ts.map +1 -0
  214. package/dist/src/commands/doctor-hook-settings-checks.js +50 -0
  215. package/dist/src/commands/doctor-hook-settings-checks.js.map +1 -0
  216. package/dist/src/commands/doctor-json.d.ts +41 -0
  217. package/dist/src/commands/doctor-json.d.ts.map +1 -0
  218. package/dist/src/commands/doctor-json.js +60 -0
  219. package/dist/src/commands/doctor-json.js.map +1 -0
  220. package/dist/src/commands/doctor-mode.d.ts +28 -0
  221. package/dist/src/commands/doctor-mode.d.ts.map +1 -0
  222. package/dist/src/commands/doctor-mode.js +109 -0
  223. package/dist/src/commands/doctor-mode.js.map +1 -0
  224. package/dist/src/commands/doctor-monoes-checks.d.ts.map +1 -1
  225. package/dist/src/commands/doctor-monoes-checks.js +3 -1
  226. package/dist/src/commands/doctor-monoes-checks.js.map +1 -1
  227. package/dist/src/commands/doctor-pick-checks.d.ts +19 -0
  228. package/dist/src/commands/doctor-pick-checks.d.ts.map +1 -0
  229. package/dist/src/commands/doctor-pick-checks.js +164 -0
  230. package/dist/src/commands/doctor-pick-checks.js.map +1 -0
  231. package/dist/src/commands/doctor-project-checks.d.ts +3 -1
  232. package/dist/src/commands/doctor-project-checks.d.ts.map +1 -1
  233. package/dist/src/commands/doctor-project-checks.js +67 -20
  234. package/dist/src/commands/doctor-project-checks.js.map +1 -1
  235. package/dist/src/commands/doctor.d.ts.map +1 -1
  236. package/dist/src/commands/doctor.js +324 -335
  237. package/dist/src/commands/doctor.js.map +1 -1
  238. package/dist/src/commands/hooks-coverage-routing.js +1 -1
  239. package/dist/src/commands/hooks-coverage-routing.js.map +1 -1
  240. package/dist/src/commands/hooks-coverage-utils.js +1 -1
  241. package/dist/src/commands/hooks-coverage-utils.js.map +1 -1
  242. package/dist/src/commands/hooks-routing-commands.js +1 -1
  243. package/dist/src/commands/init-upgrade.d.ts.map +1 -1
  244. package/dist/src/commands/init-upgrade.js +4 -0
  245. package/dist/src/commands/init-upgrade.js.map +1 -1
  246. package/dist/src/commands/monoswarm.d.ts.map +1 -1
  247. package/dist/src/commands/monoswarm.js +16 -10
  248. package/dist/src/commands/monoswarm.js.map +1 -1
  249. package/dist/src/commands/pick.d.ts.map +1 -1
  250. package/dist/src/commands/pick.js +66 -16
  251. package/dist/src/commands/pick.js.map +1 -1
  252. package/dist/src/commands/route.d.ts +2 -1
  253. package/dist/src/commands/route.d.ts.map +1 -1
  254. package/dist/src/commands/route.js +73 -117
  255. package/dist/src/commands/route.js.map +1 -1
  256. package/dist/src/decision/catalogs.d.ts +24 -3
  257. package/dist/src/decision/catalogs.d.ts.map +1 -1
  258. package/dist/src/decision/catalogs.js +100 -22
  259. package/dist/src/decision/catalogs.js.map +1 -1
  260. package/dist/src/decision/jev.d.ts +26 -6
  261. package/dist/src/decision/jev.d.ts.map +1 -1
  262. package/dist/src/decision/jev.js +15 -4
  263. package/dist/src/decision/jev.js.map +1 -1
  264. package/dist/src/decision/pick-eval.d.ts +67 -0
  265. package/dist/src/decision/pick-eval.d.ts.map +1 -0
  266. package/dist/src/decision/pick-eval.js +113 -0
  267. package/dist/src/decision/pick-eval.js.map +1 -0
  268. package/dist/src/decision/pick-stats.d.ts +49 -0
  269. package/dist/src/decision/pick-stats.d.ts.map +1 -0
  270. package/dist/src/decision/pick-stats.js +68 -0
  271. package/dist/src/decision/pick-stats.js.map +1 -0
  272. package/dist/src/decision/picks.d.ts +37 -6
  273. package/dist/src/decision/picks.d.ts.map +1 -1
  274. package/dist/src/decision/picks.js +67 -32
  275. package/dist/src/decision/picks.js.map +1 -1
  276. package/dist/src/index.d.ts +5 -0
  277. package/dist/src/index.d.ts.map +1 -1
  278. package/dist/src/index.js +43 -22
  279. package/dist/src/index.js.map +1 -1
  280. package/dist/src/init/agent-refresh.d.ts +8 -0
  281. package/dist/src/init/agent-refresh.d.ts.map +1 -0
  282. package/dist/src/init/agent-refresh.js +89 -0
  283. package/dist/src/init/agent-refresh.js.map +1 -0
  284. package/dist/src/init/claudemd-generator.d.ts.map +1 -1
  285. package/dist/src/init/claudemd-generator.js +27 -9
  286. package/dist/src/init/claudemd-generator.js.map +1 -1
  287. package/dist/src/init/helpers-generator.d.ts +4 -1
  288. package/dist/src/init/helpers-generator.d.ts.map +1 -1
  289. package/dist/src/init/helpers-generator.js +84 -55
  290. package/dist/src/init/helpers-generator.js.map +1 -1
  291. package/dist/src/init/hook-settings.d.ts +57 -0
  292. package/dist/src/init/hook-settings.d.ts.map +1 -0
  293. package/dist/src/init/hook-settings.js +133 -0
  294. package/dist/src/init/hook-settings.js.map +1 -0
  295. package/dist/src/init/settings-generator.d.ts.map +1 -1
  296. package/dist/src/init/settings-generator.js +44 -25
  297. package/dist/src/init/settings-generator.js.map +1 -1
  298. package/dist/src/init/shared.d.ts +9 -0
  299. package/dist/src/init/shared.d.ts.map +1 -1
  300. package/dist/src/init/shared.js +22 -0
  301. package/dist/src/init/shared.js.map +1 -1
  302. package/dist/src/init/upgrade.d.ts +4 -0
  303. package/dist/src/init/upgrade.d.ts.map +1 -1
  304. package/dist/src/init/upgrade.js +123 -129
  305. package/dist/src/init/upgrade.js.map +1 -1
  306. package/dist/src/init/write-capabilities.d.ts.map +1 -1
  307. package/dist/src/init/write-capabilities.js +10 -33
  308. package/dist/src/init/write-capabilities.js.map +1 -1
  309. package/dist/src/init/write-claude.d.ts.map +1 -1
  310. package/dist/src/init/write-claude.js +5 -2
  311. package/dist/src/init/write-claude.js.map +1 -1
  312. package/dist/src/mcp-client.d.ts.map +1 -1
  313. package/dist/src/mcp-client.js +4 -0
  314. package/dist/src/mcp-client.js.map +1 -1
  315. package/dist/src/mcp-tools/agent-tools.d.ts.map +1 -1
  316. package/dist/src/mcp-tools/agent-tools.js +3 -0
  317. package/dist/src/mcp-tools/agent-tools.js.map +1 -1
  318. package/dist/src/mcp-tools/guidance-tools.d.ts.map +1 -1
  319. package/dist/src/mcp-tools/guidance-tools.js +19 -10
  320. package/dist/src/mcp-tools/guidance-tools.js.map +1 -1
  321. package/dist/src/mcp-tools/hooks-embedding.d.ts +1 -32
  322. package/dist/src/mcp-tools/hooks-embedding.d.ts.map +1 -1
  323. package/dist/src/mcp-tools/hooks-embedding.js +22 -200
  324. package/dist/src/mcp-tools/hooks-embedding.js.map +1 -1
  325. package/dist/src/mcp-tools/hooks-routing.d.ts.map +1 -1
  326. package/dist/src/mcp-tools/hooks-routing.js +77 -192
  327. package/dist/src/mcp-tools/hooks-routing.js.map +1 -1
  328. package/dist/src/mcp-tools/index.d.ts +1 -0
  329. package/dist/src/mcp-tools/index.d.ts.map +1 -1
  330. package/dist/src/mcp-tools/index.js +1 -0
  331. package/dist/src/mcp-tools/index.js.map +1 -1
  332. package/dist/src/mcp-tools/org-skill-tools.d.ts +4 -0
  333. package/dist/src/mcp-tools/org-skill-tools.d.ts.map +1 -0
  334. package/dist/src/mcp-tools/org-skill-tools.js +42 -0
  335. package/dist/src/mcp-tools/org-skill-tools.js.map +1 -0
  336. package/dist/src/mcp-tools/pick-tools.d.ts +4 -0
  337. package/dist/src/mcp-tools/pick-tools.d.ts.map +1 -0
  338. package/dist/src/mcp-tools/pick-tools.js +53 -0
  339. package/dist/src/mcp-tools/pick-tools.js.map +1 -0
  340. package/dist/src/monovector/coverage-router.d.ts +2 -1
  341. package/dist/src/monovector/coverage-router.d.ts.map +1 -1
  342. package/dist/src/monovector/coverage-router.js +6 -5
  343. package/dist/src/monovector/coverage-router.js.map +1 -1
  344. package/dist/src/monovector/coverage-tools.js +1 -1
  345. package/dist/src/monovector/coverage-tools.js.map +1 -1
  346. package/dist/src/monovector/index.d.ts +1 -1
  347. package/dist/src/monovector/index.d.ts.map +1 -1
  348. package/dist/src/monovector/index.js +11 -35
  349. package/dist/src/monovector/index.js.map +1 -1
  350. package/dist/src/monovector/route-outcomes.d.ts.map +1 -1
  351. package/dist/src/monovector/route-outcomes.js +89 -34
  352. package/dist/src/monovector/route-outcomes.js.map +1 -1
  353. package/dist/src/orgrt/daemon.d.ts +7 -13
  354. package/dist/src/orgrt/daemon.d.ts.map +1 -1
  355. package/dist/src/orgrt/daemon.js +12 -23
  356. package/dist/src/orgrt/daemon.js.map +1 -1
  357. package/dist/src/orgrt/decisions.d.ts +3 -8
  358. package/dist/src/orgrt/decisions.d.ts.map +1 -1
  359. package/dist/src/orgrt/decisions.js +36 -47
  360. package/dist/src/orgrt/decisions.js.map +1 -1
  361. package/dist/src/orgrt/dispatch-hold.d.ts +34 -0
  362. package/dist/src/orgrt/dispatch-hold.d.ts.map +1 -0
  363. package/dist/src/orgrt/dispatch-hold.js +75 -0
  364. package/dist/src/orgrt/dispatch-hold.js.map +1 -0
  365. package/dist/src/orgrt/runner-registry.d.ts +20 -0
  366. package/dist/src/orgrt/runner-registry.d.ts.map +1 -1
  367. package/dist/src/orgrt/runner-registry.js +39 -0
  368. package/dist/src/orgrt/runner-registry.js.map +1 -1
  369. package/dist/src/orgrt/sandbox-deny-write.d.ts +11 -1
  370. package/dist/src/orgrt/sandbox-deny-write.d.ts.map +1 -1
  371. package/dist/src/orgrt/sandbox-deny-write.js +23 -2
  372. package/dist/src/orgrt/sandbox-deny-write.js.map +1 -1
  373. package/dist/src/orgrt/sandbox-fault.d.ts +5 -1
  374. package/dist/src/orgrt/sandbox-fault.d.ts.map +1 -1
  375. package/dist/src/orgrt/sandbox-fault.js +14 -2
  376. package/dist/src/orgrt/sandbox-fault.js.map +1 -1
  377. package/dist/src/orgrt/session.d.ts +16 -7
  378. package/dist/src/orgrt/session.d.ts.map +1 -1
  379. package/dist/src/orgrt/session.js +39 -62
  380. package/dist/src/orgrt/session.js.map +1 -1
  381. package/dist/src/orgrt/skill-library.d.ts +4 -0
  382. package/dist/src/orgrt/skill-library.d.ts.map +1 -1
  383. package/dist/src/orgrt/skill-library.js +12 -0
  384. package/dist/src/orgrt/skill-library.js.map +1 -1
  385. package/dist/src/orgrt/skill-tools.d.ts +11 -0
  386. package/dist/src/orgrt/skill-tools.d.ts.map +1 -0
  387. package/dist/src/orgrt/skill-tools.js +40 -0
  388. package/dist/src/orgrt/skill-tools.js.map +1 -0
  389. package/dist/src/orgrt/task-cancel.d.ts +64 -0
  390. package/dist/src/orgrt/task-cancel.d.ts.map +1 -0
  391. package/dist/src/orgrt/task-cancel.js +134 -0
  392. package/dist/src/orgrt/task-cancel.js.map +1 -0
  393. package/dist/src/orgrt/task-dag.d.ts +10 -1
  394. package/dist/src/orgrt/task-dag.d.ts.map +1 -1
  395. package/dist/src/orgrt/task-dag.js.map +1 -1
  396. package/dist/src/orgrt/task-match.d.ts +121 -0
  397. package/dist/src/orgrt/task-match.d.ts.map +1 -0
  398. package/dist/src/orgrt/task-match.js +241 -0
  399. package/dist/src/orgrt/task-match.js.map +1 -0
  400. package/dist/src/orgrt/task-provenance.d.ts +26 -0
  401. package/dist/src/orgrt/task-provenance.d.ts.map +1 -0
  402. package/dist/src/orgrt/task-provenance.js +93 -0
  403. package/dist/src/orgrt/task-provenance.js.map +1 -0
  404. package/dist/src/orgrt/task-tools.d.ts +24 -0
  405. package/dist/src/orgrt/task-tools.d.ts.map +1 -0
  406. package/dist/src/orgrt/task-tools.js +75 -0
  407. package/dist/src/orgrt/task-tools.js.map +1 -0
  408. package/dist/src/output.d.ts +6 -0
  409. package/dist/src/output.d.ts.map +1 -1
  410. package/dist/src/output.js +13 -2
  411. package/dist/src/output.js.map +1 -1
  412. package/dist/src/protocol-capabilities.d.ts +8 -1
  413. package/dist/src/protocol-capabilities.d.ts.map +1 -1
  414. package/dist/src/protocol-capabilities.js +10 -0
  415. package/dist/src/protocol-capabilities.js.map +1 -1
  416. package/dist/src/routing/agent-pick.d.ts +44 -0
  417. package/dist/src/routing/agent-pick.d.ts.map +1 -0
  418. package/dist/src/routing/agent-pick.js +114 -0
  419. package/dist/src/routing/agent-pick.js.map +1 -0
  420. package/dist/src/routing/pick-step.d.ts +26 -0
  421. package/dist/src/routing/pick-step.d.ts.map +1 -0
  422. package/dist/src/routing/pick-step.js +40 -0
  423. package/dist/src/routing/pick-step.js.map +1 -0
  424. package/dist/src/routing/route-layer-factory.d.ts.map +1 -1
  425. package/dist/src/routing/route-layer-factory.js +19 -17
  426. package/dist/src/routing/route-layer-factory.js.map +1 -1
  427. package/dist/src/utils/resource-governor.d.ts.map +1 -1
  428. package/dist/src/utils/resource-governor.js +28 -8
  429. package/dist/src/utils/resource-governor.js.map +1 -1
  430. package/dist/tsconfig.tsbuildinfo +1 -1
  431. package/org-skills/SOURCES.md +6 -6
  432. package/org-skills/TAGS.md +146 -0
  433. package/org-skills/ab-testing/SKILL.md +2 -2
  434. package/org-skills/accessibility-compliance/SKILL.md +2 -2
  435. package/org-skills/account-strategist/SKILL.md +2 -2
  436. package/org-skills/accounts-payable/SKILL.md +2 -2
  437. package/org-skills/ad-creative/SKILL.md +2 -2
  438. package/org-skills/adaptive-coordinator/SKILL.md +2 -2
  439. package/org-skills/adaptive-coordinator2/SKILL.md +2 -2
  440. package/org-skills/advanced-evaluation/SKILL.md +2 -2
  441. package/org-skills/adversarial-reviewer/SKILL.md +2 -2
  442. package/org-skills/agent-evaluation/SKILL.md +2 -2
  443. package/org-skills/agent-memory-systems/SKILL.md +2 -2
  444. package/org-skills/agent-tool-design/SKILL.md +2 -2
  445. package/org-skills/agile-product-owner/SKILL.md +2 -2
  446. package/org-skills/ai-citation/SKILL.md +2 -2
  447. package/org-skills/ai-engineer/SKILL.md +2 -2
  448. package/org-skills/ai-seo/SKILL.md +2 -2
  449. package/org-skills/analytics-reporter/SKILL.md +2 -2
  450. package/org-skills/analytics-tracking/SKILL.md +2 -2
  451. package/org-skills/android-clean-architecture/SKILL.md +2 -2
  452. package/org-skills/angular-architect/SKILL.md +2 -2
  453. package/org-skills/api-design/SKILL.md +2 -2
  454. package/org-skills/api-designer/SKILL.md +2 -2
  455. package/org-skills/api-tester/SKILL.md +2 -2
  456. package/org-skills/app-store-optimization/SKILL.md +2 -2
  457. package/org-skills/architecture-decision-records/SKILL.md +2 -2
  458. package/org-skills/architecture-designer/SKILL.md +2 -2
  459. package/org-skills/architecture-patterns/SKILL.md +2 -2
  460. package/org-skills/article-writing/SKILL.md +2 -2
  461. package/org-skills/auth-implementation-patterns/SKILL.md +2 -2
  462. package/org-skills/automation-governance/SKILL.md +2 -2
  463. package/org-skills/avoid-ai-writing/SKILL.md +2 -2
  464. package/org-skills/backend-dev/SKILL.md +2 -2
  465. package/org-skills/backend-patterns/SKILL.md +2 -2
  466. package/org-skills/bash-defensive-patterns/SKILL.md +2 -2
  467. package/org-skills/before-you-build/SKILL.md +2 -2
  468. package/org-skills/benchmark-methodology/SKILL.md +2 -2
  469. package/org-skills/benchmarker/SKILL.md +2 -2
  470. package/org-skills/blockchain-auditor/SKILL.md +2 -2
  471. package/org-skills/board-deck-builder/SKILL.md +2 -2
  472. package/org-skills/business-investment-advisor/SKILL.md +2 -2
  473. package/org-skills/byzantine-coord/SKILL.md +2 -2
  474. package/org-skills/canvas-design/SKILL.md +2 -2
  475. package/org-skills/carrier-relationship-management/SKILL.md +2 -2
  476. package/org-skills/case-analyst/SKILL.md +2 -2
  477. package/org-skills/ceo-advisor/SKILL.md +2 -2
  478. package/org-skills/cfo-advisor/SKILL.md +2 -2
  479. package/org-skills/change-management/SKILL.md +2 -2
  480. package/org-skills/changelog-automation/SKILL.md +2 -2
  481. package/org-skills/chro-advisor/SKILL.md +2 -2
  482. package/org-skills/churn-prevention/SKILL.md +2 -2
  483. package/org-skills/cicd-engineer/SKILL.md +2 -2
  484. package/org-skills/ciso-advisor/SKILL.md +2 -2
  485. package/org-skills/click-path-audit/SKILL.md +2 -2
  486. package/org-skills/cloud-architect/SKILL.md +2 -2
  487. package/org-skills/cloud-architecture/SKILL.md +2 -2
  488. package/org-skills/cmo-advisor/SKILL.md +2 -2
  489. package/org-skills/co-marketing/SKILL.md +2 -2
  490. package/org-skills/code-documenter/SKILL.md +2 -2
  491. package/org-skills/code-review-swarm/SKILL.md +2 -2
  492. package/org-skills/code-reviewer/SKILL.md +2 -2
  493. package/org-skills/coder/SKILL.md +2 -2
  494. package/org-skills/coding-standards/SKILL.md +2 -2
  495. package/org-skills/cold-email/SKILL.md +2 -2
  496. package/org-skills/collective-coord/SKILL.md +2 -2
  497. package/org-skills/community-marketing/SKILL.md +2 -2
  498. package/org-skills/competitive-landscape/SKILL.md +2 -2
  499. package/org-skills/competitive-platform-analysis/SKILL.md +2 -2
  500. package/org-skills/competitive-report-structure/SKILL.md +2 -2
  501. package/org-skills/competitive-teardown/SKILL.md +2 -2
  502. package/org-skills/competitor-comparison-pages/SKILL.md +2 -2
  503. package/org-skills/compliance-auditor/SKILL.md +2 -2
  504. package/org-skills/consensus-coordinator/SKILL.md +2 -2
  505. package/org-skills/content-creator/SKILL.md +2 -2
  506. package/org-skills/content-engine/SKILL.md +2 -2
  507. package/org-skills/content-strategy/SKILL.md +2 -2
  508. package/org-skills/context-compression/SKILL.md +2 -2
  509. package/org-skills/context-degradation/SKILL.md +2 -2
  510. package/org-skills/context-fundamentals/SKILL.md +2 -2
  511. package/org-skills/context-optimization/SKILL.md +2 -2
  512. package/org-skills/contract-and-proposal-writer/SKILL.md +1 -1
  513. package/org-skills/contract-first/SKILL.md +2 -2
  514. package/org-skills/coo-advisor/SKILL.md +2 -2
  515. package/org-skills/copy-editing/SKILL.md +2 -2
  516. package/org-skills/copywriting/SKILL.md +2 -2
  517. package/org-skills/cost-aware-llm-pipeline/SKILL.md +2 -2
  518. package/org-skills/cost-optimization/SKILL.md +2 -2
  519. package/org-skills/cpp-coding-standards/SKILL.md +2 -2
  520. package/org-skills/cpp-pro/SKILL.md +2 -2
  521. package/org-skills/cro-advisor/SKILL.md +2 -2
  522. package/org-skills/cro-specialist/SKILL.md +2 -2
  523. package/org-skills/csharp-developer/SKILL.md +2 -2
  524. package/org-skills/cto-advisor/SKILL.md +2 -2
  525. package/org-skills/culture-architect/SKILL.md +2 -2
  526. package/org-skills/customer-research/SKILL.md +2 -2
  527. package/org-skills/customs-trade-compliance/SKILL.md +2 -2
  528. package/org-skills/dart-flutter-patterns/SKILL.md +2 -2
  529. package/org-skills/dashboard-builder/SKILL.md +2 -2
  530. package/org-skills/data-consolidator/SKILL.md +2 -2
  531. package/org-skills/data-engineer/SKILL.md +2 -2
  532. package/org-skills/data-quality-frameworks/SKILL.md +2 -2
  533. package/org-skills/data-storytelling/SKILL.md +2 -2
  534. package/org-skills/database-migrations/SKILL.md +2 -2
  535. package/org-skills/database-optimizer/SKILL.md +2 -2
  536. package/org-skills/dbt-transformation-patterns/SKILL.md +2 -2
  537. package/org-skills/deal-strategist/SKILL.md +2 -2
  538. package/org-skills/debugging-wizard/SKILL.md +2 -2
  539. package/org-skills/deep-research/SKILL.md +2 -2
  540. package/org-skills/defender/SKILL.md +2 -2
  541. package/org-skills/dependency-upgrade/SKILL.md +2 -2
  542. package/org-skills/deployment-patterns/SKILL.md +2 -2
  543. package/org-skills/deployment-pipeline-design/SKILL.md +2 -2
  544. package/org-skills/design-system/SKILL.md +2 -2
  545. package/org-skills/design-system-patterns/SKILL.md +2 -2
  546. package/org-skills/devops-automator/SKILL.md +2 -2
  547. package/org-skills/devops-engineer/SKILL.md +2 -2
  548. package/org-skills/discovery-coach/SKILL.md +2 -2
  549. package/org-skills/django-expert/SKILL.md +2 -2
  550. package/org-skills/django-patterns/SKILL.md +2 -2
  551. package/org-skills/docker-patterns/SKILL.md +2 -2
  552. package/org-skills/dotnet-patterns/SKILL.md +2 -2
  553. package/org-skills/e2e-testing/SKILL.md +2 -2
  554. package/org-skills/email-marketing/SKILL.md +2 -2
  555. package/org-skills/email-sequences/SKILL.md +2 -2
  556. package/org-skills/embedded-firmware/SKILL.md +2 -2
  557. package/org-skills/embedded-systems/SKILL.md +2 -2
  558. package/org-skills/employment-contract-templates/SKILL.md +2 -2
  559. package/org-skills/energy-procurement/SKILL.md +2 -2
  560. package/org-skills/error-handling/SKILL.md +2 -2
  561. package/org-skills/event-marketing/SKILL.md +2 -2
  562. package/org-skills/evidence-collector/SKILL.md +2 -2
  563. package/org-skills/experiment-designer/SKILL.md +2 -2
  564. package/org-skills/experiment-tracker/SKILL.md +2 -2
  565. package/org-skills/experimental-design/SKILL.md +2 -2
  566. package/org-skills/fastapi-expert/SKILL.md +2 -2
  567. package/org-skills/fastapi-patterns/SKILL.md +2 -2
  568. package/org-skills/feedback-synthesizer/SKILL.md +2 -2
  569. package/org-skills/finance-tracker/SKILL.md +2 -2
  570. package/org-skills/finishing-a-development-branch/SKILL.md +2 -2
  571. package/org-skills/flutter-expert/SKILL.md +2 -2
  572. package/org-skills/focused-fix/SKILL.md +2 -2
  573. package/org-skills/free-tool-strategy/SKILL.md +2 -2
  574. package/org-skills/frontend-design/SKILL.md +2 -2
  575. package/org-skills/frontend-design-direction/SKILL.md +2 -2
  576. package/org-skills/frontend-developer/SKILL.md +2 -2
  577. package/org-skills/frontend-patterns/SKILL.md +2 -2
  578. package/org-skills/game-audio-engineer/SKILL.md +2 -2
  579. package/org-skills/game-designer/SKILL.md +2 -2
  580. package/org-skills/gdpr-data-handling/SKILL.md +2 -2
  581. package/org-skills/general-counsel-advisor/SKILL.md +2 -2
  582. package/org-skills/git-advanced-workflows/SKILL.md +2 -2
  583. package/org-skills/git-workflow/SKILL.md +2 -2
  584. package/org-skills/golang-patterns/SKILL.md +2 -2
  585. package/org-skills/golang-pro/SKILL.md +2 -2
  586. package/org-skills/harness-engineering/SKILL.md +2 -2
  587. package/org-skills/healthcare-phi-compliance/SKILL.md +2 -2
  588. package/org-skills/hexagonal-architecture/SKILL.md +2 -2
  589. package/org-skills/hierarchical-coord/SKILL.md +2 -2
  590. package/org-skills/huggingface-transformers/SKILL.md +2 -2
  591. package/org-skills/hypothesis-generation/SKILL.md +2 -2
  592. package/org-skills/incident-command-playbook/SKILL.md +2 -2
  593. package/org-skills/incident-commander/SKILL.md +2 -2
  594. package/org-skills/incident-runbook-templates/SKILL.md +2 -2
  595. package/org-skills/influencer-marketing/SKILL.md +2 -2
  596. package/org-skills/infrastructure/SKILL.md +2 -2
  597. package/org-skills/input-validator/SKILL.md +2 -2
  598. package/org-skills/intent-driven-development/SKILL.md +2 -2
  599. package/org-skills/inventory-demand-planning/SKILL.md +2 -2
  600. package/org-skills/investor-materials/SKILL.md +2 -2
  601. package/org-skills/ios-developer/SKILL.md +2 -2
  602. package/org-skills/isms-audit-expert/SKILL.md +2 -2
  603. package/org-skills/issue-tracker/SKILL.md +2 -2
  604. package/org-skills/java-architect/SKILL.md +2 -2
  605. package/org-skills/java-coding-standards/SKILL.md +2 -2
  606. package/org-skills/judge/SKILL.md +2 -2
  607. package/org-skills/kotlin-patterns/SKILL.md +2 -2
  608. package/org-skills/kotlin-specialist/SKILL.md +2 -2
  609. package/org-skills/kpi-dashboard-design/SKILL.md +2 -2
  610. package/org-skills/kubernetes-patterns/SKILL.md +2 -2
  611. package/org-skills/kubernetes-specialist/SKILL.md +2 -2
  612. package/org-skills/laravel-patterns/SKILL.md +2 -2
  613. package/org-skills/launch-strategist/SKILL.md +2 -2
  614. package/org-skills/launch-strategy/SKILL.md +2 -2
  615. package/org-skills/lead-magnets/SKILL.md +2 -2
  616. package/org-skills/legacy-modernizer/SKILL.md +2 -2
  617. package/org-skills/legal-compliance/SKILL.md +2 -2
  618. package/org-skills/level-designer/SKILL.md +2 -2
  619. package/org-skills/llm-cost-optimizer/SKILL.md +2 -2
  620. package/org-skills/llm-evaluation/SKILL.md +2 -2
  621. package/org-skills/llm-project-development/SKILL.md +2 -2
  622. package/org-skills/load-balancer/SKILL.md +2 -2
  623. package/org-skills/logistics-exception-management/SKILL.md +2 -2
  624. package/org-skills/long-horizon-prompting/SKILL.md +2 -2
  625. package/org-skills/make-interfaces-feel-better/SKILL.md +2 -2
  626. package/org-skills/markdown-mermaid-writing/SKILL.md +2 -2
  627. package/org-skills/market-research/SKILL.md +2 -2
  628. package/org-skills/market-research-reports/SKILL.md +2 -2
  629. package/org-skills/market-sizing-analysis/SKILL.md +2 -2
  630. package/org-skills/marketing-attribution/SKILL.md +2 -2
  631. package/org-skills/marketing-campaign/SKILL.md +2 -2
  632. package/org-skills/marketing-council/SKILL.md +2 -2
  633. package/org-skills/marketing-demand-acquisition/SKILL.md +2 -2
  634. package/org-skills/marketing-loops/SKILL.md +2 -2
  635. package/org-skills/marketing-plan/SKILL.md +2 -2
  636. package/org-skills/marketing-psychology/SKILL.md +2 -2
  637. package/org-skills/marketing-strategy-pmm/SKILL.md +2 -2
  638. package/org-skills/markitdown-document-conversion/SKILL.md +2 -2
  639. package/org-skills/mcp-builder/SKILL.md +2 -2
  640. package/org-skills/mcp-server-builder/SKILL.md +2 -2
  641. package/org-skills/mcp-server-patterns/SKILL.md +2 -2
  642. package/org-skills/memory-coordinator/SKILL.md +2 -2
  643. package/org-skills/mesh-coordinator/SKILL.md +2 -2
  644. package/org-skills/ml-developer/SKILL.md +2 -2
  645. package/org-skills/ml-pipeline/SKILL.md +2 -2
  646. package/org-skills/mle-workflow/SKILL.md +2 -2
  647. package/org-skills/mobile-app-builder/SKILL.md +2 -2
  648. package/org-skills/mobile-dev/SKILL.md +2 -2
  649. package/org-skills/model-qa/SKILL.md +2 -2
  650. package/org-skills/monitoring-expert/SKILL.md +2 -2
  651. package/org-skills/monodesign-ui-quality/SKILL.md +2 -2
  652. package/org-skills/monograph-code-navigation/SKILL.md +2 -2
  653. package/org-skills/monolean-minimal-change/SKILL.md +2 -2
  654. package/org-skills/multi-agent-patterns/SKILL.md +2 -2
  655. package/org-skills/mysql-patterns/SKILL.md +2 -2
  656. package/org-skills/narrative-designer/SKILL.md +2 -2
  657. package/org-skills/nextjs-developer/SKILL.md +2 -2
  658. package/org-skills/offer-design/SKILL.md +2 -2
  659. package/org-skills/onboarding-cro/SKILL.md +2 -2
  660. package/org-skills/outbound-strategist/SKILL.md +2 -2
  661. package/org-skills/page-cro/SKILL.md +2 -2
  662. package/org-skills/paid-ads/SKILL.md +2 -2
  663. package/org-skills/pandas-pro/SKILL.md +2 -2
  664. package/org-skills/path-validator/SKILL.md +2 -2
  665. package/org-skills/payment-agent/SKILL.md +2 -2
  666. package/org-skills/pci-compliance/SKILL.md +2 -2
  667. package/org-skills/perf-analyzer/SKILL.md +2 -2
  668. package/org-skills/php-pro/SKILL.md +2 -2
  669. package/org-skills/pipeline-analyst/SKILL.md +2 -2
  670. package/org-skills/planner/SKILL.md +2 -2
  671. package/org-skills/playwright-expert/SKILL.md +2 -2
  672. package/org-skills/postgres-patterns/SKILL.md +2 -2
  673. package/org-skills/postgresql-table-design/SKILL.md +2 -2
  674. package/org-skills/postmortem-writing/SKILL.md +2 -2
  675. package/org-skills/pr-manager/SKILL.md +2 -2
  676. package/org-skills/pricing-strategist/SKILL.md +2 -2
  677. package/org-skills/pricing-strategy/SKILL.md +2 -2
  678. package/org-skills/prisma-patterns/SKILL.md +2 -2
  679. package/org-skills/product-capability/SKILL.md +2 -2
  680. package/org-skills/product-discovery/SKILL.md +2 -2
  681. package/org-skills/product-lens/SKILL.md +2 -2
  682. package/org-skills/product-manager/SKILL.md +2 -2
  683. package/org-skills/product-marketing-context/SKILL.md +2 -2
  684. package/org-skills/production-audit/SKILL.md +2 -2
  685. package/org-skills/production-scheduling/SKILL.md +2 -2
  686. package/org-skills/production-validator/SKILL.md +2 -2
  687. package/org-skills/programmatic-seo/SKILL.md +2 -2
  688. package/org-skills/project-shepherd/SKILL.md +2 -2
  689. package/org-skills/prompt-engineer/SKILL.md +2 -2
  690. package/org-skills/proposal-strategist/SKILL.md +2 -2
  691. package/org-skills/prosecutor/SKILL.md +2 -2
  692. package/org-skills/public-relations/SKILL.md +2 -2
  693. package/org-skills/pymc-bayesian-modeling/SKILL.md +2 -2
  694. package/org-skills/python-patterns/SKILL.md +2 -2
  695. package/org-skills/python-pro/SKILL.md +2 -2
  696. package/org-skills/python-testing/SKILL.md +2 -2
  697. package/org-skills/quality-nonconformance/SKILL.md +2 -2
  698. package/org-skills/queen-coordinator/SKILL.md +2 -2
  699. package/org-skills/quorum-manager/SKILL.md +2 -2
  700. package/org-skills/raft-manager/SKILL.md +2 -2
  701. package/org-skills/rag-architect/SKILL.md +2 -2
  702. package/org-skills/rails-patterns/SKILL.md +2 -2
  703. package/org-skills/react-expert/SKILL.md +2 -2
  704. package/org-skills/react-native-expert/SKILL.md +2 -2
  705. package/org-skills/react-native-patterns/SKILL.md +2 -2
  706. package/org-skills/react-patterns/SKILL.md +2 -2
  707. package/org-skills/react-performance/SKILL.md +2 -2
  708. package/org-skills/react-testing/SKILL.md +2 -2
  709. package/org-skills/reality-checker/SKILL.md +2 -2
  710. package/org-skills/receiving-code-review/SKILL.md +2 -2
  711. package/org-skills/recruitment/SKILL.md +2 -2
  712. package/org-skills/redis-patterns/SKILL.md +2 -2
  713. package/org-skills/referral-programs/SKILL.md +2 -2
  714. package/org-skills/release-manager/SKILL.md +2 -2
  715. package/org-skills/repo-architect/SKILL.md +2 -2
  716. package/org-skills/researcher/SKILL.md +2 -2
  717. package/org-skills/resource-allocator/SKILL.md +2 -2
  718. package/org-skills/responsive-design/SKILL.md +2 -2
  719. package/org-skills/returns-reverse-logistics/SKILL.md +2 -2
  720. package/org-skills/reviewer/SKILL.md +2 -2
  721. package/org-skills/revops/SKILL.md +2 -2
  722. package/org-skills/roadmap-communicator/SKILL.md +2 -2
  723. package/org-skills/rust-engineer/SKILL.md +2 -2
  724. package/org-skills/rust-patterns/SKILL.md +2 -2
  725. package/org-skills/safe-executor/SKILL.md +2 -2
  726. package/org-skills/sales-coach/SKILL.md +2 -2
  727. package/org-skills/sales-enablement/SKILL.md +2 -2
  728. package/org-skills/sales-engineer/SKILL.md +2 -2
  729. package/org-skills/sales-prospecting/SKILL.md +2 -2
  730. package/org-skills/schema-markup/SKILL.md +2 -2
  731. package/org-skills/scientific-brainstorming/SKILL.md +2 -2
  732. package/org-skills/scientific-critical-thinking/SKILL.md +2 -2
  733. package/org-skills/scientific-thinking-literature-review/SKILL.md +2 -2
  734. package/org-skills/scientific-thinking-scholar-evaluation/SKILL.md +2 -2
  735. package/org-skills/scientific-visualization/SKILL.md +2 -2
  736. package/org-skills/scientific-writing/SKILL.md +2 -2
  737. package/org-skills/scout-explorer/SKILL.md +2 -2
  738. package/org-skills/secrets-vault-manager/SKILL.md +2 -2
  739. package/org-skills/secure-code-guardian/SKILL.md +2 -2
  740. package/org-skills/security-architect/SKILL.md +2 -2
  741. package/org-skills/security-auditor/SKILL.md +2 -2
  742. package/org-skills/security-review/SKILL.md +2 -2
  743. package/org-skills/security-reviewer/SKILL.md +2 -2
  744. package/org-skills/senior-data-scientist/SKILL.md +2 -2
  745. package/org-skills/senior-developer/SKILL.md +2 -2
  746. package/org-skills/senior-pm/SKILL.md +2 -2
  747. package/org-skills/senior-pm-playbook/SKILL.md +2 -2
  748. package/org-skills/seo/SKILL.md +2 -2
  749. package/org-skills/seo-audit/SKILL.md +2 -2
  750. package/org-skills/seo-specialist/SKILL.md +2 -2
  751. package/org-skills/shap-model-explainability/SKILL.md +2 -2
  752. package/org-skills/signup-flow-cro/SKILL.md +2 -2
  753. package/org-skills/site-architecture/SKILL.md +2 -2
  754. package/org-skills/sms-marketing/SKILL.md +2 -2
  755. package/org-skills/soc2-compliance/SKILL.md +2 -2
  756. package/org-skills/social-content/SKILL.md +2 -2
  757. package/org-skills/social-media/SKILL.md +2 -2
  758. package/org-skills/social-media-manager/SKILL.md +2 -2
  759. package/org-skills/solidity-engineer/SKILL.md +2 -2
  760. package/org-skills/spark-engineer/SKILL.md +2 -2
  761. package/org-skills/spec-driven-workflow/SKILL.md +2 -2
  762. package/org-skills/springboot-patterns/SKILL.md +2 -2
  763. package/org-skills/sprint-prioritizer/SKILL.md +2 -2
  764. package/org-skills/sql-pro/SKILL.md +2 -2
  765. package/org-skills/sre/SKILL.md +2 -2
  766. package/org-skills/sre-engineer/SKILL.md +2 -2
  767. package/org-skills/startup-financial-modeling/SKILL.md +2 -2
  768. package/org-skills/startup-metrics-framework/SKILL.md +2 -2
  769. package/org-skills/statistical-analysis/SKILL.md +2 -2
  770. package/org-skills/statistical-power/SKILL.md +2 -2
  771. package/org-skills/stride-analysis-patterns/SKILL.md +2 -2
  772. package/org-skills/stripe-integration/SKILL.md +2 -2
  773. package/org-skills/studio-operations/SKILL.md +2 -2
  774. package/org-skills/studio-producer/SKILL.md +2 -2
  775. package/org-skills/support-responder/SKILL.md +2 -2
  776. package/org-skills/swift-expert/SKILL.md +2 -2
  777. package/org-skills/swiftui-patterns/SKILL.md +2 -2
  778. package/org-skills/system-architect/SKILL.md +2 -2
  779. package/org-skills/systematic-debugging/SKILL.md +2 -2
  780. package/org-skills/task-orchestrator/SKILL.md +2 -2
  781. package/org-skills/team-communications/SKILL.md +2 -2
  782. package/org-skills/team-composition-analysis/SKILL.md +2 -2
  783. package/org-skills/technical-artist/SKILL.md +2 -2
  784. package/org-skills/technical-writer/SKILL.md +2 -2
  785. package/org-skills/terraform-engineer/SKILL.md +2 -2
  786. package/org-skills/test-driven-development/SKILL.md +2 -2
  787. package/org-skills/test-master/SKILL.md +2 -2
  788. package/org-skills/tester/SKILL.md +2 -2
  789. package/org-skills/the-fool/SKILL.md +2 -2
  790. package/org-skills/theme-factory/SKILL.md +2 -2
  791. package/org-skills/threat-detection/SKILL.md +2 -2
  792. package/org-skills/threat-mitigation-mapping/SKILL.md +2 -2
  793. package/org-skills/trend-researcher/SKILL.md +2 -2
  794. package/org-skills/trial-director/SKILL.md +2 -2
  795. package/org-skills/typescript-pro/SKILL.md +2 -2
  796. package/org-skills/unity-architect/SKILL.md +2 -2
  797. package/org-skills/using-git-worktrees/SKILL.md +2 -2
  798. package/org-skills/ux-researcher-designer/SKILL.md +2 -2
  799. package/org-skills/verification-before-completion/SKILL.md +2 -2
  800. package/org-skills/visionos-engineer/SKILL.md +2 -2
  801. package/org-skills/visual-design-foundations/SKILL.md +2 -2
  802. package/org-skills/vue-expert/SKILL.md +2 -2
  803. package/org-skills/vue-patterns/SKILL.md +2 -2
  804. package/org-skills/worker-specialist/SKILL.md +2 -2
  805. package/org-skills/workflow-architect/SKILL.md +2 -2
  806. package/org-skills/workflow-automation/SKILL.md +2 -2
  807. package/org-skills/writing-plans/SKILL.md +2 -2
  808. package/org-skills/zk-steward/SKILL.md +2 -2
  809. package/package.json +5 -5
  810. package/.claude/helpers/skill-registry.json +0 -5997
  811. package/dist/src/routing/jev-step.d.ts +0 -17
  812. package/dist/src/routing/jev-step.d.ts.map +0 -1
  813. package/dist/src/routing/jev-step.js +0 -27
  814. package/dist/src/routing/jev-step.js.map +0 -1
  815. package/org-skills/accessibility/LICENSE.txt +0 -21
  816. package/org-skills/accessibility/SKILL.md +0 -149
  817. package/org-skills/database-migration/LICENSE.txt +0 -21
  818. package/org-skills/database-migration/SKILL.md +0 -337
  819. package/org-skills/database-migration/references/details.md +0 -76
  820. package/org-skills/error-handling-patterns/LICENSE.txt +0 -21
  821. package/org-skills/error-handling-patterns/SKILL.md +0 -126
  822. package/org-skills/error-handling-patterns/references/details.md +0 -516
  823. package/org-skills/internal-comms/LICENSE.txt +0 -202
  824. package/org-skills/internal-comms/SKILL.md +0 -36
  825. package/org-skills/internal-comms/examples/3p-updates.md +0 -47
  826. package/org-skills/internal-comms/examples/company-newsletter.md +0 -65
  827. package/org-skills/internal-comms/examples/faq-answers.md +0 -30
  828. package/org-skills/internal-comms/examples/general-comms.md +0 -16
@@ -1,161 +1,16 @@
1
1
  'use strict';
2
2
  /**
3
- * Keyword-based task router for hook-handler.cjs
4
- * Returns: { agent, agentSlug, confidence, reason, semanticRouting, specificAgents, skillMatches, extrasMatches }
3
+ * Skill keyword matcher for the prompt hook.
4
+ *
5
+ * handlers/route-handler.cjs calls matchSkills() for its skill hint. Agent
6
+ * picks come from .monomind/registry.json via the pick index, not from this
7
+ * file: the keyword agent table (routeTask) that used to live here named
8
+ * slugs that are not installed agents, and nothing at runtime called it.
5
9
  *
6
10
  * Exports:
7
- * routeTask(prompt) → routing result object
8
- * routeTaskSemantic(prompt) → alias for routeTask
9
- * matchSkills(prompt, topN) → array of { skill, invoke, score }
10
- * matchExtras(prompt, topN) → array of { slug, name, category, score }
11
- * buildCategoryList() → array of { name, count, examples }
12
- * getAgentsInCategory(cat) → array of { slug, name }
13
- * AGENT_CAPABILITIES → { [slug]: string[] }
14
- * TASK_PATTERNS → { [agentSlug]: RegExp }
11
+ * matchSkills(prompt, topN) → array of { skill, invoke, description, score }
15
12
  */
16
13
 
17
- // ── Dev patterns (slug-correct) ─────────────────────────────────────────────
18
- // TASK_PATTERNS: { keywords: agentSlug } — exported for introspection
19
- // Values are agent slugs; keys describe what keywords trigger that agent.
20
-
21
- var TASK_PATTERNS = {
22
- 'test|spec|coverage|vitest|jest|mocha|e2e': 'tester',
23
- 'review|audit|code quality|lint|refactor|cleanup': 'reviewer',
24
- 'architect|system design|ADR|bounded context|architecture': 'architect',
25
- 'security|vulnerability|CVE|injection|XSS|CSRF|OWASP': 'security-engineer',
26
- 'deploy|CI/CD|docker|kubernetes|infra|devops|helm|terraform': 'devops',
27
- 'document|readme|docs|api reference|jsdoc': 'technical-writer',
28
- 'research|investigate|explore|analyze|survey|compare': 'researcher',
29
- 'plan|roadmap|prioritize|breakdown|estimate': 'planner',
30
- 'mobile|ios|android|react native|flutter': 'mobile-dev',
31
- 'ml|machine learning|neural network|model training': 'ai-engineer',
32
- 'api|rest|graphql|endpoint|http|websocket|grpc|optimize': 'backend-dev',
33
- 'ui|frontend|react|vue|component|css|layout|style': 'frontend-dev',
34
- 'bug|fix|error|feature|implement|build|create|develop': 'coder',
35
- };
36
-
37
- // Internal routing patterns (regex per slug for routeTask)
38
- var _ROUTING_PATTERNS = {
39
- 'tester': /\b(test|tests|spec|coverage|vitest|jest|mocha|e2e)\b/i,
40
- 'reviewer': /\b(review|audit|code quality|lint|smell|refactor|clean up|cleanup)\b/i,
41
- 'architect': /\b(architect|system design|ADR|domain|bounded context|microservice|architecture)\b/i,
42
- 'security-engineer': /\b(security|vulnerability|CVE|injection|XSS|CSRF|OWASP)\b/i,
43
- 'devops': /\b(deploy|CI\/CD|docker|kubernetes|infra|devops|helm|terraform)\b/i,
44
- 'technical-writer': /\b(document|readme|docs|api reference|jsdoc|write up)\b/i,
45
- 'researcher': /\b(research|investigate|explore|analyze|survey|compare)\b/i,
46
- 'planner': /\b(plan|roadmap|prioritize|breakdown|estimate)\b/i,
47
- 'mobile-dev': /\b(mobile|ios|android|react native|flutter)\b/i,
48
- 'ai-engineer': /\b(ml|machine learning|neural network|model training|inference)\b/i,
49
- 'backend-dev': /\b(api|rest|graphql|endpoint|http|websocket|grpc|optimize)\b/i,
50
- 'frontend-dev': /\b(ui|frontend|react|vue|component|css|layout|style)\b/i,
51
- 'coder': /\b(bug|fix|error|exception|crash|broken|fail|regression|feature|implement|add|build|create|develop|new|memory|vector|embedding|hook|swarm|agent|mcp|cli|routing|monomind)\b/i,
52
- };
53
-
54
- var TASK_CONFIDENCES = {
55
- 'tester': 0.85,
56
- 'reviewer': 0.82,
57
- 'architect': 0.85,
58
- 'security-engineer': 0.90,
59
- 'devops': 0.85,
60
- 'technical-writer': 0.82,
61
- 'researcher': 0.78,
62
- 'planner': 0.80,
63
- 'mobile-dev': 0.88,
64
- 'ai-engineer': 0.85,
65
- 'backend-dev': 0.80,
66
- 'frontend-dev': 0.80,
67
- 'coder': 0.80,
68
- };
69
-
70
- var TASK_AGENTS = {
71
- 'tester': 'Tester',
72
- 'reviewer': 'Reviewer',
73
- 'architect': 'Architect',
74
- 'security-engineer': 'Security Engineer',
75
- 'devops': 'DevOps',
76
- 'technical-writer': 'Technical Writer',
77
- 'researcher': 'Researcher',
78
- 'planner': 'Planner',
79
- 'mobile-dev': 'Mobile Developer',
80
- 'ai-engineer': 'AI Engineer',
81
- 'backend-dev': 'Backend Developer',
82
- 'frontend-dev': 'Frontend Developer',
83
- 'coder': 'Coder',
84
- };
85
-
86
- // Priority order: higher-priority slugs checked first
87
- var DEV_PRIORITY = [
88
- 'tester', 'reviewer', 'architect', 'security-engineer', 'devops',
89
- 'mobile-dev', 'ai-engineer', 'frontend-dev', 'backend-dev',
90
- 'researcher', 'planner', 'technical-writer', 'coder',
91
- ];
92
-
93
- // ── AGENT_CAPABILITIES ────────────────────────────────────────────────────────
94
-
95
- var AGENT_CAPABILITIES = {
96
- 'coder': ['implement', 'fix', 'build', 'develop', 'create'],
97
- 'tester': ['test', 'spec', 'coverage', 'vitest', 'jest', 'e2e'],
98
- 'reviewer': ['review', 'audit', 'refactor', 'code quality', 'lint'],
99
- 'researcher': ['research', 'investigate', 'analyze', 'survey', 'compare'],
100
- 'architect': ['design', 'architecture', 'ADR', 'domain', 'microservice'],
101
- 'planner': ['plan', 'roadmap', 'strategy', 'prioritize', 'estimate'],
102
- 'security-engineer': ['security', 'vulnerability', 'CVE', 'XSS', 'CSRF'],
103
- 'backend-dev': ['api', 'rest', 'graphql', 'endpoint', 'http', 'grpc'],
104
- 'frontend-dev': ['ui', 'frontend', 'react', 'css', 'component', 'layout'],
105
- 'devops': ['deploy', 'docker', 'kubernetes', 'CI/CD', 'terraform'],
106
- 'mobile-dev': ['mobile', 'ios', 'android', 'react native', 'flutter'],
107
- 'ai-engineer': ['ml', 'machine learning', 'model', 'neural', 'inference'],
108
- 'technical-writer': ['docs', 'readme', 'document', 'jsdoc', 'api reference'],
109
- };
110
-
111
- // ── Non-dev domain agent registry ─────────────────────────────────────────────
112
-
113
- var DOMAIN_AGENTS = [
114
- // Marketing
115
- { slug: 'content-strategist', name: 'Content Strategist', category: 'marketing',
116
- keywords: /\b(content|brand|blogging|copywriting|content strategy)\b/i },
117
- { slug: 'seo-specialist', name: 'SEO Specialist', category: 'marketing',
118
- keywords: /\b(seo|search engine|keyword research|backlink|organic traffic)\b/i },
119
- { slug: 'social-media-manager', name: 'Social Media Manager', category: 'marketing',
120
- keywords: /\b(social media|instagram|tiktok|twitter|linkedin|facebook|campaign)\b/i },
121
- { slug: 'marketing-analyst', name: 'Marketing Analyst', category: 'marketing',
122
- keywords: /\b(marketing|advertising|analytics|conversion|funnel|cpm|cpa)\b/i },
123
-
124
- // Sales
125
- { slug: 'sales-strategist', name: 'Sales Strategist', category: 'sales',
126
- keywords: /\b(sales|crm|lead generation|prospect|quota|sales revenue)\b/i },
127
- { slug: 'account-manager', name: 'Account Manager', category: 'sales',
128
- keywords: /\b(account management|client relationship|upsell|renewal|b2b)\b/i },
129
-
130
- // Academic
131
- { slug: 'academic-researcher', name: 'Academic Researcher', category: 'academic',
132
- keywords: /\b(anthropolog|ethnograph|kinship|cultural ritual|qualitative study|thesis|dissertation|peer review|academic)\b/i },
133
- { slug: 'data-scientist', name: 'Data Scientist', category: 'academic',
134
- keywords: /\b(statistical analysis|regression|hypothesis|p-value|dataset|R studio)\b/i },
135
-
136
- // Game development
137
- { slug: 'game-developer', name: 'Game Developer', category: 'game-development',
138
- keywords: /\b(unity|unreal|godot|game engine|shader|sprite|tilemap|game jam)\b/i },
139
- { slug: 'game-designer', name: 'Game Designer', category: 'game-development',
140
- keywords: /\b(game design|game mechanic|level design|player experience|narrative design)\b/i },
141
-
142
- // Legal / Finance
143
- { slug: 'legal-advisor', name: 'Legal Advisor', category: 'legal',
144
- keywords: /\b(legal|contract|compliance|regulation|gdpr|liability|intellectual property)\b/i },
145
- { slug: 'financial-analyst', name: 'Financial Analyst', category: 'finance',
146
- keywords: /\b(finance|investment|portfolio|valuation|balance sheet|ROI|P&L)\b/i },
147
-
148
- // HR / Operations
149
- { slug: 'hr-specialist', name: 'HR Specialist', category: 'hr',
150
- keywords: /\b(hiring|recruitment|onboarding|performance review|employee|hr|human resources)\b/i },
151
- ];
152
-
153
- // Categories that are opt-in (only returned when keywords match)
154
- var OPT_IN_CATEGORIES = new Set(['academic', 'game-development', 'legal', 'finance', 'hr']);
155
-
156
- // Marketing is also opt-in — keywords must match
157
- var MARKETING_OPTIN = /\b(marketing|seo|social media|advertising|campaign|content strategy|tiktok|instagram|brand)\b/i;
158
-
159
14
  // ── Skills registry ────────────────────────────────────────────────────────────
160
15
  // Loaded from .claude/helpers/skill-registry.json, which is generated from the
161
16
  // live .claude/commands + .claude/skills trees by build-skill-registry.cjs.
@@ -217,174 +72,10 @@ function loadSkills() {
217
72
  return skills;
218
73
  }
219
74
 
220
- // ── Feedback weight system ────────────────────────────────────────────────────
221
- // Reads routing-feedback.jsonl (written by session-handler at session-end) and
222
- // computes per-agent success rates. Adjusts routing confidence by up to +/-0.10
223
- // so agents with proven track records get a slight boost and poor performers get
224
- // dampened. Cached with a 60-second TTL to avoid repeated disk reads.
225
-
226
- var _feedbackWeightsCache = null;
227
- var _feedbackWeightsCacheTs = 0;
228
- var FEEDBACK_TTL_MS = 60000;
229
-
230
- function loadFeedbackWeights() {
231
- var now = Date.now();
232
- if (_feedbackWeightsCache && (now - _feedbackWeightsCacheTs) < FEEDBACK_TTL_MS) {
233
- return _feedbackWeightsCache;
234
- }
235
- var weights = {};
236
- try {
237
- var fs = require('fs');
238
- var path = require('path');
239
- var cwd = process.env.CLAUDE_PROJECT_DIR || process.cwd();
240
- var feedbackPath = path.join(cwd, '.monomind', 'routing-feedback.jsonl');
241
- var MAX_SIZE = 512 * 1024;
242
- if (!fs.existsSync(feedbackPath)) {
243
- _feedbackWeightsCache = weights;
244
- _feedbackWeightsCacheTs = now;
245
- return weights;
246
- }
247
- var stat = fs.statSync(feedbackPath);
248
- if (stat.size > MAX_SIZE) {
249
- _feedbackWeightsCache = weights;
250
- _feedbackWeightsCacheTs = now;
251
- return weights;
252
- }
253
- var lines = fs.readFileSync(feedbackPath, 'utf-8').trim().split('\n').filter(Boolean);
254
- // Use last 200 entries for weight calculation
255
- var recent = lines.slice(-200);
256
- var agentStats = {};
257
- for (var i = 0; i < recent.length; i++) {
258
- try {
259
- var entry = JSON.parse(recent[i]);
260
- var agent = entry.suggestedAgent;
261
- if (!agent) continue;
262
- // Skip no-evidence records (sessionSuccess null/missing) — they carry no signal
263
- if (typeof entry.intelligenceFeedback !== 'boolean') continue;
264
- if (!agentStats[agent]) agentStats[agent] = { total: 0, successes: 0 };
265
- agentStats[agent].total++;
266
- if (entry.intelligenceFeedback === true) agentStats[agent].successes++;
267
- } catch (e) {}
268
- }
269
- // Compute weight adjustments: agents with >= 5 data points get a weight
270
- // successRate > 0.7 → positive boost (up to +0.10)
271
- // successRate < 0.4 → negative dampen (down to -0.10)
272
- // In between → neutral (0)
273
- for (var ag in agentStats) {
274
- var s = agentStats[ag];
275
- if (s.total < 5) continue;
276
- var rate = s.successes / s.total;
277
- if (rate > 0.7) {
278
- weights[ag] = Math.min(0.10, (rate - 0.7) * 0.33);
279
- } else if (rate < 0.4) {
280
- weights[ag] = Math.max(-0.10, (rate - 0.4) * 0.25);
281
- }
282
- }
283
- } catch (e) { /* non-fatal */ }
284
- _feedbackWeightsCache = weights;
285
- _feedbackWeightsCacheTs = now;
286
- return weights;
287
- }
288
-
289
- function applyFeedbackWeight(agentSlug, baseConfidence) {
290
- var weights = loadFeedbackWeights();
291
- var adj = weights[agentSlug] || weights[TASK_AGENTS[agentSlug]] || 0;
292
- if (adj === 0) return baseConfidence;
293
- return Math.max(0, Math.min(1.0, baseConfidence + adj));
294
- }
295
-
296
75
  // ── Utilities ─────────────────────────────────────────────────────────────────
297
76
 
298
77
  var MAX_PROMPT = 2000;
299
78
 
300
- // ── routeTask ─────────────────────────────────────────────────────────────────
301
-
302
- function routeTask(prompt) {
303
- // Empty / null → confidence 0
304
- if (!prompt || typeof prompt !== 'string' || prompt.trim() === '') {
305
- return {
306
- agent: 'coder',
307
- agentSlug: 'coder',
308
- confidence: 0,
309
- reason: 'Default routing — empty input',
310
- semanticRouting: false,
311
- specificAgents: [],
312
- skillMatches: [],
313
- extrasMatches: [],
314
- };
315
- }
316
-
317
- var safePrompt = prompt.slice(0, MAX_PROMPT);
318
-
319
- // Skills are always checked — they're the primary value of routing now.
320
- var skills = matchSkills(safePrompt);
321
-
322
- // Check non-dev domain agents first (only if opt-in keywords match)
323
- var extras = matchExtras(safePrompt);
324
- if (extras.length > 0) {
325
- var topExtra = extras[0];
326
- return {
327
- agent: topExtra.name,
328
- agentSlug: topExtra.slug,
329
- confidence: applyFeedbackWeight(topExtra.slug, 0.80),
330
- reason: 'Domain: ' + topExtra.category,
331
- semanticRouting: false,
332
- specificAgents: extras,
333
- skillMatches: skills,
334
- extrasMatches: extras,
335
- };
336
- }
337
-
338
- // Check if a skill matched strongly (score >= 2) — if so, skip broad catch-all agents
339
- var hasStrongSkill = false;
340
- for (var si = 0; si < skills.length; si++) {
341
- if (skills[si].score >= 2) { hasStrongSkill = true; break; }
342
- }
343
-
344
- // Check dev patterns in priority order
345
- for (var i = 0; i < DEV_PRIORITY.length; i++) {
346
- var slug = DEV_PRIORITY[i];
347
- // Skip the broad "coder" catch-all when a specialized skill matched strongly
348
- if (slug === 'coder' && hasStrongSkill) continue;
349
- var pattern = _ROUTING_PATTERNS[slug];
350
- if (pattern && pattern.test(safePrompt)) {
351
- // Count how many distinct keywords from the pattern actually matched
352
- // so confidence reflects real match quality, not just a static constant.
353
- var caps = AGENT_CAPABILITIES[slug] || [];
354
- var promptLower = safePrompt.toLowerCase();
355
- var matchedKw = 0;
356
- for (var ki = 0; ki < caps.length; ki++) {
357
- if (promptLower.indexOf(caps[ki].toLowerCase()) !== -1) matchedKw++;
358
- }
359
- var baseConf = TASK_CONFIDENCES[slug] || 0.75;
360
- var matchBonus = Math.min(0.10, matchedKw * 0.02);
361
- var confidence = Math.min(0.98, applyFeedbackWeight(slug, baseConf + matchBonus));
362
- return {
363
- agent: TASK_AGENTS[slug],
364
- agentSlug: slug,
365
- confidence: confidence,
366
- reason: ('Keyword match: ' + slug + ' (' + matchedKw + ' kw)').slice(0, 80),
367
- semanticRouting: false,
368
- specificAgents: [{ slug: slug, name: TASK_AGENTS[slug], confidence: confidence }],
369
- skillMatches: skills,
370
- extrasMatches: [],
371
- };
372
- }
373
- }
374
-
375
- // No match → default
376
- return {
377
- agent: 'coder',
378
- agentSlug: 'coder',
379
- confidence: 0.5,
380
- reason: 'Default routing — no strong keyword match',
381
- semanticRouting: false,
382
- specificAgents: [],
383
- skillMatches: skills,
384
- extrasMatches: [],
385
- };
386
- }
387
-
388
79
  // ── matchSkills ────────────────────────────────────────────────────────────────
389
80
 
390
81
  /** Conservative suffix stemmer so "animate" matches the keyword "animation"
@@ -501,71 +192,8 @@ function matchSkills(prompt, topN) {
501
192
  return scored.slice(0, topN);
502
193
  }
503
194
 
504
- // ── matchExtras ────────────────────────────────────────────────────────────────
505
-
506
- function matchExtras(prompt, topN) {
507
- if (!prompt || typeof prompt !== 'string') return [];
508
- topN = topN || 8;
509
- var safePrompt = prompt.slice(0, MAX_PROMPT);
510
-
511
- var scored = [];
512
- for (var i = 0; i < DOMAIN_AGENTS.length; i++) {
513
- var a = DOMAIN_AGENTS[i];
514
- if (!a.keywords.test(safePrompt)) continue;
515
-
516
- // Opt-in categories: only include if keywords explicitly match
517
- if (OPT_IN_CATEGORIES.has(a.category)) {
518
- scored.push({ slug: a.slug, name: a.name, category: a.category, score: 1.0 });
519
- continue;
520
- }
521
-
522
- // Marketing is opt-in too
523
- if (a.category === 'marketing') {
524
- if (MARKETING_OPTIN.test(safePrompt)) {
525
- scored.push({ slug: a.slug, name: a.name, category: a.category, score: 1.0 });
526
- }
527
- continue;
528
- }
529
-
530
- // Sales: only include when sales keywords match
531
- scored.push({ slug: a.slug, name: a.name, category: a.category, score: 1.0 });
532
- }
533
-
534
- scored.sort(function(a, b) { return b.score - a.score; });
535
- return scored.slice(0, topN);
536
- }
537
-
538
- // ── buildCategoryList ─────────────────────────────────────────────────────────
539
-
540
- function buildCategoryList() {
541
- var catMap = {};
542
- for (var i = 0; i < DOMAIN_AGENTS.length; i++) {
543
- var a = DOMAIN_AGENTS[i];
544
- if (!catMap[a.category]) catMap[a.category] = { name: a.category, count: 0, examples: [] };
545
- catMap[a.category].count++;
546
- if (catMap[a.category].examples.length < 3) catMap[a.category].examples.push(a.slug);
547
- }
548
- return Object.values(catMap);
549
- }
550
-
551
- // ── getAgentsInCategory ────────────────────────────────────────────────────────
552
-
553
- function getAgentsInCategory(category) {
554
- if (!category || typeof category !== 'string') return [];
555
- return DOMAIN_AGENTS
556
- .filter(function(a) { return a.category === category; })
557
- .map(function(a) { return { slug: a.slug, name: a.name }; });
558
- }
559
-
560
195
  // ── exports ────────────────────────────────────────────────────────────────────
561
196
 
562
197
  module.exports = {
563
- routeTask: routeTask,
564
- routeTaskSemantic: routeTask,
565
198
  matchSkills: matchSkills,
566
- matchExtras: matchExtras,
567
- buildCategoryList: buildCategoryList,
568
- getAgentsInCategory: getAgentsInCategory,
569
- AGENT_CAPABILITIES: AGENT_CAPABILITIES,
570
- TASK_PATTERNS: TASK_PATTERNS,
571
199
  };
@@ -366,12 +366,20 @@ function _suppressSqliteWarning(fn) {
366
366
  var COMMIT_SQL = "SELECT value FROM index_meta WHERE key IN ('last_commit_hash','lastCommit') ORDER BY key = 'last_commit_hash' DESC LIMIT 1";
367
367
 
368
368
  // The commit the graph was built at, read with node:sqlite so it works even
369
- // when @monoes/monograph or its native addon is what's missing.
370
- function readIndexedCommit(dbPath) {
369
+ // when @monoes/monograph or its native addon is what's missing. `immutable`
370
+ // (doctor --read-only) opens without SQLite's -shm/-wal files, which even a
371
+ // read-only connection to a WAL database creates or updates; it does not see
372
+ // changes still in the WAL, which a finished build has checkpointed.
373
+ function readIndexedCommit(dbPath, immutable) {
371
374
  try {
372
375
  return _suppressSqliteWarning(function () {
373
376
  var DatabaseSync = require('node:sqlite').DatabaseSync;
374
- var db = new DatabaseSync(dbPath, { readOnly: true });
377
+ var target = dbPath;
378
+ if (immutable) {
379
+ target = require('node:url').pathToFileURL(dbPath);
380
+ target.search = '?immutable=1';
381
+ }
382
+ var db = new DatabaseSync(target, { readOnly: true });
375
383
  try { var row = db.prepare(COMMIT_SQL).get(); return row && row.value ? String(row.value) : null; }
376
384
  finally { db.close(); }
377
385
  });
@@ -400,7 +408,7 @@ function diagnose(projectDir, opts) {
400
408
  var native = resolved ? checkNative(resolved, projectDir) : null;
401
409
  var dbPath = path.join(projectDir, '.monomind', 'monograph.db');
402
410
  var dbExists = fs.existsSync(dbPath);
403
- var commit = dbExists ? readIndexedCommit(dbPath) : null;
411
+ var commit = dbExists ? readIndexedCommit(dbPath, opts.readOnly) : null;
404
412
  var problem = null;
405
413
  var fix = null;
406
414
  if (!resolved && !cliBin) {