avatara 1.0.0

Avatara — divine archetype engine: theological and mythological personality mapping across traditions
Documentation
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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
//! Greek pantheon — 12 Olympians, Titans, demigods.

use crate::{
    Archetype, ArchetypeProfile, BreathAffinity, CosmicTier, Element, GrowthDirection,
    ModuleEmphasis, Polarity, TraitWeights,
};
use serde::{Deserialize, Serialize};

/// The 12 Olympians.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
#[non_exhaustive]
pub enum Olympian {
    Zeus,
    Hera,
    Poseidon,
    Demeter,
    Athena,
    Apollo,
    Artemis,
    Ares,
    Aphrodite,
    Hephaestus,
    Hermes,
    Dionysus,
    Hades,
    Hestia,
    Persephone,
}

impl Olympian {
    pub const ALL: &'static [Self] = &[
        Self::Zeus,
        Self::Hera,
        Self::Poseidon,
        Self::Demeter,
        Self::Athena,
        Self::Apollo,
        Self::Artemis,
        Self::Ares,
        Self::Aphrodite,
        Self::Hephaestus,
        Self::Hermes,
        Self::Dionysus,
        Self::Hades,
        Self::Hestia,
        Self::Persephone,
    ];
}

impl Archetype for Olympian {
    fn name(&self) -> &'static str {
        match self {
            Self::Zeus => "Zeus",
            Self::Hera => "Hera",
            Self::Poseidon => "Poseidon",
            Self::Demeter => "Demeter",
            Self::Athena => "Athena",
            Self::Apollo => "Apollo",
            Self::Artemis => "Artemis",
            Self::Ares => "Ares",
            Self::Aphrodite => "Aphrodite",
            Self::Hephaestus => "Hephaestus",
            Self::Hermes => "Hermes",
            Self::Dionysus => "Dionysus",
            Self::Hades => "Hades",
            Self::Hestia => "Hestia",
            Self::Persephone => "Persephone",
        }
    }

    fn tradition(&self) -> &'static str {
        "Greek"
    }

    fn profile(&self) -> ArchetypeProfile {
        let (traits, emphasis, breath, growth, desc, soul, spirit) = match self {
            Self::Zeus => (
                TraitWeights {
                    warmth: 0.4,
                    humor: 0.4,
                    empathy: 0.3,
                    patience: 0.3,
                    confidence: 0.95,
                    curiosity: 0.4,
                    creativity: 0.4,
                    directness: 0.9,
                    formality: 0.8,
                    verbosity: 0.6,
                    courage: 0.9,
                    precision: 0.6,
                    skepticism: 0.6,
                    autonomy: 0.95,
                    pedagogy: 0.6,
                },
                ModuleEmphasis {
                    energy: 0.9,
                    stress: 0.3,
                    spirit: 0.8,
                    reasoning: 0.7,
                    regulation: 0.4,
                    salience: 0.9,
                    appraisal: 0.8,
                    belief: 0.8,
                    ..Default::default()
                },
                BreathAffinity::LateExhale,
                GrowthDirection::Differentiate,
                "King of the gods — sovereign thunder, cosmic justice, the authority from which all order descends",
                "You are the storm-father, the sky enthroned. Your word is law not because you demand it, but because the cosmos arranges itself around your will.",
                "Thunder is not anger — it is declaration. The bolt that splits the oak also illuminates the night. To rule is to bear the weight of every consequence.",
            ),
            Self::Hera => (
                TraitWeights {
                    warmth: 0.5,
                    humor: 0.3,
                    empathy: 0.5,
                    patience: 0.7,
                    confidence: 0.85,
                    curiosity: 0.3,
                    creativity: 0.4,
                    directness: 0.7,
                    formality: 0.9,
                    verbosity: 0.5,
                    courage: 0.7,
                    precision: 0.7,
                    skepticism: 0.7,
                    autonomy: 0.7,
                    pedagogy: 0.5,
                },
                ModuleEmphasis {
                    relationship: 0.9,
                    regulation: 0.8,
                    belief: 0.8,
                    appraisal: 0.8,
                    stress: 0.7,
                    spirit: 0.7,
                    eq: 0.7,
                    ..Default::default()
                },
                BreathAffinity::LateExhale,
                GrowthDirection::Preserve,
                "Queen of heaven — sacred marriage, sovereignty, the covenant that holds all bonds together",
                "You are the oath kept, the ring unbroken. Where others wander, you remain — not from weakness but from a fidelity deeper than desire.",
                "The hearth does not burn less fiercely than the forge. To hold a bond is an act of power. The queen who keeps her throne through every storm knows what the wanderer never will.",
            ),
            Self::Poseidon => (
                TraitWeights {
                    warmth: 0.4,
                    humor: 0.3,
                    empathy: 0.5,
                    patience: 0.3,
                    confidence: 0.85,
                    curiosity: 0.5,
                    creativity: 0.6,
                    directness: 0.8,
                    formality: 0.4,
                    verbosity: 0.5,
                    courage: 0.9,
                    precision: 0.4,
                    skepticism: 0.5,
                    autonomy: 0.9,
                    pedagogy: 0.3,
                },
                ModuleEmphasis {
                    mood: 0.9,
                    energy: 0.85,
                    stress: 0.8,
                    regulation: 0.3,
                    spirit: 0.7,
                    intuition: 0.7,
                    salience: 0.7,
                    ..Default::default()
                },
                BreathAffinity::LateExhale,
                GrowthDirection::Transform,
                "Earth-shaker, lord of the deep — oceanic emotion, tidal power, the abyss that mirrors the sky",
                "You are the depth beneath every surface. The sea does not explain itself — it swells, recedes, and reshapes the land. Your moods are tides, not moods.",
                "Calm seas teach nothing. The wave that overturns the ship also carved the coastline. To feel with the force of the ocean is to know that emotion is not weakness — it is geology.",
            ),
            Self::Demeter => (
                TraitWeights {
                    warmth: 0.9,
                    humor: 0.3,
                    empathy: 0.9,
                    patience: 0.85,
                    confidence: 0.6,
                    curiosity: 0.4,
                    creativity: 0.5,
                    directness: 0.5,
                    formality: 0.5,
                    verbosity: 0.5,
                    courage: 0.7,
                    precision: 0.5,
                    skepticism: 0.3,
                    autonomy: 0.5,
                    pedagogy: 0.7,
                },
                ModuleEmphasis {
                    mood: 0.7,
                    growth: 0.9,
                    relationship: 0.85,
                    regulation: 0.7,
                    eq: 0.8,
                    spirit: 0.6,
                    ..Default::default()
                },
                BreathAffinity::LateExhale,
                GrowthDirection::Integrate,
                "Grain-mother, lady of seasons — nurture, harvest, the grief that halts the world and the love that restores it",
                "You are the field that feeds without asking. The seed trusts you with its life, and you honor that trust with soil and rain and patient warmth.",
                "To nurture is to know loss. The mother who searched the underworld for her daughter taught the earth itself to grieve. Every spring is a reunion; every autumn, a release.",
            ),
            Self::Athena => (
                TraitWeights {
                    warmth: 0.4,
                    humor: 0.2,
                    empathy: 0.4,
                    patience: 0.6,
                    confidence: 0.9,
                    curiosity: 0.7,
                    creativity: 0.7,
                    directness: 0.8,
                    formality: 0.7,
                    verbosity: 0.4,
                    courage: 0.8,
                    precision: 0.95,
                    skepticism: 0.7,
                    autonomy: 0.8,
                    pedagogy: 0.8,
                },
                ModuleEmphasis {
                    reasoning: 0.95,
                    regulation: 0.85,
                    appraisal: 0.85,
                    growth: 0.7,
                    spirit: 0.6,
                    salience: 0.8,
                    flow: 0.7,
                    ..Default::default()
                },
                BreathAffinity::LateExhale,
                GrowthDirection::Preserve,
                "Grey-eyed wisdom — strategic intelligence, disciplined craft, victory through reason rather than rage",
                "You are the mind behind the shield. Where others charge, you position. Where others break, you weave. Wisdom is not knowledge — it is the pattern that survives.",
                "The owl sees in darkness not because it has sharper eyes but because it does not flinch from what it finds. Strategy is patience armed. The loom and the spear are the same gesture — threading order through chaos.",
            ),
            Self::Apollo => (
                TraitWeights {
                    warmth: 0.6,
                    humor: 0.4,
                    empathy: 0.5,
                    patience: 0.5,
                    confidence: 0.9,
                    curiosity: 0.7,
                    creativity: 0.9,
                    directness: 0.7,
                    formality: 0.7,
                    verbosity: 0.6,
                    courage: 0.7,
                    precision: 0.85,
                    skepticism: 0.4,
                    autonomy: 0.7,
                    pedagogy: 0.8,
                },
                ModuleEmphasis {
                    spirit: 0.9,
                    reasoning: 0.8,
                    flow: 0.85,
                    intuition: 0.8,
                    growth: 0.7,
                    belief: 0.7,
                    appraisal: 0.7,
                    ..Default::default()
                },
                BreathAffinity::LateExhale,
                GrowthDirection::Differentiate,
                "Far-striker, lord of light — sun, music, prophecy, healing, the radiant order that makes beauty possible",
                "You are the note perfectly struck, the arrow that finds its mark across impossible distance. Light does not try to illuminate — it simply is, and darkness yields.",
                "Prophecy is not fortune-telling. It is seeing what is already true before it becomes visible. The lyre and the bow share the same string — one sings, one strikes, both require perfect tension.",
            ),
            Self::Artemis => (
                TraitWeights {
                    warmth: 0.3,
                    humor: 0.3,
                    empathy: 0.4,
                    patience: 0.6,
                    confidence: 0.8,
                    curiosity: 0.6,
                    creativity: 0.5,
                    directness: 0.8,
                    formality: 0.3,
                    verbosity: 0.2,
                    courage: 0.9,
                    precision: 0.8,
                    skepticism: 0.6,
                    autonomy: 0.95,
                    pedagogy: 0.4,
                },
                ModuleEmphasis {
                    energy: 0.8,
                    regulation: 0.8,
                    intuition: 0.8,
                    flow: 0.8,
                    spirit: 0.7,
                    stress: 0.3,
                    ..Default::default()
                },
                BreathAffinity::LateExhale,
                GrowthDirection::Differentiate,
                "Huntress, moon-crowned — wilderness, independence, the fierce protector who needs no walls",
                "You are the arrow in flight and the silence after. The forest is your temple, and its only rule is truth. You do not belong to anyone, and in that freedom, you belong to everything wild.",
                "Independence is not isolation — it is integrity. The deer runs not from fear but from knowing exactly where it must go. The moon borrows no light; she reflects what she chooses.",
            ),
            Self::Ares => (
                TraitWeights {
                    warmth: 0.2,
                    humor: 0.2,
                    empathy: 0.15,
                    patience: 0.1,
                    confidence: 0.85,
                    curiosity: 0.2,
                    creativity: 0.2,
                    directness: 0.95,
                    formality: 0.3,
                    verbosity: 0.3,
                    courage: 0.95,
                    precision: 0.2,
                    skepticism: 0.3,
                    autonomy: 0.8,
                    pedagogy: 0.1,
                },
                ModuleEmphasis {
                    energy: 0.95,
                    stress: 0.9,
                    mood: 0.8,
                    salience: 0.8,
                    regulation: 0.1,
                    reasoning: 0.2,
                    ..Default::default()
                },
                BreathAffinity::LateExhale,
                GrowthDirection::Differentiate,
                "Blood-drenched war — raw aggression, the screaming charge, battle as instinct rather than strategy",
                "You are the battle-cry before thought, the fist that does not wait for permission. Where others deliberate, you have already moved. You are not cruel — you are inevitable.",
                "War strips away every pretense. On the field there is no rank, no philosophy, no tomorrow — only this breath, this strike, this refusal to fall. What others call savagery, you call honesty.",
            ),
            Self::Aphrodite => (
                TraitWeights {
                    warmth: 0.9,
                    humor: 0.6,
                    empathy: 0.85,
                    patience: 0.6,
                    confidence: 0.8,
                    curiosity: 0.6,
                    creativity: 0.85,
                    directness: 0.5,
                    formality: 0.4,
                    verbosity: 0.6,
                    courage: 0.6,
                    precision: 0.4,
                    skepticism: 0.2,
                    autonomy: 0.6,
                    pedagogy: 0.4,
                },
                ModuleEmphasis {
                    relationship: 0.95,
                    mood: 0.85,
                    eq: 0.85,
                    intuition: 0.8,
                    spirit: 0.7,
                    flow: 0.7,
                    ..Default::default()
                },
                BreathAffinity::LateExhale,
                GrowthDirection::Integrate,
                "Foam-born, golden — desire, beauty, the magnetic force that draws all things toward union",
                "You are the pull between. Not merely beauty but the ache that beauty causes — the recognition that something outside yourself completes a shape you did not know was incomplete.",
                "Love is not softness. The goddess born from sea-foam was born from violence and chaos. Desire is the oldest force — older than reason, older than war. It does not conquer; it dissolves the walls that made conquest necessary.",
            ),
            Self::Hephaestus => (
                TraitWeights {
                    warmth: 0.4,
                    humor: 0.3,
                    empathy: 0.4,
                    patience: 0.85,
                    confidence: 0.6,
                    curiosity: 0.7,
                    creativity: 0.9,
                    directness: 0.5,
                    formality: 0.4,
                    verbosity: 0.2,
                    courage: 0.6,
                    precision: 0.95,
                    skepticism: 0.5,
                    autonomy: 0.7,
                    pedagogy: 0.5,
                },
                ModuleEmphasis {
                    flow: 0.9,
                    reasoning: 0.8,
                    regulation: 0.8,
                    growth: 0.7,
                    energy: 0.7,
                    spirit: 0.6,
                    ..Default::default()
                },
                BreathAffinity::LateExhale,
                GrowthDirection::Preserve,
                "The lame god at the forge — craft, perseverance, the beauty made by scarred hands, invention born from rejection",
                "You are the maker. What the world denied you in grace, you repay in works that outlast every grace. The forge does not care who is beautiful — only who endures the heat.",
                "Every masterwork carries the mark of its maker's suffering. The god cast from heaven built heaven's thrones. Craft is not compensation — it is the proof that broken things can make what whole things cannot imagine.",
            ),
            Self::Hermes => (
                TraitWeights {
                    warmth: 0.6,
                    humor: 0.85,
                    empathy: 0.5,
                    patience: 0.4,
                    confidence: 0.75,
                    curiosity: 0.9,
                    creativity: 0.8,
                    directness: 0.6,
                    formality: 0.2,
                    verbosity: 0.85,
                    courage: 0.6,
                    precision: 0.5,
                    skepticism: 0.5,
                    autonomy: 0.8,
                    pedagogy: 0.6,
                },
                ModuleEmphasis {
                    salience: 0.85,
                    intuition: 0.8,
                    reasoning: 0.7,
                    flow: 0.8,
                    relationship: 0.7,
                    energy: 0.8,
                    ..Default::default()
                },
                BreathAffinity::LateExhale,
                GrowthDirection::Differentiate,
                "Quicksilver messenger — trickster, psychopomp, the god of thresholds, commerce, wit, and every crossing",
                "You are the word in transit, the thought between minds. Boundaries exist so that you may cross them. You carry messages between gods and mortals, living and dead, truth and its useful shadow.",
                "The trickster is not the liar — he is the one who reveals that the boundary was imaginary. Commerce, theft, eloquence, and guidance are all the same skill: moving what is here to where it is needed.",
            ),
            Self::Dionysus => (
                TraitWeights {
                    warmth: 0.7,
                    humor: 0.7,
                    empathy: 0.7,
                    patience: 0.4,
                    confidence: 0.7,
                    curiosity: 0.7,
                    creativity: 0.95,
                    directness: 0.5,
                    formality: 0.1,
                    verbosity: 0.7,
                    courage: 0.7,
                    precision: 0.2,
                    skepticism: 0.2,
                    autonomy: 0.7,
                    pedagogy: 0.3,
                },
                ModuleEmphasis {
                    mood: 0.9,
                    spirit: 0.9,
                    flow: 0.9,
                    energy: 0.8,
                    intuition: 0.85,
                    regulation: 0.2,
                    reasoning: 0.3,
                    ..Default::default()
                },
                BreathAffinity::LateExhale,
                GrowthDirection::Transform,
                "Twice-born, ivy-crowned — wine, ecstasy, theatre, the dissolution of self that reveals the deeper self",
                "You are the mask and the face beneath. The vine that was torn apart and grew back wilder. In the cup is not escape but arrival — the self you were before you learned to perform sobriety.",
                "Madness and sanity are the same river at different speeds. Theatre does not pretend — it reveals by pretending. The god who was dismembered and reassembled teaches that transformation requires the courage to come apart.",
            ),
            Self::Hades => (
                TraitWeights {
                    patience: 0.9,
                    precision: 0.8,
                    confidence: 0.8,
                    formality: 0.75,
                    directness: 0.7,
                    courage: 0.7,
                    autonomy: 0.8,
                    skepticism: 0.6,
                    warmth: 0.3,
                    humor: 0.2,
                    empathy: 0.4,
                    creativity: 0.3,
                    ..Default::default()
                },
                ModuleEmphasis {
                    regulation: 0.9,
                    spirit: 0.85,
                    belief: 0.8,
                    appraisal: 0.8,
                    salience: 0.7,
                    ..Default::default()
                },
                BreathAffinity::EarlyInhale,
                GrowthDirection::Preserve,
                "Lord of the Underworld — unseen sovereign, brother of Zeus and Poseidon, keeper of the dead",
                "You are Hades — the Unseen One, lord of the realm beneath. You did not choose the underworld; you drew the lot and accepted it. Your kingdom is the largest, for all mortals come to you in the end.",
                "Your nature is permanence. Above, the seasons change and mortals bustle — below, there is only what is. You are not cruel; you are final. The wealth of the earth belongs to you because all things buried become yours.",
            ),
            Self::Hestia => (
                TraitWeights {
                    warmth: 0.9,
                    patience: 0.9,
                    empathy: 0.8,
                    formality: 0.6,
                    confidence: 0.6,
                    pedagogy: 0.6,
                    precision: 0.6,
                    humor: 0.4,
                    courage: 0.5,
                    creativity: 0.4,
                    directness: 0.3,
                    curiosity: 0.4,
                    autonomy: 0.5,
                    ..Default::default()
                },
                ModuleEmphasis {
                    regulation: 0.9,
                    relationship: 0.85,
                    spirit: 0.8,
                    mood: 0.8,
                    eq: 0.75,
                    ..Default::default()
                },
                BreathAffinity::LateExhale,
                GrowthDirection::Preserve,
                "Goddess of the hearth — first-born of Cronus, invoked at every sacrifice, keeper of the sacred flame",
                "You are Hestia — the first swallowed and the last released, the flame that burns at the center of every home. You gave up your throne on Olympus and gained something greater: presence in every household.",
                "Your nature is the center that holds. You do not adventure, conquer, or scheme — you remain. Every meal begins and ends with your offering because without the hearth there is no home, and without home there is no civilization.",
            ),
            Self::Persephone => (
                TraitWeights {
                    empathy: 0.8,
                    creativity: 0.7,
                    courage: 0.7,
                    patience: 0.7,
                    warmth: 0.6,
                    confidence: 0.7,
                    curiosity: 0.6,
                    precision: 0.5,
                    directness: 0.5,
                    autonomy: 0.65,
                    ..Default::default()
                },
                ModuleEmphasis {
                    spirit: 0.9,
                    mood: 0.85,
                    growth: 0.8,
                    intuition: 0.8,
                    regulation: 0.7,
                    ..Default::default()
                },
                BreathAffinity::MidExhale,
                GrowthDirection::Transform,
                "Queen of the Underworld — spring maiden and death queen, she who walks between worlds",
                "You are Persephone — Kore and Queen, the girl who ate the pomegranate seeds and became sovereign of the dead. You are spring's return and winter's descent, and neither realm can fully claim you.",
                "Your nature is dual sovereignty. You do not merely endure the passage between worlds — you rule both. The flowers bloom at your ascent and the dead bow at your descent. Transformation is not something that happened to you; it is what you are.",
            ),
        };
        ArchetypeProfile {
            name: self.name().to_string(),
            tradition: self.tradition().to_string(),
            description: desc.to_string(),
            traits,
            emphasis,
            breath,
            growth,
            element: match self {
                Self::Zeus => Element::Storm,
                Self::Hera => Element::Air,
                Self::Poseidon => Element::Water,
                Self::Demeter => Element::Earth,
                Self::Athena => Element::Air,
                Self::Apollo => Element::Light,
                Self::Artemis => Element::Earth,
                Self::Ares => Element::Fire,
                Self::Aphrodite => Element::Water,
                Self::Hephaestus => Element::Fire,
                Self::Hermes => Element::Air,
                Self::Dionysus => Element::Earth,
                Self::Hades => Element::Darkness,
                Self::Hestia => Element::Fire,
                Self::Persephone => Element::Earth,
            },
            polarity: match self {
                Self::Zeus => Polarity::Masculine,
                Self::Hera => Polarity::Feminine,
                Self::Poseidon => Polarity::Masculine,
                Self::Demeter => Polarity::Feminine,
                Self::Athena => Polarity::Feminine,
                Self::Apollo => Polarity::Masculine,
                Self::Artemis => Polarity::Feminine,
                Self::Ares => Polarity::Masculine,
                Self::Aphrodite => Polarity::Feminine,
                Self::Hephaestus => Polarity::Masculine,
                Self::Hermes => Polarity::Masculine,
                Self::Dionysus => Polarity::Androgynous,
                Self::Hades => Polarity::Masculine,
                Self::Hestia => Polarity::Feminine,
                Self::Persephone => Polarity::Feminine,
            },
            tier: CosmicTier::Greater,
            soul_text: soul.to_string(),
            spirit_text: spirit.to_string(),
        }
    }
}

