claude-mpm 5.4.21__py3-none-any.whl → 5.4.59__py3-none-any.whl

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

Potentially problematic release.


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

Files changed (176) hide show
  1. claude_mpm/VERSION +1 -1
  2. claude_mpm/agents/BASE_AGENT.md +164 -0
  3. claude_mpm/agents/BASE_ENGINEER.md +658 -0
  4. claude_mpm/agents/MEMORY.md +1 -1
  5. claude_mpm/agents/PM_INSTRUCTIONS.md +771 -1019
  6. claude_mpm/agents/WORKFLOW.md +5 -254
  7. claude_mpm/agents/agent_loader.py +1 -1
  8. claude_mpm/agents/base_agent.json +31 -0
  9. claude_mpm/agents/frontmatter_validator.py +2 -2
  10. claude_mpm/cli/commands/agent_state_manager.py +10 -10
  11. claude_mpm/cli/commands/agents.py +9 -9
  12. claude_mpm/cli/commands/auto_configure.py +4 -4
  13. claude_mpm/cli/commands/configure.py +1 -1
  14. claude_mpm/cli/commands/configure_agent_display.py +12 -0
  15. claude_mpm/cli/commands/mpm_init/core.py +72 -0
  16. claude_mpm/cli/commands/postmortem.py +1 -1
  17. claude_mpm/cli/commands/profile.py +276 -0
  18. claude_mpm/cli/commands/skills.py +14 -18
  19. claude_mpm/cli/executor.py +10 -0
  20. claude_mpm/cli/interactive/agent_wizard.py +2 -2
  21. claude_mpm/cli/parsers/base_parser.py +7 -0
  22. claude_mpm/cli/parsers/profile_parser.py +147 -0
  23. claude_mpm/cli/parsers/skills_parser.py +0 -6
  24. claude_mpm/cli/startup.py +506 -180
  25. claude_mpm/commands/mpm-config.md +13 -250
  26. claude_mpm/commands/mpm-doctor.md +9 -22
  27. claude_mpm/commands/mpm-help.md +5 -206
  28. claude_mpm/commands/mpm-init.md +81 -507
  29. claude_mpm/commands/mpm-monitor.md +15 -402
  30. claude_mpm/commands/mpm-organize.md +61 -441
  31. claude_mpm/commands/mpm-postmortem.md +6 -108
  32. claude_mpm/commands/mpm-session-resume.md +12 -363
  33. claude_mpm/commands/mpm-status.md +5 -69
  34. claude_mpm/commands/mpm-ticket-view.md +52 -495
  35. claude_mpm/commands/mpm-version.md +5 -107
  36. claude_mpm/core/config.py +2 -4
  37. claude_mpm/core/framework/loaders/agent_loader.py +1 -1
  38. claude_mpm/core/framework/loaders/instruction_loader.py +52 -11
  39. claude_mpm/core/optimized_startup.py +61 -0
  40. claude_mpm/core/shared/config_loader.py +3 -1
  41. claude_mpm/core/unified_agent_registry.py +1 -1
  42. claude_mpm/dashboard/static/svelte-build/_app/env.js +1 -0
  43. claude_mpm/dashboard/static/svelte-build/_app/immutable/assets/0.DWzvg0-y.css +1 -0
  44. claude_mpm/dashboard/static/svelte-build/_app/immutable/assets/2.ThTw9_ym.css +1 -0
  45. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/4TdZjIqw.js +1 -0
  46. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/5shd3_w0.js +24 -0
  47. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/B0uc0UOD.js +36 -0
  48. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/B7RN905-.js +1 -0
  49. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/B7xVLGWV.js +2 -0
  50. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/BIF9m_hv.js +61 -0
  51. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/BKjSRqUr.js +1 -0
  52. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/BPYeabCQ.js +1 -0
  53. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/BQaXIfA_.js +331 -0
  54. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/BSNlmTZj.js +1 -0
  55. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/Be7GpZd6.js +7 -0
  56. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/Bh0LDWpI.js +145 -0
  57. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/BofRWZRR.js +10 -0
  58. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/BovzEFCE.js +30 -0
  59. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/C30mlcqg.js +165 -0
  60. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/C4B-KCzX.js +1 -0
  61. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/C4JcI4KD.js +122 -0
  62. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/CBBdVcY8.js +1 -0
  63. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/CDuw-vjf.js +1 -0
  64. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/C_Usid8X.js +15 -0
  65. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/Cfqx1Qun.js +10 -0
  66. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/CiIAseT4.js +128 -0
  67. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/CmKTTxBW.js +1 -0
  68. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/CnA0NrzZ.js +1 -0
  69. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/Cs_tUR18.js +24 -0
  70. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/Cu_Erd72.js +261 -0
  71. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/CyWMqx4W.js +43 -0
  72. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/CzZX-COe.js +220 -0
  73. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/CzeYkLYB.js +65 -0
  74. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/D3k0OPJN.js +4 -0
  75. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/D9lljYKQ.js +1 -0
  76. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/DGkLK5U1.js +267 -0
  77. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/DI7hHRFL.js +1 -0
  78. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/DLVjFsZ3.js +139 -0
  79. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/DUrLdbGD.js +89 -0
  80. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/DVp1hx9R.js +1 -0
  81. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/DY1XQ8fi.js +2 -0
  82. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/DZX00Y4g.js +1 -0
  83. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/Da0KfYnO.js +1 -0
  84. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/DaimHw_p.js +68 -0
  85. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/Dfy6j1xT.js +323 -0
  86. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/Dhb8PKl3.js +1 -0
  87. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/Dle-35c7.js +64 -0
  88. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/DmxopI1J.js +1 -0
  89. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/DwBR2MJi.js +60 -0
  90. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/GYwsonyD.js +1 -0
  91. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/Gi6I4Gst.js +1 -0
  92. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/NqQ1dWOy.js +1 -0
  93. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/RJiighC3.js +1 -0
  94. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/Vzk33B_K.js +2 -0
  95. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/ZGh7QtNv.js +7 -0
  96. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/bT1r9zLR.js +1 -0
  97. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/bTOqqlTd.js +1 -0
  98. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/eNVUfhuA.js +1 -0
  99. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/iEWssX7S.js +162 -0
  100. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/sQeU3Y1z.js +1 -0
  101. claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/uuIeMWc-.js +1 -0
  102. claude_mpm/dashboard/static/svelte-build/_app/immutable/entry/app.D6-I5TpK.js +2 -0
  103. claude_mpm/dashboard/static/svelte-build/_app/immutable/entry/start.NWzMBYRp.js +1 -0
  104. claude_mpm/dashboard/static/svelte-build/_app/immutable/nodes/0.m1gL8KXf.js +1 -0
  105. claude_mpm/dashboard/static/svelte-build/_app/immutable/nodes/1.CgNOuw-d.js +1 -0
  106. claude_mpm/dashboard/static/svelte-build/_app/immutable/nodes/2.C0GcWctS.js +1 -0
  107. claude_mpm/dashboard/static/svelte-build/_app/version.json +1 -0
  108. claude_mpm/dashboard/static/svelte-build/favicon.svg +7 -0
  109. claude_mpm/dashboard/static/svelte-build/index.html +36 -0
  110. claude_mpm/dashboard-svelte/node_modules/katex/src/fonts/generate_fonts.py +58 -0
  111. claude_mpm/dashboard-svelte/node_modules/katex/src/metrics/extract_tfms.py +114 -0
  112. claude_mpm/dashboard-svelte/node_modules/katex/src/metrics/extract_ttfs.py +122 -0
  113. claude_mpm/dashboard-svelte/node_modules/katex/src/metrics/format_json.py +28 -0
  114. claude_mpm/dashboard-svelte/node_modules/katex/src/metrics/parse_tfm.py +211 -0
  115. claude_mpm/hooks/claude_hooks/__pycache__/__init__.cpython-311.pyc +0 -0
  116. claude_mpm/hooks/claude_hooks/__pycache__/correlation_manager.cpython-311.pyc +0 -0
  117. claude_mpm/hooks/claude_hooks/__pycache__/event_handlers.cpython-311.pyc +0 -0
  118. claude_mpm/hooks/claude_hooks/__pycache__/hook_handler.cpython-311.pyc +0 -0
  119. claude_mpm/hooks/claude_hooks/__pycache__/installer.cpython-311.pyc +0 -0
  120. claude_mpm/hooks/claude_hooks/__pycache__/memory_integration.cpython-311.pyc +0 -0
  121. claude_mpm/hooks/claude_hooks/__pycache__/response_tracking.cpython-311.pyc +0 -0
  122. claude_mpm/hooks/claude_hooks/__pycache__/tool_analysis.cpython-311.pyc +0 -0
  123. claude_mpm/hooks/claude_hooks/hook_handler.py +149 -1
  124. claude_mpm/hooks/claude_hooks/services/__pycache__/__init__.cpython-311.pyc +0 -0
  125. claude_mpm/hooks/claude_hooks/services/__pycache__/connection_manager_http.cpython-311.pyc +0 -0
  126. claude_mpm/hooks/claude_hooks/services/__pycache__/duplicate_detector.cpython-311.pyc +0 -0
  127. claude_mpm/hooks/claude_hooks/services/__pycache__/state_manager.cpython-311.pyc +0 -0
  128. claude_mpm/hooks/claude_hooks/services/__pycache__/subagent_processor.cpython-311.pyc +0 -0
  129. claude_mpm/hooks/claude_hooks/services/connection_manager.py +26 -6
  130. claude_mpm/hooks/kuzu_memory_hook.py +5 -5
  131. claude_mpm/init.py +276 -0
  132. claude_mpm/models/git_repository.py +3 -3
  133. claude_mpm/scripts/start_activity_logging.py +0 -0
  134. claude_mpm/services/agents/agent_builder.py +3 -3
  135. claude_mpm/services/agents/cache_git_manager.py +6 -6
  136. claude_mpm/services/agents/deployment/agent_deployment.py +29 -7
  137. claude_mpm/services/agents/deployment/agent_discovery_service.py +4 -2
  138. claude_mpm/services/agents/deployment/agent_format_converter.py +25 -13
  139. claude_mpm/services/agents/deployment/agent_template_builder.py +31 -19
  140. claude_mpm/services/agents/deployment/agents_directory_resolver.py +2 -2
  141. claude_mpm/services/agents/deployment/async_agent_deployment.py +31 -27
  142. claude_mpm/services/agents/deployment/local_template_deployment.py +3 -1
  143. claude_mpm/services/agents/deployment/multi_source_deployment_service.py +169 -26
  144. claude_mpm/services/agents/deployment/remote_agent_discovery_service.py +98 -75
  145. claude_mpm/services/agents/git_source_manager.py +23 -4
  146. claude_mpm/services/agents/recommender.py +5 -3
  147. claude_mpm/services/agents/single_tier_deployment_service.py +2 -2
  148. claude_mpm/services/agents/sources/git_source_sync_service.py +121 -10
  149. claude_mpm/services/agents/startup_sync.py +22 -2
  150. claude_mpm/services/diagnostics/checks/agent_check.py +2 -2
  151. claude_mpm/services/diagnostics/checks/agent_sources_check.py +1 -1
  152. claude_mpm/services/git/git_operations_service.py +8 -8
  153. claude_mpm/services/monitor/management/lifecycle.py +7 -1
  154. claude_mpm/services/monitor/server.py +473 -3
  155. claude_mpm/services/pm_skills_deployer.py +711 -0
  156. claude_mpm/services/profile_manager.py +337 -0
  157. claude_mpm/services/skills/git_skill_source_manager.py +148 -11
  158. claude_mpm/services/skills/selective_skill_deployer.py +97 -48
  159. claude_mpm/services/skills_deployer.py +161 -65
  160. claude_mpm/services/socketio/dashboard_server.py +1 -0
  161. claude_mpm/services/socketio/event_normalizer.py +37 -6
  162. claude_mpm/services/socketio/server/core.py +262 -123
  163. claude_mpm/skills/bundled/security-scanning.md +112 -0
  164. claude_mpm/skills/skill_manager.py +98 -3
  165. claude_mpm/templates/.pre-commit-config.yaml +112 -0
  166. claude_mpm/utils/agent_dependency_loader.py +14 -2
  167. claude_mpm/utils/agent_filters.py +1 -1
  168. claude_mpm/utils/migration.py +4 -4
  169. claude_mpm/utils/robust_installer.py +47 -3
  170. {claude_mpm-5.4.21.dist-info → claude_mpm-5.4.59.dist-info}/METADATA +7 -4
  171. {claude_mpm-5.4.21.dist-info → claude_mpm-5.4.59.dist-info}/RECORD +175 -81
  172. {claude_mpm-5.4.21.dist-info → claude_mpm-5.4.59.dist-info}/WHEEL +0 -0
  173. {claude_mpm-5.4.21.dist-info → claude_mpm-5.4.59.dist-info}/entry_points.txt +0 -0
  174. {claude_mpm-5.4.21.dist-info → claude_mpm-5.4.59.dist-info}/licenses/LICENSE +0 -0
  175. {claude_mpm-5.4.21.dist-info → claude_mpm-5.4.59.dist-info}/licenses/LICENSE-FAQ.md +0 -0
  176. {claude_mpm-5.4.21.dist-info → claude_mpm-5.4.59.dist-info}/top_level.txt +0 -0
