claude-mpm 4.7.3__py3-none-any.whl → 4.7.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.
- claude_mpm/VERSION +1 -1
- claude_mpm/agents/PM_INSTRUCTIONS.md +0 -1
- claude_mpm/agents/templates/project_organizer.json +3 -3
- claude_mpm/cli/commands/mpm_init.py +458 -0
- claude_mpm/cli/commands/mpm_init_handler.py +4 -0
- claude_mpm/cli/parsers/mpm_init_parser.py +37 -7
- claude_mpm/commands/mpm-help.md +4 -1
- claude_mpm/commands/mpm-init.md +47 -3
- claude_mpm/commands/mpm-monitor.md +409 -0
- claude_mpm/commands/mpm-organize.md +23 -10
- claude_mpm/dashboard/static/built/shared/page-structure.js +0 -2
- claude_mpm/dashboard/static/index-hub-backup.html +713 -0
- claude_mpm/dashboard/static/index.html +529 -607
- claude_mpm/dashboard/static/production/main.html +0 -17
- claude_mpm/dashboard/templates/index.html +0 -17
- claude_mpm/services/project/enhanced_analyzer.py +31 -4
- {claude_mpm-4.7.3.dist-info → claude_mpm-4.7.4.dist-info}/METADATA +1 -1
- {claude_mpm-4.7.3.dist-info → claude_mpm-4.7.4.dist-info}/RECORD +22 -21
- claude_mpm/dashboard/static/monitors-index.html +0 -218
- {claude_mpm-4.7.3.dist-info → claude_mpm-4.7.4.dist-info}/WHEEL +0 -0
- {claude_mpm-4.7.3.dist-info → claude_mpm-4.7.4.dist-info}/entry_points.txt +0 -0
- {claude_mpm-4.7.3.dist-info → claude_mpm-4.7.4.dist-info}/licenses/LICENSE +0 -0
- {claude_mpm-4.7.3.dist-info → claude_mpm-4.7.4.dist-info}/top_level.txt +0 -0
claude_mpm/commands/mpm-init.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# /mpm-init
|
1
|
+
# /mpm-init [update]
|
2
2
|
|
3
3
|
Initialize or intelligently update your project for optimal use with Claude Code and Claude MPM using the Agentic Coder Optimizer agent.
|
4
4
|
|
@@ -6,8 +6,9 @@ Initialize or intelligently update your project for optimal use with Claude Code
|
|
6
6
|
|
7
7
|
```
|
8
8
|
/mpm-init # Auto-detects and offers update or create
|
9
|
+
/mpm-init update # Lightweight update based on recent git activity
|
9
10
|
/mpm-init --review # Review project state without changes
|
10
|
-
/mpm-init --update #
|
11
|
+
/mpm-init --update # Full update of existing CLAUDE.md
|
11
12
|
/mpm-init --organize # Organize project structure
|
12
13
|
/mpm-init --force # Force recreate from scratch
|
13
14
|
/mpm-init --project-type web --framework react
|
@@ -18,6 +19,8 @@ Initialize or intelligently update your project for optimal use with Claude Code
|
|
18
19
|
|
19
20
|
This command delegates to the Agentic Coder Optimizer agent to establish clear, single-path project standards for documentation, tooling, and workflows.
|
20
21
|
|
22
|
+
**Quick Update Mode**: Running `/mpm-init update` performs a lightweight update focused on recent git activity. It analyzes recent commits, generates an activity report, and updates documentation with minimal changes. Perfect for quick refreshes after development sprints.
|
23
|
+
|
21
24
|
**Smart Update Mode**: When CLAUDE.md exists, the command automatically offers to update rather than recreate, preserving your custom content while refreshing standard sections. Previous versions are archived in `docs/_archive/` for safety.
|
22
25
|
|
23
26
|
## Features
|
@@ -135,6 +138,14 @@ When updating existing documentation:
|
|
135
138
|
```
|
136
139
|
Analyzes project and offers appropriate action (create/update/review).
|
137
140
|
|
141
|
+
### Quick Update (Lightweight)
|
142
|
+
```bash
|
143
|
+
/mpm-init update
|
144
|
+
```
|
145
|
+
Fast update based on recent 30-day git activity. Generates activity report and updates docs with minimal changes.
|
146
|
+
|
147
|
+
**Note**: Typing `/mpm-init update` executes `claude-mpm mpm-init --quick-update` automatically.
|
148
|
+
|
138
149
|
### Review Project State
|
139
150
|
```bash
|
140
151
|
/mpm-init --review
|
@@ -173,10 +184,26 @@ Quick initialization without code analysis.
|
|
173
184
|
|
174
185
|
## Implementation
|
175
186
|
|
176
|
-
This command
|
187
|
+
**IMPORTANT**: This slash command accepts an optional `update` argument for quick updates.
|
188
|
+
|
189
|
+
**Argument Processing**:
|
190
|
+
- When you type `/mpm-init update`, Claude executes `claude-mpm mpm-init --quick-update`
|
191
|
+
- When you type `/mpm-init` (no argument), Claude executes standard mode
|
192
|
+
- The slash command handler automatically maps the `update` argument to the `--quick-update` flag
|
193
|
+
|
194
|
+
This command routes between different modes:
|
195
|
+
|
196
|
+
**Quick Update Mode** (`/mpm-init update`):
|
197
|
+
```bash
|
198
|
+
claude-mpm mpm-init --quick-update
|
199
|
+
```
|
200
|
+
This triggers a lightweight update that analyzes recent git activity (30 days) and generates an activity report.
|
201
|
+
|
202
|
+
**Standard Mode** (`/mpm-init`):
|
177
203
|
```bash
|
178
204
|
claude-mpm mpm-init [options]
|
179
205
|
```
|
206
|
+
This triggers the full initialization or smart update flow.
|
180
207
|
|
181
208
|
The command delegates to the Agentic Coder Optimizer agent which:
|
182
209
|
1. Analyzes your project structure
|
@@ -187,6 +214,12 @@ The command delegates to the Agentic Coder Optimizer agent which:
|
|
187
214
|
6. Performs AST analysis (if enabled)
|
188
215
|
7. Organizes everything with priority rankings
|
189
216
|
|
217
|
+
**Quick Update Mode** performs:
|
218
|
+
1. Git history analysis (last 30 days)
|
219
|
+
2. Recent activity report generation
|
220
|
+
3. Lightweight documentation updates
|
221
|
+
4. Change summary for PM memory
|
222
|
+
|
190
223
|
## Expected Output
|
191
224
|
|
192
225
|
### For New Projects
|
@@ -206,12 +239,23 @@ The command delegates to the Agentic Coder Optimizer agent which:
|
|
206
239
|
- ✅ **Files organized**: Misplaced files moved (if --organize)
|
207
240
|
- ✅ **Change summary**: Report of what was updated
|
208
241
|
|
242
|
+
### For Quick Update Mode (`/mpm-init update`)
|
243
|
+
- ✅ **Activity Report**: Summary of recent 30-day git activity
|
244
|
+
- ✅ **Recent Commits**: List of commits with authors and dates
|
245
|
+
- ✅ **Changed Files**: Files with most modifications
|
246
|
+
- ✅ **Active Branches**: Current and recent branch activity
|
247
|
+
- ✅ **Lightweight Doc Updates**: Append activity notes to CLAUDE.md
|
248
|
+
- ✅ **PM Memory Update**: Recommendations for project manager
|
249
|
+
- ✅ **Quick Check**: Verify CLAUDE.md freshness without full regeneration
|
250
|
+
|
209
251
|
## Notes
|
210
252
|
|
253
|
+
- **Quick Update vs Full Update**: Use `/mpm-init update` for fast activity-based updates (30 days), or `/mpm-init --update` for comprehensive doc refresh
|
211
254
|
- **Smart Mode**: Automatically detects existing CLAUDE.md and offers update vs recreate
|
212
255
|
- **Safe Updates**: Previous versions always archived before updating
|
213
256
|
- **Custom Content**: Your project-specific sections are preserved by default
|
214
257
|
- **Git Integration**: Analyzes recent commits to understand project evolution
|
258
|
+
- **Argument Processing**: The slash command processes the `update` argument and routes to `--quick-update` flag
|
215
259
|
- The command uses the Agentic Coder Optimizer agent for implementation
|
216
260
|
- AST analysis is enabled by default for comprehensive documentation
|
217
261
|
- Priority rankings help AI agents focus on critical instructions first
|
@@ -0,0 +1,409 @@
|
|
1
|
+
# Manage Socket.IO monitoring server
|
2
|
+
|
3
|
+
Control the Claude MPM monitoring server that powers the real-time dashboard interface for event tracking and project visualization.
|
4
|
+
|
5
|
+
## Usage
|
6
|
+
|
7
|
+
```
|
8
|
+
/mpm-monitor [subcommand] [options]
|
9
|
+
```
|
10
|
+
|
11
|
+
## Description
|
12
|
+
|
13
|
+
This slash command manages the Socket.IO monitoring server that provides real-time event tracking and visualization through a web-based dashboard. The monitoring server listens for events from the Claude MPM framework and displays them in an interactive interface accessible via web browser.
|
14
|
+
|
15
|
+
The monitoring server typically runs on port 8765 (or auto-selects an available port in the range 8765-8785) and provides a real-time dashboard at `http://localhost:8765`.
|
16
|
+
|
17
|
+
## Available Subcommands
|
18
|
+
|
19
|
+
### Start Monitoring Server
|
20
|
+
Start the Socket.IO monitoring server to enable real-time event tracking.
|
21
|
+
|
22
|
+
```
|
23
|
+
/mpm-monitor start [--port PORT] [--host HOST] [--dashboard] [--dashboard-port PORT] [--foreground] [--background] [--force] [--no-reclaim]
|
24
|
+
```
|
25
|
+
|
26
|
+
**Options:**
|
27
|
+
- `--port PORT`: Specific port to start server on (auto-selects if not specified, range: 8765-8785)
|
28
|
+
- `--host HOST`: Host to bind to (default: localhost)
|
29
|
+
- `--dashboard`: Enable web dashboard interface (enabled by default)
|
30
|
+
- `--dashboard-port PORT`: Dashboard port number (default: 8766)
|
31
|
+
- `--foreground`: Run server in foreground mode (blocks terminal)
|
32
|
+
- `--background`: Run server in background/daemon mode (default behavior)
|
33
|
+
- `--force`: Force kill daemon processes to reclaim ports (use with caution)
|
34
|
+
- `--no-reclaim`: Don't automatically reclaim ports from debug scripts
|
35
|
+
|
36
|
+
**Examples:**
|
37
|
+
```
|
38
|
+
/mpm-monitor start
|
39
|
+
/mpm-monitor start --port 8765
|
40
|
+
/mpm-monitor start --port 8770 --dashboard --dashboard-port 8771
|
41
|
+
/mpm-monitor start --foreground
|
42
|
+
/mpm-monitor start --force --port 8765
|
43
|
+
```
|
44
|
+
|
45
|
+
**Default Behavior:**
|
46
|
+
- Runs in background/daemon mode
|
47
|
+
- Auto-selects first available port in range 8765-8785
|
48
|
+
- Enables web dashboard on port 8766
|
49
|
+
- Gracefully reclaims ports from debug scripts (not daemons)
|
50
|
+
|
51
|
+
### Stop Monitoring Server
|
52
|
+
Stop a running monitoring server instance.
|
53
|
+
|
54
|
+
```
|
55
|
+
/mpm-monitor stop [--port PORT] [--force]
|
56
|
+
```
|
57
|
+
|
58
|
+
**Options:**
|
59
|
+
- `--port PORT`: Port of server to stop (stops all instances if not specified)
|
60
|
+
- `--force`: Force stop even if clients are connected
|
61
|
+
|
62
|
+
**Examples:**
|
63
|
+
```
|
64
|
+
/mpm-monitor stop
|
65
|
+
/mpm-monitor stop --port 8765
|
66
|
+
/mpm-monitor stop --force
|
67
|
+
```
|
68
|
+
|
69
|
+
**Behavior:**
|
70
|
+
- Without `--port`: Stops all running monitoring server instances
|
71
|
+
- With `--port`: Stops only the server on specified port
|
72
|
+
- Without `--force`: Gracefully disconnects clients before stopping
|
73
|
+
- With `--force`: Immediately stops server regardless of client connections
|
74
|
+
|
75
|
+
### Restart Monitoring Server
|
76
|
+
Restart the monitoring server (stop and start in one operation).
|
77
|
+
|
78
|
+
```
|
79
|
+
/mpm-monitor restart [--port PORT] [--host HOST]
|
80
|
+
```
|
81
|
+
|
82
|
+
**Options:**
|
83
|
+
- `--port PORT`: Port to restart on (uses previous port if not specified)
|
84
|
+
- `--host HOST`: Host to bind to (default: localhost)
|
85
|
+
|
86
|
+
**Examples:**
|
87
|
+
```
|
88
|
+
/mpm-monitor restart
|
89
|
+
/mpm-monitor restart --port 8770
|
90
|
+
/mpm-monitor restart --port 8765 --host 0.0.0.0
|
91
|
+
```
|
92
|
+
|
93
|
+
**Behavior:**
|
94
|
+
- Stops existing server instance
|
95
|
+
- Starts new instance with same or updated configuration
|
96
|
+
- Preserves client connections where possible
|
97
|
+
|
98
|
+
### Check Server Status
|
99
|
+
Display status information about running monitoring servers.
|
100
|
+
|
101
|
+
```
|
102
|
+
/mpm-monitor status [--verbose] [--show-ports]
|
103
|
+
```
|
104
|
+
|
105
|
+
**Options:**
|
106
|
+
- `--verbose`: Show detailed status information (process IDs, uptime, connections)
|
107
|
+
- `--show-ports`: Show status of all ports in the range (8765-8785)
|
108
|
+
|
109
|
+
**Examples:**
|
110
|
+
```
|
111
|
+
/mpm-monitor status
|
112
|
+
/mpm-monitor status --verbose
|
113
|
+
/mpm-monitor status --show-ports
|
114
|
+
```
|
115
|
+
|
116
|
+
**Status Information:**
|
117
|
+
- Running server instances and their ports
|
118
|
+
- Process IDs and uptime
|
119
|
+
- Number of connected clients
|
120
|
+
- Dashboard URLs
|
121
|
+
- Port availability status (with --show-ports)
|
122
|
+
|
123
|
+
### Start on Specific Port
|
124
|
+
Start or restart monitoring server on a specific port (convenience command).
|
125
|
+
|
126
|
+
```
|
127
|
+
/mpm-monitor port <PORT> [--host HOST] [--force] [--no-reclaim]
|
128
|
+
```
|
129
|
+
|
130
|
+
**Arguments:**
|
131
|
+
- `PORT`: Port number to use (required)
|
132
|
+
|
133
|
+
**Options:**
|
134
|
+
- `--host HOST`: Host to bind to (default: localhost)
|
135
|
+
- `--force`: Force kill daemon processes to reclaim port (use with caution)
|
136
|
+
- `--no-reclaim`: Don't automatically reclaim port from debug scripts
|
137
|
+
|
138
|
+
**Examples:**
|
139
|
+
```
|
140
|
+
/mpm-monitor port 8765
|
141
|
+
/mpm-monitor port 8770 --host 0.0.0.0
|
142
|
+
/mpm-monitor port 8765 --force
|
143
|
+
```
|
144
|
+
|
145
|
+
**Behavior:**
|
146
|
+
- If server already running on port: restarts it
|
147
|
+
- If port is in use by another process: fails (unless --force)
|
148
|
+
- Auto-reclaims ports from debug scripts (unless --no-reclaim)
|
149
|
+
|
150
|
+
## Implementation
|
151
|
+
|
152
|
+
This command executes:
|
153
|
+
```bash
|
154
|
+
claude-mpm monitor [subcommand] [options]
|
155
|
+
```
|
156
|
+
|
157
|
+
The slash command passes through to the actual CLI monitoring system, which manages Socket.IO server processes.
|
158
|
+
|
159
|
+
## Monitoring Features
|
160
|
+
|
161
|
+
### Real-Time Event Tracking
|
162
|
+
The monitoring server captures and displays:
|
163
|
+
- **Agent Events**: Task delegation, completion, errors
|
164
|
+
- **Tool Usage**: File operations, bash commands, API calls
|
165
|
+
- **System Events**: Server startup/shutdown, configuration changes
|
166
|
+
- **Project Events**: File changes, git operations, test results
|
167
|
+
- **Memory Operations**: Knowledge persistence, context updates
|
168
|
+
- **WebSocket Events**: Client connections, disconnections, errors
|
169
|
+
|
170
|
+
### Web Dashboard
|
171
|
+
The dashboard interface provides:
|
172
|
+
- **Live Event Stream**: Real-time event feed with filtering
|
173
|
+
- **Project Overview**: Active agents, current tasks, system status
|
174
|
+
- **Performance Metrics**: Event rates, processing times, error counts
|
175
|
+
- **Event History**: Searchable log of past events
|
176
|
+
- **Connection Status**: Client connections, server health
|
177
|
+
- **Visualization**: Event timelines, agent activity graphs
|
178
|
+
|
179
|
+
### Port Management
|
180
|
+
The monitoring server implements smart port selection:
|
181
|
+
- **Auto-Selection**: Finds first available port in range 8765-8785
|
182
|
+
- **Port Reclamation**: Gracefully reclaims ports from debug scripts
|
183
|
+
- **Conflict Resolution**: Detects and handles port conflicts
|
184
|
+
- **Multi-Instance**: Supports multiple servers on different ports
|
185
|
+
|
186
|
+
## Expected Output
|
187
|
+
|
188
|
+
### Start Command Output
|
189
|
+
```
|
190
|
+
Starting Socket.IO monitoring server...
|
191
|
+
|
192
|
+
✓ Server started successfully
|
193
|
+
- Server URL: http://localhost:8765
|
194
|
+
- Dashboard URL: http://localhost:8766
|
195
|
+
- Process ID: 12345
|
196
|
+
- Mode: background
|
197
|
+
|
198
|
+
Monitoring server is ready for connections.
|
199
|
+
Open http://localhost:8766 in your browser to view the dashboard.
|
200
|
+
```
|
201
|
+
|
202
|
+
### Stop Command Output
|
203
|
+
```
|
204
|
+
Stopping monitoring server...
|
205
|
+
|
206
|
+
✓ Server on port 8765 stopped successfully
|
207
|
+
- Disconnected 3 clients gracefully
|
208
|
+
- Process 12345 terminated
|
209
|
+
|
210
|
+
Monitoring server stopped.
|
211
|
+
```
|
212
|
+
|
213
|
+
### Status Command Output
|
214
|
+
```
|
215
|
+
Monitoring Server Status
|
216
|
+
========================
|
217
|
+
|
218
|
+
Active Servers: 1
|
219
|
+
|
220
|
+
Server 1:
|
221
|
+
- Port: 8765
|
222
|
+
- Dashboard: http://localhost:8766
|
223
|
+
- Process ID: 12345
|
224
|
+
- Uptime: 2h 15m 30s
|
225
|
+
- Connected Clients: 3
|
226
|
+
- Status: Running
|
227
|
+
|
228
|
+
Dashboard accessible at: http://localhost:8766
|
229
|
+
```
|
230
|
+
|
231
|
+
### Status with --verbose Output
|
232
|
+
```
|
233
|
+
Monitoring Server Status (Detailed)
|
234
|
+
====================================
|
235
|
+
|
236
|
+
Active Servers: 1
|
237
|
+
|
238
|
+
Server 1:
|
239
|
+
- Port: 8765
|
240
|
+
- Host: localhost
|
241
|
+
- Dashboard: http://localhost:8766
|
242
|
+
- Dashboard Port: 8766
|
243
|
+
- Process ID: 12345
|
244
|
+
- Started: 2025-01-08 14:30:15
|
245
|
+
- Uptime: 2h 15m 30s
|
246
|
+
- Connected Clients: 3
|
247
|
+
- Events Processed: 1,247
|
248
|
+
- Average Event Rate: 0.17/sec
|
249
|
+
- Status: Running (Healthy)
|
250
|
+
|
251
|
+
Client Connections:
|
252
|
+
1. Browser (127.0.0.1:54321) - Connected 2h 10m ago
|
253
|
+
2. CLI Monitor (127.0.0.1:54322) - Connected 1h 45m ago
|
254
|
+
3. External Tool (127.0.0.1:54323) - Connected 30m ago
|
255
|
+
|
256
|
+
Dashboard accessible at: http://localhost:8766
|
257
|
+
```
|
258
|
+
|
259
|
+
### Status with --show-ports Output
|
260
|
+
```
|
261
|
+
Monitoring Server Status
|
262
|
+
========================
|
263
|
+
|
264
|
+
Active Servers: 1
|
265
|
+
Available Ports: 19
|
266
|
+
|
267
|
+
Port Status (8765-8785):
|
268
|
+
8765: ✓ RUNNING (PID 12345, 3 clients)
|
269
|
+
8766: • IN USE (Dashboard for 8765)
|
270
|
+
8767: ○ AVAILABLE
|
271
|
+
8768: ○ AVAILABLE
|
272
|
+
8769: ○ AVAILABLE
|
273
|
+
8770: ○ AVAILABLE
|
274
|
+
... (additional ports)
|
275
|
+
8785: ○ AVAILABLE
|
276
|
+
|
277
|
+
Legend:
|
278
|
+
✓ RUNNING - Monitor server active
|
279
|
+
• IN USE - Used by another process
|
280
|
+
○ AVAILABLE - Ready for use
|
281
|
+
|
282
|
+
Dashboard accessible at: http://localhost:8766
|
283
|
+
```
|
284
|
+
|
285
|
+
### Error Output Examples
|
286
|
+
```
|
287
|
+
Error: Port 8765 is already in use by another process
|
288
|
+
Suggestion: Use --port to specify a different port or --force to reclaim
|
289
|
+
|
290
|
+
Error: Failed to start monitoring server
|
291
|
+
Reason: Permission denied on port 8765
|
292
|
+
Suggestion: Try a port > 1024 or run with appropriate permissions
|
293
|
+
|
294
|
+
Error: Server on port 8765 is not running
|
295
|
+
Suggestion: Use '/mpm-monitor start' to start the server
|
296
|
+
```
|
297
|
+
|
298
|
+
## Use Cases
|
299
|
+
|
300
|
+
### Development Workflow
|
301
|
+
1. **Start monitoring** before beginning development session
|
302
|
+
2. **View dashboard** to track agent activity and events in real-time
|
303
|
+
3. **Monitor errors** to catch issues as they occur
|
304
|
+
4. **Stop monitoring** when done or to free resources
|
305
|
+
|
306
|
+
### Debugging
|
307
|
+
1. **Start with --verbose** to see detailed process information
|
308
|
+
2. **Check status** to verify server is running and clients are connected
|
309
|
+
3. **Review dashboard** to examine event history and error patterns
|
310
|
+
4. **Restart** if server becomes unresponsive
|
311
|
+
|
312
|
+
### Multiple Projects
|
313
|
+
1. **Use --port** to run separate monitors for different projects
|
314
|
+
2. **Check --show-ports** to see which ports are available
|
315
|
+
3. **Manage multiple instances** independently
|
316
|
+
|
317
|
+
### Production Monitoring
|
318
|
+
1. **Start with --background** to run as daemon (default)
|
319
|
+
2. **Configure --host 0.0.0.0** to allow remote access
|
320
|
+
3. **Check status regularly** to ensure server health
|
321
|
+
4. **Use --force carefully** only when necessary to reclaim ports
|
322
|
+
|
323
|
+
## Troubleshooting
|
324
|
+
|
325
|
+
### Port Already in Use
|
326
|
+
```bash
|
327
|
+
# Check what's using the port
|
328
|
+
/mpm-monitor status --show-ports
|
329
|
+
|
330
|
+
# Start on a different port
|
331
|
+
/mpm-monitor start --port 8770
|
332
|
+
|
333
|
+
# Or force reclaim (use cautiously)
|
334
|
+
/mpm-monitor start --port 8765 --force
|
335
|
+
```
|
336
|
+
|
337
|
+
### Server Won't Start
|
338
|
+
```bash
|
339
|
+
# Check detailed status
|
340
|
+
/mpm-monitor status --verbose
|
341
|
+
|
342
|
+
# Try manual restart
|
343
|
+
/mpm-monitor stop --force
|
344
|
+
/mpm-monitor start
|
345
|
+
```
|
346
|
+
|
347
|
+
### Dashboard Not Accessible
|
348
|
+
```bash
|
349
|
+
# Verify server is running
|
350
|
+
/mpm-monitor status
|
351
|
+
|
352
|
+
# Check dashboard port
|
353
|
+
/mpm-monitor status --verbose
|
354
|
+
|
355
|
+
# Restart with specific dashboard port
|
356
|
+
/mpm-monitor restart --dashboard-port 8766
|
357
|
+
```
|
358
|
+
|
359
|
+
### Multiple Servers Running
|
360
|
+
```bash
|
361
|
+
# Check all running servers
|
362
|
+
/mpm-monitor status --show-ports
|
363
|
+
|
364
|
+
# Stop all servers
|
365
|
+
/mpm-monitor stop
|
366
|
+
|
367
|
+
# Start single server
|
368
|
+
/mpm-monitor start
|
369
|
+
```
|
370
|
+
|
371
|
+
## Related Commands
|
372
|
+
|
373
|
+
- `/mpm-status`: Show overall system status including monitoring server
|
374
|
+
- `/mpm-doctor`: Diagnose monitoring and server issues
|
375
|
+
- `/mpm-config`: Configure monitoring server settings
|
376
|
+
- `/mpm-init`: Initialize project with monitoring configuration
|
377
|
+
|
378
|
+
## Notes
|
379
|
+
|
380
|
+
- **Default Mode**: Server runs in background/daemon mode by default
|
381
|
+
- **Port Range**: Auto-selects from 8765-8785 if not specified
|
382
|
+
- **Dashboard**: Web interface is enabled by default on port 8766
|
383
|
+
- **Graceful Shutdown**: Server attempts to disconnect clients gracefully on stop
|
384
|
+
- **Force Reclaim**: The `--force` option should be used with caution as it kills processes
|
385
|
+
- **Debug Scripts**: Ports are automatically reclaimed from debug scripts (not daemons) unless `--no-reclaim` is specified
|
386
|
+
- **Multiple Instances**: You can run multiple monitoring servers on different ports for different projects
|
387
|
+
- **Security**: By default, server only binds to localhost. Use `--host 0.0.0.0` for remote access (consider security implications)
|
388
|
+
|
389
|
+
## Technical Details
|
390
|
+
|
391
|
+
### Socket.IO Server
|
392
|
+
- **Protocol**: Socket.IO 4.x with WebSocket transport
|
393
|
+
- **Port Range**: 8765-8785 (auto-selection)
|
394
|
+
- **Dashboard**: Static web application served on separate port
|
395
|
+
- **Events**: Real-time bidirectional event streaming
|
396
|
+
- **Clients**: Supports multiple simultaneous client connections
|
397
|
+
|
398
|
+
### Process Management
|
399
|
+
- **Daemon Mode**: Background process with PID tracking
|
400
|
+
- **Foreground Mode**: Blocking process (useful for debugging)
|
401
|
+
- **Health Checks**: Automatic health monitoring
|
402
|
+
- **Graceful Shutdown**: Clean client disconnection on stop
|
403
|
+
|
404
|
+
### Port Allocation Strategy
|
405
|
+
1. Check if requested port is available
|
406
|
+
2. If not specified, scan range 8765-8785
|
407
|
+
3. Detect port conflicts with existing processes
|
408
|
+
4. Optionally reclaim ports from debug scripts (not daemons)
|
409
|
+
5. Fail gracefully if no ports available
|
@@ -15,7 +15,9 @@ Organize your project files into proper directories using intelligent pattern de
|
|
15
15
|
|
16
16
|
This slash command delegates to the **Project Organizer agent** to perform thorough project housekeeping. The agent analyzes your project structure, detects existing patterns and framework conventions, then organizes files into proper directories following best practices.
|
17
17
|
|
18
|
-
**Smart Organization**: The agent
|
18
|
+
**Smart Organization**: The agent follows the official [Project Organization Standard](../../../docs/reference/PROJECT_ORGANIZATION.md), which defines comprehensive organization rules for Claude MPM projects. It also checks CLAUDE.md for project-specific guidelines and respects framework-specific conventions.
|
19
|
+
|
20
|
+
**Standard Documentation**: After organizing, this command ensures the organization standard is documented and accessible at `docs/reference/PROJECT_ORGANIZATION.md` with proper linking from CLAUDE.md.
|
19
21
|
|
20
22
|
## Features
|
21
23
|
|
@@ -47,21 +49,26 @@ This slash command delegates to the **Project Organizer agent** to perform thoro
|
|
47
49
|
|
48
50
|
## What This Command Does
|
49
51
|
|
50
|
-
### 1.
|
52
|
+
### 1. Organization Standard Verification
|
53
|
+
- Ensures `docs/reference/PROJECT_ORGANIZATION.md` exists and is current
|
54
|
+
- Creates or updates the standard if needed
|
55
|
+
- Links the standard from CLAUDE.md for easy reference
|
56
|
+
|
57
|
+
### 2. CLAUDE.md Analysis
|
51
58
|
- Checks for existing organization guidelines
|
52
59
|
- Extracts project-specific rules and conventions
|
53
60
|
- Identifies priority areas for organization
|
54
61
|
|
55
|
-
###
|
62
|
+
### 3. Project Structure Detection
|
56
63
|
- Scans directory hierarchy and patterns
|
57
64
|
- Identifies naming conventions (camelCase, kebab-case, snake_case)
|
58
65
|
- Maps current file type locations
|
59
66
|
- Detects framework-specific conventions (Next.js, Django, Rails, etc.)
|
60
67
|
- Determines organization type (feature/type/domain-based)
|
61
68
|
|
62
|
-
###
|
69
|
+
### 4. File Organization Strategy
|
63
70
|
|
64
|
-
The agent organizes files into standard directories:
|
71
|
+
The agent organizes files into standard directories per [PROJECT_ORGANIZATION.md](../../../docs/reference/PROJECT_ORGANIZATION.md):
|
65
72
|
|
66
73
|
```
|
67
74
|
docs/ # All documentation files (*.md, guides, architecture)
|
@@ -72,7 +79,7 @@ src/ # Source code following framework conventions
|
|
72
79
|
.claude/ # Claude MPM configuration and agents
|
73
80
|
```
|
74
81
|
|
75
|
-
###
|
82
|
+
### 5. Framework-Specific Handling
|
76
83
|
|
77
84
|
**Next.js Projects**:
|
78
85
|
- Respects `pages/`, `app/`, `public/`, API routes
|
@@ -93,7 +100,7 @@ src/ # Source code following framework conventions
|
|
93
100
|
- Detects and respects framework conventions
|
94
101
|
- Applies appropriate organizational patterns
|
95
102
|
|
96
|
-
###
|
103
|
+
### 6. Safe File Movement
|
97
104
|
|
98
105
|
For each file to be moved:
|
99
106
|
1. Analyzes file purpose and dependencies
|
@@ -102,14 +109,14 @@ For each file to be moved:
|
|
102
109
|
4. Updates import paths in affected files
|
103
110
|
5. Validates build still works
|
104
111
|
|
105
|
-
###
|
112
|
+
### 7. Backup Creation
|
106
113
|
|
107
114
|
Before major reorganization:
|
108
115
|
```bash
|
109
116
|
backup_YYYYMMDD_HHMMSS.tar.gz # Complete project backup
|
110
117
|
```
|
111
118
|
|
112
|
-
###
|
119
|
+
### 8. Import Path Updates
|
113
120
|
|
114
121
|
Automatically updates:
|
115
122
|
- Python imports (`from old.path import X` → `from new.path import X`)
|
@@ -117,7 +124,7 @@ Automatically updates:
|
|
117
124
|
- Relative path references
|
118
125
|
- Configuration file paths
|
119
126
|
|
120
|
-
###
|
127
|
+
### 9. Organization Report
|
121
128
|
|
122
129
|
Generates detailed report including:
|
123
130
|
- Files moved and their new locations
|
@@ -274,6 +281,12 @@ Use `/mpm-organize` when:
|
|
274
281
|
- Follows guidelines in CLAUDE.md when available
|
275
282
|
- Falls back to framework conventions and best practices
|
276
283
|
|
284
|
+
## Related Documentation
|
285
|
+
|
286
|
+
- **[Project Organization Standard](../../../docs/reference/PROJECT_ORGANIZATION.md)**: Comprehensive organization rules and guidelines
|
287
|
+
- **[Project Structure](../../../docs/developer/STRUCTURE.md)**: Authoritative file organization reference
|
288
|
+
- **[CLAUDE.md](../../../CLAUDE.md)**: Development guidelines with organization quick reference
|
289
|
+
|
277
290
|
## Related Commands
|
278
291
|
|
279
292
|
- `/mpm-init`: Initialize or update project documentation and structure
|
@@ -7,7 +7,6 @@ export class PageStructure {
|
|
7
7
|
constructor() {
|
8
8
|
this.pages = [
|
9
9
|
{ id: 'main', label: '📈 Main Dashboard', href: '/static/' },
|
10
|
-
{ id: 'monitors', label: '📋 All Monitors', href: '/static/monitors-index.html' },
|
11
10
|
{ id: 'events', label: '📊 Events', href: '/static/events.html' },
|
12
11
|
{ id: 'agents', label: '🤖 Agents', href: '/static/agents.html' },
|
13
12
|
{ id: 'tools', label: '🔧 Tools', href: '/static/tools.html' },
|
@@ -24,7 +23,6 @@ export class PageStructure {
|
|
24
23
|
if (path.includes('tools.html')) return 'tools';
|
25
24
|
if (path.includes('files.html')) return 'files';
|
26
25
|
if (path.includes('activity.html')) return 'activity';
|
27
|
-
if (path.includes('monitors-index.html')) return 'monitors';
|
28
26
|
if (path.includes('index.html') || path.endsWith('/static/') || path.endsWith('/')) return 'main';
|
29
27
|
|
30
28
|
return 'main';
|