claude-flow 2.0.0-alpha.69 → 2.0.0-alpha.70

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 (72) hide show
  1. package/.claude/commands/analysis/README.md +9 -0
  2. package/.claude/commands/analysis/bottleneck-detect.md +162 -0
  3. package/.claude/commands/analysis/performance-report.md +25 -0
  4. package/.claude/commands/analysis/token-usage.md +25 -0
  5. package/.claude/commands/automation/README.md +9 -0
  6. package/.claude/commands/automation/auto-agent.md +122 -0
  7. package/.claude/commands/automation/smart-spawn.md +25 -0
  8. package/.claude/commands/automation/workflow-select.md +25 -0
  9. package/.claude/commands/coordination/README.md +9 -0
  10. package/.claude/commands/coordination/agent-spawn.md +25 -0
  11. package/.claude/commands/coordination/swarm-init.md +85 -0
  12. package/.claude/commands/coordination/task-orchestrate.md +25 -0
  13. package/.claude/commands/github/README.md +11 -0
  14. package/.claude/commands/github/code-review.md +25 -0
  15. package/.claude/commands/github/github-swarm.md +121 -0
  16. package/.claude/commands/github/issue-triage.md +25 -0
  17. package/.claude/commands/github/pr-enhance.md +26 -0
  18. package/.claude/commands/github/repo-analyze.md +25 -0
  19. package/.claude/commands/hooks/README.md +11 -0
  20. package/.claude/commands/hooks/post-edit.md +117 -0
  21. package/.claude/commands/hooks/post-task.md +112 -0
  22. package/.claude/commands/hooks/pre-edit.md +113 -0
  23. package/.claude/commands/hooks/pre-task.md +111 -0
  24. package/.claude/commands/hooks/session-end.md +118 -0
  25. package/.claude/commands/memory/README.md +9 -0
  26. package/.claude/commands/memory/memory-persist.md +25 -0
  27. package/.claude/commands/memory/memory-search.md +25 -0
  28. package/.claude/commands/memory/memory-usage.md +25 -0
  29. package/.claude/commands/monitoring/README.md +9 -0
  30. package/.claude/commands/monitoring/agent-metrics.md +25 -0
  31. package/.claude/commands/monitoring/real-time-view.md +25 -0
  32. package/.claude/commands/monitoring/swarm-monitor.md +25 -0
  33. package/.claude/commands/optimization/README.md +9 -0
  34. package/.claude/commands/optimization/cache-manage.md +25 -0
  35. package/.claude/commands/optimization/parallel-execute.md +25 -0
  36. package/.claude/commands/optimization/topology-optimize.md +25 -0
  37. package/.claude/commands/sparc/architect.md +51 -24
  38. package/.claude/commands/sparc/ask.md +97 -0
  39. package/.claude/commands/sparc/code.md +89 -0
  40. package/.claude/commands/sparc/debug.md +83 -0
  41. package/.claude/commands/sparc/devops.md +109 -0
  42. package/.claude/commands/sparc/docs-writer.md +80 -0
  43. package/.claude/commands/sparc/integration.md +83 -0
  44. package/.claude/commands/sparc/mcp.md +117 -0
  45. package/.claude/commands/sparc/post-deployment-monitoring-mode.md +83 -0
  46. package/.claude/commands/sparc/refinement-optimization-mode.md +83 -0
  47. package/.claude/commands/sparc/security-review.md +80 -0
  48. package/.claude/commands/sparc/sparc.md +111 -0
  49. package/.claude/commands/sparc/spec-pseudocode.md +80 -0
  50. package/.claude/commands/sparc/supabase-admin.md +348 -0
  51. package/.claude/commands/sparc/tdd.md +59 -30
  52. package/.claude/commands/sparc/tutorial.md +79 -0
  53. package/.claude/commands/sparc.md +166 -0
  54. package/.claude/commands/training/README.md +9 -0
  55. package/.claude/commands/training/model-update.md +25 -0
  56. package/.claude/commands/training/neural-train.md +25 -0
  57. package/.claude/commands/training/pattern-learn.md +25 -0
  58. package/.claude/commands/workflows/README.md +9 -0
  59. package/.claude/commands/workflows/workflow-create.md +25 -0
  60. package/.claude/commands/workflows/workflow-execute.md +25 -0
  61. package/.claude/commands/workflows/workflow-export.md +25 -0
  62. package/.claude/helpers/github-setup.sh +28 -0
  63. package/.claude/helpers/quick-start.sh +19 -0
  64. package/.claude/helpers/setup-mcp.sh +18 -0
  65. package/.claude/settings.json +9 -29
  66. package/.claude/settings.local.json +7 -4
  67. package/CHANGELOG.md +14 -0
  68. package/bin/claude-flow +1 -1
  69. package/package.json +1 -1
  70. package/src/cli/help-text.js +1 -1
  71. package/src/cli/simple-cli.js +1 -1
  72. package/src/cli/simple-commands/init/templates/settings.json +4 -4
