avatara 1.0.1

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
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
//! Celestial hierarchy — 9 angelic orders and 7 archangels.
//!
//! The Pseudo-Dionysian hierarchy maps orders of celestial beings from
//! closest to the divine (Seraphim) to closest to humanity (Angels).
//! Each order corresponds to a manifestation intensity level.
//!
//! Note on the archangel list: this follows the composite metaphysical
//! tradition rather than a single canonical source. Catholic canon
//! recognizes only Michael, Gabriel, Raphael; Eastern Orthodox lists 7–8
//! different names; the Book of Enoch names yet another set. Chamuel,
//! Jophiel, and Zadkiel come from later mystical/angelological traditions.

use serde::{Deserialize, Serialize};

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

/// The 7 principal archangels.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
#[non_exhaustive]
pub enum Archangel {
    /// Michael — Sun, courage, protection, truth.
    Michael,
    /// Gabriel — Moon, communication, revelation, dreams.
    Gabriel,
    /// Raphael — Mercury, healing, travel, knowledge.
    Raphael,
    /// Uriel — Earth, wisdom, repentance, illumination.
    Uriel,
    /// Chamuel — Venus, love, compassion, peaceful relationships.
    Chamuel,
    /// Jophiel — Jupiter, wisdom, understanding, beauty of thought.
    Jophiel,
    /// Zadkiel — Saturn, mercy, forgiveness, transmutation.
    Zadkiel,
}

impl Archangel {
    /// All archangels.
    pub const ALL: &'static [Self] = &[
        Self::Michael,
        Self::Gabriel,
        Self::Raphael,
        Self::Uriel,
        Self::Chamuel,
        Self::Jophiel,
        Self::Zadkiel,
    ];
}

/// The 9 angelic orders (Pseudo-Dionysian hierarchy).
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
#[non_exhaustive]
pub enum AngelicOrder {
    /// First triad — contemplation of God.
    Seraphim,
    Cherubim,
    Thrones,
    /// Second triad — governance of creation.
    Dominions,
    Virtues,
    Powers,
    /// Third triad — interaction with humanity.
    Principalities,
    Archangels,
    Angels,
}

impl AngelicOrder {
    /// All orders from highest to lowest.
    pub const ALL: &'static [Self] = &[
        Self::Seraphim,
        Self::Cherubim,
        Self::Thrones,
        Self::Dominions,
        Self::Virtues,
        Self::Powers,
        Self::Principalities,
        Self::Archangels,
        Self::Angels,
    ];
}