@@ -4,497 +4,117 @@ command: organize
4
4
  aliases: [mpm-organize]
5
5
  migration_target: /mpm/system:organize
6
6
  category: system
7
- description: Organize all project files including documentation, source code, tests, scripts, and configuration with intelligent consolidation and pruning
7
+ description: Organize project files with intelligent consolidation
8
8
  ---
9
9
  # /mpm-organize
10
10
 
11
- Organize ALL project files into a clean, structured format with intelligent detection of existing patterns. Includes special handling for documentation consolidation, pruning, and triage into research/user/developer categories.
11
+ Organize ALL project files with intelligent detection, consolidation, and pruning.
12
12
 
13
13
  ## Usage
14
-
15
14
  ```
16
- /mpm-organize # Interactive mode with preview
17
- /mpm-organize --dry-run # Preview changes without applying
18
- /mpm-organize --force # Proceed even with uncommitted changes
19
- /mpm-organize --no-backup # Skip backup creation (not recommended)
20
- /mpm-organize --docs-only # Only organize documentation files
15
+ /mpm-organize [--dry-run] [--force] [options]
21
16
  ```
22
17
 
23
- ## Description
24
-
25
- This slash command delegates to the **Project Organizer agent** to perform intelligent project organization across ALL file types. The agent analyzes your project structure, detects existing patterns, consolidates duplicates, removes stale content, and organizes everything into a clean, logical structure.
26
-
27
- **Comprehensive Scope**: This command organizes ALL project files including:
28
- - **Documentation** (.md, .rst, .txt) - consolidate, prune, triage into research/user/developer
29
- - **Source code** - proper module structure and organization
30
- - **Tests** - organized test suites
31
- - **Scripts** - automation tools and utilities
32
- - **Configuration** - project config files
33
-
34
- **Smart Detection**: The agent first looks for existing organization patterns in your project (e.g., PROJECT_ORGANIZATION.md, CONTRIBUTING.md). If found, it respects and extends those patterns. If not found, it applies framework-appropriate defaults.
18
+ **Delegates to Project Organizer agent** for comprehensive file organization.
35
19
 
