claude-mpm 4.15.6__py3-none-any.whl → 4.21.0__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.

Files changed (194) hide show
  1. claude_mpm/VERSION +1 -1
  2. claude_mpm/agents/BASE_ENGINEER.md +286 -0
  3. claude_mpm/agents/BASE_PM.md +272 -23
  4. claude_mpm/agents/PM_INSTRUCTIONS.md +49 -0
  5. claude_mpm/agents/agent_loader.py +4 -4
  6. claude_mpm/agents/templates/engineer.json +5 -1
  7. claude_mpm/agents/templates/php-engineer.json +10 -4
  8. claude_mpm/agents/templates/python_engineer.json +8 -3
  9. claude_mpm/agents/templates/rust_engineer.json +12 -7
  10. claude_mpm/agents/templates/svelte-engineer.json +225 -0
  11. claude_mpm/cli/commands/__init__.py +2 -0
  12. claude_mpm/cli/commands/mpm_init/__init__.py +73 -0
  13. claude_mpm/cli/commands/mpm_init/core.py +525 -0
  14. claude_mpm/cli/commands/mpm_init/display.py +341 -0
  15. claude_mpm/cli/commands/mpm_init/git_activity.py +427 -0
  16. claude_mpm/cli/commands/mpm_init/modes.py +397 -0
  17. claude_mpm/cli/commands/mpm_init/prompts.py +442 -0
  18. claude_mpm/cli/commands/mpm_init_cli.py +396 -0
  19. claude_mpm/cli/commands/mpm_init_handler.py +67 -1
  20. claude_mpm/cli/commands/skills.py +488 -0
  21. claude_mpm/cli/executor.py +2 -0
  22. claude_mpm/cli/parsers/base_parser.py +7 -0
  23. claude_mpm/cli/parsers/mpm_init_parser.py +42 -0
  24. claude_mpm/cli/parsers/skills_parser.py +137 -0
  25. claude_mpm/cli/startup.py +57 -0
  26. claude_mpm/commands/mpm-auto-configure.md +52 -0
  27. claude_mpm/commands/mpm-help.md +3 -0
  28. claude_mpm/commands/mpm-init.md +112 -6
  29. claude_mpm/commands/mpm-version.md +113 -0
  30. claude_mpm/commands/mpm.md +1 -0
  31. claude_mpm/config/agent_config.py +2 -2
  32. claude_mpm/constants.py +12 -0
  33. claude_mpm/core/config.py +42 -0
  34. claude_mpm/core/factories.py +1 -1
  35. claude_mpm/core/interfaces.py +56 -1
  36. claude_mpm/core/optimized_agent_loader.py +3 -3
  37. claude_mpm/hooks/__init__.py +8 -0
  38. claude_mpm/hooks/claude_hooks/response_tracking.py +35 -1
  39. claude_mpm/hooks/session_resume_hook.py +121 -0
  40. claude_mpm/models/resume_log.py +340 -0
  41. claude_mpm/services/agents/auto_config_manager.py +1 -1
  42. claude_mpm/services/agents/deployment/agent_configuration_manager.py +1 -1
  43. claude_mpm/services/agents/deployment/agent_record_service.py +1 -1
  44. claude_mpm/services/agents/deployment/agent_validator.py +17 -1
  45. claude_mpm/services/agents/deployment/async_agent_deployment.py +1 -1
  46. claude_mpm/services/agents/deployment/local_template_deployment.py +1 -1
  47. claude_mpm/services/agents/local_template_manager.py +1 -1
  48. claude_mpm/services/agents/recommender.py +47 -0
  49. claude_mpm/services/cli/resume_service.py +617 -0
  50. claude_mpm/services/cli/session_manager.py +87 -0
  51. claude_mpm/services/cli/session_pause_manager.py +504 -0
  52. claude_mpm/services/cli/session_resume_helper.py +372 -0
  53. claude_mpm/services/core/interfaces.py +56 -1
  54. claude_mpm/services/core/models/agent_config.py +3 -0
  55. claude_mpm/services/core/models/process.py +4 -0
  56. claude_mpm/services/core/path_resolver.py +1 -1
  57. claude_mpm/services/diagnostics/models.py +21 -0
  58. claude_mpm/services/infrastructure/resume_log_generator.py +439 -0
  59. claude_mpm/services/local_ops/__init__.py +2 -0
  60. claude_mpm/services/mcp_config_manager.py +7 -131
  61. claude_mpm/services/mcp_gateway/auto_configure.py +31 -25
  62. claude_mpm/services/mcp_gateway/core/process_pool.py +19 -10
  63. claude_mpm/services/mcp_gateway/tools/external_mcp_services.py +26 -21
  64. claude_mpm/services/session_manager.py +205 -1
  65. claude_mpm/services/unified/deployment_strategies/local.py +1 -1
  66. claude_mpm/services/version_service.py +104 -1
  67. claude_mpm/skills/__init__.py +21 -0
  68. claude_mpm/skills/agent_skills_injector.py +324 -0
  69. claude_mpm/skills/bundled/LICENSE_ATTRIBUTIONS.md +79 -0
  70. claude_mpm/skills/bundled/api-documentation.md +393 -0
  71. claude_mpm/skills/bundled/async-testing.md +571 -0
  72. claude_mpm/skills/bundled/code-review.md +143 -0
  73. claude_mpm/skills/bundled/collaboration/brainstorming/SKILL.md +79 -0
  74. claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/SKILL.md +178 -0
  75. claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/references/agent-prompts.md +577 -0
  76. claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/references/coordination-patterns.md +467 -0
  77. claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/references/examples.md +537 -0
  78. claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/references/troubleshooting.md +730 -0
  79. claude_mpm/skills/bundled/collaboration/requesting-code-review/SKILL.md +112 -0
  80. claude_mpm/skills/bundled/collaboration/requesting-code-review/references/code-reviewer-template.md +146 -0
  81. claude_mpm/skills/bundled/collaboration/requesting-code-review/references/review-examples.md +412 -0
  82. claude_mpm/skills/bundled/collaboration/writing-plans/SKILL.md +81 -0
  83. claude_mpm/skills/bundled/collaboration/writing-plans/references/best-practices.md +362 -0
  84. claude_mpm/skills/bundled/collaboration/writing-plans/references/plan-structure-templates.md +312 -0
  85. claude_mpm/skills/bundled/database-migration.md +199 -0
  86. claude_mpm/skills/bundled/debugging/root-cause-tracing/SKILL.md +152 -0
  87. claude_mpm/skills/bundled/debugging/root-cause-tracing/references/advanced-techniques.md +668 -0
  88. claude_mpm/skills/bundled/debugging/root-cause-tracing/references/examples.md +587 -0
  89. claude_mpm/skills/bundled/debugging/root-cause-tracing/references/integration.md +438 -0
  90. claude_mpm/skills/bundled/debugging/root-cause-tracing/references/tracing-techniques.md +391 -0
  91. claude_mpm/skills/bundled/debugging/systematic-debugging/CREATION-LOG.md +119 -0
  92. claude_mpm/skills/bundled/debugging/systematic-debugging/SKILL.md +148 -0
  93. claude_mpm/skills/bundled/debugging/systematic-debugging/references/anti-patterns.md +483 -0
  94. claude_mpm/skills/bundled/debugging/systematic-debugging/references/examples.md +452 -0
  95. claude_mpm/skills/bundled/debugging/systematic-debugging/references/troubleshooting.md +449 -0
  96. claude_mpm/skills/bundled/debugging/systematic-debugging/references/workflow.md +411 -0
  97. claude_mpm/skills/bundled/debugging/systematic-debugging/test-academic.md +14 -0
  98. claude_mpm/skills/bundled/debugging/systematic-debugging/test-pressure-1.md +58 -0
  99. claude_mpm/skills/bundled/debugging/systematic-debugging/test-pressure-2.md +68 -0
  100. claude_mpm/skills/bundled/debugging/systematic-debugging/test-pressure-3.md +69 -0
  101. claude_mpm/skills/bundled/debugging/verification-before-completion/SKILL.md +131 -0
  102. claude_mpm/skills/bundled/debugging/verification-before-completion/references/gate-function.md +325 -0
  103. claude_mpm/skills/bundled/debugging/verification-before-completion/references/integration-and-workflows.md +490 -0
  104. claude_mpm/skills/bundled/debugging/verification-before-completion/references/red-flags-and-failures.md +425 -0
  105. claude_mpm/skills/bundled/debugging/verification-before-completion/references/verification-patterns.md +499 -0
  106. claude_mpm/skills/bundled/docker-containerization.md +194 -0
  107. claude_mpm/skills/bundled/express-local-dev.md +1429 -0
  108. claude_mpm/skills/bundled/fastapi-local-dev.md +1199 -0
  109. claude_mpm/skills/bundled/git-workflow.md +414 -0
  110. claude_mpm/skills/bundled/imagemagick.md +204 -0
  111. claude_mpm/skills/bundled/json-data-handling.md +223 -0
  112. claude_mpm/skills/bundled/main/artifacts-builder/SKILL.md +86 -0
  113. claude_mpm/skills/bundled/main/internal-comms/SKILL.md +43 -0
  114. claude_mpm/skills/bundled/main/internal-comms/examples/3p-updates.md +47 -0
  115. claude_mpm/skills/bundled/main/internal-comms/examples/company-newsletter.md +65 -0
  116. claude_mpm/skills/bundled/main/internal-comms/examples/faq-answers.md +30 -0
  117. claude_mpm/skills/bundled/main/internal-comms/examples/general-comms.md +16 -0
  118. claude_mpm/skills/bundled/main/mcp-builder/SKILL.md +160 -0
  119. claude_mpm/skills/bundled/main/mcp-builder/reference/design_principles.md +412 -0
  120. claude_mpm/skills/bundled/main/mcp-builder/reference/evaluation.md +602 -0
  121. claude_mpm/skills/bundled/main/mcp-builder/reference/mcp_best_practices.md +915 -0
  122. claude_mpm/skills/bundled/main/mcp-builder/reference/node_mcp_server.md +916 -0
  123. claude_mpm/skills/bundled/main/mcp-builder/reference/python_mcp_server.md +752 -0
  124. claude_mpm/skills/bundled/main/mcp-builder/reference/workflow.md +1237 -0
  125. claude_mpm/skills/bundled/main/mcp-builder/scripts/connections.py +157 -0
  126. claude_mpm/skills/bundled/main/mcp-builder/scripts/evaluation.py +425 -0
  127. claude_mpm/skills/bundled/main/skill-creator/SKILL.md +189 -0
  128. claude_mpm/skills/bundled/main/skill-creator/references/best-practices.md +500 -0
  129. claude_mpm/skills/bundled/main/skill-creator/references/creation-workflow.md +464 -0
  130. claude_mpm/skills/bundled/main/skill-creator/references/examples.md +619 -0
  131. claude_mpm/skills/bundled/main/skill-creator/references/progressive-disclosure.md +437 -0
  132. claude_mpm/skills/bundled/main/skill-creator/references/skill-structure.md +231 -0
  133. claude_mpm/skills/bundled/main/skill-creator/scripts/init_skill.py +303 -0
  134. claude_mpm/skills/bundled/main/skill-creator/scripts/package_skill.py +113 -0
  135. claude_mpm/skills/bundled/main/skill-creator/scripts/quick_validate.py +72 -0
  136. claude_mpm/skills/bundled/nextjs-local-dev.md +807 -0
  137. claude_mpm/skills/bundled/pdf.md +141 -0
  138. claude_mpm/skills/bundled/performance-profiling.md +567 -0
  139. claude_mpm/skills/bundled/php/espocrm-development/SKILL.md +170 -0
  140. claude_mpm/skills/bundled/php/espocrm-development/references/architecture.md +602 -0
  141. claude_mpm/skills/bundled/php/espocrm-development/references/common-tasks.md +821 -0
  142. claude_mpm/skills/bundled/php/espocrm-development/references/development-workflow.md +742 -0
  143. claude_mpm/skills/bundled/php/espocrm-development/references/frontend-customization.md +726 -0
  144. claude_mpm/skills/bundled/php/espocrm-development/references/hooks-and-services.md +764 -0
  145. claude_mpm/skills/bundled/php/espocrm-development/references/testing-debugging.md +831 -0
  146. claude_mpm/skills/bundled/refactoring-patterns.md +180 -0
  147. claude_mpm/skills/bundled/rust/desktop-applications/SKILL.md +226 -0
  148. claude_mpm/skills/bundled/rust/desktop-applications/references/architecture-patterns.md +901 -0
  149. claude_mpm/skills/bundled/rust/desktop-applications/references/native-gui-frameworks.md +901 -0
  150. claude_mpm/skills/bundled/rust/desktop-applications/references/platform-integration.md +775 -0
  151. claude_mpm/skills/bundled/rust/desktop-applications/references/state-management.md +937 -0
  152. claude_mpm/skills/bundled/rust/desktop-applications/references/tauri-framework.md +770 -0
  153. claude_mpm/skills/bundled/rust/desktop-applications/references/testing-deployment.md +961 -0
  154. claude_mpm/skills/bundled/security-scanning.md +327 -0
  155. claude_mpm/skills/bundled/systematic-debugging.md +473 -0
  156. claude_mpm/skills/bundled/test-driven-development.md +378 -0
  157. claude_mpm/skills/bundled/testing/condition-based-waiting/SKILL.md +119 -0
  158. claude_mpm/skills/bundled/testing/condition-based-waiting/references/patterns-and-implementation.md +253 -0
  159. claude_mpm/skills/bundled/testing/test-driven-development/SKILL.md +145 -0
  160. claude_mpm/skills/bundled/testing/test-driven-development/references/anti-patterns.md +543 -0
  161. claude_mpm/skills/bundled/testing/test-driven-development/references/examples.md +741 -0
  162. claude_mpm/skills/bundled/testing/test-driven-development/references/integration.md +470 -0
  163. claude_mpm/skills/bundled/testing/test-driven-development/references/philosophy.md +458 -0
  164. claude_mpm/skills/bundled/testing/test-driven-development/references/workflow.md +639 -0
  165. claude_mpm/skills/bundled/testing/testing-anti-patterns/SKILL.md +140 -0
  166. claude_mpm/skills/bundled/testing/testing-anti-patterns/references/completeness-anti-patterns.md +572 -0
  167. claude_mpm/skills/bundled/testing/testing-anti-patterns/references/core-anti-patterns.md +411 -0
  168. claude_mpm/skills/bundled/testing/testing-anti-patterns/references/detection-guide.md +569 -0
  169. claude_mpm/skills/bundled/testing/testing-anti-patterns/references/tdd-connection.md +695 -0
  170. claude_mpm/skills/bundled/testing/webapp-testing/SKILL.md +184 -0
  171. claude_mpm/skills/bundled/testing/webapp-testing/decision-tree.md +459 -0
  172. claude_mpm/skills/bundled/testing/webapp-testing/examples/console_logging.py +35 -0
  173. claude_mpm/skills/bundled/testing/webapp-testing/examples/element_discovery.py +44 -0
  174. claude_mpm/skills/bundled/testing/webapp-testing/examples/static_html_automation.py +34 -0
  175. claude_mpm/skills/bundled/testing/webapp-testing/playwright-patterns.md +479 -0
  176. claude_mpm/skills/bundled/testing/webapp-testing/reconnaissance-pattern.md +687 -0
  177. claude_mpm/skills/bundled/testing/webapp-testing/scripts/with_server.py +129 -0
  178. claude_mpm/skills/bundled/testing/webapp-testing/server-management.md +758 -0
  179. claude_mpm/skills/bundled/testing/webapp-testing/troubleshooting.md +868 -0
  180. claude_mpm/skills/bundled/vite-local-dev.md +1061 -0
  181. claude_mpm/skills/bundled/web-performance-optimization.md +2305 -0
  182. claude_mpm/skills/bundled/xlsx.md +157 -0
  183. claude_mpm/skills/registry.py +97 -9
  184. claude_mpm/skills/skills_registry.py +348 -0
  185. claude_mpm/skills/skills_service.py +739 -0
  186. claude_mpm/utils/agent_dependency_loader.py +2 -2
  187. {claude_mpm-4.15.6.dist-info → claude_mpm-4.21.0.dist-info}/METADATA +211 -33
  188. {claude_mpm-4.15.6.dist-info → claude_mpm-4.21.0.dist-info}/RECORD +192 -60
  189. claude_mpm/agents/INSTRUCTIONS_OLD_DEPRECATED.md +0 -602
  190. claude_mpm/cli/commands/mpm_init.py +0 -2008
  191. {claude_mpm-4.15.6.dist-info → claude_mpm-4.21.0.dist-info}/WHEEL +0 -0
  192. {claude_mpm-4.15.6.dist-info → claude_mpm-4.21.0.dist-info}/entry_points.txt +0 -0
  193. {claude_mpm-4.15.6.dist-info → claude_mpm-4.21.0.dist-info}/licenses/LICENSE +0 -0
  194. {claude_mpm-4.15.6.dist-info → claude_mpm-4.21.0.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
@@ -90,6 +90,9 @@ Available Commands:
90
90
  /mpm-monitor [start|stop|restart|status|port]
91
91
  Manage Socket.IO monitoring server and dashboard
92
92
 
93
+ /mpm-version
94
+ Display comprehensive version information including project version, all agents with versions, and all skills with versions
95
+
93
96
  Use '/mpm-help <command>' for detailed help on a specific command.
94
97
  ```
95
98
 
@@ -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
- **Note**: The `resume` subcommand is deprecated. Use `context` instead. The `resume` command still works for backward compatibility but will be removed in a future version.
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` [DEPRECATED]
91
- Alias for `context`. Use `context` instead.
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
- - **Context Analysis**: Use `/mpm-init context` to analyze git history and get intelligent resumption context from Research agent
392
- - **Quick History**: Use `/mpm-init catchup` for instant commit history display without analysis
393
- - **Deprecation Notice**: The `resume` command is deprecated. Use `context` instead. The old command still works but shows a warning.
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
@@ -0,0 +1,113 @@
1
+ # Display Claude MPM Version Information
2
+
3
+ Show comprehensive version information for Claude MPM project, agents, and skills.
4
+
5
+ ## Usage
6
+
7
+ ```
8
+ /mpm-version
9
+ ```
10
+
11
+ ## Description
12
+
13
+ Display version information including:
14
+ - Project version and build number
15
+ - All deployed agents with their versions (grouped by tier: system/user/project)
16
+ - All available skills with their versions (grouped by source: bundled/user/project)
17
+ - Summary statistics
18
+
19
+ ## Implementation
20
+
21
+ When you run `/mpm-version`, the PM will:
22
+
23
+ 1. **Collect Version Information**
24
+ - Use VersionService to gather all version data
25
+ - Project version from pyproject.toml
26
+ - Build number from BUILD_NUMBER file
27
+ - Agent versions from AgentRegistry
28
+ - Skills versions from SkillRegistry
29
+
30
+ 2. **Format Output**
31
+ - Hierarchical display: Project → Agents → Skills
32
+ - Grouped by tier/source for clarity
33
+ - Sorted alphabetically within groups
34
+ - Summary statistics at the end
35
+
36
+ 3. **Display Results**
37
+ - Well-formatted tree structure
38
+ - Easy to scan and read
39
+ - Includes totals and counts
40
+
41
+ ## Example Output
42
+
43
+ ```
44
+ Claude MPM Version Information
45
+ ==============================
46
+
47
+ Project Version: 4.16.3
48
+ Build: 481
49
+
50
+ Agents (35 total)
51
+ -----------------
52
+
53
+ System Agents (30):
54
+ ├─ agent-manager (1.0.0)
55
+ ├─ engineer (3.9.1)
56
+ ├─ research-agent (4.5.1)
57
+ ├─ documentation (2.1.0)
58
+ ├─ qa (2.0.3)
59
+ └─ ... (25 more)
60
+
61
+ User Agents (3):
62
+ ├─ custom-agent (1.0.0)
63
+ ├─ testing-agent (0.5.0)
64
+ └─ prototype-agent (0.1.0)
65
+
66
+ Project Agents (2):
67
+ ├─ project-specific (2.0.0)
68
+ └─ domain-expert (1.1.0)
69
+
70
+ Skills (20 total)
71
+ -----------------
72
+
73
+ Bundled Skills (20):
74
+ ├─ test-driven-development (0.1.0)
75
+ ├─ systematic-debugging (0.1.0)
76
+ ├─ async-testing (0.1.0)
77
+ ├─ performance-profiling (0.1.0)
78
+ ├─ security-scanning (0.1.0)
79
+ └─ ... (15 more)
80
+
81
+ User Skills (0):
82
+ (none)
83
+
84
+ Project Skills (0):
85
+ (none)
86
+
87
+ Summary
88
+ -------
89
+ • Project: v4.16.3 (build 481)
90
+ • Agents: 35 total (30 system, 3 user, 2 project)
91
+ • Skills: 20 total (20 bundled, 0 user, 0 project)
92
+ ```
93
+
94
+ ## PM Implementation Instructions
95
+
96
+ To execute this command, PM should:
97
+
98
+ 1. Import and use VersionService:
99
+ ```python
100
+ from claude_mpm.services.version_service import VersionService
101
+
102
+ service = VersionService()
103
+ summary = service.get_version_summary()
104
+ ```
105
+
106
+ 2. Format output following the example structure above
107
+ 3. Handle missing data gracefully (show "unknown" for missing versions)
108
+ 4. Include all tiers/sources even if counts are zero
109
+
110
+ ## Related Commands
111
+
112
+ - `/mpm-help` - Show all available MPM commands
113
+ - `/mpm-status` - Show system status information
@@ -8,6 +8,7 @@ Available MPM commands:
8
8
  - /mpm-help - Show command help
9
9
  - /mpm-status - Show MPM status
10
10
  - /mpm-config - Manage configuration
11
+ - /mpm-version - Display version information for project, agents, and skills
11
12
 
12
13
  Claude MPM extends Claude Code with:
13
14
  - Multi-agent orchestration
@@ -242,7 +242,7 @@ class AgentConfig:
242
242
  Path.cwd() / get_path_manager().CONFIG_DIR / "agent_config.yaml"
243
243
  )
