Repository is archived
No release in over 3 years
Multi-channel cognitive fatigue modeling for brain-modeled agentic AI
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

 Project Readme

lex-cognitive-fatigue-model

Multi-channel cognitive fatigue and recovery model for brain-modeled agentic AI in the LegionIO ecosystem.

What It Does

Cognitive work depletes distinct mental resources at different rates. This extension tracks five independent channels — attention, working_memory, decision_making, creative, and social — each with their own depletion and recovery rates. The model surfaces when channels need rest (below 0.3 energy) or when tasks should be delegated (below 0.2 energy). It also provides a quality modifier per channel, allowing downstream systems to weight outputs from fatigued channels appropriately.

Usage

require 'legion/extensions/cognitive_fatigue_model'

client = Legion::Extensions::CognitiveFatigueModel::Client.new

# Simulate processing a decision-making task
client.process_cognitive_task(channel_name: :decision_making)

# Check what needs attention
client.fatigue_recommendations
# => { delegate: [], rest: [], any_action_needed: false }

# Check overall fatigue
client.overall_fatigue_report
# => { overall_fatigue: 0.94, most_fatigued: { name: :decision_making, energy: 0.94, ... }, channels_needing_rest: [] }

# Rest a specific channel
client.rest_cognitive_channel(channel_name: :decision_making)

# Rest all channels at once (maintenance)
client.rest_all_channels

# Get quality modifiers for all channels
client.cognitive_quality_report

Development

bundle install
bundle exec rspec
bundle exec rubocop

License

MIT