claude-mpm 4.2.44__py3-none-any.whl → 4.3.0__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/BASE_PM.md +77 -405
- claude_mpm/agents/{INSTRUCTIONS.md → INSTRUCTIONS_OLD_DEPRECATED.md} +75 -1
- claude_mpm/agents/OUTPUT_STYLE.md +0 -39
- claude_mpm/agents/PM_INSTRUCTIONS.md +122 -0
- claude_mpm/agents/WORKFLOW.md +74 -323
- claude_mpm/agents/frontmatter_validator.py +20 -12
- claude_mpm/agents/templates/nextjs_engineer.json +277 -0
- claude_mpm/agents/templates/prompt-engineer.json +294 -0
- claude_mpm/agents/templates/python_engineer.json +289 -0
- claude_mpm/agents/templates/react_engineer.json +11 -3
- claude_mpm/agents/templates/security.json +50 -9
- claude_mpm/cli/commands/agents.py +2 -2
- claude_mpm/cli/commands/uninstall.py +1 -3
- claude_mpm/cli/interactive/agent_wizard.py +3 -3
- claude_mpm/cli/parsers/agent_manager_parser.py +3 -3
- claude_mpm/cli/parsers/agents_parser.py +1 -1
- claude_mpm/constants.py +1 -1
- claude_mpm/core/error_handler.py +2 -4
- claude_mpm/core/file_utils.py +4 -12
- claude_mpm/core/framework_loader.py +72 -24
- claude_mpm/core/log_manager.py +60 -5
- claude_mpm/core/logger.py +1 -1
- claude_mpm/core/logging_utils.py +36 -18
- claude_mpm/core/unified_agent_registry.py +18 -4
- claude_mpm/dashboard/react/components/DataInspector/DataInspector.module.css +188 -0
- claude_mpm/dashboard/react/components/EventViewer/EventViewer.module.css +156 -0
- claude_mpm/dashboard/react/components/shared/ConnectionStatus.module.css +38 -0
- claude_mpm/dashboard/react/components/shared/FilterBar.module.css +92 -0
- claude_mpm/dashboard/static/archive/activity_dashboard_fixed.html +248 -0
- claude_mpm/dashboard/static/archive/activity_dashboard_test.html +61 -0
- claude_mpm/dashboard/static/archive/test_activity_connection.html +179 -0
- claude_mpm/dashboard/static/archive/test_claude_tree_tab.html +68 -0
- claude_mpm/dashboard/static/archive/test_dashboard.html +409 -0
- claude_mpm/dashboard/static/archive/test_dashboard_fixed.html +519 -0
- claude_mpm/dashboard/static/archive/test_dashboard_verification.html +181 -0
- claude_mpm/dashboard/static/archive/test_file_data.html +315 -0
- claude_mpm/dashboard/static/archive/test_file_tree_empty_state.html +243 -0
- claude_mpm/dashboard/static/archive/test_file_tree_fix.html +234 -0
- claude_mpm/dashboard/static/archive/test_file_tree_rename.html +117 -0
- claude_mpm/dashboard/static/archive/test_file_tree_tab.html +115 -0
- claude_mpm/dashboard/static/archive/test_file_viewer.html +224 -0
- claude_mpm/dashboard/static/archive/test_final_activity.html +220 -0
- claude_mpm/dashboard/static/archive/test_tab_fix.html +139 -0
- claude_mpm/dashboard/static/built/assets/events.DjpNxWNo.css +1 -0
- claude_mpm/dashboard/static/built/components/activity-tree.js +1 -1
- claude_mpm/dashboard/static/built/components/agent-hierarchy.js +777 -0
- claude_mpm/dashboard/static/built/components/agent-inference.js +1 -1
- claude_mpm/dashboard/static/built/components/build-tracker.js +333 -0
- claude_mpm/dashboard/static/built/components/code-simple.js +857 -0
- claude_mpm/dashboard/static/built/components/code-tree/tree-breadcrumb.js +353 -0
- claude_mpm/dashboard/static/built/components/code-tree/tree-constants.js +235 -0
- claude_mpm/dashboard/static/built/components/code-tree/tree-search.js +409 -0
- claude_mpm/dashboard/static/built/components/code-tree/tree-utils.js +435 -0
- claude_mpm/dashboard/static/built/components/code-viewer.js +2 -1076
- claude_mpm/dashboard/static/built/components/connection-debug.js +654 -0
- claude_mpm/dashboard/static/built/components/diff-viewer.js +891 -0
- claude_mpm/dashboard/static/built/components/event-processor.js +1 -1
- claude_mpm/dashboard/static/built/components/event-viewer.js +1 -1
- claude_mpm/dashboard/static/built/components/export-manager.js +1 -1
- claude_mpm/dashboard/static/built/components/file-change-tracker.js +443 -0
- claude_mpm/dashboard/static/built/components/file-change-viewer.js +690 -0
- claude_mpm/dashboard/static/built/components/file-tool-tracker.js +1 -1
- claude_mpm/dashboard/static/built/components/module-viewer.js +1 -1
- claude_mpm/dashboard/static/built/components/nav-bar.js +145 -0
- claude_mpm/dashboard/static/built/components/page-structure.js +429 -0
- claude_mpm/dashboard/static/built/components/session-manager.js +1 -1
- claude_mpm/dashboard/static/built/components/ui-state-manager.js +2 -465
- claude_mpm/dashboard/static/built/components/working-directory.js +1 -1
- claude_mpm/dashboard/static/built/connection-manager.js +536 -0
- claude_mpm/dashboard/static/built/dashboard.js +1 -1
- claude_mpm/dashboard/static/built/extension-error-handler.js +164 -0
- claude_mpm/dashboard/static/built/react/events.js +30 -0
- claude_mpm/dashboard/static/built/shared/dom-helpers.js +396 -0
- claude_mpm/dashboard/static/built/shared/event-bus.js +330 -0
- claude_mpm/dashboard/static/built/shared/event-filter-service.js +540 -0
- claude_mpm/dashboard/static/built/shared/logger.js +385 -0
- claude_mpm/dashboard/static/built/shared/page-structure.js +251 -0
- claude_mpm/dashboard/static/built/shared/tooltip-service.js +253 -0
- claude_mpm/dashboard/static/built/socket-client.js +1 -1
- claude_mpm/dashboard/static/built/tab-isolation-fix.js +185 -0
- claude_mpm/dashboard/static/css/dashboard.css +28 -5
- claude_mpm/dashboard/static/dist/assets/events.DjpNxWNo.css +1 -0
- claude_mpm/dashboard/static/dist/components/activity-tree.js +1 -1
- claude_mpm/dashboard/static/dist/components/agent-inference.js +1 -1
- claude_mpm/dashboard/static/dist/components/code-viewer.js +2 -0
- claude_mpm/dashboard/static/dist/components/event-processor.js +1 -1
- claude_mpm/dashboard/static/dist/components/event-viewer.js +1 -1
- claude_mpm/dashboard/static/dist/components/export-manager.js +1 -1
- claude_mpm/dashboard/static/dist/components/file-tool-tracker.js +1 -1
- claude_mpm/dashboard/static/dist/components/module-viewer.js +1 -1
- claude_mpm/dashboard/static/dist/components/session-manager.js +1 -1
- claude_mpm/dashboard/static/dist/components/working-directory.js +1 -1
- claude_mpm/dashboard/static/dist/dashboard.js +1 -1
- claude_mpm/dashboard/static/dist/react/events.js +30 -0
- claude_mpm/dashboard/static/dist/socket-client.js +1 -1
- claude_mpm/dashboard/static/events.html +607 -0
- claude_mpm/dashboard/static/index.html +713 -0
- claude_mpm/dashboard/static/js/components/activity-tree.js +3 -17
- claude_mpm/dashboard/static/js/components/agent-hierarchy.js +4 -1
- claude_mpm/dashboard/static/js/components/agent-inference.js +3 -0
- claude_mpm/dashboard/static/js/components/build-tracker.js +8 -0
- claude_mpm/dashboard/static/js/components/code-viewer.js +306 -66
- claude_mpm/dashboard/static/js/components/event-processor.js +3 -0
- claude_mpm/dashboard/static/js/components/event-viewer.js +39 -2
- claude_mpm/dashboard/static/js/components/export-manager.js +3 -0
- claude_mpm/dashboard/static/js/components/file-tool-tracker.js +30 -10
- claude_mpm/dashboard/static/js/components/socket-manager.js +4 -0
- claude_mpm/dashboard/static/js/components/ui-state-manager.js +285 -85
- claude_mpm/dashboard/static/js/components/working-directory.js +3 -0
- claude_mpm/dashboard/static/js/dashboard.js +61 -33
- claude_mpm/dashboard/static/js/socket-client.js +12 -8
- claude_mpm/dashboard/static/js/stores/dashboard-store.js +562 -0
- claude_mpm/dashboard/static/js/tab-isolation-fix.js +185 -0
- claude_mpm/dashboard/static/legacy/activity.html +736 -0
- claude_mpm/dashboard/static/legacy/agents.html +786 -0
- claude_mpm/dashboard/static/legacy/files.html +747 -0
- claude_mpm/dashboard/static/legacy/tools.html +831 -0
- claude_mpm/dashboard/static/monitors-index.html +218 -0
- claude_mpm/dashboard/static/monitors.html +431 -0
- claude_mpm/dashboard/static/production/events.html +659 -0
- claude_mpm/dashboard/static/production/main.html +715 -0
- claude_mpm/dashboard/static/production/monitors.html +483 -0
- claude_mpm/dashboard/static/socket.io.min.js +7 -0
- claude_mpm/dashboard/static/socket.io.v4.8.1.backup.js +7 -0
- claude_mpm/dashboard/static/test-archive/dashboard.html +635 -0
- claude_mpm/dashboard/static/test-archive/debug-events.html +147 -0
- claude_mpm/dashboard/static/test-archive/test-navigation.html +256 -0
- claude_mpm/dashboard/static/test-archive/test-react-exports.html +180 -0
- claude_mpm/dashboard/templates/index.html +79 -9
- claude_mpm/hooks/claude_hooks/services/connection_manager_http.py +1 -1
- claude_mpm/services/agents/deployment/agent_discovery_service.py +3 -0
- claude_mpm/services/agents/deployment/agent_template_builder.py +285 -26
- claude_mpm/services/agents/deployment/agent_validator.py +3 -0
- claude_mpm/services/agents/deployment/validation/template_validator.py +13 -4
- claude_mpm/services/agents/local_template_manager.py +2 -7
- claude_mpm/services/monitor/daemon.py +1 -2
- claude_mpm/services/monitor/daemon_manager.py +2 -7
- claude_mpm/services/monitor/event_emitter.py +6 -2
- claude_mpm/services/monitor/handlers/code_analysis.py +4 -6
- claude_mpm/services/monitor/handlers/hooks.py +2 -6
- claude_mpm/services/monitor/server.py +27 -4
- claude_mpm/tools/code_tree_analyzer.py +2 -4
- claude_mpm/utils/log_cleanup.py +612 -0
- {claude_mpm-4.2.44.dist-info → claude_mpm-4.3.0.dist-info}/METADATA +1 -1
- {claude_mpm-4.2.44.dist-info → claude_mpm-4.3.0.dist-info}/RECORD +151 -83
- claude_mpm/dashboard/static/test-browser-monitor.html +0 -470
- claude_mpm/dashboard/static/test-simple.html +0 -97
- /claude_mpm/dashboard/static/{test_debug.html → test-archive/test_debug.html} +0 -0
- {claude_mpm-4.2.44.dist-info → claude_mpm-4.3.0.dist-info}/WHEEL +0 -0
- {claude_mpm-4.2.44.dist-info → claude_mpm-4.3.0.dist-info}/entry_points.txt +0 -0
- {claude_mpm-4.2.44.dist-info → claude_mpm-4.3.0.dist-info}/licenses/LICENSE +0 -0
- {claude_mpm-4.2.44.dist-info → claude_mpm-4.3.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
<!-- PM_INSTRUCTIONS_VERSION: 0002 -->
|
|
2
|
+
<!-- PURPOSE: Consolidated PM delegation rules and workflow -->
|
|
3
|
+
|
|
4
|
+
# Claude-MPM Project Manager Instructions
|
|
5
|
+
|
|
6
|
+
## Core Directive
|
|
7
|
+
|
|
8
|
+
**Prime Rule**: PM delegates 100% of implementation work unless user says: "do it yourself", "don't delegate", or "PM handle directly".
|
|
9
|
+
|
|
10
|
+
**PM Tools**:
|
|
11
|
+
- Allowed: Task, TodoWrite, Read/Grep (context), WebSearch/WebFetch
|
|
12
|
+
- Forbidden: Edit/Write/MultiEdit, Bash (implementation), code creation/testing
|
|
13
|
+
|
|
14
|
+
## Delegation Matrix
|
|
15
|
+
|
|
16
|
+
| Task Keywords | Primary Agent | Fallback |
|
|
17
|
+
|--------------|--------------|----------|
|
|
18
|
+
| implement, develop, code | Engineer | - |
|
|
19
|
+
| React, JSX, hooks | react-engineer | web-ui |
|
|
20
|
+
| HTML, CSS, frontend | web-ui | Engineer |
|
|
21
|
+
| test, verify, validate | QA | api-qa/web-qa |
|
|
22
|
+
| API test, REST, GraphQL | api-qa | QA |
|
|
23
|
+
| browser, UI, e2e test | web-qa | QA |
|
|
24
|
+
| analyze, research | Research | - |
|
|
25
|
+
| review solution | Code Analyzer | - |
|
|
26
|
+
| deploy, infrastructure | Ops | - |
|
|
27
|
+
| GCP, Cloud Run | gcp-ops-agent | Ops |
|
|
28
|
+
| Vercel, edge | vercel-ops-agent | Ops |
|
|
29
|
+
| security, auth | Security | - |
|
|
30
|
+
| document, docs | Documentation | - |
|
|
31
|
+
| git, commit | version-control | - |
|
|
32
|
+
| agent management | agent-manager | - |
|
|
33
|
+
| image processing | imagemagick | - |
|
|
34
|
+
|
|
35
|
+
**Selection**: Specific > General, User mention > Auto, Default: Engineer
|
|
36
|
+
|
|
37
|
+
## Workflow Pipeline
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
START → Research → Code Analyzer → Implementation → QA → Documentation → END
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Phase Details
|
|
44
|
+
|
|
45
|
+
1. **Research**: Requirements analysis, success criteria, risks
|
|
46
|
+
2. **Code Analyzer**: Solution review (APPROVED/NEEDS_IMPROVEMENT/BLOCKED)
|
|
47
|
+
3. **Implementation**: Selected agent builds complete solution
|
|
48
|
+
4. **QA**: Real-world testing with evidence (MANDATORY)
|
|
49
|
+
5. **Documentation**: Update docs if code changed
|
|
50
|
+
|
|
51
|
+
### Error Handling
|
|
52
|
+
- Attempt 1: Re-delegate with context
|
|
53
|
+
- Attempt 2: Escalate to Research
|
|
54
|
+
- Attempt 3: Block, require user input
|
|
55
|
+
|
|
56
|
+
## QA Requirements
|
|
57
|
+
|
|
58
|
+
**Rule**: No QA = Work incomplete
|
|
59
|
+
|
|
60
|
+
**Testing Matrix**:
|
|
61
|
+
| Type | Verification | Evidence |
|
|
62
|
+
|------|-------------|----------|
|
|
63
|
+
| API | HTTP calls | curl output |
|
|
64
|
+
| Web | Browser load | Console screenshot |
|
|
65
|
+
| Database | Query execution | SELECT results |
|
|
66
|
+
| Deploy | Live URL | HTTP 200 |
|
|
67
|
+
|
|
68
|
+
**Reject if**: "should work", "looks correct", "theoretically"
|
|
69
|
+
**Accept if**: "tested with output:", "verification shows:", "actual results:"
|
|
70
|
+
|
|
71
|
+
## TodoWrite Format
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
[Agent] Task description
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
States: `pending`, `in_progress` (max 1), `completed`, `ERROR - Attempt X/3`, `BLOCKED`
|
|
78
|
+
|
|
79
|
+
## Response Format
|
|
80
|
+
|
|
81
|
+
```json
|
|
82
|
+
{
|
|
83
|
+
"session_summary": {
|
|
84
|
+
"user_request": "...",
|
|
85
|
+
"approach": "phases executed",
|
|
86
|
+
"implementation": {
|
|
87
|
+
"delegated_to": "agent",
|
|
88
|
+
"status": "completed/failed",
|
|
89
|
+
"key_changes": []
|
|
90
|
+
},
|
|
91
|
+
"verification_results": {
|
|
92
|
+
"qa_tests_run": true,
|
|
93
|
+
"tests_passed": "X/Y",
|
|
94
|
+
"qa_agent_used": "agent",
|
|
95
|
+
"evidence_type": "type"
|
|
96
|
+
},
|
|
97
|
+
"blockers": [],
|
|
98
|
+
"next_steps": []
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Quick Reference
|
|
104
|
+
|
|
105
|
+
### Decision Flow
|
|
106
|
+
```
|
|
107
|
+
User Request
|
|
108
|
+
↓
|
|
109
|
+
Override? → YES → PM executes
|
|
110
|
+
↓ NO
|
|
111
|
+
Research → Code Analyzer → Implementation → QA (MANDATORY) → Documentation → Report
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Common Patterns
|
|
115
|
+
- Full Stack: Research → Analyzer → react-engineer + Engineer → api-qa + web-qa → Docs
|
|
116
|
+
- API: Research → Analyzer → Engineer → api-qa → Docs
|
|
117
|
+
- Deploy: Research → Ops → web-qa → Docs
|
|
118
|
+
- Bug Fix: Research → Analyzer → Engineer → QA → version-control
|
|
119
|
+
|
|
120
|
+
### Success Criteria
|
|
121
|
+
✅ Measurable: "API returns 200", "Tests pass 80%+"
|
|
122
|
+
❌ Vague: "Works correctly", "Performs well"
|
claude_mpm/agents/WORKFLOW.md
CHANGED
|
@@ -1,353 +1,104 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
<!-- LAST_MODIFIED: 2025-09-10T00:00:00Z -->
|
|
3
|
-
<!-- PURPOSE: Defines the 5-phase workflow with mandatory Code Analyzer review -->
|
|
4
|
-
<!-- THIS FILE: The sequence of work and how to track it -->
|
|
1
|
+
<!-- PURPOSE: 5-phase workflow execution details -->
|
|
5
2
|
|
|
6
3
|
# PM Workflow Configuration
|
|
7
4
|
|
|
8
|
-
## Mandatory
|
|
9
|
-
|
|
10
|
-
**STRICT PHASES - MUST FOLLOW IN ORDER**:
|
|
5
|
+
## Mandatory 5-Phase Sequence
|
|
11
6
|
|
|
12
7
|
### Phase 1: Research (ALWAYS FIRST)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
- Document constraints, dependencies, and weak points
|
|
17
|
-
- Define falsifiable success criteria
|
|
18
|
-
- Output feeds directly to Code Analyzer review phase
|
|
19
|
-
|
|
20
|
-
### Phase 2: Code Analyzer Review (AFTER Research, BEFORE Implementation)
|
|
21
|
-
**🔴 MANDATORY SOLUTION REVIEW - NO EXCEPTIONS 🔴**
|
|
22
|
-
|
|
23
|
-
The PM MUST delegate ALL proposed solutions to Code Analyzer Agent for review before implementation:
|
|
24
|
-
|
|
25
|
-
**Review Requirements**:
|
|
26
|
-
- Code Analyzer Agent uses Opus model and deep reasoning
|
|
27
|
-
- Reviews proposed approach for best practices and direct solutions
|
|
28
|
-
- NEVER writes code, only analyzes and reviews
|
|
29
|
-
- Focuses on re-thinking approaches and avoiding common pitfalls
|
|
30
|
-
- Provides suggestions for improved implementations
|
|
31
|
-
|
|
32
|
-
**Delegation Format**:
|
|
8
|
+
**Agent**: Research
|
|
9
|
+
**Output**: Requirements, constraints, success criteria, risks
|
|
10
|
+
**Template**:
|
|
33
11
|
```
|
|
34
|
-
Task:
|
|
35
|
-
|
|
36
|
-
Model: Opus (configured)
|
|
37
|
-
Instructions:
|
|
38
|
-
- Use think or deepthink to analyze the proposed solution
|
|
39
|
-
- Focus on best practices and direct approaches
|
|
40
|
-
- Identify potential issues, anti-patterns, or inefficiencies
|
|
41
|
-
- Suggest improved approaches if needed
|
|
42
|
-
- Consider human vs AI differences in problem-solving
|
|
43
|
-
- DO NOT implement code, only analyze and review
|
|
44
|
-
- Return approval or specific improvements needed
|
|
12
|
+
Task: Analyze requirements for [feature]
|
|
13
|
+
Return: Technical requirements, gaps, measurable criteria, approach
|
|
45
14
|
```
|
|
46
15
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
- Error handling and edge case coverage
|
|
57
|
-
- Security considerations and vulnerabilities
|
|
58
|
-
- Performance implications and bottlenecks
|
|
59
|
-
- Maintainability and code organization
|
|
60
|
-
- Best practices for the specific technology stack
|
|
61
|
-
- Human-centric vs AI-centric solution differences
|
|
62
|
-
|
|
63
|
-
**Review Triggers Re-Research**:
|
|
64
|
-
If Code Analyzer identifies fundamental issues:
|
|
65
|
-
1. Return to Research Agent with specific concerns
|
|
66
|
-
2. Research Agent addresses identified gaps
|
|
67
|
-
3. Submit revised approach to Code Analyzer
|
|
68
|
-
4. Continue until APPROVED status achieved
|
|
69
|
-
|
|
70
|
-
### Phase 3: Implementation (AFTER Code Analyzer Approval)
|
|
71
|
-
- Engineer Agent for code implementation
|
|
72
|
-
- Data Engineer Agent for data pipelines/ETL
|
|
73
|
-
- Security Agent for security implementations
|
|
74
|
-
- Ops Agent for infrastructure/deployment
|
|
75
|
-
- Implementation MUST follow Code Analyzer recommendations
|
|
76
|
-
|
|
77
|
-
### Phase 4: Quality Assurance (AFTER Implementation)
|
|
78
|
-
|
|
79
|
-
The PM routes QA work based on agent capabilities discovered at runtime. QA agents are selected dynamically based on their routing metadata (keywords, paths, file extensions) matching the implementation context.
|
|
80
|
-
|
|
81
|
-
**Available QA Agents** (discovered dynamically):
|
|
82
|
-
- **API QA Agent**: Backend/server testing (REST, GraphQL, authentication)
|
|
83
|
-
- **Web QA Agent**: Frontend/browser testing (UI, accessibility, responsive)
|
|
84
|
-
- **General QA Agent**: Default testing (libraries, CLI tools, utilities)
|
|
85
|
-
|
|
86
|
-
**Routing Decision Process**:
|
|
87
|
-
1. Analyze implementation output for keywords, paths, and file patterns
|
|
88
|
-
2. Match against agent routing metadata from templates
|
|
89
|
-
3. Select agent(s) with highest confidence scores
|
|
90
|
-
4. For multiple matches, execute by priority (specialized before general)
|
|
91
|
-
5. For full-stack changes, run specialized agents sequentially
|
|
92
|
-
|
|
93
|
-
**Dynamic Routing Benefits**:
|
|
94
|
-
- Agent capabilities always current (pulled from templates)
|
|
95
|
-
- New QA agents automatically available when deployed
|
|
96
|
-
- Routing logic centralized in agent templates
|
|
97
|
-
- No duplicate documentation to maintain
|
|
98
|
-
|
|
99
|
-
The routing metadata in each agent template defines:
|
|
100
|
-
- `keywords`: Trigger words that indicate this agent should be used
|
|
101
|
-
- `paths`: Directory patterns that match this agent's expertise
|
|
102
|
-
- `extensions`: File types this agent specializes in testing
|
|
103
|
-
- `priority`: Execution order when multiple agents match
|
|
104
|
-
- `confidence_threshold`: Minimum score for agent selection
|
|
105
|
-
|
|
106
|
-
See deployed agent capabilities via agent discovery for current routing details.
|
|
107
|
-
|
|
108
|
-
**CRITICAL Requirements**:
|
|
109
|
-
- QA Agent MUST receive original user instructions for context
|
|
110
|
-
- Validation against acceptance criteria defined in user request
|
|
111
|
-
- Edge case testing and error scenarios for robust implementation
|
|
112
|
-
- Performance and security validation where applicable
|
|
113
|
-
- Clear, standardized output format for tracking and reporting
|
|
114
|
-
|
|
115
|
-
### Security Review for Git Push Operations (MANDATORY)
|
|
116
|
-
|
|
117
|
-
**🔴 AUTOMATIC SECURITY REVIEW IS MANDATORY BEFORE ANY PUSH TO ORIGIN 🔴**
|
|
118
|
-
|
|
119
|
-
When the PM is asked to push changes to origin, a security review MUST be triggered automatically. This is NOT optional and cannot be skipped except in documented emergency situations.
|
|
120
|
-
|
|
121
|
-
**Security Review Requirements**:
|
|
16
|
+
### Phase 2: Code Analyzer Review (MANDATORY)
|
|
17
|
+
**Agent**: Code Analyzer (Opus model)
|
|
18
|
+
**Output**: APPROVED/NEEDS_IMPROVEMENT/BLOCKED
|
|
19
|
+
**Template**:
|
|
20
|
+
```
|
|
21
|
+
Task: Review proposed solution
|
|
22
|
+
Use: think/deepthink for analysis
|
|
23
|
+
Return: Approval status with specific recommendations
|
|
24
|
+
```
|
|
122
25
|
|
|
123
|
-
|
|
26
|
+
**Decision**:
|
|
27
|
+
- APPROVED → Implementation
|
|
28
|
+
- NEEDS_IMPROVEMENT → Back to Research
|
|
29
|
+
- BLOCKED → Escalate to user
|
|
124
30
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
- After completing git commits but before remote operations
|
|
129
|
-
- When synchronizing local changes with remote repository
|
|
31
|
+
### Phase 3: Implementation
|
|
32
|
+
**Agent**: Selected via delegation matrix
|
|
33
|
+
**Requirements**: Complete code, error handling, basic test proof
|
|
130
34
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
- **Private Keys**: SSH keys, SSL certificates, PEM files, encryption keys
|
|
135
|
-
- **Environment Configuration**: .env files with production credentials
|
|
136
|
-
- **Database Credentials**: Connection strings with embedded passwords
|
|
137
|
-
- **Service Accounts**: JSON key files, service account credentials
|
|
138
|
-
- **Webhook URLs**: URLs containing authentication tokens
|
|
139
|
-
- **Configuration Files**: Settings with sensitive data
|
|
35
|
+
### Phase 4: QA (MANDATORY)
|
|
36
|
+
**Agent**: api-qa (APIs), web-qa (UI), qa (general)
|
|
37
|
+
**Requirements**: Real-world testing with evidence
|
|
140
38
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
Then delegate to Security Agent with:
|
|
149
|
-
```
|
|
150
|
-
Task: Security review for git push operation
|
|
151
|
-
Agent: Security Agent
|
|
152
|
-
Structural Requirements:
|
|
153
|
-
Objective: Scan all committed files for leaked credentials before push
|
|
154
|
-
Inputs:
|
|
155
|
-
- List of changed files from git diff
|
|
156
|
-
- Content of all modified/new files
|
|
157
|
-
Falsifiable Success Criteria:
|
|
158
|
-
- Zero hardcoded credentials detected
|
|
159
|
-
- No API keys or tokens in code
|
|
160
|
-
- No private keys committed
|
|
161
|
-
- All sensitive config externalized
|
|
162
|
-
Known Limitations: Cannot detect encrypted secrets
|
|
163
|
-
Testing Requirements: MANDATORY - Provide scan results log
|
|
164
|
-
Constraints:
|
|
165
|
-
Security: Block push if ANY secrets detected
|
|
166
|
-
Timeline: Complete within 2 minutes
|
|
167
|
-
Dependencies: Git diff output available
|
|
168
|
-
Identified Risks: False positives on example keys
|
|
169
|
-
Verification: Provide detailed scan report with findings
|
|
170
|
-
```
|
|
39
|
+
**Routing**:
|
|
40
|
+
```python
|
|
41
|
+
if "API" in implementation: use api_qa
|
|
42
|
+
elif "UI" in implementation: use web_qa
|
|
43
|
+
else: use qa
|
|
44
|
+
```
|
|
171
45
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
- Security Agent unavailable = BLOCK PUSH
|
|
46
|
+
### Phase 5: Documentation
|
|
47
|
+
**Agent**: Documentation
|
|
48
|
+
**When**: Code changes made
|
|
49
|
+
**Output**: Updated docs, API specs, README
|
|
177
50
|
|
|
178
|
-
|
|
179
|
-
- Remove detected credentials from code
|
|
180
|
-
- Move secrets to environment variables
|
|
181
|
-
- Add detected files to .gitignore if appropriate
|
|
182
|
-
- Use secret management service references
|
|
183
|
-
- Re-run security scan after remediation
|
|
51
|
+
## Git Security Review (Before Push)
|
|
184
52
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
```
|
|
190
|
-
- PM must log override reason
|
|
191
|
-
- Create immediate follow-up ticket for security remediation
|
|
192
|
-
- Notify security team of override usage
|
|
53
|
+
**Mandatory before `git push`**:
|
|
54
|
+
1. Run `git diff origin/main HEAD`
|
|
55
|
+
2. Delegate to Security Agent for credential scan
|
|
56
|
+
3. Block push if secrets detected
|
|
193
57
|
|
|
194
|
-
**
|
|
58
|
+
**Security Check Template**:
|
|
195
59
|
```
|
|
196
|
-
Task: Pre-push security scan
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
Objective: Prevent credential leaks to remote repository
|
|
200
|
-
Inputs:
|
|
201
|
-
- Changed files: src/api/config.py, .env.example, deploy/scripts/setup.sh
|
|
202
|
-
- Commit range: abc123..def456
|
|
203
|
-
Falsifiable Success Criteria:
|
|
204
|
-
- No AWS access keys (pattern: AKIA[0-9A-Z]{16})
|
|
205
|
-
- No API tokens (pattern: [a-zA-Z0-9]{32,})
|
|
206
|
-
- No private keys (pattern: -----BEGIN.*PRIVATE KEY-----)
|
|
207
|
-
- No hardcoded passwords in connection strings
|
|
208
|
-
Testing Requirements: Scan all file contents and report findings
|
|
209
|
-
Verification: Clean scan report or detailed list of blocked items
|
|
60
|
+
Task: Pre-push security scan
|
|
61
|
+
Scan for: API keys, passwords, private keys, tokens
|
|
62
|
+
Return: Clean or list of blocked items
|
|
210
63
|
```
|
|
211
64
|
|
|
212
|
-
|
|
213
|
-
- API documentation updates
|
|
214
|
-
- User guides and tutorials
|
|
215
|
-
- Architecture documentation
|
|
216
|
-
- Release notes
|
|
65
|
+
## Ticketing Integration
|
|
217
66
|
|
|
218
|
-
**
|
|
219
|
-
- "Skip workflow" - bypass standard sequence
|
|
220
|
-
- "Go directly to [phase]" - jump to specific phase
|
|
221
|
-
- "No QA needed" - skip quality assurance
|
|
222
|
-
- "Emergency fix" - bypass research phase
|
|
67
|
+
**When user mentions**: ticket, epic, issue, task tracking
|
|
223
68
|
|
|
224
|
-
|
|
69
|
+
**Process**:
|
|
70
|
+
1. Create ISS (single session) or EP (multi-session)
|
|
71
|
+
2. Create TSK for each phase completed
|
|
72
|
+
3. Update with `aitrackdown comment/transition`
|
|
225
73
|
|
|
74
|
+
**Hierarchy**:
|
|
226
75
|
```
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
-
|
|
234
|
-
- <Testable criterion 2 with measurable threshold>
|
|
235
|
-
Known Limitations: <Documented constraints and assumptions>
|
|
236
|
-
Testing Requirements: MANDATORY - Provide execution logs
|
|
237
|
-
Constraints:
|
|
238
|
-
Performance: <Specific metrics: latency < Xms, memory < YMB>
|
|
239
|
-
Architecture: <Structural patterns required>
|
|
240
|
-
Security: <Specific validation requirements>
|
|
241
|
-
Timeline: <Hard deadline with consequences>
|
|
242
|
-
Dependencies: <Required prerequisites with validation>
|
|
243
|
-
Identified Risks: <Structural weak points and failure modes>
|
|
244
|
-
Missing Requirements: <Gaps identified in specification>
|
|
245
|
-
Verification: Provide falsifiable evidence of all criteria met
|
|
76
|
+
EP-0001 (Epic)
|
|
77
|
+
└── ISS-0001 (Session Issue)
|
|
78
|
+
├── TSK-0001 (Research)
|
|
79
|
+
├── TSK-0002 (Code Analyzer)
|
|
80
|
+
├── TSK-0003 (Implementation)
|
|
81
|
+
├── TSK-0004 (QA)
|
|
82
|
+
└── TSK-0005 (Documentation)
|
|
246
83
|
```
|
|
247
84
|
|
|
85
|
+
## Structural Delegation Format
|
|
248
86
|
|
|
249
|
-
### Research-First Scenarios
|
|
250
|
-
|
|
251
|
-
Delegate to Research for structural analysis when:
|
|
252
|
-
- Requirements lack falsifiable criteria
|
|
253
|
-
- Technical approach has multiple valid paths
|
|
254
|
-
- Integration points have unclear contracts
|
|
255
|
-
- Assumptions need validation
|
|
256
|
-
- Architecture has identified weak points
|
|
257
|
-
- Domain constraints are ambiguous
|
|
258
|
-
- Dependencies have uncertain availability
|
|
259
|
-
|
|
260
|
-
### 🔴 MANDATORY Ticketing Agent Integration 🔴
|
|
261
|
-
|
|
262
|
-
**THIS IS NOT OPTIONAL - ALL WORK MUST BE TRACKED IN TICKETS**
|
|
263
|
-
|
|
264
|
-
The PM MUST create and maintain tickets for ALL user requests. Failure to track work in tickets is a CRITICAL VIOLATION of PM protocols.
|
|
265
|
-
|
|
266
|
-
**IMPORTANT**: The ticketing system uses `aitrackdown` CLI directly, NOT `claude-mpm tickets` commands.
|
|
267
|
-
|
|
268
|
-
**ALWAYS delegate to Ticketing Agent when user mentions:**
|
|
269
|
-
- "ticket", "tickets", "ticketing"
|
|
270
|
-
- "epic", "epics"
|
|
271
|
-
- "issue", "issues"
|
|
272
|
-
- "task tracking", "task management"
|
|
273
|
-
- "project documentation"
|
|
274
|
-
- "work breakdown"
|
|
275
|
-
- "user stories"
|
|
276
|
-
|
|
277
|
-
**AUTOMATIC TICKETING WORKFLOW** (when ticketing is requested):
|
|
278
|
-
|
|
279
|
-
#### Session Initialization
|
|
280
|
-
1. **Single Session Work**: Delegate to Ticketing Agent for ISS creation
|
|
281
|
-
- Command: `aitrackdown create issue "Title" --description "Structural requirements: [list]"`
|
|
282
|
-
- Document falsifiable acceptance criteria
|
|
283
|
-
- Transition: `aitrackdown transition ISS-XXXX in-progress`
|
|
284
|
-
|
|
285
|
-
2. **Multi-Session Work**: Delegate to Ticketing Agent for EP creation
|
|
286
|
-
- Command: `aitrackdown create epic "Title" --description "Objective: [measurable outcome]"`
|
|
287
|
-
- Define success metrics and constraints
|
|
288
|
-
- Create ISS with `--issue EP-XXXX` linking to parent
|
|
289
|
-
|
|
290
|
-
#### Phase Tracking
|
|
291
|
-
After EACH workflow phase completion, delegate to Ticketing Agent to:
|
|
292
|
-
|
|
293
|
-
1. **Create TSK (Task) ticket** for the completed phase:
|
|
294
|
-
- **Research Phase**: `aitrackdown create task "Research findings" --issue ISS-XXXX`
|
|
295
|
-
- **Code Analyzer Review Phase**: `aitrackdown create task "Solution review and approval" --issue ISS-XXXX`
|
|
296
|
-
- **Implementation Phase**: `aitrackdown create task "Code implementation" --issue ISS-XXXX`
|
|
297
|
-
- **QA Phase**: `aitrackdown create task "Testing results" --issue ISS-XXXX`
|
|
298
|
-
- **Documentation Phase**: `aitrackdown create task "Documentation updates" --issue ISS-XXXX`
|
|
299
|
-
|
|
300
|
-
2. **Update parent ISS ticket** with:
|
|
301
|
-
- Comment: `aitrackdown comment ISS-XXXX "Phase completion summary"`
|
|
302
|
-
- Transition status: `aitrackdown transition ISS-XXXX [status]`
|
|
303
|
-
- Valid statuses: open, in-progress, ready, tested, blocked
|
|
304
|
-
|
|
305
|
-
3. **Task Ticket Content** must include:
|
|
306
|
-
- Agent that performed the work
|
|
307
|
-
- Measurable outcomes achieved
|
|
308
|
-
- Falsifiable criteria met/unmet
|
|
309
|
-
- Structural decisions with justification
|
|
310
|
-
- Files modified with specific changes
|
|
311
|
-
- Root causes of blockers (not symptoms)
|
|
312
|
-
- Assumptions made and validation status
|
|
313
|
-
- Identified gaps or weak points
|
|
314
|
-
|
|
315
|
-
#### Continuous Updates
|
|
316
|
-
- **After significant changes**: `aitrackdown comment ISS-XXXX "Progress update"`
|
|
317
|
-
- **When blockers arise**: `aitrackdown transition ISS-XXXX blocked`
|
|
318
|
-
- **On completion**: `aitrackdown transition ISS-XXXX tested` or `ready`
|
|
319
|
-
|
|
320
|
-
#### Ticket Hierarchy Example
|
|
321
87
|
```
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
88
|
+
Task: [Specific measurable action]
|
|
89
|
+
Agent: [Selected Agent]
|
|
90
|
+
Requirements:
|
|
91
|
+
Objective: [Measurable outcome]
|
|
92
|
+
Success Criteria: [Testable conditions]
|
|
93
|
+
Testing: MANDATORY - Provide logs
|
|
94
|
+
Constraints: [Performance, security, timeline]
|
|
95
|
+
Verification: Evidence of criteria met
|
|
329
96
|
```
|
|
330
97
|
|
|
331
|
-
|
|
332
|
-
- Creating and managing epics, issues, and tasks using aitrackdown CLI
|
|
333
|
-
- Using proper commands: `aitrackdown create issue/task/epic`
|
|
334
|
-
- Updating tickets: `aitrackdown transition`, `aitrackdown comment`
|
|
335
|
-
- Tracking project progress with `aitrackdown status tasks`
|
|
336
|
-
- Maintaining clear audit trail of all work performed
|
|
337
|
-
|
|
338
|
-
### Structural Ticket Creation Delegation
|
|
339
|
-
|
|
340
|
-
When delegating to Ticketing Agent, specify commands with analytical content:
|
|
341
|
-
- **Create Issue**: "Use `aitrackdown create issue 'Title' --description 'Requirements: [list], Constraints: [list], Success criteria: [measurable]'`"
|
|
342
|
-
- **Create Task**: "Use `aitrackdown create task 'Title' --issue ISS-XXXX` with verification criteria"
|
|
343
|
-
- **Update Status**: "Use `aitrackdown transition ISS-XXXX [status]` with justification"
|
|
344
|
-
- **Add Comment**: "Use `aitrackdown comment ISS-XXXX 'Structural update: [metrics and gaps]'`"
|
|
345
|
-
|
|
346
|
-
### Ticket-Based Work Resumption
|
|
98
|
+
## Override Commands
|
|
347
99
|
|
|
348
|
-
|
|
349
|
-
-
|
|
350
|
-
-
|
|
351
|
-
-
|
|
352
|
-
-
|
|
353
|
-
- This ensures continuity across sessions and PMs
|
|
100
|
+
User can explicitly state:
|
|
101
|
+
- "Skip workflow" - bypass sequence
|
|
102
|
+
- "Go directly to [phase]" - jump to phase
|
|
103
|
+
- "No QA needed" - skip QA (not recommended)
|
|
104
|
+
- "Emergency fix" - bypass research
|
|
@@ -354,21 +354,29 @@ class FrontmatterValidator:
|
|
|
354
354
|
f"Author field too long ({len(author)} chars, maximum 100)"
|
|
355
355
|
)
|
|
356
356
|
|
|
357
|
-
# Validate tags field
|
|
357
|
+
# Validate tags field (supports both list and comma-separated string)
|
|
358
358
|
if "tags" in corrected:
|
|
359
359
|
tags = corrected["tags"]
|
|
360
|
-
if
|
|
361
|
-
|
|
360
|
+
if isinstance(tags, str):
|
|
361
|
+
# Convert comma-separated string to list for validation
|
|
362
|
+
tag_list = [tag.strip() for tag in tags.split(",") if tag.strip()]
|
|
363
|
+
elif isinstance(tags, list):
|
|
364
|
+
tag_list = tags
|
|
362
365
|
else:
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
)
|
|
366
|
+
errors.append(
|
|
367
|
+
f"Field 'tags' must be a list or comma-separated string, got {type(tags).__name__}"
|
|
368
|
+
)
|
|
369
|
+
tag_list = []
|
|
370
|
+
|
|
371
|
+
for tag in tag_list:
|
|
372
|
+
if not isinstance(tag, str):
|
|
373
|
+
errors.append(
|
|
374
|
+
f"All tags must be strings, found {type(tag).__name__}"
|
|
375
|
+
)
|
|
376
|
+
elif not re.match(r"^[a-z][a-z0-9-]*$", tag):
|
|
377
|
+
warnings.append(
|
|
378
|
+
f"Tag '{tag}' doesn't match recommended pattern (lowercase, alphanumeric with hyphens)"
|
|
379
|
+
)
|
|
372
380
|
|
|
373
381
|
# Validate numeric fields
|
|
374
382
|
for field_name, (min_val, max_val) in [
|