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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
//! Bhava — Emotion and personality engine for AGNOS
//!
//! Sanskrit: भाव (bhava) — emotion, feeling, state of being
//!
//! Provides a unified personality and emotional state system for AI agents,
//! game NPCs, and any entity that needs expressive behavior. Extracted from
//! SecureYeoman's soul/brain architecture.
//!
//! # Modules
//!
//! - [`traits`] — 15-dimension personality spectrums with behavioral instructions
//! - [`mood`] — Emotional state vectors with time-based decay, triggers, history, and mood-aware prompts
//! - [`archetype`] — Identity hierarchy (Soul/Spirit/Brain/Body/Heart) with templates and validation
//! - [`sentiment`] — Keyword-based sentiment analysis with negation, intensity modifiers, and sentence-level analysis
//! - [`presets`] — AGNOS ecosystem personality templates (AGNOS, T.Ron)
//! - [`spirit`] — Passions, inspirations, and pains — the animating force
//! - [`relationship`] — Inter-entity affinity, trust, and interaction tracking
//! - [`appraisal`] — OCC appraisal model — goal-aware emotion generation
//! - [`stress`] — Allostatic load / burnout modeling
//! - [`regulation`] — Emotion regulation strategies (suppress, reappraise, distract)
//! - [`growth`] — Experience-driven personality evolution
//! - [`monitor`] — Live sentiment monitoring for streaming text
//! - [`ai`] — System prompt composition, sentiment feedback, and agent metadata
//! - [`store`] — Storage trait for pluggable persistence backends
//! - [`storage`] — SQLite persistence implementation (feature: `sqlite`)
//! - [`rhythm`] — Biological rhythms: ultradian, seasonal, and biorhythm cycles
//! - [`microexpr`] — Micro-expression detection during emotional suppression
//! - [`affective`] — Affective computing metrics (complexity, granularity, inertia, variability)
//! - [`proximity`] — Spatial proximity triggers for location-based mood effects
//! - [`reasoning`] — Personality-driven reasoning strategy selection
//! - [`active_hours`] — Time-of-day personality activation scheduling
//! - [`eq`] — Emotional intelligence (EQ) — Mayer-Salovey four-branch model
//! - [`display_rules`] — Cultural display rules (Matsumoto framework)
//! - [`energy`] — Depletable energy resource with Banister fitness-fatigue model
//! - [`circadian`] — 24-hour alertness cycle with chronotype (Borbély two-process)
//! - [`flow`] — Flow state detection with hysteresis (Csikszentmihalyi)
//! - [`salience`] — Somatic marker urgency/importance scoring (Damasio)
//! - [`actr`] — ACT-R frequency × recency memory activation with Hebbian boost
//! - [`preference`] — Adaptive preference learning from interaction outcomes
//! - [`belief`] — Belief system — memories crystallize into beliefs, beliefs form self-concept, self-understanding deepens into cosmic understanding
//! - [`intuition`] — Subconscious pattern integration — gut feelings from converging subsystems
//! - [`aesthetic`] — Aesthetic attribution — repeated exposure crystallizes into beliefs and trait pressure
//! - [`environment`] — Environmental reactivity: temperature, light, noise, weather pressing on mood/energy/stress (feature: `mood`)
//! - [`atomic_time`] — Tanmatra atomic time bridge: simulation clock, time context for circadian/rhythm/growth (feature: `atomic_time`)
//! - [`neuroscience`] — Mastishk neuroscience bridge: brain chemistry pressing on mood/stress/energy/flow/growth (feature: `neuroscience`)
//! - [`compat`] — Jantu creature behavior integration (feature: `instinct`)
//! - [`psychology`] — Bodh psychology math integration (feature: `psychology`)
//! - [`sociology`] — Sangha sociology math integration (feature: `sociology`)
//! - [`physiology`] — Sharira body/biomechanics integration (feature: `physiology`)
//! - [`microbiology`] — Jivanu microbial/immune system integration (feature: `microbiology`)
//! - [`zodiac`] — Zodiac manifestation engine: signs, elements, modalities, sign→personality presets (feature: `traits`)
//! - [`types`] — Type-safety primitives: `Normalized01`, `Balanced11`, `ThresholdClassifier`, `evict_min`
//! - [`curves`] — Decay/recovery curve abstractions: `ExponentialDecay`, `LogisticCurve`
//! - [`error`] — Error types
// Storage trait (available when core features are on)
pub use BhavaError;