@@ -0,0 +1,9 @@
1
+ # Analysis Commands
2
+
3
+ Commands for analysis operations in Claude Flow.
4
+
5
+ ## Available Commands
6
+
7
+ - [bottleneck-detect](./bottleneck-detect.md)
8
+ - [token-usage](./token-usage.md)
9
+ - [performance-report](./performance-report.md)
@@ -0,0 +1,162 @@
1
+ # bottleneck detect
2
+
3
+ Analyze performance bottlenecks in swarm operations and suggest optimizations.
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ npx claude-flow bottleneck detect [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ - `--swarm-id, -s <id>` - Analyze specific swarm (default: current)
14
+ - `--time-range, -t <range>` - Analysis period: 1h, 24h, 7d, all (default: 1h)
15
+ - `--threshold <percent>` - Bottleneck threshold percentage (default: 20)
16
+ - `--export, -e <file>` - Export analysis to file
17
+ - `--fix` - Apply automatic optimizations
18
+
19
+ ## Examples
20
+
21
+ ### Basic bottleneck detection
22
+
23
+ ```bash
24
+ npx claude-flow bottleneck detect
25
+ ```
26
+
27
+ ### Analyze specific swarm
28
+
29
+ ```bash
30
+ npx claude-flow bottleneck detect --swarm-id swarm-123
31
+ ```
32
+
33
+ ### Last 24 hours with export
34
+
35
+ ```bash
36
+ npx claude-flow bottleneck detect -t 24h -e bottlenecks.json
37
+ ```
38
+
39
+ ### Auto-fix detected issues
40
+
41
+ ```bash
42
+ npx claude-flow bottleneck detect --fix --threshold 15
43
+ ```
44
+
45
+ ## Metrics Analyzed
46
+
47
+ ### Communication Bottlenecks
48
+
49
+ - Message queue delays
50
+ - Agent response times
51
+ - Coordination overhead
52
+ - Memory access patterns
53
+
54
+ ### Processing Bottlenecks
55
+
56
+ - Task completion times
57
+ - Agent utilization rates
58
+ - Parallel execution efficiency
59
+ - Resource contention
60
+
61
+ ### Memory Bottlenecks
62
+
63
+ - Cache hit rates
64
+ - Memory access patterns
65
+ - Storage I/O performance
66
+ - Neural pattern loading
67
+
68
+ ### Network Bottlenecks
69
+
70
+ - API call latency
71
+ - MCP communication delays
72
+ - External service timeouts
73
+ - Concurrent request limits
74
+
75
+ ## Output Format
76
+
77
+ ```
78
+ 🔍 Bottleneck Analysis Report
79
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
80
+
81
+ 📊 Summary
82
+ ├── Time Range: Last 1 hour
83
+ ├── Agents Analyzed: 6
84
+ ├── Tasks Processed: 42
85
+ └── Critical Issues: 2
86
+
87
+ 🚨 Critical Bottlenecks
88
+ 1. Agent Communication (35% impact)
89
+ └── coordinator → coder-1 messages delayed by 2.3s avg
90
+
91
+ 2. Memory Access (28% impact)
92
+ └── Neural pattern loading taking 1.8s per access
93
+
94
+ ⚠️ Warning Bottlenecks
95
+ 1. Task Queue (18% impact)
96
+ └── 5 tasks waiting > 10s for assignment
97
+
98
+ 💡 Recommendations
99
+ 1. Switch to hierarchical topology (est. 40% improvement)
100
+ 2. Enable memory caching (est. 25% improvement)
101
+ 3. Increase agent concurrency to 8 (est. 20% improvement)
102
+
103
+ ✅ Quick Fixes Available
104
+ Run with --fix to apply:
105
+ - Enable smart caching
106
+ - Optimize message routing
107
+ - Adjust agent priorities
108
+ ```
109
+
110
+ ## Automatic Fixes
111
+
112
+ When using `--fix`, the following optimizations may be applied:
113
+
114
+ 1. **Topology Optimization**
115
+
116
+ - Switch to more efficient topology
117
+ - Adjust communication patterns
118
+ - Reduce coordination overhead
119
+
120
+ 2. **Caching Enhancement**
121
+
122
+ - Enable memory caching
123
+ - Optimize cache strategies
124
+ - Preload common patterns
125
+
126
+ 3. **Concurrency Tuning**
127
+
128
+ - Adjust agent counts
129
+ - Optimize parallel execution
130
+ - Balance workload distribution
131
+
132
+ 4. **Priority Adjustment**
133
+ - Reorder task queues
134
+ - Prioritize critical paths
135
+ - Reduce wait times
136
+
137
+ ## Performance Impact
138
+
139
+ Typical improvements after bottleneck resolution:
140
+
141
+ - **Communication**: 30-50% faster message delivery
142
+ - **Processing**: 20-40% reduced task completion time
143
+ - **Memory**: 40-60% fewer cache misses
144
+ - **Overall**: 25-45% performance improvement
145
+
146
+ ## Integration with Claude Code
147
+
148
+ ```javascript
149
+ // Check for bottlenecks in Claude Code
150
+ mcp__claude-flow__bottleneck_detect {
151
+ timeRange: "1h",
152
+ threshold: 20,
153
+ autoFix: false
154
+ }
155
+ ```
156
+
157
+ ## See Also
158
+
159
+ - `performance report` - Detailed performance analysis
160
+ - `token usage` - Token optimization analysis
161
+ - `swarm monitor` - Real-time monitoring
162
+ - `cache manage` - Cache optimization
@@ -0,0 +1,25 @@
1
+ # performance-report
2
+
3
+ Generate comprehensive performance reports for swarm operations.
4
+
5
+ ## Usage
6
+ ```bash
7
+ npx claude-flow analysis performance-report [options]
8
+ ```
9
+
10
+ ## Options
11
+ - `--format <type>` - Report format (json, html, markdown)
12
+ - `--include-metrics` - Include detailed metrics
13
+ - `--compare <id>` - Compare with previous swarm
14
+
15
+ ## Examples
16
+ ```bash
17
+ # Generate HTML report
18
+ npx claude-flow analysis performance-report --format html
19
+
20
+ # Compare swarms
21
+ npx claude-flow analysis performance-report --compare swarm-123
22
+
23
+ # Full metrics report
24
+ npx claude-flow analysis performance-report --include-metrics --format markdown
25
+ ```
@@ -0,0 +1,25 @@
1
+ # token-usage
2
+
3
+ Analyze token usage patterns and optimize for efficiency.
4
+
5
+ ## Usage
6
+ ```bash
7
+ npx claude-flow analysis token-usage [options]
8
+ ```
9
+
10
+ ## Options
11
+ - `--period <time>` - Analysis period (1h, 24h, 7d, 30d)
12
+ - `--by-agent` - Break down by agent
13
+ - `--by-operation` - Break down by operation type
14
+
15
+ ## Examples
16
+ ```bash
17
+ # Last 24 hours token usage
18
+ npx claude-flow analysis token-usage --period 24h
19
+
20
+ # By agent breakdown
21
+ npx claude-flow analysis token-usage --by-agent
22
+
23
+ # Export detailed report
24
+ npx claude-flow analysis token-usage --period 7d --export tokens.csv
25
+ ```
@@ -0,0 +1,9 @@
1
+ # Automation Commands
2
+
3
+ Commands for automation operations in Claude Flow.
4
+
5
+ ## Available Commands
6
+
7
+ - [auto-agent](./auto-agent.md)
8
+ - [smart-spawn](./smart-spawn.md)
9
+ - [workflow-select](./workflow-select.md)
@@ -0,0 +1,122 @@
1
+ # auto agent
2
+
3
+ Automatically spawn and manage agents based on task requirements.
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ npx claude-flow auto agent [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ - `--task, -t <description>` - Task description for agent analysis
14
+ - `--max-agents, -m <number>` - Maximum agents to spawn (default: auto)
15
+ - `--min-agents <number>` - Minimum agents required (default: 1)
16
+ - `--strategy, -s <type>` - Selection strategy: optimal, minimal, balanced
17
+ - `--no-spawn` - Analyze only, don't spawn agents
18
+
19
+ ## Examples
20
+
21
+ ### Basic auto-spawning
22
+
23
+ ```bash
24
+ npx claude-flow auto agent --task "Build a REST API with authentication"
25
+ ```
26
+
27
+ ### Constrained spawning
28
+
29
+ ```bash
30
+ npx claude-flow auto agent -t "Debug performance issue" --max-agents 3
31
+ ```
32
+
33
+ ### Analysis only
34
+
35
+ ```bash
36
+ npx claude-flow auto agent -t "Refactor codebase" --no-spawn
37
+ ```
38
+
39
+ ### Minimal strategy
40
+
41
+ ```bash
42
+ npx claude-flow auto agent -t "Fix bug in login" -s minimal
43
+ ```
44
+
45
+ ## How It Works
46
+
47
+ 1. **Task Analysis**
48
+
49
+ - Parses task description
50
+ - Identifies required skills
51
+ - Estimates complexity
52
+ - Determines parallelization opportunities
53
+
54
+ 2. **Agent Selection**
55
+
56
+ - Matches skills to agent types
57
+ - Considers task dependencies
58
+ - Optimizes for efficiency
59
+ - Respects constraints
60
+
61
+ 3. **Topology Selection**
62
+
63
+ - Chooses optimal swarm structure
64
+ - Configures communication patterns
65
+ - Sets up coordination rules
66
+ - Enables monitoring
67
+
68
+ 4. **Automatic Spawning**
69
+ - Creates selected agents
70
+ - Assigns specific roles
71
+ - Distributes subtasks
72
+ - Initiates coordination
73
+
74
+ ## Agent Types Selected
75
+
76
+ - **Architect**: System design, architecture decisions
77
+ - **Coder**: Implementation, code generation
78
+ - **Tester**: Test creation, quality assurance
79
+ - **Analyst**: Performance, optimization
80
+ - **Researcher**: Documentation, best practices
81
+ - **Coordinator**: Task management, progress tracking
82
+
83
+ ## Strategies
84
+
85
+ ### Optimal
86
+
87
+ - Maximum efficiency
88
+ - May spawn more agents
89
+ - Best for complex tasks
90
+ - Highest resource usage
91
+
92
+ ### Minimal
93
+
94
+ - Minimum viable agents
95
+ - Conservative approach
96
+ - Good for simple tasks
97
+ - Lowest resource usage
98
+
99
+ ### Balanced
100
+
101
+ - Middle ground
102
+ - Adaptive to complexity
103
+ - Default strategy
104
+ - Good performance/resource ratio
105
+
106
+ ## Integration with Claude Code
107
+
108
+ ```javascript
109
+ // In Claude Code after auto-spawning
110
+ mcp__claude-flow__auto_agent {
111
+ task: "Build authentication system",
112
+ strategy: "balanced",
113
+ maxAgents: 6
114
+ }
115
+ ```
116
+
117
+ ## See Also
118
+
119
+ - `agent spawn` - Manual agent creation
120
+ - `swarm init` - Initialize swarm manually
121
+ - `smart spawn` - Intelligent agent spawning
122
+ - `workflow select` - Choose predefined workflows
@@ -0,0 +1,25 @@
1
+ # smart-spawn
2
+
3
+ Intelligently spawn agents based on workload analysis.
4
+
5
+ ## Usage
6
+ ```bash
7
+ npx claude-flow automation smart-spawn [options]
8
+ ```
9
+
10
+ ## Options
11
+ - `--analyze` - Analyze before spawning
12
+ - `--threshold <n>` - Spawn threshold
13
+ - `--topology <type>` - Preferred topology
14
+
15
+ ## Examples
16
+ ```bash
17
+ # Smart spawn with analysis
18
+ npx claude-flow automation smart-spawn --analyze
19
+
20
+ # Set spawn threshold
21
+ npx claude-flow automation smart-spawn --threshold 5
22
+
23
+ # Force topology
24
+ npx claude-flow automation smart-spawn --topology hierarchical
25
+ ```
@@ -0,0 +1,25 @@
1
+ # workflow-select
2
+
3
+ Automatically select optimal workflow based on task type.
4
+
5
+ ## Usage
6
+ ```bash
7
+ npx claude-flow automation workflow-select [options]
8
+ ```
9
+
10
+ ## Options
11
+ - `--task <description>` - Task description
12
+ - `--constraints <list>` - Workflow constraints
13
+ - `--preview` - Preview without executing
14
+
15
+ ## Examples
16
+ ```bash
17
+ # Select workflow for task
18
+ npx claude-flow automation workflow-select --task "Deploy to production"
19
+
20
+ # With constraints
21
+ npx claude-flow automation workflow-select --constraints "no-downtime,rollback"
22
+
23
+ # Preview mode
24
+ npx claude-flow automation workflow-select --task "Database migration" --preview
25
+ ```
@@ -0,0 +1,9 @@
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)
@@ -0,0 +1,25 @@
1
+ # agent-spawn
2
+
3
+ Spawn a new agent in the current swarm.
4
+
5
+ ## Usage
6
+ ```bash
7
+ npx claude-flow 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 claude-flow agent spawn --type coder
19
+
20
+ # With custom name
21
+ npx claude-flow agent spawn --type researcher --name "API Expert"
22
+
23
+ # With specific skills
24
+ npx claude-flow agent spawn --type coder --skills "python,fastapi,testing"
25
+ ```
@@ -0,0 +1,85 @@
1
+ # swarm init
2
+
3
+ Initialize a Claude Flow swarm with specified topology and configuration.
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ npx claude-flow swarm init [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ - `--topology, -t <type>` - Swarm topology: mesh, hierarchical, ring, star (default: hierarchical)
14
+ - `--max-agents, -m <number>` - Maximum number of agents (default: 8)
15
+ - `--strategy, -s <type>` - Execution strategy: balanced, parallel, sequential (default: parallel)
16
+ - `--auto-spawn` - Automatically spawn agents based on task complexity
17
+ - `--memory` - Enable cross-session memory persistence
18
+ - `--github` - Enable GitHub integration features
19
+
20
+ ## Examples
21
+
22
+ ### Basic initialization
23
+
24
+ ```bash
25
+ npx claude-flow swarm init
26
+ ```
27
+
28
+ ### Mesh topology for research
29
+
30
+ ```bash
31
+ npx claude-flow swarm init --topology mesh --max-agents 5 --strategy balanced
32
+ ```
33
+
34
+ ### Hierarchical for development
35
+
36
+ ```bash
37
+ npx claude-flow swarm init --topology hierarchical --max-agents 10 --strategy parallel --auto-spawn
38
+ ```
39
+
40
+ ### GitHub-focused swarm
41
+
42
+ ```bash
43
+ npx claude-flow swarm init --topology star --github --memory
44
+ ```
45
+
46
+ ## Topologies
47
+
48
+ ### Mesh
49
+
50
+ - All agents connect to all others
51
+ - Best for: Research, exploration, brainstorming
52
+ - Communication: High overhead, maximum information sharing
53
+
54
+ ### Hierarchical
55
+
56
+ - Tree structure with clear command chain
57
+ - Best for: Development, structured tasks, large projects
58
+ - Communication: Efficient, clear responsibilities
59
+
60
+ ### Ring
61
+
62
+ - Agents connect in a circle
63
+ - Best for: Pipeline processing, sequential workflows
64
+ - Communication: Low overhead, ordered processing
65
+
66
+ ### Star
67
+
68
+ - Central coordinator with satellite agents
69
+ - Best for: Simple tasks, centralized control
70
+ - Communication: Minimal overhead, clear coordination
71
+
72
+ ## Integration with Claude Code
73
+
74
+ Once initialized, use MCP tools in Claude Code:
75
+
76
+ ```javascript
77
+ mcp__claude-flow__swarm_init { topology: "hierarchical", maxAgents: 8 }
78
+ ```
79
+
80
+ ## See Also
81
+
82
+ - `agent spawn` - Create swarm agents
83
+ - `task orchestrate` - Coordinate task execution
84
+ - `swarm status` - Check swarm state
85
+ - `swarm monitor` - Real-time monitoring
@@ -0,0 +1,25 @@
1
+ # task-orchestrate
2
+
3
+ Orchestrate complex tasks across the swarm.
4
+
5
+ ## Usage
6
+ ```bash
7
+ npx claude-flow task orchestrate [options]
8
+ ```
9
+
10
+ ## Options
11
+ - `--task <description>` - Task description
12
+ - `--strategy <type>` - Orchestration strategy
13
+ - `--priority <level>` - Task priority (low, medium, high, critical)
14
+
15
+ ## Examples
16
+ ```bash
17
+ # Orchestrate development task
18
+ npx claude-flow task orchestrate --task "Implement user authentication"
19
+
20
+ # High priority task
21
+ npx claude-flow task orchestrate --task "Fix production bug" --priority critical
22
+
23
+ # With specific strategy
24
+ npx claude-flow task orchestrate --task "Refactor codebase" --strategy parallel
25
+ ```
@@ -0,0 +1,11 @@
1
+ # Github Commands
2
+
3
+ Commands for github operations in Claude Flow.
4
+
5
+ ## Available Commands
6
+
7
+ - [github-swarm](./github-swarm.md)
8
+ - [repo-analyze](./repo-analyze.md)
9
+ - [pr-enhance](./pr-enhance.md)
10
+ - [issue-triage](./issue-triage.md)
11
+ - [code-review](./code-review.md)
@@ -0,0 +1,25 @@
1
+ # code-review
2
+
3
+ Automated code review with swarm intelligence.
4
+
5
+ ## Usage
6
+ ```bash
7
+ npx claude-flow github code-review [options]
8
+ ```
9
+
10
+ ## Options
11
+ - `--pr-number <n>` - Pull request to review
12
+ - `--focus <areas>` - Review focus (security, performance, style)
13
+ - `--suggest-fixes` - Suggest code fixes
14
+
15
+ ## Examples
16
+ ```bash
17
+ # Review PR
18
+ npx claude-flow github code-review --pr-number 456
19
+
20
+ # Security focus
21
+ npx claude-flow github code-review --pr-number 456 --focus security
22
+
23
+ # With fix suggestions
24
+ npx claude-flow github code-review --pr-number 456 --suggest-fixes
25
+ ```