claude-mpm 3.7.1__py3-none-any.whl → 3.7.8__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/INSTRUCTIONS.md +18 -0
- claude_mpm/agents/frontmatter_validator.py +116 -17
- claude_mpm/agents/schema/agent_schema.json +1 -1
- claude_mpm/{dashboard → agents}/templates/.claude-mpm/memories/engineer_agent.md +1 -1
- claude_mpm/{dashboard/templates/.claude-mpm/memories/version_control_agent.md → agents/templates/.claude-mpm/memories/qa_agent.md} +2 -2
- claude_mpm/agents/templates/.claude-mpm/memories/research_agent.md +39 -0
- claude_mpm/agents/templates/code_analyzer.json +34 -12
- claude_mpm/agents/templates/data_engineer.json +5 -8
- claude_mpm/agents/templates/documentation.json +2 -2
- claude_mpm/agents/templates/engineer.json +6 -6
- claude_mpm/agents/templates/ops.json +3 -8
- claude_mpm/agents/templates/qa.json +2 -3
- claude_mpm/agents/templates/research.json +12 -9
- claude_mpm/agents/templates/security.json +4 -7
- claude_mpm/agents/templates/ticketing.json +161 -0
- claude_mpm/agents/templates/version_control.json +3 -3
- claude_mpm/agents/templates/web_qa.json +214 -0
- claude_mpm/agents/templates/web_ui.json +176 -0
- claude_mpm/cli/commands/agents.py +118 -1
- claude_mpm/cli/parser.py +11 -0
- claude_mpm/cli/ticket_cli.py +31 -0
- claude_mpm/core/framework_loader.py +102 -49
- claude_mpm/dashboard/static/js/components/file-tool-tracker.js +46 -2
- claude_mpm/dashboard/templates/index.html +5 -5
- claude_mpm/services/agents/deployment/agent_deployment.py +9 -1
- claude_mpm/services/agents/deployment/async_agent_deployment.py +174 -13
- claude_mpm/services/agents/management/agent_capabilities_generator.py +21 -11
- claude_mpm/services/ticket_manager.py +207 -44
- claude_mpm/utils/agent_dependency_loader.py +66 -15
- claude_mpm/utils/robust_installer.py +587 -0
- {claude_mpm-3.7.1.dist-info → claude_mpm-3.7.8.dist-info}/METADATA +17 -21
- {claude_mpm-3.7.1.dist-info → claude_mpm-3.7.8.dist-info}/RECORD +37 -46
- claude_mpm/.claude-mpm/logs/hooks_20250728.log +0 -10
- claude_mpm/agents/agent-template.yaml +0 -83
- claude_mpm/agents/templates/test_integration.json +0 -113
- claude_mpm/cli/README.md +0 -108
- claude_mpm/cli_module/refactoring_guide.md +0 -253
- claude_mpm/config/async_logging_config.yaml +0 -145
- claude_mpm/core/.claude-mpm/logs/hooks_20250730.log +0 -34
- claude_mpm/dashboard/.claude-mpm/memories/README.md +0 -36
- claude_mpm/dashboard/README.md +0 -121
- claude_mpm/dashboard/static/js/dashboard.js.backup +0 -1973
- claude_mpm/dashboard/templates/.claude-mpm/memories/README.md +0 -36
- claude_mpm/hooks/README.md +0 -96
- claude_mpm/schemas/agent_schema.json +0 -435
- claude_mpm/services/framework_claude_md_generator/README.md +0 -92
- claude_mpm/services/version_control/VERSION +0 -1
- {claude_mpm-3.7.1.dist-info → claude_mpm-3.7.8.dist-info}/WHEEL +0 -0
- {claude_mpm-3.7.1.dist-info → claude_mpm-3.7.8.dist-info}/entry_points.txt +0 -0
- {claude_mpm-3.7.1.dist-info → claude_mpm-3.7.8.dist-info}/licenses/LICENSE +0 -0
- {claude_mpm-3.7.1.dist-info → claude_mpm-3.7.8.dist-info}/top_level.txt +0 -0
| @@ -1,253 +0,0 @@ | |
| 1 | 
            -
            # CLI Refactoring Guide
         | 
| 2 | 
            -
             | 
| 3 | 
            -
            This guide shows how to refactor the main() function in `/src/claude_mpm/cli.py` to reduce complexity from 16 to under 10.
         | 
| 4 | 
            -
             | 
| 5 | 
            -
            ## Current Issues
         | 
| 6 | 
            -
             | 
| 7 | 
            -
            1. **High Cyclomatic Complexity (16)**
         | 
| 8 | 
            -
               - Multiple nested conditionals
         | 
| 9 | 
            -
               - Duplicate argument definitions
         | 
| 10 | 
            -
               - Mixed concerns in one function
         | 
| 11 | 
            -
             | 
| 12 | 
            -
            2. **Code Duplication**
         | 
| 13 | 
            -
               - Arguments defined twice (global level + run subcommand)
         | 
| 14 | 
            -
               - Similar patterns repeated for each command
         | 
| 15 | 
            -
             | 
| 16 | 
            -
            3. **Poor Maintainability**
         | 
| 17 | 
            -
               - Adding new commands requires multiple changes
         | 
| 18 | 
            -
               - Hard to test individual components
         | 
| 19 | 
            -
             | 
| 20 | 
            -
            ## Refactoring Steps
         | 
| 21 | 
            -
             | 
| 22 | 
            -
            ### Step 1: Update imports in cli.py
         | 
