claude-flow-novice 1.5.2 → 1.5.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/.claude/agents/SPARSE_LANGUAGE_FINDINGS.md +991 -0
- package/.claude/agents/architecture/system-architect.md +3 -44
- package/.claude/agents/benchmarking-tests/test-agent-code-heavy.md +747 -0
- package/.claude/agents/benchmarking-tests/test-agent-metadata.md +181 -0
- package/.claude/agents/benchmarking-tests/test-agent-minimal.md +67 -0
- package/.claude/agents/data/ml/data-ml-model.md +5 -119
- package/.claude/agents/development/backend/dev-backend-api.md +4 -115
- package/.claude/agents/devops/ci-cd/ops-cicd-github.md +4 -114
- package/.claude/agents/documentation/api-docs/docs-api-openapi.md +4 -113
- package/.claude/agents/github/multi-repo-swarm.md +1 -28
- package/.claude/agents/github/pr-manager.md +1 -29
- package/.claude/agents/github/project-board-sync.md +1 -32
- package/.claude/agents/github/release-manager.md +1 -32
- package/.claude/agents/github/release-swarm.md +1 -33
- package/.claude/agents/github/repo-architect.md +1 -34
- package/.claude/agents/github/swarm-issue.md +1 -26
- package/.claude/agents/github/swarm-pr.md +1 -30
- package/.claude/agents/github/sync-coordinator.md +1 -30
- package/.claude/agents/github/workflow-automation.md +1 -31
- package/.claude/agents/neural/neural-pattern-agent.md +2 -50
- package/.claude/agents/specialized/CODER_AGENT_GUIDELINES.md +1245 -0
- package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +6 -142
- package/.claude/agents/sublinear/consciousness-evolution-agent.md +2 -18
- package/.claude/agents/sublinear/matrix-solver-agent.md +2 -16
- package/.claude/agents/sublinear/nanosecond-scheduler-agent.md +2 -19
- package/.claude/agents/sublinear/pagerank-agent.md +2 -19
- package/.claude/agents/sublinear/phi-calculator-agent.md +2 -19
- package/.claude/agents/sublinear/psycho-symbolic-agent.md +2 -19
- package/.claude/agents/sublinear/sublinear.md +2 -1
- package/.claude/agents/sublinear/temporal-advantage-agent.md +2 -16
- package/.claude/agents/testing/e2e/playwright-agent.md +7 -0
- package/.claude-flow-novice/.claude/agents/SPARSE_LANGUAGE_FINDINGS.md +991 -0
- package/.claude-flow-novice/.claude/agents/architecture/system-architect.md +3 -44
- package/.claude-flow-novice/.claude/agents/benchmarking-tests/test-agent-code-heavy.md +747 -0
- package/.claude-flow-novice/.claude/agents/benchmarking-tests/test-agent-metadata.md +181 -0
- package/.claude-flow-novice/.claude/agents/benchmarking-tests/test-agent-minimal.md +67 -0
- package/.claude-flow-novice/.claude/agents/data/ml/data-ml-model.md +5 -119
- package/.claude-flow-novice/.claude/agents/development/backend/dev-backend-api.md +4 -115
- package/.claude-flow-novice/.claude/agents/devops/ci-cd/ops-cicd-github.md +4 -114
- package/.claude-flow-novice/.claude/agents/documentation/api-docs/docs-api-openapi.md +4 -113
- package/.claude-flow-novice/.claude/agents/github/multi-repo-swarm.md +1 -28
- package/.claude-flow-novice/.claude/agents/github/pr-manager.md +1 -29
- package/.claude-flow-novice/.claude/agents/github/project-board-sync.md +1 -32
- package/.claude-flow-novice/.claude/agents/github/release-manager.md +1 -32
- package/.claude-flow-novice/.claude/agents/github/release-swarm.md +1 -33
- package/.claude-flow-novice/.claude/agents/github/repo-architect.md +1 -34
- package/.claude-flow-novice/.claude/agents/github/swarm-issue.md +1 -26
- package/.claude-flow-novice/.claude/agents/github/swarm-pr.md +1 -30
- package/.claude-flow-novice/.claude/agents/github/sync-coordinator.md +1 -30
- package/.claude-flow-novice/.claude/agents/github/workflow-automation.md +1 -31
- package/.claude-flow-novice/.claude/agents/neural/neural-pattern-agent.md +2 -50
- package/.claude-flow-novice/.claude/agents/specialized/CODER_AGENT_GUIDELINES.md +1245 -0
- package/.claude-flow-novice/.claude/agents/specialized/mobile/spec-mobile-react-native.md +6 -142
- package/.claude-flow-novice/.claude/agents/sublinear/consciousness-evolution-agent.md +2 -18
- package/.claude-flow-novice/.claude/agents/sublinear/matrix-solver-agent.md +2 -16
- package/.claude-flow-novice/.claude/agents/sublinear/nanosecond-scheduler-agent.md +2 -19
- package/.claude-flow-novice/.claude/agents/sublinear/pagerank-agent.md +2 -19
- package/.claude-flow-novice/.claude/agents/sublinear/phi-calculator-agent.md +2 -19
- package/.claude-flow-novice/.claude/agents/sublinear/psycho-symbolic-agent.md +2 -19
- package/.claude-flow-novice/.claude/agents/sublinear/sublinear.md +2 -1
- package/.claude-flow-novice/.claude/agents/sublinear/temporal-advantage-agent.md +2 -16
- package/.claude-flow-novice/.claude/agents/testing/e2e/playwright-agent.md +7 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/CLAUDE.md +188 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/claude-flow-universal +81 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/claude-flow.bat +18 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/claude-flow.ps1 +24 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/claude-md.js +982 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/analysis/bottleneck-detect.md +162 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/automation/auto-agent.md +122 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/coordination/swarm-init.md +85 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/github/github-swarm.md +121 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/helpers/standard-checkpoint-hooks.sh +179 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/notification.md +113 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/post-command.md +116 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/post-edit.md +117 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/post-task.md +112 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/pre-command.md +113 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/pre-edit.md +113 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/pre-search.md +112 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/pre-task.md +111 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/session-end.md +118 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/session-restore.md +118 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/session-start.md +117 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/coordination-md.js +340 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/coordination.md +16 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/enhanced-templates.js +2347 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/github-safe-enhanced.js +331 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/github-safe.js +106 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/index.js +1896 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/memory-bank-md.js +259 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/memory-bank.md +16 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/readme-files.js +72 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/safe-hook-patterns.js +430 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/settings.json +109 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/settings.json.enhanced +35 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/sparc-modes.js +1401 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/CLAUDE.md +188 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/claude-flow-universal +81 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/claude-flow.bat +18 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/claude-flow.ps1 +24 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/claude-md.js +982 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/analysis/bottleneck-detect.md +162 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/automation/auto-agent.md +122 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/coordination/swarm-init.md +85 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/github/github-swarm.md +121 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/helpers/standard-checkpoint-hooks.sh +179 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/notification.md +113 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/post-command.md +116 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/post-edit.md +117 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/post-task.md +112 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/pre-command.md +113 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/pre-edit.md +113 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/pre-search.md +112 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/pre-task.md +111 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/session-end.md +118 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/session-restore.md +118 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/session-start.md +117 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/coordination-md.js +340 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/coordination.md +16 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/enhanced-templates.js +2347 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/github-safe-enhanced.js +331 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/github-safe.js +106 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/memory-bank-md.js +259 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/memory-bank.md +16 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/readme-files.js +72 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/safe-hook-patterns.js +430 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/settings.json +109 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/settings.json.enhanced +35 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/sparc-modes.js +1401 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/verification-claude-md.js +432 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/verification-claude-md.js +432 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init.js +4 -0
- package/.claude-flow-novice/dist/src/slash-commands/benchmark-prompts.js +281 -0
- package/CLAUDE.md +1927 -127
- package/package.json +3 -3
- package/src/cli/simple-commands/init/index.js +39 -4
- package/src/cli/simple-commands/init/templates/CLAUDE.md +8 -10
- package/src/slash-commands/benchmark-prompts.js +281 -0
|
@@ -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,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,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,121 @@
|
|
|
1
|
+
# github swarm
|
|
2
|
+
|
|
3
|
+
Create a specialized swarm for GitHub repository management.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx claude-flow github swarm [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
- `--repository, -r <owner/repo>` - Target GitHub repository
|
|
14
|
+
- `--agents, -a <number>` - Number of specialized agents (default: 5)
|
|
15
|
+
- `--focus, -f <type>` - Focus area: maintenance, development, review, triage
|
|
16
|
+
- `--auto-pr` - Enable automatic pull request enhancements
|
|
17
|
+
- `--issue-labels` - Auto-categorize and label issues
|
|
18
|
+
- `--code-review` - Enable AI-powered code reviews
|
|
19
|
+
|
|
20
|
+
## Examples
|
|
21
|
+
|
|
22
|
+
### Basic GitHub swarm
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npx claude-flow github swarm --repository owner/repo
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Maintenance-focused swarm
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npx claude-flow github swarm -r owner/repo -f maintenance --issue-labels
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Development swarm with PR automation
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npx claude-flow github swarm -r owner/repo -f development --auto-pr --code-review
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Full-featured triage swarm
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npx claude-flow github swarm -r owner/repo -a 8 -f triage --issue-labels --auto-pr
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Agent Types
|
|
47
|
+
|
|
48
|
+
### Issue Triager
|
|
49
|
+
|
|
50
|
+
- Analyzes and categorizes issues
|
|
51
|
+
- Suggests labels and priorities
|
|
52
|
+
- Identifies duplicates and related issues
|
|
53
|
+
|
|
54
|
+
### PR Reviewer
|
|
55
|
+
|
|
56
|
+
- Reviews code changes
|
|
57
|
+
- Suggests improvements
|
|
58
|
+
- Checks for best practices
|
|
59
|
+
|
|
60
|
+
### Documentation Agent
|
|
61
|
+
|
|
62
|
+
- Updates README files
|
|
63
|
+
- Creates API documentation
|
|
64
|
+
- Maintains changelog
|
|
65
|
+
|
|
66
|
+
### Test Agent
|
|
67
|
+
|
|
68
|
+
- Identifies missing tests
|
|
69
|
+
- Suggests test cases
|
|
70
|
+
- Validates test coverage
|
|
71
|
+
|
|
72
|
+
### Security Agent
|
|
73
|
+
|
|
74
|
+
- Scans for vulnerabilities
|
|
75
|
+
- Reviews dependencies
|
|
76
|
+
- Suggests security improvements
|
|
77
|
+
|
|
78
|
+
## Workflows
|
|
79
|
+
|
|
80
|
+
### Issue Triage Workflow
|
|
81
|
+
|
|
82
|
+
1. Scan all open issues
|
|
83
|
+
2. Categorize by type and priority
|
|
84
|
+
3. Apply appropriate labels
|
|
85
|
+
4. Suggest assignees
|
|
86
|
+
5. Link related issues
|
|
87
|
+
|
|
88
|
+
### PR Enhancement Workflow
|
|
89
|
+
|
|
90
|
+
1. Analyze PR changes
|
|
91
|
+
2. Suggest missing tests
|
|
92
|
+
3. Improve documentation
|
|
93
|
+
4. Format code consistently
|
|
94
|
+
5. Add helpful comments
|
|
95
|
+
|
|
96
|
+
### Repository Health Check
|
|
97
|
+
|
|
98
|
+
1. Analyze code quality metrics
|
|
99
|
+
2. Review dependency status
|
|
100
|
+
3. Check test coverage
|
|
101
|
+
4. Assess documentation completeness
|
|
102
|
+
5. Generate health report
|
|
103
|
+
|
|
104
|
+
## Integration with Claude Code
|
|
105
|
+
|
|
106
|
+
Use in Claude Code with MCP tools:
|
|
107
|
+
|
|
108
|
+
```javascript
|
|
109
|
+
mcp__claude-flow__github_swarm {
|
|
110
|
+
repository: "owner/repo",
|
|
111
|
+
agents: 6,
|
|
112
|
+
focus: "maintenance"
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## See Also
|
|
117
|
+
|
|
118
|
+
- `repo analyze` - Deep repository analysis
|
|
119
|
+
- `pr enhance` - Enhance pull requests
|
|
120
|
+
- `issue triage` - Intelligent issue management
|
|
121
|
+
- `code review` - Automated reviews
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Standard checkpoint hook functions for Claude settings.json (without GitHub features)
|
|
3
|
+
|
|
4
|
+
# Function to handle pre-edit checkpoints
|
|
5
|
+
pre_edit_checkpoint() {
|
|
6
|
+
local tool_input="$1"
|
|
7
|
+
local file=$(echo "$tool_input" | jq -r '.file_path // empty')
|
|
8
|
+
|
|
9
|
+
if [ -n "$file" ]; then
|
|
10
|
+
local checkpoint_branch="checkpoint/pre-edit-$(date +%Y%m%d-%H%M%S)"
|
|
11
|
+
local current_branch=$(git branch --show-current)
|
|
12
|
+
|
|
13
|
+
# Create checkpoint
|
|
14
|
+
git add -A
|
|
15
|
+
git stash push -m "Pre-edit checkpoint for $file" >/dev/null 2>&1
|
|
16
|
+
git branch "$checkpoint_branch"
|
|
17
|
+
|
|
18
|
+
# Store metadata
|
|
19
|
+
mkdir -p .claude/checkpoints
|
|
20
|
+
cat > ".claude/checkpoints/$(date +%s).json" <<EOF
|
|
21
|
+
{
|
|
22
|
+
"branch": "$checkpoint_branch",
|
|
23
|
+
"file": "$file",
|
|
24
|
+
"timestamp": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
|
|
25
|
+
"type": "pre-edit",
|
|
26
|
+
"original_branch": "$current_branch"
|
|
27
|
+
}
|
|
28
|
+
EOF
|
|
29
|
+
|
|
30
|
+
# Restore working directory
|
|
31
|
+
git stash pop --quiet >/dev/null 2>&1 || true
|
|
32
|
+
|
|
33
|
+
echo "✅ Created checkpoint: $checkpoint_branch for $file"
|
|
34
|
+
fi
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
# Function to handle post-edit checkpoints
|
|
38
|
+
post_edit_checkpoint() {
|
|
39
|
+
local tool_input="$1"
|
|
40
|
+
local file=$(echo "$tool_input" | jq -r '.file_path // empty')
|
|
41
|
+
|
|
42
|
+
if [ -n "$file" ] && [ -f "$file" ]; then
|
|
43
|
+
# Check if file was modified - first check if file is tracked
|
|
44
|
+
if ! git ls-files --error-unmatch "$file" >/dev/null 2>&1; then
|
|
45
|
+
# File is not tracked, add it first
|
|
46
|
+
git add "$file"
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
# Now check if there are changes
|
|
50
|
+
if git diff --cached --quiet "$file" 2>/dev/null && git diff --quiet "$file" 2>/dev/null; then
|
|
51
|
+
echo "ℹ️ No changes to checkpoint for $file"
|
|
52
|
+
else
|
|
53
|
+
local tag_name="checkpoint-$(date +%Y%m%d-%H%M%S)"
|
|
54
|
+
local current_branch=$(git branch --show-current)
|
|
55
|
+
|
|
56
|
+
# Create commit
|
|
57
|
+
git add "$file"
|
|
58
|
+
if git commit -m "🔖 Checkpoint: Edit $file
|
|
59
|
+
|
|
60
|
+
Automatic checkpoint created by Claude
|
|
61
|
+
- File: $file
|
|
62
|
+
- Branch: $current_branch
|
|
63
|
+
- Timestamp: $(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
64
|
+
|
|
65
|
+
[Auto-checkpoint]" --quiet; then
|
|
66
|
+
# Create tag only if commit succeeded
|
|
67
|
+
git tag -a "$tag_name" -m "Checkpoint after editing $file"
|
|
68
|
+
|
|
69
|
+
# Store metadata
|
|
70
|
+
mkdir -p .claude/checkpoints
|
|
71
|
+
local diff_stats=$(git diff HEAD~1 --stat | tr '\n' ' ' | sed 's/"/\\"/g')
|
|
72
|
+
cat > ".claude/checkpoints/$(date +%s).json" <<EOF
|
|
73
|
+
{
|
|
74
|
+
"tag": "$tag_name",
|
|
75
|
+
"file": "$file",
|
|
76
|
+
"timestamp": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
|
|
77
|
+
"type": "post-edit",
|
|
78
|
+
"branch": "$current_branch",
|
|
79
|
+
"diff_summary": "$diff_stats"
|
|
80
|
+
}
|
|
81
|
+
EOF
|
|
82
|
+
|
|
83
|
+
echo "✅ Created checkpoint: $tag_name for $file"
|
|
84
|
+
else
|
|
85
|
+
echo "ℹ️ No commit created (no changes or commit failed)"
|
|
86
|
+
fi
|
|
87
|
+
fi
|
|
88
|
+
fi
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
# Function to handle task checkpoints
|
|
92
|
+
task_checkpoint() {
|
|
93
|
+
local user_prompt="$1"
|
|
94
|
+
local task=$(echo "$user_prompt" | head -c 100 | tr '\n' ' ')
|
|
95
|
+
|
|
96
|
+
if [ -n "$task" ]; then
|
|
97
|
+
local checkpoint_name="task-$(date +%Y%m%d-%H%M%S)"
|
|
98
|
+
|
|
99
|
+
# Commit current state
|
|
100
|
+
git add -A
|
|
101
|
+
git commit -m "🔖 Task checkpoint: $task..." --quiet || true
|
|
102
|
+
|
|
103
|
+
# Store metadata
|
|
104
|
+
mkdir -p .claude/checkpoints
|
|
105
|
+
cat > ".claude/checkpoints/task-$(date +%s).json" <<EOF
|
|
106
|
+
{
|
|
107
|
+
"checkpoint": "$checkpoint_name",
|
|
108
|
+
"task": "$task",
|
|
109
|
+
"timestamp": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
|
|
110
|
+
"commit": "$(git rev-parse HEAD)"
|
|
111
|
+
}
|
|
112
|
+
EOF
|
|
113
|
+
|
|
114
|
+
echo "✅ Created task checkpoint: $checkpoint_name"
|
|
115
|
+
fi
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
# Function to handle session end
|
|
119
|
+
session_end_checkpoint() {
|
|
120
|
+
local session_id="session-$(date +%Y%m%d-%H%M%S)"
|
|
121
|
+
local summary_file=".claude/checkpoints/summary-$session_id.md"
|
|
122
|
+
|
|
123
|
+
mkdir -p .claude/checkpoints
|
|
124
|
+
|
|
125
|
+
# Create summary
|
|
126
|
+
cat > "$summary_file" <<EOF
|
|
127
|
+
# Session Summary - $(date +'%Y-%m-%d %H:%M:%S')
|
|
128
|
+
|
|
129
|
+
## Checkpoints Created
|
|
130
|
+
$(find .claude/checkpoints -name '*.json' -mtime -1 -exec basename {} \; | sort)
|
|
131
|
+
|
|
132
|
+
## Files Modified
|
|
133
|
+
$(git diff --name-only $(git log --format=%H -n 1 --before="1 hour ago" 2>/dev/null) 2>/dev/null || echo "No files tracked")
|
|
134
|
+
|
|
135
|
+
## Recent Commits
|
|
136
|
+
$(git log --oneline -10 --grep="Checkpoint" || echo "No checkpoint commits")
|
|
137
|
+
|
|
138
|
+
## Rollback Instructions
|
|
139
|
+
To rollback to a specific checkpoint:
|
|
140
|
+
\`\`\`bash
|
|
141
|
+
# List all checkpoints
|
|
142
|
+
git tag -l 'checkpoint-*' | sort -r
|
|
143
|
+
|
|
144
|
+
# Rollback to a checkpoint
|
|
145
|
+
git checkout checkpoint-YYYYMMDD-HHMMSS
|
|
146
|
+
|
|
147
|
+
# Or reset to a checkpoint (destructive)
|
|
148
|
+
git reset --hard checkpoint-YYYYMMDD-HHMMSS
|
|
149
|
+
\`\`\`
|
|
150
|
+
EOF
|
|
151
|
+
|
|
152
|
+
# Create final checkpoint
|
|
153
|
+
git add -A
|
|
154
|
+
git commit -m "🏁 Session end checkpoint: $session_id" --quiet || true
|
|
155
|
+
git tag -a "session-end-$session_id" -m "End of Claude session"
|
|
156
|
+
|
|
157
|
+
echo "✅ Session summary saved to: $summary_file"
|
|
158
|
+
echo "📌 Final checkpoint: session-end-$session_id"
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
# Main entry point
|
|
162
|
+
case "$1" in
|
|
163
|
+
pre-edit)
|
|
164
|
+
pre_edit_checkpoint "$2"
|
|
165
|
+
;;
|
|
166
|
+
post-edit)
|
|
167
|
+
post_edit_checkpoint "$2"
|
|
168
|
+
;;
|
|
169
|
+
task)
|
|
170
|
+
task_checkpoint "$2"
|
|
171
|
+
;;
|
|
172
|
+
session-end)
|
|
173
|
+
session_end_checkpoint
|
|
174
|
+
;;
|
|
175
|
+
*)
|
|
176
|
+
echo "Usage: $0 {pre-edit|post-edit|task|session-end} [input]"
|
|
177
|
+
exit 1
|
|
178
|
+
;;
|
|
179
|
+
esac
|