244
244
  if project_config.exists():
245
- logger.info(f"Loading project agent config from {project_config}")
245
+ logger.debug(f"Loading project agent config from {project_config}")
246
246
  file_config = cls.from_file(project_config)
247
247
  # Merge with environment config (env takes precedence)
248
248
  config = cls._merge_configs(config, file_config)
@@ -252,7 +252,7 @@ class AgentConfig:
252
252
  if user_config_dir:
253
253
  user_config = user_config_dir / "agent_config.yaml"
254
254
  if user_config.exists():
255
- logger.info(f"Loading user agent config from {user_config}")
255
+ logger.debug(f"Loading user agent config from {user_config}")
256
256
  file_config = cls.from_file(user_config)
257
257
  config = cls._merge_configs(config, file_config)
258
258
 
claude_mpm/constants.py CHANGED
@@ -45,6 +45,7 @@ class CLICommands(str, Enum):
45
45
  DOCTOR = "doctor"
46
46
  DASHBOARD = "dashboard"
47
47
  UPGRADE = "upgrade"
48
+ SKILLS = "skills"
48
49
 
49
50
  def with_prefix(self, prefix: CLIPrefix = CLIPrefix.MPM) -> str:
50
51
  """Get command with prefix."""
@@ -158,6 +159,17 @@ class TicketCommands(str, Enum):
158
159
  WORKFLOW = "workflow"
