claude-mpm 5.0.2__py3-none-any.whl → 5.1.9__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/agents/CLAUDE_MPM_TEACHER_OUTPUT_STYLE.md +2002 -0
- claude_mpm/agents/PM_INSTRUCTIONS.md +1176 -909
- claude_mpm/agents/base_agent_loader.py +10 -35
- claude_mpm/agents/frontmatter_validator.py +68 -0
- claude_mpm/agents/templates/circuit-breakers.md +293 -44
- claude_mpm/cli/__init__.py +0 -1
- claude_mpm/cli/commands/__init__.py +2 -0
- claude_mpm/cli/commands/agent_state_manager.py +64 -11
- claude_mpm/cli/commands/agents.py +446 -25
- claude_mpm/cli/commands/auto_configure.py +535 -233
- claude_mpm/cli/commands/configure.py +545 -89
- claude_mpm/cli/commands/postmortem.py +401 -0
- claude_mpm/cli/commands/run.py +1 -39
- claude_mpm/cli/commands/skills.py +322 -19
- claude_mpm/cli/interactive/agent_wizard.py +302 -195
- claude_mpm/cli/parsers/agents_parser.py +137 -0
- claude_mpm/cli/parsers/auto_configure_parser.py +13 -0
- claude_mpm/cli/parsers/base_parser.py +4 -0
- claude_mpm/cli/parsers/skills_parser.py +7 -0
- claude_mpm/cli/startup.py +73 -32
- claude_mpm/commands/mpm-agents-auto-configure.md +2 -2
- claude_mpm/commands/mpm-agents-list.md +2 -2
- claude_mpm/commands/mpm-config-view.md +2 -2
- claude_mpm/commands/mpm-help.md +3 -0
- claude_mpm/commands/mpm-postmortem.md +123 -0
- claude_mpm/commands/mpm-session-resume.md +2 -2
- claude_mpm/commands/mpm-ticket-organize.md +2 -2
- claude_mpm/commands/mpm-ticket-view.md +2 -2
- claude_mpm/config/agent_presets.py +312 -82
- claude_mpm/config/skill_presets.py +392 -0
- claude_mpm/constants.py +1 -0
- claude_mpm/core/claude_runner.py +2 -25
- claude_mpm/core/framework/loaders/file_loader.py +54 -101
- claude_mpm/core/interactive_session.py +19 -5
- claude_mpm/core/oneshot_session.py +16 -4
- claude_mpm/core/output_style_manager.py +173 -43
- claude_mpm/core/protocols/__init__.py +23 -0
- claude_mpm/core/protocols/runner_protocol.py +103 -0
- claude_mpm/core/protocols/session_protocol.py +131 -0
- claude_mpm/core/shared/singleton_manager.py +11 -4
- claude_mpm/core/system_context.py +38 -0
- claude_mpm/core/unified_agent_registry.py +129 -1
- claude_mpm/core/unified_config.py +22 -0
- claude_mpm/hooks/claude_hooks/memory_integration.py +12 -1
- claude_mpm/models/agent_definition.py +7 -0
- claude_mpm/services/agents/cache_git_manager.py +621 -0
- claude_mpm/services/agents/deployment/multi_source_deployment_service.py +110 -3
- claude_mpm/services/agents/deployment/remote_agent_discovery_service.py +195 -1
- claude_mpm/services/agents/sources/git_source_sync_service.py +37 -5
- claude_mpm/services/analysis/__init__.py +25 -0
- claude_mpm/services/analysis/postmortem_reporter.py +474 -0
- claude_mpm/services/analysis/postmortem_service.py +765 -0
- claude_mpm/services/command_deployment_service.py +108 -5
- claude_mpm/services/core/base.py +7 -2
- claude_mpm/services/diagnostics/checks/mcp_services_check.py +7 -15
- claude_mpm/services/git/git_operations_service.py +8 -8
- claude_mpm/services/mcp_config_manager.py +75 -145
- claude_mpm/services/mcp_gateway/core/process_pool.py +22 -16
- claude_mpm/services/mcp_service_verifier.py +6 -3
- claude_mpm/services/monitor/daemon.py +28 -8
- claude_mpm/services/monitor/daemon_manager.py +96 -19
- claude_mpm/services/project/project_organizer.py +4 -0
- claude_mpm/services/runner_configuration_service.py +16 -3
- claude_mpm/services/session_management_service.py +16 -4
- claude_mpm/utils/agent_filters.py +288 -0
- claude_mpm/utils/gitignore.py +3 -0
- claude_mpm/utils/migration.py +372 -0
- claude_mpm/utils/progress.py +5 -1
- {claude_mpm-5.0.2.dist-info → claude_mpm-5.1.9.dist-info}/METADATA +69 -8
- {claude_mpm-5.0.2.dist-info → claude_mpm-5.1.9.dist-info}/RECORD +76 -62
- /claude_mpm/agents/{OUTPUT_STYLE.md → CLAUDE_MPM_OUTPUT_STYLE.md} +0 -0
- {claude_mpm-5.0.2.dist-info → claude_mpm-5.1.9.dist-info}/WHEEL +0 -0
- {claude_mpm-5.0.2.dist-info → claude_mpm-5.1.9.dist-info}/entry_points.txt +0 -0
- {claude_mpm-5.0.2.dist-info → claude_mpm-5.1.9.dist-info}/licenses/LICENSE +0 -0
- {claude_mpm-5.0.2.dist-info → claude_mpm-5.1.9.dist-info}/top_level.txt +0 -0
|
@@ -444,4 +444,141 @@ Available commands:
|
|
|
444
444
|
help="Show what would be deployed without actually deploying",
|
|
445
445
|
)
|
|
446
446
|
|
|
447
|
+
# ============================================================================
|
|
448
|
+
# Collection-Based Agent Management Commands
|
|
449
|
+
# ============================================================================
|
|
450
|
+
# Purpose: Enable collection-based agent selection and deployment
|
|
451
|
+
# Commands: list-collections, deploy-collection, list-by-collection
|
|
452
|
+
# NEW: Enhanced agent matching with collection_id support
|
|
453
|
+
# ============================================================================
|
|
454
|
+
|
|
455
|
+
# list-collections: List all available agent collections
|
|
456
|
+
agents_subparsers.add_parser(
|
|
457
|
+
"list-collections",
|
|
458
|
+
help="List all available agent collections",
|
|
459
|
+
description="Display all agent collections with agent counts and collection metadata",
|
|
460
|
+
)
|
|
461
|
+
|
|
462
|
+
# deploy-collection: Deploy all agents from a specific collection
|
|
463
|
+
deploy_collection_parser = agents_subparsers.add_parser(
|
|
464
|
+
"deploy-collection",
|
|
465
|
+
help="Deploy all agents from a specific collection",
|
|
466
|
+
description="Deploy all agents from a named collection (e.g., 'bobmatnyc/claude-mpm-agents')",
|
|
467
|
+
)
|
|
468
|
+
deploy_collection_parser.add_argument(
|
|
469
|
+
"collection_id",
|
|
470
|
+
help="Collection ID in format 'owner/repo-name' (e.g., 'bobmatnyc/claude-mpm-agents')",
|
|
471
|
+
)
|
|
472
|
+
deploy_collection_parser.add_argument(
|
|
473
|
+
"--force",
|
|
474
|
+
"-f",
|
|
475
|
+
action="store_true",
|
|
476
|
+
help="Force redeployment even if agents are already deployed",
|
|
477
|
+
)
|
|
478
|
+
deploy_collection_parser.add_argument(
|
|
479
|
+
"--dry-run",
|
|
480
|
+
action="store_true",
|
|
481
|
+
help="Show what would be deployed without actually deploying",
|
|
482
|
+
)
|
|
483
|
+
|
|
484
|
+
# list-by-collection: List agents filtered by collection
|
|
485
|
+
list_by_collection_parser = agents_subparsers.add_parser(
|
|
486
|
+
"list-by-collection",
|
|
487
|
+
help="List agents from a specific collection",
|
|
488
|
+
description="Display agents from a specific collection with metadata",
|
|
489
|
+
)
|
|
490
|
+
list_by_collection_parser.add_argument(
|
|
491
|
+
"collection_id",
|
|
492
|
+
help="Collection ID to filter by (e.g., 'bobmatnyc/claude-mpm-agents')",
|
|
493
|
+
)
|
|
494
|
+
list_by_collection_parser.add_argument(
|
|
495
|
+
"--format",
|
|
496
|
+
choices=["table", "json", "yaml"],
|
|
497
|
+
default="table",
|
|
498
|
+
help="Output format (default: table)",
|
|
499
|
+
)
|
|
500
|
+
|
|
501
|
+
# ============================================================================
|
|
502
|
+
# Cache Git Management Commands (claude-mpm Issue 1M-442 Phase 2)
|
|
503
|
+
# ============================================================================
|
|
504
|
+
# Purpose: Enable git workflow for agent cache management
|
|
505
|
+
# Commands: cache-status, cache-pull, cache-commit, cache-push, cache-sync
|
|
506
|
+
# Documentation: See docs/research/cache-update-workflow-analysis-2025-12-03.md
|
|
507
|
+
# ============================================================================
|
|
508
|
+
|
|
509
|
+
# cache-status: Show git status of agent cache
|
|
510
|
+
agents_subparsers.add_parser(
|
|
511
|
+
"cache-status",
|
|
512
|
+
help="Show git status of agent cache directory",
|
|
513
|
+
description="Display git status including branch, uncommitted changes, and unpushed commits",
|
|
514
|
+
)
|
|
515
|
+
|
|
516
|
+
# cache-pull: Pull latest agents from remote
|
|
517
|
+
cache_pull_parser = agents_subparsers.add_parser(
|
|
518
|
+
"cache-pull",
|
|
519
|
+
help="Pull latest agents from remote repository",
|
|
520
|
+
description="Fetch and merge latest agent changes from GitHub remote repository",
|
|
521
|
+
)
|
|
522
|
+
cache_pull_parser.add_argument(
|
|
523
|
+
"--branch",
|
|
524
|
+
default="main",
|
|
525
|
+
help="Branch to pull from (default: main)",
|
|
526
|
+
)
|
|
527
|
+
|
|
528
|
+
# cache-commit: Commit changes to agent cache
|
|
529
|
+
cache_commit_parser = agents_subparsers.add_parser(
|
|
530
|
+
"cache-commit",
|
|
531
|
+
help="Commit changes to agent cache",
|
|
532
|
+
description="Stage and commit changes to local agent cache git repository",
|
|
533
|
+
)
|
|
534
|
+
cache_commit_parser.add_argument(
|
|
535
|
+
"--message",
|
|
536
|
+
"-m",
|
|
537
|
+
help="Commit message (default: 'feat: update agents from local development')",
|
|
538
|
+
)
|
|
539
|
+
cache_commit_parser.add_argument(
|
|
540
|
+
"--files",
|
|
541
|
+
nargs="+",
|
|
542
|
+
help="Specific files to commit (default: all modified files)",
|
|
543
|
+
)
|
|
544
|
+
|
|
545
|
+
# cache-push: Push agent changes to remote
|
|
546
|
+
cache_push_parser = agents_subparsers.add_parser(
|
|
547
|
+
"cache-push",
|
|
548
|
+
help="Push agent changes to remote repository",
|
|
549
|
+
description="Push committed changes from local cache to GitHub remote repository",
|
|
550
|
+
)
|
|
551
|
+
cache_push_parser.add_argument(
|
|
552
|
+
"--branch",
|
|
553
|
+
default="main",
|
|
554
|
+
help="Branch to push to (default: main)",
|
|
555
|
+
)
|
|
556
|
+
cache_push_parser.add_argument(
|
|
557
|
+
"--auto-commit",
|
|
558
|
+
action="store_true",
|
|
559
|
+
help="Automatically commit uncommitted changes before pushing",
|
|
560
|
+
)
|
|
561
|
+
|
|
562
|
+
# cache-sync: Full cache sync workflow
|
|
563
|
+
cache_sync_parser = agents_subparsers.add_parser(
|
|
564
|
+
"cache-sync",
|
|
565
|
+
help="Full agent cache sync with remote",
|
|
566
|
+
description="Complete sync workflow: pull latest, commit local changes, push to remote",
|
|
567
|
+
)
|
|
568
|
+
cache_sync_parser.add_argument(
|
|
569
|
+
"--message",
|
|
570
|
+
"-m",
|
|
571
|
+
help="Commit message for any uncommitted changes",
|
|
572
|
+
)
|
|
573
|
+
cache_sync_parser.add_argument(
|
|
574
|
+
"--skip-pull",
|
|
575
|
+
action="store_true",
|
|
576
|
+
help="Skip pulling from remote before sync",
|
|
577
|
+
)
|
|
578
|
+
cache_sync_parser.add_argument(
|
|
579
|
+
"--skip-push",
|
|
580
|
+
action="store_true",
|
|
581
|
+
help="Skip pushing to remote after sync",
|
|
582
|
+
)
|
|
583
|
+
|
|
447
584
|
return agents_parser
|
|
@@ -88,6 +88,19 @@ Examples:
|
|
|
88
88
|
help="Skip confirmation prompts and deploy automatically",
|
|
89
89
|
)
|
|
90
90
|
|
|
91
|
+
# Scope selection
|
|
92
|
+
scope_group = auto_configure_parser.add_mutually_exclusive_group()
|
|
93
|
+
scope_group.add_argument(
|
|
94
|
+
"--agents-only",
|
|
95
|
+
action="store_true",
|
|
96
|
+
help="Configure agents only (skip skills)",
|
|
97
|
+
)
|
|
98
|
+
scope_group.add_argument(
|
|
99
|
+
"--skills-only",
|
|
100
|
+
action="store_true",
|
|
101
|
+
help="Configure skills only (skip agents)",
|
|
102
|
+
)
|
|
103
|
+
|
|
91
104
|
# Configuration options
|
|
92
105
|
auto_configure_parser.add_argument(
|
|
93
106
|
"--min-confidence",
|
|
@@ -553,6 +553,10 @@ def create_parser(
|
|
|
553
553
|
|
|
554
554
|
add_doctor_parser(subparsers)
|
|
555
555
|
|
|
556
|
+
from ..commands.postmortem import add_postmortem_parser
|
|
557
|
+
|
|
558
|
+
add_postmortem_parser(subparsers)
|
|
559
|
+
|
|
556
560
|
# Add upgrade command
|
|
557
561
|
from ..commands.upgrade import add_upgrade_parser
|
|
558
562
|
|
|
@@ -134,6 +134,13 @@ def add_skills_subparser(subparsers) -> argparse.ArgumentParser:
|
|
|
134
134
|
help="Show configuration file path",
|
|
135
135
|
)
|
|
136
136
|
|
|
137
|
+
# Configure command (interactive skills selection)
|
|
138
|
+
skills_subparsers.add_parser(
|
|
139
|
+
SkillsCommands.CONFIGURE.value,
|
|
140
|
+
help="Interactive skills configuration with checkbox selection (like agents configure)",
|
|
141
|
+
)
|
|
142
|
+
# No additional arguments needed - purely interactive
|
|
143
|
+
|
|
137
144
|
# GitHub deployment commands
|
|
138
145
|
# Deploy from GitHub command
|
|
139
146
|
deploy_github_parser = skills_subparsers.add_parser(
|
claude_mpm/cli/startup.py
CHANGED
|
@@ -10,6 +10,47 @@ Part of cli/__init__.py refactoring to reduce file size and improve modularity.
|
|
|
10
10
|
|
|
11
11
|
import os
|
|
12
12
|
import sys
|
|
13
|
+
import warnings
|
|
14
|
+
from pathlib import Path
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def check_legacy_cache() -> None:
|
|
18
|
+
"""Check for legacy cache/agents/ directory and warn user.
|
|
19
|
+
|
|
20
|
+
WHY: cache/agents/ is deprecated in favor of cache/remote-agents/.
|
|
21
|
+
Research confirmed that cache/remote-agents/ is the canonical location
|
|
22
|
+
with 26 active code references, while cache/agents/ has only 7 legacy references.
|
|
23
|
+
|
|
24
|
+
DESIGN DECISIONS:
|
|
25
|
+
- Non-blocking warning: Doesn't stop execution, just informs user
|
|
26
|
+
- Migration guidance: Provides clear path to migrate
|
|
27
|
+
- One-time check: Only warns if legacy cache contains files
|
|
28
|
+
"""
|
|
29
|
+
home = Path.home()
|
|
30
|
+
legacy_cache = home / ".claude-mpm" / "cache" / "agents"
|
|
31
|
+
canonical_cache = home / ".claude-mpm" / "cache" / "remote-agents"
|
|
32
|
+
migration_marker = home / ".claude-mpm" / "cache" / ".migrated_to_remote_agents"
|
|
33
|
+
|
|
34
|
+
# Skip if already migrated or no legacy cache
|
|
35
|
+
if migration_marker.exists() or not legacy_cache.exists():
|
|
36
|
+
return
|
|
37
|
+
|
|
38
|
+
# Check if legacy cache has actual agent files
|
|
39
|
+
legacy_files = list(legacy_cache.glob("*.md")) + list(legacy_cache.glob("*.json"))
|
|
40
|
+
if not legacy_files:
|
|
41
|
+
return
|
|
42
|
+
|
|
43
|
+
# Only warn if canonical cache doesn't exist (indicating unmigrated system)
|
|
44
|
+
if not canonical_cache.exists():
|
|
45
|
+
warnings.warn(
|
|
46
|
+
f"\n⚠️ DEPRECATION: Legacy cache directory detected\n"
|
|
47
|
+
f" Location: {legacy_cache}\n"
|
|
48
|
+
f" Files found: {len(legacy_files)}\n\n"
|
|
49
|
+
f"The 'cache/agents/' directory is deprecated. Please migrate to 'cache/remote-agents/'.\n"
|
|
50
|
+
f"Run: python scripts/migrate_cache_to_remote_agents.py\n",
|
|
51
|
+
DeprecationWarning,
|
|
52
|
+
stacklevel=2,
|
|
53
|
+
)
|
|
13
54
|
|
|
14
55
|
|
|
15
56
|
def setup_early_environment(argv):
|
|
@@ -269,6 +310,9 @@ def sync_remote_agents_on_startup():
|
|
|
269
310
|
2. Deploy agents to ~/.claude/agents/ - Phase 2 progress bar
|
|
270
311
|
3. Log deployment results
|
|
271
312
|
"""
|
|
313
|
+
# Check for legacy cache and warn user if found
|
|
314
|
+
check_legacy_cache()
|
|
315
|
+
|
|
272
316
|
try:
|
|
273
317
|
from ..services.agents.deployment.agent_deployment import AgentDeploymentService
|
|
274
318
|
from ..services.agents.startup_sync import sync_agents_on_startup
|
|
@@ -311,8 +355,9 @@ def sync_remote_agents_on_startup():
|
|
|
311
355
|
|
|
312
356
|
if cache_dir.exists():
|
|
313
357
|
# Count MD files in cache (agent markdown files from Git)
|
|
314
|
-
# Only
|
|
315
|
-
#
|
|
358
|
+
# BUGFIX: Only count files in agent directories, not docs/templates/READMEs
|
|
359
|
+
# Valid agent paths must contain "/agents/" or be in root-level category dirs
|
|
360
|
+
# Exclude PM templates, BASE-AGENT, and documentation files
|
|
316
361
|
pm_templates = {
|
|
317
362
|
"base-agent.md",
|
|
318
363
|
"circuit_breakers.md",
|
|
@@ -324,10 +369,34 @@ def sync_remote_agents_on_startup():
|
|
|
324
369
|
"validation_templates.md",
|
|
325
370
|
"git_file_tracking.md",
|
|
326
371
|
}
|
|
372
|
+
# Documentation files to exclude (by filename)
|
|
373
|
+
doc_files = {
|
|
374
|
+
"readme.md",
|
|
375
|
+
"changelog.md",
|
|
376
|
+
"contributing.md",
|
|
377
|
+
"implementation-summary.md",
|
|
378
|
+
"reorganization-plan.md",
|
|
379
|
+
"auto-deploy-index.md",
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
# Find all markdown files
|
|
383
|
+
all_md_files = list(cache_dir.rglob("*.md"))
|
|
384
|
+
|
|
385
|
+
# Filter to only agent files:
|
|
386
|
+
# 1. Must have "/agents/" in path (from git repos)
|
|
387
|
+
# 2. Must not be in PM templates or doc files
|
|
388
|
+
# 3. Exclude BASE-AGENT.md which is not a deployable agent
|
|
327
389
|
agent_files = [
|
|
328
390
|
f
|
|
329
|
-
for f in
|
|
330
|
-
if
|
|
391
|
+
for f in all_md_files
|
|
392
|
+
if (
|
|
393
|
+
# Must be in an agent directory (from git repos like bobmatnyc/claude-mpm-agents/agents/)
|
|
394
|
+
"/agents/" in str(f)
|
|
395
|
+
# Exclude PM templates, doc files, and BASE-AGENT
|
|
396
|
+
and f.name.lower() not in pm_templates
|
|
397
|
+
and f.name.lower() not in doc_files
|
|
398
|
+
and f.name.lower() != "base-agent.md"
|
|
399
|
+
)
|
|
331
400
|
]
|
|
332
401
|
agent_count = len(agent_files)
|
|
333
402
|
|
|
@@ -719,34 +788,6 @@ def check_mcp_auto_configuration():
|
|
|
719
788
|
logger = get_logger("cli")
|
|
720
789
|
logger.debug(f"MCP auto-configuration check failed: {e}")
|
|
721
790
|
|
|
722
|
-
# Also ensure MCP services are properly configured in ~/.claude.json
|
|
723
|
-
# This fixes incorrect paths and adds missing services
|
|
724
|
-
try:
|
|
725
|
-
from ..core.logger import get_logger
|
|
726
|
-
from ..services.mcp_config_manager import MCPConfigManager
|
|
727
|
-
|
|
728
|
-
logger = get_logger("cli")
|
|
729
|
-
mcp_manager = MCPConfigManager()
|
|
730
|
-
|
|
731
|
-
# Fix any corrupted installations first
|
|
732
|
-
_fix_success, fix_message = mcp_manager.fix_mcp_service_issues()
|
|
733
|
-
if fix_message and "Fixed:" in fix_message:
|
|
734
|
-
logger.info(f"MCP service fixes applied: {fix_message}")
|
|
735
|
-
print("✓ MCP services fixed", flush=True)
|
|
736
|
-
|
|
737
|
-
# Ensure all services are configured correctly
|
|
738
|
-
_config_success, config_message = mcp_manager.ensure_mcp_services_configured()
|
|
739
|
-
if config_message and "Added MCP services" in config_message:
|
|
740
|
-
logger.info(f"MCP services configured: {config_message}")
|
|
741
|
-
print("✓ MCP services configured", flush=True)
|
|
742
|
-
|
|
743
|
-
except Exception as e:
|
|
744
|
-
# Non-critical - log but don't fail
|
|
745
|
-
from ..core.logger import get_logger
|
|
746
|
-
|
|
747
|
-
logger = get_logger("cli")
|
|
748
|
-
logger.debug(f"MCP services configuration update failed: {e}")
|
|
749
|
-
|
|
750
791
|
|
|
751
792
|
def verify_mcp_gateway_startup():
|
|
752
793
|
"""
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
namespace: mpm/agents
|
|
3
3
|
command: auto-configure
|
|
4
|
-
aliases: [mpm-agents-auto-configure
|
|
4
|
+
aliases: [mpm-agents-auto-configure]
|
|
5
5
|
migration_target: /mpm/agents:auto-configure
|
|
6
6
|
category: agents
|
|
7
|
-
deprecated_aliases: []
|
|
7
|
+
deprecated_aliases: [mpm-auto-configure]
|
|
8
8
|
description: Automatically detect project toolchain and configure appropriate agents
|
|
9
9
|
---
|
|
10
10
|
# Automatically configure agents based on project detection
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
namespace: mpm/agents
|
|
3
3
|
command: list
|
|
4
|
-
aliases: [mpm-agents
|
|
4
|
+
aliases: [mpm-agents-list]
|
|
5
5
|
migration_target: /mpm/agents:list
|
|
6
6
|
category: agents
|
|
7
|
-
deprecated_aliases: []
|
|
7
|
+
deprecated_aliases: [mpm-agents]
|
|
8
8
|
description: List all available Claude MPM agents with versions and deployment status
|
|
9
9
|
---
|
|
10
10
|
# Show available agents and their versions
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
namespace: mpm/config
|
|
3
3
|
command: view
|
|
4
|
-
aliases: [mpm-config-view
|
|
4
|
+
aliases: [mpm-config-view]
|
|
5
5
|
migration_target: /mpm/config:view
|
|
6
6
|
category: config
|
|
7
|
-
deprecated_aliases: []
|
|
7
|
+
deprecated_aliases: [mpm-config]
|
|
8
8
|
description: View and validate Claude MPM configuration settings
|
|
9
9
|
---
|
|
10
10
|
# View and validate claude-mpm configuration
|
claude_mpm/commands/mpm-help.md
CHANGED
|
@@ -72,6 +72,9 @@ Available Commands:
|
|
|
72
72
|
/mpm-doctor [--fix] [--verbose]
|
|
73
73
|
Diagnose and fix common issues
|
|
74
74
|
|
|
75
|
+
/mpm-postmortem [--auto-fix] [--create-prs]
|
|
76
|
+
Analyze session errors and suggest improvements
|
|
77
|
+
|
|
75
78
|
/mpm-agents [list|deploy|remove] [name]
|
|
76
79
|
Manage agent deployment
|
|
77
80
|
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
---
|
|
2
|
+
namespace: mpm/analysis
|
|
3
|
+
command: postmortem
|
|
4
|
+
aliases: [mpm-postmortem]
|
|
5
|
+
migration_target: /mpm/analysis:postmortem
|
|
6
|
+
category: analysis
|
|
7
|
+
deprecated_aliases: []
|
|
8
|
+
description: Analyze session errors and suggest improvements
|
|
9
|
+
---
|
|
10
|
+
# Analyze session errors and suggest improvements
|
|
11
|
+
|
|
12
|
+
Perform a comprehensive analysis of errors encountered during the current or previous session and generate actionable improvement suggestions.
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
/mpm-postmortem [options]
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Description
|
|
21
|
+
|
|
22
|
+
The postmortem command analyzes errors from:
|
|
23
|
+
- Script execution failures
|
|
24
|
+
- Skill execution issues
|
|
25
|
+
- Agent instruction problems
|
|
26
|
+
- User code errors (analysis only)
|
|
27
|
+
|
|
28
|
+
It categorizes errors, identifies root causes, and generates actionable improvements:
|
|
29
|
+
- **Scripts**: Tests and fixes in place
|
|
30
|
+
- **Skills**: Updates skill files with improvements
|
|
31
|
+
- **MPM Agents**: Prepares PRs with rationale for remote agent repository
|
|
32
|
+
- **User Code**: Provides suggestions without modification
|
|
33
|
+
|
|
34
|
+
## Options
|
|
35
|
+
|
|
36
|
+
- `--dry-run`: Preview analysis without making changes (default for destructive operations)
|
|
37
|
+
- `--auto-fix`: Automatically apply fixes to scripts and skills
|
|
38
|
+
- `--create-prs`: Create pull requests for agent improvements
|
|
39
|
+
- `--session-id <id>`: Analyze specific session (default: current session)
|
|
40
|
+
- `--format <format>`: Output format: terminal, json, markdown (default: terminal)
|
|
41
|
+
- `--output <file>`: Save report to file
|
|
42
|
+
- `--verbose`: Include detailed error traces and analysis
|
|
43
|
+
|
|
44
|
+
## Examples
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# Analyze current session
|
|
48
|
+
/mpm-postmortem
|
|
49
|
+
|
|
50
|
+
# Preview changes without applying
|
|
51
|
+
/mpm-postmortem --dry-run
|
|
52
|
+
|
|
53
|
+
# Auto-fix scripts and skills
|
|
54
|
+
/mpm-postmortem --auto-fix
|
|
55
|
+
|
|
56
|
+
# Create PRs for agent improvements
|
|
57
|
+
/mpm-postmortem --create-prs
|
|
58
|
+
|
|
59
|
+
# Analyze specific session
|
|
60
|
+
/mpm-postmortem --session-id 2025-12-03-143000
|
|
61
|
+
|
|
62
|
+
# Save detailed report
|
|
63
|
+
/mpm-postmortem --verbose --output postmortem-report.md
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Expected Output
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
📊 Session Postmortem Analysis
|
|
70
|
+
═══════════════════════════════
|
|
71
|
+
|
|
72
|
+
Session: 2025-12-03-143000
|
|
73
|
+
Duration: 45 minutes
|
|
74
|
+
Errors Found: 3
|
|
75
|
+
|
|
76
|
+
🔧 Script Errors (1)
|
|
77
|
+
─────────────────────
|
|
78
|
+
• manage_version.py line 42: KeyError 'version'
|
|
79
|
+
Root Cause: Missing default value handling for optional configuration
|
|
80
|
+
Fix: Add fallback to default value when key not present
|
|
81
|
+
Status: Fixed ✓
|
|
82
|
+
|
|
83
|
+
📚 Skill Errors (0)
|
|
84
|
+
──────────────────
|
|
85
|
+
No skill errors detected
|
|
86
|
+
|
|
87
|
+
🤖 Agent Improvements (2)
|
|
88
|
+
──────────────────────────
|
|
89
|
+
• ticketing agent: Timeout on large ticket lists
|
|
90
|
+
Issue: Default timeout too short for projects with 500+ tickets
|
|
91
|
+
Improvement: Add pagination support and increase timeout threshold
|
|
92
|
+
PR: Created #123 (awaiting review)
|
|
93
|
+
|
|
94
|
+
• engineer agent: Type validation missing for tool parameters
|
|
95
|
+
Issue: Invalid parameters passed to Edit tool causing failures
|
|
96
|
+
Improvement: Add parameter validation before tool invocation
|
|
97
|
+
Status: Ready to create PR (use --create-prs)
|
|
98
|
+
|
|
99
|
+
💡 User Code Suggestions (0)
|
|
100
|
+
────────────────────────────
|
|
101
|
+
No user code issues detected
|
|
102
|
+
|
|
103
|
+
📈 Summary
|
|
104
|
+
──────────
|
|
105
|
+
Total Errors: 3
|
|
106
|
+
Fixed: 1
|
|
107
|
+
PRs Created: 1
|
|
108
|
+
Suggestions: 1
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Safety Features
|
|
112
|
+
|
|
113
|
+
- **Dry-run by default**: Preview changes before applying
|
|
114
|
+
- **Confirmation prompts**: Verify before creating PRs
|
|
115
|
+
- **Backup before modifications**: Automatic backup of modified files
|
|
116
|
+
- **Rollback capability**: Restore previous versions if needed
|
|
117
|
+
- **Git integration**: Check for uncommitted changes before modifications
|
|
118
|
+
|
|
119
|
+
## Related Commands
|
|
120
|
+
|
|
121
|
+
- `/mpm-doctor`: Diagnose installation and configuration issues
|
|
122
|
+
- `/mpm-session-resume`: Resume previous session with context
|
|
123
|
+
- `/mpm-status`: View current system status
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
namespace: mpm/session
|
|
3
3
|
command: resume
|
|
4
|
-
aliases: [mpm-session-resume
|
|
4
|
+
aliases: [mpm-session-resume]
|
|
5
5
|
migration_target: /mpm/session:resume
|
|
6
6
|
category: session
|
|
7
|
-
deprecated_aliases: []
|
|
7
|
+
deprecated_aliases: [mpm-resume]
|
|
8
8
|
description: Load and display context from most recent paused session to continue work
|
|
9
9
|
---
|
|
10
10
|
# /mpm-resume - Load Previous Session
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
namespace: mpm/ticket
|
|
3
3
|
command: organize
|
|
4
|
-
aliases: [mpm-ticket-organize
|
|
4
|
+
aliases: [mpm-ticket-organize]
|
|
5
5
|
migration_target: /mpm/ticket:organize
|
|
6
6
|
category: tickets
|
|
7
|
-
deprecated_aliases: []
|
|
7
|
+
deprecated_aliases: [mpm-organize]
|
|
8
8
|
description: Organize project files into proper directories with intelligent pattern detection
|
|
9
9
|
---
|
|
10
10
|
# /mpm-organize
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
namespace: mpm/ticket
|
|
3
3
|
command: view
|
|
4
|
-
aliases: [mpm-ticket-view
|
|
4
|
+
aliases: [mpm-ticket-view]
|
|
5
5
|
migration_target: /mpm/ticket:view
|
|
6
6
|
category: tickets
|
|
7
|
-
deprecated_aliases: []
|
|
7
|
+
deprecated_aliases: [mpm-ticket]
|
|
8
8
|
description: Orchestrate ticketing agent for comprehensive project management workflows
|
|
9
9
|
---
|
|
10
10
|
# /mpm-ticket - Ticketing Workflow Management
|