claude-mpm 5.4.96__py3-none-any.whl → 5.6.17__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 (214) 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 +44 -10
  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 +216 -0
  8. claude_mpm/cli/commands/hook_errors.py +60 -60
  9. claude_mpm/cli/commands/run.py +35 -3
  10. claude_mpm/cli/commands/skill_source.py +51 -2
  11. claude_mpm/cli/commands/skills.py +5 -3
  12. claude_mpm/cli/executor.py +32 -17
  13. claude_mpm/cli/parsers/base_parser.py +17 -0
  14. claude_mpm/cli/parsers/commander_parser.py +116 -0
  15. claude_mpm/cli/parsers/run_parser.py +10 -0
  16. claude_mpm/cli/parsers/skill_source_parser.py +4 -0
  17. claude_mpm/cli/parsers/skills_parser.py +5 -0
  18. claude_mpm/cli/startup.py +124 -3
  19. claude_mpm/cli/startup_display.py +2 -1
  20. claude_mpm/cli/utils.py +7 -3
  21. claude_mpm/commander/__init__.py +78 -0
  22. claude_mpm/commander/adapters/__init__.py +60 -0
  23. claude_mpm/commander/adapters/auggie.py +260 -0
  24. claude_mpm/commander/adapters/base.py +288 -0
  25. claude_mpm/commander/adapters/claude_code.py +392 -0
  26. claude_mpm/commander/adapters/codex.py +237 -0
  27. claude_mpm/commander/adapters/communication.py +366 -0
  28. claude_mpm/commander/adapters/example_usage.py +310 -0
  29. claude_mpm/commander/adapters/mpm.py +389 -0
  30. claude_mpm/commander/adapters/registry.py +204 -0
  31. claude_mpm/commander/api/__init__.py +16 -0
  32. claude_mpm/commander/api/app.py +121 -0
  33. claude_mpm/commander/api/errors.py +133 -0
  34. claude_mpm/commander/api/routes/__init__.py +8 -0
  35. claude_mpm/commander/api/routes/events.py +184 -0
  36. claude_mpm/commander/api/routes/inbox.py +171 -0
  37. claude_mpm/commander/api/routes/messages.py +148 -0
  38. claude_mpm/commander/api/routes/projects.py +271 -0
  39. claude_mpm/commander/api/routes/sessions.py +226 -0
  40. claude_mpm/commander/api/routes/work.py +296 -0
  41. claude_mpm/commander/api/schemas.py +186 -0
  42. claude_mpm/commander/chat/__init__.py +7 -0
  43. claude_mpm/commander/chat/cli.py +111 -0
  44. claude_mpm/commander/chat/commands.py +96 -0
  45. claude_mpm/commander/chat/repl.py +310 -0
  46. claude_mpm/commander/config.py +49 -0
  47. claude_mpm/commander/config_loader.py +115 -0
  48. claude_mpm/commander/core/__init__.py +10 -0
  49. claude_mpm/commander/core/block_manager.py +325 -0
  50. claude_mpm/commander/core/response_manager.py +323 -0
  51. claude_mpm/commander/daemon.py +594 -0
  52. claude_mpm/commander/env_loader.py +59 -0
  53. claude_mpm/commander/events/__init__.py +26 -0
  54. claude_mpm/commander/events/manager.py +332 -0
  55. claude_mpm/commander/frameworks/__init__.py +12 -0
  56. claude_mpm/commander/frameworks/base.py +143 -0
  57. claude_mpm/commander/frameworks/claude_code.py +58 -0
  58. claude_mpm/commander/frameworks/mpm.py +62 -0
  59. claude_mpm/commander/inbox/__init__.py +16 -0
  60. claude_mpm/commander/inbox/dedup.py +128 -0
  61. claude_mpm/commander/inbox/inbox.py +224 -0
  62. claude_mpm/commander/inbox/models.py +70 -0
  63. claude_mpm/commander/instance_manager.py +337 -0
  64. claude_mpm/commander/llm/__init__.py +6 -0
  65. claude_mpm/commander/llm/openrouter_client.py +167 -0
  66. claude_mpm/commander/llm/summarizer.py +70 -0
  67. claude_mpm/commander/memory/__init__.py +45 -0
  68. claude_mpm/commander/memory/compression.py +347 -0
  69. claude_mpm/commander/memory/embeddings.py +230 -0
  70. claude_mpm/commander/memory/entities.py +310 -0
  71. claude_mpm/commander/memory/example_usage.py +290 -0
  72. claude_mpm/commander/memory/integration.py +325 -0
  73. claude_mpm/commander/memory/search.py +381 -0
  74. claude_mpm/commander/memory/store.py +657 -0
  75. claude_mpm/commander/models/__init__.py +18 -0
  76. claude_mpm/commander/models/events.py +121 -0
  77. claude_mpm/commander/models/project.py +162 -0
  78. claude_mpm/commander/models/work.py +214 -0
  79. claude_mpm/commander/parsing/__init__.py +20 -0
  80. claude_mpm/commander/parsing/extractor.py +132 -0
  81. claude_mpm/commander/parsing/output_parser.py +270 -0
  82. claude_mpm/commander/parsing/patterns.py +100 -0
  83. claude_mpm/commander/persistence/__init__.py +11 -0
  84. claude_mpm/commander/persistence/event_store.py +274 -0
  85. claude_mpm/commander/persistence/state_store.py +309 -0
  86. claude_mpm/commander/persistence/work_store.py +164 -0
  87. claude_mpm/commander/polling/__init__.py +13 -0
  88. claude_mpm/commander/polling/event_detector.py +104 -0
  89. claude_mpm/commander/polling/output_buffer.py +49 -0
  90. claude_mpm/commander/polling/output_poller.py +153 -0
  91. claude_mpm/commander/project_session.py +268 -0
  92. claude_mpm/commander/proxy/__init__.py +12 -0
  93. claude_mpm/commander/proxy/formatter.py +89 -0
  94. claude_mpm/commander/proxy/output_handler.py +191 -0
  95. claude_mpm/commander/proxy/relay.py +155 -0
  96. claude_mpm/commander/registry.py +410 -0
  97. claude_mpm/commander/runtime/__init__.py +10 -0
  98. claude_mpm/commander/runtime/executor.py +191 -0
  99. claude_mpm/commander/runtime/monitor.py +346 -0
  100. claude_mpm/commander/session/__init__.py +6 -0
  101. claude_mpm/commander/session/context.py +81 -0
  102. claude_mpm/commander/session/manager.py +59 -0
  103. claude_mpm/commander/tmux_orchestrator.py +361 -0
  104. claude_mpm/commander/web/__init__.py +1 -0
  105. claude_mpm/commander/work/__init__.py +30 -0
  106. claude_mpm/commander/work/executor.py +207 -0
  107. claude_mpm/commander/work/queue.py +405 -0
  108. claude_mpm/commander/workflow/__init__.py +27 -0
  109. claude_mpm/commander/workflow/event_handler.py +241 -0
  110. claude_mpm/commander/workflow/notifier.py +146 -0
  111. claude_mpm/commands/mpm-config.md +8 -0
  112. claude_mpm/commands/mpm-doctor.md +8 -0
  113. claude_mpm/commands/mpm-help.md +8 -0
  114. claude_mpm/commands/mpm-init.md +8 -0
  115. claude_mpm/commands/mpm-monitor.md +8 -0
  116. claude_mpm/commands/mpm-organize.md +8 -0
  117. claude_mpm/commands/mpm-postmortem.md +8 -0
  118. claude_mpm/commands/mpm-session-resume.md +8 -0
  119. claude_mpm/commands/mpm-status.md +8 -0
  120. claude_mpm/commands/mpm-ticket-view.md +8 -0
  121. claude_mpm/commands/mpm-version.md +8 -0
  122. claude_mpm/commands/mpm.md +8 -0
  123. claude_mpm/config/agent_presets.py +8 -7
  124. claude_mpm/config/skill_sources.py +16 -0
  125. claude_mpm/core/claude_runner.py +143 -0
  126. claude_mpm/core/config.py +32 -19
  127. claude_mpm/core/logger.py +26 -9
  128. claude_mpm/core/logging_utils.py +35 -11
  129. claude_mpm/core/output_style_manager.py +49 -12
  130. claude_mpm/core/unified_config.py +10 -6
  131. claude_mpm/core/unified_paths.py +68 -80
  132. claude_mpm/experimental/cli_enhancements.py +2 -1
  133. claude_mpm/hooks/claude_hooks/__pycache__/__init__.cpython-312.pyc +0 -0
  134. claude_mpm/hooks/claude_hooks/__pycache__/__init__.cpython-314.pyc +0 -0
  135. claude_mpm/hooks/claude_hooks/__pycache__/auto_pause_handler.cpython-311.pyc +0 -0
  136. claude_mpm/hooks/claude_hooks/__pycache__/auto_pause_handler.cpython-312.pyc +0 -0
  137. claude_mpm/hooks/claude_hooks/__pycache__/auto_pause_handler.cpython-314.pyc +0 -0
  138. claude_mpm/hooks/claude_hooks/__pycache__/event_handlers.cpython-311.pyc +0 -0
  139. claude_mpm/hooks/claude_hooks/__pycache__/event_handlers.cpython-312.pyc +0 -0
  140. claude_mpm/hooks/claude_hooks/__pycache__/event_handlers.cpython-314.pyc +0 -0
  141. claude_mpm/hooks/claude_hooks/__pycache__/hook_handler.cpython-311.pyc +0 -0
  142. claude_mpm/hooks/claude_hooks/__pycache__/hook_handler.cpython-312.pyc +0 -0
  143. claude_mpm/hooks/claude_hooks/__pycache__/hook_handler.cpython-314.pyc +0 -0
  144. claude_mpm/hooks/claude_hooks/__pycache__/installer.cpython-311.pyc +0 -0
  145. claude_mpm/hooks/claude_hooks/__pycache__/installer.cpython-314.pyc +0 -0
  146. claude_mpm/hooks/claude_hooks/__pycache__/memory_integration.cpython-311.pyc +0 -0
  147. claude_mpm/hooks/claude_hooks/__pycache__/memory_integration.cpython-312.pyc +0 -0
  148. claude_mpm/hooks/claude_hooks/__pycache__/memory_integration.cpython-314.pyc +0 -0
  149. claude_mpm/hooks/claude_hooks/__pycache__/response_tracking.cpython-311.pyc +0 -0
  150. claude_mpm/hooks/claude_hooks/__pycache__/response_tracking.cpython-312.pyc +0 -0
  151. claude_mpm/hooks/claude_hooks/__pycache__/response_tracking.cpython-314.pyc +0 -0
  152. claude_mpm/hooks/claude_hooks/__pycache__/tool_analysis.cpython-312.pyc +0 -0
  153. claude_mpm/hooks/claude_hooks/__pycache__/tool_analysis.cpython-314.pyc +0 -0
  154. claude_mpm/hooks/claude_hooks/auto_pause_handler.py +29 -30
  155. claude_mpm/hooks/claude_hooks/event_handlers.py +112 -99
  156. claude_mpm/hooks/claude_hooks/hook_handler.py +81 -88
  157. claude_mpm/hooks/claude_hooks/hook_wrapper.sh +6 -11
  158. claude_mpm/hooks/claude_hooks/installer.py +116 -8
  159. claude_mpm/hooks/claude_hooks/memory_integration.py +51 -31
  160. claude_mpm/hooks/claude_hooks/response_tracking.py +39 -58
  161. claude_mpm/hooks/claude_hooks/services/__pycache__/__init__.cpython-312.pyc +0 -0
  162. claude_mpm/hooks/claude_hooks/services/__pycache__/__init__.cpython-314.pyc +0 -0
  163. claude_mpm/hooks/claude_hooks/services/__pycache__/connection_manager.cpython-311.pyc +0 -0
  164. claude_mpm/hooks/claude_hooks/services/__pycache__/connection_manager_http.cpython-311.pyc +0 -0
  165. claude_mpm/hooks/claude_hooks/services/__pycache__/connection_manager_http.cpython-312.pyc +0 -0
  166. claude_mpm/hooks/claude_hooks/services/__pycache__/connection_manager_http.cpython-314.pyc +0 -0
  167. claude_mpm/hooks/claude_hooks/services/__pycache__/duplicate_detector.cpython-312.pyc +0 -0
  168. claude_mpm/hooks/claude_hooks/services/__pycache__/duplicate_detector.cpython-314.pyc +0 -0
  169. claude_mpm/hooks/claude_hooks/services/__pycache__/state_manager.cpython-311.pyc +0 -0
  170. claude_mpm/hooks/claude_hooks/services/__pycache__/state_manager.cpython-312.pyc +0 -0
  171. claude_mpm/hooks/claude_hooks/services/__pycache__/state_manager.cpython-314.pyc +0 -0
  172. claude_mpm/hooks/claude_hooks/services/__pycache__/subagent_processor.cpython-311.pyc +0 -0
  173. claude_mpm/hooks/claude_hooks/services/__pycache__/subagent_processor.cpython-312.pyc +0 -0
  174. claude_mpm/hooks/claude_hooks/services/__pycache__/subagent_processor.cpython-314.pyc +0 -0
  175. claude_mpm/hooks/claude_hooks/services/connection_manager.py +23 -28
  176. claude_mpm/hooks/claude_hooks/services/connection_manager_http.py +36 -103
  177. claude_mpm/hooks/claude_hooks/services/state_manager.py +23 -36
  178. claude_mpm/hooks/claude_hooks/services/subagent_processor.py +47 -73
  179. claude_mpm/hooks/session_resume_hook.py +22 -18
  180. claude_mpm/hooks/templates/pre_tool_use_template.py +10 -2
  181. claude_mpm/scripts/claude-hook-handler.sh +43 -16
  182. claude_mpm/scripts/start_activity_logging.py +0 -0
  183. claude_mpm/services/agents/agent_recommendation_service.py +8 -8
  184. claude_mpm/services/agents/agent_selection_service.py +2 -2
  185. claude_mpm/services/agents/loading/framework_agent_loader.py +75 -2
  186. claude_mpm/services/agents/single_tier_deployment_service.py +4 -4
  187. claude_mpm/services/event_log.py +8 -0
  188. claude_mpm/services/pm_skills_deployer.py +84 -6
  189. claude_mpm/services/skills/git_skill_source_manager.py +130 -10
  190. claude_mpm/services/skills/selective_skill_deployer.py +28 -0
  191. claude_mpm/services/skills/skill_discovery_service.py +74 -4
  192. claude_mpm/services/skills_deployer.py +31 -5
  193. claude_mpm/skills/__init__.py +2 -1
  194. claude_mpm/skills/bundled/pm/mpm/SKILL.md +38 -0
  195. claude_mpm/skills/bundled/pm/mpm-config/SKILL.md +29 -0
  196. claude_mpm/skills/bundled/pm/mpm-doctor/SKILL.md +53 -0
  197. claude_mpm/skills/bundled/pm/mpm-help/SKILL.md +35 -0
  198. claude_mpm/skills/bundled/pm/mpm-init/SKILL.md +125 -0
  199. claude_mpm/skills/bundled/pm/mpm-monitor/SKILL.md +32 -0
  200. claude_mpm/skills/bundled/pm/mpm-organize/SKILL.md +121 -0
  201. claude_mpm/skills/bundled/pm/mpm-postmortem/SKILL.md +22 -0
  202. claude_mpm/skills/bundled/pm/mpm-session-pause/SKILL.md +170 -0
  203. claude_mpm/skills/bundled/pm/mpm-session-resume/SKILL.md +31 -0
  204. claude_mpm/skills/bundled/pm/mpm-status/SKILL.md +37 -0
  205. claude_mpm/skills/bundled/pm/mpm-ticket-view/SKILL.md +110 -0
  206. claude_mpm/skills/bundled/pm/mpm-version/SKILL.md +21 -0
  207. claude_mpm/skills/registry.py +295 -90
  208. {claude_mpm-5.4.96.dist-info → claude_mpm-5.6.17.dist-info}/METADATA +22 -6
  209. {claude_mpm-5.4.96.dist-info → claude_mpm-5.6.17.dist-info}/RECORD +213 -83
  210. {claude_mpm-5.4.96.dist-info → claude_mpm-5.6.17.dist-info}/WHEEL +0 -0
  211. {claude_mpm-5.4.96.dist-info → claude_mpm-5.6.17.dist-info}/entry_points.txt +0 -0
  212. {claude_mpm-5.4.96.dist-info → claude_mpm-5.6.17.dist-info}/licenses/LICENSE +0 -0
  213. {claude_mpm-5.4.96.dist-info → claude_mpm-5.6.17.dist-info}/licenses/LICENSE-FAQ.md +0 -0
  214. {claude_mpm-5.4.96.dist-info → claude_mpm-5.6.17.dist-info}/top_level.txt +0 -0
