claude-mpm 3.5.4__py3-none-any.whl → 3.6.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.
Files changed (68) hide show
  1. claude_mpm/.claude-mpm/logs/hooks_20250728.log +10 -0
  2. claude_mpm/VERSION +1 -1
  3. claude_mpm/agents/BASE_AGENT_TEMPLATE.md +96 -23
  4. claude_mpm/agents/BASE_PM.md +273 -0
  5. claude_mpm/agents/INSTRUCTIONS.md +114 -102
  6. claude_mpm/agents/agent-template.yaml +83 -0
  7. claude_mpm/agents/agent_loader.py +36 -1
  8. claude_mpm/agents/async_agent_loader.py +421 -0
  9. claude_mpm/agents/templates/code_analyzer.json +81 -0
  10. claude_mpm/agents/templates/data_engineer.json +18 -3
  11. claude_mpm/agents/templates/documentation.json +18 -3
  12. claude_mpm/agents/templates/engineer.json +19 -4
  13. claude_mpm/agents/templates/ops.json +18 -3
  14. claude_mpm/agents/templates/qa.json +20 -4
  15. claude_mpm/agents/templates/research.json +20 -4
  16. claude_mpm/agents/templates/security.json +18 -3
  17. claude_mpm/agents/templates/version_control.json +16 -3
  18. claude_mpm/cli/README.md +108 -0
  19. claude_mpm/cli/__init__.py +5 -1
  20. claude_mpm/cli/commands/__init__.py +5 -1
  21. claude_mpm/cli/commands/agents.py +233 -6
  22. claude_mpm/cli/commands/aggregate.py +462 -0
  23. claude_mpm/cli/commands/config.py +277 -0
  24. claude_mpm/cli/commands/run.py +228 -47
  25. claude_mpm/cli/parser.py +176 -1
  26. claude_mpm/cli/utils.py +9 -1
  27. claude_mpm/cli_module/refactoring_guide.md +253 -0
  28. claude_mpm/config/async_logging_config.yaml +145 -0
  29. claude_mpm/constants.py +19 -0
  30. claude_mpm/core/.claude-mpm/logs/hooks_20250730.log +34 -0
  31. claude_mpm/core/claude_runner.py +413 -76
  32. claude_mpm/core/config.py +161 -4
  33. claude_mpm/core/config_paths.py +0 -1
  34. claude_mpm/core/factories.py +9 -3
  35. claude_mpm/core/framework_loader.py +81 -0
  36. claude_mpm/dashboard/.claude-mpm/memories/README.md +36 -0
  37. claude_mpm/dashboard/README.md +121 -0
  38. claude_mpm/dashboard/static/js/dashboard.js.backup +1973 -0
  39. claude_mpm/dashboard/templates/.claude-mpm/memories/README.md +36 -0
  40. claude_mpm/dashboard/templates/.claude-mpm/memories/engineer_agent.md +39 -0
  41. claude_mpm/dashboard/templates/.claude-mpm/memories/version_control_agent.md +38 -0
  42. claude_mpm/hooks/README.md +96 -0
  43. claude_mpm/hooks/claude_hooks/hook_handler.py +391 -9
  44. claude_mpm/init.py +123 -18
  45. claude_mpm/models/agent_session.py +511 -0
  46. claude_mpm/schemas/agent_schema.json +435 -0
  47. claude_mpm/scripts/__init__.py +15 -0
  48. claude_mpm/scripts/start_activity_logging.py +86 -0
  49. claude_mpm/services/agents/deployment/agent_deployment.py +326 -24
  50. claude_mpm/services/agents/deployment/async_agent_deployment.py +461 -0
  51. claude_mpm/services/agents/management/agent_management_service.py +2 -1
  52. claude_mpm/services/event_aggregator.py +547 -0
  53. claude_mpm/services/framework_claude_md_generator/README.md +92 -0
  54. claude_mpm/services/framework_claude_md_generator/section_generators/agents.py +3 -3
  55. claude_mpm/services/framework_claude_md_generator/section_generators/claude_pm_init.py +2 -2
  56. claude_mpm/services/version_control/VERSION +1 -0
  57. claude_mpm/utils/agent_dependency_loader.py +655 -0
  58. claude_mpm/utils/console.py +11 -0
  59. claude_mpm/utils/dependency_cache.py +376 -0
  60. claude_mpm/utils/dependency_strategies.py +343 -0
  61. claude_mpm/utils/environment_context.py +310 -0
  62. {claude_mpm-3.5.4.dist-info → claude_mpm-3.6.0.dist-info}/METADATA +87 -1
  63. {claude_mpm-3.5.4.dist-info → claude_mpm-3.6.0.dist-info}/RECORD +67 -37
  64. claude_mpm/agents/templates/pm.json +0 -122
  65. {claude_mpm-3.5.4.dist-info → claude_mpm-3.6.0.dist-info}/WHEEL +0 -0
  66. {claude_mpm-3.5.4.dist-info → claude_mpm-3.6.0.dist-info}/entry_points.txt +0 -0
  67. {claude_mpm-3.5.4.dist-info → claude_mpm-3.6.0.dist-info}/licenses/LICENSE +0 -0
  68. {claude_mpm-3.5.4.dist-info → claude_mpm-3.6.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,36 @@
1
+ # Agent Memory System
2
+
3
+ ## Purpose
4
+ Each agent maintains project-specific knowledge in these files. Agents read their memory file before tasks and update it when they learn something new.
5
+
6
+ ## Manual Editing
7
+ Feel free to edit these files to:
8
+ - Add project-specific guidelines
9
+ - Remove outdated information
10
+ - Reorganize for better clarity
11
+ - Add domain-specific knowledge
12
+
13
+ ## Memory Limits
14
+ - Max file size: 8KB (~2000 tokens)
15
+ - Max sections: 10
16
+ - Max items per section: 15
17
+ - Files auto-truncate when limits exceeded
18
+
19
+ ## File Format
20
+ Standard markdown with structured sections. Agents expect:
21
+ - Project Architecture
22
+ - Implementation Guidelines
23
+ - Common Mistakes to Avoid
24
+ - Current Technical Context
25
+
26
+ ## How It Works
27
+ 1. Agents read their memory file before starting tasks
28
+ 2. Agents add learnings during or after task completion
29
+ 3. Files automatically enforce size limits
30
+ 4. Developers can manually edit for accuracy
31
+
32
+ ## Memory File Lifecycle
33
+ - Created automatically when agent first runs
34
+ - Updated through hook system after delegations
35
+ - Manually editable by developers
36
+ - Version controlled with project
@@ -0,0 +1,39 @@
1
+ # Engineer Agent Memory - templates
2
+
3
+ <!-- MEMORY LIMITS: 8KB max | 10 sections max | 15 items per section -->
4
+ <!-- Last Updated: 2025-08-07 18:26:34 | Auto-updated by: engineer -->
5
+
6
+ ## Project Context
7
+ templates: mixed standard application
8
+
9
+ ## Project Architecture
10
+ - Standard Application with mixed implementation
11
+
12
+ ## Coding Patterns Learned
13
+ <!-- Items will be added as knowledge accumulates -->
14
+
15
+ ## Implementation Guidelines
16
+ <!-- Items will be added as knowledge accumulates -->
17
+
18
+ ## Domain-Specific Knowledge
19
+ <!-- Agent-specific knowledge for templates domain -->
20
+ - Key project terms: templates
21
+ - Focus on implementation patterns, coding standards, and best practices
22
+
23
+ ## Effective Strategies
24
+ <!-- Successful approaches discovered through experience -->
25
+
26
+ ## Common Mistakes to Avoid
27
+ <!-- Items will be added as knowledge accumulates -->
28
+
29
+ ## Integration Points
30
+ <!-- Items will be added as knowledge accumulates -->
31
+
32
+ ## Performance Considerations
33
+ <!-- Items will be added as knowledge accumulates -->
34
+
35
+ ## Current Technical Context
36
+ <!-- Items will be added as knowledge accumulates -->
37
+
38
+ ## Recent Learnings
39
+ <!-- Most recent discoveries and insights -->
@@ -0,0 +1,38 @@
1
+ # Version Control Agent Memory - templates
2
+
3
+ <!-- MEMORY LIMITS: 8KB max | 10 sections max | 15 items per section -->
4
+ <!-- Last Updated: 2025-08-07 18:28:51 | Auto-updated by: version_control -->
5
+
6
+ ## Project Context
7
+ templates: mixed standard application
8
+
9
+ ## Project Architecture
10
+ - Standard Application with mixed implementation
11
+
12
+ ## Coding Patterns Learned
13
+ <!-- Items will be added as knowledge accumulates -->
14
+
15
+ ## Implementation Guidelines
16
+ <!-- Items will be added as knowledge accumulates -->
17
+
18
+ ## Domain-Specific Knowledge
19
+ <!-- Agent-specific knowledge for templates domain -->
20
+ - Key project terms: templates
21
+
22
+ ## Effective Strategies
23
+ <!-- Successful approaches discovered through experience -->
24
+
25
+ ## Common Mistakes to Avoid
26
+ <!-- Items will be added as knowledge accumulates -->
27
+
28
+ ## Integration Points
29
+ <!-- Items will be added as knowledge accumulates -->
30
+
31
+ ## Performance Considerations
32
+ <!-- Items will be added as knowledge accumulates -->
33
+
34
+ ## Current Technical Context
35
+ <!-- Items will be added as knowledge accumulates -->
36
+
37
+ ## Recent Learnings
38
+ <!-- Most recent discoveries and insights -->
@@ -0,0 +1,96 @@
1
+ # Claude Code Hooks System
2
+
3
+ This directory contains the Claude Code hook integration for claude-mpm.
4
+
5
+ ## Overview
6
+
7
+ The hook system allows claude-mpm to intercept and handle commands typed in Claude Code, particularly the `/mpm` commands.
8
+
9
+ ## Structure
10
+
11
+ ```
12
+ hooks/
13
+ └── claude_hooks/ # Claude Code hook implementation
14
+ ├── hook_handler.py # Main Python handler that processes events
15
+ └── hook_wrapper.sh # Shell wrapper script (this is what gets installed in ~/.claude/settings.json)
16
+ ```
17
+
18
+ ## Claude Code Hooks
19
+
20
+ The Claude Code hooks are the primary integration point between claude-mpm and Claude Code. They allow:
21
+
22
+ - Intercepting `/mpm` commands before they reach the LLM
23
+ - Providing custom responses and actions
24
+ - Blocking LLM processing when appropriate
25
+
26
+ ### Installation
27
+
28
+ To install the Claude Code hooks:
29
+
30
+ ```bash
31
+ python scripts/install_hooks.py
32
+ ```
33
+
34
+ This will:
35
+ 1. Create/update `~/.claude/settings.json` with hook configuration
36
+ 2. Point to the `hook_wrapper.sh` script
37
+ 3. Copy any custom commands to `~/.claude/commands/`
38
+
39
+ ### How It Works
40
+
41
+ 1. When you type in Claude Code, it triggers hook events
42
+ 2. Claude Code calls `hook_wrapper.sh` (the path in `~/.claude/settings.json`)
43
+ 3. The wrapper script:
44
+ - Detects if it's running from a local dev environment, npm, or PyPI installation
45
+ - Activates the appropriate Python environment
46
+ - Runs `hook_handler.py` with the event data
47
+ 4. The handler processes various event types:
48
+ - **UserPromptSubmit**: Checks if the prompt starts with `/mpm` and handles commands
49
+ - **PreToolUse**: Logs tool usage before execution
50
+ - **PostToolUse**: Logs tool results after execution
51
+ - **Stop**: Logs when a session or task stops
52
+ - **SubagentStop**: Logs when a subagent completes with agent type and ID
53
+ 5. For `/mpm` commands, it returns exit code 2 to block LLM processing
54
+ 6. All events are logged to project-specific log files in `.claude-mpm/logs/`
55
+
56
+ ### Available Commands
57
+
58
+ - `/mpm` - Show help and available commands
59
+ - `/mpm status` - Show claude-mpm status and environment
60
+ - `/mpm help` - Show detailed help
61
+
62
+ ### Debugging
63
+
64
+ To enable debug logging for hooks:
65
+
66
+ ```bash
67
+ export CLAUDE_MPM_LOG_LEVEL=DEBUG
68
+ ```
69
+
70
+ Then run Claude Code from that terminal. Hook events will be logged to `~/.claude-mpm/logs/`.
71
+
72
+ ## Legacy Hook System (Removed)
73
+
74
+ The `builtin/` directory that contained the old internal hook system has been removed. All hook functionality is now handled through the Claude Code hooks system.
75
+
76
+ ## Development
77
+
78
+ To add new `/mpm` commands:
79
+
80
+ 1. Edit `hook_handler.py` to handle the new command
81
+ 2. Update the help text in the `handle_mpm_help()` function
82
+ 3. Test by running Claude Code with the new command
83
+
84
+ ## Exit Codes
85
+
86
+ The hook system uses specific exit codes:
87
+
88
+ - `0` - Success, continue normal processing
89
+ - `2` - Block LLM processing (command was handled)
90
+ - Other - Error occurred
91
+
92
+ ## Environment Variables
93
+
94
+ - `CLAUDE_MPM_LOG_LEVEL` - Set to DEBUG for detailed logging
95
+ - `HOOK_EVENT_TYPE` - Set by Claude Code (UserPromptSubmit, PreToolUse, PostToolUse)
96
+ - `HOOK_DATA` - JSON data from Claude Code with event details