Files
encyclopedia-knowledge-graph/docs/archive/PLAN-LEARNING-SUBPAGE-AND-LOCAL-STATE-PORTABILITY.md
T

127 lines
13 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Architecture & Curriculum Plan: Self-Paced `/learn/` Sub-Page with Anonymous Local State Upload & Download for `hyperstitionstud.io` (`v2.0.0`)
- **Document ID:** `PLAN-LEARNING-SUBPAGE-AND-LOCAL-STATE-PORTABILITY` (`v2.0.0`)
- **Target Web Route:** `https://hyperstitionstud.io/learn/` (`/learn/index.html`)
- **Offline `file://` Path:** `/workspace/hyperstitionstudio-core/site/learn/index.html`
- **State Schema Authority:** `urn:io:hyperstitionstud:schema:v1:learn-progress-state` (`/schemas/v1/learn-progress-state.schema.json`)
- **Privacy & Portability Guarantee:** `100%` client-side execution (`0` cookies, `0` server databases, `0` user accounts, `0` external network requests); full progress portability across browsers and devices via deterministic JSON State Download (`Blob` export) and State Upload (`FileReader` + drag-and-drop import with schema & `SHA-256` / `CIDv1` verification).
---
## 1. Pedagogical Goal: Bridging Complete Newcomers into the Ecosystem
A first-time visitor arriving at `https://hyperstitionstud.io` sees six dense research tools: a 388-node Knowledge Graph, a 22-volume PDF Encyclopedia, an Ecological Trophic Index (`ETI`) Tier List, a 282-term Glossary, a 71-dossier Archive, and a 69-cipher Gematria Calculator.
The **`/learn/`** sub-page provides a **self-paced, interactive 6-module onboarding track** where visitors learn one concept at a time through small, hands-on micro-sandboxes before jumping into the full workbenches—and can save their progress, bookmarked coordinates, preferred stakeholder lens, and personal notes to a local `.json` file at any time.
---
## 2. Six-Module Self-Paced Curriculum & Interactive Micro-Sandboxes
Each module is a collapsible, self-contained interactive card with a **Concept Brief (Plain-English Summary)**, an **Interactive Try-It Micro-Sandbox**, a **1-Question Verification Checkpoint** (which marks the module complete when solved), and **Direct Launch Links** into the corresponding full workbench:
| Module ID | Title & Core Question Answered | Interactive Micro-Sandbox Built Into the Module | Checkpoint Task (Unlocks Module Badge) | Deep-Link Into Full Workbench |
| :--- | :--- | :--- | :--- | :--- |
| **`M01`** | **Base-36 Alphanumeric Qabbala (`AQ` 101):**<br/>*How does `0–9 = 0..9, A–Z = 10..35` turn words and numbers into a continuous arithmetic space?* | **Live Character-by-Character `AQ` Breakdown Box:** Type any word or ticker (`ASML`, `TSMC`, `GPU`, `capital`) and see each letter's `10..35` value sum in real time alongside prime-rank and repdigit (`37×k`) badges. | Type `ASML` and `asset` (or `TSMC` and `loss`) into the compare boxes to verify an exact Base-36 collision (`81 == 81` or `91 == 91`). | `/calc/index.html` |
| **`M02`** | **Sound Over Spelling (`Gen 0` Written English vs. `Gen 1` Phonemic Ingglish):**<br/>*Why strip silent etymological "ghost mass" using the CMU Pronouncing Dictionary?* | **Interactive `Gen 0 -> Gen 1` Phonemic Drift (`Δ`) Slider:** Click or type sample words (`knight -> nait`, `capital -> kapatal`, `Anthropic -> anthropik`, `Blackwell -> blakwel`) to inspect `Gen 0 AQ`, `Gen 1 AQ`, net drift `Δ`, and **Isometric Chokepoints (`Δ = 0`)**. | Identify one `Δ = 0` Isometric Fixed Point (`kapatal = 125`, `charter = 136`, `asml = 81`, `tsmc = 91`, `gpu = 71`). | `/archive/00-index-and-methodology.md` & `/ci/ONBOARDING-INGGLISH-AQ.pdf` |
| **`M03`** | **What Makes a "Singularity"? (`G1` Variance Collapse & `G2` Twins):**<br/>*How do dispersed written concepts collapse onto a single zero-variance integer when spoken?* | **`G1` Variance-Collapse Visualizer:** Toggle between `Gen 0` Written Mode and `Gen 1` Ingglish Mode on canonical triads (e.g., `schizoanalysis [306]`, `abstract machine [272]`, `synthetic data [266]` -> `Gen 0 Var = 310.22`) and watch all three bars snap onto **`292`** (`Gen 1 Var = 0.0`). | Collapse either the `292` (`S1`), `256` (`S2/S6`), or `125` (`S6/S2`) triad to `variance = 0.0` in the widget. | `/graph/index.html` (`Mode 3: Bipartite G1 Funnel`) |
| **`M04`** | **The Six Guilds (`S1–S6`), Double Articulation & State-Gated Memetics (`M1–M7+`):**<br/>*How do hardware/AI flows (`S1–S5`) couple with capital capture (`S6`) and headline states (`M`)?* | **Interactive Guild & State-Gate Matcher:** Click through the 6 guilds (`S1` AI, `S2` Flash-Crash Liquidity, `S3` Silicon War Machine, `S4` Carrier Wave, `S5` Cutaneous BwO, `S6` Apparatus of Capture) and test how the Two-Gate rule blocks or unlocks `M1–M7+` on real `2026-11-28/29` wire headlines. | Match a halted/outage headline to its state-gated memetic lock (`129: awflain == ruhsha == blakwel` or `137: hawlts == inersha == envideea`). | `/encyclopedia/00-index-and-ontological-atlas/00-master-encyclopedia-index-a-to-z.pdf` |
| **`M05`** | **Ecological Trophic Index (`ETI 0–100`) & The `D Periphery` Radar:**<br/>*How are assemblage builds ranked from `Tier S+` (`93 ETI`) at the center to `Tier D` (`49 ETI`) on the outer ring?* | **Interactive 6-Stat (`ARM, VEL, COL, CAP, PRM, RES`) & Concentric Ring Widget:** Click any of the 10 builds (`#1 S1` through `#9 Q-Stub` & `M7+`) or any of the `13` Multi-Build Flex Pivots (`125, 133, 137, 193, 256, 292`) to see its polar radius $R(\text{ETI})$ and trophic bridges. | Inspect a multi-build Flex Singularity (`125` or `137`) and identify at least two guilds it bridges. | `/zoology/tier-list-technocapital-assemblage-builds.pdf` & `/graph/index.html` (`Mode 2: ETI Radar`) |
| **`M06`** | **Practical Use Cases & Choosing Your Register:**<br/>*How do I apply this as a Fund Manager, Corporate Board Member, Fantasy Roster Builder, or Researcher?* | **4-Way Stakeholder Register Translator:** Switch a single control between *Academic/Philosophical*, *Out-of-Sample Fund Manager ("Uncaptured Gem" Screen)*, *Corporate Board (Supply-Chain Moat)*, and *Fantasy Football Roster (`QB / RB / OL / Flex`)*—watching the exact same `ETI` stats and `AQ` locks translate into your chosen domain vocabulary. | Select your preferred default register and bookmark at least one `AQ` coordinate or encyclopedia volume to your personal study list. | `/zoology/proposal-fund-manager-novel-investment-discovery.pdf` & Corporate/Roster PDFs |
---
## 3. Anonymous Local State Persistence, Upload & Download Specification
### 3.1 State Data Model (`urn:io:hyperstitionstud:schema:v1:learn-progress-state`)
All user progress is represented by a deterministic, self-verifying JSON document:
```json
{
"$schema": "../schemas/v1/learn-progress-state.schema.json",
"$id": "urn:io:hyperstitionstud:schema:v1:learn-progress-state",
"version": "2.0.0",
"updated_at_utc": "2026-11-30T01:30:00Z",
"preferred_register": "fund_manager",
"completed_modules": ["M01", "M02", "M03"],
"checkpoint_answers": {
"M01": {"term_a": "ASML", "term_b": "asset", "aq": 81, "verified": true},
"M02": {"isometric_term": "kapatal", "aq": 125, "verified": true},
"M03": {"triad_coord": 292, "gen1_variance": 0.0, "verified": true}
},
"bookmarked_coordinates": [81, 125, 129, 137, 193, 292],
"sandbox_history": [
{"input_eng": "Blackwell", "input_ing": "blakwel", "eng_aq": 182, "ing_aq": 129, "delta": -53}
],
"user_notes": {
"M03": "292 triad links synthetic data directly to asset management (Gen 0 = 292).",
"M06": "Screen Tier B/C builds with high COL/VEL and low CAP (<65) for pre-institutional themes."
},
"integrity": {
"canonical_codec": "dag-json (0x0129)",
"payload_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"payload_cidv1": "baguqeera..."
}
}
```
### 3.2 Three-Tier Client-Side Storage & Portability Controls (Top Sticky Bar in `/learn/`)
The `/learn/` header bar provides an always-visible **Progress & State Portability Control Bar**:
1. **Progress Meter & Auto-Save Status Pill:**
- Displays `Progress: 3 / 6 Modules Completed (50%) • Saved Locally (localStorage)`.
- Every interaction automatically writes to `window.localStorage.getItem("hs_learn_state_v2")` (with an automatic in-memory fallback if the visitor's browser has `localStorage` disabled in strict private/incognito mode).
2. **`Download State (.json)` Button (`exportLearnState()`):**
- Computes the canonical `dag-json` byte representation of the state payload (excluding the `integrity` block), calculates its `SHA-256` hex digest and `CIDv1` (`baguqeera...`) using the Web Crypto API (`crypto.subtle.digest("SHA-256", ...)` with a pure-JS SHA-256 fallback so it works on both `https://` and `file://` / `http://` origins!), attaches the `integrity` block, and triggers a browser file download named:
`hyperstition-learn-state-YYYY-MM-DD.json`.
3. **`Upload State (.json)` Button & Drag-and-Drop Zone (`importLearnState(file)`):**
- Opens a local file picker (`<input type="file" accept=".json,application/json">`) or accepts a `.json` file dropped anywhere onto the State Bar.
- **Four-Gate Client-Side Import Verification & Security Sanitization:**
- *Gate 1 (Size & Parse Guard):* Rejects files `> 1 MB` or invalid JSON before parsing.
- *Gate 2 (Schema & Whitelist Validation):* Verifies `"$id" === "urn:io:hyperstitionstud:schema:v1:learn-progress-state"`, filters `completed_modules` against the known `{"M01".."M06"}` set, validates `bookmarked_coordinates` as bounded integers (`0..9999`), and caps `user_notes` string lengths.
- *Gate 3 (Cryptographic Checksum Verification):* Recomputes the canonical `dag-json` `SHA-256` / `CIDv1` of the imported payload and verifies it matches `integrity.payload_sha256` (warning the user if the file was manually edited outside the app while still allowing safe import if schema-valid).
- *Gate 4 (Zero-XSS DOM Rendering):* Every imported user note and sandbox string is rendered exclusively via `element.textContent` or `value` properties (never `innerHTML`), making imported state files 100% immune to DOM XSS.
- Supports two import modes selectable by a toggle: **`Replace Current State`** (default) or **`Merge With Current State`** (unions completed modules and bookmarked coordinates, keeping newer notes).
4. **`Reset Local State` Button (`resetLearnState()`):**
- Clears `localStorage["hs_learn_state_v2"]` and resets all 6 modules to `0 / 6` so anonymous users on shared machines can wipe their local state in one click.
---
## 4. File Layout & Integration Across Repositories
```text
/workspace/hyperstitionstudio-core/
├── schemas/v1/
│ └── learn-progress-state.schema.json # Offline URN JSON Schema for exported/imported user state
├── site/
│ ├── index.html # Updated with prominent "Start Self-Paced Learning Track (/learn/)" banner & card link
│ └── learn/
│ ├── index.html # Self-contained offline/HTTP3 Learning Sub-Page (6 modules + state upload/download)
│ └── learn-app.js # Pure-JS AQ/Ingglish micro-sandboxes, SHA-256/CIDv1 state engine & DOM controller
└── deploy/
├── sync-vps-repos.sh # Adds ${LIVE_REPOS}/learn -> hyperstitionstudio-core/site/learn symlink
├── Caddyfile # Root `handle` block serves /learn/* automatically from hyperstitionstudio-core/site
└── test-first-deployment.sh # Adds /learn/index.html, /learn/learn-app.js, and /schemas/v1/learn-progress-state.schema.json
```
---
## 5. Phased Implementation Sequence (`Phases 1–3`)
### Phase 1: Author `learn-progress-state.schema.json` & Pure-JS State / `CIDv1` Engine (`site/learn/learn-app.js`)
1. Create `/workspace/hyperstitionstudio-core/schemas/v1/learn-progress-state.schema.json` (`$id: "urn:io:hyperstitionstud:schema:v1:learn-progress-state"`).
2. Implement `site/learn/learn-app.js` containing:
- Pure-JS `computeAQ()`, `primeRank()`, and a curated embedded subset of core `Gen 0 -> Gen 1` Ingglish vocabulary + `S1–S6` / `M1–M7+` / `ETI` build data so all 6 interactive micro-sandboxes run instantaneously in `< 5 ms` with zero external network fetches.
- Deterministic `dag-json` serializer + pure-JS SHA-256 & `CIDv1` (`baguqeera...`) calculator (works identically on `file://`, `http://`, and `https://`).
- `exportLearnState()`, `importLearnState(file, mode)`, `resetLearnState()`, and automatic `localStorage` persistence.
### Phase 2: Build `/workspace/hyperstitionstudio-core/site/learn/index.html` & Link from Portal Homepage (`site/index.html`)
1. Build `site/learn/index.html` using the workspace's dark-mode design system (`#020617` Slate-950 canvas, local monospace font stack, zero external CDN/font requests, and automatic `file://` vs. `https://` deep-link adaptation).
2. Add a prominent top-of-page **"New Here? Launch the Self-Paced Interactive Learning Track (`/learn/`)"** callout banner in `/workspace/hyperstitionstudio-core/site/index.html`.
### Phase 3: Wire into `deploy/sync-vps-repos.sh`, `test-first-deployment.sh` & `test_core_suite.py`
1. Add `${SUDO} ln -sfn "hyperstitionstudio-core/site/learn" "${LIVE_REPOS}/learn"` in `deploy/sync-vps-repos.sh`.
2. Add `/learn/index.html`, `/learn/learn-app.js`, and `/schemas/v1/learn-progress-state.schema.json` to `deploy/test-first-deployment.sh` (`28 -> 31` verified HTTP routes) and `tests/test_core_suite.py`.
3. Verify both local `file://` execution and HTTP route tests, then commit and push via `push-all-to-git-libre-audio.sh`.