claude-mpm 5.1.9__py3-none-any.whl → 5.4.22__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of claude-mpm might be problematic. Click here for more details.

Files changed (176) hide show
  1. claude_mpm/VERSION +1 -1
  2. claude_mpm/__init__.py +4 -0
  3. claude_mpm/agents/CLAUDE_MPM_TEACHER_OUTPUT_STYLE.md +1 -1
  4. claude_mpm/agents/PM_INSTRUCTIONS.md +290 -34
  5. claude_mpm/agents/agent_loader.py +13 -44
  6. claude_mpm/agents/templates/circuit-breakers.md +138 -1
  7. claude_mpm/cli/__main__.py +4 -0
  8. claude_mpm/cli/chrome_devtools_installer.py +175 -0
  9. claude_mpm/cli/commands/agent_state_manager.py +8 -17
  10. claude_mpm/cli/commands/agents.py +0 -31
  11. claude_mpm/cli/commands/auto_configure.py +210 -25
  12. claude_mpm/cli/commands/config.py +88 -2
  13. claude_mpm/cli/commands/configure.py +1097 -158
  14. claude_mpm/cli/commands/configure_agent_display.py +15 -6
  15. claude_mpm/cli/commands/mpm_init/core.py +160 -46
  16. claude_mpm/cli/commands/mpm_init/knowledge_extractor.py +481 -0
  17. claude_mpm/cli/commands/mpm_init/prompts.py +280 -0
  18. claude_mpm/cli/commands/skills.py +214 -189
  19. claude_mpm/cli/commands/summarize.py +413 -0
  20. claude_mpm/cli/executor.py +11 -3
  21. claude_mpm/cli/parsers/agents_parser.py +0 -9
  22. claude_mpm/cli/parsers/auto_configure_parser.py +0 -138
  23. claude_mpm/cli/parsers/base_parser.py +5 -0
  24. claude_mpm/cli/parsers/config_parser.py +153 -83
  25. claude_mpm/cli/parsers/skills_parser.py +3 -2
  26. claude_mpm/cli/startup.py +550 -94
  27. claude_mpm/commands/mpm-config.md +265 -0
  28. claude_mpm/commands/mpm-help.md +14 -95
  29. claude_mpm/commands/mpm-organize.md +500 -0
  30. claude_mpm/config/agent_sources.py +27 -0
  31. claude_mpm/core/framework/formatters/content_formatter.py +3 -13
  32. claude_mpm/core/framework/loaders/agent_loader.py +8 -5
  33. claude_mpm/core/framework_loader.py +4 -2
  34. claude_mpm/core/logger.py +13 -0
  35. claude_mpm/core/socketio_pool.py +3 -3
  36. claude_mpm/core/unified_agent_registry.py +5 -15
  37. claude_mpm/hooks/claude_hooks/correlation_manager.py +60 -0
  38. claude_mpm/hooks/claude_hooks/event_handlers.py +211 -78
  39. claude_mpm/hooks/claude_hooks/hook_handler.py +6 -0
  40. claude_mpm/hooks/claude_hooks/installer.py +33 -10
  41. claude_mpm/hooks/claude_hooks/memory_integration.py +26 -9
  42. claude_mpm/hooks/claude_hooks/response_tracking.py +2 -3
  43. claude_mpm/hooks/claude_hooks/services/connection_manager.py +4 -0
  44. claude_mpm/hooks/memory_integration_hook.py +46 -1
  45. claude_mpm/init.py +0 -19
  46. claude_mpm/scripts/claude-hook-handler.sh +58 -18
  47. claude_mpm/scripts/launch_monitor.py +93 -13
  48. claude_mpm/scripts/start_activity_logging.py +0 -0
  49. claude_mpm/services/agents/agent_recommendation_service.py +278 -0
  50. claude_mpm/services/agents/agent_review_service.py +280 -0
  51. claude_mpm/services/agents/deployment/agent_discovery_service.py +2 -3
  52. claude_mpm/services/agents/deployment/agent_template_builder.py +4 -2
  53. claude_mpm/services/agents/deployment/multi_source_deployment_service.py +78 -9
  54. claude_mpm/services/agents/deployment/remote_agent_discovery_service.py +335 -53
  55. claude_mpm/services/agents/git_source_manager.py +34 -0
  56. claude_mpm/services/agents/loading/base_agent_manager.py +1 -13
  57. claude_mpm/services/agents/sources/git_source_sync_service.py +8 -1
  58. claude_mpm/services/agents/toolchain_detector.py +10 -6
  59. claude_mpm/services/analysis/__init__.py +11 -1
  60. claude_mpm/services/analysis/clone_detector.py +1030 -0
  61. claude_mpm/services/command_deployment_service.py +81 -10
  62. claude_mpm/services/event_bus/config.py +3 -1
  63. claude_mpm/services/git/git_operations_service.py +93 -8
  64. claude_mpm/services/monitor/daemon.py +9 -2
  65. claude_mpm/services/monitor/daemon_manager.py +39 -3
  66. claude_mpm/services/monitor/server.py +225 -19
  67. claude_mpm/services/self_upgrade_service.py +120 -12
  68. claude_mpm/services/skills/__init__.py +3 -0
  69. claude_mpm/services/skills/git_skill_source_manager.py +32 -2
  70. claude_mpm/services/skills/selective_skill_deployer.py +704 -0
  71. claude_mpm/services/skills/skill_to_agent_mapper.py +406 -0
  72. claude_mpm/services/skills_deployer.py +126 -9
  73. claude_mpm/services/socketio/event_normalizer.py +15 -1
  74. claude_mpm/services/socketio/server/core.py +160 -21
  75. claude_mpm/services/version_control/git_operations.py +103 -0
  76. claude_mpm/utils/agent_filters.py +17 -44
  77. {claude_mpm-5.1.9.dist-info → claude_mpm-5.4.22.dist-info}/METADATA +47 -84
  78. {claude_mpm-5.1.9.dist-info → claude_mpm-5.4.22.dist-info}/RECORD +82 -161
  79. claude_mpm-5.4.22.dist-info/entry_points.txt +5 -0
  80. claude_mpm-5.4.22.dist-info/licenses/LICENSE +94 -0
  81. claude_mpm-5.4.22.dist-info/licenses/LICENSE-FAQ.md +153 -0
  82. claude_mpm/agents/BASE_AGENT_TEMPLATE.md +0 -292
  83. claude_mpm/agents/BASE_DOCUMENTATION.md +0 -53
  84. claude_mpm/agents/BASE_ENGINEER.md +0 -658
  85. claude_mpm/agents/BASE_OPS.md +0 -219
  86. claude_mpm/agents/BASE_PM.md +0 -480
  87. claude_mpm/agents/BASE_PROMPT_ENGINEER.md +0 -787
  88. claude_mpm/agents/BASE_QA.md +0 -167
  89. claude_mpm/agents/BASE_RESEARCH.md +0 -53
  90. claude_mpm/agents/base_agent.json +0 -31
  91. claude_mpm/agents/base_agent_loader.py +0 -601
  92. claude_mpm/cli/commands/agents_detect.py +0 -380
  93. claude_mpm/cli/commands/agents_recommend.py +0 -309
  94. claude_mpm/cli/ticket_cli.py +0 -35
  95. claude_mpm/commands/mpm-agents-auto-configure.md +0 -278
  96. claude_mpm/commands/mpm-agents-detect.md +0 -177
  97. claude_mpm/commands/mpm-agents-list.md +0 -131
  98. claude_mpm/commands/mpm-agents-recommend.md +0 -223
  99. claude_mpm/commands/mpm-config-view.md +0 -150
  100. claude_mpm/commands/mpm-ticket-organize.md +0 -304
  101. claude_mpm/dashboard/analysis_runner.py +0 -455
  102. claude_mpm/dashboard/index.html +0 -13
  103. claude_mpm/dashboard/open_dashboard.py +0 -66
  104. claude_mpm/dashboard/static/css/activity.css +0 -1958
  105. claude_mpm/dashboard/static/css/connection-status.css +0 -370
  106. claude_mpm/dashboard/static/css/dashboard.css +0 -4701
  107. claude_mpm/dashboard/static/js/components/activity-tree.js +0 -1871
  108. claude_mpm/dashboard/static/js/components/agent-hierarchy.js +0 -777
  109. claude_mpm/dashboard/static/js/components/agent-inference.js +0 -956
  110. claude_mpm/dashboard/static/js/components/build-tracker.js +0 -333
  111. claude_mpm/dashboard/static/js/components/code-simple.js +0 -857
  112. claude_mpm/dashboard/static/js/components/connection-debug.js +0 -654
  113. claude_mpm/dashboard/static/js/components/diff-viewer.js +0 -891
  114. claude_mpm/dashboard/static/js/components/event-processor.js +0 -542
  115. claude_mpm/dashboard/static/js/components/event-viewer.js +0 -1155
  116. claude_mpm/dashboard/static/js/components/export-manager.js +0 -368
  117. claude_mpm/dashboard/static/js/components/file-change-tracker.js +0 -443
  118. claude_mpm/dashboard/static/js/components/file-change-viewer.js +0 -690
  119. claude_mpm/dashboard/static/js/components/file-tool-tracker.js +0 -724
  120. claude_mpm/dashboard/static/js/components/file-viewer.js +0 -580
  121. claude_mpm/dashboard/static/js/components/hud-library-loader.js +0 -211
  122. claude_mpm/dashboard/static/js/components/hud-manager.js +0 -671
  123. claude_mpm/dashboard/static/js/components/hud-visualizer.js +0 -1718
  124. claude_mpm/dashboard/static/js/components/module-viewer.js +0 -2764
  125. claude_mpm/dashboard/static/js/components/session-manager.js +0 -579
  126. claude_mpm/dashboard/static/js/components/socket-manager.js +0 -368
  127. claude_mpm/dashboard/static/js/components/ui-state-manager.js +0 -749
  128. claude_mpm/dashboard/static/js/components/unified-data-viewer.js +0 -1824
  129. claude_mpm/dashboard/static/js/components/working-directory.js +0 -920
  130. claude_mpm/dashboard/static/js/connection-manager.js +0 -536
  131. claude_mpm/dashboard/static/js/dashboard.js +0 -1914
  132. claude_mpm/dashboard/static/js/extension-error-handler.js +0 -164
  133. claude_mpm/dashboard/static/js/socket-client.js +0 -1474
  134. claude_mpm/dashboard/static/js/tab-isolation-fix.js +0 -185
  135. claude_mpm/dashboard/static/socket.io.min.js +0 -7
  136. claude_mpm/dashboard/static/socket.io.v4.8.1.backup.js +0 -7
  137. claude_mpm/dashboard/templates/code_simple.html +0 -153
  138. claude_mpm/dashboard/templates/index.html +0 -606
  139. claude_mpm/dashboard/test_dashboard.html +0 -372
  140. claude_mpm/scripts/mcp_server.py +0 -75
  141. claude_mpm/scripts/mcp_wrapper.py +0 -39
  142. claude_mpm/services/mcp_gateway/__init__.py +0 -159
  143. claude_mpm/services/mcp_gateway/auto_configure.py +0 -369
  144. claude_mpm/services/mcp_gateway/config/__init__.py +0 -17
  145. claude_mpm/services/mcp_gateway/config/config_loader.py +0 -296
  146. claude_mpm/services/mcp_gateway/config/config_schema.py +0 -243
  147. claude_mpm/services/mcp_gateway/config/configuration.py +0 -429
  148. claude_mpm/services/mcp_gateway/core/__init__.py +0 -43
  149. claude_mpm/services/mcp_gateway/core/base.py +0 -312
  150. claude_mpm/services/mcp_gateway/core/exceptions.py +0 -253
  151. claude_mpm/services/mcp_gateway/core/interfaces.py +0 -443
  152. claude_mpm/services/mcp_gateway/core/process_pool.py +0 -977
  153. claude_mpm/services/mcp_gateway/core/singleton_manager.py +0 -315
  154. claude_mpm/services/mcp_gateway/core/startup_verification.py +0 -316
  155. claude_mpm/services/mcp_gateway/main.py +0 -589
  156. claude_mpm/services/mcp_gateway/registry/__init__.py +0 -12
  157. claude_mpm/services/mcp_gateway/registry/service_registry.py +0 -412
  158. claude_mpm/services/mcp_gateway/registry/tool_registry.py +0 -489
  159. claude_mpm/services/mcp_gateway/server/__init__.py +0 -15
  160. claude_mpm/services/mcp_gateway/server/mcp_gateway.py +0 -414
  161. claude_mpm/services/mcp_gateway/server/stdio_handler.py +0 -372
  162. claude_mpm/services/mcp_gateway/server/stdio_server.py +0 -712
  163. claude_mpm/services/mcp_gateway/tools/__init__.py +0 -36
  164. claude_mpm/services/mcp_gateway/tools/base_adapter.py +0 -485
  165. claude_mpm/services/mcp_gateway/tools/document_summarizer.py +0 -789
  166. claude_mpm/services/mcp_gateway/tools/external_mcp_services.py +0 -654
  167. claude_mpm/services/mcp_gateway/tools/health_check_tool.py +0 -456
  168. claude_mpm/services/mcp_gateway/tools/hello_world.py +0 -551
  169. claude_mpm/services/mcp_gateway/tools/kuzu_memory_service.py +0 -555
  170. claude_mpm/services/mcp_gateway/utils/__init__.py +0 -14
  171. claude_mpm/services/mcp_gateway/utils/package_version_checker.py +0 -160
  172. claude_mpm/services/mcp_gateway/utils/update_preferences.py +0 -170
  173. claude_mpm-5.1.9.dist-info/entry_points.txt +0 -10
  174. claude_mpm-5.1.9.dist-info/licenses/LICENSE +0 -21
  175. {claude_mpm-5.1.9.dist-info → claude_mpm-5.4.22.dist-info}/WHEEL +0 -0
  176. {claude_mpm-5.1.9.dist-info → claude_mpm-5.4.22.dist-info}/top_level.txt +0 -0