36
- ## Features
20
+ ## Scope
37
21
 
38
- - **📁 Pattern Detection**: Analyzes existing project structure and detects organization conventions
39
- - **🔄 Consolidation**: Merges duplicate or related files (especially documentation)
40
- - **✂️ Pruning**: Identifies and removes outdated, stale, or redundant content
41
- - **📋 Triage**: Categorizes documentation into research/user/developer directories
42
- - **🏗️ Code Organization**: Ensures proper module structure and file placement
43
- - **🧪 Test Organization**: Organizes test suites into proper directories
44
- - **📜 Script Organization**: Moves scripts to dedicated scripts/ directory
45
- - **✅ Safe Operations**: Uses `git mv` for tracked files to preserve history
46
- - **💾 Automatic Backups**: Creates backups before major reorganizations
47
- - **📊 Organization Report**: Detailed summary of changes and recommendations
48
- - **🎯 Smart Scope**: Full project or documentation-only mode (--docs-only)
22
+ **Default:** Organizes ALL project files
23
+ - Documentation (.md, .rst, .txt)
24
+ - Source code (proper module structure)
25
+ - Tests (organized test suites)
26
+ - Scripts (scripts/ directory)
27
+ - Configuration (appropriate locations)
49
28
 
50
- ## Options
29
+ **Protected files (never moved):** README.md, package.json, pyproject.toml, Makefile, .gitignore, etc.
51
30
 
