claude-flow-novice 2.10.9 → 2.12.0
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.
- package/.claude/commands/README.md +157 -0
- package/.claude/hooks/cfn-invoke-post-edit.sh +1 -1
- package/.claude/skills/cfn-backlog-management/SKILL.md +199 -0
- package/.claude/skills/cfn-backlog-management/add-backlog-item.sh +210 -0
- package/.claude/skills/cfn-changelog-management/SKILL.md +349 -0
- package/.claude/skills/cfn-changelog-management/add-changelog-entry.sh +200 -0
- package/claude-assets/agents/cfn-dev-team/architecture/base-template-generator.md +7 -21
- package/claude-assets/agents/cfn-dev-team/testing/test-validation-agent.md +312 -0
- package/claude-assets/agents/cfn-dev-team/utility/agent-builder.md +480 -115
- package/claude-assets/hooks/cfn-invoke-post-edit.sh +1 -1
- package/claude-assets/skills/cfn-backlog-management/SKILL.md +199 -0
- package/claude-assets/skills/cfn-backlog-management/add-backlog-item.sh +210 -0
- package/claude-assets/skills/cfn-changelog-management/SKILL.md +349 -0
- package/claude-assets/skills/cfn-changelog-management/add-changelog-entry.sh +200 -0
- package/dist/cli/config-manager.js.map +1 -1
- package/package.json +4 -2
- package/scripts/init-project.js +38 -3
- package/claude-assets/commands/agents/README.md +0 -10
- package/claude-assets/commands/agents/agent-capabilities.md +0 -21
- package/claude-assets/commands/agents/agent-coordination.md +0 -28
- package/claude-assets/commands/agents/agent-spawning.md +0 -28
- package/claude-assets/commands/agents/agent-types.md +0 -26
- package/claude-assets/commands/analysis/COMMAND_COMPLIANCE_REPORT.md +0 -54
- package/claude-assets/commands/analysis/README.md +0 -9
- package/claude-assets/commands/analysis/bottleneck-detect.md +0 -162
- package/claude-assets/commands/analysis/performance-bottlenecks.md +0 -59
- package/claude-assets/commands/analysis/performance-report.md +0 -25
- package/claude-assets/commands/analysis/token-efficiency.md +0 -45
- package/claude-assets/commands/analysis/token-usage.md +0 -25
- package/claude-assets/commands/automation/README.md +0 -9
- package/claude-assets/commands/automation/auto-agent.md +0 -122
- package/claude-assets/commands/automation/self-healing.md +0 -106
- package/claude-assets/commands/automation/session-memory.md +0 -90
- package/claude-assets/commands/automation/smart-agents.md +0 -73
- package/claude-assets/commands/automation/smart-spawn.md +0 -25
- package/claude-assets/commands/automation/workflow-select.md +0 -25
- package/claude-assets/commands/claude-md.js +0 -237
- package/claude-assets/commands/claude-soul.js +0 -28
- package/claude-assets/commands/cli-integration.js +0 -216
- package/claude-assets/commands/coordination/README.md +0 -9
- package/claude-assets/commands/coordination/agent-spawn.md +0 -25
- package/claude-assets/commands/coordination/coordination-system.md +0 -88
- package/claude-assets/commands/coordination/init.md +0 -44
- package/claude-assets/commands/coordination/orchestrate.md +0 -43
- package/claude-assets/commands/coordination/spawn.md +0 -45
- package/claude-assets/commands/coordination/swarm-init.md +0 -85
- package/claude-assets/commands/coordination/task-orchestrate.md +0 -25
- package/claude-assets/commands/github/README.md +0 -11
- package/claude-assets/commands/github/code-review-swarm.md +0 -514
- package/claude-assets/commands/github/code-review.md +0 -25
- package/claude-assets/commands/github/github-modes.md +0 -147
- package/claude-assets/commands/github/github-swarm.md +0 -121
- package/claude-assets/commands/github/issue-tracker.md +0 -292
- package/claude-assets/commands/github/issue-triage.md +0 -25
- package/claude-assets/commands/github/multi-repo-swarm.md +0 -519
- package/claude-assets/commands/github/pr-enhance.md +0 -26
- package/claude-assets/commands/github/pr-manager.md +0 -170
- package/claude-assets/commands/github/project-board-sync.md +0 -471
- package/claude-assets/commands/github/release-manager.md +0 -338
- package/claude-assets/commands/github/release-swarm.md +0 -544
- package/claude-assets/commands/github/repo-analyze.md +0 -25
- package/claude-assets/commands/github/repo-architect.md +0 -367
- package/claude-assets/commands/github/swarm-issue.md +0 -482
- package/claude-assets/commands/github/swarm-pr.md +0 -285
- package/claude-assets/commands/github/sync-coordinator.md +0 -301
- package/claude-assets/commands/github/workflow-automation.md +0 -442
- package/claude-assets/commands/github.js +0 -638
- package/claude-assets/commands/hive-mind/README.md +0 -17
- package/claude-assets/commands/hive-mind/hive-mind-consensus.md +0 -8
- package/claude-assets/commands/hive-mind/hive-mind-init.md +0 -18
- package/claude-assets/commands/hive-mind/hive-mind-memory.md +0 -8
- package/claude-assets/commands/hive-mind/hive-mind-metrics.md +0 -8
- package/claude-assets/commands/hive-mind/hive-mind-resume.md +0 -8
- package/claude-assets/commands/hive-mind/hive-mind-sessions.md +0 -8
- package/claude-assets/commands/hive-mind/hive-mind-spawn.md +0 -21
- package/claude-assets/commands/hive-mind/hive-mind-status.md +0 -8
- package/claude-assets/commands/hive-mind/hive-mind-stop.md +0 -8
- package/claude-assets/commands/hive-mind/hive-mind-wizard.md +0 -8
- package/claude-assets/commands/hive-mind/hive-mind.md +0 -27
- package/claude-assets/commands/hooks/README.md +0 -11
- package/claude-assets/commands/hooks/overview.md +0 -58
- package/claude-assets/commands/hooks/post-edit.md +0 -117
- package/claude-assets/commands/hooks/post-task.md +0 -112
- package/claude-assets/commands/hooks/pre-edit.md +0 -113
- package/claude-assets/commands/hooks/pre-task.md +0 -111
- package/claude-assets/commands/hooks/session-end.md +0 -118
- package/claude-assets/commands/hooks/session-start.md +0 -9
- package/claude-assets/commands/hooks/setup.md +0 -103
- package/claude-assets/commands/hooks.js +0 -651
- package/claude-assets/commands/index.js +0 -119
- package/claude-assets/commands/memory/README.md +0 -9
- package/claude-assets/commands/memory/memory-bank.md +0 -58
- package/claude-assets/commands/memory/memory-persist.md +0 -25
- package/claude-assets/commands/memory/memory-search.md +0 -25
- package/claude-assets/commands/memory/memory-usage.md +0 -25
- package/claude-assets/commands/memory/neural.md +0 -47
- package/claude-assets/commands/memory/usage.md +0 -46
- package/claude-assets/commands/monitoring/README.md +0 -9
- package/claude-assets/commands/monitoring/agent-metrics.md +0 -25
- package/claude-assets/commands/monitoring/agents.md +0 -44
- package/claude-assets/commands/monitoring/real-time-view.md +0 -25
- package/claude-assets/commands/monitoring/status.md +0 -46
- package/claude-assets/commands/monitoring/swarm-monitor.md +0 -25
- package/claude-assets/commands/neural.js +0 -572
- package/claude-assets/commands/optimization/README.md +0 -9
- package/claude-assets/commands/optimization/auto-topology.md +0 -62
- package/claude-assets/commands/optimization/cache-manage.md +0 -25
- package/claude-assets/commands/optimization/parallel-execute.md +0 -25
- package/claude-assets/commands/optimization/parallel-execution.md +0 -50
- package/claude-assets/commands/optimization/topology-optimize.md +0 -25
- package/claude-assets/commands/pair/README.md +0 -261
- package/claude-assets/commands/pair/commands.md +0 -546
- package/claude-assets/commands/pair/config.md +0 -510
- package/claude-assets/commands/pair/examples.md +0 -512
- package/claude-assets/commands/pair/modes.md +0 -348
- package/claude-assets/commands/pair/session.md +0 -407
- package/claude-assets/commands/pair/start.md +0 -209
- package/claude-assets/commands/parse-epic.js +0 -180
- package/claude-assets/commands/performance.js +0 -582
- package/claude-assets/commands/register-all-commands.js +0 -320
- package/claude-assets/commands/register-claude-md.js +0 -82
- package/claude-assets/commands/register-claude-soul.js +0 -80
- package/claude-assets/commands/sparc/analyzer.md +0 -52
- package/claude-assets/commands/sparc/architect.md +0 -53
- package/claude-assets/commands/sparc/batch-executor.md +0 -54
- package/claude-assets/commands/sparc/coder.md +0 -54
- package/claude-assets/commands/sparc/debugger.md +0 -54
- package/claude-assets/commands/sparc/designer.md +0 -53
- package/claude-assets/commands/sparc/documenter.md +0 -54
- package/claude-assets/commands/sparc/innovator.md +0 -54
- package/claude-assets/commands/sparc/memory-manager.md +0 -54
- package/claude-assets/commands/sparc/optimizer.md +0 -54
- package/claude-assets/commands/sparc/orchestrator.md +0 -132
- package/claude-assets/commands/sparc/researcher.md +0 -54
- package/claude-assets/commands/sparc/reviewer.md +0 -54
- package/claude-assets/commands/sparc/sparc-modes.md +0 -174
- package/claude-assets/commands/sparc/swarm-coordinator.md +0 -54
- package/claude-assets/commands/sparc/tdd.md +0 -54
- package/claude-assets/commands/sparc/tester.md +0 -54
- package/claude-assets/commands/sparc/workflow-manager.md +0 -54
- package/claude-assets/commands/sparc.js +0 -110
- package/claude-assets/commands/stream-chain/pipeline.md +0 -121
- package/claude-assets/commands/stream-chain/run.md +0 -70
- package/claude-assets/commands/swarm/README.md +0 -15
- package/claude-assets/commands/swarm/analysis.md +0 -95
- package/claude-assets/commands/swarm/development.md +0 -96
- package/claude-assets/commands/swarm/examples.md +0 -168
- package/claude-assets/commands/swarm/maintenance.md +0 -102
- package/claude-assets/commands/swarm/optimization.md +0 -117
- package/claude-assets/commands/swarm/research.md +0 -136
- package/claude-assets/commands/swarm/swarm-analysis.md +0 -8
- package/claude-assets/commands/swarm/swarm-background.md +0 -8
- package/claude-assets/commands/swarm/swarm-init.md +0 -19
- package/claude-assets/commands/swarm/swarm-modes.md +0 -8
- package/claude-assets/commands/swarm/swarm-monitor.md +0 -8
- package/claude-assets/commands/swarm/swarm-spawn.md +0 -19
- package/claude-assets/commands/swarm/swarm-status.md +0 -8
- package/claude-assets/commands/swarm/swarm-strategies.md +0 -8
- package/claude-assets/commands/swarm/swarm.md +0 -27
- package/claude-assets/commands/swarm/testing.md +0 -131
- package/claude-assets/commands/swarm.js +0 -423
- package/claude-assets/commands/testing/playwright-e2e.md +0 -288
- package/claude-assets/commands/training/README.md +0 -9
- package/claude-assets/commands/training/model-update.md +0 -25
- package/claude-assets/commands/training/neural-patterns.md +0 -74
- package/claude-assets/commands/training/neural-train.md +0 -25
- package/claude-assets/commands/training/pattern-learn.md +0 -25
- package/claude-assets/commands/training/specialization.md +0 -63
- package/claude-assets/commands/truth/start.md +0 -143
- package/claude-assets/commands/validate-commands.js +0 -223
- package/claude-assets/commands/verify/check.md +0 -50
- package/claude-assets/commands/verify/start.md +0 -128
- package/claude-assets/commands/workflow.js +0 -606
- package/claude-assets/commands/workflows/README.md +0 -9
- package/claude-assets/commands/workflows/development.md +0 -78
- package/claude-assets/commands/workflows/research.md +0 -63
- package/claude-assets/commands/workflows/workflow-create.md +0 -25
- package/claude-assets/commands/workflows/workflow-execute.md +0 -25
- package/claude-assets/commands/workflows/workflow-export.md +0 -25
- package/claude-assets/hooks/post-edit.config.json +0 -23
|
@@ -1,582 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Performance Monitoring Slash Command
|
|
5
|
-
* Usage: /performance <action> [options]
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { SlashCommand } from '../core/slash-command.js';
|
|
9
|
-
|
|
10
|
-
export class PerformanceCommand extends SlashCommand {
|
|
11
|
-
constructor() {
|
|
12
|
-
super('performance', 'Monitor and optimize system performance metrics');
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
getUsage() {
|
|
16
|
-
return '/performance <action> [options]';
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
getExamples() {
|
|
20
|
-
return [
|
|
21
|
-
'/performance report - Generate performance report',
|
|
22
|
-
'/performance benchmark all - Run comprehensive benchmarks',
|
|
23
|
-
'/performance bottleneck analyze - Identify performance bottlenecks',
|
|
24
|
-
'/performance tokens - Analyze token consumption',
|
|
25
|
-
'/performance trends memory 7d - Analyze memory trends',
|
|
26
|
-
'/performance cost - Generate cost analysis',
|
|
27
|
-
'/performance optimize - Auto-optimize performance'
|
|
28
|
-
];
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
async execute(args, context) {
|
|
32
|
-
const [action, ...params] = args;
|
|
33
|
-
|
|
34
|
-
if (!action) {
|
|
35
|
-
return this.formatResponse({
|
|
36
|
-
success: false,
|
|
37
|
-
error: 'Action required',
|
|
38
|
-
usage: this.getUsage(),
|
|
39
|
-
availableActions: [
|
|
40
|
-
'report', 'benchmark', 'bottleneck', 'tokens', 'trends',
|
|
41
|
-
'cost', 'optimize', 'monitor', 'analyze', 'metrics'
|
|
42
|
-
]
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
try {
|
|
47
|
-
let result;
|
|
48
|
-
|
|
49
|
-
switch (action.toLowerCase()) {
|
|
50
|
-
case 'report':
|
|
51
|
-
result = await this.generateReport(params);
|
|
52
|
-
break;
|
|
53
|
-
|
|
54
|
-
case 'benchmark':
|
|
55
|
-
result = await this.runBenchmark(params);
|
|
56
|
-
break;
|
|
57
|
-
|
|
58
|
-
case 'bottleneck':
|
|
59
|
-
result = await this.analyzeBottlenecks(params);
|
|
60
|
-
break;
|
|
61
|
-
|
|
62
|
-
case 'tokens':
|
|
63
|
-
result = await this.analyzeTokens(params);
|
|
64
|
-
break;
|
|
65
|
-
|
|
66
|
-
case 'trends':
|
|
67
|
-
result = await this.analyzeTrends(params);
|
|
68
|
-
break;
|
|
69
|
-
|
|
70
|
-
case 'cost':
|
|
71
|
-
result = await this.analyzeCosts(params);
|
|
72
|
-
break;
|
|
73
|
-
|
|
74
|
-
case 'optimize':
|
|
75
|
-
result = await this.optimizePerformance(params);
|
|
76
|
-
break;
|
|
77
|
-
|
|
78
|
-
case 'monitor':
|
|
79
|
-
result = await this.startMonitoring(params);
|
|
80
|
-
break;
|
|
81
|
-
|
|
82
|
-
case 'analyze':
|
|
83
|
-
result = await this.analyzeMetrics(params);
|
|
84
|
-
break;
|
|
85
|
-
|
|
86
|
-
case 'metrics':
|
|
87
|
-
result = await this.collectMetrics(params);
|
|
88
|
-
break;
|
|
89
|
-
|
|
90
|
-
default:
|
|
91
|
-
result = {
|
|
92
|
-
success: false,
|
|
93
|
-
error: `Unknown action: ${action}`,
|
|
94
|
-
availableActions: [
|
|
95
|
-
'report', 'benchmark', 'bottleneck', 'tokens', 'trends',
|
|
96
|
-
'cost', 'optimize', 'monitor', 'analyze', 'metrics'
|
|
97
|
-
]
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
return this.formatResponse(result);
|
|
102
|
-
} catch (error) {
|
|
103
|
-
return this.formatResponse({
|
|
104
|
-
success: false,
|
|
105
|
-
error: error.message,
|
|
106
|
-
action: action
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
async generateReport(params) {
|
|
112
|
-
const [format = 'summary', timeframe = '24h'] = params;
|
|
113
|
-
|
|
114
|
-
const validFormats = ['summary', 'detailed', 'json'];
|
|
115
|
-
const validTimeframes = ['24h', '7d', '30d'];
|
|
116
|
-
|
|
117
|
-
if (!validFormats.includes(format)) {
|
|
118
|
-
return {
|
|
119
|
-
success: false,
|
|
120
|
-
error: `Invalid format. Valid options: ${validFormats.join(', ')}`
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
if (!validTimeframes.includes(timeframe)) {
|
|
125
|
-
return {
|
|
126
|
-
success: false,
|
|
127
|
-
error: `Invalid timeframe. Valid options: ${validTimeframes.join(', ')}`
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
console.log(`📈 Generating ${format} performance report for ${timeframe}...`);
|
|
132
|
-
|
|
133
|
-
const prompt = `
|
|
134
|
-
📈 **PERFORMANCE REPORT GENERATION**
|
|
135
|
-
|
|
136
|
-
**Configuration:**
|
|
137
|
-
- Format: ${format}
|
|
138
|
-
- Timeframe: ${timeframe}
|
|
139
|
-
|
|
140
|
-
**Generate comprehensive performance report:**
|
|
141
|
-
|
|
142
|
-
\`\`\`javascript
|
|
143
|
-
// Generate performance reports with real-time metrics
|
|
144
|
-
mcp__claude-flow__performance_report({
|
|
145
|
-
format: "${format}",
|
|
146
|
-
timeframe: "${timeframe}"
|
|
147
|
-
});
|
|
148
|
-
|
|
149
|
-
// Collect system metrics
|
|
150
|
-
mcp__claude-flow__metrics_collect({
|
|
151
|
-
components: ["swarm", "agents", "tasks", "memory", "neural"]
|
|
152
|
-
});
|
|
153
|
-
|
|
154
|
-
// Run benchmark comparison
|
|
155
|
-
mcp__claude-flow__benchmark_run({ type: "performance" });
|
|
156
|
-
\`\`\`
|
|
157
|
-
|
|
158
|
-
**Report Includes:**
|
|
159
|
-
- 📉 Agent performance metrics
|
|
160
|
-
- ⚡ Task completion rates
|
|
161
|
-
- 💾 Memory utilization
|
|
162
|
-
- 🎯 Neural model efficiency
|
|
163
|
-
- 🔄 Coordination overhead
|
|
164
|
-
- 📈 Throughput analysis
|
|
165
|
-
- 🚫 Error rates and patterns
|
|
166
|
-
|
|
167
|
-
**Execute report generation now**:
|
|
168
|
-
`;
|
|
169
|
-
|
|
170
|
-
return {
|
|
171
|
-
success: true,
|
|
172
|
-
prompt: prompt,
|
|
173
|
-
format: format,
|
|
174
|
-
timeframe: timeframe
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
async runBenchmark(params) {
|
|
179
|
-
const [type = 'all', iterations = '10'] = params;
|
|
180
|
-
|
|
181
|
-
const validTypes = ['all', 'wasm', 'swarm', 'agent', 'task', 'neural'];
|
|
182
|
-
if (!validTypes.includes(type)) {
|
|
183
|
-
return {
|
|
184
|
-
success: false,
|
|
185
|
-
error: `Invalid benchmark type. Valid options: ${validTypes.join(', ')}`
|
|
186
|
-
};
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
const iterationCount = parseInt(iterations);
|
|
190
|
-
if (isNaN(iterationCount) || iterationCount < 1 || iterationCount > 100) {
|
|
191
|
-
return {
|
|
192
|
-
success: false,
|
|
193
|
-
error: 'Iterations must be between 1 and 100'
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
console.log(`⚡ Running ${type} benchmarks for ${iterationCount} iterations...`);
|
|
198
|
-
|
|
199
|
-
const prompt = `
|
|
200
|
-
⚡ **PERFORMANCE BENCHMARKING**
|
|
201
|
-
|
|
202
|
-
**Configuration:**
|
|
203
|
-
- Benchmark Type: ${type}
|
|
204
|
-
- Iterations: ${iterationCount}
|
|
205
|
-
|
|
206
|
-
**Execute performance benchmarks:**
|
|
207
|
-
|
|
208
|
-
\`\`\`javascript
|
|
209
|
-
// Run performance benchmarks
|
|
210
|
-
mcp__claude-flow__benchmark_run({
|
|
211
|
-
type: "${type}",
|
|
212
|
-
iterations: ${iterationCount}
|
|
213
|
-
});
|
|
214
|
-
|
|
215
|
-
// Compare with baseline
|
|
216
|
-
mcp__claude-flow__trend_analysis({
|
|
217
|
-
metric: "benchmark-${type}",
|
|
218
|
-
period: "30d"
|
|
219
|
-
});
|
|
220
|
-
\`\`\`
|
|
221
|
-
|
|
222
|
-
**Benchmark Areas:**
|
|
223
|
-
- 🏁 WASM SIMD performance (2.8-4.4x speedup)
|
|
224
|
-
- 🤖 Agent coordination efficiency
|
|
225
|
-
- 🎯 Task orchestration speed
|
|
226
|
-
- 🧠 Neural network inference
|
|
227
|
-
- 💾 Memory allocation patterns
|
|
228
|
-
- 🗑️ I/O throughput
|
|
229
|
-
|
|
230
|
-
**Execute benchmarking now**:
|
|
231
|
-
`;
|
|
232
|
-
|
|
233
|
-
return {
|
|
234
|
-
success: true,
|
|
235
|
-
prompt: prompt,
|
|
236
|
-
benchmarkType: type,
|
|
237
|
-
iterations: iterationCount
|
|
238
|
-
};
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
async analyzeBottlenecks(params) {
|
|
242
|
-
const [component, ...metrics] = params;
|
|
243
|
-
|
|
244
|
-
console.log(`🔍 Analyzing bottlenecks${component ? ` in ${component}` : ''}...`);
|
|
245
|
-
|
|
246
|
-
const prompt = `
|
|
247
|
-
🔍 **BOTTLENECK ANALYSIS**
|
|
248
|
-
|
|
249
|
-
**Component:** ${component || 'all-systems'}
|
|
250
|
-
**Metrics:** ${metrics.length > 0 ? metrics.join(', ') : 'auto-detect'}
|
|
251
|
-
|
|
252
|
-
**Identify performance bottlenecks:**
|
|
253
|
-
|
|
254
|
-
\`\`\`javascript
|
|
255
|
-
// Identify performance bottlenecks
|
|
256
|
-
mcp__claude-flow__bottleneck_analyze({
|
|
257
|
-
${component ? `component: "${component}",` : ''}
|
|
258
|
-
metrics: [${metrics.length > 0 ? metrics.map(m => `"${m}"`).join(', ') : '"cpu", "memory", "io", "network"'}]
|
|
259
|
-
});
|
|
260
|
-
|
|
261
|
-
// Error pattern analysis
|
|
262
|
-
mcp__claude-flow__error_analysis({
|
|
263
|
-
logs: ["system-logs", "performance-logs"]
|
|
264
|
-
});
|
|
265
|
-
\`\`\`
|
|
266
|
-
|
|
267
|
-
**Bottleneck Detection:**
|
|
268
|
-
- 📉 CPU utilization spikes
|
|
269
|
-
- 💾 Memory allocation issues
|
|
270
|
-
- 🔄 I/O wait times
|
|
271
|
-
- 🌐 Network latency
|
|
272
|
-
- 🤖 Agent coordination delays
|
|
273
|
-
- 🎯 Task queue congestion
|
|
274
|
-
|
|
275
|
-
**Execute bottleneck analysis now**:
|
|
276
|
-
`;
|
|
277
|
-
|
|
278
|
-
return {
|
|
279
|
-
success: true,
|
|
280
|
-
prompt: prompt,
|
|
281
|
-
component: component,
|
|
282
|
-
metrics: metrics
|
|
283
|
-
};
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
async analyzeTokens(params) {
|
|
287
|
-
const [operation, timeframe = '24h'] = params;
|
|
288
|
-
|
|
289
|
-
console.log(`🪙 Analyzing token consumption${operation ? ` for ${operation}` : ''}...`);
|
|
290
|
-
|
|
291
|
-
const prompt = `
|
|
292
|
-
🪙 **TOKEN USAGE ANALYSIS**
|
|
293
|
-
|
|
294
|
-
**Operation:** ${operation || 'all-operations'}
|
|
295
|
-
**Timeframe:** ${timeframe}
|
|
296
|
-
|
|
297
|
-
**Analyze token consumption patterns:**
|
|
298
|
-
|
|
299
|
-
\`\`\`javascript
|
|
300
|
-
// Analyze token consumption
|
|
301
|
-
mcp__claude-flow__token_usage({
|
|
302
|
-
${operation ? `operation: "${operation}",` : ''}
|
|
303
|
-
timeframe: "${timeframe}"
|
|
304
|
-
});
|
|
305
|
-
|
|
306
|
-
// Cost analysis
|
|
307
|
-
mcp__claude-flow__cost_analysis({
|
|
308
|
-
timeframe: "${timeframe}"
|
|
309
|
-
});
|
|
310
|
-
\`\`\`
|
|
311
|
-
|
|
312
|
-
**Token Analysis:**
|
|
313
|
-
- 📉 Usage patterns and trends
|
|
314
|
-
- 💰 Cost optimization opportunities
|
|
315
|
-
- 🎯 Efficiency improvements
|
|
316
|
-
- 🔄 Agent-specific consumption
|
|
317
|
-
- ⚡ Peak usage identification
|
|
318
|
-
- 📈 32.3% token reduction potential
|
|
319
|
-
|
|
320
|
-
**Execute token analysis now**:
|
|
321
|
-
`;
|
|
322
|
-
|
|
323
|
-
return {
|
|
324
|
-
success: true,
|
|
325
|
-
prompt: prompt,
|
|
326
|
-
operation: operation,
|
|
327
|
-
timeframe: timeframe
|
|
328
|
-
};
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
async analyzeTrends(params) {
|
|
332
|
-
const [metric = 'performance', period = '7d'] = params;
|
|
333
|
-
|
|
334
|
-
console.log(`📈 Analyzing ${metric} trends over ${period}...`);
|
|
335
|
-
|
|
336
|
-
const prompt = `
|
|
337
|
-
📈 **PERFORMANCE TREND ANALYSIS**
|
|
338
|
-
|
|
339
|
-
**Metric:** ${metric}
|
|
340
|
-
**Period:** ${period}
|
|
341
|
-
|
|
342
|
-
**Analyze performance trends:**
|
|
343
|
-
|
|
344
|
-
\`\`\`javascript
|
|
345
|
-
// Analyze performance trends
|
|
346
|
-
mcp__claude-flow__trend_analysis({
|
|
347
|
-
metric: "${metric}",
|
|
348
|
-
period: "${period}"
|
|
349
|
-
});
|
|
350
|
-
|
|
351
|
-
// Usage statistics
|
|
352
|
-
mcp__claude-flow__usage_stats({
|
|
353
|
-
component: "${metric}"
|
|
354
|
-
});
|
|
355
|
-
\`\`\`
|
|
356
|
-
|
|
357
|
-
**Trend Analysis:**
|
|
358
|
-
- 📉 Performance trajectory
|
|
359
|
-
- 🔄 Cyclical patterns
|
|
360
|
-
- ⚡ Optimization opportunities
|
|
361
|
-
- 🎯 Predictive insights
|
|
362
|
-
- 📊 Baseline comparisons
|
|
363
|
-
|
|
364
|
-
**Execute trend analysis now**:
|
|
365
|
-
`;
|
|
366
|
-
|
|
367
|
-
return {
|
|
368
|
-
success: true,
|
|
369
|
-
prompt: prompt,
|
|
370
|
-
metric: metric,
|
|
371
|
-
period: period
|
|
372
|
-
};
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
async analyzeCosts(params) {
|
|
376
|
-
const [timeframe = '30d'] = params;
|
|
377
|
-
|
|
378
|
-
console.log(`💰 Analyzing costs for ${timeframe}...`);
|
|
379
|
-
|
|
380
|
-
const prompt = `
|
|
381
|
-
💰 **COST ANALYSIS**
|
|
382
|
-
|
|
383
|
-
**Timeframe:** ${timeframe}
|
|
384
|
-
|
|
385
|
-
**Analyze resource costs and optimization:**
|
|
386
|
-
|
|
387
|
-
\`\`\`javascript
|
|
388
|
-
// Cost and resource analysis
|
|
389
|
-
mcp__claude-flow__cost_analysis({
|
|
390
|
-
timeframe: "${timeframe}"
|
|
391
|
-
});
|
|
392
|
-
|
|
393
|
-
// Quality vs cost assessment
|
|
394
|
-
mcp__claude-flow__quality_assess({
|
|
395
|
-
target: "cost-efficiency",
|
|
396
|
-
criteria: ["performance", "accuracy", "speed"]
|
|
397
|
-
});
|
|
398
|
-
\`\`\`
|
|
399
|
-
|
|
400
|
-
**Cost Optimization:**
|
|
401
|
-
- 💰 Token usage optimization (32.3% reduction)
|
|
402
|
-
- ⚡ Compute efficiency improvements
|
|
403
|
-
- 💾 Memory usage optimization
|
|
404
|
-
- 🎯 Resource allocation tuning
|
|
405
|
-
- 🔄 Auto-scaling benefits
|
|
406
|
-
|
|
407
|
-
**Execute cost analysis now**:
|
|
408
|
-
`;
|
|
409
|
-
|
|
410
|
-
return {
|
|
411
|
-
success: true,
|
|
412
|
-
prompt: prompt,
|
|
413
|
-
timeframe: timeframe
|
|
414
|
-
};
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
async optimizePerformance(params) {
|
|
418
|
-
const [target = 'all'] = params;
|
|
419
|
-
|
|
420
|
-
console.log(`⚙️ Auto-optimizing performance for: ${target}`);
|
|
421
|
-
|
|
422
|
-
const prompt = `
|
|
423
|
-
⚙️ **PERFORMANCE OPTIMIZATION**
|
|
424
|
-
|
|
425
|
-
**Target:** ${target}
|
|
426
|
-
|
|
427
|
-
**Execute automatic performance optimization:**
|
|
428
|
-
|
|
429
|
-
\`\`\`javascript
|
|
430
|
-
// Auto-optimize performance
|
|
431
|
-
mcp__claude-flow__daa_optimization({
|
|
432
|
-
target: "${target}",
|
|
433
|
-
metrics: ["speed", "accuracy", "efficiency"]
|
|
434
|
-
});
|
|
435
|
-
|
|
436
|
-
// WASM SIMD optimization
|
|
437
|
-
mcp__claude-flow__wasm_optimize({
|
|
438
|
-
operation: "performance-boost"
|
|
439
|
-
});
|
|
440
|
-
|
|
441
|
-
// Topology optimization
|
|
442
|
-
mcp__claude-flow__topology_optimize();
|
|
443
|
-
\`\`\`
|
|
444
|
-
|
|
445
|
-
**Optimization Areas:**
|
|
446
|
-
- ⚡ WASM SIMD acceleration (2.8-4.4x speed)
|
|
447
|
-
- 🤖 Agent coordination efficiency
|
|
448
|
-
- 💾 Memory allocation patterns
|
|
449
|
-
- 🎯 Task distribution algorithms
|
|
450
|
-
- 🧠 Neural model compression
|
|
451
|
-
- 🔄 Load balancing optimization
|
|
452
|
-
|
|
453
|
-
**Execute performance optimization now**:
|
|
454
|
-
`;
|
|
455
|
-
|
|
456
|
-
return {
|
|
457
|
-
success: true,
|
|
458
|
-
prompt: prompt,
|
|
459
|
-
target: target
|
|
460
|
-
};
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
async startMonitoring(params) {
|
|
464
|
-
const [duration = '300', interval = '5'] = params;
|
|
465
|
-
|
|
466
|
-
const monitorDuration = parseInt(duration);
|
|
467
|
-
const monitorInterval = parseInt(interval);
|
|
468
|
-
|
|
469
|
-
console.log(`👁️ Starting performance monitoring for ${monitorDuration}s...`);
|
|
470
|
-
|
|
471
|
-
const prompt = `
|
|
472
|
-
👁️ **REAL-TIME PERFORMANCE MONITORING**
|
|
473
|
-
|
|
474
|
-
**Duration:** ${monitorDuration} seconds
|
|
475
|
-
**Interval:** ${monitorInterval} seconds
|
|
476
|
-
|
|
477
|
-
**Start real-time monitoring:**
|
|
478
|
-
|
|
479
|
-
\`\`\`javascript
|
|
480
|
-
// Real-time performance monitoring
|
|
481
|
-
mcp__claude-flow__swarm_monitor({
|
|
482
|
-
interval: ${monitorInterval},
|
|
483
|
-
duration: ${monitorDuration}
|
|
484
|
-
});
|
|
485
|
-
|
|
486
|
-
// System health monitoring
|
|
487
|
-
mcp__claude-flow__health_check({
|
|
488
|
-
components: ["swarm", "agents", "neural", "memory"]
|
|
489
|
-
});
|
|
490
|
-
\`\`\`
|
|
491
|
-
|
|
492
|
-
**Monitoring Dashboard:**
|
|
493
|
-
- 📉 Real-time metrics visualization
|
|
494
|
-
- ⚡ Performance alerts and thresholds
|
|
495
|
-
- 🤖 Agent health status
|
|
496
|
-
- 💾 Resource utilization
|
|
497
|
-
- 🎯 Task completion rates
|
|
498
|
-
|
|
499
|
-
**Execute performance monitoring now**:
|
|
500
|
-
`;
|
|
501
|
-
|
|
502
|
-
return {
|
|
503
|
-
success: true,
|
|
504
|
-
prompt: prompt,
|
|
505
|
-
duration: monitorDuration,
|
|
506
|
-
interval: monitorInterval
|
|
507
|
-
};
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
async analyzeMetrics(params) {
|
|
511
|
-
const [category = 'all'] = params;
|
|
512
|
-
|
|
513
|
-
console.log(`📊 Analyzing ${category} metrics...`);
|
|
514
|
-
|
|
515
|
-
const prompt = `
|
|
516
|
-
📊 **METRICS ANALYSIS**
|
|
517
|
-
|
|
518
|
-
**Category:** ${category}
|
|
519
|
-
|
|
520
|
-
**Analyze comprehensive metrics:**
|
|
521
|
-
|
|
522
|
-
\`\`\`javascript
|
|
523
|
-
// Get comprehensive performance metrics
|
|
524
|
-
mcp__claude-flow__daa_performance_metrics({
|
|
525
|
-
category: "${category}",
|
|
526
|
-
timeRange: "24h"
|
|
527
|
-
});
|
|
528
|
-
|
|
529
|
-
// Memory analytics
|
|
530
|
-
mcp__claude-flow__memory_analytics({
|
|
531
|
-
timeframe: "24h"
|
|
532
|
-
});
|
|
533
|
-
\`\`\`
|
|
534
|
-
|
|
535
|
-
**Metrics Categories:**
|
|
536
|
-
- 📈 System performance metrics
|
|
537
|
-
- 🤖 Agent efficiency statistics
|
|
538
|
-
- 🧠 Neural model performance
|
|
539
|
-
- 💾 Memory usage patterns
|
|
540
|
-
- 🎯 Task orchestration metrics
|
|
541
|
-
|
|
542
|
-
**Execute metrics analysis now**:
|
|
543
|
-
`;
|
|
544
|
-
|
|
545
|
-
return {
|
|
546
|
-
success: true,
|
|
547
|
-
prompt: prompt,
|
|
548
|
-
category: category
|
|
549
|
-
};
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
async collectMetrics(params) {
|
|
553
|
-
const components = params.length > 0 ? params : ['all'];
|
|
554
|
-
|
|
555
|
-
console.log(`📊 Collecting metrics for: ${components.join(', ')}`);
|
|
556
|
-
|
|
557
|
-
const prompt = `
|
|
558
|
-
📊 **METRICS COLLECTION**
|
|
559
|
-
|
|
560
|
-
**Components:** ${components.join(', ')}
|
|
561
|
-
|
|
562
|
-
**Collect system metrics:**
|
|
563
|
-
|
|
564
|
-
\`\`\`javascript
|
|
565
|
-
// Collect system metrics
|
|
566
|
-
mcp__claude-flow__metrics_collect({
|
|
567
|
-
components: [${components.map(c => `"${c}"`).join(', ')}]
|
|
568
|
-
});
|
|
569
|
-
\`\`\`
|
|
570
|
-
|
|
571
|
-
**Execute metrics collection now**:
|
|
572
|
-
`;
|
|
573
|
-
|
|
574
|
-
return {
|
|
575
|
-
success: true,
|
|
576
|
-
prompt: prompt,
|
|
577
|
-
components: components
|
|
578
|
-
};
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
export default PerformanceCommand;
|