claude-flow 1.0.21 → 1.0.23
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/README.md +58 -12
- package/bin/claude-flow +14 -1
- package/bin/claude-flow-swarm +19 -0
- package/bin/claude-flow-swarm-monitor +18 -0
- package/bin/claude-flow-swarm-ui +40 -0
- package/package.json +18 -4
- package/src/cli/cli-core.ts +2 -2
- package/src/cli/commands/index.ts +329 -7
- package/src/cli/commands/swarm-spawn.ts +79 -0
- package/src/cli/commands/swarm.ts +431 -0
- package/src/cli/create-enhanced-task.js +181 -0
- package/src/cli/main.ts +1 -1
- package/src/cli/simple-cli.js +195 -5
- package/src/cli/simple-cli.ts +9 -9
- package/src/coordination/swarm-monitor.ts +473 -0
- package/src/mcp/swarm-tools.ts +166 -0
- package/src/utils/helpers.ts +44 -1
package/README.md
CHANGED
|
@@ -67,8 +67,8 @@ Advanced CRDT-based memory system with SQLite performance and Markdown readabili
|
|
|
67
67
|
</td>
|
|
68
68
|
<td width="33%" align="center">
|
|
69
69
|
|
|
70
|
-
### ⚡ **
|
|
71
|
-
|
|
70
|
+
### ⚡ **Enhanced Claude Integration**
|
|
71
|
+
Spawn Claude instances with comprehensive Claude-Flow guidance, teaching them to use memory, coordination, and system commands effectively.
|
|
72
72
|
|
|
73
73
|
</td>
|
|
74
74
|
</tr>
|
|
@@ -138,6 +138,7 @@ Comprehensive documentation is available to help you get the most out of Claude-
|
|
|
138
138
|
- **[Terminal Management](./docs/08-terminal-management.md)** - Terminal pooling and sessions
|
|
139
139
|
- **[Troubleshooting](./docs/09-troubleshooting.md)** - Common issues and solutions
|
|
140
140
|
- **[Advanced Usage](./docs/10-advanced-usage.md)** - Power user features
|
|
141
|
+
- **[Claude Spawning](./docs/11-claude-spawning.md)** - Spawning Claude instances
|
|
141
142
|
- **[CLI Reference](./docs/cli-reference.md)** - Complete command documentation
|
|
142
143
|
|
|
143
144
|
## 💡 **Quick Start Guide**
|
|
@@ -179,16 +180,29 @@ npx claude-flow task list --verbose
|
|
|
179
180
|
|
|
180
181
|
### 5. **Spawn Claude Instances** 🆕
|
|
181
182
|
```bash
|
|
182
|
-
# Spawn Claude with
|
|
183
|
+
# Spawn Claude with enhanced Claude-Flow guidance
|
|
183
184
|
npx claude-flow claude spawn "implement user authentication" --research --parallel
|
|
184
185
|
|
|
185
|
-
#
|
|
186
|
-
npx claude-flow claude spawn "
|
|
186
|
+
# Backend-only mode with high coverage
|
|
187
|
+
npx claude-flow claude spawn "create REST API" --mode backend-only --coverage 95
|
|
188
|
+
|
|
189
|
+
# Frontend development with feature commits
|
|
190
|
+
npx claude-flow claude spawn "build React components" --mode frontend-only --commit feature
|
|
191
|
+
|
|
192
|
+
# Full stack with all options
|
|
193
|
+
npx claude-flow claude spawn "build complete app" --research --parallel --coverage 90 --verbose
|
|
187
194
|
|
|
188
195
|
# Execute batch workflow
|
|
189
196
|
npx claude-flow claude batch examples/claude-workflow.json --dry-run
|
|
190
197
|
```
|
|
191
198
|
|
|
199
|
+
**Enhanced Claude Instances receive:**
|
|
200
|
+
- Detailed Claude-Flow system guidance
|
|
201
|
+
- Proper `npx claude-flow` command syntax
|
|
202
|
+
- Mode-specific instructions (backend/frontend/api/full)
|
|
203
|
+
- Memory bank operations with examples
|
|
204
|
+
- Configuration-aware development guidance
|
|
205
|
+
|
|
192
206
|
### 6. **Monitor System Status**
|
|
193
207
|
```bash
|
|
194
208
|
# Check system health
|
|
@@ -360,15 +374,15 @@ npx claude-flow monitor [options]
|
|
|
360
374
|
-f, --focus <component> Focus on specific component
|
|
361
375
|
```
|
|
362
376
|
|
|
363
|
-
#### `claude` - Spawn Claude Instances 🆕
|
|
377
|
+
#### `claude` - Spawn Claude Instances with Enhanced Guidance 🆕
|
|
364
378
|
```bash
|
|
365
379
|
npx claude-flow claude <subcommand>
|
|
366
|
-
spawn <task> Spawn Claude with
|
|
380
|
+
spawn <task> Spawn Claude with enhanced Claude-Flow guidance
|
|
367
381
|
-t, --tools <tools> Allowed tools (comma-separated)
|
|
368
382
|
--no-permissions Use --dangerously-skip-permissions flag
|
|
369
383
|
-c, --config <file> MCP config file path
|
|
370
384
|
-m, --mode <mode> Development mode (full/backend-only/frontend-only/api-only)
|
|
371
|
-
--parallel Enable parallel execution with
|
|
385
|
+
--parallel Enable parallel execution with multi-agent support
|
|
372
386
|
--research Enable web research with WebFetchTool
|
|
373
387
|
--coverage <n> Test coverage target percentage (default: 80)
|
|
374
388
|
--commit <freq> Commit frequency (phase/feature/manual)
|
|
@@ -379,6 +393,14 @@ npx claude-flow claude <subcommand>
|
|
|
379
393
|
--dry-run Show what would be executed without running
|
|
380
394
|
```
|
|
381
395
|
|
|
396
|
+
**Each spawned Claude instance receives comprehensive guidance including:**
|
|
397
|
+
- Claude-Flow memory operations (`npx claude-flow memory store/query`)
|
|
398
|
+
- System management commands (`npx claude-flow status/monitor`)
|
|
399
|
+
- Agent coordination (when --parallel is used)
|
|
400
|
+
- Mode-specific development focus
|
|
401
|
+
- Coverage and commit strategy awareness
|
|
402
|
+
- Example commands ready to use with the Bash tool
|
|
403
|
+
|
|
382
404
|
#### `config` - Configuration Management
|
|
383
405
|
```bash
|
|
384
406
|
npx claude-flow config <subcommand>
|
|
@@ -430,6 +452,25 @@ npx claude-flow agent spawn coordinator --name "Tech Lead"
|
|
|
430
452
|
npx claude-flow workflow development-pipeline.json --watch
|
|
431
453
|
```
|
|
432
454
|
|
|
455
|
+
**Enhanced Claude Spawn Examples:**
|
|
456
|
+
```bash
|
|
457
|
+
# Backend API development with high test coverage
|
|
458
|
+
npx claude-flow claude spawn "build REST API with authentication" \
|
|
459
|
+
--mode backend-only --coverage 95 --commit feature
|
|
460
|
+
|
|
461
|
+
# Frontend development with research capabilities
|
|
462
|
+
npx claude-flow claude spawn "create responsive dashboard" \
|
|
463
|
+
--mode frontend-only --research --verbose
|
|
464
|
+
|
|
465
|
+
# Full-stack development with parallel execution
|
|
466
|
+
npx claude-flow claude spawn "implement user management system" \
|
|
467
|
+
--parallel --coverage 90 --commit phase
|
|
468
|
+
|
|
469
|
+
# API design focus with custom tools
|
|
470
|
+
npx claude-flow claude spawn "design GraphQL schema" \
|
|
471
|
+
--mode api-only --tools "View,Edit,GrepTool,LS"
|
|
472
|
+
```
|
|
473
|
+
|
|
433
474
|
**Memory Operations:**
|
|
434
475
|
```bash
|
|
435
476
|
npx claude-flow memory store "project-requirements" "Authentication using JWT" --namespace project
|
|
@@ -477,7 +518,7 @@ claude-flow task workflow example-workflow.json
|
|
|
477
518
|
## Development
|
|
478
519
|
|
|
479
520
|
### Prerequisites
|
|
480
|
-
- Deno 1.38+ or Node.js 16+
|
|
521
|
+
- Deno 1.38+ or Node.js 16+ (Install Deno: https://deno.land/#installation)
|
|
481
522
|
- Git
|
|
482
523
|
|
|
483
524
|
### Setup
|
|
@@ -539,6 +580,7 @@ Claude-Flow seamlessly integrates with Claude Code through the `CLAUDE.md` file
|
|
|
539
580
|
- **Automatic Context Loading**: Claude Code reads your project configuration
|
|
540
581
|
- **Build Command Integration**: All build/test commands are available to Claude
|
|
541
582
|
- **Memory Persistence**: Claude remembers context across sessions
|
|
583
|
+
- **Enhanced Guidance**: Spawned Claude instances receive detailed Claude-Flow instructions
|
|
542
584
|
- **SPARC Methodology**: Built-in support for structured AI development
|
|
543
585
|
|
|
544
586
|
Use with Claude Code:
|
|
@@ -546,10 +588,14 @@ Use with Claude Code:
|
|
|
546
588
|
# Initialize integration
|
|
547
589
|
npx claude-flow init
|
|
548
590
|
|
|
549
|
-
#
|
|
550
|
-
claude --
|
|
591
|
+
# Spawn Claude with enhanced Claude-Flow guidance
|
|
592
|
+
npx claude-flow claude spawn "your task here" --research --parallel
|
|
551
593
|
|
|
552
|
-
# Claude
|
|
594
|
+
# Claude receives:
|
|
595
|
+
# - Instructions on using npx claude-flow commands
|
|
596
|
+
# - Memory operations (store/query)
|
|
597
|
+
# - Agent coordination capabilities
|
|
598
|
+
# - Mode-specific development guidance
|
|
553
599
|
```
|
|
554
600
|
|
|
555
601
|
## 🏢 **Enterprise Features**
|
package/bin/claude-flow
CHANGED
|
@@ -37,10 +37,23 @@ if (!denoPath) {
|
|
|
37
37
|
// Use the simple CLI JavaScript file which doesn't have TypeScript issues
|
|
38
38
|
const cliPath = path.join(__dirname, '..', 'src', 'cli', 'simple-cli.js');
|
|
39
39
|
|
|
40
|
+
// Check if the CLI file exists
|
|
41
|
+
if (!fs.existsSync(cliPath)) {
|
|
42
|
+
console.error('Error: CLI file not found at', cliPath);
|
|
43
|
+
process.exit(1);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Set up environment with Deno in PATH
|
|
47
|
+
const env = { ...process.env };
|
|
48
|
+
if (!env.PATH.includes('.deno/bin')) {
|
|
49
|
+
env.PATH = path.join(os.homedir(), '.deno', 'bin') + path.delimiter + env.PATH;
|
|
50
|
+
}
|
|
51
|
+
|
|
40
52
|
// Run the CLI with Deno
|
|
41
53
|
const deno = spawn(denoPath, ['run', '--allow-all', cliPath, ...process.argv.slice(2)], {
|
|
42
54
|
stdio: 'inherit',
|
|
43
|
-
cwd: path.join(__dirname, '..')
|
|
55
|
+
cwd: path.join(__dirname, '..'),
|
|
56
|
+
env: env
|
|
44
57
|
});
|
|
45
58
|
|
|
46
59
|
deno.on('error', (err) => {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Claude-Flow Swarm Mode Wrapper
|
|
3
|
+
# This script wraps the swarm demo to work with the installed Deno
|
|
4
|
+
|
|
5
|
+
# Find deno in the path
|
|
6
|
+
DENO_PATH=$(which deno 2>/dev/null || echo "/home/codespace/.deno/bin/deno")
|
|
7
|
+
|
|
8
|
+
if [ ! -x "$DENO_PATH" ]; then
|
|
9
|
+
echo "Error: Deno is not installed or not in PATH"
|
|
10
|
+
echo "Please install Deno first: https://deno.land/#installation"
|
|
11
|
+
exit 1
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
# Get the directory of this script
|
|
15
|
+
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
16
|
+
SWARM_DEMO="$SCRIPT_DIR/../swarm-demo.ts"
|
|
17
|
+
|
|
18
|
+
# Run the swarm demo with all arguments
|
|
19
|
+
exec "$DENO_PATH" run --allow-all "$SWARM_DEMO" "$@"
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Claude-Flow Swarm Mode with Monitoring
|
|
3
|
+
|
|
4
|
+
# Find deno in the path
|
|
5
|
+
DENO_PATH=$(which deno 2>/dev/null || echo "/home/codespace/.deno/bin/deno")
|
|
6
|
+
|
|
7
|
+
if [ ! -x "$DENO_PATH" ]; then
|
|
8
|
+
echo "Error: Deno is not installed or not in PATH"
|
|
9
|
+
echo "Please install Deno first: https://deno.land/#installation"
|
|
10
|
+
exit 1
|
|
11
|
+
fi
|
|
12
|
+
|
|
13
|
+
# Get the directory of this script
|
|
14
|
+
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
15
|
+
SWARM_DEMO="$SCRIPT_DIR/../swarm-demo-enhanced.ts"
|
|
16
|
+
|
|
17
|
+
# Always add --monitor flag for better visibility
|
|
18
|
+
exec "$DENO_PATH" run --allow-all "$SWARM_DEMO" "$@" --monitor
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Claude-Flow Swarm Mode with UI Wrapper
|
|
3
|
+
# This script wraps the enhanced swarm demo with blessed UI support
|
|
4
|
+
|
|
5
|
+
# Find deno in the path
|
|
6
|
+
DENO_PATH=$(which deno 2>/dev/null || echo "/home/codespace/.deno/bin/deno")
|
|
7
|
+
|
|
8
|
+
if [ ! -x "$DENO_PATH" ]; then
|
|
9
|
+
echo "Error: Deno is not installed or not in PATH"
|
|
10
|
+
echo "Please install Deno first: https://deno.land/#installation"
|
|
11
|
+
exit 1
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
# Get the directory of this script
|
|
15
|
+
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
16
|
+
SWARM_DEMO="$SCRIPT_DIR/../swarm-demo-enhanced.ts"
|
|
17
|
+
|
|
18
|
+
# Check if --ui flag is present, if not add it
|
|
19
|
+
if [[ "$*" != *"--ui"* ]]; then
|
|
20
|
+
# Add --ui flag after the objective
|
|
21
|
+
ARGS=()
|
|
22
|
+
OBJECTIVE_DONE=false
|
|
23
|
+
|
|
24
|
+
for arg in "$@"; do
|
|
25
|
+
ARGS+=("$arg")
|
|
26
|
+
if [[ ! "$OBJECTIVE_DONE" = true ]] && [[ ! "$arg" =~ ^- ]]; then
|
|
27
|
+
OBJECTIVE_DONE=true
|
|
28
|
+
# Next arg should be a flag, so we can insert --ui
|
|
29
|
+
if [[ "${@:$((${#ARGS} + 1)):1}" =~ ^- ]] || [ $# -eq ${#ARGS[@]} ]; then
|
|
30
|
+
ARGS+=("--ui")
|
|
31
|
+
fi
|
|
32
|
+
fi
|
|
33
|
+
done
|
|
34
|
+
|
|
35
|
+
# Run with --ui flag
|
|
36
|
+
exec "$DENO_PATH" run --allow-all "$SWARM_DEMO" "${ARGS[@]}"
|
|
37
|
+
else
|
|
38
|
+
# Run as-is
|
|
39
|
+
exec "$DENO_PATH" run --allow-all "$SWARM_DEMO" "$@"
|
|
40
|
+
fi
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-flow",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.23",
|
|
4
4
|
"description": "Advanced AI agent orchestration system for Claude Code",
|
|
5
5
|
"main": "src/cli/main.ts",
|
|
6
6
|
"bin": {
|
|
@@ -36,10 +36,24 @@
|
|
|
36
36
|
},
|
|
37
37
|
"files": [
|
|
38
38
|
"bin/claude-flow",
|
|
39
|
+
"bin/claude-flow-swarm",
|
|
40
|
+
"bin/claude-flow-swarm-ui",
|
|
41
|
+
"bin/claude-flow-swarm-monitor",
|
|
39
42
|
"src/",
|
|
43
|
+
"swarm-demo.ts",
|
|
44
|
+
"swarm-demo-enhanced.ts",
|
|
40
45
|
"scripts/install.js",
|
|
46
|
+
"scripts/swarm-blessed-ui.js",
|
|
47
|
+
"scripts/swarm-simple.js",
|
|
48
|
+
"scripts/swarm-example.sh",
|
|
41
49
|
"README.md",
|
|
42
50
|
"LICENSE",
|
|
43
|
-
"deno.json"
|
|
44
|
-
|
|
45
|
-
|
|
51
|
+
"deno.json",
|
|
52
|
+
"SWARM_TTY_SOLUTION.md",
|
|
53
|
+
"SWARM_VISIBILITY.md"
|
|
54
|
+
],
|
|
55
|
+
"dependencies": {
|
|
56
|
+
"blessed": "^0.1.81",
|
|
57
|
+
"node-pty": "^1.0.0"
|
|
58
|
+
}
|
|
59
|
+
}
|
package/src/cli/cli-core.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { red, green, yellow, blue, bold, cyan } from "https://deno.land/std@0.22
|
|
|
8
8
|
import { ensureDir } from "https://deno.land/std@0.224.0/fs/mod.ts";
|
|
9
9
|
import { join } from "https://deno.land/std@0.224.0/path/mod.ts";
|
|
10
10
|
|
|
11
|
-
export const VERSION = "1.0.
|
|
11
|
+
export const VERSION = "1.0.23";
|
|
12
12
|
|
|
13
13
|
interface CommandContext {
|
|
14
14
|
args: string[];
|
|
@@ -86,7 +86,7 @@ class CLI {
|
|
|
86
86
|
string: this.getStringFlags(),
|
|
87
87
|
alias: this.getAliases(),
|
|
88
88
|
default: this.getDefaults(),
|
|
89
|
-
stopEarly:
|
|
89
|
+
stopEarly: false,
|
|
90
90
|
unknown: () => true,
|
|
91
91
|
});
|
|
92
92
|
|