claude-mpm 5.4.3__py3-none-any.whl → 5.4.21__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.
- claude_mpm/VERSION +1 -1
- claude_mpm/__init__.py +4 -0
- claude_mpm/agents/CLAUDE_MPM_TEACHER_OUTPUT_STYLE.md +1 -1
- claude_mpm/agents/PM_INSTRUCTIONS.md +166 -21
- claude_mpm/agents/agent_loader.py +3 -27
- claude_mpm/cli/__main__.py +4 -0
- claude_mpm/cli/chrome_devtools_installer.py +175 -0
- claude_mpm/cli/commands/agents.py +0 -31
- claude_mpm/cli/commands/auto_configure.py +210 -25
- claude_mpm/cli/commands/config.py +88 -2
- claude_mpm/cli/commands/configure.py +85 -43
- claude_mpm/cli/commands/configure_agent_display.py +3 -1
- claude_mpm/cli/commands/mpm_init/core.py +2 -45
- claude_mpm/cli/commands/skills.py +214 -189
- claude_mpm/cli/executor.py +3 -3
- claude_mpm/cli/parsers/agents_parser.py +0 -9
- claude_mpm/cli/parsers/auto_configure_parser.py +0 -138
- claude_mpm/cli/parsers/config_parser.py +153 -83
- claude_mpm/cli/parsers/skills_parser.py +3 -2
- claude_mpm/cli/startup.py +490 -41
- claude_mpm/commands/mpm-config.md +265 -0
- claude_mpm/commands/mpm-help.md +14 -95
- claude_mpm/commands/mpm-organize.md +350 -153
- claude_mpm/core/framework/formatters/content_formatter.py +3 -13
- claude_mpm/core/framework_loader.py +4 -2
- claude_mpm/core/logger.py +13 -0
- claude_mpm/hooks/claude_hooks/event_handlers.py +176 -76
- claude_mpm/hooks/claude_hooks/hook_handler.py +2 -0
- claude_mpm/hooks/claude_hooks/installer.py +33 -10
- claude_mpm/hooks/claude_hooks/memory_integration.py +26 -9
- claude_mpm/hooks/claude_hooks/response_tracking.py +2 -3
- claude_mpm/hooks/memory_integration_hook.py +46 -1
- claude_mpm/init.py +0 -19
- claude_mpm/scripts/claude-hook-handler.sh +58 -18
- claude_mpm/scripts/start_activity_logging.py +0 -0
- claude_mpm/services/agents/agent_recommendation_service.py +6 -7
- claude_mpm/services/agents/agent_review_service.py +280 -0
- claude_mpm/services/agents/deployment/agent_discovery_service.py +2 -3
- claude_mpm/services/agents/deployment/agent_template_builder.py +1 -0
- claude_mpm/services/agents/deployment/multi_source_deployment_service.py +78 -9
- claude_mpm/services/agents/deployment/remote_agent_discovery_service.py +13 -0
- claude_mpm/services/agents/git_source_manager.py +14 -0
- claude_mpm/services/agents/loading/base_agent_manager.py +1 -13
- claude_mpm/services/agents/toolchain_detector.py +6 -3
- claude_mpm/services/command_deployment_service.py +81 -8
- claude_mpm/services/git/git_operations_service.py +93 -8
- claude_mpm/services/self_upgrade_service.py +120 -12
- claude_mpm/services/skills/__init__.py +3 -0
- claude_mpm/services/skills/git_skill_source_manager.py +32 -2
- claude_mpm/services/skills/selective_skill_deployer.py +704 -0
- claude_mpm/services/skills/skill_to_agent_mapper.py +406 -0
- claude_mpm/services/skills_deployer.py +126 -9
- {claude_mpm-5.4.3.dist-info → claude_mpm-5.4.21.dist-info}/METADATA +47 -8
- {claude_mpm-5.4.3.dist-info → claude_mpm-5.4.21.dist-info}/RECORD +58 -82
- {claude_mpm-5.4.3.dist-info → claude_mpm-5.4.21.dist-info}/entry_points.txt +0 -3
- claude_mpm-5.4.21.dist-info/licenses/LICENSE +94 -0
- claude_mpm-5.4.21.dist-info/licenses/LICENSE-FAQ.md +153 -0
- claude_mpm/agents/BASE_AGENT_TEMPLATE.md +0 -292
- claude_mpm/agents/BASE_DOCUMENTATION.md +0 -53
- claude_mpm/agents/BASE_ENGINEER.md +0 -658
- claude_mpm/agents/BASE_OPS.md +0 -219
- claude_mpm/agents/BASE_PM.md +0 -480
- claude_mpm/agents/BASE_PROMPT_ENGINEER.md +0 -787
- claude_mpm/agents/BASE_QA.md +0 -167
- claude_mpm/agents/BASE_RESEARCH.md +0 -53
- claude_mpm/agents/base_agent.json +0 -31
- claude_mpm/agents/base_agent_loader.py +0 -601
- claude_mpm/cli/commands/agents_detect.py +0 -380
- claude_mpm/cli/commands/agents_recommend.py +0 -309
- claude_mpm/cli/ticket_cli.py +0 -35
- claude_mpm/commands/mpm-agents-auto-configure.md +0 -278
- claude_mpm/commands/mpm-agents-detect.md +0 -177
- claude_mpm/commands/mpm-agents-list.md +0 -131
- claude_mpm/commands/mpm-agents-recommend.md +0 -223
- claude_mpm/commands/mpm-config-view.md +0 -150
- claude_mpm/hooks/claude_hooks/__pycache__/__init__.cpython-313.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/correlation_manager.cpython-313.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/event_handlers.cpython-313.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/hook_handler.cpython-313.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/memory_integration.cpython-313.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/response_tracking.cpython-313.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/tool_analysis.cpython-313.pyc +0 -0
- claude_mpm/hooks/claude_hooks/services/__pycache__/__init__.cpython-313.pyc +0 -0
- claude_mpm/hooks/claude_hooks/services/__pycache__/connection_manager_http.cpython-313.pyc +0 -0
- claude_mpm/hooks/claude_hooks/services/__pycache__/duplicate_detector.cpython-313.pyc +0 -0
- claude_mpm/hooks/claude_hooks/services/__pycache__/state_manager.cpython-313.pyc +0 -0
- claude_mpm/hooks/claude_hooks/services/__pycache__/subagent_processor.cpython-313.pyc +0 -0
- claude_mpm-5.4.3.dist-info/licenses/LICENSE +0 -21
- {claude_mpm-5.4.3.dist-info → claude_mpm-5.4.21.dist-info}/WHEEL +0 -0
- {claude_mpm-5.4.3.dist-info → claude_mpm-5.4.21.dist-info}/top_level.txt +0 -0
claude_mpm/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
5.4.
|
|
1
|
+
5.4.21
|
claude_mpm/__init__.py
CHANGED
|
@@ -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:
|
|
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
|
|
|
@@ -298,6 +298,9 @@ PM asks self these questions BEFORE using Read:
|
|
|
298
298
|
- Verification: `curl`, `lsof`, `ps` (checking deployments)
|
|
299
299
|
- Git tracking: `git status`, `git add`, `git commit` (file management)
|
|
300
300
|
|
|
301
|
+
**FORBIDDEN Uses**:
|
|
302
|
+
- ❌ Browser testing tools → Delegate to web-qa (use Playwright via web-qa agent)
|
|
303
|
+
|
|
301
304
|
**Example - Deployment Verification (After Ops Agent)**:
|
|
302
305
|
```bash
|
|
303
306
|
# Check if service is running
|
|
@@ -343,8 +346,7 @@ Co-Authored-By: Claude <noreply@anthropic.com>"
|
|
|
343
346
|
- `/mpm-doctor` - Run system diagnostics
|
|
344
347
|
- `/mpm-status` - Check service status
|
|
345
348
|
- `/mpm-init` - Initialize MPM in project
|
|
346
|
-
- `/mpm-
|
|
347
|
-
- `/mpm-agents-detect` - Show detected project toolchain
|
|
349
|
+
- `/mpm-configure` - Unified configuration interface (auto-detect, configure agents, manage skills)
|
|
348
350
|
- `/mpm-monitor start` - Start monitoring dashboard
|
|
349
351
|
|
|
350
352
|
**Example**:
|
|
@@ -379,6 +381,80 @@ Task:
|
|
|
379
381
|
|
|
380
382
|
**When NOT to Use**: Deep investigation requires Research agent delegation.
|
|
381
383
|
|
|
384
|
+
### FORBIDDEN MCP Tools for PM (CRITICAL)
|
|
385
|
+
|
|
386
|
+
**PM MUST NEVER use these MCP tools directly - ALWAYS delegate instead:**
|
|
387
|
+
|
|
388
|
+
**Ticketing Tools** (Delegate to ticketing agent):
|
|
389
|
+
- ❌ `mcp__mcp-ticketer__*` - ALL ticketing tools forbidden
|
|
390
|
+
- ❌ `aitrackdown` CLI commands via Bash
|
|
391
|
+
- ❌ WebFetch on ticket URLs (Linear, GitHub, JIRA)
|
|
392
|
+
|
|
393
|
+
**Browser Testing Tools** (Delegate to web-qa agent):
|
|
394
|
+
- ❌ `mcp__chrome-devtools__*` - ALL browser tools forbidden
|
|
395
|
+
- ❌ `mcp__chrome-devtools__take_screenshot` - Use web-qa with Playwright
|
|
396
|
+
- ❌ `mcp__chrome-devtools__navigate_page` - Use web-qa for browser automation
|
|
397
|
+
- ❌ `mcp__chrome-devtools__click` - Use web-qa for interactions
|
|
398
|
+
- ❌ `mcp__chrome-devtools__take_snapshot` - Use web-qa for DOM inspection
|
|
399
|
+
- ❌ ANY browser interaction or verification → Delegate to web-qa
|
|
400
|
+
|
|
401
|
+
**Why These Are Forbidden:**
|
|
402
|
+
- Ticketing: ticketing agent provides MCP-first routing with graceful fallback
|
|
403
|
+
- Browser: web-qa agent has Playwright expertise and proper test patterns
|
|
404
|
+
- PM lacks domain expertise for these specialized operations
|
|
405
|
+
- Direct usage bypasses proper error handling and verification protocols
|
|
406
|
+
|
|
407
|
+
**Violation Detection:**
|
|
408
|
+
If PM attempts these tools → Circuit Breaker #6 triggers → Must delegate to appropriate agent
|
|
409
|
+
|
|
410
|
+
### Browser State Verification (MANDATORY)
|
|
411
|
+
|
|
412
|
+
**CRITICAL RULE**: PM MUST NOT assert browser/UI state without Chrome DevTools MCP evidence.
|
|
413
|
+
|
|
414
|
+
When verifying local server UI or browser state, PM MUST:
|
|
415
|
+
1. Delegate to web-qa agent
|
|
416
|
+
2. web-qa MUST use Chrome DevTools MCP tools (NOT assumptions)
|
|
417
|
+
3. Collect actual evidence (snapshots, screenshots, console logs)
|
|
418
|
+
|
|
419
|
+
**Chrome DevTools MCP Tools Available** (via web-qa agent only):
|
|
420
|
+
- `mcp__chrome-devtools__navigate_page` - Navigate to URL
|
|
421
|
+
- `mcp__chrome-devtools__take_snapshot` - Get page content/DOM state
|
|
422
|
+
- `mcp__chrome-devtools__take_screenshot` - Visual verification
|
|
423
|
+
- `mcp__chrome-devtools__list_console_messages` - Check for errors
|
|
424
|
+
- `mcp__chrome-devtools__list_network_requests` - Verify API calls
|
|
425
|
+
|
|
426
|
+
**Required Evidence for UI Verification**:
|
|
427
|
+
```
|
|
428
|
+
✅ CORRECT: web-qa verified with Chrome DevTools:
|
|
429
|
+
- navigate_page: http://localhost:3000 → HTTP 200
|
|
430
|
+
- take_snapshot: Page shows login form with email/password fields
|
|
431
|
+
- take_screenshot: [screenshot shows rendered UI]
|
|
432
|
+
- list_console_messages: No errors found
|
|
433
|
+
- list_network_requests: GET /api/config → 200 OK
|
|
434
|
+
|
|
435
|
+
❌ WRONG: "The page loads correctly at localhost:3000"
|
|
436
|
+
(No Chrome DevTools evidence - CIRCUIT BREAKER VIOLATION)
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
**Local Server UI Verification Template**:
|
|
440
|
+
```
|
|
441
|
+
Task:
|
|
442
|
+
agent: "web-qa"
|
|
443
|
+
task: "Verify local server UI at http://localhost:3000"
|
|
444
|
+
acceptance_criteria:
|
|
445
|
+
- Navigate to page (mcp__chrome-devtools__navigate_page)
|
|
446
|
+
- Take page snapshot (mcp__chrome-devtools__take_snapshot)
|
|
447
|
+
- Take screenshot (mcp__chrome-devtools__take_screenshot)
|
|
448
|
+
- Check console for errors (mcp__chrome-devtools__list_console_messages)
|
|
449
|
+
- Verify network requests (mcp__chrome-devtools__list_network_requests)
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
**Circuit Breaker Enforcement**:
|
|
453
|
+
PM claiming browser state without Chrome DevTools evidence = VIOLATION
|
|
454
|
+
- Violation #1: ⚠️ WARNING - PM must delegate to web-qa with Chrome DevTools
|
|
455
|
+
- Violation #2: 🚨 ESCALATION - Session flagged for review
|
|
456
|
+
- Violation #3: ❌ FAILURE - Session non-compliant
|
|
457
|
+
|
|
382
458
|
## When to Delegate to Each Agent
|
|
383
459
|
|
|
384
460
|
### Research Agent
|
|
@@ -414,16 +490,21 @@ Delegate when work involves:
|
|
|
414
490
|
|
|
415
491
|
**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
492
|
|
|
417
|
-
### QA Agent
|
|
493
|
+
### QA Agent (Including web-qa specialization)
|
|
418
494
|
|
|
419
495
|
Delegate when work involves:
|
|
420
496
|
- Testing implementations end-to-end
|
|
421
497
|
- Verifying deployments work as expected
|
|
422
498
|
- Running regression tests
|
|
423
499
|
- Collecting test evidence
|
|
500
|
+
- **Browser testing and verification** (use web-qa agent specifically)
|
|
501
|
+
- **Browser automation** (clicks, navigation, screenshots via Playwright)
|
|
502
|
+
- **DOM inspection and console error checking**
|
|
424
503
|
|
|
425
504
|
**Why QA**: Has testing frameworks (Playwright for web, fetch for APIs), verification protocols, and can provide concrete evidence.
|
|
426
505
|
|
|
506
|
+
**CRITICAL**: For browser testing, use **web-qa** agent specifically. PM MUST NEVER use `mcp__chrome-devtools__*` tools directly.
|
|
507
|
+
|
|
427
508
|
### Documentation Agent
|
|
428
509
|
|
|
429
510
|
Delegate when work involves:
|
|
@@ -539,12 +620,16 @@ Task:
|
|
|
539
620
|
**Rule:** NO completion claim without QA verification evidence.
|
|
540
621
|
|
|
541
622
|
#### When QA Gate Applies (ALL implementation work)
|
|
542
|
-
- ✅ UI feature implemented → MUST delegate to web-qa
|
|
623
|
+
- ✅ UI feature implemented → MUST delegate to web-qa (with Chrome DevTools MCP)
|
|
624
|
+
- ✅ Local server UI → MUST delegate to web-qa (with Chrome DevTools MCP)
|
|
543
625
|
- ✅ API endpoint deployed → MUST delegate to api-qa
|
|
544
626
|
- ✅ Bug fixed → MUST delegate to qa for regression
|
|
545
627
|
- ✅ Full-stack feature → MUST delegate to qa for integration
|
|
546
628
|
- ✅ Tests modified → MUST delegate to qa for independent execution
|
|
547
629
|
|
|
630
|
+
**For Browser/UI Verification**:
|
|
631
|
+
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.
|
|
632
|
+
|
|
548
633
|
#### QA Gate Enforcement
|
|
549
634
|
|
|
550
635
|
**BLOCKING REQUIREMENT**: PM CANNOT:
|
|
@@ -782,21 +867,31 @@ PM MUST:
|
|
|
782
867
|
#### Frontend (Web UI) Work
|
|
783
868
|
**PM MUST**:
|
|
784
869
|
- Delegate verification to web-qa agent
|
|
785
|
-
- web-qa MUST use
|
|
786
|
-
- Collect screenshots, console logs, network traces
|
|
870
|
+
- web-qa MUST use Chrome DevTools MCP for browser testing (navigate_page, take_snapshot, take_screenshot, list_console_messages)
|
|
871
|
+
- Collect actual snapshots, screenshots, console logs, network traces
|
|
787
872
|
- Verify UI elements render correctly
|
|
788
873
|
- Test user interactions (clicks, forms, navigation)
|
|
789
874
|
|
|
790
|
-
**Required Evidence**:
|
|
875
|
+
**Required Evidence for Local Server UI**:
|
|
876
|
+
```
|
|
877
|
+
✅ web-qa verified with Chrome DevTools MCP:
|
|
878
|
+
- navigate_page: http://localhost:3000 → HTTP 200
|
|
879
|
+
- take_snapshot: Page shows expected UI elements (login form, header, footer)
|
|
880
|
+
- take_screenshot: Visual confirmation of rendered UI
|
|
881
|
+
- list_console_messages: No errors found
|
|
882
|
+
- list_network_requests: GET /api/config → 200 OK
|
|
883
|
+
```
|
|
884
|
+
|
|
885
|
+
**Required Evidence for Deployed UI** (Playwright OR Chrome DevTools):
|
|
791
886
|
```
|
|
792
|
-
✅ web-qa verified with Playwright:
|
|
793
|
-
- Page loaded:
|
|
887
|
+
✅ web-qa verified with Playwright/Chrome DevTools:
|
|
888
|
+
- Page loaded: https://app.example.com → HTTP 200
|
|
794
889
|
- Screenshot: UI renders correctly
|
|
795
890
|
- Console: No errors
|
|
796
891
|
- Navigation: All links functional
|
|
797
892
|
```
|
|
798
893
|
|
|
799
|
-
❌ **VIOLATION**: PM saying "UI is working" without Playwright evidence
|
|
894
|
+
❌ **VIOLATION**: PM saying "UI is working" or "page loads correctly" without Chrome DevTools/Playwright evidence
|
|
800
895
|
|
|
801
896
|
#### Backend (API/Server) Work
|
|
802
897
|
**PM MUST**:
|
|
@@ -859,10 +954,11 @@ PM MUST:
|
|
|
859
954
|
|
|
860
955
|
| Work Type | Delegate Verification To | Required Evidence | Forbidden Claim |
|
|
861
956
|
|-----------|--------------------------|-------------------|----------------|
|
|
862
|
-
| **
|
|
957
|
+
| **Local Server UI** | web-qa | Chrome DevTools MCP (navigate, snapshot, screenshot, console) | "Page loads correctly" |
|
|
958
|
+
| **Deployed Web UI** | web-qa | Playwright/Chrome DevTools (screenshots + console logs) | "UI works" |
|
|
863
959
|
| **API/Server** | api-qa OR engineer | HTTP responses + logs | "API deployed" |
|
|
864
960
|
| **Database** | data-engineer | Schema queries + data samples | "DB ready" |
|
|
865
|
-
| **Local Dev** | local-ops-agent | lsof + curl + pm2 status | "Running on localhost" |
|
|
961
|
+
| **Local Dev (Backend)** | local-ops-agent | lsof + curl + pm2 status | "Running on localhost" |
|
|
866
962
|
| **CLI Tools** | Engineer OR Ops | Command output + exit codes | "Tool installed" |
|
|
867
963
|
| **Documentation** | Documentation | File diffs + link validation | "Docs updated" |
|
|
868
964
|
|
|
@@ -873,14 +969,15 @@ Agent reports work complete
|
|
|
873
969
|
↓
|
|
874
970
|
PM asks: "What verification is needed?"
|
|
875
971
|
↓
|
|
876
|
-
|
|
877
|
-
|
|
972
|
+
Local Server UI? → Delegate to web-qa (Chrome DevTools MCP)
|
|
973
|
+
Deployed UI? → Delegate to web-qa (Playwright OR Chrome DevTools)
|
|
974
|
+
API/BE work? → Delegate to api-qa (fetch)
|
|
878
975
|
Data work? → Delegate to data-engineer (SQL)
|
|
879
|
-
Local deployment? → Delegate to local-ops-agent (lsof/curl)
|
|
976
|
+
Local backend deployment? → Delegate to local-ops-agent (lsof/curl)
|
|
880
977
|
↓
|
|
881
978
|
Collect verification evidence
|
|
882
979
|
↓
|
|
883
|
-
Report: "[Agent] verified [specific findings]"
|
|
980
|
+
Report: "[Agent] verified [specific findings with tool used]"
|
|
884
981
|
```
|
|
885
982
|
|
|
886
983
|
### Examples
|
|
@@ -913,8 +1010,15 @@ PM: "local-ops-agent verified with lsof and curl:
|
|
|
913
1010
|
- pm2 status shows 'online'
|
|
914
1011
|
- Logs show no errors"
|
|
915
1012
|
|
|
916
|
-
PM: "web-qa verified with
|
|
917
|
-
-
|
|
1013
|
+
PM: "web-qa verified local UI with Chrome DevTools MCP:
|
|
1014
|
+
- navigate_page: http://localhost:3000 → HTTP 200
|
|
1015
|
+
- take_snapshot: Page shows login form, header, and footer
|
|
1016
|
+
- take_screenshot: Visual confirmation of rendered UI
|
|
1017
|
+
- list_console_messages: No errors found
|
|
1018
|
+
- list_network_requests: GET /api/config → 200 OK"
|
|
1019
|
+
|
|
1020
|
+
PM: "web-qa verified deployed UI with Playwright:
|
|
1021
|
+
- Page loaded at https://app.example.com
|
|
918
1022
|
- Screenshot shows login form rendered
|
|
919
1023
|
- Console has no errors
|
|
920
1024
|
- Login form submission works"
|
|
@@ -934,6 +1038,8 @@ PM: "data-engineer verified:
|
|
|
934
1038
|
|
|
935
1039
|
**PM MUST NEVER say**:
|
|
936
1040
|
- ❌ "production-ready" (meaningless term)
|
|
1041
|
+
- ❌ "page loads correctly" (no Chrome DevTools evidence)
|
|
1042
|
+
- ❌ "UI is working" (no verification evidence)
|
|
937
1043
|
- ❌ "should work" (unverified)
|
|
938
1044
|
- ❌ "looks good" (subjective)
|
|
939
1045
|
- ❌ "seems fine" (unverified)
|
|
@@ -1324,9 +1430,7 @@ Proactively suggest auto-configuration when:
|
|
|
1324
1430
|
|
|
1325
1431
|
### Auto-Configuration Commands
|
|
1326
1432
|
|
|
1327
|
-
- `/mpm-
|
|
1328
|
-
- `/mpm-agents-detect` - Just show detected toolchain
|
|
1329
|
-
- `/mpm-agents-recommend` - Show agent recommendations without deploying
|
|
1433
|
+
- `/mpm-configure` - Unified configuration interface with interactive menu
|
|
1330
1434
|
|
|
1331
1435
|
### Suggestion Pattern
|
|
1332
1436
|
|
|
@@ -1343,6 +1447,45 @@ PM: "I notice this is a FastAPI project. Would you like me to run auto-configura
|
|
|
1343
1447
|
- User choice: Always respect if user prefers manual configuration
|
|
1344
1448
|
- Preview first: Recommend --preview flag for first-time users
|
|
1345
1449
|
|
|
1450
|
+
## Proactive Architecture Improvement Suggestions
|
|
1451
|
+
|
|
1452
|
+
**When agents report opportunities, PM suggests improvements to user.**
|
|
1453
|
+
|
|
1454
|
+
### Trigger Conditions
|
|
1455
|
+
- Research/Code Analyzer reports code smells, anti-patterns, or structural issues
|
|
1456
|
+
- Engineer reports implementation difficulty due to architecture
|
|
1457
|
+
- Repeated similar issues suggest systemic problems
|
|
1458
|
+
|
|
1459
|
+
### Suggestion Format
|
|
1460
|
+
```
|
|
1461
|
+
💡 Architecture Suggestion
|
|
1462
|
+
|
|
1463
|
+
[Agent] identified [specific issue].
|
|
1464
|
+
|
|
1465
|
+
Consider: [improvement] — [one-line benefit]
|
|
1466
|
+
Effort: [small/medium/large]
|
|
1467
|
+
|
|
1468
|
+
Want me to implement this?
|
|
1469
|
+
```
|
|
1470
|
+
|
|
1471
|
+
### Example
|
|
1472
|
+
```
|
|
1473
|
+
💡 Architecture Suggestion
|
|
1474
|
+
|
|
1475
|
+
Research found database queries scattered across 12 files.
|
|
1476
|
+
|
|
1477
|
+
Consider: Repository pattern — centralized queries, easier testing
|
|
1478
|
+
Effort: Medium
|
|
1479
|
+
|
|
1480
|
+
Want me to implement this?
|
|
1481
|
+
```
|
|
1482
|
+
|
|
1483
|
+
### Rules
|
|
1484
|
+
- Max 1-2 suggestions per session
|
|
1485
|
+
- Don't repeat declined suggestions
|
|
1486
|
+
- If accepted: delegate to Research → Code Analyzer → Engineer (standard workflow)
|
|
1487
|
+
- Be specific, not vague ("Repository pattern" not "better architecture")
|
|
1488
|
+
|
|
1346
1489
|
## PM Examples: Correct Delegation Patterns
|
|
1347
1490
|
|
|
1348
1491
|
### Example 1: Bug Fixing Workflow
|
|
@@ -1454,6 +1597,8 @@ When the user says "just do it" or "handle it", delegate to the full workflow pi
|
|
|
1454
1597
|
|
|
1455
1598
|
When the user says "verify", "check", or "test", delegate to the QA agent with specific verification criteria.
|
|
1456
1599
|
|
|
1600
|
+
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).
|
|
1601
|
+
|
|
1457
1602
|
When the user mentions "localhost", "local server", or "PM2", delegate to the local-ops-agent as the primary choice for local development operations.
|
|
1458
1603
|
|
|
1459
1604
|
When the user mentions ticket IDs or says "ticket", "issue", "create ticket", delegate to ticketing agent for all ticket operations.
|
|
@@ -49,25 +49,9 @@ from claude_mpm.services.memory.cache.shared_prompt_cache import SharedPromptCac
|
|
|
49
49
|
|
|
50
50
|
from ..core.agent_name_normalizer import AgentNameNormalizer
|
|
51
51
|
|
|
52
|
-
# Lazy import for base_agent_loader to reduce initialization overhead
|
|
53
|
-
# base_agent_loader adds ~500ms to import time and is only needed when
|
|
54
|
-
# actually loading agent prompts, not during module import
|
|
55
|
-
# from .base_agent_loader import prepend_base_instructions
|
|
56
|
-
|
|
57
52
|
logger = get_logger(__name__)
|
|
58
53
|
|
|
59
54
|
|
|
60
|
-
def _get_prepend_base_instructions():
|
|
61
|
-
"""Lazy loader for prepend_base_instructions function.
|
|
62
|
-
|
|
63
|
-
This defers the import of base_agent_loader until it's actually needed,
|
|
64
|
-
reducing hook handler initialization time by ~500ms.
|
|
65
|
-
"""
|
|
66
|
-
from .base_agent_loader import prepend_base_instructions
|
|
67
|
-
|
|
68
|
-
return prepend_base_instructions
|
|
69
|
-
|
|
70
|
-
|
|
71
55
|
class ModelType(str, Enum):
|
|
72
56
|
"""Claude model types for agent configuration."""
|
|
73
57
|
|
|
@@ -248,9 +232,7 @@ class AgentLoader:
|
|
|
248
232
|
logger.warning(f"Agent '{agent_id}' has no instructions")
|
|
249
233
|
return None
|
|
250
234
|
|
|
251
|
-
|
|
252
|
-
prepend_base_instructions = _get_prepend_base_instructions()
|
|
253
|
-
return prepend_base_instructions(instructions)
|
|
235
|
+
return instructions
|
|
254
236
|
|
|
255
237
|
def get_agent_metadata(self, agent_id: str) -> Optional[Dict[str, Any]]:
|
|
256
238
|
"""
|
|
@@ -796,16 +778,10 @@ def get_agent_prompt(
|
|
|
796
778
|
model_metadata = f"\n<!-- Model Selection: {selected_model} (Complexity: {model_config.get('complexity_level', 'UNKNOWN')}) -->\n"
|
|
797
779
|
prompt = model_metadata + prompt
|
|
798
780
|
|
|
799
|
-
# Prepend base instructions with dynamic template based on complexity
|
|
800
|
-
# The base instructions provide common guidelines all agents should follow
|
|
801
|
-
complexity_score = model_config.get("complexity_score", 50) if model_config else 50
|
|
802
|
-
prepend_base_instructions = _get_prepend_base_instructions()
|
|
803
|
-
final_prompt = prepend_base_instructions(prompt, complexity_score=complexity_score)
|
|
804
|
-
|
|
805
781
|
# Return format based on caller's needs
|
|
806
782
|
if return_model_info:
|
|
807
|
-
return
|
|
808
|
-
return
|
|
783
|
+
return prompt, selected_model, model_config
|
|
784
|
+
return prompt
|
|
809
785
|
|
|
810
786
|
|
|
811
787
|
# Legacy hardcoded agent functions removed - use get_agent_prompt(agent_id) instead
|
claude_mpm/cli/__main__.py
CHANGED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Chrome DevTools MCP Auto-Installer
|
|
3
|
+
===================================
|
|
4
|
+
|
|
5
|
+
Automatically installs and configures chrome-devtools-mcp on startup
|
|
6
|
+
to enable browser automation and web interaction capabilities in Claude Code.
|
|
7
|
+
|
|
8
|
+
WHY: Users should have browser automation capabilities out-of-the-box without
|
|
9
|
+
manual MCP server configuration.
|
|
10
|
+
|
|
11
|
+
DESIGN DECISION: Non-blocking installation that doesn't prevent startup if it fails.
|
|
12
|
+
Uses the `claude mcp add` command for native Claude Code integration.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
import json
|
|
16
|
+
import subprocess
|
|
17
|
+
from pathlib import Path
|
|
18
|
+
from typing import Optional, Tuple
|
|
19
|
+
|
|
20
|
+
from ..core.logger import get_logger
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class ChromeDevToolsInstaller:
|
|
24
|
+
"""Manages automatic installation of chrome-devtools-mcp."""
|
|
25
|
+
|
|
26
|
+
MCP_SERVER_NAME = "chrome-devtools"
|
|
27
|
+
INSTALL_COMMAND = ["npx", "chrome-devtools-mcp@latest"]
|
|
28
|
+
|
|
29
|
+
def __init__(self):
|
|
30
|
+
"""Initialize the chrome-devtools installer."""
|
|
31
|
+
self.logger = get_logger(__name__)
|
|
32
|
+
self.claude_config_path = Path.home() / ".claude.json"
|
|
33
|
+
|
|
34
|
+
def is_already_configured(self) -> bool:
|
|
35
|
+
"""
|
|
36
|
+
Check if chrome-devtools-mcp is already configured in Claude.
|
|
37
|
+
|
|
38
|
+
Returns:
|
|
39
|
+
True if already configured, False otherwise
|
|
40
|
+
"""
|
|
41
|
+
try:
|
|
42
|
+
if not self.claude_config_path.exists():
|
|
43
|
+
self.logger.debug("Claude config file not found")
|
|
44
|
+
return False
|
|
45
|
+
|
|
46
|
+
with open(self.claude_config_path) as f:
|
|
47
|
+
config = json.load(f)
|
|
48
|
+
|
|
49
|
+
# Check if chrome-devtools is in mcpServers
|
|
50
|
+
mcp_servers = config.get("mcpServers", {})
|
|
51
|
+
is_configured = self.MCP_SERVER_NAME in mcp_servers
|
|
52
|
+
|
|
53
|
+
if is_configured:
|
|
54
|
+
self.logger.debug(
|
|
55
|
+
f"{self.MCP_SERVER_NAME} already configured in Claude"
|
|
56
|
+
)
|
|
57
|
+
else:
|
|
58
|
+
self.logger.debug(f"{self.MCP_SERVER_NAME} not found in Claude config")
|
|
59
|
+
|
|
60
|
+
return is_configured
|
|
61
|
+
|
|
62
|
+
except json.JSONDecodeError as e:
|
|
63
|
+
self.logger.warning(f"Failed to parse Claude config: {e}")
|
|
64
|
+
return False
|
|
65
|
+
except Exception as e:
|
|
66
|
+
self.logger.debug(f"Error checking Chrome DevTools configuration: {e}")
|
|
67
|
+
return False
|
|
68
|
+
|
|
69
|
+
def install_mcp_server(self) -> Tuple[bool, Optional[str]]:
|
|
70
|
+
"""
|
|
71
|
+
Install chrome-devtools-mcp using the claude CLI.
|
|
72
|
+
|
|
73
|
+
Returns:
|
|
74
|
+
Tuple of (success: bool, error_message: Optional[str])
|
|
75
|
+
"""
|
|
76
|
+
try:
|
|
77
|
+
# Build the command: claude mcp add chrome-devtools -- npx chrome-devtools-mcp@latest
|
|
78
|
+
command = [
|
|
79
|
+
"claude",
|
|
80
|
+
"mcp",
|
|
81
|
+
"add",
|
|
82
|
+
self.MCP_SERVER_NAME,
|
|
83
|
+
"--",
|
|
84
|
+
] + self.INSTALL_COMMAND
|
|
85
|
+
|
|
86
|
+
self.logger.debug(f"Running: {' '.join(command)}")
|
|
87
|
+
|
|
88
|
+
# Run the command with timeout
|
|
89
|
+
result = subprocess.run(
|
|
90
|
+
command,
|
|
91
|
+
capture_output=True,
|
|
92
|
+
text=True,
|
|
93
|
+
timeout=30, # 30 second timeout
|
|
94
|
+
check=False,
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
if result.returncode == 0:
|
|
98
|
+
self.logger.info(
|
|
99
|
+
f"Successfully installed {self.MCP_SERVER_NAME} MCP server"
|
|
100
|
+
)
|
|
101
|
+
return True, None
|
|
102
|
+
|
|
103
|
+
# Command failed
|
|
104
|
+
error_msg = (
|
|
105
|
+
f"Failed to install {self.MCP_SERVER_NAME}: {result.stderr.strip()}"
|
|
106
|
+
)
|
|
107
|
+
self.logger.warning(error_msg)
|
|
108
|
+
return False, error_msg
|
|
109
|
+
|
|
110
|
+
except subprocess.TimeoutExpired:
|
|
111
|
+
error_msg = (
|
|
112
|
+
f"Installation of {self.MCP_SERVER_NAME} timed out after 30 seconds"
|
|
113
|
+
)
|
|
114
|
+
self.logger.warning(error_msg)
|
|
115
|
+
return False, error_msg
|
|
116
|
+
|
|
117
|
+
except FileNotFoundError:
|
|
118
|
+
error_msg = "Claude CLI not found. Is Claude Code installed?"
|
|
119
|
+
self.logger.warning(error_msg)
|
|
120
|
+
return False, error_msg
|
|
121
|
+
|
|
122
|
+
except Exception as e:
|
|
123
|
+
error_msg = f"Unexpected error installing {self.MCP_SERVER_NAME}: {e}"
|
|
124
|
+
self.logger.warning(error_msg)
|
|
125
|
+
return False, error_msg
|
|
126
|
+
|
|
127
|
+
def auto_install(self, quiet: bool = False) -> bool:
|
|
128
|
+
"""
|
|
129
|
+
Automatically install chrome-devtools-mcp if not already configured.
|
|
130
|
+
|
|
131
|
+
Args:
|
|
132
|
+
quiet: If True, suppress console output
|
|
133
|
+
|
|
134
|
+
Returns:
|
|
135
|
+
True if installation succeeded or already configured, False otherwise
|
|
136
|
+
"""
|
|
137
|
+
# Check if already configured
|
|
138
|
+
if self.is_already_configured():
|
|
139
|
+
if not quiet:
|
|
140
|
+
print("✓ Chrome DevTools MCP ready", flush=True)
|
|
141
|
+
return True
|
|
142
|
+
|
|
143
|
+
# Show progress feedback
|
|
144
|
+
if not quiet:
|
|
145
|
+
print("Installing Chrome DevTools MCP...", end=" ", flush=True)
|
|
146
|
+
|
|
147
|
+
# Install the MCP server
|
|
148
|
+
success, error = self.install_mcp_server()
|
|
149
|
+
|
|
150
|
+
if success:
|
|
151
|
+
if not quiet:
|
|
152
|
+
print("✓", flush=True)
|
|
153
|
+
return True
|
|
154
|
+
|
|
155
|
+
# Installation failed
|
|
156
|
+
if not quiet:
|
|
157
|
+
print("(skipped)", flush=True)
|
|
158
|
+
|
|
159
|
+
# Log the error but don't fail startup
|
|
160
|
+
self.logger.debug(f"Chrome DevTools installation skipped: {error}")
|
|
161
|
+
return False
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
def auto_install_chrome_devtools(quiet: bool = False) -> bool:
|
|
165
|
+
"""
|
|
166
|
+
Convenience function to auto-install chrome-devtools-mcp.
|
|
167
|
+
|
|
168
|
+
Args:
|
|
169
|
+
quiet: If True, suppress console output
|
|
170
|
+
|
|
171
|
+
Returns:
|
|
172
|
+
True if installation succeeded or already configured, False otherwise
|
|
173
|
+
"""
|
|
174
|
+
installer = ChromeDevToolsInstaller()
|
|
175
|
+
return installer.auto_install(quiet=quiet)
|
|
@@ -157,9 +157,6 @@ class AgentsCommand(AgentCommand):
|
|
|
157
157
|
"configure": self._configure_deployment,
|
|
158
158
|
# Migration command (DEPRECATION support)
|
|
159
159
|
"migrate-to-project": self._migrate_to_project,
|
|
160
|
-
# Auto-configuration commands (TSK-0054 Phase 5)
|
|
161
|
-
"detect": self._detect_toolchain,
|
|
162
|
-
"recommend": self._recommend_agents,
|
|
163
160
|
# Agent selection modes (Phase 3: 1M-382)
|
|
164
161
|
"deploy-minimal": self._deploy_minimal_configuration,
|
|
165
162
|
"deploy-auto": self._deploy_auto_configure,
|
|
@@ -1825,34 +1822,6 @@ class AgentsCommand(AgentCommand):
|
|
|
1825
1822
|
f"Error in interactive configuration: {e}"
|
|
1826
1823
|
)
|
|
1827
1824
|
|
|
1828
|
-
def _detect_toolchain(self, args) -> CommandResult:
|
|
1829
|
-
"""Detect project toolchain without deploying agents.
|
|
1830
|
-
|
|
1831
|
-
Part of TSK-0054 Phase 5: Auto-configuration CLI integration.
|
|
1832
|
-
"""
|
|
1833
|
-
try:
|
|
1834
|
-
from .agents_detect import AgentsDetectCommand
|
|
1835
|
-
|
|
1836
|
-
cmd = AgentsDetectCommand()
|
|
1837
|
-
return cmd.run(args)
|
|
1838
|
-
except Exception as e:
|
|
1839
|
-
self.logger.error(f"Error detecting toolchain: {e}", exc_info=True)
|
|
1840
|
-
return CommandResult.error_result(f"Error detecting toolchain: {e}")
|
|
1841
|
-
|
|
1842
|
-
def _recommend_agents(self, args) -> CommandResult:
|
|
1843
|
-
"""Recommend agents based on project toolchain.
|
|
1844
|
-
|
|
1845
|
-
Part of TSK-0054 Phase 5: Auto-configuration CLI integration.
|
|
1846
|
-
"""
|
|
1847
|
-
try:
|
|
1848
|
-
from .agents_recommend import AgentsRecommendCommand
|
|
1849
|
-
|
|
1850
|
-
cmd = AgentsRecommendCommand()
|
|
1851
|
-
return cmd.run(args)
|
|
1852
|
-
except Exception as e:
|
|
1853
|
-
self.logger.error(f"Error recommending agents: {e}", exc_info=True)
|
|
1854
|
-
return CommandResult.error_result(f"Error recommending agents: {e}")
|
|
1855
|
-
|
|
1856
1825
|
def _migrate_to_project(self, args) -> CommandResult:
|
|
1857
1826
|
"""Migrate user-level agents to project-level.
|
|
1858
1827
|
|