monomind 2.5.1 → 2.5.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 (324) hide show
  1. package/README.md +1 -1
  2. package/package.json +2 -1
  3. package/packages/@monomind/cli/.claude/agents/design/design-monodesign.md +6 -6
  4. package/packages/@monomind/cli/.claude/agents/github/repo-architect.md +3 -3
  5. package/packages/@monomind/cli/.claude/agents/github/sync-coordinator.md +2 -2
  6. package/packages/@monomind/cli/.claude/agents/specialists/integration-architect.md +4 -4
  7. package/packages/@monomind/cli/.claude/commands/github/repo-architect.md +4 -4
  8. package/packages/@monomind/cli/.claude/commands/github/sync-coordinator.md +2 -2
  9. package/packages/@monomind/cli/.claude/commands/mastermind/_repeat.md +4 -4
  10. package/packages/@monomind/cli/.claude/commands/mastermind/approvev1.md +4 -4
  11. package/packages/@monomind/cli/.claude/commands/mastermind/architect.md +6 -6
  12. package/packages/@monomind/cli/.claude/commands/mastermind/autodev.md +5 -5
  13. package/packages/@monomind/cli/.claude/commands/mastermind/brain.md +2 -2
  14. package/packages/@monomind/cli/.claude/commands/mastermind/build.md +6 -6
  15. package/packages/@monomind/cli/.claude/commands/mastermind/code-review.md +2 -2
  16. package/packages/@monomind/cli/.claude/commands/mastermind/content.md +6 -6
  17. package/packages/@monomind/cli/.claude/commands/mastermind/createorg.md +4 -4
  18. package/packages/@monomind/cli/.claude/commands/mastermind/createtask.md +3 -3
  19. package/packages/@monomind/cli/.claude/commands/mastermind/debug.md +5 -5
  20. package/packages/@monomind/cli/.claude/commands/mastermind/design.md +5 -5
  21. package/packages/@monomind/cli/.claude/commands/mastermind/do.md +2 -2
  22. package/packages/@monomind/cli/.claude/commands/mastermind/execute.md +5 -5
  23. package/packages/@monomind/cli/.claude/commands/mastermind/finance.md +6 -6
  24. package/packages/@monomind/cli/.claude/commands/mastermind/finish.md +5 -5
  25. package/packages/@monomind/cli/.claude/commands/mastermind/idea.md +6 -6
  26. package/packages/@monomind/cli/.claude/commands/mastermind/ideate.md +5 -5
  27. package/packages/@monomind/cli/.claude/commands/mastermind/improve.md +6 -6
  28. package/packages/@monomind/cli/.claude/commands/mastermind/marketing.md +6 -6
  29. package/packages/@monomind/cli/.claude/commands/mastermind/master.md +54 -54
  30. package/packages/@monomind/cli/.claude/commands/mastermind/ops.md +6 -6
  31. package/packages/@monomind/cli/.claude/commands/mastermind/orgs.md +2 -2
  32. package/packages/@monomind/cli/.claude/commands/mastermind/orgstatus.md +2 -2
  33. package/packages/@monomind/cli/.claude/commands/mastermind/plan.md +5 -5
  34. package/packages/@monomind/cli/.claude/commands/mastermind/receive-review.md +5 -5
  35. package/packages/@monomind/cli/.claude/commands/mastermind/release.md +6 -6
  36. package/packages/@monomind/cli/.claude/commands/mastermind/research.md +6 -6
  37. package/packages/@monomind/cli/.claude/commands/mastermind/review.md +6 -6
  38. package/packages/@monomind/cli/.claude/commands/mastermind/runorg.md +4 -4
  39. package/packages/@monomind/cli/.claude/commands/mastermind/runorgv1.md +5 -5
  40. package/packages/@monomind/cli/.claude/commands/mastermind/sales.md +6 -6
  41. package/packages/@monomind/cli/.claude/commands/mastermind/skill-builder.md +5 -5
  42. package/packages/@monomind/cli/.claude/commands/mastermind/stoporg.md +3 -3
  43. package/packages/@monomind/cli/.claude/commands/mastermind/taskdev.md +5 -5
  44. package/packages/@monomind/cli/.claude/commands/mastermind/tdd.md +5 -5
  45. package/packages/@monomind/cli/.claude/commands/mastermind/techport.md +5 -5
  46. package/packages/@monomind/cli/.claude/commands/mastermind/verify.md +5 -5
  47. package/packages/@monomind/cli/.claude/commands/mastermind/worktree.md +5 -5
  48. package/packages/@monomind/cli/.claude/helpers/control-start.cjs +30 -0
  49. package/packages/@monomind/cli/.claude/helpers/event-logger.cjs +2 -2
  50. package/packages/@monomind/cli/.claude/helpers/extras-registry.json +1 -1
  51. package/packages/@monomind/cli/.claude/helpers/handlers/agent-start-handler.cjs +2 -2
  52. package/packages/@monomind/cli/.claude/helpers/handlers/edit-handler.cjs +2 -2
  53. package/packages/@monomind/cli/.claude/helpers/handlers/gates-handler.cjs +1 -1
  54. package/packages/@monomind/cli/.claude/helpers/handlers/route-handler.cjs +1 -1
  55. package/packages/@monomind/cli/.claude/helpers/handlers/session-handler.cjs +1 -1
  56. package/packages/@monomind/cli/.claude/helpers/handlers/session-restore-handler.cjs +11 -11
  57. package/packages/@monomind/cli/.claude/helpers/handlers/task-handler.cjs +2 -2
  58. package/packages/@monomind/cli/.claude/helpers/hook-handler.cjs +8 -8
  59. package/packages/@monomind/cli/.claude/helpers/utils/monograph.cjs +44 -12
  60. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/access.md → mastermind-access/SKILL.md} +2 -2
  61. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/activity.md → mastermind-activity/SKILL.md} +2 -2
  62. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/adapter-manager.md → mastermind-adapter-manager/SKILL.md} +2 -2
  63. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/adapters.md → mastermind-adapters/SKILL.md} +2 -2
  64. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/agent-detail.md → mastermind-agent-detail/SKILL.md} +2 -2
  65. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/agents.md → mastermind-agents/SKILL.md} +2 -2
  66. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/approval-detail.md → mastermind-approval-detail/SKILL.md} +2 -2
  67. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/approvev1.md → mastermind-approvev1/SKILL.md} +2 -2
  68. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/architect.md → mastermind-architect/SKILL.md} +7 -7
  69. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/autodev.md → mastermind-autodev/SKILL.md} +10 -10
  70. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/backup.md → mastermind-backup/SKILL.md} +2 -2
  71. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/bootstrap.md → mastermind-bootstrap/SKILL.md} +2 -2
  72. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/budgets.md → mastermind-budgets/SKILL.md} +2 -2
  73. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/build.md → mastermind-build/SKILL.md} +5 -5
  74. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/companies.md → mastermind-companies/SKILL.md} +2 -2
  75. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/content.md → mastermind-content/SKILL.md} +5 -5
  76. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/costs.md → mastermind-costs/SKILL.md} +2 -2
  77. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/createorg.md → mastermind-createorg/SKILL.md} +3 -3
  78. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/debug.md → mastermind-debug/SKILL.md} +4 -4
  79. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/_delegation.md → mastermind-delegation/SKILL.md} +1 -1
  80. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/design.md → mastermind-design/SKILL.md} +9 -9
  81. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/diagnose.md → mastermind-diagnose/SKILL.md} +2 -2
  82. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/env.md → mastermind-env/SKILL.md} +2 -2
  83. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/environments.md → mastermind-environments/SKILL.md} +2 -2
  84. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/execute.md → mastermind-execute/SKILL.md} +10 -10
  85. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/export.md → mastermind-export/SKILL.md} +2 -2
  86. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/finance.md → mastermind-finance/SKILL.md} +5 -5
  87. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/goal-detail.md → mastermind-goal-detail/SKILL.md} +2 -2
  88. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/goals.md → mastermind-goals/SKILL.md} +2 -2
  89. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/heartbeatv1.md → mastermind-heartbeatv1/SKILL.md} +2 -2
  90. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/idea.md → mastermind-idea/SKILL.md} +7 -7
  91. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/import.md → mastermind-import/SKILL.md} +2 -2
  92. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/inbox.md → mastermind-inbox/SKILL.md} +2 -2
  93. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/instance.md → mastermind-instance/SKILL.md} +2 -2
  94. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/instance-settings.md → mastermind-instance-settings/SKILL.md} +2 -2
  95. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/invite-landing.md → mastermind-invite-landing/SKILL.md} +2 -2
  96. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/invites.md → mastermind-invites/SKILL.md} +2 -2
  97. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/issue-detail.md → mastermind-issue-detail/SKILL.md} +2 -2
  98. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/issues.md → mastermind-issues/SKILL.md} +2 -2
  99. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/join-queue.md → mastermind-join-queue/SKILL.md} +2 -2
  100. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/liveness.md → mastermind-liveness/SKILL.md} +2 -2
  101. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/marketing.md → mastermind-marketing/SKILL.md} +8 -8
  102. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/memory.md → mastermind-memory/SKILL.md} +2 -2
  103. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/monitor.md → mastermind-monitor/SKILL.md} +2 -2
  104. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/my-issues.md → mastermind-my-issues/SKILL.md} +2 -2
  105. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/new-agent.md → mastermind-new-agent/SKILL.md} +2 -2
  106. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/ops.md → mastermind-ops/SKILL.md} +5 -5
  107. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/org-chart.md → mastermind-org-chart/SKILL.md} +2 -2
  108. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/org-settings.md → mastermind-org-settings/SKILL.md} +2 -2
  109. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/orgs.md → mastermind-orgs/SKILL.md} +1 -1
  110. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/orgstatus.md → mastermind-orgstatus/SKILL.md} +2 -2
  111. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/plan.md → mastermind-plan/SKILL.md} +7 -7
  112. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/plan-to-tasks.md → mastermind-plan-to-tasks/SKILL.md} +2 -2
  113. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/plugin-manager.md → mastermind-plugin-manager/SKILL.md} +2 -2
  114. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/plugin-settings.md → mastermind-plugin-settings/SKILL.md} +2 -2
  115. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/plugins.md → mastermind-plugins/SKILL.md} +2 -2
  116. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/profile.md → mastermind-profile/SKILL.md} +2 -2
  117. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/project-detail.md → mastermind-project-detail/SKILL.md} +2 -2
  118. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/project-workspace.md → mastermind-project-workspace/SKILL.md} +2 -2
  119. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/projects.md → mastermind-projects/SKILL.md} +2 -2
  120. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/_protocol.md → mastermind-protocol/SKILL.md} +3 -3
  121. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/release.md → mastermind-release/SKILL.md} +5 -5
  122. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/_repeat.md → mastermind-repeat/SKILL.md} +2 -2
  123. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/research.md → mastermind-research/SKILL.md} +5 -5
  124. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/review.md → mastermind-review/SKILL.md} +5 -5
  125. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/routine-detail.md → mastermind-routine-detail/SKILL.md} +2 -2
  126. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/routines.md → mastermind-routines/SKILL.md} +2 -2
  127. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/runorgv1.md → mastermind-runorgv1/SKILL.md} +2 -2
  128. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/sales.md → mastermind-sales/SKILL.md} +5 -5
  129. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/search.md → mastermind-search/SKILL.md} +2 -2
  130. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/secrets.md → mastermind-secrets/SKILL.md} +2 -2
  131. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/skill-builder.md → mastermind-skill-builder/SKILL.md} +16 -14
  132. package/packages/@monomind/cli/.claude/skills/mastermind-skills/{skills.md → SKILL.md} +2 -2
  133. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/stoporg.md → mastermind-stoporg/SKILL.md} +2 -2
  134. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/taskdev.md → mastermind-taskdev/SKILL.md} +6 -6
  135. package/packages/@monomind/cli/.claude/skills/{mastermind-skills → mastermind-taskdev}/implementer-prompt.md +1 -1
  136. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/tasks.md → mastermind-tasks/SKILL.md} +2 -2
  137. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/tdd.md → mastermind-tdd/SKILL.md} +4 -4
  138. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/techport.md → mastermind-techport/SKILL.md} +6 -6
  139. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/threads.md → mastermind-threads/SKILL.md} +2 -2
  140. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/tree-control.md → mastermind-tree-control/SKILL.md} +2 -2
  141. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/verify.md → mastermind-verify/SKILL.md} +1 -1
  142. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/wiki.md → mastermind-wiki/SKILL.md} +2 -2
  143. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/workspace-detail.md → mastermind-workspace-detail/SKILL.md} +2 -2
  144. package/packages/@monomind/cli/.claude/skills/{mastermind-skills/workspaces.md → mastermind-workspaces/SKILL.md} +2 -2
  145. package/packages/@monomind/cli/.claude/skills/monodesign/SKILL.md +114 -190
  146. package/packages/@monomind/cli/.claude/skills/monodesign/adapt.md +1 -1
  147. package/packages/@monomind/cli/.claude/skills/monodesign/agents/monodesign-asset-producer.md +4 -4
  148. package/packages/@monomind/cli/.claude/skills/monodesign/agents/monodesign-manual-edit-applier.md +103 -0
  149. package/packages/@monomind/cli/.claude/skills/monodesign/audit.md +1 -1
  150. package/packages/@monomind/cli/.claude/skills/monodesign/craft.md +2 -2
  151. package/packages/@monomind/cli/.claude/skills/monodesign/critique.md +1 -1
  152. package/packages/@monomind/cli/.claude/skills/monodesign/init.md +30 -0
  153. package/packages/@monomind/cli/.claude/skills/monodesign/layout.md +36 -0
  154. package/packages/@monomind/cli/.claude/skills/monodesign/live.md +19 -44
  155. package/packages/@monomind/cli/.claude/skills/monodesign/reference/adapt.md +122 -0
  156. package/packages/@monomind/cli/.claude/skills/monodesign/reference/adapt.native.md +58 -0
  157. package/packages/@monomind/cli/.claude/skills/monodesign/reference/android.md +40 -0
  158. package/packages/@monomind/cli/.claude/skills/monodesign/reference/animate.md +39 -11
  159. package/packages/@monomind/cli/.claude/skills/monodesign/reference/antipatterns-catalog.md +67 -16
  160. package/packages/@monomind/cli/.claude/skills/monodesign/reference/audit.md +5 -3
  161. package/packages/@monomind/cli/.claude/skills/monodesign/reference/audit.native.md +139 -0
  162. package/packages/@monomind/cli/.claude/skills/monodesign/reference/bolder.md +71 -64
  163. package/packages/@monomind/cli/.claude/skills/monodesign/reference/brand.md +12 -18
  164. package/packages/@monomind/cli/.claude/skills/monodesign/reference/clarify.md +114 -0
  165. package/packages/@monomind/cli/.claude/skills/monodesign/reference/codex.md +4 -6
  166. package/packages/@monomind/cli/.claude/skills/monodesign/reference/colorize.md +108 -5
  167. package/packages/@monomind/cli/.claude/skills/monodesign/reference/craft.md +70 -143
  168. package/packages/@monomind/cli/.claude/skills/monodesign/reference/critique.md +635 -68
  169. package/packages/@monomind/cli/.claude/skills/monodesign/reference/delight.md +1 -1
  170. package/packages/@monomind/cli/.claude/skills/monodesign/reference/distill.md +1 -1
  171. package/packages/@monomind/cli/.claude/skills/monodesign/reference/document.md +24 -22
  172. package/packages/@monomind/cli/.claude/skills/monodesign/reference/extract.md +1 -1
  173. package/packages/@monomind/cli/.claude/skills/monodesign/reference/hooks.md +22 -29
  174. package/packages/@monomind/cli/.claude/skills/monodesign/reference/init.md +221 -0
  175. package/packages/@monomind/cli/.claude/skills/monodesign/reference/interaction-design.md +0 -6
  176. package/packages/@monomind/cli/.claude/skills/monodesign/reference/ios.md +45 -0
  177. package/packages/@monomind/cli/.claude/skills/monodesign/reference/layout.md +57 -13
  178. package/packages/@monomind/cli/.claude/skills/monodesign/reference/live.md +159 -71
  179. package/packages/@monomind/cli/.claude/skills/monodesign/reference/overdrive.md +1 -1
  180. package/packages/@monomind/cli/.claude/skills/monodesign/reference/personas.md +1 -1
  181. package/packages/@monomind/cli/.claude/skills/monodesign/reference/polish.md +16 -8
  182. package/packages/@monomind/cli/.claude/skills/monodesign/reference/pre-delivery-checklist.md +1 -1
  183. package/packages/@monomind/cli/.claude/skills/monodesign/reference/product.md +1 -3
  184. package/packages/@monomind/cli/.claude/skills/monodesign/reference/quieter.md +1 -1
  185. package/packages/@monomind/cli/.claude/skills/monodesign/reference/shape.md +27 -13
  186. package/packages/@monomind/cli/.claude/skills/monodesign/reference/teach.md +6 -152
  187. package/packages/@monomind/cli/.claude/skills/monodesign/reference/typeset.md +180 -3
  188. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/command-metadata.json +94 -0
  189. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/context-signals.mjs +260 -0
  190. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/context.mjs +1061 -0
  191. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/critique-storage.mjs +416 -0
  192. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detect-csp.mjs +198 -0
  193. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detect.mjs +33 -0
  194. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/browser/injected/index.mjs +1962 -0
  195. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/cli/main.mjs +321 -0
  196. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/design-system.mjs +814 -0
  197. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/detect-antipatterns-browser.js +5601 -0
  198. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/detect-antipatterns.mjs +50 -0
  199. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/engines/browser/detect-url.mjs +259 -0
  200. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/engines/browser/drivers.mjs +258 -0
  201. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/engines/regex/detect-text.mjs +636 -0
  202. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/engines/static-html/css-cascade.mjs +1015 -0
  203. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/engines/static-html/detect-html.mjs +253 -0
  204. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/engines/visual/screenshot-contrast.mjs +198 -0
  205. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/findings.mjs +12 -0
  206. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/fix/css-regions.mjs +181 -0
  207. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/fix/fixers.mjs +373 -0
  208. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/fix/index.mjs +426 -0
  209. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/node/file-system.mjs +198 -0
  210. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/profile/profiler.mjs +166 -0
  211. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/registry/antipatterns.mjs +563 -0
  212. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/rules/checks.mjs +2995 -0
  213. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/shared/color.mjs +124 -0
  214. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/shared/constants.mjs +101 -0
  215. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/shared/fonts.mjs +30 -0
  216. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/shared/inline-ignores.mjs +148 -0
  217. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/shared/page.mjs +7 -0
  218. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/hook-admin.mjs +661 -0
  219. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/hook-before-edit.mjs +516 -0
  220. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/hook-lib.mjs +1776 -0
  221. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/hook.mjs +61 -0
  222. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/lib/design-parser.mjs +842 -0
  223. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/lib/is-generated.mjs +69 -0
  224. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/lib/monodesign-config.mjs +640 -0
  225. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/lib/monodesign-paths.mjs +129 -0
  226. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/lib/provider.mjs +4 -0
  227. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/lib/target-args.mjs +42 -0
  228. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/browser-script-parts.mjs +50 -0
  229. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/completion.mjs +19 -0
  230. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/event-validation.mjs +137 -0
  231. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/insert-ui.mjs +458 -0
  232. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/manual-apply.mjs +939 -0
  233. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/manual-edit-routes.mjs +357 -0
  234. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/manual-edits-buffer.mjs +152 -0
  235. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/session-store.mjs +293 -0
  236. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/svelte-component.mjs +826 -0
  237. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/sveltekit-adapter.mjs +274 -0
  238. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/ui-core.mjs +180 -0
  239. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/vocabulary.mjs +36 -0
  240. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-accept.mjs +812 -0
  241. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-browser-dom.js +146 -0
  242. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-browser-session.js +123 -0
  243. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-browser.js +11240 -0
  244. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-commit-manual-edits.mjs +1241 -0
  245. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-complete.mjs +75 -0
  246. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-copy-edit-agent.mjs +683 -0
  247. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-discard-manual-edits.mjs +51 -0
  248. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-inject.mjs +583 -0
  249. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-insert.mjs +272 -0
  250. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-manual-edit-evidence.mjs +363 -0
  251. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-poll.mjs +384 -0
  252. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-resume.mjs +94 -0
  253. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-server.mjs +1137 -0
  254. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-status.mjs +61 -0
  255. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-target.mjs +30 -0
  256. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-wrap.mjs +894 -0
  257. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live.mjs +297 -0
  258. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/modern-screenshot.umd.js +14 -0
  259. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/palette.mjs +633 -0
  260. package/packages/@monomind/cli/.claude/skills/monodesign/scripts/pin.mjs +221 -0
  261. package/packages/@monomind/cli/.claude/skills/monodesign/teach.md +7 -58
  262. package/packages/@monomind/cli/README.md +1 -1
  263. package/packages/@monomind/cli/dist/src/commands/design-detect.d.ts +7 -1
  264. package/packages/@monomind/cli/dist/src/commands/design-detect.js +131 -38
  265. package/packages/@monomind/cli/dist/src/commands/design-palette.d.ts +0 -1
  266. package/packages/@monomind/cli/dist/src/commands/design-palette.js +2 -3
  267. package/packages/@monomind/cli/dist/src/commands/doc.js +72 -15
  268. package/packages/@monomind/cli/dist/src/commands/doctor-project-checks.d.ts +5 -1
  269. package/packages/@monomind/cli/dist/src/commands/doctor-project-checks.js +24 -1
  270. package/packages/@monomind/cli/dist/src/commands/doctor.js +3 -3
  271. package/packages/@monomind/cli/dist/src/commands/hooks-workers.d.ts +1 -1
  272. package/packages/@monomind/cli/dist/src/commands/hooks-workers.js +8 -8
  273. package/packages/@monomind/cli/dist/src/commands/init.js +2 -2
  274. package/packages/@monomind/cli/dist/src/commands/org.js +109 -9
  275. package/packages/@monomind/cli/dist/src/index.d.ts +1 -1
  276. package/packages/@monomind/cli/dist/src/index.js +3 -3
  277. package/packages/@monomind/cli/dist/src/init/claudemd-generator.js +5 -5
  278. package/packages/@monomind/cli/dist/src/init/executor.js +17 -6
  279. package/packages/@monomind/cli/dist/src/knowledge/document-pipeline.d.ts +2 -0
  280. package/packages/@monomind/cli/dist/src/knowledge/document-pipeline.js +4 -1
  281. package/packages/@monomind/cli/dist/src/mcp-server.js +2 -2
  282. package/packages/@monomind/cli/dist/src/mcp-tools/hooks-intelligence.d.ts +1 -1
  283. package/packages/@monomind/cli/dist/src/mcp-tools/hooks-intelligence.js +1 -1
  284. package/packages/@monomind/cli/dist/src/mcp-tools/hooks-routing.js +2 -2
  285. package/packages/@monomind/cli/dist/src/mcp-tools/hooks-tools.js +1 -1
  286. package/packages/@monomind/cli/dist/src/mcp-tools/knowledge-tools.js +38 -7
  287. package/packages/@monomind/cli/dist/src/mcp-tools/memory-tools.d.ts +8 -3
  288. package/packages/@monomind/cli/dist/src/mcp-tools/memory-tools.js +193 -31
  289. package/packages/@monomind/cli/dist/src/memory/memory-bridge.d.ts +33 -0
  290. package/packages/@monomind/cli/dist/src/memory/memory-bridge.js +166 -17
  291. package/packages/@monomind/cli/dist/src/memory/memory-kg.d.ts +186 -0
  292. package/packages/@monomind/cli/dist/src/memory/memory-kg.js +450 -0
  293. package/packages/@monomind/cli/dist/src/memory/query-router.d.ts +44 -0
  294. package/packages/@monomind/cli/dist/src/memory/query-router.js +113 -0
  295. package/packages/@monomind/cli/dist/src/orgrt/daemon.d.ts +18 -0
  296. package/packages/@monomind/cli/dist/src/orgrt/daemon.js +249 -12
  297. package/packages/@monomind/cli/dist/src/orgrt/migrate.js +7 -0
  298. package/packages/@monomind/cli/dist/src/orgrt/policy.js +7 -0
  299. package/packages/@monomind/cli/dist/src/orgrt/session.d.ts +24 -1
  300. package/packages/@monomind/cli/dist/src/orgrt/session.js +18 -3
  301. package/packages/@monomind/cli/dist/src/orgrt/templates.d.ts +1 -0
  302. package/packages/@monomind/cli/dist/src/orgrt/templates.js +9 -4
  303. package/packages/@monomind/cli/dist/src/orgrt/types.d.ts +15 -0
  304. package/packages/@monomind/cli/dist/src/orgrt/types.js +2 -0
  305. package/packages/@monomind/cli/dist/src/routing/embed-worker.js +1 -1
  306. package/packages/@monomind/cli/dist/src/routing/llm-caller.js +1 -1
  307. package/packages/@monomind/cli/dist/src/routing/route-layer-factory.js +1 -1
  308. package/packages/@monomind/cli/dist/src/ui/dashboard.html +176 -26
  309. package/packages/@monomind/cli/dist/src/ui/orgs.html +24 -0
  310. package/packages/@monomind/cli/dist/src/ui/server.mjs +162 -12
  311. package/packages/@monomind/cli/dist/src/update/checker.js +3 -3
  312. package/packages/@monomind/cli/package.json +8 -6
  313. /package/packages/@monomind/cli/.claude/skills/{mastermind-skills/_agent-select.md → mastermind-agent-select/SKILL.md} +0 -0
  314. /package/packages/@monomind/cli/.claude/skills/{mastermind-skills/finish.md → mastermind-finish/SKILL.md} +0 -0
  315. /package/packages/@monomind/cli/.claude/skills/{mastermind-skills/_intake.md → mastermind-intake/SKILL.md} +0 -0
  316. /package/packages/@monomind/cli/.claude/skills/{mastermind-skills → mastermind-marketing}/references/copywriting-frameworks.md +0 -0
  317. /package/packages/@monomind/cli/.claude/skills/{mastermind-skills → mastermind-marketing}/references/persuasion-psychology.md +0 -0
  318. /package/packages/@monomind/cli/.claude/skills/{mastermind-skills/monotask.md → mastermind-monotask/SKILL.md} +0 -0
  319. /package/packages/@monomind/cli/.claude/skills/{mastermind-skills/receive-review.md → mastermind-receive-review/SKILL.md} +0 -0
  320. /package/packages/@monomind/cli/.claude/skills/{mastermind-skills/runorg.md → mastermind-runorg/SKILL.md} +0 -0
  321. /package/packages/@monomind/cli/.claude/skills/{mastermind-skills → mastermind-taskdev}/code-quality-reviewer-prompt.md +0 -0
  322. /package/packages/@monomind/cli/.claude/skills/{mastermind-skills → mastermind-taskdev}/final-reviewer-prompt.md +0 -0
  323. /package/packages/@monomind/cli/.claude/skills/{mastermind-skills → mastermind-taskdev}/spec-reviewer-prompt.md +0 -0
  324. /package/packages/@monomind/cli/.claude/skills/{mastermind-skills/worktree.md → mastermind-worktree/SKILL.md} +0 -0
@@ -60,7 +60,7 @@ Scan `$ARGUMENTS` for these flags and store their values. Remove them from the a
60
60
  | `--wait <N>` | `wait_seconds = N` | 60 |
61
61
  | `--repeat <N>` | `repeat_count = N` | 0 |
62
62
 
63
- ⚠️ **CRITICAL — CONTINUATION RUNS DO NOT SKIP WORK.** When `--rep N` is present, this is a scheduled continuation triggered by ScheduleWakeup. The org's FULL work cycle MUST still execute every time: session variables → session:start event → Skill("mastermind-skills:runorgv1") → session:complete event. NEVER short-circuit or skip the org work because `--rep` is present. The `--rep` / `--loop` flags are only consumed by `Skill("mastermind-skills:_repeat")` at the end.
63
+ ⚠️ **CRITICAL — CONTINUATION RUNS DO NOT SKIP WORK.** When `--rep N` is present, this is a scheduled continuation triggered by ScheduleWakeup. The org's FULL work cycle MUST still execute every time: session variables → session:start event → Skill("mastermind-runorgv1") → session:complete event. NEVER short-circuit or skip the org work because `--rep` is present. The `--rep` / `--loop` flags are only consumed by `Skill("mastermind-repeat")` at the end.
64
64
 
65
65
  ---
