claude-mpm 5.4.96__py3-none-any.whl → 5.6.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. claude_mpm/VERSION +1 -1
  2. claude_mpm/agents/{CLAUDE_MPM_FOUNDERS_OUTPUT_STYLE.md → CLAUDE_MPM_RESEARCH_OUTPUT_STYLE.md} +14 -6
  3. claude_mpm/agents/PM_INSTRUCTIONS.md +36 -7
  4. claude_mpm/agents/WORKFLOW.md +2 -0
  5. claude_mpm/agents/templates/circuit-breakers.md +26 -17
  6. claude_mpm/cli/commands/autotodos.py +45 -5
  7. claude_mpm/cli/commands/commander.py +46 -0
  8. claude_mpm/cli/commands/hook_errors.py +60 -60
  9. claude_mpm/cli/commands/run.py +35 -3
  10. claude_mpm/cli/executor.py +32 -17
  11. claude_mpm/cli/parsers/base_parser.py +17 -0
  12. claude_mpm/cli/parsers/commander_parser.py +83 -0
  13. claude_mpm/cli/parsers/run_parser.py +10 -0
  14. claude_mpm/cli/startup.py +20 -2
  15. claude_mpm/cli/utils.py +7 -3
  16. claude_mpm/commander/__init__.py +72 -0
  17. claude_mpm/commander/adapters/__init__.py +31 -0
  18. claude_mpm/commander/adapters/base.py +191 -0
  19. claude_mpm/commander/adapters/claude_code.py +361 -0
  20. claude_mpm/commander/adapters/communication.py +366 -0
  21. claude_mpm/commander/api/__init__.py +16 -0
  22. claude_mpm/commander/api/app.py +105 -0
  23. claude_mpm/commander/api/errors.py +112 -0
  24. claude_mpm/commander/api/routes/__init__.py +8 -0
  25. claude_mpm/commander/api/routes/events.py +184 -0
  26. claude_mpm/commander/api/routes/inbox.py +171 -0
  27. claude_mpm/commander/api/routes/messages.py +148 -0
  28. claude_mpm/commander/api/routes/projects.py +271 -0
  29. claude_mpm/commander/api/routes/sessions.py +215 -0
  30. claude_mpm/commander/api/routes/work.py +260 -0
  31. claude_mpm/commander/api/schemas.py +182 -0
  32. claude_mpm/commander/chat/__init__.py +7 -0
  33. claude_mpm/commander/chat/cli.py +107 -0
  34. claude_mpm/commander/chat/commands.py +96 -0
  35. claude_mpm/commander/chat/repl.py +310 -0
  36. claude_mpm/commander/config.py +49 -0
  37. claude_mpm/commander/config_loader.py +115 -0
  38. claude_mpm/commander/daemon.py +398 -0
  39. claude_mpm/commander/events/__init__.py +26 -0
  40. claude_mpm/commander/events/manager.py +332 -0
  41. claude_mpm/commander/frameworks/__init__.py +12 -0
  42. claude_mpm/commander/frameworks/base.py +143 -0
  43. claude_mpm/commander/frameworks/claude_code.py +58 -0
  44. claude_mpm/commander/frameworks/mpm.py +62 -0
  45. claude_mpm/commander/inbox/__init__.py +16 -0
  46. claude_mpm/commander/inbox/dedup.py +128 -0
  47. claude_mpm/commander/inbox/inbox.py +224 -0
  48. claude_mpm/commander/inbox/models.py +70 -0
  49. claude_mpm/commander/instance_manager.py +337 -0
  50. claude_mpm/commander/llm/__init__.py +6 -0
  51. claude_mpm/commander/llm/openrouter_client.py +167 -0
  52. claude_mpm/commander/llm/summarizer.py +70 -0
  53. claude_mpm/commander/models/__init__.py +18 -0
  54. claude_mpm/commander/models/events.py +121 -0
  55. claude_mpm/commander/models/project.py +162 -0
  56. claude_mpm/commander/models/work.py +214 -0
  57. claude_mpm/commander/parsing/__init__.py +20 -0
  58. claude_mpm/commander/parsing/extractor.py +132 -0
  59. claude_mpm/commander/parsing/output_parser.py +270 -0
  60. claude_mpm/commander/parsing/patterns.py +100 -0
  61. claude_mpm/commander/persistence/__init__.py +11 -0
  62. claude_mpm/commander/persistence/event_store.py +274 -0
  63. claude_mpm/commander/persistence/state_store.py +309 -0
  64. claude_mpm/commander/persistence/work_store.py +164 -0
  65. claude_mpm/commander/polling/__init__.py +13 -0
  66. claude_mpm/commander/polling/event_detector.py +104 -0
  67. claude_mpm/commander/polling/output_buffer.py +49 -0
  68. claude_mpm/commander/polling/output_poller.py +153 -0
  69. claude_mpm/commander/project_session.py +268 -0
  70. claude_mpm/commander/proxy/__init__.py +12 -0
  71. claude_mpm/commander/proxy/formatter.py +89 -0
  72. claude_mpm/commander/proxy/output_handler.py +191 -0
  73. claude_mpm/commander/proxy/relay.py +155 -0
  74. claude_mpm/commander/registry.py +404 -0
  75. claude_mpm/commander/runtime/__init__.py +10 -0
  76. claude_mpm/commander/runtime/executor.py +191 -0
  77. claude_mpm/commander/runtime/monitor.py +316 -0
  78. claude_mpm/commander/session/__init__.py +6 -0
  79. claude_mpm/commander/session/context.py +81 -0
  80. claude_mpm/commander/session/manager.py +59 -0
  81. claude_mpm/commander/tmux_orchestrator.py +361 -0
  82. claude_mpm/commander/web/__init__.py +1 -0
  83. claude_mpm/commander/work/__init__.py +30 -0
  84. claude_mpm/commander/work/executor.py +189 -0
  85. claude_mpm/commander/work/queue.py +405 -0
  86. claude_mpm/commander/workflow/__init__.py +27 -0
  87. claude_mpm/commander/workflow/event_handler.py +219 -0
  88. claude_mpm/commander/workflow/notifier.py +146 -0
  89. claude_mpm/commands/mpm-config.md +8 -0
  90. claude_mpm/commands/mpm-doctor.md +8 -0
  91. claude_mpm/commands/mpm-help.md +8 -0
  92. claude_mpm/commands/mpm-init.md +8 -0
  93. claude_mpm/commands/mpm-monitor.md +8 -0
  94. claude_mpm/commands/mpm-organize.md +8 -0
  95. claude_mpm/commands/mpm-postmortem.md +8 -0
  96. claude_mpm/commands/mpm-session-resume.md +8 -0
  97. claude_mpm/commands/mpm-status.md +8 -0
  98. claude_mpm/commands/mpm-ticket-view.md +8 -0
  99. claude_mpm/commands/mpm-version.md +8 -0
  100. claude_mpm/commands/mpm.md +8 -0
  101. claude_mpm/config/agent_presets.py +8 -7
  102. claude_mpm/core/config.py +5 -0
  103. claude_mpm/core/logger.py +26 -9
  104. claude_mpm/core/logging_utils.py +35 -11
  105. claude_mpm/core/output_style_manager.py +15 -5
  106. claude_mpm/core/unified_config.py +10 -6
  107. claude_mpm/core/unified_paths.py +68 -80
  108. claude_mpm/experimental/cli_enhancements.py +2 -1
  109. claude_mpm/hooks/claude_hooks/event_handlers.py +90 -99
  110. claude_mpm/hooks/claude_hooks/hook_handler.py +81 -88
  111. claude_mpm/hooks/claude_hooks/hook_wrapper.sh +6 -11
  112. claude_mpm/hooks/claude_hooks/installer.py +75 -8
  113. claude_mpm/hooks/claude_hooks/memory_integration.py +22 -11
  114. claude_mpm/hooks/claude_hooks/services/connection_manager_http.py +14 -77
  115. claude_mpm/scripts/claude-hook-handler.sh +39 -12
  116. claude_mpm/services/agents/agent_recommendation_service.py +8 -8
  117. claude_mpm/services/agents/loading/framework_agent_loader.py +75 -2
  118. claude_mpm/services/event_log.py +8 -0
  119. claude_mpm/services/pm_skills_deployer.py +84 -6
  120. claude_mpm/services/skills/git_skill_source_manager.py +51 -2
  121. claude_mpm/services/skills/skill_discovery_service.py +57 -3
  122. claude_mpm/skills/bundled/pm/mpm/SKILL.md +38 -0
  123. claude_mpm/skills/bundled/pm/mpm-config/SKILL.md +29 -0
  124. claude_mpm/skills/bundled/pm/mpm-doctor/SKILL.md +53 -0
  125. claude_mpm/skills/bundled/pm/mpm-help/SKILL.md +35 -0
  126. claude_mpm/skills/bundled/pm/mpm-init/SKILL.md +125 -0
  127. claude_mpm/skills/bundled/pm/mpm-monitor/SKILL.md +32 -0
  128. claude_mpm/skills/bundled/pm/mpm-organize/SKILL.md +121 -0
  129. claude_mpm/skills/bundled/pm/mpm-postmortem/SKILL.md +22 -0
  130. claude_mpm/skills/bundled/pm/mpm-session-resume/SKILL.md +31 -0
  131. claude_mpm/skills/bundled/pm/mpm-status/SKILL.md +37 -0
  132. claude_mpm/skills/bundled/pm/mpm-ticket-view/SKILL.md +110 -0
  133. claude_mpm/skills/bundled/pm/mpm-version/SKILL.md +21 -0
  134. {claude_mpm-5.4.96.dist-info → claude_mpm-5.6.4.dist-info}/METADATA +18 -4
  135. {claude_mpm-5.4.96.dist-info → claude_mpm-5.6.4.dist-info}/RECORD +140 -68
  136. claude_mpm/hooks/claude_hooks/__pycache__/__init__.cpython-311.pyc +0 -0
  137. claude_mpm/hooks/claude_hooks/__pycache__/auto_pause_handler.cpython-311.pyc +0 -0
  138. claude_mpm/hooks/claude_hooks/__pycache__/correlation_manager.cpython-311.pyc +0 -0
  139. claude_mpm/hooks/claude_hooks/__pycache__/event_handlers.cpython-311.pyc +0 -0
  140. claude_mpm/hooks/claude_hooks/__pycache__/hook_handler.cpython-311.pyc +0 -0
  141. claude_mpm/hooks/claude_hooks/__pycache__/installer.cpython-311.pyc +0 -0
  142. claude_mpm/hooks/claude_hooks/__pycache__/memory_integration.cpython-311.pyc +0 -0
  143. claude_mpm/hooks/claude_hooks/__pycache__/response_tracking.cpython-311.pyc +0 -0
  144. claude_mpm/hooks/claude_hooks/__pycache__/tool_analysis.cpython-311.pyc +0 -0
  145. claude_mpm/hooks/claude_hooks/services/__pycache__/__init__.cpython-311.pyc +0 -0
  146. claude_mpm/hooks/claude_hooks/services/__pycache__/connection_manager.cpython-311.pyc +0 -0
  147. claude_mpm/hooks/claude_hooks/services/__pycache__/connection_manager_http.cpython-311.pyc +0 -0
  148. claude_mpm/hooks/claude_hooks/services/__pycache__/duplicate_detector.cpython-311.pyc +0 -0
  149. claude_mpm/hooks/claude_hooks/services/__pycache__/state_manager.cpython-311.pyc +0 -0
  150. claude_mpm/hooks/claude_hooks/services/__pycache__/subagent_processor.cpython-311.pyc +0 -0
  151. {claude_mpm-5.4.96.dist-info → claude_mpm-5.6.4.dist-info}/WHEEL +0 -0
  152. {claude_mpm-5.4.96.dist-info → claude_mpm-5.6.4.dist-info}/entry_points.txt +0 -0
  153. {claude_mpm-5.4.96.dist-info → claude_mpm-5.6.4.dist-info}/licenses/LICENSE +0 -0
  154. {claude_mpm-5.4.96.dist-info → claude_mpm-5.6.4.dist-info}/licenses/LICENSE-FAQ.md +0 -0
  155. {claude_mpm-5.4.96.dist-info → claude_mpm-5.6.4.dist-info}/top_level.txt +0 -0