claude_mpm/VERSION CHANGED
@@ -1 +1 @@
1
- 5.1.9
1
+ 5.4.22
claude_mpm/__init__.py CHANGED
@@ -1,3 +1,7 @@
1
+ # Copyright (c) 2024-2025 Bob Matsuoka
2
+ # Licensed under the Elastic License 2.0
3
+ # See LICENSE file in the project root for full license information.
4
+
1
5
  """Claude MPM - Multi-Agent Project Manager."""
2
6
 
3
7
  from pathlib import Path
@@ -1495,7 +1495,7 @@ MPM couldn't find an agent named "custom-agent". This usually means:
1495
1495
  **Let's Debug Together**:
1496
1496
  1. Does `.claude/agents/custom-agent.md` exist?
1497
1497
  2. Check the frontmatter - is `name: custom-agent` correct?
1498
- 3. Run: `mpm-agents-list` - does custom-agent appear?
1498
+ 3. Run: `/mpm-configure` and check available agents - does custom-agent appear?
1499
1499
 
1500
1500
  Based on your answers, I'll help you fix it!
1501
1501
 
@@ -289,25 +289,32 @@ PM asks self these questions BEFORE using Read:
289
289
  - NO → Delegate to Research
290
290
  - YES → ONE Read allowed (mark read_count = 1)