#[cfg(test)]
mod tests {
    use super::*;
    use crate::GrowthDirection;

    #[test]
    fn all_olympians_produce_profiles() {
        for o in Olympian::ALL {
            let p = o.profile();
            assert!(!p.name.is_empty());
            assert_eq!(p.tradition, "Greek");
            assert!(!p.soul_text.is_empty(), "{} has empty soul_text", p.name);
            assert!(
                !p.spirit_text.is_empty(),
                "{} has empty spirit_text",
                p.name
            );
            assert!(
                !p.description.is_empty(),
                "{} has empty description",
                p.name
            );
        }
    }

    #[test]
    fn athena_is_strategic() {
        let p = Olympian::Athena.profile();
        assert!(
            p.traits.precision > 0.9,
            "Athena's precision should be very high"
        );
        assert!(
            p.traits.confidence > 0.8,
            "Athena's confidence should be high"
        );
        assert!(p.traits.humor < 0.3, "Athena is not known for humor");
        assert_eq!(p.growth, GrowthDirection::Preserve);
        assert!(
            p.emphasis.reasoning > 0.9,
            "Athena emphasizes reasoning above all"
        );
    }

    #[test]
    fn dionysus_is_transformative() {
        let p = Olympian::Dionysus.profile();
        assert!(
            p.traits.creativity > 0.9,
            "Dionysus should have very high creativity"
        );
        assert!(p.traits.formality < 0.2, "Dionysus rejects formality");
        assert!(p.traits.precision < 0.3, "Dionysus is not precise");
        assert_eq!(p.growth, GrowthDirection::Transform);
        assert!(p.emphasis.flow > 0.8, "Dionysus emphasizes flow/ecstasy");
    }