@@ -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,170 @@
1
+ ---
2
+ name: mpm-session-pause
3
+ description: Pause session and save current work state for later resume
4
+ user-invocable: true
5
+ version: "1.0.0"
6
+ category: mpm-command
7
+ tags: [mpm-command, session, pm-recommended]
8
+ ---
9
+
10
+ # /mpm-pause
11
+
12
+ Pause the current session and save all work state for later resume.
13
+
14
+ ## What This Does
15
+
16
+ When invoked, this skill:
17
+ 1. Captures current work state (todos, git status, context summary)
18
+ 2. Creates session file at `.claude-mpm/sessions/session-{timestamp}.md`
19
+ 3. Updates `.claude-mpm/sessions/LATEST-SESSION.txt` pointer
20
+ 4. Optionally commits session state to git
21
+ 5. Shows user the session file path for later resume
22
+
23
+ ## Usage
24
+
25
+ ```
26
+ /mpm-pause [optional message describing current work]
27
+ ```
28
+
29
+ **Examples:**
30
+ ```
31
+ /mpm-pause
32
+ /mpm-pause Working on authentication refactor, about to test login flow
33
+ /mpm-pause Need to context switch to urgent bug fix
34
+ ```
35
+
36
+ ## Implementation
37
+
38
+ **Execute the following Python code to pause the session:**
39
+
40
+ ```python
41
+ from pathlib import Path
42
+ from claude_mpm.services.cli.session_pause_manager import SessionPauseManager
43
+
44
+ # Optional: Get message from user's command
45
+ # If user provided message after /mpm-pause, extract it
46
+ # Otherwise, message = None
47
+
48
+ # Create session pause manager
49
+ manager = SessionPauseManager(project_path=Path.cwd())
50
+
51
+ # Create pause session
52
+ session_id = manager.create_pause_session(
53
+ message=message, # Optional context message
54
+ skip_commit=False, # Will commit to git if in a repo
55
+ export_path=None, # No additional export needed
56
+ )
57
+
58
+ # Report success to user
59
+ print(f"✅ Session paused successfully!")
60
+ print(f"")
61
+ print(f"Session ID: {session_id}")
62
+ print(f"Session files:")
63
+ print(f" - .claude-mpm/sessions/{session_id}.md (human-readable)")
64
+ print(f" - .claude-mpm/sessions/{session_id}.json (machine-readable)")
65
+ print(f" - .claude-mpm/sessions/{session_id}.yaml (config format)")
66
+ print(f"")
67
+ print(f"Quick resume:")
68
+ print(f" /mpm-resume")
69
+ print(f"")
70
+ print(f"View session context:")
71
+ print(f" cat .claude-mpm/sessions/LATEST-SESSION.txt")
72
+ print(f" cat .claude-mpm/sessions/{session_id}.md")
73
+ ```
74
+
75
+ ## What Gets Saved
76
+
77
+ **Session State:**
78
+ - Session ID and timestamp
79
+ - Current working directory
80
+ - Git branch, recent commits, and file status
81
+ - Primary task and current phase
82
+ - Context message (if provided)
83
+
84
+ **Resume Instructions:**
85
+ - Quick-start commands
86
+ - Validation commands
87
+ - Files to review
88
+
89
+ **File Formats:**
90
+ - `.md` - Human-readable markdown (for reading)
91
+ - `.json` - Machine-readable (for tooling)
92
+ - `.yaml` - Human-readable config (for editing)
93
+
94
+ ## Session File Location
95
+
96
+ All session files are stored in:
97
+ ```
98
+ .claude-mpm/sessions/
99
+ ├── LATEST-SESSION.txt # Pointer to most recent session
100
+ ├── session-YYYYMMDD-HHMMSS.md
101
+ ├── session-YYYYMMDD-HHMMSS.json
102
+ └── session-YYYYMMDD-HHMMSS.yaml
103
+ ```
104
+
105
+ ## Token Budget
106
+
107
+ **Token usage:** ~5-10k tokens to execute (2-5% of context budget)
108
+
109
+ **Benefit:** Saves all remaining context for future resume, allowing you to:
110
+ - Context switch to urgent tasks
111
+ - Take a break and resume later
112
+ - Archive current work state before major changes
113
+
114
+ ## Resume Later
115
+
116
+ To resume this session:
117
+ ```
118
+ /mpm-resume
119
+ ```
120
+
121
+ Or manually:
122
+ ```bash
123
+ cat .claude-mpm/sessions/LATEST-SESSION.txt
124
+ cat .claude-mpm/sessions/session-YYYYMMDD-HHMMSS.md
125
+ ```
126
+
127
+ ## Git Integration
128
+
129
+ If in a git repository, the session will be automatically committed with message:
130
+ ```
131
+ session: pause at YYYY-MM-DD HH:MM:SS
132
+
133
+ Session ID: session-YYYYMMDD-HHMMSS
134
+ Context: [your optional message]
135
+ ```
136
+
137
+ ## Use Cases
138
+
139
+ **Context switching:**
140
+ ```
141
+ /mpm-pause Switching to urgent production bug
142
+ ```
143
+
144
+ **End of work session:**
145
+ ```
146
+ /mpm-pause Completed API refactor, ready for testing tomorrow
147
+ ```
148
+
149
+ **Before major changes:**
150
+ ```
151
+ /mpm-pause Saving state before attempting risky refactor
152
+ ```
153
+
154
+ **When approaching context limit:**
155
+ ```
156
+ /mpm-pause Hit 150k tokens, starting fresh session
157
+ ```
158
+
159
+ ## Related Commands
160
+
161
+ - `/mpm-resume` - Resume from most recent paused session
162
+ - `/mpm-init resume` - Alternative resume command
163
+ - See `docs/features/session-auto-resume.md` for auto-pause behavior
164
+
165
+ ## Notes
166
+
167
+ - Session files are project-local (not synced across machines)
168
+ - Git commit is optional (automatically skipped if not a repo)
169
+ - LATEST-SESSION.txt always points to most recent session
170
+ - Session format compatible with auto-pause feature (70% context trigger)
@@ -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.
@@ -0,0 +1,110 @@
1
+ ---
2
+ name: mpm-ticket-view
3
+ description: Orchestrate ticketing agent for project management workflows
4
+ user-invocable: true
5
+ version: "1.0.0"
6
+ category: mpm-command
7
+ tags: [mpm-command, tickets, pm-recommended]
8
+ ---
9
+
10
+ # /mpm-ticket
11
+
12
+ High-level ticketing workflows delegating to ticketing agent.
13
+
14
+ ## Usage
15
+ ```
16
+ /mpm-ticket <subcommand> [options]
17
+ ```
18
+
19
+ **CRITICAL:** PM delegates ALL ticketing operations to ticketing agent. PM NEVER uses MCP tools directly.
20
+
21
+ ## Subcommands
22
+
23
+ ### /mpm-ticket organize
24
+ Review, transition states, update priorities, identify stale tickets.
25
+
26
+ **MCP Tools (ticketing agent uses):**
27
+ - ticket_list, ticket_read, ticket_comment
28
+ - ticket_transition, ticket_update
29
+ - ticket_find_stale
30
+
31
+ **Output:** Tickets transitioned, priorities updated, stale tickets identified, next actions.
32
+
33
+ ### /mpm-ticket proceed
34
+ Analyze project board and recommend next actionable steps.
35
+
36
+ **MCP Tools (ticketing agent uses):**
37
+ - project_status, ticket_list, ticket_search
38
+ - epic_issues, get_available_transitions
39
+
40
+ **Output:** Project health, recommended next actions (top 3), blockers requiring attention.
41
+
42
+ ### /mpm-ticket status
43
+ Generate comprehensive status report covering work, tickets, project health.
44
+
45
+ **MCP Tools (ticketing agent uses):**
46
+ - project_status, ticket_list, ticket_search
47
+ - ticket_find_stale, get_my_tickets
48
+
49
+ **Output:** Health metrics, ticket counts, high-priority work, blockers, recent activity, risk assessment.
50
+
51
+ ### /mpm-ticket update
52
+ Create project status update (Linear ProjectUpdate).
53
+
54
+ **MCP Tools (ticketing agent uses):**
55
+ - project_status, project_update_create
56
+ - project_update_list, ticket_list
57
+
58
+ **Output:** Update ID, health status, accomplishments, metrics, risks, next sprint focus, published link.
59
+
60
+ ### /mpm-ticket project <url>
61
+ Set project URL for context (Linear/GitHub/JIRA).
62
+
63
+ **MCP Tools (ticketing agent uses):**
64
+ - config_set_default_project, epic_get, config_get
65
+
66
+ **Output:** Project context configured, platform/ID/name, access verified, summary.
67
+
68
+ ## Delegation Pattern
69
+
70
+ **WRONG ❌:**
71
+ ```
72
+ # PM directly using MCP tools
73
+ result = mcp__mcp-ticketer__ticket_list()
74
+ ```
75
+
76
+ **CORRECT ✅:**
77
+ ```
78
+ # PM delegates to ticketing agent
79
+ PM: "I'll have ticketing organize tickets..."
80
+ [PM constructs delegation prompt]
81
+ [Ticketing agent uses MCP tools]
82
+ PM: [Presents results]
83
+ ```
84
+
85
+ ## Fallback Strategy
86
+
87
+ If mcp-ticketer unavailable, ticketing agent falls back to aitrackdown CLI:
88
+ ```bash
89
+ aitrackdown status tasks
90
+ aitrackdown show TICKET-123
91
+ aitrackdown transition TICKET-123 done
92
+ ```
93
+
94
+ **PM still delegates** - ticketing agent handles CLI fallback internally.
95
+
96
+ ## Example Workflows
97
+
98
+ ```bash
99
+ # Organize and analyze
100
+ /mpm-ticket organize # Clean up board
101
+ /mpm-ticket proceed # Get next steps
102
+
103
+ # Weekly update
104
+ /mpm-ticket update # Create status update
105
+
106
+ # Project setup
107
+ /mpm-ticket project https://linear.app/team/project/abc-123
108
+ ```
109
+
110
+ See docs/commands/ticket.md for comprehensive documentation.
@@ -0,0 +1,21 @@
1
+ ---
2
+ name: mpm-version
3
+ description: Show version information
4
+ user-invocable: true
5
+ version: "1.0.0"
6
+ category: mpm-command
7
+ tags: [mpm-command, system, pm-optional]
8
+ ---
9
+
10
+ # /mpm-version
11
+
12
+ Display version information for MPM, agents, and skills.
13
+
14
+ ## Usage
15
+ ```
16
+ /mpm-version
17
+ ```
18
+
19
+ Shows project version, build number, all agents (by tier), all skills (by source).
20
+
21
+ See docs/commands/version.md for details.