v2/examples/parallel-2/README.md
This example demonstrates how to run multiple Claude-Flow SPARC agents in parallel to test their capabilities and measure performance.
The parallel test coordinator runs 8 different agent types simultaneously:
# Navigate to the parallel-2 directory
cd examples/parallel-2
# Install dependencies
npm install
npm run test
This will:
results.jsonnpm run analyze
This will:
detailed-report.mdnpm run test:full
This runs the complete test cycle: clean, test, and analyze.
Each agent is given a specific task designed to test its capabilities:
| Agent | Task Description |
|---|---|
| Specification | Create calculator API specification |
| Architecture | Design microservices for e-commerce |
| Code | Implement binary search tree |
| TDD | Create string utility library with tests |
| Debug | Analyze and fix memory leaks |
| Documentation | Create API documentation |
| Security | Review authentication implementation |
| Integration | Plan microservice integration |
Contains raw test execution data:
Provides comprehensive analysis:
The test suite measures:
To add new test cases:
test-agents/:export const newTestCase = {
name: "Test Name",
description: "Test description",
task: "Detailed task for the agent",
expectedOutputs: ["Expected output 1", "Expected output 2"],
validateOutput: (output: string): boolean => {
// Validation logic
return true;
}
};
parallel-test.ts:{
name: "New Agent",
mode: "agent-mode",
task: "Your task description",
priority: 1
}
coordinator.ts (default: 5 minutes)To see detailed agent output, modify coordinator.ts:
console.log(`Agent ${task.name} output:`, stdout);
parallel-2/
├── coordinator.ts # Main coordination logic
├── parallel-test.ts # Test configuration and runner
├── analyze-results.ts # Results analysis tool
├── test-agents/ # Individual agent test cases
│ ├── spec-test.ts
│ ├── architect-test.ts
│ ├── code-test.ts
│ ├── tdd-test.ts
│ └── debug-test.ts
├── results.json # Test execution results
└── detailed-report.md # Analysis report
To contribute new test cases or improvements:
This example is part of the Claude-Flow project and follows the same license terms.