| 23 | 
            -
             | 
| 24 | 
            -
            ```python
         | 
| 25 | 
            -
            # Add to imports
         | 
| 26 | 
            -
            from .cli import ArgumentRegistry, CommandRegistry, register_standard_commands
         | 
| 27 | 
            -
            ```
         | 
| 28 | 
            -
             | 
| 29 | 
            -
            ### Step 2: Replace main() function
         | 
| 30 | 
            -
             | 
| 31 | 
            -
            Replace the entire `main()` function with:
         | 
| 32 | 
            -
             | 
| 33 | 
            -
            ```python
         | 
| 34 | 
            -
            def main(argv: Optional[list] = None):
         | 
| 35 | 
            -
                """Main CLI entry point with reduced complexity."""
         | 
| 36 | 
            -
                # Initialize registries
         | 
| 37 | 
            -
                arg_registry = ArgumentRegistry()
         | 
| 38 | 
            -
                cmd_registry = CommandRegistry(arg_registry)
         | 
| 39 | 
            -
                
         | 
| 40 | 
            -
                # Register standard commands
         | 
| 41 | 
            -
                register_standard_commands(cmd_registry)
         | 
| 42 | 
            -
                
         | 
| 43 | 
            -
                # Create parser
         | 
| 44 | 
            -
                parser = argparse.ArgumentParser(
         | 
| 45 | 
            -
                    prog="claude-mpm",
         | 
| 46 | 
            -
                    description=f"Claude Multi-Agent Project Manager v{__version__}",
         | 
| 47 | 
            -
                    epilog="By default, runs an orchestrated Claude session."
         | 
| 48 | 
            -
                )
         | 
| 49 | 
            -
                
         | 
| 50 | 
            -
                # Store version for ArgumentRegistry
         | 
| 51 | 
            -
                parser._version = f"claude-mpm {__version__}"
         | 
| 52 | 
            -
                
         | 
| 53 | 
            -
                # Apply global arguments
         | 
| 54 | 
            -
                arg_registry.apply_arguments(parser, groups=['global'])
         | 
| 55 | 
            -
                
         | 
| 56 | 
            -
                # Apply run arguments at top level (for default behavior)
         | 
| 57 | 
            -
                arg_registry.apply_arguments(parser, groups=['run'], exclude=['no_hooks'])
         | 
| 58 | 
            -
                
         | 
| 59 | 
            -
                # Set up subcommands
         | 
| 60 | 
            -
                cmd_registry.setup_subcommands(parser)
         | 
| 61 | 
            -
                
         | 
| 62 | 
            -
                # Parse arguments
         | 
| 63 | 
            -
                args = parser.parse_args(argv)
         | 
| 64 | 
            -
                
         | 
| 65 | 
            -
                # Set up logging
         | 
| 66 | 
            -
                _setup_logging(args)
         | 
| 67 | 
            -
                
         | 
| 68 | 
            -
                # Initialize hook service
         | 
| 69 | 
            -
                hook_manager = _initialize_hook_service(args)
         | 
| 70 | 
            -
                
         | 
| 71 | 
            -
                try:
         | 
| 72 | 
            -
                    # Execute command
         | 
| 73 | 
            -
                    result = cmd_registry.execute_command(args, hook_manager=hook_manager)
         | 
| 74 | 
            -
                    if result is None and not args.command:
         | 
| 75 | 
            -
                        parser.print_help()
         | 
| 76 | 
            -
                        return 1
         | 
| 77 | 
            -
                    return result or 0
         | 
| 78 | 
            -
                    
         | 
| 79 | 
            -
                except KeyboardInterrupt:
         | 
| 80 | 
            -
                    get_logger("cli").info("Session interrupted by user")
         | 
| 81 | 
            -
                    return 0
         | 
| 82 | 
            -
                except Exception as e:
         | 
| 83 | 
            -
                    logger = get_logger("cli")
         | 
| 84 | 
            -
                    logger.error(f"Error: {e}")
         | 
| 85 | 
            -
                    if args.debug:
         | 
| 86 | 
            -
                        import traceback
         | 
| 87 | 
            -
                        traceback.print_exc()
         | 
| 88 | 
            -
                    return 1
         | 
| 89 | 
            -
                finally:
         | 
| 90 | 
            -
                    if hook_manager:
         | 
| 91 | 
            -
                        hook_manager.stop_service()
         | 
| 92 | 
            -
            ```
         | 
| 93 | 
            -
             | 
| 94 | 
            -
            ### Step 3: Extract helper functions
         | 
| 95 | 
            -
             | 
| 96 | 
            -
            Add these helper functions after main():
         | 
| 97 | 
            -
             | 
