lex-cognitive-mycelium
Fungal mycelium network model for LegionIO cognitive agents. Nodes hold nutrients; hyphae transfer nutrients between nodes at an efficiency rate. When a node accumulates enough nutrients it can fruit, producing an emergent insight or breakthrough.
What It Does
- Six node types:
knowledge_cluster,insight_node,memory_node,skill_node,pattern_node,creative_node - Six nutrient types:
information,energy,pattern,association,context,emotion - Hyphae have states:
growing,mature,dormant,decaying - Nutrient transfer efficiency: 80% per hop (configurable)
- Fruiting threshold: 0.7 nutrient level triggers readiness
- Five fruiting body types:
insight,breakthrough,synthesis,connection,revelation - Network health tracking across all nodes and connections
Usage
# Create nodes
a = runner.create_node(label: 'pattern_library', node_type: :knowledge_cluster, domain: :architecture)
b = runner.create_node(label: 'current_problem', node_type: :insight_node, domain: :architecture)
# Connect them
h = runner.connect(from_id: a[:node][:id], to_id: b[:node][:id], nutrient_type: :pattern)
# Transfer nutrients
runner.transfer_nutrients(hypha_id: h[:hypha][:id], amount: 0.5)
# => { success: true, transferred: 0.4, to_node_level: 0.4, ... }
# Keep feeding until ready
# ... repeat transfers ...
# Fruit when ready
runner.fruit(node_id: b[:node][:id], fruiting_type: :insight)
# => { success: true, fruiting_body: { type: :insight, content: '...', ... } }
# Network status
runner.network_statusDevelopment
bundle install
bundle exec rspec
bundle exec rubocopLicense
MIT