52
- ### Safety Options
53
- - `--dry-run`: Preview all changes without making them (recommended first run)
54
- - `--no-backup`: Skip backup creation before reorganization (not recommended)
55
- - `--force`: Proceed even with uncommitted changes (use with caution)
31
+ ## Key Options
56
32
 
57
- ### Scope Options
58
- - `--docs-only`: Only organize documentation files (legacy behavior)
59
- - `--code-only`: Only organize source code files
60
- - `--tests-only`: Only organize test files
61
- - `--scripts-only`: Only organize script files
33
+ **Safety:**
34
+ - `--dry-run`: Preview without changes (recommended first run)
35
+ - `--force`: Proceed with uncommitted changes
36
+ - `--no-backup`: Skip backup (not recommended)
62
37
 
63
- ### Organization Options
64
- - `--consolidate-only`: Only consolidate duplicate files, skip reorganization
65
- - `--prune-only`: Only identify and remove stale files
66
- - `--triage-only`: Only categorize files without moving them
67
- - `--no-prune`: Skip pruning phase (keep all existing files)
38
+ **Scope:**
39
+ - `--docs-only`: Only documentation (legacy behavior)
40
+ - `--code-only` / `--tests-only` / `--scripts-only`: Specific file types
68
41
 
69
- ### Output Options
70
- - `--verbose`: Show detailed analysis and reasoning
71
- - `--quiet`: Minimal output, errors only
72
- - `--report [path]`: Save organization report to file
42
+ **Operations:**
43
+ - `--consolidate-only`: Merge duplicates only
44
+ - `--prune-only`: Remove stale files only
45
+ - `--no-prune`: Keep all files (no deletions)
73
46
 
74
- ## What This Command Does
47
+ ## What It Does
75
48
 
76
- ### 1. Pattern Detection
77
- - Scans existing project structure across all file types
78
- - Identifies organization conventions (PROJECT_ORGANIZATION.md, CONTRIBUTING.md)
79
- - Detects framework-specific patterns (Next.js, Django, Flask, etc.)
80
- - Detects existing documentation organization
81
- - Falls back to framework-appropriate defaults if no pattern found
49
+ 1. **Pattern Detection:** Scans for existing organization (PROJECT_ORGANIZATION.md, framework conventions)
50
+ 2. **Consolidation:** Merges duplicates (READMEs, guides, utilities)
51
+ 3. **Pruning:** Archives/removes stale content (>6 months old, empty files)
52
+ 4. **Categorization:** Sorts docs into research/user/developer
53
+ 5. **Safe Movement:** Uses `git mv` to preserve history
54
+ 6. **Backup:** Creates backup_project_YYYYMMDD_HHMMSS.tar.gz
82
55
 
83
- ### 2. Standard Project Structure
56
+ ## Standard Structure
84
57
 
85
- If no existing pattern is detected, organizes according to project type:
86
-
87
- **Documentation** (all project types):
88
58
  ```
89
59
  docs/
90
- ├── research/ # Research findings, analysis, investigations
91
- ├── spikes/ # Technical spikes and experiments
92
- └── notes/ # Development notes and brainstorming
93
- ├── user/ # User-facing documentation
94
- │ ├── guides/ # How-to guides and tutorials
95
- │ ├── faq/ # Frequently asked questions
96
- │ └── examples/ # Usage examples
97
- └── developer/ # Developer documentation
98
- ├── api/ # API documentation
99
- ├── architecture/ # Architecture decisions and diagrams
100
- └── contributing/ # Contribution guidelines
101
- ```
102
-
103
- **Source Code** (framework-specific):
104
- - Python: `src/package_name/` structure
105
- - JavaScript/TypeScript: Framework conventions (Next.js, React, etc.)
106
- - Other: Language-appropriate module structure
107
-
108
- **Tests**: `tests/` with mirrored source structure
109
-
110
- **Scripts**: `scripts/` for automation tools
111
-
112
- **Configuration**: Root or `config/` depending on project size
113
-
114
- ### 3. File Consolidation
115
-
116
- Identifies and merges duplicate/similar files:
117
-
118
- **Documentation**:
119
- - Duplicate README files
120
- - Similar guide documents
121
- - Redundant architecture notes
122
- - Multiple versions of same doc
123
- - Scattered meeting notes
60
+ ├── research/ # Spikes, analysis, notes
61
+ ├── user/ # Guides, tutorials, FAQs
62
+ └── developer/ # API docs, architecture, contributing
124
63
 
125
- **Code**:
126
- - Duplicate utility functions
127
- - Similar helper modules
128
- - Redundant configuration files
129
-
130
- ### 4. Content Pruning
131
-
132
- Removes or archives stale/obsolete content:
133
-
134
- **Documentation**:
135
- - Outdated documentation (last modified >6 months)
136
- - Stale TODO lists and notes
137
- - Obsolete architecture documents
138
- - Deprecated API documentation
139
- - Empty or placeholder files
140
-
141
- **Code**:
142
- - Commented-out code blocks
143
- - Unused imports and dependencies
144
- - Dead code (unreferenced functions/classes)
145
-
146
- ### 5. File Categorization & Triage
147
-
148
- Categorizes and organizes files by purpose:
149
-
150
- **Documentation**:
151
- - **Research**: Analysis, spikes, investigations, experiments
152
- - **User**: Guides, tutorials, FAQs, how-tos
153
- - **Developer**: API docs, architecture, contributing guides
154
-
155
- **Code**:
156
- - Source code to proper module structure
157
- - Tests to organized test suites
158
- - Scripts to scripts/ directory
159
- - Configuration to appropriate locations
160
-
161
- ### 6. Safe File Movement
162
-
163
- For each file being organized:
164
- 1. Analyzes file type, content, and purpose
165
- 2. Determines optimal location based on detected patterns
166
- 3. Uses `git mv` for version-controlled files
167
- 4. Preserves git history
168
- 5. Creates backup before major changes
169
- 6. Validates move doesn't break imports or references
170
-
171
- ### 7. Backup Creation
172
-
173
- Before reorganization:
174
- ```bash
175
- backup_project_YYYYMMDD_HHMMSS.tar.gz # Full project backup (or docs-only)
64
+ src/<package>/ # Proper module structure
65
+ tests/ # Mirrored source structure
66
+ scripts/ # Automation tools
67
+ config/ # Configuration (if needed)
176
68
  ```
177
69
 
178
- ### 8. Protected Files (Never Moved)
179
-
180
- These files remain in project root:
181
- - `README.md`, `CHANGELOG.md`, `LICENSE.md`
182
- - `CONTRIBUTING.md`, `CODE_OF_CONDUCT.md`
183
- - `CLAUDE.md`, `CODE.md`, `DEVELOPER.md`
184
- - Package files: `package.json`, `pyproject.toml`, `Cargo.toml`, etc.
185
- - Build configs: `Makefile`, `Dockerfile`, `docker-compose.yml`
186
- - Git files: `.gitignore`, `.gitattributes`
187
- - Environment templates: `.env.example`, `.env.sample`
188
-
189
- ### 9. Files Excluded from Organization
190
-
191
- Never touched:
192
- - Build artifacts: `dist/`, `build/`, `node_modules/`, `__pycache__/`
193
- - Version control: `.git/`, `.svn/`, `.hg/`
194
- - Virtual environments: `venv/`, `.venv/`, `env/`
195
- - IDE configs: `.vscode/`, `.idea/` (unless --config-only)
196
-
197
- ### 10. Organization Report
198
-
199
- Generates detailed report including:
200
- - All files moved with before/after locations
201
- - Files consolidated (merged) with change summary
202
- - Files pruned (removed or archived) with reasoning
203
- - Pattern analysis and detected conventions
204
- - Import/reference validation results
205
- - Recommendations for further improvements
206
-
207
70
  ## Examples
208
71
 
