feat: add zCode Swarm — multi-agent orchestration system

- 6 agent skills: code-review, performance, security, architecture, test, git
- 4 coordinator modes: hierarchical, mesh, gossip, consensus
- Federated memory system (6 namespaces)
- Neural network agent recommendation
- Agent marketplace (plugin discovery/install)
- Real-time dashboard + performance metrics
- CRDT-based sync for decentralized modes
- 22 files, ~1400 lines total

Inspired by ruflo distributed multi-agent patterns.
This commit is contained in:
admin
2026-05-06 07:59:19 +00:00
Unverified
parent 129d4a6def
commit 68cfeb5cba
24 changed files with 1513 additions and 0 deletions

58
verify-swarm.cjs Normal file
View File

@@ -0,0 +1,58 @@
#!/usr/bin/env node
/**
* zCode Swarm - Verification Script
* Verifies all files exist and are valid
*/
const fs = require('fs');
const path = require('path');
const EXPECTED_FILES = [
'.zcode/lib/swarm-utils.cjs',
'.zcode/agents/swarm-utils.cjs',
'.zcode/agents/agent-spawner.cjs',
'.zcode/agents/orchestrator.cjs',
'.zcode/agents/neural-network.cjs',
'.zcode/agents/marketplace.cjs',
'.zcode/agents/memory/federated.cjs',
'.zcode/agents/dashboard/index.cjs',
'.zcode/agents/coordinator/hierarchical.cjs',
'.zcode/agents/coordinator/mesh.cjs',
'.zcode/agents/coordinator/gossip.cjs',
'.zcode/agents/coordinator/consensus.cjs',
'.zcode/agents/skills/code-review-swarm/index.cjs',
'.zcode/agents/skills/performance-optimizer/index.cjs',
'.zcode/agents/skills/security-auditor/index.cjs',
'.zcode/agents/skills/architecture-analyzer/index.cjs',
'.zcode/agents/skills/test-orchestrator/index.cjs',
'.zcode/agents/skills/git-swarm/index.cjs',
'.zcode/config/coordinator.yaml',
'.zcode/config/memory.yaml',
'.zcode/marketplace/architecture-analyzer.json',
'quick-start.cjs'
];
console.log('🔍 zCode Swarm Verification\n');
console.log('═'.repeat(50));
let passed = 0, failed = 0;
for (const file of EXPECTED_FILES) {
const fullPath = path.join(__dirname, file);
if (fs.existsSync(fullPath)) {
const stat = fs.statSync(fullPath);
const size = stat.size;
const lines = fs.readFileSync(fullPath, 'utf8').split('\n').length;
console.log(`${file} (${lines} lines, ${size} bytes)`);
passed++;
} else {
console.log(`${file} — MISSING`);
failed++;
}
}
console.log('═'.repeat(50));
console.log(`\n📊 Results: ${passed} passed, ${failed} failed, ${EXPECTED_FILES.length} total`);
console.log(failed === 0 ? '\n✅ All checks passed!' : `\n${failed} file(s) missing!`);
process.exit(failed > 0 ? 1 : 0);