What Is the Mage Tower?
The Mage Tower is the authority layer that sits above the standard Academy learning experience. It controls who can create knowledge, how that knowledge is trusted, and how it earns XP for students. All content on the Academy — every tome and artifact — carries a cryptographic signature that traces back to this system.
The system has three interlocking parts: a Cosmological Identity (your immutable geometric fingerprint), a Genesis Certificate (cryptographic proof of your tier), and a Dimensional Plane (the content namespace you're authorized to write in).
Identity
Your Cosmological ID is forged once from a ledger seed. It is geometric, deterministic, and immutable. It anchors everything else.
Authority
An Archon issues you a cryptographically signed certificate that proves your tier (Instructor or Archon) and the planes you can author on.
Content
Tomes you create are stamped with your tier's priority (Canonical / Validated / Experimental) and stored permanently in Firestore.
The Three Tiers
Every user on the Academy occupies one of three tiers. Tiers are cumulative — an Archon has all Instructor capabilities, and an Instructor has all Acolyte capabilities. Promotion is strictly upward; there is no demotion mechanism in the current implementation.
| Tier | Symbol | Read Tomes | Create Tomes | Mint Certificates | How Obtained |
|---|---|---|---|---|---|
| Acolyte | ◯ | ✓ All | ✗ | ✗ | Default after registration |
| Instructor | ⬢ | ✓ All | ✓ Certified planes | ✗ | Archon-issued certificate |
| Archon | ♛ | ✓ All | ✓ All planes | ✓ Instructor + Archon | Self-signed via Master Key UID list |
S.P.I.R.E. Engine Layer Mapping
Tiers correspond directly to the tri-layer model: Archon → S.P.I.R.E. Consensus (canonical), Instructor → Hypersim Substrate (validated), Acolyte → Biostrata Sovereign (experimental).
Cosmological ID
Every user has exactly one Cosmological ID — a 64-bit hexadecimal value prefixed with 0x.
It is computed deterministically:
CosmologicalId = SHD-CCP(ledgerSeed, latticeSpace)
XOR
SHA-256(uid)[0..8] ← first 8 bytes only
SHD-CCP = Sequential Hyperdimensional Context Compression Protocol
A 4×4×4 cubic lattice (64 voxels) with φ-weighted axis folding
and a 32-byte → 64-byte holographic inverse expansion.
Properties
• Deterministic — same seed + UID always produces same ID
• Immutable — sealed in Firestore, can never be changed
• Unique — XOR with Firebase UID makes collisions negligible
• Public — safe to share; contains no private data
Lattice Spaces
• E8 — φ = 1.618 (standard, recommended)
• R8 — φ = 2.618 (elevated resonance)
• R24 — φ = 4.236 (Leech lattice resonance)
The lattice affects compression geometry only. Your ID still XORs with your UID regardless of lattice choice.
Genesis Seed vs Ledger Seed
| Attribute | Ledger Seed | Genesis Seed |
|---|---|---|
| Who has it | All users (Acolyte+) | Instructors and Archons |
| Composed of | User-chosen phrase | Ledger Seed + Validation Certificate |
| Produces | Cosmological ID only | Cosmological ID + tier + authoring rights |
| Mutable? | Never — write-once | Tier can be elevated, never demoted |
⚠ Critical
Your ledger seed is your identity. If you lose it and are locked out, your Cosmological ID
cannot be recovered. Write it down and store it offline. The Academy cannot reset it —
Firestore rules make the cosmologicalId and
ledgerSeed fields permanently immutable.
Validation Certificates
A Validation Certificate is a JSON object cryptographically signed by an Archon using HMAC-SHA-256. It is the only way to prove that someone granted you a tier. No certificate → Acolyte. Tampered certificate → verification fails → Acolyte.
Certificate Anatomy
{
"issuer": "0xD4AF37F00BA4C0DE", // Archon's Cosmological ID
"subject": "0x9F00CAFEDEADBEEF", // Recipient's Cosmological ID
"tier": "INSTRUCTOR", // or "ARCHON"
"plane": "dept-IV", // authoring scope (see Planes)
"issuedAt": "2026-06-18T00:00:00.000Z",
"signature": "a1b2c3...e9f0" // HMAC-SHA-256 hex
}
What the signature covers
HMAC-SHA-256(
key: issuerCosmologicalId,
data: "issuer|tier|plane|subject|issuedAt"
)
The key is the issuer's own Cosmological ID. Anyone can verify the signature if they know the issuer's ID (which is public).
What it proves
- ✓ A specific Archon (by ID) issued this
- ✓ It was issued to exactly one specific subject
- ✓ It grants a specific tier on a specific plane
- ✓ It has not been tampered with
- ✗ It cannot be replayed for a different subject
- ✗ It cannot be revoked (no revocation list yet)
Verification Flow
When you apply a certificate in your Codex, this chain runs:
Subject match
Certificate subject must equal your Cosmological ID. Prevents replay attacks.
HMAC recomputation
Browser recomputes HMAC-SHA-256(issuer, payload) and compares to the certificate's signature field. Any tampering → mismatch → rejected.
Tier escalation check
Only an Archon may issue an Archon certificate. If the issuer's registered tier is Instructor, an Archon cert is rejected.
Firestore write
On success, tier, certificate, certifiedPlanes, and certifiedAt are merged into your registrar/main document. The write is only permitted if your core identity fields are unchanged (Firestore rules).
Security model
This is client-side cryptographic with Firestore as backstop.
A certificate is valid because the HMAC is unforgeable without the issuer's Cosmological ID as the key.
A determined attacker who manipulates their local JS could fake their displayed tier, but cannot write
content as a different creatorUid — Firestore Rules enforce that boundary.
For maximum security, migrate certificate verification to a Cloud Function.
Dimensional Planes
A Dimensional Plane is the namespace within which an Instructor
can create tomes and artifacts. Each plane corresponds to one Academy department. An Instructor certified
for dept-IV cannot write on dept-X.
Archons always receive * (universal) and may write anywhere.
| Plane | Department | Notes |
|---|---|---|
| dept-I | Sacred Geometry & Topology | 9 active tomes → 1 artifact |
| dept-II | Cryptography & Sigils | |
| dept-III | Celestial Topology | |
| dept-IV | Hyperbolic Systems | |
| dept-V | Fractal Processing | |
| dept-VI | Seed Protocols | |
| dept-VII | Human Consciousness | Locked — Biostrata L3 required |
| dept-VIII | Soul-Mind Projection | Locked — Biostrata L3 required |
| dept-IX | AI-Human Integration | Locked — Biostrata L3 required |
| dept-X | BioChain Substrate | 16 tomes → 1 artifact (×4) |
| custom | User-defined parallel plane | Instructor-created namespace |
| * | Universal | Archon only |
Archon Bootstrap Path
The first Archon cannot receive a certificate from anyone — there is no one above them.
This is the bootstrap problem. The system solves it with a
Genesis Master Key List: a hardcoded array of Firebase UIDs
in scripts/genesis-registrar.js.
// scripts/genesis-registrar.js
export const GENESIS_MASTER_UIDS = [
"k1E2ylvBlJPMYaCq9SY8muJQx8a2", // Garrett Hoard — Root Archon
];
Any UID in this list receives implicit Archon authority immediately — even before they create a Cosmological ID or self-sign a certificate. Once they visit Genesis Forge → Self-Sign Archon Certificate, a proper self-signed certificate is written to their Firestore registrar.
Why hardcode UIDs?
Firebase Auth UIDs are assigned by Google and cannot be forged. A user cannot change their own UID. Hardcoding them in source code (committed to a private/controlled repo) is the standard Firebase bootstrap pattern — it's equivalent to how most admin panels have a seeded first admin in their database migration.
Tome Creation
A Tome is a structured knowledge document — the fundamental
unit of learning on the Academy. Each tome is stored as a Firestore document at
tomes/{tomeId} and carries the author's tier-derived priority,
a plane scope, and a status controlling whether it awards XP.
// Firestore: tomes/{tomeId}
{
"title": "Clifford Torus Proof",
"description": "Demonstrates the flat torus embedding in ℝ⁴",
"body": "Full content text or HTML...",
"dept": "I",
"plane": "dept-I",
"status": "active", // controls XP
"priority": "canonical", // from author's tier
"creatorUid": "k1E2ylvBlJPMYaCq9SY8...",
"creatorGenesisId":"0xD4AF37F00BA4C0DE",
"creatorTier": "ARCHON",
"certificateHash": "a1b2c3d4e5f60708", // first 16 chars of signature
"createdAt": serverTimestamp(),
"updatedAt": serverTimestamp()
}
Tome Statuses
Status determines how a tome behaves for students. Only Instructors and Archons can change status via the Admin Console.
Visible to all students. Awards XP on completion. Counts toward artifact thresholds. This is the published state — a tome should only go active when it's polished and reviewed.
Visible to all students but awards no XP. Use this for works-in-progress or supplementary reading that hasn't been formally validated yet.
Visible but explicitly marked as reference material. No XP. Use for glossaries, appendices, or background reading linked from active tomes.
Hidden from Acolytes. Only Instructors and Archons can see sealed tomes. Use for drafts, admin-only notes, or department-locked content.
Priority Stamping
Every tome is stamped at creation time with a priority derived from the author's tier. When two tomes cover the same topic, priority determines display order. Only Active tomes award XP regardless of priority.
| Author Tier | Priority | Color | Display Order | XP Eligible? |
|---|---|---|---|---|
| ♛ Archon | Canonical | Gold | First — absolute consensus | ✓ if Active |
| ⬢ Instructor | Validated | Cyan | Second | ✓ if Active |
| ◯ Acolyte | Experimental | Magenta | Last — Biostrata layer | ✗ never |
Artifacts
An Artifact is a mastery milestone — a named credential minted when a student completes a required set of tomes. Only the Active tomes in the required list count. Only Instructors and Archons can mint artifacts.
Active tomes required per artifact for Departments I–IX
Active tomes per artifact for Department X (BioChain Substrate)
Total artifacts in Department X (64 tomes ÷ 16)
// Firestore: artifacts/{artifactId}
{
"name": "Sacred Geometry Mastery",
"plane": "dept-I",
"requiredTomes": ["tomeId1", "tomeId2", ..., "tomeId9"],
"priority": "canonical", // from creator's tier
"creatorUid": "k1E2ylvBlJPMYaCq9SY8..."
}
145-Tome Cubic Model
The full Academy curriculum: 15 Foundation tomes (Depts I–VI, 9 each → 54 minus overlaps, net 15 active), 27 Triad tomes (Depts VII–IX, 9 each), and 64 Substrate tomes (Dept X). Completing all 145 active tomes represents a full 4×4×4 cubic matrix of knowledge — the same structure as the SHD-CCP lattice.
Full Workflow
Path A — Becoming an Acolyte (any user)
Sign up / log in
Create a Firebase account at login.html. Firebase assigns you a permanent UID.
Forge your Cosmological ID
Visit mage_tower/Registrar.html. Enter a ledger seed phrase (memorable, private). Choose a lattice space (E8 recommended). Preview the sigil. Click Seal — this is permanent.
View your Codex
Visit mage_tower/Codex.html to see your sigil, Cosmological ID, and tier. Your tier is now Acolyte.
Path B — Bootstrapping the Root Archon (one-time)
Find your Firebase UID
Open browser DevTools while logged in → Console → type firebase.auth().currentUser.uid or check Application → IndexedDB → firebaseLocalStorageDb.
Add UID to the Master Key list
Edit scripts/genesis-registrar.js → add UID to GENESIS_MASTER_UIDS array → commit and deploy.
Self-sign at Genesis Forge
Visit mage_tower/Genesis_Forge.html → click Self-Sign Archon Certificate. Your registrar is upgraded. You are now ♛ Archon.
Path C — Minting a New Instructor (Archon does this)
New instructor registers
They complete Path A (Acolyte setup) and share their Cosmological ID with you (screenshot from their Codex).
Archon issues certificate
Visit mage_tower/Genesis_Forge.html or mage_tower/Admin_Console.html → Elect Instructors tab. Enter the subject's Cosmological ID, select Instructor, pick a plane. Click Forge Certificate.
Deliver the certificate securely
Download the JSON or copy it. Send via Signal, encrypted email, or in-person handoff. Do NOT post in public chat.
Recipient applies the certificate
They open mage_tower/Codex.html → Apply Genesis Certificate, paste the JSON, click Apply. Page reloads. They are now ⬢ Instructor.
Path D — Creating a Tome (Instructor or Archon)
Open the Instructor Console
Visit mage_tower/Instructor_Console.html. The tab + New Tome is shown.
Fill in tome fields
Title, description, plane (must match your certified plane), body content, and status. The priority preview shows your tier's stamp automatically.
Inscribe to Ledger
Click Inscribe Tome to Ledger. The tome is written to Firestore with your tier's priority stamp and a hash of your certificate. The tome ID is returned — save it for artifact configuration.
Manage release status
Use mage_tower/Admin_Console.html → Departments tab to toggle tome status between Active / Manuscript / Sealed at any time.
Path E — Minting an Artifact
Create the required tomes first
An artifact requires a list of tome IDs. Create and activate all required tomes (Path D above) before minting.
Collect the Firestore tome IDs
Find them in Admin Console → Tome Registry. Each card shows the Firestore document ID below the title.
Mint the artifact
Use Admin Console → Artifacts tab or the + New Artifact tab in the Instructor Console. Paste the comma-separated tome IDs. Click Mint Artifact.
Common Errors
| Error | Cause | Fix |
|---|---|---|
| Registrar not found | User hasn't forged Cosmological ID yet | Visit Registrar.html first |
| Certificate subject does not match your Cosmological ID | Certificate was minted for a different user | Re-issue from Genesis Forge for the correct subject ID |
| Issuer cannot mint Instructors | Acting user is not an Archon | Obtain your own Archon certificate first |
| Your Genesis certificate does not authorize authorship on dept-X | Plane mismatch — your certificate covers a different plane | Request a new certificate scoped to that plane, or use * for universal |
| Self-signed certificates only permitted for Master Key UIDs | Tried Genesis Forge bootstrap without being in the UID list | Add UID to GENESIS_MASTER_UIDS, commit, redeploy |
| The query requires an index | Firestore composite index missing for the plane+createdAt query | Click the URL in the error → Firebase Console → Create index |
| Missing or insufficient permissions | Firestore rules deny the write (wrong tier or unregistered) | Ensure your registrar/main document has tier set; re-apply certificate |
Firestore Setup Checklist
Required steps in Firebase Console before the system is fully functional:
Deploy Firestore Rules
Copy contents of firestore.rules into Firebase Console → Firestore → Rules → Publish. Or run firebase deploy --only firestore:rules.
Create Composite Indexes
The Admin Console and Instructor Console run queries that require composite indexes. Click each link below to create them in one step, or create manually:
- Collection:
tomes— fields:plane ASC, createdAt DESC - Collection:
tomes— fields:status ASC, createdAt DESC - Collection:
tomes— fields:plane ASC, status ASC, createdAt DESC - Collection:
tomes— fields:creatorUid ASC, createdAt DESC - Collection:
artifacts— fields:plane ASC, createdAt DESC - Collection:
artifacts— fields:createdAt DESC
Tip: trigger each query in the app while logged in as Archon — each 400 error includes a direct link to create the exact index needed.
Forge Cosmological ID + Self-Sign Archon Certificate
Your registrar/main document needs a tier: "ARCHON" field for Firestore Rules to recognize you as Archon. Complete Paths A and B above.
Enable Firebase Auth (Email/Password + Google)
Firebase Console → Authentication → Sign-in method → Enable Email/Password (and Google if desired). Without this, no one can log in.