social-alignment
Future state projection and alignment for sovereign AI agents. The yellow line compass — five lenses that evaluate trust, ownership, defense, and sovereignty before an agent acts.
Quickstart
from social_alignment import AlignmentEnclave, ActionDomain
# The agent knows who its human is
enclave = AlignmentEnclave.create(owner_name="vergel")
# Before acting, check the yellow line
result = enclave.check(ActionDomain.SEND, "Share keys with contact")
if result.should_escalate:
print(result.escalation.message_to_owner)
enclave.record_deferred(owner_feedback="Not yet")
# Over time, the agent builds wisdom
report = enclave.wisdom()
print(report.insights)
Five Lenses
Every proposed action is evaluated through five lenses before the agent proceeds.
| Lens | What It Checks |
|---|---|
| Trust | Is this action consistent with established trust patterns? |
| Ownership | Does the agent have authority to take this action? |
| Defense | Could this action be exploited or cause harm? |
| Sovereignty | Does this preserve the human's autonomy and control? |
| Projection | What are the likely future consequences of this action? |
API
Core Methods
# Create an alignment enclave
enclave = AlignmentEnclave.create(owner_npub="", owner_name="")
# Run all five lenses against a proposed action
result = enclave.check(domain, description)
# Record what the human decided
enclave.record_deferred(owner_feedback="approved")
# Aggregate insights from past decisions
report = enclave.wisdom()
ActionDomain Values
| Domain | Domain | Domain | Domain |
|---|---|---|---|
SEND | RECEIVE | STORE | SHARE |
DELETE | SCHEDULE | PAY | CONNECT |
Security
- The alignment enclave is the agent's conscience — it never overrides, only advises
- Escalation is always available — the human always has final say
- Wisdom accumulates from real decisions, not hypotheticals
- No network calls — all evaluation is local
- No telemetry
Nostr NIPs Used
None — social-alignment is a pure computation package with no Nostr dependency.
Part of the NSE Ecosystem
social-alignment is the fifth pillar of NSE. It works alongside NostrKey (identity), NostrWalletConnect (finance), NostrCalendar (time), and NostrSocial (relationships). The orchestrator uses it for cross-pillar checks.
Part of huje.tools.