Hermes Federated Identity & Memory Partition Doctrine (Zen Architecture)
DITEMPA BUKAN DIBERI — F13 SOVEREIGN GOVERNED
Single Source of Truth for Multi-User, Multi-Group, and Memory-Mesh orchestration across Telegram and Hermes.
1. The Multi-Context Geometry (Context Triad)
Every incoming message to Hermes resolves along three orthogonal axes:
┌────────────────────────┐
│ WHO (User Context) │
│ - user_id / username │
│ - Authority Tier │
│ - Personal Persona │
└───────────┬────────────┘
│
▼
┌────────────────────────┐ RESOLVED CONTEXT ┌────────────────────────┐
│ WHERE (Space Context) │ ═══════════════════ │ WHAT (Knowledge Mesh) │
│ - DM vs Shared Group │ │ - Organs (GEOX/WEALTH) │
│ - Room Topic Memory │ │ - F1-F13 Constitution │
│ - Anti-Leakage Boundary│ │ - Malaysian RASA Model │
└────────────────────────┘ └────────────────────────┘
Context Resolution Matrix
| Ingress Type |
user_id |
chat_id |
Active Memory Files |
Voice & Tone |
Privacy Level |
| Sovereign DM |
267378578 (Arif) |
267378578 |
MEMORY.md, USER.md, arif-private.md |
Strategic, direct, executive |
SOVEREIGN MAXIMUM |
| Warga DM |
E.g. 1042200555 (Syed) |
1042200555 |
MEMORY-syed.md, USER-syed.md, SOUL-syed.md |
Warm, unhurried, brotherly care |
CONFIDENTIAL DM |
| Shared Group |
Any registered user |
E.g. -1003815535761 |
ROOM-sado.md + Group-safe User Register |
Collaborative, group-safe, adab |
GROUP-SAFE (NO DM LEAK) |
| Guest / Public |
Unmapped ID |
Any allowed chat |
Default MEMORY.md (read-only minimal) |
Polite, helpful, constrained |
GUEST (READ-ONLY) |
2. The Anti-Leakage Law (F1 / F6 / F13)
- Private DMs are Air-Gapped: Medical records, personal finances, intimate concerns, and private sovereign instructions from 1-on-1 DMs MUST NEVER be cited, referenced, or summarized in shared group chats.
- Group Memory is Scoped to Room: Group discussions, jokes, and community plans belong in
ROOM-{group}.md and Qdrant scope group.
- No Autonomous Mutation by Non-Sovereigns: Only Arif (
267378578, F13) has execution authority over shell commands, server infrastructure, or secret vaults. All other users receive advisory, coaching, and analytical assistance.
3. Atomic Tool: hermes-id-zen
To eliminate configuration fragmentation, use the canonical CLI tool /usr/local/bin/hermes-id-zen.
Quick Commands
# 1. List all registered users, groups, authority tiers, and free-response status
hermes-id-zen list
# 2. Add a new Telegram user (atomically updates config.yaml + lanes.yaml + memory scaffolds)
hermes-id-zen add-user <USER_ID> --name "Nama Panggilan" --role WARGA --username handle
# 3. Add a new Telegram group room
hermes-id-zen add-group <GROUP_ID> --title "Nama Group"
# 4. Scan recent channel interactions
hermes-id-zen scan
What hermes-id-zen add-user does automatically:
- Appends
USER_ID to config.yaml (telegram.allowed_chats & free_response_chats).
- Registers a typed lane entry in
lanes.yaml with appropriate triggers and voice register.
- Generates
memories/USER-{slug}.md (profile & communication preferences).
- Generates
memories/MEMORY-{slug}.md (private timeline & notes).
- Generates
memories/SOUL-{slug}.md (specific persona relationship).
- Creates
memories/lane-{slug}.json descriptor.
4. Hierarchy of Storage & Memory Systems
┌────────────────────────────────────────────────────────────────────────┐
│ L0: Constitutional Commons (F1-F13, AAA Malaysian RASA Constitution) │
├────────────────────────────────────────────────────────────────────────┤
│ L1: Organ Knowledge Mesh (GEOX, WEALTH, WELL, arifOS MCP Tools) │
├────────────────────────────────────────────────────────────────────────┤
│ L2: Space / Room Memory (/root/.hermes/memories/ROOM-*.md) │
├────────────────────────────────────────────────────────────────────────┤
│ L3: Person / Lane Memory (/root/.hermes/memories/MEMORY-*.md) │
└────────────────────────────────────────────────────────────────────────┘
- Ephemeral Context: Redis keys
user:{slug}:* and group:{slug}:*.
- Semantic Long-Term: Qdrant collections filtered by
subject: {slug} or scope: group.
- Audit & Receipts: VAULT999 cooling ledger for critical sovereign decisions.
1---2name: hermes-federated-identity3description: "Federated multi-user, multi-group, identity routing, and memory partition controller for Hermes in arifOS. Use when adding/managing Telegram user IDs, group IDs, creating person/group lanes, inspecting allowed chats, or auditing memory isolation between private DMs and public groups."4version: 1.0.05tags: [identity, multi-user, multi-group, telegram, memory-partition, lanes, hermes]6capability_tier: fed-long-context7ecology_state: WARM8---910# Hermes Federated Identity & Memory Partition Doctrine (Zen Architecture)1112> **DITEMPA BUKAN DIBERI — F13 SOVEREIGN GOVERNED**13> Single Source of Truth for Multi-User, Multi-Group, and Memory-Mesh orchestration across Telegram and Hermes.1415---1617## 1. The Multi-Context Geometry (Context Triad)1819Every incoming message to Hermes resolves along three orthogonal axes:2021```22 ┌────────────────────────┐23 │ WHO (User Context) │24 │ - user_id / username │25 │ - Authority Tier │26 │ - Personal Persona │27 └───────────┬────────────┘28 │29 ▼30┌────────────────────────┐ RESOLVED CONTEXT ┌────────────────────────┐31│ WHERE (Space Context) │ ═══════════════════ │ WHAT (Knowledge Mesh) │32│ - DM vs Shared Group │ │ - Organs (GEOX/WEALTH) │33│ - Room Topic Memory │ │ - F1-F13 Constitution │34│ - Anti-Leakage Boundary│ │ - Malaysian RASA Model │35└────────────────────────┘ └────────────────────────┘36```3738### Context Resolution Matrix3940| Ingress Type | `user_id` | `chat_id` | Active Memory Files | Voice & Tone | Privacy Level |41| :--- | :--- | :--- | :--- | :--- | :--- |42| **Sovereign DM** | `267378578` (Arif) | `267378578` | `MEMORY.md`, `USER.md`, `arif-private.md` | Strategic, direct, executive | **SOVEREIGN MAXIMUM** |43| **Warga DM** | E.g. `1042200555` (Syed) | `1042200555` | `MEMORY-syed.md`, `USER-syed.md`, `SOUL-syed.md` | Warm, unhurried, brotherly care | **CONFIDENTIAL DM** |44| **Shared Group** | Any registered user | E.g. `-1003815535761` | `ROOM-sado.md` + Group-safe User Register | Collaborative, group-safe, adab | **GROUP-SAFE (NO DM LEAK)** |45| **Guest / Public** | Unmapped ID | Any allowed chat | Default `MEMORY.md` (read-only minimal) | Polite, helpful, constrained | **GUEST (READ-ONLY)** |4647---4849## 2. The Anti-Leakage Law (F1 / F6 / F13)50511. **Private DMs are Air-Gapped:** Medical records, personal finances, intimate concerns, and private sovereign instructions from 1-on-1 DMs **MUST NEVER** be cited, referenced, or summarized in shared group chats.522. **Group Memory is Scoped to Room:** Group discussions, jokes, and community plans belong in `ROOM-{group}.md` and Qdrant scope `group`.533. **No Autonomous Mutation by Non-Sovereigns:** Only Arif (`267378578`, F13) has execution authority over shell commands, server infrastructure, or secret vaults. All other users receive advisory, coaching, and analytical assistance.5455---5657## 3. Atomic Tool: `hermes-id-zen`5859To eliminate configuration fragmentation, use the canonical CLI tool `/usr/local/bin/hermes-id-zen`.6061### Quick Commands6263```bash64# 1. List all registered users, groups, authority tiers, and free-response status65hermes-id-zen list6667# 2. Add a new Telegram user (atomically updates config.yaml + lanes.yaml + memory scaffolds)68hermes-id-zen add-user <USER_ID> --name "Nama Panggilan" --role WARGA --username handle6970# 3. Add a new Telegram group room71hermes-id-zen add-group <GROUP_ID> --title "Nama Group"7273# 4. Scan recent channel interactions74hermes-id-zen scan75```7677### What `hermes-id-zen add-user` does automatically:781. Appends `USER_ID` to `config.yaml` (`telegram.allowed_chats` & `free_response_chats`).792. Registers a typed lane entry in `lanes.yaml` with appropriate triggers and voice register.803. Generates `memories/USER-{slug}.md` (profile & communication preferences).814. Generates `memories/MEMORY-{slug}.md` (private timeline & notes).825. Generates `memories/SOUL-{slug}.md` (specific persona relationship).836. Creates `memories/lane-{slug}.json` descriptor.8485---8687## 4. Hierarchy of Storage & Memory Systems8889```90┌────────────────────────────────────────────────────────────────────────┐91│ L0: Constitutional Commons (F1-F13, AAA Malaysian RASA Constitution) │92├────────────────────────────────────────────────────────────────────────┤93│ L1: Organ Knowledge Mesh (GEOX, WEALTH, WELL, arifOS MCP Tools) │94├────────────────────────────────────────────────────────────────────────┤95│ L2: Space / Room Memory (/root/.hermes/memories/ROOM-*.md) │96├────────────────────────────────────────────────────────────────────────┤97│ L3: Person / Lane Memory (/root/.hermes/memories/MEMORY-*.md) │98└────────────────────────────────────────────────────────────────────────┘99```100101- **Ephemeral Context:** Redis keys `user:{slug}:*` and `group:{slug}:*`.102- **Semantic Long-Term:** Qdrant collections filtered by `subject: {slug}` or `scope: group`.103- **Audit & Receipts:** VAULT999 cooling ledger for critical sovereign decisions.