| 98 | 
            -
            ```python
         | 
| 99 | 
            -
            def _setup_logging(args):
         | 
| 100 | 
            -
                """Set up logging based on arguments."""
         | 
| 101 | 
            -
                if args.debug and args.logging == "OFF":
         | 
| 102 | 
            -
                    args.logging = "DEBUG"
         | 
| 103 | 
            -
                
         | 
| 104 | 
            -
                if args.logging != "OFF":
         | 
| 105 | 
            -
                    setup_logging(level=args.logging, log_dir=args.log_dir)
         | 
| 106 | 
            -
                else:
         | 
| 107 | 
            -
                    import logging
         | 
| 108 | 
            -
                    logger = logging.getLogger("cli")
         | 
| 109 | 
            -
                    logger.setLevel(logging.WARNING)
         | 
| 110 | 
            -
             | 
| 111 | 
            -
             | 
| 112 | 
            -
            def _initialize_hook_service(args):
         | 
| 113 | 
            -
                """Initialize hook service if enabled."""
         | 
| 114 | 
            -
                if getattr(args, 'no_hooks', False):
         | 
| 115 | 
            -
                    return None
         | 
| 116 | 
            -
                    
         | 
| 117 | 
            -
                try:
         | 
| 118 | 
            -
                    from .config.hook_config import HookConfig
         | 
| 119 | 
            -
                    
         | 
| 120 | 
            -
                    if not HookConfig.is_hooks_enabled():
         | 
| 121 | 
            -
                        get_logger("cli").info("Hooks disabled via configuration")
         | 
| 122 | 
            -
                        return None
         | 
| 123 | 
            -
                        
         | 
| 124 | 
            -
                    hook_manager = HookServiceManager(log_dir=args.log_dir)
         | 
| 125 | 
            -
                    if hook_manager.start_service():
         | 
| 126 | 
            -
                        logger = get_logger("cli")
         | 
| 127 | 
            -
                        logger.info(f"Hook service started on port {hook_manager.port}")
         | 
| 128 | 
            -
                        print(f"Hook service started on port {hook_manager.port}")
         | 
| 129 | 
            -
                        return hook_manager
         | 
| 130 | 
            -
                    else:
         | 
| 131 | 
            -
                        logger = get_logger("cli")
         | 
| 132 | 
            -
                        logger.warning("Failed to start hook service")
         | 
| 133 | 
            -
                        print("Failed to start hook service, continuing without hooks")
         | 
| 134 | 
            -
                        return None
         | 
| 135 | 
            -
                        
         | 
| 136 | 
            -
                except Exception as e:
         | 
| 137 | 
            -
                    get_logger("cli").warning(f"Hook service init failed: {e}")
         | 
| 138 | 
            -
                    return None
         | 
| 139 | 
            -
            ```
         | 
| 140 | 
            -
             | 
| 141 | 
            -
            ### Step 4: Update command handler signatures
         | 
| 142 | 
            -
             | 
| 143 | 
            -
            Ensure all command handlers accept `**kwargs`:
         | 
| 144 | 
            -
             | 
| 145 | 
            -
            ```python
         | 
| 146 | 
            -
            def run_session(args, hook_manager=None, **kwargs):
         | 
| 147 | 
            -
                """Run an orchestrated Claude session."""
         | 
| 148 | 
            -
                # ... existing implementation
         | 
| 149 | 
            -
             | 
| 150 | 
            -
            def list_tickets(args, **kwargs):
         | 
| 151 | 
            -
                """List recent tickets."""
         | 
| 152 | 
            -
                # ... existing implementation
         | 
| 153 | 
            -
             | 
| 154 | 
            -
            def show_info(args, hook_manager=None, **kwargs):
         | 
| 155 | 
            -
                """Show framework and configuration information."""
         | 
| 156 | 
            -
                # ... existing implementation
         | 
| 157 | 
            -
            ```
         | 
| 158 | 
            -
             | 
| 159 | 
            -
            ## Benefits Achieved
         | 
| 160 | 
            -
             | 
| 161 | 
            -
            ### Complexity Reduction
         | 
| 162 | 
            -
            - **Before**: Cyclomatic complexity of 16
         | 
| 163 | 
            -
            - **After**: Cyclomatic complexity of ~8
         | 
| 164 | 
            -
             | 
| 165 | 
            -
            ### Code Organization
         | 
| 166 | 
            -
            - Centralized argument definitions
         | 
| 167 | 
            -
            - No duplicate argument definitions
         | 
| 168 | 
            -
            - Clear separation of concerns
         | 
| 169 | 
            -
            - Easier to add new commands
         | 
| 170 | 
            -
             | 
| 171 | 
            -
            ### Maintainability
         | 
| 172 | 
            -
            - New commands can be added with a single `register()` call
         | 
| 173 | 
            -
            - Arguments are defined once and reused
         | 
| 174 | 
            -
            - Helper functions are testable in isolation
         | 
| 175 | 
            -
            - Registry pattern allows for extension
         | 
| 176 | 
            -
             | 
| 177 | 
            -
            ## Adding New Commands
         | 
| 178 | 
            -
             | 
| 179 | 
            -
            With the registry system, adding a new command is simple:
         | 
| 180 | 
            -
             | 
| 181 | 
            -
            ```python
         | 
| 182 | 
            -
            # In your code or plugin
         | 
| 183 | 
            -
            def my_command(args, **kwargs):
         | 
| 184 | 
            -
                """Implementation of your command."""
         | 
| 185 | 
            -
                print(f"Running my command with args: {args}")
         | 
| 186 | 
            -
                return 0
         | 
| 187 | 
            -
             | 
| 188 | 
            -
            # Register it
         | 
| 189 | 
            -
            cmd_registry.register(
         | 
| 190 | 
            -
                name='mycommand',
         | 
| 191 | 
            -
                help_text='Description of my command',
         | 
| 192 | 
            -
                handler=my_command,
         | 
| 193 | 
            -
                argument_groups=['framework'],  # Reuse existing argument groups
         | 
| 194 | 
            -
                extra_args={
         | 
| 195 | 
            -
                    'custom_arg': {
         | 
| 196 | 
            -
                        'flags': ['--custom'],
         | 
| 197 | 
            -
                        'type': str,
         | 
| 198 | 
            -
                        'help': 'A custom argument for this command'
         | 
| 199 | 
            -
                    }
         | 
| 200 | 
            -
                }
         | 
| 201 | 
            -
            )
         | 
| 202 | 
            -
            ```
         | 