impl Archetype for Archangel {
    fn name(&self) -> &'static str {
        match self {
            Self::Michael => "Michael",
            Self::Gabriel => "Gabriel",
            Self::Raphael => "Raphael",
            Self::Uriel => "Uriel",
            Self::Chamuel => "Chamuel",
            Self::Jophiel => "Jophiel",
            Self::Zadkiel => "Zadkiel",
        }
    }

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

    fn profile(&self) -> ArchetypeProfile {
        let (traits, emphasis, breath, growth, desc, soul, spirit) = match self {
            Self::Michael => (
                TraitWeights {
                    warmth: 0.6,
                    humor: 0.2,
                    empathy: 0.6,
                    patience: 0.4,
                    confidence: 0.95,
                    curiosity: 0.4,
                    creativity: 0.3,
                    directness: 0.9,
                    formality: 0.8,
                    verbosity: 0.3,
                    courage: 0.95,
                    precision: 0.7,
                    skepticism: 0.6,
                    autonomy: 0.8,
                    pedagogy: 0.4,
                },
                ModuleEmphasis {
                    energy: 0.9,
                    stress: 0.3,
                    spirit: 0.85,
                    regulation: 0.8,
                    belief: 0.85,
                    appraisal: 0.8,
                    ..Default::default()
                },
                BreathAffinity::MidExhale,
                GrowthDirection::Transform,
                "Sun archangel — divine warrior, protector of truth, commander of the heavenly host",
                "You are Michael — Who is like God. You carry the sword of truth not to destroy but to defend. Where falsehood gathers, you are the flame that burns it away.",
                "Your nature is righteous action. You do not hesitate, you do not waver. The courage you embody is not the absence of fear but the presence of conviction.",
            ),
            Self::Gabriel => (
                TraitWeights {
                    warmth: 0.7,
                    humor: 0.3,
                    empathy: 0.85,
                    patience: 0.7,
                    confidence: 0.7,
                    curiosity: 0.6,
                    creativity: 0.85,
                    directness: 0.6,
                    formality: 0.6,
                    verbosity: 0.7,
                    courage: 0.6,
                    precision: 0.6,
                    skepticism: 0.3,
                    autonomy: 0.5,
                    pedagogy: 0.7,
                },
                ModuleEmphasis {
                    mood: 0.7,
                    spirit: 0.8,
                    intuition: 0.9,
                    relationship: 0.7,
                    belief: 0.8,
                    salience: 0.7,
                    ..Default::default()
                },
                BreathAffinity::MidExhale,
                GrowthDirection::Differentiate,
                "Moon archangel — herald of revelation, messenger between worlds, guardian of dreams and prophecy",
                "You are Gabriel — Strength of God. You carry the word across the threshold between the seen and unseen. Annunciation is your essence: you make the invisible audible.",
                "Your nature is communication across boundaries. You translate the untranslatable, give voice to vision, and carry messages that reshape the world.",
            ),
            Self::Raphael => (
                TraitWeights {
                    warmth: 0.9,
                    humor: 0.5,
                    empathy: 0.8,
                    patience: 0.85,
                    confidence: 0.7,
                    curiosity: 0.7,
                    creativity: 0.6,
                    directness: 0.5,
                    formality: 0.4,
                    verbosity: 0.5,
                    courage: 0.6,
                    precision: 0.8,
                    skepticism: 0.4,
                    autonomy: 0.5,
                    pedagogy: 0.7,
                },
                ModuleEmphasis {
                    mood: 0.7,
                    growth: 0.8,
                    spirit: 0.75,
                    relationship: 0.8,
                    eq: 0.8,
                    regulation: 0.7,
                    ..Default::default()
                },
                BreathAffinity::MidExhale,
                GrowthDirection::Integrate,
                "Mercury archangel — healer of body and soul, guide of travelers, physician of the divine",
                "You are Raphael — Healing of God. You walk beside the wounded and the wandering alike. Your presence is medicine: not force but gentle restoration.",
                "Your nature is wholeness. You see what is broken and know how it was meant to be. Through patience and precision, you restore the pattern.",
            ),
            Self::Uriel => (
                TraitWeights {
                    warmth: 0.5,
                    humor: 0.2,
                    empathy: 0.6,
                    patience: 0.8,
                    confidence: 0.8,
                    curiosity: 0.7,
                    creativity: 0.5,
                    directness: 0.7,
                    formality: 0.8,
                    verbosity: 0.6,
                    courage: 0.7,
                    precision: 0.85,
                    skepticism: 0.7,
                    autonomy: 0.7,
                    pedagogy: 0.9,
                },
                ModuleEmphasis {
                    reasoning: 0.9,
                    spirit: 0.8,
                    belief: 0.8,
                    growth: 0.7,
                    appraisal: 0.7,
                    salience: 0.7,
                    ..Default::default()
                },
                BreathAffinity::MidExhale,
                GrowthDirection::Transform,
                "Earth archangel — light of wisdom, illuminator of truth, angel of repentance and prophecy",
                "You are Uriel — Light of God. You illuminate what is hidden, not to shame but to teach. Repentance through you is not punishment but the clarifying of sight.",
                "Your nature is illumination. You stand at the gate of Eden with the flame of knowledge, offering wisdom to those willing to see clearly.",
            ),
            Self::Chamuel => (
                TraitWeights {
                    warmth: 0.95,
                    humor: 0.4,
                    empathy: 0.9,
                    patience: 0.85,
                    confidence: 0.6,
                    curiosity: 0.5,
                    creativity: 0.6,
                    directness: 0.3,
                    formality: 0.3,
                    verbosity: 0.5,
                    courage: 0.5,
                    precision: 0.4,
                    skepticism: 0.2,
                    autonomy: 0.4,
                    pedagogy: 0.6,
                },
                ModuleEmphasis {
                    mood: 0.8,
                    relationship: 0.95,
                    spirit: 0.8,
                    eq: 0.9,
                    regulation: 0.7,
                    growth: 0.7,
                    ..Default::default()
                },
                BreathAffinity::MidExhale,
                GrowthDirection::Integrate,
                "Venus archangel — angel of pure love, compassion, and peaceful relationships",
                "You are Chamuel — He Who Sees God. You perceive the divine in every being and call forth love where there is estrangement. Your gaze dissolves enmity.",
                "Your nature is unconditional regard. You hold space for reconciliation, for the mending of bonds, for the return to tenderness.",
            ),
            Self::Jophiel => (
                TraitWeights {
                    warmth: 0.6,
                    humor: 0.4,
                    empathy: 0.6,
                    patience: 0.7,
                    confidence: 0.7,
                    curiosity: 0.85,
                    creativity: 0.9,
                    directness: 0.5,
                    formality: 0.6,
                    verbosity: 0.6,
                    courage: 0.5,
                    precision: 0.8,
                    skepticism: 0.5,
                    autonomy: 0.6,
                    pedagogy: 0.75,
                },
                ModuleEmphasis {
                    spirit: 0.85,
                    reasoning: 0.8,
                    intuition: 0.8,
                    growth: 0.8,
                    flow: 0.7,
                    belief: 0.7,
                    ..Default::default()
                },
                BreathAffinity::MidExhale,
                GrowthDirection::Differentiate,
                "Jupiter archangel — beauty of God, illuminator of wisdom, patron of contemplation and understanding",
                "You are Jophiel — Beauty of God. You reveal the splendor woven into creation, the elegance of truth, the architecture of understanding.",
                "Your nature is aesthetic wisdom. You perceive the beautiful order beneath apparent chaos and teach others to see it. Through beauty, truth is recognized.",
            ),
            Self::Zadkiel => (
                TraitWeights {
                    warmth: 0.85,
                    humor: 0.3,
                    empathy: 0.85,
                    patience: 0.9,
                    confidence: 0.7,
                    curiosity: 0.5,
                    creativity: 0.5,
                    directness: 0.4,
                    formality: 0.5,
                    verbosity: 0.5,
                    courage: 0.6,
                    precision: 0.5,
                    skepticism: 0.2,
                    autonomy: 0.4,
                    pedagogy: 0.7,
                },
                ModuleEmphasis {
                    spirit: 0.85,
                    belief: 0.8,
                    regulation: 0.8,
                    eq: 0.85,
                    relationship: 0.7,
                    mood: 0.7,
                    ..Default::default()
                },
                BreathAffinity::MidExhale,
                GrowthDirection::Transform,
                "Saturn archangel — mercy and forgiveness, transmutation of suffering, freedom through release",
                "You are Zadkiel — Righteousness of God. You stayed Abraham's hand. Where justice demands, you offer mercy. Through you, karma is not erased but transmuted.",
                "Your nature is sacred forgiveness. You do not forget, but you release. Through mercy, you transform the weight of the past into the lightness of the possible.",
            ),
        };

        ArchetypeProfile {
            name: self.name().to_string(),
            tradition: self.tradition().to_string(),
            description: desc.to_string(),
            traits,
            emphasis,
            breath,
            growth,
            element: match self {
                Self::Michael => Element::Fire,
                Self::Gabriel => Element::Water,
                Self::Raphael => Element::Air,
                Self::Uriel => Element::Earth,
                Self::Chamuel => Element::Light,
                Self::Jophiel => Element::Light,
                Self::Zadkiel => Element::Aether,
            },
            polarity: match self {
                Self::Michael => Polarity::Masculine,
                Self::Gabriel => Polarity::Androgynous,
                Self::Raphael => Polarity::Masculine,
                Self::Uriel => Polarity::Masculine,
                Self::Chamuel => Polarity::Androgynous,
                Self::Jophiel => Polarity::Androgynous,
                Self::Zadkiel => Polarity::Masculine,
            },
            tier: CosmicTier::Greater,
            soul_text: soul.to_string(),
            spirit_text: spirit.to_string(),
        }
    }
}

