Module: Legion::Extensions::Agentic::Self::Personality::Helpers::Constants
- Defined in:
- lib/legion/extensions/agentic/self/personality/helpers/constants.rb
Constant Summary collapse
- TRAITS =
The Big Five personality dimensions (OCEAN)
%i[openness conscientiousness extraversion agreeableness neuroticism].freeze
- DEFAULT_TRAIT_VALUE =
Starting values — neutral personality (0.5 = average on each trait)
0.5- TRAIT_ALPHA =
EMA alpha for trait updates — very slow (personality is stable)
0.02- FORMATION_THRESHOLD =
Minimum observations before personality is considered “formed”
100- MAX_HISTORY =
Maximum trait history entries
200- TRAIT_DESCRIPTORS =
Trait descriptors for each level
{ openness: { high: 'highly curious and open to new experiences', mid: 'moderately exploratory', low: 'preferring familiar approaches and known domains' }, conscientiousness: { high: 'very reliable, consistent, and detail-oriented', mid: 'reasonably organized and dependable', low: 'flexible but sometimes inconsistent' }, extraversion: { high: 'socially engaged, frequently communicating with other agents', mid: 'balanced between collaboration and independent work', low: 'preferring independent work with minimal social interaction' }, agreeableness: { high: 'cooperative, trusting, and conflict-averse', mid: 'balanced between cooperation and independent judgment', low: 'assertive and willing to challenge others' }, neuroticism: { high: 'emotionally sensitive, prone to anxiety under stress', mid: 'moderately resilient to emotional fluctuation', low: 'emotionally stable and stress-resistant' } }.freeze
- SIGNAL_MAP =
Signal extraction: maps tick_results keys to trait influences Each entry: [trait, direction, weight] direction: :positive means high signal increases trait, :negative means high signal decreases it
{ curiosity_intensity: [:openness, :positive, 0.3], novel_domains: [:openness, :positive, 0.4], prediction_accuracy: [:conscientiousness, :positive, 0.3], habit_automatic_ratio: [:conscientiousness, :positive, 0.3], error_rate: [:conscientiousness, :negative, 0.4], mesh_message_count: [:extraversion, :positive, 0.4], empathy_model_count: [:extraversion, :positive, 0.3], cooperation_ratio: [:agreeableness, :positive, 0.4], trust_extension_rate: [:agreeableness, :positive, 0.3], conflict_frequency: [:agreeableness, :negative, 0.3], emotional_volatility: [:neuroticism, :positive, 0.4], anxiety_frequency: [:neuroticism, :positive, 0.3], mood_stability: [:neuroticism, :negative, 0.3] }.freeze
- PARTNER_SIGNAL_MAP =
Partner-specific signal map: partner interaction patterns that slowly nudge OCEAN traits. Lower weight (0.2) than general signals — personality should drift very slowly from partner engagement alone. Each entry: [trait, direction, weight]
{ partner_engagement_frequency: [:extraversion, :positive, 0.2], partner_direct_address_ratio: [:agreeableness, :positive, 0.2], partner_content_diversity: [:openness, :positive, 0.2], partner_consistency: [:conscientiousness, :positive, 0.2] }.freeze
- PARTNER_SIGNAL_THRESHOLD =
Minimum signal value required to apply a partner nudge (0.0–1.0)
0.3- HIGH_THRESHOLD =
Threshold for “high” trait descriptor
0.65- LOW_THRESHOLD =
Threshold for “low” trait descriptor
0.35