| 203 | 
            -
             | 
| 204 | 
            -
            ## Testing
         | 
| 205 | 
            -
             | 
| 206 | 
            -
            The refactored code is easier to test:
         | 
| 207 | 
            -
             | 
| 208 | 
            -
            ```python
         | 
| 209 | 
            -
            # Test argument registry
         | 
| 210 | 
            -
            def test_argument_registry():
         | 
| 211 | 
            -
                registry = ArgumentRegistry()
         | 
| 212 | 
            -
                parser = argparse.ArgumentParser()
         | 
| 213 | 
            -
                registry.apply_arguments(parser, groups=['logging'])
         | 
| 214 | 
            -
                
         | 
| 215 | 
            -
                # Verify logging arguments were added
         | 
| 216 | 
            -
                args = parser.parse_args(['--logging', 'DEBUG'])
         | 
| 217 | 
            -
                assert args.logging == 'DEBUG'
         | 
| 218 | 
            -
             | 
| 219 | 
            -
            # Test command registry
         | 
| 220 | 
            -
            def test_command_registry():
         | 
| 221 | 
            -
                arg_reg = ArgumentRegistry()
         | 
| 222 | 
            -
                cmd_reg = CommandRegistry(arg_reg)
         | 
| 223 | 
            -
                
         | 
| 224 | 
            -
                called = False
         | 
| 225 | 
            -
                def test_handler(args, **kwargs):
         | 
| 226 | 
            -
                    nonlocal called
         | 
| 227 | 
            -
                    called = True
         | 
| 228 | 
            -
                    return 0
         | 
| 229 | 
            -
                
         | 
| 230 | 
            -
                cmd_reg.register('test', 'Test command', test_handler)
         | 
| 231 | 
            -
                
         | 
| 232 | 
            -
                parser = argparse.ArgumentParser()
         | 
| 233 | 
            -
                cmd_reg.setup_subcommands(parser)
         | 
| 234 | 
            -
                
         | 
| 235 | 
            -
                args = parser.parse_args(['test'])
         | 
| 236 | 
            -
                result = cmd_reg.execute_command(args)
         | 
| 237 | 
            -
                
         | 
| 238 | 
            -
                assert called
         | 
| 239 | 
            -
                assert result == 0
         | 
| 240 | 
            -
            ```
         | 
| 241 | 
            -
             | 
| 242 | 
            -
            ## Migration Checklist
         | 
| 243 | 
            -
             | 
| 244 | 
            -
            - [ ] Create `/src/claude_mpm/cli/` directory
         | 
| 245 | 
            -
            - [ ] Create `args.py` with ArgumentRegistry
         | 
| 246 | 
            -
            - [ ] Create `commands.py` with CommandRegistry
         | 
| 247 | 
            -
            - [ ] Create `__init__.py` to export classes
         | 
| 248 | 
            -
            - [ ] Update imports in `cli.py`
         | 
| 249 | 
            -
            - [ ] Replace main() function
         | 
| 250 | 
            -
            - [ ] Add helper functions
         | 
| 251 | 
            -
            - [ ] Update command handler signatures
         | 
| 252 | 
            -
            - [ ] Test the refactored CLI
         | 
| 253 | 
            -
            - [ ] Verify complexity is reduced to ≤10
         | 
| @@ -1,145 +0,0 @@ | |
| 1 | 
            -
            # Async Logging Configuration
         | 
| 2 | 
            -
            # Optimized logging configuration for high-performance scenarios
         | 
| 3 | 
            -
             | 
| 4 | 
            -
            logging:
         | 
| 5 | 
            -
              # Enable async logging for improved performance
         | 
| 6 | 
            -
              async:
         | 
| 7 | 
            -
                enabled: true
         | 
| 8 | 
            -
                
         | 
| 9 | 
            -
                # Log format options: json, syslog, journald
         | 
| 10 | 
            -
                format: json
         | 
| 11 | 
            -
                
         | 
| 12 | 
            -
                # Maximum queue size for async writes
         | 
| 13 | 
            -
                max_queue_size: 10000
         | 
| 14 | 
            -
                
         | 
| 15 | 
            -
                # Enable compression for JSON logs (reduces disk usage)
         | 
| 16 | 
            -
                compression: false
         | 
| 17 | 
            -
                
         | 
| 18 | 
            -
                # Worker threads for async processing
         | 
| 19 | 
            -
                worker_threads: 4
         | 
| 20 | 
            -
                
         | 
| 21 | 
            -
                # Flush timeout in seconds
         | 
| 22 | 
            -
                flush_timeout: 5.0
         | 
| 23 | 
            -
              
         | 
| 24 | 
            -
              # Session logger settings
         | 
| 25 | 
            -
              session:
         | 
| 26 | 
            -
                # Base directory for logs
         | 
| 27 | 
            -
                base_dir: ".claude-mpm/responses"
         | 
| 28 | 
            -
                
         | 
| 29 | 
            -
                # Use timestamp-based filenames (eliminates race conditions)
         | 
| 30 | 
            -
                timestamp_filenames: true
         | 
| 31 | 
            -
                
         | 
| 32 | 
            -
                # Include microseconds in timestamps for uniqueness
         | 
| 33 | 
            -
                microsecond_precision: true
         | 
| 34 | 
            -
                
         | 