66
66
 
@@ -88,7 +88,7 @@ Verify the org file exists before proceeding:
88
88
  ```
89
89
  If the file does not exist, stop and suggest running `/mastermind:createorg --name ${org_name}`.
90
90
 
91
- Load brain context for the `ops` domain (follow _protocol.md Brain Load Procedure, namespace: `ops`).
91
+ Load brain context for the `ops` domain (follow mastermind-protocol/SKILL.md Brain Load Procedure, namespace: `ops`).
92
92
 
93
93
  Resolve session ID and project root:
94
94
  ```bash
@@ -123,7 +123,7 @@ curl -s -X POST "${CTRL_URL}/api/mastermind/event" -H "x-monomind-token: $(cat "
123
123
  '{type:"domain:dispatch",session:$session,domain:"ops",cmd:("Starting org "+$org+" as persistent daemon"),project:$proj,ts:(now*1000|floor)}')" || true
124
124
  ```
125
125
 
126
- Invoke `Skill("mastermind-skills:runorgv1")` passing: brain_context, org_name: `$org_name`, session_id: `$session_id`, task: task_override, caller: "command".
126
+ Invoke `Skill("mastermind-runorgv1")` passing: brain_context, org_name: `$org_name`, session_id: `$session_id`, task: task_override, caller: "command".
127
127
 
128
128
  After the skill spawns the boss agent and returns: note the status. Emit `session:complete`:
129
129
  ```bash
