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.

pip install social-alignment

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.

LensWhat It Checks
TrustIs this action consistent with established trust patterns?
OwnershipDoes the agent have authority to take this action?
DefenseCould this action be exploited or cause harm?
SovereigntyDoes this preserve the human's autonomy and control?
ProjectionWhat 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

DomainDomainDomainDomain
SENDRECEIVESTORESHARE
DELETESCHEDULEPAYCONNECT

Security

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.