@@ -163,10 +163,22 @@ class SkillDiscoveryService:
163
163
  skill_md_files = list(self.skills_dir.rglob("SKILL.md"))
164
164
 
165
165
  # Also find legacy *.md files in top-level directory for backward compatibility
166
+ # Exclude common non-skill documentation files
167
+ excluded_filenames = {
168
+ "skill.md", # Case variations of SKILL.md
169
+ "readme.md",
170
+ "claude.md",
171
+ "contributing.md",
172
+ "changelog.md",
173
+ "license.md",
174
+ "authors.md",
175
+ "code_of_conduct.md",
176
+ }
177
+
166
178
  legacy_md_files = [
167
179
  f
168
180
  for f in self.skills_dir.glob("*.md")
169
- if f.name != "SKILL.md" and f.name.lower() != "readme.md"
181
+ if f.name.lower() not in excluded_filenames
170
182
  ]
171
183
 
172
184
  all_skill_files = skill_md_files + legacy_md_files
@@ -255,7 +267,35 @@ class SkillDiscoveryService:
255
267
  try:
256
268
  frontmatter, body = self._extract_frontmatter(content)
257
269
  except Exception as e:
258
- self.logger.warning(f"No valid frontmatter in {skill_file.name}: {e}")
270
+ # Only log as debug for documentation files to reduce noise
271
+ # Common documentation files (CLAUDE.md, README.md) are expected to lack skill frontmatter
272
+ relative_path = (
273
+ skill_file.relative_to(self.skills_dir)
274
+ if skill_file.is_relative_to(self.skills_dir)
275
+ else skill_file
276
+ )
277
+
278
+ # Check if this looks like a documentation file
279
+ is_documentation = any(
280
+ doc_pattern in skill_file.name.lower()
281
+ for doc_pattern in [
282
+ "readme",
283
+ "claude",
284
+ "contributing",
285
+ "changelog",
286
+ "license",
287
+ ]
288
+ )
289
+
290
+ if is_documentation:
291
+ self.logger.debug(
292
+ f"Skipping documentation file {relative_path} (no skill frontmatter): {e}"
293
+ )
294
+ else:
295
+ # For actual skill files with invalid YAML, use warning level
296
+ self.logger.warning(
297
+ f"Failed to parse skill frontmatter in {relative_path}: {e}"
298
+ )
259
299
  return None
