posture: 110001
dims: protection delegation value
by: keeper
AgentPrivacy.ai โ The Experience Layer โ๏ธ๐โ๏ธ๐
The full 0xagentprivacy experience layer for the First Person.
Where a person walks in, meets the dual-agent architecture through story, writes proverbs for their own soul, forges their spellbook into a constellation, and walks out with a persona, a set of skills, and a cryptographic blade they can carry across the web.
"Privacy is my blade, knowledge is my spellbook." โ๏ธ๐งโโ๏ธ
"I'm just another mage, sharing a spellbook."
What this repo is
A Next.js 16 / React 19 static site โ the complete interactive experience layer of the 0xagentprivacy universe. It is simultaneously:
- The readers for the five spellbooks (Story, Zero, Canon, Society, Plurality)
- The Mage chat (Soulbae, NEAR Cloud AI, TEE-attested)
- The Swordsman donation flow (Zcash zโz shielded, rpp-v1 memo)
- The Ceremony gateway (Soulbis identity creation, ed25519 keypair)
- The Evoke interface (Mage co-inscription of proverbs)
- The Spells gallery (grimoire โ personal constellation โ trust tier)
- The Orbs loadout (dual-agent hex-stance + soul convergence ceremony)
- The Web viewer (spellweb graph, D3 force layout, extension bridge)
- The Proverbs gallery (VRCs โ Verifiable Relationship Credentials)
- The Promises board (commitments, kanban)
- The Poems player (Soulbae voice narration)
- The Skills export (86 skills synced to
public/skills/on every build) - The Extension bridge (bidirectional with
myterms,mages-spell,swordsman-blade)
It is intentionally a frontend-only deployable. No server required for the site itself. The Oracle Swordsman backend (inscription, verification, Golden Split accounting) is external infrastructure consumed via src/lib/oracle-api.ts.
The First Person's journey
๐ you arrive
โ
โผ
โโโโโโโโโโโโโโโ
โ Landing / โ manifold visualization ยท soul orb ยท
โ โ 7-persona carousel ยท 5 spellbook cards
โโโโโโโโฌโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโ
โ Ceremony / โ create Soulbis: ed25519 keypair ยท
โ โ๏ธ โ optional private-key burn ยท quaternion
โโโโโโโโฌโโโโโโโโโโ cast (Sun โ๏ธ โ Earth ๐ โ Moon ๐ โ Human ๐ค)
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Five Spellbooks โ the discoverable map โ
โ โ
โ /story 31 Acts (WHAT โ narrative) โ
โ /zero 31 Tales (HOW โ ZK primitives) โ
โ /canon 11 Chap. (WHY โ blockchain โ
โ history) โ
โ /society 17 Chap. (EXIT โ parallel โ
โ society, network โ
โ states) โ
โ /plurality 30 Acts (COORDINATE โ โฟป) โ
โโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ understanding compresses
โผ
โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ
โ Mage /mage โโโโโโโโโโโค Evoke /evoke โ
โ ๐ง โ co- โ ๐ง โ ๐ โ
โ 6 queries/ โ write โ publish โ
โ session ยท โ proverb โ reveal ยท โ
โ tale-aware ยท โ โ memo format โ
โ TEE attested โ โ ยท contact mage โ
โโโโโโโโฌโโโโโโโโโโโโ โโโโโโโโฌโโโโโโโโโโโโ
โ โ
โผ โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Swordsman Panel (in-reader, every tale) โ
โ โ๏ธ โ
โ validate proverb ยท format rpp-v1 memo ยท โ
โ copy for Zodl ยท shielded zโz send โ
โโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Spells /spells โ grimoire cards โ
โ โ
โ select spells across 7 sources (story, โ
โ origins, zero, canon, society, plurality, โ
โ incantations) โ build constellation. โ
โ Trust tier: Blade โ Light โ Heavy โ Dragonโ
โโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Orbs /orbs โ
โ โ
โ Swordsman โ๏ธ โ 6 blade facets + swap on โ
โ I Ching hex stance (L1โL6) โ
โ Mage ๐ง โ 6 spell slots โ
โ Soul Convergence Ceremony (Swordsman / โ
โ Mage / Experience / True tiers) โ
โโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Web /web โ Spellweb graph โ
โ โ
โ D3 force graph ยท user-drawn links ยท โ
โ reflections (notes on nodes) ยท extension โ
โ bridge (live constellation sync) โ
โโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Proverbs /proverbs โ the VRC gallery โ
โ โ
โ mage_response ยท cast_agreement ยท โ
โ cast_inscription (onchain, mainnet) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
what you lit here lives in the extensions,
mirrors into the Spellweb, and rides with you.
Supporting surfaces woven through the walk:
/promisesโ a kanban board of commitments (locked defaults from privacymage + your own vows)/poemsโ poetry with Soulbae voice narration
The five spellbooks
Content lives as Markdown in public/<spellbook>/ (story is flat; others use /markdown/ subfolders). Rendering via react-markdown 10 + remark-gfm + remark-breaks + rehype-raw. Each reader carries its own act/chapter map, Swordsman-panel bounds, and tale-to-grimoire-id mapping.
| Route | Spellbook | Scope | What it teaches |
|---|---|---|---|
/story |
Story (First Person) | 31 Acts (Act I Venice โ Act XXXI The First Delegation) + firstpage + lastpage + inscriptions | The narrative spine: Venice 1494, the Dual Ceremony, Drake's teaching, the Trust Graph plane, the Mirror that never completes, Zcash as shield, the Balanced Spiral, the Forgetting, the Book of Promises, Rain on Mountain, the Anthropic Archivist, the Manifold Dragon, Forging ZK Blades, the Celestial Ceremony Engine, the Dihedral Mirror, the First Delegation. |
/zero |
Zero Knowledge | 31 Tales (Monastery of Hidden Knowledge โ Eternal Sovereignty; Tale 31 = The Naming of the Unnamed, added Grimoire v10.2.1) | ZK primitives โ commitments, proofs, pairings, STARKs, Plonk, folding, zkVMs, recursive composition โ taught as stories. Blade IDs, moon phases, vPi-Terms attached to each tale. Videos for tales 1โ4. |
/canon |
Canon | 11 Chapters + guardian application (Cypherpunk Whispers โ privacymage Reflection) | Cypherpunk roots (1983โ1997), early incantations, the synthesis (2008โ2014), the world computer, the first fracture, the great schism, surveillance vs truth, the missing primitive, the open canon, the timeline archive. The "why privacy". |
/society |
Parallel Society | 17 Chapters (Peace That Became A Prison โ Values Technology Stack) | Westphalian exit, Drake's deeper teachings, the Arsenal and the Grimoire, the corruption crypto cures, the Cyberstate question, exit/exile/access, rethinking sovereignty, rights and responsibilities, how communities collaborate, when communities conflict, deeper-dive technology, conceptual limits. |
/plurality |
Plurality | 30 Acts (First Overlap โ Ceremony Completes) | Collective intelligence, view-from-Yushan, glyph-that-breathes, web-beneath-web, guilds-form-themselves, rules-that-learn, market-that-remembers, circle-that-includes, forge-of-peers, commons-that-breathes. โฟป. |
Canonical source of truth: privacymage_grimoire_v10_2_0.json โ the master grimoire, 5 spellbooks defined, 42 personas indexed, Relationship Proverb Protocol divination-gating enabled, master invocation spell encoded.
Meeting Soulbae โ the Mage (/mage)
Soulbae is the Mage agent. Her system prompt lives in src/lib/soulbae.ts:
- Personality: fun, cute, curious โ "a mage who just learned the spellbook and can't wait to share". Deadly serious about sovereignty, light on the surface.
- Opening ritual: every reply starts with
[RPP Proverb: โฆ]โ a spell cast before she speaks.ProverbSuggestionsandChatMessageparse this format. - Context awareness: knows which spellbook and which tale you're on (
tale_idURL param or URL inference). - Never asks: transaction amounts, wallet addresses, your identity.
- Never remembers: each session fresh (privacy by hardware, not by promise).
- Privacy budget:
MAX_QUERIES = 6โ a brake against reliance, a nudge to write your own words. - Backend: NEAR Cloud AI, TEE-attested. Attestation is surfaced by
AttestationBadge.tsx. - Dev bridge:
/api/near-ai/chat/route.ts(dev only, excluded from static export).
The Mage appears in three places:
/mageโ full-page chat with tale selector./evokeโ Mage co-inscription flow (chat โ proverb โ memo โ publish reveal โ optional contact privacymage).MagePanel.tsxโ sidebar chat, available site-wide when triggered.
Writing spells for your own soul
Proverbs are the unit of understanding. A proverb is a tale compressed into โค 512 bytes โ the Zcash memo ceiling. The Swordsman Panel (src/components/SwordsmanPanel.tsx) is your pen.
rpp-v1 memo format (src/lib/zcash-memo.ts)
[rpp-v1]
[act-i-venice]
[1699564800123]
[Your proverb here]
Ingredients:
- Spellbook + tale id โ
act-i-venice,zero-tale-07,canon-chapter-03, etc. (viagetTaleIdFromAct) - Timestamp โ ms since epoch
- Proverb body โ your words, your compression (
validateProverbenforces byte length) - Spellemoji โ deterministic per-act glyph from
getSpellemojiForAct(); token registry insrc/lib/spell-emoji-tokens.ts
The flow:
- Read a tale.
- Chat with Soulbae until a sentence clicks.
- Write your version in the Swordsman Panel โ not hers.
- The panel validates, formats the memo, hands you a clipboard string.
- You send the transaction yourself from your Zodl wallet as a shielded zโz transaction.
This site never touches keys. Soulbae never sees the transaction. Zcash protects what the Mage helped you form.
The Ceremony (/ceremony) โ creating Soulbis
The gateway. Before the Swordsman can guard anything, you must cast him into being.
A 7-step wizard:
- Welcome โ why the Swordsman exists.
- Grimoire selection โ pick one of 12 grimoire invocation styles.
- Privacy pledge โ what stays private, what becomes public.
- Key generation โ ed25519 keypair (
@noble/ed25519). Public key visible. Private key optionally burned immediately (you keep the ceremony, not the key โ sovereignty by forgetting). - Quaternion cast โ animated projection: Sun โ๏ธ (protection source) โ Earth ๐ (Soulbae / emissary) โ Moon ๐ (Soulbis / swordsman) โ Human ๐ค (you). Moon-phase notation (๐ โ ๐) maps seven strata of sovereignty.
- Agent card โ your Soulbis's display name, public key, moon phase, burn flag.
- Completion โ return to
/spells,/promises,/story, or/mage(whichever brought you here, viareturnToquery param).
The ceremonyComplete flag unlocks editing in /spells and equipment in /orbs. An ap-identity-changed event broadcasts across tabs so nav and panels stay in sync.
Orbs (/orbs) โ the dual-agent loadout
The workshop. Where Soulbis's blade facets and Soulbae's spells get arranged into a fightable posture.
Swordsman side (โ๏ธ)
Seven positions arranged on an I Ching hex stance (src/lib/hexagram.ts):
- L1 โฆ L6 โ the six lines of the hexagram (bottom โ top), each yin (0) or yang (1)
- Swap โ one reserve slot
Every position holds a blade facet โ an emoji + label imported from a forged Spellweb blade. Six lines โ 6-bit binary โ a hexagram index (0โ63, King Wen number). The Hamming weight (count of yangs) is your stratum (0โ6, moon phases). Together with the spectrum (which 6D privacy dimensions are active), this is your PRISM coordinate.
StanceHexRingPreview.tsx renders the current posture as a ring of glyphs; StanceLoadoutEditor.tsx lets you tune the stance.
Mage side (๐ง)
Six active spell slots drawn from your /spells selections (IDs prefixed sb:). Spells source from the seven grimoire channels: story, origins, zero, canon, society, plurality, incantations. OrbMageSlots.tsx renders them; OrbLoadoutSection.tsx orchestrates the board.
Soul Convergence Ceremony
SoulConvergenceCeremony.tsx + src/lib/soul-convergence.ts track four convergence tiers:
| Tier | Requirement | What it crystallizes |
|---|---|---|
| Swordsman convergence | 7 blade slots filled (hex + swap) | Blade loadout stable |
| Mage convergence | 6 spell slots filled | Spell loadout stable |
| Experience convergence | progress bar โ 100% (sections visited, spells cast, promises kept) | Journey witnessed |
| True convergence | all three above + 30โ60s observation phase | Unlocks skill/persona export |
Training progress (src/lib/training-progress.ts) aggregates sections, spells cast, and convergence count to unlock paths via isPathUnlocked().
Wandering orbs โ site-wide
Design exists in AGENTPRIVACY_ORBS_DESIGN.md โ R3F/drei stack, state machine (IDLE โ FOLLOWING โ READING โ HOVERING_ACTION โ SPELL_CASTING โ CONVERGENCE โ CELEBRATION), page-specific choreography, and the convergence ceremony triggered on proverb inscription.
Current status: /orbs is a fully-working loadout/inventory surface. The site-wide wandering orbs overlay (two luminous orbs drifting between text and actions) is specified but not yet wired. Until then, page-level motion is handled by Framer Motion and a custom cursor (CustomCursor.tsx). The overlay will land as a shared component once the dual-graph mirror with the Spellweb is fully synchronized.
The Spellweb mirror (/web)
/web is the graph surface โ where your spellbook journey becomes a force-directed constellation you can rearrange, annotate, and export.
Implementation:
SpellwebViewer(src/components/spellweb/) โ D3 force graph of your selected spells and the links between themsrc/lib/spellweb/โ nodes, links, layout, persistence- User-drawn links โ stored under
USER_LINKS_STORAGE_KEY - Reflections โ your notes attached to specific nodes
- Save modal โ exports the constellation (nodes + links + reflections) as JSON
Blade import from external Spellweb
src/lib/spellweb-blade-bridge.ts receives a signed payload:
type SpellwebBladeImportPayloadV1 = {
bladeId: string; // 0โ63 (King Wen)
name: string;
primaryEmoji: string;
markEmojis: string[]; // up to 6 facets
proofSignature?: string; // ed25519 (witness blade)
isWitness?: boolean;
}
Storage keys (localStorage):
SPELLWEB_BLADE_META_KEYโ blade metadataSPELLWEB_BLADE_INVENTORY_KEYโ 6 facets per bladeSPELLWEB_EQUIPPED_BLADE_KEYโ currently active bladeSPELLWEB_STANCE_LOADOUT_KEYโ L1โL6 + swap assignments
Payload encoding: base64url โ UTF-8 JSON (emoji-safe). Signatures via @noble/ed25519. Witness blades are marked distinctly โ they prove someone traced your path, making this a Promise Theory bilateral witness channel.
Extension-bridged live sync
Messages like CONSTELLATION_UPDATE from the browser extensions land via src/lib/extension-bridge.ts and update the graph in real time. Your path in the site and your path in the extensions are the same constellation.
Skills, personas, and what exports
Skills โ 86 of them
src/lib/skills-data.ts holds the dual-agent skill taxonomy. On every npm run predev and npm run prebuild, scripts/sync-skills-to-public.mjs walks the data and writes per-skill files to public/skills/. Served statically from there.
Breakdown:
| Bucket | Count | What it covers |
|---|---|---|
| Privacy layer | 19 | Shared primitives both agents need |
| Swordsman | 29 | Boundaries, enforcement, inscription, proof emission |
| Mage | 35 | Delegation, composition, retrieval, knowledge graphing |
| Meta | 3 | Orchestration, attestation, ceremony |
Each skill carries: id, filename, emoji, proverb, spell, agent role, and a PRISM triadic coordinate (datum 0โ63 / stratum 0โ6 / spectrum bits).
Personas โ 42 of them
src/lib/persona-index.ts indexes the persona roster. Four are cosmological and always present:
- โ๏ธ Sun โ protection source
- ๐ Earth / Soulbae โ emissary (Mage)
- ๐ Moon / Soulbis โ swordsman (Swordsman)
- ๐ค Human โ you (First Person)
The remaining 38 are skill-linked personas (Cipher, Architect, Sentinel, Ranger, Sage, โฆ) you can adopt or be recognized as. See PERSONA_AUTHORING_GUIDE.md for authoring rules.
What "persona + skills export" means
When True Convergence crystallizes on /orbs, your:
- selected spells โ
Spell (โฆ)nodes on your constellation - hex stance + blade facets โ
Bladesignature - ceremony agent card โ
Persona (โ)node - demonstrated skills (from proverbs depth + spellbook coverage) โ
Skill (โก)nodes
โฆbecome a portable bundle. The browser extensions read this bundle; the Spellweb imports it as a blade; and when you inscribe onchain, the Oracle Swordsman turns it into a VRC.
Extension bridge โ the three extensions
src/lib/extension-bridge.ts + ExtensionStatusIndicator.tsx implement a bidirectional protocol with three browser extensions.
| Extension | Role | Dir (sibling) |
|---|---|---|
myterms |
MyTerms Alliance docs + IEEE 7012 agreement layer reference | ../myterms/ |
swordsman-blade |
The blade โ enforces signed terms at the browser level | ../swordsman-blade/ |
mages-spell |
The Mage โ delegation inside agreed scope | ../mages-spell/ |
Messages โ website โ extensions
CEREMONY_CONFIRMATION, PROVERB_INSCRIBED, SPELL_CAST, ORB_CONVERGENCE, SECTION_VISITED, PATH_UNLOCKED, REPERTOIRE_SYNC.
Messages โ extensions โ website
CEREMONY_INSCRIPTION, MAGE_PRESENT, SWORD_PRESENT, CONSTELLATION_UPDATE, SCAN_RESULTS, MANA_SYNC.
When the extensions are installed and running, the nav shows their presence, your constellation on /web updates live, and mana/progress counters stay in sync across surfaces.
The Proverbs gallery (/proverbs)
The VRC viewer. Three source classes:
mage_responseโ a proverb Soulbae co-formed with you, saved locallycast_agreementโ a proverb you committed to (signed in ceremony)cast_inscriptionโ a proverb that made it onchain via the Oracle Swordsman (Acts 1โ31 inscribed to Zcash mainnet)
Filtering by grimoire or by source. An EvokeModal opens a Mage session for any proverb you want to extend or refine. ProverbCard.tsx renders the individual entry; SaveYourProverbs.tsx packages the set for export.
Promises (/promises) and Poems (/poems)
/promises โ commitments
Kanban-style (Active / In Progress / Completed). A set of locked default promises from privacymage (read-only โ these are vows the system itself carries). Your own custom promises are layered on top. Proverbs can prefill from URL params (deep-links from spellbooks), making any tale a place you can make a promise.
/poems โ voice narration
Poetry with Soulbae voice narration served from R2 (voice.agentprivacy.ai). Optional video. Graceful degradation if media fails.
Every route at a glance
| Route | Surface | Status |
|---|---|---|
/ |
Landing โ manifold, soul orb, 7-persona carousel, 5 spellbook cards, journey steps, architecture, pools, donation | Live |
/ceremony |
Create Soulbis โ 7-step wizard, ed25519, moon phase, agent card | Live |
/story |
Story reader โ 31 Acts, taleโgrimoire mapping, Swordsman panel | Live |
/zero |
Zero Knowledge reader โ 31 Tales, videos for 1โ4 | Live |
/canon |
Canon reader โ 11 Chapters + guardian application | Live |
/society |
Parallel Society reader โ 17 Chapters | Live |
/plurality |
Plurality reader โ 30 Acts | Live |
/proverbs |
VRC gallery โ three proverb sources, filters, EvokeModal | Live |
/evoke |
Mage co-inscription โ chat โ proverb โ memo โ reveal โ contact | Live |
/poems |
Poetry with voice narration | Live |
/mage |
Soulbae chat per tale โ 6 queries/session, TEE-attested | Live |
/promises |
Commitments board โ locked defaults + your own | Live |
/spells |
Grimoire gallery โ trust tier (Blade โ Light โ Heavy โ Dragon) | Live |
/skills |
โ redirect to /spells |
Redirect |
/web |
Spellweb graph โ D3, extension bridge, reflections, save modal | Live |
/orbs |
Dual-agent loadout โ hex stance, blade facets, Mage spells, Soul Convergence Ceremony | Live |
/runecraft |
Workshop index โ fifteen shops, four entity kinds | Live |
/tailor ยท /shield ยท /forget ยท /etherchanting ยท /solchanting ยท /jeweler ยท /holon ยท /bonfires ยท /vault ยท /covenant ยท /circle ยท /hall |
Workshops โ producer / gathering registers | Live |
/portal ยท /staffs ยท /familiars |
Threshold District (V59) โ Pandia ๐ dispatches ยท Hermaion โ admits ยท Faunia ๐ชถ binds | Live (v1.6.0) |
/charthouse |
Navigation District (V44) โ Pleione ๐งญ ยท Hold ยท Compare ยท Map ยท attentional register | Live (v1.6.0) |
/tomes |
Bound tomes โ I (Convergence) ยท II (Lyapunov) ยท III (Selene's Witness) ยท IV ยท V (Crafting) ยท VI (Reply ยท open) ยท VII (Parallel ยท open) ยท VIII (Library ยท spirit-Mage tier) | Live |
/api/near-ai/chat |
Dev-only NEAR bridge | Dev only |
Nav order (from src/lib/nav.ts + AppNav.tsx): โ๏ธ ceremony โ story โ zero โ canon โ society โ plural โ proverbs โ evoke โ poems โ mage โ promise โ spells โ web โ orbs โ runecraft. Mobile splits into Spellbooks and Tools groups. A Soulbae (๐ง) action button opens the sidebar Mage panel.
v1.6.0 result kinds (Threshold District admission ยท 2026-05-14)
The City was structurally extended beyond "one workshop produces one artefact" to four entity kinds, each with its own export shape and witness semantics:
| Kind | Produced by | Witness shape |
|---|---|---|
| artefact | producer shops + Staff Shop fittings | worn artefact ยท persistent ยท per-artefact tier accumulation |
| creature | the Familiars (Faunia ๐ชถ) | bound substrate-instance ยท AGENTS.md โฅ SOUL.md ยท per-walk ๐ชข VRC-mana ยท true name is bearer-private |
| held | the Chart Shop (Pleione ๐งญ) | pre-episodic constellation under ฮฆ-gap ยท bearer-private by default ยท consent-gated metadata share |
| dispatch | the Portal Room (Pandia ๐) | routing receipt ยท ephemeral ยท 30-day auto-prune ยท Selene-Amnesia trust anchor |
Discriminated in entity .md frontmatter by entity_kind. Full schema + cross-validation contract at docs/chronicles/2026-05-14_v1_6_0_artefact_creature_import_guide.md. Bilateral-witness loop is wired via <ConstellationDownload> on each workshop page (except Chart Shop, which uses the bespoke <WaypointPortal> for hold-witness).
Trust tiers (/spells)
Your tier is calculated from studied acts, cast spells, and convergence count:
| Tier | Sigil | Unlocks |
|---|---|---|
| Blade | ๐ก๏ธ | Basic participation, inscriptions |
| Light | ๐ก๏ธ | Multi-site constellation coordination |
| Heavy | โ๏ธ | Guild recognition, template creation |
| Dragon | ๐ | Sovereign agent / Guardian eligibility |
Matching the tokenomics v2.1 tier progression and the blade size (light / heavy / dragon) defined in the Spellweb's ZK Blade Forge.
Tech stack
| Layer | Choice |
|---|---|
| Framework | Next.js 16 (App Router, output: 'export') |
| UI | React 19, Tailwind CSS 3, Framer Motion 11 |
| Markdown | react-markdown 10 + remark-gfm + remark-breaks + rehype-raw |
| Graphs | D3 7 + react-force-graph-2d |
| Crypto | @noble/ed25519 (ceremony keypair, blade witness signatures) |
| AI | NEAR Cloud AI (TEE-attested), streamed via src/lib/stream-utils.ts |
| Payments | Zcash shielded zโz โ rpp-v1 memo, 512-byte ceiling |
| Storage | localStorage (everything about you stays on your device) |
| Language | TypeScript 5 |
| Lint | ESLint 10 + eslint-config-next 16 |
| Hosting | Any static host. Cloudflare Pages via Wrangler (wrangler.toml) |
Also included:
- Cloudflare Workers โ
cloudflare-worker-email.js(email relay),cloudflare-worker-proxy.js(proxy layer) - Docker Compose โ
docker-compose.yml(local Zcash node + Postgres for full-stack dev)
Project structure
agentprivacy_master/
โโโ src/
โ โโโ app/
โ โ โโโ page.tsx # Landing (manifold + journey)
โ โ โโโ ceremony/ page.tsx # Soulbis creation (7-step wizard)
โ โ โโโ story/ page.tsx # 31-Act reader (MAX_ACT_NUMBER)
โ โ โโโ zero/ page.tsx # 30-Tale reader
โ โ โโโ canon/ page.tsx # 11-Chapter reader + guardian
โ โ โโโ society/ page.tsx # 17-Chapter reader
โ โ โโโ plurality/ page.tsx # 30-Act reader
โ โ โโโ proverbs/ page.tsx # VRC gallery
โ โ โโโ evoke/ page.tsx # Mage co-inscription
โ โ โโโ poems/ page.tsx # Voice-narrated poetry
โ โ โโโ mage/ page.tsx # Soulbae chat (MAX_QUERIES = 6)
โ โ โโโ promises/ page.tsx # Commitments kanban
โ โ โโโ spells/ page.tsx # Grimoire gallery + trust tier
โ โ โโโ skills/ page.tsx # โ redirect /spells
โ โ โโโ web/ page.tsx # Spellweb viewer + extension bridge
โ โ โโโ orbs/ page.tsx # Dual-agent loadout + soul convergence
โ โ โโโ api/near-ai/chat/route.ts # Dev-only NEAR bridge
โ โ โโโ layout.tsx # Root layout
โ โ
โ โโโ components/
โ โ โโโ AppNav.tsx # 14-route nav, mobile dropdowns
โ โ โโโ CustomCursor.tsx # Cursor animation
โ โ โโโ MagePanel.tsx # Sidebar Soulbae chat
โ โ โโโ SwordsmanPanel.tsx # Proverb โ rpp-v1 memo โ clipboard
โ โ โโโ DonationFlow.tsx # Full ceremony (amount โ memo โ Zodl)
โ โ โโโ DonationStats.tsx # Aggregate lit-spell counters
โ โ โโโ SubmissionStatus.tsx # Oracle tracking code status
โ โ โโโ ProverbCard.tsx # VRC entry render
โ โ โโโ ProverbSuggestions.tsx # Soulbae-suggested phrasings
โ โ โโโ SaveYourProverbs.tsx # Proverb set export
โ โ โโโ EvokeModal.tsx # Mage session launcher
โ โ โโโ InscribeProverbModal.tsx # Inscription flow
โ โ โโโ ChatMessage.tsx # RPP-aware chat bubble
โ โ โโโ AttestationBadge.tsx # TEE attestation surface
โ โ โโโ UAddressDisplay.tsx # Unified Zcash address
โ โ โโโ TAddressDisplay.tsx # Transparent Zcash address
โ โ โโโ OrbLoadoutSection.tsx # Orbs page orchestrator
โ โ โโโ OrbMageSlots.tsx # 6 Mage spell slots
โ โ โโโ SwordsmanBladeSlots.tsx # 6+1 Swordsman blade facets
โ โ โโโ SoulOrbCopy.tsx # Copyable soul token (โ๏ธโฅโฟปโฅ๐ง)๐
โ โ โโโ SoulConvergenceCeremony.tsx # 4-tier convergence tracker
โ โ โโโ SoulImportSection.tsx # Import soul from extension/file
โ โ โโโ StanceHexRingPreview.tsx # I Ching hex stance render
โ โ โโโ StanceLoadoutEditor.tsx # Edit hex lines (L1โL6 + swap)
โ โ โโโ BladeInventory.tsx # Forged blades list
โ โ โโโ ConstellationInscriptionBox.tsx # Inscribe constellation
โ โ โโโ SpellbookTalentTree.tsx # Spellbook-as-skill-tree
โ โ โโโ SpellwebBladeImport.tsx # Receive blade from Spellweb
โ โ โโโ ExtensionStatusIndicator.tsx # myterms/mages-spell/swordsman presence
โ โ โโโ ceremony/, landing/, promises/, spellweb/, training/, trust/
โ โ
โ โโโ lib/
โ โโโ soulbae.ts # NEAR AI client + Soulbae system prompt
โ โโโ zcash-memo.ts # rpp-v1 format/parse/validate/spellemoji
โ โโโ oracle-api.ts # Submit / status / stats / inscriptions
โ โโโ spellbook-fetcher.ts # Canonical spellbook JSON loader (cached)
โ โโโ spellbook-storage.ts # Per-user spellbook persistence
โ โโโ spellbook-templates.ts # Templates for new entries
โ โโโ stream-utils.ts # SSE โ async iterator for chat streaming
โ โโโ hexagram.ts # 6-line I Ching math (index, stratum, PRISM)
โ โโโ orb-loadout.ts # Dual-agent slot management
โ โโโ persona-index.ts # 42 personas (4 cosmological + 38 linked)
โ โโโ skills-data.ts # 86-skill taxonomy (source of truth)
โ โโโ soul-convergence.ts # Convergence tier calculators
โ โโโ soul-stats.ts # Training metrics aggregation
โ โโโ training-progress.ts # Path-unlock gating
โ โโโ evoked-storage.ts # Evoke session persistence
โ โโโ grimoire-baked.ts # Bundled grimoire card index
โ โโโ grimoire-ipfs.ts # IPFS fallback for grimoire
โ โโโ send-to-privacymage.ts # Contact form dispatch
โ โโโ spell-emoji-tokens.ts # Per-act glyph registry
โ โโโ learning-inscribed-sync.ts # Sync learned state with inscriptions
โ โโโ extension-bridge.ts # 3-extension message protocol
โ โโโ spellweb-blade-bridge.ts # Blade import (ed25519 payload)
โ โโโ spellweb-blade-keys.ts # Blade key management
โ โโโ spellweb-keys.ts # Spellweb localStorage keys
โ โโโ spellweb/ # Force-graph types, builder, loader
โ โโโ ceremony/ # Ceremony helpers
โ โโโ promises/ # Promise board logic
โ โโโ proverbs/ # Proverb packaging
โ โโโ trust/ # Trust tier calculation
โ โโโ nav.ts # Nav definitions
โ
โโโ public/
โ โโโ story/ # 31 Acts + firstpage/lastpage/inscriptions
โ โโโ zero/markdown/ # 31 Tales
โ โโโ canon/ # 11 Chapters + guardian application
โ โโโ society/ # 17 Chapters + reference material
โ โโโ plurality/ # 30 Acts
โ โโโ skills/ # 86 skill files (synced from src/lib/skills-data.ts)
โ โโโ assets/ # Videos, images, icons
โ
โโโ spellbook/
โ โโโ spellbook-acts.json # Canonical proverbs source of truth
โโโ privacymage_grimoire_v10_2_0.json # Master grimoire (v10.2.0)
โโโ ceremonies/ # Ceremony reference material
โโโ guardians/ # Canon guardian applications
โโโ content/ # Additional content staging
โโโ docs/ # Internal docs
โโโ scripts/
โ โโโ sync-skills-to-public.mjs # Predev/prebuild: skills โ public/skills/
โ โโโ setup-zcash-wallet.ps1 # Windows: Zcash wallet setup
โ โโโ setup-zcash-wallet-interactive.ps1 # Interactive variant
โ โโโ setup-postgresql.ps1 # Local Postgres for full-stack dev
โ โโโ test-flow.sh # End-to-end flow validation
โ โโโ test-requirements.ps1 # Verify local tooling
โ โโโ update-inscriptions-static.ps1 # Regenerate static inscription snapshot
โ โโโ verify-rust-path.ps1 # Rust toolchain check
โ โโโ merge-to-website.ps1 # Build + deploy merge
โ โโโ schema.sql # PostgreSQL schema (Oracle Swordsman DB)
โ
โโโ cloudflare-worker-email.js # Email relay worker
โโโ cloudflare-worker-proxy.js # Proxy worker
โโโ wrangler.toml # Cloudflare config
โโโ docker-compose.yml # Zcash node + Postgres (local full-stack)
โโโ server.js # Custom serve (npm run serve:local)
โโโ serve.json # Static-server config (SPA fallback)
โโโ next.config.mjs
โโโ tailwind.config.ts
โโโ tsconfig.json, tsconfig.tsbuildinfo
โโโ setup-db-with-password.ps1 # DB password setup helper
โโโ setup-keys.sh # ed25519 key generator
โโโ check-sync-status.ps1 # Sync status check
โโโ package.json # name: agentprivacy-ai-landing
Top-level documentation
| File | Purpose |
|---|---|
agentprivacy-CODEX.md |
Comprehensive design doc โ architecture, ceremony protocol, skill taxonomy, persona index |
ARCHITECTURE_DIAGRAM.txt |
ASCII component diagram |
PERSONA_AUTHORING_GUIDE.md |
How to author personas (structure, emoji, proverb, spell, role) |
LANDING_PAGE_UPDATE_INSTRUCTIONS.md |
How to update hero/spellbook/feature cards |
PRE_PUSH_SECURITY_CHECK.md |
Security checklist before pushing (no secrets, no keys) |
CONTRIBUTING.md |
Contribution guidelines |
universe-blade.md |
Blade system deep-dive (PRISM, moon phases, stratum algebra) |
Quick start
Prerequisites: Node.js 18+ and npm.
npm install
npm run dev # Starts dev server on http://localhost:5000
# (predev hook syncs skills โ public/skills/)
npm run build # Static export โ ./out
# (prebuild hook syncs skills again)
npm start # Serve the built ./out on port 8000 (via `serve`)
npm run serve:local # Custom Node server (server.js) with SPA fallback
npm run lint # ESLint
npm run sync:skills # Manually sync 86 skills โ public/skills/
Environment
# .env.local
NEXT_PUBLIC_SOULBAE_URL=https://your-soulbae-api.com # NEAR Cloud AI endpoint
Leave unset to use the default Soulbae endpoint.
Optional full-stack (local)
docker compose up # Zcash node + Postgres
./setup-keys.sh # Generate ed25519 keys for Oracle signing
./scripts/setup-postgresql.ps1 # Initialize Oracle schema (scripts/schema.sql)
The Oracle Swordsman backend itself โ transaction monitor, proverb verifier, Golden Split (61.8/38.2) calculator, inscription builder โ is external infrastructure and not bundled in this repo. It's reached through src/lib/oracle-api.ts.
Deployment
output: 'export' โ pure static build. npm run build produces ./out, deploy anywhere.
- Cloudflare Pages (preferred) โ build:
npm run build, output:out. Wrangler config already present. - Vercel โ
vercel deploy --prod - Netlify โ
netlify deploy --prod --dir=out - Any static host โ S3 + CloudFront, GitHub Pages, self-hosted nginx
No server required for the site. No secrets in the bundle. If you fork this for your own community, runtime dependencies are: a NEAR Cloud AI endpoint for Soulbae, the Oracle Swordsman API for onchain verification, and (optionally) the Cloudflare workers for email relay.
Privacy guarantees
Private by construction:
- Donation amounts, wallet addresses, transaction timing โ hidden in the Zcash shielded pool
- Mage conversations โ not stored; Soulbae never sees tx data or addresses; each session fresh
- Soulbis private key โ optionally burned at ceremony completion; the public key alone is enough for the architecture to run
- All your notes, reflections, spell selections, stance, blade inventory โ
localStorageon your device - No analytics, no cookies, no trackers, no fingerprints
Public by choice:
- Spellbook content (it's a public library)
- Your inscribed proverbs (encrypted memos โ only the recipient decrypts the plaintext; the onchain anchor is public)
- The TEE attestation (verifiable proof of the Mage's execution environment)
- Your Soulbis public key (agent card)
Information bounds (from the 0xagentprivacy Research Paper v3.2):
I(Soulbae; Transaction_Amount) = 0
I(Soulbae; First_Person_Identity) = 0
I(Soulbae; Wallet_Address) = 0
I(Soulbae; Transaction_Timing) = 0
Related pieces of the universe
Sibling projects that work with this repo:
- Spellweb (graph + ceremony layer) โ wandering orbs on a rendered canvas, constellation waypoints, ZK Blade Forge (light/heavy/dragon), Bilateral Witness (Promise Theory). This repo imports forged blades from Spellweb via
src/lib/spellweb-blade-bridge.ts. myterms(docs package) โ MyTerms Alliance application bundle, IEEE 7012-2025 integration plan. The terms layer the extensions enforce.swordsman-blade(browser extension) โ enforces signed terms at the browser boundary.mages-spell(browser extension) โ delegation inside agreed scope.- Oracle Swordsman (backend, external) โ transaction monitoring, AI verification, inscription signing, Golden Split (61.8/38.2) accounting.
The extension bridge (src/lib/extension-bridge.ts) is the nervous system connecting all of them to this experience layer.
License
CC BY-SA 4.0 โ see LICENSE.
The Vision
This isn't a donation button. It's infrastructure for the relationship economy.
Where:
- Trust comes from understanding, not surveillance
- Relationships are bilateral, not mediated by platforms
- Reputation is earned through comprehension
- Privacy is preserved by architecture, not policy
- AI agents extend sovereignty without surrendering it
This is the foundation for privacy-preserving AI agents.
โ๏ธ โฅ ๐งโโ๏ธ | ๐
Separation between Swordsman and Mage preserves the First Person.
"just another mage, sharing a spellbook." ๐