# Architecture & Implementation Plan: Shared Common Library Under the `hyperstitionstud.io` Namespace (`v1.2.0` — 100% Offline `URN:` Namespace & Dual `file://` + `http://` Portability Edition) - **Document ID:** `PLAN-COMMON-LIBRARY-HYPERSTITIONSTUDIO` (`v1.2.0`) - **Offline Namespace Authority (Zero `https://` Network Calls):** - **Python PEP 420 Namespace:** `hyperstitionstud_io.*` - **JavaScript / Browser Global Namespace:** `@hyperstitionstud.io/*` & `window.HyperstitionStudio.*` - **URN Schema, XML & Entity Authority (RFC 8141):** `urn:io:hyperstitionstud:schema:v1:*`, `urn:io:hyperstitionstud:ns:kg:1.0`, and `urn:io:hyperstitionstud:::` - **Local Relative Schema Paths:** `./schemas/v1/.schema.json` - **Dual Deployment Target:** 1. **Scenario A (`file://` Direct Offline In-Browser Application):** Zero HTTP server, zero `fetch()` CORS errors, zero external CDN/font/schema requests. 2. **Scenario B (`http://` Static Web Server Hosting):** Works identically under `python3 -m http.server`, Nginx, Caddy, or LAN self-hosting whether served from the `/workspace` parent directory or as a standalone web root. - **Artifact & Citation URL Resolution Rule:** **100% Local-Configuration Driven** (`[citations.path_mounts]` in local `workspace.toml`, falling back to verified local paths). - **Version-Control Operations in Scope:** **0%** (All file integrity and isolation checks use pure Python `hashlib.sha256` and atomic `.tmp -> os.replace()` writes). --- ## 1. Review of `https://hyperstitionstud.io` URLs: Why They Are Replaced by Offline `urn:io:hyperstitionstud:*` & Relative Paths in `v1.2.0` In `v1.0.0–v1.1.0`, the domain `hyperstitionstud.io` was formatted as `https://hyperstitionstud.io/...` in two places: JSON Schema `$id`/`$schema` fields and GraphML/GEXF `xmlns:hs` declarations. Reviewing those against a **100% offline, portable in-browser and static-HTTP deployment requirement** exposes three concrete failure modes: | Former `https://` Usage (`v1.1.0`) | Why It Hurts 100% Offline & Portable Deployment | `v1.2.0` Portable Replacement (Zero Network Calls) | | :--- | :--- | :--- | | **`$schema: "https://hyperstitionstud.io/schemas/v1/*.schema.json"`** | IDEs (VS Code, JetBrains), browser JSON inspectors, and schema validators attempt to **HTTP-fetch `https://` `$schema` URLs**. Offline or on an air-gapped LAN, this triggers DNS timeouts or validation warnings. | **Dual Offline Identity:**
• `"$id": "urn:io:hyperstitionstud:schema:v1:encyclopedia-graph"` (RFC 8141 URN — never fetched over DNS)
• `"$schema": "./schemas/v1/encyclopedia-graph.schema.json"` (relative local file path that resolves both on `file://` and on any `http://` server) | | **`xmlns:hs="https://hyperstitionstud.io/ns/kg/1.0"`** | Conflates a nominal XML namespace with a live `https://` endpoint; some XML/GEXF tools probe `https://` namespace URIs for XSD files. | **`xmlns:hs="urn:io:hyperstitionstud:ns:kg:1.0"`**
Explicitly location-independent URN namespace; Gephi, Cytoscape, yEd, and `xml.etree.ElementTree` parse it 100% offline. | | **External Web Fonts / CDNs (`https://fonts.googleapis.com/...`)** | Stalls browser rendering on `file://` or offline LAN `http://` while waiting for external DNS/TLS handshakes to fail. | **Zero External `` or ``. - Because `