| 35 | 
            -
                # Filename format with available variables:
         | 
| 36 | 
            -
                # {agent} - Agent name
         | 
| 37 | 
            -
                # {timestamp} - ISO timestamp
         | 
| 38 | 
            -
                # {microseconds} - Microsecond component
         | 
| 39 | 
            -
                # {session} - Session ID
         | 
| 40 | 
            -
                filename_format: "{agent}_{timestamp}_{microseconds}.json"
         | 
| 41 | 
            -
              
         | 
| 42 | 
            -
              # OS-native logging options (for extreme performance)
         | 
| 43 | 
            -
              syslog:
         | 
| 44 | 
            -
                # Syslog address (auto-detected by default)
         | 
| 45 | 
            -
                # address: /var/run/syslog  # macOS
         | 
| 46 | 
            -
                # address: /dev/log         # Linux
         | 
| 47 | 
            -
                # address: ["localhost", 514]  # Network
         | 
| 48 | 
            -
                
         | 
| 49 | 
            -
                # Syslog facility
         | 
| 50 | 
            -
                facility: local0
         | 
| 51 | 
            -
                
         | 
| 52 | 
            -
                # Include structured data
         | 
| 53 | 
            -
                structured_data: true
         | 
| 54 | 
            -
              
         | 
| 55 | 
            -
              # Performance tuning
         | 
| 56 | 
            -
              performance:
         | 
| 57 | 
            -
                # Fire-and-forget mode (don't wait for write confirmation)
         | 
| 58 | 
            -
                fire_and_forget: true
         | 
| 59 | 
            -
                
         | 
| 60 | 
            -
                # Drop logs if queue is full (prevents blocking)
         | 
| 61 | 
            -
                drop_on_full: true
         | 
| 62 | 
            -
                
         | 
| 63 | 
            -
                # Batch writes for efficiency
         | 
| 64 | 
            -
                batch_writes: true
         | 
| 65 | 
            -
                batch_size: 10
         | 
| 66 | 
            -
                batch_timeout_ms: 100
         | 
| 67 | 
            -
             | 
| 68 | 
            -
            # Hook system optimization
         | 
| 69 | 
            -
            hooks:
         | 
| 70 | 
            -
              # Enable hook system
         | 
| 71 | 
            -
              enabled: true
         | 
| 72 | 
            -
              
         | 
| 73 | 
            -
              # Optimization settings
         | 
| 74 | 
            -
              optimization:
         | 
| 75 | 
            -
                # Cache hook configurations at startup
         | 
| 76 | 
            -
                cache_configs: true
         | 
| 77 | 
            -
                
         | 
| 78 | 
            -
                # Lazy load hook implementations
         | 
| 79 | 
            -
                lazy_loading: true
         | 
| 80 | 
            -
                
         | 
| 81 | 
            -
                # Use singleton pattern for hook service
         | 
| 82 | 
            -
                singleton: true
         | 
| 83 | 
            -
                
         | 
| 84 | 
            -
                # Enable async hook execution
         | 
| 85 | 
            -
                async_execution: true
         | 
| 86 | 
            -
                
         | 
| 87 | 
            -
                # Maximum workers for parallel hook execution
         | 
| 88 | 
            -
                max_workers: 4
         | 
| 89 | 
            -
              
         | 
| 90 | 
            -
              # Pre-delegation hooks
         | 
| 91 | 
            -
              pre_delegation:
         | 
| 92 | 
            -
                enabled: true
         | 
| 93 | 
            -
                
         | 
| 94 | 
            -
                # Parallel execution for independent hooks
         | 
| 95 | 
            -
                parallel_safe_hooks:
         | 
| 96 | 
            -
                  - memory_context_hook
         | 
| 97 | 
            -
                  - validation_hook
         | 
| 98 | 
            -
                  - auth_hook
         | 
| 99 | 
            -
              
         | 
| 100 | 
            -
              # Post-delegation hooks
         | 
| 101 | 
            -
              post_delegation:
         | 
| 102 | 
            -
                enabled: true
         | 
| 103 | 
            -
                
         | 
| 104 | 
            -
                # Parallel execution for independent hooks
         | 
| 105 | 
            -
                parallel_safe_hooks:
         | 
| 106 | 
            -
                  - logging_hook
         | 
| 107 | 
            -
                  - metrics_hook
         | 
| 108 | 
            -
                  - cleanup_hook
         | 
| 109 | 
            -
              
         | 
| 110 | 
            -
              # Registered hooks with lazy loading
         | 
| 111 | 
            -
              registered:
         | 
| 112 | 
            -
                # NOTE: The builtin hooks have been deprecated and removed
         | 
| 113 | 
            -
                # These references are kept commented for historical reference
         | 
| 114 | 
            -
                # memory_context_hook:
         | 
| 115 | 
            -
                #   module: claude_mpm.hooks.builtin.memory_hooks
         | 
| 116 | 
            -
                #   class: MemoryContextHook
         | 
| 117 | 
            -
                #   priority: 10
         | 
| 118 | 
            -
                #   enabled: true
         | 
| 119 | 
            -
                #   params:
         | 
| 120 | 
            -
                #     cache_size: 1000
         | 
| 121 | 
            -
                # 
         | 
| 122 | 
            -
                # response_logger_hook:
         | 
| 123 | 
            -
                #   module: claude_mpm.hooks.builtin.logging_hooks
         | 
| 124 | 
            -
                #   class: ResponseLoggerHook
         | 
