claude-mpm 5.4.55__py3-none-any.whl → 5.4.85__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- claude_mpm/VERSION +1 -1
- claude_mpm/agents/CLAUDE_MPM_FOUNDERS_OUTPUT_STYLE.md +405 -0
- claude_mpm/agents/CLAUDE_MPM_OUTPUT_STYLE.md +63 -241
- claude_mpm/agents/CLAUDE_MPM_TEACHER_OUTPUT_STYLE.md +109 -1925
- claude_mpm/agents/PM_INSTRUCTIONS.md +36 -9
- claude_mpm/cli/__init__.py +5 -1
- claude_mpm/cli/commands/agents.py +2 -4
- claude_mpm/cli/commands/agents_reconcile.py +197 -0
- claude_mpm/cli/commands/configure.py +620 -21
- claude_mpm/cli/commands/skills.py +166 -14
- claude_mpm/cli/executor.py +1 -0
- claude_mpm/cli/interactive/__init__.py +10 -0
- claude_mpm/cli/interactive/agent_wizard.py +30 -50
- claude_mpm/cli/interactive/questionary_styles.py +65 -0
- claude_mpm/cli/interactive/skill_selector.py +481 -0
- claude_mpm/cli/parsers/base_parser.py +5 -0
- claude_mpm/cli/startup.py +223 -388
- claude_mpm/constants.py +1 -0
- claude_mpm/core/claude_runner.py +2 -2
- claude_mpm/core/interactive_session.py +7 -7
- claude_mpm/core/output_style_manager.py +21 -13
- claude_mpm/core/unified_config.py +50 -8
- claude_mpm/core/unified_paths.py +30 -13
- claude_mpm/scripts/start_activity_logging.py +0 -0
- claude_mpm/services/agents/deployment/agent_template_builder.py +8 -0
- claude_mpm/services/agents/deployment/deployment_reconciler.py +577 -0
- claude_mpm/services/agents/deployment/startup_reconciliation.py +138 -0
- claude_mpm/services/agents/sources/git_source_sync_service.py +7 -4
- claude_mpm/services/agents/startup_sync.py +5 -2
- claude_mpm/services/pm_skills_deployer.py +4 -0
- claude_mpm/services/skills/git_skill_source_manager.py +24 -8
- claude_mpm/services/skills/selective_skill_deployer.py +82 -83
- claude_mpm/skills/bundled/collaboration/brainstorming/SKILL.md +79 -0
- claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/SKILL.md +178 -0
- claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/references/agent-prompts.md +577 -0
- claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/references/coordination-patterns.md +467 -0
- claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/references/examples.md +537 -0
- claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/references/troubleshooting.md +730 -0
- claude_mpm/skills/bundled/collaboration/git-worktrees.md +317 -0
- claude_mpm/skills/bundled/collaboration/requesting-code-review/SKILL.md +112 -0
- claude_mpm/skills/bundled/collaboration/requesting-code-review/references/code-reviewer-template.md +146 -0
- claude_mpm/skills/bundled/collaboration/requesting-code-review/references/review-examples.md +412 -0
- claude_mpm/skills/bundled/collaboration/stacked-prs.md +251 -0
- claude_mpm/skills/bundled/collaboration/writing-plans/SKILL.md +81 -0
- claude_mpm/skills/bundled/collaboration/writing-plans/references/best-practices.md +362 -0
- claude_mpm/skills/bundled/collaboration/writing-plans/references/plan-structure-templates.md +312 -0
- claude_mpm/skills/bundled/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/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/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/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/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/pm/pm-bug-reporting/pm-bug-reporting.md +248 -0
- claude_mpm/skills/bundled/pm/pm-delegation-patterns/SKILL.md +167 -0
- claude_mpm/skills/bundled/pm/pm-git-file-tracking/SKILL.md +113 -0
- claude_mpm/skills/bundled/pm/pm-pr-workflow/SKILL.md +124 -0
- claude_mpm/skills/bundled/pm/pm-teaching-mode/SKILL.md +657 -0
- claude_mpm/skills/bundled/pm/pm-ticketing-integration/SKILL.md +154 -0
- claude_mpm/skills/bundled/pm/pm-verification-protocols/SKILL.md +198 -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 +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/test-quality-inspector/SKILL.md +458 -0
- claude_mpm/skills/bundled/testing/test-quality-inspector/examples/example-inspection-report.md +411 -0
- claude_mpm/skills/bundled/testing/test-quality-inspector/references/assertion-quality.md +317 -0
- claude_mpm/skills/bundled/testing/test-quality-inspector/references/inspection-checklist.md +270 -0
- claude_mpm/skills/bundled/testing/test-quality-inspector/references/red-flags.md +436 -0
- claude_mpm/skills/bundled/testing/testing-anti-patterns/SKILL.md +140 -0
- claude_mpm/skills/bundled/testing/testing-anti-patterns/references/completeness-anti-patterns.md +572 -0
- claude_mpm/skills/bundled/testing/testing-anti-patterns/references/core-anti-patterns.md +411 -0
- claude_mpm/skills/bundled/testing/testing-anti-patterns/references/detection-guide.md +569 -0
- claude_mpm/skills/bundled/testing/testing-anti-patterns/references/tdd-connection.md +695 -0
- claude_mpm/skills/bundled/testing/webapp-testing/SKILL.md +184 -0
- claude_mpm/skills/bundled/testing/webapp-testing/decision-tree.md +459 -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/server-management.md +758 -0
- claude_mpm/skills/bundled/testing/webapp-testing/troubleshooting.md +868 -0
- claude_mpm/utils/agent_dependency_loader.py +103 -4
- claude_mpm/utils/robust_installer.py +45 -24
- {claude_mpm-5.4.55.dist-info → claude_mpm-5.4.85.dist-info}/METADATA +47 -23
- {claude_mpm-5.4.55.dist-info → claude_mpm-5.4.85.dist-info}/RECORD +159 -47
- claude_mpm/hooks/claude_hooks/__pycache__/__init__.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/correlation_manager.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/event_handlers.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/hook_handler.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/installer.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/memory_integration.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/response_tracking.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/tool_analysis.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/services/__pycache__/__init__.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/services/__pycache__/connection_manager_http.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/services/__pycache__/duplicate_detector.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/services/__pycache__/state_manager.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/services/__pycache__/subagent_processor.cpython-311.pyc +0 -0
- {claude_mpm-5.4.55.dist-info → claude_mpm-5.4.85.dist-info}/WHEEL +0 -0
- {claude_mpm-5.4.55.dist-info → claude_mpm-5.4.85.dist-info}/entry_points.txt +0 -0
- {claude_mpm-5.4.55.dist-info → claude_mpm-5.4.85.dist-info}/licenses/LICENSE +0 -0
- {claude_mpm-5.4.55.dist-info → claude_mpm-5.4.85.dist-info}/licenses/LICENSE-FAQ.md +0 -0
- {claude_mpm-5.4.55.dist-info → claude_mpm-5.4.85.dist-info}/top_level.txt +0 -0
claude_mpm/constants.py
CHANGED
|
@@ -169,6 +169,7 @@ class SkillsCommands(str, Enum):
|
|
|
169
169
|
INFO = "info"
|
|
170
170
|
CONFIG = "config"
|
|
171
171
|
CONFIGURE = "configure" # Interactive skills selection (like agents configure)
|
|
172
|
+
SELECT = "select" # Interactive topic-grouped skill selector
|
|
172
173
|
# GitHub deployment commands
|
|
173
174
|
DEPLOY_FROM_GITHUB = "deploy-github"
|
|
174
175
|
LIST_AVAILABLE = "list-available"
|
claude_mpm/core/claude_runner.py
CHANGED
|
@@ -730,7 +730,7 @@ Use these agents to delegate specialized work via the Task tool.
|
|
|
730
730
|
import json
|
|
731
731
|
|
|
732
732
|
settings = json.loads(settings_file.read_text())
|
|
733
|
-
if settings.get("activeOutputStyle") == "
|
|
733
|
+
if settings.get("activeOutputStyle") == "Claude MPM":
|
|
734
734
|
# Already active, check if file exists
|
|
735
735
|
output_style_file = (
|
|
736
736
|
Path.home() / ".claude" / "output-styles" / "claude-mpm.md"
|
|
@@ -740,7 +740,7 @@ Use these agents to delegate specialized work via the Task tool.
|
|
|
740
740
|
"Output style 'Claude MPM' already deployed and active"
|
|
741
741
|
)
|
|
742
742
|
return
|
|
743
|
-
except Exception:
|
|
743
|
+
except Exception: # nosec B110
|
|
744
744
|
pass # Continue with deployment if we can't read settings
|
|
745
745
|
|
|
746
746
|
# Read the OUTPUT_STYLE.md content if it exists
|
|
@@ -12,7 +12,7 @@ of InteractiveSession without circular dependency issues.
|
|
|
12
12
|
|
|
13
13
|
import contextlib
|
|
14
14
|
import os
|
|
15
|
-
import subprocess
|
|
15
|
+
import subprocess # nosec B404
|
|
16
16
|
import uuid
|
|
17
17
|
from pathlib import Path
|
|
18
18
|
from typing import TYPE_CHECKING, Any, Dict, Optional, Tuple
|
|
@@ -359,19 +359,19 @@ class InteractiveSession:
|
|
|
359
359
|
osm = self.runner.framework_loader.output_style_manager
|
|
360
360
|
if osm:
|
|
361
361
|
if osm.claude_version and osm.supports_output_styles():
|
|
362
|
-
# Check if
|
|
362
|
+
# Check if Claude MPM style is active
|
|
363
363
|
settings_file = osm.settings_file
|
|
364
364
|
if settings_file.exists():
|
|
365
365
|
import json
|
|
366
366
|
|
|
367
367
|
settings = json.loads(settings_file.read_text())
|
|
368
368
|
active_style = settings.get("activeOutputStyle")
|
|
369
|
-
if active_style
|
|
370
|
-
return "Output Style:
|
|
369
|
+
if active_style in ("Claude MPM", "Claude MPM Teacher"):
|
|
370
|
+
return f"Output Style: {active_style} ✅"
|
|
371
371
|
return f"Output Style: {active_style or 'none'}"
|
|
372
372
|
return "Output Style: Available"
|
|
373
373
|
return "Output Style: Injected (legacy)"
|
|
374
|
-
except Exception:
|
|
374
|
+
except Exception: # nosec B110
|
|
375
375
|
pass
|
|
376
376
|
return None
|
|
377
377
|
|
|
@@ -582,7 +582,7 @@ class InteractiveSession:
|
|
|
582
582
|
)
|
|
583
583
|
|
|
584
584
|
# This will not return if successful
|
|
585
|
-
os.execvpe(cmd[0], cmd, env)
|
|
585
|
+
os.execvpe(cmd[0], cmd, env) # nosec B606
|
|
586
586
|
return False # Only reached on failure
|
|
587
587
|
|
|
588
588
|
def _launch_subprocess_mode(self, cmd: list, env: dict) -> bool:
|
|
@@ -641,7 +641,7 @@ class InteractiveSession:
|
|
|
641
641
|
cmd = environment["command"]
|
|
642
642
|
env = environment["environment"]
|
|
643
643
|
|
|
644
|
-
result = subprocess.run(
|
|
644
|
+
result = subprocess.run( # nosec B603
|
|
645
645
|
cmd, stdin=None, stdout=None, stderr=None, env=env, check=False
|
|
646
646
|
)
|
|
647
647
|
|
|
@@ -13,7 +13,7 @@ Users can change it if they want, and the system will respect their choice.
|
|
|
13
13
|
|
|
14
14
|
import json
|
|
15
15
|
import re
|
|
16
|
-
import subprocess
|
|
16
|
+
import subprocess # nosec B404
|
|
17
17
|
from pathlib import Path
|
|
18
18
|
from typing import Any, Dict, Literal, Optional, TypedDict, cast
|
|
19
19
|
|
|
@@ -27,7 +27,7 @@ _CACHED_CLAUDE_VERSION: Optional[str] = None
|
|
|
27
27
|
_VERSION_DETECTED: bool = False
|
|
28
28
|
|
|
29
29
|
# Output style types
|
|
30
|
-
OutputStyleType = Literal["professional", "teaching"]
|
|
30
|
+
OutputStyleType = Literal["professional", "teaching", "founders"]
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
class StyleConfig(TypedDict):
|
|
@@ -41,9 +41,10 @@ class StyleConfig(TypedDict):
|
|
|
41
41
|
class OutputStyleManager:
|
|
42
42
|
"""Manages output style deployment and version-based handling.
|
|
43
43
|
|
|
44
|
-
Supports
|
|
44
|
+
Supports three output styles:
|
|
45
45
|
- professional: Default Claude MPM style (claude-mpm.md)
|
|
46
|
-
- teaching: Adaptive teaching mode (claude-mpm-
|
|
46
|
+
- teaching: Adaptive teaching mode (claude-mpm-teacher.md)
|
|
47
|
+
- founders: Non-technical mode for startup founders (claude-mpm-founders.md)
|
|
47
48
|
"""
|
|
48
49
|
|
|
49
50
|
def __init__(self) -> None:
|
|
@@ -51,8 +52,8 @@ class OutputStyleManager:
|
|
|
51
52
|
self.logger = get_logger("output_style_manager") # type: ignore[misc]
|
|
52
53
|
self.claude_version = self._detect_claude_version()
|
|
53
54
|
|
|
54
|
-
# Deploy to ~/.claude/styles/ directory (
|
|
55
|
-
self.output_style_dir = Path.home() / ".claude" / "styles"
|
|
55
|
+
# Deploy to ~/.claude/output-styles/ directory (official Claude Code location)
|
|
56
|
+
self.output_style_dir = Path.home() / ".claude" / "output-styles"
|
|
56
57
|
self.settings_file = Path.home() / ".claude" / "settings.json"
|
|
57
58
|
|
|
58
59
|
# Style definitions
|
|
@@ -62,14 +63,21 @@ class OutputStyleManager:
|
|
|
62
63
|
/ "agents"
|
|
63
64
|
/ "CLAUDE_MPM_OUTPUT_STYLE.md",
|
|
64
65
|
target=self.output_style_dir / "claude-mpm.md",
|
|
65
|
-
name="
|
|
66
|
+
name="Claude MPM",
|
|
66
67
|
),
|
|
67
68
|
"teaching": StyleConfig(
|
|
68
69
|
source=Path(__file__).parent.parent
|
|
69
70
|
/ "agents"
|
|
70
71
|
/ "CLAUDE_MPM_TEACHER_OUTPUT_STYLE.md",
|
|
71
|
-
target=self.output_style_dir / "claude-mpm-
|
|
72
|
-
name="
|
|
72
|
+
target=self.output_style_dir / "claude-mpm-teacher.md",
|
|
73
|
+
name="Claude MPM Teacher",
|
|
74
|
+
),
|
|
75
|
+
"founders": StyleConfig(
|
|
76
|
+
source=Path(__file__).parent.parent
|
|
77
|
+
/ "agents"
|
|
78
|
+
/ "CLAUDE_MPM_FOUNDERS_OUTPUT_STYLE.md",
|
|
79
|
+
target=self.output_style_dir / "claude-mpm-founders.md",
|
|
80
|
+
name="Claude MPM Founders",
|
|
73
81
|
),
|
|
74
82
|
}
|
|
75
83
|
|
|
@@ -93,7 +101,7 @@ class OutputStyleManager:
|
|
|
93
101
|
|
|
94
102
|
try:
|
|
95
103
|
# Run claude --version command
|
|
96
|
-
result = subprocess.run(
|
|
104
|
+
result = subprocess.run( # nosec B603 B607
|
|
97
105
|
["claude", "--version"],
|
|
98
106
|
capture_output=True,
|
|
99
107
|
text=True,
|
|
@@ -300,12 +308,12 @@ class OutputStyleManager:
|
|
|
300
308
|
self.logger.error(f"Failed to deploy {style} style: {e}")
|
|
301
309
|
return False
|
|
302
310
|
|
|
303
|
-
def _activate_output_style(self, style_name: str = "
|
|
311
|
+
def _activate_output_style(self, style_name: str = "Claude MPM") -> bool:
|
|
304
312
|
"""
|
|
305
313
|
Update Claude Code settings to activate a specific output style.
|
|
306
314
|
|
|
307
315
|
Args:
|
|
308
|
-
style_name: Name of the style to activate (e.g., "
|
|
316
|
+
style_name: Name of the style to activate (e.g., "Claude MPM", "Claude MPM Teacher")
|
|
309
317
|
|
|
310
318
|
Returns:
|
|
311
319
|
True if activated successfully, False otherwise
|
|
@@ -443,7 +451,7 @@ class OutputStyleManager:
|
|
|
443
451
|
|
|
444
452
|
# Activate the default style if requested
|
|
445
453
|
if activate_default and results.get("professional", False):
|
|
446
|
-
self._activate_output_style("
|
|
454
|
+
self._activate_output_style("Claude MPM")
|
|
447
455
|
|
|
448
456
|
return results
|
|
449
457
|
|
|
@@ -16,7 +16,7 @@ Design Principles:
|
|
|
16
16
|
from pathlib import Path
|
|
17
17
|
from typing import Any, Dict, List, Optional, Union
|
|
18
18
|
|
|
19
|
-
from pydantic import BaseModel, Field,
|
|
19
|
+
from pydantic import BaseModel, Field, field_validator
|
|
20
20
|
from pydantic_settings import BaseSettings
|
|
21
21
|
|
|
22
22
|
from .exceptions import ConfigurationError
|
|
@@ -54,8 +54,9 @@ class LoggingConfig(BaseModel):
|
|
|
54
54
|
default=True, description="Enable console logging"
|
|
55
55
|
)
|
|
56
56
|
|
|
57
|
-
@
|
|
58
|
-
|
|
57
|
+
@field_validator("level")
|
|
58
|
+
@classmethod
|
|
59
|
+
def validate_log_level(cls, v):
|
|
59
60
|
valid_levels = ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"]
|
|
60
61
|
if v.upper() not in valid_levels:
|
|
61
62
|
raise ValueError(f"Invalid log level. Must be one of: {valid_levels}")
|
|
@@ -65,8 +66,32 @@ class LoggingConfig(BaseModel):
|
|
|
65
66
|
class AgentConfig(BaseModel):
|
|
66
67
|
"""Agent system configuration."""
|
|
67
68
|
|
|
69
|
+
# Explicit deployment lists (simplified model)
|
|
70
|
+
enabled: List[str] = Field(
|
|
71
|
+
default_factory=list,
|
|
72
|
+
description="Explicit list of agent IDs to deploy (empty = use auto_discover)",
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
# Required agents that are always deployed
|
|
76
|
+
required: List[str] = Field(
|
|
77
|
+
default_factory=lambda: [
|
|
78
|
+
"research",
|
|
79
|
+
"mpm-skills-manager",
|
|
80
|
+
"mpm-agent-manager",
|
|
81
|
+
"memory-manager",
|
|
82
|
+
"ticketing",
|
|
83
|
+
],
|
|
84
|
+
description="Agents that are always deployed (core system agents)",
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
include_universal: bool = Field(
|
|
88
|
+
default=True,
|
|
89
|
+
description="Auto-include all agents with 'universal' toolchain/category",
|
|
90
|
+
)
|
|
91
|
+
|
|
68
92
|
auto_discover: bool = Field(
|
|
69
|
-
default=
|
|
93
|
+
default=False,
|
|
94
|
+
description="Enable automatic agent discovery (deprecated, use enabled list)",
|
|
70
95
|
)
|
|
71
96
|
precedence: List[str] = Field(
|
|
72
97
|
default=["project", "user", "system"], description="Agent precedence order"
|
|
@@ -239,6 +264,21 @@ class DocumentationConfig(BaseModel):
|
|
|
239
264
|
)
|
|
240
265
|
|
|
241
266
|
|
|
267
|
+
class SkillConfig(BaseModel):
|
|
268
|
+
"""Skill system configuration."""
|
|
269
|
+
|
|
270
|
+
# Explicit deployment lists (simplified model)
|
|
271
|
+
enabled: List[str] = Field(
|
|
272
|
+
default_factory=list,
|
|
273
|
+
description="Explicit list of skill IDs to deploy (includes agent dependencies)",
|
|
274
|
+
)
|
|
275
|
+
|
|
276
|
+
auto_detect_dependencies: bool = Field(
|
|
277
|
+
default=True,
|
|
278
|
+
description="Automatically include skills required by enabled agents",
|
|
279
|
+
)
|
|
280
|
+
|
|
281
|
+
|
|
242
282
|
class UnifiedConfig(BaseSettings):
|
|
243
283
|
"""
|
|
244
284
|
Unified configuration model for Claude MPM.
|
|
@@ -258,6 +298,7 @@ class UnifiedConfig(BaseSettings):
|
|
|
258
298
|
network: NetworkConfig = Field(default_factory=NetworkConfig)
|
|
259
299
|
logging: LoggingConfig = Field(default_factory=LoggingConfig)
|
|
260
300
|
agents: AgentConfig = Field(default_factory=AgentConfig)
|
|
301
|
+
skills: SkillConfig = Field(default_factory=SkillConfig)
|
|
261
302
|
memory: MemoryConfig = Field(default_factory=MemoryConfig)
|
|
262
303
|
security: SecurityConfig = Field(default_factory=SecurityConfig)
|
|
263
304
|
performance: PerformanceConfig = Field(default_factory=PerformanceConfig)
|
|
@@ -287,8 +328,9 @@ class UnifiedConfig(BaseSettings):
|
|
|
287
328
|
validate_assignment = True
|
|
288
329
|
extra = "allow" # Allow extra fields for backward compatibility
|
|
289
330
|
|
|
290
|
-
@
|
|
291
|
-
|
|
331
|
+
@field_validator("environment")
|
|
332
|
+
@classmethod
|
|
333
|
+
def validate_environment(cls, v):
|
|
292
334
|
valid_envs = ["development", "testing", "production"]
|
|
293
335
|
if v not in valid_envs:
|
|
294
336
|
raise ValueError(f"Invalid environment. Must be one of: {valid_envs}")
|
|
@@ -554,12 +596,12 @@ class ConfigurationService:
|
|
|
554
596
|
import yaml
|
|
555
597
|
|
|
556
598
|
with file_path.open("w") as f:
|
|
557
|
-
yaml.dump(self._config.
|
|
599
|
+
yaml.dump(self._config.model_dump(), f, default_flow_style=False)
|
|
558
600
|
elif format.lower() == "json":
|
|
559
601
|
import json
|
|
560
602
|
|
|
561
603
|
with file_path.open("w") as f:
|
|
562
|
-
json.dump(self._config.
|
|
604
|
+
json.dump(self._config.model_dump(), f, indent=2)
|
|
563
605
|
else:
|
|
564
606
|
raise ConfigurationError(f"Unsupported export format: {format}")
|
|
565
607
|
|
claude_mpm/core/unified_paths.py
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
1
|
"""
|
|
3
2
|
Unified Path Management System for Claude MPM
|
|
4
3
|
==============================================
|
|
@@ -36,6 +35,24 @@ from claude_mpm.core.logging_utils import get_logger
|
|
|
36
35
|
logger = get_logger(__name__)
|
|
37
36
|
|
|
38
37
|
|
|
38
|
+
def _safe_cwd() -> Path:
|
|
39
|
+
"""Safely get the current working directory.
|
|
40
|
+
|
|
41
|
+
If the current directory no longer exists (deleted/moved), fall back to home directory.
|
|
42
|
+
This prevents FileNotFoundError when Path.cwd() is called from a deleted directory.
|
|
43
|
+
|
|
44
|
+
Returns:
|
|
45
|
+
Path: Current working directory, or home directory if cwd doesn't exist
|
|
46
|
+
"""
|
|
47
|
+
try:
|
|
48
|
+
return Path.cwd()
|
|
49
|
+
except (FileNotFoundError, OSError) as e:
|
|
50
|
+
logger.debug(
|
|
51
|
+
f"Current directory doesn't exist ({e}), falling back to home directory"
|
|
52
|
+
)
|
|
53
|
+
return Path.home()
|
|
54
|
+
|
|
55
|
+
|
|
39
56
|
class PathType(Enum):
|
|
40
57
|
"""Enumeration of different path types for categorization."""
|
|
41
58
|
|
|
@@ -95,7 +112,7 @@ class PathContext:
|
|
|
95
112
|
|
|
96
113
|
# Additional check: If we're running from within a claude-mpm development directory
|
|
97
114
|
# This handles the case where pipx claude-mpm is invoked from within the dev directory
|
|
98
|
-
cwd =
|
|
115
|
+
cwd = _safe_cwd()
|
|
99
116
|
current = cwd
|
|
100
117
|
for _ in range(5): # Check up to 5 levels up from current directory
|
|
101
118
|
if (current / "pyproject.toml").exists() and (
|
|
@@ -114,7 +131,7 @@ class PathContext:
|
|
|
114
131
|
# Verify this is a development setup by checking for key files
|
|
115
132
|
if (current / "scripts" / "claude-mpm").exists():
|
|
116
133
|
return True
|
|
117
|
-
except Exception:
|
|
134
|
+
except Exception: # nosec B110
|
|
118
135
|
pass
|
|
119
136
|
if current == current.parent:
|
|
120
137
|
break
|
|
@@ -140,7 +157,7 @@ class PathContext:
|
|
|
140
157
|
f"Found editable install via .pth file: {pth_file}"
|
|
141
158
|
)
|
|
142
159
|
return True
|
|
143
|
-
except Exception:
|
|
160
|
+
except Exception: # nosec B112
|
|
144
161
|
continue
|
|
145
162
|
|
|
146
163
|
# Check for egg-link files
|
|
@@ -156,7 +173,7 @@ class PathContext:
|
|
|
156
173
|
f"Found editable install via egg-link: {egg_link}"
|
|
157
174
|
)
|
|
158
175
|
return True
|
|
159
|
-
except Exception:
|
|
176
|
+
except Exception: # nosec B112
|
|
160
177
|
continue
|
|
161
178
|
except ImportError:
|
|
162
179
|
pass
|
|
@@ -186,7 +203,7 @@ class PathContext:
|
|
|
186
203
|
|
|
187
204
|
# Check if current working directory is a claude-mpm development project
|
|
188
205
|
# This handles the case where pipx claude-mpm is run from within the dev directory
|
|
189
|
-
cwd =
|
|
206
|
+
cwd = _safe_cwd()
|
|
190
207
|
current = cwd
|
|
191
208
|
for _ in range(5): # Check up to 5 levels up from current directory
|
|
192
209
|
if (current / "pyproject.toml").exists() and (
|
|
@@ -206,7 +223,7 @@ class PathContext:
|
|
|
206
223
|
"Using development mode for local source preference"
|
|
207
224
|
)
|
|
208
225
|
return DeploymentContext.DEVELOPMENT
|
|
209
|
-
except Exception:
|
|
226
|
+
except Exception: # nosec B110
|
|
210
227
|
pass
|
|
211
228
|
if current == current.parent:
|
|
212
229
|
break
|
|
@@ -228,7 +245,7 @@ class PathContext:
|
|
|
228
245
|
if "pipx" in str(module_path):
|
|
229
246
|
# Running via pipx but from within a development directory
|
|
230
247
|
# Use development mode to prefer local source over pipx installation
|
|
231
|
-
cwd =
|
|
248
|
+
cwd = _safe_cwd()
|
|
232
249
|
current = cwd
|
|
233
250
|
for _ in range(5):
|
|
234
251
|
if (current / "src" / "claude_mpm").exists() and (
|
|
@@ -346,7 +363,7 @@ class UnifiedPathManager:
|
|
|
346
363
|
):
|
|
347
364
|
# For development mode, first check if we're running from within a dev directory
|
|
348
365
|
# This handles the case where pipx is invoked from a development directory
|
|
349
|
-
cwd =
|
|
366
|
+
cwd = _safe_cwd()
|
|
350
367
|
current = cwd
|
|
351
368
|
for _ in range(5):
|
|
352
369
|
if (current / "src" / "claude_mpm").exists() and (
|
|
@@ -360,7 +377,7 @@ class UnifiedPathManager:
|
|
|
360
377
|
f"Found framework root via cwd at {current}"
|
|
361
378
|
)
|
|
362
379
|
return current
|
|
363
|
-
except Exception:
|
|
380
|
+
except Exception: # nosec B110
|
|
364
381
|
pass
|
|
365
382
|
if current == current.parent:
|
|
366
383
|
break
|
|
@@ -403,7 +420,7 @@ class UnifiedPathManager:
|
|
|
403
420
|
@lru_cache(maxsize=1)
|
|
404
421
|
def project_root(self) -> Path:
|
|
405
422
|
"""Get the current project root directory."""
|
|
406
|
-
current =
|
|
423
|
+
current = _safe_cwd()
|
|
407
424
|
while current != current.parent:
|
|
408
425
|
for marker in self._project_markers:
|
|
409
426
|
if (current / marker).exists():
|
|
@@ -413,7 +430,7 @@ class UnifiedPathManager:
|
|
|
413
430
|
|
|
414
431
|
# Fallback to current directory
|
|
415
432
|
logger.warning("Could not find project root, using current directory")
|
|
416
|
-
return
|
|
433
|
+
return _safe_cwd()
|
|
417
434
|
|
|
418
435
|
@property
|
|
419
436
|
def package_root(self) -> Path:
|
|
@@ -562,7 +579,7 @@ class UnifiedPathManager:
|
|
|
562
579
|
self, filename: str, start_path: Optional[Path] = None
|
|
563
580
|
) -> Optional[Path]:
|
|
564
581
|
"""Search for a file by traversing up the directory tree."""
|
|
565
|
-
current = start_path or
|
|
582
|
+
current = start_path or _safe_cwd()
|
|
566
583
|
|
|
567
584
|
while current != current.parent:
|
|
568
585
|
candidate = current / filename
|
|
File without changes
|
|
@@ -586,6 +586,14 @@ class AgentTemplateBuilder:
|
|
|
586
586
|
tags_str = ",".join(metadata["tags"])
|
|
587
587
|
frontmatter_lines.append(f"tags: {tags_str}")
|
|
588
588
|
|
|
589
|
+
# CRITICAL: Preserve skills field from template for selective skill deployment
|
|
590
|
+
# Skills are used by startup.py to determine which skills to deploy
|
|
591
|
+
skills = template_data.get("skills", [])
|
|
592
|
+
if skills and isinstance(skills, list):
|
|
593
|
+
frontmatter_lines.append("skills:")
|
|
594
|
+
for skill in skills:
|
|
595
|
+
frontmatter_lines.append(f"- {skill}")
|
|
596
|
+
|
|
589
597
|
frontmatter_lines.extend(
|
|
590
598
|
[
|
|
591
599
|
"---",
|