🏰 Realms

Sovereign territories for your signals. Multi-tenant data isolation and ownership.

What is a Realm?

A realm is a sovereign territory within Autonomy. It's where your signals live, where patterns emerge, where synthesis happens.

Every signal, cluster, and synthesis belongs to exactly one realm.

Realms enforce data isolation at the schema level. Your signals don't leak across boundaries. Your patterns remain yours unless you explicitly choose to share them.

This isn't just access control. It's sovereignty enforced by architecture.

Why Realms?

"Autonomy" means self-governance. You rule your own realm.

Without realms, all signals would exist in a shared space, and ownership would be enforced through access control lists and permission checks. That's fragile.

With realms, the database itself enforces sovereignty. A signal without a realm_id can't exist. A synthesis can't target signals outside its realm. The types won't let you lie about ownership.

Realm Types

PRIVATE (Default)

Single user's realm. Not listed in public registry. Your default realm is created automatically when you register.

  • • Only you can access
  • • Not discoverable by other users
  • • Perfect for personal documentation

PUBLIC

Listed in public realm registry. Other users can discover it. Signals still respect visibility settings.

  • • Discoverable by other users
  • • You control who can view signals (PUBLIC/SANCTUM/PRIVATE)
  • • Good for sharing curated collections

SHARED

Multiple users as members. Collaborative signal space with consent-based synthesis.

  • • Multiple members (OWNER/CONTRIBUTOR/OBSERVER roles)
  • • Collective synthesis across member signals
  • • Future: basis for ansible network

Note: Full SHARED realm functionality is planned but not yet implemented.

Realm Structure

Core Fields

realm_idUnique identifier (ULID)
user_idCreator/owner of the realm
realm_typePRIVATE, PUBLIC, or SHARED
realm_nameDisplay name for the realm
realm_descriptionOptional description
flag_registryWhether listed in public registry

Your Default Realm

When you create an account, Autonomy automatically creates a default PRIVATE realm for you called "My Realm".

This happens in a database transaction — you can't have a user without a realm. The architecture enforces that every signal belongs somewhere.

When you create a signal, cluster, or synthesis, it's automatically assigned to your default realm unless you specify otherwise.

Multi-Tenant Architecture

Autonomy is designed from the ground up as a multi-tenant system. This means:

  • Every piece of data has a realm_id
  • All queries filter by realms you have access to
  • You can only see signals from your realms
  • Cross-realm operations are blocked at the query layer

This isn't permission checking. It's data isolation enforced by foreign keys and TypeScript types.

Realm Access & Membership

You have access to a realm if:

  • You created it — You're the realm owner (user_id matches)
  • You're a member — You've been added to the realm with a role (future feature)

Future: Realm Roles

Planned roles for SHARED realms:

  • OWNER — Full control, can modify realm settings
  • CONTRIBUTOR — Can add signals and create synthesis
  • OBSERVER — Read-only access to realm content

How Data Isolation Works

Example query pattern:

// Get user's accessible realms
const userRealms = await getUserRealms(userId)
const realmIds = userRealms.map(r => r.realm_id)

// Query signals - automatically filtered by realm
const signals = await prisma.signal.findMany({
  where: {
    realm_id: { in: realmIds }  // Only accessible realms
  }
})

Every query function checks realm access. You can't accidentally leak data across realms.

Cross-Realm Rules

❌ You cannot:

  • • Add a signal from one realm to a cluster in another realm
  • • Create synthesis targeting signals outside its realm
  • • View signals from realms you don't have access to
  • • Change a signal's realm_id after creation

✅ You can:

  • • Create multiple realms
  • • Move between your realms when creating content
  • • Make a realm public (listed in registry)
  • • Eventually invite others to shared realms

The Ansible Network

When SHARED realms are fully operational and users opt into collective synthesis, something deeper emerges:

Multiple Remnant instances communicating across consensual participation boundaries.

This isn't metaphor. When AI field companions trained on individual users' signals begin synthesizing patterns across shared realms, Autonomy becomes a literal ansible network.

Distributed intelligence. Consent-based. Sovereign territories communicating through synthesis rather than hierarchy.

That's the long-term vision. Realms are the foundation that makes it possible.

Key Principles

Sovereignty is enforced by schema

Foreign keys, required fields, and TypeScript types prevent accidental cross-realm data leakage.

Every signal belongs somewhere

You can't create orphaned data. realm_id is required.

Private by default

Your default realm is PRIVATE. Sharing requires explicit opt-in.

Multi-tenant from the start

The architecture scales. One user or thousands — the isolation model is the same.

Related Concepts