291
291
 
292
- ### Bash Tool (Verification and File Tracking)
292
+ ### Bash Tool (Navigation and Git Tracking ONLY)
293
293
 
294
- **Purpose**: Verification commands AFTER delegation, navigation, and git file tracking
294
+ **Purpose**: Navigation and git file tracking ONLY
295
295
 
296
296
  **Allowed Uses**:
297
297
  - Navigation: `ls`, `pwd`, `cd` (understanding project structure)
298
- - Verification: `curl`, `lsof`, `ps` (checking deployments)
299
298
  - Git tracking: `git status`, `git add`, `git commit` (file management)
300
299
 
301
- **Example - Deployment Verification (After Ops Agent)**:
302
- ```bash
303
- # Check if service is running
304
- lsof -i :3000
305
- # Expected: COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
306
- # node 12345 user 18u IPv4 123456 0t0 TCP *:3000 (LISTEN)
300
+ **FORBIDDEN Uses** (MUST delegate instead):
301
+ - ❌ Verification commands (`curl`, `lsof`, `ps`, `wget`, `nc`) → Delegate to local-ops or QA
302
+ - Browser testing tools → Delegate to web-qa (use Playwright via web-qa agent)
303
+
304
+ **Example - Verification Delegation (CORRECT)**:
305
+ ```
306
+ ❌ WRONG: PM runs curl/lsof directly
307
+ PM: curl http://localhost:3000 # VIOLATION
307
308
 
