claude-flow-novice 2.10.8 → 2.11.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.
Files changed (193) hide show
  1. package/.claude/commands/README.md +157 -0
  2. package/.claude/hooks/cfn-invoke-post-edit.sh +1 -1
  3. package/.claude/hooks/cfn-invoke-pre-edit.sh +88 -0
  4. package/.claude/skills/cfn-agent-spawning/spawn-worker.sh +176 -0
  5. package/.claude/skills/cfn-backlog-management/SKILL.md +199 -0
  6. package/.claude/skills/cfn-backlog-management/add-backlog-item.sh +210 -0
  7. package/claude-assets/agents/cfn-dev-team/architecture/base-template-generator.md +7 -21
  8. package/claude-assets/agents/cfn-dev-team/testing/test-validation-agent.md +312 -0
  9. package/claude-assets/agents/cfn-dev-team/utility/agent-builder.md +480 -115
  10. package/claude-assets/agents/csuite/cto-agent.md +371 -0
  11. package/claude-assets/agents/marketing_hybrid/cost_tracker.md +13 -0
  12. package/claude-assets/agents/marketing_hybrid/docker_deployer.md +13 -0
  13. package/claude-assets/agents/marketing_hybrid/zai_worker_spawner.md +13 -0
  14. package/claude-assets/hooks/cfn-invoke-post-edit.sh +1 -1
  15. package/claude-assets/hooks/cfn-invoke-pre-edit.sh +88 -0
  16. package/claude-assets/skills/cfn-agent-spawning/spawn-worker.sh +176 -0
  17. package/claude-assets/skills/cfn-backlog-management/SKILL.md +199 -0
  18. package/claude-assets/skills/cfn-backlog-management/add-backlog-item.sh +210 -0
  19. package/claude-assets/skills/pre-edit-backup/backup.sh +130 -0
  20. package/claude-assets/skills/pre-edit-backup/cleanup.sh +155 -0
  21. package/claude-assets/skills/pre-edit-backup/restore.sh +128 -0
  22. package/claude-assets/skills/pre-edit-backup/revert-file.sh +168 -0
  23. package/dist/agents/agent-loader.js +315 -0
  24. package/dist/agents/agent-loader.js.map +1 -1
  25. package/package.json +3 -2
  26. package/scripts/init-project.js +38 -3
  27. package/scripts/marketing_hybrid_deployment.sh +45 -0
  28. package/scripts/redis-prometheus-exporter.sh +33 -0
  29. package/scripts/track-zai-costs.sh +19 -0
  30. package/claude-assets/commands/agents/README.md +0 -10
  31. package/claude-assets/commands/agents/agent-capabilities.md +0 -21
  32. package/claude-assets/commands/agents/agent-coordination.md +0 -28
  33. package/claude-assets/commands/agents/agent-spawning.md +0 -28
  34. package/claude-assets/commands/agents/agent-types.md +0 -26
  35. package/claude-assets/commands/analysis/COMMAND_COMPLIANCE_REPORT.md +0 -54
  36. package/claude-assets/commands/analysis/README.md +0 -9
  37. package/claude-assets/commands/analysis/bottleneck-detect.md +0 -162
  38. package/claude-assets/commands/analysis/performance-bottlenecks.md +0 -59
  39. package/claude-assets/commands/analysis/performance-report.md +0 -25
  40. package/claude-assets/commands/analysis/token-efficiency.md +0 -45
  41. package/claude-assets/commands/analysis/token-usage.md +0 -25
  42. package/claude-assets/commands/automation/README.md +0 -9
  43. package/claude-assets/commands/automation/auto-agent.md +0 -122
  44. package/claude-assets/commands/automation/self-healing.md +0 -106
  45. package/claude-assets/commands/automation/session-memory.md +0 -90
  46. package/claude-assets/commands/automation/smart-agents.md +0 -73
  47. package/claude-assets/commands/automation/smart-spawn.md +0 -25
  48. package/claude-assets/commands/automation/workflow-select.md +0 -25
  49. package/claude-assets/commands/claude-md.js +0 -237
  50. package/claude-assets/commands/claude-soul.js +0 -28
  51. package/claude-assets/commands/cli-integration.js +0 -216
  52. package/claude-assets/commands/coordination/README.md +0 -9
  53. package/claude-assets/commands/coordination/agent-spawn.md +0 -25
  54. package/claude-assets/commands/coordination/coordination-system.md +0 -88
  55. package/claude-assets/commands/coordination/init.md +0 -44
  56. package/claude-assets/commands/coordination/orchestrate.md +0 -43
  57. package/claude-assets/commands/coordination/spawn.md +0 -45
  58. package/claude-assets/commands/coordination/swarm-init.md +0 -85
  59. package/claude-assets/commands/coordination/task-orchestrate.md +0 -25
  60. package/claude-assets/commands/github/README.md +0 -11
  61. package/claude-assets/commands/github/code-review-swarm.md +0 -514
  62. package/claude-assets/commands/github/code-review.md +0 -25
  63. package/claude-assets/commands/github/github-modes.md +0 -147
  64. package/claude-assets/commands/github/github-swarm.md +0 -121
  65. package/claude-assets/commands/github/issue-tracker.md +0 -292
  66. package/claude-assets/commands/github/issue-triage.md +0 -25
  67. package/claude-assets/commands/github/multi-repo-swarm.md +0 -519
  68. package/claude-assets/commands/github/pr-enhance.md +0 -26
  69. package/claude-assets/commands/github/pr-manager.md +0 -170
  70. package/claude-assets/commands/github/project-board-sync.md +0 -471
  71. package/claude-assets/commands/github/release-manager.md +0 -338
  72. package/claude-assets/commands/github/release-swarm.md +0 -544
  73. package/claude-assets/commands/github/repo-analyze.md +0 -25
  74. package/claude-assets/commands/github/repo-architect.md +0 -367
  75. package/claude-assets/commands/github/swarm-issue.md +0 -482
  76. package/claude-assets/commands/github/swarm-pr.md +0 -285
  77. package/claude-assets/commands/github/sync-coordinator.md +0 -301
  78. package/claude-assets/commands/github/workflow-automation.md +0 -442
  79. package/claude-assets/commands/github.js +0 -638
  80. package/claude-assets/commands/hive-mind/README.md +0 -17
  81. package/claude-assets/commands/hive-mind/hive-mind-consensus.md +0 -8
  82. package/claude-assets/commands/hive-mind/hive-mind-init.md +0 -18
  83. package/claude-assets/commands/hive-mind/hive-mind-memory.md +0 -8
  84. package/claude-assets/commands/hive-mind/hive-mind-metrics.md +0 -8
  85. package/claude-assets/commands/hive-mind/hive-mind-resume.md +0 -8
  86. package/claude-assets/commands/hive-mind/hive-mind-sessions.md +0 -8
  87. package/claude-assets/commands/hive-mind/hive-mind-spawn.md +0 -21
  88. package/claude-assets/commands/hive-mind/hive-mind-status.md +0 -8
  89. package/claude-assets/commands/hive-mind/hive-mind-stop.md +0 -8
  90. package/claude-assets/commands/hive-mind/hive-mind-wizard.md +0 -8
  91. package/claude-assets/commands/hive-mind/hive-mind.md +0 -27
  92. package/claude-assets/commands/hooks/README.md +0 -11
  93. package/claude-assets/commands/hooks/overview.md +0 -58
  94. package/claude-assets/commands/hooks/post-edit.md +0 -117
  95. package/claude-assets/commands/hooks/post-task.md +0 -112
  96. package/claude-assets/commands/hooks/pre-edit.md +0 -113
  97. package/claude-assets/commands/hooks/pre-task.md +0 -111
  98. package/claude-assets/commands/hooks/session-end.md +0 -118
  99. package/claude-assets/commands/hooks/session-start.md +0 -9
  100. package/claude-assets/commands/hooks/setup.md +0 -103
  101. package/claude-assets/commands/hooks.js +0 -651
  102. package/claude-assets/commands/index.js +0 -119
  103. package/claude-assets/commands/memory/README.md +0 -9
  104. package/claude-assets/commands/memory/memory-bank.md +0 -58
  105. package/claude-assets/commands/memory/memory-persist.md +0 -25
  106. package/claude-assets/commands/memory/memory-search.md +0 -25
  107. package/claude-assets/commands/memory/memory-usage.md +0 -25
  108. package/claude-assets/commands/memory/neural.md +0 -47
  109. package/claude-assets/commands/memory/usage.md +0 -46
  110. package/claude-assets/commands/monitoring/README.md +0 -9
  111. package/claude-assets/commands/monitoring/agent-metrics.md +0 -25
  112. package/claude-assets/commands/monitoring/agents.md +0 -44
  113. package/claude-assets/commands/monitoring/real-time-view.md +0 -25
  114. package/claude-assets/commands/monitoring/status.md +0 -46
  115. package/claude-assets/commands/monitoring/swarm-monitor.md +0 -25
  116. package/claude-assets/commands/neural.js +0 -572
  117. package/claude-assets/commands/optimization/README.md +0 -9
  118. package/claude-assets/commands/optimization/auto-topology.md +0 -62
  119. package/claude-assets/commands/optimization/cache-manage.md +0 -25
  120. package/claude-assets/commands/optimization/parallel-execute.md +0 -25
  121. package/claude-assets/commands/optimization/parallel-execution.md +0 -50
  122. package/claude-assets/commands/optimization/topology-optimize.md +0 -25
  123. package/claude-assets/commands/pair/README.md +0 -261
  124. package/claude-assets/commands/pair/commands.md +0 -546
  125. package/claude-assets/commands/pair/config.md +0 -510
  126. package/claude-assets/commands/pair/examples.md +0 -512
  127. package/claude-assets/commands/pair/modes.md +0 -348
  128. package/claude-assets/commands/pair/session.md +0 -407
  129. package/claude-assets/commands/pair/start.md +0 -209
  130. package/claude-assets/commands/parse-epic.js +0 -180
  131. package/claude-assets/commands/performance.js +0 -582
  132. package/claude-assets/commands/register-all-commands.js +0 -320
  133. package/claude-assets/commands/register-claude-md.js +0 -82
  134. package/claude-assets/commands/register-claude-soul.js +0 -80
  135. package/claude-assets/commands/sparc/analyzer.md +0 -52
  136. package/claude-assets/commands/sparc/architect.md +0 -53
  137. package/claude-assets/commands/sparc/batch-executor.md +0 -54
  138. package/claude-assets/commands/sparc/coder.md +0 -54
  139. package/claude-assets/commands/sparc/debugger.md +0 -54
  140. package/claude-assets/commands/sparc/designer.md +0 -53
  141. package/claude-assets/commands/sparc/documenter.md +0 -54
  142. package/claude-assets/commands/sparc/innovator.md +0 -54
  143. package/claude-assets/commands/sparc/memory-manager.md +0 -54
  144. package/claude-assets/commands/sparc/optimizer.md +0 -54
  145. package/claude-assets/commands/sparc/orchestrator.md +0 -132
  146. package/claude-assets/commands/sparc/researcher.md +0 -54
  147. package/claude-assets/commands/sparc/reviewer.md +0 -54
  148. package/claude-assets/commands/sparc/sparc-modes.md +0 -174
  149. package/claude-assets/commands/sparc/swarm-coordinator.md +0 -54
  150. package/claude-assets/commands/sparc/tdd.md +0 -54
  151. package/claude-assets/commands/sparc/tester.md +0 -54
  152. package/claude-assets/commands/sparc/workflow-manager.md +0 -54
  153. package/claude-assets/commands/sparc.js +0 -110
  154. package/claude-assets/commands/stream-chain/pipeline.md +0 -121
  155. package/claude-assets/commands/stream-chain/run.md +0 -70
  156. package/claude-assets/commands/swarm/README.md +0 -15
  157. package/claude-assets/commands/swarm/analysis.md +0 -95
  158. package/claude-assets/commands/swarm/development.md +0 -96
  159. package/claude-assets/commands/swarm/examples.md +0 -168
  160. package/claude-assets/commands/swarm/maintenance.md +0 -102
  161. package/claude-assets/commands/swarm/optimization.md +0 -117
  162. package/claude-assets/commands/swarm/research.md +0 -136
  163. package/claude-assets/commands/swarm/swarm-analysis.md +0 -8
  164. package/claude-assets/commands/swarm/swarm-background.md +0 -8
  165. package/claude-assets/commands/swarm/swarm-init.md +0 -19
  166. package/claude-assets/commands/swarm/swarm-modes.md +0 -8
  167. package/claude-assets/commands/swarm/swarm-monitor.md +0 -8
  168. package/claude-assets/commands/swarm/swarm-spawn.md +0 -19
  169. package/claude-assets/commands/swarm/swarm-status.md +0 -8
  170. package/claude-assets/commands/swarm/swarm-strategies.md +0 -8
  171. package/claude-assets/commands/swarm/swarm.md +0 -27
  172. package/claude-assets/commands/swarm/testing.md +0 -131
  173. package/claude-assets/commands/swarm.js +0 -423
  174. package/claude-assets/commands/testing/playwright-e2e.md +0 -288
  175. package/claude-assets/commands/training/README.md +0 -9
  176. package/claude-assets/commands/training/model-update.md +0 -25
  177. package/claude-assets/commands/training/neural-patterns.md +0 -74
  178. package/claude-assets/commands/training/neural-train.md +0 -25
  179. package/claude-assets/commands/training/pattern-learn.md +0 -25
  180. package/claude-assets/commands/training/specialization.md +0 -63
  181. package/claude-assets/commands/truth/start.md +0 -143
  182. package/claude-assets/commands/validate-commands.js +0 -223
  183. package/claude-assets/commands/verify/check.md +0 -50
  184. package/claude-assets/commands/verify/start.md +0 -128
  185. package/claude-assets/commands/workflow.js +0 -606
  186. package/claude-assets/commands/workflows/README.md +0 -9
  187. package/claude-assets/commands/workflows/development.md +0 -78
  188. package/claude-assets/commands/workflows/research.md +0 -63
  189. package/claude-assets/commands/workflows/workflow-create.md +0 -25
  190. package/claude-assets/commands/workflows/workflow-execute.md +0 -25
  191. package/claude-assets/commands/workflows/workflow-export.md +0 -25
  192. package/claude-assets/hooks/post-edit.config.json +0 -12
  193. package/claude-assets/skills/team-provider-routing/spawn-worker.sh +0 -91
