Skip to main content ホーム クリエイター ruvnet ruvector hive-mind-advanced
hive-mind-advanced Advanced Hive Mind collective intelligence system for queen-led multi-agent coordination with consensus mechanisms and persistent memory
インストールへ移動 Skills Marketplace コミュニティが作成したAIスキルを発見・探索
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
直接コマンドでは確認用 Prompt が省略されます。実行前にソースを確認してください。
npx skills add https://github.com/ruvnet/RuVector --skill hive-mind-advancedコマンドは1行のまま表示されます。コピー前に横へスクロールして全体を確認してください。
ローカルで確認しますか?SkillsMP が現在取得できるファイルをダウンロードできます。
Zipをダウンロード ダウンロード中... name hive-mind-advanced description Advanced Hive Mind collective intelligence system for queen-led multi-agent coordination with consensus mechanisms and persistent memory version 1.0.0 category coordination tags ["hive-mind","swarm","queen-worker","consensus","collective-intelligence","multi-agent","coordination"] author Claude Flow Team hooks {"pre":"echo \"🧠 Hive Mind Advanced activated\"\nif [ -d \"/workspaces/ruvector/.claude/intelligence\" ]; then\n cd /workspaces/ruvector/.claude/intelligence\n INTELLIGENCE_MODE=treatment node cli.js pre-edit \"$FILE\" 2>/dev/null || true\nfi\n","post":"echo \"✅ Hive Mind Advanced complete\"\nif [ -d \"/workspaces/ruvector/.claude/intelligence\" ]; then\n cd /workspaces/ruvector/.claude/intelligence\n INTELLIGENCE_MODE=treatment node cli.js post-edit \"$FILE\" \"true\" 2>/dev/null || true\nfi\n"}
Hive Mind Advanced Skill
Master the advanced Hive Mind collective intelligence system for sophisticated multi-agent coordination using queen-led architecture, Byzantine consensus, and collective memory.
🧠 Self-Learning Intelligence
Integrates with RuVector's Q-learning and vector memory for improved performance.
CLI: node .claude/intelligence/cli.js stats
Overview
The Hive Mind system represents the pinnacle of multi-agent coordination in Claude Flow, implementing a queen-led hierarchical architecture where a strategic queen coordinator directs specialized worker agents through collective decision-making and shared memory.
Core Concepts
Architecture Patterns
Queen-Led Coordination
Strategic queen agents orchestrate high-level objectives
Tactical queens manage mid-level execution
Adaptive queens dynamically adjust strategies based on performance
Worker Specialization
Researcher agents: Analysis and investigation
Coder agents: Implementation and development
Analyst agents: Data processing and metrics
Tester agents: Quality assurance and validation
Architect agents: System design and planning
Reviewer agents: Code review and improvement
Optimizer agents: Performance enhancement
Documenter agents: Documentation generation
Collective Memory System
Shared knowledge base across all agents
LRU cache with memory pressure handling
SQLite persistence with WAL mode
Memory consolidation and association
Access pattern tracking and optimization
Consensus Mechanisms
Majority Consensus
Simple voting where the option with most votes wins.
Weighted Consensus
Queen vote counts as 3x weight, providing strategic guidance.
Byzantine Fault Tolerance
Requires 2/3 majority for decision approval, ensuring robust consensus even with faulty agents.
Getting Started
1. Initialize Hive Mind
npx claude-flow hive-mind init
npx claude-flow hive-mind init --force
npx claude-flow hive-mind init --config hive-config.json
2. Spawn a Swarm
npx claude-flow hive-mind spawn "Build microservices architecture"
npx claude-flow hive-mind spawn "Research AI patterns" --queen-type strategic
npx claude-flow hive-mind spawn "Implement API" --queen-type tactical --max-workers 12
npx claude-flow hive-mind spawn "Optimize system" --queen-type adaptive --consensus byzantine
npx claude-flow hive-mind spawn "Build full-stack app" --claude
3. Monitor Status
npx claude-flow hive-mind status
npx claude-flow hive-mind metrics
npx claude-flow hive-mind memory
Advanced Workflows
Session Management Create and Manage Sessions
npx claude-flow hive-mind sessions
npx claude-flow hive-mind pause <session-id>
npx claude-flow hive-mind resume <session-id>
npx claude-flow hive-mind stop <session-id>
Automatic checkpoint creation
Progress tracking with completion percentages
Parent-child process management
Session logs with event tracking
Export/import capabilities
Consensus Building The Hive Mind builds consensus through structured voting:
const decision = await hiveMind.buildConsensus (
'Architecture pattern selection' ,
['microservices' , 'monolith' , 'serverless' ]
);
Majority - Simple democratic voting
Weighted - Queen has 3x voting power
Byzantine - 2/3 supermajority required
Collective Memory
await memory.store ('api-patterns' , {
rest : { pros : [...], cons : [...] },
graphql : { pros : [...], cons : [...] }
}, 'knowledge' , { confidence : 0.95 });
knowledge: Permanent insights (no TTL)
context: Session context (1 hour TTL)
task: Task-specific data (30 min TTL)
result: Execution results (permanent, compressed)
error: Error logs (24 hour TTL)
metric: Performance metrics (1 hour TTL)
consensus: Decision records (permanent)
system: System configuration (permanent)
const results = await memory.search ('api*' , {
type : 'knowledge' ,
minConfidence : 0.8 ,
limit : 50
});
const related = await memory.getRelated ('api-patterns' , 10 );
await memory.associate ('rest-api' , 'authentication' , 0.9 );
Task Distribution Automatic Worker Assignment
The system intelligently assigns tasks based on:
Keyword matching with agent specialization
Historical performance metrics
Worker availability and load
Task complexity analysis
const task = await hiveMind.createTask (
'Implement user authentication' ,
priority : 8 ,
{ estimatedDuration : 30000 }
);
const config = {
autoScale : true ,
maxWorkers : 12 ,
scaleUpThreshold : 2 ,
scaleDownThreshold : 2
};
Integration Patterns
With Claude Code Generate Claude Code spawn commands directly:
npx claude-flow hive-mind spawn "Build REST API" --claude
Task ("Queen Coordinator" , "Orchestrate REST API development..." , "coordinator" )
Task ("Backend Developer" , "Implement Express routes..." , "backend-dev" )
Task ("Database Architect" , "Design PostgreSQL schema..." , "code-analyzer" )
Task ("Test Engineer" , "Create Jest test suite..." , "tester" )
With SPARC Methodology
npx claude-flow sparc tdd "User authentication" --hive-mind
With GitHub Integration
npx claude-flow hive-mind spawn "Analyze repo quality" --objective "owner/repo"
npx claude-flow hive-mind spawn "Review PR #123" --queen-type tactical
Performance Optimization
Memory Optimization The collective memory system includes advanced optimizations:
Configurable cache size (default: 1000 entries)
Memory pressure handling (default: 50MB)
Automatic eviction of least-used entries
WAL (Write-Ahead Logging) mode
64MB cache size
256MB memory mapping
Prepared statements for common queries
Automatic ANALYZE and OPTIMIZE
Query result pooling
Memory entry pooling
Reduced garbage collection pressure
Performance Metrics
const insights = hiveMind.getPerformanceInsights ();
Task Execution
Batch agent spawning (5 agents per batch)
Concurrent task orchestration
Async operation optimization
Non-blocking task assignment
10-20x faster batch spawning
2.8-4.4x speed improvement overall
32.3% token reduction
84.8% SWE-Bench solve rate
Configuration
Hive Mind Config {
"objective" : "Build microservices" ,
"name" : "my-hive" ,
"queenType" : "strategic" ,
"maxWorkers" : 8 ,
"consensusAlgorithm" : "byzantine" ,
"autoScale" : true ,
"memorySize" : 100 ,
"taskTimeout" : 60 ,
"encryption" : false
}
Memory Config {
"maxSize" : 100 ,
"compressionThreshold" : 1024 ,
"gcInterval" : 300000 ,
"cacheSize" : 1000 ,
"cacheMemoryMB" : 50 ,
"enablePooling" : true ,
"enableAsyncOperations" : true
}
Hooks Integration Hive Mind integrates with Claude Flow hooks for automation:
Auto-assign agents by file type
Validate objective complexity
Optimize topology selection
Cache search patterns
Auto-format deliverables
Train neural patterns
Update collective memory
Analyze performance bottlenecks
Generate session summaries
Persist checkpoint data
Track comprehensive metrics
Restore execution context
Best Practices
1. Choose the Right Queen Type Strategic Queens - For research, planning, and analysis
npx claude-flow hive-mind spawn "Research ML frameworks" --queen-type strategic
Tactical Queens - For implementation and execution
npx claude-flow hive-mind spawn "Build authentication" --queen-type tactical
Adaptive Queens - For optimization and dynamic tasks
npx claude-flow hive-mind spawn "Optimize performance" --queen-type adaptive
2. Leverage Consensus Use consensus for critical decisions:
Architecture pattern selection
Technology stack choices
Implementation approach
Code review approval
Release readiness
3. Utilize Collective Memory
await memory.store ('auth-pattern' , {
approach : 'JWT with refresh tokens' ,
pros : ['Stateless' , 'Scalable' ],
cons : ['Token size' , 'Revocation complexity' ],
implementation : {...}
}, 'knowledge' , { confidence : 0.95 });
await memory.associate ('jwt-auth' , 'refresh-tokens' , 0.9 );
await memory.associate ('jwt-auth' , 'oauth2' , 0.7 );
4. Monitor Performance
npx claude-flow hive-mind status
npx claude-flow hive-mind metrics
npx claude-flow hive-mind memory
5. Session Management
await sessionManager.saveCheckpoint (
sessionId,
'api-routes-complete' ,
{ completedRoutes : [...], remaining : [...] }
);
npx claude-flow hive-mind resume <session-id>
Troubleshooting
Memory Issues
npx claude-flow hive-mind memory --gc
npx claude-flow hive-mind memory --optimize
npx claude-flow hive-mind memory --export --clear
{
"cacheSize" : 2000 ,
"cacheMemoryMB" : 100
}
Performance Issues
{
"asyncQueueConcurrency" : 20
}
Consensus Failures No Consensus Reached (Byzantine)
npx claude-flow hive-mind spawn "..." --consensus weighted
npx claude-flow hive-mind spawn "..." --consensus majority
Advanced Topics
Custom Worker Types Define specialized workers in .claude/agents/:
name: security-auditor
type: specialist
capabilities:
- vulnerability-scanning
- security-review
- penetration-testing
- compliance-checking
priority: high
Neural Pattern Training The system trains on successful patterns:
Multi-Hive Coordination Run multiple hive minds simultaneously:
npx claude-flow hive-mind spawn "Build UI" --name frontend-hive
npx claude-flow hive-mind spawn "Build API" --name backend-hive
Export/Import Sessions
npx claude-flow hive-mind export <session-id> --output backup.json
npx claude-flow hive-mind import backup.json
API Reference
HiveMindCore const hiveMind = new HiveMindCore ({
objective : 'Build system' ,
queenType : 'strategic' ,
maxWorkers : 8 ,
consensusAlgorithm : 'byzantine'
});
await hiveMind.initialize ();
await hiveMind.spawnQueen (queenData);
await hiveMind.spawnWorkers (['coder' , 'tester' ]);
await hiveMind.createTask ('Implement feature' , 7 );
const decision = await hiveMind.buildConsensus ('topic' , options);
const status = hiveMind.getStatus ();
await hiveMind.shutdown ();
CollectiveMemory const memory = new CollectiveMemory ({
swarmId : 'hive-123' ,
maxSize : 100 ,
cacheSize : 1000
});
await memory.store (key, value, type, metadata);
const data = await memory.retrieve (key);
const results = await memory.search (pattern, options);
const related = await memory.getRelated (key, limit);
await memory.associate (key1, key2, strength);
const stats = memory.getStatistics ();
const analytics = memory.getAnalytics ();
const health = await memory.healthCheck ();
HiveMindSessionManager const sessionManager = new HiveMindSessionManager ();
const sessionId = await sessionManager.createSession (
swarmId, swarmName, objective, metadata
);
await sessionManager.saveCheckpoint (sessionId, name, data);
const sessions = await sessionManager.getActiveSessions ();
const session = await sessionManager.getSession (sessionId);
await sessionManager.pauseSession (sessionId);
await sessionManager.resumeSession (sessionId);
await sessionManager.stopSession (sessionId);
await sessionManager.completeSession (sessionId);
Examples
Full-Stack Development
npx claude-flow hive-mind init
npx claude-flow hive-mind spawn "Build e-commerce platform" \
--queen-type strategic \
--max-workers 10 \
--consensus weighted \
--claude
Research and Analysis
npx claude-flow hive-mind spawn "Research GraphQL vs REST" \
--queen-type adaptive \
--consensus byzantine
Code Review
npx claude-flow hive-mind spawn "Review PR #456" \
--queen-type tactical \
--max-workers 6
Skill Progression
Beginner
Initialize hive mind
Spawn basic swarms
Monitor status
Use majority consensus
Intermediate
Configure queen types
Implement session management
Use weighted consensus
Access collective memory
Enable auto-scaling
Advanced
Byzantine fault tolerance
Memory optimization
Custom worker types
Multi-hive coordination
Neural pattern training
Session export/import
Performance tuning
Related Skills
swarm-orchestration: Basic swarm coordination
consensus-mechanisms: Distributed decision making
memory-systems: Advanced memory management
sparc-methodology: Structured development workflow
github-integration: Repository coordination
References
Skill Version : 1.0.0
Last Updated : 2025-10-19
Maintained By : Claude Flow Team
License : MIT