1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//! Emergent collective intelligence for spec-ai agents.
//!
//! This crate provides the infrastructure for agents to work together as a
//! collective intelligence system, enabling:
//!
//! - **Capability Tracking**: Agents track their proficiency in different domains
//! - **Task Delegation**: Agents route tasks to peers with matching capabilities
//! - **Inter-Agent Learning**: Agents share successful strategies with each other
//! - **Collective Decision-Making**: Agents vote on proposals with expertise-weighted voting
//! - **Workflow Orchestration**: Coordinate complex multi-agent workflows
//! - **Emergent Specialization**: Agents develop and leverage expertise over time
//!
//! # Architecture
//!
//! The collective intelligence system is built on top of the existing spec-ai
//! infrastructure:
//!
//! - Uses the mesh communication layer for inter-agent messaging
//! - Leverages the knowledge graph for storing capabilities and strategies
//! - Integrates with graph sync for distributed learning
//!
//! # Usage
//!
//! ```ignore
//! use spec_ai_collective::{
//! CapabilityTracker, DelegationManager, LearningFabric,
//! ConsensusCoordinator, WorkflowEngine, SpecializationEngine,
//! };
//!
//! // Track agent capabilities
//! let tracker = CapabilityTracker::new(instance_id);
//! tracker.record_task_outcome(domain, outcome).await?;
//!
//! // Delegate tasks to capable peers
//! let delegator = DelegationManager::new(tracker.clone(), mesh_client);
//! delegator.delegate_task(task).await?;
//!
//! // Share learnings across the mesh
//! let fabric = LearningFabric::new(graph_store);
//! fabric.share_learning(strategy).await?;
//! ```
// Re-export main types for convenience
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;