159
160
 
160
161
 
162
+ class SkillsCommands(str, Enum):
163
+ """Skills subcommand constants."""
164
+
165
+ LIST = "list"
166
+ DEPLOY = "deploy"
167
+ VALIDATE = "validate"
168
+ UPDATE = "update"
169
+ INFO = "info"
170
+ CONFIG = "config"
171
+
172
+
161
173
  class CLIFlags(str, Enum):
162
174
  """CLI flag constants (without prefix)."""
163
175
 
claude_mpm/core/config.py CHANGED
@@ -578,6 +578,11 @@ class Config:
578
578
  "[PM-REMINDER] Your role is coordination and management",
579
579
  ],
580
580
  },
581
+ # Session management configuration
582
+ "session": {
583
+ "auto_save": True, # Enable automatic session saving
584
+ "save_interval": 300, # Auto-save interval in seconds (5 minutes)
585
+ },
581
586
  }
582
587
 
583
588
  # Apply defaults for missing keys
@@ -588,6 +593,9 @@ class Config:
588
593
  # Validate health and recovery configuration
589
594
  self._validate_health_recovery_config()
590
595
 
596
+ # Validate session configuration
597
+ self._validate_session_config()
598
+
591
599
  def get(self, key: str, default: Any = None) -> Any:
592
600
  """Get configuration value."""
