Module: Legion::Extensions::Agentic::Social::Conscience::Helpers::Constants

Defined in:
lib/legion/extensions/agentic/social/conscience/helpers/constants.rb

Constant Summary collapse

MORAL_FOUNDATIONS =

Moral Foundations Theory — 6 foundations with weights summing to 1.0 Based on Haidt & Graham (2007): Care, Fairness, Loyalty, Authority, Sanctity, Liberty

{
  care:      { weight: 0.25, description: 'Compassion and prevention of suffering' },
  fairness:  { weight: 0.20, description: 'Justice, reciprocity, and proportionality' },
  loyalty:   { weight: 0.15, description: 'Group allegiance and trustworthiness' },
  authority: { weight: 0.15, description: 'Respect for hierarchy and legitimate authority' },
  sanctity:  { weight: 0.15, description: 'Purity and integrity of systems' },
  liberty:   { weight: 0.10, description: 'Autonomy and freedom from domination' }
}.freeze
MORAL_VERDICTS =

Possible verdict outcomes from moral evaluation

%i[permitted cautioned conflicted prohibited].freeze
FOUNDATION_ALPHA =

EMA alpha for moral sensitivity — changes very slowly

0.05
CONFLICT_THRESHOLD =

Foundations must disagree by more than this to trigger a dilemma

0.3
PROHIBITION_THRESHOLD =

Weighted moral score below this means prohibited

-0.5
CAUTION_THRESHOLD =

Weighted moral score below this means cautioned

-0.1
MAX_MORAL_HISTORY =

Maximum moral evaluation history entries to retain

100
DILEMMA_TYPES =

Types of ethical dilemmas that can arise when foundations conflict

%i[utilitarian deontological virtue_ethics].freeze
INITIAL_SENSITIVITY =

Initial sensitivity value for each foundation — starts fully sensitive, decays through experience

1.0
MORAL_SCORE_RANGE =

Moral score range (per-foundation and weighted)

{ min: -1.0, max: 1.0 }.freeze