claude-mpm 4.15.6__py3-none-any.whl → 4.21.3__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/PM_INSTRUCTIONS.md +49 -0
- claude_mpm/agents/agent_loader.py +4 -4
- claude_mpm/agents/templates/engineer.json +5 -1
- claude_mpm/agents/templates/php-engineer.json +10 -4
- claude_mpm/agents/templates/python_engineer.json +8 -3
- claude_mpm/agents/templates/rust_engineer.json +12 -7
- claude_mpm/agents/templates/svelte-engineer.json +225 -0
- claude_mpm/cli/commands/__init__.py +2 -0
- claude_mpm/cli/commands/mpm_init/__init__.py +73 -0
- claude_mpm/cli/commands/mpm_init/core.py +525 -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/skills.py +488 -0
- claude_mpm/cli/executor.py +2 -0
- claude_mpm/cli/parsers/base_parser.py +7 -0
- claude_mpm/cli/parsers/mpm_init_parser.py +42 -0
- claude_mpm/cli/parsers/skills_parser.py +137 -0
- claude_mpm/cli/startup.py +57 -0
- claude_mpm/commands/mpm-auto-configure.md +52 -0
- claude_mpm/commands/mpm-help.md +6 -0
- claude_mpm/commands/mpm-init.md +112 -6
- claude_mpm/commands/mpm-resume.md +372 -0
- claude_mpm/commands/mpm-version.md +113 -0
- claude_mpm/commands/mpm.md +2 -0
- claude_mpm/config/agent_config.py +2 -2
- claude_mpm/constants.py +12 -0
- claude_mpm/core/config.py +42 -0
- claude_mpm/core/factories.py +1 -1
- claude_mpm/core/interfaces.py +56 -1
- claude_mpm/core/optimized_agent_loader.py +3 -3
- claude_mpm/hooks/__init__.py +8 -0
- claude_mpm/hooks/claude_hooks/response_tracking.py +35 -1
- claude_mpm/hooks/session_resume_hook.py +121 -0
- claude_mpm/models/resume_log.py +340 -0
- 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_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/local_template_deployment.py +1 -1
- claude_mpm/services/agents/local_template_manager.py +1 -1
- 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/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/models.py +21 -0
- claude_mpm/services/event_bus/relay.py +23 -7
- claude_mpm/services/infrastructure/resume_log_generator.py +439 -0
- claude_mpm/services/local_ops/__init__.py +2 -0
- claude_mpm/services/mcp_config_manager.py +7 -131
- claude_mpm/services/mcp_gateway/auto_configure.py +31 -25
- claude_mpm/services/mcp_gateway/core/process_pool.py +19 -10
- claude_mpm/services/mcp_gateway/tools/external_mcp_services.py +26 -21
- claude_mpm/services/memory/failure_tracker.py +19 -4
- claude_mpm/services/session_manager.py +205 -1
- claude_mpm/services/unified/deployment_strategies/local.py +1 -1
- claude_mpm/services/version_service.py +104 -1
- claude_mpm/skills/__init__.py +21 -0
- claude_mpm/skills/agent_skills_injector.py +324 -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/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/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/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/json-data-handling.md +223 -0
- claude_mpm/skills/bundled/main/artifacts-builder/SKILL.md +86 -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/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/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 +567 -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/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/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/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/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/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 +348 -0
- claude_mpm/skills/skills_service.py +739 -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 +2 -2
- {claude_mpm-4.15.6.dist-info → claude_mpm-4.21.3.dist-info}/METADATA +211 -33
- {claude_mpm-4.15.6.dist-info → claude_mpm-4.21.3.dist-info}/RECORD +206 -64
- claude_mpm/agents/INSTRUCTIONS_OLD_DEPRECATED.md +0 -602
- claude_mpm/cli/commands/mpm_init.py +0 -2008
- claude_mpm/tools/code_tree_analyzer.py +0 -1825
- {claude_mpm-4.15.6.dist-info → claude_mpm-4.21.3.dist-info}/WHEEL +0 -0
- {claude_mpm-4.15.6.dist-info → claude_mpm-4.21.3.dist-info}/entry_points.txt +0 -0
- {claude_mpm-4.15.6.dist-info → claude_mpm-4.21.3.dist-info}/licenses/LICENSE +0 -0
- {claude_mpm-4.15.6.dist-info → claude_mpm-4.21.3.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Skills command parser for claude-mpm CLI.
|
|
3
|
+
|
|
4
|
+
WHY: This module contains all arguments specific to skills management commands,
|
|
5
|
+
providing CLI access to the Skills Integration system.
|
|
6
|
+
|
|
7
|
+
DESIGN DECISION: Skills commands expose the SkillsService functionality via CLI
|
|
8
|
+
for listing, deploying, validating, updating, and configuring Claude Code skills.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
import argparse
|
|
12
|
+
|
|
13
|
+
from ...constants import CLICommands, SkillsCommands
|
|
14
|
+
from .base_parser import add_common_arguments
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def add_skills_subparser(subparsers) -> argparse.ArgumentParser:
|
|
18
|
+
"""
|
|
19
|
+
Add the skills subparser with all skills management commands.
|
|
20
|
+
|
|
21
|
+
WHY: Skills management has multiple subcommands for discovery, deployment,
|
|
22
|
+
validation, updates, and configuration that need their own argument structures.
|
|
23
|
+
|
|
24
|
+
Args:
|
|
25
|
+
subparsers: The subparsers object from the main parser
|
|
26
|
+
|
|
27
|
+
Returns:
|
|
28
|
+
The configured skills subparser
|
|
29
|
+
"""
|
|
30
|
+
# Skills command with subcommands
|
|
31
|
+
skills_parser = subparsers.add_parser(
|
|
32
|
+
CLICommands.SKILLS.value, help="Manage Claude Code skills"
|
|
33
|
+
)
|
|
34
|
+
add_common_arguments(skills_parser)
|
|
35
|
+
|
|
36
|
+
skills_subparsers = skills_parser.add_subparsers(
|
|
37
|
+
dest="skills_command", help="Skills commands", metavar="SUBCOMMAND"
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
# List command
|
|
41
|
+
list_parser = skills_subparsers.add_parser(
|
|
42
|
+
SkillsCommands.LIST.value, help="List available skills"
|
|
43
|
+
)
|
|
44
|
+
list_parser.add_argument(
|
|
45
|
+
"--category",
|
|
46
|
+
help="Filter by category (e.g., development, infrastructure, web-development)",
|
|
47
|
+
)
|
|
48
|
+
list_parser.add_argument(
|
|
49
|
+
"--agent", help="Show skills for specific agent (e.g., engineer, pm)"
|
|
50
|
+
)
|
|
51
|
+
list_parser.add_argument(
|
|
52
|
+
"--verbose",
|
|
53
|
+
"-v",
|
|
54
|
+
action="store_true",
|
|
55
|
+
help="Show detailed skill information",
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
# Deploy command
|
|
59
|
+
deploy_parser = skills_subparsers.add_parser(
|
|
60
|
+
SkillsCommands.DEPLOY.value, help="Deploy bundled skills to project"
|
|
61
|
+
)
|
|
62
|
+
deploy_parser.add_argument(
|
|
63
|
+
"--force",
|
|
64
|
+
action="store_true",
|
|
65
|
+
help="Force redeployment of already deployed skills",
|
|
66
|
+
)
|
|
67
|
+
deploy_parser.add_argument(
|
|
68
|
+
"--skill",
|
|
69
|
+
action="append",
|
|
70
|
+
dest="skills",
|
|
71
|
+
help="Deploy specific skill(s) only (can be used multiple times)",
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
# Validate command
|
|
75
|
+
validate_parser = skills_subparsers.add_parser(
|
|
76
|
+
SkillsCommands.VALIDATE.value, help="Validate skill structure and metadata"
|
|
77
|
+
)
|
|
78
|
+
validate_parser.add_argument("skill_name", help="Name of the skill to validate")
|
|
79
|
+
validate_parser.add_argument(
|
|
80
|
+
"--strict",
|
|
81
|
+
action="store_true",
|
|
82
|
+
help="Use strict validation (treat warnings as errors)",
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
# Update command
|
|
86
|
+
update_parser = skills_subparsers.add_parser(
|
|
87
|
+
SkillsCommands.UPDATE.value, help="Check for and install skill updates"
|
|
88
|
+
)
|
|
89
|
+
update_parser.add_argument(
|
|
90
|
+
"skill_names",
|
|
91
|
+
nargs="*",
|
|
92
|
+
help="Specific skills to update (default: all)",
|
|
93
|
+
)
|
|
94
|
+
update_parser.add_argument(
|
|
95
|
+
"--check-only",
|
|
96
|
+
action="store_true",
|
|
97
|
+
help="Check for updates without installing them",
|
|
98
|
+
)
|
|
99
|
+
update_parser.add_argument(
|
|
100
|
+
"--force",
|
|
101
|
+
action="store_true",
|
|
102
|
+
help="Force update even if versions match",
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
# Info command
|
|
106
|
+
info_parser = skills_subparsers.add_parser(
|
|
107
|
+
SkillsCommands.INFO.value, help="Show detailed skill information"
|
|
108
|
+
)
|
|
109
|
+
info_parser.add_argument("skill_name", help="Name of the skill")
|
|
110
|
+
info_parser.add_argument(
|
|
111
|
+
"--show-content",
|
|
112
|
+
action="store_true",
|
|
113
|
+
help="Show full skill content (SKILL.md)",
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
# Config command
|
|
117
|
+
config_parser = skills_subparsers.add_parser(
|
|
118
|
+
SkillsCommands.CONFIG.value, help="View or edit skills configuration"
|
|
119
|
+
)
|
|
120
|
+
config_parser.add_argument(
|
|
121
|
+
"--scope",
|
|
122
|
+
choices=["system", "user", "project"],
|
|
123
|
+
default="project",
|
|
124
|
+
help="Configuration scope (default: project)",
|
|
125
|
+
)
|
|
126
|
+
config_parser.add_argument(
|
|
127
|
+
"--edit",
|
|
128
|
+
action="store_true",
|
|
129
|
+
help="Open configuration in $EDITOR",
|
|
130
|
+
)
|
|
131
|
+
config_parser.add_argument(
|
|
132
|
+
"--path",
|
|
133
|
+
action="store_true",
|
|
134
|
+
help="Show configuration file path",
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
return skills_parser
|
claude_mpm/cli/startup.py
CHANGED
|
@@ -79,6 +79,62 @@ def setup_configure_command_environment(args):
|
|
|
79
79
|
logging.getLogger("claude_mpm").setLevel(logging.WARNING)
|
|
80
80
|
|
|
81
81
|
|
|
82
|
+
def deploy_bundled_skills():
|
|
83
|
+
"""
|
|
84
|
+
Deploy bundled Claude Code skills on startup.
|
|
85
|
+
|
|
86
|
+
WHY: Automatically deploy skills from the bundled/ directory to .claude/skills/
|
|
87
|
+
to ensure skills are available for agents without manual intervention.
|
|
88
|
+
|
|
89
|
+
DESIGN DECISION: Deployment happens silently on startup with logging only.
|
|
90
|
+
Failures are logged but don't block startup to ensure claude-mpm remains
|
|
91
|
+
functional even if skills deployment fails. Respects auto_deploy config setting.
|
|
92
|
+
"""
|
|
93
|
+
try:
|
|
94
|
+
# Check if auto-deploy is disabled in config
|
|
95
|
+
from ..config.config_loader import ConfigLoader
|
|
96
|
+
|
|
97
|
+
config_loader = ConfigLoader()
|
|
98
|
+
try:
|
|
99
|
+
config = config_loader.load_config()
|
|
100
|
+
skills_config = config.get("skills", {})
|
|
101
|
+
if not skills_config.get("auto_deploy", True):
|
|
102
|
+
# Auto-deploy disabled, skip silently
|
|
103
|
+
return
|
|
104
|
+
except Exception:
|
|
105
|
+
# If config loading fails, assume auto-deploy is enabled (default)
|
|
106
|
+
pass
|
|
107
|
+
|
|
108
|
+
# Import and run skills deployment
|
|
109
|
+
from ..skills.skills_service import SkillsService
|
|
110
|
+
|
|
111
|
+
skills_service = SkillsService()
|
|
112
|
+
deployment_result = skills_service.deploy_bundled_skills()
|
|
113
|
+
|
|
114
|
+
# Log results
|
|
115
|
+
from ..core.logger import get_logger
|
|
116
|
+
|
|
117
|
+
logger = get_logger("cli")
|
|
118
|
+
|
|
119
|
+
if deployment_result.get("deployed"):
|
|
120
|
+
logger.info(
|
|
121
|
+
f"Skills: Deployed {len(deployment_result['deployed'])} skill(s)"
|
|
122
|
+
)
|
|
123
|
+
|
|
124
|
+
if deployment_result.get("errors"):
|
|
125
|
+
logger.warning(
|
|
126
|
+
f"Skills: {len(deployment_result['errors'])} skill(s) failed to deploy"
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
except Exception as e:
|
|
130
|
+
# Import logger here to avoid circular imports
|
|
131
|
+
from ..core.logger import get_logger
|
|
132
|
+
|
|
133
|
+
logger = get_logger("cli")
|
|
134
|
+
logger.debug(f"Failed to deploy bundled skills: {e}")
|
|
135
|
+
# Continue execution - skills deployment failure shouldn't block startup
|
|
136
|
+
|
|
137
|
+
|
|
82
138
|
def discover_and_link_runtime_skills():
|
|
83
139
|
"""
|
|
84
140
|
Discover and link runtime skills from user/project directories.
|
|
@@ -114,6 +170,7 @@ def run_background_services():
|
|
|
114
170
|
check_mcp_auto_configuration()
|
|
115
171
|
verify_mcp_gateway_startup()
|
|
116
172
|
check_for_updates_async()
|
|
173
|
+
deploy_bundled_skills()
|
|
117
174
|
discover_and_link_runtime_skills()
|
|
118
175
|
|
|
119
176
|
|
|
@@ -201,6 +201,58 @@ Next steps:
|
|
|
201
201
|
- docker-ops
|
|
202
202
|
- local-ops-agent
|
|
203
203
|
|
|
204
|
+
## Default Configuration Fallback
|
|
205
|
+
|
|
206
|
+
When auto-configuration cannot detect your project's toolchain (e.g., a new or uncommon language/framework), it automatically falls back to a sensible set of default general-purpose agents instead of leaving your project unconfigured.
|
|
207
|
+
|
|
208
|
+
### When Defaults are Applied
|
|
209
|
+
|
|
210
|
+
Default agents are deployed when:
|
|
211
|
+
- Primary language is detected as "Unknown"
|
|
212
|
+
- No specific framework or toolchain can be identified
|
|
213
|
+
- No agent recommendations can be generated from detected technologies
|
|
214
|
+
|
|
215
|
+
### Default Agents
|
|
216
|
+
|
|
217
|
+
The following general-purpose agents are recommended with moderate confidence (0.7):
|
|
218
|
+
|
|
219
|
+
- **engineer**: General-purpose engineer for code implementation
|
|
220
|
+
- **research**: Code exploration and analysis
|
|
221
|
+
- **qa**: Testing and quality assurance
|
|
222
|
+
- **ops**: Infrastructure and deployment operations
|
|
223
|
+
- **documentation**: Documentation and technical writing
|
|
224
|
+
|
|
225
|
+
All default recommendations will be marked with `is_default: True` in the metadata.
|
|
226
|
+
|
|
227
|
+
### Disabling Default Fallback
|
|
228
|
+
|
|
229
|
+
To disable the default configuration fallback, edit `.claude-mpm/config/agent_capabilities.yaml`:
|
|
230
|
+
|
|
231
|
+
```yaml
|
|
232
|
+
default_configuration:
|
|
233
|
+
enabled: false # Disable default fallback
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
When disabled, auto-configuration will recommend zero agents if the toolchain cannot be detected.
|
|
237
|
+
|
|
238
|
+
### Customizing Defaults
|
|
239
|
+
|
|
240
|
+
You can customize which agents are deployed by default by editing the `default_configuration.agents` section in `.claude-mpm/config/agent_capabilities.yaml`:
|
|
241
|
+
|
|
242
|
+
```yaml
|
|
243
|
+
default_configuration:
|
|
244
|
+
enabled: true
|
|
245
|
+
min_confidence: 0.7 # Confidence score for default recommendations
|
|
246
|
+
agents:
|
|
247
|
+
- agent_id: engineer
|
|
248
|
+
reasoning: "General-purpose engineer for code implementation"
|
|
249
|
+
priority: 1
|
|
250
|
+
- agent_id: research
|
|
251
|
+
reasoning: "Code exploration and analysis"
|
|
252
|
+
priority: 2
|
|
253
|
+
# Add or remove agents as needed
|
|
254
|
+
```
|
|
255
|
+
|
|
204
256
|
## Tips
|
|
205
257
|
|
|
206
258
|
1. **Start with preview**: Always run with `--preview` first to see recommendations
|
claude_mpm/commands/mpm-help.md
CHANGED
|
@@ -87,9 +87,15 @@ Available Commands:
|
|
|
87
87
|
/mpm-init [update]
|
|
88
88
|
Initialize or update project documentation
|
|
89
89
|
|
|
90
|
+
/mpm-resume
|
|
91
|
+
Create session resume files for easy work resumption
|
|
92
|
+
|
|
90
93
|
/mpm-monitor [start|stop|restart|status|port]
|
|
91
94
|
Manage Socket.IO monitoring server and dashboard
|
|
92
95
|
|
|
96
|
+
/mpm-version
|
|
97
|
+
Display comprehensive version information including project version, all agents with versions, and all skills with versions
|
|
98
|
+
|
|
93
99
|
Use '/mpm-help <command>' for detailed help on a specific command.
|
|
94
100
|
```
|
|
95
101
|
|
claude_mpm/commands/mpm-init.md
CHANGED
|
@@ -9,6 +9,9 @@ Initialize or intelligently update your project for optimal use with Claude Code
|
|
|
9
9
|
/mpm-init update # Lightweight update based on recent git activity
|
|
10
10
|
/mpm-init context # Intelligent context analysis from git history
|
|
11
11
|
/mpm-init context --days 14 # Analyze last 14 days of git history
|
|
12
|
+
/mpm-init resume # Resume from stop event logs (NEW)
|
|
13
|
+
/mpm-init resume --list # List all sessions from logs
|
|
14
|
+
/mpm-init resume --session-id ID # Resume specific session
|
|
12
15
|
/mpm-init catchup # Quick commit history display (no analysis)
|
|
13
16
|
/mpm-init --review # Review project state without changes
|
|
14
17
|
/mpm-init --update # Full update of existing CLAUDE.md
|
|
@@ -24,7 +27,9 @@ This command has two primary modes:
|
|
|
24
27
|
- **Project initialization/updates**: Delegates to the Agentic Coder Optimizer agent for documentation, tooling, and workflow setup
|
|
25
28
|
- **Context analysis** (context/catchup): Provides intelligent project context from git history for resuming work
|
|
26
29
|
|
|
27
|
-
**
|
|
30
|
+
**Resume Modes**: The command provides two resume capabilities:
|
|
31
|
+
- `/mpm-init resume`: Reads stop event logs from `.claude-mpm/responses/` to help resume work
|
|
32
|
+
- `/mpm-init context`: Analyzes git history for intelligent work resumption (delegates to Research agent)
|
|
28
33
|
|
|
29
34
|
**Quick Update Mode**: Running `/mpm-init update` performs a lightweight update focused on recent git activity. It analyzes recent commits, generates an activity report, and updates documentation with minimal changes. Perfect for quick refreshes after development sprints.
|
|
30
35
|
|
|
@@ -87,8 +92,46 @@ Analyzes recent git commits to identify:
|
|
|
87
92
|
|
|
88
93
|
**NOT session state**: This does NOT save/restore conversation state like Claude Code. Instead, it reconstructs project context from git history using conventional commits and commit message analysis.
|
|
89
94
|
|
|
90
|
-
#### `/mpm-init resume`
|
|
91
|
-
|
|
95
|
+
#### `/mpm-init resume` (Stop Event Logs)
|
|
96
|
+
```bash
|
|
97
|
+
/mpm-init resume # Show latest session from logs
|
|
98
|
+
/mpm-init resume --list # List all sessions
|
|
99
|
+
/mpm-init resume --session-id ID # Resume specific session
|
|
100
|
+
/mpm-init resume --last 5 # Show last 5 sessions
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Reads from stop event logs to help resume work from previous sessions:
|
|
104
|
+
|
|
105
|
+
**Data Sources** (two-tier strategy):
|
|
106
|
+
1. **Resume logs** (preferred): `.claude-mpm/resume-logs/*.md` - Structured 10k-token summaries
|
|
107
|
+
2. **Response logs** (fallback): `.claude-mpm/responses/*.json` - Raw conversation stop events
|
|
108
|
+
|
|
109
|
+
**What it shows**:
|
|
110
|
+
- When session ended (time ago)
|
|
111
|
+
- What was being worked on (request)
|
|
112
|
+
- Tasks completed (from PM responses)
|
|
113
|
+
- Files modified (from PM tracking)
|
|
114
|
+
- Next steps (from PM recommendations)
|
|
115
|
+
- Stop reason (why session ended)
|
|
116
|
+
- Token usage (context consumption)
|
|
117
|
+
- Git context (branch, working directory)
|
|
118
|
+
|
|
119
|
+
**How it works**:
|
|
120
|
+
1. Scans response logs in `.claude-mpm/responses/`
|
|
121
|
+
2. Groups by `session_id`
|
|
122
|
+
3. Parses PM response JSON for context
|
|
123
|
+
4. Extracts tasks, files, next steps from PM summaries
|
|
124
|
+
5. Displays comprehensive resume context
|
|
125
|
+
|
|
126
|
+
**Use Cases**:
|
|
127
|
+
- Resume work after context threshold pause
|
|
128
|
+
- Review what was accomplished in previous session
|
|
129
|
+
- Understand why session stopped (max_tokens, end_turn, etc.)
|
|
130
|
+
- See exact files and tasks from last session
|
|
131
|
+
|
|
132
|
+
**Difference from `context`**:
|
|
133
|
+
- **resume**: Reads actual stop event logs (what PM logged)
|
|
134
|
+
- **context**: Analyzes git commits (what was committed)
|
|
92
135
|
|
|
93
136
|
### `/mpm-init catchup` (Simple Git History)
|
|
94
137
|
```bash
|
|
@@ -225,6 +268,66 @@ This provides intelligent analysis including:
|
|
|
225
268
|
|
|
226
269
|
The old `resume` command redirects to `context` with a deprecation warning.
|
|
227
270
|
|
|
271
|
+
### Resume from Stop Event Logs
|
|
272
|
+
|
|
273
|
+
Display context from previous sessions using stop event logs:
|
|
274
|
+
|
|
275
|
+
```bash
|
|
276
|
+
/mpm-init resume # Show latest session
|
|
277
|
+
/mpm-init resume --list # List all available sessions
|
|
278
|
+
/mpm-init resume --session-id abc123 # Resume specific session
|
|
279
|
+
/mpm-init resume --last 10 # Show last 10 sessions
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
Shows comprehensive context including:
|
|
283
|
+
- What was being worked on
|
|
284
|
+
- Tasks completed (from PM tracking)
|
|
285
|
+
- Files modified
|
|
286
|
+
- Next steps recommended
|
|
287
|
+
- Stop reason (context limit, completion, etc.)
|
|
288
|
+
- Token usage
|
|
289
|
+
- Time elapsed since session
|
|
290
|
+
|
|
291
|
+
**Example Output:**
|
|
292
|
+
```
|
|
293
|
+
================================================================================
|
|
294
|
+
📋 Resume Context - Session from 2 hours ago
|
|
295
|
+
================================================================================
|
|
296
|
+
|
|
297
|
+
Session ID: 20251104_143000
|
|
298
|
+
Ended: 2024-11-04 14:30 (2 hours ago)
|
|
299
|
+
Stop Reason: Context threshold reached (70%)
|
|
300
|
+
Token Usage: 140,000 / 200,000 (70%)
|
|
301
|
+
|
|
302
|
+
Working on:
|
|
303
|
+
"Implementing auto-pause and resume functionality"
|
|
304
|
+
|
|
305
|
+
✅ Completed:
|
|
306
|
+
• Researched stop event logging system
|
|
307
|
+
• Found response logs in .claude-mpm/responses/
|
|
308
|
+
• Identified two-tier resume strategy
|
|
309
|
+
|
|
310
|
+
📝 Files Modified:
|
|
311
|
+
• src/claude_mpm/services/cli/resume_service.py (new)
|
|
312
|
+
• src/claude_mpm/cli/commands/mpm_init/ (refactored into package)
|
|
313
|
+
|
|
314
|
+
🎯 Next Steps:
|
|
315
|
+
• Implement ResumeService class
|
|
316
|
+
• Add resume subcommand to mpm-init
|
|
317
|
+
• Test with real response logs
|
|
318
|
+
|
|
319
|
+
Git Context:
|
|
320
|
+
Branch: main
|
|
321
|
+
Working Directory: /Users/masa/Projects/claude-mpm
|
|
322
|
+
================================================================================
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
**Use Cases:**
|
|
326
|
+
- Resume after hitting context limit
|
|
327
|
+
- Review what was accomplished in last session
|
|
328
|
+
- See exact next steps recommended by PM
|
|
329
|
+
- Understand why session stopped
|
|
330
|
+
|
|
228
331
|
### Quick Git History (Catchup)
|
|
229
332
|
|
|
230
333
|
Display recent commit history without analysis:
|
|
@@ -388,9 +491,12 @@ The command delegates to the Agentic Coder Optimizer agent which:
|
|
|
388
491
|
## Notes
|
|
389
492
|
|
|
390
493
|
- **Quick Update vs Full Update**: Use `/mpm-init update` for fast activity-based updates (30 days), or `/mpm-init --update` for comprehensive doc refresh
|
|
391
|
-
- **
|
|
392
|
-
-
|
|
393
|
-
-
|
|
494
|
+
- **Resume Strategies**:
|
|
495
|
+
- **`/mpm-init resume`**: Read stop event logs (what PM tracked in last session)
|
|
496
|
+
- **`/mpm-init context`**: Analyze git history (intelligent work stream analysis via Research)
|
|
497
|
+
- **`/mpm-init catchup`**: Quick commit history display (no analysis)
|
|
498
|
+
- **Stop Event Logs**: Response logs in `.claude-mpm/responses/` contain PM summaries with tasks, files, and next steps
|
|
499
|
+
- **Two-Tier Resume**: Prefers structured resume logs (`.claude-mpm/resume-logs/`), falls back to response logs
|
|
394
500
|
- **Smart Mode**: Automatically detects existing CLAUDE.md and offers update vs recreate
|
|
395
501
|
- **Safe Updates**: Previous versions always archived before updating
|
|
396
502
|
- **Custom Content**: Your project-specific sections are preserved by default
|