593
601
  # Support nested keys with dot notation
@@ -764,6 +772,40 @@ class Config:
764
772
  except Exception as e:
765
773
  logger.error(f"Error validating health/recovery configuration: {e}")
766
774
 
775
+ def _validate_session_config(self) -> None:
776
+ """Validate session management configuration."""
777
+ try:
778
+ session_config = self.get("session", {})
779
+
780
+ # Validate save_interval range (60-1800 seconds)
781
+ save_interval = session_config.get("save_interval", 300)
782
+ if not isinstance(save_interval, int):
783
+ logger.warning(
784
+ f"Session save_interval must be integer, got {type(save_interval).__name__}, using default 300"
785
+ )
786
+ self.set("session.save_interval", 300)
787
+ elif save_interval < 60:
788
+ logger.warning(
789
+ f"Session save_interval must be at least 60 seconds, got {save_interval}, using 60"
790
+ )
791
+ self.set("session.save_interval", 60)
792
+ elif save_interval > 1800:
793
+ logger.warning(
794
+ f"Session save_interval must be at most 1800 seconds (30 min), got {save_interval}, using 1800"
795
+ )
796
+ self.set("session.save_interval", 1800)
797
+
798
+ # Validate auto_save is boolean
799
+ auto_save = session_config.get("auto_save", True)
800
+ if not isinstance(auto_save, bool):
801
+ logger.warning(
802
+ f"Session auto_save must be boolean, got {type(auto_save).__name__}, using True"
803
+ )
804
+ self.set("session.auto_save", True)
805
+
806
+ except Exception as e:
807
+ logger.error(f"Error validating session configuration: {e}")
808
+
767
809
  def get_health_monitoring_config(self) -> Dict[str, Any]:
768
810
  """Get health monitoring configuration with defaults."""
769
811
  base_config = {
@@ -77,7 +77,7 @@ class AgentServiceFactory(ServiceFactory):
77
77
  if hasattr(service, "set_directories"):
78
78
  service.set_directories(framework_dir, project_dir)
79
79
 
80
- logger.info("Created agent deployment service")
80
+ logger.debug("Created agent deployment service")
81
81
  return service
82
82
 
83
83