claude-mpm 4.21.3__py3-none-any.whl → 5.0.2__py3-none-any.whl
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.
- claude_mpm/VERSION +1 -1
- claude_mpm/agents/BASE_PM.md +12 -0
- claude_mpm/agents/OUTPUT_STYLE.md +3 -48
- claude_mpm/agents/PM_INSTRUCTIONS.md +632 -334
- claude_mpm/agents/WORKFLOW.md +75 -2
- claude_mpm/agents/__init__.py +6 -0
- claude_mpm/agents/agent_loader.py +1 -4
- claude_mpm/agents/base_agent.json +6 -3
- claude_mpm/agents/frontmatter_validator.py +1 -1
- claude_mpm/agents/templates/{circuit_breakers.md → circuit-breakers.md} +370 -3
- claude_mpm/agents/templates/context-management-examples.md +544 -0
- claude_mpm/agents/templates/{pm_red_flags.md → pm-red-flags.md} +89 -19
- claude_mpm/agents/templates/pr-workflow-examples.md +427 -0
- claude_mpm/agents/templates/research-gate-examples.md +669 -0
- claude_mpm/agents/templates/structured-questions-examples.md +615 -0
- claude_mpm/agents/templates/ticket-completeness-examples.md +139 -0
- claude_mpm/agents/templates/ticketing-examples.md +277 -0
- claude_mpm/cli/__init__.py +38 -2
- claude_mpm/cli/commands/agent_source.py +774 -0
- claude_mpm/cli/commands/agent_state_manager.py +125 -20
- claude_mpm/cli/commands/agents.py +684 -13
- claude_mpm/cli/commands/agents_cleanup.py +210 -0
- claude_mpm/cli/commands/agents_discover.py +338 -0
- claude_mpm/cli/commands/aggregate.py +1 -1
- claude_mpm/cli/commands/analyze.py +3 -3
- claude_mpm/cli/commands/auto_configure.py +2 -6
- claude_mpm/cli/commands/cleanup.py +1 -1
- claude_mpm/cli/commands/config.py +7 -4
- claude_mpm/cli/commands/configure.py +478 -44
- claude_mpm/cli/commands/configure_agent_display.py +4 -4
- claude_mpm/cli/commands/configure_navigation.py +63 -46
- claude_mpm/cli/commands/debug.py +12 -12
- claude_mpm/cli/commands/doctor.py +10 -2
- claude_mpm/cli/commands/hook_errors.py +277 -0
- claude_mpm/cli/commands/local_deploy.py +1 -4
- claude_mpm/cli/commands/mcp_install_commands.py +1 -1
- claude_mpm/cli/commands/mpm_init/core.py +50 -2
- claude_mpm/cli/commands/mpm_init/git_activity.py +10 -10
- claude_mpm/cli/commands/mpm_init/prompts.py +6 -6
- claude_mpm/cli/commands/run.py +124 -128
- claude_mpm/cli/commands/skill_source.py +694 -0
- claude_mpm/cli/commands/skills.py +435 -1
- claude_mpm/cli/executor.py +78 -3
- claude_mpm/cli/interactive/agent_wizard.py +919 -41
- claude_mpm/cli/parsers/agent_source_parser.py +171 -0
- claude_mpm/cli/parsers/agents_parser.py +173 -4
- claude_mpm/cli/parsers/base_parser.py +49 -0
- claude_mpm/cli/parsers/config_parser.py +96 -43
- claude_mpm/cli/parsers/skill_source_parser.py +169 -0
- claude_mpm/cli/parsers/skills_parser.py +138 -0
- claude_mpm/cli/parsers/source_parser.py +138 -0
- claude_mpm/cli/startup.py +499 -84
- claude_mpm/cli/startup_display.py +480 -0
- claude_mpm/cli/utils.py +1 -1
- claude_mpm/cli_module/commands.py +1 -1
- claude_mpm/commands/{mpm-auto-configure.md → mpm-agents-auto-configure.md} +9 -0
- claude_mpm/commands/mpm-agents-detect.md +9 -0
- claude_mpm/commands/{mpm-agents.md → mpm-agents-list.md} +9 -0
- claude_mpm/commands/mpm-agents-recommend.md +9 -0
- claude_mpm/commands/{mpm-config.md → mpm-config-view.md} +9 -0
- claude_mpm/commands/mpm-doctor.md +9 -0
- claude_mpm/commands/mpm-help.md +11 -2
- claude_mpm/commands/mpm-init.md +27 -2
- claude_mpm/commands/mpm-monitor.md +9 -0
- claude_mpm/commands/{mpm-resume.md → mpm-session-resume.md} +9 -0
- claude_mpm/commands/mpm-status.md +9 -0
- claude_mpm/commands/{mpm-organize.md → mpm-ticket-organize.md} +9 -0
- claude_mpm/commands/mpm-ticket-view.md +552 -0
- claude_mpm/commands/mpm-version.md +9 -0
- claude_mpm/commands/mpm.md +10 -0
- claude_mpm/config/agent_presets.py +258 -0
- claude_mpm/config/agent_sources.py +325 -0
- claude_mpm/config/skill_sources.py +590 -0
- claude_mpm/constants.py +12 -0
- claude_mpm/core/api_validator.py +1 -1
- claude_mpm/core/claude_runner.py +17 -10
- claude_mpm/core/config.py +24 -0
- claude_mpm/core/constants.py +1 -1
- claude_mpm/core/framework/__init__.py +3 -16
- claude_mpm/core/framework/loaders/instruction_loader.py +25 -5
- claude_mpm/core/framework/processors/metadata_processor.py +1 -1
- claude_mpm/core/hook_error_memory.py +381 -0
- claude_mpm/core/hook_manager.py +41 -2
- claude_mpm/core/interactive_session.py +112 -5
- claude_mpm/core/logger.py +3 -1
- claude_mpm/core/oneshot_session.py +94 -4
- claude_mpm/dashboard/static/css/activity.css +69 -69
- claude_mpm/dashboard/static/css/connection-status.css +10 -10
- claude_mpm/dashboard/static/css/dashboard.css +15 -15
- claude_mpm/dashboard/static/js/components/activity-tree.js +178 -178
- claude_mpm/dashboard/static/js/components/agent-hierarchy.js +101 -101
- claude_mpm/dashboard/static/js/components/agent-inference.js +31 -31
- claude_mpm/dashboard/static/js/components/build-tracker.js +59 -59
- claude_mpm/dashboard/static/js/components/code-simple.js +107 -107
- claude_mpm/dashboard/static/js/components/connection-debug.js +101 -101
- claude_mpm/dashboard/static/js/components/diff-viewer.js +113 -113
- claude_mpm/dashboard/static/js/components/event-viewer.js +12 -12
- claude_mpm/dashboard/static/js/components/file-change-tracker.js +57 -57
- claude_mpm/dashboard/static/js/components/file-change-viewer.js +74 -74
- claude_mpm/dashboard/static/js/components/file-tool-tracker.js +6 -6
- claude_mpm/dashboard/static/js/components/file-viewer.js +42 -42
- claude_mpm/dashboard/static/js/components/module-viewer.js +27 -27
- claude_mpm/dashboard/static/js/components/session-manager.js +14 -14
- claude_mpm/dashboard/static/js/components/socket-manager.js +1 -1
- claude_mpm/dashboard/static/js/components/ui-state-manager.js +14 -14
- claude_mpm/dashboard/static/js/components/unified-data-viewer.js +110 -110
- claude_mpm/dashboard/static/js/components/working-directory.js +8 -8
- claude_mpm/dashboard/static/js/connection-manager.js +76 -76
- claude_mpm/dashboard/static/js/dashboard.js +76 -58
- claude_mpm/dashboard/static/js/extension-error-handler.js +22 -22
- claude_mpm/dashboard/static/js/socket-client.js +138 -121
- claude_mpm/dashboard/templates/code_simple.html +23 -23
- claude_mpm/dashboard/templates/index.html +18 -18
- claude_mpm/experimental/cli_enhancements.py +1 -5
- claude_mpm/hooks/claude_hooks/event_handlers.py +3 -1
- claude_mpm/hooks/claude_hooks/hook_handler.py +24 -7
- claude_mpm/hooks/claude_hooks/installer.py +45 -0
- claude_mpm/hooks/failure_learning/__init__.py +2 -8
- claude_mpm/hooks/failure_learning/failure_detection_hook.py +1 -6
- claude_mpm/hooks/failure_learning/fix_detection_hook.py +1 -6
- claude_mpm/hooks/failure_learning/learning_extraction_hook.py +1 -6
- claude_mpm/hooks/kuzu_response_hook.py +1 -5
- claude_mpm/hooks/templates/pre_tool_use_simple.py +78 -0
- claude_mpm/hooks/templates/pre_tool_use_template.py +323 -0
- claude_mpm/models/git_repository.py +198 -0
- claude_mpm/scripts/claude-hook-handler.sh +3 -3
- claude_mpm/scripts/start_activity_logging.py +3 -1
- claude_mpm/services/agents/agent_builder.py +45 -9
- claude_mpm/services/agents/agent_preset_service.py +238 -0
- claude_mpm/services/agents/agent_selection_service.py +484 -0
- claude_mpm/services/agents/auto_deploy_index_parser.py +569 -0
- claude_mpm/services/agents/deployment/agent_deployment.py +126 -2
- claude_mpm/services/agents/deployment/agent_discovery_service.py +105 -73
- claude_mpm/services/agents/deployment/agent_format_converter.py +1 -1
- claude_mpm/services/agents/deployment/agent_lifecycle_manager.py +1 -5
- claude_mpm/services/agents/deployment/agent_metrics_collector.py +3 -3
- claude_mpm/services/agents/deployment/agent_restore_handler.py +1 -4
- claude_mpm/services/agents/deployment/agent_template_builder.py +236 -15
- claude_mpm/services/agents/deployment/agents_directory_resolver.py +101 -15
- claude_mpm/services/agents/deployment/async_agent_deployment.py +2 -1
- claude_mpm/services/agents/deployment/facade/deployment_facade.py +3 -3
- claude_mpm/services/agents/deployment/multi_source_deployment_service.py +115 -15
- claude_mpm/services/agents/deployment/pipeline/pipeline_executor.py +2 -2
- claude_mpm/services/agents/deployment/refactored_agent_deployment_service.py +1 -4
- claude_mpm/services/agents/deployment/remote_agent_discovery_service.py +363 -0
- claude_mpm/services/agents/deployment/single_agent_deployer.py +2 -2
- claude_mpm/services/agents/deployment/system_instructions_deployer.py +168 -46
- claude_mpm/services/agents/deployment/validation/deployment_validator.py +2 -2
- claude_mpm/services/agents/git_source_manager.py +629 -0
- claude_mpm/services/agents/loading/framework_agent_loader.py +9 -12
- claude_mpm/services/agents/local_template_manager.py +50 -10
- claude_mpm/services/agents/single_tier_deployment_service.py +696 -0
- claude_mpm/services/agents/sources/__init__.py +13 -0
- claude_mpm/services/agents/sources/agent_sync_state.py +516 -0
- claude_mpm/services/agents/sources/git_source_sync_service.py +1055 -0
- claude_mpm/services/agents/startup_sync.py +239 -0
- claude_mpm/services/agents/toolchain_detector.py +474 -0
- claude_mpm/services/cli/session_pause_manager.py +1 -1
- claude_mpm/services/cli/unified_dashboard_manager.py +1 -1
- claude_mpm/services/command_deployment_service.py +92 -1
- claude_mpm/services/core/interfaces/__init__.py +1 -3
- claude_mpm/services/core/interfaces/health.py +1 -4
- claude_mpm/services/core/models/__init__.py +2 -11
- claude_mpm/services/diagnostics/checks/__init__.py +4 -0
- claude_mpm/services/diagnostics/checks/agent_check.py +0 -2
- claude_mpm/services/diagnostics/checks/agent_sources_check.py +577 -0
- claude_mpm/services/diagnostics/checks/instructions_check.py +1 -2
- claude_mpm/services/diagnostics/checks/mcp_check.py +0 -1
- claude_mpm/services/diagnostics/checks/monitor_check.py +0 -1
- claude_mpm/services/diagnostics/checks/skill_sources_check.py +587 -0
- claude_mpm/services/diagnostics/diagnostic_runner.py +9 -0
- claude_mpm/services/diagnostics/doctor_reporter.py +40 -10
- claude_mpm/services/event_bus/direct_relay.py +3 -3
- claude_mpm/services/event_bus/event_bus.py +36 -3
- claude_mpm/services/events/consumers/logging.py +1 -2
- claude_mpm/services/git/__init__.py +21 -0
- claude_mpm/services/git/git_operations_service.py +494 -0
- claude_mpm/services/github/__init__.py +21 -0
- claude_mpm/services/github/github_cli_service.py +397 -0
- claude_mpm/services/infrastructure/monitoring/__init__.py +1 -5
- claude_mpm/services/infrastructure/monitoring/aggregator.py +1 -6
- claude_mpm/services/infrastructure/monitoring/resources.py +1 -1
- claude_mpm/services/instructions/__init__.py +9 -0
- claude_mpm/services/instructions/instruction_cache_service.py +374 -0
- claude_mpm/services/local_ops/__init__.py +3 -13
- claude_mpm/services/local_ops/health_checks/__init__.py +1 -3
- claude_mpm/services/local_ops/health_manager.py +1 -4
- claude_mpm/services/local_ops/process_manager.py +1 -1
- claude_mpm/services/local_ops/resource_monitor.py +2 -2
- claude_mpm/services/mcp_gateway/config/configuration.py +1 -1
- claude_mpm/services/mcp_gateway/server/mcp_gateway.py +1 -6
- claude_mpm/services/mcp_gateway/server/stdio_server.py +0 -2
- claude_mpm/services/mcp_gateway/tools/document_summarizer.py +1 -1
- claude_mpm/services/mcp_gateway/tools/kuzu_memory_service.py +6 -2
- claude_mpm/services/memory/optimizer.py +1 -1
- claude_mpm/services/model/model_router.py +8 -9
- claude_mpm/services/monitor/daemon.py +1 -1
- claude_mpm/services/monitor/server.py +2 -2
- claude_mpm/services/native_agent_converter.py +356 -0
- claude_mpm/services/port_manager.py +1 -1
- claude_mpm/services/pr/__init__.py +14 -0
- claude_mpm/services/pr/pr_template_service.py +329 -0
- claude_mpm/services/project/documentation_manager.py +2 -1
- claude_mpm/services/project/toolchain_analyzer.py +3 -1
- claude_mpm/services/runner_configuration_service.py +1 -0
- claude_mpm/services/self_upgrade_service.py +165 -7
- claude_mpm/services/skills/__init__.py +18 -0
- claude_mpm/services/skills/git_skill_source_manager.py +1169 -0
- claude_mpm/services/skills/skill_discovery_service.py +568 -0
- claude_mpm/services/skills_config.py +547 -0
- claude_mpm/services/skills_deployer.py +955 -0
- claude_mpm/services/socketio/handlers/connection.py +1 -1
- claude_mpm/services/socketio/handlers/git.py +2 -2
- claude_mpm/services/socketio/server/core.py +1 -4
- claude_mpm/services/socketio/server/main.py +1 -3
- claude_mpm/services/system_instructions_service.py +1 -3
- claude_mpm/services/unified/analyzer_strategies/performance_analyzer.py +0 -3
- claude_mpm/services/unified/analyzer_strategies/security_analyzer.py +0 -1
- claude_mpm/services/unified/deployment_strategies/cloud_strategies.py +1 -1
- claude_mpm/services/unified/deployment_strategies/vercel.py +1 -5
- claude_mpm/services/unified/unified_deployment.py +1 -5
- claude_mpm/services/version_control/conflict_resolution.py +6 -4
- claude_mpm/services/visualization/__init__.py +1 -5
- claude_mpm/services/visualization/mermaid_generator.py +2 -3
- claude_mpm/skills/bundled/infrastructure/env-manager/scripts/validate_env.py +576 -0
- claude_mpm/skills/bundled/performance-profiling.md +6 -0
- claude_mpm/skills/bundled/testing/webapp-testing/scripts/with_server.py +2 -2
- claude_mpm/skills/skills_registry.py +0 -1
- claude_mpm/templates/questions/__init__.py +38 -0
- claude_mpm/templates/questions/base.py +193 -0
- claude_mpm/templates/questions/pr_strategy.py +311 -0
- claude_mpm/templates/questions/project_init.py +385 -0
- claude_mpm/templates/questions/ticket_mgmt.py +394 -0
- claude_mpm/tools/__main__.py +8 -8
- claude_mpm/tools/code_tree_analyzer/analysis.py +1 -1
- claude_mpm/utils/agent_dependency_loader.py +80 -13
- claude_mpm/utils/dependency_cache.py +3 -1
- claude_mpm/utils/gitignore.py +241 -0
- claude_mpm/utils/log_cleanup.py +3 -3
- claude_mpm/utils/progress.py +383 -0
- claude_mpm/utils/robust_installer.py +3 -5
- claude_mpm/utils/structured_questions.py +619 -0
- {claude_mpm-4.21.3.dist-info → claude_mpm-5.0.2.dist-info}/METADATA +429 -59
- {claude_mpm-4.21.3.dist-info → claude_mpm-5.0.2.dist-info}/RECORD +252 -425
- claude_mpm/agents/templates/.claude-mpm/memories/README.md +0 -17
- claude_mpm/agents/templates/.claude-mpm/memories/engineer_memories.md +0 -3
- claude_mpm/agents/templates/agent-manager.json +0 -273
- claude_mpm/agents/templates/agentic-coder-optimizer.json +0 -248
- claude_mpm/agents/templates/api_qa.json +0 -180
- claude_mpm/agents/templates/clerk-ops.json +0 -235
- claude_mpm/agents/templates/code_analyzer.json +0 -101
- claude_mpm/agents/templates/content-agent.json +0 -358
- claude_mpm/agents/templates/dart_engineer.json +0 -307
- claude_mpm/agents/templates/data_engineer.json +0 -225
- claude_mpm/agents/templates/documentation.json +0 -211
- claude_mpm/agents/templates/engineer.json +0 -210
- claude_mpm/agents/templates/gcp_ops_agent.json +0 -253
- claude_mpm/agents/templates/golang_engineer.json +0 -270
- claude_mpm/agents/templates/imagemagick.json +0 -264
- claude_mpm/agents/templates/java_engineer.json +0 -346
- claude_mpm/agents/templates/local_ops_agent.json +0 -1840
- claude_mpm/agents/templates/logs/prompts/agent_engineer_20250826_014258_728.md +0 -39
- claude_mpm/agents/templates/logs/prompts/agent_engineer_20250901_010124_142.md +0 -400
- claude_mpm/agents/templates/memory_manager.json +0 -158
- claude_mpm/agents/templates/nextjs_engineer.json +0 -285
- claude_mpm/agents/templates/ops.json +0 -185
- claude_mpm/agents/templates/php-engineer.json +0 -287
- claude_mpm/agents/templates/product_owner.json +0 -338
- claude_mpm/agents/templates/project_organizer.json +0 -140
- claude_mpm/agents/templates/prompt-engineer.json +0 -737
- claude_mpm/agents/templates/python_engineer.json +0 -387
- claude_mpm/agents/templates/qa.json +0 -242
- claude_mpm/agents/templates/react_engineer.json +0 -238
- claude_mpm/agents/templates/refactoring_engineer.json +0 -276
- claude_mpm/agents/templates/research.json +0 -188
- claude_mpm/agents/templates/ruby-engineer.json +0 -280
- claude_mpm/agents/templates/rust_engineer.json +0 -275
- claude_mpm/agents/templates/security.json +0 -202
- claude_mpm/agents/templates/svelte-engineer.json +0 -225
- claude_mpm/agents/templates/ticketing.json +0 -177
- claude_mpm/agents/templates/typescript_engineer.json +0 -285
- claude_mpm/agents/templates/vercel_ops_agent.json +0 -412
- claude_mpm/agents/templates/version_control.json +0 -157
- claude_mpm/agents/templates/web_qa.json +0 -399
- claude_mpm/agents/templates/web_ui.json +0 -189
- claude_mpm/commands/mpm-tickets.md +0 -102
- claude_mpm/dashboard/.claude-mpm/socketio-instances.json +0 -1
- claude_mpm/dashboard/react/components/DataInspector/DataInspector.module.css +0 -188
- claude_mpm/dashboard/react/components/EventViewer/EventViewer.module.css +0 -156
- claude_mpm/dashboard/react/components/shared/ConnectionStatus.module.css +0 -38
- claude_mpm/dashboard/react/components/shared/FilterBar.module.css +0 -92
- claude_mpm/dashboard/static/archive/activity_dashboard_fixed.html +0 -248
- claude_mpm/dashboard/static/archive/activity_dashboard_test.html +0 -61
- claude_mpm/dashboard/static/archive/test_activity_connection.html +0 -179
- claude_mpm/dashboard/static/archive/test_claude_tree_tab.html +0 -68
- claude_mpm/dashboard/static/archive/test_dashboard.html +0 -409
- claude_mpm/dashboard/static/archive/test_dashboard_fixed.html +0 -519
- claude_mpm/dashboard/static/archive/test_dashboard_verification.html +0 -181
- claude_mpm/dashboard/static/archive/test_file_data.html +0 -315
- claude_mpm/dashboard/static/archive/test_file_tree_empty_state.html +0 -243
- claude_mpm/dashboard/static/archive/test_file_tree_fix.html +0 -234
- claude_mpm/dashboard/static/archive/test_file_tree_rename.html +0 -117
- claude_mpm/dashboard/static/archive/test_file_tree_tab.html +0 -115
- claude_mpm/dashboard/static/archive/test_file_viewer.html +0 -224
- claude_mpm/dashboard/static/archive/test_final_activity.html +0 -220
- claude_mpm/dashboard/static/archive/test_tab_fix.html +0 -139
- claude_mpm/dashboard/static/built/assets/events.DjpNxWNo.css +0 -1
- claude_mpm/dashboard/static/built/components/activity-tree.js +0 -2
- claude_mpm/dashboard/static/built/components/agent-hierarchy.js +0 -777
- claude_mpm/dashboard/static/built/components/agent-inference.js +0 -2
- claude_mpm/dashboard/static/built/components/build-tracker.js +0 -333
- claude_mpm/dashboard/static/built/components/code-simple.js +0 -857
- claude_mpm/dashboard/static/built/components/code-tree/tree-breadcrumb.js +0 -353
- claude_mpm/dashboard/static/built/components/code-tree/tree-constants.js +0 -235
- claude_mpm/dashboard/static/built/components/code-tree/tree-search.js +0 -409
- claude_mpm/dashboard/static/built/components/code-tree/tree-utils.js +0 -435
- claude_mpm/dashboard/static/built/components/code-tree.js +0 -2
- claude_mpm/dashboard/static/built/components/code-viewer.js +0 -2
- claude_mpm/dashboard/static/built/components/connection-debug.js +0 -654
- claude_mpm/dashboard/static/built/components/diff-viewer.js +0 -891
- claude_mpm/dashboard/static/built/components/event-processor.js +0 -2
- claude_mpm/dashboard/static/built/components/event-viewer.js +0 -2
- claude_mpm/dashboard/static/built/components/export-manager.js +0 -2
- claude_mpm/dashboard/static/built/components/file-change-tracker.js +0 -443
- claude_mpm/dashboard/static/built/components/file-change-viewer.js +0 -690
- claude_mpm/dashboard/static/built/components/file-tool-tracker.js +0 -2
- claude_mpm/dashboard/static/built/components/file-viewer.js +0 -2
- claude_mpm/dashboard/static/built/components/hud-library-loader.js +0 -2
- claude_mpm/dashboard/static/built/components/hud-manager.js +0 -2
- claude_mpm/dashboard/static/built/components/hud-visualizer.js +0 -2
- claude_mpm/dashboard/static/built/components/module-viewer.js +0 -2
- claude_mpm/dashboard/static/built/components/nav-bar.js +0 -145
- claude_mpm/dashboard/static/built/components/page-structure.js +0 -429
- claude_mpm/dashboard/static/built/components/session-manager.js +0 -2
- claude_mpm/dashboard/static/built/components/socket-manager.js +0 -2
- claude_mpm/dashboard/static/built/components/ui-state-manager.js +0 -2
- claude_mpm/dashboard/static/built/components/unified-data-viewer.js +0 -2
- claude_mpm/dashboard/static/built/components/working-directory.js +0 -2
- claude_mpm/dashboard/static/built/connection-manager.js +0 -536
- claude_mpm/dashboard/static/built/dashboard.js +0 -2
- claude_mpm/dashboard/static/built/extension-error-handler.js +0 -164
- claude_mpm/dashboard/static/built/react/events.js +0 -30
- claude_mpm/dashboard/static/built/shared/dom-helpers.js +0 -396
- claude_mpm/dashboard/static/built/shared/event-bus.js +0 -330
- claude_mpm/dashboard/static/built/shared/event-filter-service.js +0 -540
- claude_mpm/dashboard/static/built/shared/logger.js +0 -385
- claude_mpm/dashboard/static/built/shared/page-structure.js +0 -249
- claude_mpm/dashboard/static/built/shared/tooltip-service.js +0 -253
- claude_mpm/dashboard/static/built/socket-client.js +0 -2
- claude_mpm/dashboard/static/built/tab-isolation-fix.js +0 -185
- claude_mpm/dashboard/static/dist/assets/events.DjpNxWNo.css +0 -1
- claude_mpm/dashboard/static/dist/components/activity-tree.js +0 -2
- claude_mpm/dashboard/static/dist/components/agent-inference.js +0 -2
- claude_mpm/dashboard/static/dist/components/code-tree.js +0 -2
- claude_mpm/dashboard/static/dist/components/code-viewer.js +0 -2
- claude_mpm/dashboard/static/dist/components/event-processor.js +0 -2
- claude_mpm/dashboard/static/dist/components/event-viewer.js +0 -2
- claude_mpm/dashboard/static/dist/components/export-manager.js +0 -2
- claude_mpm/dashboard/static/dist/components/file-tool-tracker.js +0 -2
- claude_mpm/dashboard/static/dist/components/file-viewer.js +0 -2
- claude_mpm/dashboard/static/dist/components/hud-library-loader.js +0 -2
- claude_mpm/dashboard/static/dist/components/hud-manager.js +0 -2
- claude_mpm/dashboard/static/dist/components/hud-visualizer.js +0 -2
- claude_mpm/dashboard/static/dist/components/module-viewer.js +0 -2
- claude_mpm/dashboard/static/dist/components/session-manager.js +0 -2
- claude_mpm/dashboard/static/dist/components/socket-manager.js +0 -2
- claude_mpm/dashboard/static/dist/components/ui-state-manager.js +0 -2
- claude_mpm/dashboard/static/dist/components/unified-data-viewer.js +0 -2
- claude_mpm/dashboard/static/dist/components/working-directory.js +0 -2
- claude_mpm/dashboard/static/dist/dashboard.js +0 -2
- claude_mpm/dashboard/static/dist/react/events.js +0 -30
- claude_mpm/dashboard/static/dist/socket-client.js +0 -2
- claude_mpm/dashboard/static/events.html +0 -607
- claude_mpm/dashboard/static/index.html +0 -635
- claude_mpm/dashboard/static/js/shared/dom-helpers.js +0 -396
- claude_mpm/dashboard/static/js/shared/event-bus.js +0 -330
- claude_mpm/dashboard/static/js/shared/logger.js +0 -385
- claude_mpm/dashboard/static/js/shared/tooltip-service.js +0 -253
- claude_mpm/dashboard/static/js/stores/dashboard-store.js +0 -562
- claude_mpm/dashboard/static/legacy/activity.html +0 -736
- claude_mpm/dashboard/static/legacy/agents.html +0 -786
- claude_mpm/dashboard/static/legacy/files.html +0 -747
- claude_mpm/dashboard/static/legacy/tools.html +0 -831
- claude_mpm/dashboard/static/monitors.html +0 -431
- claude_mpm/dashboard/static/production/events.html +0 -659
- claude_mpm/dashboard/static/production/main.html +0 -698
- claude_mpm/dashboard/static/production/monitors.html +0 -483
- claude_mpm/dashboard/static/test-archive/dashboard.html +0 -635
- claude_mpm/dashboard/static/test-archive/debug-events.html +0 -147
- claude_mpm/dashboard/static/test-archive/test-navigation.html +0 -256
- claude_mpm/dashboard/static/test-archive/test-react-exports.html +0 -180
- claude_mpm/dashboard/static/test-archive/test_debug.html +0 -25
- claude_mpm/skills/bundled/collaboration/brainstorming/SKILL.md +0 -79
- claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/SKILL.md +0 -178
- claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/references/agent-prompts.md +0 -577
- claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/references/coordination-patterns.md +0 -467
- claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/references/examples.md +0 -537
- claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/references/troubleshooting.md +0 -730
- claude_mpm/skills/bundled/collaboration/requesting-code-review/SKILL.md +0 -112
- claude_mpm/skills/bundled/collaboration/requesting-code-review/references/code-reviewer-template.md +0 -146
- claude_mpm/skills/bundled/collaboration/requesting-code-review/references/review-examples.md +0 -412
- claude_mpm/skills/bundled/collaboration/writing-plans/SKILL.md +0 -81
- claude_mpm/skills/bundled/collaboration/writing-plans/references/best-practices.md +0 -362
- claude_mpm/skills/bundled/collaboration/writing-plans/references/plan-structure-templates.md +0 -312
- claude_mpm/skills/bundled/debugging/root-cause-tracing/SKILL.md +0 -152
- claude_mpm/skills/bundled/debugging/root-cause-tracing/references/advanced-techniques.md +0 -668
- claude_mpm/skills/bundled/debugging/root-cause-tracing/references/examples.md +0 -587
- claude_mpm/skills/bundled/debugging/root-cause-tracing/references/integration.md +0 -438
- claude_mpm/skills/bundled/debugging/root-cause-tracing/references/tracing-techniques.md +0 -391
- claude_mpm/skills/bundled/debugging/systematic-debugging/CREATION-LOG.md +0 -119
- claude_mpm/skills/bundled/debugging/systematic-debugging/SKILL.md +0 -148
- claude_mpm/skills/bundled/debugging/systematic-debugging/references/anti-patterns.md +0 -483
- claude_mpm/skills/bundled/debugging/systematic-debugging/references/examples.md +0 -452
- claude_mpm/skills/bundled/debugging/systematic-debugging/references/troubleshooting.md +0 -449
- claude_mpm/skills/bundled/debugging/systematic-debugging/references/workflow.md +0 -411
- claude_mpm/skills/bundled/debugging/systematic-debugging/test-academic.md +0 -14
- claude_mpm/skills/bundled/debugging/systematic-debugging/test-pressure-1.md +0 -58
- claude_mpm/skills/bundled/debugging/systematic-debugging/test-pressure-2.md +0 -68
- claude_mpm/skills/bundled/debugging/systematic-debugging/test-pressure-3.md +0 -69
- claude_mpm/skills/bundled/debugging/verification-before-completion/SKILL.md +0 -131
- claude_mpm/skills/bundled/debugging/verification-before-completion/references/gate-function.md +0 -325
- claude_mpm/skills/bundled/debugging/verification-before-completion/references/integration-and-workflows.md +0 -490
- claude_mpm/skills/bundled/debugging/verification-before-completion/references/red-flags-and-failures.md +0 -425
- claude_mpm/skills/bundled/debugging/verification-before-completion/references/verification-patterns.md +0 -499
- claude_mpm/skills/bundled/main/artifacts-builder/SKILL.md +0 -86
- claude_mpm/skills/bundled/main/internal-comms/SKILL.md +0 -43
- claude_mpm/skills/bundled/main/internal-comms/examples/3p-updates.md +0 -47
- claude_mpm/skills/bundled/main/internal-comms/examples/company-newsletter.md +0 -65
- claude_mpm/skills/bundled/main/internal-comms/examples/faq-answers.md +0 -30
- claude_mpm/skills/bundled/main/internal-comms/examples/general-comms.md +0 -16
- claude_mpm/skills/bundled/main/mcp-builder/SKILL.md +0 -160
- claude_mpm/skills/bundled/main/mcp-builder/reference/design_principles.md +0 -412
- claude_mpm/skills/bundled/main/mcp-builder/reference/evaluation.md +0 -602
- claude_mpm/skills/bundled/main/mcp-builder/reference/mcp_best_practices.md +0 -915
- claude_mpm/skills/bundled/main/mcp-builder/reference/node_mcp_server.md +0 -916
- claude_mpm/skills/bundled/main/mcp-builder/reference/python_mcp_server.md +0 -752
- claude_mpm/skills/bundled/main/mcp-builder/reference/workflow.md +0 -1237
- claude_mpm/skills/bundled/main/skill-creator/SKILL.md +0 -189
- claude_mpm/skills/bundled/main/skill-creator/references/best-practices.md +0 -500
- claude_mpm/skills/bundled/main/skill-creator/references/creation-workflow.md +0 -464
- claude_mpm/skills/bundled/main/skill-creator/references/examples.md +0 -619
- claude_mpm/skills/bundled/main/skill-creator/references/progressive-disclosure.md +0 -437
- claude_mpm/skills/bundled/main/skill-creator/references/skill-structure.md +0 -231
- claude_mpm/skills/bundled/php/espocrm-development/SKILL.md +0 -170
- claude_mpm/skills/bundled/php/espocrm-development/references/architecture.md +0 -602
- claude_mpm/skills/bundled/php/espocrm-development/references/common-tasks.md +0 -821
- claude_mpm/skills/bundled/php/espocrm-development/references/development-workflow.md +0 -742
- claude_mpm/skills/bundled/php/espocrm-development/references/frontend-customization.md +0 -726
- claude_mpm/skills/bundled/php/espocrm-development/references/hooks-and-services.md +0 -764
- claude_mpm/skills/bundled/php/espocrm-development/references/testing-debugging.md +0 -831
- claude_mpm/skills/bundled/rust/desktop-applications/SKILL.md +0 -226
- claude_mpm/skills/bundled/rust/desktop-applications/references/architecture-patterns.md +0 -901
- claude_mpm/skills/bundled/rust/desktop-applications/references/native-gui-frameworks.md +0 -901
- claude_mpm/skills/bundled/rust/desktop-applications/references/platform-integration.md +0 -775
- claude_mpm/skills/bundled/rust/desktop-applications/references/state-management.md +0 -937
- claude_mpm/skills/bundled/rust/desktop-applications/references/tauri-framework.md +0 -770
- claude_mpm/skills/bundled/rust/desktop-applications/references/testing-deployment.md +0 -961
- claude_mpm/skills/bundled/testing/condition-based-waiting/SKILL.md +0 -119
- claude_mpm/skills/bundled/testing/condition-based-waiting/references/patterns-and-implementation.md +0 -253
- claude_mpm/skills/bundled/testing/test-driven-development/SKILL.md +0 -145
- claude_mpm/skills/bundled/testing/test-driven-development/references/anti-patterns.md +0 -543
- claude_mpm/skills/bundled/testing/test-driven-development/references/examples.md +0 -741
- claude_mpm/skills/bundled/testing/test-driven-development/references/integration.md +0 -470
- claude_mpm/skills/bundled/testing/test-driven-development/references/philosophy.md +0 -458
- claude_mpm/skills/bundled/testing/test-driven-development/references/workflow.md +0 -639
- claude_mpm/skills/bundled/testing/testing-anti-patterns/SKILL.md +0 -140
- claude_mpm/skills/bundled/testing/testing-anti-patterns/references/completeness-anti-patterns.md +0 -572
- claude_mpm/skills/bundled/testing/testing-anti-patterns/references/core-anti-patterns.md +0 -411
- claude_mpm/skills/bundled/testing/testing-anti-patterns/references/detection-guide.md +0 -569
- claude_mpm/skills/bundled/testing/testing-anti-patterns/references/tdd-connection.md +0 -695
- claude_mpm/skills/bundled/testing/webapp-testing/SKILL.md +0 -184
- claude_mpm/skills/bundled/testing/webapp-testing/decision-tree.md +0 -459
- claude_mpm/skills/bundled/testing/webapp-testing/playwright-patterns.md +0 -479
- claude_mpm/skills/bundled/testing/webapp-testing/reconnaissance-pattern.md +0 -687
- claude_mpm/skills/bundled/testing/webapp-testing/server-management.md +0 -758
- claude_mpm/skills/bundled/testing/webapp-testing/troubleshooting.md +0 -868
- /claude_mpm/agents/templates/{git_file_tracking.md → git-file-tracking.md} +0 -0
- /claude_mpm/agents/templates/{pm_examples.md → pm-examples.md} +0 -0
- /claude_mpm/agents/templates/{response_format.md → response-format.md} +0 -0
- /claude_mpm/agents/templates/{validation_templates.md → validation-templates.md} +0 -0
- {claude_mpm-4.21.3.dist-info → claude_mpm-5.0.2.dist-info}/WHEEL +0 -0
- {claude_mpm-4.21.3.dist-info → claude_mpm-5.0.2.dist-info}/entry_points.txt +0 -0
- {claude_mpm-4.21.3.dist-info → claude_mpm-5.0.2.dist-info}/licenses/LICENSE +0 -0
- {claude_mpm-4.21.3.dist-info → claude_mpm-5.0.2.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,474 @@
|
|
|
1
|
+
"""Toolchain detection service for auto-configuring agent deployment.
|
|
2
|
+
|
|
3
|
+
WHY: Automatically detect project toolchain (languages, frameworks, build tools)
|
|
4
|
+
to recommend appropriate agents. This eliminates manual agent selection and
|
|
5
|
+
ensures projects get the right agents for their technology stack.
|
|
6
|
+
|
|
7
|
+
Design Decision: File Pattern-Based Detection
|
|
8
|
+
|
|
9
|
+
Instead of AST parsing or dependency analysis, we use simple file pattern
|
|
10
|
+
matching. This is fast, reliable, and works across all languages without
|
|
11
|
+
requiring language-specific parsers.
|
|
12
|
+
|
|
13
|
+
Trade-offs:
|
|
14
|
+
- Speed: O(n) directory scan vs. O(n²) dependency graph analysis
|
|
15
|
+
- Simplicity: Pattern matching vs. complex AST parsing
|
|
16
|
+
- Reliability: File presence is more stable than version-specific APIs
|
|
17
|
+
- Coverage: May miss some edge cases but handles 95% of projects
|
|
18
|
+
|
|
19
|
+
Example Patterns:
|
|
20
|
+
- Python: *.py files, pyproject.toml, requirements.txt
|
|
21
|
+
- JavaScript/TypeScript: *.js, *.ts, package.json
|
|
22
|
+
- FastAPI: pyproject.toml with [tool.poetry.dependencies.fastapi]
|
|
23
|
+
- Docker: Dockerfile, docker-compose.yml
|
|
24
|
+
|
|
25
|
+
Performance:
|
|
26
|
+
- Time Complexity: O(n) where n = number of files scanned
|
|
27
|
+
- Space Complexity: O(1) for detection state
|
|
28
|
+
- Max Depth: Configurable (default: 3) to avoid deep recursion
|
|
29
|
+
- Exclusions: .git/, venv/, node_modules/, __pycache__/ ignored
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
import logging
|
|
33
|
+
from pathlib import Path
|
|
34
|
+
from typing import Dict, List, Set
|
|
35
|
+
|
|
36
|
+
logger = logging.getLogger(__name__)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class ToolchainDetector:
|
|
40
|
+
"""Detect project toolchain from file patterns.
|
|
41
|
+
|
|
42
|
+
Scans project directory to identify:
|
|
43
|
+
- Languages (Python, JavaScript, Go, Rust, Java, Ruby, PHP)
|
|
44
|
+
- Frameworks (FastAPI, Django, React, Next.js, Express, Spring)
|
|
45
|
+
- Build Tools (Make, Docker, npm, pip)
|
|
46
|
+
|
|
47
|
+
Then maps detected toolchain to recommended agents.
|
|
48
|
+
|
|
49
|
+
Usage:
|
|
50
|
+
>>> detector = ToolchainDetector()
|
|
51
|
+
>>> toolchain = detector.detect_toolchain(Path("/project"))
|
|
52
|
+
>>> agents = detector.recommend_agents(toolchain)
|
|
53
|
+
>>> print(agents)
|
|
54
|
+
['python-engineer', 'ops', 'qa', 'research', 'documentation', 'ticketing']
|
|
55
|
+
"""
|
|
56
|
+
|
|
57
|
+
# Language detection patterns (file extensions and config files)
|
|
58
|
+
LANGUAGE_PATTERNS = {
|
|
59
|
+
"python": {
|
|
60
|
+
"extensions": [".py", ".pyi"],
|
|
61
|
+
"config_files": [
|
|
62
|
+
"pyproject.toml",
|
|
63
|
+
"setup.py",
|
|
64
|
+
"setup.cfg",
|
|
65
|
+
"requirements.txt",
|
|
66
|
+
],
|
|
67
|
+
},
|
|
68
|
+
"javascript": {
|
|
69
|
+
"extensions": [".js", ".jsx", ".mjs"],
|
|
70
|
+
"config_files": ["package.json", ".eslintrc.js"],
|
|
71
|
+
},
|
|
72
|
+
"typescript": {
|
|
73
|
+
"extensions": [".ts", ".tsx"],
|
|
74
|
+
"config_files": ["tsconfig.json", "package.json"],
|
|
75
|
+
},
|
|
76
|
+
"go": {
|
|
77
|
+
"extensions": [".go"],
|
|
78
|
+
"config_files": ["go.mod", "go.sum"],
|
|
79
|
+
},
|
|
80
|
+
"rust": {
|
|
81
|
+
"extensions": [".rs"],
|
|
82
|
+
"config_files": ["Cargo.toml", "Cargo.lock"],
|
|
83
|
+
},
|
|
84
|
+
"java": {
|
|
85
|
+
"extensions": [".java"],
|
|
86
|
+
"config_files": ["pom.xml", "build.gradle", "build.gradle.kts"],
|
|
87
|
+
},
|
|
88
|
+
"ruby": {
|
|
89
|
+
"extensions": [".rb"],
|
|
90
|
+
"config_files": ["Gemfile", "Rakefile"],
|
|
91
|
+
},
|
|
92
|
+
"php": {
|
|
93
|
+
"extensions": [".php"],
|
|
94
|
+
"config_files": ["composer.json", "composer.lock"],
|
|
95
|
+
},
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
# Framework detection patterns (config files and content markers)
|
|
99
|
+
FRAMEWORK_PATTERNS = {
|
|
100
|
+
"fastapi": {
|
|
101
|
+
"files": ["pyproject.toml", "requirements.txt"],
|
|
102
|
+
"keywords": ["fastapi"],
|
|
103
|
+
},
|
|
104
|
+
"django": {
|
|
105
|
+
"files": ["manage.py", "settings.py", "wsgi.py"],
|
|
106
|
+
"keywords": ["django"],
|
|
107
|
+
},
|
|
108
|
+
"react": {
|
|
109
|
+
"files": ["package.json"],
|
|
110
|
+
"keywords": ["react"],
|
|
111
|
+
},
|
|
112
|
+
"nextjs": {
|
|
113
|
+
"files": ["next.config.js", "next.config.ts", "package.json"],
|
|
114
|
+
"keywords": ["next"],
|
|
115
|
+
},
|
|
116
|
+
"express": {
|
|
117
|
+
"files": ["package.json"],
|
|
118
|
+
"keywords": ["express"],
|
|
119
|
+
},
|
|
120
|
+
"spring": {
|
|
121
|
+
"files": ["pom.xml", "build.gradle"],
|
|
122
|
+
"keywords": ["spring-boot", "spring-framework"],
|
|
123
|
+
},
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
# Build tool detection patterns
|
|
127
|
+
BUILD_TOOL_PATTERNS = {
|
|
128
|
+
"make": ["Makefile"],
|
|
129
|
+
"docker": ["Dockerfile", "docker-compose.yml", "docker-compose.yaml"],
|
|
130
|
+
"npm": ["package.json", "package-lock.json"],
|
|
131
|
+
"pip": ["requirements.txt", "pyproject.toml", "Pipfile"],
|
|
132
|
+
"gradle": ["build.gradle", "build.gradle.kts", "gradlew"],
|
|
133
|
+
"maven": ["pom.xml", "mvnw"],
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
# Toolchain to agent mapping
|
|
137
|
+
TOOLCHAIN_TO_AGENTS = {
|
|
138
|
+
# Language-specific engineers
|
|
139
|
+
"python": ["python-engineer"],
|
|
140
|
+
"javascript": ["javascript-engineer-agent"],
|
|
141
|
+
"typescript": ["typescript-engineer"],
|
|
142
|
+
"go": ["golang-engineer"],
|
|
143
|
+
"rust": ["rust-engineer"],
|
|
144
|
+
"java": ["java-engineer"],
|
|
145
|
+
"ruby": ["ruby-engineer"],
|
|
146
|
+
"php": ["php-engineer"],
|
|
147
|
+
# Framework-specific engineers (these may override language defaults)
|
|
148
|
+
"fastapi": ["python-engineer"],
|
|
149
|
+
"django": ["python-engineer"],
|
|
150
|
+
"react": ["react-engineer"],
|
|
151
|
+
"nextjs": ["nextjs-engineer"],
|
|
152
|
+
"express": ["javascript-engineer-agent"],
|
|
153
|
+
"spring": ["java-engineer"],
|
|
154
|
+
# Ops agents based on tools
|
|
155
|
+
"docker": ["ops", "local-ops-agent"],
|
|
156
|
+
"vercel": ["vercel-ops-agent"],
|
|
157
|
+
"gcp": ["gcp-ops-agent"],
|
|
158
|
+
"make": ["ops"],
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
# Core agents always included
|
|
162
|
+
CORE_AGENTS = [
|
|
163
|
+
"qa",
|
|
164
|
+
"research",
|
|
165
|
+
"documentation",
|
|
166
|
+
"ticketing",
|
|
167
|
+
]
|
|
168
|
+
|
|
169
|
+
# Directories to exclude from scanning
|
|
170
|
+
EXCLUDED_DIRS = {
|
|
171
|
+
".git",
|
|
172
|
+
".svn",
|
|
173
|
+
".hg",
|
|
174
|
+
"__pycache__",
|
|
175
|
+
"node_modules",
|
|
176
|
+
"venv",
|
|
177
|
+
".venv",
|
|
178
|
+
"env",
|
|
179
|
+
".env",
|
|
180
|
+
"virtualenv",
|
|
181
|
+
"dist",
|
|
182
|
+
"build",
|
|
183
|
+
".pytest_cache",
|
|
184
|
+
".mypy_cache",
|
|
185
|
+
".tox",
|
|
186
|
+
"target", # Maven/Gradle
|
|
187
|
+
"vendor", # Ruby/PHP
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
def __init__(self, max_scan_depth: int = 3):
|
|
191
|
+
"""Initialize toolchain detector.
|
|
192
|
+
|
|
193
|
+
Args:
|
|
194
|
+
max_scan_depth: Maximum directory depth to scan (default: 3)
|
|
195
|
+
Deeper projects may need higher values, but
|
|
196
|
+
scanning is limited to prevent performance issues.
|
|
197
|
+
"""
|
|
198
|
+
self.max_scan_depth = max_scan_depth
|
|
199
|
+
logger.debug(f"ToolchainDetector initialized (max_depth={max_scan_depth})")
|
|
200
|
+
|
|
201
|
+
def detect_toolchain(self, project_path: Path) -> Dict[str, List[str]]:
|
|
202
|
+
"""Detect complete project toolchain.
|
|
203
|
+
|
|
204
|
+
Scans project directory to identify languages, frameworks, and build tools.
|
|
205
|
+
|
|
206
|
+
Args:
|
|
207
|
+
project_path: Path to project root directory
|
|
208
|
+
|
|
209
|
+
Returns:
|
|
210
|
+
Dictionary with detected toolchain:
|
|
211
|
+
{
|
|
212
|
+
"languages": ["python", "javascript"],
|
|
213
|
+
"frameworks": ["fastapi", "react"],
|
|
214
|
+
"build_tools": ["docker", "make"]
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
Example:
|
|
218
|
+
>>> detector = ToolchainDetector()
|
|
219
|
+
>>> toolchain = detector.detect_toolchain(Path("/my-project"))
|
|
220
|
+
>>> print(toolchain)
|
|
221
|
+
{
|
|
222
|
+
"languages": ["python"],
|
|
223
|
+
"frameworks": ["fastapi"],
|
|
224
|
+
"build_tools": ["docker", "make"]
|
|
225
|
+
}
|
|
226
|
+
"""
|
|
227
|
+
if not project_path.exists():
|
|
228
|
+
logger.warning(f"Project path does not exist: {project_path}")
|
|
229
|
+
return {"languages": [], "frameworks": [], "build_tools": []}
|
|
230
|
+
|
|
231
|
+
if not project_path.is_dir():
|
|
232
|
+
logger.warning(f"Project path is not a directory: {project_path}")
|
|
233
|
+
return {"languages": [], "frameworks": [], "build_tools": []}
|
|
234
|
+
|
|
235
|
+
logger.info(f"Detecting toolchain in {project_path}")
|
|
236
|
+
|
|
237
|
+
# Scan project files
|
|
238
|
+
scanned_files = self._scan_files(project_path)
|
|
239
|
+
logger.debug(f"Scanned {len(scanned_files)} files")
|
|
240
|
+
|
|
241
|
+
# Detect each component
|
|
242
|
+
languages = self.detect_languages(scanned_files, project_path)
|
|
243
|
+
frameworks = self.detect_frameworks(scanned_files, project_path)
|
|
244
|
+
build_tools = self.detect_build_tools(scanned_files, project_path)
|
|
245
|
+
|
|
246
|
+
toolchain = {
|
|
247
|
+
"languages": languages,
|
|
248
|
+
"frameworks": frameworks,
|
|
249
|
+
"build_tools": build_tools,
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
logger.info(
|
|
253
|
+
f"Detected toolchain: {len(languages)} languages, "
|
|
254
|
+
f"{len(frameworks)} frameworks, {len(build_tools)} build tools"
|
|
255
|
+
)
|
|
256
|
+
|
|
257
|
+
return toolchain
|
|
258
|
+
|
|
259
|
+
def detect_languages(
|
|
260
|
+
self, scanned_files: List[Path], project_path: Path
|
|
261
|
+
) -> List[str]:
|
|
262
|
+
"""Detect programming languages from file extensions and config files.
|
|
263
|
+
|
|
264
|
+
Args:
|
|
265
|
+
scanned_files: List of files from project scan
|
|
266
|
+
project_path: Project root path
|
|
267
|
+
|
|
268
|
+
Returns:
|
|
269
|
+
List of detected language names (e.g., ["python", "javascript"])
|
|
270
|
+
"""
|
|
271
|
+
detected_languages: Set[str] = set()
|
|
272
|
+
|
|
273
|
+
# Check each language pattern
|
|
274
|
+
for language, patterns in self.LANGUAGE_PATTERNS.items():
|
|
275
|
+
# Check file extensions
|
|
276
|
+
for file_path in scanned_files:
|
|
277
|
+
if file_path.suffix in patterns["extensions"]:
|
|
278
|
+
detected_languages.add(language)
|
|
279
|
+
logger.debug(
|
|
280
|
+
f"Detected {language} from extension: {file_path.name}"
|
|
281
|
+
)
|
|
282
|
+
break # Found this language, move to next
|
|
283
|
+
|
|
284
|
+
# Check config files (relative to project root)
|
|
285
|
+
for config_file in patterns["config_files"]:
|
|
286
|
+
if (project_path / config_file).exists():
|
|
287
|
+
detected_languages.add(language)
|
|
288
|
+
logger.debug(f"Detected {language} from config: {config_file}")
|
|
289
|
+
break
|
|
290
|
+
|
|
291
|
+
return sorted(detected_languages)
|
|
292
|
+
|
|
293
|
+
def detect_frameworks(
|
|
294
|
+
self, scanned_files: List[Path], project_path: Path
|
|
295
|
+
) -> List[str]:
|
|
296
|
+
"""Detect frameworks from config files and content markers.
|
|
297
|
+
|
|
298
|
+
Args:
|
|
299
|
+
scanned_files: List of files from project scan
|
|
300
|
+
project_path: Project root path
|
|
301
|
+
|
|
302
|
+
Returns:
|
|
303
|
+
List of detected framework names (e.g., ["fastapi", "react"])
|
|
304
|
+
"""
|
|
305
|
+
detected_frameworks: Set[str] = set()
|
|
306
|
+
|
|
307
|
+
for framework, patterns in self.FRAMEWORK_PATTERNS.items():
|
|
308
|
+
# Check if required files exist
|
|
309
|
+
framework_files_exist = any(
|
|
310
|
+
(project_path / file_name).exists() for file_name in patterns["files"]
|
|
311
|
+
)
|
|
312
|
+
|
|
313
|
+
if not framework_files_exist:
|
|
314
|
+
continue
|
|
315
|
+
|
|
316
|
+
# Check for keyword markers in config files
|
|
317
|
+
for config_file in patterns["files"]:
|
|
318
|
+
config_path = project_path / config_file
|
|
319
|
+
if not config_path.exists():
|
|
320
|
+
continue
|
|
321
|
+
|
|
322
|
+
try:
|
|
323
|
+
content = config_path.read_text(encoding="utf-8", errors="ignore")
|
|
324
|
+
content_lower = content.lower()
|
|
325
|
+
|
|
326
|
+
# Check if any keyword is present
|
|
327
|
+
if any(
|
|
328
|
+
keyword in content_lower for keyword in patterns["keywords"]
|
|
329
|
+
):
|
|
330
|
+
detected_frameworks.add(framework)
|
|
331
|
+
logger.debug(
|
|
332
|
+
f"Detected {framework} from keywords in {config_file}"
|
|
333
|
+
)
|
|
334
|
+
break
|
|
335
|
+
|
|
336
|
+
except Exception as e:
|
|
337
|
+
logger.debug(f"Failed to read {config_path}: {e}")
|
|
338
|
+
|
|
339
|
+
return sorted(detected_frameworks)
|
|
340
|
+
|
|
341
|
+
def detect_build_tools(
|
|
342
|
+
self, scanned_files: List[Path], project_path: Path
|
|
343
|
+
) -> List[str]:
|
|
344
|
+
"""Detect build tools from config files.
|
|
345
|
+
|
|
346
|
+
Args:
|
|
347
|
+
scanned_files: List of files from project scan
|
|
348
|
+
project_path: Project root path
|
|
349
|
+
|
|
350
|
+
Returns:
|
|
351
|
+
List of detected build tool names (e.g., ["docker", "make"])
|
|
352
|
+
"""
|
|
353
|
+
detected_tools: Set[str] = set()
|
|
354
|
+
|
|
355
|
+
for tool, config_files in self.BUILD_TOOL_PATTERNS.items():
|
|
356
|
+
for config_file in config_files:
|
|
357
|
+
if (project_path / config_file).exists():
|
|
358
|
+
detected_tools.add(tool)
|
|
359
|
+
logger.debug(f"Detected {tool} from {config_file}")
|
|
360
|
+
break # Found this tool, move to next
|
|
361
|
+
|
|
362
|
+
return sorted(detected_tools)
|
|
363
|
+
|
|
364
|
+
def recommend_agents(self, toolchain: Dict[str, List[str]]) -> List[str]:
|
|
365
|
+
"""Map detected toolchain to recommended agents.
|
|
366
|
+
|
|
367
|
+
Combines language-specific, framework-specific, and ops agents with
|
|
368
|
+
core agents (qa, research, documentation, ticketing).
|
|
369
|
+
|
|
370
|
+
Args:
|
|
371
|
+
toolchain: Detected toolchain dictionary with languages, frameworks, tools
|
|
372
|
+
|
|
373
|
+
Returns:
|
|
374
|
+
List of recommended agent IDs, deduplicated
|
|
375
|
+
|
|
376
|
+
Example:
|
|
377
|
+
>>> toolchain = {
|
|
378
|
+
... "languages": ["python"],
|
|
379
|
+
... "frameworks": ["fastapi"],
|
|
380
|
+
... "build_tools": ["docker", "make"]
|
|
381
|
+
... }
|
|
382
|
+
>>> agents = detector.recommend_agents(toolchain)
|
|
383
|
+
>>> print(agents)
|
|
384
|
+
['python-engineer', 'ops', 'local-ops-agent', 'qa', 'research',
|
|
385
|
+
'documentation', 'ticketing']
|
|
386
|
+
"""
|
|
387
|
+
recommended: Set[str] = set()
|
|
388
|
+
|
|
389
|
+
# Add core agents (always included)
|
|
390
|
+
recommended.update(self.CORE_AGENTS)
|
|
391
|
+
|
|
392
|
+
# Map languages to agents
|
|
393
|
+
for language in toolchain.get("languages", []):
|
|
394
|
+
if language in self.TOOLCHAIN_TO_AGENTS:
|
|
395
|
+
recommended.update(self.TOOLCHAIN_TO_AGENTS[language])
|
|
396
|
+
logger.debug(
|
|
397
|
+
f"Mapped language '{language}' to agents: "
|
|
398
|
+
f"{self.TOOLCHAIN_TO_AGENTS[language]}"
|
|
399
|
+
)
|
|
400
|
+
|
|
401
|
+
# Map frameworks to agents (may override language defaults)
|
|
402
|
+
for framework in toolchain.get("frameworks", []):
|
|
403
|
+
if framework in self.TOOLCHAIN_TO_AGENTS:
|
|
404
|
+
recommended.update(self.TOOLCHAIN_TO_AGENTS[framework])
|
|
405
|
+
logger.debug(
|
|
406
|
+
f"Mapped framework '{framework}' to agents: "
|
|
407
|
+
f"{self.TOOLCHAIN_TO_AGENTS[framework]}"
|
|
408
|
+
)
|
|
409
|
+
|
|
410
|
+
# Map build tools to agents
|
|
411
|
+
for tool in toolchain.get("build_tools", []):
|
|
412
|
+
if tool in self.TOOLCHAIN_TO_AGENTS:
|
|
413
|
+
recommended.update(self.TOOLCHAIN_TO_AGENTS[tool])
|
|
414
|
+
logger.debug(
|
|
415
|
+
f"Mapped build tool '{tool}' to agents: "
|
|
416
|
+
f"{self.TOOLCHAIN_TO_AGENTS[tool]}"
|
|
417
|
+
)
|
|
418
|
+
|
|
419
|
+
# Always include generic engineer as fallback
|
|
420
|
+
if not any(
|
|
421
|
+
agent.endswith("-engineer") or agent == "engineer" for agent in recommended
|
|
422
|
+
):
|
|
423
|
+
recommended.add("engineer")
|
|
424
|
+
logger.debug("Added generic 'engineer' as fallback")
|
|
425
|
+
|
|
426
|
+
agents_list = sorted(recommended)
|
|
427
|
+
logger.info(f"Recommended {len(agents_list)} agents: {agents_list}")
|
|
428
|
+
return agents_list
|
|
429
|
+
|
|
430
|
+
def _scan_files(self, project_path: Path) -> List[Path]:
|
|
431
|
+
"""Scan project files up to max_scan_depth.
|
|
432
|
+
|
|
433
|
+
Excludes common non-source directories (.git/, venv/, node_modules/, etc.)
|
|
434
|
+
|
|
435
|
+
Args:
|
|
436
|
+
project_path: Project root directory
|
|
437
|
+
|
|
438
|
+
Returns:
|
|
439
|
+
List of file paths within scan depth
|
|
440
|
+
|
|
441
|
+
Performance:
|
|
442
|
+
- Iterative BFS to avoid recursion stack limits
|
|
443
|
+
- Early termination on depth limit
|
|
444
|
+
- Directory exclusion to skip irrelevant paths
|
|
445
|
+
"""
|
|
446
|
+
files: List[Path] = []
|
|
447
|
+
to_scan: List[tuple[Path, int]] = [(project_path, 0)] # (path, depth)
|
|
448
|
+
|
|
449
|
+
while to_scan:
|
|
450
|
+
current_path, depth = to_scan.pop(0)
|
|
451
|
+
|
|
452
|
+
# Stop at max depth
|
|
453
|
+
if depth > self.max_scan_depth:
|
|
454
|
+
continue
|
|
455
|
+
|
|
456
|
+
try:
|
|
457
|
+
for item in current_path.iterdir():
|
|
458
|
+
# Skip excluded directories
|
|
459
|
+
if item.is_dir():
|
|
460
|
+
if item.name not in self.EXCLUDED_DIRS:
|
|
461
|
+
to_scan.append((item, depth + 1))
|
|
462
|
+
elif item.is_file():
|
|
463
|
+
files.append(item)
|
|
464
|
+
|
|
465
|
+
except PermissionError:
|
|
466
|
+
logger.debug(f"Permission denied: {current_path}")
|
|
467
|
+
except Exception as e:
|
|
468
|
+
logger.debug(f"Error scanning {current_path}: {e}")
|
|
469
|
+
|
|
470
|
+
return files
|
|
471
|
+
|
|
472
|
+
def __repr__(self) -> str:
|
|
473
|
+
"""Return string representation."""
|
|
474
|
+
return f"ToolchainDetector(max_scan_depth={self.max_scan_depth})"
|
|
@@ -420,7 +420,7 @@ class SessionPauseManager:
|
|
|
420
420
|
try:
|
|
421
421
|
latest_file = self.pause_dir / "LATEST-SESSION.txt"
|
|
422
422
|
content = f"""Latest Session: {session_id}
|
|
423
|
-
Paused At: {datetime.now(timezone.utc).strftime(
|
|
423
|
+
Paused At: {datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M:%S %Z")}
|
|
424
424
|
Project: {self.project_path}
|
|
425
425
|
|
|
426
426
|
Files:
|
|
@@ -392,7 +392,7 @@ class UnifiedDashboardManager(IUnifiedDashboardManager):
|
|
|
392
392
|
port = self.find_available_port()
|
|
393
393
|
|
|
394
394
|
# Use force_restart to ensure we're using the latest code
|
|
395
|
-
success,
|
|
395
|
+
success, _browser_opened = self.start_dashboard(
|
|
396
396
|
port=port, background=True, open_browser=False, force_restart=force_restart
|
|
397
397
|
)
|
|
398
398
|
|
|
@@ -4,11 +4,14 @@ This service handles:
|
|
|
4
4
|
1. Copying command markdown files from source to user's ~/.claude/commands directory
|
|
5
5
|
2. Creating the commands directory if it doesn't exist
|
|
6
6
|
3. Overwriting existing commands to ensure they're up-to-date
|
|
7
|
+
4. Parsing and validating YAML frontmatter for namespace metadata (Phase 1 - 1M-400)
|
|
7
8
|
"""
|
|
8
9
|
|
|
9
10
|
import shutil
|
|
10
11
|
from pathlib import Path
|
|
11
|
-
from typing import Any, Dict, List
|
|
12
|
+
from typing import Any, Dict, List, Optional, Tuple
|
|
13
|
+
|
|
14
|
+
import yaml
|
|
12
15
|
|
|
13
16
|
from claude_mpm.core.base_service import BaseService
|
|
14
17
|
from claude_mpm.core.logger import get_logger
|
|
@@ -39,6 +42,79 @@ class CommandDeploymentService(BaseService):
|
|
|
39
42
|
async def _cleanup(self) -> None:
|
|
40
43
|
"""Cleanup service resources."""
|
|
41
44
|
|
|
45
|
+
def _parse_frontmatter(self, content: str) -> Tuple[Optional[Dict[str, Any]], str]:
|
|
46
|
+
"""Parse YAML frontmatter from command file.
|
|
47
|
+
|
|
48
|
+
Ticket: 1M-400 Phase 1 - Enhanced Flat Naming with Namespace Metadata
|
|
49
|
+
|
|
50
|
+
Args:
|
|
51
|
+
content: Command file content
|
|
52
|
+
|
|
53
|
+
Returns:
|
|
54
|
+
Tuple of (frontmatter_dict, content_without_frontmatter)
|
|
55
|
+
If no frontmatter found, returns (None, original_content)
|
|
56
|
+
"""
|
|
57
|
+
if not content.startswith("---\n"):
|
|
58
|
+
return None, content
|
|
59
|
+
|
|
60
|
+
try:
|
|
61
|
+
# Split on closing ---
|
|
62
|
+
parts = content.split("\n---\n", 1)
|
|
63
|
+
if len(parts) != 2:
|
|
64
|
+
return None, content
|
|
65
|
+
|
|
66
|
+
frontmatter_str = parts[0].replace("---\n", "", 1)
|
|
67
|
+
body = parts[1]
|
|
68
|
+
|
|
69
|
+
frontmatter = yaml.safe_load(frontmatter_str)
|
|
70
|
+
return frontmatter, body
|
|
71
|
+
except yaml.YAMLError as e:
|
|
72
|
+
self.logger.warning(f"YAML parsing error: {e}")
|
|
73
|
+
return None, content
|
|
74
|
+
|
|
75
|
+
def _validate_frontmatter(
|
|
76
|
+
self, frontmatter: Dict[str, Any], filepath: Path
|
|
77
|
+
) -> List[str]:
|
|
78
|
+
"""Validate frontmatter schema.
|
|
79
|
+
|
|
80
|
+
Ticket: 1M-400 Phase 1 - Enhanced Flat Naming with Namespace Metadata
|
|
81
|
+
|
|
82
|
+
Args:
|
|
83
|
+
frontmatter: Parsed frontmatter dictionary
|
|
84
|
+
filepath: Path to command file (for error reporting)
|
|
85
|
+
|
|
86
|
+
Returns:
|
|
87
|
+
List of validation errors (empty if valid)
|
|
88
|
+
"""
|
|
89
|
+
errors = []
|
|
90
|
+
required_fields = ["namespace", "command", "category", "description"]
|
|
91
|
+
|
|
92
|
+
for field in required_fields:
|
|
93
|
+
if field not in frontmatter:
|
|
94
|
+
errors.append(f"Missing required field: {field}")
|
|
95
|
+
|
|
96
|
+
# Validate category
|
|
97
|
+
valid_categories = ["agents", "config", "tickets", "session", "system"]
|
|
98
|
+
if (
|
|
99
|
+
"category" in frontmatter
|
|
100
|
+
and frontmatter["category"] not in valid_categories
|
|
101
|
+
):
|
|
102
|
+
errors.append(
|
|
103
|
+
f"Invalid category: {frontmatter['category']} "
|
|
104
|
+
f"(must be one of {valid_categories})"
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
# Validate data types
|
|
108
|
+
if "aliases" in frontmatter and not isinstance(frontmatter["aliases"], list):
|
|
109
|
+
errors.append("Field 'aliases' must be a list")
|
|
110
|
+
|
|
111
|
+
if "deprecated_aliases" in frontmatter and not isinstance(
|
|
112
|
+
frontmatter["deprecated_aliases"], list
|
|
113
|
+
):
|
|
114
|
+
errors.append("Field 'deprecated_aliases' must be a list")
|
|
115
|
+
|
|
116
|
+
return errors
|
|
117
|
+
|
|
42
118
|
def deploy_commands(self, force: bool = False) -> Dict[str, Any]:
|
|
43
119
|
"""Deploy MPM slash commands to user's Claude configuration.
|
|
44
120
|
|
|
@@ -83,6 +159,21 @@ class CommandDeploymentService(BaseService):
|
|
|
83
159
|
target_file = self.target_dir / source_file.name
|
|
84
160
|
|
|
85
161
|
try:
|
|
162
|
+
# Validate frontmatter if present (1M-400 Phase 1)
|
|
163
|
+
content = source_file.read_text()
|
|
164
|
+
frontmatter, _ = self._parse_frontmatter(content)
|
|
165
|
+
|
|
166
|
+
if frontmatter:
|
|
167
|
+
validation_errors = self._validate_frontmatter(
|
|
168
|
+
frontmatter, source_file
|
|
169
|
+
)
|
|
170
|
+
if validation_errors:
|
|
171
|
+
self.logger.warning(
|
|
172
|
+
f"Frontmatter validation issues in {source_file.name}: "
|
|
173
|
+
f"{'; '.join(validation_errors)}"
|
|
174
|
+
)
|
|
175
|
+
# Continue deployment but log warnings
|
|
176
|
+
|
|
86
177
|
# Check if file exists and if we should overwrite
|
|
87
178
|
if (
|
|
88
179
|
target_file.exists()
|
|
@@ -87,9 +87,7 @@ from .process import ( # Process lifecycle; State persistence
|
|
|
87
87
|
)
|
|
88
88
|
|
|
89
89
|
# Project interfaces (project analysis and toolchain detection)
|
|
90
|
-
from .project import
|
|
91
|
-
IToolchainAnalyzer,
|
|
92
|
-
)
|
|
90
|
+
from .project import IToolchainAnalyzer # Toolchain analysis
|
|
93
91
|
|
|
94
92
|
# Restart interfaces (auto-restart management)
|
|
95
93
|
from .restart import ( # Crash detection; Restart policy; Restart orchestration
|
|
@@ -29,10 +29,7 @@ USAGE:
|
|
|
29
29
|
from abc import ABC, abstractmethod
|
|
30
30
|
from typing import List
|
|
31
31
|
|
|
32
|
-
from claude_mpm.services.core.models.health import
|
|
33
|
-
DeploymentHealth,
|
|
34
|
-
HealthCheckResult,
|
|
35
|
-
)
|
|
32
|
+
from claude_mpm.services.core.models.health import DeploymentHealth, HealthCheckResult
|
|
36
33
|
|
|
37
34
|
|
|
38
35
|
class IHealthCheck(ABC):
|
|
@@ -27,17 +27,8 @@ from .process import (
|
|
|
27
27
|
StartConfig,
|
|
28
28
|
is_port_protected,
|
|
29
29
|
)
|
|
30
|
-
from .restart import
|
|
31
|
-
|
|
32
|
-
RestartAttempt,
|
|
33
|
-
RestartConfig,
|
|
34
|
-
RestartHistory,
|
|
35
|
-
)
|
|
36
|
-
from .stability import (
|
|
37
|
-
LogPatternMatch,
|
|
38
|
-
MemoryTrend,
|
|
39
|
-
ResourceUsage,
|
|
40
|
-
)
|
|
30
|
+
from .restart import CircuitBreakerState, RestartAttempt, RestartConfig, RestartHistory
|
|
31
|
+
from .stability import LogPatternMatch, MemoryTrend, ResourceUsage
|
|
41
32
|
from .toolchain import (
|
|
42
33
|
ConfidenceLevel,
|
|
43
34
|
DeploymentTarget,
|
|
@@ -6,6 +6,7 @@ diagnostic components.
|
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
8
|
from .agent_check import AgentCheck
|
|
9
|
+
from .agent_sources_check import AgentSourcesCheck
|
|
9
10
|
from .base_check import BaseDiagnosticCheck
|
|
10
11
|
from .claude_code_check import ClaudeCodeCheck
|
|
11
12
|
from .common_issues_check import CommonIssuesCheck
|
|
@@ -16,10 +17,12 @@ from .instructions_check import InstructionsCheck
|
|
|
16
17
|
from .mcp_check import MCPCheck
|
|
17
18
|
from .mcp_services_check import MCPServicesCheck
|
|
18
19
|
from .monitor_check import MonitorCheck
|
|
20
|
+
from .skill_sources_check import SkillSourcesCheck
|
|
19
21
|
from .startup_log_check import StartupLogCheck
|
|
20
22
|
|
|
21
23
|
__all__ = [
|
|
22
24
|
"AgentCheck",
|
|
25
|
+
"AgentSourcesCheck",
|
|
23
26
|
"BaseDiagnosticCheck",
|
|
24
27
|
"ClaudeCodeCheck",
|
|
25
28
|
"CommonIssuesCheck",
|
|
@@ -30,5 +33,6 @@ __all__ = [
|
|
|
30
33
|
"MCPCheck",
|
|
31
34
|
"MCPServicesCheck",
|
|
32
35
|
"MonitorCheck",
|
|
36
|
+
"SkillSourcesCheck",
|
|
33
37
|
"StartupLogCheck",
|
|
34
38
|
]
|