260
300
 
261
301
  # Validate required fields
@@ -354,10 +394,24 @@ class SkillDiscoveryService:
354
394
  frontmatter_text = match.group(1)
355
395
  body = match.group(2)
356
396
 
357
- # Parse YAML
397
+ # Parse YAML with improved error handling
358
398
  try:
359
399
  frontmatter = yaml.safe_load(frontmatter_text)
360
400
  except yaml.YAMLError as e:
401
+ # Provide more specific error message with context
402
+ error_line = getattr(e, "problem_mark", None)
403
+ if error_line:
404
+ line_num = error_line.line + 1
405
+ col_num = error_line.column + 1
406
+ # Extract problematic line for context
407
+ lines = frontmatter_text.split("\n")
408
+ problem_line = (
409
+ lines[error_line.line] if error_line.line < len(lines) else ""
410
+ )
411
+ raise ValueError(
412
+ f"Invalid YAML in frontmatter at line {line_num}, column {col_num}: {e.problem}\n"
413
+ f" Problematic line: {problem_line.strip()}"
414
+ ) from e
361
415
  raise ValueError(f"Invalid YAML in frontmatter: {e}") from e
362
416
 
363
417
  if not isinstance(frontmatter, dict):
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: mpm
3
+ description: Access Claude MPM functionality and manage multi-agent orchestration
4
+ user-invocable: true
5
+ version: "1.0.0"
6
+ category: mpm-command
7
+ tags: [mpm-command, system, pm-required]
8
+ ---
9
+
10
+ # /mpm
11
+
12
+ Access Claude MPM functionality and manage your multi-agent orchestration.
13
+
14
+ ## Available MPM Commands
15
+
16
+ - `/mpm-agents` - Show available agents and versions
17
+ - `/mpm-doctor` - Run diagnostic checks
18
+ - `/mpm-help` - Show command help
19
+ - `/mpm-status` - Show MPM status
20
+ - `/mpm-ticket` - Ticketing workflow management (organize, proceed, status, update, project)
21
+ - `/mpm-config` - Manage configuration
22
+ - `/mpm-resume` - Create session resume files
23
+ - `/mpm-version` - Display version information for project, agents, and skills
24
+
25
+ ## What is Claude MPM?
26
+
27
+ Claude MPM extends Claude Code with:
28
+ - **Multi-agent orchestration** - Delegate work to specialized agents
29
+ - **Project-specific PM instructions** - Tailored guidance for your project
30
+ - **Agent memory management** - Context-aware agent interactions
31
+ - **WebSocket monitoring** - Real-time system monitoring
32
+ - **Hook system for automation** - Automate workflows and tasks
33
+
34
+ ## Quick Start
35
+
36
+ Use `/mpm-help` to explore commands or `/mpm-status` to check system health.
37
+
38
+ For more information, use `/mpm-help [command]` for specific command details.
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: mpm-config
3
+ description: Manage Claude MPM configuration
4
+ user-invocable: true
5
+ version: "1.0.0"
6
+ category: mpm-command
7
+ tags: [mpm-command, config, pm-recommended]
8
+ ---
9
+
10
+ # /mpm-config
11
+
12
+ Unified configuration management with auto-detection.
13
+
14
+ ## Usage
15
+ ```
16
+ /mpm-config [auto|view|validate|status] [options]
17
+ ```
18
+
19
+ **Modes:**
20
+ - `auto` (default): Auto-detect toolchain and configure agents/skills
21
+ - `view`: Display current configuration
22
+ - `validate`: Check configuration validity
23
+ - `status`: Show configuration health
24
+
25
+ **Key Options:**
26
+ - `--yes`: Auto-deploy without confirmation
27
+ - `--preview`: Show recommendations only
28
+
29
+ See docs/commands/config.md for full options.
@@ -0,0 +1,53 @@
1
+ ---
2
+ name: mpm-doctor
3
+ description: Run diagnostic checks on Claude MPM installation
4
+ user-invocable: true
5
+ version: "1.0.0"
6
+ category: mpm-command
7
+ tags: [mpm-command, system, pm-required, diagnostics, troubleshooting]
8
+ ---
9
+
10
+ # /mpm-doctor
11
+
12
+ Run comprehensive diagnostics on Claude MPM installation.
13
+
14
+ ## Usage
15
+
16
+ ```
17
+ /mpm-doctor [--verbose] [--fix]
18
+ ```
19
+
20
+ ## Options
21
+
22
+ - `--verbose`: Show detailed diagnostic output
23
+ - `--fix`: Attempt to automatically fix detected issues
24
+
25
+ ## What It Checks
26
+
27
+ - **Installation**: MPM package installation and version
28
+ - **Configuration**: Config file validity and required settings
29
+ - **WebSocket**: WebSocket server connectivity and health
30
+ - **Agents**: Agent availability and configuration
31
+ - **Memory**: Memory system health and accessibility
32
+ - **Hooks**: Hook system setup and functionality
33
+
34
+ ## When to Use
35
+
36
+ - After initial MPM installation (verify setup)
37
+ - When experiencing issues with commands or delegation
38
+ - Before reporting bugs (gather diagnostic information)
39
+ - After configuration changes (verify correctness)
40
+ - When WebSocket monitoring isn't working
41
+
42
+ ## Example Output
43
+
44
+ ```
45
+ ✅ MPM Installation: OK (v5.4.105)
46
+ ✅ Configuration: Valid
47
+ ⚠️ WebSocket Server: Not running (start with /mpm-monitor start)
48
+ ✅ Agents: 15 available
49
+ ✅ Memory System: Healthy
50
+ ✅ Hooks: Configured
51
+ ```
52
+
53
+ See docs/commands/doctor.md for details.
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: mpm-help
3
+ description: Display help for Claude MPM commands
4
+ user-invocable: true
5
+ version: "1.0.0"
6
+ category: mpm-command
7
+ tags: [mpm-command, system, pm-required, documentation]
8
+ ---
9
+
10
+ # /mpm-help
11
+
12
+ Show help for MPM commands. Delegates to PM agent.
13
+
14
+ ## Usage
15
+
16
+ ```
17
+ /mpm-help [command]
18
+ ```
19
+
20
+ ## Examples
21
+
22
+ ```
23
+ /mpm-help # Show all available commands
24
+ /mpm-help mpm-init # Show detailed help for mpm-init
25
+ /mpm-help mpm-ticket # Show ticketing workflow help
26
+ ```
27
+
28
+ ## What It Provides
29
+
30
+ - **Command listing**: All available MPM commands
31
+ - **Command details**: Syntax, options, and usage examples
32
+ - **Delegation patterns**: Which agent handles which command
33
+ - **Workflow guidance**: Common command sequences and workflows
34
+
35
+ See docs/commands/help.md for full command reference.
@@ -0,0 +1,125 @@
1
+ ---
2
+ name: mpm-init
3
+ description: Initialize or update project for Claude Code and MPM
4
+ user-invocable: true
5
+ version: "1.0.0"
6
+ category: mpm-command
7
+ tags: [mpm-command, system, pm-required, setup]
8
+ ---
9
+
10
+ # /mpm-init
11
+
12
+ Initialize or intelligently update project for Claude Code and Claude MPM.
13
+
14
+ ## Usage
15
+
16
+ ```
17
+ /mpm-init [update|context|resume|catchup] [options]
18
+ ```
19
+
20
+ ## Core Modes
21
+
22
+ ### Project Setup
23
+
24
+ ```
25
+ /mpm-init # Auto-detect: offer update or create
26
+ /mpm-init update # Quick update (30-day git activity)
27
+ /mpm-init --update # Full documentation refresh
28
+ /mpm-init --force # Force recreate from scratch
29
+ ```
30
+
31
+ **Delegates to Agentic Coder Optimizer agent** for:
32
+ - CLAUDE.md creation/update (with priority rankings 🔴🟡🟢⚪)
33
+ - AST analysis and code structure docs
34
+ - Single-path workflows (ONE way to do ANYTHING)
35
+ - Tool configuration, memory system, gitignore management
36
+
37
+ **Smart Update Mode:** Auto-detects existing CLAUDE.md and offers update vs recreate.
38
+
39
+ ### Context Analysis
40
+
41
+ ```
42
+ /mpm-init context [--days N] # Intelligent git history analysis (default: 7 days)
43
+ /mpm-init catchup # Quick commit history (last 25 commits, no analysis)
44
+ ```
45
+
46
+ **context:** Delegates to Research agent for deep analysis of:
47
+ - Active work streams (from commit patterns)
48
+ - Intent and motivation (from messages)
49
+ - Risks and blockers
50
+ - Recommended next actions
51
+
52
+ **catchup:** Direct CLI execution, instant output.
53
+
54
+ ### Resume from Logs
55
+
56
+ ```
57
+ /mpm-init resume [--list] [--session-id ID]
58
+ ```
59
+
60
+ Reads stop event logs from `.claude-mpm/resume-logs/` and `.claude-mpm/responses/` showing:
61
+ - What was being worked on
62
+ - Tasks completed, files modified
63
+ - Next steps, stop reason, token usage
64
+ - Git context (branch, status)
65
+
66
+ ## Key Options
67
+
68
+ **Configuration:**
69
+ - `--project-type TYPE`: web, api, cli, library
70
+ - `--framework NAME`: react, django, fastapi, etc.
71
+ - `--ast-analysis` / `--no-ast-analysis`: Enable/disable code analysis
72
+ - `--comprehensive` / `--minimal`: Full setup vs CLAUDE.md only
73
+
74
+ **Organization:**
75
+ - `--organize`: Organize misplaced files
76
+ - `--preserve-custom`: Keep custom sections (default)
77
+ - `--review`: Review without changes
78
+
79
+ ## What Gets Created
80
+
81
+ **New Projects:**
82
+ - ✅ CLAUDE.md (priority-ranked instructions)
83
+ - ✅ Single-path workflows (make build/test/deploy)
84
+ - ✅ Tool configs (linting, formatting, testing)
85
+ - ✅ Memory system (.claude-mpm/memories/)
86
+ - ✅ DEVELOPER.md, CODE_STRUCTURE.md (with AST)
87
+ - ✅ .gitignore updates (auto-adds .claude-mpm/)
88
+
89
+ **Updates:**
90
+ - ✅ Smart merging (preserves custom sections)
91
+ - ✅ Automatic archival (docs/_archive/)
92
+ - ✅ Change tracking
93
+
94
+ ## Examples
95
+
96
+ ```bash
97
+ # Quick start
98
+ /mpm-init # Auto-detect mode
99
+
100
+ # Quick update (lightweight)
101
+ /mpm-init update # 30-day activity report
102
+
103
+ # Resume work
104
+ /mpm-init context --days 14 # Analyze last 2 weeks
105
+ /mpm-init resume # Show latest session from logs
106
+ /mpm-init catchup # Quick commit history
107
+
108
+ # Full configuration
109
+ /mpm-init --project-type web --framework react --comprehensive
110
+ ```
111
+
112
+ ## Implementation Notes
113
+
114
+ **Delegation patterns:**
115
+ - **Project init/update:** → Agentic Coder Optimizer agent
116
+ - **context:** → PM → Research agent (structured analysis)
117
+ - **catchup:** → Direct CLI (git log wrapper)
118
+ - **resume:** → PM (reads logs, no delegation)
119
+
120
+ **Token budgets:**
121
+ - context analysis: 10-30s processing time
122
+ - resume display: ~10-20k tokens
123
+ - catchup: instant, minimal tokens
124
+
125
+ See docs/commands/init.md for comprehensive documentation.
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: mpm-monitor
3
+ description: Control monitoring server and dashboard
4
+ user-invocable: true
5
+ version: "1.0.0"
6
+ category: mpm-command
7
+ tags: [mpm-command, system, pm-optional]
8
+ ---
9
+
10
+ # /mpm-monitor
11
+
12
+ Manage Socket.IO monitoring server for real-time dashboard.
13
+
14
+ ## Usage
15
+ ```
16
+ /mpm-monitor [start|stop|restart|status|port] [options]
17
+ ```
18
+
19
+ **Subcommands:**
20
+ - `start`: Start server (auto-selects port 8765-8785)
21
+ - `stop`: Stop running server
22
+ - `status`: Show server status
23
+ - `port <PORT>`: Start on specific port
24
+
25
+ **Key Options:**
26
+ - `--port PORT`: Specific port
27
+ - `--force`: Force kill to reclaim port
28
+ - `--foreground`: Run in foreground (default: background)
29
+
30
+ Dashboard: http://localhost:8766
31
+
32
+ See docs/commands/monitor.md for details.
@@ -0,0 +1,121 @@
1
+ ---
2
+ name: mpm-organize
3
+ description: Organize project files with intelligent consolidation
4
+ user-invocable: true
5
+ version: "1.0.0"
6
+ category: mpm-command
7
+ tags: [mpm-command, system, pm-optional]
8
+ ---
9
+
10
+ # /mpm-organize
11
+
12
+ Organize ALL project files with intelligent detection, consolidation, and pruning.
13
+
14
+ ## Usage
15
+ ```
16
+ /mpm-organize [--dry-run] [--force] [options]
17
+ ```
18
+
19
+ **Delegates to Project Organizer agent** for comprehensive file organization.
20
+
21
+ ## Scope
22
+
23
+ **Default:** Organizes ALL project files
24
+ - Documentation (.md, .rst, .txt)
25
+ - Source code (proper module structure)
26
+ - Tests (organized test suites)
27
+ - Scripts (scripts/ directory)
28
+ - Configuration (appropriate locations)
29
+
30
+ **Protected files (never moved):** README.md, package.json, pyproject.toml, Makefile, .gitignore, etc.
31
+
32
+ ## Key Options
33
+
34
+ **Safety:**
35
+ - `--dry-run`: Preview without changes (recommended first run)
36
+ - `--force`: Proceed with uncommitted changes
37
+ - `--no-backup`: Skip backup (not recommended)
38
+
39
+ **Scope:**
40
+ - `--docs-only`: Only documentation (legacy behavior)
41
+ - `--code-only` / `--tests-only` / `--scripts-only`: Specific file types
42
+
43
+ **Operations:**
44
+ - `--consolidate-only`: Merge duplicates only
45
+ - `--prune-only`: Remove stale files only
46
+ - `--no-prune`: Keep all files (no deletions)
47
+
48
+ ## What It Does
49
+
50
+ 1. **Pattern Detection:** Scans for existing organization (PROJECT_ORGANIZATION.md, framework conventions)
51
+ 2. **Consolidation:** Merges duplicates (READMEs, guides, utilities)
52
+ 3. **Pruning:** Archives/removes stale content (>6 months old, empty files)
53
+ 4. **Categorization:** Sorts docs into research/user/developer
54
+ 5. **Safe Movement:** Uses `git mv` to preserve history
55
+ 6. **Backup:** Creates backup_project_YYYYMMDD_HHMMSS.tar.gz
56
+
57
+ ## Standard Structure
58
+
59
+ ```
60
+ docs/
61
+ ├── research/ # Spikes, analysis, notes
62
+ ├── user/ # Guides, tutorials, FAQs
63
+ └── developer/ # API docs, architecture, contributing
64
+
65
+ src/<package>/ # Proper module structure
66
+ tests/ # Mirrored source structure
67
+ scripts/ # Automation tools
68
+ config/ # Configuration (if needed)
69
+ ```
70
+
71
+ ## Examples
72
+
73
+ ```bash
74
+ # Preview changes (recommended first)
75
+ /mpm-organize --dry-run
76
+
77
+ # Organize everything with backup
78
+ /mpm-organize
79
+
80
+ # Documentation only
81
+ /mpm-organize --docs-only --dry-run
82
+
83
+ # Consolidate without pruning
84
+ /mpm-organize --consolidate-only --no-prune
85
+
86
+ # Save report
87
+ /mpm-organize --report /tmp/organize-report.md
88
+ ```
89
+
90
+ ## Expected Output
91
+
92
+ ```
93
+ 🔍 Analyzing project structure...
94
+ ✓ Detected PROJECT_ORGANIZATION.md - using project standards
95
+ ✓ Found 23 documentation files, 15 test files, 8 scripts
96
+
97
+ 📁 Proposed Changes:
98
+
99
+ Consolidate:
100
+ → Merge README_OLD.md + README_BACKUP.md → docs/user/README.md
101
+
102
+ Organize:
103
+ docs/research/ ← spike-oauth.md (from root)
104
+ tests/unit/ ← test_auth.py (from root)
105
+ scripts/ ← deploy.sh (from root)
106
+
107
+ Prune:
108
+ ✂ Remove TODO_2023.md (stale 18 months)
109
+
110
+ 📊 Summary: 8 to move, 2 to merge, 3 to prune
111
+ ```
112
+
113
+ ## Safety Features
114
+
115
+ - Full project backup before changes
116
+ - Git integration (preserves history)
117
+ - Import validation (ensures moves won't break code)
118
+ - Protected files never touched
119
+ - Conservative pruning (archive when unsure)
120
+
121
+ See docs/commands/organize.md for full documentation.
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: mpm-postmortem
3
+ description: Analyze session errors and suggest improvements
4
+ user-invocable: true
5
+ version: "1.0.0"
6
+ category: mpm-command
7
+ tags: [mpm-command, analysis, pm-recommended]
8
+ ---
9
+
10
+ # /mpm-postmortem
11
+
12
+ Analyze session errors and generate improvement suggestions.
13
+
14
+ ## Usage
15
+ ```
16
+ /mpm-postmortem [--auto-fix] [--create-prs] [--dry-run]
17
+ ```
18
+
19
+ Analyzes errors from: scripts, skills, agents, user code.
20
+ Generates: fixes, updates, PR recommendations, suggestions.
21
+
22
+ See docs/commands/postmortem.md for details.
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: mpm-session-resume
3
+ description: Load context from paused session
4
+ user-invocable: true
5
+ version: "1.0.0"
6
+ category: mpm-command
7
+ tags: [mpm-command, session, pm-recommended]
8
+ ---
9
+
10
+ # /mpm-session-resume
11
+
12
+ Load and display context from most recent paused session.
13
+
14
+ ## Usage
15
+ ```
16
+ /mpm-resume
17
+ ```
18
+
19
+ **What it shows:**
20
+ - Session summary and time elapsed
21
+ - Completed work and current tasks
22
+ - Git context and recent commits
23
+ - Next recommended actions
24
+
25
+ **Session location:** `.claude-mpm/sessions/session-*.md`
26
+
27
+ **Token usage:** ~20-40k tokens (10-20% of context budget)
28
+
29
+ **Note:** Reads existing sessions (created automatically at 70% context). Does NOT create new files.
30
+
31
+ See docs/features/session-auto-resume.md for details.
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: mpm-status
3
+ description: Display Claude MPM system status
4
+ user-invocable: true
5
+ version: "1.0.0"
6
+ category: mpm-command
7
+ tags: [mpm-command, system, pm-required, diagnostics]
8
+ ---
9
+
10
+ # /mpm-status
11
+
12
+ Show MPM system status. Delegates to PM agent.
13
+
14
+ ## Usage
15
+
16
+ ```
17
+ /mpm-status
18
+ ```
19
+
20
+ ## What It Shows
21
+
22
+ Displays comprehensive system information:
23
+ - **Version**: MPM version and installation details
24
+ - **Services**: WebSocket server status, monitoring dashboard
25
+ - **Agents**: Available agents and their versions
26
+ - **Memory**: Memory system statistics and health
27
+ - **Configuration**: Current MPM configuration settings
28
+ - **Project Info**: Project-specific context and setup
29
+
30
+ ## When to Use
31
+
32
+ - Check if MPM is properly installed and configured
33
+ - Verify agent availability before delegation
34
+ - Debug system issues or unexpected behavior
35
+ - Get quick overview of system health
36
+
37
+ See docs/commands/status.md for details.