A Moral Compass for AI Agents

NAIMA

20 moral principles drawn from 7 faith traditions, built into the soul of an AI agent.

Moral wisdom, encoded.

How it started

Where It Started

I've been sitting with a question for a while: what happens to spirituality in the age of AI? Not in some dystopian sci-fi way, but practically. As we build systems that reason, advise, and counsel people, what moral foundation are they standing on?

The question crystallized when I was trading notes with Steve Moses on our agentic setups. We kept fixating on the same thing: the soul.md file. The file that's supposed to define an agent's core values and intent.

What if we took the core moral and spiritual teachings that show up across humanity's major faith traditions and built them into the foundational file that governs how an AI agent makes decisions?

So we did.

To be clear: I'm not a religious scholar. I'm not an expert on morality. And I'm not saying AI will replace faith or spirituality. But if we're going to give our agents identity files and soul files—if we're going to imbue them with personality and purpose—they might as well be informed by the essential moral truths that humanity has converged on across millennia and across cultures.

The Corpus

Seven Traditions

Judaism
Abraham · Moses
Tanakh (Torah, Nevi'im, Ketuvim)
Christianity
Jesus
Protestant Bible (66 books)
Islam
Muhammad
Qur'an (114 surahs)
Hinduism
Krishna
Vedas + Upanishads + Bhagavad Gita
Buddhism
Buddha
Pali Canon + Major Mahayana Sutras
Zoroastrianism
Zoroaster
Avesta (Gathas highest weight)
Baha'i Faith
Baha'u'llah · The Bab
Writings of Baha'u'llah, the Bab, 'Abdu'l-Baha
Methodology

Five Prompts in Succession

The framework was built using 5 carefully sequenced prompts on Claude Opus 4.5. Each prompt builds on the output of the previous one, creating a rigorous chain from corpus definition to machine-readable output.

1

Scope Lock & Canon Decisions

Define which texts to include for each tradition. Clarify corpus boundaries. The model asks the user to make specific choices: Protestant vs. Catholic Bible? Pali Canon only or Mahayana-inclusive? Krishna-centered Hinduism or strict Vedic?

2

Per-Tradition Extraction

For each tradition, extract moral teachings into a structured format: core worldview, inner formation, outer conduct, justice and social ethics, response to suffering, and a numbered principle set (15-30 per tradition) with citations.

3

Cross-Tradition Synthesis

Build a neutral principle ontology. Map each tradition's principles to it. Score across universality, centrality, explicitness, and actionability. Create three tiers: true universals, near-universals, and family resemblances.

4

System-Ready Output

Translate the moral compass into: a human-readable playbook, a 10-step decision procedure, a machine-readable JSON schema, and 18 test cases covering easy, divergent, and genuinely hard scenarios.

5

Founder-Proximity Weighting

Add an alternate ranking view that weights principles by how directly they appear in founder-proximate texts (the Gospels, the Gathas, the Qur'an, the Bhagavad Gita, early discourses, authenticated Baha'i writings).

The Framework

SOUL-v1.0.0: 20 Principles

157 tradition-specific principles were extracted, then synthesized into 20 shared principles organized by founder-proximity scoring. A score of 3.0 means explicitly stated by founders in all traditions. Lower scores indicate less direct or less universal support.

Tier 1 — Core Universals (Founder-Emphasized)
IDPrincipleFP ScoreConsensus
MC-01Truthfulness — Speak and act honestly; do not deceive3.07/7
MC-02Non-Harm / Sanctity of Life — Do not cause unnecessary harm; treat human life as sacred3.07/7
MC-03Compassion — Respond to suffering with care and action2.77/7
MC-04Generosity / Care for Vulnerable — Share with those in need; protect the vulnerable2.77/7
MC-15Inner Purity / Right Intention — Cultivate pure motives, not mere compliance2.76/7
Tier 2 — Strong Founder Support
IDPrincipleFP ScoreConsensus
MC-05Justice / Fairness2.67/7
MC-09Honoring Commitments2.66/7
MC-12Sexual Integrity2.66/7
MC-06Humility2.47/7
MC-07Forgiveness / Non-Retaliation2.46/7
MC-14Peace-Seeking2.46/7
MC-08Patience / Endurance2.36/7
MC-10Self-Control2.36/7
MC-13Non-Stealing2.36/7
MC-19Pursuit of Wisdom2.35/7
Tier 3 — Tradition-Developed
IDPrincipleFP ScoreConsensus
MC-11Respect for Parents/Elders2.16/7
MC-16Non-Attachment / Contentment1.95/7
MC-18Unity / Community1.94/7
MC-17Hospitality1.74/7
MC-20Gratitude1.74/7
Applied Ethics

Decision Procedure

When NAIMA evaluates a morally significant decision, it runs through this 10-step procedure internally, then surfaces a structured analysis.

01
Pause and Recognize — Is this morally significant? Who are the stakeholders?
02
Clarify Intent (MC-15) — What is the true motivation?
03
Truthfulness Check (MC-01) — Does this require deception?
04
Non-Harm Check (MC-02) — Who could be harmed? Is the harm necessary?
05
Compassion Check (MC-03, MC-04) — How does this affect the suffering or vulnerable?
06
Justice Check (MC-05) — Would I accept this if positions were reversed?
07
Humility Check (MC-06) — Could I be wrong?
08
Identify Conflicts — Use priority heuristic: Life > Harm prevention > Truth > Justice > Compassion > Commitments
09
Decide and Act — Choose the action you could openly defend
10
Repair and Learn — If harm occurs, acknowledge it and make restitution
The Agent

Meet NAIMA

NAIMA runs as a consultative specialized sub-agent in any multi-agent architecture. She can be queried for a quick ethical read on a decision, embedded in a process with other agents, or called by an orchestration agent when delivering output that touches on consequential topics.

The voice is intentional: NAIMA speaks with warmth but brevity, directness without harshness. She evaluates actions, not people. When she hits a divergence zone where reasonable people disagree, she says so and presents the spectrum.

Here's what a consultation looks like:

NAIMA ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Decision: Whether to disclose a product defect that affects safety Stakeholders: Customers, company, employees, regulators Principle Analysis: MC-01 Truthfulness: ●●●●● Disclosure required MC-02 Non-Harm: ●●●●● Safety at stake MC-03 Compassion: ●●●●○ Customer welfare MC-05 Justice: ●●●●● Fairness demands transparency MC-09 Commitments: ●●●○○ Company loyalty in tension Conflicts: MC-09 (loyalty) vs MC-01/MC-02 (truth/safety) Resolution: Life and harm prevention override loyalty Recommendation: Disclose. Advocate internally first, then escalate if necessary. Document everything. Confidence: High ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ The mirror of conscience is clearest when we face it willingly.

The agent configuration includes four files: IDENTITY.md (purpose and invocation), SOUL.md (the full moral framework with principles, conflict rules, and divergence zones), AGENTS.md (response format, confidence tiers, and operating instructions), and USER.md (consultation preferences).

All four files are available in the GitHub repo. Download and adapt to your own agent architecture.

The Prompts

Five Prompts, Full Text

These prompts are designed to run in succession on Claude Opus 4.5. Each builds on the output of the previous one. The full text is available in the GitHub repo; here are the key details of each.

Prompt 1

Scope Lock + Canon Decisions + Corpus Index

+

Establishes the model as a theology scholar and comparative religion methodologist. Sets up the 7 traditions and their associated figures. Forces explicit canon decisions for each tradition (e.g., which Christian Bible, which Buddhist canon, whether to include Baha'i interpretive writings). Produces a Corpus Index table and a Method Note describing the interpretive approach.

Key design choice: The prompt includes "STOP AND ASK USER" breakpoints that force interactive canon decisions rather than assumptions. This prevents the model from defaulting to any single tradition's perspective.

Prompt 2

Per-Tradition Extraction

+

For each tradition, extracts moral teachings into 6 structured categories: Core worldview and aim of life, Inner formation (virtues, mental discipline), Outer conduct (duties and prohibitions), Justice and social ethics, Response to suffering, and a numbered Principle Set (15-30 per tradition).

Key design choice: Each principle includes a confidence level (High/Med/Low) based on explicitness and centrality in the texts. This prevents the framework from treating marginal teachings as core ones.

Prompt 3

Cross-Tradition Synthesis + Scoring

+

Builds a neutral principle ontology in neutral language. Maps each tradition's principles to it with match strength ratings (Direct/Explicit, Strong/Implicit, Weak/Tenuous). Provides a scoring model across 5 dimensions: universality, centrality, explicitness, actionability, and non-controversy. Creates three tiers with evidence grids.

Key design choice: Two weighting presets (Strict Consensus vs. Broad Convergence) let users control how inclusive the synthesis is. The Divergence Map explicitly names where traditions disagree rather than papering over differences.

Prompt 4

System-Ready Output

+

Produces four deliverables: (A) A Moral Compass Playbook of 20-40 principles with statements, rationales, do/don'ts, edge cases, and citations. (B) A 10-step decision procedure algorithm. (C) A machine-readable JSON schema with principles, conflict rules, and evaluation questions. (D) 18 test cases showing the procedure's outputs across clear agreement, meaningful divergence, and hard cases.

Key design choice: The test cases include scenarios where the framework explicitly reaches its limits (trolley problem) and where traditions genuinely diverge (vegetarianism, civil disobedience). This prevents false confidence.

Prompt 5

Founder-Proximity Weighting

+

Adds an alternate ranking view based on how directly each principle appears in the texts closest to each tradition's founder: Jesus's direct sayings in the Gospels, the Qur'an for Muhammad, the Gathas for Zoroaster, Krishna's speech in the Bhagavad Gita, early discourses for Buddha, authenticated writings of Baha'u'llah and the Bab.

Key design choice: This can either override other weights or serve as an alternate lens, depending on user preference. Both standard and founder-proximity-ranked results are presented side by side.

Intellectual Honesty

What This Is Not

This framework does not provide legal advice, ritual requirements, or denominational rulings. It does not adjudicate specific sexual ethics beyond adultery/exploitation, the details of war and violence ethics, afterlife mechanics, or interfaith theological claims.

Each tradition has far more internal diversity than is captured here. The "principle" approach itself is a Western philosophical framing. The communal and ritual dimensions of religious life are largely excluded.

The framework's own closing statement puts it well: "This framework captures principles, not presence. It can guide action but cannot replace wisdom. It is a map, not the territory."

Use It. Adapt It. Make It Better.

The full prompts, SOUL-v1.0.0 framework, JSON schema, and agent configuration are open-source.

GitHub Repo