@monoes/monomindcli 1.10.54 → 1.10.55
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/optimization/benchmark-suite.md +2 -0
- package/.claude/agents/optimization/load-balancer.md +2 -0
- package/.claude/agents/optimization/performance-monitor.md +2 -0
- package/.claude/agents/optimization/resource-allocator.md +3 -1
- package/.claude/agents/optimization/topology-optimizer.md +2 -0
- package/.claude/commands/mastermind/_repeat.md +21 -0
- package/.claude/commands/mastermind/_taskfile.md +235 -0
- package/.claude/commands/mastermind/adr.md +11 -0
- package/.claude/commands/mastermind/approve.md +94 -0
- package/.claude/commands/mastermind/autodev.md +32 -0
- package/.claude/commands/mastermind/budget.md +7 -0
- package/.claude/commands/mastermind/code-review.md +317 -0
- package/.claude/commands/mastermind/createorg.md +40 -1
- package/.claude/commands/mastermind/createtask.md +383 -0
- package/.claude/commands/mastermind/debug.md +22 -0
- package/.claude/commands/mastermind/design.md +20 -0
- package/.claude/commands/mastermind/do.md +526 -0
- package/.claude/commands/mastermind/execute.md +20 -0
- package/.claude/commands/mastermind/finish.md +20 -0
- package/.claude/commands/mastermind/graph-status.md +7 -0
- package/.claude/commands/mastermind/help.md +118 -0
- package/.claude/commands/mastermind/ideate.md +261 -0
- package/.claude/commands/mastermind/improve.md +345 -0
- package/.claude/commands/mastermind/loops.md +7 -0
- package/.claude/commands/mastermind/master.md +186 -6
- package/.claude/commands/mastermind/memory.md +230 -0
- package/.claude/commands/mastermind/plan.md +26 -0
- package/.claude/commands/mastermind/receive-review.md +20 -0
- package/.claude/commands/mastermind/repeat.md +257 -0
- package/.claude/commands/mastermind/runorg.md +3 -0
- package/.claude/commands/mastermind/skill-builder.md +20 -0
- package/.claude/commands/mastermind/specialagents.md +125 -0
- package/.claude/commands/mastermind/swarm.md +161 -0
- package/.claude/commands/mastermind/taskdev.md +26 -0
- package/.claude/commands/mastermind/tdd.md +22 -0
- package/.claude/commands/mastermind/techport.md +4 -0
- package/.claude/commands/mastermind/understand.md +139 -0
- package/.claude/commands/mastermind/verify.md +22 -0
- package/.claude/commands/mastermind/worktree.md +20 -0
- package/.claude/helpers/handlers/graph-status-handler.cjs +2 -1
- package/.claude/helpers/hook-handler.cjs +19 -0
- package/.claude/helpers/skill-registry.json +23 -0
- package/.claude/helpers/statusline.cjs +1 -1
- package/.claude/skills/mastermind/approve.md +15 -7
- package/.claude/skills/mastermind/autodev.md +534 -0
- package/.claude/skills/mastermind/createorg.md +21 -5
- package/.claude/skills/mastermind/debug.md +232 -0
- package/.claude/skills/mastermind/design.md +187 -0
- package/.claude/skills/mastermind/execute.md +104 -0
- package/.claude/skills/mastermind/finish.md +251 -0
- package/.claude/skills/mastermind/plan.md +180 -0
- package/.claude/skills/mastermind/receive-review.md +213 -0
- package/.claude/skills/mastermind/runorg.md +23 -8
- package/.claude/skills/mastermind/skill-builder.md +274 -0
- package/.claude/skills/mastermind/taskdev.md +307 -0
- package/.claude/skills/mastermind/tdd.md +394 -0
- package/.claude/skills/mastermind/verify.md +196 -0
- package/.claude/skills/mastermind/worktree.md +160 -132
- package/README.md +320 -253
- package/dist/src/commands/analyze.d.ts.map +1 -1
- package/dist/src/commands/analyze.js +9 -2
- package/dist/src/commands/analyze.js.map +1 -1
- package/dist/src/commands/benchmark.js.map +1 -1
- package/dist/src/commands/completions.js +1 -1
- package/dist/src/commands/guidance.js +7 -7
- package/dist/src/commands/hooks.d.ts.map +1 -1
- package/dist/src/commands/hooks.js +16 -3
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/commands/index.d.ts +3 -2
- package/dist/src/commands/index.d.ts.map +1 -1
- package/dist/src/commands/index.js +7 -0
- package/dist/src/commands/index.js.map +1 -1
- package/dist/src/commands/init.d.ts.map +1 -1
- package/dist/src/commands/init.js +47 -13
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/neural.d.ts.map +1 -1
- package/dist/src/commands/neural.js +100 -14
- package/dist/src/commands/neural.js.map +1 -1
- package/dist/src/commands/platforms.d.ts +11 -0
- package/dist/src/commands/platforms.d.ts.map +1 -0
- package/dist/src/commands/platforms.js +195 -0
- package/dist/src/commands/platforms.js.map +1 -0
- package/dist/src/commands/ruvector/backup.js.map +1 -1
- package/dist/src/commands/ruvector/benchmark.js.map +1 -1
- package/dist/src/commands/ruvector/init.js.map +1 -1
- package/dist/src/commands/ruvector/migrate.js.map +1 -1
- package/dist/src/commands/ruvector/optimize.js.map +1 -1
- package/dist/src/commands/ruvector/status.js.map +1 -1
- package/dist/src/commands/update.js +6 -6
- package/dist/src/init/executor.d.ts.map +1 -1
- package/dist/src/init/executor.js +28 -0
- package/dist/src/init/executor.js.map +1 -1
- package/dist/src/init/statusline-generator.js +1 -1
- package/dist/src/init/types.d.ts +1 -0
- package/dist/src/init/types.d.ts.map +1 -1
- package/dist/src/mcp-server.d.ts.map +1 -1
- package/dist/src/mcp-server.js +92 -0
- package/dist/src/mcp-server.js.map +1 -1
- package/dist/src/mcp-tools/hive-mind-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/hive-mind-tools.js +52 -0
- package/dist/src/mcp-tools/hive-mind-tools.js.map +1 -1
- package/dist/src/mcp-tools/hooks-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/hooks-tools.js +106 -5
- package/dist/src/mcp-tools/hooks-tools.js.map +1 -1
- package/dist/src/mcp-tools/index.d.ts +0 -5
- package/dist/src/mcp-tools/index.d.ts.map +1 -1
- package/dist/src/mcp-tools/index.js +0 -5
- package/dist/src/mcp-tools/index.js.map +1 -1
- package/dist/src/mcp-tools/monograph-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/monograph-tools.js +507 -5587
- package/dist/src/mcp-tools/monograph-tools.js.map +1 -1
- package/dist/src/mcp-tools/neural-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/neural-tools.js +64 -4
- package/dist/src/mcp-tools/neural-tools.js.map +1 -1
- package/dist/src/mcp-tools/security-tools.js +4 -4
- package/dist/src/memory/intelligence.d.ts +2 -2
- package/dist/src/memory/intelligence.d.ts.map +1 -1
- package/dist/src/memory/intelligence.js +108 -3
- package/dist/src/memory/intelligence.js.map +1 -1
- package/dist/src/memory/memory-bridge.js +1 -1
- package/dist/src/memory/memory-bridge.js.map +1 -1
- package/dist/src/memory/sona-optimizer.d.ts +1 -10
- package/dist/src/memory/sona-optimizer.d.ts.map +1 -1
- package/dist/src/memory/sona-optimizer.js +0 -46
- package/dist/src/memory/sona-optimizer.js.map +1 -1
- package/dist/src/runtime/headless.js +3 -3
- package/dist/src/ruvector/diff-classifier.d.ts +0 -2
- package/dist/src/ruvector/diff-classifier.d.ts.map +1 -1
- package/dist/src/ruvector/diff-classifier.js +2 -14
- package/dist/src/ruvector/diff-classifier.js.map +1 -1
- package/dist/src/ruvector/index.d.ts +26 -9
- package/dist/src/ruvector/index.d.ts.map +1 -1
- package/dist/src/ruvector/index.js +3 -21
- package/dist/src/ruvector/index.js.map +1 -1
- package/dist/src/ruvector/ruvllm-wasm.js +2 -2
- package/dist/src/ruvector/ruvllm-wasm.js.map +1 -1
- package/dist/src/types.d.ts +0 -15
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +0 -18
- package/dist/src/types.js.map +1 -1
- package/dist/src/ui/dashboard.html +8763 -9766
- package/dist/src/ui/orgs.html +1 -1
- package/dist/src/ui/server.mjs +504 -35
- package/dist/src/update/index.js +1 -1
- package/dist/src/update/validator.js +8 -8
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/.claude/agents/academic/academic-anthropologist.md +0 -126
- package/.claude/agents/academic/academic-geographer.md +0 -128
- package/.claude/agents/academic/academic-historian.md +0 -124
- package/.claude/agents/academic/academic-narratologist.md +0 -119
- package/.claude/agents/academic/academic-psychologist.md +0 -119
- package/.claude/agents/analysis/analyze-code-quality.md +0 -58
- package/.claude/agents/analysis/code-analyzer.md +0 -189
- package/.claude/agents/analysis/code-review/analyze-code-quality.md +0 -58
- package/.claude/agents/consensus/performance-benchmarker.md +0 -831
- package/.claude/agents/data/ml/data-ml-model.md +0 -76
- package/.claude/agents/development/dev-backend-api.md +0 -178
- package/.claude/agents/devops/ci-cd/ops-cicd-github.md +0 -52
- package/.claude/agents/documentation/api-docs/docs-api-openapi.md +0 -63
- package/.claude/agents/game-development/blender/blender-addon-engineer.md +0 -235
- package/.claude/agents/game-development/game-audio-engineer.md +0 -265
- package/.claude/agents/game-development/game-designer.md +0 -168
- package/.claude/agents/game-development/godot/godot-gameplay-scripter.md +0 -335
- package/.claude/agents/game-development/godot/godot-multiplayer-engineer.md +0 -298
- package/.claude/agents/game-development/godot/godot-shader-developer.md +0 -267
- package/.claude/agents/game-development/level-designer.md +0 -209
- package/.claude/agents/game-development/narrative-designer.md +0 -244
- package/.claude/agents/game-development/roblox-studio/roblox-avatar-creator.md +0 -298
- package/.claude/agents/game-development/roblox-studio/roblox-experience-designer.md +0 -306
- package/.claude/agents/game-development/roblox-studio/roblox-systems-scripter.md +0 -326
- package/.claude/agents/game-development/technical-artist.md +0 -230
- package/.claude/agents/game-development/unity/unity-architect.md +0 -272
- package/.claude/agents/game-development/unity/unity-editor-tool-developer.md +0 -311
- package/.claude/agents/game-development/unity/unity-multiplayer-engineer.md +0 -322
- package/.claude/agents/game-development/unity/unity-shader-graph-artist.md +0 -270
- package/.claude/agents/game-development/unreal-engine/unreal-multiplayer-architect.md +0 -314
- package/.claude/agents/game-development/unreal-engine/unreal-systems-engineer.md +0 -311
- package/.claude/agents/game-development/unreal-engine/unreal-technical-artist.md +0 -257
- package/.claude/agents/game-development/unreal-engine/unreal-world-builder.md +0 -274
- package/.claude/agents/github/release-swarm.md +0 -597
- package/.claude/agents/goal/agent.md +0 -804
- package/.claude/agents/goal/code-goal-planner.md +0 -445
- package/.claude/agents/marketing/marketing-ai-citation-strategist.md +0 -171
- package/.claude/agents/marketing/marketing-app-store-optimizer.md +0 -322
- package/.claude/agents/marketing/marketing-baidu-seo-specialist.md +0 -227
- package/.claude/agents/marketing/marketing-bilibili-content-strategist.md +0 -200
- package/.claude/agents/marketing/marketing-book-co-author.md +0 -111
- package/.claude/agents/marketing/marketing-carousel-growth-engine.md +0 -200
- package/.claude/agents/marketing/marketing-china-ecommerce-operator.md +0 -284
- package/.claude/agents/marketing/marketing-content-creator.md +0 -67
- package/.claude/agents/marketing/marketing-cross-border-ecommerce.md +0 -260
- package/.claude/agents/marketing/marketing-douyin-strategist.md +0 -150
- package/.claude/agents/marketing/marketing-growth-hacker.md +0 -54
- package/.claude/agents/marketing/marketing-instagram-curator.md +0 -114
- package/.claude/agents/marketing/marketing-kuaishou-strategist.md +0 -224
- package/.claude/agents/marketing/marketing-linkedin-content-creator.md +0 -215
- package/.claude/agents/marketing/marketing-livestream-commerce-coach.md +0 -306
- package/.claude/agents/marketing/marketing-podcast-strategist.md +0 -278
- package/.claude/agents/marketing/marketing-private-domain-operator.md +0 -309
- package/.claude/agents/marketing/marketing-reddit-community-builder.md +0 -124
- package/.claude/agents/marketing/marketing-seo-specialist.md +0 -279
- package/.claude/agents/marketing/marketing-short-video-editing-coach.md +0 -413
- package/.claude/agents/marketing/marketing-social-media-strategist.md +0 -125
- package/.claude/agents/marketing/marketing-tiktok-strategist.md +0 -126
- package/.claude/agents/marketing/marketing-twitter-engager.md +0 -127
- package/.claude/agents/marketing/marketing-wechat-official-account.md +0 -146
- package/.claude/agents/marketing/marketing-weibo-strategist.md +0 -241
- package/.claude/agents/marketing/marketing-xiaohongshu-specialist.md +0 -139
- package/.claude/agents/marketing/marketing-zhihu-strategist.md +0 -163
- package/.claude/agents/neural/safla-neural.md +0 -74
- package/.claude/agents/paid-media/paid-media-auditor.md +0 -71
- package/.claude/agents/paid-media/paid-media-creative-strategist.md +0 -71
- package/.claude/agents/paid-media/paid-media-paid-social-strategist.md +0 -71
- package/.claude/agents/paid-media/paid-media-ppc-strategist.md +0 -71
- package/.claude/agents/paid-media/paid-media-programmatic-buyer.md +0 -71
- package/.claude/agents/paid-media/paid-media-search-query-analyst.md +0 -71
- package/.claude/agents/paid-media/paid-media-tracking-specialist.md +0 -71
- package/.claude/agents/payments/agentic-payments.md +0 -126
- package/.claude/agents/product/product-behavioral-nudge-engine.md +0 -81
- package/.claude/agents/product/product-feedback-synthesizer.md +0 -119
- package/.claude/agents/product/product-manager.md +0 -469
- package/.claude/agents/product/product-sprint-prioritizer.md +0 -154
- package/.claude/agents/product/product-trend-researcher.md +0 -159
- package/.claude/agents/project-management/project-management-experiment-tracker.md +0 -199
- package/.claude/agents/project-management/project-management-jira-workflow-steward.md +0 -231
- package/.claude/agents/project-management/project-management-project-shepherd.md +0 -195
- package/.claude/agents/project-management/project-management-studio-operations.md +0 -201
- package/.claude/agents/project-management/project-management-studio-producer.md +0 -204
- package/.claude/agents/project-management/project-manager-senior.md +0 -136
- package/.claude/agents/reasoning/agent.md +0 -804
- package/.claude/agents/reasoning/goal-planner.md +0 -73
- package/.claude/agents/sales/sales-account-strategist.md +0 -228
- package/.claude/agents/sales/sales-coach.md +0 -272
- package/.claude/agents/sales/sales-deal-strategist.md +0 -181
- package/.claude/agents/sales/sales-discovery-coach.md +0 -226
- package/.claude/agents/sales/sales-engineer.md +0 -183
- package/.claude/agents/sales/sales-outbound-strategist.md +0 -202
- package/.claude/agents/sales/sales-pipeline-analyst.md +0 -268
- package/.claude/agents/sales/sales-proposal-strategist.md +0 -218
- package/.claude/agents/sona/sona-learning-optimizer.md +0 -65
- package/.claude/agents/spatial-computing/macos-spatial-metal-engineer.md +0 -338
- package/.claude/agents/spatial-computing/terminal-integration-specialist.md +0 -71
- package/.claude/agents/spatial-computing/visionos-spatial-engineer.md +0 -55
- package/.claude/agents/specialists/memory-specialist.md +0 -298
- package/.claude/agents/specialists/performance-engineer.md +0 -387
- package/.claude/agents/specialists/queen-coordinator.md +0 -67
- package/.claude/agents/specialists/security-architect.md +0 -154
- package/.claude/agents/specialized/accounts-payable-agent.md +0 -186
- package/.claude/agents/specialized/corporate-training-designer.md +0 -193
- package/.claude/agents/specialized/data-consolidation-agent.md +0 -61
- package/.claude/agents/specialized/government-digital-presales-consultant.md +0 -364
- package/.claude/agents/specialized/healthcare-marketing-compliance.md +0 -396
- package/.claude/agents/specialized/recruitment-specialist.md +0 -510
- package/.claude/agents/specialized/report-distribution-agent.md +0 -66
- package/.claude/agents/specialized/sales-data-extraction-agent.md +0 -68
- package/.claude/agents/specialized/specialized-french-consulting-market.md +0 -193
- package/.claude/agents/specialized/specialized-korean-business-navigator.md +0 -217
- package/.claude/agents/specialized/specialized-salesforce-architect.md +0 -181
- package/.claude/agents/specialized/study-abroad-advisor.md +0 -283
- package/.claude/agents/specialized/supply-chain-strategist.md +0 -583
- package/.claude/agents/sublinear/consensus-coordinator.md +0 -333
- package/.claude/agents/sublinear/matrix-optimizer.md +0 -180
- package/.claude/agents/sublinear/pagerank-analyzer.md +0 -295
- package/.claude/agents/sublinear/performance-optimizer.md +0 -363
- package/.claude/agents/sublinear/trading-predictor.md +0 -242
- package/.claude/agents/support/support-analytics-reporter.md +0 -366
- package/.claude/agents/support/support-executive-summary-generator.md +0 -213
- package/.claude/agents/support/support-finance-tracker.md +0 -443
- package/.claude/agents/support/support-infrastructure-maintainer.md +0 -619
- package/.claude/agents/support/support-legal-compliance-checker.md +0 -589
- package/.claude/agents/support/support-support-responder.md +0 -586
- package/.claude/agents/swarm/adaptive-coordinator.md +0 -364
- package/.claude/agents/swarm/hierarchical-coordinator.md +0 -318
- package/.claude/agents/templates/github-pr-manager.md +0 -155
- package/.claude/agents/templates/memory-coordinator.md +0 -163
- package/.claude/agents/templates/migration-plan.md +0 -724
- package/.claude/agents/templates/orchestrator-task.md +0 -120
- package/.claude/agents/templates/performance-analyzer.md +0 -179
- package/.claude/agents/templates/sparc-coordinator.md +0 -163
- package/.claude/agents/testing/testing-reality-checker.md +0 -237
- package/.claude/commands/analysis/token-efficiency.md +0 -42
- package/.claude/commands/optimization/README.md +0 -73
- package/.claude/commands/optimization/parallel-execution.md +0 -76
- package/.claude/commands/swarm/swarm-analysis.md +0 -62
- package/.claude/commands/swarm/swarm-background.md +0 -65
- package/.claude/commands/swarm/swarm-modes.md +0 -67
- package/.claude/commands/swarm/swarm-monitor.md +0 -54
- package/.claude/commands/swarm/swarm-status.md +0 -44
- package/.claude/commands/swarm/swarm-strategies.md +0 -76
- package/.claude/commands/training/model-update.md +0 -78
- package/.claude/commands/training/pattern-learn.md +0 -69
- package/.claude/commands/training/specialization.md +0 -92
- package/.claude/commands/verify/check.md +0 -106
- package/.claude/commands/verify/start.md +0 -105
- package/.claude/helpers/README.md +0 -105
- package/.claude/helpers/context-persistence-hook.mjs +0 -1988
- package/.claude/helpers/intelligence.cjs +0 -247
- package/.claude/helpers/learning-service.mjs +0 -1302
- package/.claude/helpers/memory-palace.cjs +0 -461
- package/.claude/helpers/memory.cjs +0 -84
- package/.claude/helpers/metrics-db.mjs +0 -488
- package/.claude/helpers/router.cjs +0 -559
- package/.claude/helpers/session.cjs +0 -126
- package/.claude/helpers/swarm-hooks.sh +0 -761
- package/.claude/helpers/toggle-statusline.cjs +0 -58
- package/.claude/helpers/token-tracker.cjs +0 -934
- package/.claude/skills/agentdb-advanced/SKILL.md +0 -549
- package/.claude/skills/agentdb-learning/SKILL.md +0 -544
- package/.claude/skills/agentdb-memory-patterns/SKILL.md +0 -337
- package/.claude/skills/agentdb-optimization/SKILL.md +0 -508
- package/.claude/skills/agentdb-vector-search/SKILL.md +0 -335
- package/.claude/skills/agentic-integration/SKILL.md +0 -265
- package/.claude/skills/cli-modernization/SKILL.md +0 -950
- package/.claude/skills/core-implementation/SKILL.md +0 -892
- package/.claude/skills/ddd-architecture/SKILL.md +0 -444
- package/.claude/skills/github-code-review/SKILL.md +0 -1147
- package/.claude/skills/github-multi-repo/SKILL.md +0 -912
- package/.claude/skills/github-project-management/SKILL.md +0 -1245
- package/.claude/skills/github-release-management/SKILL.md +0 -1118
- package/.claude/skills/github-workflow-automation/SKILL.md +0 -1107
- package/.claude/skills/mcp-optimization/SKILL.md +0 -837
- package/.claude/skills/memory-unification/SKILL.md +0 -196
- package/.claude/skills/performance-optimization/SKILL.md +0 -416
- package/.claude/skills/reasoningbank-agentdb/SKILL.md +0 -444
- package/.claude/skills/reasoningbank-intelligence/SKILL.md +0 -199
- package/.claude/skills/security-hardening/SKILL.md +0 -101
- package/.claude/skills/stream-chain/SKILL.md +0 -560
- package/.claude/skills/swarm-coordination/SKILL.md +0 -451
- package/bundled-graph/dist/src/analyze.d.ts +0 -32
- package/bundled-graph/dist/src/analyze.d.ts.map +0 -1
- package/bundled-graph/dist/src/analyze.js +0 -297
- package/bundled-graph/dist/src/analyze.js.map +0 -1
- package/bundled-graph/dist/src/build.d.ts +0 -8
- package/bundled-graph/dist/src/build.d.ts.map +0 -1
- package/bundled-graph/dist/src/build.js.map +0 -1
- package/bundled-graph/dist/src/cache.d.ts +0 -12
- package/bundled-graph/dist/src/cache.d.ts.map +0 -1
- package/bundled-graph/dist/src/cache.js +0 -43
- package/bundled-graph/dist/src/cache.js.map +0 -1
- package/bundled-graph/dist/src/cluster.d.ts +0 -5
- package/bundled-graph/dist/src/cluster.d.ts.map +0 -1
- package/bundled-graph/dist/src/cluster.js.map +0 -1
- package/bundled-graph/dist/src/detect.d.ts +0 -21
- package/bundled-graph/dist/src/detect.d.ts.map +0 -1
- package/bundled-graph/dist/src/detect.js +0 -195
- package/bundled-graph/dist/src/detect.js.map +0 -1
- package/bundled-graph/dist/src/export.d.ts +0 -21
- package/bundled-graph/dist/src/export.d.ts.map +0 -1
- package/bundled-graph/dist/src/export.js +0 -68
- package/bundled-graph/dist/src/export.js.map +0 -1
- package/bundled-graph/dist/src/extract/index.d.ts +0 -20
- package/bundled-graph/dist/src/extract/index.d.ts.map +0 -1
- package/bundled-graph/dist/src/extract/index.js +0 -158
- package/bundled-graph/dist/src/extract/index.js.map +0 -1
- package/bundled-graph/dist/src/extract/languages/c.d.ts +0 -3
- package/bundled-graph/dist/src/extract/languages/c.d.ts.map +0 -1
- package/bundled-graph/dist/src/extract/languages/c.js +0 -88
- package/bundled-graph/dist/src/extract/languages/c.js.map +0 -1
- package/bundled-graph/dist/src/extract/languages/cpp.d.ts +0 -3
- package/bundled-graph/dist/src/extract/languages/cpp.d.ts.map +0 -1
- package/bundled-graph/dist/src/extract/languages/cpp.js +0 -121
- package/bundled-graph/dist/src/extract/languages/cpp.js.map +0 -1
- package/bundled-graph/dist/src/extract/languages/csharp.d.ts +0 -3
- package/bundled-graph/dist/src/extract/languages/csharp.d.ts.map +0 -1
- package/bundled-graph/dist/src/extract/languages/csharp.js +0 -121
- package/bundled-graph/dist/src/extract/languages/csharp.js.map +0 -1
- package/bundled-graph/dist/src/extract/languages/go.d.ts +0 -3
- package/bundled-graph/dist/src/extract/languages/go.d.ts.map +0 -1
- package/bundled-graph/dist/src/extract/languages/go.js +0 -181
- package/bundled-graph/dist/src/extract/languages/go.js.map +0 -1
- package/bundled-graph/dist/src/extract/languages/java.d.ts +0 -3
- package/bundled-graph/dist/src/extract/languages/java.d.ts.map +0 -1
- package/bundled-graph/dist/src/extract/languages/java.js +0 -117
- package/bundled-graph/dist/src/extract/languages/java.js.map +0 -1
- package/bundled-graph/dist/src/extract/languages/kotlin.d.ts +0 -3
- package/bundled-graph/dist/src/extract/languages/kotlin.d.ts.map +0 -1
- package/bundled-graph/dist/src/extract/languages/kotlin.js +0 -112
- package/bundled-graph/dist/src/extract/languages/kotlin.js.map +0 -1
- package/bundled-graph/dist/src/extract/languages/php.d.ts +0 -3
- package/bundled-graph/dist/src/extract/languages/php.d.ts.map +0 -1
- package/bundled-graph/dist/src/extract/languages/php.js +0 -130
- package/bundled-graph/dist/src/extract/languages/php.js.map +0 -1
- package/bundled-graph/dist/src/extract/languages/python.d.ts +0 -3
- package/bundled-graph/dist/src/extract/languages/python.d.ts.map +0 -1
- package/bundled-graph/dist/src/extract/languages/python.js +0 -230
- package/bundled-graph/dist/src/extract/languages/python.js.map +0 -1
- package/bundled-graph/dist/src/extract/languages/ruby.d.ts +0 -3
- package/bundled-graph/dist/src/extract/languages/ruby.d.ts.map +0 -1
- package/bundled-graph/dist/src/extract/languages/ruby.js +0 -120
- package/bundled-graph/dist/src/extract/languages/ruby.js.map +0 -1
- package/bundled-graph/dist/src/extract/languages/rust.d.ts +0 -3
- package/bundled-graph/dist/src/extract/languages/rust.d.ts.map +0 -1
- package/bundled-graph/dist/src/extract/languages/rust.js +0 -195
- package/bundled-graph/dist/src/extract/languages/rust.js.map +0 -1
- package/bundled-graph/dist/src/extract/languages/scala.d.ts +0 -3
- package/bundled-graph/dist/src/extract/languages/scala.d.ts.map +0 -1
- package/bundled-graph/dist/src/extract/languages/scala.js +0 -110
- package/bundled-graph/dist/src/extract/languages/scala.js.map +0 -1
- package/bundled-graph/dist/src/extract/languages/swift.d.ts +0 -3
- package/bundled-graph/dist/src/extract/languages/swift.d.ts.map +0 -1
- package/bundled-graph/dist/src/extract/languages/swift.js +0 -122
- package/bundled-graph/dist/src/extract/languages/swift.js.map +0 -1
- package/bundled-graph/dist/src/extract/languages/typescript.d.ts +0 -3
- package/bundled-graph/dist/src/extract/languages/typescript.d.ts.map +0 -1
- package/bundled-graph/dist/src/extract/languages/typescript.js +0 -295
- package/bundled-graph/dist/src/extract/languages/typescript.js.map +0 -1
- package/bundled-graph/dist/src/extract/semantic.d.ts +0 -38
- package/bundled-graph/dist/src/extract/semantic.d.ts.map +0 -1
- package/bundled-graph/dist/src/extract/semantic.js +0 -242
- package/bundled-graph/dist/src/extract/semantic.js.map +0 -1
- package/bundled-graph/dist/src/extract/tree-sitter-runner.d.ts +0 -48
- package/bundled-graph/dist/src/extract/tree-sitter-runner.d.ts.map +0 -1
- package/bundled-graph/dist/src/extract/tree-sitter-runner.js +0 -137
- package/bundled-graph/dist/src/extract/tree-sitter-runner.js.map +0 -1
- package/bundled-graph/dist/src/extract/types.d.ts +0 -7
- package/bundled-graph/dist/src/extract/types.d.ts.map +0 -1
- package/bundled-graph/dist/src/extract/types.js +0 -2
- package/bundled-graph/dist/src/extract/types.js.map +0 -1
- package/bundled-graph/dist/src/index.d.ts +0 -28
- package/bundled-graph/dist/src/index.d.ts.map +0 -1
- package/bundled-graph/dist/src/index.js +0 -26
- package/bundled-graph/dist/src/index.js.map +0 -1
- package/bundled-graph/dist/src/pipeline.d.ts +0 -27
- package/bundled-graph/dist/src/pipeline.d.ts.map +0 -1
- package/bundled-graph/dist/src/pipeline.js +0 -269
- package/bundled-graph/dist/src/pipeline.js.map +0 -1
- package/bundled-graph/dist/src/report.d.ts +0 -26
- package/bundled-graph/dist/src/report.d.ts.map +0 -1
- package/bundled-graph/dist/src/report.js +0 -214
- package/bundled-graph/dist/src/report.js.map +0 -1
- package/bundled-graph/dist/src/types.d.ts +0 -124
- package/bundled-graph/dist/src/types.d.ts.map +0 -1
- package/bundled-graph/dist/src/types.js +0 -2
- package/bundled-graph/dist/src/types.js.map +0 -1
- package/bundled-graph/dist/src/visualize.d.ts +0 -4
- package/bundled-graph/dist/src/visualize.d.ts.map +0 -1
- package/bundled-graph/dist/src/visualize.js +0 -574
- package/bundled-graph/dist/src/visualize.js.map +0 -1
- package/bundled-graph/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/src/ui/dashboard-v2.html +0 -5316
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: memory-unification
|
|
3
|
-
description: "Unify 6+ memory systems into AgentDB with HNSW indexing for 150x-12,500x search improvements. Implements ADR-006 (Unified Memory Service) and ADR-009 (Hybrid Memory Backend)."
|
|
4
|
-
triggers:
|
|
5
|
-
- unify memory
|
|
6
|
-
- migrate to AgentDB
|
|
7
|
-
- HNSW search setup
|
|
8
|
-
- memory fragmentation
|
|
9
|
-
- consolidate memory systems
|
|
10
|
-
- AgentDB migration
|
|
11
|
-
- memory backend unification
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
# Memory Unification
|
|
15
|
-
|
|
16
|
-
## What This Skill Does
|
|
17
|
-
|
|
18
|
-
Consolidates disparate memory systems into unified AgentDB backend with HNSW vector search, achieving 150x-12,500x search performance improvements while maintaining backward compatibility.
|
|
19
|
-
|
|
20
|
-
## Quick Start
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
# Initialize memory unification
|
|
24
|
-
Task("Memory architecture", "Design AgentDB unification strategy", "v1-memory-specialist")
|
|
25
|
-
|
|
26
|
-
# AgentDB integration
|
|
27
|
-
Task("AgentDB setup", "Configure HNSW indexing and vector search", "v1-memory-specialist")
|
|
28
|
-
|
|
29
|
-
# Data migration
|
|
30
|
-
Task("Memory migration", "Migrate SQLite/Markdown to AgentDB", "v1-memory-specialist")
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## Systems to Unify
|
|
34
|
-
|
|
35
|
-
### Legacy Systems → AgentDB
|
|
36
|
-
|
|
37
|
-
```
|
|
38
|
-
┌─────────────────────────────────────────┐
|
|
39
|
-
│ • MemoryManager (basic operations) │
|
|
40
|
-
│ • DistributedMemorySystem (clustering) │
|
|
41
|
-
│ • SwarmMemory (agent-specific) │
|
|
42
|
-
│ • AdvancedMemoryManager (features) │
|
|
43
|
-
│ • SQLiteBackend (structured) │
|
|
44
|
-
│ • MarkdownBackend (file-based) │
|
|
45
|
-
│ • HybridBackend (combination) │
|
|
46
|
-
└─────────────────────────────────────────┘
|
|
47
|
-
↓
|
|
48
|
-
┌─────────────────────────────────────────┐
|
|
49
|
-
│ 🚀 AgentDB with HNSW │
|
|
50
|
-
│ • 150x-12,500x faster search │
|
|
51
|
-
│ • Unified query interface │
|
|
52
|
-
│ • Cross-agent memory sharing │
|
|
53
|
-
│ • SONA learning integration │
|
|
54
|
-
└─────────────────────────────────────────┘
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
## Implementation Architecture
|
|
58
|
-
|
|
59
|
-
### Unified Memory Service
|
|
60
|
-
|
|
61
|
-
```typescript
|
|
62
|
-
class UnifiedMemoryService implements IMemoryBackend {
|
|
63
|
-
constructor(
|
|
64
|
-
private agentdb: AgentDBAdapter,
|
|
65
|
-
private indexer: HNSWIndexer,
|
|
66
|
-
private migrator: DataMigrator,
|
|
67
|
-
) {}
|
|
68
|
-
|
|
69
|
-
async store(entry: MemoryEntry): Promise<void> {
|
|
70
|
-
await this.agentdb.store(entry);
|
|
71
|
-
await this.indexer.index(entry);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
async query(query: MemoryQuery): Promise<MemoryEntry[]> {
|
|
75
|
-
if (query.semantic) {
|
|
76
|
-
return this.indexer.search(query); // 150x-12,500x faster
|
|
77
|
-
}
|
|
78
|
-
return this.agentdb.query(query);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
### HNSW Vector Search
|
|
84
|
-
|
|
85
|
-
```typescript
|
|
86
|
-
class HNSWIndexer {
|
|
87
|
-
constructor(dimensions: number = 1536) {
|
|
88
|
-
this.index = new HNSWIndex({
|
|
89
|
-
dimensions,
|
|
90
|
-
efConstruction: 200, // higher = better build quality, slower construction
|
|
91
|
-
M: 16, // max bi-directional connections per node in the graph
|
|
92
|
-
ef: 100, // search beam width — larger = higher recall, slower query
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
async search(query: MemoryQuery): Promise<MemoryEntry[]> {
|
|
97
|
-
const embedding = await this.embedContent(query.content);
|
|
98
|
-
const results = this.index.search(embedding, query.limit || 10);
|
|
99
|
-
return this.retrieveEntries(results);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
## Migration Strategy
|
|
105
|
-
|
|
106
|
-
### Phase 1: Foundation
|
|
107
|
-
|
|
108
|
-
```typescript
|
|
109
|
-
// AgentDB adapter setup
|
|
110
|
-
const agentdb = new AgentDBAdapter({
|
|
111
|
-
dimensions: 1536,
|
|
112
|
-
indexType: "HNSW",
|
|
113
|
-
speedupTarget: "150x-12500x",
|
|
114
|
-
});
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
### Phase 2: Data Migration
|
|
118
|
-
|
|
119
|
-
```typescript
|
|
120
|
-
// SQLite → AgentDB
|
|
121
|
-
const migrateFromSQLite = async () => {
|
|
122
|
-
const entries = await sqlite.getAll();
|
|
123
|
-
// TODO: For large datasets (>10k records), implement:
|
|
124
|
-
// 1. Batch processing (e.g., 500 records per batch)
|
|
125
|
-
// 2. Checkpoint/resume via a migration_progress table
|
|
126
|
-
// 3. Progress reporting via onProgress callback
|
|
127
|
-
for (const entry of entries) {
|
|
128
|
-
const embedding = await generateEmbedding(entry.content);
|
|
129
|
-
await agentdb.store({ ...entry, embedding });
|
|
130
|
-
}
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
// Markdown → AgentDB
|
|
134
|
-
const migrateFromMarkdown = async () => {
|
|
135
|
-
const files = await glob("**/*.md");
|
|
136
|
-
// TODO: For large datasets (>10k records), implement:
|
|
137
|
-
// 1. Batch processing (e.g., 500 records per batch)
|
|
138
|
-
// 2. Checkpoint/resume via a migration_progress table
|
|
139
|
-
// 3. Progress reporting via onProgress callback
|
|
140
|
-
for (const file of files) {
|
|
141
|
-
const content = await fs.readFile(file, "utf-8");
|
|
142
|
-
await agentdb.store({
|
|
143
|
-
id: generateId(),
|
|
144
|
-
content,
|
|
145
|
-
embedding: await generateEmbedding(content),
|
|
146
|
-
metadata: { originalFile: file },
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
## SONA Integration
|
|
153
|
-
|
|
154
|
-
### Learning Pattern Storage
|
|
155
|
-
|
|
156
|
-
```typescript
|
|
157
|
-
class SONAMemoryIntegration {
|
|
158
|
-
async storePattern(pattern: LearningPattern): Promise<void> {
|
|
159
|
-
await this.memory.store({
|
|
160
|
-
id: pattern.id,
|
|
161
|
-
content: pattern.data,
|
|
162
|
-
metadata: {
|
|
163
|
-
sonaMode: pattern.mode,
|
|
164
|
-
reward: pattern.reward,
|
|
165
|
-
adaptationTime: pattern.adaptationTime,
|
|
166
|
-
},
|
|
167
|
-
embedding: await this.generateEmbedding(pattern.data),
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
async retrieveSimilarPatterns(query: string): Promise<LearningPattern[]> {
|
|
172
|
-
return this.memory.query({
|
|
173
|
-
type: "semantic",
|
|
174
|
-
content: query,
|
|
175
|
-
filters: { type: "learning_pattern" },
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
## Performance Targets
|
|
182
|
-
|
|
183
|
-
- **Search Speed**: 150x-12,500x improvement via HNSW
|
|
184
|
-
- **Memory Usage**: 50-75% reduction through optimization
|
|
185
|
-
- **Query Latency**: <100ms for 1M+ entries
|
|
186
|
-
- **Cross-Agent Sharing**: Real-time memory synchronization
|
|
187
|
-
- **SONA Integration**: <0.05ms adaptation time
|
|
188
|
-
|
|
189
|
-
## Success Metrics
|
|
190
|
-
|
|
191
|
-
- [ ] All 7 legacy memory systems migrated to AgentDB
|
|
192
|
-
- [ ] 150x-12,500x search performance validated
|
|
193
|
-
- [ ] 50-75% memory usage reduction achieved
|
|
194
|
-
- [ ] Backward compatibility maintained
|
|
195
|
-
- [ ] SONA learning patterns integrated
|
|
196
|
-
- [ ] Cross-agent memory sharing operational
|
|
@@ -1,416 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: performance-optimization
|
|
3
|
-
description: "Achieve aggressive performance targets: 2.49x-7.47x Flash Attention speedup, 150x-12,500x search improvements, 50-75% memory reduction. Comprehensive benchmarking and optimization suite."
|
|
4
|
-
triggers:
|
|
5
|
-
- performance regression
|
|
6
|
-
- benchmark monomind
|
|
7
|
-
- Flash Attention target
|
|
8
|
-
- validate performance targets
|
|
9
|
-
- startup time too slow
|
|
10
|
-
- SONA adaptation slow
|
|
11
|
-
- performance suite
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
# Performance Optimization
|
|
15
|
-
|
|
16
|
-
## What This Skill Does
|
|
17
|
-
|
|
18
|
-
Validates and optimizes monomind to achieve industry-leading performance through Flash Attention, AgentDB HNSW indexing, and comprehensive system optimization with continuous benchmarking.
|
|
19
|
-
|
|
20
|
-
## Quick Start
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
# Initialize performance optimization
|
|
24
|
-
Task("Performance baseline", "Establish v2 performance benchmarks", "v1-performance-engineer")
|
|
25
|
-
|
|
26
|
-
# Target validation (parallel)
|
|
27
|
-
Task("Flash Attention", "Validate 2.49x-7.47x speedup target", "v1-performance-engineer")
|
|
28
|
-
Task("Search optimization", "Validate 150x-12,500x search improvement", "v1-performance-engineer")
|
|
29
|
-
Task("Memory optimization", "Achieve 50-75% memory reduction", "v1-performance-engineer")
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Performance Target Matrix
|
|
33
|
-
|
|
34
|
-
### Flash Attention Revolution
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
┌─────────────────────────────────────────┐
|
|
38
|
-
│ FLASH ATTENTION │
|
|
39
|
-
├─────────────────────────────────────────┤
|
|
40
|
-
│ Baseline: Standard attention │
|
|
41
|
-
│ Target: 2.49x - 7.47x speedup │
|
|
42
|
-
│ Memory: 50-75% reduction │
|
|
43
|
-
│ Latency: Sub-millisecond processing │
|
|
44
|
-
└─────────────────────────────────────────┘
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### Search Performance Revolution
|
|
48
|
-
|
|
49
|
-
```
|
|
50
|
-
┌─────────────────────────────────────────┐
|
|
51
|
-
│ SEARCH OPTIMIZATION │
|
|
52
|
-
├─────────────────────────────────────────┤
|
|
53
|
-
│ Current: O(n) linear search │
|
|
54
|
-
│ Target: 150x - 12,500x improvement │
|
|
55
|
-
│ Method: HNSW indexing │
|
|
56
|
-
│ Latency: <100ms for 1M+ entries │
|
|
57
|
-
└─────────────────────────────────────────┘
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
## Comprehensive Benchmark Suite
|
|
61
|
-
|
|
62
|
-
### Startup Performance
|
|
63
|
-
|
|
64
|
-
```typescript
|
|
65
|
-
class StartupBenchmarks {
|
|
66
|
-
async benchmarkColdStart(): Promise<BenchmarkResult> {
|
|
67
|
-
const startTime = performance.now();
|
|
68
|
-
|
|
69
|
-
await this.initializeCLI();
|
|
70
|
-
await this.initializeMCPServer();
|
|
71
|
-
await this.spawnTestAgent();
|
|
72
|
-
|
|
73
|
-
const totalTime = performance.now() - startTime;
|
|
74
|
-
|
|
75
|
-
return {
|
|
76
|
-
total: totalTime,
|
|
77
|
-
target: 500, // ms
|
|
78
|
-
achieved: totalTime < 500,
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
### Memory Operation Benchmarks
|
|
85
|
-
|
|
86
|
-
```typescript
|
|
87
|
-
class MemoryBenchmarks {
|
|
88
|
-
async benchmarkVectorSearch(): Promise<SearchBenchmark> {
|
|
89
|
-
const queries = this.generateTestQueries(10000);
|
|
90
|
-
|
|
91
|
-
// Baseline: Current linear search
|
|
92
|
-
const baselineTime = await this.timeOperation(() =>
|
|
93
|
-
this.currentMemory.searchAll(queries),
|
|
94
|
-
);
|
|
95
|
-
|
|
96
|
-
// Target: HNSW search
|
|
97
|
-
const hnswTime = await this.timeOperation(() =>
|
|
98
|
-
this.agentDBMemory.hnswSearchAll(queries),
|
|
99
|
-
);
|
|
100
|
-
|
|
101
|
-
const improvement = baselineTime / hnswTime;
|
|
102
|
-
|
|
103
|
-
return {
|
|
104
|
-
baseline: baselineTime,
|
|
105
|
-
hnsw: hnswTime,
|
|
106
|
-
improvement,
|
|
107
|
-
targetRange: [150, 12500],
|
|
108
|
-
achieved: improvement >= 150,
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
async benchmarkMemoryUsage(): Promise<MemoryBenchmark> {
|
|
113
|
-
const baseline = process.memoryUsage().heapUsed;
|
|
114
|
-
|
|
115
|
-
await this.loadTestDataset();
|
|
116
|
-
const withData = process.memoryUsage().heapUsed;
|
|
117
|
-
|
|
118
|
-
await this.enableOptimization();
|
|
119
|
-
const optimized = process.memoryUsage().heapUsed;
|
|
120
|
-
|
|
121
|
-
const reduction = (withData - optimized) / withData;
|
|
122
|
-
|
|
123
|
-
return {
|
|
124
|
-
baseline,
|
|
125
|
-
withData,
|
|
126
|
-
optimized,
|
|
127
|
-
reductionPercent: reduction * 100,
|
|
128
|
-
targetReduction: [50, 75],
|
|
129
|
-
achieved: reduction >= 0.5,
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
### Swarm Coordination Benchmarks
|
|
136
|
-
|
|
137
|
-
```typescript
|
|
138
|
-
class SwarmBenchmarks {
|
|
139
|
-
async benchmark15AgentCoordination(): Promise<SwarmBenchmark> {
|
|
140
|
-
const agents = await this.spawn15Agents();
|
|
141
|
-
|
|
142
|
-
// Coordination latency
|
|
143
|
-
const coordinationTime = await this.timeOperation(() =>
|
|
144
|
-
this.coordinateSwarmTask(agents),
|
|
145
|
-
);
|
|
146
|
-
|
|
147
|
-
// Task decomposition
|
|
148
|
-
const decompositionTime = await this.timeOperation(() =>
|
|
149
|
-
this.decomposeComplexTask(),
|
|
150
|
-
);
|
|
151
|
-
|
|
152
|
-
// Consensus achievement
|
|
153
|
-
const consensusTime = await this.timeOperation(() =>
|
|
154
|
-
this.achieveSwarmConsensus(agents),
|
|
155
|
-
);
|
|
156
|
-
|
|
157
|
-
return {
|
|
158
|
-
coordination: coordinationTime,
|
|
159
|
-
decomposition: decompositionTime,
|
|
160
|
-
consensus: consensusTime,
|
|
161
|
-
agentCount: 15,
|
|
162
|
-
efficiency: this.calculateEfficiency(agents),
|
|
163
|
-
};
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
### Flash Attention Benchmarks
|
|
169
|
-
|
|
170
|
-
```typescript
|
|
171
|
-
class AttentionBenchmarks {
|
|
172
|
-
async benchmarkFlashAttention(): Promise<AttentionBenchmark> {
|
|
173
|
-
const sequences = this.generateSequences([512, 1024, 2048, 4096]);
|
|
174
|
-
const results = [];
|
|
175
|
-
|
|
176
|
-
for (const sequence of sequences) {
|
|
177
|
-
// Baseline attention
|
|
178
|
-
const baselineResult = await this.benchmarkStandardAttention(sequence);
|
|
179
|
-
|
|
180
|
-
// Flash attention
|
|
181
|
-
const flashResult = await this.benchmarkFlashAttention(sequence);
|
|
182
|
-
|
|
183
|
-
results.push({
|
|
184
|
-
sequenceLength: sequence.length,
|
|
185
|
-
speedup: baselineResult.time / flashResult.time,
|
|
186
|
-
memoryReduction:
|
|
187
|
-
(baselineResult.memory - flashResult.memory) / baselineResult.memory,
|
|
188
|
-
targetSpeedup: [2.49, 7.47],
|
|
189
|
-
achieved: this.checkTarget(flashResult, [2.49, 7.47]),
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
return {
|
|
194
|
-
results,
|
|
195
|
-
averageSpeedup: this.calculateAverage(results, "speedup"),
|
|
196
|
-
averageMemoryReduction: this.calculateAverage(results, "memoryReduction"),
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
### SONA Learning Benchmarks
|
|
203
|
-
|
|
204
|
-
```typescript
|
|
205
|
-
class SONABenchmarks {
|
|
206
|
-
async benchmarkAdaptationTime(): Promise<SONABenchmark> {
|
|
207
|
-
const scenarios = [
|
|
208
|
-
"pattern_recognition",
|
|
209
|
-
"task_optimization",
|
|
210
|
-
"error_correction",
|
|
211
|
-
"performance_tuning",
|
|
212
|
-
];
|
|
213
|
-
|
|
214
|
-
const results = [];
|
|
215
|
-
|
|
216
|
-
for (const scenario of scenarios) {
|
|
217
|
-
const startTime = performance.hrtime.bigint();
|
|
218
|
-
await this.sona.adapt(scenario);
|
|
219
|
-
const endTime = performance.hrtime.bigint();
|
|
220
|
-
|
|
221
|
-
const adaptationTimeMs = Number(endTime - startTime) / 1000000;
|
|
222
|
-
|
|
223
|
-
results.push({
|
|
224
|
-
scenario,
|
|
225
|
-
adaptationTime: adaptationTimeMs,
|
|
226
|
-
target: 0.05, // ms
|
|
227
|
-
achieved: adaptationTimeMs <= 0.05,
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
return {
|
|
232
|
-
scenarios: results,
|
|
233
|
-
averageTime:
|
|
234
|
-
results.reduce((sum, r) => sum + r.adaptationTime, 0) / results.length,
|
|
235
|
-
successRate: results.filter((r) => r.achieved).length / results.length,
|
|
236
|
-
};
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
```
|
|
240
|
-
|
|
241
|
-
## Performance Monitoring Dashboard
|
|
242
|
-
|
|
243
|
-
### Real-time Metrics
|
|
244
|
-
|
|
245
|
-
```typescript
|
|
246
|
-
class PerformanceMonitor {
|
|
247
|
-
async collectMetrics(): Promise<PerformanceSnapshot> {
|
|
248
|
-
return {
|
|
249
|
-
timestamp: Date.now(),
|
|
250
|
-
flashAttention: await this.measureFlashAttention(),
|
|
251
|
-
searchPerformance: await this.measureSearchSpeed(),
|
|
252
|
-
memoryUsage: await this.measureMemoryEfficiency(),
|
|
253
|
-
startupTime: await this.measureStartupLatency(),
|
|
254
|
-
sonaAdaptation: await this.measureSONASpeed(),
|
|
255
|
-
swarmCoordination: await this.measureSwarmEfficiency(),
|
|
256
|
-
};
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
async generateReport(): Promise<PerformanceReport> {
|
|
260
|
-
const snapshot = await this.collectMetrics();
|
|
261
|
-
|
|
262
|
-
return {
|
|
263
|
-
summary: this.generateSummary(snapshot),
|
|
264
|
-
achievements: this.checkTargetAchievements(snapshot),
|
|
265
|
-
trends: this.analyzeTrends(),
|
|
266
|
-
recommendations: this.generateOptimizations(),
|
|
267
|
-
regressions: await this.detectRegressions(),
|
|
268
|
-
};
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
### Continuous Regression Detection
|
|
274
|
-
|
|
275
|
-
```typescript
|
|
276
|
-
class PerformanceRegression {
|
|
277
|
-
async detectRegressions(): Promise<RegressionReport> {
|
|
278
|
-
const current = await this.runFullBenchmark();
|
|
279
|
-
const baseline = await this.getBaseline();
|
|
280
|
-
|
|
281
|
-
const regressions = [];
|
|
282
|
-
|
|
283
|
-
for (const [metric, currentValue] of Object.entries(current)) {
|
|
284
|
-
const baselineValue = baseline[metric];
|
|
285
|
-
const change = (currentValue - baselineValue) / baselineValue;
|
|
286
|
-
|
|
287
|
-
if (change < -0.05) {
|
|
288
|
-
// 5% regression threshold
|
|
289
|
-
regressions.push({
|
|
290
|
-
metric,
|
|
291
|
-
baseline: baselineValue,
|
|
292
|
-
current: currentValue,
|
|
293
|
-
regressionPercent: change * 100,
|
|
294
|
-
severity: this.classifyRegression(change),
|
|
295
|
-
});
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
return {
|
|
300
|
-
hasRegressions: regressions.length > 0,
|
|
301
|
-
regressions,
|
|
302
|
-
recommendations: this.generateRegressionFixes(regressions),
|
|
303
|
-
};
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
```
|
|
307
|
-
|
|
308
|
-
## Optimization Strategies
|
|
309
|
-
|
|
310
|
-
### Memory Optimization
|
|
311
|
-
|
|
312
|
-
```typescript
|
|
313
|
-
class MemoryOptimization {
|
|
314
|
-
async optimizeMemoryUsage(): Promise<OptimizationResult> {
|
|
315
|
-
// Implement memory pooling
|
|
316
|
-
await this.setupMemoryPools();
|
|
317
|
-
|
|
318
|
-
// Enable garbage collection tuning
|
|
319
|
-
await this.optimizeGarbageCollection();
|
|
320
|
-
|
|
321
|
-
// Implement object reuse patterns
|
|
322
|
-
await this.setupObjectPools();
|
|
323
|
-
|
|
324
|
-
// Enable memory compression
|
|
325
|
-
await this.enableMemoryCompression();
|
|
326
|
-
|
|
327
|
-
return this.validateMemoryReduction();
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
```
|
|
331
|
-
|
|
332
|
-
### CPU Optimization
|
|
333
|
-
|
|
334
|
-
```typescript
|
|
335
|
-
class CPUOptimization {
|
|
336
|
-
async optimizeCPUUsage(): Promise<OptimizationResult> {
|
|
337
|
-
// Implement worker thread pools
|
|
338
|
-
await this.setupWorkerThreads();
|
|
339
|
-
|
|
340
|
-
// Enable CPU-specific optimizations
|
|
341
|
-
await this.enableSIMDInstructions();
|
|
342
|
-
|
|
343
|
-
// Implement task batching
|
|
344
|
-
await this.optimizeTaskBatching();
|
|
345
|
-
|
|
346
|
-
return this.validateCPUImprovement();
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
```
|
|
350
|
-
|
|
351
|
-
## Target Validation Framework
|
|
352
|
-
|
|
353
|
-
### Performance Gates
|
|
354
|
-
|
|
355
|
-
```typescript
|
|
356
|
-
class PerformanceGates {
|
|
357
|
-
async validateAllTargets(): Promise<ValidationReport> {
|
|
358
|
-
const results = await Promise.all([
|
|
359
|
-
this.validateFlashAttention(), // 2.49x-7.47x
|
|
360
|
-
this.validateSearchPerformance(), // 150x-12,500x
|
|
361
|
-
this.validateMemoryReduction(), // 50-75%
|
|
362
|
-
this.validateStartupTime(), // <500ms
|
|
363
|
-
this.validateSONAAdaptation(), // <0.05ms
|
|
364
|
-
]);
|
|
365
|
-
|
|
366
|
-
return {
|
|
367
|
-
allTargetsAchieved: results.every((r) => r.achieved),
|
|
368
|
-
results,
|
|
369
|
-
overallScore: this.calculateOverallScore(results),
|
|
370
|
-
recommendations: this.generateRecommendations(results),
|
|
371
|
-
};
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
```
|
|
375
|
-
|
|
376
|
-
## Success Metrics
|
|
377
|
-
|
|
378
|
-
### Primary Targets
|
|
379
|
-
|
|
380
|
-
- [ ] **Flash Attention**: 2.49x-7.47x speedup validated
|
|
381
|
-
- [ ] **Search Performance**: 150x-12,500x improvement confirmed
|
|
382
|
-
- [ ] **Memory Reduction**: 50-75% usage optimization achieved
|
|
383
|
-
- [ ] **Startup Time**: <500ms cold start consistently
|
|
384
|
-
- [ ] **SONA Adaptation**: <0.05ms learning response time
|
|
385
|
-
- [ ] **15-Agent Coordination**: Efficient parallel execution
|
|
386
|
-
|
|
387
|
-
### Continuous Monitoring
|
|
388
|
-
|
|
389
|
-
- [ ] **Performance Dashboard**: Real-time metrics collection
|
|
390
|
-
- [ ] **Regression Testing**: Automated performance validation
|
|
391
|
-
- [ ] **Trend Analysis**: Performance evolution tracking
|
|
392
|
-
- [ ] **Alert System**: Immediate regression notification
|
|
393
|
-
|
|
394
|
-
## Related Skills
|
|
395
|
-
|
|
396
|
-
- `agentic-integration` - Performance integration architecture
|
|
397
|
-
- `memory-unification` - Memory performance optimization
|
|
398
|
-
- `swarm-coordination` - Swarm performance coordination
|
|
399
|
-
- `security-hardening` - Secure performance patterns
|
|
400
|
-
|
|
401
|
-
## Usage Examples
|
|
402
|
-
|
|
403
|
-
### Complete Performance Validation
|
|
404
|
-
|
|
405
|
-
```bash
|
|
406
|
-
# Full performance suite
|
|
407
|
-
npm run benchmark:v1
|
|
408
|
-
|
|
409
|
-
# Specific target validation
|
|
410
|
-
npm run benchmark:flash-attention
|
|
411
|
-
npm run benchmark:agentdb-search
|
|
412
|
-
npm run benchmark:memory-optimization
|
|
413
|
-
|
|
414
|
-
# Continuous monitoring
|
|
415
|
-
npm run monitor:performance
|
|
416
|
-
```
|