claude-mpm 4.20.3__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_PM.md +23 -6
- claude_mpm/agents/OUTPUT_STYLE.md +3 -48
- claude_mpm/agents/PM_INSTRUCTIONS.md +1783 -34
- claude_mpm/agents/WORKFLOW.md +75 -2
- 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/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/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/security.json +4 -4
- 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/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 +522 -34
- claude_mpm/cli/executor.py +56 -0
- claude_mpm/cli/interactive/agent_wizard.py +5 -5
- claude_mpm/cli/parsers/base_parser.py +28 -0
- claude_mpm/cli/parsers/mpm_init_parser.py +42 -0
- claude_mpm/cli/parsers/skills_parser.py +138 -0
- claude_mpm/cli/startup.py +111 -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-help.md +3 -0
- claude_mpm/commands/mpm-init.md +19 -3
- claude_mpm/commands/mpm-resume.md +372 -0
- claude_mpm/commands/mpm-tickets.md +56 -7
- claude_mpm/commands/mpm.md +1 -0
- claude_mpm/config/agent_capabilities.yaml +658 -0
- claude_mpm/config/async_logging_config.yaml +145 -0
- claude_mpm/constants.py +12 -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 +8 -0
- claude_mpm/core/constants.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/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/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/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/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/deployment/agent_format_converter.py +1 -1
- claude_mpm/services/agents/deployment/agent_metrics_collector.py +3 -3
- claude_mpm/services/agents/deployment/facade/deployment_facade.py +3 -3
- 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 +3 -1
- claude_mpm/services/cli/session_pause_manager.py +504 -0
- claude_mpm/services/cli/session_resume_helper.py +36 -16
- 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/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/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_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/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/version_control/VERSION +1 -0
- claude_mpm/services/version_control/conflict_resolution.py +6 -4
- claude_mpm/services/visualization/mermaid_generator.py +2 -3
- claude_mpm/skills/__init__.py +3 -3
- claude_mpm/skills/agent_skills_injector.py +42 -49
- claude_mpm/skills/bundled/.gitkeep +2 -0
- claude_mpm/skills/bundled/collaboration/brainstorming/SKILL.md +4 -0
- claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/SKILL.md +108 -114
- 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 +46 -41
- 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 +36 -73
- 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/debugging/root-cause-tracing/SKILL.md +100 -125
- 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/verification-before-completion/SKILL.md +28 -72
- claude_mpm/skills/bundled/debugging/verification-before-completion/references/gate-function.md +11 -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 +272 -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/main/artifacts-builder/LICENSE.txt +202 -0
- claude_mpm/skills/bundled/main/artifacts-builder/SKILL.md +13 -1
- 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 +11 -0
- claude_mpm/skills/bundled/main/mcp-builder/LICENSE.txt +202 -0
- claude_mpm/skills/bundled/main/mcp-builder/SKILL.md +109 -277
- claude_mpm/skills/bundled/main/mcp-builder/reference/design_principles.md +412 -0
- claude_mpm/skills/bundled/main/mcp-builder/reference/workflow.md +1237 -0
- claude_mpm/skills/bundled/main/mcp-builder/scripts/connections.py +17 -10
- claude_mpm/skills/bundled/main/mcp-builder/scripts/evaluation.py +92 -39
- 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 +135 -155
- 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 +13 -12
- claude_mpm/skills/bundled/main/skill-creator/scripts/package_skill.py +5 -3
- claude_mpm/skills/bundled/main/skill-creator/scripts/quick_validate.py +19 -12
- claude_mpm/skills/bundled/performance-profiling.md +6 -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/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/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/testing/condition-based-waiting/SKILL.md +21 -25
- 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-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 +86 -250
- 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 +145 -57
- claude_mpm/skills/bundled/testing/webapp-testing/decision-tree.md +459 -0
- claude_mpm/skills/bundled/testing/webapp-testing/examples/console_logging.py +6 -6
- claude_mpm/skills/bundled/testing/webapp-testing/examples/element_discovery.py +13 -9
- claude_mpm/skills/bundled/testing/webapp-testing/examples/static_html_automation.py +8 -8
- 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 +37 -15
- 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/skills_registry.py +44 -48
- claude_mpm/skills/skills_service.py +117 -108
- 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 +3 -3
- 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.20.3.dist-info → claude_mpm-4.25.10.dist-info}/METADATA +218 -31
- {claude_mpm-4.20.3.dist-info → claude_mpm-4.25.10.dist-info}/RECORD +409 -246
- 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 -2093
- 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/skills/bundled/debugging/verification-before-completion/references/common-failures.md +0 -213
- claude_mpm/tools/code_tree_analyzer.py +0 -1825
- /claude_mpm/skills/bundled/collaboration/requesting-code-review/{code-reviewer.md → references/code-reviewer-template.md} +0 -0
- {claude_mpm-4.20.3.dist-info → claude_mpm-4.25.10.dist-info}/WHEEL +0 -0
- {claude_mpm-4.20.3.dist-info → claude_mpm-4.25.10.dist-info}/entry_points.txt +0 -0
- {claude_mpm-4.20.3.dist-info → claude_mpm-4.25.10.dist-info}/licenses/LICENSE +0 -0
- {claude_mpm-4.20.3.dist-info → claude_mpm-4.25.10.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,501 @@
|
|
|
1
|
+
# Structured Questions Integration Examples
|
|
2
|
+
|
|
3
|
+
This document provides concrete examples of how to use the structured questions framework in PM agent workflows.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
1. [Basic Usage](#basic-usage)
|
|
8
|
+
2. [PR Workflow Examples](#pr-workflow-examples)
|
|
9
|
+
3. [Project Initialization Examples](#project-initialization-examples)
|
|
10
|
+
4. [Ticket Management Examples](#ticket-management-examples)
|
|
11
|
+
5. [Custom Questions](#custom-questions)
|
|
12
|
+
6. [Best Practices](#best-practices)
|
|
13
|
+
|
|
14
|
+
## Basic Usage
|
|
15
|
+
|
|
16
|
+
### Minimal Example
|
|
17
|
+
|
|
18
|
+
```python
|
|
19
|
+
from claude_mpm.utils.structured_questions import QuestionBuilder, QuestionSet
|
|
20
|
+
|
|
21
|
+
# Build a simple question
|
|
22
|
+
question = (
|
|
23
|
+
QuestionBuilder()
|
|
24
|
+
.ask("Which testing approach should we use?")
|
|
25
|
+
.header("Testing")
|
|
26
|
+
.add_option("TDD", "Test-driven development with tests first")
|
|
27
|
+
.add_option("TAD", "Test after development, implementation first")
|
|
28
|
+
.build()
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
# Create question set and get parameters
|
|
32
|
+
question_set = QuestionSet([question])
|
|
33
|
+
params = question_set.to_ask_user_question_params()
|
|
34
|
+
|
|
35
|
+
# Use params with AskUserQuestion tool
|
|
36
|
+
# ...response from tool...
|
|
37
|
+
|
|
38
|
+
# Parse response
|
|
39
|
+
from claude_mpm.utils.structured_questions import ResponseParser
|
|
40
|
+
parser = ResponseParser(question_set)
|
|
41
|
+
answers = parser.parse(response)
|
|
42
|
+
testing_approach = answers.get("Testing") # "TDD" or "TAD"
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## PR Workflow Examples
|
|
46
|
+
|
|
47
|
+
### Example 1: Single Ticket PR Workflow
|
|
48
|
+
|
|
49
|
+
When user requests a single PR:
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
from claude_mpm.templates.questions.pr_strategy import PRWorkflowTemplate
|
|
53
|
+
|
|
54
|
+
# Only 1 ticket, no CI
|
|
55
|
+
template = PRWorkflowTemplate(num_tickets=1, has_ci=False)
|
|
56
|
+
params = template.to_params()
|
|
57
|
+
|
|
58
|
+
# This will ONLY ask about draft PR preference
|
|
59
|
+
# (skips workflow question since num_tickets=1)
|
|
60
|
+
# (skips auto-merge question since has_ci=False)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**Expected Questions:**
|
|
64
|
+
- "Should PRs be created as drafts initially?" (Draft PRs)
|
|
65
|
+
|
|
66
|
+
### Example 2: Multiple Tickets with CI
|
|
67
|
+
|
|
68
|
+
When user requests PRs for multiple tickets with CI configured:
|
|
69
|
+
|
|
70
|
+
```python
|
|
71
|
+
from claude_mpm.templates.questions.pr_strategy import PRWorkflowTemplate
|
|
72
|
+
|
|
73
|
+
# Check if CI exists (PM reads .github/workflows/ or .gitlab-ci.yml)
|
|
74
|
+
has_ci = True # Found .github/workflows/ci.yml
|
|
75
|
+
|
|
76
|
+
# 3 tickets, CI configured
|
|
77
|
+
template = PRWorkflowTemplate(num_tickets=3, has_ci=True)
|
|
78
|
+
params = template.to_params()
|
|
79
|
+
|
|
80
|
+
# Use AskUserQuestion tool with params
|
|
81
|
+
# ... get response ...
|
|
82
|
+
|
|
83
|
+
# Parse answers
|
|
84
|
+
from claude_mpm.utils.structured_questions import ResponseParser
|
|
85
|
+
parser = ResponseParser(template.build())
|
|
86
|
+
answers = parser.parse(response)
|
|
87
|
+
|
|
88
|
+
# Extract user preferences
|
|
89
|
+
pr_strategy = answers.get("PR Strategy") # "Main-based PRs" or "Stacked PRs"
|
|
90
|
+
draft_mode = answers.get("Draft PRs") # "Yes, as drafts" or "No, ready for review"
|
|
91
|
+
auto_merge = answers.get("Auto-merge") # "Enable auto-merge" or "Manual merge only"
|
|
92
|
+
|
|
93
|
+
# Delegate to version-control with preferences
|
|
94
|
+
delegation_params = {
|
|
95
|
+
"stacked": pr_strategy == "Stacked PRs",
|
|
96
|
+
"draft": draft_mode == "Yes, as drafts",
|
|
97
|
+
"auto_merge": auto_merge == "Enable auto-merge",
|
|
98
|
+
"tickets": ["MPM-101", "MPM-102", "MPM-103"]
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Expected Questions:**
|
|
103
|
+
1. "How should we organize the pull requests?" (PR Strategy)
|
|
104
|
+
2. "Should PRs be created as drafts initially?" (Draft PRs)
|
|
105
|
+
3. "Should PRs auto-merge after CI passes and approval?" (Auto-merge)
|
|
106
|
+
|
|
107
|
+
### Example 3: PR Size Management
|
|
108
|
+
|
|
109
|
+
For large feature PRs:
|
|
110
|
+
|
|
111
|
+
```python
|
|
112
|
+
from claude_mpm.templates.questions.pr_strategy import PRSizeTemplate
|
|
113
|
+
|
|
114
|
+
# Estimated 600 LOC changes
|
|
115
|
+
template = PRSizeTemplate(estimated_changes=600)
|
|
116
|
+
params = template.to_params()
|
|
117
|
+
|
|
118
|
+
# Parse response
|
|
119
|
+
answers = parser.parse(response)
|
|
120
|
+
split_strategy = answers.get("PR Size") # "Single large PR", "Split by component", etc.
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Project Initialization Examples
|
|
124
|
+
|
|
125
|
+
### Example 4: New Project Setup
|
|
126
|
+
|
|
127
|
+
During `/mpm-init` command:
|
|
128
|
+
|
|
129
|
+
```python
|
|
130
|
+
from claude_mpm.templates.questions.project_init import (
|
|
131
|
+
ProjectTypeTemplate,
|
|
132
|
+
DevelopmentWorkflowTemplate,
|
|
133
|
+
FrameworkTemplate
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
# Step 1: Ask about project type
|
|
137
|
+
project_template = ProjectTypeTemplate(existing_files=False)
|
|
138
|
+
params1 = project_template.to_params()
|
|
139
|
+
# ... get response ...
|
|
140
|
+
answers1 = parser1.parse(response1)
|
|
141
|
+
project_type = answers1.get("Project Type") # "Web Application", "API Service", etc.
|
|
142
|
+
language = answers1.get("Language") # "Python", "JavaScript/TypeScript", etc.
|
|
143
|
+
|
|
144
|
+
# Step 2: Ask about development workflow
|
|
145
|
+
workflow_template = DevelopmentWorkflowTemplate(
|
|
146
|
+
project_type=project_type,
|
|
147
|
+
language=language
|
|
148
|
+
)
|
|
149
|
+
params2 = workflow_template.to_params()
|
|
150
|
+
# ... get response ...
|
|
151
|
+
answers2 = parser2.parse(response2)
|
|
152
|
+
testing_framework = answers2.get("Testing") # "pytest", "unittest", "Jest", etc.
|
|
153
|
+
cicd_choice = answers2.get("CI/CD") # "Yes, with GitHub Actions", etc.
|
|
154
|
+
|
|
155
|
+
# Step 3: Ask about frameworks (conditional)
|
|
156
|
+
framework_template = FrameworkTemplate(
|
|
157
|
+
project_type=project_type,
|
|
158
|
+
language=language
|
|
159
|
+
)
|
|
160
|
+
params3 = framework_template.to_params()
|
|
161
|
+
# ... get response ...
|
|
162
|
+
answers3 = parser3.parse(response3)
|
|
163
|
+
framework = answers3.get("Framework") # "FastAPI", "Flask", "Django", etc.
|
|
164
|
+
database = answers3.get("Database") # "PostgreSQL", "MongoDB", etc.
|
|
165
|
+
|
|
166
|
+
# Use all answers to configure project
|
|
167
|
+
project_config = {
|
|
168
|
+
"type": project_type,
|
|
169
|
+
"language": language,
|
|
170
|
+
"testing": testing_framework,
|
|
171
|
+
"ci_cd": cicd_choice,
|
|
172
|
+
"framework": framework,
|
|
173
|
+
"database": database
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Example 5: Existing Project Detection
|
|
178
|
+
|
|
179
|
+
When project has existing files:
|
|
180
|
+
|
|
181
|
+
```python
|
|
182
|
+
from claude_mpm.templates.questions.project_init import ProjectTypeTemplate
|
|
183
|
+
|
|
184
|
+
# PM detected Python files
|
|
185
|
+
detected_language = "Python"
|
|
186
|
+
|
|
187
|
+
# Only ask about project type, skip language question
|
|
188
|
+
template = ProjectTypeTemplate(
|
|
189
|
+
existing_files=True,
|
|
190
|
+
detected_language=detected_language
|
|
191
|
+
)
|
|
192
|
+
params = template.to_params()
|
|
193
|
+
|
|
194
|
+
# Will only ask: "What type of project is this?"
|
|
195
|
+
# Skips language question since it was detected
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## Ticket Management Examples
|
|
199
|
+
|
|
200
|
+
### Example 6: Sprint Planning with Dependencies
|
|
201
|
+
|
|
202
|
+
Planning a sprint with 5 dependent tickets:
|
|
203
|
+
|
|
204
|
+
```python
|
|
205
|
+
from claude_mpm.templates.questions.ticket_mgmt import TicketPrioritizationTemplate
|
|
206
|
+
|
|
207
|
+
# 5 tickets, some depend on others, solo developer
|
|
208
|
+
template = TicketPrioritizationTemplate(
|
|
209
|
+
num_tickets=5,
|
|
210
|
+
has_dependencies=True,
|
|
211
|
+
team_size=1
|
|
212
|
+
)
|
|
213
|
+
params = template.to_params()
|
|
214
|
+
|
|
215
|
+
# Parse response
|
|
216
|
+
answers = parser.parse(response)
|
|
217
|
+
dep_strategy = answers.get("Dependencies") # "Sequential execution" or "Parallel where possible"
|
|
218
|
+
exec_strategy = answers.get("Execution") # "One at a time" or "Parallel execution"
|
|
219
|
+
|
|
220
|
+
# Use answers to create execution plan
|
|
221
|
+
if dep_strategy == "Sequential execution":
|
|
222
|
+
# Order tickets by dependency chain
|
|
223
|
+
execution_order = ["MPM-101", "MPM-102", "MPM-103", "MPM-104", "MPM-105"]
|
|
224
|
+
else:
|
|
225
|
+
# Identify independent tickets for parallel work
|
|
226
|
+
parallel_tickets = ["MPM-101", "MPM-103"] # Independent
|
|
227
|
+
sequential_tickets = ["MPM-102", "MPM-104", "MPM-105"] # Dependent
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### Example 7: Production Feature Scope
|
|
231
|
+
|
|
232
|
+
Defining scope for user-facing production feature:
|
|
233
|
+
|
|
234
|
+
```python
|
|
235
|
+
from claude_mpm.templates.questions.ticket_mgmt import TicketScopeTemplate
|
|
236
|
+
|
|
237
|
+
# User-facing feature for production
|
|
238
|
+
template = TicketScopeTemplate(
|
|
239
|
+
ticket_type="feature",
|
|
240
|
+
is_user_facing=True,
|
|
241
|
+
project_maturity="production"
|
|
242
|
+
)
|
|
243
|
+
params = template.to_params()
|
|
244
|
+
|
|
245
|
+
# Parse response
|
|
246
|
+
answers = parser.parse(response)
|
|
247
|
+
testing_level = answers.get("Testing") # "Comprehensive", "Standard", "Basic"
|
|
248
|
+
docs_level = answers.get("Docs") # "Full documentation", "API docs only", etc.
|
|
249
|
+
|
|
250
|
+
# Define completeness criteria
|
|
251
|
+
completion_criteria = {
|
|
252
|
+
"testing": testing_level,
|
|
253
|
+
"documentation": docs_level,
|
|
254
|
+
"code_review": True, # Always required for production
|
|
255
|
+
"ci_passing": True # Always required for production
|
|
256
|
+
}
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### Example 8: Handling Blockers
|
|
260
|
+
|
|
261
|
+
Managing blocked tickets:
|
|
262
|
+
|
|
263
|
+
```python
|
|
264
|
+
from claude_mpm.templates.questions.ticket_mgmt import TicketDependencyTemplate
|
|
265
|
+
|
|
266
|
+
# 2 tickets blocked by external API dependency
|
|
267
|
+
template = TicketDependencyTemplate(
|
|
268
|
+
blocked_tickets=2,
|
|
269
|
+
blocking_type="external"
|
|
270
|
+
)
|
|
271
|
+
params = template.to_params()
|
|
272
|
+
|
|
273
|
+
# Parse response
|
|
274
|
+
answers = parser.parse(response)
|
|
275
|
+
blocker_strategy = answers.get("Blockers") # "Wait for unblock", "Mock and continue", etc.
|
|
276
|
+
|
|
277
|
+
# Adjust sprint plan based on strategy
|
|
278
|
+
if blocker_strategy == "Mock and continue":
|
|
279
|
+
# Create mock API, continue development
|
|
280
|
+
plan = "Create mock API responses, implement features, swap for real API later"
|
|
281
|
+
elif blocker_strategy == "Wait for unblock":
|
|
282
|
+
# Work on other tickets first
|
|
283
|
+
plan = "Deprioritize blocked tickets, focus on unblocked work"
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
## Custom Questions
|
|
287
|
+
|
|
288
|
+
### Example 9: Custom Deployment Question
|
|
289
|
+
|
|
290
|
+
Creating a custom question for specific use case:
|
|
291
|
+
|
|
292
|
+
```python
|
|
293
|
+
from claude_mpm.utils.structured_questions import QuestionBuilder, QuestionSet
|
|
294
|
+
|
|
295
|
+
# Build custom deployment question
|
|
296
|
+
deployment_question = (
|
|
297
|
+
QuestionBuilder()
|
|
298
|
+
.ask("Which cloud provider should we deploy to?")
|
|
299
|
+
.header("Cloud")
|
|
300
|
+
.add_option("AWS", "Amazon Web Services with EC2/ECS")
|
|
301
|
+
.add_option("GCP", "Google Cloud Platform with Cloud Run")
|
|
302
|
+
.add_option("Azure", "Microsoft Azure with App Service")
|
|
303
|
+
.add_option("Vercel", "Vercel for serverless Next.js apps")
|
|
304
|
+
.build()
|
|
305
|
+
)
|
|
306
|
+
|
|
307
|
+
region_question = (
|
|
308
|
+
QuestionBuilder()
|
|
309
|
+
.ask("Which region should be the primary deployment?")
|
|
310
|
+
.header("Region")
|
|
311
|
+
.add_option("us-east-1", "US East (Virginia) - lowest latency for East Coast")
|
|
312
|
+
.add_option("us-west-2", "US West (Oregon) - lowest latency for West Coast")
|
|
313
|
+
.add_option("eu-west-1", "EU West (Ireland) - GDPR compliant, EU users")
|
|
314
|
+
.build()
|
|
315
|
+
)
|
|
316
|
+
|
|
317
|
+
# Combine into question set
|
|
318
|
+
question_set = QuestionSet([deployment_question, region_question])
|
|
319
|
+
params = question_set.to_ask_user_question_params()
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
### Example 10: Multi-Select Question
|
|
323
|
+
|
|
324
|
+
Using multi-select for selecting multiple features:
|
|
325
|
+
|
|
326
|
+
```python
|
|
327
|
+
from claude_mpm.utils.structured_questions import QuestionBuilder
|
|
328
|
+
|
|
329
|
+
# User can select multiple features to implement
|
|
330
|
+
features_question = (
|
|
331
|
+
QuestionBuilder()
|
|
332
|
+
.ask("Which features should we prioritize? (Select all that apply)")
|
|
333
|
+
.header("Features")
|
|
334
|
+
.add_option("Auth", "User authentication and authorization")
|
|
335
|
+
.add_option("Search", "Full-text search functionality")
|
|
336
|
+
.add_option("Analytics", "Usage analytics and reporting")
|
|
337
|
+
.add_option("Export", "Data export in multiple formats")
|
|
338
|
+
.multi_select(enabled=True) # Enable multi-select
|
|
339
|
+
.build()
|
|
340
|
+
)
|
|
341
|
+
|
|
342
|
+
question_set = QuestionSet([features_question])
|
|
343
|
+
params = question_set.to_ask_user_question_params()
|
|
344
|
+
|
|
345
|
+
# Parse multi-select response
|
|
346
|
+
answers = parser.parse(response)
|
|
347
|
+
selected_features = answers.get("Features") # List: ["Auth", "Search", "Analytics"]
|
|
348
|
+
|
|
349
|
+
# Create tickets for each selected feature
|
|
350
|
+
for feature in selected_features:
|
|
351
|
+
# Create ticket for feature
|
|
352
|
+
pass
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
## Best Practices
|
|
356
|
+
|
|
357
|
+
### 1. Context-Aware Questions
|
|
358
|
+
|
|
359
|
+
Always provide relevant context to templates:
|
|
360
|
+
|
|
361
|
+
```python
|
|
362
|
+
# ✅ GOOD: Provide context for relevant questions
|
|
363
|
+
template = PRWorkflowTemplate(
|
|
364
|
+
num_tickets=len(tickets),
|
|
365
|
+
has_ci=check_for_ci_config() # Actually check for CI
|
|
366
|
+
)
|
|
367
|
+
|
|
368
|
+
# ❌ BAD: Hardcoded or missing context
|
|
369
|
+
template = PRWorkflowTemplate(num_tickets=1, has_ci=True) # Wrong if 3 tickets
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
### 2. Parse Before Using
|
|
373
|
+
|
|
374
|
+
Always parse responses before using answers:
|
|
375
|
+
|
|
376
|
+
```python
|
|
377
|
+
# ✅ GOOD: Parse and validate
|
|
378
|
+
parser = ResponseParser(question_set)
|
|
379
|
+
answers = parser.parse(response)
|
|
380
|
+
if answers.get("Testing") == "Comprehensive":
|
|
381
|
+
# Use validated answer
|
|
382
|
+
|
|
383
|
+
# ❌ BAD: Direct access without parsing
|
|
384
|
+
testing_choice = response["answers"]["Testing"] # May not exist or be invalid
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
### 3. Handle Optional Answers
|
|
388
|
+
|
|
389
|
+
Not all questions may be answered:
|
|
390
|
+
|
|
391
|
+
```python
|
|
392
|
+
# ✅ GOOD: Check if answered
|
|
393
|
+
if parser.was_answered(answers, "Auto-merge"):
|
|
394
|
+
auto_merge = answers.get("Auto-merge") == "Enable auto-merge"
|
|
395
|
+
else:
|
|
396
|
+
auto_merge = False # Default if not answered
|
|
397
|
+
|
|
398
|
+
# ❌ BAD: Assume always answered
|
|
399
|
+
auto_merge = answers["Auto-merge"] == "Enable auto-merge" # May KeyError
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
### 4. Use Templates When Available
|
|
403
|
+
|
|
404
|
+
Don't recreate common questions:
|
|
405
|
+
|
|
406
|
+
```python
|
|
407
|
+
# ✅ GOOD: Use existing template
|
|
408
|
+
from claude_mpm.templates.questions.pr_strategy import PRWorkflowTemplate
|
|
409
|
+
template = PRWorkflowTemplate(num_tickets=3)
|
|
410
|
+
|
|
411
|
+
# ❌ BAD: Recreate common question
|
|
412
|
+
question = QuestionBuilder().ask("Main-based or stacked PRs?")... # Template exists
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
### 5. Validate Context
|
|
416
|
+
|
|
417
|
+
Ensure context values are valid:
|
|
418
|
+
|
|
419
|
+
```python
|
|
420
|
+
# ✅ GOOD: Validate before creating template
|
|
421
|
+
num_tickets = max(1, len(tickets)) # Ensure >= 1
|
|
422
|
+
template = TicketPrioritizationTemplate(num_tickets=num_tickets)
|
|
423
|
+
|
|
424
|
+
# ❌ BAD: Invalid context
|
|
425
|
+
template = TicketPrioritizationTemplate(num_tickets=0) # May cause issues
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
## Complete Workflow Example
|
|
429
|
+
|
|
430
|
+
Here's a complete PM workflow using structured questions:
|
|
431
|
+
|
|
432
|
+
```python
|
|
433
|
+
from claude_mpm.templates.questions.pr_strategy import PRWorkflowTemplate
|
|
434
|
+
from claude_mpm.utils.structured_questions import ResponseParser
|
|
435
|
+
|
|
436
|
+
# User requests: "Create PRs for MPM-101, MPM-102, MPM-103"
|
|
437
|
+
|
|
438
|
+
# Step 1: Gather context
|
|
439
|
+
tickets = ["MPM-101", "MPM-102", "MPM-103"]
|
|
440
|
+
num_tickets = len(tickets)
|
|
441
|
+
has_ci = check_for_ci_files() # Check .github/workflows/
|
|
442
|
+
|
|
443
|
+
# Step 2: Build and ask questions
|
|
444
|
+
template = PRWorkflowTemplate(num_tickets=num_tickets, has_ci=has_ci)
|
|
445
|
+
params = template.to_params()
|
|
446
|
+
# ... use AskUserQuestion tool with params ...
|
|
447
|
+
|
|
448
|
+
# Step 3: Parse response
|
|
449
|
+
parser = ResponseParser(template.build())
|
|
450
|
+
answers = parser.parse(response)
|
|
451
|
+
|
|
452
|
+
# Step 4: Extract preferences
|
|
453
|
+
pr_strategy = answers.get("PR Strategy") # "Main-based PRs" or "Stacked PRs"
|
|
454
|
+
draft_mode = answers.get("Draft PRs") == "Yes, as drafts"
|
|
455
|
+
auto_merge = answers.get("Auto-merge") == "Enable auto-merge" if has_ci else False
|
|
456
|
+
|
|
457
|
+
# Step 5: Delegate to version-control agent
|
|
458
|
+
delegation_task = {
|
|
459
|
+
"action": "create_prs",
|
|
460
|
+
"tickets": tickets,
|
|
461
|
+
"strategy": "stacked" if pr_strategy == "Stacked PRs" else "main-based",
|
|
462
|
+
"draft": draft_mode,
|
|
463
|
+
"auto_merge": auto_merge,
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
# Delegate to version-control agent with structured parameters
|
|
467
|
+
# Task tool with delegation_task
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
## Error Handling
|
|
471
|
+
|
|
472
|
+
Handle validation errors gracefully:
|
|
473
|
+
|
|
474
|
+
```python
|
|
475
|
+
from claude_mpm.utils.structured_questions import QuestionValidationError
|
|
476
|
+
|
|
477
|
+
try:
|
|
478
|
+
question = (
|
|
479
|
+
QuestionBuilder()
|
|
480
|
+
.ask("Invalid question without question mark") # Missing '?'
|
|
481
|
+
.header("Test")
|
|
482
|
+
.add_option("A", "Option A")
|
|
483
|
+
.add_option("B", "Option B")
|
|
484
|
+
.build()
|
|
485
|
+
)
|
|
486
|
+
except QuestionValidationError as e:
|
|
487
|
+
# Handle validation error
|
|
488
|
+
print(f"Question validation failed: {e}")
|
|
489
|
+
# Fix and retry or use fallback
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
## Summary
|
|
493
|
+
|
|
494
|
+
Structured questions provide:
|
|
495
|
+
- **Type Safety**: Validated at construction time
|
|
496
|
+
- **Consistency**: Reusable templates for common workflows
|
|
497
|
+
- **Context-Awareness**: Questions adapt based on situation
|
|
498
|
+
- **Better UX**: Clear, well-formatted questions for users
|
|
499
|
+
- **Maintainability**: Centralized question logic
|
|
500
|
+
|
|
501
|
+
Use templates for common cases, build custom questions for specific needs, and always validate responses before use.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"""Structured question templates for common PM workflows.
|
|
2
|
+
|
|
3
|
+
This package provides reusable question templates that PM agents can use to gather
|
|
4
|
+
user input in a structured way. Templates are pre-configured QuestionSet objects
|
|
5
|
+
that can be customized based on context.
|
|
6
|
+
|
|
7
|
+
Available Templates:
|
|
8
|
+
- PR Strategy: Questions about PR workflow, draft preferences, auto-merge
|
|
9
|
+
- Project Initialization: Questions about project type, language, frameworks
|
|
10
|
+
- Ticket Management: Questions about ticket prioritization and scope
|
|
11
|
+
|
|
12
|
+
Example Usage:
|
|
13
|
+
>>> from claude_mpm.templates.questions.pr_strategy import PRWorkflowTemplate
|
|
14
|
+
>>> template = PRWorkflowTemplate(num_tickets=3)
|
|
15
|
+
>>> question_set = template.build()
|
|
16
|
+
>>> params = question_set.to_ask_user_question_params()
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
from claude_mpm.templates.questions.base import (
|
|
20
|
+
ConditionalTemplate,
|
|
21
|
+
QuestionTemplate,
|
|
22
|
+
)
|
|
23
|
+
from claude_mpm.templates.questions.pr_strategy import (
|
|
24
|
+
PRWorkflowTemplate,
|
|
25
|
+
)
|
|
26
|
+
from claude_mpm.templates.questions.project_init import (
|
|
27
|
+
DevelopmentWorkflowTemplate,
|
|
28
|
+
ProjectTypeTemplate,
|
|
29
|
+
)
|
|
30
|
+
from claude_mpm.templates.questions.ticket_mgmt import (
|
|
31
|
+
TicketPrioritizationTemplate,
|
|
32
|
+
TicketScopeTemplate,
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
__all__ = [
|
|
36
|
+
"ConditionalTemplate",
|
|
37
|
+
"DevelopmentWorkflowTemplate",
|
|
38
|
+
"PRWorkflowTemplate",
|
|
39
|
+
"ProjectTypeTemplate",
|
|
40
|
+
"QuestionTemplate",
|
|
41
|
+
"TicketPrioritizationTemplate",
|
|
42
|
+
"TicketScopeTemplate",
|
|
43
|
+
]
|