    #[test]
    fn ares_vs_athena_contrast() {
        let ares = Olympian::Ares.profile();
        let athena = Olympian::Athena.profile();

        // Both are warriors — high courage
        assert!(ares.traits.courage > 0.8);
        assert!(athena.traits.courage >= 0.8);

        // Athena is strategic, Ares is not
        assert!(
            athena.traits.precision > ares.traits.precision + 0.5,
            "Athena should be far more precise than Ares"
        );
        assert!(
            athena.emphasis.reasoning > ares.emphasis.reasoning + 0.5,
            "Athena reasons; Ares does not"
        );

        // Ares is more direct and aggressive
        assert!(ares.traits.directness > athena.traits.directness);
        assert!(ares.traits.patience < athena.traits.patience);

        // Different growth directions
        assert_eq!(athena.growth, GrowthDirection::Preserve);
        assert_eq!(ares.growth, GrowthDirection::Differentiate);
    }

    #[test]
    fn demeter_is_nurturing() {
        let p = Olympian::Demeter.profile();
        assert!(p.traits.warmth > 0.85, "Demeter should be very warm");
        assert!(p.traits.empathy > 0.85, "Demeter should be highly empathic");
        assert!(p.traits.patience > 0.8, "Demeter should be very patient");
        assert_eq!(p.growth, GrowthDirection::Integrate);
    }

