@monoes/monomindcli 2.16.2 → 2.16.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/architecture/system-design/arch-system-design.md +4 -1
- package/.claude/agents/consensus/quorum-manager.md +3 -0
- package/.claude/agents/consensus/security-manager.md +4 -1
- package/.claude/agents/core/coder.md +4 -1
- package/.claude/agents/core/coordinator.md +3 -0
- package/.claude/agents/core/planner.md +4 -1
- package/.claude/agents/core/researcher.md +4 -1
- package/.claude/agents/core/reviewer.md +4 -1
- package/.claude/agents/core/tester.md +4 -1
- package/.claude/agents/design/design-monodesign.md +4 -1
- package/.claude/agents/engineering/engineering-ai-data-remediation-engineer.md +4 -1
- package/.claude/agents/engineering/engineering-ai-engineer.md +4 -1
- package/.claude/agents/engineering/engineering-autonomous-optimization-architect.md +3 -0
- package/.claude/agents/engineering/engineering-backend-architect.md +4 -1
- package/.claude/agents/engineering/engineering-code-reviewer.md +5 -0
- package/.claude/agents/engineering/engineering-data-engineer.md +4 -1
- package/.claude/agents/engineering/engineering-database-optimizer.md +4 -1
- package/.claude/agents/engineering/engineering-devops-automator.md +3 -0
- package/.claude/agents/engineering/engineering-embedded-firmware-engineer.md +3 -0
- package/.claude/agents/engineering/engineering-feishu-integration-developer.md +4 -1
- package/.claude/agents/engineering/engineering-frontend-developer.md +3 -0
- package/.claude/agents/engineering/engineering-git-workflow-master.md +4 -1
- package/.claude/agents/engineering/engineering-incident-response-commander.md +4 -1
- package/.claude/agents/engineering/engineering-mobile-app-builder.md +3 -0
- package/.claude/agents/engineering/engineering-rapid-prototyper.md +3 -0
- package/.claude/agents/engineering/engineering-security-engineer.md +4 -1
- package/.claude/agents/engineering/engineering-senior-developer.md +3 -0
- package/.claude/agents/engineering/engineering-software-architect.md +4 -1
- package/.claude/agents/engineering/engineering-solidity-smart-contract-engineer.md +4 -1
- package/.claude/agents/engineering/engineering-sre.md +3 -0
- package/.claude/agents/engineering/engineering-technical-writer.md +4 -1
- package/.claude/agents/engineering/engineering-threat-detection-engineer.md +4 -1
- package/.claude/agents/engineering/engineering-wechat-mini-program-developer.md +4 -1
- package/.claude/agents/github/github-modes.md +4 -2
- package/.claude/agents/github/issue-tracker.md +4 -2
- package/.claude/agents/github/monoswarm-code-review.md +4 -2
- package/.claude/agents/github/monoswarm-issue.md +5 -0
- package/.claude/agents/github/monoswarm-multi-repo.md +4 -1
- package/.claude/agents/github/monoswarm-pr.md +5 -0
- package/.claude/agents/github/pr-manager.md +4 -2
- package/.claude/agents/github/project-board-sync.md +4 -2
- package/.claude/agents/github/release-manager.md +4 -2
- package/.claude/agents/github/repo-architect.md +4 -2
- package/.claude/agents/github/sync-coordinator.md +4 -2
- package/.claude/agents/github/workflow-automation.md +4 -2
- package/.claude/agents/goal/goal-planner.md +16 -2
- package/.claude/agents/marketing/marketing-competitive-content.md +4 -1
- package/.claude/agents/marketing/marketing-cro-specialist.md +4 -1
- package/.claude/agents/marketing/marketing-email-specialist.md +4 -1
- package/.claude/agents/marketing/marketing-launch-strategist.md +4 -1
- package/.claude/agents/marketing/marketing-pricing-strategist.md +4 -1
- package/.claude/agents/monoswarm/collective-intelligence-coordinator.md +3 -0
- package/.claude/agents/monoswarm/mesh-coordinator.md +3 -0
- package/.claude/agents/monoswarm/monoswarm-memory-manager.md +4 -2
- package/.claude/agents/monoswarm/scout-explorer.md +4 -2
- package/.claude/agents/monoswarm/worker-specialist.md +3 -0
- package/.claude/agents/optimization/benchmark-suite.md +3 -0
- package/.claude/agents/optimization/load-balancer.md +3 -0
- package/.claude/agents/optimization/performance-monitor.md +3 -0
- package/.claude/agents/optimization/resource-allocator.md +3 -0
- package/.claude/agents/optimization/topology-optimizer.md +3 -0
- package/.claude/agents/specialists/integration-architect.md +4 -2
- package/.claude/agents/specialized/agentic-identity-trust.md +4 -1
- package/.claude/agents/specialized/agents-orchestrator.md +3 -0
- package/.claude/agents/specialized/automation-governance-architect.md +3 -0
- package/.claude/agents/specialized/blockchain-security-auditor.md +4 -1
- package/.claude/agents/specialized/compliance-auditor.md +4 -1
- package/.claude/agents/specialized/identity-graph-operator.md +4 -1
- package/.claude/agents/specialized/lsp-index-engineer.md +3 -0
- package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +5 -0
- package/.claude/agents/specialized/specialized-cultural-intelligence-strategist.md +3 -0
- package/.claude/agents/specialized/specialized-developer-advocate.md +4 -1
- package/.claude/agents/specialized/specialized-document-generator.md +4 -1
- package/.claude/agents/specialized/specialized-mcp-builder.md +3 -0
- package/.claude/agents/specialized/specialized-model-qa.md +4 -1
- package/.claude/agents/specialized/specialized-workflow-architect.md +4 -1
- package/.claude/agents/specialized/zk-steward.md +4 -1
- package/.claude/agents/templates/automation-smart-agent.md +4 -1
- package/.claude/agents/templates/coordinator-monoswarm-init.md +4 -1
- package/.claude/agents/testing/production-validator.md +3 -0
- package/.claude/agents/testing/tdd-london-monoswarm.md +3 -0
- package/.claude/agents/testing/testing-accessibility-auditor.md +4 -1
- package/.claude/agents/testing/testing-api-tester.md +4 -1
- package/.claude/agents/testing/testing-evidence-collector.md +3 -0
- package/.claude/agents/testing/testing-performance-benchmarker.md +4 -1
- package/.claude/agents/testing/testing-test-results-analyzer.md +4 -1
- package/.claude/agents/testing/testing-tool-evaluator.md +4 -1
- package/.claude/agents/testing/testing-workflow-optimizer.md +4 -1
- package/.claude/commands/agents/agent-types.md +7 -5
- package/.claude/commands/mastermind/code-review.md +5 -5
- package/.claude/commands/mastermind/content.md +8 -2
- package/.claude/commands/mastermind/createtask.md +2 -2
- package/.claude/commands/mastermind/do.md +18 -36
- package/.claude/commands/mastermind/finance.md +8 -2
- package/.claude/commands/mastermind/ideate.md +4 -4
- package/.claude/commands/mastermind/improve.md +3 -3
- package/.claude/commands/mastermind/marketing.md +8 -2
- package/.claude/commands/mastermind/master.md +63 -45
- package/.claude/commands/mastermind/monoswarm.md +7 -5
- package/.claude/commands/mastermind/ops.md +8 -2
- package/.claude/commands/mastermind/sales.md +8 -2
- package/.claude/commands/mastermind.md +7 -7
- package/.claude/commands/monoswarm/analysis.md +1 -1
- package/.claude/commands/monoswarm/development.md +1 -1
- package/.claude/commands/monoswarm/maintenance.md +1 -1
- package/.claude/commands/monoswarm/optimization.md +2 -1
- package/.claude/commands/monoswarm/research.md +1 -1
- package/.claude/commands/monoswarm/testing.md +1 -1
- package/.claude/commands/pair/examples.md +3 -2
- package/.claude/commands/pair/modes.md +3 -3
- package/.claude/helpers/build-skill-registry.cjs +186 -26
- package/.claude/helpers/handlers/agent-start-handler.cjs +3 -0
- package/.claude/helpers/handlers/capture-handler.cjs +22 -14
- package/.claude/helpers/handlers/edit-handler.cjs +1 -1
- package/.claude/helpers/handlers/pick-core.cjs +445 -0
- package/.claude/helpers/handlers/route-handler.cjs +81 -180
- package/.claude/helpers/handlers/session-handler.cjs +44 -62
- package/.claude/helpers/handlers/session-restore-handler.cjs +5 -1
- package/.claude/helpers/handlers/task-handler.cjs +11 -6
- package/.claude/helpers/hook-handler.cjs +9 -2
- package/.claude/helpers/jev-catalog.cjs +225 -0
- package/.claude/helpers/jev-picker.cjs +36 -147
- package/.claude/helpers/org-skill-index.cjs +230 -0
- package/.claude/helpers/pick-rank.cjs +221 -0
- package/.claude/helpers/pick-stats.cjs +413 -0
- package/.claude/helpers/router.cjs +7 -379
- package/.claude/helpers/utils/monograph-resolve.cjs +12 -4
- package/.claude/settings.json +51 -41
- package/.claude/skills/hooks-automation/SKILL.md +4 -4
- package/.claude/skills/mastermind-access/SKILL.md +4 -3
- package/.claude/skills/mastermind-activity/SKILL.md +3 -2
- package/.claude/skills/mastermind-adapter-manager/SKILL.md +2 -1
- package/.claude/skills/mastermind-adapters/SKILL.md +2 -1
- package/.claude/skills/mastermind-agent-detail/SKILL.md +5 -4
- package/.claude/skills/mastermind-agent-select/SKILL.md +99 -100
- package/.claude/skills/mastermind-agents/SKILL.md +2 -1
- package/.claude/skills/mastermind-approval-detail/SKILL.md +2 -1
- package/.claude/skills/mastermind-backup/SKILL.md +2 -1
- package/.claude/skills/mastermind-bootstrap/SKILL.md +2 -2
- package/.claude/skills/mastermind-budgets/SKILL.md +4 -3
- package/.claude/skills/mastermind-createorg/SKILL.md +23 -5
- package/.claude/skills/mastermind-delegation/SKILL.md +11 -19
- package/.claude/skills/mastermind-diagnose/SKILL.md +3 -3
- package/.claude/skills/mastermind-env/SKILL.md +2 -1
- package/.claude/skills/mastermind-environments/SKILL.md +2 -1
- package/.claude/skills/mastermind-execute/SKILL.md +1 -1
- package/.claude/skills/mastermind-export/SKILL.md +2 -1
- package/.claude/skills/mastermind-goal-detail/SKILL.md +3 -2
- package/.claude/skills/mastermind-goals/SKILL.md +3 -2
- package/.claude/skills/mastermind-idea/SKILL.md +52 -92
- package/.claude/skills/mastermind-import/SKILL.md +2 -1
- package/.claude/skills/mastermind-inbox/SKILL.md +3 -2
- package/.claude/skills/mastermind-instance/SKILL.md +3 -2
- package/.claude/skills/mastermind-invite-landing/SKILL.md +3 -2
- package/.claude/skills/mastermind-invites/SKILL.md +3 -2
- package/.claude/skills/mastermind-issue-detail/SKILL.md +4 -3
- package/.claude/skills/mastermind-issues/SKILL.md +4 -3
- package/.claude/skills/mastermind-join-queue/SKILL.md +5 -4
- package/.claude/skills/mastermind-liveness/SKILL.md +5 -4
- package/.claude/skills/mastermind-monitor/SKILL.md +15 -15
- package/.claude/skills/mastermind-my-issues/SKILL.md +2 -1
- package/.claude/skills/mastermind-new-agent/SKILL.md +120 -137
- package/.claude/skills/mastermind-org-settings/SKILL.md +6 -5
- package/.claude/skills/mastermind-orgs/SKILL.md +1 -0
- package/.claude/skills/mastermind-orgstatus/SKILL.md +2 -1
- package/.claude/skills/mastermind-plan-to-tasks/SKILL.md +1 -1
- package/.claude/skills/mastermind-plugin-manager/SKILL.md +4 -3
- package/.claude/skills/mastermind-plugin-settings/SKILL.md +5 -4
- package/.claude/skills/mastermind-plugins/SKILL.md +3 -2
- package/.claude/skills/mastermind-profile/SKILL.md +2 -1
- package/.claude/skills/mastermind-protocol/SKILL.md +3 -3
- package/.claude/skills/mastermind-release/SKILL.md +13 -8
- package/.claude/skills/mastermind-research/SKILL.md +10 -8
- package/.claude/skills/mastermind-review/SKILL.md +16 -11
- package/.claude/skills/mastermind-routine-detail/SKILL.md +2 -1
- package/.claude/skills/mastermind-routines/SKILL.md +3 -2
- package/.claude/skills/mastermind-search/SKILL.md +2 -1
- package/.claude/skills/mastermind-secrets/SKILL.md +3 -2
- package/.claude/skills/mastermind-skills/SKILL.md +2 -1
- package/.claude/skills/mastermind-stoporg/SKILL.md +1 -0
- package/.claude/skills/mastermind-tasks/SKILL.md +3 -2
- package/.claude/skills/mastermind-threads/SKILL.md +4 -3
- package/.claude/skills/mastermind-tree-control/SKILL.md +5 -4
- package/.claude/skills/mastermind-workspace-detail/SKILL.md +4 -3
- package/.claude/skills/mastermind-workspaces/SKILL.md +2 -1
- package/.claude/skills/monoswarm/SKILL.md +7 -5
- package/.claude/skills/specialagent/SKILL.md +32 -51
- package/dist/src/agents/registry-builder.d.ts +23 -2
- package/dist/src/agents/registry-builder.d.ts.map +1 -1
- package/dist/src/agents/registry-builder.js +64 -11
- package/dist/src/agents/registry-builder.js.map +1 -1
- package/dist/src/agents/registry-freshness.d.ts +21 -0
- package/dist/src/agents/registry-freshness.d.ts.map +1 -0
- package/dist/src/agents/registry-freshness.js +94 -0
- package/dist/src/agents/registry-freshness.js.map +1 -0
- package/dist/src/commands/agent-lifecycle.d.ts +11 -5
- package/dist/src/commands/agent-lifecycle.d.ts.map +1 -1
- package/dist/src/commands/agent-lifecycle.js +78 -42
- package/dist/src/commands/agent-lifecycle.js.map +1 -1
- package/dist/src/commands/doctor-env-checks.d.ts +18 -3
- package/dist/src/commands/doctor-env-checks.d.ts.map +1 -1
- package/dist/src/commands/doctor-env-checks.js +35 -16
- package/dist/src/commands/doctor-env-checks.js.map +1 -1
- package/dist/src/commands/doctor-fresh-install.d.ts +9 -0
- package/dist/src/commands/doctor-fresh-install.d.ts.map +1 -0
- package/dist/src/commands/doctor-fresh-install.js +43 -0
- package/dist/src/commands/doctor-fresh-install.js.map +1 -0
- package/dist/src/commands/doctor-hook-monograph-checks.d.ts +3 -1
- package/dist/src/commands/doctor-hook-monograph-checks.d.ts.map +1 -1
- package/dist/src/commands/doctor-hook-monograph-checks.js +13 -4
- package/dist/src/commands/doctor-hook-monograph-checks.js.map +1 -1
- package/dist/src/commands/doctor-hook-settings-checks.d.ts +5 -0
- package/dist/src/commands/doctor-hook-settings-checks.d.ts.map +1 -0
- package/dist/src/commands/doctor-hook-settings-checks.js +50 -0
- package/dist/src/commands/doctor-hook-settings-checks.js.map +1 -0
- package/dist/src/commands/doctor-json.d.ts +41 -0
- package/dist/src/commands/doctor-json.d.ts.map +1 -0
- package/dist/src/commands/doctor-json.js +60 -0
- package/dist/src/commands/doctor-json.js.map +1 -0
- package/dist/src/commands/doctor-mode.d.ts +28 -0
- package/dist/src/commands/doctor-mode.d.ts.map +1 -0
- package/dist/src/commands/doctor-mode.js +109 -0
- package/dist/src/commands/doctor-mode.js.map +1 -0
- package/dist/src/commands/doctor-monoes-checks.d.ts.map +1 -1
- package/dist/src/commands/doctor-monoes-checks.js +3 -1
- package/dist/src/commands/doctor-monoes-checks.js.map +1 -1
- package/dist/src/commands/doctor-pick-checks.d.ts +19 -0
- package/dist/src/commands/doctor-pick-checks.d.ts.map +1 -0
- package/dist/src/commands/doctor-pick-checks.js +164 -0
- package/dist/src/commands/doctor-pick-checks.js.map +1 -0
- package/dist/src/commands/doctor-project-checks.d.ts +3 -1
- package/dist/src/commands/doctor-project-checks.d.ts.map +1 -1
- package/dist/src/commands/doctor-project-checks.js +67 -20
- package/dist/src/commands/doctor-project-checks.js.map +1 -1
- package/dist/src/commands/doctor.d.ts.map +1 -1
- package/dist/src/commands/doctor.js +324 -335
- package/dist/src/commands/doctor.js.map +1 -1
- package/dist/src/commands/hooks-coverage-routing.js +1 -1
- package/dist/src/commands/hooks-coverage-routing.js.map +1 -1
- package/dist/src/commands/hooks-coverage-utils.js +1 -1
- package/dist/src/commands/hooks-coverage-utils.js.map +1 -1
- package/dist/src/commands/hooks-routing-commands.js +1 -1
- package/dist/src/commands/init-upgrade.d.ts.map +1 -1
- package/dist/src/commands/init-upgrade.js +4 -0
- package/dist/src/commands/init-upgrade.js.map +1 -1
- package/dist/src/commands/monoswarm.d.ts.map +1 -1
- package/dist/src/commands/monoswarm.js +16 -10
- package/dist/src/commands/monoswarm.js.map +1 -1
- package/dist/src/commands/pick.d.ts.map +1 -1
- package/dist/src/commands/pick.js +66 -16
- package/dist/src/commands/pick.js.map +1 -1
- package/dist/src/commands/route.d.ts +2 -1
- package/dist/src/commands/route.d.ts.map +1 -1
- package/dist/src/commands/route.js +73 -117
- package/dist/src/commands/route.js.map +1 -1
- package/dist/src/decision/catalogs.d.ts +24 -3
- package/dist/src/decision/catalogs.d.ts.map +1 -1
- package/dist/src/decision/catalogs.js +100 -22
- package/dist/src/decision/catalogs.js.map +1 -1
- package/dist/src/decision/jev.d.ts +26 -6
- package/dist/src/decision/jev.d.ts.map +1 -1
- package/dist/src/decision/jev.js +15 -4
- package/dist/src/decision/jev.js.map +1 -1
- package/dist/src/decision/pick-eval.d.ts +67 -0
- package/dist/src/decision/pick-eval.d.ts.map +1 -0
- package/dist/src/decision/pick-eval.js +113 -0
- package/dist/src/decision/pick-eval.js.map +1 -0
- package/dist/src/decision/pick-stats.d.ts +49 -0
- package/dist/src/decision/pick-stats.d.ts.map +1 -0
- package/dist/src/decision/pick-stats.js +68 -0
- package/dist/src/decision/pick-stats.js.map +1 -0
- package/dist/src/decision/picks.d.ts +37 -6
- package/dist/src/decision/picks.d.ts.map +1 -1
- package/dist/src/decision/picks.js +67 -32
- package/dist/src/decision/picks.js.map +1 -1
- package/dist/src/index.d.ts +5 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +43 -22
- package/dist/src/index.js.map +1 -1
- package/dist/src/init/agent-refresh.d.ts +8 -0
- package/dist/src/init/agent-refresh.d.ts.map +1 -0
- package/dist/src/init/agent-refresh.js +89 -0
- package/dist/src/init/agent-refresh.js.map +1 -0
- package/dist/src/init/claudemd-generator.d.ts.map +1 -1
- package/dist/src/init/claudemd-generator.js +27 -9
- package/dist/src/init/claudemd-generator.js.map +1 -1
- package/dist/src/init/helpers-generator.d.ts +4 -1
- package/dist/src/init/helpers-generator.d.ts.map +1 -1
- package/dist/src/init/helpers-generator.js +84 -55
- package/dist/src/init/helpers-generator.js.map +1 -1
- package/dist/src/init/hook-settings.d.ts +57 -0
- package/dist/src/init/hook-settings.d.ts.map +1 -0
- package/dist/src/init/hook-settings.js +133 -0
- package/dist/src/init/hook-settings.js.map +1 -0
- package/dist/src/init/settings-generator.d.ts.map +1 -1
- package/dist/src/init/settings-generator.js +44 -25
- package/dist/src/init/settings-generator.js.map +1 -1
- package/dist/src/init/shared.d.ts +9 -0
- package/dist/src/init/shared.d.ts.map +1 -1
- package/dist/src/init/shared.js +22 -0
- package/dist/src/init/shared.js.map +1 -1
- package/dist/src/init/upgrade.d.ts +4 -0
- package/dist/src/init/upgrade.d.ts.map +1 -1
- package/dist/src/init/upgrade.js +123 -129
- package/dist/src/init/upgrade.js.map +1 -1
- package/dist/src/init/write-capabilities.d.ts.map +1 -1
- package/dist/src/init/write-capabilities.js +10 -33
- package/dist/src/init/write-capabilities.js.map +1 -1
- package/dist/src/init/write-claude.d.ts.map +1 -1
- package/dist/src/init/write-claude.js +5 -2
- package/dist/src/init/write-claude.js.map +1 -1
- package/dist/src/mcp-client.d.ts.map +1 -1
- package/dist/src/mcp-client.js +4 -0
- package/dist/src/mcp-client.js.map +1 -1
- package/dist/src/mcp-tools/agent-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/agent-tools.js +3 -0
- package/dist/src/mcp-tools/agent-tools.js.map +1 -1
- package/dist/src/mcp-tools/guidance-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/guidance-tools.js +19 -10
- package/dist/src/mcp-tools/guidance-tools.js.map +1 -1
- package/dist/src/mcp-tools/hooks-embedding.d.ts +1 -32
- package/dist/src/mcp-tools/hooks-embedding.d.ts.map +1 -1
- package/dist/src/mcp-tools/hooks-embedding.js +22 -200
- package/dist/src/mcp-tools/hooks-embedding.js.map +1 -1
- package/dist/src/mcp-tools/hooks-routing.d.ts.map +1 -1
- package/dist/src/mcp-tools/hooks-routing.js +77 -192
- package/dist/src/mcp-tools/hooks-routing.js.map +1 -1
- package/dist/src/mcp-tools/index.d.ts +1 -0
- package/dist/src/mcp-tools/index.d.ts.map +1 -1
- package/dist/src/mcp-tools/index.js +1 -0
- package/dist/src/mcp-tools/index.js.map +1 -1
- package/dist/src/mcp-tools/org-skill-tools.d.ts +4 -0
- package/dist/src/mcp-tools/org-skill-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/org-skill-tools.js +42 -0
- package/dist/src/mcp-tools/org-skill-tools.js.map +1 -0
- package/dist/src/mcp-tools/pick-tools.d.ts +4 -0
- package/dist/src/mcp-tools/pick-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/pick-tools.js +53 -0
- package/dist/src/mcp-tools/pick-tools.js.map +1 -0
- package/dist/src/monovector/coverage-router.d.ts +2 -1
- package/dist/src/monovector/coverage-router.d.ts.map +1 -1
- package/dist/src/monovector/coverage-router.js +6 -5
- package/dist/src/monovector/coverage-router.js.map +1 -1
- package/dist/src/monovector/coverage-tools.js +1 -1
- package/dist/src/monovector/coverage-tools.js.map +1 -1
- package/dist/src/monovector/index.d.ts +1 -1
- package/dist/src/monovector/index.d.ts.map +1 -1
- package/dist/src/monovector/index.js +11 -35
- package/dist/src/monovector/index.js.map +1 -1
- package/dist/src/monovector/route-outcomes.d.ts.map +1 -1
- package/dist/src/monovector/route-outcomes.js +89 -34
- package/dist/src/monovector/route-outcomes.js.map +1 -1
- package/dist/src/orgrt/daemon.d.ts +7 -13
- package/dist/src/orgrt/daemon.d.ts.map +1 -1
- package/dist/src/orgrt/daemon.js +12 -23
- package/dist/src/orgrt/daemon.js.map +1 -1
- package/dist/src/orgrt/decisions.d.ts +3 -8
- package/dist/src/orgrt/decisions.d.ts.map +1 -1
- package/dist/src/orgrt/decisions.js +36 -47
- package/dist/src/orgrt/decisions.js.map +1 -1
- package/dist/src/orgrt/dispatch-hold.d.ts +34 -0
- package/dist/src/orgrt/dispatch-hold.d.ts.map +1 -0
- package/dist/src/orgrt/dispatch-hold.js +75 -0
- package/dist/src/orgrt/dispatch-hold.js.map +1 -0
- package/dist/src/orgrt/runner-registry.d.ts +20 -0
- package/dist/src/orgrt/runner-registry.d.ts.map +1 -1
- package/dist/src/orgrt/runner-registry.js +39 -0
- package/dist/src/orgrt/runner-registry.js.map +1 -1
- package/dist/src/orgrt/sandbox-deny-write.d.ts +11 -1
- package/dist/src/orgrt/sandbox-deny-write.d.ts.map +1 -1
- package/dist/src/orgrt/sandbox-deny-write.js +23 -2
- package/dist/src/orgrt/sandbox-deny-write.js.map +1 -1
- package/dist/src/orgrt/sandbox-fault.d.ts +5 -1
- package/dist/src/orgrt/sandbox-fault.d.ts.map +1 -1
- package/dist/src/orgrt/sandbox-fault.js +14 -2
- package/dist/src/orgrt/sandbox-fault.js.map +1 -1
- package/dist/src/orgrt/session.d.ts +16 -7
- package/dist/src/orgrt/session.d.ts.map +1 -1
- package/dist/src/orgrt/session.js +39 -62
- package/dist/src/orgrt/session.js.map +1 -1
- package/dist/src/orgrt/skill-library.d.ts +4 -0
- package/dist/src/orgrt/skill-library.d.ts.map +1 -1
- package/dist/src/orgrt/skill-library.js +12 -0
- package/dist/src/orgrt/skill-library.js.map +1 -1
- package/dist/src/orgrt/skill-tools.d.ts +11 -0
- package/dist/src/orgrt/skill-tools.d.ts.map +1 -0
- package/dist/src/orgrt/skill-tools.js +40 -0
- package/dist/src/orgrt/skill-tools.js.map +1 -0
- package/dist/src/orgrt/task-cancel.d.ts +64 -0
- package/dist/src/orgrt/task-cancel.d.ts.map +1 -0
- package/dist/src/orgrt/task-cancel.js +134 -0
- package/dist/src/orgrt/task-cancel.js.map +1 -0
- package/dist/src/orgrt/task-dag.d.ts +10 -1
- package/dist/src/orgrt/task-dag.d.ts.map +1 -1
- package/dist/src/orgrt/task-dag.js.map +1 -1
- package/dist/src/orgrt/task-match.d.ts +121 -0
- package/dist/src/orgrt/task-match.d.ts.map +1 -0
- package/dist/src/orgrt/task-match.js +241 -0
- package/dist/src/orgrt/task-match.js.map +1 -0
- package/dist/src/orgrt/task-provenance.d.ts +26 -0
- package/dist/src/orgrt/task-provenance.d.ts.map +1 -0
- package/dist/src/orgrt/task-provenance.js +93 -0
- package/dist/src/orgrt/task-provenance.js.map +1 -0
- package/dist/src/orgrt/task-tools.d.ts +24 -0
- package/dist/src/orgrt/task-tools.d.ts.map +1 -0
- package/dist/src/orgrt/task-tools.js +75 -0
- package/dist/src/orgrt/task-tools.js.map +1 -0
- package/dist/src/output.d.ts +6 -0
- package/dist/src/output.d.ts.map +1 -1
- package/dist/src/output.js +13 -2
- package/dist/src/output.js.map +1 -1
- package/dist/src/protocol-capabilities.d.ts +8 -1
- package/dist/src/protocol-capabilities.d.ts.map +1 -1
- package/dist/src/protocol-capabilities.js +10 -0
- package/dist/src/protocol-capabilities.js.map +1 -1
- package/dist/src/routing/agent-pick.d.ts +44 -0
- package/dist/src/routing/agent-pick.d.ts.map +1 -0
- package/dist/src/routing/agent-pick.js +114 -0
- package/dist/src/routing/agent-pick.js.map +1 -0
- package/dist/src/routing/pick-step.d.ts +26 -0
- package/dist/src/routing/pick-step.d.ts.map +1 -0
- package/dist/src/routing/pick-step.js +40 -0
- package/dist/src/routing/pick-step.js.map +1 -0
- package/dist/src/routing/route-layer-factory.d.ts.map +1 -1
- package/dist/src/routing/route-layer-factory.js +19 -17
- package/dist/src/routing/route-layer-factory.js.map +1 -1
- package/dist/src/utils/resource-governor.d.ts.map +1 -1
- package/dist/src/utils/resource-governor.js +28 -8
- package/dist/src/utils/resource-governor.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/org-skills/SOURCES.md +6 -6
- package/org-skills/TAGS.md +146 -0
- package/org-skills/ab-testing/SKILL.md +2 -2
- package/org-skills/accessibility-compliance/SKILL.md +2 -2
- package/org-skills/account-strategist/SKILL.md +2 -2
- package/org-skills/accounts-payable/SKILL.md +2 -2
- package/org-skills/ad-creative/SKILL.md +2 -2
- package/org-skills/adaptive-coordinator/SKILL.md +2 -2
- package/org-skills/adaptive-coordinator2/SKILL.md +2 -2
- package/org-skills/advanced-evaluation/SKILL.md +2 -2
- package/org-skills/adversarial-reviewer/SKILL.md +2 -2
- package/org-skills/agent-evaluation/SKILL.md +2 -2
- package/org-skills/agent-memory-systems/SKILL.md +2 -2
- package/org-skills/agent-tool-design/SKILL.md +2 -2
- package/org-skills/agile-product-owner/SKILL.md +2 -2
- package/org-skills/ai-citation/SKILL.md +2 -2
- package/org-skills/ai-engineer/SKILL.md +2 -2
- package/org-skills/ai-seo/SKILL.md +2 -2
- package/org-skills/analytics-reporter/SKILL.md +2 -2
- package/org-skills/analytics-tracking/SKILL.md +2 -2
- package/org-skills/android-clean-architecture/SKILL.md +2 -2
- package/org-skills/angular-architect/SKILL.md +2 -2
- package/org-skills/api-design/SKILL.md +2 -2
- package/org-skills/api-designer/SKILL.md +2 -2
- package/org-skills/api-tester/SKILL.md +2 -2
- package/org-skills/app-store-optimization/SKILL.md +2 -2
- package/org-skills/architecture-decision-records/SKILL.md +2 -2
- package/org-skills/architecture-designer/SKILL.md +2 -2
- package/org-skills/architecture-patterns/SKILL.md +2 -2
- package/org-skills/article-writing/SKILL.md +2 -2
- package/org-skills/auth-implementation-patterns/SKILL.md +2 -2
- package/org-skills/automation-governance/SKILL.md +2 -2
- package/org-skills/avoid-ai-writing/SKILL.md +2 -2
- package/org-skills/backend-dev/SKILL.md +2 -2
- package/org-skills/backend-patterns/SKILL.md +2 -2
- package/org-skills/bash-defensive-patterns/SKILL.md +2 -2
- package/org-skills/before-you-build/SKILL.md +2 -2
- package/org-skills/benchmark-methodology/SKILL.md +2 -2
- package/org-skills/benchmarker/SKILL.md +2 -2
- package/org-skills/blockchain-auditor/SKILL.md +2 -2
- package/org-skills/board-deck-builder/SKILL.md +2 -2
- package/org-skills/business-investment-advisor/SKILL.md +2 -2
- package/org-skills/byzantine-coord/SKILL.md +2 -2
- package/org-skills/canvas-design/SKILL.md +2 -2
- package/org-skills/carrier-relationship-management/SKILL.md +2 -2
- package/org-skills/case-analyst/SKILL.md +2 -2
- package/org-skills/ceo-advisor/SKILL.md +2 -2
- package/org-skills/cfo-advisor/SKILL.md +2 -2
- package/org-skills/change-management/SKILL.md +2 -2
- package/org-skills/changelog-automation/SKILL.md +2 -2
- package/org-skills/chro-advisor/SKILL.md +2 -2
- package/org-skills/churn-prevention/SKILL.md +2 -2
- package/org-skills/cicd-engineer/SKILL.md +2 -2
- package/org-skills/ciso-advisor/SKILL.md +2 -2
- package/org-skills/click-path-audit/SKILL.md +2 -2
- package/org-skills/cloud-architect/SKILL.md +2 -2
- package/org-skills/cloud-architecture/SKILL.md +2 -2
- package/org-skills/cmo-advisor/SKILL.md +2 -2
- package/org-skills/co-marketing/SKILL.md +2 -2
- package/org-skills/code-documenter/SKILL.md +2 -2
- package/org-skills/code-review-swarm/SKILL.md +2 -2
- package/org-skills/code-reviewer/SKILL.md +2 -2
- package/org-skills/coder/SKILL.md +2 -2
- package/org-skills/coding-standards/SKILL.md +2 -2
- package/org-skills/cold-email/SKILL.md +2 -2
- package/org-skills/collective-coord/SKILL.md +2 -2
- package/org-skills/community-marketing/SKILL.md +2 -2
- package/org-skills/competitive-landscape/SKILL.md +2 -2
- package/org-skills/competitive-platform-analysis/SKILL.md +2 -2
- package/org-skills/competitive-report-structure/SKILL.md +2 -2
- package/org-skills/competitive-teardown/SKILL.md +2 -2
- package/org-skills/competitor-comparison-pages/SKILL.md +2 -2
- package/org-skills/compliance-auditor/SKILL.md +2 -2
- package/org-skills/consensus-coordinator/SKILL.md +2 -2
- package/org-skills/content-creator/SKILL.md +2 -2
- package/org-skills/content-engine/SKILL.md +2 -2
- package/org-skills/content-strategy/SKILL.md +2 -2
- package/org-skills/context-compression/SKILL.md +2 -2
- package/org-skills/context-degradation/SKILL.md +2 -2
- package/org-skills/context-fundamentals/SKILL.md +2 -2
- package/org-skills/context-optimization/SKILL.md +2 -2
- package/org-skills/contract-and-proposal-writer/SKILL.md +1 -1
- package/org-skills/contract-first/SKILL.md +2 -2
- package/org-skills/coo-advisor/SKILL.md +2 -2
- package/org-skills/copy-editing/SKILL.md +2 -2
- package/org-skills/copywriting/SKILL.md +2 -2
- package/org-skills/cost-aware-llm-pipeline/SKILL.md +2 -2
- package/org-skills/cost-optimization/SKILL.md +2 -2
- package/org-skills/cpp-coding-standards/SKILL.md +2 -2
- package/org-skills/cpp-pro/SKILL.md +2 -2
- package/org-skills/cro-advisor/SKILL.md +2 -2
- package/org-skills/cro-specialist/SKILL.md +2 -2
- package/org-skills/csharp-developer/SKILL.md +2 -2
- package/org-skills/cto-advisor/SKILL.md +2 -2
- package/org-skills/culture-architect/SKILL.md +2 -2
- package/org-skills/customer-research/SKILL.md +2 -2
- package/org-skills/customs-trade-compliance/SKILL.md +2 -2
- package/org-skills/dart-flutter-patterns/SKILL.md +2 -2
- package/org-skills/dashboard-builder/SKILL.md +2 -2
- package/org-skills/data-consolidator/SKILL.md +2 -2
- package/org-skills/data-engineer/SKILL.md +2 -2
- package/org-skills/data-quality-frameworks/SKILL.md +2 -2
- package/org-skills/data-storytelling/SKILL.md +2 -2
- package/org-skills/database-migrations/SKILL.md +2 -2
- package/org-skills/database-optimizer/SKILL.md +2 -2
- package/org-skills/dbt-transformation-patterns/SKILL.md +2 -2
- package/org-skills/deal-strategist/SKILL.md +2 -2
- package/org-skills/debugging-wizard/SKILL.md +2 -2
- package/org-skills/deep-research/SKILL.md +2 -2
- package/org-skills/defender/SKILL.md +2 -2
- package/org-skills/dependency-upgrade/SKILL.md +2 -2
- package/org-skills/deployment-patterns/SKILL.md +2 -2
- package/org-skills/deployment-pipeline-design/SKILL.md +2 -2
- package/org-skills/design-system/SKILL.md +2 -2
- package/org-skills/design-system-patterns/SKILL.md +2 -2
- package/org-skills/devops-automator/SKILL.md +2 -2
- package/org-skills/devops-engineer/SKILL.md +2 -2
- package/org-skills/discovery-coach/SKILL.md +2 -2
- package/org-skills/django-expert/SKILL.md +2 -2
- package/org-skills/django-patterns/SKILL.md +2 -2
- package/org-skills/docker-patterns/SKILL.md +2 -2
- package/org-skills/dotnet-patterns/SKILL.md +2 -2
- package/org-skills/e2e-testing/SKILL.md +2 -2
- package/org-skills/email-marketing/SKILL.md +2 -2
- package/org-skills/email-sequences/SKILL.md +2 -2
- package/org-skills/embedded-firmware/SKILL.md +2 -2
- package/org-skills/embedded-systems/SKILL.md +2 -2
- package/org-skills/employment-contract-templates/SKILL.md +2 -2
- package/org-skills/energy-procurement/SKILL.md +2 -2
- package/org-skills/error-handling/SKILL.md +2 -2
- package/org-skills/event-marketing/SKILL.md +2 -2
- package/org-skills/evidence-collector/SKILL.md +2 -2
- package/org-skills/experiment-designer/SKILL.md +2 -2
- package/org-skills/experiment-tracker/SKILL.md +2 -2
- package/org-skills/experimental-design/SKILL.md +2 -2
- package/org-skills/fastapi-expert/SKILL.md +2 -2
- package/org-skills/fastapi-patterns/SKILL.md +2 -2
- package/org-skills/feedback-synthesizer/SKILL.md +2 -2
- package/org-skills/finance-tracker/SKILL.md +2 -2
- package/org-skills/finishing-a-development-branch/SKILL.md +2 -2
- package/org-skills/flutter-expert/SKILL.md +2 -2
- package/org-skills/focused-fix/SKILL.md +2 -2
- package/org-skills/free-tool-strategy/SKILL.md +2 -2
- package/org-skills/frontend-design/SKILL.md +2 -2
- package/org-skills/frontend-design-direction/SKILL.md +2 -2
- package/org-skills/frontend-developer/SKILL.md +2 -2
- package/org-skills/frontend-patterns/SKILL.md +2 -2
- package/org-skills/game-audio-engineer/SKILL.md +2 -2
- package/org-skills/game-designer/SKILL.md +2 -2
- package/org-skills/gdpr-data-handling/SKILL.md +2 -2
- package/org-skills/general-counsel-advisor/SKILL.md +2 -2
- package/org-skills/git-advanced-workflows/SKILL.md +2 -2
- package/org-skills/git-workflow/SKILL.md +2 -2
- package/org-skills/golang-patterns/SKILL.md +2 -2
- package/org-skills/golang-pro/SKILL.md +2 -2
- package/org-skills/harness-engineering/SKILL.md +2 -2
- package/org-skills/healthcare-phi-compliance/SKILL.md +2 -2
- package/org-skills/hexagonal-architecture/SKILL.md +2 -2
- package/org-skills/hierarchical-coord/SKILL.md +2 -2
- package/org-skills/huggingface-transformers/SKILL.md +2 -2
- package/org-skills/hypothesis-generation/SKILL.md +2 -2
- package/org-skills/incident-command-playbook/SKILL.md +2 -2
- package/org-skills/incident-commander/SKILL.md +2 -2
- package/org-skills/incident-runbook-templates/SKILL.md +2 -2
- package/org-skills/influencer-marketing/SKILL.md +2 -2
- package/org-skills/infrastructure/SKILL.md +2 -2
- package/org-skills/input-validator/SKILL.md +2 -2
- package/org-skills/intent-driven-development/SKILL.md +2 -2
- package/org-skills/inventory-demand-planning/SKILL.md +2 -2
- package/org-skills/investor-materials/SKILL.md +2 -2
- package/org-skills/ios-developer/SKILL.md +2 -2
- package/org-skills/isms-audit-expert/SKILL.md +2 -2
- package/org-skills/issue-tracker/SKILL.md +2 -2
- package/org-skills/java-architect/SKILL.md +2 -2
- package/org-skills/java-coding-standards/SKILL.md +2 -2
- package/org-skills/judge/SKILL.md +2 -2
- package/org-skills/kotlin-patterns/SKILL.md +2 -2
- package/org-skills/kotlin-specialist/SKILL.md +2 -2
- package/org-skills/kpi-dashboard-design/SKILL.md +2 -2
- package/org-skills/kubernetes-patterns/SKILL.md +2 -2
- package/org-skills/kubernetes-specialist/SKILL.md +2 -2
- package/org-skills/laravel-patterns/SKILL.md +2 -2
- package/org-skills/launch-strategist/SKILL.md +2 -2
- package/org-skills/launch-strategy/SKILL.md +2 -2
- package/org-skills/lead-magnets/SKILL.md +2 -2
- package/org-skills/legacy-modernizer/SKILL.md +2 -2
- package/org-skills/legal-compliance/SKILL.md +2 -2
- package/org-skills/level-designer/SKILL.md +2 -2
- package/org-skills/llm-cost-optimizer/SKILL.md +2 -2
- package/org-skills/llm-evaluation/SKILL.md +2 -2
- package/org-skills/llm-project-development/SKILL.md +2 -2
- package/org-skills/load-balancer/SKILL.md +2 -2
- package/org-skills/logistics-exception-management/SKILL.md +2 -2
- package/org-skills/long-horizon-prompting/SKILL.md +2 -2
- package/org-skills/make-interfaces-feel-better/SKILL.md +2 -2
- package/org-skills/markdown-mermaid-writing/SKILL.md +2 -2
- package/org-skills/market-research/SKILL.md +2 -2
- package/org-skills/market-research-reports/SKILL.md +2 -2
- package/org-skills/market-sizing-analysis/SKILL.md +2 -2
- package/org-skills/marketing-attribution/SKILL.md +2 -2
- package/org-skills/marketing-campaign/SKILL.md +2 -2
- package/org-skills/marketing-council/SKILL.md +2 -2
- package/org-skills/marketing-demand-acquisition/SKILL.md +2 -2
- package/org-skills/marketing-loops/SKILL.md +2 -2
- package/org-skills/marketing-plan/SKILL.md +2 -2
- package/org-skills/marketing-psychology/SKILL.md +2 -2
- package/org-skills/marketing-strategy-pmm/SKILL.md +2 -2
- package/org-skills/markitdown-document-conversion/SKILL.md +2 -2
- package/org-skills/mcp-builder/SKILL.md +2 -2
- package/org-skills/mcp-server-builder/SKILL.md +2 -2
- package/org-skills/mcp-server-patterns/SKILL.md +2 -2
- package/org-skills/memory-coordinator/SKILL.md +2 -2
- package/org-skills/mesh-coordinator/SKILL.md +2 -2
- package/org-skills/ml-developer/SKILL.md +2 -2
- package/org-skills/ml-pipeline/SKILL.md +2 -2
- package/org-skills/mle-workflow/SKILL.md +2 -2
- package/org-skills/mobile-app-builder/SKILL.md +2 -2
- package/org-skills/mobile-dev/SKILL.md +2 -2
- package/org-skills/model-qa/SKILL.md +2 -2
- package/org-skills/monitoring-expert/SKILL.md +2 -2
- package/org-skills/monodesign-ui-quality/SKILL.md +2 -2
- package/org-skills/monograph-code-navigation/SKILL.md +2 -2
- package/org-skills/monolean-minimal-change/SKILL.md +2 -2
- package/org-skills/multi-agent-patterns/SKILL.md +2 -2
- package/org-skills/mysql-patterns/SKILL.md +2 -2
- package/org-skills/narrative-designer/SKILL.md +2 -2
- package/org-skills/nextjs-developer/SKILL.md +2 -2
- package/org-skills/offer-design/SKILL.md +2 -2
- package/org-skills/onboarding-cro/SKILL.md +2 -2
- package/org-skills/outbound-strategist/SKILL.md +2 -2
- package/org-skills/page-cro/SKILL.md +2 -2
- package/org-skills/paid-ads/SKILL.md +2 -2
- package/org-skills/pandas-pro/SKILL.md +2 -2
- package/org-skills/path-validator/SKILL.md +2 -2
- package/org-skills/payment-agent/SKILL.md +2 -2
- package/org-skills/pci-compliance/SKILL.md +2 -2
- package/org-skills/perf-analyzer/SKILL.md +2 -2
- package/org-skills/php-pro/SKILL.md +2 -2
- package/org-skills/pipeline-analyst/SKILL.md +2 -2
- package/org-skills/planner/SKILL.md +2 -2
- package/org-skills/playwright-expert/SKILL.md +2 -2
- package/org-skills/postgres-patterns/SKILL.md +2 -2
- package/org-skills/postgresql-table-design/SKILL.md +2 -2
- package/org-skills/postmortem-writing/SKILL.md +2 -2
- package/org-skills/pr-manager/SKILL.md +2 -2
- package/org-skills/pricing-strategist/SKILL.md +2 -2
- package/org-skills/pricing-strategy/SKILL.md +2 -2
- package/org-skills/prisma-patterns/SKILL.md +2 -2
- package/org-skills/product-capability/SKILL.md +2 -2
- package/org-skills/product-discovery/SKILL.md +2 -2
- package/org-skills/product-lens/SKILL.md +2 -2
- package/org-skills/product-manager/SKILL.md +2 -2
- package/org-skills/product-marketing-context/SKILL.md +2 -2
- package/org-skills/production-audit/SKILL.md +2 -2
- package/org-skills/production-scheduling/SKILL.md +2 -2
- package/org-skills/production-validator/SKILL.md +2 -2
- package/org-skills/programmatic-seo/SKILL.md +2 -2
- package/org-skills/project-shepherd/SKILL.md +2 -2
- package/org-skills/prompt-engineer/SKILL.md +2 -2
- package/org-skills/proposal-strategist/SKILL.md +2 -2
- package/org-skills/prosecutor/SKILL.md +2 -2
- package/org-skills/public-relations/SKILL.md +2 -2
- package/org-skills/pymc-bayesian-modeling/SKILL.md +2 -2
- package/org-skills/python-patterns/SKILL.md +2 -2
- package/org-skills/python-pro/SKILL.md +2 -2
- package/org-skills/python-testing/SKILL.md +2 -2
- package/org-skills/quality-nonconformance/SKILL.md +2 -2
- package/org-skills/queen-coordinator/SKILL.md +2 -2
- package/org-skills/quorum-manager/SKILL.md +2 -2
- package/org-skills/raft-manager/SKILL.md +2 -2
- package/org-skills/rag-architect/SKILL.md +2 -2
- package/org-skills/rails-patterns/SKILL.md +2 -2
- package/org-skills/react-expert/SKILL.md +2 -2
- package/org-skills/react-native-expert/SKILL.md +2 -2
- package/org-skills/react-native-patterns/SKILL.md +2 -2
- package/org-skills/react-patterns/SKILL.md +2 -2
- package/org-skills/react-performance/SKILL.md +2 -2
- package/org-skills/react-testing/SKILL.md +2 -2
- package/org-skills/reality-checker/SKILL.md +2 -2
- package/org-skills/receiving-code-review/SKILL.md +2 -2
- package/org-skills/recruitment/SKILL.md +2 -2
- package/org-skills/redis-patterns/SKILL.md +2 -2
- package/org-skills/referral-programs/SKILL.md +2 -2
- package/org-skills/release-manager/SKILL.md +2 -2
- package/org-skills/repo-architect/SKILL.md +2 -2
- package/org-skills/researcher/SKILL.md +2 -2
- package/org-skills/resource-allocator/SKILL.md +2 -2
- package/org-skills/responsive-design/SKILL.md +2 -2
- package/org-skills/returns-reverse-logistics/SKILL.md +2 -2
- package/org-skills/reviewer/SKILL.md +2 -2
- package/org-skills/revops/SKILL.md +2 -2
- package/org-skills/roadmap-communicator/SKILL.md +2 -2
- package/org-skills/rust-engineer/SKILL.md +2 -2
- package/org-skills/rust-patterns/SKILL.md +2 -2
- package/org-skills/safe-executor/SKILL.md +2 -2
- package/org-skills/sales-coach/SKILL.md +2 -2
- package/org-skills/sales-enablement/SKILL.md +2 -2
- package/org-skills/sales-engineer/SKILL.md +2 -2
- package/org-skills/sales-prospecting/SKILL.md +2 -2
- package/org-skills/schema-markup/SKILL.md +2 -2
- package/org-skills/scientific-brainstorming/SKILL.md +2 -2
- package/org-skills/scientific-critical-thinking/SKILL.md +2 -2
- package/org-skills/scientific-thinking-literature-review/SKILL.md +2 -2
- package/org-skills/scientific-thinking-scholar-evaluation/SKILL.md +2 -2
- package/org-skills/scientific-visualization/SKILL.md +2 -2
- package/org-skills/scientific-writing/SKILL.md +2 -2
- package/org-skills/scout-explorer/SKILL.md +2 -2
- package/org-skills/secrets-vault-manager/SKILL.md +2 -2
- package/org-skills/secure-code-guardian/SKILL.md +2 -2
- package/org-skills/security-architect/SKILL.md +2 -2
- package/org-skills/security-auditor/SKILL.md +2 -2
- package/org-skills/security-review/SKILL.md +2 -2
- package/org-skills/security-reviewer/SKILL.md +2 -2
- package/org-skills/senior-data-scientist/SKILL.md +2 -2
- package/org-skills/senior-developer/SKILL.md +2 -2
- package/org-skills/senior-pm/SKILL.md +2 -2
- package/org-skills/senior-pm-playbook/SKILL.md +2 -2
- package/org-skills/seo/SKILL.md +2 -2
- package/org-skills/seo-audit/SKILL.md +2 -2
- package/org-skills/seo-specialist/SKILL.md +2 -2
- package/org-skills/shap-model-explainability/SKILL.md +2 -2
- package/org-skills/signup-flow-cro/SKILL.md +2 -2
- package/org-skills/site-architecture/SKILL.md +2 -2
- package/org-skills/sms-marketing/SKILL.md +2 -2
- package/org-skills/soc2-compliance/SKILL.md +2 -2
- package/org-skills/social-content/SKILL.md +2 -2
- package/org-skills/social-media/SKILL.md +2 -2
- package/org-skills/social-media-manager/SKILL.md +2 -2
- package/org-skills/solidity-engineer/SKILL.md +2 -2
- package/org-skills/spark-engineer/SKILL.md +2 -2
- package/org-skills/spec-driven-workflow/SKILL.md +2 -2
- package/org-skills/springboot-patterns/SKILL.md +2 -2
- package/org-skills/sprint-prioritizer/SKILL.md +2 -2
- package/org-skills/sql-pro/SKILL.md +2 -2
- package/org-skills/sre/SKILL.md +2 -2
- package/org-skills/sre-engineer/SKILL.md +2 -2
- package/org-skills/startup-financial-modeling/SKILL.md +2 -2
- package/org-skills/startup-metrics-framework/SKILL.md +2 -2
- package/org-skills/statistical-analysis/SKILL.md +2 -2
- package/org-skills/statistical-power/SKILL.md +2 -2
- package/org-skills/stride-analysis-patterns/SKILL.md +2 -2
- package/org-skills/stripe-integration/SKILL.md +2 -2
- package/org-skills/studio-operations/SKILL.md +2 -2
- package/org-skills/studio-producer/SKILL.md +2 -2
- package/org-skills/support-responder/SKILL.md +2 -2
- package/org-skills/swift-expert/SKILL.md +2 -2
- package/org-skills/swiftui-patterns/SKILL.md +2 -2
- package/org-skills/system-architect/SKILL.md +2 -2
- package/org-skills/systematic-debugging/SKILL.md +2 -2
- package/org-skills/task-orchestrator/SKILL.md +2 -2
- package/org-skills/team-communications/SKILL.md +2 -2
- package/org-skills/team-composition-analysis/SKILL.md +2 -2
- package/org-skills/technical-artist/SKILL.md +2 -2
- package/org-skills/technical-writer/SKILL.md +2 -2
- package/org-skills/terraform-engineer/SKILL.md +2 -2
- package/org-skills/test-driven-development/SKILL.md +2 -2
- package/org-skills/test-master/SKILL.md +2 -2
- package/org-skills/tester/SKILL.md +2 -2
- package/org-skills/the-fool/SKILL.md +2 -2
- package/org-skills/theme-factory/SKILL.md +2 -2
- package/org-skills/threat-detection/SKILL.md +2 -2
- package/org-skills/threat-mitigation-mapping/SKILL.md +2 -2
- package/org-skills/trend-researcher/SKILL.md +2 -2
- package/org-skills/trial-director/SKILL.md +2 -2
- package/org-skills/typescript-pro/SKILL.md +2 -2
- package/org-skills/unity-architect/SKILL.md +2 -2
- package/org-skills/using-git-worktrees/SKILL.md +2 -2
- package/org-skills/ux-researcher-designer/SKILL.md +2 -2
- package/org-skills/verification-before-completion/SKILL.md +2 -2
- package/org-skills/visionos-engineer/SKILL.md +2 -2
- package/org-skills/visual-design-foundations/SKILL.md +2 -2
- package/org-skills/vue-expert/SKILL.md +2 -2
- package/org-skills/vue-patterns/SKILL.md +2 -2
- package/org-skills/worker-specialist/SKILL.md +2 -2
- package/org-skills/workflow-architect/SKILL.md +2 -2
- package/org-skills/workflow-automation/SKILL.md +2 -2
- package/org-skills/writing-plans/SKILL.md +2 -2
- package/org-skills/zk-steward/SKILL.md +2 -2
- package/package.json +5 -5
- package/.claude/helpers/skill-registry.json +0 -5997
- package/dist/src/routing/jev-step.d.ts +0 -17
- package/dist/src/routing/jev-step.d.ts.map +0 -1
- package/dist/src/routing/jev-step.js +0 -27
- package/dist/src/routing/jev-step.js.map +0 -1
- package/org-skills/accessibility/LICENSE.txt +0 -21
- package/org-skills/accessibility/SKILL.md +0 -149
- package/org-skills/database-migration/LICENSE.txt +0 -21
- package/org-skills/database-migration/SKILL.md +0 -337
- package/org-skills/database-migration/references/details.md +0 -76
- package/org-skills/error-handling-patterns/LICENSE.txt +0 -21
- package/org-skills/error-handling-patterns/SKILL.md +0 -126
- package/org-skills/error-handling-patterns/references/details.md +0 -516
- package/org-skills/internal-comms/LICENSE.txt +0 -202
- package/org-skills/internal-comms/SKILL.md +0 -36
- package/org-skills/internal-comms/examples/3p-updates.md +0 -47
- package/org-skills/internal-comms/examples/company-newsletter.md +0 -65
- package/org-skills/internal-comms/examples/faq-answers.md +0 -30
- package/org-skills/internal-comms/examples/general-comms.md +0 -16
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
const path = require('path');
|
|
19
19
|
const fs = require('fs');
|
|
20
|
+
const pickCore = require('./pick-core.cjs');
|
|
20
21
|
|
|
21
22
|
// ── Advisory output gate ────────────────────────────────────────────────────
|
|
22
23
|
// Set MONOMIND_HOOK_QUIET=1 to silence the per-prompt advisory blocks
|
|
@@ -97,17 +98,15 @@ function _tripJevBreaker(CWD) {
|
|
|
97
98
|
try { fs.writeFileSync(_jevBreakerPath(CWD), JSON.stringify({ until: Date.now() + JEV_BREAKER_MS })); } catch (e) { /* best effort */ }
|
|
98
99
|
}
|
|
99
100
|
|
|
100
|
-
async function _pickWithJev(CWD, prompt,
|
|
101
|
+
async function _pickWithJev(CWD, prompt, agents, includeAgentId, skills) {
|
|
101
102
|
var jp = _loadJevPicker();
|
|
102
103
|
if (!jp || jp.resolveProviders(process.env).length === 0) return null;
|
|
103
104
|
// A dead endpoint must not tax every prompt: after a failed pick, skip Jev for 5 min.
|
|
104
105
|
if (_jevBreakerOpen(CWD)) return null;
|
|
105
|
-
var agents = jp.loadAgentCatalog(CWD);
|
|
106
|
-
var skills = jp.loadSkillCatalog(CWD);
|
|
107
106
|
if (agents.length < 2 && skills.length === 0) return null;
|
|
108
107
|
var failures = [];
|
|
109
108
|
var picked = await jp.pick(prompt, { agents: agents, skills: skills }, {
|
|
110
|
-
include: { agents:
|
|
109
|
+
include: { agents: includeAgentId ? [includeAgentId] : [] },
|
|
111
110
|
timeoutMs: jp.resolveHookTimeoutMs(process.env),
|
|
112
111
|
onError: function (err) { failures.push(err.provider + ': ' + err.message); },
|
|
113
112
|
});
|
|
@@ -122,27 +121,46 @@ async function _pickWithJev(CWD, prompt, keywordResult) {
|
|
|
122
121
|
provider: picked.provider,
|
|
123
122
|
agent: jp.acceptAgent(picked.agent),
|
|
124
123
|
agentConfidence: picked.agent ? picked.agent.confidence : 0,
|
|
124
|
+
agentRanked: picked.agent ? picked.agent.ranked : [],
|
|
125
125
|
// Only a confident skill answer (including a confident "none fits") replaces keyword matches.
|
|
126
126
|
skillAnswered: !!picked.skill && picked.skill.confidence >= jp.resolveMinConfidence(process.env),
|
|
127
127
|
skills: jp.acceptSkills(picked.skill).map(function (id) { return skillById[id]; }).filter(Boolean),
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
131
|
+
// The prompt's pick, as the legacy result object the enrichment below reads.
|
|
132
|
+
// Agents and skills both come from the shared catalogs (registry.json and the
|
|
133
|
+
// skill index through jev-picker), the same the CLI pickers rank; router.cjs
|
|
134
|
+
// is not a selector (its agent table and matchSkills predate the catalogs).
|
|
135
|
+
async function _decidePick(CWD, prompt) {
|
|
136
|
+
var jp = _loadJevPicker();
|
|
137
|
+
var agents = jp ? jp.loadAgentCatalog(CWD) : [];
|
|
138
|
+
var skills = jp ? jp.loadSkillCatalog(CWD) : [];
|
|
139
|
+
var skillMatches = pickCore.rankSkills(jp, prompt, skills);
|
|
140
|
+
// Outcome prior (pick-stats.cjs): a bounded re-rank from past adherence and
|
|
141
|
+
// subagent success; the file is small and read once per prompt.
|
|
142
|
+
var stats = null;
|
|
143
|
+
try { stats = require(path.join(__dirname, '..', 'pick-stats.cjs')).load(CWD); } catch (e) { /* no prior */ }
|
|
144
|
+
var keywordCands = pickCore.rankAgents(jp, prompt, agents, stats);
|
|
145
|
+
var jev = await _pickWithJev(CWD, prompt, agents, keywordCands[0] && keywordCands[0].id, skills);
|
|
146
|
+
var pick = pickCore.decide({ agents: agents, keywordCands: keywordCands, skillMatches: skillMatches, jev: jev });
|
|
140
147
|
// Jev's skill answer replaces keyword skill matches, including "none fits".
|
|
141
|
-
if (jev.skillAnswered) {
|
|
142
|
-
|
|
148
|
+
if (jev && jev.skillAnswered) {
|
|
149
|
+
skillMatches = jev.skills.map(function (s, i) {
|
|
143
150
|
return { skill: s.id, invoke: s.invoke, description: s.description || '', score: i === 0 ? 2 : 1, source: 'jev' };
|
|
144
151
|
});
|
|
145
152
|
}
|
|
153
|
+
return {
|
|
154
|
+
pick: pick,
|
|
155
|
+
result: {
|
|
156
|
+
agent: pick.agent ? pick.agent.name : null,
|
|
157
|
+
agentSlug: pick.agent ? pick.agent.id : null,
|
|
158
|
+
confidence: pick.confidence,
|
|
159
|
+
reason: pick.method,
|
|
160
|
+
routingMethod: pick.method,
|
|
161
|
+
skillMatches: skillMatches,
|
|
162
|
+
},
|
|
163
|
+
};
|
|
146
164
|
}
|
|
147
165
|
|
|
148
166
|
|
|
@@ -152,34 +170,29 @@ module.exports = {
|
|
|
152
170
|
var hookStart = Date.now();
|
|
153
171
|
var prompt = hCtx.prompt;
|
|
154
172
|
var hookInput = hCtx.hookInput;
|
|
155
|
-
var router = hCtx.router;
|
|
156
173
|
var intelligence = hCtx.intelligence;
|
|
157
174
|
var CWD = hCtx.CWD;
|
|
158
175
|
|
|
159
|
-
// For slash commands and single-action invocations:
|
|
160
|
-
//
|
|
176
|
+
// For slash commands and single-action invocations: no pick. The command
|
|
177
|
+
// becomes the session's route (agent null, skill = the command) so later
|
|
178
|
+
// spawns are not scored against an earlier prompt's pick.
|
|
161
179
|
if (hCtx.isSimpleCommand(prompt)) {
|
|
162
180
|
try {
|
|
163
181
|
var cmdLabel = (typeof prompt === 'string' && prompt.trim().startsWith('/'))
|
|
164
182
|
? prompt.trim().split(/\s+/)[0] // e.g. "/ts"
|
|
165
183
|
: (hookInput.commandName || hookInput.command_name || 'command');
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
JSON.stringify({
|
|
171
|
-
agent: cmdLabel,
|
|
172
|
-
confidence: 1.0,
|
|
173
|
-
reason: 'predefined command — no routing needed',
|
|
174
|
-
semanticRouting: false,
|
|
175
|
-
updatedAt: new Date().toISOString(),
|
|
176
|
-
}),
|
|
177
|
-
'utf-8'
|
|
178
|
-
);
|
|
184
|
+
pickCore.persistCommandRoute(CWD, {
|
|
185
|
+
command: cmdLabel,
|
|
186
|
+
sessionId: hookInput.session_id || hookInput.sessionId,
|
|
187
|
+
});
|
|
179
188
|
} catch (e) { /* non-fatal */ }
|
|
180
189
|
return;
|
|
181
190
|
}
|
|
182
191
|
|
|
192
|
+
// Claude Code's own turns (task notifications, reminder-only prompts,
|
|
193
|
+
// slash-command expansions) carry no user intent: no pick, no record.
|
|
194
|
+
if (pickCore.isSystemPrompt(prompt)) return;
|
|
195
|
+
|
|
183
196
|
if (intelligence && intelligence.getContext) {
|
|
184
197
|
try {
|
|
185
198
|
// Each hook event runs as a fresh node process, so the module-level
|
|
@@ -204,102 +217,43 @@ module.exports = {
|
|
|
204
217
|
if (ctx) advisoryLog(ctx);
|
|
205
218
|
} catch (e) { /* non-fatal */ }
|
|
206
219
|
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
//
|
|
211
|
-
//
|
|
212
|
-
//
|
|
213
|
-
//
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
// advisory output and enrichment cost, never lifecycle side effects.
|
|
224
|
-
if (_HOOK_QUIET) {
|
|
220
|
+
{
|
|
221
|
+
// ── The pick, in BOTH modes: Jev over the agent registry, else a strong
|
|
222
|
+
// keyword match over the same registry (bounded by
|
|
223
|
+
// MONOMIND_JEV_HOOK_TIMEOUT_MS and the failure breaker). Its one
|
|
224
|
+
// [PICK] line reaches Claude even under MONOMIND_HOOK_QUIET — it is
|
|
225
|
+
// the hook's answer, not an advisory banner.
|
|
226
|
+
// A trivial reply ("thanks", "ok") gets no pick and no record: the
|
|
227
|
+
// session's earlier route still describes the work in progress.
|
|
228
|
+
var result;
|
|
229
|
+
if (pickCore.isTrivialPrompt(prompt)) {
|
|
230
|
+
result = { agent: null, agentSlug: null, confidence: null, reason: 'trivial prompt', routingMethod: 'none', skillMatches: [] };
|
|
231
|
+
} else {
|
|
232
|
+
var decided = await _decidePick(CWD, prompt);
|
|
233
|
+
result = decided.result;
|
|
234
|
+
var pickLine = pickCore.formatPickLine(decided.pick);
|
|
235
|
+
if (pickLine) console.log(pickLine);
|
|
225
236
|
try {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
fs.writeFileSync(path.join(routeDir, 'last-route.json'), JSON.stringify({
|
|
233
|
-
routeId: routeId,
|
|
234
|
-
agent: agentName,
|
|
235
|
-
agentSlug: result.agentSlug || null,
|
|
236
|
-
confidence: result.confidence,
|
|
237
|
-
reason: result.reason,
|
|
238
|
-
prompt: promptSlice,
|
|
239
|
-
updatedAt: new Date().toISOString(),
|
|
240
|
-
}), 'utf-8');
|
|
241
|
-
fs.appendFileSync(path.join(routeDir, 'route-outcomes.jsonl'), JSON.stringify({
|
|
242
|
-
routeId: routeId,
|
|
243
|
-
ts: Date.now(),
|
|
244
|
-
task: promptSlice,
|
|
245
|
-
recommendedAgent: agentName,
|
|
246
|
-
routingMethod: result.routingMethod || 'keyword',
|
|
247
|
-
confidence: typeof result.confidence === 'number' ? result.confidence : 0,
|
|
248
|
-
learningMode: 'js',
|
|
249
|
-
}) + '\n', 'utf-8');
|
|
237
|
+
pickCore.persistRoute(CWD, {
|
|
238
|
+
pick: decided.pick,
|
|
239
|
+
prompt: prompt,
|
|
240
|
+
sessionId: hookInput.session_id || hookInput.sessionId,
|
|
241
|
+
shown: !!pickLine,
|
|
242
|
+
});
|
|
250
243
|
} catch (e) { /* non-fatal */ }
|
|
251
|
-
return;
|
|
252
244
|
}
|
|
253
245
|
|
|
254
|
-
//
|
|
255
|
-
//
|
|
256
|
-
//
|
|
257
|
-
|
|
258
|
-
// with the CLI routing package without requiring ESM imports. ─────────
|
|
259
|
-
if (result && result.routingMethod !== 'jev' && result.agentSlug === 'coder' && result.confidence <= 0.8) {
|
|
260
|
-
try {
|
|
261
|
-
var routingPkgPath = path.resolve(
|
|
262
|
-
CWD, 'packages', '@monomind', 'routing', 'dist', 'keyword-pre-filter.js'
|
|
263
|
-
);
|
|
264
|
-
// Also check CLI's node_modules (symlinked workspace)
|
|
265
|
-
if (!fs.existsSync(routingPkgPath)) {
|
|
266
|
-
routingPkgPath = path.resolve(
|
|
267
|
-
CWD, 'packages', '@monomind', 'cli', 'node_modules',
|
|
268
|
-
'@monomind', 'routing', 'dist', 'keyword-pre-filter.js'
|
|
269
|
-
);
|
|
270
|
-
}
|
|
271
|
-
if (fs.existsSync(routingPkgPath)) {
|
|
272
|
-
var routingMod = await import(routingPkgPath);
|
|
273
|
-
var enrichRules = routingMod.DEFAULT_KEYWORD_ROUTES;
|
|
274
|
-
if (enrichRules && enrichRules.length > 0) {
|
|
275
|
-
for (var eri = 0; eri < enrichRules.length; eri++) {
|
|
276
|
-
var erRule = enrichRules[eri];
|
|
277
|
-
if (erRule.pattern && erRule.pattern.test(prompt)) {
|
|
278
|
-
result.agent = erRule.routeName || erRule.agentSlug;
|
|
279
|
-
result.agentSlug = erRule.agentSlug;
|
|
280
|
-
result.confidence = erRule.score != null ? Math.min(0.98, Math.max(0.70, erRule.score)) : 0.85;
|
|
281
|
-
result.reason = 'Enriched: ' + (erRule.description || erRule.routeName);
|
|
282
|
-
result.enrichedFrom = 'routing-keyword-pre-filter';
|
|
283
|
-
break;
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
} catch (e) { /* non-fatal — routing package may not be available */ }
|
|
289
|
-
}
|
|
246
|
+
// When QUIET: the advisory output is suppressed anyway, so skip ALL the
|
|
247
|
+
// expensive enrichment below (embedding search, second-brain HTTP, monograph
|
|
248
|
+
// DB queries, metrics reads, episodes search).
|
|
249
|
+
if (_HOOK_QUIET) return;
|
|
290
250
|
|
|
291
251
|
// ── Intelligence embedding suggestion (SONA/ReasoningBank read path) ──
|
|
292
|
-
//
|
|
293
|
-
//
|
|
294
|
-
//
|
|
295
|
-
// This ENHANCES the keyword route — it only overrides when the
|
|
296
|
-
// embedding match is meaningfully more confident, and never blocks or
|
|
297
|
-
// delays routing beyond a 2s budget (fails silently otherwise).
|
|
298
|
-
// A slow or failed Jev attempt may already have spent most of the time
|
|
299
|
-
// before the hook exit, so the budget shrinks to keep the route persist
|
|
300
|
-
// below in time (500 ms before routeDeadlineMs).
|
|
252
|
+
// An advisory signal only: its agent labels come from post-task records,
|
|
253
|
+
// not the registry, so it never replaces the pick. Bounded by a 2 s budget
|
|
254
|
+
// that shrinks after a slow Jev attempt so the hook exits in time.
|
|
301
255
|
var intelBudgetMs = Math.min(2000, Math.max(0, routeDeadlineMs(process.env) - 500 - (Date.now() - hookStart)));
|
|
302
|
-
if (
|
|
256
|
+
if (intelBudgetMs > 0) try {
|
|
303
257
|
var intelResult = await Promise.race([
|
|
304
258
|
(async function() {
|
|
305
259
|
var mod = await _loadIntelligenceModule(CWD);
|
|
@@ -312,23 +266,8 @@ module.exports = {
|
|
|
312
266
|
var topIntelAgent = intelResult.agents[0];
|
|
313
267
|
var intelConf = intelResult.confidence != null ? intelResult.confidence : 0;
|
|
314
268
|
result.intelligenceSuggestion = { agents: intelResult.agents, confidence: intelConf };
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
var curConf = result.confidence != null ? result.confidence : 0;
|
|
318
|
-
if (topIntelAgent !== curAgent) {
|
|
319
|
-
// Only override when the embedding match clearly beats the keyword
|
|
320
|
-
// route (0.1 margin) — otherwise just surface it as a signal.
|
|
321
|
-
if (intelConf > curConf + 0.1) {
|
|
322
|
-
advisoryLog('[INTELLIGENCE] Embedding suggestion overrides keyword routing: ' + topIntelAgent + ' (confidence ' + intelConf.toFixed(2) + ') vs keyword ' + curAgent + ' (' + curConf.toFixed(2) + ')');
|
|
323
|
-
result.keywordAgent = curAgent;
|
|
324
|
-
result.agent = topIntelAgent;
|
|
325
|
-
result.agentSlug = topIntelAgent;
|
|
326
|
-
result.confidence = intelConf;
|
|
327
|
-
result.reason = 'Intelligence embedding match (SONA/ReasoningBank)' + (result.reason ? '; keyword route was: ' + result.reason : '');
|
|
328
|
-
result.enrichedFrom = 'intelligence-embedding';
|
|
329
|
-
} else {
|
|
330
|
-
advisoryLog('[INTELLIGENCE] Embedding suggestion: ' + topIntelAgent + ' (confidence ' + intelConf.toFixed(2) + ') — kept keyword route ' + curAgent);
|
|
331
|
-
}
|
|
269
|
+
if (topIntelAgent !== result.agent) {
|
|
270
|
+
advisoryLog('[INTELLIGENCE] Embedding suggestion: ' + topIntelAgent + ' (confidence ' + intelConf.toFixed(2) + ')');
|
|
332
271
|
}
|
|
333
272
|
}
|
|
334
273
|
} catch (e) { /* non-fatal — intelligence system unavailable or timed out */ }
|
|
@@ -349,7 +288,7 @@ module.exports = {
|
|
|
349
288
|
successRate: Math.round(patterns[pi].wins / patterns[pi].total * 100)
|
|
350
289
|
};
|
|
351
290
|
}
|
|
352
|
-
var routedAgent = result.agent
|
|
291
|
+
var routedAgent = result.agent;
|
|
353
292
|
var routedPattern = patternMap[routedAgent];
|
|
354
293
|
// Find if there's a clearly better agent
|
|
355
294
|
if (routedPattern && routedPattern.successRate < 50) {
|
|
@@ -370,7 +309,7 @@ module.exports = {
|
|
|
370
309
|
if (fs.existsSync(rfPath) && fs.statSync(rfPath).size <= MAX_RF) {
|
|
371
310
|
var rfLines = fs.readFileSync(rfPath, 'utf-8').trim().split('\n').filter(Boolean);
|
|
372
311
|
// Check last 50 entries for this agent's feedback
|
|
373
|
-
var routedAgent = result.agent
|
|
312
|
+
var routedAgent = result.agent;
|
|
374
313
|
var recentRf = rfLines.slice(-50);
|
|
375
314
|
var agentFeedback = [];
|
|
376
315
|
for (var ri = 0; ri < recentRf.length; ri++) {
|
|
@@ -406,7 +345,9 @@ module.exports = {
|
|
|
406
345
|
if (fs.existsSync(dispatchPath) && fs.statSync(dispatchPath).size <= MAX_DISPATCH) {
|
|
407
346
|
var lastDispatch = JSON.parse(fs.readFileSync(dispatchPath, 'utf-8'));
|
|
408
347
|
var dispatchAge = Date.now() - new Date(lastDispatch.dispatchedAt || 0).getTime();
|
|
409
|
-
|
|
348
|
+
var dispatchSid = hookInput.session_id || hookInput.sessionId || null;
|
|
349
|
+
var sameSession = !lastDispatch.sessionId || !dispatchSid || lastDispatch.sessionId === dispatchSid;
|
|
350
|
+
if (dispatchAge < 60000 && sameSession && result.agent && (lastDispatch.agentType === result.agent || lastDispatch.agentType === result.agentSlug)) {
|
|
410
351
|
result.recentlyDispatched = true;
|
|
411
352
|
advisoryLog('[DISPATCH_DEDUP] ' + lastDispatch.agentType + ' was dispatched ' + Math.round(dispatchAge / 1000) + 's ago — consider a different specialist or direct implementation');
|
|
412
353
|
}
|
|
@@ -416,44 +357,6 @@ module.exports = {
|
|
|
416
357
|
var output = [];
|
|
417
358
|
var conf = result.confidence != null ? result.confidence : 0;
|
|
418
359
|
|
|
419
|
-
// ── Persist routing result for statusline display & outcome correlation ─
|
|
420
|
-
try {
|
|
421
|
-
var crypto = require('crypto');
|
|
422
|
-
var routeId = typeof crypto.randomUUID === 'function' ? crypto.randomUUID() : ('route-' + Date.now() + '-' + Math.random().toString(36).slice(2, 8));
|
|
423
|
-
var routeDir = path.join(CWD, '.monomind');
|
|
424
|
-
fs.mkdirSync(routeDir, { recursive: true });
|
|
425
|
-
var agentName = result.agent || 'coder';
|
|
426
|
-
var confVal = typeof result.confidence === 'number' ? result.confidence : 0;
|
|
427
|
-
var promptSlice = (prompt || '').slice(0, 500);
|
|
428
|
-
fs.writeFileSync(
|
|
429
|
-
path.join(routeDir, 'last-route.json'),
|
|
430
|
-
JSON.stringify({
|
|
431
|
-
routeId: routeId,
|
|
432
|
-
agent: agentName,
|
|
433
|
-
agentSlug: result.agentSlug || null,
|
|
434
|
-
confidence: result.confidence,
|
|
435
|
-
reason: result.reason,
|
|
436
|
-
prompt: promptSlice,
|
|
437
|
-
historicalPattern: result.historicalPattern || null,
|
|
438
|
-
updatedAt: new Date().toISOString(),
|
|
439
|
-
}),
|
|
440
|
-
'utf-8'
|
|
441
|
-
);
|
|
442
|
-
|
|
443
|
-
// Append initial route recommendation to route-outcomes.jsonl
|
|
444
|
-
var routeRec = {
|
|
445
|
-
routeId: routeId,
|
|
446
|
-
ts: Date.now(),
|
|
447
|
-
task: promptSlice,
|
|
448
|
-
recommendedAgent: agentName,
|
|
449
|
-
routingMethod: result.routingMethod || 'keyword',
|
|
450
|
-
confidence: confVal,
|
|
451
|
-
learningMode: 'js',
|
|
452
|
-
};
|
|
453
|
-
var outcomesPath = path.join(routeDir, 'route-outcomes.jsonl');
|
|
454
|
-
fs.appendFileSync(outcomesPath, JSON.stringify(routeRec) + '\n', 'utf-8');
|
|
455
|
-
} catch (e) { /* non-fatal */ }
|
|
456
|
-
|
|
457
360
|
// ── Skill auto-activation (the one thing the hook does better than Claude) ──
|
|
458
361
|
var matches = result.skillMatches || [];
|
|
459
362
|
if (matches.length > 0) {
|
|
@@ -988,8 +891,6 @@ module.exports = {
|
|
|
988
891
|
} catch(e) {}
|
|
989
892
|
|
|
990
893
|
// Swarm mode selection is available on-demand via /mastermind slash command.
|
|
991
|
-
} else {
|
|
992
|
-
advisoryLog('[INFO] Router not available, using default routing');
|
|
993
894
|
}
|
|
994
895
|
|
|
995
896
|
// Task 22: TeamRoutingModes — only log when an explicit swarm config is present
|
|
@@ -5,6 +5,27 @@
|
|
|
5
5
|
|
|
6
6
|
const path = require('path');
|
|
7
7
|
const fs = require('fs');
|
|
8
|
+
const pickCore = require('./pick-core.cjs');
|
|
9
|
+
|
|
10
|
+
// The last `bytes` of a JSONL file as parsed records (a partial first line is
|
|
11
|
+
// dropped), so a large file still yields its recent entries instead of none.
|
|
12
|
+
function readTailRecords(file, bytes) {
|
|
13
|
+
var fd;
|
|
14
|
+
try {
|
|
15
|
+
var size = fs.statSync(file).size;
|
|
16
|
+
var len = Math.min(bytes, size);
|
|
17
|
+
var buf = Buffer.alloc(len);
|
|
18
|
+
fd = fs.openSync(file, 'r');
|
|
19
|
+
fs.readSync(fd, buf, 0, len, size - len);
|
|
20
|
+
var lines = buf.toString('utf-8').split('\n');
|
|
21
|
+
if (size > len) lines.shift();
|
|
22
|
+
return lines.map(function(l) { try { return l ? JSON.parse(l) : null; } catch (e) { return null; } }).filter(Boolean);
|
|
23
|
+
} catch (e) {
|
|
24
|
+
return [];
|
|
25
|
+
} finally {
|
|
26
|
+
if (fd !== undefined) try { fs.closeSync(fd); } catch (e) { /* ignore */ }
|
|
27
|
+
}
|
|
28
|
+
}
|
|
8
29
|
|
|
9
30
|
module.exports = {
|
|
10
31
|
handleEnd: async function(hCtx) {
|
|
@@ -36,10 +57,9 @@ module.exports = {
|
|
|
36
57
|
var sessionSuccess = null; // null = no evidence; only set to a boolean from real signals
|
|
37
58
|
try {
|
|
38
59
|
var feedbackPath = path.join(CWD, '.monomind', 'routing-feedback.jsonl');
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
if (
|
|
42
|
-
var lastRoute = JSON.parse(fs.readFileSync(lastRoutePath, 'utf-8'));
|
|
60
|
+
var endSessionId = hookInput.sessionId || hookInput.session_id || '';
|
|
61
|
+
var lastRoute = pickCore.readSessionRoute(CWD, endSessionId);
|
|
62
|
+
if (lastRoute) {
|
|
43
63
|
|
|
44
64
|
// Derive sessionSuccess. A commit alone is not proof of success — a
|
|
45
65
|
// session can commit a partial fix and then hit repeated failures —
|
|
@@ -50,14 +70,13 @@ module.exports = {
|
|
|
50
70
|
|
|
51
71
|
var outcomesSignal = null; // majority success/failure from intelligence-outcomes, if any
|
|
52
72
|
var outcomesPath = path.join(CWD, '.monomind', 'data', 'intelligence-outcomes.jsonl');
|
|
53
|
-
|
|
54
|
-
|
|
73
|
+
// Only the tail is read: the 30-minute window lives at the end of the
|
|
74
|
+
// file, and a size cap used to drop the whole signal once it grew.
|
|
75
|
+
if (fs.existsSync(outcomesPath)) {
|
|
55
76
|
var windowMs = 30 * 60 * 1000;
|
|
56
77
|
var cutoff = Date.now() - windowMs;
|
|
57
|
-
var
|
|
58
|
-
|
|
59
|
-
try { return JSON.parse(l); } catch { return null; }
|
|
60
|
-
}).filter(function(e) { return e && e.ts && e.ts >= cutoff; });
|
|
78
|
+
var recent = readTailRecords(outcomesPath, 256 * 1024)
|
|
79
|
+
.filter(function(e) { return e.ts && e.ts >= cutoff; });
|
|
61
80
|
if (recent.length > 0) {
|
|
62
81
|
var failures = recent.filter(function(e) { return e.success === false; }).length;
|
|
63
82
|
outcomesSignal = failures / recent.length < 0.5;
|
|
@@ -88,7 +107,13 @@ module.exports = {
|
|
|
88
107
|
if (intelligence && intelligence.feedback && typeof sessionSuccess === 'boolean') {
|
|
89
108
|
try { intelligence.feedback(sessionSuccess); } catch (e) { /* non-fatal */ }
|
|
90
109
|
}
|
|
91
|
-
//
|
|
110
|
+
// The session's outcome joins its latest route by routeId. The agent
|
|
111
|
+
// actually used is never inferred here: pick-adherence (PreToolUse
|
|
112
|
+
// Task|Agent) records the real subagent_type on the route when one ran.
|
|
113
|
+
if (typeof sessionSuccess === 'boolean' && lastRoute.routeId) {
|
|
114
|
+
try { pickCore.joinOutcome(CWD, lastRoute.routeId, { measuredSuccess: sessionSuccess }); } catch (eRo) { /* non-fatal */ }
|
|
115
|
+
}
|
|
116
|
+
// routing-feedback.jsonl: the recommendation (skip when there was none).
|
|
92
117
|
var agentSlug = String(lastRoute.agent || '').trim().toLowerCase().replace(/\s+/g, '-');
|
|
93
118
|
// Skip non-agent placeholders — "AI selecting" etc. carry no routing signal
|
|
94
119
|
if (agentSlug && agentSlug !== 'ai-selecting' && agentSlug !== 'unknown') {
|
|
@@ -98,52 +123,10 @@ module.exports = {
|
|
|
98
123
|
confidence: lastRoute.confidence,
|
|
99
124
|
sessionId: String(hookInput.sessionId || hookInput.session_id || '').slice(0, 128),
|
|
100
125
|
};
|
|
126
|
+
if (lastRoute.routeId) feedbackEntry.routeId = lastRoute.routeId;
|
|
101
127
|
// Only write the success flag when derived from actual evidence (commits, outcomes)
|
|
102
128
|
if (typeof sessionSuccess === 'boolean') feedbackEntry.intelligenceFeedback = sessionSuccess;
|
|
103
129
|
fs.appendFileSync(feedbackPath, JSON.stringify(feedbackEntry) + '\n', 'utf-8');
|
|
104
|
-
|
|
105
|
-
// Also join/record into route-outcomes.jsonl if routeId exists or outcome measured
|
|
106
|
-
if (typeof sessionSuccess === 'boolean') {
|
|
107
|
-
try {
|
|
108
|
-
var routeOutcomesPath = path.join(CWD, '.monomind', 'route-outcomes.jsonl');
|
|
109
|
-
if (fs.existsSync(routeOutcomesPath)) {
|
|
110
|
-
var roLines = fs.readFileSync(routeOutcomesPath, 'utf-8').trim().split('\n').filter(Boolean);
|
|
111
|
-
var updated = false;
|
|
112
|
-
if (lastRoute.routeId) {
|
|
113
|
-
for (var ri = roLines.length - 1; ri >= 0; ri--) {
|
|
114
|
-
try {
|
|
115
|
-
var roRec = JSON.parse(roLines[ri]);
|
|
116
|
-
if (roRec.routeId === lastRoute.routeId) {
|
|
117
|
-
roRec.agentActuallyUsed = agentSlug;
|
|
118
|
-
roRec.measuredSuccess = sessionSuccess;
|
|
119
|
-
roLines[ri] = JSON.stringify(roRec);
|
|
120
|
-
updated = true;
|
|
121
|
-
break;
|
|
122
|
-
}
|
|
123
|
-
} catch (_) {}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
if (!updated) {
|
|
127
|
-
// If not found by routeId, join latest unresolved record
|
|
128
|
-
for (var ri2 = roLines.length - 1; ri2 >= 0; ri2--) {
|
|
129
|
-
try {
|
|
130
|
-
var roRec2 = JSON.parse(roLines[ri2]);
|
|
131
|
-
if (roRec2.measuredSuccess === undefined) {
|
|
132
|
-
roRec2.agentActuallyUsed = agentSlug;
|
|
133
|
-
roRec2.measuredSuccess = sessionSuccess;
|
|
134
|
-
roLines[ri2] = JSON.stringify(roRec2);
|
|
135
|
-
updated = true;
|
|
136
|
-
break;
|
|
137
|
-
}
|
|
138
|
-
} catch (_) {}
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
if (updated) {
|
|
142
|
-
fs.writeFileSync(routeOutcomesPath, roLines.join('\n') + '\n', 'utf-8');
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
} catch (eRo) { /* non-fatal */ }
|
|
146
|
-
}
|
|
147
130
|
// Rotate: keep last 1000 lines to prevent unbounded growth.
|
|
148
131
|
try {
|
|
149
132
|
var MAX_FEEDBACK = 512 * 1024; // 512 KiB
|
|
@@ -191,6 +174,8 @@ module.exports = {
|
|
|
191
174
|
}
|
|
192
175
|
}
|
|
193
176
|
} catch (e) { /* non-fatal */ }
|
|
177
|
+
// Fold this session's adherence/outcome lines into pick-stats.json (the ranking prior).
|
|
178
|
+
try { require('../pick-stats.cjs').update(CWD); } catch (e) { /* non-fatal */ }
|
|
194
179
|
|
|
195
180
|
// Now consolidate AFTER feedback has been recorded (so the outcome has recentEdits)
|
|
196
181
|
if (!daemonHoldsLock && intelligence && intelligence.consolidate) {
|
|
@@ -237,16 +222,13 @@ module.exports = {
|
|
|
237
222
|
|
|
238
223
|
// Collect session context
|
|
239
224
|
var sessId = String(hookInput.sessionId || hookInput.session_id || process.env.CLAUDE_SESSION_ID || '');
|
|
240
|
-
var lastRouteFile = path.join(CWD, '.monomind', 'last-route.json');
|
|
241
225
|
var routeAgent = 'unknown';
|
|
242
226
|
var routePrompt = '';
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
}
|
|
249
|
-
} catch (e) {}
|
|
227
|
+
var lr = pickCore.readSessionRoute(CWD, sessId);
|
|
228
|
+
if (lr) {
|
|
229
|
+
routeAgent = lr.agent || 'unknown';
|
|
230
|
+
routePrompt = lr.prompt || '';
|
|
231
|
+
}
|
|
250
232
|
|
|
251
233
|
// Strip system noise (task notifications, XML tags) from prompt
|
|
252
234
|
if (routePrompt && (routePrompt.includes('<task-notification>') || routePrompt.includes('<system-reminder>'))) {
|
|
@@ -36,6 +36,10 @@ module.exports = {
|
|
|
36
36
|
}
|
|
37
37
|
} catch (e) { log('[WARN] Session restore failed: ' + e.message); }
|
|
38
38
|
|
|
39
|
+
// Keep skill-registry.json (the skill catalog routing and Jev read) in
|
|
40
|
+
// step with .claude/skills: rebuilt when missing or older than any skill.
|
|
41
|
+
try { require('./pick-core.cjs').ensureSkillRegistryFresh(CWD); } catch (e) { /* non-fatal */ }
|
|
42
|
+
|
|
39
43
|
// ── Non-blocking security scan via @monoes/hooks worker ─────────────
|
|
40
44
|
// The hooks package ships a security worker (worker-security.ts) that scans
|
|
41
45
|
// for hardcoded secrets and vulnerability patterns. We run it at session
|
|
@@ -131,7 +135,7 @@ module.exports = {
|
|
|
131
135
|
if (bundledDir) {
|
|
132
136
|
var healed = [];
|
|
133
137
|
// Top-level critical files — mirrors executor.ts's `criticalHelpers` list.
|
|
134
|
-
var helpersToCheck = ['hook-handler.cjs', 'statusline.cjs', 'router.cjs', 'monograph-freshen.cjs', 'control-start.cjs', 'intelligence.cjs', 'auto-memory-hook.mjs', 'build-skill-registry.cjs', 'jev-picker.cjs', 'redact-secrets.cjs'];
|
|
138
|
+
var helpersToCheck = ['hook-handler.cjs', 'statusline.cjs', 'router.cjs', 'monograph-freshen.cjs', 'control-start.cjs', 'intelligence.cjs', 'auto-memory-hook.mjs', 'build-skill-registry.cjs', 'org-skill-index.cjs', 'jev-picker.cjs', 'jev-catalog.cjs', 'redact-secrets.cjs', 'pick-rank.cjs', 'pick-stats.cjs'];
|
|
135
139
|
for (var hi = 0; hi < helpersToCheck.length; hi++) {
|
|
136
140
|
var hName = helpersToCheck[hi];
|
|
137
141
|
var healedName = _healIfStale(
|
|
@@ -47,6 +47,10 @@ module.exports = {
|
|
|
47
47
|
var CWD = hCtx.CWD;
|
|
48
48
|
|
|
49
49
|
var taskSuccess = hookInput.success !== false && hookInput.status !== 'failed';
|
|
50
|
+
// SubagentStop carries the subagent as agent_type; the other names are
|
|
51
|
+
// older/other payload shapes.
|
|
52
|
+
var completedAgent = String(hookInput.agent_type || hookInput.subagent_type || hookInput.agentType
|
|
53
|
+
|| hookInput.agentSlug || hookInput.agent_slug || '').slice(0, 128) || 'unknown';
|
|
50
54
|
if (intelligence && intelligence.feedback) {
|
|
51
55
|
try {
|
|
52
56
|
intelligence.feedback(taskSuccess);
|
|
@@ -124,7 +128,7 @@ module.exports = {
|
|
|
124
128
|
task: {
|
|
125
129
|
id: hookInput.taskId || hookInput.task_id || '',
|
|
126
130
|
status: taskSuccess ? 'completed' : 'failed',
|
|
127
|
-
agentSlug:
|
|
131
|
+
agentSlug: completedAgent,
|
|
128
132
|
type: hookInput.taskType || hookInput.task_type || 'general',
|
|
129
133
|
},
|
|
130
134
|
success: taskSuccess,
|
|
@@ -166,9 +170,9 @@ module.exports = {
|
|
|
166
170
|
var dlqWriter = new dlqMod.DLQWriter(dlqDir);
|
|
167
171
|
dlqWriter.enqueue({
|
|
168
172
|
toolName: 'post-task',
|
|
169
|
-
originalPayload: { taskId: hookInput.taskId || '', agentSlug:
|
|
173
|
+
originalPayload: { taskId: hookInput.taskId || '', agentSlug: completedAgent },
|
|
170
174
|
deliveryAttempts: [{ attempt: 1, timestamp: new Date().toISOString(), error: hookInput.error || 'task failed' }],
|
|
171
|
-
agentId:
|
|
175
|
+
agentId: completedAgent,
|
|
172
176
|
swarmId: hookInput.swarmId || hookInput.swarm_id,
|
|
173
177
|
});
|
|
174
178
|
console.log('[DLQ_ENQUEUED] Failed task ' + (hookInput.taskId || 'unknown') + ' sent to dead-letter queue');
|
|
@@ -181,7 +185,7 @@ module.exports = {
|
|
|
181
185
|
try {
|
|
182
186
|
var intelligence = hCtx.intelligence;
|
|
183
187
|
if (intelligence && intelligence.recordMemoryDecision) {
|
|
184
|
-
var agentSlug =
|
|
188
|
+
var agentSlug = completedAgent;
|
|
185
189
|
var taskDesc = typeof prompt === 'string' ? prompt : hookInput.description || '';
|
|
186
190
|
await Promise.resolve(intelligence.recordMemoryDecision({
|
|
187
191
|
taskDescription: taskDesc.substring(0, 200),
|
|
@@ -206,7 +210,7 @@ module.exports = {
|
|
|
206
210
|
}
|
|
207
211
|
}
|
|
208
212
|
if (adrCfg.autoGenerate) {
|
|
209
|
-
var taskAgent =
|
|
213
|
+
var taskAgent = completedAgent === 'unknown' ? '' : completedAgent;
|
|
210
214
|
var taskDescAdr = (typeof prompt === 'string' ? prompt : hookInput.description || '').toLowerCase();
|
|
211
215
|
var isArchitectLevel = ['architect', 'system-architect', 'software-architect'].includes(taskAgent)
|
|
212
216
|
|| /\b(architecture|design decision|adr|trade-?off|migration strategy)\b/.test(taskDescAdr);
|
|
@@ -236,6 +240,7 @@ module.exports = {
|
|
|
236
240
|
}
|
|
237
241
|
} catch (e) { /* non-fatal */ }
|
|
238
242
|
|
|
239
|
-
|
|
243
|
+
// SubagentStop runs post-task: the acknowledgement is silent under QUIET.
|
|
244
|
+
if (String(process.env.MONOMIND_HOOK_QUIET || '') !== '1') console.log('[OK] Task completed');
|
|
240
245
|
}
|
|
241
246
|
};
|
|
@@ -433,6 +433,12 @@ const handlers = {
|
|
|
433
433
|
await h.handle(hCtx);
|
|
434
434
|
},
|
|
435
435
|
|
|
436
|
+
// PreToolUse Task|Agent: log whether the spawn followed this session's
|
|
437
|
+
// [PICK]. Observation only — writes nothing to stdout and never blocks.
|
|
438
|
+
'pre-agent': () => {
|
|
439
|
+
try { require('./handlers/pick-core.cjs').recordAdherence(CWD, hCtx.hookInput); } catch (e) { /* non-fatal */ }
|
|
440
|
+
},
|
|
441
|
+
|
|
436
442
|
'adr-draft': () => {
|
|
437
443
|
const h = require('./handlers/adr-draft-handler.cjs');
|
|
438
444
|
h.handle(hCtx);
|
|
@@ -947,9 +953,10 @@ if (command && handlers[command]) {
|
|
|
947
953
|
try { _recordHookLatency(command, Date.now() - _hookStart); } catch (_) {}
|
|
948
954
|
}
|
|
949
955
|
} else if (command) {
|
|
950
|
-
|
|
956
|
+
// SubagentStart runs `status`: an acknowledgement only, silent under QUIET.
|
|
957
|
+
if (String(process.env.MONOMIND_HOOK_QUIET || '') !== '1') console.log('[OK] Hook: ' + command);
|
|
951
958
|
} else {
|
|
952
|
-
console.log('Usage: hook-handler.cjs <route|pre-bash|pre-search|post-edit|post-graph-tool|session-restore|session-end|pre-task|post-task|compact-manual|compact-auto|stats>');
|
|
959
|
+
console.log('Usage: hook-handler.cjs <route|pre-agent|pre-bash|pre-search|post-edit|post-graph-tool|session-restore|session-end|pre-task|post-task|compact-manual|compact-auto|stats>');
|
|
953
960
|
}
|
|
954
961
|
}
|
|
955
962
|
|