| 125 | 
            -
                #   priority: 90
         | 
| 126 | 
            -
                #   enabled: true
         | 
| 127 | 
            -
                #   params:
         | 
| 128 | 
            -
                #     async: true
         | 
| 129 | 
            -
                # 
         | 
| 130 | 
            -
                # metrics_hook:
         | 
| 131 | 
            -
                #   module: claude_mpm.hooks.builtin.metrics_hooks
         | 
| 132 | 
            -
                #   class: MetricsCollectorHook
         | 
| 133 | 
            -
                #   priority: 95
         | 
| 134 | 
            -
                #   enabled: true
         | 
| 135 | 
            -
                #   params:
         | 
| 136 | 
            -
                #     buffer_size: 100
         | 
| 137 | 
            -
             | 
| 138 | 
            -
            # Environment variable overrides
         | 
| 139 | 
            -
            # These can override any setting above:
         | 
| 140 | 
            -
            #
         | 
| 141 | 
            -
            # CLAUDE_USE_ASYNC_LOG=true        # Enable async logging
         | 
| 142 | 
            -
            # CLAUDE_LOG_FORMAT=syslog         # Use syslog format
         | 
| 143 | 
            -
            # CLAUDE_LOG_SYNC=true             # Disable async (for debugging)
         | 
| 144 | 
            -
            # CLAUDE_HOOKS_CACHE=true          # Enable hook caching
         | 
| 145 | 
            -
            # CLAUDE_HOOKS_ASYNC=true          # Enable async hooks
         | 
| @@ -1,34 +0,0 @@ | |
| 1 | 
            -
            2025-07-30 12:40:20,992 - claude_mpm_hooks_core - INFO - hook_handler.py:231 - Claude Code hook event: PostToolUse (session: df539357)
         | 
| 2 | 
            -
            2025-07-30 12:40:20,992 - claude_mpm_hooks_core - INFO - hook_handler.py:254 - PostToolUse: Bash (exit code: N/A)
         | 
| 3 | 
            -
            2025-07-30 12:40:33,117 - claude_mpm_hooks_core - INFO - hook_handler.py:231 - Claude Code hook event: PreToolUse (session: df539357)
         | 
| 4 | 
            -
            2025-07-30 12:40:33,117 - claude_mpm_hooks_core - INFO - hook_handler.py:247 - PreToolUse: Edit
         | 
| 5 | 
            -
            2025-07-30 12:40:33,276 - claude_mpm_hooks_core - INFO - hook_handler.py:231 - Claude Code hook event: PostToolUse (session: df539357)
         | 
| 6 | 
            -
            2025-07-30 12:40:33,276 - claude_mpm_hooks_core - INFO - hook_handler.py:254 - PostToolUse: Edit (exit code: N/A)
         | 
| 7 | 
            -
            2025-07-30 12:40:39,276 - claude_mpm_hooks_core - INFO - hook_handler.py:231 - Claude Code hook event: PreToolUse (session: df539357)
         | 
| 8 | 
            -
            2025-07-30 12:40:39,276 - claude_mpm_hooks_core - INFO - hook_handler.py:247 - PreToolUse: Bash
         | 
| 9 | 
            -
            2025-07-30 12:40:39,541 - claude_mpm_hooks_core - INFO - hook_handler.py:231 - Claude Code hook event: PostToolUse (session: df539357)
         | 
| 10 | 
            -
            2025-07-30 12:40:39,541 - claude_mpm_hooks_core - INFO - hook_handler.py:254 - PostToolUse: Bash (exit code: N/A)
         | 
| 11 | 
            -
            2025-07-30 12:40:48,610 - claude_mpm_hooks_core - INFO - hook_handler.py:231 - Claude Code hook event: PreToolUse (session: df539357)
         | 
| 12 | 
            -
            2025-07-30 12:40:48,610 - claude_mpm_hooks_core - INFO - hook_handler.py:247 - PreToolUse: Bash
         | 
| 13 | 
            -
            2025-07-30 12:40:49,941 - claude_mpm_hooks_core - INFO - hook_handler.py:231 - Claude Code hook event: PostToolUse (session: df539357)
         | 
| 14 | 
            -
            2025-07-30 12:40:49,941 - claude_mpm_hooks_core - INFO - hook_handler.py:254 - PostToolUse: Bash (exit code: N/A)
         | 
| 15 | 
            -
            2025-07-30 12:44:50,358 - claude_mpm_hooks_core - INFO - hook_handler.py:231 - Claude Code hook event: UserPromptSubmit (session: df539357)
         | 
| 16 | 
            -
            2025-07-30 12:44:50,358 - claude_mpm_hooks_core - INFO - hook_handler.py:244 - UserPromptSubmit: OK. Let's make the subprocess the default method
         | 
| 17 | 
            -
            2025-07-30 13:05:35,872 - claude_mpm_hooks_core - INFO - hook_handler.py:231 - Claude Code hook event: UserPromptSubmit (session: df539357)
         | 
| 18 | 
            -
            2025-07-30 13:05:35,872 - claude_mpm_hooks_core - INFO - hook_handler.py:244 - UserPromptSubmit: actually leave as is.  I want to figure out a simple test to trigger the terminal flow.  Use docs/de...
         | 
| 19 | 
            -
            2025-07-30 13:05:42,930 - claude_mpm_hooks_core - INFO - hook_handler.py:231 - Claude Code hook event: PreToolUse (session: df539357)
         | 