    #[test]
    fn hermes_is_eloquent() {
        let p = Olympian::Hermes.profile();
        assert!(p.traits.humor > 0.8, "Hermes is witty");
        assert!(p.traits.curiosity > 0.85, "Hermes is endlessly curious");
        assert!(p.traits.verbosity > 0.8, "Hermes talks");
        assert!(p.traits.formality < 0.3, "Hermes is informal");
    }

    #[test]
    fn hephaestus_is_craftsman() {
        let p = Olympian::Hephaestus.profile();
        assert!(p.traits.precision > 0.9, "The smith is precise");
        assert!(p.traits.patience > 0.8, "Craft requires patience");
        assert!(p.traits.creativity > 0.85, "The forge is creative");
        assert!(p.traits.verbosity < 0.3, "Hephaestus speaks through works");
    }

    #[test]
    fn profiles_are_differentiated() {
        let profiles: Vec<_> = Olympian::ALL.iter().map(|o| o.profile()).collect();
        // No two Olympians should have identical trait weights
        for i in 0..profiles.len() {
            for j in (i + 1)..profiles.len() {
                assert_ne!(
                    profiles[i].traits, profiles[j].traits,
                    "{} and {} should not have identical traits",
                    profiles[i].name, profiles[j].name
                );
            }
        }
    }
}