claude-flow-novice 2.0.3 → 2.0.4
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/dist/src/cli/commands/guidance.js +487 -668
- package/dist/src/cli/commands/index-validate.js +18 -29
- package/dist/src/cli/commands/mcp-troubleshoot.js +230 -282
- package/dist/src/cli/commands/neural-goal-init.js +92 -125
- package/dist/src/cli/commands/swarm-exec.js +317 -393
- package/dist/src/cli/commands/swarm.js +1 -1
- package/dist/src/cli/commands/validate-framework.js +983 -1100
- package/dist/src/cli/commands/validate.js +144 -223
- package/dist/src/cli/simple-commands/__tests__/agent.test.js +265 -277
- package/dist/src/cli/simple-commands/__tests__/memory.test.js +6 -7
- package/dist/src/cli/simple-commands/__tests__/swarm.test.js +373 -356
- package/dist/src/cli/simple-commands/__tests__/task.test.js +6 -7
- package/dist/src/cli/simple-commands/agent.js +157 -193
- package/dist/src/cli/simple-commands/analysis.js +336 -446
- package/dist/src/cli/simple-commands/automation-executor.js +1095 -1339
- package/dist/src/cli/simple-commands/automation.js +481 -469
- package/dist/src/cli/simple-commands/batch-manager.js +261 -313
- package/dist/src/cli/simple-commands/claude-telemetry.js +241 -267
- package/dist/src/cli/simple-commands/claude-track.js +68 -90
- package/dist/src/cli/simple-commands/concurrent-display.js +266 -320
- package/dist/src/cli/simple-commands/config.js +245 -290
- package/dist/src/cli/simple-commands/coordination.js +182 -234
- package/dist/src/cli/simple-commands/enhanced-ui-views.js +812 -615
- package/dist/src/cli/simple-commands/enhanced-webui-complete.js +922 -981
- package/dist/src/cli/simple-commands/fix-hook-variables.js +274 -294
- package/dist/src/cli/simple-commands/github/gh-coordinator.js +378 -457
- package/dist/src/cli/simple-commands/github/github-api.js +535 -574
- package/dist/src/cli/simple-commands/github/init.js +276 -303
- package/dist/src/cli/simple-commands/github.js +222 -247
- package/dist/src/cli/simple-commands/goal.js +51 -63
- package/dist/src/cli/simple-commands/hive-mind/auto-save-middleware.js +208 -278
- package/dist/src/cli/simple-commands/hive-mind/communication.js +601 -696
- package/dist/src/cli/simple-commands/hive-mind/core.js +907 -979
- package/dist/src/cli/simple-commands/hive-mind/db-optimizer.js +406 -655
- package/dist/src/cli/simple-commands/hive-mind/mcp-wrapper.js +1125 -1245
- package/dist/src/cli/simple-commands/hive-mind/memory.js +854 -1090
- package/dist/src/cli/simple-commands/hive-mind/performance-optimizer.js +459 -574
- package/dist/src/cli/simple-commands/hive-mind/performance-test.js +263 -347
- package/dist/src/cli/simple-commands/hive-mind/queen.js +727 -768
- package/dist/src/cli/simple-commands/hive-mind/session-manager.js +745 -1049
- package/dist/src/cli/simple-commands/hive-mind-optimize.js +227 -283
- package/dist/src/cli/simple-commands/hive-mind-wizard.js +174 -217
- package/dist/src/cli/simple-commands/hive-mind.js +1842 -2283
- package/dist/src/cli/simple-commands/hive.js +90 -79
- package/dist/src/cli/simple-commands/hook-safety.js +431 -521
- package/dist/src/cli/simple-commands/hooks/session-start-soul.js +203 -254
- package/dist/src/cli/simple-commands/hooks.js +1064 -1204
- package/dist/src/cli/simple-commands/init/agent-copier.js +294 -319
- package/dist/src/cli/simple-commands/init/batch-init.js +496 -562
- package/dist/src/cli/simple-commands/init/claude-commands/claude-flow-commands.js +13 -19
- package/dist/src/cli/simple-commands/init/claude-commands/optimized-claude-flow-commands.js +13 -19
- package/dist/src/cli/simple-commands/init/claude-commands/optimized-slash-commands.js +61 -88
- package/dist/src/cli/simple-commands/init/claude-commands/optimized-sparc-commands.js +125 -150
- package/dist/src/cli/simple-commands/init/claude-commands/slash-commands.js +42 -49
- package/dist/src/cli/simple-commands/init/claude-commands/sparc-commands.js +43 -61
- package/dist/src/cli/simple-commands/init/copy-revised-templates.js +141 -147
- package/dist/src/cli/simple-commands/init/executable-wrapper.js +31 -44
- package/dist/src/cli/simple-commands/init/gitignore-updater.js +64 -90
- package/dist/src/cli/simple-commands/init/help.js +104 -107
- package/dist/src/cli/simple-commands/init/hive-mind-init.js +509 -528
- package/dist/src/cli/simple-commands/init/index.js +1510 -1759
- package/dist/src/cli/simple-commands/init/performance-monitor.js +234 -317
- package/dist/src/cli/simple-commands/init/rollback/backup-manager.js +441 -504
- package/dist/src/cli/simple-commands/init/rollback/index.js +289 -364
- package/dist/src/cli/simple-commands/init/rollback/recovery-manager.js +652 -728
- package/dist/src/cli/simple-commands/init/rollback/rollback-executor.js +416 -481
- package/dist/src/cli/simple-commands/init/rollback/state-tracker.js +369 -448
- package/dist/src/cli/simple-commands/init/sparc/roo-readme.js +1 -2
- package/dist/src/cli/simple-commands/init/sparc/roomodes-config.js +122 -99
- package/dist/src/cli/simple-commands/init/sparc/workflows.js +32 -37
- package/dist/src/cli/simple-commands/init/sparc-structure.js +55 -62
- package/dist/src/cli/simple-commands/init/template-copier.js +421 -533
- package/dist/src/cli/simple-commands/init/templates/coordination-md.js +3 -6
- package/dist/src/cli/simple-commands/init/templates/enhanced-templates.js +344 -318
- package/dist/src/cli/simple-commands/init/templates/github-safe-enhanced.js +173 -218
- package/dist/src/cli/simple-commands/init/templates/github-safe.js +65 -75
- package/dist/src/cli/simple-commands/init/templates/memory-bank-md.js +3 -6
- package/dist/src/cli/simple-commands/init/templates/readme-files.js +2 -4
- package/dist/src/cli/simple-commands/init/templates/safe-hook-patterns.js +187 -230
- package/dist/src/cli/simple-commands/init/templates/sparc-modes.js +53 -80
- package/dist/src/cli/simple-commands/init/templates/verification-claude-md.js +101 -85
- package/dist/src/cli/simple-commands/init/validation/config-validator.js +283 -330
- package/dist/src/cli/simple-commands/init/validation/health-checker.js +495 -561
- package/dist/src/cli/simple-commands/init/validation/index.js +302 -358
- package/dist/src/cli/simple-commands/init/validation/mode-validator.js +308 -359
- package/dist/src/cli/simple-commands/init/validation/post-init-validator.js +389 -366
- package/dist/src/cli/simple-commands/init/validation/pre-init-validator.js +270 -268
- package/dist/src/cli/simple-commands/init/validation/test-runner.js +427 -447
- package/dist/src/cli/simple-commands/init.js +1 -2
- package/dist/src/cli/simple-commands/mcp-health.js +131 -158
- package/dist/src/cli/simple-commands/mcp-integration-layer.js +533 -634
- package/dist/src/cli/simple-commands/mcp.js +345 -400
- package/dist/src/cli/simple-commands/memory-consolidation.js +426 -537
- package/dist/src/cli/simple-commands/memory.js +247 -311
- package/dist/src/cli/simple-commands/migrate-hooks.js +39 -46
- package/dist/src/cli/simple-commands/monitor.js +294 -363
- package/dist/src/cli/simple-commands/neural.js +51 -65
- package/dist/src/cli/simple-commands/pair-autofix-only.js +538 -662
- package/dist/src/cli/simple-commands/pair-basic.js +528 -656
- package/dist/src/cli/simple-commands/pair-old.js +430 -543
- package/dist/src/cli/simple-commands/pair-working.js +615 -751
- package/dist/src/cli/simple-commands/pair.js +615 -751
- package/dist/src/cli/simple-commands/performance-hooks.js +83 -111
- package/dist/src/cli/simple-commands/performance-metrics.js +348 -433
- package/dist/src/cli/simple-commands/process-ui-enhanced.js +708 -787
- package/dist/src/cli/simple-commands/process-ui.js +230 -254
- package/dist/src/cli/simple-commands/realtime-update-system.js +525 -611
- package/dist/src/cli/simple-commands/sparc/architecture.js +1704 -1530
- package/dist/src/cli/simple-commands/sparc/commands.js +438 -516
- package/dist/src/cli/simple-commands/sparc/completion.js +1224 -1481
- package/dist/src/cli/simple-commands/sparc/coordinator.js +913 -978
- package/dist/src/cli/simple-commands/sparc/index.js +241 -298
- package/dist/src/cli/simple-commands/sparc/phase-base.js +314 -390
- package/dist/src/cli/simple-commands/sparc/pseudocode.js +965 -869
- package/dist/src/cli/simple-commands/sparc/refinement.js +980 -1273
- package/dist/src/cli/simple-commands/sparc/specification.js +559 -645
- package/dist/src/cli/simple-commands/sparc-modes/architect.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/ask.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/code.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/debug.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/devops.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/docs-writer.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/generic.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/index.js +47 -55
- package/dist/src/cli/simple-commands/sparc-modes/integration.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/mcp.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/monitoring.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/optimization.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/security-review.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/sparc-orchestrator.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/spec-pseudocode.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/supabase-admin.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/swarm.js +101 -87
- package/dist/src/cli/simple-commands/sparc-modes/tdd.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/tutorial.js +1 -1
- package/dist/src/cli/simple-commands/sparc.js +465 -493
- package/dist/src/cli/simple-commands/start-ui.js +108 -132
- package/dist/src/cli/simple-commands/start-wrapper.js +240 -268
- package/dist/src/cli/simple-commands/start.js +1 -1
- package/dist/src/cli/simple-commands/status.js +254 -275
- package/dist/src/cli/simple-commands/stream-chain-clean.js +128 -171
- package/dist/src/cli/simple-commands/stream-chain-fixed.js +61 -82
- package/dist/src/cli/simple-commands/stream-chain-real.js +267 -331
- package/dist/src/cli/simple-commands/stream-chain-working.js +211 -263
- package/dist/src/cli/simple-commands/stream-chain.js +260 -318
- package/dist/src/cli/simple-commands/stream-processor.js +290 -315
- package/dist/src/cli/simple-commands/swarm-executor.js +189 -222
- package/dist/src/cli/simple-commands/swarm-metrics-integration.js +208 -300
- package/dist/src/cli/simple-commands/swarm-ui.js +623 -703
- package/dist/src/cli/simple-commands/swarm-webui-integration.js +258 -286
- package/dist/src/cli/simple-commands/swarm.js +887 -1082
- package/dist/src/cli/simple-commands/task.js +161 -206
- package/dist/src/cli/simple-commands/timestamp-fix.js +59 -89
- package/dist/src/cli/simple-commands/token-tracker.js +258 -316
- package/dist/src/cli/simple-commands/tool-execution-framework.js +433 -519
- package/dist/src/cli/simple-commands/train-and-stream.js +275 -331
- package/dist/src/cli/simple-commands/training-pipeline.js +619 -725
- package/dist/src/cli/simple-commands/training.js +170 -227
- package/dist/src/cli/simple-commands/verification-hooks.js +261 -284
- package/dist/src/cli/simple-commands/verification-integration.js +389 -417
- package/dist/src/cli/simple-commands/verification-training-integration.js +486 -606
- package/dist/src/cli/simple-commands/verification.js +493 -513
- package/dist/src/cli/simple-commands/web-server.js +766 -836
- package/dist/src/cli/simple-commands/webui-validator.js +106 -124
- package/dist/src/coordination/event-bus/demo-wasm-integration.js +212 -251
- package/dist/src/coordination/event-bus/qe-event-bus.js +608 -748
- package/dist/src/coordination/event-bus/qe-event-bus.test.js +379 -454
- package/dist/src/coordination/iteration-tracker.js +363 -454
- package/dist/src/enterprise/analytics-manager.js +1135 -0
- package/dist/src/enterprise/audit-manager.js +1115 -0
- package/dist/src/enterprise/cloud-manager.js +891 -0
- package/dist/src/enterprise/deployment-manager.js +966 -0
- package/dist/src/enterprise/index.js +6 -0
- package/dist/src/enterprise/project-manager.js +584 -0
- package/dist/src/enterprise/security-manager.js +991 -0
- package/dist/src/index.js +1 -1
- package/dist/src/mcp/DEPRECATED.js +46 -60
- package/dist/src/mcp/fixes/mcp-error-fixes.js +115 -134
- package/dist/src/mcp/implementations/agent-tracker.js +114 -128
- package/dist/src/mcp/implementations/daa-tools.js +292 -350
- package/dist/src/mcp/implementations/workflow-tools.js +329 -361
- package/dist/src/mcp/mcp-config-manager.js +1183 -1331
- package/dist/src/mcp/mcp-server-novice-simplified.js +11 -17
- package/dist/src/mcp/mcp-server-novice.js +11 -17
- package/dist/src/mcp/mcp-server-sdk.js +11 -17
- package/dist/src/mcp/mcp-server.js +1620 -1484
- package/dist/src/mcp/ruv-swarm-wrapper.js +209 -239
- package/dist/src/memory/advanced-serializer.js +609 -589
- package/dist/src/memory/enhanced-examples.js +220 -305
- package/dist/src/memory/enhanced-memory.js +295 -336
- package/dist/src/memory/enhanced-session-serializer.js +408 -492
- package/dist/src/memory/fallback-memory-system.js +900 -1021
- package/dist/src/memory/fallback-store.js +93 -131
- package/dist/src/memory/high-performance-serialization.js +592 -730
- package/dist/src/memory/in-memory-store.js +161 -213
- package/dist/src/memory/index.js +123 -157
- package/dist/src/memory/lock-free-structures.js +578 -764
- package/dist/src/memory/memory-mapped-persistence.js +585 -766
- package/dist/src/memory/memory-pressure-manager.js +569 -707
- package/dist/src/memory/migration.js +358 -445
- package/dist/src/memory/shared-memory.js +641 -768
- package/dist/src/memory/sqlite-store.js +245 -325
- package/dist/src/memory/sqlite-wrapper.js +122 -151
- package/dist/src/memory/swarm-memory.js +470 -603
- package/dist/src/memory/test-example.js +126 -134
- package/dist/src/memory/ultra-fast-memory-store.js +622 -821
- package/dist/src/memory/unified-memory-manager.js +356 -437
- package/dist/src/migration/index.js +92 -0
- package/dist/src/migration/logger.js +121 -0
- package/dist/src/migration/migration-analyzer.js +268 -0
- package/dist/src/migration/migration-runner.js +522 -0
- package/dist/src/migration/migration-validator.js +285 -0
- package/dist/src/migration/progress-reporter.js +150 -0
- package/dist/src/migration/rollback-manager.js +321 -0
- package/dist/src/migration/tests/migration-system.test.js +7 -0
- package/dist/src/migration/types.js +3 -0
- package/dist/src/swarm/CodeRefactoringSwarm.js +777 -952
- package/dist/src/swarm/__tests__/integration.test.js +227 -0
- package/dist/src/swarm/__tests__/prompt-copier.test.js +344 -0
- package/dist/src/swarm/advanced-orchestrator.js +1095 -0
- package/dist/src/swarm/claude-code-interface.js +961 -0
- package/dist/src/swarm/claude-flow-executor.js +229 -0
- package/dist/src/swarm/consensus-coordinator.js +475 -0
- package/dist/src/swarm/coordinator.js +2993 -0
- package/dist/src/swarm/direct-executor.js +1180 -0
- package/dist/src/swarm/error-recovery/advanced-error-detection.js +691 -0
- package/dist/src/swarm/error-recovery/automated-recovery-workflows.js +998 -0
- package/dist/src/swarm/error-recovery/error-recovery-coordinator.js +1197 -0
- package/dist/src/swarm/error-recovery/recovery-monitoring.js +772 -0
- package/dist/src/swarm/error-recovery/resilience-architecture.js +714 -0
- package/dist/src/swarm/error-recovery/self-healing-mechanisms.js +1319 -0
- package/dist/src/swarm/error-recovery/test-error-recovery-effectiveness.js +808 -0
- package/dist/src/swarm/executor-v2.js +322 -0
- package/dist/src/swarm/executor.js +815 -0
- package/dist/src/swarm/hive-mind-integration.js +703 -0
- package/dist/src/swarm/index.js +41 -0
- package/dist/src/swarm/json-output-aggregator.js +267 -0
- package/dist/src/swarm/large-scale-coordinator.js +542 -0
- package/dist/src/swarm/mcp-integration-wrapper.js +628 -0
- package/dist/src/swarm/memory.js +1117 -0
- package/dist/src/swarm/optimizations/__tests__/optimization.test.js +348 -0
- package/dist/src/swarm/optimizations/async-file-manager.js +285 -0
- package/dist/src/swarm/optimizations/circular-buffer.js +162 -0
- package/dist/src/swarm/optimizations/connection-pool.js +244 -0
- package/dist/src/swarm/optimizations/index.js +28 -0
- package/dist/src/swarm/optimizations/optimized-executor.js +320 -0
- package/dist/src/swarm/optimizations/ttl-map.js +234 -0
- package/dist/src/swarm/prompt-cli.js +200 -0
- package/dist/src/swarm/prompt-copier-enhanced.js +202 -0
- package/dist/src/swarm/prompt-copier.js +381 -0
- package/dist/src/swarm/prompt-manager.js +295 -0
- package/dist/src/swarm/prompt-utils.js +310 -0
- package/dist/src/swarm/result-aggregator.js +718 -0
- package/dist/src/swarm/sparc-executor.js +1568 -0
- package/dist/src/swarm/strategies/auto.js +758 -0
- package/dist/src/swarm/strategies/base.js +128 -0
- package/dist/src/swarm/strategies/research.js +914 -0
- package/dist/src/swarm/strategies/strategy-metrics-patch.js +2 -0
- package/dist/src/swarm/types.js +52 -0
- package/dist/src/swarm/workers/copy-worker.js +56 -0
- package/dist/src/utils/__tests__/github-cli-safety-wrapper.test.js +332 -400
- package/dist/src/utils/github-cli-safe.js +56 -64
- package/dist/src/utils/github-cli-safety-wrapper.js +451 -546
- package/dist/src/utils/npx-isolated-cache.js +104 -119
- package/dist/src/utils/preference-manager.js +622 -652
- package/dist/src/utils/timezone-utils.js +86 -105
- package/dist/src/validators/epic-config-schema.js +214 -0
- package/dist/src/validators/index.js +10 -0
- package/dist/src/validators/swarm-init-validator.js +259 -0
- package/dist/src/validators/todowrite-batching-validator.js +215 -0
- package/dist/src/validators/todowrite-integration.js +187 -0
- package/package.json +2 -2
|
@@ -1,70 +1,60 @@
|
|
|
1
1
|
// enhanced-templates.js - Generate Claude Flow v2.0.0 enhanced templates
|
|
2
|
-
import { readFileSync } from
|
|
3
|
-
import { dirname, join } from
|
|
4
|
-
import { fileURLToPath } from
|
|
5
|
-
|
|
2
|
+
import { readFileSync } from "fs";
|
|
3
|
+
import { dirname, join } from "path";
|
|
4
|
+
import { fileURLToPath } from "url";
|
|
6
5
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
7
|
-
|
|
8
6
|
// Load template files
|
|
9
|
-
const loadTemplate = (filename)
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
const loadTemplate = (filename)=>{
|
|
8
|
+
try {
|
|
9
|
+
return readFileSync(join(__dirname, filename), 'utf8');
|
|
10
|
+
} catch (error) {
|
|
11
|
+
// Silently fall back to hardcoded templates if files not found
|
|
12
|
+
// This handles npm packaging scenarios where template files may not be included
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
17
15
|
};
|
|
18
|
-
|
|
19
16
|
export function createEnhancedClaudeMd() {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
const template = loadTemplate('CLAUDE.md');
|
|
18
|
+
if (!template) {
|
|
19
|
+
throw new Error('CLAUDE.md template file not found! Templates must be included in build.');
|
|
20
|
+
}
|
|
21
|
+
return template;
|
|
25
22
|
}
|
|
26
|
-
|
|
27
23
|
export function createEnhancedSettingsJson() {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
const template = loadTemplate('settings.json');
|
|
25
|
+
if (!template) {
|
|
26
|
+
return createEnhancedSettingsJsonFallback();
|
|
27
|
+
}
|
|
28
|
+
return template;
|
|
33
29
|
}
|
|
34
|
-
|
|
35
30
|
export function createWrapperScript(type = 'unix') {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
31
|
+
// For unix, use the universal wrapper that works in both CommonJS and ES modules
|
|
32
|
+
if (type === 'unix') {
|
|
33
|
+
const universalTemplate = loadTemplate('claude-flow-universal');
|
|
34
|
+
if (universalTemplate) {
|
|
35
|
+
return universalTemplate;
|
|
36
|
+
}
|
|
41
37
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
if (!template) {
|
|
49
|
-
return createWrapperScriptFallback(type);
|
|
50
|
-
}
|
|
51
|
-
return template;
|
|
38
|
+
const filename = type === 'unix' ? 'claude-flow' : type === 'windows' ? 'claude-flow.bat' : 'claude-flow.ps1';
|
|
39
|
+
const template = loadTemplate(filename);
|
|
40
|
+
if (!template) {
|
|
41
|
+
return createWrapperScriptFallback(type);
|
|
42
|
+
}
|
|
43
|
+
return template;
|
|
52
44
|
}
|
|
53
|
-
|
|
54
45
|
export function createCommandDoc(category, command) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
46
|
+
const template = loadTemplate(`commands/${category}/${command}.md`);
|
|
47
|
+
if (!template) {
|
|
48
|
+
// Silently fall back to generated documentation
|
|
49
|
+
return createCommandDocFallback(category, command);
|
|
50
|
+
}
|
|
51
|
+
return template;
|
|
61
52
|
}
|
|
62
|
-
|
|
63
53
|
// Generate command documentation fallbacks
|
|
64
54
|
function createCommandDocFallback(category, command) {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
55
|
+
const docs = {
|
|
56
|
+
analysis: {
|
|
57
|
+
'bottleneck-detect': `# bottleneck-detect
|
|
68
58
|
|
|
69
59
|
Automatically detect performance bottlenecks in your swarm operations.
|
|
70
60
|
|
|
@@ -90,7 +80,7 @@ npx claude-flow-novice analysis bottleneck-detect --threshold 500
|
|
|
90
80
|
npx claude-flow-novice analysis bottleneck-detect --export bottlenecks.json
|
|
91
81
|
\`\`\`
|
|
92
82
|
`,
|
|
93
|
-
|
|
83
|
+
'token-usage': `# token-usage
|
|
94
84
|
|
|
95
85
|
Analyze token usage patterns and optimize for efficiency.
|
|
96
86
|
|
|
@@ -116,7 +106,7 @@ npx claude-flow-novice analysis token-usage --by-agent
|
|
|
116
106
|
npx claude-flow-novice analysis token-usage --period 7d --export tokens.csv
|
|
117
107
|
\`\`\`
|
|
118
108
|
`,
|
|
119
|
-
|
|
109
|
+
'performance-report': `# performance-report
|
|
120
110
|
|
|
121
111
|
Generate comprehensive performance reports for swarm operations.
|
|
122
112
|
|
|
@@ -141,10 +131,10 @@ npx claude-flow-novice analysis performance-report --compare swarm-123
|
|
|
141
131
|
# Full metrics report
|
|
142
132
|
npx claude-flow-novice analysis performance-report --include-metrics --format markdown
|
|
143
133
|
\`\`\`
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
134
|
+
`
|
|
135
|
+
},
|
|
136
|
+
automation: {
|
|
137
|
+
'auto-agent': `# auto-agent
|
|
148
138
|
|
|
149
139
|
Automatically assign agents based on task analysis.
|
|
150
140
|
|
|
@@ -170,7 +160,7 @@ npx claude-flow-novice automation auto-agent --task "Fix bugs" --max-agents 3
|
|
|
170
160
|
npx claude-flow-novice automation auto-agent --strategy specialized
|
|
171
161
|
\`\`\`
|
|
172
162
|
`,
|
|
173
|
-
|
|
163
|
+
'smart-spawn': `# smart-spawn
|
|
174
164
|
|
|
175
165
|
Intelligently spawn agents based on workload analysis.
|
|
176
166
|
|
|
@@ -196,7 +186,7 @@ npx claude-flow-novice automation smart-spawn --threshold 5
|
|
|
196
186
|
npx claude-flow-novice automation smart-spawn --topology hierarchical
|
|
197
187
|
\`\`\`
|
|
198
188
|
`,
|
|
199
|
-
|
|
189
|
+
'workflow-select': `# workflow-select
|
|
200
190
|
|
|
201
191
|
Automatically select optimal workflow based on task type.
|
|
202
192
|
|
|
@@ -221,10 +211,10 @@ npx claude-flow-novice automation workflow-select --constraints "no-downtime,rol
|
|
|
221
211
|
# Preview mode
|
|
222
212
|
npx claude-flow-novice automation workflow-select --task "Database migration" --preview
|
|
223
213
|
\`\`\`
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
214
|
+
`
|
|
215
|
+
},
|
|
216
|
+
coordination: {
|
|
217
|
+
'swarm-init': `# swarm-init
|
|
228
218
|
|
|
229
219
|
Initialize a new agent swarm with specified topology.
|
|
230
220
|
|
|
@@ -250,7 +240,7 @@ npx claude-flow-novice swarm init --topology mesh --max-agents 8
|
|
|
250
240
|
npx claude-flow-novice swarm init --strategy parallel
|
|
251
241
|
\`\`\`
|
|
252
242
|
`,
|
|
253
|
-
|
|
243
|
+
'agent-spawn': `# agent-spawn
|
|
254
244
|
|
|
255
245
|
Spawn a new agent in the current swarm.
|
|
256
246
|
|
|
@@ -276,7 +266,7 @@ npx claude-flow-novice agent spawn --type researcher --name "API Expert"
|
|
|
276
266
|
npx claude-flow-novice agent spawn --type coder --skills "python,fastapi,testing"
|
|
277
267
|
\`\`\`
|
|
278
268
|
`,
|
|
279
|
-
|
|
269
|
+
'task-orchestrate': `# task-orchestrate
|
|
280
270
|
|
|
281
271
|
Orchestrate complex tasks across the swarm.
|
|
282
272
|
|
|
@@ -301,10 +291,10 @@ npx claude-flow-novice task orchestrate --task "Fix production bug" --priority c
|
|
|
301
291
|
# With specific strategy
|
|
302
292
|
npx claude-flow-novice task orchestrate --task "Refactor codebase" --strategy parallel
|
|
303
293
|
\`\`\`
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
294
|
+
`
|
|
295
|
+
},
|
|
296
|
+
github: {
|
|
297
|
+
'github-swarm': `# github-swarm
|
|
308
298
|
|
|
309
299
|
Create a specialized swarm for GitHub repository management.
|
|
310
300
|
|
|
@@ -330,7 +320,7 @@ npx claude-flow-novice github swarm --repository myorg/myrepo --focus security
|
|
|
330
320
|
npx claude-flow-novice github swarm --repository myorg/myrepo --agents 6
|
|
331
321
|
\`\`\`
|
|
332
322
|
`,
|
|
333
|
-
|
|
323
|
+
'repo-analyze': `# repo-analyze
|
|
334
324
|
|
|
335
325
|
Deep analysis of GitHub repository with AI insights.
|
|
336
326
|
|
|
@@ -356,7 +346,7 @@ npx claude-flow-novice github repo-analyze --repository myorg/myrepo --deep
|
|
|
356
346
|
npx claude-flow-novice github repo-analyze --repository myorg/myrepo --include issues,prs
|
|
357
347
|
\`\`\`
|
|
358
348
|
`,
|
|
359
|
-
|
|
349
|
+
'pr-enhance': `# pr-enhance
|
|
360
350
|
|
|
361
351
|
AI-powered pull request enhancements.
|
|
362
352
|
|
|
@@ -383,7 +373,7 @@ npx claude-flow-novice github pr-enhance --pr-number 123 --add-tests
|
|
|
383
373
|
npx claude-flow-novice github pr-enhance --pr-number 123 --add-tests --improve-docs
|
|
384
374
|
\`\`\`
|
|
385
375
|
`,
|
|
386
|
-
|
|
376
|
+
'issue-triage': `# issue-triage
|
|
387
377
|
|
|
388
378
|
Intelligent issue classification and triage.
|
|
389
379
|
|
|
@@ -409,7 +399,7 @@ npx claude-flow-novice github issue-triage --repository myorg/myrepo --auto-labe
|
|
|
409
399
|
npx claude-flow-novice github issue-triage --repository myorg/myrepo --auto-label --assign
|
|
410
400
|
\`\`\`
|
|
411
401
|
`,
|
|
412
|
-
|
|
402
|
+
'code-review': `# code-review
|
|
413
403
|
|
|
414
404
|
Automated code review with swarm intelligence.
|
|
415
405
|
|
|
@@ -434,10 +424,10 @@ npx claude-flow-novice github code-review --pr-number 456 --focus security
|
|
|
434
424
|
# With fix suggestions
|
|
435
425
|
npx claude-flow-novice github code-review --pr-number 456 --suggest-fixes
|
|
436
426
|
\`\`\`
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
427
|
+
`
|
|
428
|
+
},
|
|
429
|
+
hooks: {
|
|
430
|
+
'pre-task': `# pre-task
|
|
441
431
|
|
|
442
432
|
Hook executed before task execution.
|
|
443
433
|
|
|
@@ -463,7 +453,7 @@ npx claude-flow-novice hook pre-task --description "Complex refactoring" --auto-
|
|
|
463
453
|
npx claude-flow-novice hook pre-task --description "Continue feature" --load-context
|
|
464
454
|
\`\`\`
|
|
465
455
|
`,
|
|
466
|
-
|
|
456
|
+
'post-task': `# post-task
|
|
467
457
|
|
|
468
458
|
Hook executed after task completion.
|
|
469
459
|
|
|
@@ -489,7 +479,7 @@ npx claude-flow-novice hook post-task --task-id task-123 --analyze-performance
|
|
|
489
479
|
npx claude-flow-novice hook post-task --task-id task-123 --update-memory
|
|
490
480
|
\`\`\`
|
|
491
481
|
`,
|
|
492
|
-
|
|
482
|
+
'pre-edit': `# pre-edit
|
|
493
483
|
|
|
494
484
|
Hook executed before file edits.
|
|
495
485
|
|
|
@@ -515,7 +505,7 @@ npx claude-flow-novice hook pre-edit --file src/api.js --validate-syntax
|
|
|
515
505
|
npx claude-flow-novice hook pre-edit --file src/api.js --backup
|
|
516
506
|
\`\`\`
|
|
517
507
|
`,
|
|
518
|
-
|
|
508
|
+
'post-edit': `# post-edit
|
|
519
509
|
|
|
520
510
|
Hook executed after file edits.
|
|
521
511
|
|
|
@@ -541,7 +531,7 @@ npx claude-flow-novice hook post-edit --file src/api.js --memory-key "api-change
|
|
|
541
531
|
npx claude-flow-novice hook post-edit --file src/api.js --format
|
|
542
532
|
\`\`\`
|
|
543
533
|
`,
|
|
544
|
-
|
|
534
|
+
'session-end': `# session-end
|
|
545
535
|
|
|
546
536
|
Hook executed at session end.
|
|
547
537
|
|
|
@@ -566,10 +556,10 @@ npx claude-flow-novice hook session-end --export-metrics
|
|
|
566
556
|
# Full closure
|
|
567
557
|
npx claude-flow-novice hook session-end --export-metrics --generate-summary --persist-state
|
|
568
558
|
\`\`\`
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
559
|
+
`
|
|
560
|
+
},
|
|
561
|
+
memory: {
|
|
562
|
+
'memory-usage': `# memory-usage
|
|
573
563
|
|
|
574
564
|
Manage persistent memory storage.
|
|
575
565
|
|
|
@@ -595,7 +585,7 @@ npx claude-flow-novice memory usage --action retrieve --key "project-config"
|
|
|
595
585
|
npx claude-flow-novice memory usage --action list
|
|
596
586
|
\`\`\`
|
|
597
587
|
`,
|
|
598
|
-
|
|
588
|
+
'memory-persist': `# memory-persist
|
|
599
589
|
|
|
600
590
|
Persist memory across sessions.
|
|
601
591
|
|
|
@@ -621,7 +611,7 @@ npx claude-flow-novice memory persist --import memory-backup.json
|
|
|
621
611
|
npx claude-flow-novice memory persist --export memory.gz --compress
|
|
622
612
|
\`\`\`
|
|
623
613
|
`,
|
|
624
|
-
|
|
614
|
+
'memory-search': `# memory-search
|
|
625
615
|
|
|
626
616
|
Search through stored memory.
|
|
627
617
|
|
|
@@ -646,10 +636,10 @@ npx claude-flow-novice memory search --pattern "api-.*"
|
|
|
646
636
|
# Limited results
|
|
647
637
|
npx claude-flow-novice memory search --query "config" --limit 10
|
|
648
638
|
\`\`\`
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
639
|
+
`
|
|
640
|
+
},
|
|
641
|
+
monitoring: {
|
|
642
|
+
'swarm-monitor': `# swarm-monitor
|
|
653
643
|
|
|
654
644
|
Real-time swarm monitoring.
|
|
655
645
|
|
|
@@ -675,7 +665,7 @@ npx claude-flow-novice swarm monitor --interval 5000
|
|
|
675
665
|
npx claude-flow-novice swarm monitor --metrics
|
|
676
666
|
\`\`\`
|
|
677
667
|
`,
|
|
678
|
-
|
|
668
|
+
'agent-metrics': `# agent-metrics
|
|
679
669
|
|
|
680
670
|
View agent performance metrics.
|
|
681
671
|
|
|
@@ -701,7 +691,7 @@ npx claude-flow-novice agent metrics --agent-id agent-001
|
|
|
701
691
|
npx claude-flow-novice agent metrics --period 1h
|
|
702
692
|
\`\`\`
|
|
703
693
|
`,
|
|
704
|
-
|
|
694
|
+
'real-time-view': `# real-time-view
|
|
705
695
|
|
|
706
696
|
Real-time view of swarm activity.
|
|
707
697
|
|
|
@@ -726,10 +716,10 @@ npx claude-flow-novice monitoring real-time-view --filter errors
|
|
|
726
716
|
# Highlight pattern
|
|
727
717
|
npx claude-flow-novice monitoring real-time-view --highlight "API"
|
|
728
718
|
\`\`\`
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
719
|
+
`
|
|
720
|
+
},
|
|
721
|
+
optimization: {
|
|
722
|
+
'topology-optimize': `# topology-optimize
|
|
733
723
|
|
|
734
724
|
Optimize swarm topology for current workload.
|
|
735
725
|
|
|
@@ -755,7 +745,7 @@ npx claude-flow-novice optimization topology-optimize --target speed
|
|
|
755
745
|
npx claude-flow-novice optimization topology-optimize --target efficiency --apply
|
|
756
746
|
\`\`\`
|
|
757
747
|
`,
|
|
758
|
-
|
|
748
|
+
'parallel-execute': `# parallel-execute
|
|
759
749
|
|
|
760
750
|
Execute tasks in parallel for maximum efficiency.
|
|
761
751
|
|
|
@@ -781,7 +771,7 @@ npx claude-flow-novice optimization parallel-execute --tasks tasks.json --max-pa
|
|
|
781
771
|
npx claude-flow-novice optimization parallel-execute --strategy adaptive
|
|
782
772
|
\`\`\`
|
|
783
773
|
`,
|
|
784
|
-
|
|
774
|
+
'cache-manage': `# cache-manage
|
|
785
775
|
|
|
786
776
|
Manage operation cache for performance.
|
|
787
777
|
|
|
@@ -806,10 +796,10 @@ npx claude-flow-novice optimization cache-manage --action clear
|
|
|
806
796
|
# Set limits
|
|
807
797
|
npx claude-flow-novice optimization cache-manage --max-size 100 --ttl 3600
|
|
808
798
|
\`\`\`
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
799
|
+
`
|
|
800
|
+
},
|
|
801
|
+
training: {
|
|
802
|
+
'neural-train': `# neural-train
|
|
813
803
|
|
|
814
804
|
Train neural patterns from operations.
|
|
815
805
|
|
|
@@ -835,7 +825,7 @@ npx claude-flow-novice training neural-train --model task-predictor
|
|
|
835
825
|
npx claude-flow-novice training neural-train --epochs 100
|
|
836
826
|
\`\`\`
|
|
837
827
|
`,
|
|
838
|
-
|
|
828
|
+
'pattern-learn': `# pattern-learn
|
|
839
829
|
|
|
840
830
|
Learn patterns from successful operations.
|
|
841
831
|
|
|
@@ -861,7 +851,7 @@ npx claude-flow-novice training pattern-learn --threshold 0.9
|
|
|
861
851
|
npx claude-flow-novice training pattern-learn --save optimal-patterns
|
|
862
852
|
\`\`\`
|
|
863
853
|
`,
|
|
864
|
-
|
|
854
|
+
'model-update': `# model-update
|
|
865
855
|
|
|
866
856
|
Update neural models with new data.
|
|
867
857
|
|
|
@@ -886,10 +876,10 @@ npx claude-flow-novice training model-update --model agent-selector
|
|
|
886
876
|
# Incremental with validation
|
|
887
877
|
npx claude-flow-novice training model-update --incremental --validate
|
|
888
878
|
\`\`\`
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
879
|
+
`
|
|
880
|
+
},
|
|
881
|
+
workflows: {
|
|
882
|
+
'workflow-create': `# workflow-create
|
|
893
883
|
|
|
894
884
|
Create reusable workflow templates.
|
|
895
885
|
|
|
@@ -915,7 +905,7 @@ npx claude-flow-novice workflow create --name "test-suite" --from-history
|
|
|
915
905
|
npx claude-flow-novice workflow create --interactive
|
|
916
906
|
\`\`\`
|
|
917
907
|
`,
|
|
918
|
-
|
|
908
|
+
'workflow-execute': `# workflow-execute
|
|
919
909
|
|
|
920
910
|
Execute saved workflows.
|
|
921
911
|
|
|
@@ -941,7 +931,7 @@ npx claude-flow-novice workflow execute --name "test-suite" --params '{"env": "s
|
|
|
941
931
|
npx claude-flow-novice workflow execute --name "deploy-api" --dry-run
|
|
942
932
|
\`\`\`
|
|
943
933
|
`,
|
|
944
|
-
|
|
934
|
+
'workflow-export': `# workflow-export
|
|
945
935
|
|
|
946
936
|
Export workflows for sharing.
|
|
947
937
|
|
|
@@ -966,10 +956,10 @@ npx claude-flow-novice workflow export --name "test-suite" --format yaml
|
|
|
966
956
|
# With history
|
|
967
957
|
npx claude-flow-novice workflow export --name "deploy-api" --include-history
|
|
968
958
|
\`\`\`
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
959
|
+
`
|
|
960
|
+
},
|
|
961
|
+
swarm: {
|
|
962
|
+
swarm: `# swarm
|
|
973
963
|
|
|
974
964
|
Main swarm orchestration command for Claude Flow.
|
|
975
965
|
|
|
@@ -997,7 +987,7 @@ npx claude-flow-novice swarm "Research AI patterns" --strategy research
|
|
|
997
987
|
npx claude-flow-novice swarm "Build API" --claude
|
|
998
988
|
\`\`\`
|
|
999
989
|
`,
|
|
1000
|
-
|
|
990
|
+
'swarm-init': `# swarm-init
|
|
1001
991
|
|
|
1002
992
|
Initialize a new swarm with specified topology.
|
|
1003
993
|
|
|
@@ -1017,7 +1007,7 @@ npx claude-flow-novice swarm init --topology mesh
|
|
|
1017
1007
|
npx claude-flow-novice swarm init --topology hierarchical --max-agents 8
|
|
1018
1008
|
\`\`\`
|
|
1019
1009
|
`,
|
|
1020
|
-
|
|
1010
|
+
'swarm-spawn': `# swarm-spawn
|
|
1021
1011
|
|
|
1022
1012
|
Spawn agents in the swarm.
|
|
1023
1013
|
|
|
@@ -1036,10 +1026,10 @@ npx claude-flow-novice swarm spawn [options]
|
|
|
1036
1026
|
npx claude-flow-novice swarm spawn --type coder --count 3
|
|
1037
1027
|
npx claude-flow-novice swarm spawn --type researcher --capabilities "web-search,analysis"
|
|
1038
1028
|
\`\`\`
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1029
|
+
`
|
|
1030
|
+
},
|
|
1031
|
+
'hive-mind': {
|
|
1032
|
+
'hive-mind': `# hive-mind
|
|
1043
1033
|
|
|
1044
1034
|
Hive Mind collective intelligence system for advanced swarm coordination.
|
|
1045
1035
|
|
|
@@ -1067,7 +1057,7 @@ npx claude-flow-novice hive-mind spawn "Build microservices"
|
|
|
1067
1057
|
npx claude-flow-novice hive-mind status
|
|
1068
1058
|
\`\`\`
|
|
1069
1059
|
`,
|
|
1070
|
-
|
|
1060
|
+
'hive-mind-init': `# hive-mind-init
|
|
1071
1061
|
|
|
1072
1062
|
Initialize the Hive Mind collective intelligence system.
|
|
1073
1063
|
|
|
@@ -1086,7 +1076,7 @@ npx claude-flow-novice hive-mind init
|
|
|
1086
1076
|
npx claude-flow-novice hive-mind init --force
|
|
1087
1077
|
\`\`\`
|
|
1088
1078
|
`,
|
|
1089
|
-
|
|
1079
|
+
'hive-mind-spawn': `# hive-mind-spawn
|
|
1090
1080
|
|
|
1091
1081
|
Spawn a Hive Mind swarm with queen-led coordination.
|
|
1092
1082
|
|
|
@@ -1107,10 +1097,10 @@ npx claude-flow-novice hive-mind spawn "Build API"
|
|
|
1107
1097
|
npx claude-flow-novice hive-mind spawn "Research patterns" --queen-type adaptive
|
|
1108
1098
|
npx claude-flow-novice hive-mind spawn "Build service" --claude
|
|
1109
1099
|
\`\`\`
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1100
|
+
`
|
|
1101
|
+
},
|
|
1102
|
+
agents: {
|
|
1103
|
+
'agent-types': `# agent-types
|
|
1114
1104
|
|
|
1115
1105
|
Complete guide to all 54 available agent types in Claude Flow.
|
|
1116
1106
|
|
|
@@ -1137,7 +1127,7 @@ For full list and details:
|
|
|
1137
1127
|
npx claude-flow-novice agents list
|
|
1138
1128
|
\`\`\`
|
|
1139
1129
|
`,
|
|
1140
|
-
|
|
1130
|
+
'agent-capabilities': `# agent-capabilities
|
|
1141
1131
|
|
|
1142
1132
|
Matrix of agent capabilities and their specializations.
|
|
1143
1133
|
|
|
@@ -1159,7 +1149,7 @@ npx claude-flow-novice agents capabilities
|
|
|
1159
1149
|
npx claude-flow-novice agents capabilities --type coder
|
|
1160
1150
|
\`\`\`
|
|
1161
1151
|
`,
|
|
1162
|
-
|
|
1152
|
+
'agent-coordination': `# agent-coordination
|
|
1163
1153
|
|
|
1164
1154
|
Coordination patterns for multi-agent collaboration.
|
|
1165
1155
|
|
|
@@ -1188,7 +1178,7 @@ npx claude-flow-novice swarm init --topology adaptive
|
|
|
1188
1178
|
- Use mesh for research tasks
|
|
1189
1179
|
- Use adaptive for unknown workloads
|
|
1190
1180
|
`,
|
|
1191
|
-
|
|
1181
|
+
'agent-spawning': `# agent-spawning
|
|
1192
1182
|
|
|
1193
1183
|
Guide to spawning agents with Claude Code's Task tool.
|
|
1194
1184
|
|
|
@@ -1216,59 +1206,102 @@ mcp__claude-flow__agent_spawn { type: "researcher" }
|
|
|
1216
1206
|
2. Use Task tool for execution
|
|
1217
1207
|
3. MCP only for coordination
|
|
1218
1208
|
4. Batch all operations
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
return (
|
|
1224
|
-
docs[category]?.[command] ||
|
|
1225
|
-
`# ${command}\n\nCommand documentation for ${command} in category ${category}.\n\nUsage:\n\`\`\`bash\nnpx claude-flow-novice ${category} ${command} [options]\n\`\`\`\n`
|
|
1226
|
-
);
|
|
1209
|
+
`
|
|
1210
|
+
}
|
|
1211
|
+
};
|
|
1212
|
+
return docs[category]?.[command] || `# ${command}\n\nCommand documentation for ${command} in category ${category}.\n\nUsage:\n\`\`\`bash\nnpx claude-flow-novice ${category} ${command} [options]\n\`\`\`\n`;
|
|
1227
1213
|
}
|
|
1228
|
-
|
|
1229
1214
|
// Command categories and their commands
|
|
1230
1215
|
export const COMMAND_STRUCTURE = {
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1216
|
+
analysis: [
|
|
1217
|
+
'bottleneck-detect',
|
|
1218
|
+
'token-usage',
|
|
1219
|
+
'performance-report'
|
|
1220
|
+
],
|
|
1221
|
+
automation: [
|
|
1222
|
+
'auto-agent',
|
|
1223
|
+
'smart-spawn',
|
|
1224
|
+
'workflow-select'
|
|
1225
|
+
],
|
|
1226
|
+
coordination: [
|
|
1227
|
+
'swarm-init',
|
|
1228
|
+
'agent-spawn',
|
|
1229
|
+
'task-orchestrate'
|
|
1230
|
+
],
|
|
1231
|
+
github: [
|
|
1232
|
+
'github-swarm',
|
|
1233
|
+
'repo-analyze',
|
|
1234
|
+
'pr-enhance',
|
|
1235
|
+
'issue-triage',
|
|
1236
|
+
'code-review'
|
|
1237
|
+
],
|
|
1238
|
+
hooks: [
|
|
1239
|
+
'pre-task',
|
|
1240
|
+
'post-task',
|
|
1241
|
+
'pre-edit',
|
|
1242
|
+
'post-edit',
|
|
1243
|
+
'session-end'
|
|
1244
|
+
],
|
|
1245
|
+
memory: [
|
|
1246
|
+
'memory-usage',
|
|
1247
|
+
'memory-persist',
|
|
1248
|
+
'memory-search'
|
|
1249
|
+
],
|
|
1250
|
+
monitoring: [
|
|
1251
|
+
'swarm-monitor',
|
|
1252
|
+
'agent-metrics',
|
|
1253
|
+
'real-time-view'
|
|
1254
|
+
],
|
|
1255
|
+
optimization: [
|
|
1256
|
+
'topology-optimize',
|
|
1257
|
+
'parallel-execute',
|
|
1258
|
+
'cache-manage'
|
|
1259
|
+
],
|
|
1260
|
+
training: [
|
|
1261
|
+
'neural-train',
|
|
1262
|
+
'pattern-learn',
|
|
1263
|
+
'model-update'
|
|
1264
|
+
],
|
|
1265
|
+
workflows: [
|
|
1266
|
+
'workflow-create',
|
|
1267
|
+
'workflow-execute',
|
|
1268
|
+
'workflow-export'
|
|
1269
|
+
],
|
|
1270
|
+
swarm: [
|
|
1271
|
+
'swarm',
|
|
1272
|
+
'swarm-init',
|
|
1273
|
+
'swarm-spawn',
|
|
1274
|
+
'swarm-status',
|
|
1275
|
+
'swarm-monitor',
|
|
1276
|
+
'swarm-strategies',
|
|
1277
|
+
'swarm-modes',
|
|
1278
|
+
'swarm-background',
|
|
1279
|
+
'swarm-analysis'
|
|
1280
|
+
],
|
|
1281
|
+
'hive-mind': [
|
|
1282
|
+
'hive-mind',
|
|
1283
|
+
'hive-mind-init',
|
|
1284
|
+
'hive-mind-spawn',
|
|
1285
|
+
'hive-mind-status',
|
|
1286
|
+
'hive-mind-resume',
|
|
1287
|
+
'hive-mind-stop',
|
|
1288
|
+
'hive-mind-sessions',
|
|
1289
|
+
'hive-mind-consensus',
|
|
1290
|
+
'hive-mind-memory',
|
|
1291
|
+
'hive-mind-metrics',
|
|
1292
|
+
'hive-mind-wizard'
|
|
1293
|
+
],
|
|
1294
|
+
agents: [
|
|
1295
|
+
'agent-types',
|
|
1296
|
+
'agent-capabilities',
|
|
1297
|
+
'agent-coordination',
|
|
1298
|
+
'agent-spawning'
|
|
1299
|
+
]
|
|
1266
1300
|
};
|
|
1267
|
-
|
|
1268
1301
|
// Helper script content
|
|
1269
1302
|
export function createHelperScript(name) {
|
|
1270
|
-
|
|
1271
|
-
|
|
1303
|
+
const scripts = {
|
|
1304
|
+
'setup-mcp.sh': `#!/bin/bash
|
|
1272
1305
|
# Setup MCP server for Claude Flow
|
|
1273
1306
|
|
|
1274
1307
|
echo "🚀 Setting up Claude Flow MCP server..."
|
|
@@ -1287,7 +1320,7 @@ claude mcp add claude-flow-novice npx claude-flow-novice mcp start
|
|
|
1287
1320
|
echo "✅ MCP server setup complete!"
|
|
1288
1321
|
echo "🎯 You can now use mcp__claude-flow__ tools in Claude Code"
|
|
1289
1322
|
`,
|
|
1290
|
-
|
|
1323
|
+
'quick-start.sh': `#!/bin/bash
|
|
1291
1324
|
# Quick start guide for Claude Flow
|
|
1292
1325
|
|
|
1293
1326
|
echo "🚀 Claude Flow Quick Start"
|
|
@@ -1307,7 +1340,7 @@ echo " npx claude-flow-novice swarm monitor"
|
|
|
1307
1340
|
echo ""
|
|
1308
1341
|
echo "📚 For more examples, see .claude/commands/"
|
|
1309
1342
|
`,
|
|
1310
|
-
|
|
1343
|
+
'github-setup.sh': `#!/bin/bash
|
|
1311
1344
|
# Setup GitHub integration for Claude Flow
|
|
1312
1345
|
|
|
1313
1346
|
echo "🔗 Setting up GitHub integration..."
|
|
@@ -1336,7 +1369,7 @@ echo " - npx claude-flow-novice repo analyze"
|
|
|
1336
1369
|
echo " - npx claude-flow-novice pr enhance"
|
|
1337
1370
|
echo " - npx claude-flow-novice issue triage"
|
|
1338
1371
|
`,
|
|
1339
|
-
|
|
1372
|
+
'github-safe.js': `#!/usr/bin/env node
|
|
1340
1373
|
|
|
1341
1374
|
/**
|
|
1342
1375
|
* Safe GitHub CLI Helper
|
|
@@ -1443,7 +1476,7 @@ if ((command === 'issue' || command === 'pr') &&
|
|
|
1443
1476
|
execSync(\`gh \${args.join(' ')}\`, { stdio: 'inherit' });
|
|
1444
1477
|
}
|
|
1445
1478
|
`,
|
|
1446
|
-
|
|
1479
|
+
'checkpoint-hooks.sh': `#!/bin/bash
|
|
1447
1480
|
# Checkpoint hook functions for Claude settings.json
|
|
1448
1481
|
|
|
1449
1482
|
# Function to handle pre-edit checkpoints
|
|
@@ -1625,7 +1658,7 @@ case "$1" in
|
|
|
1625
1658
|
;;
|
|
1626
1659
|
esac
|
|
1627
1660
|
`,
|
|
1628
|
-
|
|
1661
|
+
'checkpoint-manager.sh': `#!/bin/bash
|
|
1629
1662
|
# Claude Checkpoint Manager
|
|
1630
1663
|
# Provides easy rollback and management of Claude Code checkpoints
|
|
1631
1664
|
|
|
@@ -1877,7 +1910,7 @@ case "$1" in
|
|
|
1877
1910
|
;;
|
|
1878
1911
|
esac
|
|
1879
1912
|
`,
|
|
1880
|
-
|
|
1913
|
+
'standard-checkpoint-hooks.sh': `#!/bin/bash
|
|
1881
1914
|
# Standard checkpoint hook functions for Claude settings.json (without GitHub features)
|
|
1882
1915
|
|
|
1883
1916
|
# Function to handle pre-edit checkpoints
|
|
@@ -2056,17 +2089,15 @@ case "$1" in
|
|
|
2056
2089
|
exit 1
|
|
2057
2090
|
;;
|
|
2058
2091
|
esac
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
return scripts[name] || '';
|
|
2092
|
+
`
|
|
2093
|
+
};
|
|
2094
|
+
return scripts[name] || '';
|
|
2063
2095
|
}
|
|
2064
|
-
|
|
2065
2096
|
// Wrapper script fallbacks
|
|
2066
2097
|
function createWrapperScriptFallback(type) {
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2098
|
+
if (type === 'unix') {
|
|
2099
|
+
// Return the universal ES module compatible wrapper
|
|
2100
|
+
return `#!/usr/bin/env node
|
|
2070
2101
|
|
|
2071
2102
|
/**
|
|
2072
2103
|
* Claude Flow CLI - Universal Wrapper
|
|
@@ -2137,8 +2168,8 @@ function createWrapperScriptFallback(type) {
|
|
|
2137
2168
|
console.error('Could not find claude-flow. Please install it with: npm install claude-flow');
|
|
2138
2169
|
process.exit(1);
|
|
2139
2170
|
})();`;
|
|
2140
|
-
|
|
2141
|
-
|
|
2171
|
+
} else if (type === 'windows') {
|
|
2172
|
+
return `@echo off
|
|
2142
2173
|
rem Claude Flow wrapper script for Windows
|
|
2143
2174
|
|
|
2144
2175
|
rem Check if package.json exists in current directory
|
|
@@ -2156,8 +2187,8 @@ if exist "%~dp0package.json" (
|
|
|
2156
2187
|
rem Production mode - use npx alpha
|
|
2157
2188
|
npx claude-flow@alpha %*
|
|
2158
2189
|
)`;
|
|
2159
|
-
|
|
2160
|
-
|
|
2190
|
+
} else if (type === 'powershell') {
|
|
2191
|
+
return `# Claude Flow wrapper script for PowerShell
|
|
2161
2192
|
|
|
2162
2193
|
$scriptPath = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
2163
2194
|
|
|
@@ -2175,136 +2206,131 @@ if (Test-Path "$scriptPath\\package.json") {
|
|
|
2175
2206
|
# Production mode - use npx alpha
|
|
2176
2207
|
& npx claude-flow@alpha $args
|
|
2177
2208
|
}`;
|
|
2178
|
-
|
|
2179
|
-
|
|
2209
|
+
}
|
|
2210
|
+
return '';
|
|
2180
2211
|
}
|
|
2181
|
-
|
|
2182
2212
|
// DEPRECATED: Fallback functions removed - use template files only
|
|
2183
2213
|
function createEnhancedClaudeMdFallback() {
|
|
2184
|
-
|
|
2214
|
+
throw new Error('Template-only approach: createEnhancedClaudeMdFallback() is deprecated and removed.');
|
|
2185
2215
|
}
|
|
2186
|
-
|
|
2187
2216
|
function createEnhancedSettingsJsonFallback() {
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
'Bash(jq *)',
|
|
2220
|
-
],
|
|
2221
|
-
deny: ['Bash(rm -rf /)', 'Bash(curl * | bash)', 'Bash(wget * | sh)', 'Bash(eval *)'],
|
|
2222
|
-
},
|
|
2223
|
-
enabledMcpjsonServers: ['claude-flow', 'ruv-swarm'],
|
|
2224
|
-
hooks: {
|
|
2225
|
-
PreToolUse: [
|
|
2226
|
-
{
|
|
2227
|
-
matcher: 'Bash',
|
|
2228
|
-
hooks: [
|
|
2229
|
-
{
|
|
2230
|
-
type: 'command',
|
|
2231
|
-
command:
|
|
2232
|
-
'cat | jq -r \'.tool_input.command // ""\' | xargs -I {} npx claude-flow@alpha hooks pre-command --command "{}" --validate-safety true --prepare-resources true',
|
|
2233
|
-
},
|
|
2217
|
+
return JSON.stringify({
|
|
2218
|
+
env: {
|
|
2219
|
+
CLAUDE_FLOW_AUTO_COMMIT: 'false',
|
|
2220
|
+
CLAUDE_FLOW_AUTO_PUSH: 'false',
|
|
2221
|
+
CLAUDE_FLOW_HOOKS_ENABLED: 'true',
|
|
2222
|
+
CLAUDE_FLOW_TELEMETRY_ENABLED: 'true',
|
|
2223
|
+
CLAUDE_FLOW_REMOTE_EXECUTION: 'true',
|
|
2224
|
+
CLAUDE_FLOW_CHECKPOINTS_ENABLED: 'true'
|
|
2225
|
+
},
|
|
2226
|
+
permissions: {
|
|
2227
|
+
allow: [
|
|
2228
|
+
'Bash(npx claude-flow-novice *)',
|
|
2229
|
+
'Bash(npm run lint)',
|
|
2230
|
+
'Bash(npm run test:*)',
|
|
2231
|
+
'Bash(npm test *)',
|
|
2232
|
+
'Bash(git status)',
|
|
2233
|
+
'Bash(git diff *)',
|
|
2234
|
+
'Bash(git log *)',
|
|
2235
|
+
'Bash(git add *)',
|
|
2236
|
+
'Bash(git commit *)',
|
|
2237
|
+
'Bash(git push)',
|
|
2238
|
+
'Bash(git config *)',
|
|
2239
|
+
'Bash(git tag *)',
|
|
2240
|
+
'Bash(git branch *)',
|
|
2241
|
+
'Bash(git checkout *)',
|
|
2242
|
+
'Bash(git stash *)',
|
|
2243
|
+
'Bash(node *)',
|
|
2244
|
+
'Bash(which *)',
|
|
2245
|
+
'Bash(pwd)',
|
|
2246
|
+
'Bash(ls *)',
|
|
2247
|
+
'Bash(jq *)'
|
|
2234
2248
|
],
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
type: 'command',
|
|
2246
|
-
command: './.claude/helpers/standard-checkpoint-hooks.sh pre-edit "{{tool_input}}"',
|
|
2247
|
-
},
|
|
2248
|
-
],
|
|
2249
|
-
},
|
|
2249
|
+
deny: [
|
|
2250
|
+
'Bash(rm -rf /)',
|
|
2251
|
+
'Bash(curl * | bash)',
|
|
2252
|
+
'Bash(wget * | sh)',
|
|
2253
|
+
'Bash(eval *)'
|
|
2254
|
+
]
|
|
2255
|
+
},
|
|
2256
|
+
enabledMcpjsonServers: [
|
|
2257
|
+
'claude-flow',
|
|
2258
|
+
'ruv-swarm'
|
|
2250
2259
|
],
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2260
|
+
hooks: {
|
|
2261
|
+
PreToolUse: [
|
|
2262
|
+
{
|
|
2263
|
+
matcher: 'Bash',
|
|
2264
|
+
hooks: [
|
|
2265
|
+
{
|
|
2266
|
+
type: 'command',
|
|
2267
|
+
command: 'cat | jq -r \'.tool_input.command // ""\' | xargs -I {} npx claude-flow@alpha hooks pre-command --command "{}" --validate-safety true --prepare-resources true'
|
|
2268
|
+
}
|
|
2269
|
+
]
|
|
2270
|
+
},
|
|
2271
|
+
{
|
|
2272
|
+
matcher: 'Write|Edit|MultiEdit',
|
|
2273
|
+
hooks: [
|
|
2274
|
+
{
|
|
2275
|
+
type: 'command',
|
|
2276
|
+
command: 'cat | jq -r \'.tool_input.file_path // .tool_input.path // ""\' | xargs -I {} npx claude-flow@alpha hooks pre-edit --file "{}" --auto-assign-agents true --load-context true'
|
|
2277
|
+
},
|
|
2278
|
+
{
|
|
2279
|
+
type: 'command',
|
|
2280
|
+
command: './.claude/helpers/standard-checkpoint-hooks.sh pre-edit "{{tool_input}}"'
|
|
2281
|
+
}
|
|
2282
|
+
]
|
|
2283
|
+
}
|
|
2275
2284
|
],
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
+
PostToolUse: [
|
|
2286
|
+
{
|
|
2287
|
+
matcher: 'Bash',
|
|
2288
|
+
hooks: [
|
|
2289
|
+
{
|
|
2290
|
+
type: 'command',
|
|
2291
|
+
command: 'cat | jq -r \'.tool_input.command // ""\' | xargs -I {} npx claude-flow@alpha hooks post-command --command "{}" --track-metrics true --store-results true'
|
|
2292
|
+
}
|
|
2293
|
+
]
|
|
2294
|
+
},
|
|
2295
|
+
{
|
|
2296
|
+
matcher: 'Write|Edit|MultiEdit',
|
|
2297
|
+
hooks: [
|
|
2298
|
+
{
|
|
2299
|
+
type: 'command',
|
|
2300
|
+
command: 'cat | jq -r \'.tool_input.file_path // .tool_input.path // ""\' | xargs -I {} npx claude-flow@alpha hooks post-edit --file "{}" --format true --update-memory true --train-neural true'
|
|
2301
|
+
},
|
|
2302
|
+
{
|
|
2303
|
+
type: 'command',
|
|
2304
|
+
command: './.claude/helpers/standard-checkpoint-hooks.sh post-edit "{{tool_input}}"'
|
|
2305
|
+
}
|
|
2306
|
+
]
|
|
2307
|
+
}
|
|
2285
2308
|
],
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
},
|
|
2296
|
-
{
|
|
2297
|
-
type: 'command',
|
|
2298
|
-
command:
|
|
2299
|
-
'/usr/bin/env bash -c \'if [ -f ./.claude/helpers/standard-checkpoint-hooks.sh ]; then ./.claude/helpers/standard-checkpoint-hooks.sh session-end; else echo "⚠️ Checkpoint hooks not found"; fi\'',
|
|
2300
|
-
},
|
|
2309
|
+
UserPromptSubmit: [
|
|
2310
|
+
{
|
|
2311
|
+
hooks: [
|
|
2312
|
+
{
|
|
2313
|
+
type: 'command',
|
|
2314
|
+
command: './.claude/helpers/standard-checkpoint-hooks.sh task "{{user_prompt}}"'
|
|
2315
|
+
}
|
|
2316
|
+
]
|
|
2317
|
+
}
|
|
2301
2318
|
],
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2319
|
+
Stop: [
|
|
2320
|
+
{
|
|
2321
|
+
hooks: [
|
|
2322
|
+
{
|
|
2323
|
+
type: 'command',
|
|
2324
|
+
command: '/usr/bin/env bash -c \'if command -v npx >/dev/null 2>&1; then npx claude-flow@alpha hooks session-end --generate-summary true --persist-state true --export-metrics true; else echo "⚠️ npx not available, skipping Claude Flow session-end hook"; fi\''
|
|
2325
|
+
},
|
|
2326
|
+
{
|
|
2327
|
+
type: 'command',
|
|
2328
|
+
command: '/usr/bin/env bash -c \'if [ -f ./.claude/helpers/standard-checkpoint-hooks.sh ]; then ./.claude/helpers/standard-checkpoint-hooks.sh session-end; else echo "⚠️ Checkpoint hooks not found"; fi\''
|
|
2329
|
+
}
|
|
2330
|
+
]
|
|
2331
|
+
}
|
|
2332
|
+
]
|
|
2333
|
+
},
|
|
2334
|
+
includeCoAuthoredBy: true
|
|
2335
|
+
}, null, 2);
|
|
2310
2336
|
}
|