claude-mpm 3.3.2__py3-none-any.whl → 3.4.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. claude_mpm/cli/commands/memory.py +192 -14
  2. claude_mpm/cli/parser.py +13 -1
  3. claude_mpm/constants.py +1 -0
  4. claude_mpm/core/claude_runner.py +61 -0
  5. claude_mpm/core/config.py +161 -1
  6. claude_mpm/core/simple_runner.py +61 -0
  7. claude_mpm/hooks/builtin/mpm_command_hook.py +5 -5
  8. claude_mpm/hooks/claude_hooks/hook_handler.py +211 -4
  9. claude_mpm/hooks/claude_hooks/hook_wrapper.sh +10 -3
  10. claude_mpm/hooks/memory_integration_hook.py +51 -5
  11. claude_mpm/scripts/socketio_daemon.py +49 -9
  12. claude_mpm/scripts/socketio_server_manager.py +370 -45
  13. claude_mpm/services/__init__.py +41 -5
  14. claude_mpm/services/agent_memory_manager.py +541 -51
  15. claude_mpm/services/exceptions.py +677 -0
  16. claude_mpm/services/health_monitor.py +892 -0
  17. claude_mpm/services/memory_builder.py +341 -7
  18. claude_mpm/services/memory_optimizer.py +6 -2
  19. claude_mpm/services/project_analyzer.py +771 -0
  20. claude_mpm/services/recovery_manager.py +670 -0
  21. claude_mpm/services/socketio_server.py +653 -36
  22. claude_mpm/services/standalone_socketio_server.py +703 -34
  23. claude_mpm/services/version_control/git_operations.py +26 -0
  24. {claude_mpm-3.3.2.dist-info → claude_mpm-3.4.2.dist-info}/METADATA +34 -10
  25. {claude_mpm-3.3.2.dist-info → claude_mpm-3.4.2.dist-info}/RECORD +30 -44
  26. claude_mpm/agents/agent-template.yaml +0 -83
  27. claude_mpm/agents/test_fix_deployment/.claude-pm/config/project.json +0 -6
  28. claude_mpm/cli/README.md +0 -109
  29. claude_mpm/cli_module/refactoring_guide.md +0 -253
  30. claude_mpm/core/agent_registry.py.bak +0 -312
  31. claude_mpm/core/base_service.py.bak +0 -406
  32. claude_mpm/hooks/README.md +0 -97
  33. claude_mpm/orchestration/SUBPROCESS_DESIGN.md +0 -66
  34. claude_mpm/schemas/README_SECURITY.md +0 -92
  35. claude_mpm/schemas/agent_schema.json +0 -395
  36. claude_mpm/schemas/agent_schema_documentation.md +0 -181
  37. claude_mpm/schemas/agent_schema_security_notes.md +0 -165
  38. claude_mpm/schemas/examples/standard_workflow.json +0 -505
  39. claude_mpm/schemas/ticket_workflow_documentation.md +0 -482
  40. claude_mpm/schemas/ticket_workflow_schema.json +0 -590
  41. claude_mpm/services/framework_claude_md_generator/README.md +0 -92
  42. claude_mpm/services/parent_directory_manager/README.md +0 -83
  43. claude_mpm/services/version_control/VERSION +0 -1
  44. /claude_mpm/{web → dashboard}/open_dashboard.py +0 -0
  45. {claude_mpm-3.3.2.dist-info → claude_mpm-3.4.2.dist-info}/WHEEL +0 -0
  46. {claude_mpm-3.3.2.dist-info → claude_mpm-3.4.2.dist-info}/entry_points.txt +0 -0
  47. {claude_mpm-3.3.2.dist-info → claude_mpm-3.4.2.dist-info}/licenses/LICENSE +0 -0
  48. {claude_mpm-3.3.2.dist-info → claude_mpm-3.4.2.dist-info}/top_level.txt +0 -0