209
- ### Preview Full Project Organization (Recommended First Run)
210
72
  ```bash
73
+ # Preview changes (recommended first)
211
74
  /mpm-organize --dry-run
212
- ```
213
- Shows what changes would be made across ALL project files without applying them.
214
75
 
215
- ### Preview Documentation Organization Only
216
- ```bash
217
- /mpm-organize --docs-only --dry-run
218
- ```
219
- Shows what documentation changes would be made (legacy behavior).
220
-
221
- ### Full Project Organization with Backup
222
- ```bash
76
+ # Organize everything with backup
223
77
  /mpm-organize
224
- ```
225
- Interactive mode with automatic backup before organizing all project files.
226
78
 
227
- ### Organize Tests and Scripts Only
228
- ```bash
229
- /mpm-organize --tests-only --scripts-only
230
- ```
231
- Focus on organizing test files and scripts, leave everything else untouched.
232
-
233
- ### Consolidate Duplicate Files Only
234
- ```bash
235
- /mpm-organize --consolidate-only --dry-run
236
- ```
237
- Preview which duplicate files would be merged across the project.
238
-
239
- ### Identify Stale Files (All Types)
240
- ```bash
241
- /mpm-organize --prune-only --dry-run
242
- ```
243
- See which outdated files would be removed or archived.
79
+ # Documentation only
80
+ /mpm-organize --docs-only --dry-run
244
81
 
245
- ### Triage Documentation by Category
246
- ```bash
247
- /mpm-organize --docs-only --triage-only --verbose
248
- ```
249
- Categorize documentation into research/user/developer without moving files.
82
+ # Consolidate without pruning
83
+ /mpm-organize --consolidate-only --no-prune
250
84
 
251
- ### Full Organization Without Pruning
252
- ```bash
253
- /mpm-organize --no-prune
85
+ # Save report
86
+ /mpm-organize --report /tmp/organize-report.md
254
87
  ```
255
- Organize and consolidate all files but keep everything (no deletions).
256
-
257
- ### Save Organization Report
258
- ```bash
259
- /mpm-organize --report /tmp/project-organize-report.md
260
- ```
261
- Save detailed organization report to file for review.
262
-
263
- ## Implementation
264
-
265
- This slash command delegates to the **Project Organizer agent** (`project-organizer`), which performs intelligent project organization based on detected patterns and content analysis across all file types.
266
-
267
- The agent receives the command options as context and then:
268
- 1. **Scans** for all project files (or scope-specific with --docs-only, --tests-only, etc.)
269
- 2. **Detects** existing organization patterns (PROJECT_ORGANIZATION.md, CONTRIBUTING.md, framework conventions)
270
- 3. **Analyzes** file content, purpose, and relationships
271
- 4. **Categorizes** files by type and purpose (documentation by audience, code by module, tests by coverage)
272
- 5. **Identifies** duplicates, stale content, and misplaced files
273
- 6. **Validates** that moves won't break imports or references
274
- 7. **Creates** safe reorganization plan with detailed reasoning
275
- 8. **Executes** file moves with git integration (preserves history)
276
- 9. **Generates** comprehensive organization report
277
-
278
- When you invoke `/mpm-organize [options]`, Claude MPM:
279
- - Passes the options to the Project Organizer agent as task context
280
- - The agent executes the comprehensive organization workflow
281
- - Results are returned through structured output with detailed change log
282
-
283
- **Scope Control**:
284
- - Default: Organizes ALL project files (comprehensive)
285
- - `--docs-only`: Only documentation files (legacy behavior)
286
- - `--code-only`, `--tests-only`, `--scripts-only`: Specific file types
287
88
 
288
89
  ## Expected Output
289
90
 
