Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

πŸ”– Checkpoint: Edit /workspaces/claude-code-flow/benchmark/src/swarm_benchmark/cli/swe_bench_command.py

rUv2bab5b4f3e03
diff --git a/.claude/checkpoints/1754577189.json b/.claude/checkpoints/1754577189.json
new file mode 100644
index 0000000000..72e5b62f87
--- /dev/null
+++ b/.claude/checkpoints/1754577189.json
@@ -0,0 +1 @@
+{"branch": "checkpoint/pre-edit-20250807-143309", "file": "/workspaces/claude-code-flow/find_real_bug.py", "timestamp": "2025-08-07T14:33:09Z", "type": "pre-edit", "original_branch": "swe-bench"}
diff --git a/.claude/checkpoints/1754577191.json b/.claude/checkpoints/1754577191.json
new file mode 100644
index 0000000000..12e1cd446b
--- /dev/null
+++ b/.claude/checkpoints/1754577191.json
@@ -0,0 +1 @@
+{"tag": "checkpoint-20250807-143311", "file": "/workspaces/claude-code-flow/find_real_bug.py", "timestamp": "2025-08-07T14:33:11Z", "type": "post-edit", "branch": "swe-bench", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 96 ++++++++++++++++++++++++++++++++ .claude-flow/metrics/task-metrics.json | 6 +- .claude/checkpoints/1754577183.json | 1 + .claude/checkpoints/1754577184.json | 1 + find_real_bug.py | 61 ++++++++++++++++++++ 6 files changed, 163 insertions(+), 4 deletions(-) "}
diff --git a/benchmark/src/swarm_benchmark/cli/swe_bench_command.py b/benchmark/src/swarm_benchmark/cli/swe_bench_command.py
index d4c00baf81..a2187852a2 100644
--- a/benchmark/src/swarm_benchmark/cli/swe_bench_command.py
+++ b/benchmark/src/swarm_benchmark/cli/swe_bench_command.py
@@ -8,6 +8,7 @@ from typing import Optional
from ..swe_bench import SWEBenchEngine
from ..swe_bench.official_integration import OfficialSWEBenchEngine
+from ..swe_bench.multi_mode_engine import MultiModeSWEBenchEngine, ClaudeFlowMode
from ..core.models import BenchmarkConfig, StrategyType, CoordinationMode
@@ -224,6 +225,99 @@ def official(ctx, lite, limit, mode, strategy, agents, output, validate):
click.echo(f"❌ Evaluation failed: {results['error']}")
+@swe_bench.command('multi-mode')
[email protected]('--instances', '-i', type=int, default=1, help='Number of instances to test per mode')
[email protected]('--lite', is_flag=True, default=True, help='Use SWE-bench-Lite dataset')
[email protected]('--quick', is_flag=True, help='Quick test with fewer configurations')
[email protected]('--output', '-o', type=click.Path(), help='Output directory')
+def multi_mode(ctx, instances, lite, quick, output):
+ """Test ALL claude-flow non-interactive modes on SWE-bench.
+
+ This command benchmarks all available claude-flow execution modes:
+ - Swarm: Multiple strategies (auto, research, development, optimization, etc.)
+ - SPARC: All subcommands (coder, architect, tdd, reviewer, etc.)
+ - Hive-Mind: Various configurations (different worker counts, queen types)
+
+ Examples:
+ # Quick test with 1 instance across all modes
+ swarm-bench swe-bench multi-mode --instances 1 --quick
+
+ # Full test with 5 instances per mode
+ swarm-bench swe-bench multi-mode --instances 5
+
+ # Test specific modes only
+ swarm-bench swe-bench multi-mode --instances 2
+ """
+
+ click.echo("""
+╔══════════════════════════════════════════════════════════════╗
+β•‘ Multi-Mode SWE-Bench Evaluation β•‘
+β•‘ Testing All Claude-Flow Non-Interactive Modes β•‘
+β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
+""")
+
+ # Create configuration
+ config = BenchmarkConfig(
+ name="Multi-Mode-SWE-bench",
+ description="Multi-mode SWE-bench evaluation",
+ strategy=StrategyType.DEVELOPMENT,
+ mode=CoordinationMode.MESH,
+ max_agents=8,
+ output_directory=output or "benchmark/swe-bench-multi-mode/results"
+ )
+
+ # Initialize multi-mode engine
+ engine = MultiModeSWEBenchEngine(config)
+
+ # Select modes to test
+ if quick:
+ # Quick test with fewer modes
+ modes_to_test = [
+ ClaudeFlowMode("swarm", strategy="optimization", mode="mesh", agents=8,
+ description="Swarm optimization (best performer)"),
+ ClaudeFlowMode("sparc", subcommand="coder", agents=5,
+ description="SPARC coder mode"),
+ ClaudeFlowMode("hive-mind", agents=8,
+ description="Hive-mind with 8 workers"),
+ ]
+ click.echo(f"⚑ Quick mode: Testing {len(modes_to_test)} configurations")
+ else:
+ # Test all modes
+ modes_to_test = None
+ click.echo(f"πŸ“Š Full mode: Testing {len(engine.CLAUDE_FLOW_MODES)} configurations")
+
+ click.echo(f"πŸ“ Instances per mode: {instances}")
+ click.echo(f"πŸ“¦ Dataset: {'SWE-bench-Lite (300)' if lite else 'Full SWE-bench (2,294)'}")
+
+ if not quick:
+ total_tests = len(engine.CLAUDE_FLOW_MODES) * instances
+ click.echo(f"\n⚠️ This will run {total_tests} tests total")
+ click.confirm("Ready to start multi-mode evaluation?", abort=True)
+
+ # Run benchmark
+ results = asyncio.run(engine.benchmark_all_modes(
+ instances_limit=instances,
+ modes_to_test=modes_to_test
+ ))
+
+ # Display results
+ if "error" not in results:
+ click.echo(f"\nβœ… Multi-Mode Evaluation Complete!")
+ click.echo(f" Modes tested: {results['modes_tested']}")
+ click.echo(f" Total tests: {results['total_tests']}")
+ click.echo(f"\nπŸ† Best Mode: {results['best_mode']}")
+ best = results['best_performance']
+ click.echo(f" Success Rate: {best['success_rate']:.1%}")
+ click.echo(f" Avg Duration: {best['avg_duration']:.1f}s")
+ click.echo(f" Description: {best['description']}")
+
+ report_path = Path(config.output_directory) / f"multi_mode_report_{int(time.time())}.json"
+ click.echo(f"\nπŸ“ Full report: {report_path}")
+ else:
+ click.echo(f"❌ Evaluation failed: {results['error']}")
+
+
@swe_bench.command()
@click.option('--target-success', '-s', type=float, default=0.8, help='Target success rate')
@click.option('--target-duration', '-d', type=float, default=15.0, help='Target average duration')