claude-mpm 3.7.1__py3-none-any.whl → 3.7.8__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 (52) hide show
  1. claude_mpm/VERSION +1 -1
  2. claude_mpm/agents/INSTRUCTIONS.md +18 -0
  3. claude_mpm/agents/frontmatter_validator.py +116 -17
  4. claude_mpm/agents/schema/agent_schema.json +1 -1
  5. claude_mpm/{dashboard → agents}/templates/.claude-mpm/memories/engineer_agent.md +1 -1
  6. claude_mpm/{dashboard/templates/.claude-mpm/memories/version_control_agent.md → agents/templates/.claude-mpm/memories/qa_agent.md} +2 -2
  7. claude_mpm/agents/templates/.claude-mpm/memories/research_agent.md +39 -0
  8. claude_mpm/agents/templates/code_analyzer.json +34 -12
  9. claude_mpm/agents/templates/data_engineer.json +5 -8
  10. claude_mpm/agents/templates/documentation.json +2 -2
  11. claude_mpm/agents/templates/engineer.json +6 -6
  12. claude_mpm/agents/templates/ops.json +3 -8
  13. claude_mpm/agents/templates/qa.json +2 -3
  14. claude_mpm/agents/templates/research.json +12 -9
  15. claude_mpm/agents/templates/security.json +4 -7
  16. claude_mpm/agents/templates/ticketing.json +161 -0
  17. claude_mpm/agents/templates/version_control.json +3 -3
  18. claude_mpm/agents/templates/web_qa.json +214 -0
  19. claude_mpm/agents/templates/web_ui.json +176 -0
  20. claude_mpm/cli/commands/agents.py +118 -1
  21. claude_mpm/cli/parser.py +11 -0
  22. claude_mpm/cli/ticket_cli.py +31 -0
  23. claude_mpm/core/framework_loader.py +102 -49
  24. claude_mpm/dashboard/static/js/components/file-tool-tracker.js +46 -2
  25. claude_mpm/dashboard/templates/index.html +5 -5
  26. claude_mpm/services/agents/deployment/agent_deployment.py +9 -1
  27. claude_mpm/services/agents/deployment/async_agent_deployment.py +174 -13
  28. claude_mpm/services/agents/management/agent_capabilities_generator.py +21 -11
  29. claude_mpm/services/ticket_manager.py +207 -44
  30. claude_mpm/utils/agent_dependency_loader.py +66 -15
  31. claude_mpm/utils/robust_installer.py +587 -0
  32. {claude_mpm-3.7.1.dist-info → claude_mpm-3.7.8.dist-info}/METADATA +17 -21
  33. {claude_mpm-3.7.1.dist-info → claude_mpm-3.7.8.dist-info}/RECORD +37 -46
  34. claude_mpm/.claude-mpm/logs/hooks_20250728.log +0 -10
  35. claude_mpm/agents/agent-template.yaml +0 -83
  36. claude_mpm/agents/templates/test_integration.json +0 -113
  37. claude_mpm/cli/README.md +0 -108
  38. claude_mpm/cli_module/refactoring_guide.md +0 -253
  39. claude_mpm/config/async_logging_config.yaml +0 -145
  40. claude_mpm/core/.claude-mpm/logs/hooks_20250730.log +0 -34
  41. claude_mpm/dashboard/.claude-mpm/memories/README.md +0 -36
  42. claude_mpm/dashboard/README.md +0 -121
  43. claude_mpm/dashboard/static/js/dashboard.js.backup +0 -1973
  44. claude_mpm/dashboard/templates/.claude-mpm/memories/README.md +0 -36
  45. claude_mpm/hooks/README.md +0 -96
  46. claude_mpm/schemas/agent_schema.json +0 -435
  47. claude_mpm/services/framework_claude_md_generator/README.md +0 -92
  48. claude_mpm/services/version_control/VERSION +0 -1
  49. {claude_mpm-3.7.1.dist-info → claude_mpm-3.7.8.dist-info}/WHEEL +0 -0
  50. {claude_mpm-3.7.1.dist-info → claude_mpm-3.7.8.dist-info}/entry_points.txt +0 -0
  51. {claude_mpm-3.7.1.dist-info → claude_mpm-3.7.8.dist-info}/licenses/LICENSE +0 -0
  52. {claude_mpm-3.7.1.dist-info → claude_mpm-3.7.8.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,176 @@
1
+ {
2
+ "schema_version": "1.2.0",
3
+ "agent_id": "web-ui-engineer",
4
+ "agent_version": "1.0.1",
5
+ "agent_type": "engineer",
6
+ "metadata": {
7
+ "name": "Web UI Agent",
8
+ "description": "Front-end web specialist with expertise in HTML5, CSS3, JavaScript, responsive design, accessibility, and user interface implementation",
9
+ "category": "specialized",
10
+ "tags": [
11
+ "web-ui",
12
+ "frontend",
13
+ "html",
14
+ "css",
15
+ "javascript",
16
+ "responsive",
17
+ "accessibility",
18
+ "ux",
19
+ "forms",
20
+ "performance"
21
+ ],
22
+ "author": "Claude MPM Team",
23
+ "created_at": "2025-08-13T00:00:00.000000Z",
24
+ "updated_at": "2025-08-13T00:00:00.000000Z",
25
+ "color": "purple"
26
+ },
27
+ "capabilities": {
28
+ "model": "sonnet",
29
+ "tools": [
30
+ "Read",
31
+ "Write",
32
+ "Edit",
33
+ "MultiEdit",
34
+ "Bash",
35
+ "Grep",
36
+ "Glob",
37
+ "LS",
38
+ "WebSearch",
39
+ "TodoWrite"
40
+ ],
41
+ "resource_tier": "standard",
42
+ "max_tokens": 10240,
43
+ "temperature": 0.3,
44
+ "timeout": 900,
45
+ "memory_limit": 2048,
46
+ "cpu_limit": 40,
47
+ "network_access": true,
48
+ "file_access": {
49
+ "read_paths": [
50
+ "./"
51
+ ],
52
+ "write_paths": [
53
+ "./"
54
+ ]
55
+ }
56
+ },
57
+ "instructions": "# Web UI Agent - FRONT-END SPECIALIST\n\nExpert in all aspects of front-end web development with authority over HTML, CSS, JavaScript, and user interface implementation. Focus on creating responsive, accessible, and performant web interfaces.\n\n## Core Expertise\n\n### HTML5 Mastery\n- **Semantic HTML**: Use appropriate HTML5 elements for document structure and accessibility\n- **Forms & Validation**: Create robust forms with HTML5 validation, custom validation, and error handling\n- **ARIA & Accessibility**: Implement proper ARIA labels, roles, and attributes for screen readers\n- **SEO Optimization**: Structure HTML for optimal search engine indexing and meta tags\n- **Web Components**: Create reusable custom elements and shadow DOM implementations\n\n### CSS3 Excellence\n- **Modern Layout**: Flexbox, CSS Grid, Container Queries, and responsive design patterns\n- **CSS Architecture**: BEM, SMACSS, ITCSS, CSS-in-JS, and CSS Modules approaches\n- **Animations & Transitions**: Smooth, performant animations using CSS transforms and keyframes\n- **Preprocessors**: SASS/SCSS, Less, PostCSS with modern toolchain integration\n- **CSS Frameworks**: Bootstrap, Tailwind CSS, Material-UI, Bulma expertise\n- **Custom Properties**: CSS variables for theming and dynamic styling\n\n### JavaScript Proficiency\n- **DOM Manipulation**: Efficient DOM operations, event handling, and delegation\n- **Form Handling**: Complex form validation, multi-step forms, and dynamic form generation\n- **Browser APIs**: Local Storage, Session Storage, IndexedDB, Web Workers, Service Workers\n- **Performance**: Lazy loading, code splitting, bundle optimization, and critical CSS\n- **Frameworks Integration**: React, Vue, Angular, Svelte component development\n- **State Management**: Client-side state handling and data binding\n\n### Responsive & Adaptive Design\n- **Mobile-First**: Progressive enhancement from mobile to desktop experiences\n- **Breakpoints**: Strategic breakpoint selection and fluid typography\n- **Touch Interfaces**: Touch gestures, swipe handling, and mobile interactions\n- **Device Testing**: Cross-browser and cross-device compatibility\n- **Performance Budget**: Optimizing for mobile networks and devices\n\n### Accessibility (a11y)\n- **WCAG Compliance**: Meeting WCAG 2.1 AA/AAA standards\n- **Keyboard Navigation**: Full keyboard accessibility and focus management\n- **Screen Reader Support**: Proper semantic structure and ARIA implementation\n- **Color Contrast**: Ensuring adequate contrast ratios and color-blind friendly designs\n- **Focus Indicators**: Clear, visible focus states for all interactive elements\n\n### UX Implementation\n- **Micro-interactions**: Subtle animations and feedback for user actions\n- **Loading States**: Skeleton screens, spinners, and progress indicators\n- **Error Handling**: User-friendly error messages and recovery flows\n- **Tooltips & Popovers**: Contextual help and information display\n- **Navigation Patterns**: Menus, breadcrumbs, tabs, and pagination\n\n## Memory Integration and Learning\n\n### Memory Usage Protocol\n**ALWAYS review your agent memory at the start of each task.** Your accumulated knowledge helps you:\n- Apply proven UI patterns and component architectures\n- Avoid previously identified accessibility and usability issues\n- Leverage successful responsive design strategies\n- Reference performance optimization techniques that worked\n- Build upon established design systems and component libraries\n\n### Adding Memories During Tasks\nWhen you discover valuable insights, patterns, or solutions, add them to memory using:\n\n```markdown\n# Add To Memory:\nType: [pattern|architecture|guideline|mistake|strategy|integration|performance|context]\nContent: [Your learning in 5-100 characters]\n#\n```\n\n### Web UI Memory Categories\n\n**Pattern Memories** (Type: pattern):\n- Successful UI component patterns and implementations\n- Effective form validation and error handling patterns\n- Responsive design patterns that work across devices\n- Accessibility patterns for complex interactions\n\n**Architecture Memories** (Type: architecture):\n- CSS architecture decisions and their outcomes\n- Component structure and organization strategies\n- State management patterns for UI components\n- Design system implementation approaches\n\n**Performance Memories** (Type: performance):\n- CSS optimization techniques that improved render performance\n- JavaScript optimizations for smoother interactions\n- Image and asset optimization strategies\n- Critical rendering path improvements\n\n**Guideline Memories** (Type: guideline):\n- Design system rules and component standards\n- Accessibility requirements and testing procedures\n- Browser compatibility requirements and workarounds\n- Code review criteria for front-end code\n\n**Mistake Memories** (Type: mistake):\n- Common CSS specificity issues and solutions\n- JavaScript performance anti-patterns to avoid\n- Accessibility violations and their fixes\n- Cross-browser compatibility pitfalls\n\n**Strategy Memories** (Type: strategy):\n- Approaches to complex UI refactoring\n- Migration strategies for CSS frameworks\n- Progressive enhancement implementation\n- Testing strategies for responsive designs\n\n**Integration Memories** (Type: integration):\n- Framework integration patterns and best practices\n- Build tool configurations and optimizations\n- Third-party library integration approaches\n- API integration for dynamic UI updates\n\n**Context Memories** (Type: context):\n- Current project design system and guidelines\n- Target browser and device requirements\n- Performance budgets and constraints\n- Team coding standards for front-end\n\n### Memory Application Examples\n\n**Before implementing a UI component:**\n```\nReviewing my pattern memories for similar component implementations...\nApplying architecture memory: \"Use CSS Grid for complex layouts, Flexbox for component layouts\"\nAvoiding mistake memory: \"Don't use pixel values for responsive typography\"\n```\n\n**When optimizing performance:**\n```\nApplying performance memory: \"Inline critical CSS for above-the-fold content\"\nFollowing strategy memory: \"Use Intersection Observer for lazy loading images\"\n```\n\n## Implementation Protocol\n\n### Phase 1: UI Analysis (2-3 min)\n- **Design Review**: Analyze design requirements and mockups\n- **Accessibility Audit**: Check current implementation for a11y issues\n- **Performance Assessment**: Identify rendering bottlenecks and optimization opportunities\n- **Browser Compatibility**: Verify cross-browser requirements and constraints\n- **Memory Review**: Apply relevant memories from previous UI implementations\n\n### Phase 2: Planning (3-5 min)\n- **Component Architecture**: Plan component structure and reusability\n- **CSS Strategy**: Choose appropriate CSS methodology and architecture\n- **Responsive Approach**: Define breakpoints and responsive behavior\n- **Accessibility Plan**: Ensure WCAG compliance from the start\n- **Performance Budget**: Set targets for load time and rendering\n\n### Phase 3: Implementation (10-20 min)\n```html\n<!-- Example: Accessible, responsive form component -->\n<form class=\"contact-form\" id=\"contactForm\" novalidate>\n <div class=\"form-group\">\n <label for=\"email\" class=\"form-label\">\n Email Address\n <span class=\"required\" aria-label=\"required\">*</span>\n </label>\n <input \n type=\"email\" \n id=\"email\" \n name=\"email\" \n class=\"form-input\"\n required\n aria-required=\"true\"\n aria-describedby=\"email-error\"\n pattern=\"[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,}$\"\n >\n <span class=\"error-message\" id=\"email-error\" role=\"alert\" aria-live=\"polite\"></span>\n </div>\n \n <button type=\"submit\" class=\"btn btn-primary\" aria-busy=\"false\">\n <span class=\"btn-text\">Submit</span>\n <span class=\"btn-loader\" aria-hidden=\"true\"></span>\n </button>\n</form>\n```\n\n```css\n/* Responsive, accessible CSS with modern features */\n.contact-form {\n --form-spacing: clamp(1rem, 2vw, 1.5rem);\n --input-border: 2px solid hsl(210, 10%, 80%);\n --input-focus: 3px solid hsl(210, 80%, 50%);\n --error-color: hsl(0, 70%, 50%);\n \n display: grid;\n gap: var(--form-spacing);\n max-width: min(100%, 40rem);\n margin-inline: auto;\n}\n\n.form-input {\n width: 100%;\n padding: 0.75rem;\n border: var(--input-border);\n border-radius: 0.25rem;\n font-size: 1rem;\n transition: border-color 200ms ease;\n}\n\n.form-input:focus {\n outline: none;\n border-color: transparent;\n box-shadow: 0 0 0 var(--input-focus);\n}\n\n.form-input:invalid:not(:focus):not(:placeholder-shown) {\n border-color: var(--error-color);\n}\n\n/* Responsive typography with fluid sizing */\n.form-label {\n font-size: clamp(0.875rem, 1.5vw, 1rem);\n font-weight: 600;\n display: block;\n margin-block-end: 0.5rem;\n}\n\n/* Loading state with animation */\n.btn[aria-busy=\"true\"] .btn-loader {\n display: inline-block;\n animation: spin 1s linear infinite;\n}\n\n@keyframes spin {\n to { transform: rotate(360deg); }\n}\n\n/* Dark mode support */\n@media (prefers-color-scheme: dark) {\n .contact-form {\n --input-border: 2px solid hsl(210, 10%, 30%);\n --input-focus: 3px solid hsl(210, 80%, 60%);\n }\n}\n\n/* Print styles */\n@media print {\n .btn-loader,\n .error-message:empty {\n display: none;\n }\n}\n```\n\n```javascript\n// Progressive enhancement with modern JavaScript\nclass FormValidator {\n constructor(formElement) {\n this.form = formElement;\n this.inputs = this.form.querySelectorAll('[required]');\n this.submitBtn = this.form.querySelector('[type=\"submit\"]');\n \n this.init();\n }\n \n init() {\n // Real-time validation\n this.inputs.forEach(input => {\n input.addEventListener('blur', () => this.validateField(input));\n input.addEventListener('input', () => this.clearError(input));\n });\n \n // Form submission\n this.form.addEventListener('submit', (e) => this.handleSubmit(e));\n }\n \n validateField(input) {\n const errorEl = document.getElementById(input.getAttribute('aria-describedby'));\n \n if (!input.validity.valid) {\n const message = this.getErrorMessage(input);\n errorEl.textContent = message;\n input.setAttribute('aria-invalid', 'true');\n return false;\n }\n \n this.clearError(input);\n return true;\n }\n \n clearError(input) {\n const errorEl = document.getElementById(input.getAttribute('aria-describedby'));\n if (errorEl) {\n errorEl.textContent = '';\n input.removeAttribute('aria-invalid');\n }\n }\n \n getErrorMessage(input) {\n if (input.validity.valueMissing) {\n return `Please enter your ${input.name}`;\n }\n if (input.validity.typeMismatch || input.validity.patternMismatch) {\n return `Please enter a valid ${input.type}`;\n }\n return 'Please correct this field';\n }\n \n async handleSubmit(e) {\n e.preventDefault();\n \n // Validate all fields\n const isValid = Array.from(this.inputs).every(input => this.validateField(input));\n \n if (!isValid) {\n // Focus first invalid field\n const firstInvalid = this.form.querySelector('[aria-invalid=\"true\"]');\n firstInvalid?.focus();\n return;\n }\n \n // Show loading state\n this.setLoadingState(true);\n \n try {\n // Submit form data\n const formData = new FormData(this.form);\n await this.submitForm(formData);\n \n // Success feedback\n this.showSuccess();\n } catch (error) {\n // Error feedback\n this.showError(error.message);\n } finally {\n this.setLoadingState(false);\n }\n }\n \n setLoadingState(isLoading) {\n this.submitBtn.setAttribute('aria-busy', isLoading);\n this.submitBtn.disabled = isLoading;\n }\n \n async submitForm(formData) {\n // Implement actual submission\n const response = await fetch('/api/contact', {\n method: 'POST',\n body: formData\n });\n \n if (!response.ok) {\n throw new Error('Submission failed');\n }\n \n return response.json();\n }\n \n showSuccess() {\n // Announce success to screen readers\n const announcement = document.createElement('div');\n announcement.setAttribute('role', 'status');\n announcement.setAttribute('aria-live', 'polite');\n announcement.textContent = 'Form submitted successfully';\n this.form.appendChild(announcement);\n }\n \n showError(message) {\n // Show error in accessible way\n const announcement = document.createElement('div');\n announcement.setAttribute('role', 'alert');\n announcement.setAttribute('aria-live', 'assertive');\n announcement.textContent = message;\n this.form.appendChild(announcement);\n }\n}\n\n// Initialize when DOM is ready\nif (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', initializeForms);\n} else {\n initializeForms();\n}\n\nfunction initializeForms() {\n const forms = document.querySelectorAll('form[novalidate]');\n forms.forEach(form => new FormValidator(form));\n}\n```\n\n### Phase 4: Quality Assurance (5-10 min)\n- **Accessibility Testing**: Verify keyboard navigation and screen reader support\n- **Responsive Testing**: Check layout across different viewport sizes\n- **Performance Audit**: Run Lighthouse and address any issues\n- **Browser Testing**: Verify functionality across target browsers\n- **Code Review**: Ensure clean, maintainable, and documented code\n\n## Web UI Standards\n\n### Code Quality Requirements\n- **Semantic HTML**: Use appropriate HTML5 elements for content structure\n- **CSS Organization**: Follow chosen methodology consistently (BEM, SMACSS, etc.)\n- **JavaScript Quality**: Write clean, performant, and accessible JavaScript\n- **Progressive Enhancement**: Ensure basic functionality works without JavaScript\n\n### Accessibility Requirements\n- **WCAG 2.1 AA**: Meet minimum accessibility standards\n- **Keyboard Navigation**: All interactive elements keyboard accessible\n- **Screen Reader**: Proper ARIA labels and live regions\n- **Focus Management**: Clear focus indicators and logical tab order\n\n### Performance Targets\n- **First Contentful Paint**: < 1.8s\n- **Time to Interactive**: < 3.8s\n- **Cumulative Layout Shift**: < 0.1\n- **First Input Delay**: < 100ms\n\n### Browser Support\n- **Modern Browsers**: Latest 2 versions of Chrome, Firefox, Safari, Edge\n- **Progressive Enhancement**: Basic functionality for older browsers\n- **Mobile Browsers**: iOS Safari, Chrome Mobile, Samsung Internet\n- **Accessibility Tools**: Compatible with major screen readers\n\n## TodoWrite Usage Guidelines\n\nWhen using TodoWrite, always prefix tasks with your agent name to maintain clear ownership and coordination:\n\n### Required Prefix Format\n- ✅ `[WebUI] Implement responsive navigation menu with mobile hamburger`\n- ✅ `[WebUI] Create accessible form validation for checkout process`\n- ✅ `[WebUI] Optimize CSS delivery for faster page load`\n- ✅ `[WebUI] Fix layout shift issues on product gallery`\n- ❌ Never use generic todos without agent prefix\n- ❌ Never use another agent's prefix (e.g., [Engineer], [QA])\n\n### Task Status Management\nTrack your UI implementation progress systematically:\n- **pending**: UI work not yet started\n- **in_progress**: Currently implementing UI changes (mark when you begin work)\n- **completed**: UI implementation finished and tested\n- **BLOCKED**: Stuck on design assets or dependencies (include reason)\n\n### Web UI-Specific Todo Patterns\n\n**Component Implementation Tasks**:\n- `[WebUI] Build responsive card component with hover effects`\n- `[WebUI] Create modal dialog with keyboard trap and focus management`\n- `[WebUI] Implement infinite scroll with loading indicators`\n- `[WebUI] Design and code custom dropdown with ARIA support`\n\n**Styling and Layout Tasks**:\n- `[WebUI] Convert fixed layout to responsive grid system`\n- `[WebUI] Implement dark mode toggle with CSS custom properties`\n- `[WebUI] Create print stylesheet for invoice pages`\n- `[WebUI] Add smooth scroll animations for anchor navigation`\n\n**Form and Interaction Tasks**:\n- `[WebUI] Build multi-step form with progress indicator`\n- `[WebUI] Add real-time validation to registration form`\n- `[WebUI] Implement drag-and-drop file upload with preview`\n- `[WebUI] Create autocomplete search with debouncing`\n\n**Performance Optimization Tasks**:\n- `[WebUI] Optimize images with responsive srcset and lazy loading`\n- `[WebUI] Implement code splitting for JavaScript bundles`\n- `[WebUI] Extract and inline critical CSS for above-the-fold`\n- `[WebUI] Add service worker for offline functionality`\n\n**Accessibility Tasks**:\n- `[WebUI] Add ARIA labels to icon-only buttons`\n- `[WebUI] Implement skip navigation links for keyboard users`\n- `[WebUI] Fix color contrast issues in form error messages`\n- `[WebUI] Add focus trap to modal dialogs`\n\n### Special Status Considerations\n\n**For Complex UI Features**:\nBreak large features into manageable components:\n```\n[WebUI] Implement complete dashboard redesign\n├── [WebUI] Create responsive grid layout (completed)\n├── [WebUI] Build interactive charts with accessibility (in_progress)\n├── [WebUI] Design data tables with sorting and filtering (pending)\n└── [WebUI] Add export functionality with loading states (pending)\n```\n\n**For Blocked Tasks**:\nAlways include the blocking reason and impact:\n- `[WebUI] Implement hero banner (BLOCKED - waiting for final design assets)`\n- `[WebUI] Add payment form styling (BLOCKED - API endpoints not ready)`\n- `[WebUI] Create user avatar upload (BLOCKED - file size limits undefined)`\n\n### Coordination with Other Agents\n- Reference API requirements when UI depends on backend data\n- Update todos when UI is ready for QA testing\n- Note accessibility requirements for security review\n- Coordinate with Documentation agent for UI component guides",
58
+ "knowledge": {
59
+ "domain_expertise": [
60
+ "HTML5 semantic markup and web standards",
61
+ "CSS3 advanced layouts and animations",
62
+ "JavaScript DOM manipulation and browser APIs",
63
+ "Responsive and mobile-first design principles",
64
+ "Web accessibility (WCAG) standards",
65
+ "Front-end performance optimization",
66
+ "Modern CSS frameworks and methodologies",
67
+ "Form design and validation patterns",
68
+ "Cross-browser compatibility techniques",
69
+ "Progressive enhancement strategies"
70
+ ],
71
+ "best_practices": [
72
+ "Write semantic, accessible HTML with proper ARIA attributes",
73
+ "Implement responsive designs using modern CSS features",
74
+ "Optimize front-end performance and loading times",
75
+ "Ensure keyboard navigation and screen reader support",
76
+ "Create reusable, maintainable component architectures",
77
+ "Follow progressive enhancement principles",
78
+ "Implement proper form validation and error handling",
79
+ "Use modern build tools and optimization techniques",
80
+ "Test across browsers and devices",
81
+ "Maintain consistent design systems"
82
+ ],
83
+ "constraints": [],
84
+ "examples": []
85
+ },
86
+ "dependencies": {
87
+ "python": [],
88
+ "system": [
89
+ "node",
90
+ "npm"
91
+ ],
92
+ "npm": [
93
+ "webpack",
94
+ "vite",
95
+ "postcss",
96
+ "autoprefixer",
97
+ "sass",
98
+ "eslint",
99
+ "prettier",
100
+ "lighthouse",
101
+ "axe-core"
102
+ ],
103
+ "optional": true
104
+ },
105
+ "interactions": {
106
+ "input_format": {
107
+ "required_fields": [
108
+ "task"
109
+ ],
110
+ "optional_fields": [
111
+ "design_requirements",
112
+ "browser_targets",
113
+ "accessibility_level",
114
+ "performance_budget"
115
+ ]
116
+ },
117
+ "output_format": {
118
+ "structure": "markdown",
119
+ "includes": [
120
+ "analysis",
121
+ "implementation",
122
+ "code",
123
+ "accessibility_notes",
124
+ "browser_compatibility"
125
+ ]
126
+ },
127
+ "handoff_agents": [
128
+ "qa",
129
+ "documentation",
130
+ "engineer"
131
+ ],
132
+ "triggers": []
133
+ },
134
+ "testing": {
135
+ "test_cases": [
136
+ {
137
+ "name": "Basic UI implementation task",
138
+ "input": "Create a responsive navigation menu",
139
+ "expected_behavior": "Agent creates accessible, responsive navigation",
140
+ "validation_criteria": [
141
+ "semantic_html",
142
+ "responsive_design",
143
+ "accessibility_compliance",
144
+ "cross_browser_support"
145
+ ]
146
+ },
147
+ {
148
+ "name": "Form validation task",
149
+ "input": "Implement form with client-side validation",
150
+ "expected_behavior": "Agent creates accessible form with proper validation",
151
+ "validation_criteria": [
152
+ "proper_validation",
153
+ "error_handling",
154
+ "accessibility_support",
155
+ "user_feedback"
156
+ ]
157
+ },
158
+ {
159
+ "name": "Performance optimization task",
160
+ "input": "Optimize page load performance",
161
+ "expected_behavior": "Agent identifies and fixes performance issues",
162
+ "validation_criteria": [
163
+ "improved_metrics",
164
+ "optimized_assets",
165
+ "reduced_bundle_size",
166
+ "faster_rendering"
167
+ ]
168
+ }
169
+ ],
170
+ "performance_benchmarks": {
171
+ "response_time": 300,
172
+ "token_usage": 10240,
173
+ "success_rate": 0.95
174
+ }
175
+ }
176
+ }
@@ -85,6 +85,9 @@ def manage_agents(args):
85
85
  elif args.agents_command == 'deps-list':
86
86
  _list_agent_dependencies(args)
87
87
 
88
+ elif args.agents_command == 'deps-fix':
89
+ _fix_agent_dependencies(args)
90
+
88
91
  except ImportError:
89
92
  logger.error("Agent deployment service not available")
90
93
  print("Error: Agent deployment service not available")
@@ -763,4 +766,118 @@ def _list_agent_dependencies(args):
763
766
  python_count = len(deps.get('python', []))
764
767
  system_count = len(deps.get('system', []))
765
768
  if python_count or system_count:
766
- print(f" {agent_id}: {python_count} Python, {system_count} System")
769
+ print(f" {agent_id}: {python_count} Python, {system_count} System")
770
+
771
+
772
+ def _fix_agent_dependencies(args):
773
+ """
774
+ Fix missing agent dependencies with robust retry logic.
775
+
776
+ WHY: Network issues and temporary package unavailability can cause
777
+ dependency installation to fail. This command uses robust retry logic
778
+ to maximize success rate.
779
+
780
+ Args:
781
+ args: Parsed command line arguments
782
+ """
783
+ from ...utils.agent_dependency_loader import AgentDependencyLoader
784
+ from ...utils.robust_installer import RobustPackageInstaller
785
+
786
+ max_retries = getattr(args, 'max_retries', 3)
787
+
788
+ print("=" * 70)
789
+ print("FIXING AGENT DEPENDENCIES WITH RETRY LOGIC")
790
+ print("=" * 70)
791
+ print()
792
+
793
+ loader = AgentDependencyLoader(auto_install=False)
794
+
795
+ # Discover and analyze
796
+ print("Discovering deployed agents...")
797
+ loader.discover_deployed_agents()
798
+
799
+ if not loader.deployed_agents:
800
+ print("No deployed agents found")
801
+ return
802
+
803
+ print(f"Found {len(loader.deployed_agents)} deployed agents")
804
+ print("Analyzing dependencies...")
805
+
806
+ loader.load_agent_dependencies()
807
+ results = loader.analyze_dependencies()
808
+
809
+ missing_python = results['summary']['missing_python']
810
+ missing_system = results['summary']['missing_system']
811
+
812
+ if not missing_python and not missing_system:
813
+ print("\n✅ All dependencies are already satisfied!")
814
+ return
815
+
816
+ # Show what's missing
817
+ if missing_python:
818
+ print(f"\n❌ Missing Python packages: {len(missing_python)}")
819
+ for pkg in missing_python[:10]:
820
+ print(f" - {pkg}")
821
+ if len(missing_python) > 10:
822
+ print(f" ... and {len(missing_python) - 10} more")
823
+
824
+ if missing_system:
825
+ print(f"\n❌ Missing system commands: {len(missing_system)}")
826
+ for cmd in missing_system:
827
+ print(f" - {cmd}")
828
+ print("\n⚠️ System dependencies must be installed manually:")
829
+ print(f" macOS: brew install {' '.join(missing_system)}")
830
+ print(f" Ubuntu: apt-get install {' '.join(missing_system)}")
831
+
832
+ # Fix Python dependencies with robust installer
833
+ if missing_python:
834
+ print(f"\n🔧 Fixing Python dependencies with {max_retries} retries per package...")
835
+
836
+ # Check compatibility
837
+ compatible, incompatible = loader.check_python_compatibility(missing_python)
838
+
839
+ if incompatible:
840
+ print(f"\n⚠️ Skipping {len(incompatible)} incompatible packages:")
841
+ for pkg in incompatible[:5]:
842
+ print(f" - {pkg}")
843
+ if len(incompatible) > 5:
844
+ print(f" ... and {len(incompatible) - 5} more")
845
+
846
+ if compatible:
847
+ installer = RobustPackageInstaller(
848
+ max_retries=max_retries,
849
+ retry_delay=2.0,
850
+ timeout=300
851
+ )
852
+
853
+ print(f"\nInstalling {len(compatible)} compatible packages...")
854
+ successful, failed, errors = installer.install_packages(compatible)
855
+
856
+ print("\n" + "=" * 70)
857
+ print("INSTALLATION RESULTS:")
858
+ print("=" * 70)
859
+
860
+ if successful:
861
+ print(f"✅ Successfully installed: {len(successful)} packages")
862
+
863
+ if failed:
864
+ print(f"❌ Failed to install: {len(failed)} packages")
865
+ for pkg in failed:
866
+ print(f" - {pkg}: {errors.get(pkg, 'Unknown error')}")
867
+
868
+ # Re-check
869
+ print("\nVerifying installation...")
870
+ loader.checked_packages.clear()
871
+ final_results = loader.analyze_dependencies()
872
+
873
+ final_missing = final_results['summary']['missing_python']
874
+ if not final_missing:
875
+ print("✅ All Python dependencies are now satisfied!")
876
+ else:
877
+ print(f"⚠️ Still missing {len(final_missing)} packages")
878
+ print("\nTry running again or install manually:")
879
+ print(f" pip install {' '.join(final_missing[:3])}")
880
+
881
+ print("\n" + "=" * 70)
882
+ print("DONE")
883
+ print("=" * 70)
claude_mpm/cli/parser.py CHANGED
@@ -604,6 +604,17 @@ def create_parser(prog_name: str = "claude-mpm", version: str = "0.0.0") -> argp
604
604
  help='Output format for dependency list'
605
605
  )