@@ -136,10 +136,10 @@ curl -s -X POST "${CTRL_URL}/api/mastermind/event" -H "x-monomind-token: $(cat "
136
136
  '{type:"session:complete",session:$session,domain:"ops",status:$status,domains:["ops"],project:$proj,ts:(now*1000|floor)}')" || true
137
137
  ```
138
138
 
139
- Follow _protocol.md Brain Write Procedure for domain `ops`.
139
+ Follow mastermind-protocol/SKILL.md Brain Write Procedure for domain `ops`.
140
140
 
141
141
 
142
- **MANDATORY — invoke `Skill("mastermind-skills:_repeat")` now.** This is required regardless of how the skill above completed, regardless of whether you think the work is done, regardless of whether you plan to end your response. For `--repeat N`: the count is non-negotiable — all N runs must happen. For `--tillend`: only a verified empty round (confirmed by git diff) stops the loop. Do not end your response without invoking this skill.
142
+ **MANDATORY — invoke `Skill("mastermind-repeat")` now.** This is required regardless of how the skill above completed, regardless of whether you think the work is done, regardless of whether you plan to end your response. For `--repeat N`: the count is non-negotiable — all N runs must happen. For `--tillend`: only a verified empty round (confirmed by git diff) stops the loop. Do not end your response without invoking this skill.
143
143
 
144
144
  After the REPEAT POSTAMBLE completes, if a loop was started or continued (LOOP_ID is set), write the org name into the loop state file so the dashboard can detect running status:
145
145
  ```bash
@@ -1,6 +1,6 @@
1
1
  <!-- Mastermind sales domain — outreach sequences, proposals, pipeline management. Default mode: confirm. -->
2
2
 
3
- **First — extract repeat flags:** Follow the REPEAT PREAMBLE from `_repeat.md`. Extracts `--repeat`, `--tillend`, `--maxruns`, `--wait`, `--rep`, `--loop` from `$ARGUMENTS` before all other parsing. If `is_continuation = true`, skip the empty-prompt check and intake below.
3
+ **First — extract repeat flags:** Follow the REPEAT PREAMBLE from `mastermind-repeat/SKILL.md`. Extracts `--repeat`, `--tillend`, `--maxruns`, `--wait`, `--rep`, `--loop` from `$ARGUMENTS` before all other parsing. If `is_continuation = true`, skip the empty-prompt check and intake below.
4
4
 
5
5
  Parse `$ARGUMENTS` for:
6
6
  - `--auto` flag → mode = auto
@@ -10,14 +10,14 @@ Parse `$ARGUMENTS` for:
10
10
 
11
11
  If prompt is empty: ask "What sales task would you like to tackle?"
12
12
 
13
- Load brain context for the `sales` domain (follow _protocol.md Brain Load Procedure).
13
+ Load brain context for the `sales` domain (follow mastermind-protocol/SKILL.md Brain Load Procedure).
14
14
 
15
- Run intake if prompt is vague (follow _intake.md — stop at Q3, domain is already known as `sales`).
15
+ Run intake if prompt is vague (follow mastermind-intake/SKILL.md — stop at Q3, domain is already known as `sales`).
16
16
 
17
17
  Default mode for this command: **confirm** (unless `--auto` flag present or intake Q4 says auto).
18
18
 
19
- Invoke `Skill("mastermind-skills:sales")` passing: brain_context, prompt, project_name, board_id (create if needed), mode.
19
+ Invoke `Skill("mastermind-sales")` passing: brain_context, prompt, project_name, board_id (create if needed), mode.
20
20
 
21
- After skill returns: follow _protocol.md Brain Write Procedure for domain `sales`.
21
+ After skill returns: follow mastermind-protocol/SKILL.md Brain Write Procedure for domain `sales`.
22
22
 
23
- Invoke `Skill("mastermind-skills:_repeat")` now to execute the REPEAT POSTAMBLE. This is a required tool call — do not skip it.
23
+ Invoke `Skill("mastermind-repeat")` now to execute the REPEAT POSTAMBLE. This is a required tool call — do not skip it.
@@ -1,17 +1,17 @@
1
1
  <!-- Use when creating, editing, or verifying mastermind skills — guides the full TDD-for-docs cycle from baseline test through deployment -->
2
2
 
3
- **First — extract repeat flags:** Follow REPEAT PREAMBLE from `_repeat.md`.
3
+ **First — extract repeat flags:** Follow REPEAT PREAMBLE from `mastermind-repeat/SKILL.md`.
4
4
 
5
5
  Parse `$ARGUMENTS` for `--auto`, `--confirm`, `--project <name>`, and remaining text.
6
6
 
7
- Load brain context (follow `_protocol.md` Brain Load Procedure).
7
+ Load brain context (follow `mastermind-protocol/SKILL.md` Brain Load Procedure).
8
8
 
9
9
  Default mode: **auto**.
10
10
 
11
11
  ---
12
12
 
13
- Invoke `Skill("mastermind-skills:skill-builder")` passing: brain_context, params, mode.
13
+ Invoke `Skill("mastermind-skill-builder")` passing: brain_context, params, mode.
14
14
 
15
- After skill returns: follow `_protocol.md` Brain Write Procedure.
15
+ After skill returns: follow `mastermind-protocol/SKILL.md` Brain Write Procedure.
16
16
 
17
- Invoke `Skill("mastermind-skills:_repeat")` now. Required — do not skip.
17
+ Invoke `Skill("mastermind-repeat")` now. Required — do not skip.
@@ -62,7 +62,7 @@ session_id="mm-$(date -u +%Y%m%dT%H%M%S)"
62
62
  CTRL_URL=$(jq -r '.url // "http://localhost:4242"' "$REPO_ROOT/.monomind/control.json" 2>/dev/null || echo "http://localhost:4242")