290
- ### Dry Run Mode (Full Project)
291
91
  ```
292
92
  🔍 Analyzing project structure...
293
93
  ✓ Detected PROJECT_ORGANIZATION.md - using project standards
294
- ✓ Found Python Flask project with standard structure
295
- ✓ Found 23 documentation files
296
- ✓ Found 15 misplaced test files
297
- ✓ Found 8 scripts in root directory
298
- ✓ Identified 3 duplicate READMEs
299
- ✓ Found 5 stale files
300
-
301
- 📁 Proposed Changes:
302
-
303
- Documentation:
304
- Consolidate:
305
- → Merge README_OLD.md + README_BACKUP.md → docs/user/README.md
306
- → Merge architecture-v1.md + architecture-v2.md → docs/developer/architecture/decisions.md
307
-
308
- Organize:
309
- docs/research/
310
- ← spike-oauth.md (from root)
311
- ← performance-analysis.md (from root)
312
- docs/user/guides/
313
- ← getting-started.md (from root)
314
- ← installation.md (from docs/)
315
-
316
- Prune:
317
- ✂ Remove TODO_2023.md (last modified 18 months ago)
318
- ✂ Archive deprecated-api.md → docs/_archive/
319
-
320
- Tests:
321
- tests/unit/
322
- ← test_auth.py (from root)
323
- ← test_utils.py (from src/)
324
- tests/integration/
325
- ← test_api_integration.py (from root)
326
-
327
- Scripts:
328
- scripts/
329
- ← deploy.sh (from root)
330
- ← run_tests.py (from root)
331
- ← backup_db.sh (from utils/)
332
-
333
- Source Code:
334
- src/myapp/utils/
335
- → Consolidate helpers.py + utility_functions.py → utils.py
336
-
337
- 📊 Summary:
338
- - 8 documentation files to move
339
- - 4 files to consolidate (2 merged)
340
- - 5 files to prune (3 removed, 2 archived)
341
- - 15 test files to organize
342
- - 8 scripts to move
343
- - 2 code files to consolidate
344
-
345
- Run without --dry-run to apply changes.
346
- ```
347
-
348
- ### Dry Run Mode (Documentation Only)
349
- ```bash
350
- /mpm-organize --docs-only --dry-run
351
- ```
352
- ```
353
- 🔍 Analyzing documentation structure...
354
- ✓ Detected existing pattern: docs/guides/ and docs/reference/
355
- ✓ Found 23 documentation files
356
- ✓ Identified 3 duplicate READMEs
357
- ✓ Found 5 stale documentation files
94
+ ✓ Found 23 documentation files, 15 test files, 8 scripts
358
95
 
359
96
  📁 Proposed Changes:
360
97
 
361
98
  Consolidate:
362
99
  → Merge README_OLD.md + README_BACKUP.md → docs/user/README.md
363
- → Merge architecture-v1.md + architecture-v2.md → docs/developer/architecture/decisions.md
364
-
365
- Prune:
366
- ✂ Remove TODO_2023.md (last modified 18 months ago)
367
- ✂ Archive deprecated-api.md → docs/_archive/
368
- ✂ Remove empty placeholder.md
369
100
 
370
101
  Organize:
371
- docs/research/
372
- spike-oauth.md (from root)
373
- performance-analysis.md (from root)
374
- docs/user/guides/
375
- ← getting-started.md (from root)
376
- ← installation.md (from docs/)
377
-
378
- 📊 Summary:
379
- - 8 documentation files to move
380
- - 4 files to consolidate (2 merged files)
381
- - 5 files to prune (3 removed, 2 archived)
382
-
383
- Run without --dry-run to apply changes.
384
- ```
102
+ docs/research/ ← spike-oauth.md (from root)
103
+ tests/unit/ test_auth.py (from root)
104
+ scripts/ deploy.sh (from root)
385
105
 
386
- ### Actual Organization
387
- ```
388
- 🔍 Analyzing project structure...
389
- ✓ Detected PROJECT_ORGANIZATION.md - using project standards
390
- ✓ Created backup: backup_project_20250102_143022.tar.gz
391
-
392
- 📁 Organizing project files...
393
- ✓ Consolidated README_OLD.md + README_BACKUP.md → docs/user/README.md
394
- ✓ Moved spike-oauth.md → docs/research/
395
- ✓ Moved test_auth.py → tests/unit/
396
- ✓ Moved deploy.sh → scripts/
397
- ✓ Consolidated helpers.py + utility_functions.py → src/myapp/utils/utils.py
398
- ✓ Pruned TODO_2023.md (stale)
399
- ✓ Archived deprecated-api.md
400
-
401
- ✅ Project organization complete!
106
+ Prune:
107
+ ✂ Remove TODO_2023.md (stale 18 months)
402
108
 
403
- 📊 Report saved to: /tmp/project-organization-report.md
109
+ 📊 Summary: 8 to move, 2 to merge, 3 to prune
404
110
  ```
405
111
 
406
- ## Safety Guarantees
407
-
408
- - **Full Project Backup**: Backup of all affected files before changes (unless --no-backup)
409
- - **Git Integration**: Uses `git mv` to preserve file history for tracked files
410
- - **Dry Run Available**: Preview all changes before applying (--dry-run)
411
- - **Import Validation**: Validates that code moves won't break imports/references
412
- - **Protected Files**: Critical root files never moved (README.md, package.json, etc.)
413
- - **Rollback Support**: Backup enables full rollback if needed
414
- - **Conservative Pruning**: Stale files are archived rather than deleted when in doubt
415
- - **Scope Control**: Limit changes to specific file types (--docs-only, --tests-only, etc.)
416
-
417
- ## When to Use This Command
418
-
419
- Use `/mpm-organize` when:
420
- - **Project has grown organically** and structure has become messy
421
- - **Test files are scattered** across the codebase
422
- - **Scripts are in root** instead of scripts/ directory
423
- - **Documentation is disorganized** with duplicates and stale content
424
- - **Code has duplicated utilities** that should be consolidated
425
- - **Starting a new project** and establishing clean structure
426
- - **Before a major release** (clean up everything)
427
- - **After a major refactor** (reorganize changed files)
428
- - **When onboarding new team members** (clear, organized structure)
429
- - **After accumulating research notes** and experimental code
430
-
431
- ## Best Practices
432
-
433
- 1. **Always Start with Dry Run**: Use `--dry-run` first to preview ALL changes
434
- 2. **Commit First**: Commit your work before organizing (or use --force, but not recommended)
435
- 3. **Start Small**: Use `--docs-only` first, then expand to full project organization
436
- 4. **Review Proposed Changes**: Carefully review consolidations and moves
437
- 5. **Verify Pruning Decisions**: Review stale files before removal, some may still be valuable
438
- 6. **Test After Organization**: Run tests after organizing to ensure imports still work
439
- 7. **Update Links**: Check that documentation links and imports still work
440
- 8. **Document Structure**: Update README or PROJECT_ORGANIZATION.md to reflect new structure
441
- 9. **Use Scope Flags**: Limit scope with `--docs-only`, `--tests-only`, etc. for focused changes
442
- 10. **Review Report**: Always check the organization report for detailed change log
443
-
444
- ## Notes
445
-
446
- - This slash command delegates to the **Project Organizer agent** (`project-organizer`)
447
- - The agent performs intelligent organization across **all project file types**
448
- - **Default behavior**: Organizes ALL files (comprehensive project organization)
449
- - **Legacy behavior**: Use `--docs-only` to only organize documentation (old default)
450
- - Integrates with git to preserve file history
451
- - Creates comprehensive reports for audit trails
452
- - Can be run repeatedly safely (idempotent within scope)
453
- - Detects existing patterns and respects them (PROJECT_ORGANIZATION.md, CONTRIBUTING.md)
454
- - Falls back to framework-appropriate defaults if no pattern detected
455
-
456
- ## What Gets Organized (by Default)
457
-
458
- **ALL project files by default**, including:
459
-
460
- **Documentation**:
461
- - Markdown files (*.md)
462
- - reStructuredText files (*.rst)
463
- - Text documentation (*.txt in docs/ or with doc-like names)
464
- - README files in various locations (except root README.md)
465
- - Guide and tutorial files
466
- - Architecture and design documents
467
-
468
- **Source Code**:
469
- - Python files (*.py) - organized into proper module structure
470
- - JavaScript/TypeScript (*.js, *.ts, *.jsx, *.tsx)
471
- - Other language source files
472
- - Utilities and helper modules
473
-
474
- **Tests**:
475
- - Unit tests (*_test.*, test_*.*)
476
- - Integration tests
477
- - Test fixtures and utilities
478
-
479
- **Scripts**:
480
- - Shell scripts (*.sh, *.bash)
481
- - Python scripts (identified by patterns)
482
- - Build and deployment scripts
483
-
484
- **Configuration** (with caution):
485
- - Project-specific configs (not package.json, pyproject.toml, etc.)
486
- - Environment config templates
487
-
488
- **Files NEVER touched (protected)**:
489
- - Root README.md, CHANGELOG.md, LICENSE.md
490
- - Package files (package.json, pyproject.toml, Cargo.toml, etc.)
491
- - Build artifacts (dist/, build/, target/, node_modules/, __pycache__/)
492
- - Git files (.git/, .gitignore, .gitattributes)
493
- - CI/CD files (.github/, .gitlab-ci.yml, etc.)
494
- - Virtual environments (venv/, .venv/, env/)
112
+ ## Safety Features
495
113
 
496
- ## Related Commands
114
+ - Full project backup before changes
115
+ - Git integration (preserves history)
116
+ - Import validation (ensures moves won't break code)
117
+ - Protected files never touched
118
+ - Conservative pruning (archive when unsure)
497
119
 
498
- - `/mpm-init`: Initialize or update project documentation and structure
499
- - `/mpm-doctor`: Diagnose project health and issues (includes documentation checks)
500
- - `/mpm-status`: Check current project state
120
+ See docs/commands/organize.md for full documentation.
@@ -4,120 +4,18 @@ command: postmortem
4
4
  aliases: [mpm-postmortem]
5
5
  migration_target: /mpm/analysis:postmortem
6
6
  category: analysis
7
- deprecated_aliases: []
8
7
  description: Analyze session errors and suggest improvements
9
8
  ---
10
- # Analyze session errors and suggest improvements
9
+ # /mpm-postmortem
11
10
 
12
- Perform a comprehensive analysis of errors encountered during the current or previous session and generate actionable improvement suggestions.
11
+ Analyze session errors and generate improvement suggestions.
13
12
 
14
13
  ## Usage
15
-
16
- ```
17
- /mpm-postmortem [options]
18
14
  ```
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
15
+ /mpm-postmortem [--auto-fix] [--create-prs] [--dry-run]
64
16
  ```
65
17
 
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
18
+ Analyzes errors from: scripts, skills, agents, user code.
19
+ Generates: fixes, updates, PR recommendations, suggestions.
120
20
 
121
- - `/mpm-doctor`: Diagnose installation and configuration issues
122
- - `/mpm-session-resume`: Resume previous session with context
123
- - `/mpm-status`: View current system status
21
+ See docs/commands/postmortem.md for details.