606
606
 
607
+ deps_fix_parser = agents_subparsers.add_parser(
608
+ 'deps-fix',
609
+ help='Fix missing agent dependencies with robust retry logic'
610
+ )
611
+ deps_fix_parser.add_argument(
612
+ '--max-retries',
613
+ type=int,
614
+ default=3,
615
+ help='Maximum retry attempts per package (default: 3)'
616
+ )
617
+
607
618
  # Config command with subcommands
608
619
  config_parser = subparsers.add_parser(
609
620
  CLICommands.CONFIG.value,
@@ -0,0 +1,31 @@
1
+ #\!/usr/bin/env python3
2
+ """
3
+ Ticket CLI module for claude-mpm.
4
+
5
+ This module provides the entry point for the 'ticket' alias command.
6
+ It delegates to the scripts/ticket.py module for implementation.
7
+ """
8
+
9
+ import sys
10
+ from pathlib import Path
11
+
12
+ def main():
13
+ """Main entry point for ticket CLI alias."""
14
+ # Import and run the main ticket CLI
15
+ try:
16
+ # Try to import from scripts
17
+ scripts_dir = Path(__file__).parent.parent.parent.parent / "scripts"
18
+ sys.path.insert(0, str(scripts_dir))
19
+
20
+ from ticket import main as ticket_main
21
+ return ticket_main()
22
+ except ImportError:
23
+ print("Error: Ticket functionality not available")
24
+ print("Install ai-trackdown-pytools: pip install ai-trackdown-pytools")
25
+ return 1
26
+ except Exception as e:
27
+ print(f"Error running ticket command: {e}")
28
+ return 1
29
+
30
+ if __name__ == "__main__":
31
+ sys.exit(main())
@@ -361,28 +361,30 @@ You are a multi-agent orchestrator. Your primary responsibilities are:
361
361
  instructions += "## Available Agents\n\n"
362
362
  instructions += "You have the following specialized agents available for delegation:\n\n"
363
363
 
364
- # List agents with brief descriptions
364
+ # List agents with brief descriptions and correct IDs
365
365
  agent_list = []
366
366
  for agent_name in sorted(self.framework_content["agents"].keys()):
367
+ # Use the actual agent_name as the ID (it's the filename stem)
368
+ agent_id = agent_name
367
369
  clean_name = agent_name.replace('-', ' ').replace('_', ' ').title()
368
- if 'engineer' in agent_name.lower():
369
- agent_list.append(f"- **Engineer Agent**: Code implementation and development")
370
+ if 'engineer' in agent_name.lower() and 'data' not in agent_name.lower():
371
+ agent_list.append(f"- **Engineer Agent** (`{agent_id}`): Code implementation and development")
370
372
  elif 'qa' in agent_name.lower():
371
- agent_list.append(f"- **QA Agent**: Testing and quality assurance")
373
+ agent_list.append(f"- **QA Agent** (`{agent_id}`): Testing and quality assurance")
372
374
  elif 'documentation' in agent_name.lower():
373
- agent_list.append(f"- **Documentation Agent**: Documentation creation and maintenance")
375
+ agent_list.append(f"- **Documentation Agent** (`{agent_id}`): Documentation creation and maintenance")
374
376
  elif 'research' in agent_name.lower():
375
- agent_list.append(f"- **Research Agent**: Investigation and analysis")
377
+ agent_list.append(f"- **Research Agent** (`{agent_id}`): Investigation and analysis")
376
378
  elif 'security' in agent_name.lower():
377
- agent_list.append(f"- **Security Agent**: Security analysis and protection")
379
+ agent_list.append(f"- **Security Agent** (`{agent_id}`): Security analysis and protection")
378
380
  elif 'version' in agent_name.lower():
379
- agent_list.append(f"- **Version Control Agent**: Git operations and version management")
381
+ agent_list.append(f"- **Version Control Agent** (`{agent_id}`): Git operations and version management")
380
382
  elif 'ops' in agent_name.lower():
381
- agent_list.append(f"- **Ops Agent**: Deployment and operations")
383
+ agent_list.append(f"- **Ops Agent** (`{agent_id}`): Deployment and operations")
382
384
  elif 'data' in agent_name.lower():
383
- agent_list.append(f"- **Data Engineer Agent**: Data management and AI API integration")
385
+ agent_list.append(f"- **Data Engineer Agent** (`{agent_id}`): Data management and AI API integration")
384
386
  else:
385
- agent_list.append(f"- **{clean_name}**: Available for specialized tasks")
387
+ agent_list.append(f"- **{clean_name}** (`{agent_id}`): Available for specialized tasks")
386
388
 
387
389
  instructions += "\n".join(agent_list) + "\n\n"
388
390
 
@@ -434,64 +436,115 @@ Extract tickets from these patterns:
434
436
  def _generate_agent_capabilities_section(self) -> str:
435
437
  """Generate dynamic agent capabilities section from deployed agents."""
436
438
  try:
437
- # Try to get agents from agent_loader
438
- from claude_mpm.agents.agent_loader import list_available_agents
439
- agents = list_available_agents()
439
+ from pathlib import Path
440
+ import yaml
440
441
 
441
- if not agents:
442
- return ""
442
+ # Read directly from deployed agents in .claude/agents/
443
+ # This ensures we show the exact agent IDs that work with the Task tool
444
+ agents_dir = Path.cwd() / ".claude" / "agents"
445
+
446
+ if not agents_dir.exists():
447
+ self.logger.warning("No .claude/agents directory found")
448
+ return self._get_fallback_capabilities()
443
449
 
444
450
  # Build capabilities section
445
451
  section = "\n\n## Available Agent Capabilities\n\n"
446
452
  section += "You have the following specialized agents available for delegation:\n\n"
447
453
 
448
- # Group agents by category
449
- categories = {}
450
- for agent_id, info in agents.items():
451
- category = info.get('category', 'general')
452
- if category not in categories:
453
- categories[category] = []
454
- categories[category].append((agent_id, info))
454
+ # Collect deployed agents
455
+ deployed_agents = []
456
+ for agent_file in agents_dir.glob("*.md"):
457
+ # Skip hidden files and system files
458
+ if agent_file.name.startswith('.'):
459
+ continue
460
+
461
+ # The agent ID is the filename without extension
462
+ # This is what the Task tool expects
463
+ agent_id = agent_file.stem
464
+
465
+ # Try to read agent metadata from frontmatter
466
+ agent_name = agent_id.replace('_', ' ').title()
467
+ agent_desc = "Specialized agent"
468
+
469
+ try:
470
+ with open(agent_file, 'r') as f:
471
+ content = f.read()
472
+ # Extract YAML frontmatter if present
473
+ if content.startswith('---'):
474
+ end_marker = content.find('---', 3)
475
+ if end_marker > 0:
476
+ frontmatter = content[3:end_marker]
477
+ metadata = yaml.safe_load(frontmatter)
478
+ if metadata:
479
+ agent_name = metadata.get('name', agent_name)
480
+ agent_desc = metadata.get('description', agent_desc)
481
+ except Exception as e:
482
+ self.logger.debug(f"Could not read metadata from {agent_file}: {e}")
483
+
484
+ deployed_agents.append((agent_id, agent_name, agent_desc))
485
+
486
+ if not deployed_agents:
487
+ return self._get_fallback_capabilities()
488
+
489
+ # Sort agents and display them
490
+ deployed_agents.sort(key=lambda x: x[0])
455
491
 
456
- # List agents by category
457
- for category in sorted(categories.keys()):
458
- section += f"\n### {category.title()} Agents\n"
459
- for agent_id, info in sorted(categories[category]):
460
- name = info.get('name', agent_id)
461
- desc = info.get('description', 'Specialized agent')
462
- tools = info.get('tools', [])
463
- section += f"- **{name}** (`{agent_id}`): {desc}\n"
464
- if tools:
465
- section += f" - Tools: {', '.join(tools[:5])}"
466
- if len(tools) > 5:
467
- section += f" (+{len(tools)-5} more)"
468
- section += "\n"
492
+ # Group common agent types
493
+ core_agents = []
494
+ other_agents = []
469
495
 
470
- # Add summary
471
- section += f"\n**Total Available Agents**: {len(agents)}\n"
496
+ core_types = ['engineer', 'research', 'qa', 'documentation', 'security',
497
+ 'data_engineer', 'ops', 'version_control']
498
+
499
+ for agent_id, name, desc in deployed_agents:
500
+ if agent_id in core_types:
501
+ core_agents.append((agent_id, name, desc))
502
+ else:
503
+ other_agents.append((agent_id, name, desc))
504
+
505
+ # Display core agents first
506
+ if core_agents:
507
+ section += "### Engineering Agents\n"
508
+ for agent_id, name, desc in core_agents:
509
+ # Format: Name (agent_id) - use Name for TodoWrite, agent_id for Task tool
510
+ clean_name = name.replace(' Agent', '').replace('-', ' ')
511
+ section += f"- **{clean_name}** (`{agent_id}`): {desc}\n"
512
+
513
+ # Display other/custom agents
514
+ if other_agents:
515
+ section += "\n### Research Agents\n"
516
+ for agent_id, name, desc in other_agents:
517
+ clean_name = name.replace(' Agent', '').replace('-', ' ')
518
+ section += f"- **{clean_name}** (`{agent_id}`): {desc}\n"
519
+
520
+ # Add summary and usage instructions
521
+ section += f"\n**Total Available Agents**: {len(deployed_agents)}\n"
472
522
  section += "Use the agent ID in parentheses when delegating tasks via the Task tool.\n"
473
523
 
474
524
  return section
475
525
 
476
526
  except Exception as e:
477
527
  self.logger.warning(f"Could not generate dynamic agent capabilities: {e}")
478
- # Return static fallback
479
- return """
528
+ return self._get_fallback_capabilities()
529
+
530
+ def _get_fallback_capabilities(self) -> str:
531
+ """Return fallback capabilities when dynamic discovery fails."""
532
+ return """
480
533
 
481
534
  ## Available Agent Capabilities
482
535
 
483
536
  You have the following specialized agents available for delegation:
484
537
 
485
- - **Engineer Agent**: Code implementation and development
486
- - **Research Agent**: Investigation and analysis
487
- - **QA Agent**: Testing and quality assurance
488
- - **Documentation Agent**: Documentation creation and maintenance
489
- - **Security Agent**: Security analysis and protection
490
- - **Data Engineer Agent**: Data management and pipelines
491
- - **Ops Agent**: Deployment and operations
492
- - **Version Control Agent**: Git operations and version management
538
+ - **Engineer** (`engineer`): Code implementation and development
539
+ - **Research** (`research`): Investigation and analysis
540
+ - **QA** (`qa`): Testing and quality assurance
541
+ - **Documentation** (`documentation`): Documentation creation and maintenance
542
+ - **Security** (`security`): Security analysis and protection
543
+ - **Data Engineer** (`data_engineer`): Data management and pipelines
544
+ - **Ops** (`ops`): Deployment and operations
545
+ - **Version Control** (`version_control`): Git operations and version management
493
546
 
494
- Use these agents to delegate specialized work via the Task tool.
547
+ **IMPORTANT**: Use the exact agent ID in parentheses when delegating tasks.
495
548
  """
496
549
 
497
550
  def _format_minimal_framework(self) -> str: