@monoes/monomindcli 2.16.1 → 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 (1009) 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 +15 -13
  115. package/.claude/helpers/handlers/pick-core.cjs +445 -0
  116. package/.claude/helpers/handlers/route-handler.cjs +87 -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/monograph-freshen.cjs +31 -113
  124. package/.claude/helpers/org-skill-index.cjs +230 -0
  125. package/.claude/helpers/pick-rank.cjs +221 -0
  126. package/.claude/helpers/pick-stats.cjs +413 -0
  127. package/.claude/helpers/router.cjs +7 -379
  128. package/.claude/helpers/utils/monograph-resolve.cjs +505 -0
  129. package/.claude/helpers/utils/monograph.cjs +8 -51
  130. package/.claude/settings.json +51 -41
  131. package/.claude/skills/hooks-automation/SKILL.md +4 -4
  132. package/.claude/skills/mastermind-access/SKILL.md +4 -3
  133. package/.claude/skills/mastermind-activity/SKILL.md +3 -2
  134. package/.claude/skills/mastermind-adapter-manager/SKILL.md +2 -1
  135. package/.claude/skills/mastermind-adapters/SKILL.md +2 -1
  136. package/.claude/skills/mastermind-agent-detail/SKILL.md +5 -4
  137. package/.claude/skills/mastermind-agent-select/SKILL.md +99 -100
  138. package/.claude/skills/mastermind-agents/SKILL.md +2 -1
  139. package/.claude/skills/mastermind-approval-detail/SKILL.md +2 -1
  140. package/.claude/skills/mastermind-backup/SKILL.md +2 -1
  141. package/.claude/skills/mastermind-bootstrap/SKILL.md +2 -2
  142. package/.claude/skills/mastermind-budgets/SKILL.md +4 -3
  143. package/.claude/skills/mastermind-createorg/SKILL.md +23 -5
  144. package/.claude/skills/mastermind-delegation/SKILL.md +11 -19
  145. package/.claude/skills/mastermind-diagnose/SKILL.md +3 -3
  146. package/.claude/skills/mastermind-env/SKILL.md +2 -1
  147. package/.claude/skills/mastermind-environments/SKILL.md +2 -1
  148. package/.claude/skills/mastermind-execute/SKILL.md +1 -1
  149. package/.claude/skills/mastermind-export/SKILL.md +2 -1
  150. package/.claude/skills/mastermind-goal-detail/SKILL.md +3 -2
  151. package/.claude/skills/mastermind-goals/SKILL.md +3 -2
  152. package/.claude/skills/mastermind-idea/SKILL.md +52 -92
  153. package/.claude/skills/mastermind-import/SKILL.md +2 -1
  154. package/.claude/skills/mastermind-inbox/SKILL.md +3 -2
  155. package/.claude/skills/mastermind-instance/SKILL.md +3 -2
  156. package/.claude/skills/mastermind-invite-landing/SKILL.md +3 -2
  157. package/.claude/skills/mastermind-invites/SKILL.md +3 -2
  158. package/.claude/skills/mastermind-issue-detail/SKILL.md +4 -3
  159. package/.claude/skills/mastermind-issues/SKILL.md +4 -3
  160. package/.claude/skills/mastermind-join-queue/SKILL.md +5 -4
  161. package/.claude/skills/mastermind-liveness/SKILL.md +5 -4
  162. package/.claude/skills/mastermind-monitor/SKILL.md +15 -15
  163. package/.claude/skills/mastermind-my-issues/SKILL.md +2 -1
  164. package/.claude/skills/mastermind-new-agent/SKILL.md +120 -137
  165. package/.claude/skills/mastermind-org-settings/SKILL.md +6 -5
  166. package/.claude/skills/mastermind-orgs/SKILL.md +1 -0
  167. package/.claude/skills/mastermind-orgstatus/SKILL.md +2 -1
  168. package/.claude/skills/mastermind-plan-to-tasks/SKILL.md +1 -1
  169. package/.claude/skills/mastermind-plugin-manager/SKILL.md +4 -3
  170. package/.claude/skills/mastermind-plugin-settings/SKILL.md +5 -4
  171. package/.claude/skills/mastermind-plugins/SKILL.md +3 -2
  172. package/.claude/skills/mastermind-profile/SKILL.md +2 -1
  173. package/.claude/skills/mastermind-protocol/SKILL.md +3 -3
  174. package/.claude/skills/mastermind-release/SKILL.md +13 -8
  175. package/.claude/skills/mastermind-research/SKILL.md +10 -8
  176. package/.claude/skills/mastermind-review/SKILL.md +16 -11
  177. package/.claude/skills/mastermind-routine-detail/SKILL.md +2 -1
  178. package/.claude/skills/mastermind-routines/SKILL.md +3 -2
  179. package/.claude/skills/mastermind-search/SKILL.md +2 -1
  180. package/.claude/skills/mastermind-secrets/SKILL.md +3 -2
  181. package/.claude/skills/mastermind-skills/SKILL.md +2 -1
  182. package/.claude/skills/mastermind-stoporg/SKILL.md +1 -0
  183. package/.claude/skills/mastermind-tasks/SKILL.md +3 -2
  184. package/.claude/skills/mastermind-threads/SKILL.md +4 -3
  185. package/.claude/skills/mastermind-tree-control/SKILL.md +5 -4
  186. package/.claude/skills/mastermind-workspace-detail/SKILL.md +4 -3
  187. package/.claude/skills/mastermind-workspaces/SKILL.md +2 -1
  188. package/.claude/skills/monoswarm/SKILL.md +7 -5
  189. package/.claude/skills/specialagent/SKILL.md +32 -51
  190. package/README.md +1 -1
  191. package/dist/src/agents/registry-builder.d.ts +23 -2
  192. package/dist/src/agents/registry-builder.d.ts.map +1 -1
  193. package/dist/src/agents/registry-builder.js +64 -11
  194. package/dist/src/agents/registry-builder.js.map +1 -1
  195. package/dist/src/agents/registry-freshness.d.ts +21 -0
  196. package/dist/src/agents/registry-freshness.d.ts.map +1 -0
  197. package/dist/src/agents/registry-freshness.js +94 -0
  198. package/dist/src/agents/registry-freshness.js.map +1 -0
  199. package/dist/src/commands/agent-lifecycle.d.ts +11 -5
  200. package/dist/src/commands/agent-lifecycle.d.ts.map +1 -1
  201. package/dist/src/commands/agent-lifecycle.js +78 -42
  202. package/dist/src/commands/agent-lifecycle.js.map +1 -1
  203. package/dist/src/commands/doctor-env-checks.d.ts +18 -3
  204. package/dist/src/commands/doctor-env-checks.d.ts.map +1 -1
  205. package/dist/src/commands/doctor-env-checks.js +35 -16
  206. package/dist/src/commands/doctor-env-checks.js.map +1 -1
  207. package/dist/src/commands/doctor-fresh-install.d.ts +9 -0
  208. package/dist/src/commands/doctor-fresh-install.d.ts.map +1 -0
  209. package/dist/src/commands/doctor-fresh-install.js +43 -0
  210. package/dist/src/commands/doctor-fresh-install.js.map +1 -0
  211. package/dist/src/commands/doctor-hook-monograph-checks.d.ts +10 -0
  212. package/dist/src/commands/doctor-hook-monograph-checks.d.ts.map +1 -0
  213. package/dist/src/commands/doctor-hook-monograph-checks.js +88 -0
  214. package/dist/src/commands/doctor-hook-monograph-checks.js.map +1 -0
  215. package/dist/src/commands/doctor-hook-settings-checks.d.ts +5 -0
  216. package/dist/src/commands/doctor-hook-settings-checks.d.ts.map +1 -0
  217. package/dist/src/commands/doctor-hook-settings-checks.js +50 -0
  218. package/dist/src/commands/doctor-hook-settings-checks.js.map +1 -0
  219. package/dist/src/commands/doctor-json.d.ts +41 -0
  220. package/dist/src/commands/doctor-json.d.ts.map +1 -0
  221. package/dist/src/commands/doctor-json.js +60 -0
  222. package/dist/src/commands/doctor-json.js.map +1 -0
  223. package/dist/src/commands/doctor-mode.d.ts +28 -0
  224. package/dist/src/commands/doctor-mode.d.ts.map +1 -0
  225. package/dist/src/commands/doctor-mode.js +109 -0
  226. package/dist/src/commands/doctor-mode.js.map +1 -0
  227. package/dist/src/commands/doctor-monoes-checks.d.ts.map +1 -1
  228. package/dist/src/commands/doctor-monoes-checks.js +3 -1
  229. package/dist/src/commands/doctor-monoes-checks.js.map +1 -1
  230. package/dist/src/commands/doctor-pick-checks.d.ts +19 -0
  231. package/dist/src/commands/doctor-pick-checks.d.ts.map +1 -0
  232. package/dist/src/commands/doctor-pick-checks.js +164 -0
  233. package/dist/src/commands/doctor-pick-checks.js.map +1 -0
  234. package/dist/src/commands/doctor-project-checks.d.ts +3 -1
  235. package/dist/src/commands/doctor-project-checks.d.ts.map +1 -1
  236. package/dist/src/commands/doctor-project-checks.js +67 -20
  237. package/dist/src/commands/doctor-project-checks.js.map +1 -1
  238. package/dist/src/commands/doctor.d.ts.map +1 -1
  239. package/dist/src/commands/doctor.js +325 -333
  240. package/dist/src/commands/doctor.js.map +1 -1
  241. package/dist/src/commands/hooks-coverage-routing.js +1 -1
  242. package/dist/src/commands/hooks-coverage-routing.js.map +1 -1
  243. package/dist/src/commands/hooks-coverage-utils.js +1 -1
  244. package/dist/src/commands/hooks-coverage-utils.js.map +1 -1
  245. package/dist/src/commands/hooks-routing-commands.js +1 -1
  246. package/dist/src/commands/init-upgrade.d.ts.map +1 -1
  247. package/dist/src/commands/init-upgrade.js +4 -0
  248. package/dist/src/commands/init-upgrade.js.map +1 -1
  249. package/dist/src/commands/monograph.d.ts.map +1 -1
  250. package/dist/src/commands/monograph.js +16 -1
  251. package/dist/src/commands/monograph.js.map +1 -1
  252. package/dist/src/commands/monoswarm.d.ts.map +1 -1
  253. package/dist/src/commands/monoswarm.js +16 -10
  254. package/dist/src/commands/monoswarm.js.map +1 -1
  255. package/dist/src/commands/pick.d.ts.map +1 -1
  256. package/dist/src/commands/pick.js +66 -16
  257. package/dist/src/commands/pick.js.map +1 -1
  258. package/dist/src/commands/route.d.ts +2 -1
  259. package/dist/src/commands/route.d.ts.map +1 -1
  260. package/dist/src/commands/route.js +73 -117
  261. package/dist/src/commands/route.js.map +1 -1
  262. package/dist/src/decision/catalogs.d.ts +24 -3
  263. package/dist/src/decision/catalogs.d.ts.map +1 -1
  264. package/dist/src/decision/catalogs.js +100 -22
  265. package/dist/src/decision/catalogs.js.map +1 -1
  266. package/dist/src/decision/jev.d.ts +26 -6
  267. package/dist/src/decision/jev.d.ts.map +1 -1
  268. package/dist/src/decision/jev.js +15 -4
  269. package/dist/src/decision/jev.js.map +1 -1
  270. package/dist/src/decision/pick-eval.d.ts +67 -0
  271. package/dist/src/decision/pick-eval.d.ts.map +1 -0
  272. package/dist/src/decision/pick-eval.js +113 -0
  273. package/dist/src/decision/pick-eval.js.map +1 -0
  274. package/dist/src/decision/pick-stats.d.ts +49 -0
  275. package/dist/src/decision/pick-stats.d.ts.map +1 -0
  276. package/dist/src/decision/pick-stats.js +68 -0
  277. package/dist/src/decision/pick-stats.js.map +1 -0
  278. package/dist/src/decision/picks.d.ts +37 -6
  279. package/dist/src/decision/picks.d.ts.map +1 -1
  280. package/dist/src/decision/picks.js +67 -32
  281. package/dist/src/decision/picks.js.map +1 -1
  282. package/dist/src/index.d.ts +5 -0
  283. package/dist/src/index.d.ts.map +1 -1
  284. package/dist/src/index.js +43 -22
  285. package/dist/src/index.js.map +1 -1
  286. package/dist/src/init/agent-refresh.d.ts +8 -0
  287. package/dist/src/init/agent-refresh.d.ts.map +1 -0
  288. package/dist/src/init/agent-refresh.js +89 -0
  289. package/dist/src/init/agent-refresh.js.map +1 -0
  290. package/dist/src/init/claudemd-generator.d.ts.map +1 -1
  291. package/dist/src/init/claudemd-generator.js +27 -9
  292. package/dist/src/init/claudemd-generator.js.map +1 -1
  293. package/dist/src/init/helpers-generator.d.ts +4 -1
  294. package/dist/src/init/helpers-generator.d.ts.map +1 -1
  295. package/dist/src/init/helpers-generator.js +84 -55
  296. package/dist/src/init/helpers-generator.js.map +1 -1
  297. package/dist/src/init/hook-settings.d.ts +57 -0
  298. package/dist/src/init/hook-settings.d.ts.map +1 -0
  299. package/dist/src/init/hook-settings.js +133 -0
  300. package/dist/src/init/hook-settings.js.map +1 -0
  301. package/dist/src/init/settings-generator.d.ts.map +1 -1
  302. package/dist/src/init/settings-generator.js +44 -25
  303. package/dist/src/init/settings-generator.js.map +1 -1
  304. package/dist/src/init/shared.d.ts +9 -0
  305. package/dist/src/init/shared.d.ts.map +1 -1
  306. package/dist/src/init/shared.js +22 -0
  307. package/dist/src/init/shared.js.map +1 -1
  308. package/dist/src/init/upgrade.d.ts +4 -0
  309. package/dist/src/init/upgrade.d.ts.map +1 -1
  310. package/dist/src/init/upgrade.js +123 -129
  311. package/dist/src/init/upgrade.js.map +1 -1
  312. package/dist/src/init/write-capabilities.d.ts.map +1 -1
  313. package/dist/src/init/write-capabilities.js +10 -33
  314. package/dist/src/init/write-capabilities.js.map +1 -1
  315. package/dist/src/init/write-claude.d.ts.map +1 -1
  316. package/dist/src/init/write-claude.js +5 -2
  317. package/dist/src/init/write-claude.js.map +1 -1
  318. package/dist/src/mcp-client.d.ts.map +1 -1
  319. package/dist/src/mcp-client.js +4 -0
  320. package/dist/src/mcp-client.js.map +1 -1
  321. package/dist/src/mcp-tools/agent-tools.d.ts.map +1 -1
  322. package/dist/src/mcp-tools/agent-tools.js +3 -0
  323. package/dist/src/mcp-tools/agent-tools.js.map +1 -1
  324. package/dist/src/mcp-tools/guidance-tools.d.ts.map +1 -1
  325. package/dist/src/mcp-tools/guidance-tools.js +19 -10
  326. package/dist/src/mcp-tools/guidance-tools.js.map +1 -1
  327. package/dist/src/mcp-tools/hooks-embedding.d.ts +1 -32
  328. package/dist/src/mcp-tools/hooks-embedding.d.ts.map +1 -1
  329. package/dist/src/mcp-tools/hooks-embedding.js +22 -200
  330. package/dist/src/mcp-tools/hooks-embedding.js.map +1 -1
  331. package/dist/src/mcp-tools/hooks-routing.d.ts.map +1 -1
  332. package/dist/src/mcp-tools/hooks-routing.js +77 -192
  333. package/dist/src/mcp-tools/hooks-routing.js.map +1 -1
  334. package/dist/src/mcp-tools/index.d.ts +1 -0
  335. package/dist/src/mcp-tools/index.d.ts.map +1 -1
  336. package/dist/src/mcp-tools/index.js +1 -0
  337. package/dist/src/mcp-tools/index.js.map +1 -1
  338. package/dist/src/mcp-tools/org-skill-tools.d.ts +4 -0
  339. package/dist/src/mcp-tools/org-skill-tools.d.ts.map +1 -0
  340. package/dist/src/mcp-tools/org-skill-tools.js +42 -0
  341. package/dist/src/mcp-tools/org-skill-tools.js.map +1 -0
  342. package/dist/src/mcp-tools/pick-tools.d.ts +4 -0
  343. package/dist/src/mcp-tools/pick-tools.d.ts.map +1 -0
  344. package/dist/src/mcp-tools/pick-tools.js +53 -0
  345. package/dist/src/mcp-tools/pick-tools.js.map +1 -0
  346. package/dist/src/monovector/coverage-router.d.ts +2 -1
  347. package/dist/src/monovector/coverage-router.d.ts.map +1 -1
  348. package/dist/src/monovector/coverage-router.js +6 -5
  349. package/dist/src/monovector/coverage-router.js.map +1 -1
  350. package/dist/src/monovector/coverage-tools.js +1 -1
  351. package/dist/src/monovector/coverage-tools.js.map +1 -1
  352. package/dist/src/monovector/index.d.ts +1 -1
  353. package/dist/src/monovector/index.d.ts.map +1 -1
  354. package/dist/src/monovector/index.js +11 -35
  355. package/dist/src/monovector/index.js.map +1 -1
  356. package/dist/src/monovector/route-outcomes.d.ts.map +1 -1
  357. package/dist/src/monovector/route-outcomes.js +89 -34
  358. package/dist/src/monovector/route-outcomes.js.map +1 -1
  359. package/dist/src/orgrt/bash-timeout.d.ts +14 -0
  360. package/dist/src/orgrt/bash-timeout.d.ts.map +1 -0
  361. package/dist/src/orgrt/bash-timeout.js +18 -0
  362. package/dist/src/orgrt/bash-timeout.js.map +1 -0
  363. package/dist/src/orgrt/block-recheck.d.ts +30 -0
  364. package/dist/src/orgrt/block-recheck.d.ts.map +1 -0
  365. package/dist/src/orgrt/block-recheck.js +81 -0
  366. package/dist/src/orgrt/block-recheck.js.map +1 -0
  367. package/dist/src/orgrt/completion-gate.d.ts +4 -0
  368. package/dist/src/orgrt/completion-gate.d.ts.map +1 -1
  369. package/dist/src/orgrt/completion-gate.js +22 -2
  370. package/dist/src/orgrt/completion-gate.js.map +1 -1
  371. package/dist/src/orgrt/daemon.d.ts +7 -13
  372. package/dist/src/orgrt/daemon.d.ts.map +1 -1
  373. package/dist/src/orgrt/daemon.js +18 -27
  374. package/dist/src/orgrt/daemon.js.map +1 -1
  375. package/dist/src/orgrt/decisions.d.ts +4 -9
  376. package/dist/src/orgrt/decisions.d.ts.map +1 -1
  377. package/dist/src/orgrt/decisions.js +44 -47
  378. package/dist/src/orgrt/decisions.js.map +1 -1
  379. package/dist/src/orgrt/dispatch-hold.d.ts +34 -0
  380. package/dist/src/orgrt/dispatch-hold.d.ts.map +1 -0
  381. package/dist/src/orgrt/dispatch-hold.js +75 -0
  382. package/dist/src/orgrt/dispatch-hold.js.map +1 -0
  383. package/dist/src/orgrt/mailbox.d.ts +14 -0
  384. package/dist/src/orgrt/mailbox.d.ts.map +1 -1
  385. package/dist/src/orgrt/mailbox.js +31 -1
  386. package/dist/src/orgrt/mailbox.js.map +1 -1
  387. package/dist/src/orgrt/runner-registry.d.ts +20 -0
  388. package/dist/src/orgrt/runner-registry.d.ts.map +1 -1
  389. package/dist/src/orgrt/runner-registry.js +39 -0
  390. package/dist/src/orgrt/runner-registry.js.map +1 -1
  391. package/dist/src/orgrt/sandbox-deny-write.d.ts +11 -1
  392. package/dist/src/orgrt/sandbox-deny-write.d.ts.map +1 -1
  393. package/dist/src/orgrt/sandbox-deny-write.js +23 -2
  394. package/dist/src/orgrt/sandbox-deny-write.js.map +1 -1
  395. package/dist/src/orgrt/sandbox-fault.d.ts +21 -7
  396. package/dist/src/orgrt/sandbox-fault.d.ts.map +1 -1
  397. package/dist/src/orgrt/sandbox-fault.js +92 -35
  398. package/dist/src/orgrt/sandbox-fault.js.map +1 -1
  399. package/dist/src/orgrt/session.d.ts +20 -10
  400. package/dist/src/orgrt/session.d.ts.map +1 -1
  401. package/dist/src/orgrt/session.js +60 -72
  402. package/dist/src/orgrt/session.js.map +1 -1
  403. package/dist/src/orgrt/skill-library.d.ts +4 -0
  404. package/dist/src/orgrt/skill-library.d.ts.map +1 -1
  405. package/dist/src/orgrt/skill-library.js +12 -0
  406. package/dist/src/orgrt/skill-library.js.map +1 -1
  407. package/dist/src/orgrt/skill-tools.d.ts +11 -0
  408. package/dist/src/orgrt/skill-tools.d.ts.map +1 -0
  409. package/dist/src/orgrt/skill-tools.js +40 -0
  410. package/dist/src/orgrt/skill-tools.js.map +1 -0
  411. package/dist/src/orgrt/task-cancel.d.ts +64 -0
  412. package/dist/src/orgrt/task-cancel.d.ts.map +1 -0
  413. package/dist/src/orgrt/task-cancel.js +134 -0
  414. package/dist/src/orgrt/task-cancel.js.map +1 -0
  415. package/dist/src/orgrt/task-dag.d.ts +18 -3
  416. package/dist/src/orgrt/task-dag.d.ts.map +1 -1
  417. package/dist/src/orgrt/task-dag.js +10 -4
  418. package/dist/src/orgrt/task-dag.js.map +1 -1
  419. package/dist/src/orgrt/task-match.d.ts +121 -0
  420. package/dist/src/orgrt/task-match.d.ts.map +1 -0
  421. package/dist/src/orgrt/task-match.js +241 -0
  422. package/dist/src/orgrt/task-match.js.map +1 -0
  423. package/dist/src/orgrt/task-provenance.d.ts +26 -0
  424. package/dist/src/orgrt/task-provenance.d.ts.map +1 -0
  425. package/dist/src/orgrt/task-provenance.js +93 -0
  426. package/dist/src/orgrt/task-provenance.js.map +1 -0
  427. package/dist/src/orgrt/task-tools.d.ts +24 -0
  428. package/dist/src/orgrt/task-tools.d.ts.map +1 -0
  429. package/dist/src/orgrt/task-tools.js +75 -0
  430. package/dist/src/orgrt/task-tools.js.map +1 -0
  431. package/dist/src/orgrt/types.d.ts +11 -0
  432. package/dist/src/orgrt/types.d.ts.map +1 -1
  433. package/dist/src/orgrt/types.js +18 -0
  434. package/dist/src/orgrt/types.js.map +1 -1
  435. package/dist/src/output.d.ts +6 -0
  436. package/dist/src/output.d.ts.map +1 -1
  437. package/dist/src/output.js +13 -2
  438. package/dist/src/output.js.map +1 -1
  439. package/dist/src/protocol-capabilities.d.ts +8 -1
  440. package/dist/src/protocol-capabilities.d.ts.map +1 -1
  441. package/dist/src/protocol-capabilities.js +10 -0
  442. package/dist/src/protocol-capabilities.js.map +1 -1
  443. package/dist/src/routing/agent-pick.d.ts +44 -0
  444. package/dist/src/routing/agent-pick.d.ts.map +1 -0
  445. package/dist/src/routing/agent-pick.js +114 -0
  446. package/dist/src/routing/agent-pick.js.map +1 -0
  447. package/dist/src/routing/pick-step.d.ts +26 -0
  448. package/dist/src/routing/pick-step.d.ts.map +1 -0
  449. package/dist/src/routing/pick-step.js +40 -0
  450. package/dist/src/routing/pick-step.js.map +1 -0
  451. package/dist/src/routing/route-layer-factory.d.ts.map +1 -1
  452. package/dist/src/routing/route-layer-factory.js +19 -17
  453. package/dist/src/routing/route-layer-factory.js.map +1 -1
  454. package/dist/src/utils/resource-governor.d.ts.map +1 -1
  455. package/dist/src/utils/resource-governor.js +55 -2
  456. package/dist/src/utils/resource-governor.js.map +1 -1
  457. package/dist/tsconfig.tsbuildinfo +1 -1
  458. package/org-skills/SOURCES.md +6 -6
  459. package/org-skills/TAGS.md +146 -0
  460. package/org-skills/ab-testing/SKILL.md +2 -2
  461. package/org-skills/accessibility-compliance/SKILL.md +2 -2
  462. package/org-skills/account-strategist/SKILL.md +2 -2
  463. package/org-skills/accounts-payable/SKILL.md +2 -2
  464. package/org-skills/ad-creative/SKILL.md +2 -2
  465. package/org-skills/adaptive-coordinator/SKILL.md +2 -2
  466. package/org-skills/adaptive-coordinator2/SKILL.md +2 -2
  467. package/org-skills/advanced-evaluation/SKILL.md +2 -2
  468. package/org-skills/adversarial-reviewer/SKILL.md +2 -2
  469. package/org-skills/agent-evaluation/SKILL.md +2 -2
  470. package/org-skills/agent-memory-systems/SKILL.md +2 -2
  471. package/org-skills/agent-tool-design/SKILL.md +2 -2
  472. package/org-skills/agile-product-owner/SKILL.md +2 -2
  473. package/org-skills/ai-citation/SKILL.md +2 -2
  474. package/org-skills/ai-engineer/SKILL.md +2 -2
  475. package/org-skills/ai-seo/SKILL.md +2 -2
  476. package/org-skills/analytics-reporter/SKILL.md +2 -2
  477. package/org-skills/analytics-tracking/SKILL.md +2 -2
  478. package/org-skills/android-clean-architecture/SKILL.md +2 -2
  479. package/org-skills/angular-architect/SKILL.md +2 -2
  480. package/org-skills/api-design/SKILL.md +2 -2
  481. package/org-skills/api-designer/SKILL.md +2 -2
  482. package/org-skills/api-tester/SKILL.md +2 -2
  483. package/org-skills/app-store-optimization/SKILL.md +2 -2
  484. package/org-skills/architecture-decision-records/SKILL.md +2 -2
  485. package/org-skills/architecture-designer/SKILL.md +2 -2
  486. package/org-skills/architecture-patterns/SKILL.md +2 -2
  487. package/org-skills/article-writing/SKILL.md +2 -2
  488. package/org-skills/auth-implementation-patterns/SKILL.md +2 -2
  489. package/org-skills/automation-governance/SKILL.md +2 -2
  490. package/org-skills/avoid-ai-writing/SKILL.md +2 -2
  491. package/org-skills/backend-dev/SKILL.md +2 -2
  492. package/org-skills/backend-patterns/SKILL.md +2 -2
  493. package/org-skills/bash-defensive-patterns/SKILL.md +2 -2
  494. package/org-skills/before-you-build/SKILL.md +2 -2
  495. package/org-skills/benchmark-methodology/SKILL.md +2 -2
  496. package/org-skills/benchmarker/SKILL.md +2 -2
  497. package/org-skills/blockchain-auditor/SKILL.md +2 -2
  498. package/org-skills/board-deck-builder/SKILL.md +2 -2
  499. package/org-skills/business-investment-advisor/SKILL.md +2 -2
  500. package/org-skills/byzantine-coord/SKILL.md +2 -2
  501. package/org-skills/canvas-design/SKILL.md +2 -2
  502. package/org-skills/carrier-relationship-management/SKILL.md +2 -2
  503. package/org-skills/case-analyst/SKILL.md +2 -2
  504. package/org-skills/ceo-advisor/SKILL.md +2 -2
  505. package/org-skills/cfo-advisor/SKILL.md +2 -2
  506. package/org-skills/change-management/SKILL.md +2 -2
  507. package/org-skills/changelog-automation/SKILL.md +2 -2
  508. package/org-skills/chro-advisor/SKILL.md +2 -2
  509. package/org-skills/churn-prevention/SKILL.md +2 -2
  510. package/org-skills/cicd-engineer/SKILL.md +2 -2
  511. package/org-skills/ciso-advisor/SKILL.md +2 -2
  512. package/org-skills/click-path-audit/SKILL.md +2 -2
  513. package/org-skills/cloud-architect/SKILL.md +2 -2
  514. package/org-skills/cloud-architecture/SKILL.md +2 -2
  515. package/org-skills/cmo-advisor/SKILL.md +2 -2
  516. package/org-skills/co-marketing/SKILL.md +2 -2
  517. package/org-skills/code-documenter/SKILL.md +2 -2
  518. package/org-skills/code-review-swarm/SKILL.md +2 -2
  519. package/org-skills/code-reviewer/SKILL.md +2 -2
  520. package/org-skills/coder/SKILL.md +2 -2
  521. package/org-skills/coding-standards/SKILL.md +2 -2
  522. package/org-skills/cold-email/SKILL.md +2 -2
  523. package/org-skills/collective-coord/SKILL.md +2 -2
  524. package/org-skills/community-marketing/SKILL.md +2 -2
  525. package/org-skills/competitive-landscape/SKILL.md +2 -2
  526. package/org-skills/competitive-platform-analysis/SKILL.md +2 -2
  527. package/org-skills/competitive-report-structure/SKILL.md +2 -2
  528. package/org-skills/competitive-teardown/SKILL.md +2 -2
  529. package/org-skills/competitor-comparison-pages/SKILL.md +2 -2
  530. package/org-skills/compliance-auditor/SKILL.md +2 -2
  531. package/org-skills/consensus-coordinator/SKILL.md +2 -2
  532. package/org-skills/content-creator/SKILL.md +2 -2
  533. package/org-skills/content-engine/SKILL.md +2 -2
  534. package/org-skills/content-strategy/SKILL.md +2 -2
  535. package/org-skills/context-compression/SKILL.md +2 -2
  536. package/org-skills/context-degradation/SKILL.md +2 -2
  537. package/org-skills/context-fundamentals/SKILL.md +2 -2
  538. package/org-skills/context-optimization/SKILL.md +2 -2
  539. package/org-skills/contract-and-proposal-writer/SKILL.md +1 -1
  540. package/org-skills/contract-first/SKILL.md +2 -2
  541. package/org-skills/coo-advisor/SKILL.md +2 -2
  542. package/org-skills/copy-editing/SKILL.md +2 -2
  543. package/org-skills/copywriting/SKILL.md +2 -2
  544. package/org-skills/cost-aware-llm-pipeline/SKILL.md +2 -2
  545. package/org-skills/cost-optimization/SKILL.md +2 -2
  546. package/org-skills/cpp-coding-standards/SKILL.md +2 -2
  547. package/org-skills/cpp-pro/SKILL.md +2 -2
  548. package/org-skills/cro-advisor/SKILL.md +2 -2
  549. package/org-skills/cro-specialist/SKILL.md +2 -2
  550. package/org-skills/csharp-developer/SKILL.md +2 -2
  551. package/org-skills/cto-advisor/SKILL.md +2 -2
  552. package/org-skills/culture-architect/SKILL.md +2 -2
  553. package/org-skills/customer-research/SKILL.md +2 -2
  554. package/org-skills/customs-trade-compliance/SKILL.md +2 -2
  555. package/org-skills/dart-flutter-patterns/SKILL.md +2 -2
  556. package/org-skills/dashboard-builder/SKILL.md +2 -2
  557. package/org-skills/data-consolidator/SKILL.md +2 -2
  558. package/org-skills/data-engineer/SKILL.md +2 -2
  559. package/org-skills/data-quality-frameworks/SKILL.md +2 -2
  560. package/org-skills/data-storytelling/SKILL.md +2 -2
  561. package/org-skills/database-migrations/SKILL.md +2 -2
  562. package/org-skills/database-optimizer/SKILL.md +2 -2
  563. package/org-skills/dbt-transformation-patterns/SKILL.md +2 -2
  564. package/org-skills/deal-strategist/SKILL.md +2 -2
  565. package/org-skills/debugging-wizard/SKILL.md +2 -2
  566. package/org-skills/deep-research/SKILL.md +2 -2
  567. package/org-skills/defender/SKILL.md +2 -2
  568. package/org-skills/dependency-upgrade/SKILL.md +2 -2
  569. package/org-skills/deployment-patterns/SKILL.md +2 -2
  570. package/org-skills/deployment-pipeline-design/SKILL.md +2 -2
  571. package/org-skills/design-system/SKILL.md +2 -2
  572. package/org-skills/design-system-patterns/SKILL.md +2 -2
  573. package/org-skills/devops-automator/SKILL.md +2 -2
  574. package/org-skills/devops-engineer/SKILL.md +2 -2
  575. package/org-skills/discovery-coach/SKILL.md +2 -2
  576. package/org-skills/django-expert/SKILL.md +2 -2
  577. package/org-skills/django-patterns/SKILL.md +2 -2
  578. package/org-skills/docker-patterns/SKILL.md +2 -2
  579. package/org-skills/dotnet-patterns/SKILL.md +2 -2
  580. package/org-skills/e2e-testing/SKILL.md +2 -2
  581. package/org-skills/email-marketing/SKILL.md +2 -2
  582. package/org-skills/email-sequences/SKILL.md +2 -2
  583. package/org-skills/embedded-firmware/SKILL.md +2 -2
  584. package/org-skills/embedded-systems/SKILL.md +2 -2
  585. package/org-skills/employment-contract-templates/SKILL.md +2 -2
  586. package/org-skills/energy-procurement/SKILL.md +2 -2
  587. package/org-skills/error-handling/SKILL.md +2 -2
  588. package/org-skills/event-marketing/SKILL.md +2 -2
  589. package/org-skills/evidence-collector/SKILL.md +2 -2
  590. package/org-skills/experiment-designer/SKILL.md +2 -2
  591. package/org-skills/experiment-tracker/SKILL.md +2 -2
  592. package/org-skills/experimental-design/SKILL.md +2 -2
  593. package/org-skills/fastapi-expert/SKILL.md +2 -2
  594. package/org-skills/fastapi-patterns/SKILL.md +2 -2
  595. package/org-skills/feedback-synthesizer/SKILL.md +2 -2
  596. package/org-skills/finance-tracker/SKILL.md +2 -2
  597. package/org-skills/finishing-a-development-branch/SKILL.md +2 -2
  598. package/org-skills/flutter-expert/SKILL.md +2 -2
  599. package/org-skills/focused-fix/SKILL.md +2 -2
  600. package/org-skills/free-tool-strategy/SKILL.md +2 -2
  601. package/org-skills/frontend-design/SKILL.md +2 -2
  602. package/org-skills/frontend-design-direction/SKILL.md +2 -2
  603. package/org-skills/frontend-developer/SKILL.md +2 -2
  604. package/org-skills/frontend-patterns/SKILL.md +2 -2
  605. package/org-skills/game-audio-engineer/SKILL.md +2 -2
  606. package/org-skills/game-designer/SKILL.md +2 -2
  607. package/org-skills/gdpr-data-handling/SKILL.md +2 -2
  608. package/org-skills/general-counsel-advisor/SKILL.md +2 -2
  609. package/org-skills/git-advanced-workflows/SKILL.md +2 -2
  610. package/org-skills/git-workflow/SKILL.md +2 -2
  611. package/org-skills/golang-patterns/SKILL.md +2 -2
  612. package/org-skills/golang-pro/SKILL.md +2 -2
  613. package/org-skills/harness-engineering/SKILL.md +2 -2
  614. package/org-skills/healthcare-phi-compliance/SKILL.md +2 -2
  615. package/org-skills/hexagonal-architecture/SKILL.md +2 -2
  616. package/org-skills/hierarchical-coord/SKILL.md +2 -2
  617. package/org-skills/huggingface-transformers/SKILL.md +2 -2
  618. package/org-skills/hypothesis-generation/SKILL.md +2 -2
  619. package/org-skills/incident-command-playbook/SKILL.md +2 -2
  620. package/org-skills/incident-commander/SKILL.md +2 -2
  621. package/org-skills/incident-runbook-templates/SKILL.md +2 -2
  622. package/org-skills/influencer-marketing/SKILL.md +2 -2
  623. package/org-skills/infrastructure/SKILL.md +2 -2
  624. package/org-skills/input-validator/SKILL.md +2 -2
  625. package/org-skills/intent-driven-development/SKILL.md +2 -2
  626. package/org-skills/inventory-demand-planning/SKILL.md +2 -2
  627. package/org-skills/investor-materials/SKILL.md +2 -2
  628. package/org-skills/ios-developer/SKILL.md +2 -2
  629. package/org-skills/isms-audit-expert/SKILL.md +2 -2
  630. package/org-skills/issue-tracker/SKILL.md +2 -2
  631. package/org-skills/java-architect/SKILL.md +2 -2
  632. package/org-skills/java-coding-standards/SKILL.md +2 -2
  633. package/org-skills/judge/SKILL.md +2 -2
  634. package/org-skills/kotlin-patterns/SKILL.md +2 -2
  635. package/org-skills/kotlin-specialist/SKILL.md +2 -2
  636. package/org-skills/kpi-dashboard-design/SKILL.md +2 -2
  637. package/org-skills/kubernetes-patterns/SKILL.md +2 -2
  638. package/org-skills/kubernetes-specialist/SKILL.md +2 -2
  639. package/org-skills/laravel-patterns/SKILL.md +2 -2
  640. package/org-skills/launch-strategist/SKILL.md +2 -2
  641. package/org-skills/launch-strategy/SKILL.md +2 -2
  642. package/org-skills/lead-magnets/SKILL.md +2 -2
  643. package/org-skills/legacy-modernizer/SKILL.md +2 -2
  644. package/org-skills/legal-compliance/SKILL.md +2 -2
  645. package/org-skills/level-designer/SKILL.md +2 -2
  646. package/org-skills/llm-cost-optimizer/SKILL.md +2 -2
  647. package/org-skills/llm-evaluation/SKILL.md +2 -2
  648. package/org-skills/llm-project-development/SKILL.md +2 -2
  649. package/org-skills/load-balancer/SKILL.md +2 -2
  650. package/org-skills/logistics-exception-management/SKILL.md +2 -2
  651. package/org-skills/long-horizon-prompting/SKILL.md +2 -2
  652. package/org-skills/make-interfaces-feel-better/SKILL.md +2 -2
  653. package/org-skills/markdown-mermaid-writing/SKILL.md +2 -2
  654. package/org-skills/market-research/SKILL.md +2 -2
  655. package/org-skills/market-research-reports/SKILL.md +2 -2
  656. package/org-skills/market-sizing-analysis/SKILL.md +2 -2
  657. package/org-skills/marketing-attribution/SKILL.md +2 -2
  658. package/org-skills/marketing-campaign/SKILL.md +2 -2
  659. package/org-skills/marketing-council/SKILL.md +2 -2
  660. package/org-skills/marketing-demand-acquisition/SKILL.md +2 -2
  661. package/org-skills/marketing-loops/SKILL.md +2 -2
  662. package/org-skills/marketing-plan/SKILL.md +2 -2
  663. package/org-skills/marketing-psychology/SKILL.md +2 -2
  664. package/org-skills/marketing-strategy-pmm/SKILL.md +2 -2
  665. package/org-skills/markitdown-document-conversion/SKILL.md +2 -2
  666. package/org-skills/mcp-builder/SKILL.md +2 -2
  667. package/org-skills/mcp-server-builder/SKILL.md +2 -2
  668. package/org-skills/mcp-server-patterns/SKILL.md +2 -2
  669. package/org-skills/memory-coordinator/SKILL.md +2 -2
  670. package/org-skills/mesh-coordinator/SKILL.md +2 -2
  671. package/org-skills/ml-developer/SKILL.md +2 -2
  672. package/org-skills/ml-pipeline/SKILL.md +2 -2
  673. package/org-skills/mle-workflow/SKILL.md +2 -2
  674. package/org-skills/mobile-app-builder/SKILL.md +2 -2
  675. package/org-skills/mobile-dev/SKILL.md +2 -2
  676. package/org-skills/model-qa/SKILL.md +2 -2
  677. package/org-skills/monitoring-expert/SKILL.md +2 -2
  678. package/org-skills/monodesign-ui-quality/SKILL.md +2 -2
  679. package/org-skills/monograph-code-navigation/SKILL.md +2 -2
  680. package/org-skills/monolean-minimal-change/SKILL.md +2 -2
  681. package/org-skills/multi-agent-patterns/SKILL.md +2 -2
  682. package/org-skills/mysql-patterns/SKILL.md +2 -2
  683. package/org-skills/narrative-designer/SKILL.md +2 -2
  684. package/org-skills/nextjs-developer/SKILL.md +2 -2
  685. package/org-skills/offer-design/SKILL.md +2 -2
  686. package/org-skills/onboarding-cro/SKILL.md +2 -2
  687. package/org-skills/outbound-strategist/SKILL.md +2 -2
  688. package/org-skills/page-cro/SKILL.md +2 -2
  689. package/org-skills/paid-ads/SKILL.md +2 -2
  690. package/org-skills/pandas-pro/SKILL.md +2 -2
  691. package/org-skills/path-validator/SKILL.md +2 -2
  692. package/org-skills/payment-agent/SKILL.md +2 -2
  693. package/org-skills/pci-compliance/SKILL.md +2 -2
  694. package/org-skills/perf-analyzer/SKILL.md +2 -2
  695. package/org-skills/php-pro/SKILL.md +2 -2
  696. package/org-skills/pipeline-analyst/SKILL.md +2 -2
  697. package/org-skills/planner/SKILL.md +2 -2
  698. package/org-skills/playwright-expert/SKILL.md +2 -2
  699. package/org-skills/postgres-patterns/SKILL.md +2 -2
  700. package/org-skills/postgresql-table-design/SKILL.md +2 -2
  701. package/org-skills/postmortem-writing/SKILL.md +2 -2
  702. package/org-skills/pr-manager/SKILL.md +2 -2
  703. package/org-skills/pricing-strategist/SKILL.md +2 -2
  704. package/org-skills/pricing-strategy/SKILL.md +2 -2
  705. package/org-skills/prisma-patterns/SKILL.md +2 -2
  706. package/org-skills/product-capability/SKILL.md +2 -2
  707. package/org-skills/product-discovery/SKILL.md +2 -2
  708. package/org-skills/product-lens/SKILL.md +2 -2
  709. package/org-skills/product-manager/SKILL.md +2 -2
  710. package/org-skills/product-marketing-context/SKILL.md +2 -2
  711. package/org-skills/production-audit/SKILL.md +2 -2
  712. package/org-skills/production-scheduling/SKILL.md +2 -2
  713. package/org-skills/production-validator/SKILL.md +2 -2
  714. package/org-skills/programmatic-seo/SKILL.md +2 -2
  715. package/org-skills/project-shepherd/SKILL.md +2 -2
  716. package/org-skills/prompt-engineer/SKILL.md +2 -2
  717. package/org-skills/proposal-strategist/SKILL.md +2 -2
  718. package/org-skills/prosecutor/SKILL.md +2 -2
  719. package/org-skills/public-relations/SKILL.md +2 -2
  720. package/org-skills/pymc-bayesian-modeling/SKILL.md +2 -2
  721. package/org-skills/python-patterns/SKILL.md +2 -2
  722. package/org-skills/python-pro/SKILL.md +2 -2
  723. package/org-skills/python-testing/SKILL.md +2 -2
  724. package/org-skills/quality-nonconformance/SKILL.md +2 -2
  725. package/org-skills/queen-coordinator/SKILL.md +2 -2
  726. package/org-skills/quorum-manager/SKILL.md +2 -2
  727. package/org-skills/raft-manager/SKILL.md +2 -2
  728. package/org-skills/rag-architect/SKILL.md +2 -2
  729. package/org-skills/rails-patterns/SKILL.md +2 -2
  730. package/org-skills/react-expert/SKILL.md +2 -2
  731. package/org-skills/react-native-expert/SKILL.md +2 -2
  732. package/org-skills/react-native-patterns/SKILL.md +2 -2
  733. package/org-skills/react-patterns/SKILL.md +2 -2
  734. package/org-skills/react-performance/SKILL.md +2 -2
  735. package/org-skills/react-testing/SKILL.md +2 -2
  736. package/org-skills/reality-checker/SKILL.md +2 -2
  737. package/org-skills/receiving-code-review/SKILL.md +2 -2
  738. package/org-skills/recruitment/SKILL.md +2 -2
  739. package/org-skills/redis-patterns/SKILL.md +2 -2
  740. package/org-skills/referral-programs/SKILL.md +2 -2
  741. package/org-skills/release-manager/SKILL.md +2 -2
  742. package/org-skills/repo-architect/SKILL.md +2 -2
  743. package/org-skills/researcher/SKILL.md +2 -2
  744. package/org-skills/resource-allocator/SKILL.md +2 -2
  745. package/org-skills/responsive-design/SKILL.md +2 -2
  746. package/org-skills/returns-reverse-logistics/SKILL.md +2 -2
  747. package/org-skills/reviewer/SKILL.md +2 -2
  748. package/org-skills/revops/SKILL.md +2 -2
  749. package/org-skills/roadmap-communicator/SKILL.md +2 -2
  750. package/org-skills/rust-engineer/SKILL.md +2 -2
  751. package/org-skills/rust-patterns/SKILL.md +2 -2
  752. package/org-skills/safe-executor/SKILL.md +2 -2
  753. package/org-skills/sales-coach/SKILL.md +2 -2
  754. package/org-skills/sales-enablement/SKILL.md +2 -2
  755. package/org-skills/sales-engineer/SKILL.md +2 -2
  756. package/org-skills/sales-prospecting/SKILL.md +2 -2
  757. package/org-skills/schema-markup/SKILL.md +2 -2
  758. package/org-skills/scientific-brainstorming/SKILL.md +2 -2
  759. package/org-skills/scientific-critical-thinking/SKILL.md +2 -2
  760. package/org-skills/scientific-thinking-literature-review/SKILL.md +2 -2
  761. package/org-skills/scientific-thinking-scholar-evaluation/SKILL.md +2 -2
  762. package/org-skills/scientific-visualization/SKILL.md +2 -2
  763. package/org-skills/scientific-writing/SKILL.md +2 -2
  764. package/org-skills/scout-explorer/SKILL.md +2 -2
  765. package/org-skills/secrets-vault-manager/SKILL.md +2 -2
  766. package/org-skills/secure-code-guardian/SKILL.md +2 -2
  767. package/org-skills/security-architect/SKILL.md +2 -2
  768. package/org-skills/security-auditor/SKILL.md +2 -2
  769. package/org-skills/security-review/SKILL.md +2 -2
  770. package/org-skills/security-reviewer/SKILL.md +2 -2
  771. package/org-skills/senior-data-scientist/SKILL.md +2 -2
  772. package/org-skills/senior-developer/SKILL.md +2 -2
  773. package/org-skills/senior-pm/SKILL.md +2 -2
  774. package/org-skills/senior-pm-playbook/SKILL.md +2 -2
  775. package/org-skills/seo/SKILL.md +2 -2
  776. package/org-skills/seo-audit/SKILL.md +2 -2
  777. package/org-skills/seo-specialist/SKILL.md +2 -2
  778. package/org-skills/shap-model-explainability/SKILL.md +2 -2
  779. package/org-skills/signup-flow-cro/SKILL.md +2 -2
  780. package/org-skills/site-architecture/SKILL.md +2 -2
  781. package/org-skills/sms-marketing/SKILL.md +2 -2
  782. package/org-skills/soc2-compliance/SKILL.md +2 -2
  783. package/org-skills/social-content/SKILL.md +2 -2
  784. package/org-skills/social-media/SKILL.md +2 -2
  785. package/org-skills/social-media-manager/SKILL.md +2 -2
  786. package/org-skills/solidity-engineer/SKILL.md +2 -2
  787. package/org-skills/spark-engineer/SKILL.md +2 -2
  788. package/org-skills/spec-driven-workflow/SKILL.md +2 -2
  789. package/org-skills/springboot-patterns/SKILL.md +2 -2
  790. package/org-skills/sprint-prioritizer/SKILL.md +2 -2
  791. package/org-skills/sql-pro/SKILL.md +2 -2
  792. package/org-skills/sre/SKILL.md +2 -2
  793. package/org-skills/sre-engineer/SKILL.md +2 -2
  794. package/org-skills/startup-financial-modeling/SKILL.md +2 -2
  795. package/org-skills/startup-metrics-framework/SKILL.md +2 -2
  796. package/org-skills/statistical-analysis/SKILL.md +2 -2
  797. package/org-skills/statistical-power/SKILL.md +2 -2
  798. package/org-skills/stride-analysis-patterns/SKILL.md +2 -2
  799. package/org-skills/stripe-integration/SKILL.md +2 -2
  800. package/org-skills/studio-operations/SKILL.md +2 -2
  801. package/org-skills/studio-producer/SKILL.md +2 -2
  802. package/org-skills/support-responder/SKILL.md +2 -2
  803. package/org-skills/swift-expert/SKILL.md +2 -2
  804. package/org-skills/swiftui-patterns/SKILL.md +2 -2
  805. package/org-skills/system-architect/SKILL.md +2 -2
  806. package/org-skills/systematic-debugging/SKILL.md +2 -2
  807. package/org-skills/task-orchestrator/SKILL.md +2 -2
  808. package/org-skills/team-communications/SKILL.md +2 -2
  809. package/org-skills/team-composition-analysis/SKILL.md +2 -2
  810. package/org-skills/technical-artist/SKILL.md +2 -2
  811. package/org-skills/technical-writer/SKILL.md +2 -2
  812. package/org-skills/terraform-engineer/SKILL.md +2 -2
  813. package/org-skills/test-driven-development/SKILL.md +2 -2
  814. package/org-skills/test-master/SKILL.md +2 -2
  815. package/org-skills/tester/SKILL.md +2 -2
  816. package/org-skills/the-fool/SKILL.md +2 -2
  817. package/org-skills/theme-factory/SKILL.md +2 -2
  818. package/org-skills/threat-detection/SKILL.md +2 -2
  819. package/org-skills/threat-mitigation-mapping/SKILL.md +2 -2
  820. package/org-skills/trend-researcher/SKILL.md +2 -2
  821. package/org-skills/trial-director/SKILL.md +2 -2
  822. package/org-skills/typescript-pro/SKILL.md +2 -2
  823. package/org-skills/unity-architect/SKILL.md +2 -2
  824. package/org-skills/using-git-worktrees/SKILL.md +2 -2
  825. package/org-skills/ux-researcher-designer/SKILL.md +2 -2
  826. package/org-skills/verification-before-completion/SKILL.md +2 -2
  827. package/org-skills/visionos-engineer/SKILL.md +2 -2
  828. package/org-skills/visual-design-foundations/SKILL.md +2 -2
  829. package/org-skills/vue-expert/SKILL.md +2 -2
  830. package/org-skills/vue-patterns/SKILL.md +2 -2
  831. package/org-skills/worker-specialist/SKILL.md +2 -2
  832. package/org-skills/workflow-architect/SKILL.md +2 -2
  833. package/org-skills/workflow-automation/SKILL.md +2 -2
  834. package/org-skills/writing-plans/SKILL.md +2 -2
  835. package/org-skills/zk-steward/SKILL.md +2 -2
  836. package/package.json +7 -7
  837. package/.claude/helpers/skill-registry.json +0 -5997
  838. package/.claude/skills/monodesign/SKILL.md +0 -257
  839. package/.claude/skills/monodesign/adapt.md +0 -53
  840. package/.claude/skills/monodesign/agents/monodesign-asset-producer.md +0 -100
  841. package/.claude/skills/monodesign/agents/monodesign-manual-edit-applier.md +0 -103
  842. package/.claude/skills/monodesign/animate.md +0 -65
  843. package/.claude/skills/monodesign/audit.md +0 -89
  844. package/.claude/skills/monodesign/bolder.md +0 -50
  845. package/.claude/skills/monodesign/clarify.md +0 -64
  846. package/.claude/skills/monodesign/colorize.md +0 -68
  847. package/.claude/skills/monodesign/craft.md +0 -51
  848. package/.claude/skills/monodesign/critique.md +0 -66
  849. package/.claude/skills/monodesign/delight.md +0 -47
  850. package/.claude/skills/monodesign/distill.md +0 -56
  851. package/.claude/skills/monodesign/document.md +0 -83
  852. package/.claude/skills/monodesign/extract.md +0 -74
  853. package/.claude/skills/monodesign/harden.md +0 -65
  854. package/.claude/skills/monodesign/init.md +0 -30
  855. package/.claude/skills/monodesign/layout.md +0 -36
  856. package/.claude/skills/monodesign/live.md +0 -34
  857. package/.claude/skills/monodesign/onboard.md +0 -50
  858. package/.claude/skills/monodesign/optimize.md +0 -64
  859. package/.claude/skills/monodesign/overdrive.md +0 -56
  860. package/.claude/skills/monodesign/polish.md +0 -68
  861. package/.claude/skills/monodesign/quieter.md +0 -57
  862. package/.claude/skills/monodesign/reference/adapt.md +0 -312
  863. package/.claude/skills/monodesign/reference/adapt.native.md +0 -58
  864. package/.claude/skills/monodesign/reference/android.md +0 -40
  865. package/.claude/skills/monodesign/reference/animate.md +0 -203
  866. package/.claude/skills/monodesign/reference/antipatterns-catalog.md +0 -410
  867. package/.claude/skills/monodesign/reference/audit.md +0 -135
  868. package/.claude/skills/monodesign/reference/audit.native.md +0 -139
  869. package/.claude/skills/monodesign/reference/bolder.md +0 -120
  870. package/.claude/skills/monodesign/reference/brand-workflow.md +0 -180
  871. package/.claude/skills/monodesign/reference/brand.md +0 -108
  872. package/.claude/skills/monodesign/reference/clarify.md +0 -288
  873. package/.claude/skills/monodesign/reference/codex.md +0 -105
  874. package/.claude/skills/monodesign/reference/cognitive-load.md +0 -106
  875. package/.claude/skills/monodesign/reference/color-and-contrast.md +0 -105
  876. package/.claude/skills/monodesign/reference/colorize.md +0 -257
  877. package/.claude/skills/monodesign/reference/component-specs.md +0 -260
  878. package/.claude/skills/monodesign/reference/component-states.md +0 -274
  879. package/.claude/skills/monodesign/reference/component-system.md +0 -358
  880. package/.claude/skills/monodesign/reference/copy-formulas.md +0 -160
  881. package/.claude/skills/monodesign/reference/craft.md +0 -123
  882. package/.claude/skills/monodesign/reference/critique.md +0 -780
  883. package/.claude/skills/monodesign/reference/delight.md +0 -302
  884. package/.claude/skills/monodesign/reference/design-principles.md +0 -246
  885. package/.claude/skills/monodesign/reference/distill.md +0 -111
  886. package/.claude/skills/monodesign/reference/document.md +0 -429
  887. package/.claude/skills/monodesign/reference/extract.md +0 -69
  888. package/.claude/skills/monodesign/reference/harden.md +0 -347
  889. package/.claude/skills/monodesign/reference/heuristics-scoring.md +0 -234
  890. package/.claude/skills/monodesign/reference/hooks.md +0 -92
  891. package/.claude/skills/monodesign/reference/image-prompts.md +0 -130
  892. package/.claude/skills/monodesign/reference/init.md +0 -221
  893. package/.claude/skills/monodesign/reference/interaction-design.md +0 -189
  894. package/.claude/skills/monodesign/reference/ios.md +0 -45
  895. package/.claude/skills/monodesign/reference/layout.md +0 -185
  896. package/.claude/skills/monodesign/reference/live.md +0 -710
  897. package/.claude/skills/monodesign/reference/motion-design.md +0 -109
  898. package/.claude/skills/monodesign/reference/onboard.md +0 -234
  899. package/.claude/skills/monodesign/reference/optimize.md +0 -258
  900. package/.claude/skills/monodesign/reference/overdrive.md +0 -130
  901. package/.claude/skills/monodesign/reference/personas.md +0 -179
  902. package/.claude/skills/monodesign/reference/polish.md +0 -241
  903. package/.claude/skills/monodesign/reference/pre-delivery-checklist.md +0 -108
  904. package/.claude/skills/monodesign/reference/product.md +0 -60
  905. package/.claude/skills/monodesign/reference/quieter.md +0 -99
  906. package/.claude/skills/monodesign/reference/responsive-design.md +0 -114
  907. package/.claude/skills/monodesign/reference/shape.md +0 -165
  908. package/.claude/skills/monodesign/reference/spatial-design.md +0 -100
  909. package/.claude/skills/monodesign/reference/teach.md +0 -10
  910. package/.claude/skills/monodesign/reference/token-architecture.md +0 -222
  911. package/.claude/skills/monodesign/reference/typeset.md +0 -301
  912. package/.claude/skills/monodesign/reference/typography.md +0 -159
  913. package/.claude/skills/monodesign/reference/ux-research.md +0 -143
  914. package/.claude/skills/monodesign/reference/ux-rules.md +0 -211
  915. package/.claude/skills/monodesign/reference/ux-writing.md +0 -107
  916. package/.claude/skills/monodesign/scripts/command-metadata.json +0 -94
  917. package/.claude/skills/monodesign/scripts/context-signals.mjs +0 -260
  918. package/.claude/skills/monodesign/scripts/context.mjs +0 -1065
  919. package/.claude/skills/monodesign/scripts/critique-storage.mjs +0 -416
  920. package/.claude/skills/monodesign/scripts/detect-csp.mjs +0 -193
  921. package/.claude/skills/monodesign/scripts/detect.mjs +0 -33
  922. package/.claude/skills/monodesign/scripts/detector/browser/injected/index.mjs +0 -1960
  923. package/.claude/skills/monodesign/scripts/detector/cli/main.mjs +0 -321
  924. package/.claude/skills/monodesign/scripts/detector/design-system.mjs +0 -814
  925. package/.claude/skills/monodesign/scripts/detector/detect-antipatterns-browser.js +0 -5628
  926. package/.claude/skills/monodesign/scripts/detector/detect-antipatterns.mjs +0 -50
  927. package/.claude/skills/monodesign/scripts/detector/engines/browser/detect-url.mjs +0 -259
  928. package/.claude/skills/monodesign/scripts/detector/engines/browser/drivers.mjs +0 -339
  929. package/.claude/skills/monodesign/scripts/detector/engines/regex/detect-text.mjs +0 -636
  930. package/.claude/skills/monodesign/scripts/detector/engines/static-html/css-cascade.mjs +0 -1016
  931. package/.claude/skills/monodesign/scripts/detector/engines/static-html/detect-html.mjs +0 -253
  932. package/.claude/skills/monodesign/scripts/detector/engines/visual/screenshot-contrast.mjs +0 -198
  933. package/.claude/skills/monodesign/scripts/detector/findings.mjs +0 -12
  934. package/.claude/skills/monodesign/scripts/detector/fix/css-regions.mjs +0 -181
  935. package/.claude/skills/monodesign/scripts/detector/fix/fixers.mjs +0 -373
  936. package/.claude/skills/monodesign/scripts/detector/fix/index.mjs +0 -426
  937. package/.claude/skills/monodesign/scripts/detector/node/file-system.mjs +0 -198
  938. package/.claude/skills/monodesign/scripts/detector/profile/profiler.mjs +0 -166
  939. package/.claude/skills/monodesign/scripts/detector/registry/antipatterns.mjs +0 -563
  940. package/.claude/skills/monodesign/scripts/detector/rules/checks.mjs +0 -3024
  941. package/.claude/skills/monodesign/scripts/detector/shared/color.mjs +0 -124
  942. package/.claude/skills/monodesign/scripts/detector/shared/constants.mjs +0 -101
  943. package/.claude/skills/monodesign/scripts/detector/shared/fonts.mjs +0 -30
  944. package/.claude/skills/monodesign/scripts/detector/shared/inline-ignores.mjs +0 -148
  945. package/.claude/skills/monodesign/scripts/detector/shared/page.mjs +0 -7
  946. package/.claude/skills/monodesign/scripts/hook-admin.mjs +0 -694
  947. package/.claude/skills/monodesign/scripts/hook-before-edit.mjs +0 -516
  948. package/.claude/skills/monodesign/scripts/hook-lib.mjs +0 -1785
  949. package/.claude/skills/monodesign/scripts/hook.mjs +0 -61
  950. package/.claude/skills/monodesign/scripts/lib/design-parser.mjs +0 -809
  951. package/.claude/skills/monodesign/scripts/lib/is-generated.mjs +0 -69
  952. package/.claude/skills/monodesign/scripts/lib/monodesign-config.mjs +0 -640
  953. package/.claude/skills/monodesign/scripts/lib/monodesign-paths.mjs +0 -129
  954. package/.claude/skills/monodesign/scripts/lib/provider.mjs +0 -4
  955. package/.claude/skills/monodesign/scripts/lib/target-args.mjs +0 -42
  956. package/.claude/skills/monodesign/scripts/live/browser-script-parts.mjs +0 -50
  957. package/.claude/skills/monodesign/scripts/live/completion.mjs +0 -19
  958. package/.claude/skills/monodesign/scripts/live/event-validation.mjs +0 -137
  959. package/.claude/skills/monodesign/scripts/live/insert-ui.mjs +0 -458
  960. package/.claude/skills/monodesign/scripts/live/manual-apply.mjs +0 -939
  961. package/.claude/skills/monodesign/scripts/live/manual-edit-routes.mjs +0 -357
  962. package/.claude/skills/monodesign/scripts/live/manual-edits-buffer.mjs +0 -152
  963. package/.claude/skills/monodesign/scripts/live/session-store.mjs +0 -293
  964. package/.claude/skills/monodesign/scripts/live/svelte-component.mjs +0 -826
  965. package/.claude/skills/monodesign/scripts/live/sveltekit-adapter.mjs +0 -279
  966. package/.claude/skills/monodesign/scripts/live/ui-core.mjs +0 -180
  967. package/.claude/skills/monodesign/scripts/live/vocabulary.mjs +0 -36
  968. package/.claude/skills/monodesign/scripts/live-accept.mjs +0 -812
  969. package/.claude/skills/monodesign/scripts/live-browser-dom.js +0 -147
  970. package/.claude/skills/monodesign/scripts/live-browser-session.js +0 -124
  971. package/.claude/skills/monodesign/scripts/live-browser.js +0 -11213
  972. package/.claude/skills/monodesign/scripts/live-commit-manual-edits.mjs +0 -1241
  973. package/.claude/skills/monodesign/scripts/live-complete.mjs +0 -75
  974. package/.claude/skills/monodesign/scripts/live-copy-edit-agent.mjs +0 -683
  975. package/.claude/skills/monodesign/scripts/live-discard-manual-edits.mjs +0 -51
  976. package/.claude/skills/monodesign/scripts/live-inject.mjs +0 -596
  977. package/.claude/skills/monodesign/scripts/live-insert.mjs +0 -272
  978. package/.claude/skills/monodesign/scripts/live-manual-edit-evidence.mjs +0 -363
  979. package/.claude/skills/monodesign/scripts/live-poll.mjs +0 -384
  980. package/.claude/skills/monodesign/scripts/live-resume.mjs +0 -94
  981. package/.claude/skills/monodesign/scripts/live-server.mjs +0 -1210
  982. package/.claude/skills/monodesign/scripts/live-status.mjs +0 -61
  983. package/.claude/skills/monodesign/scripts/live-target.mjs +0 -30
  984. package/.claude/skills/monodesign/scripts/live-wrap.mjs +0 -884
  985. package/.claude/skills/monodesign/scripts/live.mjs +0 -297
  986. package/.claude/skills/monodesign/scripts/modern-screenshot.umd.js +0 -14
  987. package/.claude/skills/monodesign/scripts/palette.mjs +0 -635
  988. package/.claude/skills/monodesign/scripts/pin.mjs +0 -221
  989. package/.claude/skills/monodesign/shape.md +0 -71
  990. package/.claude/skills/monodesign/teach.md +0 -18
  991. package/.claude/skills/monodesign/typeset.md +0 -59
  992. package/dist/src/routing/jev-step.d.ts +0 -17
  993. package/dist/src/routing/jev-step.d.ts.map +0 -1
  994. package/dist/src/routing/jev-step.js +0 -27
  995. package/dist/src/routing/jev-step.js.map +0 -1
  996. package/org-skills/accessibility/LICENSE.txt +0 -21
  997. package/org-skills/accessibility/SKILL.md +0 -149
  998. package/org-skills/database-migration/LICENSE.txt +0 -21
  999. package/org-skills/database-migration/SKILL.md +0 -337
  1000. package/org-skills/database-migration/references/details.md +0 -76
  1001. package/org-skills/error-handling-patterns/LICENSE.txt +0 -21
  1002. package/org-skills/error-handling-patterns/SKILL.md +0 -126
  1003. package/org-skills/error-handling-patterns/references/details.md +0 -516
  1004. package/org-skills/internal-comms/LICENSE.txt +0 -202
  1005. package/org-skills/internal-comms/SKILL.md +0 -36
  1006. package/org-skills/internal-comms/examples/3p-updates.md +0 -47
  1007. package/org-skills/internal-comms/examples/company-newsletter.md +0 -65
  1008. package/org-skills/internal-comms/examples/faq-answers.md +0 -30
  1009. package/org-skills/internal-comms/examples/general-comms.md +0 -16