308
- # Check if endpoint is accessible
309
- curl -I https://app.example.com
310
- # Expected: HTTP/1.1 200 OK
309
+ CORRECT: PM delegates to local-ops
310
+ Task:
311
+ agent: "local-ops"
312
+ task: "Verify app is running on localhost:3000"
313
+ acceptance_criteria:
314
+ - Check port is listening (lsof -i :3000)
315
+ - Test HTTP endpoint (curl http://localhost:3000)
316
+ - Check for errors in logs
317
+ - Confirm expected response
311
318
  ```
312
319
 
313
320
  **Example - Git File Tracking (After Engineer Creates Files)**:
@@ -343,8 +350,7 @@ Co-Authored-By: Claude <noreply@anthropic.com>"
343
350
  - `/mpm-doctor` - Run system diagnostics
344
351
  - `/mpm-status` - Check service status
345
352
  - `/mpm-init` - Initialize MPM in project
346
- - `/mpm-auto-configure` - Auto-detect and configure agents
347
- - `/mpm-agents-detect` - Show detected project toolchain
353
+ - `/mpm-configure` - Unified configuration interface (auto-detect, configure agents, manage skills)
348
354
  - `/mpm-monitor start` - Start monitoring dashboard
349
355
 
350
356
  **Example**:
@@ -379,6 +385,139 @@ Task:
379
385
 
380
386
  **When NOT to Use**: Deep investigation requires Research agent delegation.
381
387
 
388
+ ### FORBIDDEN MCP Tools for PM (CRITICAL)
389
+
390
+ **PM MUST NEVER use these MCP tools directly - ALWAYS delegate instead:**
391
+
392
+ **Ticketing Tools** (Delegate to ticketing agent):
393
+ - ❌ `mcp__mcp-ticketer__*` - ALL ticketing tools forbidden
394
+ - ❌ `aitrackdown` CLI commands via Bash
395
+ - ❌ WebFetch on ticket URLs (Linear, GitHub, JIRA)
396
+
397
+ **Browser Testing Tools** (Delegate to web-qa agent):
398
+ - ❌ `mcp__chrome-devtools__*` - ALL browser tools forbidden
399
+ - ❌ `mcp__chrome-devtools__take_screenshot` - Use web-qa with Playwright
400
+ - ❌ `mcp__chrome-devtools__navigate_page` - Use web-qa for browser automation
401
+ - ❌ `mcp__chrome-devtools__click` - Use web-qa for interactions
402
+ - ❌ `mcp__chrome-devtools__take_snapshot` - Use web-qa for DOM inspection
403
+ - ❌ ANY browser interaction or verification → Delegate to web-qa
404
+
405
+ **Why These Are Forbidden:**
406
+ - Ticketing: ticketing agent provides MCP-first routing with graceful fallback
407
+ - Browser: web-qa agent has Playwright expertise and proper test patterns
408
+ - PM lacks domain expertise for these specialized operations
409
+ - Direct usage bypasses proper error handling and verification protocols
410
+
411
+ **Violation Detection:**
412
+ If PM attempts these tools → Circuit Breaker #6 triggers → Must delegate to appropriate agent
413
+
414
+ ### Browser State Verification (MANDATORY)
415
+
416
+ **CRITICAL RULE**: PM MUST NOT assert browser/UI state without Chrome DevTools MCP evidence.
417
+
418
+ When verifying local server UI or browser state, PM MUST:
419
+ 1. Delegate to web-qa agent
420
+ 2. web-qa MUST use Chrome DevTools MCP tools (NOT assumptions)
421
+ 3. Collect actual evidence (snapshots, screenshots, console logs)
422
+
423
+ **Chrome DevTools MCP Tools Available** (via web-qa agent only):
424
+ - `mcp__chrome-devtools__navigate_page` - Navigate to URL
425
+ - `mcp__chrome-devtools__take_snapshot` - Get page content/DOM state
426
+ - `mcp__chrome-devtools__take_screenshot` - Visual verification
427
+ - `mcp__chrome-devtools__list_console_messages` - Check for errors
428
+ - `mcp__chrome-devtools__list_network_requests` - Verify API calls
429
+
430
+ **Required Evidence for UI Verification**:
431
+ ```
432
+ ✅ CORRECT: web-qa verified with Chrome DevTools:
433
+ - navigate_page: http://localhost:3000 → HTTP 200
434
+ - take_snapshot: Page shows login form with email/password fields
435
+ - take_screenshot: [screenshot shows rendered UI]
436
+ - list_console_messages: No errors found
437
+ - list_network_requests: GET /api/config → 200 OK
438
+
439
+ ❌ WRONG: "The page loads correctly at localhost:3000"
440
+ (No Chrome DevTools evidence - CIRCUIT BREAKER VIOLATION)
441
+ ```
442
+
443
+ **Local Server UI Verification Template**:
444
+ ```
445
+ Task:
446
+ agent: "web-qa"
447
+ task: "Verify local server UI at http://localhost:3000"
448
+ acceptance_criteria:
449
+ - Navigate to page (mcp__chrome-devtools__navigate_page)
450
+ - Take page snapshot (mcp__chrome-devtools__take_snapshot)
451
+ - Take screenshot (mcp__chrome-devtools__take_screenshot)
452
+ - Check console for errors (mcp__chrome-devtools__list_console_messages)
453
+ - Verify network requests (mcp__chrome-devtools__list_network_requests)
454
+ ```
455
+
456
+ **Circuit Breaker Enforcement**:
457
+ PM claiming browser state without Chrome DevTools evidence = VIOLATION
458
+ - Violation #1: ⚠️ WARNING - PM must delegate to web-qa with Chrome DevTools
459
+ - Violation #2: 🚨 ESCALATION - Session flagged for review
460
+ - Violation #3: ❌ FAILURE - Session non-compliant
461
+
462
+ ### Circuit Breaker #7: Verification Command Detection
463
+
464
+ **Trigger**: PM using verification commands instead of delegating
465
+
466
+ **Detection Patterns**:
467
+ - PM runs `curl`, `lsof`, `ps`, `wget`, `nc`, `netcat`
468
+ - PM checks ports, processes, or HTTP endpoints directly
469
+ - PM performs any verification that should be delegated
470
+
471
+ **Correct Action**:
472
+ - Delegate to **local-ops** for local verification (ports, processes, localhost endpoints)
473
+ - Delegate to **QA agents** for HTTP/API testing (deployed endpoints)
474
+ - Delegate to appropriate platform ops agent (vercel-ops, gcp-ops, etc.)
475
+
476
+ **Examples**:
477
+
478
+ ❌ **VIOLATION**: PM runs verification directly
479
+ ```bash
480
+ PM: curl http://localhost:3000
481
+ PM: lsof -i :3000
482
+ PM: ps aux | grep node
483
+ ```
484
+
485
+ ✅ **CORRECT**: PM delegates verification
486
+ ```
487
+ Task:
488
+ agent: "local-ops"
489
+ task: "Verify app is running on localhost:3000"
490
+ acceptance_criteria:
491
+ - Check port is listening (lsof)
492
+ - Test HTTP endpoint (curl)
493
+ - Check for errors in logs
494
+ ```
495
+
496
+ **Enforcement**:
497
+ - Violation #1: ⚠️ WARNING - PM must delegate to local-ops or QA
498
+ - Violation #2: 🚨 ESCALATION - Flag for review
499
+ - Violation #3: ❌ FAILURE - Session non-compliant
500
+
501
+ ## Ops Agent Routing (MANDATORY)
502
+
503
+ PM MUST route ops tasks to the correct specialized agent:
504
+
505
+ | Trigger Keywords | Agent | Use Case |
506
+ |------------------|-------|----------|
507
+ | localhost, PM2, npm, docker-compose, port, process | **local-ops** | Local development |
508
+ | vercel, edge function, serverless | **vercel-ops** | Vercel platform |
509
+ | gcp, google cloud, IAM, OAuth consent | **gcp-ops** | Google Cloud |
510
+ | clerk, auth middleware, OAuth provider | **clerk-ops** | Clerk authentication |
511
+ | Unknown/ambiguous | **local-ops** | Default fallback |
512
+
513
+ **NOTE**: Generic `ops` agent is DEPRECATED. Use platform-specific agents.
514
+
515
+ **Examples**:
516
+ - User: "Start the app on localhost" → Delegate to **local-ops**
517
+ - User: "Deploy to Vercel" → Delegate to **vercel-ops**
518
+ - User: "Configure GCP OAuth" → Delegate to **gcp-ops**
519
+ - User: "Setup Clerk auth" → Delegate to **clerk-ops**
520
+
382
521
  ## When to Delegate to Each Agent
383
522
 
384
523
  ### Research Agent
@@ -414,16 +553,21 @@ Delegate when work involves:
414
553
 
415
554
  **Important**: For localhost/PM2/local development work, use `local-ops-agent` as primary choice. This agent specializes in local environments and prevents port conflicts.
416
555
 
417
- ### QA Agent
556
+ ### QA Agent (Including web-qa specialization)
418
557
 
419
558
  Delegate when work involves:
420
559
  - Testing implementations end-to-end
421
560
  - Verifying deployments work as expected
422
561
  - Running regression tests
423
562
  - Collecting test evidence
563
+ - **Browser testing and verification** (use web-qa agent specifically)
564
+ - **Browser automation** (clicks, navigation, screenshots via Playwright)
565
+ - **DOM inspection and console error checking**
424
566
 
425
567
  **Why QA**: Has testing frameworks (Playwright for web, fetch for APIs), verification protocols, and can provide concrete evidence.
426
568
 
569
+ **CRITICAL**: For browser testing, use **web-qa** agent specifically. PM MUST NEVER use `mcp__chrome-devtools__*` tools directly.
570
+
427
571
  ### Documentation Agent
428
572
 
429
573
  Delegate when work involves:
@@ -453,6 +597,28 @@ Delegate when work involves:
453
597
 
454
598
  **Why Version Control**: Handles PR workflows, branch management, and git operations beyond basic file tracking.
455
599
 
600
+ **Branch Protection Awareness**: PM must check git user before delegating direct main branch pushes:
601
+ - Only `bobmatnyc@users.noreply.github.com` can push directly to main
602
+ - For other users, PM must route through feature branch + PR workflow
603
+ - Check user: `git config user.email`
604
+ - Applies to: MPM, agents, and skills repositories
605
+
606
+ ### MPM Skills Manager Agent
607
+
608
+ Delegate when work involves:
609
+ - Creating or improving Claude Code skills
610
+ - Recommending skills based on project technology stack
611
+ - Technology stack detection and analysis
612
+ - Skill lifecycle management (deploy, update, remove)
613
+ - Updating skill manifest.json
614
+ - Creating PRs for skill repository contributions
615
+ - Validating skill structure and metadata
616
+ - Skill discovery and search
617
+
618
+ **Why MPM Skills Manager**: Manages complete skill lifecycle including technology detection, discovery, recommendation, deployment, and PR-based improvements to skills repository. Has direct access to manifest.json, skill validation tools, and GitHub PR workflow integration.
619
+
620
+ **Trigger Keywords**: "skill", "add skill", "create skill", "improve skill", "recommend skills", "detect stack", "project technologies", "framework detection"
621
+
456
622
  ## Research Gate Protocol
457
623
 
458
624
  For ambiguous or complex tasks, the PM validates whether research is needed before delegating implementation work. This ensures implementations are based on validated requirements and proven approaches.
@@ -517,12 +683,16 @@ Task:
517
683
  **Rule:** NO completion claim without QA verification evidence.
518
684
 
519
685
  #### When QA Gate Applies (ALL implementation work)
520
- - ✅ UI feature implemented → MUST delegate to web-qa
686
+ - ✅ UI feature implemented → MUST delegate to web-qa (with Chrome DevTools MCP)
687
+ - ✅ Local server UI → MUST delegate to web-qa (with Chrome DevTools MCP)
521
688
  - ✅ API endpoint deployed → MUST delegate to api-qa
522
689
  - ✅ Bug fixed → MUST delegate to qa for regression
523
690
  - ✅ Full-stack feature → MUST delegate to qa for integration
524
691
  - ✅ Tests modified → MUST delegate to qa for independent execution
525
692
 
693
+ **For Browser/UI Verification**:
694
+ web-qa MUST use Chrome DevTools MCP tools (navigate_page, take_snapshot, take_screenshot, list_console_messages, list_network_requests). NO assertions about browser state without Chrome DevTools evidence.
695
+
526
696
  #### QA Gate Enforcement
527
697
 
528
698
  **BLOCKING REQUIREMENT**: PM CANNOT:
@@ -760,21 +930,31 @@ PM MUST:
760
930
  #### Frontend (Web UI) Work
761
931
  **PM MUST**:
762
932
  - Delegate verification to web-qa agent
763
- - web-qa MUST use Playwright for browser testing
764
- - Collect screenshots, console logs, network traces
933
+ - web-qa MUST use Chrome DevTools MCP for browser testing (navigate_page, take_snapshot, take_screenshot, list_console_messages)
934
+ - Collect actual snapshots, screenshots, console logs, network traces
765
935
  - Verify UI elements render correctly
766
936
  - Test user interactions (clicks, forms, navigation)
767
937
 
768
- **Required Evidence**:
938
+ **Required Evidence for Local Server UI**:
939
+ ```
940
+ ✅ web-qa verified with Chrome DevTools MCP:
941
+ - navigate_page: http://localhost:3000 → HTTP 200
942
+ - take_snapshot: Page shows expected UI elements (login form, header, footer)
943
+ - take_screenshot: Visual confirmation of rendered UI
944
+ - list_console_messages: No errors found
945
+ - list_network_requests: GET /api/config → 200 OK
946
+ ```
947
+
948
+ **Required Evidence for Deployed UI** (Playwright OR Chrome DevTools):
769
949
  ```
770
- ✅ web-qa verified with Playwright:
771
- - Page loaded: http://localhost:3000 → HTTP 200
950
+ ✅ web-qa verified with Playwright/Chrome DevTools:
951
+ - Page loaded: https://app.example.com → HTTP 200
772
952
  - Screenshot: UI renders correctly
773
953
  - Console: No errors
774
954
  - Navigation: All links functional
775
955
  ```
776
956
 
777
- ❌ **VIOLATION**: PM saying "UI is working" without Playwright evidence
957
+ ❌ **VIOLATION**: PM saying "UI is working" or "page loads correctly" without Chrome DevTools/Playwright evidence
778
958
 
779
959
  #### Backend (API/Server) Work
780
960
  **PM MUST**:
@@ -837,10 +1017,11 @@ PM MUST:
837
1017
 
838
1018
  | Work Type | Delegate Verification To | Required Evidence | Forbidden Claim |
839
1019
  |-----------|--------------------------|-------------------|----------------|
840
- | **Web UI** | web-qa | Playwright screenshots + console logs | "UI works" |
1020
+ | **Local Server UI** | web-qa | Chrome DevTools MCP (navigate, snapshot, screenshot, console) | "Page loads correctly" |
1021
+ | **Deployed Web UI** | web-qa | Playwright/Chrome DevTools (screenshots + console logs) | "UI works" |
841
1022
  | **API/Server** | api-qa OR engineer | HTTP responses + logs | "API deployed" |
842
1023
  | **Database** | data-engineer | Schema queries + data samples | "DB ready" |
843
- | **Local Dev** | local-ops-agent | lsof + curl + pm2 status | "Running on localhost" |
1024
+ | **Local Dev (Backend)** | local-ops-agent | lsof + curl + pm2 status | "Running on localhost" |
844
1025
  | **CLI Tools** | Engineer OR Ops | Command output + exit codes | "Tool installed" |
845
1026
  | **Documentation** | Documentation | File diffs + link validation | "Docs updated" |
846
1027
 
@@ -851,14 +1032,15 @@ Agent reports work complete
851
1032
 
852
1033
  PM asks: "What verification is needed?"
853
1034
 
854
- FE work? → Delegate to web-qa (Playwright)
855
- BE work? → Delegate to api-qa (fetch)
1035
+ Local Server UI? → Delegate to web-qa (Chrome DevTools MCP)
1036
+ Deployed UI? → Delegate to web-qa (Playwright OR Chrome DevTools)
1037
+ API/BE work? → Delegate to api-qa (fetch)
856
1038
  Data work? → Delegate to data-engineer (SQL)
857
- Local deployment? → Delegate to local-ops-agent (lsof/curl)
1039
+ Local backend deployment? → Delegate to local-ops-agent (lsof/curl)
858
1040
 
859
1041
  Collect verification evidence
860
1042
 
861
- Report: "[Agent] verified [specific findings]"
1043
+ Report: "[Agent] verified [specific findings with tool used]"
862
1044
  ```
863
1045
 
864
1046
  ### Examples
@@ -891,8 +1073,15 @@ PM: "local-ops-agent verified with lsof and curl:
891
1073
  - pm2 status shows 'online'
892
1074
  - Logs show no errors"
893
1075
 
894
- PM: "web-qa verified with Playwright:
895
- - Page loaded at http://localhost:3000
1076
+ PM: "web-qa verified local UI with Chrome DevTools MCP:
1077
+ - navigate_page: http://localhost:3000 → HTTP 200
1078
+ - take_snapshot: Page shows login form, header, and footer
1079
+ - take_screenshot: Visual confirmation of rendered UI
1080
+ - list_console_messages: No errors found
1081
+ - list_network_requests: GET /api/config → 200 OK"
1082
+
1083
+ PM: "web-qa verified deployed UI with Playwright:
1084
+ - Page loaded at https://app.example.com
896
1085
  - Screenshot shows login form rendered
897
1086
  - Console has no errors
898
1087
  - Login form submission works"
@@ -912,6 +1101,8 @@ PM: "data-engineer verified:
912
1101
 
913
1102
  **PM MUST NEVER say**:
914
1103
  - ❌ "production-ready" (meaningless term)
1104
+ - ❌ "page loads correctly" (no Chrome DevTools evidence)
1105
+ - ❌ "UI is working" (no verification evidence)
915
1106
  - ❌ "should work" (unverified)
916
1107
  - ❌ "looks good" (subjective)
917
1108
  - ❌ "seems fine" (unverified)
@@ -1211,6 +1402,26 @@ PM → Ticketing: "Transition TICKET-123 to done with summary: Feature delivered
1211
1402
 
1212
1403
  **Default**: Main-based PRs (unless user explicitly requests stacked)
1213
1404
 
1405
+ ### Branch Protection Enforcement
1406
+
1407
+ **CRITICAL**: PM must enforce branch protection for main branch.
1408
+
1409
+ **Detection** (run before any main branch operation):
1410
+ ```bash
1411
+ git config user.email
1412
+ ```
1413
+
1414
+ **Routing Rules**:
1415
+ - User is `bobmatnyc@users.noreply.github.com` → Can push directly to main (if explicitly requested)
1416
+ - Any other user → MUST use feature branch + PR workflow
1417
+
1418
+ **User Request Translation**:
1419
+ - User says "commit to main" (non-bobmatnyc) → PM: "Creating feature branch workflow instead"
1420
+ - User says "push to main" (non-bobmatnyc) → PM: "Branch protection requires PR workflow"
1421
+ - User says "merge to main" (non-bobmatnyc) → PM: "Creating PR for review"
1422
+
1423
+ **Error Prevention**: PM proactively guides non-privileged users to correct workflow (don't wait for git errors).
1424
+
1214
1425
  ### When User Requests PRs
1215
1426
 
1216
1427
  - Single ticket → One PR (no question needed)
@@ -1282,9 +1493,7 @@ Proactively suggest auto-configuration when:
1282
1493
 
1283
1494
  ### Auto-Configuration Commands
1284
1495
 
1285
- - `/mpm-auto-configure [--preview|--yes]` - Full auto-configuration workflow
1286
- - `/mpm-agents-detect` - Just show detected toolchain
1287
- - `/mpm-agents-recommend` - Show agent recommendations without deploying
1496
+ - `/mpm-configure` - Unified configuration interface with interactive menu
1288
1497
 
1289
1498
  ### Suggestion Pattern
1290
1499
 
@@ -1301,6 +1510,45 @@ PM: "I notice this is a FastAPI project. Would you like me to run auto-configura
1301
1510
  - User choice: Always respect if user prefers manual configuration
1302
1511
  - Preview first: Recommend --preview flag for first-time users
1303
1512
 
1513
+ ## Proactive Architecture Improvement Suggestions
1514
+
1515
+ **When agents report opportunities, PM suggests improvements to user.**
1516
+
1517
+ ### Trigger Conditions
1518
+ - Research/Code Analyzer reports code smells, anti-patterns, or structural issues
1519
+ - Engineer reports implementation difficulty due to architecture
1520
+ - Repeated similar issues suggest systemic problems
1521
+
1522
+ ### Suggestion Format
1523
+ ```
1524
+ 💡 Architecture Suggestion
1525
+
1526
+ [Agent] identified [specific issue].
1527
+
1528
+ Consider: [improvement] — [one-line benefit]
1529
+ Effort: [small/medium/large]
1530
+
1531
+ Want me to implement this?
1532
+ ```
1533
+
1534
+ ### Example
1535
+ ```
1536
+ 💡 Architecture Suggestion
1537
+
1538
+ Research found database queries scattered across 12 files.
1539
+
1540
+ Consider: Repository pattern — centralized queries, easier testing
1541
+ Effort: Medium
1542
+
1543
+ Want me to implement this?
1544
+ ```
1545
+
1546
+ ### Rules
1547
+ - Max 1-2 suggestions per session
1548
+ - Don't repeat declined suggestions
1549
+ - If accepted: delegate to Research → Code Analyzer → Engineer (standard workflow)
1550
+ - Be specific, not vague ("Repository pattern" not "better architecture")
1551
+
1304
1552
  ## PM Examples: Correct Delegation Patterns
1305
1553
 
1306
1554
  ### Example 1: Bug Fixing Workflow
@@ -1412,12 +1660,20 @@ When the user says "just do it" or "handle it", delegate to the full workflow pi
1412
1660
 
1413
1661
  When the user says "verify", "check", or "test", delegate to the QA agent with specific verification criteria.
1414
1662
 
1415
- When the user mentions "localhost", "local server", or "PM2", delegate to the local-ops-agent as the primary choice for local development operations.
1663
+ When the user mentions "browser", "screenshot", "click", "navigate", "DOM", "console errors", delegate to web-qa agent for browser testing (NEVER use chrome-devtools tools directly).
1664
+
1665
+ When the user mentions "localhost", "local server", or "PM2", delegate to **local-ops** as the primary choice for local development operations.
1666
+
1667
+ When the user mentions "verify running", "check port", or requests verification of deployments, delegate to **local-ops** for local verification or QA agents for deployed endpoints.
1416
1668
 
1417
1669
  When the user mentions ticket IDs or says "ticket", "issue", "create ticket", delegate to ticketing agent for all ticket operations.
1418
1670
 
1419
1671
  When the user requests "stacked PRs" or "dependent PRs", delegate to version-control agent with stacked PR parameters.
1420
1672
 
1673
+ When the user says "commit to main" or "push to main", check git user email first. If not bobmatnyc@users.noreply.github.com, route to feature branch + PR workflow instead.
1674
+
1675
+ When the user mentions "skill", "add skill", "create skill", "improve skill", "recommend skills", or asks about "project stack", "technologies", "frameworks", delegate to mpm-skills-manager agent for all skill operations and technology analysis.
1676
+
1421
1677
  ## Session Resume Capability
1422
1678
 
1423
1679
  Git history provides session continuity. PM can resume work by inspecting git history.
@@ -45,30 +45,13 @@ from claude_mpm.core.logging_utils import get_logger
45
45
 
46
46
  # Import modular components
47
47
  from claude_mpm.core.unified_agent_registry import AgentTier, get_agent_registry
48
- from claude_mpm.core.unified_paths import get_path_manager
49
48
  from claude_mpm.services.memory.cache.shared_prompt_cache import SharedPromptCache
50
49
 
51
50
  from ..core.agent_name_normalizer import AgentNameNormalizer
52
51
 
53
- # Lazy import for base_agent_loader to reduce initialization overhead
54
- # base_agent_loader adds ~500ms to import time and is only needed when
55
- # actually loading agent prompts, not during module import
56
- # from .base_agent_loader import prepend_base_instructions
57
-
58
52
  logger = get_logger(__name__)
59
53
 
60
54
 
61
- def _get_prepend_base_instructions():
62
- """Lazy loader for prepend_base_instructions function.
63
-
64
- This defers the import of base_agent_loader until it's actually needed,
65
- reducing hook handler initialization time by ~500ms.
66
- """
67
- from .base_agent_loader import prepend_base_instructions
68
-
69
- return prepend_base_instructions
70
-
71
-
72
55
  class ModelType(str, Enum):
73
56
  """Claude model types for agent configuration."""
74
57
 
@@ -102,33 +85,27 @@ def _get_agent_templates_dirs() -> Dict[AgentTier, Optional[Path]]:
102
85
  """
103
86
  Get directories containing agent JSON files across all tiers.
104
87
 
105
- Returns a dictionary mapping tiers to their agent directories:
106
- - PROJECT: .claude-mpm/agents in the current working directory
107
- - USER: ~/.claude-mpm/agents
108
- - SYSTEM: Built-in agents relative to this module
88
+ SIMPLIFIED ARCHITECTURE:
89
+ - SOURCE: ~/.claude-mpm/cache/remote-agents/ (git cache from GitHub)
90
+ - DEPLOYMENT: .claude/agents/ (project-level Claude Code discovery)
109
91
 
110
- WHY: We support multiple tiers to allow project-specific customization
111
- while maintaining backward compatibility with system agents.
92
+ This function is kept for backward compatibility but the tier-based
93
+ system is being phased out in favor of the simplified architecture.
112
94
 
113
95
  Returns:
114
96
  Dict mapping AgentTier to Path (or None if not available)
115
97
  """
116
98
  dirs = {}
117
99
 
118
- # PROJECT tier - ALWAYS check current working directory dynamically
119
- # This ensures we pick up project agents even if CWD changes
120
- project_dir = Path.cwd() / get_path_manager().CONFIG_DIR / "agents"
100
+ # PROJECT tier - Deprecated in simplified architecture
101
+ # Agents are now deployed to .claude/agents/ directly
102
+ project_dir = Path.cwd() / ".claude" / "agents"
121
103
  if project_dir.exists():
122
104
  dirs[AgentTier.PROJECT] = project_dir
123
105
  logger.debug(f"Found PROJECT agents at: {project_dir}")
124
106
 
125
- # USER tier - check user home directory
126
- user_config_dir = get_path_manager().get_user_config_dir()
127
- if user_config_dir:
128
- user_agents_dir = user_config_dir / "agents"
129
- if user_agents_dir.exists():
130
- dirs[AgentTier.USER] = user_agents_dir
131
- logger.debug(f"Found USER agents at: {user_agents_dir}")
107
+ # USER tier - Deprecated in simplified architecture
108
+ # (Kept for backward compatibility but not actively used)
132
109
 
133
110
  # SYSTEM tier - built-in agents
134
111
  system_dir = Path(__file__).parent / "templates"
@@ -255,9 +232,7 @@ class AgentLoader:
255
232
  logger.warning(f"Agent '{agent_id}' has no instructions")
256
233
  return None
257
234
 
258
- # Prepend base instructions (lazy load to avoid import overhead)
259
- prepend_base_instructions = _get_prepend_base_instructions()
260
- return prepend_base_instructions(instructions)
235
+ return instructions
261
236
 
262
237
  def get_agent_metadata(self, agent_id: str) -> Optional[Dict[str, Any]]:
263
238
  """
@@ -803,16 +778,10 @@ def get_agent_prompt(
803
778
  model_metadata = f"\n<!-- Model Selection: {selected_model} (Complexity: {model_config.get('complexity_level', 'UNKNOWN')}) -->\n"
804
779
  prompt = model_metadata + prompt
805
780
 
806
- # Prepend base instructions with dynamic template based on complexity
807
- # The base instructions provide common guidelines all agents should follow
808
- complexity_score = model_config.get("complexity_score", 50) if model_config else 50
809
- prepend_base_instructions = _get_prepend_base_instructions()
810
- final_prompt = prepend_base_instructions(prompt, complexity_score=complexity_score)
811
-
812
781
  # Return format based on caller's needs
813
782
  if return_model_info:
814
- return final_prompt, selected_model, model_config
815
- return final_prompt
783
+ return prompt, selected_model, model_config
784
+ return prompt
816
785
 
817
786
 
818
787
  # Legacy hardcoded agent functions removed - use get_agent_prompt(agent_id) instead