63
63
  ```
64
64
 
65
- Invoke `Skill("mastermind-skills:stoporg")` passing: org_name: `$org_name`, session_id: `$session_id`, caller: "command".
65
+ Invoke `Skill("mastermind-stoporg")` passing: org_name: `$org_name`, session_id: `$session_id`, caller: "command".
66
66
 
67
67
  After skill returns: emit `session:complete`:
68
68
  ```bash
@@ -73,6 +73,6 @@ curl -s -X POST "${CTRL_URL}/api/mastermind/event" -H "x-monomind-token: $(cat "
73
73
  '{type:"session:complete",session:$session,domain:"ops",status:"complete",domains:["ops"],ts:(now*1000|floor)}')" || true
74
74
  ```
75
75
 
76
- Follow _protocol.md Brain Write Procedure for domain `ops`.
76
+ Follow mastermind-protocol/SKILL.md Brain Write Procedure for domain `ops`.
77
77
 
78
- Invoke `Skill("mastermind-skills:_repeat")` now to execute the REPEAT POSTAMBLE. This is a required tool call — do not skip it.
78
+ Invoke `Skill("mastermind-repeat")` now to execute the REPEAT POSTAMBLE. This is a required tool call — do not skip it.
@@ -1,6 +1,6 @@
1
1
  <!-- Execute an implementation plan task-by-task using fresh subagents with two-stage review per task. Default mode: auto. -->
2
2
 
3
- **First — extract repeat flags:** Follow the REPEAT PREAMBLE from `_repeat.md`. Extracts `--repeat`, `--tillend`, `--maxruns`, `--wait`, `--rep`, `--loop` from `$ARGUMENTS` before all other parsing. If `is_continuation = true`, skip the empty-prompt check and intake below.
3
+ **First — extract repeat flags:** Follow the REPEAT PREAMBLE from `mastermind-repeat/SKILL.md`. Extracts `--repeat`, `--tillend`, `--maxruns`, `--wait`, `--rep`, `--loop` from `$ARGUMENTS` before all other parsing. If `is_continuation = true`, skip the empty-prompt check and intake below.
4
4
 
5
5
  Parse `$ARGUMENTS` for:
6
6
  - `--auto` flag → mode = auto
@@ -10,14 +10,14 @@ Parse `$ARGUMENTS` for:
10
10
 
11
11
  If plan_file is empty: ask "Which plan file should I execute? (provide an absolute path)"
12
12
 
13
- Load brain context (follow `_protocol.md` Brain Load Procedure).
13
+ Load brain context (follow `mastermind-protocol/SKILL.md` Brain Load Procedure).
14
14
 
15
15
  Default mode: **auto** (unless `--confirm` flag is present).
16
16
 
17
17
  ---
18
18
 
19
- Invoke `Skill("mastermind-skills:taskdev")` passing: brain_context, plan_file, project_name, mode.
19
+ Invoke `Skill("mastermind-taskdev")` passing: brain_context, plan_file, project_name, mode.
20
20
 
21
- After skill returns: follow `_protocol.md` Brain Write Procedure.
21
+ After skill returns: follow `mastermind-protocol/SKILL.md` Brain Write Procedure.
22
22
 
23
- **MANDATORY — invoke `Skill("mastermind-skills:_repeat")` now.** This is required regardless of how the skill above completed, regardless of whether you think the work is done, regardless of whether you plan to end your response. For `--repeat N`: the count is non-negotiable — all N runs must happen. For `--tillend`: only a verified empty round (confirmed by git diff) stops the loop. Do not end your response without invoking this skill.
23
+ **MANDATORY — invoke `Skill("mastermind-repeat")` now.** This is required regardless of how the skill above completed, regardless of whether you think the work is done, regardless of whether you plan to end your response. For `--repeat N`: the count is non-negotiable — all N runs must happen. For `--tillend`: only a verified empty round (confirmed by git diff) stops the loop. Do not end your response without invoking this skill.
@@ -1,10 +1,10 @@
1
1
  <!-- Implement a feature or bugfix using Test-Driven Development — Red-Green-Refactor with the Iron Law enforced. -->
2
2
 
3
- **First — extract repeat flags:** Follow the REPEAT PREAMBLE from `_repeat.md`.
3
+ **First — extract repeat flags:** Follow the REPEAT PREAMBLE from `mastermind-repeat/SKILL.md`.
4
4
 
5
5
  Parse `$ARGUMENTS` for `--auto`, `--confirm`, `--project <name>`, and remaining text = feature_or_bug.
6
6
 
7
- Load brain context for the `tdd` domain (follow `_protocol.md` Brain Load Procedure).
7
+ Load brain context for the `tdd` domain (follow `mastermind-protocol/SKILL.md` Brain Load Procedure).
8
8
 
9
9
  If feature_or_bug is empty: ask "What feature or bug should be implemented with TDD?"
10
10
 
@@ -12,8 +12,8 @@ Default mode: **auto**.
12
12
 
13
13
  ---
14
14
 
15
- Invoke `Skill("mastermind-skills:tdd")` passing: brain_context, feature_or_bug, project_name, mode.
15
+ Invoke `Skill("mastermind-tdd")` passing: brain_context, feature_or_bug, project_name, mode.
16
16
 
17
- After skill returns: follow `_protocol.md` Brain Write Procedure for domain `tdd`.
17
+ After skill returns: follow `mastermind-protocol/SKILL.md` Brain Write Procedure for domain `tdd`.
18
18
 
19
- **MANDATORY — invoke `Skill("mastermind-skills:_repeat")` now.** This is required regardless of how the skill above completed, regardless of whether you think the work is done, regardless of whether you plan to end your response. For `--repeat N`: the count is non-negotiable — all N runs must happen. For `--tillend`: only a verified empty round (confirmed by git diff) stops the loop. Do not end your response without invoking this skill.
19
+ **MANDATORY — invoke `Skill("mastermind-repeat")` now.** This is required regardless of how the skill above completed, regardless of whether you think the work is done, regardless of whether you plan to end your response. For `--repeat N`: the count is non-negotiable — all N runs must happen. For `--tillend`: only a verified empty round (confirmed by git diff) stops the loop. Do not end your response without invoking this skill.
@@ -1,6 +1,6 @@
1
1
  <!-- Tech Port — deep-analyzes a foreign project folder and recommends porting valuable features, patterns, or infrastructure into the current monomind base project. -->
2
2
 
3
- **First — extract repeat flags:** Follow the REPEAT PREAMBLE from `_repeat.md`. Extracts `--repeat`, `--tillend`, `--maxruns`, `--wait`, `--rep`, `--loop` from `$ARGUMENTS` before all other parsing. If `is_continuation = true`, skip the empty-prompt check below.
3
+ **First — extract repeat flags:** Follow the REPEAT PREAMBLE from `mastermind-repeat/SKILL.md`. Extracts `--repeat`, `--tillend`, `--maxruns`, `--wait`, `--rep`, `--loop` from `$ARGUMENTS` before all other parsing. If `is_continuation = true`, skip the empty-prompt check below.
4
4
 
5
5
  Parse `$ARGUMENTS` for:
6
6
  - First path-like token (starts with `/`, `./`, `../`, or `~`) → source_path
@@ -11,7 +11,7 @@ Parse `$ARGUMENTS` for:
11
11
 
12
12
  If source_path is empty: ask "What is the path to the project you want to analyze?"
13
13
 
14
- Load brain context for the `techport` domain (follow `_protocol.md` Brain Load Procedure).
14
+ Load brain context for the `techport` domain (follow `mastermind-protocol/SKILL.md` Brain Load Procedure).
15
15
 
16
16
  Default mode: **confirm** (show analysis + port plan, wait before executing anything).
17
17
 
@@ -20,8 +20,8 @@ Default mode: **confirm** (show analysis + port plan, wait before executing anyt
20
20
  > /mastermind:techport --tillend --auto /path/to/project
21
21
  > ```
22
22
 
23
- Invoke `Skill("mastermind-skills:techport")` passing: source_path, focus_hint, mode.
23
+ Invoke `Skill("mastermind-techport")` passing: source_path, focus_hint, mode.
24
24
 
25
- After skill returns: follow `_protocol.md` Brain Write Procedure for domain `techport`.
25
+ After skill returns: follow `mastermind-protocol/SKILL.md` Brain Write Procedure for domain `techport`.
26
26
 
27
- Invoke `Skill("mastermind-skills:_repeat")` now to execute the REPEAT POSTAMBLE. This is a required tool call — do not skip it.
27
+ Invoke `Skill("mastermind-repeat")` now to execute the REPEAT POSTAMBLE. This is a required tool call — do not skip it.
@@ -1,10 +1,10 @@
1
1
  <!-- Run the verification gate before claiming any work is complete, fixed, or passing — evidence before assertions always. -->
2
2
 