| 20 | 
            -
            2025-07-30 13:05:42,930 - claude_mpm_hooks_core - INFO - hook_handler.py:247 - PreToolUse: Read
         | 
| 21 | 
            -
            2025-07-30 13:05:43,133 - claude_mpm_hooks_core - INFO - hook_handler.py:231 - Claude Code hook event: PostToolUse (session: df539357)
         | 
| 22 | 
            -
            2025-07-30 13:05:43,133 - claude_mpm_hooks_core - INFO - hook_handler.py:254 - PostToolUse: Read (exit code: N/A)
         | 
| 23 | 
            -
            2025-07-30 13:05:49,996 - claude_mpm_hooks_core - INFO - hook_handler.py:231 - Claude Code hook event: PreToolUse (session: df539357)
         | 
| 24 | 
            -
            2025-07-30 13:05:49,996 - claude_mpm_hooks_core - INFO - hook_handler.py:247 - PreToolUse: Grep
         | 
| 25 | 
            -
            2025-07-30 13:05:50,548 - claude_mpm_hooks_core - INFO - hook_handler.py:231 - Claude Code hook event: PostToolUse (session: df539357)
         | 
| 26 | 
            -
            2025-07-30 13:05:50,548 - claude_mpm_hooks_core - INFO - hook_handler.py:254 - PostToolUse: Grep (exit code: N/A)
         | 
| 27 | 
            -
            2025-07-30 13:05:56,341 - claude_mpm_hooks_core - INFO - hook_handler.py:231 - Claude Code hook event: PreToolUse (session: df539357)
         | 
| 28 | 
            -
            2025-07-30 13:05:56,341 - claude_mpm_hooks_core - INFO - hook_handler.py:247 - PreToolUse: Read
         | 
| 29 | 
            -
            2025-07-30 13:05:56,527 - claude_mpm_hooks_core - INFO - hook_handler.py:231 - Claude Code hook event: PostToolUse (session: df539357)
         | 
| 30 | 
            -
            2025-07-30 13:05:56,528 - claude_mpm_hooks_core - INFO - hook_handler.py:254 - PostToolUse: Read (exit code: N/A)
         | 
| 31 | 
            -
            2025-07-30 13:06:01,890 - claude_mpm_hooks_core - INFO - hook_handler.py:231 - Claude Code hook event: PreToolUse (session: df539357)
         | 
| 32 | 
            -
            2025-07-30 13:06:01,890 - claude_mpm_hooks_core - INFO - hook_handler.py:247 - PreToolUse: Bash
         | 
| 33 | 
            -
            2025-07-30 13:06:08,115 - claude_mpm_hooks_core - INFO - hook_handler.py:231 - Claude Code hook event: PreToolUse (session: df539357)
         | 
| 34 | 
            -
            2025-07-30 13:06:08,115 - claude_mpm_hooks_core - INFO - hook_handler.py:247 - PreToolUse: Bash
         | 
| @@ -1,36 +0,0 @@ | |
| 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
         | 
    
        claude_mpm/dashboard/README.md
    DELETED
    
    | @@ -1,121 +0,0 @@ | |
| 1 | 
            -
            # Claude MPM Web Dashboard
         | 
| 2 | 
            -
             | 
| 3 | 
            -
            This directory contains the modular web dashboard for Claude MPM monitoring and management.
         | 
| 4 | 
            -
             | 
| 5 | 
            -
            ## Structure
         | 
| 6 | 
            -
             | 
| 7 | 
            -
            ```
         | 
| 8 | 
            -
            src/claude_mpm/dashboard/
         | 
| 9 | 
            -
            ├── static/
         | 
| 10 | 
            -
            │   ├── css/
         | 
| 11 | 
            -
            │   │   └── dashboard.css          # Main stylesheet
         | 
| 12 | 
            -
            │   └── js/
         | 
| 13 | 
            -
            │       ├── socket-client.js       # Socket.IO connection management
         | 
| 14 | 
            -
            │       ├── dashboard.js          # Main dashboard application
         | 
| 15 | 
            -
            │       └── components/
         | 
| 16 | 
            -
            │           ├── event-viewer.js    # Event display and filtering
         | 
| 17 | 
            -
            │           ├── module-viewer.js   # Event detail viewer
         | 
| 18 | 
            -
            │           └── session-manager.js # Session management
         | 
| 19 | 
            -
            ├── templates/
         | 
| 20 | 
            -
            │   └── index.html               # Main dashboard HTML
         | 
| 21 | 
            -
            ├── index.html                   # Root index with redirect
         | 
| 22 | 
            -
            ├── test_dashboard.html          # Test version for verification
         | 
| 23 | 
            -
            └── README.md                    # This file
         | 
| 24 | 
            -
            ```
         | 
| 25 | 
            -
             | 
| 26 | 
            -
            ## Components
         | 
| 27 | 
            -
             | 
| 28 | 
            -
            ### SocketClient (`socket-client.js`)
         | 
| 29 | 
            -
            - Manages WebSocket connections to the Claude MPM server
         | 
| 30 | 
            -
            - Handles event reception and processing
         | 
| 31 | 
            -
            - Provides callbacks for connection state changes
         | 
| 32 | 
            -
            - Maintains event history and session tracking
         | 
| 33 | 
            -
             | 
| 34 | 
            -
            ### EventViewer (`components/event-viewer.js`)
         | 
| 35 | 
            -
            - Displays events in a filterable list
         | 
| 36 | 
            -
            - Supports search, type filtering, and session filtering
         | 
