claude-mpm 4.16.0__py3-none-any.whl → 4.25.10__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.
Potentially problematic release.
This version of claude-mpm might be problematic. Click here for more details.
- claude_mpm/VERSION +1 -1
- claude_mpm/agents/BASE_ENGINEER.md +286 -0
- claude_mpm/agents/BASE_PM.md +272 -23
- claude_mpm/agents/OUTPUT_STYLE.md +3 -48
- claude_mpm/agents/PM_INSTRUCTIONS.md +1821 -32
- claude_mpm/agents/WORKFLOW.md +75 -2
- claude_mpm/agents/agent_loader.py +4 -4
- claude_mpm/agents/base_agent.json +6 -3
- claude_mpm/agents/frontmatter_validator.py +1 -1
- claude_mpm/agents/templates/api_qa.json +5 -2
- claude_mpm/agents/templates/circuit_breakers.md +108 -2
- claude_mpm/agents/templates/documentation.json +33 -6
- claude_mpm/agents/templates/engineer.json +5 -1
- claude_mpm/agents/templates/javascript_engineer_agent.json +380 -0
- claude_mpm/agents/templates/php-engineer.json +10 -4
- claude_mpm/agents/templates/pm_red_flags.md +89 -19
- claude_mpm/agents/templates/project_organizer.json +7 -3
- claude_mpm/agents/templates/python_engineer.json +8 -3
- claude_mpm/agents/templates/qa.json +2 -1
- claude_mpm/agents/templates/react_engineer.json +1 -0
- claude_mpm/agents/templates/research.json +82 -12
- claude_mpm/agents/templates/rust_engineer.json +12 -7
- claude_mpm/agents/templates/security.json +4 -4
- claude_mpm/agents/templates/svelte-engineer.json +225 -0
- claude_mpm/agents/templates/tauri_engineer.json +274 -0
- claude_mpm/agents/templates/ticketing.json +10 -6
- claude_mpm/agents/templates/version_control.json +4 -2
- claude_mpm/agents/templates/web_qa.json +2 -1
- claude_mpm/cli/README.md +253 -0
- claude_mpm/cli/__init__.py +11 -1
- claude_mpm/cli/commands/__init__.py +2 -0
- claude_mpm/cli/commands/aggregate.py +1 -1
- claude_mpm/cli/commands/analyze.py +3 -3
- claude_mpm/cli/commands/cleanup.py +1 -1
- claude_mpm/cli/commands/configure_agent_display.py +4 -4
- claude_mpm/cli/commands/debug.py +12 -12
- claude_mpm/cli/commands/hook_errors.py +277 -0
- claude_mpm/cli/commands/mcp_install_commands.py +1 -1
- claude_mpm/cli/commands/mcp_install_commands.py.backup +284 -0
- claude_mpm/cli/commands/mpm_init/README.md +365 -0
- claude_mpm/cli/commands/mpm_init/__init__.py +73 -0
- claude_mpm/cli/commands/mpm_init/core.py +573 -0
- claude_mpm/cli/commands/mpm_init/display.py +341 -0
- claude_mpm/cli/commands/mpm_init/git_activity.py +427 -0
- claude_mpm/cli/commands/mpm_init/modes.py +397 -0
- claude_mpm/cli/commands/mpm_init/prompts.py +442 -0
- claude_mpm/cli/commands/mpm_init_cli.py +396 -0
- claude_mpm/cli/commands/mpm_init_handler.py +67 -1
- claude_mpm/cli/commands/run.py +124 -128
- claude_mpm/cli/commands/skills.py +922 -0
- claude_mpm/cli/executor.py +58 -0
- claude_mpm/cli/interactive/agent_wizard.py +5 -5
- claude_mpm/cli/parsers/base_parser.py +35 -0
- claude_mpm/cli/parsers/mpm_init_parser.py +42 -0
- claude_mpm/cli/parsers/skills_parser.py +275 -0
- claude_mpm/cli/startup.py +168 -8
- 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/cli_module/refactoring_guide.md +253 -0
- claude_mpm/commands/mpm-auto-configure.md +52 -0
- claude_mpm/commands/mpm-help.md +6 -0
- claude_mpm/commands/mpm-init.md +130 -8
- claude_mpm/commands/mpm-resume.md +372 -0
- claude_mpm/commands/mpm-tickets.md +56 -7
- claude_mpm/commands/mpm-version.md +113 -0
- claude_mpm/commands/mpm.md +2 -0
- claude_mpm/config/agent_capabilities.yaml +658 -0
- claude_mpm/config/agent_config.py +2 -2
- claude_mpm/config/async_logging_config.yaml +145 -0
- claude_mpm/constants.py +24 -0
- claude_mpm/core/.claude-mpm/logs/hooks_20250730.log +34 -0
- claude_mpm/core/api_validator.py +1 -1
- claude_mpm/core/claude_runner.py +14 -1
- claude_mpm/core/config.py +50 -0
- claude_mpm/core/constants.py +1 -1
- claude_mpm/core/factories.py +1 -1
- 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 +48 -3
- claude_mpm/core/interfaces.py +56 -1
- claude_mpm/core/logger.py +3 -1
- claude_mpm/core/oneshot_session.py +39 -0
- claude_mpm/core/optimized_agent_loader.py +3 -3
- claude_mpm/d2/.gitignore +22 -0
- claude_mpm/d2/ARCHITECTURE_COMPARISON.md +273 -0
- claude_mpm/d2/FLASK_INTEGRATION.md +156 -0
- claude_mpm/d2/IMPLEMENTATION_SUMMARY.md +452 -0
- claude_mpm/d2/QUICKSTART.md +186 -0
- claude_mpm/d2/README.md +232 -0
- claude_mpm/d2/STORE_FIX_SUMMARY.md +167 -0
- claude_mpm/d2/SVELTE5_STORES_GUIDE.md +180 -0
- claude_mpm/d2/TESTING.md +288 -0
- claude_mpm/d2/index.html +118 -0
- claude_mpm/d2/package.json +19 -0
- claude_mpm/d2/src/App.svelte +110 -0
- claude_mpm/d2/src/components/Header.svelte +153 -0
- claude_mpm/d2/src/components/MainContent.svelte +74 -0
- claude_mpm/d2/src/components/Sidebar.svelte +85 -0
- claude_mpm/d2/src/components/tabs/EventsTab.svelte +326 -0
- claude_mpm/d2/src/lib/socketio.js +144 -0
- claude_mpm/d2/src/main.js +7 -0
- claude_mpm/d2/src/stores/events.js +114 -0
- claude_mpm/d2/src/stores/socket.js +108 -0
- claude_mpm/d2/src/stores/theme.js +65 -0
- claude_mpm/d2/svelte.config.js +12 -0
- claude_mpm/d2/vite.config.js +15 -0
- claude_mpm/dashboard/.claude-mpm/memories/README.md +36 -0
- claude_mpm/dashboard/BUILD_NUMBER +1 -0
- claude_mpm/dashboard/README.md +121 -0
- claude_mpm/dashboard/VERSION +1 -0
- claude_mpm/dashboard/react/components/DataInspector/DataInspector.tsx +273 -0
- claude_mpm/dashboard/react/components/ErrorBoundary.tsx +75 -0
- claude_mpm/dashboard/react/components/EventViewer/EventViewer.tsx +141 -0
- claude_mpm/dashboard/react/components/shared/ConnectionStatus.tsx +36 -0
- claude_mpm/dashboard/react/components/shared/FilterBar.tsx +89 -0
- claude_mpm/dashboard/react/contexts/DashboardContext.tsx +215 -0
- claude_mpm/dashboard/react/entries/events.tsx +165 -0
- claude_mpm/dashboard/react/hooks/useEvents.ts +191 -0
- claude_mpm/dashboard/react/hooks/useSocket.ts +225 -0
- claude_mpm/dashboard/static/built/REFACTORING_SUMMARY.md +170 -0
- claude_mpm/dashboard/static/built/components/activity-tree.js.map +1 -0
- claude_mpm/dashboard/static/built/components/agent-hierarchy.js +101 -101
- claude_mpm/dashboard/static/built/components/agent-inference.js.map +1 -0
- claude_mpm/dashboard/static/built/components/build-tracker.js +59 -59
- claude_mpm/dashboard/static/built/components/code-simple.js +107 -107
- claude_mpm/dashboard/static/built/components/code-tree/tree-breadcrumb.js +29 -29
- claude_mpm/dashboard/static/built/components/code-tree/tree-constants.js +24 -24
- claude_mpm/dashboard/static/built/components/code-tree/tree-search.js +27 -27
- claude_mpm/dashboard/static/built/components/code-tree/tree-utils.js +25 -25
- claude_mpm/dashboard/static/built/components/code-tree.js.map +1 -0
- claude_mpm/dashboard/static/built/components/code-viewer.js.map +1 -0
- claude_mpm/dashboard/static/built/components/connection-debug.js +101 -101
- claude_mpm/dashboard/static/built/components/diff-viewer.js +113 -113
- claude_mpm/dashboard/static/built/components/event-processor.js.map +1 -0
- claude_mpm/dashboard/static/built/components/event-viewer.js.map +1 -0
- claude_mpm/dashboard/static/built/components/export-manager.js.map +1 -0
- claude_mpm/dashboard/static/built/components/file-change-tracker.js +57 -57
- claude_mpm/dashboard/static/built/components/file-change-viewer.js +74 -74
- claude_mpm/dashboard/static/built/components/file-tool-tracker.js.map +1 -0
- claude_mpm/dashboard/static/built/components/file-viewer.js.map +1 -0
- claude_mpm/dashboard/static/built/components/hud-library-loader.js.map +1 -0
- claude_mpm/dashboard/static/built/components/hud-manager.js.map +1 -0
- claude_mpm/dashboard/static/built/components/hud-visualizer.js.map +1 -0
- claude_mpm/dashboard/static/built/components/module-viewer.js.map +1 -0
- claude_mpm/dashboard/static/built/components/session-manager.js.map +1 -0
- claude_mpm/dashboard/static/built/components/socket-manager.js.map +1 -0
- claude_mpm/dashboard/static/built/components/ui-state-manager.js.map +1 -0
- claude_mpm/dashboard/static/built/components/unified-data-viewer.js.map +1 -0
- claude_mpm/dashboard/static/built/components/working-directory.js.map +1 -0
- claude_mpm/dashboard/static/built/connection-manager.js +76 -76
- claude_mpm/dashboard/static/built/dashboard.js.map +1 -0
- claude_mpm/dashboard/static/built/extension-error-handler.js +22 -22
- claude_mpm/dashboard/static/built/react/events.js.map +1 -0
- claude_mpm/dashboard/static/built/shared/dom-helpers.js +9 -9
- claude_mpm/dashboard/static/built/shared/event-bus.js +5 -5
- claude_mpm/dashboard/static/built/shared/logger.js +16 -16
- claude_mpm/dashboard/static/built/shared/tooltip-service.js +6 -6
- claude_mpm/dashboard/static/built/socket-client.js.map +1 -0
- 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/index.html +22 -22
- claude_mpm/dashboard/static/js/REFACTORING_SUMMARY.md +170 -0
- 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/shared/dom-helpers.js +9 -9
- claude_mpm/dashboard/static/js/shared/event-bus.js +5 -5
- claude_mpm/dashboard/static/js/shared/logger.js +16 -16
- claude_mpm/dashboard/static/js/shared/tooltip-service.js +6 -6
- claude_mpm/dashboard/static/js/socket-client.js +138 -121
- claude_mpm/dashboard/static/navigation-test-results.md +118 -0
- claude_mpm/dashboard/static/production/main.html +21 -21
- claude_mpm/dashboard/static/test-archive/dashboard.html +22 -22
- claude_mpm/dashboard/templates/.claude-mpm/memories/README.md +36 -0
- claude_mpm/dashboard/templates/.claude-mpm/memories/engineer_agent.md +39 -0
- claude_mpm/dashboard/templates/.claude-mpm/memories/version_control_agent.md +38 -0
- claude_mpm/dashboard/templates/code_simple.html +23 -23
- claude_mpm/dashboard/templates/index.html +18 -18
- claude_mpm/hooks/README.md +143 -0
- claude_mpm/hooks/__init__.py +8 -0
- 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/claude_hooks/response_tracking.py +35 -1
- claude_mpm/hooks/session_resume_hook.py +121 -0
- claude_mpm/hooks/templates/README.md +180 -0
- claude_mpm/hooks/templates/pre_tool_use_simple.py +78 -0
- claude_mpm/hooks/templates/pre_tool_use_template.py +323 -0
- claude_mpm/hooks/templates/settings.json.example +147 -0
- claude_mpm/models/resume_log.py +340 -0
- claude_mpm/schemas/agent_schema.json +596 -0
- claude_mpm/schemas/frontmatter_schema.json +165 -0
- claude_mpm/scripts/claude-hook-handler.sh +3 -3
- claude_mpm/scripts/start_activity_logging.py +3 -1
- claude_mpm/services/agents/auto_config_manager.py +1 -1
- claude_mpm/services/agents/deployment/agent_configuration_manager.py +1 -1
- claude_mpm/services/agents/deployment/agent_format_converter.py +1 -1
- claude_mpm/services/agents/deployment/agent_metrics_collector.py +3 -3
- claude_mpm/services/agents/deployment/agent_record_service.py +1 -1
- claude_mpm/services/agents/deployment/agent_validator.py +17 -1
- claude_mpm/services/agents/deployment/async_agent_deployment.py +1 -1
- claude_mpm/services/agents/deployment/facade/deployment_facade.py +3 -3
- claude_mpm/services/agents/deployment/local_template_deployment.py +1 -1
- claude_mpm/services/agents/deployment/pipeline/pipeline_executor.py +2 -2
- claude_mpm/services/agents/loading/framework_agent_loader.py +8 -8
- claude_mpm/services/agents/local_template_manager.py +4 -2
- claude_mpm/services/agents/recommender.py +47 -0
- claude_mpm/services/cli/resume_service.py +617 -0
- claude_mpm/services/cli/session_manager.py +87 -0
- claude_mpm/services/cli/session_pause_manager.py +504 -0
- claude_mpm/services/cli/session_resume_helper.py +372 -0
- claude_mpm/services/cli/unified_dashboard_manager.py +1 -1
- claude_mpm/services/core/base.py +26 -11
- claude_mpm/services/core/interfaces.py +56 -1
- claude_mpm/services/core/models/agent_config.py +3 -0
- claude_mpm/services/core/models/process.py +4 -0
- claude_mpm/services/core/path_resolver.py +1 -1
- claude_mpm/services/diagnostics/checks/agent_check.py +0 -2
- 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/doctor_reporter.py +6 -4
- claude_mpm/services/diagnostics/models.py +21 -0
- claude_mpm/services/event_bus/README.md +244 -0
- claude_mpm/services/event_bus/direct_relay.py +3 -3
- claude_mpm/services/event_bus/event_bus.py +36 -3
- claude_mpm/services/event_bus/relay.py +23 -7
- claude_mpm/services/events/README.md +303 -0
- claude_mpm/services/events/consumers/logging.py +1 -2
- claude_mpm/services/framework_claude_md_generator/README.md +119 -0
- claude_mpm/services/infrastructure/monitoring/resources.py +1 -1
- claude_mpm/services/infrastructure/resume_log_generator.py +439 -0
- claude_mpm/services/local_ops/__init__.py +2 -0
- claude_mpm/services/local_ops/process_manager.py +1 -1
- claude_mpm/services/local_ops/resource_monitor.py +2 -2
- claude_mpm/services/mcp_config_manager.py +7 -131
- claude_mpm/services/mcp_gateway/README.md +185 -0
- claude_mpm/services/mcp_gateway/auto_configure.py +31 -25
- claude_mpm/services/mcp_gateway/config/configuration.py +1 -1
- claude_mpm/services/mcp_gateway/core/process_pool.py +19 -10
- 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/external_mcp_services.py +26 -21
- claude_mpm/services/mcp_gateway/tools/kuzu_memory_service.py +6 -2
- claude_mpm/services/memory/failure_tracker.py +19 -4
- 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/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/session_manager.py +205 -1
- 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/connection.py.backup +217 -0
- claude_mpm/services/socketio/handlers/git.py +2 -2
- claude_mpm/services/socketio/handlers/hook.py.backup +154 -0
- claude_mpm/services/static/.gitkeep +2 -0
- 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/local.py +1 -1
- claude_mpm/services/version_control/VERSION +1 -0
- claude_mpm/services/version_control/conflict_resolution.py +6 -4
- claude_mpm/services/version_service.py +104 -1
- claude_mpm/services/visualization/mermaid_generator.py +2 -3
- claude_mpm/skills/__init__.py +21 -0
- claude_mpm/skills/agent_skills_injector.py +324 -0
- claude_mpm/skills/bundled/.gitkeep +2 -0
- claude_mpm/skills/bundled/LICENSE_ATTRIBUTIONS.md +79 -0
- claude_mpm/skills/bundled/api-documentation.md +393 -0
- claude_mpm/skills/bundled/async-testing.md +571 -0
- claude_mpm/skills/bundled/code-review.md +143 -0
- claude_mpm/skills/bundled/collaboration/brainstorming/SKILL.md +79 -0
- claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/SKILL.md +178 -0
- claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/references/agent-prompts.md +577 -0
- claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/references/coordination-patterns.md +467 -0
- claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/references/examples.md +537 -0
- claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/references/troubleshooting.md +730 -0
- claude_mpm/skills/bundled/collaboration/git-worktrees.md +317 -0
- claude_mpm/skills/bundled/collaboration/requesting-code-review/SKILL.md +112 -0
- claude_mpm/skills/bundled/collaboration/requesting-code-review/references/code-reviewer-template.md +146 -0
- claude_mpm/skills/bundled/collaboration/requesting-code-review/references/review-examples.md +412 -0
- claude_mpm/skills/bundled/collaboration/stacked-prs.md +251 -0
- claude_mpm/skills/bundled/collaboration/writing-plans/SKILL.md +81 -0
- claude_mpm/skills/bundled/collaboration/writing-plans/references/best-practices.md +362 -0
- claude_mpm/skills/bundled/collaboration/writing-plans/references/plan-structure-templates.md +312 -0
- claude_mpm/skills/bundled/database-migration.md +199 -0
- claude_mpm/skills/bundled/debugging/root-cause-tracing/SKILL.md +152 -0
- claude_mpm/skills/bundled/debugging/root-cause-tracing/find-polluter.sh +63 -0
- claude_mpm/skills/bundled/debugging/root-cause-tracing/references/advanced-techniques.md +668 -0
- claude_mpm/skills/bundled/debugging/root-cause-tracing/references/examples.md +587 -0
- claude_mpm/skills/bundled/debugging/root-cause-tracing/references/integration.md +438 -0
- claude_mpm/skills/bundled/debugging/root-cause-tracing/references/tracing-techniques.md +391 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/CREATION-LOG.md +119 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/SKILL.md +148 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/references/anti-patterns.md +483 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/references/examples.md +452 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/references/troubleshooting.md +449 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/references/workflow.md +411 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/test-academic.md +14 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/test-pressure-1.md +58 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/test-pressure-2.md +68 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/test-pressure-3.md +69 -0
- claude_mpm/skills/bundled/debugging/verification-before-completion/SKILL.md +131 -0
- claude_mpm/skills/bundled/debugging/verification-before-completion/references/gate-function.md +325 -0
- claude_mpm/skills/bundled/debugging/verification-before-completion/references/integration-and-workflows.md +490 -0
- claude_mpm/skills/bundled/debugging/verification-before-completion/references/red-flags-and-failures.md +425 -0
- claude_mpm/skills/bundled/debugging/verification-before-completion/references/verification-patterns.md +499 -0
- claude_mpm/skills/bundled/docker-containerization.md +194 -0
- claude_mpm/skills/bundled/express-local-dev.md +1429 -0
- claude_mpm/skills/bundled/fastapi-local-dev.md +1199 -0
- claude_mpm/skills/bundled/git-workflow.md +414 -0
- claude_mpm/skills/bundled/imagemagick.md +204 -0
- claude_mpm/skills/bundled/infrastructure/env-manager/INTEGRATION.md +611 -0
- claude_mpm/skills/bundled/infrastructure/env-manager/README.md +596 -0
- claude_mpm/skills/bundled/infrastructure/env-manager/SKILL.md +260 -0
- claude_mpm/skills/bundled/infrastructure/env-manager/examples/nextjs-env-structure.md +315 -0
- claude_mpm/skills/bundled/infrastructure/env-manager/references/frameworks.md +436 -0
- claude_mpm/skills/bundled/infrastructure/env-manager/references/security.md +433 -0
- claude_mpm/skills/bundled/infrastructure/env-manager/references/synchronization.md +452 -0
- claude_mpm/skills/bundled/infrastructure/env-manager/references/troubleshooting.md +404 -0
- claude_mpm/skills/bundled/infrastructure/env-manager/references/validation.md +420 -0
- claude_mpm/skills/bundled/infrastructure/env-manager/scripts/validate_env.py +576 -0
- claude_mpm/skills/bundled/json-data-handling.md +223 -0
- claude_mpm/skills/bundled/main/artifacts-builder/LICENSE.txt +202 -0
- claude_mpm/skills/bundled/main/artifacts-builder/SKILL.md +86 -0
- claude_mpm/skills/bundled/main/artifacts-builder/scripts/bundle-artifact.sh +54 -0
- claude_mpm/skills/bundled/main/artifacts-builder/scripts/init-artifact.sh +322 -0
- claude_mpm/skills/bundled/main/artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
- claude_mpm/skills/bundled/main/internal-comms/LICENSE.txt +202 -0
- claude_mpm/skills/bundled/main/internal-comms/SKILL.md +43 -0
- claude_mpm/skills/bundled/main/internal-comms/examples/3p-updates.md +47 -0
- claude_mpm/skills/bundled/main/internal-comms/examples/company-newsletter.md +65 -0
- claude_mpm/skills/bundled/main/internal-comms/examples/faq-answers.md +30 -0
- claude_mpm/skills/bundled/main/internal-comms/examples/general-comms.md +16 -0
- claude_mpm/skills/bundled/main/mcp-builder/LICENSE.txt +202 -0
- claude_mpm/skills/bundled/main/mcp-builder/SKILL.md +160 -0
- claude_mpm/skills/bundled/main/mcp-builder/reference/design_principles.md +412 -0
- claude_mpm/skills/bundled/main/mcp-builder/reference/evaluation.md +602 -0
- claude_mpm/skills/bundled/main/mcp-builder/reference/mcp_best_practices.md +915 -0
- claude_mpm/skills/bundled/main/mcp-builder/reference/node_mcp_server.md +916 -0
- claude_mpm/skills/bundled/main/mcp-builder/reference/python_mcp_server.md +752 -0
- claude_mpm/skills/bundled/main/mcp-builder/reference/workflow.md +1237 -0
- claude_mpm/skills/bundled/main/mcp-builder/scripts/connections.py +157 -0
- claude_mpm/skills/bundled/main/mcp-builder/scripts/evaluation.py +425 -0
- claude_mpm/skills/bundled/main/mcp-builder/scripts/example_evaluation.xml +22 -0
- claude_mpm/skills/bundled/main/mcp-builder/scripts/requirements.txt +2 -0
- claude_mpm/skills/bundled/main/skill-creator/LICENSE.txt +202 -0
- claude_mpm/skills/bundled/main/skill-creator/SKILL.md +189 -0
- claude_mpm/skills/bundled/main/skill-creator/references/best-practices.md +500 -0
- claude_mpm/skills/bundled/main/skill-creator/references/creation-workflow.md +464 -0
- claude_mpm/skills/bundled/main/skill-creator/references/examples.md +619 -0
- claude_mpm/skills/bundled/main/skill-creator/references/progressive-disclosure.md +437 -0
- claude_mpm/skills/bundled/main/skill-creator/references/skill-structure.md +231 -0
- claude_mpm/skills/bundled/main/skill-creator/scripts/init_skill.py +303 -0
- claude_mpm/skills/bundled/main/skill-creator/scripts/package_skill.py +113 -0
- claude_mpm/skills/bundled/main/skill-creator/scripts/quick_validate.py +72 -0
- claude_mpm/skills/bundled/nextjs-local-dev.md +807 -0
- claude_mpm/skills/bundled/pdf.md +141 -0
- claude_mpm/skills/bundled/performance-profiling.md +573 -0
- claude_mpm/skills/bundled/php/espocrm-development/SKILL.md +170 -0
- claude_mpm/skills/bundled/php/espocrm-development/references/architecture.md +602 -0
- claude_mpm/skills/bundled/php/espocrm-development/references/common-tasks.md +821 -0
- claude_mpm/skills/bundled/php/espocrm-development/references/development-workflow.md +742 -0
- claude_mpm/skills/bundled/php/espocrm-development/references/frontend-customization.md +726 -0
- claude_mpm/skills/bundled/php/espocrm-development/references/hooks-and-services.md +764 -0
- claude_mpm/skills/bundled/php/espocrm-development/references/testing-debugging.md +831 -0
- claude_mpm/skills/bundled/react/flexlayout-react.md +742 -0
- claude_mpm/skills/bundled/refactoring-patterns.md +180 -0
- claude_mpm/skills/bundled/rust/desktop-applications/SKILL.md +226 -0
- claude_mpm/skills/bundled/rust/desktop-applications/references/architecture-patterns.md +901 -0
- claude_mpm/skills/bundled/rust/desktop-applications/references/native-gui-frameworks.md +901 -0
- claude_mpm/skills/bundled/rust/desktop-applications/references/platform-integration.md +775 -0
- claude_mpm/skills/bundled/rust/desktop-applications/references/state-management.md +937 -0
- claude_mpm/skills/bundled/rust/desktop-applications/references/tauri-framework.md +770 -0
- claude_mpm/skills/bundled/rust/desktop-applications/references/testing-deployment.md +961 -0
- claude_mpm/skills/bundled/security-scanning.md +327 -0
- claude_mpm/skills/bundled/systematic-debugging.md +473 -0
- claude_mpm/skills/bundled/tauri/tauri-async-patterns.md +495 -0
- claude_mpm/skills/bundled/tauri/tauri-build-deploy.md +599 -0
- claude_mpm/skills/bundled/tauri/tauri-command-patterns.md +535 -0
- claude_mpm/skills/bundled/tauri/tauri-error-handling.md +613 -0
- claude_mpm/skills/bundled/tauri/tauri-event-system.md +648 -0
- claude_mpm/skills/bundled/tauri/tauri-file-system.md +673 -0
- claude_mpm/skills/bundled/tauri/tauri-frontend-integration.md +767 -0
- claude_mpm/skills/bundled/tauri/tauri-performance.md +669 -0
- claude_mpm/skills/bundled/tauri/tauri-state-management.md +573 -0
- claude_mpm/skills/bundled/tauri/tauri-testing.md +384 -0
- claude_mpm/skills/bundled/tauri/tauri-window-management.md +628 -0
- claude_mpm/skills/bundled/test-driven-development.md +378 -0
- claude_mpm/skills/bundled/testing/condition-based-waiting/SKILL.md +119 -0
- claude_mpm/skills/bundled/testing/condition-based-waiting/example.ts +158 -0
- claude_mpm/skills/bundled/testing/condition-based-waiting/references/patterns-and-implementation.md +253 -0
- claude_mpm/skills/bundled/testing/test-driven-development/SKILL.md +145 -0
- claude_mpm/skills/bundled/testing/test-driven-development/references/anti-patterns.md +543 -0
- claude_mpm/skills/bundled/testing/test-driven-development/references/examples.md +741 -0
- claude_mpm/skills/bundled/testing/test-driven-development/references/integration.md +470 -0
- claude_mpm/skills/bundled/testing/test-driven-development/references/philosophy.md +458 -0
- claude_mpm/skills/bundled/testing/test-driven-development/references/workflow.md +639 -0
- claude_mpm/skills/bundled/testing/test-quality-inspector/SKILL.md +458 -0
- claude_mpm/skills/bundled/testing/test-quality-inspector/examples/example-inspection-report.md +411 -0
- claude_mpm/skills/bundled/testing/test-quality-inspector/references/assertion-quality.md +317 -0
- claude_mpm/skills/bundled/testing/test-quality-inspector/references/inspection-checklist.md +270 -0
- claude_mpm/skills/bundled/testing/test-quality-inspector/references/red-flags.md +436 -0
- claude_mpm/skills/bundled/testing/testing-anti-patterns/SKILL.md +140 -0
- claude_mpm/skills/bundled/testing/testing-anti-patterns/references/completeness-anti-patterns.md +572 -0
- claude_mpm/skills/bundled/testing/testing-anti-patterns/references/core-anti-patterns.md +411 -0
- claude_mpm/skills/bundled/testing/testing-anti-patterns/references/detection-guide.md +569 -0
- claude_mpm/skills/bundled/testing/testing-anti-patterns/references/tdd-connection.md +695 -0
- claude_mpm/skills/bundled/testing/webapp-testing/LICENSE.txt +202 -0
- claude_mpm/skills/bundled/testing/webapp-testing/SKILL.md +184 -0
- claude_mpm/skills/bundled/testing/webapp-testing/decision-tree.md +459 -0
- claude_mpm/skills/bundled/testing/webapp-testing/examples/console_logging.py +35 -0
- claude_mpm/skills/bundled/testing/webapp-testing/examples/element_discovery.py +44 -0
- claude_mpm/skills/bundled/testing/webapp-testing/examples/static_html_automation.py +34 -0
- claude_mpm/skills/bundled/testing/webapp-testing/playwright-patterns.md +479 -0
- claude_mpm/skills/bundled/testing/webapp-testing/reconnaissance-pattern.md +687 -0
- claude_mpm/skills/bundled/testing/webapp-testing/scripts/with_server.py +129 -0
- claude_mpm/skills/bundled/testing/webapp-testing/server-management.md +758 -0
- claude_mpm/skills/bundled/testing/webapp-testing/troubleshooting.md +868 -0
- claude_mpm/skills/bundled/vite-local-dev.md +1061 -0
- claude_mpm/skills/bundled/web-performance-optimization.md +2305 -0
- claude_mpm/skills/bundled/xlsx.md +157 -0
- claude_mpm/skills/registry.py +97 -9
- claude_mpm/skills/skills_registry.py +347 -0
- claude_mpm/skills/skills_service.py +739 -0
- claude_mpm/templates/questions/EXAMPLES.md +501 -0
- claude_mpm/templates/questions/__init__.py +43 -0
- claude_mpm/templates/questions/base.py +193 -0
- claude_mpm/templates/questions/pr_strategy.py +314 -0
- claude_mpm/templates/questions/project_init.py +388 -0
- claude_mpm/templates/questions/ticket_mgmt.py +397 -0
- claude_mpm/tools/README_SOCKETIO_DEBUG.md +224 -0
- claude_mpm/tools/__main__.py +8 -8
- claude_mpm/tools/code_tree_analyzer/README.md +64 -0
- claude_mpm/tools/code_tree_analyzer/__init__.py +45 -0
- claude_mpm/tools/code_tree_analyzer/analysis.py +299 -0
- claude_mpm/tools/code_tree_analyzer/cache.py +131 -0
- claude_mpm/tools/code_tree_analyzer/core.py +380 -0
- claude_mpm/tools/code_tree_analyzer/discovery.py +403 -0
- claude_mpm/tools/code_tree_analyzer/events.py +168 -0
- claude_mpm/tools/code_tree_analyzer/gitignore.py +308 -0
- claude_mpm/tools/code_tree_analyzer/models.py +39 -0
- claude_mpm/tools/code_tree_analyzer/multilang_analyzer.py +224 -0
- claude_mpm/tools/code_tree_analyzer/python_analyzer.py +284 -0
- claude_mpm/utils/agent_dependency_loader.py +5 -5
- 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/robust_installer.py +3 -5
- claude_mpm/utils/structured_questions.py +619 -0
- claude_mpm-4.25.10.dist-info/METADATA +789 -0
- {claude_mpm-4.16.0.dist-info → claude_mpm-4.25.10.dist-info}/RECORD +485 -240
- claude_mpm/agents/INSTRUCTIONS_OLD_DEPRECATED.md +0 -602
- 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/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/cli/commands/mpm_init.py +0 -2008
- claude_mpm/dashboard/.claude-mpm/socketio-instances.json +0 -1
- 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/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/test-archive/test_debug.html +0 -25
- claude_mpm/tools/code_tree_analyzer.py +0 -1825
- claude_mpm-4.16.0.dist-info/METADATA +0 -453
- {claude_mpm-4.16.0.dist-info → claude_mpm-4.25.10.dist-info}/WHEEL +0 -0
- {claude_mpm-4.16.0.dist-info → claude_mpm-4.25.10.dist-info}/entry_points.txt +0 -0
- {claude_mpm-4.16.0.dist-info → claude_mpm-4.25.10.dist-info}/licenses/LICENSE +0 -0
- {claude_mpm-4.16.0.dist-info → claude_mpm-4.25.10.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
"""Base classes for structured question templates.
|
|
2
|
+
|
|
3
|
+
This module provides abstract base classes for creating reusable question templates.
|
|
4
|
+
Templates encapsulate common question patterns and can be context-aware.
|
|
5
|
+
|
|
6
|
+
Design Patterns:
|
|
7
|
+
- Template Method: Define question structure, subclasses provide details
|
|
8
|
+
- Strategy: Different templates for different workflows
|
|
9
|
+
- Factory: Templates build QuestionSet objects
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
from __future__ import annotations
|
|
13
|
+
|
|
14
|
+
from abc import ABC, abstractmethod
|
|
15
|
+
from typing import TYPE_CHECKING, Any
|
|
16
|
+
|
|
17
|
+
if TYPE_CHECKING:
|
|
18
|
+
from claude_mpm.utils.structured_questions import QuestionSet
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class QuestionTemplate(ABC):
|
|
22
|
+
"""Abstract base class for question templates.
|
|
23
|
+
|
|
24
|
+
Subclasses should implement the build() method to construct a QuestionSet
|
|
25
|
+
based on template-specific logic and any provided context.
|
|
26
|
+
|
|
27
|
+
Example:
|
|
28
|
+
>>> class MyTemplate(QuestionTemplate):
|
|
29
|
+
... def build(self) -> QuestionSet:
|
|
30
|
+
... question = QuestionBuilder().ask("...").build()
|
|
31
|
+
... return QuestionSet([question])
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
@abstractmethod
|
|
35
|
+
def build(self) -> QuestionSet:
|
|
36
|
+
"""Build and return a QuestionSet.
|
|
37
|
+
|
|
38
|
+
Returns:
|
|
39
|
+
QuestionSet ready for use with AskUserQuestion tool
|
|
40
|
+
|
|
41
|
+
Raises:
|
|
42
|
+
QuestionValidationError: If question construction fails
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
def to_params(self) -> dict[str, Any]:
|
|
46
|
+
"""Build question set and convert to AskUserQuestion parameters.
|
|
47
|
+
|
|
48
|
+
Returns:
|
|
49
|
+
Dictionary suitable for AskUserQuestion tool
|
|
50
|
+
|
|
51
|
+
Raises:
|
|
52
|
+
QuestionValidationError: If question construction fails
|
|
53
|
+
"""
|
|
54
|
+
return self.build().to_ask_user_question_params()
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class ConditionalTemplate(QuestionTemplate):
|
|
58
|
+
"""Template that adjusts questions based on context.
|
|
59
|
+
|
|
60
|
+
This base class provides infrastructure for templates that need to vary
|
|
61
|
+
their questions based on runtime context (e.g., number of tickets,
|
|
62
|
+
project type, etc.).
|
|
63
|
+
|
|
64
|
+
Attributes:
|
|
65
|
+
context: Dictionary of context values that affect question selection
|
|
66
|
+
"""
|
|
67
|
+
|
|
68
|
+
def __init__(self, **context: Any) -> None:
|
|
69
|
+
"""Initialize with context values.
|
|
70
|
+
|
|
71
|
+
Args:
|
|
72
|
+
**context: Arbitrary context values used to determine questions
|
|
73
|
+
"""
|
|
74
|
+
self.context = context
|
|
75
|
+
|
|
76
|
+
def get_context(self, key: str, default: Any = None) -> Any:
|
|
77
|
+
"""Get a context value.
|
|
78
|
+
|
|
79
|
+
Args:
|
|
80
|
+
key: Context key to retrieve
|
|
81
|
+
default: Default value if key not found
|
|
82
|
+
|
|
83
|
+
Returns:
|
|
84
|
+
Context value or default
|
|
85
|
+
"""
|
|
86
|
+
return self.context.get(key, default)
|
|
87
|
+
|
|
88
|
+
def has_context(self, key: str) -> bool:
|
|
89
|
+
"""Check if context key exists.
|
|
90
|
+
|
|
91
|
+
Args:
|
|
92
|
+
key: Context key to check
|
|
93
|
+
|
|
94
|
+
Returns:
|
|
95
|
+
True if key exists in context, False otherwise
|
|
96
|
+
"""
|
|
97
|
+
return key in self.context
|
|
98
|
+
|
|
99
|
+
def should_include_question(self, question_id: str) -> bool:
|
|
100
|
+
"""Determine if a question should be included based on context.
|
|
101
|
+
|
|
102
|
+
Subclasses can override this to implement conditional logic.
|
|
103
|
+
|
|
104
|
+
Args:
|
|
105
|
+
question_id: Identifier for the question being considered
|
|
106
|
+
|
|
107
|
+
Returns:
|
|
108
|
+
True if question should be included, False otherwise
|
|
109
|
+
"""
|
|
110
|
+
return True
|
|
111
|
+
|
|
112
|
+
@abstractmethod
|
|
113
|
+
def build(self) -> QuestionSet:
|
|
114
|
+
"""Build QuestionSet based on context.
|
|
115
|
+
|
|
116
|
+
Subclasses must implement this to create context-aware questions.
|
|
117
|
+
|
|
118
|
+
Returns:
|
|
119
|
+
QuestionSet with questions appropriate for the context
|
|
120
|
+
"""
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
class MultiStepTemplate(QuestionTemplate):
|
|
124
|
+
"""Template for multi-step question workflows.
|
|
125
|
+
|
|
126
|
+
Some workflows require multiple rounds of questions, where later questions
|
|
127
|
+
depend on answers to earlier ones. This base class provides infrastructure
|
|
128
|
+
for such workflows.
|
|
129
|
+
|
|
130
|
+
Note: Initial implementation focuses on single-step templates. This class
|
|
131
|
+
is provided for future extensibility.
|
|
132
|
+
"""
|
|
133
|
+
|
|
134
|
+
def __init__(self) -> None:
|
|
135
|
+
"""Initialize multi-step template."""
|
|
136
|
+
self._current_step = 0
|
|
137
|
+
self._answers: dict[str, Any] = {}
|
|
138
|
+
|
|
139
|
+
def set_answers(self, step: int, answers: dict[str, Any]) -> None:
|
|
140
|
+
"""Record answers from a previous step.
|
|
141
|
+
|
|
142
|
+
Args:
|
|
143
|
+
step: Step number (0-indexed)
|
|
144
|
+
answers: Parsed answers from ResponseParser
|
|
145
|
+
"""
|
|
146
|
+
self._answers[str(step)] = answers
|
|
147
|
+
|
|
148
|
+
def get_answers(self, step: int) -> dict[str, Any] | None:
|
|
149
|
+
"""Get answers from a previous step.
|
|
150
|
+
|
|
151
|
+
Args:
|
|
152
|
+
step: Step number (0-indexed)
|
|
153
|
+
|
|
154
|
+
Returns:
|
|
155
|
+
Answers dictionary or None if step not completed
|
|
156
|
+
"""
|
|
157
|
+
return self._answers.get(str(step))
|
|
158
|
+
|
|
159
|
+
@abstractmethod
|
|
160
|
+
def build_step(self, step: int) -> QuestionSet:
|
|
161
|
+
"""Build questions for a specific step.
|
|
162
|
+
|
|
163
|
+
Args:
|
|
164
|
+
step: Step number (0-indexed)
|
|
165
|
+
|
|
166
|
+
Returns:
|
|
167
|
+
QuestionSet for the specified step
|
|
168
|
+
"""
|
|
169
|
+
|
|
170
|
+
def build(self) -> QuestionSet:
|
|
171
|
+
"""Build questions for the current step.
|
|
172
|
+
|
|
173
|
+
Returns:
|
|
174
|
+
QuestionSet for current step
|
|
175
|
+
"""
|
|
176
|
+
return self.build_step(self._current_step)
|
|
177
|
+
|
|
178
|
+
def advance_step(self) -> None:
|
|
179
|
+
"""Move to the next step."""
|
|
180
|
+
self._current_step += 1
|
|
181
|
+
|
|
182
|
+
@property
|
|
183
|
+
def current_step(self) -> int:
|
|
184
|
+
"""Get current step number."""
|
|
185
|
+
return self._current_step
|
|
186
|
+
|
|
187
|
+
@abstractmethod
|
|
188
|
+
def is_complete(self) -> bool:
|
|
189
|
+
"""Check if all steps are complete.
|
|
190
|
+
|
|
191
|
+
Returns:
|
|
192
|
+
True if workflow is complete, False otherwise
|
|
193
|
+
"""
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
"""PR Strategy question templates for PM workflow decisions.
|
|
2
|
+
|
|
3
|
+
This module provides templates for gathering user preferences about PR workflows,
|
|
4
|
+
including whether to use stacked PRs, draft PRs, and auto-merge settings.
|
|
5
|
+
|
|
6
|
+
Templates:
|
|
7
|
+
- PRWorkflowTemplate: Main PR workflow decisions (main-based vs stacked)
|
|
8
|
+
- DraftPRTemplate: Draft PR preferences
|
|
9
|
+
- AutoMergeTemplate: Auto-merge preferences
|
|
10
|
+
|
|
11
|
+
These templates are context-aware and only ask relevant questions based on the
|
|
12
|
+
number of tickets and project state.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
|
|
17
|
+
from typing import TYPE_CHECKING
|
|
18
|
+
|
|
19
|
+
from claude_mpm.templates.questions.base import ConditionalTemplate
|
|
20
|
+
from claude_mpm.utils.structured_questions import (
|
|
21
|
+
QuestionBuilder,
|
|
22
|
+
QuestionSet,
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
if TYPE_CHECKING:
|
|
26
|
+
from claude_mpm.utils.structured_questions import StructuredQuestion
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class PRWorkflowTemplate(ConditionalTemplate):
|
|
30
|
+
"""Template for PR workflow strategy questions.
|
|
31
|
+
|
|
32
|
+
Asks questions about:
|
|
33
|
+
- Main-based vs stacked PRs (only if multiple tickets)
|
|
34
|
+
- Draft PR preference
|
|
35
|
+
- Auto-merge preference
|
|
36
|
+
|
|
37
|
+
Context Parameters:
|
|
38
|
+
num_tickets (int): Number of tickets being worked on
|
|
39
|
+
has_ci (bool): Whether project has CI/CD setup (affects auto-merge question)
|
|
40
|
+
|
|
41
|
+
Example:
|
|
42
|
+
>>> template = PRWorkflowTemplate(num_tickets=3, has_ci=True)
|
|
43
|
+
>>> question_set = template.build()
|
|
44
|
+
>>> params = question_set.to_ask_user_question_params()
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
def __init__(self, num_tickets: int = 1, has_ci: bool = False, **context):
|
|
48
|
+
"""Initialize PR workflow template.
|
|
49
|
+
|
|
50
|
+
Args:
|
|
51
|
+
num_tickets: Number of tickets in this sprint/batch
|
|
52
|
+
has_ci: Whether CI/CD is configured
|
|
53
|
+
**context: Additional context values
|
|
54
|
+
"""
|
|
55
|
+
super().__init__(num_tickets=num_tickets, has_ci=has_ci, **context)
|
|
56
|
+
|
|
57
|
+
def should_include_question(self, question_id: str) -> bool:
|
|
58
|
+
"""Determine which questions to ask based on context.
|
|
59
|
+
|
|
60
|
+
Args:
|
|
61
|
+
question_id: Question identifier
|
|
62
|
+
- "workflow": Main vs stacked PRs
|
|
63
|
+
- "draft": Draft PR preference
|
|
64
|
+
- "auto_merge": Auto-merge preference
|
|
65
|
+
|
|
66
|
+
Returns:
|
|
67
|
+
True if question should be included
|
|
68
|
+
"""
|
|
69
|
+
num_tickets = self.get_context("num_tickets", 1)
|
|
70
|
+
has_ci = self.get_context("has_ci", False)
|
|
71
|
+
|
|
72
|
+
if question_id == "workflow":
|
|
73
|
+
# Only ask about stacked vs main-based if multiple tickets
|
|
74
|
+
return num_tickets > 1
|
|
75
|
+
|
|
76
|
+
if question_id == "draft":
|
|
77
|
+
# Always relevant
|
|
78
|
+
return True
|
|
79
|
+
|
|
80
|
+
if question_id == "auto_merge":
|
|
81
|
+
# Only ask about auto-merge if CI is configured
|
|
82
|
+
return has_ci
|
|
83
|
+
|
|
84
|
+
return True
|
|
85
|
+
|
|
86
|
+
def build(self) -> QuestionSet:
|
|
87
|
+
"""Build PR workflow questions based on context.
|
|
88
|
+
|
|
89
|
+
Returns:
|
|
90
|
+
QuestionSet with relevant PR workflow questions
|
|
91
|
+
"""
|
|
92
|
+
questions: list[StructuredQuestion] = []
|
|
93
|
+
|
|
94
|
+
# Question 1: PR workflow strategy (only if multiple tickets)
|
|
95
|
+
if self.should_include_question("workflow"):
|
|
96
|
+
workflow_question = (
|
|
97
|
+
QuestionBuilder()
|
|
98
|
+
.ask("How should we organize the pull requests?")
|
|
99
|
+
.header("PR Strategy")
|
|
100
|
+
.add_option(
|
|
101
|
+
"Main-based PRs",
|
|
102
|
+
"Each ticket gets its own PR against main branch (parallel work)",
|
|
103
|
+
)
|
|
104
|
+
.add_option(
|
|
105
|
+
"Stacked PRs",
|
|
106
|
+
"PRs build on each other sequentially (ticket-1 → ticket-2 → ticket-3)",
|
|
107
|
+
)
|
|
108
|
+
.build()
|
|
109
|
+
)
|
|
110
|
+
questions.append(workflow_question)
|
|
111
|
+
|
|
112
|
+
# Question 2: Draft PR preference
|
|
113
|
+
if self.should_include_question("draft"):
|
|
114
|
+
draft_question = (
|
|
115
|
+
QuestionBuilder()
|
|
116
|
+
.ask("Should PRs be created as drafts initially?")
|
|
117
|
+
.header("Draft PRs")
|
|
118
|
+
.add_option(
|
|
119
|
+
"Yes, as drafts",
|
|
120
|
+
"Create as draft PRs, mark ready when implementation complete",
|
|
121
|
+
)
|
|
122
|
+
.add_option(
|
|
123
|
+
"No, ready for review",
|
|
124
|
+
"Create as regular PRs ready for immediate review",
|
|
125
|
+
)
|
|
126
|
+
.build()
|
|
127
|
+
)
|
|
128
|
+
questions.append(draft_question)
|
|
129
|
+
|
|
130
|
+
# Question 3: Auto-merge preference (only if CI configured)
|
|
131
|
+
if self.should_include_question("auto_merge"):
|
|
132
|
+
automerge_question = (
|
|
133
|
+
QuestionBuilder()
|
|
134
|
+
.ask("Should PRs auto-merge after CI passes and approval?")
|
|
135
|
+
.header("Auto-merge")
|
|
136
|
+
.add_option(
|
|
137
|
+
"Enable auto-merge",
|
|
138
|
+
"PRs merge automatically after CI passes and approval received",
|
|
139
|
+
)
|
|
140
|
+
.add_option(
|
|
141
|
+
"Manual merge only",
|
|
142
|
+
"PRs require manual merge even after approval",
|
|
143
|
+
)
|
|
144
|
+
.build()
|
|
145
|
+
)
|
|
146
|
+
questions.append(automerge_question)
|
|
147
|
+
|
|
148
|
+
if not questions:
|
|
149
|
+
# Fallback: at least ask about draft preference
|
|
150
|
+
questions.append(
|
|
151
|
+
QuestionBuilder()
|
|
152
|
+
.ask("Should PRs be created as drafts initially?")
|
|
153
|
+
.header("Draft PRs")
|
|
154
|
+
.add_option(
|
|
155
|
+
"Yes, as drafts",
|
|
156
|
+
"Create as draft PRs, mark ready when implementation complete",
|
|
157
|
+
)
|
|
158
|
+
.add_option(
|
|
159
|
+
"No, ready for review",
|
|
160
|
+
"Create as regular PRs ready for immediate review",
|
|
161
|
+
)
|
|
162
|
+
.build()
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
return QuestionSet(questions)
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
class PRSizeTemplate(ConditionalTemplate):
|
|
169
|
+
"""Template for PR size and scope preferences.
|
|
170
|
+
|
|
171
|
+
Asks about preferred PR size and whether to split large changes.
|
|
172
|
+
|
|
173
|
+
Context Parameters:
|
|
174
|
+
estimated_changes (int): Estimated lines of code changed
|
|
175
|
+
|
|
176
|
+
Example:
|
|
177
|
+
>>> template = PRSizeTemplate(estimated_changes=500)
|
|
178
|
+
>>> question_set = template.build()
|
|
179
|
+
"""
|
|
180
|
+
|
|
181
|
+
def __init__(self, estimated_changes: int = 0, **context):
|
|
182
|
+
"""Initialize PR size template.
|
|
183
|
+
|
|
184
|
+
Args:
|
|
185
|
+
estimated_changes: Estimated LOC changes
|
|
186
|
+
**context: Additional context values
|
|
187
|
+
"""
|
|
188
|
+
super().__init__(estimated_changes=estimated_changes, **context)
|
|
189
|
+
|
|
190
|
+
def build(self) -> QuestionSet:
|
|
191
|
+
"""Build PR size preference questions.
|
|
192
|
+
|
|
193
|
+
Returns:
|
|
194
|
+
QuestionSet with PR size questions
|
|
195
|
+
"""
|
|
196
|
+
estimated_changes = self.get_context("estimated_changes", 0)
|
|
197
|
+
|
|
198
|
+
questions: list[StructuredQuestion] = []
|
|
199
|
+
|
|
200
|
+
# Only ask if changes are large
|
|
201
|
+
if estimated_changes > 300:
|
|
202
|
+
size_question = (
|
|
203
|
+
QuestionBuilder()
|
|
204
|
+
.ask(
|
|
205
|
+
"This feature involves significant changes. How should we split it?"
|
|
206
|
+
)
|
|
207
|
+
.header("PR Size")
|
|
208
|
+
.add_option(
|
|
209
|
+
"Single large PR",
|
|
210
|
+
"Keep all changes together in one comprehensive PR",
|
|
211
|
+
)
|
|
212
|
+
.add_option(
|
|
213
|
+
"Split by component",
|
|
214
|
+
"Create separate PRs for each major component",
|
|
215
|
+
)
|
|
216
|
+
.add_option(
|
|
217
|
+
"Split by feature",
|
|
218
|
+
"Create separate PRs for each sub-feature",
|
|
219
|
+
)
|
|
220
|
+
.build()
|
|
221
|
+
)
|
|
222
|
+
questions.append(size_question)
|
|
223
|
+
|
|
224
|
+
# Fallback if no size concerns
|
|
225
|
+
if not questions:
|
|
226
|
+
commit_question = (
|
|
227
|
+
QuestionBuilder()
|
|
228
|
+
.ask("How should commits be organized?")
|
|
229
|
+
.header("Commits")
|
|
230
|
+
.add_option(
|
|
231
|
+
"Atomic commits",
|
|
232
|
+
"Many small, focused commits (one per logical change)",
|
|
233
|
+
)
|
|
234
|
+
.add_option(
|
|
235
|
+
"Feature commits",
|
|
236
|
+
"Fewer, larger commits (one per feature/component)",
|
|
237
|
+
)
|
|
238
|
+
.build()
|
|
239
|
+
)
|
|
240
|
+
questions.append(commit_question)
|
|
241
|
+
|
|
242
|
+
return QuestionSet(questions)
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
class PRReviewTemplate(ConditionalTemplate):
|
|
246
|
+
"""Template for PR review and approval preferences.
|
|
247
|
+
|
|
248
|
+
Asks about reviewer assignment, approval requirements, and review timing.
|
|
249
|
+
|
|
250
|
+
Context Parameters:
|
|
251
|
+
team_size (int): Number of team members
|
|
252
|
+
is_critical (bool): Whether this is a critical/sensitive change
|
|
253
|
+
|
|
254
|
+
Example:
|
|
255
|
+
>>> template = PRReviewTemplate(team_size=5, is_critical=True)
|
|
256
|
+
>>> question_set = template.build()
|
|
257
|
+
"""
|
|
258
|
+
|
|
259
|
+
def __init__(self, team_size: int = 1, is_critical: bool = False, **context):
|
|
260
|
+
"""Initialize PR review template.
|
|
261
|
+
|
|
262
|
+
Args:
|
|
263
|
+
team_size: Number of team members available for review
|
|
264
|
+
is_critical: Whether changes are critical/sensitive
|
|
265
|
+
**context: Additional context values
|
|
266
|
+
"""
|
|
267
|
+
super().__init__(team_size=team_size, is_critical=is_critical, **context)
|
|
268
|
+
|
|
269
|
+
def build(self) -> QuestionSet:
|
|
270
|
+
"""Build PR review preference questions.
|
|
271
|
+
|
|
272
|
+
Returns:
|
|
273
|
+
QuestionSet with PR review questions
|
|
274
|
+
"""
|
|
275
|
+
team_size = self.get_context("team_size", 1)
|
|
276
|
+
|
|
277
|
+
questions: list[StructuredQuestion] = []
|
|
278
|
+
|
|
279
|
+
# Question about number of approvals required
|
|
280
|
+
if team_size > 1:
|
|
281
|
+
approval_question = (
|
|
282
|
+
QuestionBuilder()
|
|
283
|
+
.ask("How many approvals should be required before merging?")
|
|
284
|
+
.header("Approvals")
|
|
285
|
+
.add_option(
|
|
286
|
+
"1 approval",
|
|
287
|
+
"Single approval sufficient (faster iteration)",
|
|
288
|
+
)
|
|
289
|
+
.add_option(
|
|
290
|
+
"2 approvals",
|
|
291
|
+
"Two approvals required (more thorough review)",
|
|
292
|
+
)
|
|
293
|
+
.build()
|
|
294
|
+
)
|
|
295
|
+
questions.append(approval_question)
|
|
296
|
+
|
|
297
|
+
# Question about review timing
|
|
298
|
+
timing_question = (
|
|
299
|
+
QuestionBuilder()
|
|
300
|
+
.ask("When should review be requested?")
|
|
301
|
+
.header("Review When")
|
|
302
|
+
.add_option(
|
|
303
|
+
"After implementation",
|
|
304
|
+
"Request review only when all code is complete",
|
|
305
|
+
)
|
|
306
|
+
.add_option(
|
|
307
|
+
"Early feedback",
|
|
308
|
+
"Request early review for approach validation",
|
|
309
|
+
)
|
|
310
|
+
.build()
|
|
311
|
+
)
|
|
312
|
+
questions.append(timing_question)
|
|
313
|
+
|
|
314
|
+
return QuestionSet(questions)
|