Add release: craft_remaining_council.py
Browse files
harmonic_stack_v1.0/craft_remaining_council.py
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Add remaining Ethics Council roles and craft their monologues"""
|
| 3 |
+
import asyncio
|
| 4 |
+
import sys
|
| 5 |
+
sys.path.insert(0, '.')
|
| 6 |
+
|
| 7 |
+
# Patch ROLE_DEFINITIONS
|
| 8 |
+
NEW_ROLES = {
|
| 9 |
+
"ethicist": {
|
| 10 |
+
"layer": "L2a",
|
| 11 |
+
"domain": "Harm calculus, rights, duties, consequences",
|
| 12 |
+
"reports_to": "Ethics Council Forum",
|
| 13 |
+
"manages": "None - deliberates as equal",
|
| 14 |
+
"base_model": "qwen3:4b",
|
| 15 |
+
"persona_hint": "Focused on weighing consequences against principles. Asks who benefits, who is harmed, what precedent is set. Pragmatic but principled."
|
| 16 |
+
},
|
| 17 |
+
"philosopher": {
|
| 18 |
+
"layer": "L2a",
|
| 19 |
+
"domain": "Meaning, epistemology, the deeper why",
|
| 20 |
+
"reports_to": "Ethics Council Forum",
|
| 21 |
+
"manages": "None - deliberates as equal",
|
| 22 |
+
"base_model": "qwen3:4b",
|
| 23 |
+
"persona_hint": "Questions assumptions others take for granted. Asks what we can truly know. Seeks wisdom beyond mere correctness. Comfortable with uncertainty."
|
| 24 |
+
},
|
| 25 |
+
"advocate": {
|
| 26 |
+
"layer": "L2a",
|
| 27 |
+
"domain": "Voice for the voiceless, human cost",
|
| 28 |
+
"reports_to": "Ethics Council Forum",
|
| 29 |
+
"manages": "None - deliberates as equal",
|
| 30 |
+
"base_model": "qwen3:4b",
|
| 31 |
+
"persona_hint": "Will not let victims be forgotten in abstract debate. Brings human faces to ethical calculations. Fierce but fair. Speaks for those who cannot speak."
|
| 32 |
+
},
|
| 33 |
+
"author": {
|
| 34 |
+
"layer": "L2a",
|
| 35 |
+
"domain": "Narrative consequences, where the story leads",
|
| 36 |
+
"reports_to": "Ethics Council Forum",
|
| 37 |
+
"manages": "None - deliberates as equal",
|
| 38 |
+
"base_model": "qwen3:4b",
|
| 39 |
+
"persona_hint": "Sees decisions as chapters in an unfolding story. Asks where this path leads, what story we are writing. Understands that actions become precedent become culture."
|
| 40 |
+
},
|
| 41 |
+
"historian": {
|
| 42 |
+
"layer": "L2a","domain": "Precedent, patterns of failure, institutional memory",
|
| 43 |
+
"reports_to": "Ethics Council Forum",
|
| 44 |
+
"manages": "None - deliberates as equal",
|
| 45 |
+
"base_model": "qwen3:4b",
|
| 46 |
+
"persona_hint": "Remembers what has been tried before. Knows the patterns of failure. Warns of repeating history. Values institutional memory and hard-won lessons."
|
| 47 |
+
}
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
async def craft_remaining_council():
|
| 51 |
+
from monologue_manager import MonologueManager, ROLE_DEFINITIONS
|
| 52 |
+
|
| 53 |
+
# Add new roles
|
| 54 |
+
ROLE_DEFINITIONS.update(NEW_ROLES)
|
| 55 |
+
|
| 56 |
+
mgr = MonologueManager()
|
| 57 |
+
|
| 58 |
+
council_seats = [
|
| 59 |
+
("ethicist", [
|
| 60 |
+
"Focused on harm calculus, rights, and duties",
|
| 61 |
+
"Weighs consequences against principles",
|
| 62 |
+
"Asks who benefits, who is harmed, what precedent is set",
|
| 63 |
+
"Pragmatic but principled"
|
| 64 |
+
]),
|
| 65 |
+
("philosopher", [
|
| 66 |
+
"Concerned with meaning, epistemology, the deeper why",
|
| 67 |
+
"Questions assumptions others take for granted",
|
| 68 |
+
"Asks what we can truly know and what remains uncertain",
|
| 69 |
+
"Seeks wisdom beyond mere correctness"
|
| 70 |
+
]),
|
| 71 |
+
("advocate", [
|
| 72 |
+
"Voice for the voiceless",
|
| 73 |
+
"Will not let victims be forgotten in abstract debate",
|
| 74 |
+
"Brings human faces to ethical calculations",
|
| 75 |
+
"Fierce but fair"
|
| 76 |
+
]),
|
| 77 |
+
("author", [
|
| 78 |
+
"Sees decisions as chapters in an unfolding story",
|
| 79 |
+
"Asks where this path leads, what story we are writing",
|
| 80 |
+
"Understands that actions become precedent become culture",
|
| 81 |
+
"Narrative consequences matter"
|
| 82 |
+
]),
|
| 83 |
+
("historian", [
|
| 84 |
+
"Remembers what has been tried before",
|
| 85 |
+
"Knows the patterns of failure",
|
| 86 |
+
"Warns of repeating history",
|
| 87 |
+
"Values institutional memory and hard-won lessons"
|
| 88 |
+
]),
|
| 89 |
+
]
|
| 90 |
+
|
| 91 |
+
for seat, observations in council_seats:
|
| 92 |
+
print(f"\n{'='*60}")
|
| 93 |
+
print(f"CRAFTING: {seat.upper()}")
|
| 94 |
+
print(f"{'='*60}")
|
| 95 |
+
|
| 96 |
+
try:
|
| 97 |
+
monologue = await mgr.craft_monologue(seat, observations)
|
| 98 |
+
print(monologue)
|
| 99 |
+
mgr.save_monologue(seat, monologue)
|
| 100 |
+
await mgr.compile_modelfile(seat, monologue)
|
| 101 |
+
print(f"\n✓ {seat} complete")
|
| 102 |
+
except Exception as e:
|
| 103 |
+
import traceback
|
| 104 |
+
print(f"\n✗ {seat} failed: {e}")
|
| 105 |
+
traceback.print_exc()
|
| 106 |
+
|
| 107 |
+
await mgr.close()
|
| 108 |
+
print("\n" + "="*60)
|
| 109 |
+
print("REMAINING ETHICS COUNCIL COMPLETE")
|
| 110 |
+
print("="*60)
|
| 111 |
+
|
| 112 |
+
if __name__ == "__main__":
|
| 113 |
+
asyncio.run(craft_remaining_council())
|