monomind 1.8.0 → 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/design/design-monodesign.md +121 -0
- package/.claude/agents/github/issue-tracker.md +12 -12
- package/.claude/agents/github/pr-manager.md +10 -10
- package/.claude/agents/github/release-manager.md +49 -105
- package/.claude/agents/github/repo-architect.md +73 -92
- package/.claude/agents/github/sync-coordinator.md +55 -123
- package/.claude/agents/marketing/marketing-competitive-content.md +155 -0
- package/.claude/agents/marketing/marketing-content-creator.md +13 -0
- package/.claude/agents/marketing/marketing-cro-specialist.md +147 -0
- package/.claude/agents/marketing/marketing-email-specialist.md +90 -0
- package/.claude/agents/marketing/marketing-launch-strategist.md +129 -0
- package/.claude/agents/marketing/marketing-pricing-strategist.md +127 -0
- package/.claude/agents/specialists/integration-architect.md +94 -0
- package/.claude/commands/agents/README.md +4 -0
- package/.claude/commands/agents/agent-capabilities.md +6 -2
- package/.claude/commands/agents/agent-coordination.md +4 -0
- package/.claude/commands/agents/agent-spawning.md +4 -0
- package/.claude/commands/agents/agent-types.md +6 -2
- package/.claude/commands/analysis/README.md +14 -5
- package/.claude/commands/analysis/bottleneck-detect.md +30 -123
- package/.claude/commands/analysis/performance-bottlenecks.md +14 -14
- package/.claude/commands/analysis/performance-report.md +38 -11
- package/.claude/commands/analysis/token-efficiency.md +13 -16
- package/.claude/commands/analysis/token-usage.md +34 -12
- package/.claude/commands/automation/README.md +15 -5
- package/.claude/commands/automation/auto-agent.md +49 -85
- package/.claude/commands/automation/self-healing.md +20 -18
- package/.claude/commands/automation/session-memory.md +28 -29
- package/.claude/commands/automation/smart-agents.md +17 -9
- package/.claude/commands/automation/smart-spawn.md +52 -11
- package/.claude/commands/automation/workflow-select.md +46 -11
- package/.claude/commands/browse.md +5 -0
- package/.claude/commands/coordination/README.md +9 -5
- package/.claude/commands/coordination/agent-spawn.md +53 -9
- package/.claude/commands/coordination/swarm-init.md +39 -42
- package/.claude/commands/coordination/task-orchestrate.md +65 -11
- package/.claude/commands/github/README.md +21 -8
- package/.claude/commands/github/github-modes.md +9 -5
- package/.claude/commands/github/issue-tracker.md +34 -33
- package/.claude/commands/github/pr-manager.md +20 -17
- package/.claude/commands/github/release-manager.md +37 -49
- package/.claude/commands/github/repo-architect.md +39 -41
- package/.claude/commands/github/sync-coordinator.md +45 -49
- package/.claude/commands/hive-mind/README.md +42 -17
- package/.claude/commands/hive-mind/hive-mind-consensus.md +68 -4
- package/.claude/commands/hive-mind/hive-mind-init.md +55 -5
- package/.claude/commands/hive-mind/hive-mind-memory.md +69 -4
- package/.claude/commands/hive-mind/hive-mind-spawn.md +71 -10
- package/.claude/commands/hive-mind/hive-mind-status.md +52 -4
- package/.claude/commands/hive-mind/hive-mind-stop.md +51 -4
- package/.claude/commands/hive-mind/hive-mind.md +74 -14
- package/.claude/commands/hooks/README.md +62 -7
- package/.claude/commands/hooks/overview.md +94 -35
- package/.claude/commands/hooks/post-edit.md +48 -87
- package/.claude/commands/hooks/post-task.md +37 -87
- package/.claude/commands/hooks/pre-edit.md +52 -84
- package/.claude/commands/hooks/pre-task.md +46 -81
- package/.claude/commands/hooks/session-end.md +49 -85
- package/.claude/commands/hooks/setup.md +87 -58
- package/.claude/commands/mastermind/_repeat.md +308 -0
- package/.claude/commands/mastermind/architect.md +49 -0
- package/.claude/commands/mastermind/brain.md +98 -0
- package/.claude/commands/mastermind/build.md +22 -0
- package/.claude/commands/mastermind/content.md +22 -0
- package/.claude/commands/mastermind/createorg.md +94 -0
- package/.claude/commands/mastermind/finance.md +22 -0
- package/.claude/commands/mastermind/idea.md +22 -0
- package/.claude/commands/mastermind/marketing.md +22 -0
- package/.claude/commands/mastermind/master.md +379 -0
- package/.claude/commands/mastermind/ops.md +22 -0
- package/.claude/commands/mastermind/release.md +22 -0
- package/.claude/commands/mastermind/research.md +22 -0
- package/.claude/commands/mastermind/review.md +22 -0
- package/.claude/commands/mastermind/runorg.md +106 -0
- package/.claude/commands/mastermind/sales.md +22 -0
- package/.claude/commands/mastermind/techport.md +17 -0
- package/.claude/commands/memory/README.md +75 -5
- package/.claude/commands/memory/memory-search.md +63 -11
- package/.claude/commands/monitoring/README.md +64 -4
- package/.claude/commands/monitoring/agent-metrics.md +50 -10
- package/.claude/commands/monitoring/agents.md +59 -32
- package/.claude/commands/monitoring/status.md +96 -34
- package/.claude/commands/monograph/README.md +102 -0
- package/.claude/commands/monograph/monograph-build.md +79 -0
- package/.claude/commands/monograph/monograph-search.md +96 -0
- package/.claude/commands/monograph/monograph-stats.md +53 -0
- package/.claude/commands/monograph/monograph-watch.md +63 -0
- package/.claude/commands/monograph/monograph-wiki.md +91 -0
- package/.claude/commands/monomind/createtask.md +277 -0
- package/.claude/commands/{monomind-do.md → monomind/do.md} +21 -8
- package/.claude/commands/monomind/help.md +118 -0
- package/.claude/commands/{monomind-idea.md → monomind/idea.md} +22 -28
- package/.claude/commands/{monomind-improve.md → monomind/improve.md} +21 -27
- package/.claude/commands/monomind/memory.md +230 -0
- package/.claude/commands/monomind/repeat.md +201 -0
- package/.claude/commands/monomind/review.md +313 -0
- package/.claude/commands/monomind/specialagents.md +125 -0
- package/.claude/commands/monomind/swarm.md +161 -0
- package/.claude/commands/monomind/understand.md +148 -0
- package/.claude/commands/optimization/README.md +69 -5
- package/.claude/commands/optimization/auto-topology.md +66 -43
- package/.claude/commands/optimization/parallel-execution.md +65 -39
- package/.claude/commands/optimization/performance-optimize.md +79 -0
- package/.claude/commands/pair/README.md +48 -230
- package/.claude/commands/pair/examples.md +85 -441
- package/.claude/commands/pair/modes.md +77 -303
- package/.claude/commands/pair/session.md +76 -359
- package/.claude/commands/sparc/analyzer.md +9 -26
- package/.claude/commands/sparc/architect.md +8 -25
- package/.claude/commands/sparc/ask.md +27 -68
- package/.claude/commands/sparc/batch-executor.md +8 -25
- package/.claude/commands/sparc/code.md +12 -53
- package/.claude/commands/sparc/coder.md +8 -25
- package/.claude/commands/sparc/debug.md +12 -53
- package/.claude/commands/sparc/debugger.md +8 -25
- package/.claude/commands/sparc/designer.md +8 -25
- package/.claude/commands/sparc/devops.md +16 -57
- package/.claude/commands/sparc/docs-writer.md +12 -53
- package/.claude/commands/sparc/documenter.md +8 -25
- package/.claude/commands/sparc/innovator.md +8 -25
- package/.claude/commands/sparc/integration.md +12 -53
- package/.claude/commands/sparc/mcp.md +12 -53
- package/.claude/commands/sparc/memory-manager.md +28 -25
- package/.claude/commands/sparc/optimizer.md +8 -25
- package/.claude/commands/sparc/orchestrator.md +35 -97
- package/.claude/commands/sparc/post-deployment-monitoring-mode.md +13 -54
- package/.claude/commands/sparc/refinement-optimization-mode.md +13 -54
- package/.claude/commands/sparc/researcher.md +8 -25
- package/.claude/commands/sparc/reviewer.md +8 -25
- package/.claude/commands/sparc/security-review.md +13 -54
- package/.claude/commands/sparc/sparc-modes.md +97 -151
- package/.claude/commands/sparc/sparc.md +16 -56
- package/.claude/commands/sparc/spec-pseudocode.md +13 -54
- package/.claude/commands/sparc/supabase-admin.md +19 -66
- package/.claude/commands/sparc/swarm-coordinator.md +21 -25
- package/.claude/commands/sparc/tdd.md +8 -25
- package/.claude/commands/sparc/tester.md +8 -25
- package/.claude/commands/sparc/tutorial.md +12 -53
- package/.claude/commands/sparc/workflow-manager.md +8 -25
- package/.claude/commands/sparc.md +76 -130
- package/.claude/commands/stream-chain/pipeline.md +72 -77
- package/.claude/commands/stream-chain/run.md +133 -47
- package/.claude/commands/swarm/README.md +37 -12
- package/.claude/commands/swarm/analysis.md +47 -69
- package/.claude/commands/swarm/development.md +45 -69
- package/.claude/commands/swarm/examples.md +77 -142
- package/.claude/commands/swarm/maintenance.md +47 -74
- package/.claude/commands/swarm/optimization.md +54 -87
- package/.claude/commands/swarm/research.md +47 -107
- package/.claude/commands/swarm/swarm-analysis.md +58 -4
- package/.claude/commands/swarm/swarm-background.md +61 -4
- package/.claude/commands/swarm/swarm-modes.md +63 -4
- package/.claude/commands/swarm/swarm-monitor.md +50 -4
- package/.claude/commands/swarm/swarm-status.md +40 -4
- package/.claude/commands/swarm/swarm-strategies.md +73 -5
- package/.claude/commands/swarm/swarm.md +70 -18
- package/.claude/commands/swarm/testing.md +51 -102
- package/.claude/commands/tokens.md +6 -1
- package/.claude/commands/training/README.md +36 -6
- package/.claude/commands/training/model-update.md +68 -15
- package/.claude/commands/training/neural-patterns.md +54 -55
- package/.claude/commands/training/neural-train.md +70 -16
- package/.claude/commands/training/pattern-learn.md +60 -16
- package/.claude/commands/training/specialization.md +78 -49
- package/.claude/commands/truth/start.md +87 -109
- package/.claude/commands/ts.md +7 -2
- package/.claude/commands/verify/check.md +90 -34
- package/.claude/commands/verify/start.md +71 -94
- package/.claude/commands/workflows/README.md +62 -6
- package/.claude/commands/workflows/development.md +69 -61
- package/.claude/commands/workflows/research.md +73 -47
- package/.claude/commands/workflows/workflow-create.md +75 -16
- package/.claude/commands/workflows/workflow-execute.md +94 -16
- package/.claude/commands/workflows/workflow-export.md +81 -16
- package/.claude/helpers/control-start.cjs +91 -0
- package/.claude/helpers/extras-registry.json +4104 -1991
- package/.claude/helpers/graphify-freshen.cjs +44 -13
- package/.claude/helpers/hook-handler.cjs +256 -1
- package/.claude/helpers/learning-service.mjs +0 -0
- package/.claude/helpers/loop-tracker.cjs +107 -0
- package/.claude/helpers/metrics-db.mjs +0 -0
- package/.claude/helpers/router.cjs +48 -68
- package/.claude/helpers/skill-registry.json +89 -104
- package/.claude/helpers/statusline.cjs +33 -2
- package/.claude/helpers/swarm-hooks.sh +0 -0
- package/.claude/scheduled_tasks.lock +1 -0
- package/.claude/settings.json +15 -0
- package/.claude/skills/.monomind/data/ranked-context.json +5 -0
- package/.claude/skills/.monomind/sessions/current.json +13 -0
- package/.claude/skills/.monomind/sessions/session-1777829336455.json +15 -0
- package/.claude/skills/.monomind/sessions/session-1777831614725.json +15 -0
- package/.claude/skills/.monomind/sessions/session-1777832095857.json +15 -0
- package/.claude/skills/.monomind/sessions/session-1777839814183.json +15 -0
- package/.claude/skills/.monomind/sessions/session-1777841847131.json +15 -0
- package/.claude/skills/.monomind/sessions/session-1777843309463.json +15 -0
- package/.claude/skills/.monomind/sessions/session-1777880867159.json +15 -0
- package/.claude/skills/.monomind/sessions/session-1777881884593.json +15 -0
- package/.claude/skills/.monomind/sessions/session-1777884090471.json +15 -0
- package/.claude/skills/.monomind/sessions/session-1777884808221.json +15 -0
- package/.claude/skills/.monomind/sessions/session-1777885672155.json +15 -0
- package/.claude/skills/.monomind/sessions/session-1777886852818.json +15 -0
- package/.claude/skills/.monomind/sessions/session-1777896532690.json +15 -0
- package/.claude/skills/agentdb-advanced/SKILL.md +11 -12
- package/.claude/skills/agentdb-learning/SKILL.md +20 -21
- package/.claude/skills/agentdb-memory-patterns/SKILL.md +28 -30
- package/.claude/skills/agentdb-optimization/SKILL.md +11 -12
- package/.claude/skills/agentdb-vector-search/SKILL.md +37 -41
- package/.claude/skills/{v3-integration-deep → agentic-integration}/SKILL.md +20 -13
- package/.claude/skills/agentic-jujutsu/SKILL.md +22 -22
- package/.claude/skills/{v3-cli-modernization → cli-modernization}/SKILL.md +17 -8
- package/.claude/skills/{v3-core-implementation → core-implementation}/SKILL.md +33 -8
- package/.claude/skills/{v3-ddd-architecture → ddd-architecture}/SKILL.md +18 -25
- package/.claude/skills/github-code-review/SKILL.md +82 -83
- package/.claude/skills/github-multi-repo/SKILL.md +42 -46
- package/.claude/skills/github-project-management/SKILL.md +83 -88
- package/.claude/skills/github-release-management/SKILL.md +12 -18
- package/.claude/skills/github-workflow-automation/SKILL.md +70 -74
- package/.claude/skills/hooks-automation/SKILL.md +9 -13
- package/.claude/skills/mastermind/_intake.md +83 -0
- package/.claude/skills/mastermind/_protocol.md +275 -0
- package/.claude/skills/mastermind/architect.md +847 -0
- package/.claude/skills/mastermind/build.md +158 -0
- package/.claude/skills/mastermind/content.md +185 -0
- package/.claude/skills/mastermind/createorg.md +318 -0
- package/.claude/skills/mastermind/finance.md +154 -0
- package/.claude/skills/mastermind/idea.md +158 -0
- package/.claude/skills/mastermind/marketing.md +216 -0
- package/.claude/skills/mastermind/monotask.md +350 -0
- package/.claude/skills/mastermind/ops.md +156 -0
- package/.claude/skills/mastermind/references/copywriting-frameworks.md +181 -0
- package/.claude/skills/mastermind/references/persuasion-psychology.md +158 -0
- package/.claude/skills/mastermind/release.md +156 -0
- package/.claude/skills/mastermind/research.md +156 -0
- package/.claude/skills/mastermind/review.md +157 -0
- package/.claude/skills/mastermind/runorg.md +308 -0
- package/.claude/skills/mastermind/sales.md +158 -0
- package/.claude/skills/mastermind/techport.md +743 -0
- package/.claude/skills/{v3-mcp-optimization → mcp-optimization}/SKILL.md +35 -14
- package/.claude/skills/{v3-memory-unification → memory-unification}/SKILL.md +20 -4
- package/.claude/skills/monodesign/SKILL.md +302 -0
- package/.claude/skills/monodesign/reference/adapt.md +190 -0
- package/.claude/skills/monodesign/reference/animate.md +175 -0
- package/.claude/skills/monodesign/reference/antipatterns-catalog.md +187 -0
- package/.claude/skills/monodesign/reference/audit.md +133 -0
- package/.claude/skills/monodesign/reference/bolder.md +113 -0
- package/.claude/skills/monodesign/reference/brand-workflow.md +180 -0
- package/.claude/skills/monodesign/reference/brand.md +114 -0
- package/.claude/skills/monodesign/reference/clarify.md +174 -0
- package/.claude/skills/monodesign/reference/cognitive-load.md +106 -0
- package/.claude/skills/monodesign/reference/color-and-contrast.md +105 -0
- package/.claude/skills/monodesign/reference/colorize.md +154 -0
- package/.claude/skills/monodesign/reference/component-specs.md +260 -0
- package/.claude/skills/monodesign/reference/component-states.md +274 -0
- package/.claude/skills/monodesign/reference/component-system.md +358 -0
- package/.claude/skills/monodesign/reference/copy-formulas.md +160 -0
- package/.claude/skills/monodesign/reference/craft.md +193 -0
- package/.claude/skills/monodesign/reference/critique.md +213 -0
- package/.claude/skills/monodesign/reference/delight.md +302 -0
- package/.claude/skills/monodesign/reference/design-principles.md +246 -0
- package/.claude/skills/monodesign/reference/distill.md +111 -0
- package/.claude/skills/monodesign/reference/document.md +427 -0
- package/.claude/skills/monodesign/reference/extract.md +69 -0
- package/.claude/skills/monodesign/reference/harden.md +347 -0
- package/.claude/skills/monodesign/reference/heuristics-scoring.md +234 -0
- package/.claude/skills/monodesign/reference/image-prompts.md +118 -0
- package/.claude/skills/monodesign/reference/interaction-design.md +195 -0
- package/.claude/skills/monodesign/reference/layout.md +141 -0
- package/.claude/skills/monodesign/reference/live.md +622 -0
- package/.claude/skills/monodesign/reference/motion-design.md +109 -0
- package/.claude/skills/monodesign/reference/onboard.md +234 -0
- package/.claude/skills/monodesign/reference/optimize.md +258 -0
- package/.claude/skills/monodesign/reference/overdrive.md +130 -0
- package/.claude/skills/monodesign/reference/personas.md +179 -0
- package/.claude/skills/monodesign/reference/polish.md +233 -0
- package/.claude/skills/monodesign/reference/pre-delivery-checklist.md +108 -0
- package/.claude/skills/monodesign/reference/product.md +62 -0
- package/.claude/skills/monodesign/reference/quieter.md +99 -0
- package/.claude/skills/monodesign/reference/responsive-design.md +114 -0
- package/.claude/skills/monodesign/reference/shape.md +151 -0
- package/.claude/skills/monodesign/reference/spatial-design.md +100 -0
- package/.claude/skills/monodesign/reference/teach.md +156 -0
- package/.claude/skills/monodesign/reference/token-architecture.md +222 -0
- package/.claude/skills/monodesign/reference/typeset.md +124 -0
- package/.claude/skills/monodesign/reference/typography.md +159 -0
- package/.claude/skills/monodesign/reference/ux-research.md +143 -0
- package/.claude/skills/monodesign/reference/ux-rules.md +211 -0
- package/.claude/skills/monodesign/reference/ux-writing.md +107 -0
- package/.claude/skills/monomotion/SKILL.md +145 -0
- package/.claude/skills/monomotion/rules/api-control.md +139 -0
- package/.claude/skills/monomotion/rules/effects.md +109 -0
- package/.claude/skills/monomotion/rules/integration.md +140 -0
- package/.claude/skills/monomotion/rules/scroll.md +131 -0
- package/.claude/skills/monomotion/rules/sequencing.md +105 -0
- package/.claude/skills/monomotion/rules/svg.md +101 -0
- package/.claude/skills/monomotion/rules/text.md +119 -0
- package/.claude/skills/pair-programming/SKILL.md +1 -1
- package/.claude/skills/performance-analysis/SKILL.md +3 -3
- package/.claude/skills/{v3-performance-optimization → performance-optimization}/SKILL.md +16 -8
- package/.claude/skills/reasoningbank-agentdb/SKILL.md +17 -19
- package/.claude/skills/reasoningbank-intelligence/SKILL.md +4 -6
- package/.claude/skills/{v3-security-overhaul → security-hardening}/SKILL.md +13 -3
- package/.claude/skills/skill-builder/SKILL.md +19 -19
- package/.claude/skills/sparc-methodology/SKILL.md +55 -211
- package/.claude/skills/stop-slop/SKILL.md +67 -0
- package/.claude/skills/stop-slop/references/examples.md +61 -0
- package/.claude/skills/stop-slop/references/phrases.md +130 -0
- package/.claude/skills/stop-slop/references/structures.md +136 -0
- package/.claude/skills/swarm-advanced/SKILL.md +13 -43
- package/.claude/skills/{v3-swarm-coordination → swarm-coordination}/SKILL.md +39 -21
- package/.claude/skills/swarm-orchestration/SKILL.md +12 -12
- package/.claude/skills/verification-quality/SKILL.md +5 -5
- package/.claude/statusline-command.sh +0 -0
- package/.claude/statusline.sh +0 -0
- package/.claude-plugin/scripts/install.sh +0 -0
- package/.claude-plugin/scripts/uninstall.sh +0 -0
- package/.claude-plugin/scripts/verify.sh +0 -0
- package/README.md +5 -5
- package/package.json +17 -17
- package/packages/@monomind/cli/README.md +441 -0
- package/packages/@monomind/cli/bin/cli.js +78 -13
- package/packages/@monomind/cli/bin/mcp-server.js +0 -0
- package/packages/@monomind/cli/dist/src/agents/halt-signal.js +33 -7
- package/packages/@monomind/cli/dist/src/agents/managed-agent.js +5 -2
- package/packages/@monomind/cli/dist/src/agents/prompt-experiment.d.ts +3 -2
- package/packages/@monomind/cli/dist/src/agents/prompt-experiment.js +1 -1
- package/packages/@monomind/cli/dist/src/agents/prompt-version-manager.d.ts +5 -2
- package/packages/@monomind/cli/dist/src/agents/prompt-version-manager.js +26 -4
- package/packages/@monomind/cli/dist/src/agents/specialization-scorer.js +17 -9
- package/packages/@monomind/cli/dist/src/agents/trigger-scanner.d.ts +5 -3
- package/packages/@monomind/cli/dist/src/agents/trigger-scanner.js +58 -10
- package/packages/@monomind/cli/dist/src/agents/version-store.d.ts +0 -1
- package/packages/@monomind/cli/dist/src/agents/version-store.js +44 -21
- package/packages/@monomind/cli/dist/src/autopilot-state.js +79 -28
- package/packages/@monomind/cli/dist/src/benchmarks/benchmark-runner.d.ts +7 -2
- package/packages/@monomind/cli/dist/src/benchmarks/benchmark-runner.js +20 -8
- package/packages/@monomind/cli/dist/src/benchmarks/metric-evaluators.d.ts +2 -1
- package/packages/@monomind/cli/dist/src/benchmarks/metric-evaluators.js +25 -2
- package/packages/@monomind/cli/dist/src/commands/agent.js +6 -4
- package/packages/@monomind/cli/dist/src/commands/appliance-advanced.js +23 -0
- package/packages/@monomind/cli/dist/src/commands/autopilot.js +3 -3
- package/packages/@monomind/cli/dist/src/commands/benchmark.js +119 -8
- package/packages/@monomind/cli/dist/src/commands/claims.js +22 -14
- package/packages/@monomind/cli/dist/src/commands/config.js +32 -0
- package/packages/@monomind/cli/dist/src/commands/daemon.js +13 -11
- package/packages/@monomind/cli/dist/src/commands/deployment.js +21 -2
- package/packages/@monomind/cli/dist/src/commands/doctor.js +5 -4
- package/packages/@monomind/cli/dist/src/commands/embeddings.js +124 -48
- package/packages/@monomind/cli/dist/src/commands/hive-mind.js +15 -14
- package/packages/@monomind/cli/dist/src/commands/hooks.js +45 -41
- package/packages/@monomind/cli/dist/src/commands/index.d.ts +2 -0
- package/packages/@monomind/cli/dist/src/commands/index.js +20 -7
- package/packages/@monomind/cli/dist/src/commands/init.js +53 -19
- package/packages/@monomind/cli/dist/src/commands/mcp.js +31 -44
- package/packages/@monomind/cli/dist/src/commands/memory.js +47 -15
- package/packages/@monomind/cli/dist/src/commands/migrate.js +156 -108
- package/packages/@monomind/cli/dist/src/commands/monograph.d.ts +8 -0
- package/packages/@monomind/cli/dist/src/commands/monograph.js +526 -0
- package/packages/@monomind/cli/dist/src/commands/neural.js +96 -56
- package/packages/@monomind/cli/dist/src/commands/performance.js +30 -8
- package/packages/@monomind/cli/dist/src/commands/plugins.js +13 -37
- package/packages/@monomind/cli/dist/src/commands/process.js +25 -2
- package/packages/@monomind/cli/dist/src/commands/providers.js +37 -5
- package/packages/@monomind/cli/dist/src/commands/replay.js +4 -4
- package/packages/@monomind/cli/dist/src/commands/route.js +37 -5
- package/packages/@monomind/cli/dist/src/commands/ruvector/import.js +12 -2
- package/packages/@monomind/cli/dist/src/commands/ruvector/init.js +15 -0
- package/packages/@monomind/cli/dist/src/commands/ruvector/status.js +16 -3
- package/packages/@monomind/cli/dist/src/commands/security.js +342 -193
- package/packages/@monomind/cli/dist/src/commands/session.js +51 -8
- package/packages/@monomind/cli/dist/src/commands/start.js +18 -4
- package/packages/@monomind/cli/dist/src/commands/swarm.js +47 -36
- package/packages/@monomind/cli/dist/src/commands/tokens.js +11 -11
- package/packages/@monomind/cli/dist/src/commands/transfer-store.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/workflow.js +31 -4
- package/packages/@monomind/cli/dist/src/config-adapter.d.ts +2 -1
- package/packages/@monomind/cli/dist/src/consensus/audit-writer.js +46 -13
- package/packages/@monomind/cli/dist/src/consensus/vote-signer.d.ts +0 -3
- package/packages/@monomind/cli/dist/src/consensus/vote-signer.js +9 -1
- package/packages/@monomind/cli/dist/src/dlq/dlq-reader.d.ts +4 -2
- package/packages/@monomind/cli/dist/src/dlq/dlq-reader.js +25 -8
- package/packages/@monomind/cli/dist/src/dlq/dlq-replayer.d.ts +10 -3
- package/packages/@monomind/cli/dist/src/dlq/dlq-replayer.js +50 -16
- package/packages/@monomind/cli/dist/src/dlq/dlq-writer.js +27 -5
- package/packages/@monomind/cli/dist/src/eval/dataset-manager.d.ts +2 -2
- package/packages/@monomind/cli/dist/src/eval/dataset-manager.js +26 -16
- package/packages/@monomind/cli/dist/src/eval/trace-collector.js +23 -3
- package/packages/@monomind/cli/dist/src/index.js +12 -10
- package/packages/@monomind/cli/dist/src/init/claudemd-generator.js +8 -8
- package/packages/@monomind/cli/dist/src/init/executor.js +212 -102
- package/packages/@monomind/cli/dist/src/init/helpers-generator.js +35 -22
- package/packages/@monomind/cli/dist/src/init/mcp-generator.js +3 -3
- package/packages/@monomind/cli/dist/src/init/settings-generator.js +10 -3
- package/packages/@monomind/cli/dist/src/init/shared-instructions-generator.js +18 -3
- package/packages/@monomind/cli/dist/src/init/statusline-generator.js +3 -1
- package/packages/@monomind/cli/dist/src/init/types.d.ts +35 -11
- package/packages/@monomind/cli/dist/src/init/types.js +5 -9
- package/packages/@monomind/cli/dist/src/interactive/interrupt.js +8 -3
- package/packages/@monomind/cli/dist/src/mcp/tool-registry.js +38 -4
- package/packages/@monomind/cli/dist/src/mcp-client.js +10 -4
- package/packages/@monomind/cli/dist/src/mcp-server.d.ts +9 -2
- package/packages/@monomind/cli/dist/src/mcp-server.js +182 -35
- package/packages/@monomind/cli/dist/src/mcp-tools/agent-tools.js +66 -34
- package/packages/@monomind/cli/dist/src/mcp-tools/agentdb-tools.js +34 -7
- package/packages/@monomind/cli/dist/src/mcp-tools/analyze-tools.js +25 -16
- package/packages/@monomind/cli/dist/src/mcp-tools/auto-install.js +4 -6
- package/packages/@monomind/cli/dist/src/mcp-tools/autopilot-tools.js +12 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/browser-tools.js +199 -20
- package/packages/@monomind/cli/dist/src/mcp-tools/claims-tools.js +68 -18
- package/packages/@monomind/cli/dist/src/mcp-tools/config-tools.js +33 -5
- package/packages/@monomind/cli/dist/src/mcp-tools/coordination-tools.js +59 -4
- package/packages/@monomind/cli/dist/src/mcp-tools/daa-tools.js +46 -10
- package/packages/@monomind/cli/dist/src/mcp-tools/embeddings-tools.js +46 -5
- package/packages/@monomind/cli/dist/src/mcp-tools/github-tools.js +29 -16
- package/packages/@monomind/cli/dist/src/mcp-tools/guidance-tools.js +38 -10
- package/packages/@monomind/cli/dist/src/mcp-tools/hive-mind-tools.js +96 -33
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-tools.js +70 -37
- package/packages/@monomind/cli/dist/src/mcp-tools/memory-tools.js +29 -13
- package/packages/@monomind/cli/dist/src/mcp-tools/monograph-tools.js +5867 -56
- package/packages/@monomind/cli/dist/src/mcp-tools/neural-tools.js +121 -37
- package/packages/@monomind/cli/dist/src/mcp-tools/performance-tools.js +21 -8
- package/packages/@monomind/cli/dist/src/mcp-tools/progress-tools.js +10 -8
- package/packages/@monomind/cli/dist/src/mcp-tools/request-tracker.js +4 -1
- package/packages/@monomind/cli/dist/src/mcp-tools/ruvllm-tools.js +19 -8
- package/packages/@monomind/cli/dist/src/mcp-tools/session-tools.js +57 -17
- package/packages/@monomind/cli/dist/src/mcp-tools/swarm-tools.js +35 -17
- package/packages/@monomind/cli/dist/src/mcp-tools/system-tools.js +4 -3
- package/packages/@monomind/cli/dist/src/mcp-tools/task-tools.js +53 -13
- package/packages/@monomind/cli/dist/src/mcp-tools/terminal-tools.js +63 -14
- package/packages/@monomind/cli/dist/src/mcp-tools/transfer-tools.js +21 -16
- package/packages/@monomind/cli/dist/src/mcp-tools/workflow-tools.js +92 -23
- package/packages/@monomind/cli/dist/src/memory/ewc-consolidation.js +41 -10
- package/packages/@monomind/cli/dist/src/memory/intelligence.d.ts +2 -2
- package/packages/@monomind/cli/dist/src/memory/intelligence.js +39 -13
- package/packages/@monomind/cli/dist/src/memory/memory-bridge.d.ts +1 -0
- package/packages/@monomind/cli/dist/src/memory/memory-bridge.js +149 -56
- package/packages/@monomind/cli/dist/src/memory/memory-initializer.js +107 -45
- package/packages/@monomind/cli/dist/src/memory/sona-optimizer.d.ts +8 -1
- package/packages/@monomind/cli/dist/src/memory/sona-optimizer.js +25 -8
- package/packages/@monomind/cli/dist/src/observability/replay-reader.d.ts +40 -0
- package/packages/@monomind/cli/dist/src/observability/replay-reader.js +138 -0
- package/packages/@monomind/cli/dist/src/orchestration/routing-modes.js +35 -5
- package/packages/@monomind/cli/dist/src/parser.d.ts +8 -0
- package/packages/@monomind/cli/dist/src/parser.js +48 -14
- package/packages/@monomind/cli/dist/src/plugins/manager.js +112 -19
- package/packages/@monomind/cli/dist/src/plugins/store/discovery.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/plugins/store/discovery.js +80 -62
- package/packages/@monomind/cli/dist/src/production/circuit-breaker.js +8 -1
- package/packages/@monomind/cli/dist/src/production/error-handler.d.ts +4 -2
- package/packages/@monomind/cli/dist/src/production/error-handler.js +27 -5
- package/packages/@monomind/cli/dist/src/production/monitoring.js +8 -4
- package/packages/@monomind/cli/dist/src/production/rate-limiter.js +30 -22
- package/packages/@monomind/cli/dist/src/ruvector/agent-wasm.js +2 -2
- package/packages/@monomind/cli/dist/src/ruvector/coverage-router.js +19 -9
- package/packages/@monomind/cli/dist/src/ruvector/diff-classifier.d.ts +1 -0
- package/packages/@monomind/cli/dist/src/ruvector/diff-classifier.js +26 -6
- package/packages/@monomind/cli/dist/src/ruvector/enhanced-model-router.js +24 -2
- package/packages/@monomind/cli/dist/src/ruvector/index.d.ts +1 -2
- package/packages/@monomind/cli/dist/src/ruvector/index.js +2 -2
- package/packages/@monomind/cli/dist/src/ruvector/model-router.d.ts +4 -2
- package/packages/@monomind/cli/dist/src/ruvector/model-router.js +30 -6
- package/packages/@monomind/cli/dist/src/ruvector/moe-router.d.ts +7 -0
- package/packages/@monomind/cli/dist/src/ruvector/moe-router.js +35 -12
- package/packages/@monomind/cli/dist/src/ruvector/q-learning-router.d.ts +7 -1
- package/packages/@monomind/cli/dist/src/ruvector/q-learning-router.js +40 -9
- package/packages/@monomind/cli/dist/src/services/claim-service.d.ts +3 -1
- package/packages/@monomind/cli/dist/src/services/claim-service.js +33 -2
- package/packages/@monomind/cli/dist/src/services/config-file-manager.d.ts +16 -2
- package/packages/@monomind/cli/dist/src/services/config-file-manager.js +105 -17
- package/packages/@monomind/cli/dist/src/services/container-worker-pool.js +51 -11
- package/packages/@monomind/cli/dist/src/services/headless-worker-executor.d.ts +7 -0
- package/packages/@monomind/cli/dist/src/services/headless-worker-executor.js +188 -45
- package/packages/@monomind/cli/dist/src/services/registry-api.js +62 -9
- package/packages/@monomind/cli/dist/src/services/ruvector-training.js +8 -0
- package/packages/@monomind/cli/dist/src/services/worker-daemon.d.ts +4 -1
- package/packages/@monomind/cli/dist/src/services/worker-daemon.js +112 -28
- package/packages/@monomind/cli/dist/src/services/worker-queue.d.ts +9 -2
- package/packages/@monomind/cli/dist/src/services/worker-queue.js +86 -5
- package/packages/@monomind/cli/dist/src/suggest.js +9 -0
- package/packages/@monomind/cli/dist/src/swarm/flow-enforcer.d.ts +5 -3
- package/packages/@monomind/cli/dist/src/swarm/flow-enforcer.js +17 -5
- package/packages/@monomind/cli/dist/src/swarm/flow-visualizer.d.ts +3 -0
- package/packages/@monomind/cli/dist/src/swarm/flow-visualizer.js +30 -6
- package/packages/@monomind/cli/dist/src/transfer/anonymization/index.js +5 -3
- package/packages/@monomind/cli/dist/src/transfer/export.js +5 -3
- package/packages/@monomind/cli/dist/src/transfer/ipfs/client.js +84 -7
- package/packages/@monomind/cli/dist/src/transfer/ipfs/upload.js +13 -4
- package/packages/@monomind/cli/dist/src/transfer/storage/gcs.js +19 -10
- package/packages/@monomind/cli/dist/src/transfer/store/discovery.d.ts +9 -2
- package/packages/@monomind/cli/dist/src/transfer/store/discovery.js +68 -13
- package/packages/@monomind/cli/dist/src/transfer/store/download.d.ts +15 -6
- package/packages/@monomind/cli/dist/src/transfer/store/download.js +113 -24
- package/packages/@monomind/cli/dist/src/transfer/store/publish.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/transfer/store/publish.js +13 -14
- package/packages/@monomind/cli/dist/src/transfer/store/registry.d.ts +3 -3
- package/packages/@monomind/cli/dist/src/transfer/store/registry.js +32 -16
- package/packages/@monomind/cli/dist/src/update/checker.js +17 -4
- package/packages/@monomind/cli/dist/src/update/executor.js +25 -20
- package/packages/@monomind/cli/dist/src/update/rate-limiter.d.ts +11 -0
- package/packages/@monomind/cli/dist/src/update/rate-limiter.js +23 -3
- package/packages/@monomind/cli/dist/src/utils/parse-jsonl.d.ts +6 -0
- package/packages/@monomind/cli/dist/src/utils/parse-jsonl.js +22 -0
- package/packages/@monomind/cli/dist/src/workflow/condition-evaluator.js +37 -3
- package/packages/@monomind/cli/dist/src/workflow/dag-builder.js +27 -11
- package/packages/@monomind/cli/dist/src/workflow/dag-executor.js +51 -13
- package/packages/@monomind/cli/dist/src/workflow/dsl-schema.d.ts +3 -0
- package/packages/@monomind/cli/dist/src/workflow/dsl-schema.js +6 -2
- package/packages/@monomind/cli/dist/src/workflow/template-engine.js +7 -0
- package/packages/@monomind/cli/dist/src/workflow/workflow-executor.js +95 -14
- package/packages/@monomind/cli/package.json +5 -3
- package/packages/@monomind/guidance/README.md +1192 -0
- package/packages/@monomind/shared/README.md +322 -0
- package/packages/@monomind/shared/dist/types/consensus-audit.d.ts +3 -1
- package/packages/README.md +513 -0
- package/.claude/agents/design/design-brand-guardian.md +0 -323
- package/.claude/agents/design/design-image-prompt-engineer.md +0 -237
- package/.claude/agents/design/design-inclusive-visuals-specialist.md +0 -72
- package/.claude/agents/design/design-ui-designer.md +0 -384
- package/.claude/agents/design/design-ux-architect.md +0 -470
- package/.claude/agents/design/design-ux-researcher.md +0 -330
- package/.claude/agents/design/design-visual-storyteller.md +0 -150
- package/.claude/agents/design/design-whimsy-injector.md +0 -439
- package/.claude/agents/v3/integration-architect.md +0 -338
- package/.claude/commands/analysis/COMMAND_COMPLIANCE_REPORT.md +0 -54
- package/.claude/commands/coordination/init.md +0 -44
- package/.claude/commands/coordination/orchestrate.md +0 -43
- package/.claude/commands/coordination/spawn.md +0 -45
- package/.claude/commands/github/code-review-swarm.md +0 -550
- package/.claude/commands/github/code-review.md +0 -25
- package/.claude/commands/github/github-swarm.md +0 -121
- package/.claude/commands/github/issue-triage.md +0 -25
- package/.claude/commands/github/multi-repo-swarm.md +0 -519
- package/.claude/commands/github/pr-enhance.md +0 -26
- package/.claude/commands/github/project-board-sync.md +0 -471
- package/.claude/commands/github/release-swarm.md +0 -590
- package/.claude/commands/github/repo-analyze.md +0 -25
- package/.claude/commands/github/swarm-issue.md +0 -482
- package/.claude/commands/github/swarm-pr.md +0 -310
- package/.claude/commands/github/workflow-automation.md +0 -468
- package/.claude/commands/hive-mind/hive-mind-metrics.md +0 -8
- package/.claude/commands/hive-mind/hive-mind-resume.md +0 -8
- package/.claude/commands/hive-mind/hive-mind-sessions.md +0 -8
- package/.claude/commands/hive-mind/hive-mind-wizard.md +0 -8
- package/.claude/commands/list-agents.md +0 -17
- package/.claude/commands/memory/memory-persist.md +0 -25
- package/.claude/commands/memory/memory-usage.md +0 -25
- package/.claude/commands/memory/neural.md +0 -47
- package/.claude/commands/metrics.md +0 -11
- package/.claude/commands/monitoring/real-time-view.md +0 -25
- package/.claude/commands/monitoring/swarm-monitor.md +0 -25
- package/.claude/commands/monomind-createtask.md +0 -302
- package/.claude/commands/monomind-help.md +0 -103
- package/.claude/commands/monomind-memory.md +0 -107
- package/.claude/commands/monomind-repeat.md +0 -149
- package/.claude/commands/monomind-swarm.md +0 -205
- package/.claude/commands/optimization/cache-manage.md +0 -25
- package/.claude/commands/optimization/topology-optimize.md +0 -25
- package/.claude/commands/pair/commands.md +0 -546
- package/.claude/commands/pair/config.md +0 -510
- package/.claude/commands/pair/start.md +0 -209
- package/.claude/commands/use-agent.md +0 -67
- package/.claude/skills/monomind-createtask/SKILL.md +0 -269
- package/.claude/skills/monomind-task-engine/SKILL.md +0 -358
- /package/.claude/agents/{v3 → specialists}/memory-specialist.md +0 -0
- /package/.claude/agents/{v3 → specialists}/performance-engineer.md +0 -0
- /package/.claude/agents/{v3 → specialists}/queen-coordinator.md +0 -0
- /package/.claude/agents/{v3 → specialists}/security-architect.md +0 -0
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="assets/hero-banner.png" alt="Monomind — AI Agent Orchestration" width="100%" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<img src="assets/logo.png" alt="Monomind Logo" width="120" />
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<h1 align="center">Monomind</h1>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<strong>The orchestration layer that turns Claude Code into an autonomous engineering team.</strong>
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
<p align="center">
|
|
16
|
+
<a href="https://www.npmjs.com/package/monomind"><img src="https://img.shields.io/npm/v/monomind?color=%234F46E5&label=npm&style=flat-square" alt="npm version" /></a>
|
|
17
|
+
<a href="https://www.npmjs.com/package/monomind"><img src="https://img.shields.io/npm/dm/monomind?color=%2310B981&style=flat-square" alt="downloads" /></a>
|
|
18
|
+
<a href="https://github.com/nokhodian/monomind/stargazers"><img src="https://img.shields.io/github/stars/nokhodian/monomind?color=%23F59E0B&style=flat-square" alt="stars" /></a>
|
|
19
|
+
<a href="https://github.com/nokhodian/monomind/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-%238B5CF6?style=flat-square" alt="license" /></a>
|
|
20
|
+
<a href="https://nodejs.org/"><img src="https://img.shields.io/badge/node-%3E%3D20-green?style=flat-square" alt="node" /></a>
|
|
21
|
+
</p>
|
|
22
|
+
|
|
23
|
+
<p align="center">
|
|
24
|
+
<a href="#quickstart">Quickstart</a> •
|
|
25
|
+
<a href="#what-monomind-does">What It Does</a> •
|
|
26
|
+
<a href="#features">Features</a> •
|
|
27
|
+
<a href="#agent-catalog">Agent Catalog</a> •
|
|
28
|
+
<a href="#swarm-orchestration">Swarms</a> •
|
|
29
|
+
<a href="#commands">Commands</a> •
|
|
30
|
+
<a href="#memory--intelligence">Memory</a>
|
|
31
|
+
</p>
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Why Monomind?
|
|
36
|
+
|
|
37
|
+
You already use Claude Code. Monomind makes it **10x more powerful**.
|
|
38
|
+
|
|
39
|
+
Instead of one AI assistant handling everything, Monomind coordinates **230+ specialized agents** — architects, security auditors, performance engineers, frontend developers, database optimizers — each with domain expertise, working in parallel swarms that review each other's work.
|
|
40
|
+
|
|
41
|
+
**The difference:**
|
|
42
|
+
- **Without Monomind:** You prompt Claude, it does its best across every domain.
|
|
43
|
+
- **With Monomind:** Claude spawns the *right specialist* for each subtask, coordinates them in fault-tolerant swarms, remembers everything across sessions, and learns from every interaction.
|
|
44
|
+
|
|
45
|
+
> One command. Entire engineering workflows. Zero babysitting.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Quickstart
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Install globally
|
|
53
|
+
npm install -g monomind
|
|
54
|
+
|
|
55
|
+
# Initialize in any project
|
|
56
|
+
cd your-project
|
|
57
|
+
monomind init
|
|
58
|
+
|
|
59
|
+
# Add MCP server to Claude Code
|
|
60
|
+
claude mcp add monomind npx monomind mcp start
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
That's it. Monomind is now active in your Claude Code sessions.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Monomind Control — Live Dashboard
|
|
68
|
+
|
|
69
|
+
<p align="center">
|
|
70
|
+
<img src="assets/dashboard-control.png" alt="Monomind Control Dashboard" width="100%" />
|
|
71
|
+
</p>
|
|
72
|
+
|
|
73
|
+
Real-time visibility into every project, session, agent, memory, route decision, and token spend — all in one terminal-native dashboard.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## What Monomind Does
|
|
78
|
+
|
|
79
|
+
### From Prompt to Production
|
|
80
|
+
|
|
81
|
+
Monomind turns high-level instructions into coordinated multi-agent execution:
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
You: "Add webhook delivery with retries and dead-letter queue"
|
|
85
|
+
|
|
86
|
+
Monomind:
|
|
87
|
+
1. Routes to Software Architect → designs the system
|
|
88
|
+
2. Spawns backend-dev → implements webhook dispatcher
|
|
89
|
+
3. Spawns backend-dev → implements retry logic with exponential backoff
|
|
90
|
+
4. Spawns Database Optimizer → designs dead-letter queue schema
|
|
91
|
+
5. Spawns tester → writes integration tests
|
|
92
|
+
6. Spawns Code Reviewer → reviews all changes
|
|
93
|
+
7. Commits, reports, moves to next task
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Autonomous Task Pipelines
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
# Turn a spec into executable tasks, then run them
|
|
100
|
+
/monomind:createtask docs/specs/webhook-system.md
|
|
101
|
+
|
|
102
|
+
# Or let it generate ideas, evaluate, and execute
|
|
103
|
+
/monomind:idea add real-time collaboration to the editor
|
|
104
|
+
|
|
105
|
+
# Pick up tasks and execute them autonomously
|
|
106
|
+
/monomind:do
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Features
|
|
112
|
+
|
|
113
|
+
### 230+ Specialized Agents
|
|
114
|
+
|
|
115
|
+
Not generic "code assistants" — domain experts with targeted system prompts, each optimized for a specific class of work.
|
|
116
|
+
|
|
117
|
+
| Category | Count | Examples |
|
|
118
|
+
|---|---|---|
|
|
119
|
+
| **Engineering** | 23 | Backend Architect, Frontend Developer, Database Optimizer, Embedded Firmware Engineer, SRE |
|
|
120
|
+
| **Marketing** | 27 | SEO Specialist, TikTok Strategist, Content Creator, Growth Hacker, LinkedIn Content Creator |
|
|
121
|
+
| **Specialized** | 27 | Legal Compliance, Finance Tracker, Salesforce Architect, Document Generator, MCP Builder |
|
|
122
|
+
| **Game Dev** | 20 | Unity Architect, Unreal Systems Engineer, Godot Scripter, Roblox Systems Scripter |
|
|
123
|
+
| **Sales** | 8 | Deal Strategist, Sales Engineer, Pipeline Analyst, Outbound Strategist |
|
|
124
|
+
| **Design** | 8 | UI Designer, UX Researcher, Brand Guardian, Visual Storyteller |
|
|
125
|
+
| **Paid Media** | 7 | PPC Strategist, Ad Creative Strategist, Programmatic Buyer, Tracking Specialist |
|
|
126
|
+
| **Support** | 6 | Support Responder, Analytics Reporter, Study Abroad Advisor, Trend Researcher |
|
|
127
|
+
| **Product** | 5 | Product Manager, Sprint Prioritizer, UX Researcher, Experiment Tracker |
|
|
128
|
+
| **Academic** | 5 | Anthropologist, Historian, Psychologist, Geographer, Narratologist |
|
|
129
|
+
| **And more...** | 94+ | Consensus, Swarm Coordination, Neural, SPARC, Architecture, DevOps, Testing |
|
|
130
|
+
|
|
131
|
+
### Two-Stage LLM Routing
|
|
132
|
+
|
|
133
|
+
Monomind doesn't guess which agent to use — it **asks an LLM**.
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
Stage 1: "This task is about SEO optimization" → marketing domain
|
|
137
|
+
Stage 2: "Best fit in marketing: SEO Specialist" → spawns SEO Specialist
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Runs in under 2 seconds via Haiku. Falls back to keyword scoring if the API is unavailable.
|
|
141
|
+
|
|
142
|
+
### Swarm Orchestration
|
|
143
|
+
|
|
144
|
+
Coordinate multiple agents working on the same problem:
|
|
145
|
+
|
|
146
|
+
| Topology | Best For |
|
|
147
|
+
|---|---|
|
|
148
|
+
| **Hierarchical** | Feature development — coordinator delegates to specialists |
|
|
149
|
+
| **Mesh** | Research — all agents share findings peer-to-peer |
|
|
150
|
+
| **Hierarchical-Mesh** | Complex projects — structured delegation with cross-talk |
|
|
151
|
+
| **Adaptive** | Unknown complexity — topology evolves based on task |
|
|
152
|
+
|
|
153
|
+
**Consensus protocols:** Raft (leader-based), Byzantine (fault-tolerant), Gossip (eventually consistent), CRDT (conflict-free), Quorum (majority vote).
|
|
154
|
+
|
|
155
|
+
<p align="center">
|
|
156
|
+
<img src="assets/swarm-topology.png" alt="Swarm Topology" width="60%" />
|
|
157
|
+
</p>
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
# Let Monomind pick the best topology
|
|
161
|
+
/mastermind
|
|
162
|
+
|
|
163
|
+
# Or configure manually
|
|
164
|
+
monomind swarm init --topology hierarchical --agents 8 --strategy specialized
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Self-Learning Memory
|
|
168
|
+
|
|
169
|
+
Every interaction makes Monomind smarter:
|
|
170
|
+
|
|
171
|
+
- **AgentDB** — Persistent vector memory with HNSW indexing (150x-12,500x faster search)
|
|
172
|
+
- **Knowledge Graph** — Full dependency mapping of your codebase via Graphify
|
|
173
|
+
- **Session Continuity** — Pick up exactly where you left off across sessions
|
|
174
|
+
- **Neural Patterns** — SONA learning adapts routing and agent behavior over time
|
|
175
|
+
- **Memory Palace** — Visual dashboard for exploring stored knowledge
|
|
176
|
+
|
|
177
|
+
<p align="center">
|
|
178
|
+
<img src="assets/memory-palace.png" alt="Memory Palace — Browse memories, sessions, knowledge, and swarms" width="100%" />
|
|
179
|
+
</p>
|
|
180
|
+
|
|
181
|
+
### 17 Hooks + 12 Background Workers
|
|
182
|
+
|
|
183
|
+
Monomind hooks into every phase of your Claude Code workflow:
|
|
184
|
+
|
|
185
|
+
| Hook | What It Does |
|
|
186
|
+
|---|---|
|
|
187
|
+
| `pre-task` | Routes to the best agent before execution starts |
|
|
188
|
+
| `post-task` | Learns from outcomes, updates neural patterns |
|
|
189
|
+
| `pre-edit` | Validates changes against project conventions |
|
|
190
|
+
| `post-edit` | Indexes new code into the knowledge graph |
|
|
191
|
+
| `session-start` | Restores context, preloads relevant memory |
|
|
192
|
+
| `session-end` | Persists learnings, updates metrics |
|
|
193
|
+
|
|
194
|
+
**Background workers** handle: optimization, consolidation, prediction, auditing, documentation, refactoring, benchmarking, and test gap analysis — all running autonomously.
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## Agent Catalog
|
|
199
|
+
|
|
200
|
+
### Development
|
|
201
|
+
|
|
202
|
+
| Agent | Specialty |
|
|
203
|
+
|---|---|
|
|
204
|
+
| `coder` | General implementation with TDD |
|
|
205
|
+
| `backend-dev` | APIs, databases, server-side logic |
|
|
206
|
+
| `Frontend Developer` | React, Vue, Angular, CSS systems |
|
|
207
|
+
| `mobile-dev` | React Native, iOS, Android |
|
|
208
|
+
| `Rapid Prototyper` | Fast MVPs and proof-of-concepts |
|
|
209
|
+
| `Solidity Smart Contract Engineer` | EVM, DeFi, gas optimization |
|
|
210
|
+
| `WeChat Mini Program Developer` | WXML/WXSS, WeChat ecosystem |
|
|
211
|
+
| `Embedded Firmware Engineer` | ESP32, ARM Cortex-M, FreeRTOS |
|
|
212
|
+
| `visionOS Spatial Engineer` | SwiftUI volumetric, Liquid Glass |
|
|
213
|
+
|
|
214
|
+
### Architecture & Quality
|
|
215
|
+
|
|
216
|
+
| Agent | Specialty |
|
|
217
|
+
|---|---|
|
|
218
|
+
| `Software Architect` | System design, DDD, architectural patterns |
|
|
219
|
+
| `Code Reviewer` | Correctness, security, performance review |
|
|
220
|
+
| `Security Engineer` | Threat modeling, vulnerability assessment |
|
|
221
|
+
| `Database Optimizer` | Schema design, query tuning, indexing |
|
|
222
|
+
| `SRE` | SLOs, error budgets, chaos engineering |
|
|
223
|
+
|
|
224
|
+
### Marketing & Growth
|
|
225
|
+
|
|
226
|
+
| Agent | Specialty |
|
|
227
|
+
|---|---|
|
|
228
|
+
| `SEO Specialist` | Technical SEO, content optimization |
|
|
229
|
+
| `TikTok Strategist` | Viral content, algorithm optimization |
|
|
230
|
+
| `LinkedIn Content Creator` | Thought leadership, professional content |
|
|
231
|
+
| `Growth Hacker` | Viral loops, conversion funnels |
|
|
232
|
+
| `Content Creator` | Multi-platform editorial calendars |
|
|
233
|
+
|
|
234
|
+
### Game Development
|
|
235
|
+
|
|
236
|
+
| Agent | Specialty |
|
|
237
|
+
|---|---|
|
|
238
|
+
| `Unity Architect` | ScriptableObjects, modular systems |
|
|
239
|
+
| `Unreal Systems Engineer` | C++/Blueprint, Nanite, Lumen |
|
|
240
|
+
| `Godot Gameplay Scripter` | GDScript 2.0, signal architecture |
|
|
241
|
+
| `Roblox Systems Scripter` | Luau, client-server, DataStore |
|
|
242
|
+
|
|
243
|
+
[See all 230 agents →](.claude/agents/)
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## Swarm Orchestration
|
|
248
|
+
|
|
249
|
+
### How Swarms Work
|
|
250
|
+
|
|
251
|
+
<p align="center">
|
|
252
|
+
<img src="assets/swarm-inspector.png" alt="Swarm Inspector — topology graph, agent roles, and communication logs" width="100%" />
|
|
253
|
+
</p>
|
|
254
|
+
|
|
255
|
+
```
|
|
256
|
+
/mastermind "implement authentication system with OAuth2, JWT, and role-based access"
|
|
257
|
+
|
|
258
|
+
Monomind recommends: Hierarchical swarm, 6 agents, Raft consensus
|
|
259
|
+
|
|
260
|
+
Queen Coordinator
|
|
261
|
+
├── Software Architect → designs auth architecture
|
|
262
|
+
├── backend-dev → implements OAuth2 flow
|
|
263
|
+
├── backend-dev → implements JWT + RBAC
|
|
264
|
+
├── Security Engineer → audits for vulnerabilities
|
|
265
|
+
├── tester → writes auth test suite
|
|
266
|
+
└── Code Reviewer → reviews everything before merge
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
### Anti-Drift Protection
|
|
270
|
+
|
|
271
|
+
Swarms don't just run — they **stay on track**:
|
|
272
|
+
|
|
273
|
+
- **Raft consensus** — Leader maintains authoritative state, prevents conflicting changes
|
|
274
|
+
- **Frequent checkpoints** — `post-task` hooks validate progress after every step
|
|
275
|
+
- **Shared memory namespace** — All agents in a swarm see the same context
|
|
276
|
+
- **Review cycles** — Code reviewer validates before any task is marked done
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## Commands
|
|
281
|
+
|
|
282
|
+
### Slash Commands (Inside Claude Code)
|
|
283
|
+
|
|
284
|
+
| Command | What It Does |
|
|
285
|
+
|---|---|
|
|
286
|
+
| `/monomind:createtask <spec>` | Ingests a prompt, file, or folder → generates full implementation plan → creates self-contained tasks on monotask |
|
|
287
|
+
| `/monomind:idea <prompt>` | Research swarm generates ideas → PM evaluates → architect decomposes into tasks |
|
|
288
|
+
| `/monomind:do` | Picks up tasks, executes with assigned agents, reviews, fixes bugs, loops |
|
|
289
|
+
| `/mastermind` | Analyzes your task and recommends the optimal swarm topology |
|
|
290
|
+
| `/specialagent <task>` | Two-stage LLM routing to find the perfect specialist agent |
|
|
291
|
+
|
|
292
|
+
### CLI Commands
|
|
293
|
+
|
|
294
|
+
```bash
|
|
295
|
+
monomind agent spawn --type coder # Spawn a specific agent
|
|
296
|
+
monomind agent list # List running agents
|
|
297
|
+
monomind swarm init # Initialize a swarm
|
|
298
|
+
monomind memory search "auth patterns" # Search vector memory
|
|
299
|
+
monomind hooks route --task "fix bug" # Route to best agent
|
|
300
|
+
monomind doctor --fix # Diagnose and fix issues
|
|
301
|
+
monomind daemon start # Start background workers
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
41 CLI commands across: agent management, swarm coordination, memory, sessions, hooks, neural training, security, performance profiling, and more.
|
|
305
|
+
|
|
306
|
+
### Session Inspector
|
|
307
|
+
|
|
308
|
+
Every session is recorded and browsable — tool calls, agent spawns, memory operations, and full conversation replay:
|
|
309
|
+
|
|
310
|
+
<p align="center">
|
|
311
|
+
<img src="assets/session-detail.png" alt="Session Inspector — full conversation replay with tool breakdown" width="100%" />
|
|
312
|
+
</p>
|
|
313
|
+
|
|
314
|
+
---
|
|
315
|
+
|
|
316
|
+
## Memory & Intelligence
|
|
317
|
+
|
|
318
|
+
### Knowledge Graph (Monograph)
|
|
319
|
+
|
|
320
|
+
Monomind builds a full dependency graph of your codebase — automatically queried before every task:
|
|
321
|
+
|
|
322
|
+
```bash
|
|
323
|
+
# What files are relevant to my task?
|
|
324
|
+
monograph_suggest "add webhook retry logic"
|
|
325
|
+
# → returns ranked list of files with relevance scores
|
|
326
|
+
|
|
327
|
+
# What depends on UserService?
|
|
328
|
+
monograph_query "UserService dependencies"
|
|
329
|
+
# → returns file paths + line numbers
|
|
330
|
+
|
|
331
|
+
# Find the most connected files in the codebase
|
|
332
|
+
monograph_god_nodes
|
|
333
|
+
# → returns high-centrality internal files (external/test filtered out)
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
All monograph tools are called automatically by hooks and slash commands — you don't need to invoke them manually.
|
|
337
|
+
|
|
338
|
+
### Vector Memory (AgentDB + HNSW)
|
|
339
|
+
|
|
340
|
+
Every insight, pattern, and decision is stored in searchable vector memory:
|
|
341
|
+
|
|
342
|
+
- **150x-12,500x faster** than brute-force search via HNSW indexing
|
|
343
|
+
- **Hybrid backend** — SQLite for structured data, AgentDB for semantic search
|
|
344
|
+
- **Cross-session persistence** — context survives restarts
|
|
345
|
+
|
|
346
|
+
### Neural Learning (SONA)
|
|
347
|
+
|
|
348
|
+
Self-Optimizing Neural Adaptation learns from every task:
|
|
349
|
+
|
|
350
|
+
- Pattern recognition improves agent routing over time
|
|
351
|
+
- Trajectory tracking identifies what works and what doesn't
|
|
352
|
+
- Automatic model adaptation with <0.05ms overhead
|
|
353
|
+
|
|
354
|
+
---
|
|
355
|
+
|
|
356
|
+
## Architecture
|
|
357
|
+
|
|
358
|
+
```
|
|
359
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
360
|
+
│ Monomind │
|
|
361
|
+
├──────────────┬──────────────┬──────────────┬───────────────┤
|
|
362
|
+
│ 230+ Agents │ Swarm Engine │ Memory Layer │ Intelligence │
|
|
363
|
+
│ │ │ │ │
|
|
364
|
+
│ Specialized │ Hierarchical │ AgentDB │ SONA Neural │
|
|
365
|
+
│ agent defs │ Mesh/Raft │ HNSW Vector │ Pattern │
|
|
366
|
+
│ + routing │ consensus │ Knowledge │ Learning │
|
|
367
|
+
│ │ │ Graph │ │
|
|
368
|
+
├──────────────┴──────────────┴──────────────┴───────────────┤
|
|
369
|
+
│ 17 Hooks + 12 Workers │
|
|
370
|
+
├─────────────────────────────────────────────────────────────┤
|
|
371
|
+
│ MCP Server (stdio/http/websocket) │
|
|
372
|
+
├─────────────────────────────────────────────────────────────┤
|
|
373
|
+
│ Claude Code Runtime │
|
|
374
|
+
└─────────────────────────────────────────────────────────────┘
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
### Key Packages
|
|
378
|
+
|
|
379
|
+
| Package | Purpose |
|
|
380
|
+
|---|---|
|
|
381
|
+
| `@monomind/cli` | 41 commands, agent definitions, slash commands, hooks, MCP server |
|
|
382
|
+
| `@monomind/memory` | AgentDB with HNSW vector search |
|
|
383
|
+
| `@monomind/hooks` | 17 lifecycle hooks + 12 background workers |
|
|
384
|
+
| `@monomind/security` | Input validation, CVE remediation |
|
|
385
|
+
| `@monomind/guidance` | Governance control plane |
|
|
386
|
+
|
|
387
|
+
---
|
|
388
|
+
|
|
389
|
+
## Performance
|
|
390
|
+
|
|
391
|
+
| Metric | Result |
|
|
392
|
+
|---|---|
|
|
393
|
+
| Agent routing | <2s (LLM) / <5ms (keyword fallback) |
|
|
394
|
+
| Vector search | 150x-12,500x faster (HNSW) |
|
|
395
|
+
| SONA learning | <0.05ms per adaptation |
|
|
396
|
+
| Session restore | <500ms cold start |
|
|
397
|
+
| Memory reduction | 50-75% vs baseline |
|
|
398
|
+
|
|
399
|
+
---
|
|
400
|
+
|
|
401
|
+
## Who Uses Monomind?
|
|
402
|
+
|
|
403
|
+
Monomind is built for teams and individuals who use Claude Code for serious engineering work:
|
|
404
|
+
|
|
405
|
+
- **Solo developers** who want the power of a full engineering team
|
|
406
|
+
- **Startups** shipping features faster with autonomous agent pipelines
|
|
407
|
+
- **Enterprise teams** coordinating complex multi-module changes
|
|
408
|
+
- **Game studios** using specialized Unity/Unreal/Godot agents
|
|
409
|
+
- **Marketing teams** running content operations with domain-specific agents
|
|
410
|
+
- **Security teams** automating audit and compliance workflows
|
|
411
|
+
|
|
412
|
+
---
|
|
413
|
+
|
|
414
|
+
## Contributing
|
|
415
|
+
|
|
416
|
+
```bash
|
|
417
|
+
git clone https://github.com/nokhodian/monomind.git
|
|
418
|
+
cd monomind
|
|
419
|
+
pnpm install
|
|
420
|
+
monomind doctor --fix
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
424
|
+
|
|
425
|
+
---
|
|
426
|
+
|
|
427
|
+
## License
|
|
428
|
+
|
|
429
|
+
MIT License — See [LICENSE](LICENSE) for details.
|
|
430
|
+
|
|
431
|
+
---
|
|
432
|
+
|
|
433
|
+
<p align="center">
|
|
434
|
+
<strong>Stop prompting. Start orchestrating.</strong>
|
|
435
|
+
</p>
|
|
436
|
+
|
|
437
|
+
<p align="center">
|
|
438
|
+
<a href="https://www.npmjs.com/package/monomind">npm</a> •
|
|
439
|
+
<a href="https://github.com/nokhodian/monomind">GitHub</a> •
|
|
440
|
+
<a href="https://github.com/nokhodian/monomind/issues">Issues</a>
|
|
441
|
+
</p>
|
|
@@ -4,35 +4,81 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Monomind Command Line Interface
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* MCP mode requires explicit `mcp start` subcommand or MONOMIND_MCP_AUTODETECT=1.
|
|
8
|
+
* Usage: npx @monomind/cli mcp start
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import { randomUUID } from 'crypto';
|
|
12
12
|
|
|
13
|
-
// Check if we should run in MCP server mode
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
//
|
|
13
|
+
// Check if we should run in MCP server mode.
|
|
14
|
+
// SECURITY: only accept explicit `mcp start` plus piped stdin, OR the explicit
|
|
15
|
+
// `MONOMIND_MCP_AUTODETECT=1` opt-in for the legacy "no args + non-TTY" path.
|
|
16
|
+
// Previously any `monomind` invocation with redirected stdin (CI pipes, xargs,
|
|
17
|
+
// editor integrations) silently flipped into MCP server mode and accepted
|
|
18
|
+
// JSON-RPC tools/call — privilege escalation by environment.
|
|
17
19
|
const cliArgs = process.argv.slice(2);
|
|
18
20
|
const isExplicitMCP = cliArgs.length >= 1 && cliArgs[0] === 'mcp' && (cliArgs.length === 1 || cliArgs[1] === 'start');
|
|
19
|
-
const
|
|
21
|
+
const allowAutoDetect = process.env.MONOMIND_MCP_AUTODETECT === '1';
|
|
22
|
+
const isMCPMode = !process.stdin.isTTY && (isExplicitMCP || (allowAutoDetect && process.argv.length === 2));
|
|
20
23
|
|
|
21
24
|
if (isMCPMode) {
|
|
22
25
|
// Run MCP server mode
|
|
23
26
|
const { listMCPTools, callMCPTool, hasTool } = await import('../dist/src/mcp-client.js');
|
|
24
27
|
|
|
25
|
-
|
|
28
|
+
// Read version from package.json instead of hardcoding (prevents stale
|
|
29
|
+
// version drift between bin entry and the published package).
|
|
30
|
+
let VERSION = '0.0.0';
|
|
31
|
+
try {
|
|
32
|
+
const { readFileSync } = await import('fs');
|
|
33
|
+
const { fileURLToPath } = await import('url');
|
|
34
|
+
const { dirname, join } = await import('path');
|
|
35
|
+
const pkgPath = join(dirname(fileURLToPath(import.meta.url)), '..', 'package.json');
|
|
36
|
+
const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));
|
|
37
|
+
if (typeof pkg.version === 'string') VERSION = pkg.version;
|
|
38
|
+
} catch { /* fall back to 0.0.0 */ }
|
|
26
39
|
const sessionId = `mcp-${Date.now()}-${randomUUID().slice(0, 8)}`;
|
|
27
40
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
)
|
|
41
|
+
// Don't leak nodeVersion/platform/arch/pid to stderr by default; gate behind
|
|
42
|
+
// MONOMIND_LOG_LEVEL=debug to reduce fingerprinting in shared log aggregators.
|
|
43
|
+
if (process.env.MONOMIND_LOG_LEVEL === 'debug') {
|
|
44
|
+
console.error(
|
|
45
|
+
`[${new Date().toISOString()}] INFO [monomind-mcp] (${sessionId}) Starting in stdio mode (node=${process.version} platform=${process.platform} arch=${process.arch})`
|
|
46
|
+
);
|
|
47
|
+
} else {
|
|
48
|
+
console.error(
|
|
49
|
+
`[${new Date().toISOString()}] INFO [monomind-mcp] (${sessionId}) Starting in stdio mode`
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Top-level safety nets — without these, an unhandled async error in a tool
|
|
54
|
+
// handler crashes the process with no observable cleanup.
|
|
55
|
+
process.on('uncaughtException', (err) => {
|
|
56
|
+
console.error(`[${new Date().toISOString()}] FATAL [monomind-mcp] uncaughtException: ${err && err.message ? err.message : String(err)}`);
|
|
57
|
+
process.exit(1);
|
|
58
|
+
});
|
|
59
|
+
process.on('unhandledRejection', (reason) => {
|
|
60
|
+
const msg = reason instanceof Error ? reason.message : String(reason);
|
|
61
|
+
console.error(`[${new Date().toISOString()}] FATAL [monomind-mcp] unhandledRejection: ${msg}`);
|
|
62
|
+
process.exit(1);
|
|
63
|
+
});
|
|
64
|
+
const shutdown = (sig) => {
|
|
65
|
+
console.error(`[${new Date().toISOString()}] INFO [monomind-mcp] (${sessionId}) ${sig} received, shutting down`);
|
|
66
|
+
process.exit(0);
|
|
67
|
+
};
|
|
68
|
+
process.on('SIGINT', () => shutdown('SIGINT'));
|
|
69
|
+
process.on('SIGTERM', () => shutdown('SIGTERM'));
|
|
31
70
|
|
|
71
|
+
// Cap on accumulated input buffer so a peer pumping a single multi-GB line
|
|
72
|
+
// (or a slow trickle without newlines) cannot OOM-kill the process.
|
|
73
|
+
const MAX_BUFFER_BYTES = 10 * 1024 * 1024;
|
|
32
74
|
let buffer = '';
|
|
33
75
|
process.stdin.setEncoding('utf8');
|
|
34
76
|
process.stdin.on('data', async (chunk) => {
|
|
35
77
|
buffer += chunk;
|
|
78
|
+
if (buffer.length > MAX_BUFFER_BYTES) {
|
|
79
|
+
console.error(`[${new Date().toISOString()}] FATAL [monomind-mcp] input exceeds ${MAX_BUFFER_BYTES} bytes`);
|
|
80
|
+
process.exit(1);
|
|
81
|
+
}
|
|
36
82
|
let lines = buffer.split('\n');
|
|
37
83
|
buffer = lines.pop() || '';
|
|
38
84
|
|
|
@@ -146,11 +192,30 @@ if (isMCPMode) {
|
|
|
146
192
|
}
|
|
147
193
|
}
|
|
148
194
|
} else {
|
|
149
|
-
// Run normal CLI mode
|
|
195
|
+
// Run normal CLI mode.
|
|
196
|
+
// Install top-level handlers so an asynchronous error fired from an event-
|
|
197
|
+
// loop callback does not bypass the synchronous .catch below. Default Node
|
|
198
|
+
// handler prints the full stack to stderr — which on this codebase includes
|
|
199
|
+
// attacker-influenced bytes from registry/config error messages and full
|
|
200
|
+
// filesystem paths. Sanitize before logging and exit non-zero.
|
|
201
|
+
const safeMsg = (m) =>
|
|
202
|
+
String(m == null ? '' : m).replace(/[\x00-\x1f\x7f-\x9f]/g, '?').slice(0, 1000);
|
|
203
|
+
process.on('uncaughtException', (err) => {
|
|
204
|
+
console.error(`[${new Date().toISOString()}] FATAL [monomind] uncaughtException: ${safeMsg(err && err.message)}`);
|
|
205
|
+
if (process.env.DEBUG) console.error(err && err.stack);
|
|
206
|
+
process.exit(1);
|
|
207
|
+
});
|
|
208
|
+
process.on('unhandledRejection', (reason) => {
|
|
209
|
+
const msg = reason instanceof Error ? reason.message : String(reason);
|
|
210
|
+
console.error(`[${new Date().toISOString()}] FATAL [monomind] unhandledRejection: ${safeMsg(msg)}`);
|
|
211
|
+
if (process.env.DEBUG && reason instanceof Error) console.error(reason.stack);
|
|
212
|
+
process.exit(1);
|
|
213
|
+
});
|
|
214
|
+
|
|
150
215
|
const { CLI } = await import('../dist/src/index.js');
|
|
151
216
|
const cli = new CLI();
|
|
152
217
|
cli.run().catch((error) => {
|
|
153
|
-
console.error('Fatal error:', error.message);
|
|
218
|
+
console.error('Fatal error:', safeMsg(error && error.message));
|
|
154
219
|
process.exit(1);
|
|
155
220
|
});
|
|
156
221
|
}
|
|
File without changes
|
|
@@ -6,14 +6,23 @@
|
|
|
6
6
|
* can query whether a halt has been issued.
|
|
7
7
|
*/
|
|
8
8
|
import { randomUUID } from 'crypto';
|
|
9
|
-
import { existsSync, mkdirSync, appendFileSync, readFileSync } from 'fs';
|
|
10
|
-
import { join, dirname } from 'path';
|
|
11
|
-
const
|
|
9
|
+
import { existsSync, mkdirSync, appendFileSync, readFileSync, statSync } from 'fs';
|
|
10
|
+
import { join, dirname, resolve, sep } from 'path';
|
|
11
|
+
const ALLOWED_ROOT = () => resolve(process.env.MONOMIND_DATA_DIR ?? process.cwd());
|
|
12
|
+
const DEFAULT_FILE = () => join(ALLOWED_ROOT(), 'data', 'halt-signals.jsonl');
|
|
13
|
+
function safeHaltFilePath(filePath) {
|
|
14
|
+
const allowedRoot = ALLOWED_ROOT();
|
|
15
|
+
const resolved = resolve(filePath);
|
|
16
|
+
if (resolved !== allowedRoot && !resolved.startsWith(allowedRoot + sep)) {
|
|
17
|
+
throw new Error(`Halt signal file path escapes allowed directory: ${filePath}`);
|
|
18
|
+
}
|
|
19
|
+
return resolved;
|
|
20
|
+
}
|
|
12
21
|
/**
|
|
13
22
|
* Broadcast a halt signal for a swarm.
|
|
14
23
|
*/
|
|
15
24
|
export function broadcast(swarmId, sourceAgentId, reason, filePath) {
|
|
16
|
-
const target = filePath
|
|
25
|
+
const target = filePath ? safeHaltFilePath(filePath) : DEFAULT_FILE();
|
|
17
26
|
const dir = dirname(target);
|
|
18
27
|
if (!existsSync(dir)) {
|
|
19
28
|
mkdirSync(dir, { recursive: true });
|
|
@@ -32,10 +41,22 @@ export function broadcast(swarmId, sourceAgentId, reason, filePath) {
|
|
|
32
41
|
* Check whether any halt signal exists for the given swarm.
|
|
33
42
|
*/
|
|
34
43
|
export function isHalted(swarmId, filePath) {
|
|
35
|
-
const target = filePath
|
|
44
|
+
const target = filePath ? safeHaltFilePath(filePath) : DEFAULT_FILE();
|
|
36
45
|
if (!existsSync(target)) {
|
|
37
46
|
return false;
|
|
38
47
|
}
|
|
48
|
+
// Size cap. isHalted is on the swarm-coordination hot path; without this
|
|
49
|
+
// cap a planted multi-GB file (or unbounded broadcast accumulation over
|
|
50
|
+
// weeks) reliably OOMs the CLI on the next call. Treat oversized halt
|
|
51
|
+
// logs as "no halt" — fail-safe in the swarm-termination flow.
|
|
52
|
+
try {
|
|
53
|
+
const stat = statSync(target);
|
|
54
|
+
if (stat.size > 10 * 1024 * 1024)
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
catch {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
39
60
|
const raw = readFileSync(target, 'utf-8').trim();
|
|
40
61
|
if (!raw)
|
|
41
62
|
return false;
|
|
@@ -43,8 +64,13 @@ export function isHalted(swarmId, filePath) {
|
|
|
43
64
|
.split('\n')
|
|
44
65
|
.filter(Boolean)
|
|
45
66
|
.some((line) => {
|
|
46
|
-
|
|
47
|
-
|
|
67
|
+
try {
|
|
68
|
+
const rec = JSON.parse(line);
|
|
69
|
+
return rec.swarmId === swarmId;
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
48
74
|
});
|
|
49
75
|
}
|
|
50
76
|
//# sourceMappingURL=halt-signal.js.map
|
|
@@ -8,10 +8,13 @@ export async function spawnAndAwait(agentSlug, task, runner, options = {}) {
|
|
|
8
8
|
const startedAt = Date.now();
|
|
9
9
|
const taskId = `managed-${Date.now().toString(36)}-${randomBytes(4).toString('hex')}`;
|
|
10
10
|
try {
|
|
11
|
+
let timeoutHandle;
|
|
11
12
|
const output = await Promise.race([
|
|
12
13
|
runner(agentSlug, taskId, task),
|
|
13
|
-
new Promise((_, reject) =>
|
|
14
|
-
|
|
14
|
+
new Promise((_, reject) => {
|
|
15
|
+
timeoutHandle = setTimeout(() => reject(new Error(`Timeout after ${timeoutMs}ms`)), timeoutMs);
|
|
16
|
+
}),
|
|
17
|
+
]).finally(() => clearTimeout(timeoutHandle));
|
|
15
18
|
return {
|
|
16
19
|
agentSlug, taskId, output, status: 'success',
|
|
17
20
|
durationMs: Date.now() - startedAt,
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* routes to the candidate or control version. Falls back to the active version
|
|
6
6
|
* when no experiment is running.
|
|
7
7
|
*
|
|
8
|
-
* @module @
|
|
8
|
+
* @module @monomind/cli/agents/prompt-experiment
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
type PromptVersionStore = any;
|
|
11
11
|
export interface ResolvedPrompt {
|
|
12
12
|
prompt: string;
|
|
13
13
|
version: string;
|
|
@@ -19,4 +19,5 @@ export declare class PromptExperimentRouter {
|
|
|
19
19
|
constructor(store: PromptVersionStore);
|
|
20
20
|
resolvePromptForSpawn(agentSlug: string): ResolvedPrompt;
|
|
21
21
|
}
|
|
22
|
+
export {};
|
|
22
23
|
//# sourceMappingURL=prompt-experiment.d.ts.map
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* routes to the candidate or control version. Falls back to the active version
|
|
6
6
|
* when no experiment is running.
|
|
7
7
|
*
|
|
8
|
-
* @module @
|
|
8
|
+
* @module @monomind/cli/agents/prompt-experiment
|
|
9
9
|
*/
|
|
10
10
|
export class PromptExperimentRouter {
|
|
11
11
|
store;
|