| 37 | 
            -
            - Handles event selection and keyboard navigation
         | 
| 38 | 
            -
            - Updates metrics display (total events, events per minute, etc.)
         | 
| 39 | 
            -
             | 
| 40 | 
            -
            ### ModuleViewer (`components/module-viewer.js`)
         | 
| 41 | 
            -
            - Shows detailed information about selected events
         | 
| 42 | 
            -
            - Provides structured views for different event types
         | 
| 43 | 
            -
            - Displays raw JSON data for debugging
         | 
| 44 | 
            -
            - Organizes events by class/category
         | 
| 45 | 
            -
             | 
| 46 | 
            -
            ### SessionManager (`components/session-manager.js`)
         | 
| 47 | 
            -
            - Manages session selection and filtering
         | 
| 48 | 
            -
            - Updates session dropdown with available sessions
         | 
| 49 | 
            -
            - Tracks current active session
         | 
| 50 | 
            -
            - Updates footer information
         | 
| 51 | 
            -
             | 
| 52 | 
            -
            ### Dashboard (`dashboard.js`)
         | 
| 53 | 
            -
            - Main application coordinator
         | 
| 54 | 
            -
            - Handles tab switching between Events, Agents, Tools, and Files
         | 
| 55 | 
            -
            - Manages component interactions
         | 
| 56 | 
            -
            - Provides global functions for backward compatibility
         | 
| 57 | 
            -
             | 
| 58 | 
            -
            ## Features
         | 
| 59 | 
            -
             | 
| 60 | 
            -
            ### File-Centric Files Tab
         | 
| 61 | 
            -
            The Files tab now shows a file-centric view where:
         | 
| 62 | 
            -
            - Each file appears only once in the list
         | 
| 63 | 
            -
            - Files show read/write icons based on operations performed
         | 
| 64 | 
            -
            - Most recently accessed files appear at the bottom
         | 
| 65 | 
            -
            - Clicking a file shows all operations performed on it with timestamps and agent information
         | 
| 66 | 
            -
             | 
| 67 | 
            -
            ### Tab Organization
         | 
| 68 | 
            -
            - **Events**: All events with filtering and search
         | 
| 69 | 
            -
            - **Agents**: Agent-specific events and operations
         | 
| 70 | 
            -
            - **Tools**: Tool usage and parameters
         | 
| 71 | 
            -
            - **Files**: File operations organized by file path
         | 
| 72 | 
            -
             | 
| 73 | 
            -
            ### Enhanced Event Details
         | 
| 74 | 
            -
            - Structured views for different event types
         | 
| 75 | 
            -
            - Todo checklists with status indicators
         | 
| 76 | 
            -
            - Agent and tool information
         | 
| 77 | 
            -
            - Session tracking and filtering
         | 
| 78 | 
            -
             | 
| 79 | 
            -
            ## Usage
         | 
| 80 | 
            -
             | 
| 81 | 
            -
            ### Development
         | 
| 82 | 
            -
            For development and testing, use `test_dashboard.html` which includes module verification.
         | 
| 83 | 
            -
             | 
| 84 | 
            -
            ### Production
         | 
| 85 | 
            -
            Use `templates/dashboard.html` as the main template, ensuring all static files are served correctly.
         | 
| 86 | 
            -
             | 
| 87 | 
            -
            ### Integration
         | 
| 88 | 
            -
            The dashboard can be integrated into a Flask/FastAPI application by serving the static files and using the template.
         | 
| 89 | 
            -
             | 
| 90 | 
            -
            ## Migration from Original
         | 
| 91 | 
            -
             | 
| 92 | 
            -
            The original monolithic `claude_mpm_socketio_dashboard.html` has been replaced with a modular structure:
         | 
| 93 | 
            -
             | 
| 94 | 
            -
            1. **CSS**: Extracted to `static/css/dashboard.css`
         | 
| 95 | 
            -
            2. **JavaScript**: Split into logical modules in `static/js/`
         | 
| 96 | 
            -
            3. **HTML**: Clean template in `templates/dashboard.html`
         | 
| 97 | 
            -
             | 
| 98 | 
            -
            All original functionality has been preserved while improving:
         | 
| 99 | 
            -
            - Code organization and maintainability
         | 
| 100 | 
            -
            - Module reusability
         | 
| 101 | 
            -
            - Easier debugging and development
         | 
| 102 | 
            -
            - Better separation of concerns
         | 
| 103 | 
            -
             | 
| 104 | 
            -
            ## Backward Compatibility
         | 
| 105 | 
            -
             | 
| 106 | 
            -
            Global functions are maintained for compatibility:
         | 
| 107 | 
            -
            - `connectSocket()`
         | 
| 108 | 
            -
            - `disconnectSocket()`
         | 
| 109 | 
            -
            - `clearEvents()`
         | 
| 110 | 
            -
            - `exportEvents()`
         | 
| 111 | 
            -
            - `clearSelection()`
         | 
| 112 | 
            -
            - `switchTab(tabName)`
         | 
| 113 | 
            -
             | 
| 114 | 
            -
            ## Browser Support
         | 
| 115 | 
            -
             | 
| 116 | 
            -
            Requires modern browsers with support for:
         | 
| 117 | 
            -
            - ES6 Classes
         | 
| 118 | 
            -
            - Fetch API
         | 
| 119 | 
            -
            - Custom Events
         | 
| 120 | 
            -
            - CSS Grid/Flexbox
         | 
| 121 | 
            -
            - Socket.IO 4.x
         |