@@ -1,482 +0,0 @@
1
- # Ticket Workflow Schema Documentation
2
-
3
- ## Overview
4
-
5
- The Ticket Workflow Schema provides a comprehensive framework for defining and managing ticket workflows in the Claude MPM system. This schema clearly separates the concepts of **Status** (workflow position) and **Resolution** (outcome reasoning), allowing for flexible and powerful ticket management configurations.
6
-
7
- ## Core Concepts
8
-
9
- ### Status vs Resolution
10
-
11
- The schema enforces a clear separation between two fundamental concepts:
12
-
13
- 1. **Status**: Tracks the current position of a ticket in the workflow lifecycle
14
- - Examples: Open, In Progress, Pending, Resolved, Closed
15
- - Represents WHERE the ticket is in the process
16
- - Controls workflow transitions and available actions
17
-
18
- 2. **Resolution**: Tracks the outcome reasoning when a ticket reaches a terminal state
19
- - Examples: Fixed, Won't Fix, Duplicate, Cannot Reproduce
20
- - Represents WHY the ticket was closed or resolved
21
- - Provides context for reporting and metrics
22
-
23
- ### Valid Combinations
24
-
25
- Different status-resolution combinations are valid and meaningful:
26
- - **Status: Closed, Resolution: Fixed** - Successfully completed work
27
- - **Status: Closed, Resolution: Won't Fix** - Deliberate decision not to address
28
- - **Status: Resolved, Resolution: Workaround** - Problem addressed with alternative solution
29
- - **Status: Canceled, Resolution: Duplicate** - Canceled because it duplicates another ticket
30
-
31
- ## Schema Structure
32
-
33
- ### 1. Workflow Identification
34
-
35
- ```json
36
- {
37
- "schema_version": "1.0.0",
38
- "workflow_id": "standard_workflow",
39
- "workflow_version": "1.0.0",
40
- "metadata": {
41
- "name": "Standard Support Workflow",
42
- "description": "Default workflow for support tickets",
43
- "workflow_type": "support"
44
- }
45
- }
46
- ```
47
-
48
- ### 2. Status States Definition
49
-
50
- Status states are categorized into four types:
51
-
52
- - **initial**: Starting states for new tickets (e.g., Open/New)
53
- - **active**: States where work is being performed (e.g., In Progress, Escalated)
54
- - **waiting**: States where external input is needed (e.g., Pending, On Hold)
55
- - **terminal**: End states (e.g., Resolved, Closed, Canceled)
56
-
57
- Example status definition:
58
-
59
- ```json
60
- {
61
- "status_states": {
62
- "states": [
63
- {
64
- "id": "open",
65
- "name": "Open",
66
- "description": "Ticket has been created but not yet assigned",
67
- "category": "initial",
68
- "is_default": true,
69
- "color": "#4CAF50",
70
- "icon": "circle-o"
71
- },
72
- {
73
- "id": "in_progress",
74
- "name": "In Progress",
75
- "description": "Ticket is actively being worked on",
76
- "category": "active",
77
- "color": "#2196F3",
78
- "icon": "spinner"
79
- }
80
- ]
81
- }
82
- }
83
- ```
84
-
85
- ### 3. Resolution Types Definition
86
-
87
- Resolution types are categorized by outcome:
88
-
89
- - **successful**: Positive outcomes (Fixed, Configuration, Workaround)
90
- - **unsuccessful**: Negative outcomes (Won't Fix, Incomplete)
91
- - **invalid**: Not actual issues (Duplicate, User Error, Works as Designed)
92
- - **deferred**: Postponed for later (Future Release, Backlog)
93
-
94
- Example resolution definition:
95
-
96
- ```json
97
- {
98
- "resolution_types": {
99
- "types": [
100
- {
101
- "id": "fixed",
102
- "name": "Fixed",
103
- "description": "Issue was successfully fixed",
104
- "category": "successful",
105
- "requires_comment": false,
106
- "color": "#4CAF50",
107
- "icon": "check-circle"
108
- },
109
- {
110
- "id": "wont_fix",
111
- "name": "Won't Fix",
112
- "description": "Decision made not to address the issue",
113
- "category": "unsuccessful",
114
- "requires_comment": true,
115
- "color": "#F44336",
116
- "icon": "times-circle"
117
- }
118
- ]
119
- }
120
- }
121
- ```
122
-
123
- ### 4. State Transitions
124
-
125
- Transitions define the valid paths through the workflow:
126
-
127
- ```json
128
- {
129
- "transitions": {
130
- "rules": [
131
- {
132
- "from_status": "open",
133
- "to_status": "in_progress",
134
- "name": "Start Work",
135
- "description": "Begin working on the ticket",
136
- "required_fields": ["assignee"],
137
- "auto_assign": true
138
- },
139
- {
140
- "from_status": "in_progress",
141
- "to_status": "resolved",
142
- "name": "Resolve",
143
- "description": "Mark work as complete",
144
- "required_fields": ["resolution"],
145
- "permissions": ["resolve_ticket"]
146
- }
147
- ]
148
- }
149
- }
150
- ```
151
-
152
- ### 5. Status-Resolution Mapping
153
-
154
- This critical section defines which resolutions are valid for each status:
155
-
156
- ```json
157
- {
158
- "status_resolution_mapping": {
159
- "mappings": [
160
- {
161
- "status_id": "resolved",
162
- "allowed_resolutions": ["fixed", "workaround", "configuration", "documentation"],
163
- "requires_resolution": true,
164
- "default_resolution": "fixed"
165
- },
166
- {
167
- "status_id": "closed",
168
- "allowed_resolutions": ["*"], // All resolutions allowed
169
- "requires_resolution": true
170
- },
171
- {
172
- "status_id": "canceled",
173
- "allowed_resolutions": ["duplicate", "wont_fix", "incomplete", "user_error"],
174
- "requires_resolution": true,
175
- "default_resolution": "wont_fix"
176
- }
177
- ]
178
- }
179
- }
180
- ```
181
-
182
- ## Implementation Examples
183
-
184
- ### Example 1: Standard Support Workflow
185
-
186
- ```json
187
- {
188
- "workflow_id": "support_workflow",
189
- "status_states": {
190
- "states": [
191
- {"id": "new", "name": "New", "category": "initial"},
192
- {"id": "assigned", "name": "Assigned", "category": "active"},
193
- {"id": "in_progress", "name": "In Progress", "category": "active"},
194
- {"id": "waiting_customer", "name": "Waiting on Customer", "category": "waiting"},
195
- {"id": "resolved", "name": "Resolved", "category": "terminal"},
196
- {"id": "closed", "name": "Closed", "category": "terminal"}
197
- ]
198
- },
199
- "transitions": {
200
- "rules": [
201
- {"from_status": "new", "to_status": "assigned", "name": "Assign"},
202
- {"from_status": "assigned", "to_status": "in_progress", "name": "Start"},
203
- {"from_status": "in_progress", "to_status": "waiting_customer", "name": "Request Info"},
204
- {"from_status": "waiting_customer", "to_status": "in_progress", "name": "Customer Responded"},
205
- {"from_status": "in_progress", "to_status": "resolved", "name": "Resolve"},
206
- {"from_status": "resolved", "to_status": "closed", "name": "Close"}
207
- ]
208
- }
209
- }
210
- ```
211
-
212
- ### Example 2: Bug Tracking Workflow
213
-
214
- ```json
215
- {
216
- "workflow_id": "bug_tracking_workflow",
217
- "status_states": {
218
- "states": [
219
- {"id": "reported", "name": "Reported", "category": "initial"},
220
- {"id": "triaged", "name": "Triaged", "category": "active"},
221
- {"id": "in_development", "name": "In Development", "category": "active"},
222
- {"id": "in_review", "name": "In Review", "category": "active"},
223
- {"id": "testing", "name": "Testing", "category": "active"},
224
- {"id": "verified", "name": "Verified", "category": "terminal"},
225
- {"id": "closed", "name": "Closed", "category": "terminal"}
226
- ]
227
- },
228
- "resolution_types": {
229
- "types": [
230
- {"id": "fixed", "name": "Fixed", "category": "successful"},
231
- {"id": "cannot_reproduce", "name": "Cannot Reproduce", "category": "invalid"},
232
- {"id": "duplicate", "name": "Duplicate", "category": "invalid"},
233
- {"id": "by_design", "name": "By Design", "category": "invalid"},
234
- {"id": "wont_fix", "name": "Won't Fix", "category": "unsuccessful"}
235
- ]
236
- }
237
- }
238
- ```
239
-
240
- ## Business Rules
241
-
242
- ### Auto-Close Rules
243
-
244
- Automatically close resolved tickets after a specified period:
245
-
246
- ```json
247
- {
248
- "business_rules": {
249
- "auto_close": {
250
- "enabled": true,
251
- "days_after_resolved": 7,
252
- "excluded_resolutions": ["wont_fix", "workaround"]
253
- }
254
- }
255
- }
256
- ```
257
-
258
- ### Reopen Rules
259
-
260
- Control when and how tickets can be reopened:
261
-
262
- ```json
263
- {
264
- "business_rules": {
265
- "reopen_rules": {
266
- "allow_reopen": true,
267
- "from_statuses": ["resolved", "closed"],
268
- "max_reopen_count": 3,
269
- "reopen_window_days": 30
270
- }
271
- }
272
- }
273
- ```
274
-
275
- ### Escalation Rules
276
-
277
- Automatically escalate tickets based on conditions:
278
-
279
- ```json
280
- {
281
- "business_rules": {
282
- "escalation_rules": [
283
- {
284
- "name": "High Priority SLA",
285
- "condition": {
286
- "status": "open",
287
- "hours_in_status": 4,
288
- "priority": "high"
289
- },
290
- "action": {
291
- "change_status": "escalated",
292
- "change_priority": "critical",
293
- "notify": ["manager", "on_call"]
294
- }
295
- }
296
- ]
297
- }
298
- }
299
- ```
300
-
301
- ## UI Configuration
302
-
303
- ### Quick Transitions
304
-
305
- Define buttons for common actions:
306
-
307
- ```json
308
- {
309
- "ui_configuration": {
310
- "quick_transitions": [
311
- {
312
- "from_status": "open",
313
- "to_status": "in_progress",
314
- "button_label": "Start Work",
315
- "button_style": "primary"
316
- },
317
- {
318
- "from_status": "in_progress",
319
- "to_status": "resolved",
320
- "button_label": "Resolve",
321
- "button_style": "success"
322
- }
323
- ]
324
- }
325
- }
326
- ```
327
-
328
- ## Metrics Configuration
329
-
330
- ### Cycle Time Tracking
331
-
332
- Define which statuses mark the start and end of cycle time:
333
-
334
- ```json
335
- {
336
- "metrics": {
337
- "cycle_time_statuses": {
338
- "start": ["in_progress", "assigned"],
339
- "end": ["resolved", "closed", "canceled"]
340
- }
341
- }
342
- }
343
- ```
344
-
345
- ### Resolution Metrics
346
-
347
- Track success rates by resolution type:
348
-
349
- ```json
350
- {
351
- "metrics": {
352
- "resolution_metrics": [
353
- {
354
- "name": "Success Rate",
355
- "resolution_ids": ["fixed", "configuration", "workaround"],
356
- "metric_type": "success_rate"
357
- },
358
- {
359
- "name": "Defect Rate",
360
- "resolution_ids": ["fixed"],
361
- "metric_type": "defect_rate"
362
- }
363
- ]
364
- }
365
- }
366
- ```
367
-
368
- ## Integration with Claude MPM
369
-
370
- ### Using with TicketingService
371
-
372
- The workflow schema integrates with the existing `TicketingService`:
373
-
374
- ```python
375
- from claude_mpm.services.ticketing_service import TicketingService
376
- from claude_mpm.schemas import load_workflow_schema
377
-
378
- # Load workflow
379
- workflow = load_workflow_schema('standard_workflow')
380
-
381
- # Create ticket with workflow
382
- ticketing = TicketingService.get_instance()
383
- ticket = ticketing.create_ticket(
384
- title="Issue with login",
385
- description="User cannot log in",
386
- status=workflow.default_status,
387
- workflow_id=workflow.workflow_id
388
- )
389
-
390
- # Transition ticket
391
- ticketing.transition_ticket(
392
- ticket_id=ticket.id,
393
- to_status="in_progress",
394
- assignee="engineer@example.com"
395
- )
396
-
397
- # Resolve with appropriate resolution
398
- ticketing.update_ticket(
399
- ticket_id=ticket.id,
400
- status="resolved",
401
- resolution="fixed",
402
- resolution_comment="Fixed authentication bug"
403
- )
404
- ```
405
-
406
- ### Validation
407
-
408
- The schema provides comprehensive validation:
409
-
410
- ```python
411
- from claude_mpm.schemas import validate_workflow
412
-
413
- # Validate workflow definition
414
- errors = validate_workflow(workflow_config)
415
- if errors:
416
- print(f"Workflow validation failed: {errors}")
417
- ```
418
-
419
- ### Migration from Existing Systems
420
-
421
- For systems that conflate status and resolution:
422
-
423
- ```python
424
- # Map conflated values to separate status/resolution
425
- MIGRATION_MAP = {
426
- "fixed": {"status": "closed", "resolution": "fixed"},
427
- "wontfix": {"status": "closed", "resolution": "wont_fix"},
428
- "duplicate": {"status": "closed", "resolution": "duplicate"},
429
- "invalid": {"status": "closed", "resolution": "cannot_reproduce"},
430
- "worksforme": {"status": "closed", "resolution": "cannot_reproduce"}
431
- }
432
-
433
- def migrate_ticket(old_status):
434
- """Migrate from conflated status to separate status/resolution."""
435
- if old_status in MIGRATION_MAP:
436
- return MIGRATION_MAP[old_status]
437
- else:
438
- return {"status": old_status, "resolution": None}
439
- ```
440
-
441
- ## Best Practices
442
-
443
- ### 1. Status Design
444
-
445
- - Keep status count manageable (5-10 statuses)
446
- - Use clear, action-oriented names
447
- - Ensure each status has a clear purpose
448
- - Avoid overlapping or ambiguous statuses
449
-
450
- ### 2. Resolution Design
451
-
452
- - Cover all possible outcomes
453
- - Use descriptive names that explain the outcome
454
- - Require comments for negative resolutions
455
- - Group resolutions by category for reporting
456
-
457
- ### 3. Transition Design
458
-
459
- - Keep transitions simple and logical
460
- - Avoid creating too many paths
461
- - Use required fields to ensure data quality
462
- - Consider permissions for sensitive transitions
463
-
464
- ### 4. Business Rules
465
-
466
- - Start simple and add complexity as needed
467
- - Test escalation rules thoroughly
468
- - Monitor auto-close behavior
469
- - Document all custom rules
470
-
471
- ### 5. Metrics
472
-
473
- - Define clear success criteria
474
- - Track both status duration and resolution types
475
- - Use metrics to identify workflow bottlenecks
476
- - Regular review and optimization
477
-
478
- ## Conclusion
479
-
480
- The Ticket Workflow Schema provides a flexible and powerful framework for managing ticket lifecycles in Claude MPM. By clearly separating Status (workflow position) and Resolution (outcome reasoning), it enables sophisticated workflow management while maintaining clarity and simplicity.
481
-
482
- The schema's extensibility through business rules, UI configuration, and metrics ensures it can adapt to various use cases while maintaining consistency and predictability in ticket handling.