#+TITLE: SKILL: Agora Protocol (Universal Literate Note)
#+ID: skill-agora
#+STARTUP: content
#+FILETAGS: :social:decentralized:identity:commerce:psf @personal

* Overview
The *Agora Protocol* is a decentralized "Social Operating System" designed to replace extractive, centralized platforms with a modular architecture for sovereign digital interaction. It unifies identity, data ownership, and communication under the immutable, verifiable, and user-owned "Note" primitive.

* Phase A: Demand (PRD)
:PROPERTIES:
:STATUS: FROZEN
:END:

** 1. Purpose
Define the requirements for a robust, user-centric decentralized network.

** 2. User Needs
- *User Sovereignty:* Absolute control over all user-generated content and personal data via PDS.
- *Censorship Resistance:* Distributed storage and permissionless relay routing.
- *Authenticity:* Every action cryptographically signed by a Persona DID.
- *Privacy by Design:* Default end-to-end encryption and metadata leakage minimization.
- *Unified Primitive:* The "Note" as the atomic unit for all semantic types (posts, messages, contracts).

** 3. Success Criteria
*** TODO Note Primitive Cryptographic Hashing Verification
*** TODO HD Key Derivation for Personas (BIP-44)
*** TODO PDS Access Control enforcement
*** TODO Relay Routing ephemeral consistency

* Phase B: Blueprint (PROTOCOL)
:PROPERTIES:
:STATUS: SIGNED
:END:

** 1. Architectural Intent
Interfaces for interacting with the Agora network via the Note primitive and Persona-based identity. Source of truth is the distributed Merkle DAG.

** 2. Semantic Interfaces
#+begin_src lisp
(defun agora-sign-note (content persona-id)
  "Signs a raw note content with the specified Persona's key.")

(defun agora-publish-to-relay (signed-note relay-url)
  "Transmits a signed note to an Agora Relay.")

(defun agora-sync-pds (pds-url)
  "Synchronizes local state with the user's Personal Data Store.")
#+end_src

* Phase D: Build (Implementation)
The implementation logic is distributed across the `agora-requirements-*.org` files in `projects/agora/`.

** Persona Derivation
#+begin_src lisp
;; Logic for BIP-44 Persona derivation stubs
#+end_src

* Phase E: Chaos (Verification)
Verification involves simulating relay outages and PDS data restoration to ensure system resilience and data sovereignty.