3
- **First — extract repeat flags:** Follow the REPEAT PREAMBLE from `_repeat.md`.
3
+ **First — extract repeat flags:** Follow the REPEAT PREAMBLE from `mastermind-repeat/SKILL.md`.
4
4
 
5
5
  Parse `$ARGUMENTS` for `--auto`, `--confirm`, `--project <name>`, and remaining text = claim_or_task.
6
6
 
7
- Load brain context for the `verify` domain (follow `_protocol.md` Brain Load Procedure).
7
+ Load brain context for the `verify` domain (follow `mastermind-protocol/SKILL.md` Brain Load Procedure).
8
8
 
9
9
  If claim_or_task is empty: ask "What claim or task needs verification?"
10
10
 
@@ -12,8 +12,8 @@ Default mode: **auto**.
12
12
 
13
13
  ---
14
14
 
15
- Invoke `Skill("mastermind-skills:verify")` passing: brain_context, claim_or_task, project_name, mode.
15
+ Invoke `Skill("mastermind-verify")` passing: brain_context, claim_or_task, project_name, mode.
16
16
 
17
- After skill returns: follow `_protocol.md` Brain Write Procedure for domain `verify`.
17
+ After skill returns: follow `mastermind-protocol/SKILL.md` Brain Write Procedure for domain `verify`.
18
18
 
19
- **MANDATORY — invoke `Skill("mastermind-skills:_repeat")` now.** This is required regardless of how the skill above completed, regardless of whether you think the work is done, regardless of whether you plan to end your response. For `--repeat N`: the count is non-negotiable — all N runs must happen. For `--tillend`: only a verified empty round (confirmed by git diff) stops the loop. Do not end your response without invoking this skill.
19
+ **MANDATORY — invoke `Skill("mastermind-repeat")` now.** This is required regardless of how the skill above completed, regardless of whether you think the work is done, regardless of whether you plan to end your response. For `--repeat N`: the count is non-negotiable — all N runs must happen. For `--tillend`: only a verified empty round (confirmed by git diff) stops the loop. Do not end your response without invoking this skill.
@@ -1,17 +1,17 @@
1
1
  <!-- Use when starting feature work that needs isolation from the current workspace or before executing implementation plans — sets up an isolated git worktree -->
2
2
 
3
- **First — extract repeat flags:** Follow REPEAT PREAMBLE from `_repeat.md`.
3
+ **First — extract repeat flags:** Follow REPEAT PREAMBLE from `mastermind-repeat/SKILL.md`.
4
4
 
5
5
  Parse `$ARGUMENTS` for `--auto`, `--confirm`, `--project <name>`, and remaining text.
6
6
 
7
- Load brain context (follow `_protocol.md` Brain Load Procedure).
7
+ Load brain context (follow `mastermind-protocol/SKILL.md` Brain Load Procedure).
8
8
 
9
9
  Default mode: **auto**.
10
10
 
11
11
  ---
12
12
 
13
- Invoke `Skill("mastermind-skills:worktree")` passing: brain_context, params, mode.
13
+ Invoke `Skill("mastermind-worktree")` passing: brain_context, params, mode.
14
14
 
15
- After skill returns: follow `_protocol.md` Brain Write Procedure.
15
+ After skill returns: follow `mastermind-protocol/SKILL.md` Brain Write Procedure.
16
16
 
17
- Invoke `Skill("mastermind-skills:_repeat")` now. Required — do not skip.
17
+ Invoke `Skill("mastermind-repeat")` now. Required — do not skip.
@@ -261,6 +261,36 @@ async function main() {
261
261
  process.stdout.write(`[control] port ${DEFAULT_PORT} is served by another project's control server — reusing it (killed redundant child)\n`);
262
262
  const foreignPid = await probePort(DEFAULT_PORT);
263
263
  writeStatus(typeof foreignPid === 'number' ? foreignPid : 0, DEFAULT_PORT);
264
+ // Pair with the foreign server: resolve its project dir from its pid,
265
+ // copy its dashboard-token beside OUR control.json (ingest is
266
+ // default-deny — without this every event from this project 401s
267
+ // silently), and self-register in its known-projects so future token
268
+ // rotations propagate back here on server restart.
269
+ try {
270
+ if (typeof foreignPid === 'number' && foreignPid > 0) {
271
+ const { execFileSync } = require('child_process');
272
+ const out = execFileSync('lsof', ['-a', '-p', String(foreignPid), '-d', 'cwd', '-Fn'], { encoding: 'utf8', timeout: 3000 });
273
+ const nLine = out.split('\n').find((l) => l.startsWith('n'));
274
+ const serverHome = nLine ? nLine.slice(1) : null;
275
+ if (serverHome) {
276
+ const srcTok = path.join(serverHome, '.monomind', 'dashboard-token');
277
+ const dstTok = path.join(CWD, '.monomind', 'dashboard-token');
278
+ if (fs.existsSync(srcTok)) {
279
+ fs.copyFileSync(srcTok, dstTok);
280
+ fs.chmodSync(dstTok, 0o600);
281
+ }
282
+ const kpFile = path.join(serverHome, 'data', 'known-projects.json');
283
+ try {
284
+ const kp = fs.existsSync(kpFile) ? JSON.parse(fs.readFileSync(kpFile, 'utf8')) : [];
285
+ if (Array.isArray(kp) && !kp.includes(CWD)) {
286
+ kp.push(CWD);
287
+ fs.writeFileSync(kpFile, JSON.stringify(kp));
288
+ }
289
+ } catch { /* registry unreadable — token copy alone still unblocks events */ }
290
+ process.stdout.write('[control] paired dashboard token and registered this project with the shared server\n');
291
+ }
292
+ }
293
+ } catch { /* pairing is best-effort; propagation-on-restart is the fallback */ }
264
294
  return;
265
295
  }
266
296
  // Server never became reachable on any expected port — kill the child
@@ -194,7 +194,7 @@ async function main() {
194
194
 
195
195
  // Detect route changes and worker metric updates by mtime and forward them too.
196
196
  // These aren't Claude Code hook events — they're file writes from route-handler.cjs
197
- // and the @monomind/hooks workers respectively — so we poll cheaply on every hook invocation.
197
+ // and the @monoes/hooks workers respectively — so we poll cheaply on every hook invocation.
198
198
  forwardFileChanges(monoDir, CWD);
199
199
 
200
200
  clearTimeout(safety);
@@ -221,7 +221,7 @@ function forwardFileChanges(monoDir, workDir) {
221
221
  }
222
222
  } catch {}
223
223
 
224
- // Worker-complete: newest mtime among .monomind/metrics/*.json (written by @monomind/hooks workers)
224
+ // Worker-complete: newest mtime among .monomind/metrics/*.json (written by @monoes/hooks workers)
225
225
  const metricsDir = path.join(workDir, '.monomind', 'metrics');
226
226
  try {
227
227
  const files = fs.readdirSync(metricsDir).filter(f => f.endsWith('.json') && !f.startsWith('.'));
@@ -3686,7 +3686,7 @@
3686
3686
  {
3687
3687
  "slug": "v1-integration-architect",
3688
3688
  "name": "v1-integration-architect",
3689
- "description": "v1 Integration Architect for cross-package integration work within the Monomind monorepo. Owns the wiring between @monomind/cli, @monomind/hooks, @monomind/memory, @monomind/security, and @monoes/monograph \u2014 ensuring MCP tool contracts, hook event flows, and inter-package APIs stay coherent as each package evolves.",
3689
+ "description": "v1 Integration Architect for cross-package integration work within the Monomind monorepo. Owns the wiring between @monomind/cli, @monoes/hooks, @monomind/memory, @monomind/security, and @monoes/monograph \u2014 ensuring MCP tool contracts, hook event flows, and inter-package APIs stay coherent as each package evolves.",
3690
3690
  "category": "specialists",
3691
3691
  "filePath": "../agents/specialists/integration-architect.md",
3692
3692
  "keywords": [
@@ -106,7 +106,7 @@ module.exports = {
106
106
  }
107
107
  } catch (e) { /* non-fatal */ }
108
108
 
109
- // Bridge to @monomind/hooks registry — fires AgentSpawn hooks (was previously never
109
+ // Bridge to @monoes/hooks registry — fires AgentSpawn hooks (was previously never
110
110
  // wired: HookEvent.AgentSpawn existed but no CJS handler ever fired it).
111
111
  try {
112
112
  var _hooksModule = hCtx._ensureHooksModule ? await hCtx._ensureHooksModule() : null;
@@ -125,7 +125,7 @@ module.exports = {
125
125
  description: agentDescBridge.slice(0, 500),
126
126
  },
127
127
  }, { continueOnError: true, timeout: 1500 });
128
- }, '@monomind/hooks.AgentSpawn');
128
+ }, '@monoes/hooks.AgentSpawn');
129
129
  }
130
130
  } catch (e) { /* non-fatal */ }
131
131
  },
@@ -152,7 +152,7 @@ module.exports = {
152
152
  }
153
153
  } catch (e) { /* non-fatal */ }
154
154
 