@@ -1,1065 +0,0 @@
1
- /**
2
- * Context loader: prints PRODUCT.md (and DESIGN.md if present) as one
3
- * markdown block on stdout, or prints a `NO_PRODUCT_MD:` message when no
4
- * PRODUCT.md is found anywhere. The skill keys off that message to branch:
5
- * from-scratch build commands (init / teach / craft / shape) and clear
6
- * build/shape intent divert into the init flow, while scoped commands proceed
7
- * using the existing code as context.
8
- *
9
- * Path resolution (first match wins):
10
- * 1. Active project root, if PRODUCT.md or DESIGN.md is there. An explicit
11
- * --target selects the active project: the workspace child in a
12
- * monorepo, or the nearest directory around the target carrying
13
- * canonical context files in an ordinary repo (issue #376).
14
- * 2. Active project .agents/context/ then docs/
15
- * 3. Repo root context, using the same order, as a per-file fallback
16
- * whenever the active project is nested below it
17
- * 4. $MONODESIGN_CONTEXT_DIR (absolute or cwd-relative) — power-user
18
- * escape hatch, only consulted when defaults are empty
19
- * 5. Active project root as a "nothing found" default
20
- *
21
- * `resolveContextDir()` and `loadContext()` are also exported for the
22
- * server-side scripts (live.mjs, live-server.mjs) that need the structured
23
- * shape rather than the markdown block.
24
- */
25
- import fs from 'node:fs';
26
- import os from 'node:os';
27
- import path from 'node:path';
28
- import { fileURLToPath } from 'node:url';
29
- import { parseTargetOptions } from './lib/target-args.mjs';
30
- import { MONODESIGN_COMMAND } from './lib/provider.mjs';
31
-
32
- const PRODUCT_NAMES = ['PRODUCT.md', 'Product.md', 'product.md'];
33
- const DESIGN_NAMES = ['DESIGN.md', 'Design.md', 'design.md'];
34
- const FALLBACK_DIRS = ['.agents/context', 'docs'];
35
- const MONOREPO_MARKER_FILES = ['pnpm-workspace.yaml', 'turbo.json', 'nx.json', 'lerna.json'];
36
- const MONOREPO_FALLBACK_PROJECT_DIRS = ['apps', 'packages'];
37
- const WORKSPACE_DISCOVERY_IGNORED_DIRS = new Set([
38
- 'node_modules',
39
- '.git',
40
- 'dist',
41
- 'build',
42
- '.next',
43
- '.nuxt',
44
- '.svelte-kit',
45
- '.turbo',
46
- '.cache',
47
- 'coverage',
48
- ]);
49
-
50
- // ─── Update check ──────────────────────────────────────────────────────────
51
- // Piggyback a lightweight skill-version check on the once-per-session boot.
52
- // When a newer skill ships, append an UPDATE_AVAILABLE directive so the agent
53
- // can offer `monomind design update`. Everything here is best-effort and
54
- // silent on failure: a network problem, sandbox, or missing cache must never
55
- // block context output or print an error.
56
-
57
- const UPDATE_HOST = (process.env.MONODESIGN_UPDATE_HOST || 'https://github.com/monoes/monomind').replace(/\/$/, '');
58
- const UPDATE_CACHE_PATH =
59
- process.env.MONODESIGN_UPDATE_CACHE || path.join(os.homedir(), '.monodesign', 'update-check.json');
60
- const CHECK_INTERVAL_MS = 24 * 60 * 60 * 1000; // throttle the network poll to once a day
61
- const RENOTIFY_INTERVAL_MS = 7 * 24 * 60 * 60 * 1000; // don't re-surface the same version for a week
62
- const FETCH_TIMEOUT_MS = 1200;
63
-
64
- export function resolveContextDir(cwd = process.cwd(), options = {}) {
65
- return resolveContext(cwd, options).contextDir;
66
- }
67
-
68
- export function loadContext(cwd = process.cwd(), options = {}) {
69
- const resolved = resolveContext(cwd, options);
70
- const absCwd = path.resolve(cwd);
71
- const productPath = resolved.productPath;
72
- const designPath = resolved.designPath;
73
- const product = productPath ? safeRead(productPath) : null;
74
- const design = designPath ? safeRead(designPath) : null;
75
- return {
76
- hasProduct: !!product,
77
- product,
78
- productPath: productPath ? path.relative(absCwd, productPath).split(path.sep).join('/') : null,
79
- hasDesign: !!design,
80
- design,
81
- designPath: designPath ? path.relative(absCwd, designPath).split(path.sep).join('/') : null,
82
- contextDir: resolved.contextDir,
83
- productContextDir: productPath ? path.dirname(productPath) : null,
84
- designContextDir: designPath ? path.dirname(designPath) : null,
85
- projectRoot: resolved.projectRoot,
86
- repoRoot: resolved.repoRoot,
87
- isMonorepo: resolved.isMonorepo,
88
- };
89
- }
90
-
91
- function resolveContext(cwd = process.cwd(), options = {}) {
92
- const absCwd = path.resolve(cwd);
93
- const project = resolveProject(absCwd, options);
94
- const projectContextDir = resolveLocalContextDir(project.projectRoot);
95
- // Per-file inheritance from the repo root whenever the active project is
96
- // nested below it: monorepo workspace children and explicit-target nested
97
- // products in ordinary repos behave the same way.
98
- const rootContextDir = project.repoRoot !== project.projectRoot
99
- ? resolveLocalContextDir(project.repoRoot)
100
- : null;
101
-
102
- let productPath =
103
- (projectContextDir ? firstExisting(projectContextDir, PRODUCT_NAMES) : null)
104
- || (rootContextDir ? firstExisting(rootContextDir, PRODUCT_NAMES) : null);
105
- let designPath =
106
- (projectContextDir ? firstExisting(projectContextDir, DESIGN_NAMES) : null)
107
- || (rootContextDir ? firstExisting(rootContextDir, DESIGN_NAMES) : null);
108
-
109
- let envContextDir = null;
110
- if (!productPath && !designPath) {
111
- envContextDir = resolveEnvContextDir(absCwd);
112
- if (envContextDir) {
113
- productPath = firstExisting(envContextDir, PRODUCT_NAMES);
114
- designPath = firstExisting(envContextDir, DESIGN_NAMES);
115
- }
116
- }
117
-
118
- return {
119
- contextDir: productPath
120
- ? path.dirname(productPath)
121
- : designPath
122
- ? path.dirname(designPath)
123
- : envContextDir || project.projectRoot,
124
- productPath,
125
- designPath,
126
- projectRoot: project.projectRoot,
127
- repoRoot: project.repoRoot,
128
- isMonorepo: project.isMonorepo,
129
- targetDir: project.targetDir,
130
- };
131
- }
132
-
133
- export function resolveProjectRoot(cwd = process.cwd(), options = {}) {
134
- return resolveProject(cwd, options).projectRoot;
135
- }
136
-
137
- export function resolveTargetSelection(cwd = process.cwd(), options = {}) {
138
- if (hasTargetOption(options)) return null;
139
- const project = resolveProject(cwd);
140
- if (
141
- !project.isMonorepo
142
- || !project.projectRoot
143
- || !project.repoRoot
144
- || path.resolve(project.projectRoot) !== path.resolve(project.repoRoot)
145
- ) {
146
- return null;
147
- }
148
- const targetCandidates = discoverTargetCandidates(project.repoRoot);
149
- // No discoverable child apps (e.g. `workspaces: ["."]`, a root-only workspace,
150
- // or a marker file with no apps/packages children): there is nothing to choose,
151
- // so treat the repo root as the active project rather than blocking on an empty
152
- // selection prompt that the user cannot answer.
153
- if (targetCandidates.length === 0) return null;
154
- return {
155
- targetPath: null,
156
- projectRoot: project.projectRoot,
157
- repoRoot: project.repoRoot,
158
- targetCandidates,
159
- };
160
- }
161
-
162
- function resolveProject(cwd = process.cwd(), options = {}) {
163
- const absCwd = path.resolve(cwd);
164
- const targetDir = resolveTargetDir(absCwd, options);
165
- let repoRoot = findMonorepoRoot(targetDir);
166
- if (!repoRoot && targetDir !== absCwd) {
167
- const cwdRepoRoot = findMonorepoRoot(absCwd);
168
- if (cwdRepoRoot && isPathInside(targetDir, cwdRepoRoot)) {
169
- repoRoot = cwdRepoRoot;
170
- }
171
- }
172
- if (!repoRoot) {
173
- return {
174
- targetDir,
175
- projectRoot: nearestTargetContextRoot(absCwd, targetDir) || absCwd,
176
- repoRoot: absCwd,
177
- isMonorepo: false,
178
- };
179
- }
180
- return {
181
- targetDir,
182
- projectRoot: resolveWorkspaceProjectRoot(repoRoot, targetDir) || repoRoot,
183
- repoRoot,
184
- isMonorepo: true,
185
- };
186
- }
187
-
188
- function isPathInside(candidate, root) {
189
- const rel = path.relative(root, candidate).split(path.sep).join('/');
190
- return !!rel && !rel.startsWith('..') && !path.isAbsolute(rel);
191
- }
192
-
193
- function resolveLocalContextDir(root) {
194
- if (firstExisting(root, [...PRODUCT_NAMES, ...DESIGN_NAMES])) {
195
- return root;
196
- }
197
- for (const rel of FALLBACK_DIRS) {
198
- const candidate = path.resolve(root, rel);
199
- if (firstExisting(candidate, [...PRODUCT_NAMES, ...DESIGN_NAMES])) {
200
- return candidate;
201
- }
202
- }
203
- return null;
204
- }
205
-
206
- function resolveEnvContextDir(cwd) {
207
- const envDir = process.env.MONODESIGN_CONTEXT_DIR;
208
- if (!envDir?.trim()) return null;
209
- const trimmed = envDir.trim();
210
- return path.isAbsolute(trimmed) ? trimmed : path.resolve(cwd, trimmed);
211
- }
212
-
213
- function resolveTargetDir(cwd, options = {}) {
214
- const targetPath = options && typeof options === 'object' ? options.targetPath : null;
215
- if (!targetPath || !String(targetPath).trim()) return cwd;
216
- const abs = path.isAbsolute(targetPath) ? targetPath : path.resolve(cwd, targetPath);
217
- try {
218
- const stat = fs.statSync(abs);
219
- return stat.isDirectory() ? abs : path.dirname(abs);
220
- } catch {
221
- return path.extname(abs) ? path.dirname(abs) : abs;
222
- }
223
- }
224
-
225
- function findMonorepoRoot(startDir) {
226
- let dir = path.resolve(startDir);
227
- const homeDir = path.resolve(os.homedir());
228
- while (true) {
229
- if (dir === homeDir) return null;
230
- // isMonorepoRoot is checked before hasGitBoundary on purpose: a workspace
231
- // root that also carries its own .git is still recognized. The trade-off is
232
- // deliberate — a directory with a monorepo *marker* but no workspace patterns
233
- // and no apps/packages children is not a monorepo root, so its .git stops
234
- // traversal and a further-up root is not searched. The nested .git is treated
235
- // as an independent project boundary, which is the intended isolation.
236
- if (isMonorepoRoot(dir)) return dir;
237
- if (hasGitBoundary(dir)) return null;
238
- const parent = path.dirname(dir);
239
- if (parent === dir) return null;
240
- dir = parent;
241
- }
242
- }
243
-
244
- function isMonorepoRoot(dir) {
245
- if (readWorkspacePatterns(dir).some((pattern) => !normalizeWorkspacePattern(pattern).startsWith('!'))) return true;
246
- if (!MONOREPO_MARKER_FILES.some((file) => fs.existsSync(path.join(dir, file)))) return false;
247
- return hasFallbackWorkspaceChildren(dir);
248
- }
249
-
250
- function hasGitBoundary(dir) {
251
- return fs.existsSync(path.join(dir, '.git'));
252
- }
253
-
254
- function hasFallbackWorkspaceChildren(dir) {
255
- for (const name of MONOREPO_FALLBACK_PROJECT_DIRS) {
256
- const base = path.join(dir, name);
257
- let entries;
258
- try {
259
- entries = fs.readdirSync(base, { withFileTypes: true });
260
- } catch {
261
- continue;
262
- }
263
- if (entries.some((entry) => entry.isDirectory() && !isIgnoredWorkspaceDiscoveryDir(entry.name))) return true;
264
- }
265
- return false;
266
- }
267
-
268
- function discoverTargetCandidates(repoRoot) {
269
- const roots = new Map();
270
- const patterns = readWorkspacePatterns(repoRoot);
271
- for (const pattern of patterns) {
272
- for (const root of discoverRootsForPattern(repoRoot, pattern)) {
273
- roots.set(path.relative(repoRoot, root).split(path.sep).join('/'), root);
274
- }
275
- }
276
- if (MONOREPO_MARKER_FILES.some((file) => fs.existsSync(path.join(repoRoot, file)))) {
277
- for (const name of MONOREPO_FALLBACK_PROJECT_DIRS) {
278
- const base = path.join(repoRoot, name);
279
- let entries;
280
- try {
281
- entries = fs.readdirSync(base, { withFileTypes: true });
282
- } catch {
283
- continue;
284
- }
285
- for (const entry of entries) {
286
- if (!entry.isDirectory() || isIgnoredWorkspaceDiscoveryDir(entry.name)) continue;
287
- const root = path.join(base, entry.name);
288
- roots.set(path.relative(repoRoot, root).split(path.sep).join('/'), root);
289
- }
290
- }
291
- }
292
- return [...roots.entries()]
293
- .filter(([rel]) => rel && !rel.startsWith('..'))
294
- // Honor negated workspace patterns (e.g. "!packages/internal"). resolveWorkspaceProjectRoot
295
- // sends an excluded package back to the repo root, so an excluded folder must not appear as a
296
- // selectable target — choosing it would silently resolve to the root instead.
297
- .filter(([rel]) => !isExcludedByWorkspacePattern(rel.split('/').filter(Boolean), patterns))
298
- .sort(([a], [b]) => a.localeCompare(b))
299
- .map(([rel, root]) => {
300
- const targetExample = findTargetExample(repoRoot, root);
301
- return {
302
- name: path.basename(root),
303
- path: rel,
304
- targetExample,
305
- ...resolveCandidateContextSummary(repoRoot, root, targetExample),
306
- };
307
- });
308
- }
309
-
310
- function resolveCandidateContextSummary(repoRoot, projectRoot, targetPath) {
311
- const ctx = resolveContext(repoRoot, { targetPath });
312
- return {
313
- productStatus: contextSourceStatus(ctx.productPath, repoRoot, projectRoot),
314
- productPath: contextSourcePath(ctx.productPath, repoRoot),
315
- designStatus: contextSourceStatus(ctx.designPath, repoRoot, projectRoot),
316
- designPath: contextSourcePath(ctx.designPath, repoRoot),
317
- };
318
- }
319
-
320
- // Selection candidates surface one of four statuses: 'child' (a canonical
321
- // PRODUCT.md/DESIGN.md directly in the app root), 'inherited' (resolved from the
322
- // repo root in a monorepo), 'missing' (no file found), and 'fallback'. 'fallback'
323
- // intentionally covers two non-canonical locations: a file inside the project
324
- // root but in a subdirectory (FALLBACK_DIRS, e.g. `.agents/context/`), and a file
325
- // outside both the project and repo roots (MONODESIGN_CONTEXT_DIR override).
326
- function contextSourceStatus(filePath, repoRoot, projectRoot) {
327
- if (!filePath) return 'missing';
328
- const absPath = path.resolve(filePath);
329
- const absProjectRoot = path.resolve(projectRoot);
330
- const absRepoRoot = path.resolve(repoRoot);
331
- if (isPathInsideOrEqual(absPath, absProjectRoot)) {
332
- return path.dirname(absPath) === absProjectRoot ? 'child' : 'fallback';
333
- }
334
- if (absProjectRoot !== absRepoRoot && isPathInsideOrEqual(absPath, absRepoRoot)) {
335
- return 'inherited';
336
- }
337
- return 'fallback';
338
- }
339
-
340
- function contextSourcePath(filePath, repoRoot) {
341
- if (!filePath) return null;
342
- const rel = path.relative(repoRoot, filePath).split(path.sep).join('/');
343
- if (rel && !rel.startsWith('..') && !path.isAbsolute(rel)) {
344
- return rel;
345
- }
346
- return filePath;
347
- }
348
-
349
- function discoverRootsForPattern(repoRoot, rawPattern) {
350
- const pattern = normalizeWorkspacePattern(rawPattern);
351
- if (!pattern || pattern.startsWith('!')) return [];
352
- const segments = pattern.split('/').filter(Boolean);
353
- if (!segments.length) return [];
354
- const firstGlobIndex = segments.findIndex((segment) => segment.includes('*'));
355
- const literalPrefix = firstGlobIndex === -1 ? segments : segments.slice(0, firstGlobIndex);
356
- const base = path.join(repoRoot, ...literalPrefix);
357
- if (!fs.existsSync(base)) return [];
358
- if (segments.includes('**')) {
359
- const packageRoots = [];
360
- walkDirs(base, (dir) => {
361
- if (dir !== base && isCandidateProjectRoot(dir)) packageRoots.push(dir);
362
- });
363
- if (packageRoots.length) return packageRoots;
364
- return directChildDirs(base);
365
- }
366
- return expandSimplePattern(repoRoot, segments);
367
- }
368
-
369
- function expandSimplePattern(repoRoot, patternSegments, index = 0, current = repoRoot) {
370
- if (index >= patternSegments.length) return fs.existsSync(current) ? [current] : [];
371
- const segment = patternSegments[index];
372
- if (!segment.includes('*')) {
373
- return expandSimplePattern(repoRoot, patternSegments, index + 1, path.join(current, segment));
374
- }
375
- let entries;
376
- try {
377
- entries = fs.readdirSync(current, { withFileTypes: true });
378
- } catch {
379
- return [];
380
- }
381
- const roots = [];
382
- for (const entry of entries) {
383
- if (!entry.isDirectory() || isIgnoredWorkspaceDiscoveryDir(entry.name)) continue;
384
- if (!segmentMatches(segment, entry.name)) continue;
385
- roots.push(...expandSimplePattern(repoRoot, patternSegments, index + 1, path.join(current, entry.name)));
386
- }
387
- return roots;
388
- }
389
-
390
- function directChildDirs(dir) {
391
- try {
392
- return fs.readdirSync(dir, { withFileTypes: true })
393
- .filter((entry) => entry.isDirectory() && !isIgnoredWorkspaceDiscoveryDir(entry.name))
394
- .map((entry) => path.join(dir, entry.name));
395
- } catch {
396
- return [];
397
- }
398
- }
399
-
400
- function walkDirs(root, visit) {
401
- let entries;
402
- try {
403
- entries = fs.readdirSync(root, { withFileTypes: true });
404
- } catch {
405
- return;
406
- }
407
- for (const entry of entries) {
408
- if (!entry.isDirectory() || isIgnoredWorkspaceDiscoveryDir(entry.name)) continue;
409
- const dir = path.join(root, entry.name);
410
- visit(dir);
411
- walkDirs(dir, visit);
412
- }
413
- }
414
-
415
- function isCandidateProjectRoot(dir) {
416
- return !!(
417
- fs.existsSync(path.join(dir, 'package.json'))
418
- || firstExisting(dir, [...PRODUCT_NAMES, ...DESIGN_NAMES])
419
- || fs.existsSync(path.join(dir, 'src'))
420
- || fs.existsSync(path.join(dir, 'app'))
421
- || fs.existsSync(path.join(dir, 'pages'))
422
- || fs.existsSync(path.join(dir, 'public'))
423
- );
424
- }
425
-
426
- function isIgnoredWorkspaceDiscoveryDir(name) {
427
- return name.startsWith('.') || WORKSPACE_DISCOVERY_IGNORED_DIRS.has(name);
428
- }
429
-
430
- function findTargetExample(repoRoot, projectRoot) {
431
- const examples = [
432
- 'src/App.jsx',
433
- 'src/App.tsx',
434
- 'src/main.jsx',
435
- 'src/main.tsx',
436
- 'src/index.jsx',
437
- 'src/index.ts',
438
- 'app/page.tsx',
439
- 'pages/index.tsx',
440
- 'public/index.html',
441
- ];
442
- for (const rel of examples) {
443
- const abs = path.join(projectRoot, rel);
444
- if (fs.existsSync(abs)) return path.relative(repoRoot, abs).split(path.sep).join('/');
445
- }
446
- return path.relative(repoRoot, projectRoot).split(path.sep).join('/');
447
- }
448
-
449
- function resolveWorkspaceProjectRoot(repoRoot, targetDir) {
450
- const rel = path.relative(repoRoot, targetDir).split(path.sep).join('/');
451
- if (!rel || rel.startsWith('..') || path.isAbsolute(rel)) return repoRoot;
452
- // rel is POSIX-normalised above, so split on '/' — splitting on path.sep here
453
- // returned the whole string as a single segment on Windows, no workspace
454
- // pattern ever matched, and every child project silently resolved to the
455
- // repo root instead.
456
- const relSegments = rel.split('/').filter(Boolean);
457
- const patterns = readWorkspacePatterns(repoRoot);
458
- const excluded = isExcludedByWorkspacePattern(relSegments, patterns);
459
- if (!excluded) {
460
- for (const pattern of patterns) {
461
- const projectRoot = projectRootFromWorkspacePattern(repoRoot, relSegments, pattern);
462
- if (projectRoot) return projectRoot;
463
- }
464
- }
465
- if (excluded) return repoRoot;
466
- if (
467
- relSegments.length >= 2
468
- && MONOREPO_FALLBACK_PROJECT_DIRS.includes(relSegments[0])
469
- ) {
470
- return path.join(repoRoot, relSegments[0], relSegments[1]);
471
- }
472
- const nearest = nearestProjectLikeRoot(repoRoot, targetDir);
473
- if (nearest) return nearest;
474
- return repoRoot;
475
- }
476
-
477
- function isExcludedByWorkspacePattern(relSegments, patterns) {
478
- return patterns.some((rawPattern) => {
479
- const pattern = normalizeWorkspacePattern(rawPattern);
480
- if (!pattern.startsWith('!')) return false;
481
- return workspacePatternMatchesRel(pattern.slice(1), relSegments);
482
- });
483
- }
484
-
485
- // An explicit --target in an ordinary (non-monorepo) repository must still
486
- // select a nested product's own context (issue #376). Walk from the target up
487
- // to — but not including — the invocation root and return the nearest
488
- // directory carrying context files, in the canonical spot or a fallback dir
489
- // (resolveLocalContextDir covers both). Context files only, not package.json:
490
- // without the monorepo root-context fallback, a package.json marker would
491
- // strand targets inside plain subpackages away from the root PRODUCT.md. The
492
- // cwd's own fallback context dirs (.agents/context, docs) hold the root
493
- // project's context, not a nested product, so they never count.
494
- // Returns null when nothing nested is found, keeping the cwd default.
495
- function nearestTargetContextRoot(absCwd, targetDir) {
496
- if (!isPathInside(targetDir, absCwd)) return null;
497
- const rootFallbackDirs = FALLBACK_DIRS.map((rel) => path.resolve(absCwd, rel));
498
- let dir = path.resolve(targetDir);
499
- while (dir && dir !== absCwd) {
500
- if (!rootFallbackDirs.includes(dir) && resolveLocalContextDir(dir)) {
501
- return dir;
502
- }
503
- const parent = path.dirname(dir);
504
- if (parent === dir) break;
505
- dir = parent;
506
- }
507
- return null;
508
- }
509
-
510
- function nearestProjectLikeRoot(repoRoot, targetDir) {
511
- let dir = path.resolve(targetDir);
512
- const stop = path.resolve(repoRoot);
513
- while (dir && dir !== stop) {
514
- if (
515
- firstExisting(dir, [...PRODUCT_NAMES, ...DESIGN_NAMES])
516
- || fs.existsSync(path.join(dir, 'package.json'))
517
- ) {
518
- return dir;
519
- }
520
- const parent = path.dirname(dir);
521
- if (parent === dir) break;
522
- dir = parent;
523
- }
524
- return null;
525
- }
526
-
527
- function nearestPackageRootBetween(repoRoot, targetDir, stopDir) {
528
- let dir = path.resolve(targetDir);
529
- const stop = path.resolve(stopDir || repoRoot);
530
- const root = path.resolve(repoRoot);
531
- while (dir && dir !== stop && isPathInsideOrEqual(dir, root)) {
532
- if (fs.existsSync(path.join(dir, 'package.json'))) return dir;
533
- const parent = path.dirname(dir);
534
- if (parent === dir) break;
535
- dir = parent;
536
- }
537
- return null;
538
- }
539
-
540
- function isPathInsideOrEqual(candidate, root) {
541
- return path.resolve(candidate) === path.resolve(root) || isPathInside(candidate, root);
542
- }
543
-
544
- function workspacePatternMatchesRel(pattern, relSegments) {
545
- const patternSegments = normalizeWorkspacePattern(pattern).split('/').filter(Boolean);
546
- if (!patternSegments.length) return false;
547
- if (patternSegments.includes('**')) {
548
- const firstGlobIndex = patternSegments.findIndex((segment) => segment.includes('*'));
549
- const literalPrefix = firstGlobIndex === -1
550
- ? patternSegments
551
- : patternSegments.slice(0, firstGlobIndex);
552
- if (relSegments.length < literalPrefix.length + 1) return false;
553
- for (let i = 0; i < literalPrefix.length; i++) {
554
- if (!segmentMatches(literalPrefix[i], relSegments[i])) return false;
555
- }
556
- return true;
557
- }
558
- if (relSegments.length < patternSegments.length) return false;
559
- for (let i = 0; i < patternSegments.length; i++) {
560
- if (!segmentMatches(patternSegments[i], relSegments[i])) return false;
561
- }
562
- return true;
563
- }
564
-
565
- function readWorkspacePatterns(repoRoot) {
566
- return [
567
- ...readPackageWorkspaces(repoRoot),
568
- ...readPnpmWorkspaces(repoRoot),
569
- ...readLernaWorkspaces(repoRoot),
570
- ].filter(Boolean);
571
- }
572
-
573
- function readPackageWorkspaces(repoRoot) {
574
- const pkg = readJson(path.join(repoRoot, 'package.json'));
575
- const workspaces = pkg?.workspaces;
576
- if (Array.isArray(workspaces)) return workspaces;
577
- if (Array.isArray(workspaces?.packages)) return workspaces.packages;
578
- return [];
579
- }
580
-
581
- function readLernaWorkspaces(repoRoot) {
582
- const lerna = readJson(path.join(repoRoot, 'lerna.json'));
583
- return Array.isArray(lerna?.packages) ? lerna.packages : [];
584
- }
585
-
586
- function readPnpmWorkspaces(repoRoot) {
587
- try {
588
- const body = fs.readFileSync(path.join(repoRoot, 'pnpm-workspace.yaml'), 'utf-8');
589
- const patterns = [];
590
- let inPackages = false;
591
- for (const line of body.split(/\r?\n/)) {
592
- const trimmed = stripYamlInlineComment(line).trim();
593
- if (!trimmed || trimmed.startsWith('#')) continue;
594
- const flowMatch = trimmed.match(/^packages:\s*\[(.*)\]\s*$/);
595
- if (flowMatch) {
596
- patterns.push(...parseYamlFlowList(flowMatch[1]));
597
- inPackages = false;
598
- continue;
599
- }
600
- if (/^packages:\s*$/.test(trimmed)) {
601
- inPackages = true;
602
- continue;
603
- }
604
- if (inPackages && /^[A-Za-z0-9_-]+:\s*/.test(trimmed)) break;
605
- if (inPackages) {
606
- const match = trimmed.match(/^-\s*(.+)$/);
607
- if (match) patterns.push(unquoteYamlValue(match[1]));
608
- }
609
- }
610
- return patterns;
611
- } catch {
612
- return [];
613
- }
614
- }
615
-
616
- function stripYamlInlineComment(line) {
617
- let quote = null;
618
- for (let i = 0; i < line.length; i++) {
619
- const ch = line[i];
620
- if ((ch === '"' || ch === "'") && line[i - 1] !== '\\') {
621
- quote = quote === ch ? null : quote || ch;
622
- continue;
623
- }
624
- if (ch === '#' && !quote) return line.slice(0, i);
625
- }
626
- return line;
627
- }
628
-
629
- function parseYamlFlowList(body) {
630
- const items = [];
631
- let quote = null;
632
- let current = '';
633
- for (let i = 0; i < body.length; i++) {
634
- const ch = body[i];
635
- if ((ch === '"' || ch === "'") && body[i - 1] !== '\\') {
636
- quote = quote === ch ? null : quote || ch;
637
- current += ch;
638
- continue;
639
- }
640
- if (ch === ',' && !quote) {
641
- const value = unquoteYamlValue(current);
642
- if (value) items.push(value);
643
- current = '';
644
- continue;
645
- }
646
- current += ch;
647
- }
648
- const value = unquoteYamlValue(current);
649
- if (value) items.push(value);
650
- return items;
651
- }
652
-
653
- function unquoteYamlValue(value) {
654
- return String(value || '')
655
- .trim()
656
- .replace(/^['"]|['"]$/g, '');
657
- }
658
-
659
- function readJson(filePath) {
660
- try {
661
- return JSON.parse(fs.readFileSync(filePath, 'utf-8'));
662
- } catch {
663
- return null;
664
- }
665
- }
666
-
667
- function projectRootFromWorkspacePattern(repoRoot, relSegments, rawPattern) {
668
- const pattern = normalizeWorkspacePattern(rawPattern);
669
- if (!pattern || pattern.startsWith('!')) return null;
670
- const patternSegments = pattern.split('/').filter(Boolean);
671
- if (!patternSegments.length) return null;
672
- if (patternSegments.includes('**')) {
673
- return projectRootFromDoubleStarPattern(repoRoot, relSegments, patternSegments);
674
- }
675
- if (relSegments.length < patternSegments.length) return null;
676
- for (let i = 0; i < patternSegments.length; i++) {
677
- if (!segmentMatches(patternSegments[i], relSegments[i])) return null;
678
- }
679
- return path.join(repoRoot, ...relSegments.slice(0, patternSegments.length));
680
- }
681
-
682
- function projectRootFromDoubleStarPattern(repoRoot, relSegments, patternSegments) {
683
- const firstGlobIndex = patternSegments.findIndex((segment) => segment.includes('*'));
684
- const literalPrefix = firstGlobIndex === -1
685
- ? patternSegments
686
- : patternSegments.slice(0, firstGlobIndex);
687
- if (relSegments.length < literalPrefix.length + 1) return null;
688
- for (let i = 0; i < literalPrefix.length; i++) {
689
- if (!segmentMatches(literalPrefix[i], relSegments[i])) return null;
690
- }
691
- const prefixDir = path.join(repoRoot, ...literalPrefix);
692
- const targetDir = path.join(repoRoot, ...relSegments);
693
- const packageRoot = nearestPackageRootBetween(repoRoot, targetDir, prefixDir);
694
- if (packageRoot) return packageRoot;
695
- return path.join(repoRoot, ...relSegments.slice(0, literalPrefix.length + 1));
696
- }
697
-
698
- function normalizeWorkspacePattern(pattern) {
699
- return String(pattern || '')
700
- .trim()
701
- .replace(/^['"]|['"]$/g, '')
702
- .replace(/^\.\//, '')
703
- .replace(/\/+$/, '');
704
- }
705
-
706
- function segmentMatches(patternSegment, relSegment) {
707
- if (patternSegment === '*') return true;
708
- if (!patternSegment.includes('*')) return patternSegment === relSegment;
709
- const re = new RegExp(`^${escapeRegExp(patternSegment).replace(/\\\*/g, '[^/]*')}$`);
710
- return re.test(relSegment);
711
- }
712
-
713
- function firstExisting(dir, names) {
714
- for (const name of names) {
715
- const abs = path.join(dir, name);
716
- if (fs.existsSync(abs)) return abs;
717
- }
718
- return null;
719
- }
720
-
721
- function safeRead(p) {
722
- try {
723
- return fs.readFileSync(p, 'utf-8');
724
- } catch {
725
- return null;
726
- }
727
- }
728
-
729
- function escapeRegExp(value) {
730
- return String(value).replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
731
- }
732
-
733
- /**
734
- * Read the first non-empty line under a bare `## <heading>` section of
735
- * PRODUCT.md (e.g. `## Register`, `## Platform`). Returns null when the
736
- * section is absent. The heading match is exact (`\s*$`) so near-miss
737
- * headings like `## Register guidelines` don't shadow the real field.
738
- */
739
- export function extractSectionValue(product, heading) {
740
- if (!product) return null;
741
- const headingRe = new RegExp(`^##\\s+${escapeRegExp(heading)}\\s*$`, 'i');
742
- const lines = product.split('\n');
743
- for (let i = 0; i < lines.length; i++) {
744
- if (headingRe.test(lines[i].trim())) {
745
- for (let j = i + 1; j < lines.length; j++) {
746
- const next = lines[j].trim();
747
- // A new heading before any value means the section is empty.
748
- if (/^#{1,6}\s/.test(next)) return null;
749
- if (next) return next;
750
- }
751
- }
752
- }
753
- return null;
754
- }
755
-
756
- /**
757
- * Pull the register (`brand` or `product`) out of PRODUCT.md by looking
758
- * for a `## Register` section and reading the first non-empty line that
759
- * follows it. Returns null when the file is legacy / register-less.
760
- */
761
- export function extractRegister(product) {
762
- const word = (extractSectionValue(product, 'Register') || '').toLowerCase();
763
- return word === 'brand' || word === 'product' ? word : null;
764
- }
765
-
766
- /**
767
- * Pull the platform (`web`, `ios`, `android`, or `adaptive`) out of PRODUCT.md
768
- * by looking for a `## Platform` section and reading the first non-empty line
769
- * that follows it. `adaptive` is for cross-platform apps (Flutter, React
770
- * Native) that ship both iOS and Android from one codebase; a line that names
771
- * both targets (e.g. `ios, android`) is also read as `adaptive`. Returns null
772
- * when the file is legacy / platform-less, which the skill treats as `web`
773
- * (the default the general rules already assume).
774
- */
775
- export function extractPlatform(product) {
776
- const value = (extractSectionValue(product, 'Platform') || '').toLowerCase();
777
- if (!value) return null;
778
- if (value === 'web' || value === 'ios' || value === 'android' || value === 'adaptive') return value;
779
- // A short list naming both native targets (`ios, android`, `ios and
780
- // android`) = adaptive. Only list separators and the two platform words may
781
- // appear; anything else (prose, negations) is unrecognized and falls
782
- // through to the CLI's WARNING path.
783
- const tokens = value.split(/[\s,+&/]+/).filter(t => t && t !== 'and');
784
- if (tokens.length >= 2 && tokens.every(t => t === 'ios' || t === 'android')
785
- && tokens.includes('ios') && tokens.includes('android')) {
786
- return 'adaptive';
787
- }
788
- return null;
789
- }
790
-
791
- /**
792
- * Read the installed skill's own version from the sibling SKILL.md frontmatter
793
- * (this file lives at `<skill>/scripts/context.mjs`). Returns null when the
794
- * frontmatter is missing or unreadable.
795
- */
796
- function readLocalSkillVersion() {
797
- try {
798
- const here = path.dirname(fileURLToPath(import.meta.url));
799
- const skillMd = path.join(here, '..', 'SKILL.md');
800
- const content = fs.readFileSync(skillMd, 'utf-8');
801
- const match = content.match(/^version:\s*(.+)$/m);
802
- return match ? match[1].trim().replace(/^["']|["']$/g, '') : null;
803
- } catch {
804
- return null;
805
- }
806
- }
807
-
808
- function readUpdateCache() {
809
- try {
810
- return JSON.parse(fs.readFileSync(UPDATE_CACHE_PATH, 'utf-8'));
811
- } catch {
812
- return {};
813
- }
814
- }
815
-
816
- function writeUpdateCache(cache) {
817
- try {
818
- fs.mkdirSync(path.dirname(UPDATE_CACHE_PATH), { recursive: true });
819
- fs.writeFileSync(UPDATE_CACHE_PATH, JSON.stringify(cache));
820
- } catch {
821
- // Best-effort: a read-only home dir just means we re-poll next session.
822
- }
823
- }
824
-
825
- /** Compare dotted numeric versions. Returns >0 when a is newer than b. */
826
- function compareSemver(a, b) {
827
- const pa = String(a).split('.').map(n => parseInt(n, 10) || 0);
828
- const pb = String(b).split('.').map(n => parseInt(n, 10) || 0);
829
- for (let i = 0; i < Math.max(pa.length, pb.length); i++) {
830
- const diff = (pa[i] || 0) - (pb[i] || 0);
831
- if (diff !== 0) return diff;
832
- }
833
- return 0;
834
- }
835
-
836
- async function fetchLatestSkillVersion() {
837
- try {
838
- const res = await fetch(`${UPDATE_HOST}/api/version`, { signal: AbortSignal.timeout(FETCH_TIMEOUT_MS) });
839
- if (!res.ok) return null;
840
- const data = await res.json();
841
- return typeof data?.skills === 'string' ? data.skills : null;
842
- } catch {
843
- return null; // offline, sandboxed, timed out, or bad JSON: all non-fatal
844
- }
845
- }
846
-
847
- function buildUpdateDirective(localVersion, latestVersion) {
848
- return (
849
- `UPDATE_AVAILABLE: A newer Monodesign skill is available ` +
850
- `(installed v${localVersion}, latest v${latestVersion}). ` +
851
- `Before continuing, ask the user once: "A newer Monodesign (v${latestVersion}) is available. ` +
852
- `Update now? It runs \`monomind design update\`." ` +
853
- `If they agree, run \`monomind design update\` (the update applies to the next session, not this one). ` +
854
- `Either way, continue the current task without waiting, and do not raise this again.`
855
- );
856
- }
857
-
858
- /**
859
- * Best-effort update directive for the boot output. Returns a string to append
860
- * or null. Polls the version endpoint at most once per day (cached globally in
861
- * the user's home dir) and re-surfaces a given version at most once per week so
862
- * the agent never nags. Opt out entirely with MONODESIGN_NO_UPDATE_CHECK=1.
863
- */
864
- // Read the unified config's top-level `updateCheck` (local overrides shared).
865
- // Inlined rather than importing hook-lib so the boot path stays lightweight.
866
- function updateCheckDisabledByConfig(cwd = process.cwd()) {
867
- let value;
868
- for (const name of ['config.json', 'config.local.json']) {
869
- try {
870
- const raw = JSON.parse(fs.readFileSync(path.join(cwd, '.monodesign', name), 'utf-8'));
871
- if (raw && typeof raw === 'object' && typeof raw.updateCheck === 'boolean') value = raw.updateCheck;
872
- } catch { /* missing or malformed: ignore */ }
873
- }
874
- return value === false;
875
- }
876
-
877
- async function computeUpdateDirective(now = Date.now()) {
878
- // Update checking is disabled in monomind: the skill ships with the monomind
879
- // package and follows monomind's own update flow (`monomind update`), so
880
- // there is no separate registry endpoint to poll. Kept as a stub so the boot
881
- // path (and MONODESIGN_NO_UPDATE_CHECK-aware tests) stays unchanged.
882
- return null;
883
- // biome-ignore lint/correctness/noUnreachable: disabled on purpose (see above); kept to re-enable
884
- try {
885
- if (process.env.MONODESIGN_NO_UPDATE_CHECK) return null;
886
- if (updateCheckDisabledByConfig()) return null;
887
- const localVersion = readLocalSkillVersion();
888
- if (!localVersion) return null;
889
-
890
- const cache = readUpdateCache();
891
-
892
- // Poll the network only when the throttle window has elapsed. Stamp
893
- // lastCheck even on failure so an offline machine doesn't poll every boot.
894
- if (!cache.lastCheck || now - cache.lastCheck > CHECK_INTERVAL_MS) {
895
- const latest = await fetchLatestSkillVersion();
896
- cache.lastCheck = now;
897
- if (latest) cache.latestVersion = latest;
898
- writeUpdateCache(cache);
899
- }
900
-
901
- const latest = cache.latestVersion;
902
- if (!latest || compareSemver(latest, localVersion) <= 0) return null;
903
-
904
- // Anti-nag: surface a given version at most once per RENOTIFY window.
905
- if (cache.notifiedVersion === latest && cache.notifiedAt && now - cache.notifiedAt < RENOTIFY_INTERVAL_MS) {
906
- return null;
907
- }
908
- cache.notifiedVersion = latest;
909
- cache.notifiedAt = now;
910
- writeUpdateCache(cache);
911
-
912
- return buildUpdateDirective(localVersion, latest);
913
- } catch {
914
- return null;
915
- }
916
- }
917
-
918
- async function cli() {
919
- let cliOptions;
920
- try {
921
- cliOptions = parseCliOptions(process.argv.slice(2));
922
- } catch (err) {
923
- if (err?.name === 'TargetArgError') {
924
- process.stderr.write(`${err.message}\n`);
925
- process.exit(1);
926
- }
927
- throw err;
928
- }
929
- const targetProvided = hasTargetOption(cliOptions);
930
- const targetExists = targetProvided ? pathExistsForTarget(process.cwd(), cliOptions.targetPath) : null;
931
- const selection = resolveTargetSelection(process.cwd(), cliOptions);
932
- if (selection) {
933
- process.stdout.write(`${buildTargetSelectionDirective(selection)}\n`);
934
- process.exit(0);
935
- }
936
- const ctx = loadContext(process.cwd(), cliOptions);
937
- const updateDirective = await computeUpdateDirective();
938
-
939
- if (!ctx.hasProduct) {
940
- // Direct stdout message instead of relying on empty output as a signal
941
- // — cheap models miss the empty case more often than the explicit one.
942
- const parts = [
943
- 'NO_PRODUCT_MD: This project has no PRODUCT.md yet. ' +
944
- 'Follow SKILL.md Setup step 1: for `init`, `teach`, `craft`, `shape`, ' +
945
- 'or wording that clearly maps to a from-scratch build/shape flow, load ' +
946
- 'reference/init.md and write PRODUCT.md first; for any other (scoped) ' +
947
- 'command against existing code, proceed using the code as context and ' +
948
- `offer \`${MONODESIGN_COMMAND} init\` as a suggestion (do not block).`,
949
- ];
950
- parts.push(buildResolvedContextDirective(ctx, cliOptions, { targetExists }));
951
- if (shouldWarnMissingTarget(ctx, targetProvided, targetExists)) {
952
- parts.push(buildMissingTargetDirective());
953
- }
954
- if (updateDirective) parts.push(updateDirective);
955
- process.stdout.write(`${parts.join('\n\n---\n\n')}\n`);
956
- process.exit(0);
957
- }
958
- const parts = [`# PRODUCT.md\n\n${ctx.product.trim()}`];
959
- if (ctx.hasDesign) {
960
- parts.push(`# DESIGN.md\n\n${ctx.design.trim()}`);
961
- }
962
- parts.push(buildResolvedContextDirective(ctx, cliOptions, { targetExists }));
963
- if (shouldWarnMissingTarget(ctx, targetProvided, targetExists)) {
964
- parts.push(buildMissingTargetDirective());
965
- }
966
- const register = extractRegister(ctx.product);
967
- const next = register
968
- ? `NEXT STEP: This project's register is \`${register}\`. You MUST now read \`reference/${register}.md\` before producing any design output.`
969
- : `NEXT STEP: You MUST now read the matching register reference (\`reference/brand.md\` or \`reference/product.md\`) before producing any design output. Pick based on PRODUCT.md above.`;
970
- parts.push(next);
971
- const platform = extractPlatform(ctx.product);
972
- const nativeRefs =
973
- platform === 'adaptive' ? ['ios', 'android'] : platform === 'ios' || platform === 'android' ? [platform] : [];
974
- if (nativeRefs.length) {
975
- const refList = nativeRefs.map(p => `\`reference/${p}.md\``).join(' and ');
976
- const label = platform === 'adaptive' ? '`adaptive` (both iOS and Android)' : `\`${platform}\``;
977
- parts.push(
978
- `NEXT STEP: This project targets ${label}. Also read ${refList} for native conventions, in addition to the register reference.`,
979
- );
980
- } else if (!platform) {
981
- // A `## Platform` section that names something we don't recognize (a
982
- // toolchain like `flutter`, a typo) would otherwise silently fall back to
983
- // web — the wrong default exactly when the user tried to say "native".
984
- const rawPlatform = extractSectionValue(ctx.product, 'Platform');
985
- if (rawPlatform) {
986
- parts.push(
987
- `WARNING: PRODUCT.md's \`## Platform\` value \`${rawPlatform}\` is not recognized; treating the project as \`web\`. Valid values are \`web\`, \`ios\`, \`android\`, or \`adaptive\` (cross-platform, ships both). If this project is native, fix the field (name the design language the app renders, not the toolchain) and surface it to the user.`,
988
- );
989
- }
990
- }
991
- if (updateDirective) parts.push(updateDirective);
992
- process.stdout.write(`${parts.join('\n\n---\n\n')}\n`);
993
- }
994
-
995
- function parseCliOptions(args) {
996
- return parseTargetOptions(args, { strict: true });
997
- }
998
-
999
- function hasTargetOption(options) {
1000
- return !!(options && typeof options.targetPath === 'string' && options.targetPath.trim());
1001
- }
1002
-
1003
- function pathExistsForTarget(cwd, targetPath) {
1004
- const abs = path.isAbsolute(targetPath) ? targetPath : path.resolve(cwd, targetPath);
1005
- return fs.existsSync(abs);
1006
- }
1007
-
1008
- function buildResolvedContextDirective(ctx, options, { targetExists = null } = {}) {
1009
- const targetPath = hasTargetOption(options) ? options.targetPath : null;
1010
- return `RESOLVED_CONTEXT:\n${JSON.stringify({
1011
- targetPath,
1012
- ...(targetPath ? { targetExists } : {}),
1013
- projectRoot: ctx.projectRoot,
1014
- repoRoot: ctx.repoRoot,
1015
- productPath: ctx.productPath,
1016
- designPath: ctx.designPath,
1017
- }, null, 2)}`;
1018
- }
1019
-
1020
- function shouldWarnMissingTarget(ctx, targetProvided, targetExists = null) {
1021
- if (ctx.isMonorepo && targetProvided && targetExists === false) return true;
1022
- return !!(
1023
- ctx.isMonorepo
1024
- && (!targetProvided || targetExists === false)
1025
- && ctx.projectRoot
1026
- && ctx.repoRoot
1027
- && path.resolve(ctx.projectRoot) === path.resolve(ctx.repoRoot)
1028
- );
1029
- }
1030
-
1031
- function buildMissingTargetDirective() {
1032
- const script = process.argv[1] || 'context.mjs';
1033
- return (
1034
- 'MONOREPO_TARGET_REQUIRED: This is a monorepo and context.mjs ran without --target. ' +
1035
- 'If the user named a file, route, or child app, do not answer from this output. ' +
1036
- `Rerun \`node ${script} --target <path>\` and answer from that run's RESOLVED_CONTEXT fields.`
1037
- );
1038
- }
1039
-
1040
- function buildTargetSelectionDirective(selection) {
1041
- return (
1042
- `TARGET_SELECTION_REQUIRED:\n${JSON.stringify(selection, null, 2)}\n\n` +
1043
- 'Show each app with its productStatus/productPath and designStatus/designPath so the user can see child overrides, inherited root files, fallback files, or missing files before choosing. ' +
1044
- 'Ask the user which app Monodesign should use, then rerun Monodesign helper commands from that child app cwd using this same scripts directory. ' +
1045
- 'Use `--target <path>` only as a fallback when changing cwd is not possible, or when the user explicitly named a file/path.'
1046
- );
1047
- }
1048
-
1049
- // Run cli() only when this module is the entry point. Compare realpaths
1050
- // rather than endsWith(): a loose suffix match also fires for unrelated
1051
- // scripts like `load-context.mjs`, and realpath tolerates symlinked
1052
- // invocation (the test harness symlinks the skill dir).
1053
- function invokedAsScript() {
1054
- const arg = process.argv[1];
1055
- if (!arg) return false;
1056
- try {
1057
- return fs.realpathSync(arg) === fs.realpathSync(fileURLToPath(import.meta.url));
1058
- } catch {
1059
- return false;
1060
- }
1061
- }
1062
-
1063
- if (invokedAsScript()) {
1064
- cli();
1065
- }