@@ -1,237 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * CLAUDE.md Slash Command
5
- *
6
- * Simple wrapper around the existing CLAUDE.md generator with NPX protection
7
- * Keeps it focused and lightweight - no bloat!
8
- */
9
-
10
- import { ClaudeMdGenerator } from '../language/claude-md-generator.js';
11
- import { LanguageDetector } from '../language/language-detector.js';
12
- import fs from 'fs/promises';
13
- import path from 'path';
14
-
15
- export class ClaudeMdSlashCommand {
16
- constructor(projectPath = process.cwd()) {
17
- this.projectPath = projectPath;
18
- this.claudeMdPath = path.join(projectPath, 'CLAUDE.md');
19
- this.copyToMainPath = path.join(projectPath, 'claude-copy-to-main.md');
20
- }
21
-
22
- /**
23
- * Main slash command execution
24
- */
25
- async execute(options = {}) {
26
- const {
27
- backup = true,
28
- preview = false,
29
- force = false,
30
- isNpxInstall = false
31
- } = options;
32
-
33
- try {
34
- console.log('🚀 Generating CLAUDE.md...');
35
-
36
- // Step 1: Detect if this is an NPX install scenario
37
- const existingClaudeExists = await this.fileExists(this.claudeMdPath);
38
- const shouldUseNpxProtection = isNpxInstall && existingClaudeExists;
39
-
40
- // Step 2: Generate content using existing system
41
- const generator = new ClaudeMdGenerator(this.projectPath, {
42
- backupExisting: backup && !shouldUseNpxProtection,
43
- preserveCustomSections: true
44
- });
45
-
46
- const newContent = await generator.generateClaudeMd();
47
-
48
- // Step 3: Handle NPX protection
49
- if (shouldUseNpxProtection) {
50
- await this.handleNpxProtection(newContent);
51
- return {
52
- success: true,
53
- action: 'npx-protection',
54
- file: 'claude-copy-to-main.md',
55
- message: 'Generated claude-copy-to-main.md to protect your existing CLAUDE.md'
56
- };
57
- }
58
-
59
- // Step 4: Handle preview mode
60
- if (preview) {
61
- return {
62
- success: true,
63
- action: 'preview',
64
- content: newContent,
65
- message: 'Preview generated successfully'
66
- };
67
- }
68
-
69
- // Step 5: Handle force/confirmation for existing files
70
- if (existingClaudeExists && !force) {
71
- const shouldOverwrite = await this.confirmOverwrite();
72
- if (!shouldOverwrite) {
73
- return {
74
- success: false,
75
- action: 'cancelled',
76
- message: 'Generation cancelled by user'
77
- };
78
- }
79
- }
80
-
81
- // Step 6: Write the file
82
- await fs.writeFile(this.claudeMdPath, newContent, 'utf8');
83
-
84
- console.log('✅ CLAUDE.md generated successfully');
85
- return {
86
- success: true,
87
- action: 'generated',
88
- file: 'CLAUDE.md',
89
- length: newContent.length
90
- };
91
-
92
- } catch (error) {
93
- console.error('❌ CLAUDE.md generation failed:', error.message);
94
- return {
95
- success: false,
96
- action: 'error',
97
- error: error.message
98
- };
99
- }
100
- }
101
-
102
- /**
103
- * NPX Protection: Generate claude-copy-to-main.md instead of overwriting
104
- */
105
- async handleNpxProtection(newContent) {
106
- const protectedContent = this.createProtectedContent(newContent);
107
-
108
- await fs.writeFile(this.copyToMainPath, protectedContent, 'utf8');
109
-
110
- console.log('🛡️ NPX Protection Activated');
111
- console.log('📄 Generated: claude-copy-to-main.md');
112
- console.log('💡 Your existing CLAUDE.md is protected from overwrite');
113
- console.log('🔄 Review and merge changes manually as needed');
114
- }
115
-
116
- /**
117
- * Create content for the protected file with merge instructions
118
- */
119
- createProtectedContent(newContent) {
120
- return `# 🛡️ NPX-Protected CLAUDE.md Content
121
-
122
- ## 📋 Merge Instructions
123
-
124
- This file was generated because you have an existing CLAUDE.md file.
125
- To protect your customizations from being overwritten by NPX installs,
126
- the new content is provided here for manual review and merging.
127
-
128
- ### 🔄 How to Merge:
129
- 1. Review the content below
130
- 2. Copy sections you want to your main CLAUDE.md
131
- 3. Delete this file when done
132
- 4. Your customizations remain safe!
133
-
134
- ---
135
-
136
- # Generated CLAUDE.md Content
137
-
138
- ${newContent}
139
-
140
- ---
141
-
142
- ## 🗑️ Cleanup
143
- Delete this file after merging: \`rm claude-copy-to-main.md\`
144
- `;
145
- }
146
-
147
- /**
148
- * Simple confirmation prompt for overwriting existing files
149
- */
150
- async confirmOverwrite() {
151
- // In a real implementation, this would use readline or similar
152
- // For now, return true (could be enhanced with proper prompting)
153
- console.log('⚠️ CLAUDE.md exists. Use --force to overwrite or --preview to see changes.');
154
- return false;
155
- }
156
-
157
- /**
158
- * Check if file exists
159
- */
160
- async fileExists(filePath) {
161
- try {
162
- await fs.access(filePath);
163
- return true;
164
- } catch {
165
- return false;
166
- }
167
- }
168
-
169
- /**
170
- * Show preview of what would be generated
171
- */
172
- async showPreview() {
173
- const result = await this.execute({ preview: true });
174
-
175
- if (result.success) {
176
- console.log('📄 CLAUDE.md Preview:');
177
- console.log('━'.repeat(50));
178
- console.log(result.content.substring(0, 1000) + '...');
179
- console.log('━'.repeat(50));
180
- console.log(`📊 Total length: ${result.content.length} characters`);
181
- }
182
-
183
- return result;
184
- }
185
-
186
- /**
187
- * Auto-detect project and suggest generation
188
- */
189
- async autoDetectAndSuggest() {
190
- const detector = new LanguageDetector(this.projectPath);
191
- const detection = await detector.detectProject();
192
-
193
- console.log('🔍 Project Detection Results:');
194
- console.log(` Type: ${detection.projectType}`);
195
- console.log(` Confidence: ${(detection.confidence * 100).toFixed(1)}%`);
196
-
197
- if (detection.confidence > 0.7) {
198
- console.log('💡 High confidence - CLAUDE.md generation recommended');
199
- return true;
200
- } else {
201
- console.log('⚠️ Low confidence - manual review recommended');
202
- return false;
203
- }
204
- }
205
- }
206
-
207
- /**
208
- * CLI Interface for slash command
209
- */
210
- export async function executeClaudeMdCommand(args = {}) {
211
- const command = new ClaudeMdSlashCommand();
212
-
213
- // Handle different command modes
214
- if (args.preview) {
215
- return await command.showPreview();
216
- }
217
-
218
- if (args.detect) {
219
- return await command.autoDetectAndSuggest();
220
- }
221
-
222
- // Default: generate CLAUDE.md
223
- return await command.execute(args);
224
- }
225
-
226
- // For direct execution
227
- if (import.meta.url === `file://${process.argv[1]}`) {
228
- const args = {
229
- preview: process.argv.includes('--preview'),
230
- force: process.argv.includes('--force'),
231
- backup: !process.argv.includes('--no-backup'),
232
- detect: process.argv.includes('--detect'),
233
- isNpxInstall: process.env.NPX_INSTALL === 'true'
234
- };
235
-
236
- executeClaudeMdCommand(args);
237
- }
@@ -1,28 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * CLAUDE-SOUL.md Slash Command
5
- *
6
- * Interactive questionnaire to create a project soul document.
7
- * Guides users through defining their project's who, what, when, where, why
8
- * to provide context for AI agents when they hit roadblocks.
9
- * Document size: 250-500 words focusing on project essence and decision context.
10
- */
11
-
12
- // Import from the main implementation
13
- import { executeClaudeSoulCommand } from '../../src/slash-commands/claude-soul.js';
14
-
15
- // Parse arguments
16
- const args = {
17
- preview: process.argv.includes('--preview'),
18
- force: process.argv.includes('--force'),
19
- backup: !process.argv.includes('--no-backup'),
20
- interactive: !process.argv.includes('--no-interactive'),
21
- help: process.argv.includes('--help') || process.argv.includes('-h')
22
- };
23
-
24
- // Execute the command
25
- executeClaudeSoulCommand(args).catch(error => {
26
- console.error('Error:', error.message);
27
- process.exit(1);
28
- });
@@ -1,216 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * CLI Integration for Slash Commands
5
- *
6
- * Integrates slash commands with the main CLI system
7
- */
8
-
9
- import { globalRegistry, executeSlashCommand } from './register-all-commands.js';
10
- import { SlashCommand } from '../core/slash-command.js';
11
-
12
- /**
13
- * CLI Slash Command Handler
14
- */
15
- export class CliSlashHandler {
16
- constructor() {
17
- this.registry = globalRegistry;
18
- }
19
-
20
- /**
21
- * Handle CLI input and execute slash commands
22
- * @param {string[]} args - CLI arguments
23
- */
24
- async handleCliInput(args) {
25
- if (args.length === 0) {
26
- this.showHelp();
27
- return;
28
- }
29
-
30
- const command = args[0];
31
-
32
- // Handle help commands
33
- if (command === 'help' || command === '--help' || command === '-h') {
34
- if (args.length > 1) {
35
- this.showCommandHelp(args[1]);
36
- } else {
37
- this.showHelp();
38
- }
39
- return;
40
- }
41
-
42
- // Handle list commands
43
- if (command === 'list' || command === 'ls') {
44
- this.listCommands();
45
- return;
46
- }
47
-
48
- // Execute slash command
49
- const slashCommand = `/${command}`;
50
- const slashArgs = args.slice(1);
51
- const input = `${slashCommand} ${slashArgs.join(' ')}`.trim();
52
-
53
- try {
54
- const result = await executeSlashCommand(input);
55
-
56
- if (result.success) {
57
- if (result.result && result.result.prompt) {
58
- console.log(result.result.prompt);
59
- } else {
60
- console.log('✅ Command executed successfully');
61
- if (result.result) {
62
- console.log(JSON.stringify(result.result, null, 2));
63
- }
64
- }
65
- } else {
66
- console.error(`❌ ${result.error}`);
67
- if (result.suggestions && result.suggestions.length > 0) {
68
- console.log(`Did you mean: ${result.suggestions.join(', ')}?`);
69
- }
70
- }
71
- } catch (error) {
72
- console.error(`❌ CLI Error: ${error.message}`);
73
- }
74
- }
75
-
76
- /**
77
- * Show general help
78
- */
79
- showHelp() {
80
- console.log(this.registry.generateHelpText());
81
- }
82
-
83
- /**
84
- * Show help for specific command
85
- * @param {string} commandName - Command name
86
- */
87
- showCommandHelp(commandName) {
88
- const helpResult = this.registry.getHelp(commandName);
89
-
90
- if (helpResult.success) {
91
- const help = helpResult.help;
92
- console.log(`
93
- 🚀 **${help.name.toUpperCase()} COMMAND**
94
- `);
95
- console.log(`**Description:** ${help.description}`);
96
- console.log(`**Usage:** ${help.usage}`);
97
-
98
- if (help.examples && help.examples.length > 0) {
99
- console.log(`
100
- **Examples:**`);
101
- help.examples.forEach(example => {
102
- console.log(` ${example}`);
103
- });
104
- }
105
- } else {
106
- console.error(`❌ ${helpResult.error}`);
107
- }
108
- }
109
-
110
- /**
111
- * List all available commands
112
- */
113
- listCommands() {
114
- const commands = this.registry.listCommands();
115
-
116
- console.log('
117
- 🚀 **AVAILABLE SLASH COMMANDS**
118
- ');
119
-
120
- commands.forEach(cmd => {
121
- console.log(`/${cmd.name} - ${cmd.description}`);
122
- if (cmd.aliases.length > 0) {
123
- console.log(` Aliases: ${cmd.aliases.map(a => `/${a}`).join(', ')}`);
124
- }
125
- });
126
-
127
- console.log(`
128
- Total: ${commands.length} commands available`);
129
- }
130
- }
131
-
132
- /**
133
- * Interactive CLI mode
134
- */
135
- export class InteractiveCliMode {
136
- constructor() {
137
- this.handler = new CliSlashHandler();
138
- this.running = false;
139
- }
140
-
141
- /**
142
- * Start interactive mode
143
- */
144
- async start() {
145
- this.running = true;
146
-
147
- console.log('🚀 Claude-Flow Interactive Slash Command Mode');
148
- console.log('Type commands without the leading "/" or "help" for assistance');
149
- console.log('Type "exit" to quit\n');
150
-
151
- // Note: In a real implementation, you would use readline or similar
152
- // This is a simplified version for demonstration
153
- process.stdin.setEncoding('utf8');
154
-
155
- process.stdin.on('readable', async () => {
156
- const chunk = process.stdin.read();
157
- if (chunk !== null) {
158
- const input = chunk.trim();
159
-
160
- if (input === 'exit' || input === 'quit') {
161
- this.stop();
162
- return;
163
- }
164
-
165
- if (input) {
166
- const args = input.split(' ');
167
- await this.handler.handleCliInput(args);
168
- }
169
-
170
- if (this.running) {
171
- process.stdout.write('claude-flow> ');
172
- }
173
- }
174
- });
175
-
176
- process.stdout.write('claude-flow> ');
177
- }
178
-
179
- /**
180
- * Stop interactive mode
181
- */
182
- stop() {
183
- this.running = false;
184
- console.log('\n👋 Goodbye!');
185
- process.exit(0);
186
- }
187
- }
188
-
189
- /**
190
- * Main CLI entry point
191
- * @param {string[]} args - Command line arguments
192
- */
193
- export async function runCliSlashCommands(args = process.argv.slice(2)) {
194
- const handler = new CliSlashHandler();
195
-
196
- // Check for interactive mode
197
- if (args.includes('--interactive') || args.includes('-i')) {
198
- const interactive = new InteractiveCliMode();
199
- await interactive.start();
200
- return;
201
- }
202
-
203
- // Handle standard CLI input
204
- await handler.handleCliInput(args);
205
- }
206
-
207
- // Auto-run if this script is executed directly
208
- if (import.meta.url === `file://${process.argv[1]}`) {
209
- runCliSlashCommands();
210
- }
211
-
212
- export default {
213
- CliSlashHandler,
214
- InteractiveCliMode,
215
- runCliSlashCommands
216
- };
@@ -1,9 +0,0 @@
1
- # Coordination Commands
2
-
3
- Commands for coordination operations in Claude Flow.
4
-
5
- ## Available Commands
6
-
7
- - [swarm-init](./swarm-init.md)
8
- - [agent-spawn](./agent-spawn.md)
9
- - [task-orchestrate](./task-orchestrate.md)
@@ -1,25 +0,0 @@
1
- # agent-spawn
2
-
3
- Spawn a new agent in the current swarm.
4
-
5
- ## Usage
6
- ```bash
7
- npx cfn-spawn agent spawn [options]
8
- ```
9
-
10
- ## Options
11
- - `--type <type>` - Agent type (coder, researcher, analyst, tester, coordinator)
12
- - `--name <name>` - Custom agent name
13
- - `--skills <list>` - Specific skills (comma-separated)
14
-
15
- ## Examples
16
- ```bash
17
- # Spawn coder agent
18
- npx cfn-spawn agent spawn --type coder
19
-
20
- # With custom name
21
- npx cfn-spawn agent spawn --type researcher --name "API Expert"
22
-
23
- # With specific skills
24
- npx cfn-spawn agent spawn --type coder --skills "python,fastapi,testing"
25
- ```
@@ -1,88 +0,0 @@
1
- # Agent Coordination System
2
-
3
- ## Overview
4
- The Claude-Flow coordination system manages multiple AI agents working together on complex tasks. It provides intelligent task distribution, resource management, and inter-agent communication.
5
-
6
- ## Agent Types and Capabilities
7
- - **Researcher**: Web search, information gathering, knowledge synthesis
8
- - **Coder**: Code analysis, development, debugging, testing
9
- - **Analyst**: Data processing, pattern recognition, insights generation
10
- - **Coordinator**: Task planning, resource allocation, workflow management
11
- - **General**: Multi-purpose agent with balanced capabilities
12
-
13
- ## Task Management
14
- - **Priority Levels**: 1 (lowest) to 10 (highest)
15
- - **Dependencies**: Tasks can depend on completion of other tasks
16
- - **Parallel Execution**: Independent tasks run concurrently
17
- - **Load Balancing**: Automatic distribution based on agent capacity
18
-
19
- ## Coordination Commands
20
- ```bash
21
- # Agent Management
22
- npx cfn-spawn agent spawn <type> --name <name> --priority <1-10>
23
- npx cfn-spawn agent list
24
- npx cfn-spawn agent info <agent-id>
25
- npx cfn-spawn agent terminate <agent-id>
26
-
27
- # Task Management
28
- npx claude-flow-novice task create <type> <description> --priority <1-10> --deps <task-ids>
29
- npx claude-flow-novice task list --verbose
30
- npx claude-flow-novice task status <task-id>
31
- npx claude-flow-novice task cancel <task-id>
32
-
33
- # System Monitoring
34
- npx claude-flow-novice status --verbose
35
- npx claude-flow-novice monitor --interval 5000
36
- ```
37
-
38
- ## Workflow Execution
39
- Workflows are defined in JSON format and can orchestrate complex multi-agent operations:
40
- ```bash
41
- npx claude-flow-novice workflow examples/research-workflow.json
42
- npx claude-flow-novice workflow examples/development-config.json --async
43
- ```
44
-
45
- ## Advanced Features
46
- - **Circuit Breakers**: Automatic failure handling and recovery
47
- - **Work Stealing**: Dynamic load redistribution for efficiency
48
- - **Resource Limits**: Memory and CPU usage constraints
49
- - **Metrics Collection**: Performance monitoring and optimization
50
-
51
- ## Configuration
52
- Coordination settings in `claude-flow.config.json`:
53
- ```json
54
- {
55
- "orchestrator": {
56
- "maxConcurrentTasks": 10,
57
- "taskTimeout": 300000,
58
- "defaultPriority": 5
59
- },
60
- "agents": {
61
- "maxAgents": 20,
62
- "defaultCapabilities": ["research", "code", "terminal"],
63
- "resourceLimits": {
64
- "memory": "1GB",
65
- "cpu": "50%"
66
- }
67
- }
68
- }
69
- ```
70
-
71
- ## Communication Patterns
72
- - **Direct Messaging**: Agent-to-agent communication
73
- - **Event Broadcasting**: System-wide notifications
74
- - **Shared Memory**: Common information access
75
- - **Task Handoff**: Seamless work transfer between agents
76
-
77
- ## Best Practices
78
- - Start with general agents and specialize as needed
79
- - Use descriptive task names and clear requirements
80
- - Monitor system resources during heavy workloads
81
- - Implement proper error handling in workflows
82
- - Regular cleanup of completed tasks and inactive agents
83
-
84
- ## Troubleshooting
85
- - Check agent health with `npx claude-flow-novice status`
86
- - View detailed logs with `npx claude-flow-novice monitor`
87
- - Restart stuck agents with terminate/spawn cycle
88
- - Use `--verbose` flags for detailed diagnostic information
@@ -1,44 +0,0 @@
1
- # Initialize Coordination Framework
2
-
3
- ## 🎯 Key Principle
4
- **This tool coordinates Claude Code's actions. It does NOT write code or create content.**
5
-
6
- ## MCP Tool Usage in Claude Code
7
-
8
- **Tool:** `mcp__claude-flow__swarm_init`
9
-
10
- ## Parameters
11
- ```json
12
- {"topology": "mesh", "maxAgents": 5, "strategy": "balanced"}
13
- ```
14
-
15
- ## Description
16
- Set up a coordination topology to guide Claude Code's approach to complex tasks
17
-
18
- ## Details
19
- This tool creates a coordination framework that helps Claude Code:
20
- - Break down complex problems systematically
21
- - Approach tasks from multiple perspectives
22
- - Maintain consistency across large projects
23
- - Work more efficiently through structured coordination
24
-
25
- Remember: This does NOT create actual coding agents. It creates a coordination pattern for Claude Code to follow.
26
-
27
- ## Example Usage
28
-
29
- **In Claude Code:**
30
- 1. Use the tool: `mcp__claude-flow__swarm_init`
31
- 2. With parameters: `{"topology": "mesh", "maxAgents": 5, "strategy": "balanced"}`
32
- 3. Claude Code then executes the coordinated plan using its native tools
33
-
34
- ## Important Reminders
35
- - ✅ This tool provides coordination and structure
36
- - ✅ Claude Code performs all actual implementation
37
- - ❌ The tool does NOT write code
38
- - ❌ The tool does NOT access files directly
39
- - ❌ The tool does NOT execute commands
40
-
41
- ## See Also
42
- - Main documentation: /claude.md
43
- - Other commands in this category
44
- - Workflow examples in /workflows/
@@ -1,43 +0,0 @@
1
- # Coordinate Task Execution
2
-
3
- ## 🎯 Key Principle
4
- **This tool coordinates Claude Code's actions. It does NOT write code or create content.**
5
-
6
- ## MCP Tool Usage in Claude Code
7
-
8
- **Tool:** `mcp__claude-flow__task_orchestrate`
9
-
10
- ## Parameters
11
- ```json
12
- {"task": "Implement authentication system", "strategy": "parallel", "priority": "high"}
13
- ```
14
-
15
- ## Description
16
- Break down and coordinate complex tasks for systematic execution by Claude Code
17
-
18
- ## Details
19
- Orchestration strategies:
20
- - **parallel**: Claude Code works on independent components simultaneously
21
- - **sequential**: Step-by-step execution for dependent tasks
22
- - **adaptive**: Dynamically adjusts based on task complexity
23
-
24
- The orchestrator creates a plan that Claude Code follows using its native tools.
25
-
26
- ## Example Usage
27
-
28
- **In Claude Code:**
29
- 1. Use the tool: `mcp__claude-flow__task_orchestrate`
30
- 2. With parameters: `{"task": "Implement authentication system", "strategy": "parallel", "priority": "high"}`
31
- 3. Claude Code then executes the coordinated plan using its native tools
32
-
33
- ## Important Reminders
34
- - ✅ This tool provides coordination and structure
35
- - ✅ Claude Code performs all actual implementation
36
- - ❌ The tool does NOT write code
37
- - ❌ The tool does NOT access files directly
38
- - ❌ The tool does NOT execute commands
39
-
40
- ## See Also
41
- - Main documentation: /claude.md
42
- - Other commands in this category
43
- - Workflow examples in /workflows/