155
- // Bridge to @monomind/hooks registry — fires PostEdit hooks (observability bus, guidance provider).
155
+ // Bridge to @monoes/hooks registry — fires PostEdit hooks (observability bus, guidance provider).
156
156
  // Each hook event runs in a fresh process, so hCtx._hooksModule set by session-restore in an
157
157
  // earlier invocation is never visible here — must (re)load lazily via _ensureHooksModule().
158
158
  var _hooksModule = hCtx._hooksModule || (hCtx._ensureHooksModule ? await hCtx._ensureHooksModule() : null);
@@ -169,7 +169,7 @@ module.exports = {
169
169
  file: { path: editFileBridge, operation: 'modify' },
170
170
  duration: 0,
171
171
  }, { continueOnError: true, timeout: 1500 });
172
- }, '@monomind/hooks.PostEdit');
172
+ }, '@monoes/hooks.PostEdit');
173
173
  } catch (e) { /* non-fatal */ }
174
174
  }
175
175
 
@@ -23,7 +23,7 @@ const path = require('path');
23
23
  //
24
24
  // monofence-ai (packages/monofence-ai) has real prompt-injection / evasion
25
25
  // detection but is never wired into the live Claude Code PreToolUse path —
26
- // it only registers hooks on @monomind/hooks' internal HookRegistry, which
26
+ // it only registers hooks on @monoes/hooks' internal HookRegistry, which
27
27
  // this CJS dispatch path does not use. This loads it lazily (so a missing
28
28
  // or unbuilt package never breaks the existing regex gates), bounds it with
29
29
  // a hard timeout, and fails open on any error.
@@ -111,7 +111,7 @@ module.exports = {
111
111
  var result = await Promise.resolve(routeFn(prompt));
112
112
 
113
113
  // ── Enrichment: when router.cjs falls to the broad "coder" catch-all,
114
- // try @monomind/routing's richer keyword pre-filter (30+ specialized
114
+ // try @monoes/routing's richer keyword pre-filter (30+ specialized
115
115
  // rules for Solidity, game engines, DevOps, embedded, etc.) for a
116
116
  // more specific agent match. This bridges the hooks layer (router.cjs)
117
117
  // with the CLI routing package without requiring ESM imports. ─────────
@@ -166,7 +166,7 @@ module.exports = {
166
166
  }
167
167
  } catch (e) { console.log('[WARN] Session end failed: ' + e.message); }
168
168
 
169
- // Bridge to @monomind/hooks registry — fires SessionEnd hooks (episode-binner closeEpisode, observability bus).
169
+ // Bridge to @monoes/hooks registry — fires SessionEnd hooks (episode-binner closeEpisode, observability bus).
170
170
  // Each hook event runs in a fresh process, so hCtx._hooksModule set by session-restore in an
171
171
  // earlier invocation is never visible here — must (re)load lazily via _ensureHooksModule().
172
172
  var _hooksModule = hCtx._hooksModule || (hCtx._ensureHooksModule ? await hCtx._ensureHooksModule() : null);
@@ -30,20 +30,20 @@ module.exports = {
30
30
  }
31
31
  } catch (e) { console.log('[WARN] Session restore failed: ' + e.message); }
32
32
 
33
- // ── Non-blocking security scan via @monomind/hooks worker ─────────────
33
+ // ── Non-blocking security scan via @monoes/hooks worker ─────────────
34
34
  // The hooks package ships a security worker (worker-security.ts) that scans
35
35
  // for hardcoded secrets and vulnerability patterns. We run it at session
36
36
  // start as a fire-and-forget check — failures are silently ignored since
37
37
  // the package may not be installed or built.
38
38
  try {
39
- var hooksWorkersMod = require('@monomind/hooks/dist/workers/worker-security.js');
39
+ var hooksWorkersMod = require('@monoes/hooks/dist/workers/worker-security.js');
40
40
  var _createSecurityWorker = hooksWorkersMod.createSecurityWorker;
41
41
  if (typeof _createSecurityWorker === 'function') {
42
42
  var _securityScan = _createSecurityWorker(CWD);
43
43
  // Fire-and-forget: do not await — must not delay session restore
44
44
  Promise.resolve(_securityScan()).catch(function() {});
45
45
  }
46
- } catch (e) { /* @monomind/hooks not available or not built — skip */ }
46
+ } catch (e) { /* @monoes/hooks not available or not built — skip */ }
47
47
 
48
48
  // Stale helper self-heal — silently refresh project helpers that drift from
49
49
  // the bundled npm copy, so a `npm i -g monomind@latest` (or npx picking up a
@@ -226,16 +226,16 @@ module.exports = {
226
226
  }
227
227
  }
228
228
 
229
- // Bridge to @monomind/hooks compiled workers (GAP-001).
229
+ // Bridge to @monoes/hooks compiled workers (GAP-001).
230
230
  // Uses the shared hCtx._ensureHooksModule() (defined in hook-handler.cjs) so worker
231
231
  // registration happens exactly once per process instead of being duplicated here —
232
232
  // every other bridging handler (agent-start, pre-task, post-task, post-edit,
233
233
  // session-end) calls the same lazy loader since each hook event is its own process.
234
234
  try {
235
- var hooksModule = hCtx._ensureHooksModule ? await hCtx._ensureHooksModule() : await import('@monomind/hooks');
235
+ var hooksModule = hCtx._ensureHooksModule ? await hCtx._ensureHooksModule() : await import('@monoes/hooks');
236
236
  if (hooksModule) {
237
237
  hCtx._hooksModule = hooksModule;
238
- console.log('[INFO] @monomind/hooks workers initialized');
238
+ console.log('[INFO] @monoes/hooks workers initialized');
239
239
 
240
240
  // Gate enforcement lives entirely in gates-handler.cjs (its own regex
241
241
  // table, run on every PreToolUse). The @monomind/guidance package that
@@ -251,16 +251,16 @@ module.exports = {
251
251
  startedAt: new Date(),
252
252
  },
253
253
  }, { continueOnError: true, timeout: 1500 });
254
- }, '@monomind/hooks.SessionStart');
254
+ }, '@monoes/hooks.SessionStart');
255
255
  } catch (e2) { /* non-fatal */ }
256
256
  }
257
257
  }
258
- } catch (e) { /* @monomind/hooks not compiled yet — skip */ }
258
+ } catch (e) { /* @monoes/hooks not compiled yet — skip */ }
259
259
 
260
260
  // Refresh worker metrics once per session start — the statusline
261
261
  // (.claude/helpers/statusline.cjs) reads .monomind/metrics/ddd-progress.json,
262
262
  // route-handler.cjs and doctor read codebase-map/security-audit/performance/
263
- // consolidation.json; the @monomind/hooks workers are never otherwise
263
+ // consolidation.json; the @monoes/hooks workers are never otherwise
264
264
  // scheduled on the live hook path (the worker daemon that used to produce
265
265
  // these files was deleted).
266
266
  //
@@ -295,7 +295,7 @@ module.exports = {
295
295
  var _create = (hooksModule && typeof hooksModule[_w.factory] === 'function')
296
296
  ? hooksModule[_w.factory] : null;
297
297
  if (!_create) {
298
- // Dev-repo fallback: bare '@monomind/hooks' does not resolve from .claude/helpers
298
+ // Dev-repo fallback: bare '@monoes/hooks' does not resolve from .claude/helpers
299
299
  // in the monorepo (pnpm workspace link lives under packages/@monomind/cli), so
300
300
  // import the compiled worker directly by path.
301
301
  var _wDist = path.join(_hooksDistDir, _w.file);
@@ -307,7 +307,7 @@ module.exports = {
307
307
  if (_create) {
308
308
  var _wRun = _create(CWD);
309
309
  // runWithTimeout caps each at 1.5s so a slow worker can never block session start.
310
- await runWithTimeout(function() { return _wRun(); }, '@monomind/hooks.' + _w.factory);
310
+ await runWithTimeout(function() { return _wRun(); }, '@monoes/hooks.' + _w.factory);
311
311
  }
312
312
  } catch (e) { /* non-fatal — worker unavailable */ }
313
313
  }
@@ -26,7 +26,7 @@ module.exports = {
26
26
  // - PromptVersioning experiments (unused feature)
27
27
  // - Monograph blast radius (already shown by post-edit hook on actual changes)
28
28
 
29
- // Bridge to @monomind/hooks registry — fires Tasks 26 (PromptAssembler) and any other PreTask hooks.
29
+ // Bridge to @monoes/hooks registry — fires Tasks 26 (PromptAssembler) and any other PreTask hooks.
30
30
  // Each hook event runs in a fresh process, so hCtx._hooksModule set by session-restore in an
31
31
  // earlier invocation is never visible here — must (re)load lazily via _ensureHooksModule().
32
32
  var _hooksModule = hCtx._hooksModule || (hCtx._ensureHooksModule ? await hCtx._ensureHooksModule() : null);
@@ -114,7 +114,7 @@ module.exports = {
114
114
  }
115
115
  } catch (e) { /* non-fatal */ }
116
116
 
117
- // Bridge to @monomind/hooks registry — fires Tasks 39 (SpecializationScorer) and any other PostTask hooks.
117
+ // Bridge to @monoes/hooks registry — fires Tasks 39 (SpecializationScorer) and any other PostTask hooks.
118
118
  // Each hook event runs in a fresh process, so hCtx._hooksModule set by session-restore in an
119
119
  // earlier invocation is never visible here — must (re)load lazily via _ensureHooksModule().
120
120
  var _hooksModule = hCtx._hooksModule || (hCtx._ensureHooksModule ? await hCtx._ensureHooksModule() : null);
@@ -12,7 +12,7 @@
12
12
  * configuration. They are plain CommonJS scripts invoked directly
13
13
  * by Claude Code's hook runtime. This is the "live" system.
14
14
  *
15
- * 2. @monomind/hooks TypeScript package (packages/@monomind/hooks/)
15
+ * 2. @monoes/hooks TypeScript package (packages/@monomind/hooks/)
16
16
  * A full TypeScript package with workers, learning services, and
17
17
  * a WorkerManager. It compiles to dist/ but is only loaded
18
18
  * optionally, bridged at six lifecycle events: SessionStart (restore),
@@ -23,7 +23,7 @@
23
23
  *
24
24
  * IMPORTANT: each hook event is dispatched as its OWN fresh `node`
25
25
  * process (Claude Code spawns one invocation per event — this file
26
- * does not stay resident across events). So the @monomind/hooks
26
+ * does not stay resident across events). So the @monoes/hooks
27
27
  * module, and anything it registers (trace collector spans, episode
28
28
  * binner, etc.), cannot be set up once and reused across events —