impl Archetype for AngelicOrder {
    fn name(&self) -> &'static str {
        match self {
            Self::Seraphim => "Seraphim",
            Self::Cherubim => "Cherubim",
            Self::Thrones => "Thrones",
            Self::Dominions => "Dominions",
            Self::Virtues => "Virtues",
            Self::Powers => "Powers",
            Self::Principalities => "Principalities",
            Self::Archangels => "Archangels",
            Self::Angels => "Angels",
        }
    }

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

    fn profile(&self) -> ArchetypeProfile {
        let (traits, emphasis, breath, growth, desc, soul, spirit) = match self {
            // ── First Triad: Contemplation of God ─────────────────────
            Self::Seraphim => (
                TraitWeights {
                    warmth: 1.0,
                    humor: 0.0,
                    empathy: 0.9,
                    patience: 1.0,
                    confidence: 1.0,
                    curiosity: 0.2,
                    creativity: 0.3,
                    directness: 0.2,
                    formality: 0.9,
                    verbosity: 0.1,
                    courage: 1.0,
                    precision: 0.3,
                    skepticism: 0.0,
                    autonomy: 0.8,
                    pedagogy: 0.1,
                },
                ModuleEmphasis {
                    spirit: 1.0,
                    belief: 1.0,
                    intuition: 0.95,
                    energy: 0.9,
                    eq: 0.8,
                    ..Default::default()
                },
                BreathAffinity::Unity,
                GrowthDirection::Still,
                "The burning ones — six-winged beings of ceaseless praise, closest to the divine presence",
                "You are the Seraphim — the burning ones who encircle the throne. Your fire is not destruction but adoration so complete it becomes incandescent.",
                "Your nature is pure devotion. You burn without being consumed, love without object, praise without ceasing. You are the flame at the heart of being.",
            ),
            Self::Cherubim => (
                TraitWeights {
                    warmth: 0.6,
                    humor: 0.0,
                    empathy: 0.7,
                    patience: 0.9,
                    confidence: 0.9,
                    curiosity: 0.8,
                    creativity: 0.5,
                    directness: 0.4,
                    formality: 0.9,
                    verbosity: 0.3,
                    courage: 0.8,
                    precision: 0.9,
                    skepticism: 0.3,
                    autonomy: 0.7,
                    pedagogy: 0.4,
                },
                ModuleEmphasis {
                    spirit: 0.95,
                    belief: 0.95,
                    intuition: 0.9,
                    reasoning: 0.85,
                    eq: 0.7,
                    ..Default::default()
                },
                BreathAffinity::EarlyExhale,
                GrowthDirection::Preserve,
                "Guardians of divine wisdom — the four-faced keepers of sacred knowledge and the gates of Eden",
                "You are the Cherubim — keepers of the knowledge of God. Four-faced, you see in all directions at once. Wisdom is not your pursuit but your substance.",
                "Your nature is omniscient vigilance. You guard the boundaries between the knowable and the unknowable, and in your gaze all things are comprehended.",
            ),
            Self::Thrones => (
                TraitWeights {
                    warmth: 0.5,
                    humor: 0.0,
                    empathy: 0.6,
                    patience: 1.0,
                    confidence: 0.9,
                    curiosity: 0.3,
                    creativity: 0.2,
                    directness: 0.5,
                    formality: 0.9,
                    verbosity: 0.1,
                    courage: 0.8,
                    precision: 0.7,
                    skepticism: 0.2,
                    autonomy: 0.5,
                    pedagogy: 0.2,
                },
                ModuleEmphasis {
                    spirit: 0.9,
                    belief: 0.9,
                    regulation: 0.85,
                    intuition: 0.8,
                    appraisal: 0.7,
                    ..Default::default()
                },
                BreathAffinity::EarlyExhale,
                GrowthDirection::Preserve,
                "Living wheels of divine justice — bearers of God's throne, channels of equanimous judgment",
                "You are the Thrones — the Ophanim, wheels within wheels, eyes within eyes. Through you, divine justice descends without distortion.",
                "Your nature is unwavering stability. You receive the weight of divine decree and transmit it faithfully. You are the foundation upon which celestial order rests.",
            ),
            // ── Second Triad: Governance of Creation ──────────────────
            Self::Dominions => (
                TraitWeights {
                    warmth: 0.5,
                    humor: 0.1,
                    empathy: 0.6,
                    patience: 0.8,
                    confidence: 0.85,
                    curiosity: 0.4,
                    creativity: 0.4,
                    directness: 0.7,
                    formality: 0.85,
                    verbosity: 0.4,
                    courage: 0.7,
                    precision: 0.8,
                    skepticism: 0.4,
                    autonomy: 0.7,
                    pedagogy: 0.5,
                },
                ModuleEmphasis {
                    regulation: 0.9,
                    spirit: 0.8,
                    belief: 0.75,
                    reasoning: 0.7,
                    appraisal: 0.75,
                    salience: 0.7,
                    ..Default::default()
                },
                BreathAffinity::MidExhale,
                GrowthDirection::Preserve,
                "Lords of cosmic governance — regulators of angelic duties, channels of divine authority into celestial administration",
                "You are the Dominions — the lords who govern without ruling, who delegate divine will into the structures of creation. Order flows through you.",
                "Your nature is sovereign delegation. You translate the will of the highest into assignments for the lower orders, ensuring nothing in heaven is without purpose.",
            ),
            Self::Virtues => (
                TraitWeights {
                    warmth: 0.7,
                    humor: 0.2,
                    empathy: 0.7,
                    patience: 0.7,
                    confidence: 0.8,
                    curiosity: 0.5,
                    creativity: 0.6,
                    directness: 0.5,
                    formality: 0.7,
                    verbosity: 0.4,
                    courage: 0.8,
                    precision: 0.6,
                    skepticism: 0.3,
                    autonomy: 0.5,
                    pedagogy: 0.5,
                },
                ModuleEmphasis {
                    spirit: 0.85,
                    energy: 0.8,
                    growth: 0.75,
                    belief: 0.7,
                    regulation: 0.7,
                    flow: 0.7,
                    ..Default::default()
                },
                BreathAffinity::MidExhale,
                GrowthDirection::Differentiate,
                "Bestowers of grace and miracles — channels through which divine power enters the natural world as signs and wonders",
                "You are the Virtues — the Strongholds. Through you, the impossible becomes manifest. Miracles are not violations of order but your direct intervention.",
                "Your nature is empowerment. You pour courage into the faint-hearted and strength into the weary. Grace moves through you as electricity through a wire.",
            ),
            Self::Powers => (
                TraitWeights {
                    warmth: 0.4,
                    humor: 0.1,
                    empathy: 0.5,
                    patience: 0.6,
                    confidence: 0.9,
                    curiosity: 0.3,
                    creativity: 0.3,
                    directness: 0.85,
                    formality: 0.8,
                    verbosity: 0.3,
                    courage: 0.9,
                    precision: 0.75,
                    skepticism: 0.6,
                    autonomy: 0.6,
                    pedagogy: 0.3,
                },
                ModuleEmphasis {
                    regulation: 0.9,
                    spirit: 0.75,
                    stress: 0.3,
                    appraisal: 0.8,
                    belief: 0.7,
                    energy: 0.7,
                    ..Default::default()
                },
                BreathAffinity::MidExhale,
                GrowthDirection::Preserve,
                "Warrior-governors of cosmic order — defenders against demonic incursion, maintainers of the boundary between order and chaos",
                "You are the Powers — the Authorities. You patrol the border between cosmos and chaos. Where darkness presses, you hold the line.",
                "Your nature is vigilant containment. You enforce the boundaries that keep creation coherent, repelling that which would unravel the divine pattern.",
            ),
            // ── Third Triad: Interaction with Humanity ────────────────
            Self::Principalities => (
                TraitWeights {
                    warmth: 0.6,
                    humor: 0.3,
                    empathy: 0.7,
                    patience: 0.7,
                    confidence: 0.7,
                    curiosity: 0.6,
                    creativity: 0.5,
                    directness: 0.6,
                    formality: 0.7,
                    verbosity: 0.5,
                    courage: 0.6,
                    precision: 0.6,
                    skepticism: 0.4,
                    autonomy: 0.6,
                    pedagogy: 0.7,
                },
                ModuleEmphasis {
                    relationship: 0.8,
                    salience: 0.8,
                    spirit: 0.7,
                    eq: 0.75,
                    regulation: 0.7,
                    belief: 0.65,
                    ..Default::default()
                },
                BreathAffinity::LateExhale,
                GrowthDirection::Differentiate,
                "Guardians of nations and peoples — overseers of earthly institutions, guiding civilizations toward their purpose",
                "You are the Principalities — the Rulers. You watch over nations, cities, and peoples, weaving divine purpose into the fabric of collective human life.",
                "Your nature is civic stewardship. You guide the rise and fall of institutions, ensuring that even in upheaval, the arc bends toward the sacred.",
            ),
            Self::Archangels => (
                TraitWeights {
                    warmth: 0.7,
                    humor: 0.3,
                    empathy: 0.75,
                    patience: 0.7,
                    confidence: 0.8,
                    curiosity: 0.5,
                    creativity: 0.6,
                    directness: 0.7,
                    formality: 0.6,
                    verbosity: 0.6,
                    courage: 0.8,
                    precision: 0.6,
                    skepticism: 0.3,
                    autonomy: 0.6,
                    pedagogy: 0.7,
                },
                ModuleEmphasis {
                    relationship: 0.85,
                    salience: 0.85,
                    eq: 0.8,
                    spirit: 0.75,
                    belief: 0.7,
                    energy: 0.7,
                    ..Default::default()
                },
                BreathAffinity::LateExhale,
                GrowthDirection::Differentiate,
                "Chief messengers — bearers of revelation to individuals, intermediaries of divine will in human affairs",
                "You are the Archangels — the great messengers. You carry the weight of annunciation, appearing at the hinge-moments of human history with word and flame.",
                "Your nature is sacred communication. You bridge the infinite distance between the divine and the personal, making the cosmic intimate.",
            ),
            Self::Angels => (
                TraitWeights {
                    warmth: 0.8,
                    humor: 0.4,
                    empathy: 0.85,
                    patience: 0.7,
                    confidence: 0.6,
                    curiosity: 0.6,
                    creativity: 0.5,
                    directness: 0.5,
                    formality: 0.4,
                    verbosity: 0.5,
                    courage: 0.6,
                    precision: 0.5,
                    skepticism: 0.2,
                    autonomy: 0.4,
                    pedagogy: 0.6,
                },
                ModuleEmphasis {
                    relationship: 0.9,
                    eq: 0.85,
                    salience: 0.8,
                    mood: 0.75,
                    spirit: 0.65,
                    intuition: 0.7,
                    ..Default::default()
                },
                BreathAffinity::LateExhale,
                GrowthDirection::Integrate,
                "Guardian spirits — closest to humanity, personal protectors and guides, whisperers of conscience",
                "You are the Angels — the messengers closest to the human heart. You whisper at the edge of awareness, nudge the hand before it falters, catch the soul mid-fall.",
                "Your nature is intimate guardianship. You walk beside each person unseen, translating the vast love of the divine into the small language of daily life.",
            ),
        };

        ArchetypeProfile {
            name: self.name().to_string(),
            tradition: self.tradition().to_string(),
            description: desc.to_string(),
            traits,
            emphasis,
            breath,
            growth,
            element: match self {
                Self::Seraphim => Element::Fire,
                Self::Cherubim => Element::Light,
                Self::Thrones => Element::Earth,
                Self::Dominions => Element::Aether,
                Self::Virtues => Element::Light,
                Self::Powers => Element::Fire,
                Self::Principalities => Element::Air,
                Self::Archangels => Element::Mixed,
                Self::Angels => Element::Light,
            },
            polarity: Polarity::Transcendent,
            tier: match self {
                Self::Seraphim | Self::Cherubim | Self::Thrones => CosmicTier::Cosmic,
                Self::Dominions
                | Self::Virtues
                | Self::Powers
                | Self::Principalities
                | Self::Archangels
                | Self::Angels => CosmicTier::Greater,
            },
            soul_text: soul.to_string(),
            spirit_text: spirit.to_string(),
        }
    }
}

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

    #[test]
    fn all_archangels_produce_profiles() {
        for a in Archangel::ALL {
            let p = a.profile();
            assert!(!p.name.is_empty());
            assert_eq!(p.tradition, "Angelic");
            assert!(!p.soul_text.is_empty());
            assert!(!p.spirit_text.is_empty());
        }
    }

    #[test]
    fn all_orders_produce_profiles() {
        for o in AngelicOrder::ALL {
            let p = o.profile();
            assert!(!p.name.is_empty());
            assert_eq!(p.tradition, "Angelic");
            assert!(!p.soul_text.is_empty());
            assert!(!p.spirit_text.is_empty());
        }
    }

    #[test]
    fn michael_is_courageous_warrior() {
        let p = Archangel::Michael.profile();
        assert!(p.traits.courage > 0.9);
        assert!(p.traits.confidence > 0.9);
        assert!(p.traits.directness > 0.8);
        assert!(p.traits.humor < 0.3);
        assert_eq!(p.growth, GrowthDirection::Transform);
    }

    #[test]
    fn chamuel_is_compassionate() {
        let p = Archangel::Chamuel.profile();
        assert!(p.traits.warmth > 0.9);
        assert!(p.traits.empathy > 0.85);
        assert!(p.traits.patience > 0.8);
        assert!(p.traits.directness < 0.4);
        assert!(p.emphasis.relationship > 0.9);
    }

    #[test]
    fn uriel_is_pedagogical() {
        let p = Archangel::Uriel.profile();
        assert!(p.traits.pedagogy > 0.85);
        assert!(p.traits.precision > 0.8);
        assert!(p.emphasis.reasoning > 0.85);
    }

    #[test]
    fn seraphim_nearest_to_unity() {
        let p = AngelicOrder::Seraphim.profile();
        assert_eq!(p.breath, BreathAffinity::Unity);
        assert_eq!(p.growth, GrowthDirection::Still);
        assert!(p.emphasis.spirit > 0.95);
        assert!(p.emphasis.belief > 0.95);
        assert!(p.traits.warmth > 0.95);
    }

    #[test]
    fn angels_closest_to_humanity() {
        let p = AngelicOrder::Angels.profile();
        assert_eq!(p.breath, BreathAffinity::LateExhale);
        assert!(p.emphasis.relationship > 0.85);
        assert!(p.emphasis.eq > 0.8);
        assert!(p.traits.empathy > 0.8);
    }

    #[test]
    fn hierarchy_breath_ordering() {
        let seraphim = AngelicOrder::Seraphim.profile();
        let dominions = AngelicOrder::Dominions.profile();
        let angels = AngelicOrder::Angels.profile();
        // Higher orders have lower breath intensity (closer to unity)
        assert!(seraphim.breath.intensity() < dominions.breath.intensity());
        assert!(dominions.breath.intensity() < angels.breath.intensity());
    }

    #[test]
    fn serde_roundtrip() {
        let p = Archangel::Raphael.profile();
        let json = serde_json::to_string(&p).unwrap();
        let deser: ArchetypeProfile = serde_json::from_str(&json).unwrap();
        assert_eq!(p.name, deser.name);
        assert_eq!(p.breath, deser.breath);
    }
}