mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-23 21:59:14 +09:00
- Reorganize v3/ into implementation/ subfolders: - planning/, architecture/, migration/, integration/ - security/, adrs/, research/, swarm-plans/ - Add 15-agent concurrent swarm implementation plans: - SWARM-OVERVIEW.md: Hierarchical mesh topology, 4 phases - AGENT-SPECIFICATIONS.md: 15 agent configs with capabilities - TDD-LONDON-SCHOOL-PLAN.md: Mock-first TDD methodology - BENCHMARK-OPTIMIZATION.md: Performance targets (2.49x-7.47x) - DEPLOYMENT-PLAN.md: Release strategy, CI/CD, rollback - GITHUB-ISSUE-TRACKING.md: Issue workflow with agent replies - Update .claude/settings.json with proper hooks format - Add bash aliases for claude --dangerously-skip-permissions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
141 lines
5.4 KiB
JavaScript
141 lines
5.4 KiB
JavaScript
/**
|
|
* Hive Mind command for simple CLI
|
|
* Provides basic implementation that can work without TypeScript
|
|
*/
|
|
|
|
export async function hiveCommand(args, flags) {
|
|
const objective = (args || []).join(' ').trim();
|
|
|
|
if (!objective || flags.help || flags.h) {
|
|
showHiveHelp();
|
|
return;
|
|
}
|
|
|
|
console.log('🐝 Initializing Hive Mind...');
|
|
console.log(`👑 Queen Genesis coordinating...`);
|
|
console.log(`📋 Objective: ${objective}`);
|
|
console.log(`🏗️ Topology: ${flags.topology || 'hierarchical'}`);
|
|
console.log(`🗳️ Consensus: ${flags.consensus || 'quorum'}`);
|
|
console.log(`🤖 Max Agents: ${flags['max-agents'] || 8}`);
|
|
console.log('');
|
|
|
|
// Simulate Hive initialization
|
|
const hiveId = `hive_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
|
|
console.log(`✅ Hive Mind initialized: ${hiveId}`);
|
|
console.log('');
|
|
|
|
// Show agent spawning
|
|
console.log('🐝 Spawning specialized agents...');
|
|
const agents = [
|
|
{ type: '👑', name: 'Queen-Genesis', role: 'Orchestrator' },
|
|
{ type: '🏗️', name: 'Architect-Prime', role: 'System Design' },
|
|
{ type: '🐝', name: 'Worker-1', role: 'Backend Development' },
|
|
{ type: '🐝', name: 'Worker-2', role: 'Frontend Development' },
|
|
{ type: '🔍', name: 'Scout-Alpha', role: 'Research & Analysis' },
|
|
{ type: '🛡️', name: 'Guardian-Omega', role: 'Quality Assurance' },
|
|
];
|
|
|
|
for (const agent of agents) {
|
|
console.log(` ${agent.type} ${agent.name} - ${agent.role}`);
|
|
}
|
|
console.log('');
|
|
|
|
// Show task decomposition
|
|
console.log('🧩 Phase 1: Task Decomposition');
|
|
console.log(' 👑 Queen proposes task breakdown...');
|
|
console.log(' 🗳️ Agents voting on tasks...');
|
|
console.log(' ✅ Consensus reached (87.5% approval)');
|
|
console.log('');
|
|
|
|
// Show task assignment
|
|
console.log('🗳️ Phase 2: Task Assignment');
|
|
console.log(' 📌 analysis → Scout-Alpha');
|
|
console.log(' 📌 design → Architect-Prime');
|
|
console.log(' 📌 implementation → Worker-1, Worker-2');
|
|
console.log(' 📌 testing → Guardian-Omega');
|
|
console.log(' 📌 documentation → Scout-Alpha');
|
|
console.log('');
|
|
|
|
// Show execution
|
|
console.log('⚡ Phase 3: Parallel Execution');
|
|
console.log(' [▓▓▓▓▓▓▓▓░░░░░░░░░░] 40% - Analysis in progress...');
|
|
console.log(' [▓▓▓░░░░░░░░░░░░░░░] 15% - Design starting...');
|
|
console.log(' [░░░░░░░░░░░░░░░░░░] 0% - Implementation pending...');
|
|
console.log('');
|
|
|
|
// Show monitoring dashboard
|
|
if (flags.monitor) {
|
|
console.log('📊 Hive Mind Dashboard');
|
|
console.log('═══════════════════════════════════════════════════════════════');
|
|
console.log('Status: EXECUTING | Time: ' + new Date().toLocaleTimeString());
|
|
console.log('');
|
|
console.log('Consensus: 87.5% | Tasks: 2/5 | Quality: 92%');
|
|
console.log('Messages: 42 | Knowledge: 15 entries');
|
|
console.log('═══════════════════════════════════════════════════════════════');
|
|
}
|
|
|
|
console.log('');
|
|
console.log('🐝 Hive Mind is coordinating your objective...');
|
|
console.log('');
|
|
console.log('Note: This is a preview. Full Hive Mind functionality requires');
|
|
console.log('the complete TypeScript implementation to be built.');
|
|
}
|
|
|
|
function showHiveHelp() {
|
|
console.log(`
|
|
🐝 Hive Mind - Advanced Multi-Agent Coordination
|
|
|
|
USAGE:
|
|
claude-flow hive <objective> [options]
|
|
|
|
DESCRIPTION:
|
|
Hive Mind implements advanced swarm intelligence with consensus mechanisms,
|
|
distributed decision-making, and quality-driven execution.
|
|
|
|
EXAMPLES:
|
|
claude-flow hive "Build microservices architecture"
|
|
claude-flow hive "Optimize database performance" --consensus unanimous
|
|
claude-flow hive "Develop ML pipeline" --topology mesh --monitor
|
|
|
|
TOPOLOGIES:
|
|
hierarchical Queen-led hierarchy (default)
|
|
mesh Peer-to-peer coordination
|
|
ring Sequential processing
|
|
star Centralized hub
|
|
|
|
CONSENSUS MECHANISMS:
|
|
quorum Simple majority (default)
|
|
unanimous All agents must agree
|
|
weighted Capability-based voting
|
|
leader Queen decides with input
|
|
|
|
OPTIONS:
|
|
--topology <type> Swarm topology (default: hierarchical)
|
|
--consensus <type> Decision mechanism (default: quorum)
|
|
--max-agents <n> Maximum agents (default: 8)
|
|
--quality-threshold <n> Min quality 0-1 (default: 0.8)
|
|
--memory-namespace <ns> Memory namespace (default: hive)
|
|
--monitor Real-time monitoring
|
|
--background Run in background
|
|
--sparc Use SPARC methodology
|
|
--timeout <min> Timeout minutes (default: 60)
|
|
|
|
AGENT TYPES:
|
|
👑 Queen Orchestrator and decision maker
|
|
🏗️ Architect System design and planning
|
|
🐝 Worker Implementation and execution
|
|
🔍 Scout Research and exploration
|
|
🛡️ Guardian Quality and validation
|
|
|
|
FEATURES:
|
|
• Consensus-based task decomposition
|
|
• Capability-based task assignment
|
|
• Parallel execution with monitoring
|
|
• Quality-driven result aggregation
|
|
• Distributed memory sharing
|
|
• SPARC methodology support
|
|
|
|
For more info: https://github.com/ruvnet/claude-code-flow/docs/hive.md
|
|
`);
|
|
}
|