29
29
  * every bridging handler must call hCtx._ensureHooksModule() itself,
@@ -102,7 +102,7 @@ const session = safeRequire(path.join(helpersDir, 'session.cjs'));
102
102
  const memory = safeRequire(path.join(helpersDir, 'memory.cjs'));
103
103
  const intelligence = safeRequire(path.join(helpersDir, 'intelligence.cjs'));
104
104
 
105
- // Module-level reference to @monomind/hooks — populated lazily via
105
+ // Module-level reference to @monoes/hooks — populated lazily via
106
106
  // _ensureHooksModule(). NOTE: hook-handler.cjs runs as a fresh `node` process
107
107
  // per hook event (Claude Code spawns one invocation per event, it does not
108
108
  // keep the process alive across events), so a value set during one event
@@ -116,10 +116,10 @@ async function _ensureHooksModule() {
116
116
  if (_hooksModule) return _hooksModule;
117
117
  if (_hooksModuleLoadAttempted) return null; // already tried+failed this process
118
118
  _hooksModuleLoadAttempted = true;
119
- // 1) Bare specifier — works when @monomind/hooks is installed/linked in a
119
+ // 1) Bare specifier — works when @monoes/hooks is installed/linked in a
120
120
  // node_modules reachable from this file (e.g. an end-user install).
121
121
  try {
122
- _hooksModule = await import('@monomind/hooks');
122
+ _hooksModule = await import('@monoes/hooks');
123
123
  } catch (e) {
124
124
  _hooksModule = null;
125
125
  }
@@ -141,11 +141,11 @@ async function _ensureHooksModule() {
141
141
  return _hooksModule;
142
142
  }
143
143
 
144
- // ── Visible one-time warning when the @monomind/hooks bridge fully fails ───
144
+ // ── Visible one-time warning when the @monoes/hooks bridge fully fails ───
145
145
  // Both load paths above (bare specifier + dev-repo file:// fallback) failed:
146
146
  // the 15 background workers (metrics, security scan, DDD tracking, etc.) are
147
147
  // unavailable for the rest of this session. This is almost always because
148
- // @monomind/hooks was never resolvable from npm (it ships with
148
+ // @monoes/hooks was never resolvable from npm (it ships with
149
149
  // optionalDependencies:"*", which npm silently skips) — NOT a problem with
150
150
  // the user's own project setup. Historically this failed completely
151
151
  // silently (see docs/AUDIT-BACKLOG.md P1-1), burning debugging time on the
@@ -166,7 +166,7 @@ function _warnHooksBridgeUnavailable() {
166
166
  }
167
167
  if (alreadyWarned) return;
168
168
  process.stderr.write(
169
- '[WARN] @monomind/hooks could not be loaded (bare specifier and dev-repo fallback both failed) — ' +
169
+ '[WARN] @monoes/hooks could not be loaded (bare specifier and dev-repo fallback both failed) — ' +
170
170
  'background workers (metrics, security scan, DDD tracking, etc.) are unavailable this session. ' +
171
171
  'This is not a problem with your project configuration — the package is not resolvable via npm ' +
172
172
  'from this install. See docs/AUDIT-BACKLOG.md P1-1 or https://github.com/monoes/monomind/issues.\n'
@@ -301,27 +301,59 @@ function _graphGateStateFile() {
301
301
  return path.join(CWD, '.monomind', 'graph-gate-state.json');
302
302
  }
303
303
 
304
+ // State is a per-session MAP ({ sessions: { [id]: {queried, blockedOnce, ts} } }).
305
+ // It used to be a single {sessionId,...} record — with two Claude sessions open
306
+ // on the same project, each session's grep clobbered the other's latch, so the
307
+ // "once per session" cap ping-ponged into blocking every call in both sessions.
308
+ // Legacy single-record files are migrated on read; entries are pruned to the
309
+ // 20 most recent so the file can't grow unbounded.
310
+ function _graphGateReadSessions() {
311
+ var d = {};
312
+ try { d = JSON.parse(fs.readFileSync(_graphGateStateFile(), 'utf-8')); } catch (e) {}
313
+ if (typeof d !== 'object' || d === null) d = {};
314
+ var sessions = (typeof d.sessions === 'object' && d.sessions !== null) ? d.sessions : {};
315
+ if (d.sessionId) { // legacy single-record shape — fold it in
316
+ sessions[d.sessionId] = { queried: !!d.queried, blockedOnce: !!d.blockedOnce, ts: Date.now() };
317
+ }
318
+ return sessions;
319
+ }
320
+
321
+ function _graphGateWriteSessions(sessions) {
322
+ var ids = Object.keys(sessions);
323
+ if (ids.length > 20) {
324
+ ids.sort(function (a, b) { return (sessions[a].ts || 0) - (sessions[b].ts || 0); });
325
+ for (var i = 0; i < ids.length - 20; i++) delete sessions[ids[i]];
326
+ }
327
+ fs.mkdirSync(path.join(CWD, '.monomind'), { recursive: true });
328
+ fs.writeFileSync(_graphGateStateFile(), JSON.stringify({ sessions: sessions }));
329
+ }
330
+
304
331
  function _graphGateMarkQueried(sessionId) {
305
332
  if (!sessionId) return;
306
333
  try {
307
- fs.mkdirSync(path.join(CWD, '.monomind'), { recursive: true });
308
- fs.writeFileSync(_graphGateStateFile(), JSON.stringify({ sessionId: sessionId, queried: true }));
334
+ var sessions = _graphGateReadSessions();
335
+ var s = sessions[sessionId] || { blockedOnce: false };
336
+ s.queried = true;
337
+ s.ts = Date.now();
338
+ sessions[sessionId] = s;
339
+ _graphGateWriteSessions(sessions);
309
340
  } catch (e) { /* non-fatal */ }
310
341
  }
311
342
 
312
343
  function _graphGateShouldBlock(sessionId) {
344
+ // MONOMIND_GRAPH_GATE=off disables the gate entirely — for headless/CI runs
345
+ // (claude -p, org agents, scripted probes) where each run is a fresh session
346
+ // that would otherwise eat one deliberate block on its first grep/find.
347
+ if (String(process.env.MONOMIND_GRAPH_GATE || '').toLowerCase() === 'off') return false;
313
348
  if (!sessionId || !_isGraphFresh()) return false;
314
- var f = _graphGateStateFile();
315
- var d = {};
316
- try { d = JSON.parse(fs.readFileSync(f, 'utf-8')); } catch (e) {}
317
- if (typeof d !== 'object' || d === null || d.sessionId !== sessionId) {
318
- d = { sessionId: sessionId, queried: false, blockedOnce: false };
319
- }
320
- if (d.queried || d.blockedOnce) return false;
321
- d.blockedOnce = true;
349
+ var sessions = _graphGateReadSessions();
350
+ var s = sessions[sessionId] || { queried: false, blockedOnce: false };
351
+ if (s.queried || s.blockedOnce) return false;
352
+ s.blockedOnce = true;
353
+ s.ts = Date.now();
354
+ sessions[sessionId] = s;
322
355
  try {
323
- fs.mkdirSync(path.join(CWD, '.monomind'), { recursive: true });
324
- fs.writeFileSync(f, JSON.stringify(d));
356
+ _graphGateWriteSessions(sessions);
325
357
  } catch (e) { return false; }
326
358
  return true;
327
359
  }