Compare commits

..
10 Commits
Author SHA1 Message Date
Hermes Agent 40460c1695 Release v2.8.1: Fix sync-vps-repos.sh fast-forward merge by resetting dirty README.md before pull and using --hooks-only on VPS 2026-12-01 06:32:23 +00:00
Hermes Agent 50efacaba5 Release v2.8.0: Authentic 2x2 homepage UI closeups and zero-synthetic-data market research & zero-PII telemetry suite (Strategies 1A/1B/2A/2B/2C/3A/3B/4B/4C/5A/5B) 2026-12-01 06:27:21 +00:00
Hermes Agent 6aeaf4bc6f Release v2.7.0: Subtle cybernetic code rain, micro-sigil accents, 2x2 persona UI-closeup homepage showcase, v2.4.0 donate pill single-source-of-truth, and per-commit root README & commit-msg version parity 2026-12-01 05:17:51 +00:00
Hermes Agent 694240efd1 Release v2.3.3: Implement PLAN-REMOVE-D-FILTER-DISCUSSION-FROM-ENGINEERING-AND-MATH-HUBS 2026-12-01 03:15:56 +00:00
Hermes Agent 6112e64b18 Release v2.4.0: Complete PLAN-SQLITE-META-REST-ENDPOINTS-ETAG-AND-VPS-SYNC (HTTP ETag + If-None-Match 304 Not Modified & full SQLite catalog query modes) 2026-12-01 03:12:51 +00:00
Hermes Agent 6042520547 Release v2.3.1: Fix polyglot TS/Rust REPL general AST evaluation, cross-language input sync, and HTML escaping in cartridges 2026-12-01 02:45:19 +00:00
Hermes Agent 36e9372776 Author PLAN-HYPERSTITIONSTUDIO-POLYGLOT-SDK-AND-CLIENT-LIBRARIES and normalize untracked highlights path serialization 2026-12-01 02:32:49 +00:00
Hermes Agent 0f64b38725 Release v2.3.0: Eliminate container host paths, add 4-Ring hardened Guile/TS/Rust polyglot lens & 5-state selector, add hs-highlights (untracked output), and expose all 20 MCP/Chatbot REST tools & 14 URN resources 2026-12-01 02:27:19 +00:00
Hermes Agent b465312e3d Release v2.2.2: Fix Fedora 41 ReportLab ps2tt('dejavu-bold') font family mapping and add bundled Vera.ttf fallback + PLAN-COMPREHENSIVE-MCP-AND-CHATBOT-REST-API-CAPABILITY-EXPOSURE 2026-12-01 01:20:52 +00:00
Hermes Agent 2a882853a9 Release v2.2.1: Validate pdf_path directory before importing optional reportlab/pypdf in compile_markdown_to_pdf and remove unused pdfplumber dependency 2026-12-01 01:07:58 +00:00
67 changed files with 5347 additions and 927 deletions

No files matched your search

+22 -17
View File
@@ -1,6 +1,14 @@
# `hyperstitionstudio-core` (`hyperstitionstud_io.*` — `v2.0.0`)
# `hyperstitionstudio-core` (`hyperstitionstud_io.*` — `v2.8.1`)
Shared Python common library (`hyperstitionstud_io.*`), offline `URN:` JSON Schema registry (`urn:io:hyperstitionstud:schema:v1:*`), and offline browser/ESM modules (`@hyperstitionstud.io/*` / `window.HyperstitionStudio.*`) across all workspace projects.
<!-- HS-COMMIT-STATUS:START -->
> **Gitea Commit & Release Telemetry (`v2.8.1` • Namespace `urn:io:hyperstitionstud`)**
> - **Repository Role & Public Route:** Shared PEP 420 Python core library (`hyperstitionstud_io.*`), MCP/REST server, `/quant/`, `/learn/`, `/engineering/`, `/math/`, & `/donate/` webroots &rarr; [`https://hyperstitionstud.io/`](https://hyperstitionstud.io/)
> - **Latest Commit Scope (`hyperstitionstudio-core`):** Synchronized v2.8.1 release state across 34 tracked module/artifact surface(s)
> - **Touched Files / Surfaces:** `deploy/sync-vps-repos.sh`, `package.json`, `packages-js/ciphers-aq/package.json`, `pyproject.toml`, `scripts/build_gallery_manifest.py`, `site/donate/index.html`, `site/engineering/cicd-vps-tmpfs-and-regression/index.html`, `site/engineering/ciphers-and-phonetics/index.html` (+26 more)
> - **Live Verified Ecosystem Metrics (`v2.8.1`):** `6` Repositories • `17` CLI Entrypoints • `20` MCP/REST Tools • `14` URN Resources • `63` Verified Web Routes • `388` KG Nodes / `1,282` Edges • `282` Glossary Entries • `4,943` Offline CMUdict Phonetics • `0` Synthetic Data
<!-- HS-COMMIT-STATUS:END -->
Shared Python common library (`hyperstitionstud_io.*`), stateless read-only Model Context Protocol (`/mcp`) & OpenAPI 3.1 REST (`/api/v1/*`) server, SQLite FTS5 metadata catalog (`hs-db-build`), offline `URN:` JSON Schema registry (`urn:io:hyperstitionstud:schema:v1:*`), and Group 3 Stealth Basalt web workbenches (`/`, `/learn/`, `/quant/`, `/engineering/`, `/math/`, `/donate/`) with the 4-Ring Hardened Polyglot REPL (`Guile Scheme`, `TypeScript`, `Rust`) and Subtle Cybernetic Code Rain (`hs-matrix-coderain.js`).
---
@@ -10,7 +18,7 @@ Shared Python common library (`hyperstitionstud_io.*`), offline `URN:` JSON Sche
# 1. Create a parent workspace folder anywhere on your machine
mkdir -p ~/hyperstition-workspace && cd ~/hyperstition-workspace
# 2. Clone the peer repositories over public HTTPS (no SSH key required)
# 2. Clone the 6 peer repositories over public HTTPS (no SSH key required)
git clone https://git.libre.audio/seasharp/hyperstitionstudio-core.git
git clone https://git.libre.audio/seasharp/ingglish-hyperdope-gematria.git
git clone https://git.libre.audio/seasharp/technocapital-singularity-zoology.git
@@ -33,25 +41,22 @@ pip install --no-deps -e ./hyperstitionstudio-core
cp hyperstitionstudio-core/workspace.example.toml ./workspace.toml
hs-doctor
# 5. Run the 6-suite verification test runner (stdlib-compatible, zero pytest dependency required)
# 5. Run the 7-suite verification test runner (including ProtectSystem=strict EROFS introspection)
python3 hyperstitionstudio-core/tests/test_core_suite.py
# 6. Test the complete per-repository web deployment locally across all 22 HTTP routes
# 6. Test the complete per-repository web deployment locally across all 63 HTTP routes + MCP/REST + P1-P6 smoke gates
./hyperstitionstudio-core/deploy/test-first-deployment.sh
```
---
## Key Features (`v1.2.0`)
## Key Architecture & Capabilities (`v2.8.1`)
1. **100% Offline & Location-Independent Architecture (Zero `https://` Network Calls, Zero `/workspace` Lock-In):**
- Python package root: `hyperstitionstud_io.{config,ciphers,phonetics,publishing,glossary,graph,ci,audio}`
- Dynamic `__file__`-anchored `WORKSPACE_ROOT` discovery so sibling repositories work in any parent directory (`~/...`, `/tmp/...`, `/workspace/`).
- Cross-OS TrueType font resolver (`hyperstitionstud_io.publishing.fonts`) supporting Debian/Ubuntu, Fedora/RHEL, Arch, Alpine, and macOS with built-in Pillow/ReportLab fallbacks.
- Offline JSON Schema `$id` URNs: `urn:io:hyperstitionstud:schema:v1:*` (`schemas/v1/*.schema.json`).
- GraphML / GEXF XML namespace: `xmlns:hs="urn:io:hyperstitionstud:ns:kg:1.0"`.
2. **Local-Configuration Citation URL Resolution (`[citations.path_mounts]` in `workspace.toml`):**
- Resolves local dossier paths into remote citation URLs **only** when explicitly configured in local `workspace.toml`, falling back deterministically to the verified local filesystem path.
- Transparently rebases `/workspace/...` paths in existing `v1` citation ledgers onto the active `WORKSPACE_ROOT` when running outside `/workspace`.
3. **4,897-Entry Offline `CMUdict` Phonetics Lookup (`cmudict_fallback.json`):**
- Translates `Gen 0` English tokens to `Gen 1` Ingglish 100% offline without requiring Node.js or `--workdir`.
1. **17 CLI Entrypoints (`pyproject.toml [project.scripts]`):**
- `hs-doctor`, `hs-citations`, `hs-pdf-build`, `hs-kg-build`, `hs-quant-harvest`, `hs-macro-harvest`, `hs-daily-brief`, `hs-ticker-card`, `hs-mcp`, `hs-db-build`, `hs-sync-version`, `hs-readme-sync`, `hs-archive-rotate`, `hs-public-smoke`, `hs-eng-docs`, `hs-math-docs`, and `hs-highlights`.
2. **20 Stateless Read-Only MCP & OpenAPI 3.1 REST Tools + HTTP `ETag` (`304 Not Modified`) Caching:**
- Exposes all cipher, phonetics, knowledge-graph, `ETI`, financial/macro time-series, Bayesian daily-brief, polyglot AST sandbox, SQLite FTS5 catalog, and IPLD `dag-json` `CIDv1` tools over `/mcp` and `/api/v1/*`.
3. **Interactive Web Workbenches (`https://hyperstitionstud.io/`):**
- `/` (Portal Home), `/learn/` (6-Module Interactive Track), `/quant/` (3-Pane Closing-Bell & FRED Macro Time-Series + 25-Scene Guided Tour), `/engineering/` (`E0-E5` Software Engineering Hub), `/math/` (`M0-M5` Applied Mathematics Hub), and `/donate/` (Signal Patronage).
4. **4,943-Entry Offline `CMUdict` Phonetics Lookup (`cmudict_fallback.json`):**
- Translates `Gen 0` English tokens to `Gen 1` Ingglish 100% offline with zero network calls.
+18
View File
@@ -12,6 +12,24 @@ www.hyperstitionstud.io {
hyperstitionstud.io {
encode zstd gzip
# Zero-PII Route Counter Log (Strategy 3A — remote_ip, client_ip, Cookie, User-Agent, and Referer deleted)
log {
output file /var/log/caddy/hyperstition-access.json {
roll_size 50MiB
roll_keep 3
}
format filter {
wrap json
fields {
request>remote_ip delete
request>client_ip delete
request>headers>Cookie delete
request>headers>User-Agent delete
request>headers>Referer delete
}
}
}
header {
Alt-Svc "h3=\":443\"; ma=2592000"
Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
+6
View File
@@ -17,7 +17,13 @@ Restart=always
RestartSec=2
NoNewPrivileges=true
PrivateTmp=true
PrivateDevices=true
ProtectHome=true
ProtectSystem=strict
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
RestrictSUIDSGID=true
ReadOnlyPaths=/srv/hyperstitionstud.io/repos
ReadWritePaths=/var/lib/hyperstitionstud.io /tmp
+2 -1
View File
@@ -56,8 +56,9 @@ else
fi
echo "${ROTATE_JSON}"
echo "[2/3] Running Quiescent SQLite Telemetry Logrotate Check (100M threshold)..."
echo "[2/3] Ingesting Zero-IP Caddy Route Counts (Strategy 3A) & Running Quiescent SQLite Telemetry Logrotate Check (100M threshold)..."
if [[ "${DRY_RUN}" -eq 0 ]]; then
python3 -m hyperstitionstud_io.db.sqlite_meta --ingest-caddy-route-counts
python3 -m hyperstitionstud_io.db.sqlite_meta --compress-archive --truncate-quiescent --max-mb 100
fi
+1
View File
@@ -115,6 +115,7 @@ fi
if [[ "${DO_PUSH}" -eq 1 ]] && [[ -f "/etc/hyperstitionstud.io/id_ed25519_git_libre_audio" ]]; then
echo "[4/5] Committing and pushing automated VPS telemetry updates to git.libre.audio..."
run_checked "hs-readme-sync --all" python3 -m hyperstitionstud_io.publishing.readme_sync --all
export GIT_SSH_COMMAND="ssh -i /etc/hyperstitionstud.io/id_ed25519_git_libre_audio -o StrictHostKeyChecking=accept-new"
STAMP_UTC="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
for r in hyperstitionstudio-core ingglish-hyperdope-gematria encyclopedia-knowledge-graph; do
+24 -2
View File
@@ -105,6 +105,9 @@ if [[ "${DO_PULL}" -eq 1 ]]; then
echo "[1/5] Updating ${REPOS_ROOT}/${repo} (${remote_name}/${branch})..."
prev_head="$(git -C "${REPOS_ROOT}/${repo}" rev-parse HEAD)"
run_checked "git fetch ${repo}" git -C "${REPOS_ROOT}/${repo}" fetch --force "${remote_name}" "${branch}" --tags
if ! git -C "${REPOS_ROOT}/${repo}" diff --quiet -- README.md 2>&1; then
git -C "${REPOS_ROOT}/${repo}" checkout -- README.md || true
fi
run_checked "git merge ${repo}" git -C "${REPOS_ROOT}/${repo}" merge --ff-only "${remote_name}/${branch}"
new_head="$(git -C "${REPOS_ROOT}/${repo}" rev-parse HEAD)"
if [[ "${repo}" == "hyperstitionstudio-core" && "${prev_head}" != "${new_head}" && -z "${HYPERSTITION_SYNC_REEXEC:-}" ]]; then
@@ -130,9 +133,22 @@ fi
echo "[2/5] Synchronizing local workspace.toml version, rebuilding SQLite FTS5 catalog, and running hs-doctor, version_sync --check, and 6-Gate Knowledge Graph Verification..."
if [[ -f "${REPOS_ROOT}/workspace.toml" ]] && [[ -f "${REPOS_ROOT}/hyperstitionstudio-core/workspace.example.toml" ]]; then
# Sync schema_version in untracked parent workspace.toml with hyperstitionstud_io.__version__
run_checked "version_sync (sync untracked workspace.toml)" "${PYTHON_BIN}" -m hyperstitionstud_io.version_sync
# Sync schema_version in untracked parent workspace.toml with hyperstitionstud_io.__version__ without dirtying tracked repo files
run_checked "sync untracked workspace.toml" "${PYTHON_BIN}" -c '
import re
from pathlib import Path
from hyperstitionstud_io import __version__ as v
from hyperstitionstud_io.config import load_workspace_config
cfg = load_workspace_config()
p = cfg.workspace_root / "workspace.toml"
if p.is_file():
t = p.read_text(encoding="utf-8")
u = re.sub(r"schema_version\s*=\s*\"\d+\.\d+\.\d+\"", f"schema_version = \"{v}\"", t, flags=re.M)
if u != t:
p.write_text(u, encoding="utf-8")
'
fi
run_checked "hs-readme-sync --hooks-only" "${PYTHON_BIN}" -m hyperstitionstud_io.publishing.readme_sync --hooks-only
run_checked "version_sync --check" "${PYTHON_BIN}" -m hyperstitionstud_io.version_sync --check
run_checked "hs-db-build (--build)" "${PYTHON_BIN}" -m hyperstitionstud_io.db.sqlite_meta --build
run_checked "hs-doctor" "${PYTHON_BIN}" -m hyperstitionstud_io.ci.doctor
@@ -197,6 +213,12 @@ if [[ "${DO_CADDY}" -eq 1 ]]; then
if [[ -w "/var/lib" ]] || [[ -n "${SUDO}" ]]; then
run_checked "mkdir /var/lib/hyperstitionstud.io" ${SUDO} mkdir -p "/var/lib/hyperstitionstud.io"
fi
if [[ -w "/var/log" ]] || [[ -n "${SUDO}" ]]; then
run_checked "mkdir /var/log/caddy" ${SUDO} mkdir -p "/var/log/caddy"
if getent passwd caddy >&2; then
${SUDO} chown -R caddy:caddy "/var/log/caddy" || true
fi
fi
SRC_LOGROTATE="${DEPLOY_DIR}/logrotate.d/hyperstition-sqlite-meta"
DST_LOGROTATE="/etc/logrotate.d/hyperstition-sqlite-meta"
if [[ -f "${SRC_LOGROTATE}" ]] && [[ -d "/etc/logrotate.d" ]] && { [[ -w "/etc/logrotate.d" ]] || [[ -n "${SUDO}" ]]; }; then
+6
View File
@@ -54,6 +54,12 @@ ROUTES=(
"/"
"/assets/hs-group3-basalt-chamfer.css"
"/assets/hs-guile-scheme-repl.js"
"/assets/hs-matrix-coderain.js"
"/assets/matrix-font.woff2"
"/assets/closeups/quadrant-1-cybermemetics-calc-graph.png"
"/assets/closeups/quadrant-2-esoteric-finance-quant.png"
"/assets/closeups/quadrant-3-info-science-novice-learn-polyglot.png"
"/assets/closeups/quadrant-4-operators-deployment-vps.png"
"/donate/index.html"
"/learn/index.html"
"/learn/learn-app.js"
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hyperstitionstud.io/workspace-core",
"version": "2.2.0",
"version": "2.8.1",
"private": true,
"description": "Offline-first ESM & browser global (@hyperstitionstud.io/* / window.HyperstitionStudio.*) packages for Base-36 AQ ciphers and interactive knowledge graph workbenches.",
"license": "MIT",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hyperstitionstud.io/ciphers-aq",
"version": "2.2.0",
"version": "2.8.1",
"type": "module",
"main": "index.js",
"license": "MIT"
+7 -2
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "hyperstitionstudio-core"
version = "2.2.0"
version = "2.8.1"
description = "Shared PEP 420 common library (hyperstitionstud_io.*) for Base-36 AQ ciphers, offline CMUdict Ingglish phonetics, ReportLab/Pillow publishing, SHA-256 glossary isolation guards, local-config citation verification, and multi-format knowledge graphs."
readme = "README.md"
requires-python = ">=3.10"
@@ -14,9 +14,12 @@ authors = [
]
dependencies = [
"Pillow>=10.0.0",
]
[project.optional-dependencies]
pdf = [
"reportlab>=4.0.0",
"pypdf>=4.0.0",
"pdfplumber>=0.10.0",
]
[project.scripts]
@@ -35,6 +38,8 @@ hs-archive-rotate = "hyperstitionstud_io.publishing.archive_rotator:main"
hs-public-smoke = "hyperstitionstud_io.ci.public_regression:main"
hs-eng-docs = "hyperstitionstud_io.publishing.engineering_docs:main"
hs-math-docs = "hyperstitionstud_io.publishing.math_docs:main"
hs-highlights = "hyperstitionstud_io.publishing.highlights:main"
hs-readme-sync = "hyperstitionstud_io.publishing.readme_sync:main"
[tool.setuptools.packages.find]
where = ["src"]
+2 -2
View File
@@ -144,8 +144,8 @@ def main() -> int:
})
manifest = {
"version": "2.2.0",
"namespace_urn": "urn:io:hyperstitionstud:gallery:2.2.0",
"version": "2.8.1",
"namespace_urn": "urn:io:hyperstitionstud:gallery:2.8.1",
"total_items": len(items),
"items": items,
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

+194 -6
View File
@@ -180,12 +180,12 @@ button.btn:not(.tactile-donate-btn):hover,
color: #f8fafc;
}
/* RETAINED DONATION BUTTON STYLE (Deliberate border-radius: 999px Stadium-Pill Contrast) */
/* RETAINED DONATION BUTTON STYLE (Deliberate border-radius: 999px Stadium-Pill Contrast — v2.4.0 Canonical Single Source of Truth) */
.nav-donate-sep {
width: 1px;
height: 20px;
background: var(--border);
margin: 0 0.4rem;
margin: 0 0.2rem;
display: inline-block;
flex-shrink: 0;
align-self: center;
@@ -196,7 +196,7 @@ button.btn:not(.tactile-donate-btn):hover,
box-sizing: border-box !important;
border-radius: 999px !important;
clip-path: none !important;
padding: 0 0.9rem 0 0.38rem !important;
padding: 0.28rem 0.9rem 0.28rem 0.35rem !important;
background: linear-gradient(180deg, #ffd86b 0%, #f59e0b 52%, #d97706 100%) !important;
color: #020617 !important;
border: 1px solid #f5c630 !important;
@@ -211,6 +211,14 @@ button.btn:not(.tactile-donate-btn):hover,
line-height: 1 !important;
text-decoration: none !important;
flex-shrink: 0 !important;
transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease !important;
}
.btn-donate-pill:hover {
filter: brightness(1.06) !important;
transform: translateY(-1px) !important;
box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.65), 0 4px 12px rgba(245, 158, 11, 0.32) !important;
color: #020617 !important;
}
.donate-pill-emblem {
@@ -241,8 +249,53 @@ button.btn:not(.tactile-donate-btn):hover,
}
/* ============================================================================
ADDITIVE GUILE SCHEME PEDAGOGICAL LENS & DOCKABLE IN-BROWSER Z-REPL (v2.2.0)
ADDITIVE POLYGLOT PEDAGOGICAL LENS (GUILE / TS / RUST / ALL 3) & REPL (v2.3.0)
============================================================================ */
.hs-polyglot-segmented {
height: 34px !important;
display: inline-flex !important;
align-items: center !important;
background: var(--bg-void) !important;
border: 1px solid rgba(56, 189, 248, 0.55) !important;
padding: 0 0.2rem !important;
gap: 0.15rem !important;
}
.hs-polyglot-prefix {
font-size: 0.66rem;
font-weight: 700;
color: var(--text-secondary);
padding: 0 0.35rem;
letter-spacing: 0.05em;
}
.hs-polyglot-seg {
height: 26px !important;
display: inline-flex !important;
align-items: center !important;
gap: 0.25rem !important;
padding: 0 0.48rem !important;
background: transparent !important;
border: 1px solid transparent !important;
color: var(--text-secondary) !important;
font-size: 0.68rem !important;
font-weight: 700 !important;
font-family: inherit !important;
cursor: pointer !important;
}
.hs-polyglot-seg:hover {
color: var(--cyan) !important;
border-color: rgba(56, 189, 248, 0.4) !important;
}
.hs-polyglot-seg.hs-seg-active,
.hs-polyglot-seg[aria-checked="true"] {
background: rgba(16, 185, 129, 0.18) !important;
border-color: var(--emerald) !important;
color: var(--emerald) !important;
}
.hs-guile-toggle {
height: 34px !important;
display: inline-flex !important;
@@ -267,12 +320,13 @@ html[data-guile-scheme-mode="on"] .hs-guile-toggle {
display: inline-flex;
align-items: center;
justify-content: center;
width: 18px;
min-width: 18px;
height: 18px;
padding: 0 3px;
background: var(--bg-void);
border: 1px solid currentColor;
font-weight: 700;
font-size: 0.72rem;
font-size: 0.65rem;
}
.hs-guile-cartridge {
@@ -287,6 +341,21 @@ html[data-guile-scheme-mode="on"] .hs-guile-cartridge {
display: block;
}
html[data-polyglot-lens="guile"] .hs-lang-box-ts,
html[data-polyglot-lens="guile"] .hs-lang-box-rust {
display: none;
}
html[data-polyglot-lens="ts"] .hs-lang-box-guile,
html[data-polyglot-lens="ts"] .hs-lang-box-rust {
display: none;
}
html[data-polyglot-lens="rust"] .hs-lang-box-guile,
html[data-polyglot-lens="rust"] .hs-lang-box-ts {
display: none;
}
.hs-guile-triview {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
@@ -322,3 +391,122 @@ html[data-guile-scheme-mode="on"] #hsGuileReplDrawer {
#hsGuileReplDrawer.hs-repl-minimized .hs-repl-body {
display: none;
}
/* ==========================================================================
Subtle Basalt-Phosphor Matrix Code Rain & Cybernetic/Occult Micro-Sigils
========================================================================== */
@font-face {
font-family: "matrix-font";
src: url("matrix-font.woff2") format("woff2");
font-display: swap;
}
#hsMatrixCodeRainCanvas {
position: fixed;
inset: 0;
width: 100vw;
height: 100vh;
z-index: 0;
pointer-events: none;
opacity: 0.45;
transition: opacity 0.25s ease;
}
body > .container,
body > header,
body > main,
body > section,
body > footer,
#hsGuileReplDrawer {
position: relative;
z-index: 1;
}
.hs-sigil {
display: inline-block;
font-family: 'DejaVu Sans Mono', monospace;
opacity: 0.78;
margin-right: 0.28rem;
font-weight: 400;
}
.hs-sigil-seal {
display: inline-block;
font-family: 'DejaVu Sans Mono', monospace;
font-size: 0.7rem;
color: var(--gold);
opacity: 0.72;
letter-spacing: 0.08em;
margin-left: 0.35rem;
}
.hs-sigil-colophon {
display: inline-block;
font-family: 'DejaVu Sans Mono', monospace;
color: var(--cyan);
opacity: 0.68;
letter-spacing: 0.08em;
}
.hs-plate-g3.plate-lock-gold::after,
.card.plate-lock-gold::after,
.panel.plate-lock-gold::after {
content: "\260D \00B7 37\00D73k";
position: absolute;
top: 6px;
right: 12px;
font-family: 'DejaVu Sans Mono', monospace;
font-size: 0.64rem;
color: var(--gold);
opacity: 0.32;
pointer-events: none;
letter-spacing: 0.04em;
}
.hs-plate-g3.plate-lock-emerald::after,
.card.plate-lock-emerald::after,
.panel.plate-lock-emerald::after {
content: "\263F \00B7 \0394=0";
position: absolute;
top: 6px;
right: 12px;
font-family: 'DejaVu Sans Mono', monospace;
font-size: 0.64rem;
color: var(--emerald);
opacity: 0.32;
pointer-events: none;
letter-spacing: 0.04em;
}
.hs-plate-g3.plate-lock-rose::after,
.card.plate-lock-rose::after,
.panel.plate-lock-rose::after {
content: "\2297 \00B7 S\00D7S6";
position: absolute;
top: 6px;
right: 12px;
font-family: 'DejaVu Sans Mono', monospace;
font-size: 0.64rem;
color: var(--rose);
opacity: 0.32;
pointer-events: none;
letter-spacing: 0.04em;
}
html[data-sigil-accents="off"] .hs-sigil,
html[data-sigil-accents="off"] .hs-sigil-seal,
html[data-sigil-accents="off"] .hs-sigil-colophon,
html[data-sigil-accents="off"] .hs-plate-g3::after,
html[data-sigil-accents="off"] .card::after,
html[data-sigil-accents="off"] .panel::after {
display: none !important;
}
.hs-rain-toggle-btn {
padding: 0.18rem 0.52rem !important;
font-size: 0.67rem !important;
border-color: rgba(56, 189, 248, 0.45) !important;
color: var(--cyan) !important;
background: var(--bg-void) !important;
cursor: pointer;
}
File diff suppressed because it is too large. Load diff
+381
View File
@@ -0,0 +1,381 @@
/* ==========================================================================
Hyperstition Studio — Subtle Basalt-Phosphor Cybernetic Code Rain
Adapted from haiperdohp-jemaytreeah/calc/coderain.js (matrix-font.woff2)
- Three modes: "subtle" (default), "classic" (hyperdope-gematria), "off"
- Peripheral vignette attenuation (-60% behind central .container reading column)
- ~4% leading-droplet cybernetic & Hermetic/occult micro-sigil glints
- Page Visibility API & prefers-reduced-motion guards (Alt+M shortcut)
========================================================================== */
(function (root) {
"use strict";
var STORAGE_KEY = "hs:matrix-coderain:v1";
// Exact 66-code glyph repertoire from haiperdohp-jemaytreeah/calc/coderain.js
var MATRIX_CHARS = [
97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 48, 49, 50, 51, 52, 53,
54, 55, 56, 57, 36, 43, 45, 42, 47, 61, 37, 34, 39, 35, 38, 95, 40, 41, 44,
46, 59, 58, 63, 33, 92, 124, 123, 125, 60, 62, 91, 93, 94, 126
];
// Canonical 8-sigil + mathematical glint vocabulary (verified in DejaVuSansMono.ttf)
var SIGIL_GLINTS = [
"\u263F", // ☿ Mercury (Ciphers / Ingglish)
"\u260D", // ☍ Opposition / Syzygy (333/666/777 Locks)
"\u2609", // ☉ Solar Monad (Knowledge Graph Apex Hubs)
"\u2644", // ♄ Saturn (Chronos / Time-Series & Cold Archive)
"\u269A", // ⚚ Staff of Hermes (MCP / REST Conduit)
"\u269B", // ⚛ Cybernetic Kernel (Wiener Feedback / EROFS)
"\u25C8", // ◈ Isometric Lattice Node (G4 Fixed Point)
"\u2206", // ∆ Alchemical / Variance-Collapse Delta
"\u2297", // ⊗ Double Articulation (S x S6)
"\u03BB", // λ Church / Z-Combinator Lambda
"\u03A6", // Φ Phonemic Projection
"\u03A9", // Ω Terminal Attractor
"\u221E" // ∞ Recursive Horizon
];
var PROFILES = {
subtle: {
mode: "subtle",
label: "SUBTLE",
hue: 152,
sat: 34,
lit: 24,
fontSizePx: 12.5,
colPitchPx: 24,
stepPx: 13,
frameIntervalMs: 80,
canvasOpacity: 0.45,
fadeFill: "rgba(2, 6, 23, 0.095)",
trailAlphaOuter: 0.24,
trailAlphaCenter: 0.085,
tipAlphaOuter: 0.34,
tipAlphaCenter: 0.14,
resetHorizonPx: 18000,
sigilGlintProb: 0.045
},
classic: {
mode: "classic",
label: "CLASSIC",
hue: 148,
sat: 20,
lit: 19,
fontSizePx: 17,
colPitchPx: 15,
stepPx: 20,
frameIntervalMs: 50,
canvasOpacity: 0.72,
fadeFill: "rgba(2, 6, 23, 0.07)",
trailAlphaOuter: 0.52,
trailAlphaCenter: 0.28,
tipAlphaOuter: 0.68,
tipAlphaCenter: 0.40,
resetHorizonPx: 10000,
sigilGlintProb: 0.06
},
off: {
mode: "off",
label: "OFF",
canvasOpacity: 0
}
};
function computeColumnAlpha(xPx, widthPx, profile, isTip) {
if (!widthPx || widthPx <= 0) return isTip ? profile.tipAlphaOuter : profile.trailAlphaOuter;
var normX = xPx / widthPx;
// Outer 14% margins on left and right get outer alpha; central 72% reading well is attenuated
var distFromCenter = Math.abs(normX - 0.5) * 2.0; // 0 at center, 1 at edges
var t = Math.max(0, Math.min(1, (distFromCenter - 0.55) / 0.45));
var centerA = isTip ? profile.tipAlphaCenter : profile.trailAlphaCenter;
var outerA = isTip ? profile.tipAlphaOuter : profile.trailAlphaOuter;
return Number((centerA + (outerA - centerA) * t).toFixed(4));
}
function pickRandomGlyph(sigilProb) {
if (sigilProb > 0 && Math.random() < sigilProb) {
return {
ch: SIGIL_GLINTS[Math.floor(Math.random() * SIGIL_GLINTS.length)],
isSigil: true
};
}
var code = MATRIX_CHARS[Math.floor(Math.random() * MATRIX_CHARS.length)];
return {
ch: String.fromCharCode(code),
isSigil: false
};
}
function initBrowserCodeRain() {
if (typeof document === "undefined" || !document.body) return null;
var canvas = document.getElementById("hsMatrixCodeRainCanvas");
if (!canvas) {
canvas = document.createElement("canvas");
canvas.id = "hsMatrixCodeRainCanvas";
canvas.setAttribute("aria-hidden", "true");
document.body.insertBefore(canvas, document.body.firstChild);
}
var ctx = canvas.getContext && canvas.getContext("2d");
if (!ctx) return null;
var currentMode = "subtle";
try {
var saved = window.localStorage.getItem(STORAGE_KEY);
if (saved && PROFILES[saved]) currentMode = saved;
} catch (_e) {}
var reducedMotion = false;
try {
reducedMotion = !!(window.matchMedia && window.matchMedia("(prefers-reduced-motion: reduce)").matches);
} catch (_e) {}
var width = 0;
var height = 0;
var cols = 0;
var ypos = [];
var colSpeeds = [];
var rafId = null;
var lastTickTime = 0;
function setupColumns() {
var prof = PROFILES[currentMode] || PROFILES.subtle;
width = canvas.width = Math.max(320, window.innerWidth || document.documentElement.clientWidth || 1280);
height = canvas.height = Math.max(240, window.innerHeight || document.documentElement.clientHeight || 800);
ctx.fillStyle = "#020617";
ctx.fillRect(0, 0, width, height);
if (prof.mode === "off") {
cols = 0;
ypos = [];
colSpeeds = [];
return;
}
cols = Math.floor(width / prof.colPitchPx) + 1;
ypos = new Array(cols);
colSpeeds = new Array(cols);
for (var i = 0; i < cols; i++) {
// Stagger initial positions so only ~35% of streams are initially in-viewport
ypos[i] = Math.random() < 0.35
? Math.floor(Math.random() * height)
: -Math.floor(Math.random() * height * 1.6);
colSpeeds[i] = 0.85 + Math.random() * 0.30;
}
}
function stepFrame() {
var prof = PROFILES[currentMode];
if (!prof || prof.mode === "off") return;
ctx.shadowBlur = 0;
ctx.fillStyle = prof.fadeFill;
ctx.fillRect(0, 0, width, height);
var baseFont = prof.fontSizePx + "px 'matrix-font', 'DejaVu Sans Mono', monospace";
var sigilFont = (prof.fontSizePx + 0.5) + "px 'DejaVu Sans Mono', monospace";
for (var ind = 0; ind < cols; ind++) {
var y = ypos[ind];
var x = ind * prof.colPitchPx;
if (y >= 0 && y <= height + 30) {
var glyph = pickRandomGlyph(prof.sigilGlintProb);
if (glyph.isSigil) {
var tipA = computeColumnAlpha(x, width, prof, true);
ctx.font = sigilFont;
ctx.fillStyle = "hsla(168, 55%, 48%, " + tipA + ")";
ctx.fillText(glyph.ch, x, y);
} else {
var trA = computeColumnAlpha(x, width, prof, false);
ctx.font = baseFont;
ctx.fillStyle = "hsla(" + prof.hue + ", " + prof.sat + "%, " + prof.lit + "%, " + trA + ")";
ctx.fillText(glyph.ch, x, y);
}
}
if (y > 120 + Math.random() * prof.resetHorizonPx) {
ypos[ind] = -Math.floor(Math.random() * 360);
} else {
ypos[ind] = y + prof.stepPx * colSpeeds[ind];
}
}
}
function loop(now) {
var prof = PROFILES[currentMode];
if (!prof || prof.mode === "off" || document.hidden) {
rafId = null;
return;
}
if (!lastTickTime || now - lastTickTime >= prof.frameIntervalMs) {
lastTickTime = now;
stepFrame();
}
if (!reducedMotion) {
rafId = window.requestAnimationFrame(loop);
}
}
function updateToggleButtons() {
var prof = PROFILES[currentMode] || PROFILES.subtle;
document.querySelectorAll(".hs-rain-toggle-btn").forEach(function (btn) {
btn.textContent = "\u263F RAIN: " + prof.label;
btn.setAttribute("data-rain-mode", prof.mode);
});
}
function applyMode(mode) {
if (!PROFILES[mode]) mode = "subtle";
currentMode = mode;
var prof = PROFILES[currentMode];
document.documentElement.setAttribute("data-matrix-coderain", mode);
try {
window.localStorage.setItem(STORAGE_KEY, mode);
} catch (_e) {}
if (rafId) {
window.cancelAnimationFrame(rafId);
rafId = null;
}
if (mode === "off") {
canvas.style.opacity = "0";
canvas.style.display = "none";
} else {
canvas.style.display = "block";
canvas.style.opacity = String(prof.canvasOpacity);
setupColumns();
// Pre-warm 8 steps so the initial frame has subtle phosphor trails
for (var wStep = 0; wStep < 8; wStep++) stepFrame();
if (!reducedMotion && !document.hidden) {
rafId = window.requestAnimationFrame(loop);
}
}
updateToggleButtons();
}
function cycleMode() {
var order = ["subtle", "classic", "off"];
var nextIdx = (order.indexOf(currentMode) + 1) % order.length;
applyMode(order[nextIdx]);
}
// Inject a compact toggle pill into <footer> if not already present
var footerEl = document.querySelector("footer");
if (footerEl && !footerEl.querySelector(".hs-rain-toggle-btn")) {
var btn = document.createElement("button");
btn.type = "button";
btn.className = "btn hs-rain-toggle-btn";
btn.title = "Cycle Cybernetic Code Rain Background: SUBTLE / CLASSIC / OFF (Alt+M)";
btn.addEventListener("click", cycleMode);
var wrap = document.createElement("span");
wrap.style.marginLeft = "0.55rem";
wrap.appendChild(btn);
footerEl.appendChild(wrap);
}
document.querySelectorAll(".hs-rain-toggle-btn").forEach(function (b) {
if (!b.__hsBound) {
b.__hsBound = true;
b.addEventListener("click", cycleMode);
}
});
window.addEventListener("keydown", function (ev) {
if (ev.altKey && (ev.key === "m" || ev.key === "M")) {
ev.preventDefault();
cycleMode();
}
});
document.addEventListener("visibilitychange", function () {
if (document.hidden) {
if (rafId) {
window.cancelAnimationFrame(rafId);
rafId = null;
}
} else if (currentMode !== "off" && !reducedMotion && !rafId) {
lastTickTime = 0;
rafId = window.requestAnimationFrame(loop);
}
});
var resizeTimer = null;
window.addEventListener("resize", function () {
if (resizeTimer) clearTimeout(resizeTimer);
resizeTimer = setTimeout(function () {
if (currentMode !== "off") setupColumns();
}, 150);
});
applyMode(currentMode);
// Strategy 3B, 4B & 5B: Zero-PII Conditional ETag Surface, Donate-From, Donate-Copy & Export-Action Handshake
try {
if (window.location && (window.location.protocol === "http:" || window.location.protocol === "https:") && typeof window.fetch === "function") {
var pathStr = window.location.pathname || "/";
var surfSlug = "home";
if (pathStr.indexOf("/calc") === 0) surfSlug = "calc";
else if (pathStr.indexOf("/quant") === 0) surfSlug = "quant";
else if (pathStr.indexOf("/graph") === 0) surfSlug = "graph";
else if (pathStr.indexOf("/learn") === 0) surfSlug = "learn";
else if (pathStr.indexOf("/engineering") === 0) surfSlug = "engineering";
else if (pathStr.indexOf("/math") === 0) surfSlug = "math";
else if (pathStr.indexOf("/donate") === 0) surfSlug = "donate";
var qParts = ["surface=" + encodeURIComponent(surfSlug)];
if (surfSlug === "donate" && window.location.search) {
var mFrom = window.location.search.match(/[?&]from=([a-z]+)/i);
if (mFrom && mFrom[1]) qParts.push("donate_from=" + encodeURIComponent(mFrom[1].toLowerCase()));
}
window.fetch("/api/v1/status?" + qParts.join("&"), { method: "GET" }).catch(function () {});
var exportBindings = [
["#btnDownloadState", "learn_state_json"],
["#exportCsvBtn", "quant_csv"],
["#exportJsonBtn", "quant_json"],
["#openTradingViewBtn", "quant_tradingview"],
["#panel3TvBtn", "quant_tradingview"],
["#exportPngBtn", "graph_png"]
];
exportBindings.forEach(function (pair) {
document.querySelectorAll(pair[0]).forEach(function (el) {
if (!el.__hsExportBound) {
el.__hsExportBound = true;
el.addEventListener("click", function () {
window.fetch("/api/v1/status?export_action=" + pair[1], { method: "GET" }).catch(function () {});
});
}
});
});
}
} catch (_e) {}
return {
applyMode: applyMode,
cycleMode: cycleMode,
getMode: function () { return currentMode; }
};
}
if (typeof document !== "undefined") {
if (document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", initBrowserCodeRain);
} else {
initBrowserCodeRain();
}
}
var api = {
MATRIX_CHARS: MATRIX_CHARS,
SIGIL_GLINTS: SIGIL_GLINTS,
PROFILES: PROFILES,
computeColumnAlpha: computeColumnAlpha,
pickRandomGlyph: pickRandomGlyph,
initBrowserCodeRain: initBrowserCodeRain
};
if (typeof module !== "undefined" && module.exports) {
module.exports = api;
} else {
root.HyperstitionCodeRain = api;
}
})(typeof globalThis !== "undefined" ? globalThis : window);
Binary file not shown.
+10 -4
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Signal Patronage &amp; Open-Instrument Notes — hyperstitionstud.io/donate</title>
<link rel="stylesheet" href="../assets/hs-group3-basalt-chamfer.css?v=2.2.0" />
<link rel="stylesheet" href="../assets/hs-group3-basalt-chamfer.css?v=2.8.1" />
<style>
:root {
--bg-canvas: #020617;
@@ -343,7 +343,7 @@
<span class="dot"></span>
<h1>hyperstitionstud.io/donate — Signal Patronage &amp; Open-Instrument Notes</h1>
</div>
<p class="subtitle">Open-Readout Phonemic, Graph &amp; Closing-Bell Telemetry Workbench &bull; Namespace Authority: urn:io:hyperstitionstud:donate:v2.2.0</p>
<p class="subtitle">Open-Readout Phonemic, Graph &amp; Closing-Bell Telemetry Workbench &bull; Namespace Authority: urn:io:hyperstitionstud:donate:v2.8.1 <span class="hs-sigil-seal" aria-hidden="true">[ &#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; ]</span></p>
</div>
<nav class="top-nav">
<a class="btn" data-donate-route="home" href="/">Portal Home (/)</a>
@@ -406,11 +406,12 @@
</section>
<footer>
<div>hyperstitionstud.io/donate v2.2.0 &bull; 100% Static &amp; Offline-Portable &bull; Zero External Trackers</div>
<div class="hs-lemur-credit">Made with <span class="hs-heart" role="img" aria-label="love" style="color:var(--rose);display:inline-block;padding:0 2px;">&#x2665;</span> by Lemurs.</div>
<div>hyperstitionstud.io/donate v2.8.1 &bull; 100% Static &amp; Offline-Portable &bull; Zero External Trackers</div>
<div class="hs-lemur-credit"><span class="hs-sigil-colophon" aria-hidden="true">&#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; &middot; &#x2644;</span> &bull; Made with <span class="hs-heart" role="img" aria-label="love" style="color:var(--rose);display:inline-block;padding:0 2px;">&#x2665;</span> by Lemurs.</div>
</footer>
</div>
<script src="../assets/hs-matrix-coderain.js?v=2.8.1" defer></script>
<script>
(function () {
"use strict";
@@ -448,6 +449,11 @@
if (feedback) {
feedback.textContent = `[COPIED ${channel}] ${addr} — Ready to paste in your wallet.`;
}
try {
if (window.location && (window.location.protocol === "http:" || window.location.protocol === "https:") && typeof window.fetch === "function") {
window.fetch("/api/v1/status?donate_copy=" + encodeURIComponent(channel), { method: "GET" }).catch(function () {});
}
} catch (_e) {}
}
document.querySelectorAll(".copy-channel-btn").forEach(function (btn) {
@@ -3,8 +3,8 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Unit E5: Topological Git Push, Self-Re-Executing tmpfs VPS Hydration, Dark-Mode hs-pdf-build & hs-public-smoke — hyperstitionstud.io/engineering (v2.2.0)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.2.0" />
<title>Unit E5: Topological Git Push, Self-Re-Executing tmpfs VPS Hydration, Dark-Mode hs-pdf-build & hs-public-smoke — hyperstitionstud.io/engineering (v2.8.1)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.8.1" />
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DejaVu Sans Mono', ui-monospace, monospace; padding: 1.25rem; line-height: 1.5; }
@@ -22,7 +22,7 @@
<header>
<div>
<h1>Unit E5: Topological Git Push, Self-Re-Executing tmpfs VPS Hydration, Dark-Mode hs-pdf-build & hs-public-smoke</h1>
<p class="subtitle">Cartridge E5 &bull; Non-Sequentially Revertible via <code>hs-eng-docs --disable cicd-vps-tmpfs-and-regression</code> &bull; v2.2.0</p>
<p class="subtitle">Cartridge E5 &bull; Non-Sequentially Revertible via <code>hs-eng-docs --disable cicd-vps-tmpfs-and-regression</code> &bull; v2.8.1 <span class="hs-sigil-seal" aria-hidden="true">[ &#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; ]</span></p>
</div>
<nav class="top-nav">
<a class="btn" href="../../index.html">Portal Home (/)</a>
@@ -33,14 +33,14 @@
<a class="btn" href="../mcp-chatbot-rest-and-ipld/index.html" style="">E4: MCP, REST & IPLD CIDv1</a>
<a class="btn" href="index.html" style="border-color:var(--gold);color:var(--gold);">E5: CI/CD, VPS & Regression</a>
<a class="btn" href="../../math/index.html">Math Hub (/math/)</a>
<button id="guileSchemeModeToggle" class="btn hs-guile-toggle" type="button" aria-pressed="false" title="Toggle additive Guile Scheme &amp; Z-Combinator teaching cartridges and in-browser REPL (Alt+S)"><span class="hs-guile-lambda-badge">&lambda;</span><span>GUILE SCHEME LENS: <strong id="guileSchemeModeState">OFF</strong></span></button>
<div id="hsPolyglotModeSelector" class="hs-polyglot-segmented" role="radiogroup" aria-label="Pedagogical Programming Language Lens"><span class="hs-polyglot-prefix">LENS:</span><button type="button" id="guileSchemeModeToggle" class="hs-polyglot-seg" role="radio" data-lens-mode="off" aria-checked="true" title="Hide programming language cartridges (Alt+0)">OFF</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="guile" aria-checked="false" title="GNU Guile Scheme — Z-Combinator &amp; Exact Rationals (Alt+1)"><span class="hs-guile-lambda-badge">&lambda;</span>GUILE</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="ts" aria-checked="false" title="TypeScript — Static Union Types &amp; Functional Pipelines (Alt+2)"><span class="hs-guile-lambda-badge">TS</span>TYPESCRIPT</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="rust" aria-checked="false" title="Rust — Ownership, Option&lt;T&gt; &amp; Zero-Cost Iterators (Alt+3)"><span class="hs-guile-lambda-badge">Rs</span>RUST</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="all" aria-checked="false" title="Side-by-side comparison of Guile Scheme, TypeScript, and Rust (Alt+4)">&equiv; ALL 3</button><strong id="guileSchemeModeState" style="display:none;">OFF</strong></div>
<span class="nav-donate-sep" aria-hidden="true"></span>
<a class="btn-donate-pill" href="../../donate/index.html"><span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>
<a class="btn-donate-pill" href="../../donate/index.html?from=engineering"><span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>
</nav>
</header>
<section class="panel hs-plate-g3 plate-lock-emerald hs-prereq-ladder" style="margin-bottom:0.9rem;padding:1rem 1.2rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--emerald);text-transform:uppercase;letter-spacing:0.06em;">Prerequisite Track for Novices &bull; Required Expertise: Level 4: Linux Systems Administration, Bash Traps, systemd & DevOps (20-30 hrs study)</div><p style="font-size:0.76rem;color:var(--text-secondary);margin:0.35rem 0;">If any concepts on this page are unfamiliar, occupy your study time with these free foundational resources first:</p><div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:0.8rem;margin-top:0.4rem;"><div><strong style="font-size:0.73rem;color:var(--gold);">Core Concepts Required:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li>POSIX Bash error handling (set -euo pipefail, trap ERR, run_checked(), exec, flock)</li><li>Git fast-forward merges, annotated tags, and git pull --rebase --autostash</li><li>Linux tmpfs RAM mounts, systemd services/timers, Caddy HTTP/3 QUIC, and TrueType cmap tables</li></ul></div><div><strong style="font-size:0.73rem;color:var(--cyan);">Curated Free Public Study Resources:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li><a href="https://git-scm.com/book/en/v2" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">Pro Git Book (Chacon & Straub — Free Complete Online Text) &#x2197;</a></li><li><a href="https://mywiki.wooledge.org/BashGuide" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">Wooledge BashGuide & BashFAQ (Error Handling & Process Exec) &#x2197;</a></li><li><a href="https://www.freedesktop.org/software/systemd/man/systemd.service.html" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">freedesktop.org systemd.service & systemd.timer Manuals &#x2197;</a></li><li><a href="https://caddyserver.com/docs/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">Caddy Server Official Documentation (HTTP/3 & Reverse Proxy) &#x2197;</a></li></ul></div></div></section>
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">&lambda; Guile Scheme Foil (E5): 4-Tier Programmatic Semantic Version Bump Heuristic in Scheme</div><button type="button" class="btn hs-load-in-repl-btn" data-scheme-expr="(evaluate-bump-scope 2 0 1 0 #f)" style="border-color:var(--cyan);color:var(--cyan);">Send to In-Browser Guile REPL &rarr;</button></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Formal Specification:</strong><code>Bump(dirty, ahead, plans, tools, brk) ∈ {noop, patch, minor, major}</code></div><div class="hs-guile-box"><strong style="color:var(--text-secondary);display:block;margin-bottom:0.2rem;">2. Production Python:</strong><pre style="white-space:pre-wrap;">evaluate_change_scope_heuristics(signals)['recommended_bump_level']</pre></div><div class="hs-guile-box"><strong style="color:var(--cyan);display:block;margin-bottom:0.2rem;">3. Guile Scheme (Z-Combinator):</strong><code class="hs-guile-code-expr">(evaluate-bump-scope 2 0 1 0 #f)</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Toggle Guile Lens ON to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge:</strong> Set archived-plans to 0 => 'patch, or dirty=0 ahead=0 => 'noop in the REPL.</div></section>
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">&lambda; Polyglot Foil (E5): 4-Tier Programmatic Semantic Version Bump Heuristic</div><div style="display:flex;gap:0.25rem;flex-wrap:wrap;align-items:center;"><button type="button" class="hs-polyglot-seg" data-lens-mode="guile">&lambda; Guile</button><button type="button" class="hs-polyglot-seg" data-lens-mode="ts">TS TypeScript</button><button type="button" class="hs-polyglot-seg" data-lens-mode="rust">Rs Rust</button><button type="button" class="hs-polyglot-seg" data-lens-mode="all">&equiv; All 3</button><button type="button" class="hs-polyglot-seg" data-lens-mode="off">Hide</button></div></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Formal Specification &amp; Python:</strong><code>Bump(dirty, ahead, plans, tools, brk) ∈ {noop, patch, minor, major}</code><pre style="white-space:pre-wrap;margin-top:0.25rem;color:var(--text-secondary);">evaluate_change_scope_heuristics(signals)[&#x27;recommended_bump_level&#x27;]</pre></div><div class="hs-guile-box hs-lang-box-guile"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--cyan);">&lambda; Guile Scheme (Z-Combinator):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="guile" data-scheme-expr="(evaluate-bump-scope 2 0 1 0 #f)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-guile-code-expr">(evaluate-bump-scope 2 0 1 0 #f)</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-ts"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--gold);">TS TypeScript (Strict AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="ts" data-scheme-expr="evaluateBumpScope({dirty: 2, ahead: 0, plans: 1, tools: 0, breaking: false})" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-ts-code-expr">evaluateBumpScope({dirty: 2, ahead: 0, plans: 1, tools: 0, breaking: false})</code><div class="hs-ts-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-rust"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--emerald);">Rs Rust (Option/Iterator AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="rust" data-scheme-expr="evaluate_bump_scope(2, 0, 1, 0, false)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-rust-code-expr">evaluate_bump_scope(2, 0, 1, 0, false)</code><div class="hs-rust-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge (4-Ring Zero-Escape Sandbox):</strong> Test the 4-tier decision tree (noop, patch, minor, major) in all 3 languages.</div></section>
<article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">1. Zero-/dev/null CI/CD Scripts, Self-Re-Exec & Autonomous VPS Harvest Timers</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">push-all-to-git-libre-audio.sh, deploy/sync-vps-repos.sh, and deploy/run-vps-data-production.sh contain 0 /dev/null redirections and capture exact exit codes via run_checked(). When sync-vps-repos.sh updates hyperstitionstudio-core on disk, HYPERSTITION_SYNC_REEXEC=1 immediately execs the new script image before hydrating /var/www/hyperstitionstud.io/repos (tmpfs RAM + Brotli-11/Gzip-9).</p></article><article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">2. Dark-Mode hs-pdf-build, Cold-Archive Rotator (hs-archive-rotate) & 6-Gate Public Regression (hs-public-smoke)</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">pdf_compiler.py transpiles LaTeX math, preserves <br/>, filters every character against DejaVu TrueType cmap tables, sets rl_config.defaultGraphicsFontName='DejaVu' (0 /Helvetica leaks), and prioritizes web-linked PDFs (--refresh-all-web-pdfs). archive_rotator.py rotates completed docs/archive/ pairs into completed-plans-archive.tar.gz, while public_regression.py audits live HTTP responses against .cache/internal-test-baseline-latest.json across Gates P1-P6.</p></article>
<div style="display:flex;justify-content:space-between;align-items:center;margin-top:0.8rem;">
@@ -49,15 +49,21 @@
</div>
<footer>
hyperstitionstud.io/engineering/cicd-vps-tmpfs-and-regression v2.2.0 &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
hyperstitionstud.io/engineering/cicd-vps-tmpfs-and-regression v2.8.1 &bull; <span class="hs-sigil-colophon" aria-hidden="true">&#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; &middot; &#x2644;</span> &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
</footer>
</div>
<script src="../engineering-manifest-data.js?v=2.2.0"></script>
<script src="../engineering-app.js?v=2.2.0"></script>
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Guile Scheme and Z-Combinator REPL">
<script src="../../assets/hs-matrix-coderain.js?v=2.8.1" defer></script>
<script src="../engineering-manifest-data.js?v=2.8.1"></script>
<script src="../engineering-app.js?v=2.8.1"></script>
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Polyglot Guile Scheme, TypeScript, and Rust Hardened REPL">
<div style="display:flex;justify-content:space-between;align-items:center;gap:0.5rem;margin-bottom:0.45rem;">
<div style="font-size:0.74rem;font-weight:700;color:var(--cyan);">&lambda; IN-BROWSER GUILE SCHEME &amp; Z-COMBINATOR REPL (OFFLINE • ZERO CDN)</div>
<div style="font-size:0.73rem;font-weight:700;color:var(--cyan);">&lambda; 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
<div style="display:flex;gap:0.4rem;align-items:center;">
<select id="hsPolyglotReplLang" style="background:var(--bg-void);color:var(--cyan);border:1px solid var(--cyan);padding:0.15rem 0.35rem;font-family:inherit;font-size:0.68rem;font-weight:700;">
<option value="guile">λ Guile Scheme</option>
<option value="ts">TS TypeScript</option>
<option value="rust">Rs Rust</option>
</select>
<label style="font-size:0.68rem;color:var(--text-secondary);cursor:pointer;"><input type="checkbox" id="hsGuilePreferFloat" /> Float view</label>
<button type="button" id="hsGuileReplCloseBtn" class="btn" style="padding:0.15rem 0.45rem;font-size:0.68rem;">Minimize / Expand</button>
</div>
@@ -65,22 +71,27 @@
<div class="hs-repl-body">
<div style="display:flex;gap:0.4rem;margin-bottom:0.4rem;flex-wrap:wrap;">
<select id="hsGuileReplPreset" style="flex:1;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.28rem;font-family:inherit;font-size:0.7rem;">
<option value="">-- Load Preset Z-Combinator / Domain Expression --</option>
<option value='(aq-base36 "LEMUR")'>Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
<option value="(prime-factors 666)">Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
<option value="(variance-pop *cluster-292-gen0*)">Exact Rational Variance (Cluster 292 Gen 0): (variance-pop *cluster-292-gen0*)</option>
<option value="(eti-score 95 92 94 90 91 96)">Exact Rational Convex ETI Score: (eti-score 95 92 94 90 91 96)</option>
<option value="((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">Thomas' Calculus Derivative d/dx(x^3) at x=2 via Z</option>
<option value="(adaptive-simpson (lambda (x) (* x x)) 0.0 3.0 1e-6)">Adaptive Simpson Integral int_0^3 x^2 dx = 9.0 via Z</option>
<option value="(bayes-update '(1/3 1/3 1/3) '(1/10 3/10 6/10))">Exact Rational 3-State Bayes Update via Z</option>
<option value="">-- Load Preset Polyglot Expression (Guile / TS / Rust) --</option>
<option value='guile::(aq-base36 "LEMUR")'>[λ Guile] Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
<option value='ts::aqBase36("LEMUR")'>[TS] Base-36 AQ: aqBase36("LEMUR") => 114</option>
<option value='rust::aq_base36("LEMUR")'>[Rs Rust] Base-36 AQ: aq_base36("LEMUR") => 114</option>
<option value="guile::(prime-factors 666)">[λ Guile] Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
<option value="ts::primeFactors(666)">[TS] Prime Factors: primeFactors(666) => [2,3,3,37]</option>
<option value="rust::prime_factors(666_u64)">[Rs Rust] Prime Factors: prime_factors(666_u64) => vec![2, 3, 3, 37]</option>
<option value="guile::(variance-pop *cluster-292-gen0*)">[λ Guile] Exact Rational Variance (Cluster 292): 4634/9</option>
<option value="ts::variancePop([264, 317, 276] as const)">[TS] Cluster 292 Variance: 514.8889</option>
<option value="rust::variance_pop(&[264.0, 317.0, 276.0])">[Rs Rust] Cluster 292 Variance: 514.8889</option>
<option value="guile::((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">[λ Guile] Thomas' Calculus d/dx(x^3) at x=2 => 12.0</option>
<option value="ts::derivative((x: number): number => x ** 3, 1e-5)(2.0)">[TS] Derivative d/dx(x^3) at x=2 => 12</option>
<option value="rust::derivative(|x: f64| x * x * x, 1e-5, 2.0)">[Rs Rust] Derivative d/dx(x^3) at x=2 => 12</option>
</select>
<button type="button" id="hsGuileReplEvalBtn" class="btn" style="border-color:var(--emerald);color:var(--emerald);">Evaluate (&lambda;)</button>
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step &beta;-Reduction</button>
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step AST Trace</button>
</div>
<textarea id="hsGuileReplInput" rows="2" style="width:100%;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.45rem;font-family:inherit;font-size:0.73rem;">(aq-base36 "LEMUR")</textarea>
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">guile&gt; Ready. Toggle [λ GUILE SCHEME LENS: ON] or click Evaluate (λ).</pre>
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">polyglot&gt; Ready (4-Ring Zero-Eval AST Sandbox). Select [λ GUILE | TS | RS | ≡ ALL 3] or click Evaluate (λ).</pre>
</div>
</aside>
<script src="../../assets/hs-guile-scheme-repl.js?v=2.2.0"></script>
<script src="../../assets/hs-guile-scheme-repl.js?v=2.8.1"></script>
</body>
</html>
@@ -3,8 +3,8 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Unit E1: Base-36 AQ Ciphers, Offline CMUdict Phonetics & Zero-d-Filter Isolation — hyperstitionstud.io/engineering (v2.2.0)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.2.0" />
<title>Unit E1: Base-36 AQ Ciphers, Offline CMUdict Phonetics & Bidirectional Lock Evaluation — hyperstitionstud.io/engineering (v2.8.1)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.8.1" />
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DejaVu Sans Mono', ui-monospace, monospace; padding: 1.25rem; line-height: 1.5; }
@@ -21,8 +21,8 @@
<div class="container">
<header>
<div>
<h1>Unit E1: Base-36 AQ Ciphers, Offline CMUdict Phonetics & Zero-d-Filter Isolation</h1>
<p class="subtitle">Cartridge E1 &bull; Non-Sequentially Revertible via <code>hs-eng-docs --disable ciphers-and-phonetics</code> &bull; v2.2.0</p>
<h1>Unit E1: Base-36 AQ Ciphers, Offline CMUdict Phonetics & Bidirectional Lock Evaluation</h1>
<p class="subtitle">Cartridge E1 &bull; Non-Sequentially Revertible via <code>hs-eng-docs --disable ciphers-and-phonetics</code> &bull; v2.8.1 <span class="hs-sigil-seal" aria-hidden="true">[ &#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; ]</span></p>
</div>
<nav class="top-nav">
<a class="btn" href="../../index.html">Portal Home (/)</a>
@@ -33,15 +33,15 @@
<a class="btn" href="../mcp-chatbot-rest-and-ipld/index.html" style="">E4: MCP, REST & IPLD CIDv1</a>
<a class="btn" href="../cicd-vps-tmpfs-and-regression/index.html" style="">E5: CI/CD, VPS & Regression</a>
<a class="btn" href="../../math/index.html">Math Hub (/math/)</a>
<button id="guileSchemeModeToggle" class="btn hs-guile-toggle" type="button" aria-pressed="false" title="Toggle additive Guile Scheme &amp; Z-Combinator teaching cartridges and in-browser REPL (Alt+S)"><span class="hs-guile-lambda-badge">&lambda;</span><span>GUILE SCHEME LENS: <strong id="guileSchemeModeState">OFF</strong></span></button>
<div id="hsPolyglotModeSelector" class="hs-polyglot-segmented" role="radiogroup" aria-label="Pedagogical Programming Language Lens"><span class="hs-polyglot-prefix">LENS:</span><button type="button" id="guileSchemeModeToggle" class="hs-polyglot-seg" role="radio" data-lens-mode="off" aria-checked="true" title="Hide programming language cartridges (Alt+0)">OFF</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="guile" aria-checked="false" title="GNU Guile Scheme — Z-Combinator &amp; Exact Rationals (Alt+1)"><span class="hs-guile-lambda-badge">&lambda;</span>GUILE</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="ts" aria-checked="false" title="TypeScript — Static Union Types &amp; Functional Pipelines (Alt+2)"><span class="hs-guile-lambda-badge">TS</span>TYPESCRIPT</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="rust" aria-checked="false" title="Rust — Ownership, Option&lt;T&gt; &amp; Zero-Cost Iterators (Alt+3)"><span class="hs-guile-lambda-badge">Rs</span>RUST</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="all" aria-checked="false" title="Side-by-side comparison of Guile Scheme, TypeScript, and Rust (Alt+4)">&equiv; ALL 3</button><strong id="guileSchemeModeState" style="display:none;">OFF</strong></div>
<span class="nav-donate-sep" aria-hidden="true"></span>
<a class="btn-donate-pill" href="../../donate/index.html"><span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>
<a class="btn-donate-pill" href="../../donate/index.html?from=engineering"><span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>
</nav>
</header>
<section class="panel hs-plate-g3 plate-lock-emerald hs-prereq-ladder" style="margin-bottom:0.9rem;padding:1rem 1.2rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--emerald);text-transform:uppercase;letter-spacing:0.06em;">Prerequisite Track for Novices &bull; Required Expertise: Level 2: Introductory Python & Text Processing (10-15 hrs study)</div><p style="font-size:0.76rem;color:var(--text-secondary);margin:0.35rem 0;">If any concepts on this page are unfamiliar, occupy your study time with these free foundational resources first:</p><div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:0.8rem;margin-top:0.4rem;"><div><strong style="font-size:0.73rem;color:var(--gold);">Core Concepts Required:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li>Python 3 functions, dictionaries (dict), frozenset, and regular expressions (re.sub)</li><li>ASCII & Unicode character codepoints (ord(), UTF-8)</li><li>Dictionary lookup vs. deterministic grapheme-to-phoneme fallback rules</li></ul></div><div><strong style="font-size:0.73rem;color:var(--cyan);">Curated Free Public Study Resources:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li><a href="../../learn/index.html" style="color:var(--cyan);">Internal: /learn/ Module 1 & 2 (Base-36 & Ingglish) &#x2197;</a></li><li><a href="https://docs.python.org/3/tutorial/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">Official Python 3 Tutorial (Sections 3-5 & 7) &#x2197;</a></li><li><a href="https://cs50.harvard.edu/python/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">Harvard CS50P (Intro to Programming with Python) &#x2197;</a></li><li><a href="http://www.speech.cs.cmu.edu/cgi-bin/cmudict" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">CMU Pronouncing Dictionary (CMUdict) Specification &#x2197;</a></li><li><a href="https://regexone.com/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">RegexOne Interactive Regular Expression Tutorial &#x2197;</a></li></ul></div></div></section>
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">&lambda; Guile Scheme Foil (E1): Pure Z-Combinator Base-36 Alphanumeric Homomorphism</div><button type="button" class="btn hs-load-in-repl-btn" data-scheme-expr="(aq-base36 &quot;LEMUR&quot;)" style="border-color:var(--cyan);color:var(--cyan);">Send to In-Browser Guile REPL &rarr;</button></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Formal Specification:</strong><code>AQ(w) = ∑_{i=1}^k v(c_i), v('0'..'9')=0..9, v('a'..'z')=10..35</code></div><div class="hs-guile-box"><strong style="color:var(--text-secondary);display:block;margin-bottom:0.2rem;">2. Production Python:</strong><pre style="white-space:pre-wrap;">sum(char_value_aq(ch) for ch in text)</pre></div><div class="hs-guile-box"><strong style="color:var(--cyan);display:block;margin-bottom:0.2rem;">3. Guile Scheme (Z-Combinator):</strong><code class="hs-guile-code-expr">(aq-base36 "LEMUR")</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Toggle Guile Lens ON to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge:</strong> Verify AQ("LEMUR") = 114 and test homomorphic concatenation (+ (aq-base36 "LE") (aq-base36 "MUR")).</div></section>
<article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">1. PEP 420 Namespace & Zero-d-Filter Boundary (hyperstitionstud_io.ciphers)</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">The cipher engine maps digits 0-9 to 0..9 (ord(c)-48) and ASCII letters A-Z to 10..35 (ord(c)-87) across three quantization modes: digit (default), off (qualitative lexical only), and spoken (number-word expansion via int_to_spoken_words()). assert_zero_d_filter() enforces a hard boundary preventing legacy 10-letter decagram filters from ever entering Zoology or Knowledge Graph artifacts.</p></article><article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">2. Three-Tier Offline Phonemic Transducer (hyperstitionstud_io.phonetics)</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">translate_batch() resolves English phrases into Gen 1 Ingglish with zero external network calls and zero hardcoded /workspace dependencies: Tier 1 delegates to local Node/CLI translators when present; Tier 2 looks up the 4,943-entry bundled cmudict_fallback.json; Tier 3 applies deterministic English digraph-to-phoneme rules so arbitrary OOV strings always resolve.</p></article>
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">&lambda; Polyglot Foil (E1): Base-36 Alphanumeric Homomorphism in Guile (Z), TypeScript &amp; Rust</div><div style="display:flex;gap:0.25rem;flex-wrap:wrap;align-items:center;"><button type="button" class="hs-polyglot-seg" data-lens-mode="guile">&lambda; Guile</button><button type="button" class="hs-polyglot-seg" data-lens-mode="ts">TS TypeScript</button><button type="button" class="hs-polyglot-seg" data-lens-mode="rust">Rs Rust</button><button type="button" class="hs-polyglot-seg" data-lens-mode="all">&equiv; All 3</button><button type="button" class="hs-polyglot-seg" data-lens-mode="off">Hide</button></div></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Formal Specification &amp; Python:</strong><code>AQ(w) = ∑_{i=1}^k v(c_i), v(&#x27;0&#x27;..&#x27;9&#x27;)=0..9, v(&#x27;a&#x27;..&#x27;z&#x27;)=10..35</code><pre style="white-space:pre-wrap;margin-top:0.25rem;color:var(--text-secondary);">sum(char_value_aq(ch) for ch in text)</pre></div><div class="hs-guile-box hs-lang-box-guile"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--cyan);">&lambda; Guile Scheme (Z-Combinator):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="guile" data-scheme-expr="(aq-base36 &quot;LEMUR&quot;)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-guile-code-expr">(aq-base36 &quot;LEMUR&quot;)</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-ts"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--gold);">TS TypeScript (Strict AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="ts" data-scheme-expr="aqBase36(&quot;LEMUR&quot;)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-ts-code-expr">aqBase36(&quot;LEMUR&quot;)</code><div class="hs-ts-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-rust"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--emerald);">Rs Rust (Option/Iterator AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="rust" data-scheme-expr="aq_base36(&quot;LEMUR&quot;)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-rust-code-expr">aq_base36(&quot;LEMUR&quot;)</code><div class="hs-rust-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge (4-Ring Zero-Escape Sandbox):</strong> Verify AQ(&quot;LEMUR&quot;) = 114 across all 3 languages in the hardened AST sandbox.</div></section>
<article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">1. PEP 420 Namespace & Quantization Modes (hyperstitionstud_io.ciphers)</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">The cipher engine maps digits 0-9 to 0..9 (ord(c)-48) and ASCII letters A-Z to 10..35 (ord(c)-87) across three quantization modes: digit (default), off (qualitative lexical only), and spoken (number-word expansion via int_to_spoken_words()), evaluating prime index ranks, 37×3k repdigit attractors, and 12-field bidirectional locks.</p></article><article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">2. Three-Tier Offline Phonemic Transducer (hyperstitionstud_io.phonetics)</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">translate_batch() resolves English phrases into Gen 1 Ingglish with zero external network calls and zero hardcoded /workspace dependencies: Tier 1 delegates to local Node/CLI translators when present; Tier 2 looks up the 4,943-entry bundled cmudict_fallback.json; Tier 3 applies deterministic English digraph-to-phoneme rules so arbitrary OOV strings always resolve.</p></article>
<div style="display:flex;justify-content:space-between;align-items:center;margin-top:0.8rem;">
<a class="btn" href="../index.html">&larr; Back to Engineering Hub (E0)</a>
@@ -49,15 +49,21 @@
</div>
<footer>
hyperstitionstud.io/engineering/ciphers-and-phonetics v2.2.0 &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
hyperstitionstud.io/engineering/ciphers-and-phonetics v2.8.1 &bull; <span class="hs-sigil-colophon" aria-hidden="true">&#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; &middot; &#x2644;</span> &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
</footer>
</div>
<script src="../engineering-manifest-data.js?v=2.2.0"></script>
<script src="../engineering-app.js?v=2.2.0"></script>
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Guile Scheme and Z-Combinator REPL">
<script src="../../assets/hs-matrix-coderain.js?v=2.8.1" defer></script>
<script src="../engineering-manifest-data.js?v=2.8.1"></script>
<script src="../engineering-app.js?v=2.8.1"></script>
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Polyglot Guile Scheme, TypeScript, and Rust Hardened REPL">
<div style="display:flex;justify-content:space-between;align-items:center;gap:0.5rem;margin-bottom:0.45rem;">
<div style="font-size:0.74rem;font-weight:700;color:var(--cyan);">&lambda; IN-BROWSER GUILE SCHEME &amp; Z-COMBINATOR REPL (OFFLINE • ZERO CDN)</div>
<div style="font-size:0.73rem;font-weight:700;color:var(--cyan);">&lambda; 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
<div style="display:flex;gap:0.4rem;align-items:center;">
<select id="hsPolyglotReplLang" style="background:var(--bg-void);color:var(--cyan);border:1px solid var(--cyan);padding:0.15rem 0.35rem;font-family:inherit;font-size:0.68rem;font-weight:700;">
<option value="guile">λ Guile Scheme</option>
<option value="ts">TS TypeScript</option>
<option value="rust">Rs Rust</option>
</select>
<label style="font-size:0.68rem;color:var(--text-secondary);cursor:pointer;"><input type="checkbox" id="hsGuilePreferFloat" /> Float view</label>
<button type="button" id="hsGuileReplCloseBtn" class="btn" style="padding:0.15rem 0.45rem;font-size:0.68rem;">Minimize / Expand</button>
</div>
@@ -65,22 +71,27 @@
<div class="hs-repl-body">
<div style="display:flex;gap:0.4rem;margin-bottom:0.4rem;flex-wrap:wrap;">
<select id="hsGuileReplPreset" style="flex:1;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.28rem;font-family:inherit;font-size:0.7rem;">
<option value="">-- Load Preset Z-Combinator / Domain Expression --</option>
<option value='(aq-base36 "LEMUR")'>Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
<option value="(prime-factors 666)">Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
<option value="(variance-pop *cluster-292-gen0*)">Exact Rational Variance (Cluster 292 Gen 0): (variance-pop *cluster-292-gen0*)</option>
<option value="(eti-score 95 92 94 90 91 96)">Exact Rational Convex ETI Score: (eti-score 95 92 94 90 91 96)</option>
<option value="((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">Thomas' Calculus Derivative d/dx(x^3) at x=2 via Z</option>
<option value="(adaptive-simpson (lambda (x) (* x x)) 0.0 3.0 1e-6)">Adaptive Simpson Integral int_0^3 x^2 dx = 9.0 via Z</option>
<option value="(bayes-update '(1/3 1/3 1/3) '(1/10 3/10 6/10))">Exact Rational 3-State Bayes Update via Z</option>
<option value="">-- Load Preset Polyglot Expression (Guile / TS / Rust) --</option>
<option value='guile::(aq-base36 "LEMUR")'>[λ Guile] Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
<option value='ts::aqBase36("LEMUR")'>[TS] Base-36 AQ: aqBase36("LEMUR") => 114</option>
<option value='rust::aq_base36("LEMUR")'>[Rs Rust] Base-36 AQ: aq_base36("LEMUR") => 114</option>
<option value="guile::(prime-factors 666)">[λ Guile] Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
<option value="ts::primeFactors(666)">[TS] Prime Factors: primeFactors(666) => [2,3,3,37]</option>
<option value="rust::prime_factors(666_u64)">[Rs Rust] Prime Factors: prime_factors(666_u64) => vec![2, 3, 3, 37]</option>
<option value="guile::(variance-pop *cluster-292-gen0*)">[λ Guile] Exact Rational Variance (Cluster 292): 4634/9</option>
<option value="ts::variancePop([264, 317, 276] as const)">[TS] Cluster 292 Variance: 514.8889</option>
<option value="rust::variance_pop(&[264.0, 317.0, 276.0])">[Rs Rust] Cluster 292 Variance: 514.8889</option>
<option value="guile::((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">[λ Guile] Thomas' Calculus d/dx(x^3) at x=2 => 12.0</option>
<option value="ts::derivative((x: number): number => x ** 3, 1e-5)(2.0)">[TS] Derivative d/dx(x^3) at x=2 => 12</option>
<option value="rust::derivative(|x: f64| x * x * x, 1e-5, 2.0)">[Rs Rust] Derivative d/dx(x^3) at x=2 => 12</option>
</select>
<button type="button" id="hsGuileReplEvalBtn" class="btn" style="border-color:var(--emerald);color:var(--emerald);">Evaluate (&lambda;)</button>
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step &beta;-Reduction</button>
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step AST Trace</button>
</div>
<textarea id="hsGuileReplInput" rows="2" style="width:100%;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.45rem;font-family:inherit;font-size:0.73rem;">(aq-base36 "LEMUR")</textarea>
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">guile&gt; Ready. Toggle [λ GUILE SCHEME LENS: ON] or click Evaluate (λ).</pre>
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">polyglot&gt; Ready (4-Ring Zero-Eval AST Sandbox). Select [λ GUILE | TS | RS | ≡ ALL 3] or click Evaluate (λ).</pre>
</div>
</aside>
<script src="../../assets/hs-guile-scheme-repl.js?v=2.2.0"></script>
<script src="../../assets/hs-guile-scheme-repl.js?v=2.8.1"></script>
</body>
</html>
@@ -1 +1 @@
window.HYPERSTITION_ENGINEERING_MANIFEST = {"$id": "urn:io:hyperstitionstud:engineering-manifest", "version": "2.2.0", "enabled_subpages": ["ciphers-and-phonetics", "knowledge-graph-and-sqlite", "quant-macro-and-bayesian-brief", "mcp-chatbot-rest-and-ipld", "cicd-vps-tmpfs-and-regression"], "disabled_subpages": [], "enabled_routes": ["/engineering/index.html", "/engineering/ciphers-and-phonetics/index.html", "/engineering/knowledge-graph-and-sqlite/index.html", "/engineering/quant-macro-and-bayesian-brief/index.html", "/engineering/mcp-chatbot-rest-and-ipld/index.html", "/engineering/cicd-vps-tmpfs-and-regression/index.html"], "introspected_counts": {"repositories": 6, "cli_entrypoints": 15, "mcp_tools": 15, "rest_domain_aliases": 12, "enabled_lenses": 6, "watchlist_instruments": 24, "fred_macro_series": 14, "json_schemas_v1": 12}, "cli_scripts": {"hs-doctor": "hyperstitionstud_io.ci.doctor:main", "hs-citations": "hyperstitionstud_io.ci.citation_sources:main", "hs-pdf-build": "hyperstitionstud_io.publishing.pdf_compiler:main", "hs-kg-build": "hyperstitionstud_io.graph.cli:main", "hs-quant-harvest": "hyperstitionstud_io.quant.collector:main", "hs-mcp": "hyperstitionstud_io.mcp.server:main", "hs-sync-version": "hyperstitionstud_io.version_sync:main", "hs-db-build": "hyperstitionstud_io.db.sqlite_meta:main", "hs-macro-harvest": "hyperstitionstud_io.quant.macro:main", "hs-daily-brief": "hyperstitionstud_io.quant.daily_brief:main", "hs-ticker-card": "hyperstitionstud_io.quant.cards:main", "hs-archive-rotate": "hyperstitionstud_io.publishing.archive_rotator:main", "hs-public-smoke": "hyperstitionstud_io.ci.public_regression:main", "hs-eng-docs": "hyperstitionstud_io.publishing.engineering_docs:main", "hs-math-docs": "hyperstitionstud_io.publishing.math_docs:main"}, "mcp_tool_names": ["hs_evaluate_aq_and_ingglish", "hs_classify_singularity", "hs_query_knowledge_graph", "hs_search_glossary_encyclopedia", "hs_inspect_eti_tier_list", "hs_simulate_anchor_revision", "hs_search_archive_equations", "hs_verify_grounded_citations", "hs_compute_ipld_dag_json_cid", "hs_run_doctor_and_audit", "hs_scan_financial_quant_harvest", "hs_inspect_quant_timeseries", "hs_generate_ticker_stats_card", "hs_inspect_macro_indicators", "hs_generate_daily_portfolio_brief"], "rest_domain_aliases": {"/api/v1/doctor": "hs_run_doctor_and_audit", "/api/v1/ciphers/evaluate": "hs_evaluate_aq_and_ingglish", "/api/v1/zoology/classify": "hs_classify_singularity", "/api/v1/zoology/tier-list": "hs_inspect_eti_tier_list", "/api/v1/zoology/anchor-revision": "hs_simulate_anchor_revision", "/api/v1/graph/query": "hs_query_knowledge_graph", "/api/v1/glossary/search": "hs_search_glossary_encyclopedia", "/api/v1/archive/equations": "hs_search_archive_equations", "/api/v1/quant/harvest": "hs_scan_financial_quant_harvest", "/api/v1/quant/timeseries": "hs_inspect_quant_timeseries", "/api/v1/ipld/cid": "hs_compute_ipld_dag_json_cid", "/api/v1/citations/verify": "hs_verify_grounded_citations"}, "schemas_v1": ["assemblage-builds-tier-list.schema.json", "citations-ledger.schema.json", "encyclopedia-graph.schema.json", "encyclopedia-manifest.schema.json", "financial-aq-harvest.schema.json", "glossary-registry.schema.json", "learn-progress-state.schema.json", "memetic-superclass-registry.schema.json", "quant-timeseries.schema.json", "quantitative-economic-anchors.schema.json", "singularity-zoology-matrix.schema.json", "ticker-stats-card.schema.json"], "flow_diagrams": {"cross_repo_dependency_png": "/graph/docs/cross-repo-dependency-and-audit-flow-diagram.png", "periodic_harvest_cicd_vps_png": "/graph/docs/periodic-harvest-cicd-to-vps-flow-diagram.png"}, "hub_prereq_ladder": {"unit_id": "E0", "expertise_level": "Level 1-2 (Novice to Advanced Beginner • 4-8 hrs study)", "summary": "New to command-line shells, Git repositories, or client-server web architecture? Start with these free foundational resources before diving into the engineering subpages:", "links": [{"label": "Internal: Self-Paced Learning Track (/learn/ Modules 1-6)", "url": "/learn/index.html", "external": false}, {"label": "MIT Missing Semester of Your CS Education (Shell, Git, CLI)", "url": "https://missing.csail.mit.edu/", "external": true}, {"label": "MDN Web Docs — How the Web Works (HTTP, HTML, Servers)", "url": "https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/How_the_Web_works", "external": true}]}, "subpages": {"ciphers-and-phonetics": {"unit_id": "E1", "slug": "ciphers-and-phonetics", "title": "Unit E1: Base-36 AQ Ciphers, Offline CMUdict Phonetics & Zero-d-Filter Isolation", "short_title": "E1: Ciphers & Phonetics", "pip_class": "plate-lock-gold", "expertise_level": "Level 2: Introductory Python & Text Processing (10-15 hrs study)", "prerequisites": ["Python 3 functions, dictionaries (dict), frozenset, and regular expressions (re.sub)", "ASCII & Unicode character codepoints (ord(), UTF-8)", "Dictionary lookup vs. deterministic grapheme-to-phoneme fallback rules"], "Line truncated
window.HYPERSTITION_ENGINEERING_MANIFEST = {"$id": "urn:io:hyperstitionstud:engineering-manifest", "version": "2.8.1", "enabled_subpages": ["ciphers-and-phonetics", "knowledge-graph-and-sqlite", "quant-macro-and-bayesian-brief", "mcp-chatbot-rest-and-ipld", "cicd-vps-tmpfs-and-regression"], "disabled_subpages": [], "enabled_routes": ["/engineering/index.html", "/engineering/ciphers-and-phonetics/index.html", "/engineering/knowledge-graph-and-sqlite/index.html", "/engineering/quant-macro-and-bayesian-brief/index.html", "/engineering/mcp-chatbot-rest-and-ipld/index.html", "/engineering/cicd-vps-tmpfs-and-regression/index.html"], "introspected_counts": {"repositories": 6, "cli_entrypoints": 17, "mcp_tools": 20, "rest_domain_aliases": 12, "enabled_lenses": 6, "watchlist_instruments": 24, "fred_macro_series": 14, "json_schemas_v1": 12}, "cli_scripts": {"hs-doctor": "hyperstitionstud_io.ci.doctor:main", "hs-citations": "hyperstitionstud_io.ci.citation_sources:main", "hs-pdf-build": "hyperstitionstud_io.publishing.pdf_compiler:main", "hs-kg-build": "hyperstitionstud_io.graph.cli:main", "hs-quant-harvest": "hyperstitionstud_io.quant.collector:main", "hs-mcp": "hyperstitionstud_io.mcp.server:main", "hs-sync-version": "hyperstitionstud_io.version_sync:main", "hs-db-build": "hyperstitionstud_io.db.sqlite_meta:main", "hs-macro-harvest": "hyperstitionstud_io.quant.macro:main", "hs-daily-brief": "hyperstitionstud_io.quant.daily_brief:main", "hs-ticker-card": "hyperstitionstud_io.quant.cards:main", "hs-archive-rotate": "hyperstitionstud_io.publishing.archive_rotator:main", "hs-public-smoke": "hyperstitionstud_io.ci.public_regression:main", "hs-eng-docs": "hyperstitionstud_io.publishing.engineering_docs:main", "hs-math-docs": "hyperstitionstud_io.publishing.math_docs:main", "hs-highlights": "hyperstitionstud_io.publishing.highlights:main", "hs-readme-sync": "hyperstitionstud_io.publishing.readme_sync:main"}, "mcp_tool_names": ["hs_evaluate_aq_and_ingglish", "hs_classify_singularity", "hs_query_knowledge_graph", "hs_search_glossary_encyclopedia", "hs_inspect_eti_tier_list", "hs_simulate_anchor_revision", "hs_search_archive_equations", "hs_verify_grounded_citations", "hs_compute_ipld_dag_json_cid", "hs_run_doctor_and_audit", "hs_scan_financial_quant_harvest", "hs_inspect_quant_timeseries", "hs_generate_ticker_stats_card", "hs_inspect_macro_indicators", "hs_generate_daily_portfolio_brief", "hs_inspect_engineering_and_math_docs", "hs_inspect_documentation_and_manuals", "hs_evaluate_guile_scheme_z_calculus", "hs_query_workspace_catalog_and_release_state", "hs_generate_highlights_summary"], "rest_domain_aliases": {"/api/v1/doctor": "hs_run_doctor_and_audit", "/api/v1/ciphers/evaluate": "hs_evaluate_aq_and_ingglish", "/api/v1/zoology/classify": "hs_classify_singularity", "/api/v1/zoology/tier-list": "hs_inspect_eti_tier_list", "/api/v1/zoology/anchor-revision": "hs_simulate_anchor_revision", "/api/v1/graph/query": "hs_query_knowledge_graph", "/api/v1/glossary/search": "hs_search_glossary_encyclopedia", "/api/v1/archive/equations": "hs_search_archive_equations", "/api/v1/quant/harvest": "hs_scan_financial_quant_harvest", "/api/v1/quant/timeseries": "hs_inspect_quant_timeseries", "/api/v1/ipld/cid": "hs_compute_ipld_dag_json_cid", "/api/v1/citations/verify": "hs_verify_grounded_citations"}, "schemas_v1": ["assemblage-builds-tier-list.schema.json", "citations-ledger.schema.json", "encyclopedia-graph.schema.json", "encyclopedia-manifest.schema.json", "financial-aq-harvest.schema.json", "glossary-registry.schema.json", "learn-progress-state.schema.json", "memetic-superclass-registry.schema.json", "quant-timeseries.schema.json", "quantitative-economic-anchors.schema.json", "singularity-zoology-matrix.schema.json", "ticker-stats-card.schema.json"], "flow_diagrams": {"cross_repo_dependency_png": "/graph/docs/cross-repo-dependency-and-audit-flow-diagram.png", "periodic_harvest_cicd_vps_png": "/graph/docs/periodic-harvest-cicd-to-vps-flow-diagram.png"}, "hub_prereq_ladder": {"unit_id": "E0", "expertise_level": "Level 1-2 (Novice to Advanced Beginner • 4-8 hrs study)", "summary": "New to command-line shells, Git repositories, or client-server web architecture? Start with these free foundational resources before diving into the engineering subpages:", "links": [{"label": "Internal: Self-Paced Learning Track (/learn/ Modules 1-6)", "url": "/learn/index.html", "external": false}, {"label": "MIT Missing Semester of Your CS Education (Shell, Git, CLI)", "url": "https://missing.csail.mit.edu/", "external": true}, {"label": "MDN Web Docs — How the Web Works (HTTP, HTML, Servers)", "url": "https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/How_the_Web_works", "external": true}]}, "subpages": {"ciphers-and-phonetics": {"unit_id": "E1", "slug": "ciphers-and-phonetics", "title": "Unit E1: Base-36 AQ Ciphers, Offline CMUdict Phonetics & Bidirectional Lock Evaluation", "short_title": "E1: Ciphers & Phonetics", "pip_class": Line truncated
+16 -9
View File
@@ -1,6 +1,6 @@
{
"$id": "urn:io:hyperstitionstud:engineering-manifest",
"version": "2.2.0",
"version": "2.8.1",
"enabled_subpages": [
"ciphers-and-phonetics",
"knowledge-graph-and-sqlite",
@@ -19,8 +19,8 @@
],
"introspected_counts": {
"repositories": 6,
"cli_entrypoints": 15,
"mcp_tools": 15,
"cli_entrypoints": 17,
"mcp_tools": 20,
"rest_domain_aliases": 12,
"enabled_lenses": 6,
"watchlist_instruments": 24,
@@ -42,7 +42,9 @@
"hs-archive-rotate": "hyperstitionstud_io.publishing.archive_rotator:main",
"hs-public-smoke": "hyperstitionstud_io.ci.public_regression:main",
"hs-eng-docs": "hyperstitionstud_io.publishing.engineering_docs:main",
"hs-math-docs": "hyperstitionstud_io.publishing.math_docs:main"
"hs-math-docs": "hyperstitionstud_io.publishing.math_docs:main",
"hs-highlights": "hyperstitionstud_io.publishing.highlights:main",
"hs-readme-sync": "hyperstitionstud_io.publishing.readme_sync:main"
},
"mcp_tool_names": [
"hs_evaluate_aq_and_ingglish",
@@ -59,7 +61,12 @@
"hs_inspect_quant_timeseries",
"hs_generate_ticker_stats_card",
"hs_inspect_macro_indicators",
"hs_generate_daily_portfolio_brief"
"hs_generate_daily_portfolio_brief",
"hs_inspect_engineering_and_math_docs",
"hs_inspect_documentation_and_manuals",
"hs_evaluate_guile_scheme_z_calculus",
"hs_query_workspace_catalog_and_release_state",
"hs_generate_highlights_summary"
],
"rest_domain_aliases": {
"/api/v1/doctor": "hs_run_doctor_and_audit",
@@ -119,7 +126,7 @@
"ciphers-and-phonetics": {
"unit_id": "E1",
"slug": "ciphers-and-phonetics",
"title": "Unit E1: Base-36 AQ Ciphers, Offline CMUdict Phonetics & Zero-d-Filter Isolation",
"title": "Unit E1: Base-36 AQ Ciphers, Offline CMUdict Phonetics & Bidirectional Lock Evaluation",
"short_title": "E1: Ciphers & Phonetics",
"pip_class": "plate-lock-gold",
"expertise_level": "Level 2: Introductory Python & Text Processing (10-15 hrs study)",
@@ -157,8 +164,8 @@
],
"sections": [
{
"heading": "1. PEP 420 Namespace & Zero-d-Filter Boundary (hyperstitionstud_io.ciphers)",
"body": "The cipher engine maps digits 0-9 to 0..9 (ord(c)-48) and ASCII letters A-Z to 10..35 (ord(c)-87) across three quantization modes: digit (default), off (qualitative lexical only), and spoken (number-word expansion via int_to_spoken_words()). assert_zero_d_filter() enforces a hard boundary preventing legacy 10-letter decagram filters from ever entering Zoology or Knowledge Graph artifacts."
"heading": "1. PEP 420 Namespace & Quantization Modes (hyperstitionstud_io.ciphers)",
"body": "The cipher engine maps digits 0-9 to 0..9 (ord(c)-48) and ASCII letters A-Z to 10..35 (ord(c)-87) across three quantization modes: digit (default), off (qualitative lexical only), and spoken (number-word expansion via int_to_spoken_words()), evaluating prime index ranks, 37×3k repdigit attractors, and 12-field bidirectional locks."
},
{
"heading": "2. Three-Tier Offline Phonemic Transducer (hyperstitionstud_io.phonetics)",
@@ -348,6 +355,6 @@
}
},
"ipld_dag_json_cidv1": {
"/": "baguqeerarzhuigaqa4ktjf2vh6mrhgzm7xbbopyccnfncsb5u6asi6azh2wa"
"/": "baguqeerakaqxxzoaem32ycige5dsy4y52qrd4ltlbkrdtfmt7vuc6gvxn3ca"
}
}
+38 -27
View File
@@ -3,8 +3,8 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Software Engineering Explication Hub — hyperstitionstud.io/engineering (v2.2.0)</title>
<link rel="stylesheet" href="../assets/hs-group3-basalt-chamfer.css?v=2.2.0" />
<title>Software Engineering Explication Hub — hyperstitionstud.io/engineering (v2.8.1)</title>
<link rel="stylesheet" href="../assets/hs-group3-basalt-chamfer.css?v=2.8.1" />
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DejaVu Sans Mono', ui-monospace, monospace; padding: 1.25rem; line-height: 1.5; }
@@ -27,7 +27,7 @@
<header>
<div>
<h1>HYPERSTITION STUDIO // SOFTWARE ENGINEERING EXPLICATION HUB (UNIT E0)</h1>
<p class="subtitle">Commutative Live-Introspected Architecture &bull; Piecewise &amp; Non-Sequentially Revertible Cartridges &bull; urn:io:hyperstitionstud:engineering:v2.2.0</p>
<p class="subtitle">Commutative Live-Introspected Architecture &bull; Piecewise &amp; Non-Sequentially Revertible Cartridges &bull; urn:io:hyperstitionstud:engineering:v2.8.1 <span class="hs-sigil-seal" aria-hidden="true">[ &#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; ]</span></p>
</div>
<nav class="top-nav">
<a class="btn" href="../index.html">Portal Home (/)</a>
@@ -38,27 +38,27 @@
<a class="btn" href="mcp-chatbot-rest-and-ipld/index.html" style="">E4: MCP, REST & IPLD CIDv1</a>
<a class="btn" href="cicd-vps-tmpfs-and-regression/index.html" style="">E5: CI/CD, VPS & Regression</a>
<a class="btn" href="../math/index.html">Math Hub (/math/)</a>
<button id="guileSchemeModeToggle" class="btn hs-guile-toggle" type="button" aria-pressed="false" title="Toggle additive Guile Scheme &amp; Z-Combinator teaching cartridges and in-browser REPL (Alt+S)"><span class="hs-guile-lambda-badge">&lambda;</span><span>GUILE SCHEME LENS: <strong id="guileSchemeModeState">OFF</strong></span></button>
<div id="hsPolyglotModeSelector" class="hs-polyglot-segmented" role="radiogroup" aria-label="Pedagogical Programming Language Lens"><span class="hs-polyglot-prefix">LENS:</span><button type="button" id="guileSchemeModeToggle" class="hs-polyglot-seg" role="radio" data-lens-mode="off" aria-checked="true" title="Hide programming language cartridges (Alt+0)">OFF</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="guile" aria-checked="false" title="GNU Guile Scheme — Z-Combinator &amp; Exact Rationals (Alt+1)"><span class="hs-guile-lambda-badge">&lambda;</span>GUILE</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="ts" aria-checked="false" title="TypeScript — Static Union Types &amp; Functional Pipelines (Alt+2)"><span class="hs-guile-lambda-badge">TS</span>TYPESCRIPT</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="rust" aria-checked="false" title="Rust — Ownership, Option&lt;T&gt; &amp; Zero-Cost Iterators (Alt+3)"><span class="hs-guile-lambda-badge">Rs</span>RUST</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="all" aria-checked="false" title="Side-by-side comparison of Guile Scheme, TypeScript, and Rust (Alt+4)">&equiv; ALL 3</button><strong id="guileSchemeModeState" style="display:none;">OFF</strong></div>
<span class="nav-donate-sep" aria-hidden="true"></span>
<a class="btn-donate-pill" href="../donate/index.html"><span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>
<a class="btn-donate-pill" href="../donate/index.html?from=engineering"><span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>
</nav>
</header>
<section class="panel hs-plate-g3 plate-lock-emerald hs-prereq-ladder" style="margin-bottom:0.9rem;padding:1rem 1.2rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--emerald);text-transform:uppercase;letter-spacing:0.06em;">Prerequisite Track for Novices &bull; Required Expertise: Level 1-2 (Novice to Advanced Beginner • 4-8 hrs study)</div><p style="font-size:0.76rem;color:var(--text-secondary);margin:0.35rem 0;">If any concepts on this page are unfamiliar, occupy your study time with these free foundational resources first:</p><div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:0.8rem;margin-top:0.4rem;"><div><strong style="font-size:0.73rem;color:var(--gold);">Core Concepts Required:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li>Command-line navigation, files, and Git version control</li><li>How HTTP servers, JSON APIs, and static webroots operate</li><li>Self-Paced Learning Track (/learn/ Modules 1-6)</li></ul></div><div><strong style="font-size:0.73rem;color:var(--cyan);">Curated Free Public Study Resources:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li><a href="../learn/index.html" style="color:var(--cyan);">Internal: Self-Paced Learning Track (/learn/ Modules 1-6) &#x2197;</a></li><li><a href="https://missing.csail.mit.edu/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">MIT Missing Semester of Your CS Education (Shell, Git, CLI) &#x2197;</a></li><li><a href="https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/How_the_Web_works" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">MDN Web Docs — How the Web Works (HTTP, HTML, Servers) &#x2197;</a></li></ul></div></div></section>
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">&lambda; Guile Scheme Foil (E0): Homoiconic S-Expression Manifest & Z-Combinator Fixed-Point Closure</div><button type="button" class="btn hs-load-in-repl-btn" data-scheme-expr="(assoc-ref '((repositories 6) (mcp-tools 15) (lenses 4)) 'mcp-tools)" style="border-color:var(--cyan);color:var(--cyan);">Send to In-Browser Guile REPL &rarr;</button></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Formal Specification:</strong><code>Manifest M = (version, repos=6, tools=15, cidv1=H(M))</code></div><div class="hs-guile-box"><strong style="color:var(--text-secondary);display:block;margin-bottom:0.2rem;">2. Production Python:</strong><pre style="white-space:pre-wrap;">manifest = introspect_engineering_manifest()
cid = compute_dag_json_cidv1(manifest)</pre></div><div class="hs-guile-box"><strong style="color:var(--cyan);display:block;margin-bottom:0.2rem;">3. Guile Scheme (Z-Combinator):</strong><code class="hs-guile-code-expr">(assoc-ref '((repositories 6) (mcp-tools 15) (lenses 4)) 'mcp-tools)</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Toggle Guile Lens ON to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge:</strong> Click 'Send to REPL' and change 'mcp-tools to 'repositories or evaluate (aq-base36 "HYPERSTITION").</div></section>
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">&lambda; Polyglot Foil (E0): Homoiconic S-Expressions, Static Readonly&lt;T&gt; Types &amp; Rust Option&lt;T&gt; Manifest Closure</div><div style="display:flex;gap:0.25rem;flex-wrap:wrap;align-items:center;"><button type="button" class="hs-polyglot-seg" data-lens-mode="guile">&lambda; Guile</button><button type="button" class="hs-polyglot-seg" data-lens-mode="ts">TS TypeScript</button><button type="button" class="hs-polyglot-seg" data-lens-mode="rust">Rs Rust</button><button type="button" class="hs-polyglot-seg" data-lens-mode="all">&equiv; All 3</button><button type="button" class="hs-polyglot-seg" data-lens-mode="off">Hide</button></div></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Formal Specification &amp; Python:</strong><code>Manifest M = (version, repos=6, tools=15, cidv1=H(M))</code><pre style="white-space:pre-wrap;margin-top:0.25rem;color:var(--text-secondary);">manifest = introspect_engineering_manifest()
cid = compute_dag_json_cidv1(manifest)</pre></div><div class="hs-guile-box hs-lang-box-guile"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--cyan);">&lambda; Guile Scheme (Z-Combinator):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="guile" data-scheme-expr="(assoc-ref &#x27;((repositories 6) (mcp-tools 15) (lenses 4)) &#x27;mcp-tools)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-guile-code-expr">(assoc-ref &#x27;((repositories 6) (mcp-tools 15) (lenses 4)) &#x27;mcp-tools)</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-ts"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--gold);">TS TypeScript (Strict AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="ts" data-scheme-expr="({repositories: 6, mcpTools: 15} satisfies Readonly&lt;Record&lt;string, number&gt;&gt;).mcpTools" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-ts-code-expr">({repositories: 6, mcpTools: 15} satisfies Readonly&lt;Record&lt;string, number&gt;&gt;).mcpTools</code><div class="hs-ts-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-rust"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--emerald);">Rs Rust (Option/Iterator AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="rust" data-scheme-expr="manifest_lookup(&quot;mcp_tools&quot;)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-rust-code-expr">manifest_lookup(&quot;mcp_tools&quot;)</code><div class="hs-rust-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge (4-Ring Zero-Escape Sandbox):</strong> Switch between [λ Guile], [TS TypeScript], [Rs Rust], and [≡ ALL 3] or send any expression to the 4-Ring Hardened REPL.</div></section>
<section class="stats-row">
<div class="panel hs-plate-g3 stat-tile"><div style="font-size:0.68rem;color:var(--text-secondary);">Repositories</div><div style="font-size:1.35rem;font-weight:700;color:var(--gold);">6</div></div>
<div class="panel hs-plate-g3 stat-tile"><div style="font-size:0.68rem;color:var(--text-secondary);">CLI Entrypoints</div><div style="font-size:1.35rem;font-weight:700;color:var(--cyan);">15</div></div>
<div class="panel hs-plate-g3 stat-tile"><div style="font-size:0.68rem;color:var(--text-secondary);">MCP &amp; REST Tools</div><div style="font-size:1.35rem;font-weight:700;color:var(--emerald);">15</div></div>
<div class="panel hs-plate-g3 stat-tile"><div style="font-size:0.68rem;color:var(--text-secondary);">CLI Entrypoints</div><div style="font-size:1.35rem;font-weight:700;color:var(--cyan);">17</div></div>
<div class="panel hs-plate-g3 stat-tile"><div style="font-size:0.68rem;color:var(--text-secondary);">MCP &amp; REST Tools</div><div style="font-size:1.35rem;font-weight:700;color:var(--emerald);">20</div></div>
<div class="panel hs-plate-g3 stat-tile"><div style="font-size:0.68rem;color:var(--text-secondary);">Pluggable Lenses</div><div style="font-size:1.35rem;font-weight:700;color:var(--gold);">6</div></div>
<div class="panel hs-plate-g3 stat-tile"><div style="font-size:0.68rem;color:var(--text-secondary);">Watchlist / FRED</div><div style="font-size:1.35rem;font-weight:700;color:var(--cyan);">24 / 14</div></div>
<div class="panel hs-plate-g3 stat-tile"><div style="font-size:0.68rem;color:var(--text-secondary);">Enabled Subpages</div><div style="font-size:1.35rem;font-weight:700;color:var(--emerald);">5 / 5</div></div>
</section>
<section class="grid-cards">
<article class="panel hs-plate-g3 plate-lock-gold" style="padding:1rem 1.15rem;display:flex;flex-direction:column;justify-content:space-between;gap:0.6rem;"><div><div style="font-size:0.7rem;color:var(--gold);font-weight:700;">E1 // Level 2: Introductory Python & Text Processing (10-15 hrs study)</div><h2 style="font-size:0.95rem;margin:0.25rem 0;color:var(--text-main);">Unit E1: Base-36 AQ Ciphers, Offline CMUdict Phonetics & Zero-d-Filter Isolation</h2><p style="font-size:0.74rem;color:var(--text-secondary);line-height:1.5;">The cipher engine maps digits 0-9 to 0..9 (ord(c)-48) and ASCII letters A-Z to 10..35 (ord(c)-87) across three quantization modes: digit (default), off (qualitative lexical only), and spoken (number-word expansion via int_to_spoken_words()). assert_zero_d_filter() enforces a hard boundary preventing legacy 10-letter decagram filters from ever entering Zoology or Knowledge Graph artifacts.</p></div><div><a class="btn" href="ciphers-and-phonetics/index.html">Open E1: Ciphers & Phonetics Subpage &#x2192;</a></div></article><article class="panel hs-plate-g3 plate-lock-emerald" style="padding:1rem 1.15rem;display:flex;flex-direction:column;justify-content:space-between;gap:0.6rem;"><div><div style="font-size:0.7rem;color:var(--gold);font-weight:700;">E2 // Level 3-4: Databases, Cryptographic Hashing & OS Concurrency (15-25 hrs study)</div><h2 style="font-size:0.95rem;margin:0.25rem 0;color:var(--text-main);">Unit E2: 6-Gate 388-Node Knowledge Graph Compiler, ReadOnlyIsolationGuard & Quiescent SQLite + FTS5 Engine</h2><p style="font-size:0.74rem;color:var(--text-secondary);line-height:1.5;">Every compiler, MCP tool, and REST v1 handler executes inside with ReadOnlyIsolationGuard(cfg.read_only_files) as guard:. Before and after the block runs, SHA-256 digests of taxonomy/glossary-registry.json and encyclopedia/encyclopedia-manifest.json are verified against baseline constants, raising RuntimeError immediately on any byte mutation.</p></div><div><a class="btn" href="knowledge-graph-and-sqlite/index.html">Open E2: Knowledge Graph & SQLite Subpage &#x2192;</a></div></article><article class="panel hs-plate-g3 plate-lock-gold" style="padding:1rem 1.15rem;display:flex;flex-direction:column;justify-content:space-between;gap:0.6rem;"><div><div style="font-size:0.7rem;color:var(--gold);font-weight:700;">E3 // Level 3: Data Engineering, Time-Series Ingestion & Strategy Registries (10-15 hrs study)</div><h2 style="font-size:0.95rem;margin:0.25rem 0;color:var(--text-main);">Unit E3: Zero-Synthetic-Data Quant Engine, 14-Point Bidirectional Census, Dose 0..3+, FRED Macro & Bayesian Brief</h2><p style="font-size:0.74rem;color:var(--text-secondary);line-height:1.5;">collector.py and timeseries.py eliminate all synthetic bar interpolation: 23 public tickers load 440 verified daily exchange bars (site/quant/real-market-history.json), while private entity ANTHR-PVT and closed weekend/holiday sessions serialize strictly as null ('No data available'). macro.py ingests 14 keyless St. Louis Fed (FRED) CSV series at native 1d, 1mo, and 1q cadences without forward-fill.</p></div><div><a class="btn" href="quant-macro-and-bayesian-brief/index.html">Open E3: Quant, Macro & Bayesian Subpage &#x2192;</a></div></article><article class="panel hs-plate-g3 plate-lock-emerald" style="padding:1rem 1.15rem;display:flex;flex-direction:column;justify-content:space-between;gap:0.6rem;"><div><div style="font-size:0.7rem;color:var(--gold);font-weight:700;">E4 // Level 4: Network Protocols, OpenAPI 3.1 & Content-Addressed Storage (15-20 hrs study)</div><h2 style="font-size:0.95rem;margin:0.25rem 0;color:var(--text-main);">Unit E4: Stateless MCP Server (:8095), Chatbot OpenAPI 3.1.0 REST Adapter, .png+.json Cards & IPLD CIDv1</h2><p style="font-size:0.74rem;color:var(--text-secondary);line-height:1.5;">mcp/server.py and mcp/rest.py expose all 15 tools in MCP_TOOLS_SCHEMA over stdio, Streamable HTTP POST/GET /mcp, and /api/v1/tools/{tool_name} on 127.0.0.1:8095. Top-level exception guards in _MCPHTTPHandler and record_api_telemetry() ensure sqlite3.OperationalError or read-only filesystem states never drop connections or trigger 502 Bad Gateway.</p></div><div><a class="btn" href="mcp-chatbot-rest-and-ipld/index.html">Open E4: MCP, REST & IPLD CIDv1 Subpage &#x2192;</a></div></article><article class="panel hs-plate-g3 plate-lock-rose" style="padding:1rem 1.15rem;display:flex;flex-direction:column;justify-content:space-between;gap:0.6rem;"><div><div style="font-size:0.7rem;color:var(--gold);font-weight:700;">E5 // Level 4: Linux Systems Administration, Bash Traps, systemd & DevOps (20-30 hrs study)</div><h2 style="font-size:0.95rem;margin:0.25rem 0;color:var(--text-main);">Unit E5: Topological Git Push, Self-Re-Executing tmpfs VPS Hydration, Dark-Mode hs-pdf-build & hs-public-smoke</h2><p style="font-size:0.74rem;color:var(--text-secondary);line-height:1.5;">push-all-to-git-libre-audio.sh, deploy/sync-vps-repos.sh, and deploy/run-Line truncated
<article class="panel hs-plate-g3 plate-lock-gold" style="padding:1rem 1.15rem;display:flex;flex-direction:column;justify-content:space-between;gap:0.6rem;"><div><div style="font-size:0.7rem;color:var(--gold);font-weight:700;"><span class="hs-sigil" aria-hidden="true">&#x263F;</span>E1 // Level 2: Introductory Python & Text Processing (10-15 hrs study)</div><h2 style="font-size:0.95rem;margin:0.25rem 0;color:var(--text-main);">Unit E1: Base-36 AQ Ciphers, Offline CMUdict Phonetics & Bidirectional Lock Evaluation</h2><p style="font-size:0.74rem;color:var(--text-secondary);line-height:1.5;">The cipher engine maps digits 0-9 to 0..9 (ord(c)-48) and ASCII letters A-Z to 10..35 (ord(c)-87) across three quantization modes: digit (default), off (qualitative lexical only), and spoken (number-word expansion via int_to_spoken_words()), evaluating prime index ranks, 37×3k repdigit attractors, and 12-field bidirectional locks.</p></div><div><a class="btn" href="ciphers-and-phonetics/index.html">Open E1: Ciphers & Phonetics Subpage &#x2192;</a></div></article><article class="panel hs-plate-g3 plate-lock-emerald" style="padding:1rem 1.15rem;display:flex;flex-direction:column;justify-content:space-between;gap:0.6rem;"><div><div style="font-size:0.7rem;color:var(--gold);font-weight:700;"><span class="hs-sigil" aria-hidden="true">&#x2609;</span>E2 // Level 3-4: Databases, Cryptographic Hashing & OS Concurrency (15-25 hrs study)</div><h2 style="font-size:0.95rem;margin:0.25rem 0;color:var(--text-main);">Unit E2: 6-Gate 388-Node Knowledge Graph Compiler, ReadOnlyIsolationGuard & Quiescent SQLite + FTS5 Engine</h2><p style="font-size:0.74rem;color:var(--text-secondary);line-height:1.5;">Every compiler, MCP tool, and REST v1 handler executes inside with ReadOnlyIsolationGuard(cfg.read_only_files) as guard:. Before and after the block runs, SHA-256 digests of taxonomy/glossary-registry.json and encyclopedia/encyclopedia-manifest.json are verified against baseline constants, raising RuntimeError immediately on any byte mutation.</p></div><div><a class="btn" href="knowledge-graph-and-sqlite/index.html">Open E2: Knowledge Graph & SQLite Subpage &#x2192;</a></div></article><article class="panel hs-plate-g3 plate-lock-gold" style="padding:1rem 1.15rem;display:flex;flex-direction:column;justify-content:space-between;gap:0.6rem;"><div><div style="font-size:0.7rem;color:var(--gold);font-weight:700;"><span class="hs-sigil" aria-hidden="true">&#x2644; &#x260D;</span>E3 // Level 3: Data Engineering, Time-Series Ingestion & Strategy Registries (10-15 hrs study)</div><h2 style="font-size:0.95rem;margin:0.25rem 0;color:var(--text-main);">Unit E3: Zero-Synthetic-Data Quant Engine, 14-Point Bidirectional Census, Dose 0..3+, FRED Macro & Bayesian Brief</h2><p style="font-size:0.74rem;color:var(--text-secondary);line-height:1.5;">collector.py and timeseries.py eliminate all synthetic bar interpolation: 23 public tickers load 440 verified daily exchange bars (site/quant/real-market-history.json), while private entity ANTHR-PVT and closed weekend/holiday sessions serialize strictly as null ('No data available'). macro.py ingests 14 keyless St. Louis Fed (FRED) CSV series at native 1d, 1mo, and 1q cadences without forward-fill.</p></div><div><a class="btn" href="quant-macro-and-bayesian-brief/index.html">Open E3: Quant, Macro & Bayesian Subpage &#x2192;</a></div></article><article class="panel hs-plate-g3 plate-lock-emerald" style="padding:1rem 1.15rem;display:flex;flex-direction:column;justify-content:space-between;gap:0.6rem;"><div><div style="font-size:0.7rem;color:var(--gold);font-weight:700;"><span class="hs-sigil" aria-hidden="true">&#x269A;</span>E4 // Level 4: Network Protocols, OpenAPI 3.1 & Content-Addressed Storage (15-20 hrs study)</div><h2 style="font-size:0.95rem;margin:0.25rem 0;color:var(--text-main);">Unit E4: Stateless MCP Server (:8095), Chatbot OpenAPI 3.1.0 REST Adapter, .png+.json Cards & IPLD CIDv1</h2><p style="font-size:0.74rem;color:var(--text-secondary);line-height:1.5;">mcp/server.py and mcp/rest.py expose all 15 tools in MCP_TOOLS_SCHEMA over stdio, Streamable HTTP POST/GET /mcp, and /api/v1/tools/{tool_name} on 127.0.0.1:8095. Top-level exception guards in _MCPHTTPHandler and record_api_telemetry() ensure sqlite3.OperationalError or read-only filesystem states never drop connections or trigger 502 Bad Gateway.</p></div><div><a class="btn" href="mcp-chatbot-rest-and-ipld/index.html">Open E4: MCP, REST & IPLD CIDv1 Subpage &#x2192;</a></div></article><article class="panel hs-plate-g3 plate-lock-rose" style="padding:1rem 1.15rem;display:flex;flex-direction:column;justify-content:space-between;gap:0.6rem;"><div><div style="font-size:0.7rem;color:var(--gold);font-weight:700;"><span class="hs-sigil" aria-hidden="true">&#x269B;</span>E5 // Level 4: Linux Systems Administration, Bash Traps, systemd & DevOps (20-30 hrs study)</div><h2 style="font-size:0.95rem;margin:0.25rem 0;color:var(--text-main);">Unit E5: TopologicalLine truncated
</section>
<section class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.9rem;">
@@ -73,20 +73,26 @@ cid = compute_dag_json_cidv1(manifest)</pre></div><div class="hs-guile-box"><str
<h2 style="font-size:0.92rem;color:var(--cyan);margin-bottom:0.4rem;">Live Introspected CLI Entrypoints (pyproject.toml [project.scripts])</h2>
<table>
<thead><tr><th>CLI Command</th><th>Python Module:Function Target</th></tr></thead>
<tbody><tr><td><code>hs-archive-rotate</code></td><td><code>hyperstitionstud_io.publishing.archive_rotator:main</code></td></tr><tr><td><code>hs-citations</code></td><td><code>hyperstitionstud_io.ci.citation_sources:main</code></td></tr><tr><td><code>hs-daily-brief</code></td><td><code>hyperstitionstud_io.quant.daily_brief:main</code></td></tr><tr><td><code>hs-db-build</code></td><td><code>hyperstitionstud_io.db.sqlite_meta:main</code></td></tr><tr><td><code>hs-doctor</code></td><td><code>hyperstitionstud_io.ci.doctor:main</code></td></tr><tr><td><code>hs-eng-docs</code></td><td><code>hyperstitionstud_io.publishing.engineering_docs:main</code></td></tr><tr><td><code>hs-kg-build</code></td><td><code>hyperstitionstud_io.graph.cli:main</code></td></tr><tr><td><code>hs-macro-harvest</code></td><td><code>hyperstitionstud_io.quant.macro:main</code></td></tr><tr><td><code>hs-math-docs</code></td><td><code>hyperstitionstud_io.publishing.math_docs:main</code></td></tr><tr><td><code>hs-mcp</code></td><td><code>hyperstitionstud_io.mcp.server:main</code></td></tr><tr><td><code>hs-pdf-build</code></td><td><code>hyperstitionstud_io.publishing.pdf_compiler:main</code></td></tr><tr><td><code>hs-public-smoke</code></td><td><code>hyperstitionstud_io.ci.public_regression:main</code></td></tr><tr><td><code>hs-quant-harvest</code></td><td><code>hyperstitionstud_io.quant.collector:main</code></td></tr><tr><td><code>hs-sync-version</code></td><td><code>hyperstitionstud_io.version_sync:main</code></td></tr><tr><td><code>hs-ticker-card</code></td><td><code>hyperstitionstud_io.quant.cards:main</code></td></tr></tbody>
<tbody><tr><td><code>hs-archive-rotate</code></td><td><code>hyperstitionstud_io.publishing.archive_rotator:main</code></td></tr><tr><td><code>hs-citations</code></td><td><code>hyperstitionstud_io.ci.citation_sources:main</code></td></tr><tr><td><code>hs-daily-brief</code></td><td><code>hyperstitionstud_io.quant.daily_brief:main</code></td></tr><tr><td><code>hs-db-build</code></td><td><code>hyperstitionstud_io.db.sqlite_meta:main</code></td></tr><tr><td><code>hs-doctor</code></td><td><code>hyperstitionstud_io.ci.doctor:main</code></td></tr><tr><td><code>hs-eng-docs</code></td><td><code>hyperstitionstud_io.publishing.engineering_docs:main</code></td></tr><tr><td><code>hs-highlights</code></td><td><code>hyperstitionstud_io.publishing.highlights:main</code></td></tr><tr><td><code>hs-kg-build</code></td><td><code>hyperstitionstud_io.graph.cli:main</code></td></tr><tr><td><code>hs-macro-harvest</code></td><td><code>hyperstitionstud_io.quant.macro:main</code></td></tr><tr><td><code>hs-math-docs</code></td><td><code>hyperstitionstud_io.publishing.math_docs:main</code></td></tr><tr><td><code>hs-mcp</code></td><td><code>hyperstitionstud_io.mcp.server:main</code></td></tr><tr><td><code>hs-pdf-build</code></td><td><code>hyperstitionstud_io.publishing.pdf_compiler:main</code></td></tr><tr><td><code>hs-public-smoke</code></td><td><code>hyperstitionstud_io.ci.public_regression:main</code></td></tr><tr><td><code>hs-quant-harvest</code></td><td><code>hyperstitionstud_io.quant.collector:main</code></td></tr><tr><td><code>hs-readme-sync</code></td><td><code>hyperstitionstud_io.publishing.readme_sync:main</code></td></tr><tr><td><code>hs-sync-version</code></td><td><code>hyperstitionstud_io.version_sync:main</code></td></tr><tr><td><code>hs-ticker-card</code></td><td><code>hyperstitionstud_io.quant.cards:main</code></td></tr></tbody>
</table>
</section>
<footer>
hyperstitionstud.io/engineering v2.2.0 &bull; CIDv1: <code>baguqeerarzhuigaqa4ktjf2vh6mrhgzm7xb...</code> &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
hyperstitionstud.io/engineering v2.8.1 &bull; CIDv1: <code>baguqeerakaqxxzoaem32ycige5dsy4y52qr...</code> &bull; <span class="hs-sigil-colophon" aria-hidden="true">&#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; &middot; &#x2644;</span> &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
</footer>
</div>
<script src="engineering-manifest-data.js?v=2.2.0"></script>
<script src="engineering-app.js?v=2.2.0"></script>
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Guile Scheme and Z-Combinator REPL">
<script src="../assets/hs-matrix-coderain.js?v=2.8.1" defer></script>
<script src="engineering-manifest-data.js?v=2.8.1"></script>
<script src="engineering-app.js?v=2.8.1"></script>
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Polyglot Guile Scheme, TypeScript, and Rust Hardened REPL">
<div style="display:flex;justify-content:space-between;align-items:center;gap:0.5rem;margin-bottom:0.45rem;">
<div style="font-size:0.74rem;font-weight:700;color:var(--cyan);">&lambda; IN-BROWSER GUILE SCHEME &amp; Z-COMBINATOR REPL (OFFLINE • ZERO CDN)</div>
<div style="font-size:0.73rem;font-weight:700;color:var(--cyan);">&lambda; 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
<div style="display:flex;gap:0.4rem;align-items:center;">
<select id="hsPolyglotReplLang" style="background:var(--bg-void);color:var(--cyan);border:1px solid var(--cyan);padding:0.15rem 0.35rem;font-family:inherit;font-size:0.68rem;font-weight:700;">
<option value="guile">λ Guile Scheme</option>
<option value="ts">TS TypeScript</option>
<option value="rust">Rs Rust</option>
</select>
<label style="font-size:0.68rem;color:var(--text-secondary);cursor:pointer;"><input type="checkbox" id="hsGuilePreferFloat" /> Float view</label>
<button type="button" id="hsGuileReplCloseBtn" class="btn" style="padding:0.15rem 0.45rem;font-size:0.68rem;">Minimize / Expand</button>
</div>
@@ -94,22 +100,27 @@ cid = compute_dag_json_cidv1(manifest)</pre></div><div class="hs-guile-box"><str
<div class="hs-repl-body">
<div style="display:flex;gap:0.4rem;margin-bottom:0.4rem;flex-wrap:wrap;">
<select id="hsGuileReplPreset" style="flex:1;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.28rem;font-family:inherit;font-size:0.7rem;">
<option value="">-- Load Preset Z-Combinator / Domain Expression --</option>
<option value='(aq-base36 "LEMUR")'>Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
<option value="(prime-factors 666)">Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
<option value="(variance-pop *cluster-292-gen0*)">Exact Rational Variance (Cluster 292 Gen 0): (variance-pop *cluster-292-gen0*)</option>
<option value="(eti-score 95 92 94 90 91 96)">Exact Rational Convex ETI Score: (eti-score 95 92 94 90 91 96)</option>
<option value="((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">Thomas' Calculus Derivative d/dx(x^3) at x=2 via Z</option>
<option value="(adaptive-simpson (lambda (x) (* x x)) 0.0 3.0 1e-6)">Adaptive Simpson Integral int_0^3 x^2 dx = 9.0 via Z</option>
<option value="(bayes-update '(1/3 1/3 1/3) '(1/10 3/10 6/10))">Exact Rational 3-State Bayes Update via Z</option>
<option value="">-- Load Preset Polyglot Expression (Guile / TS / Rust) --</option>
<option value='guile::(aq-base36 "LEMUR")'>[λ Guile] Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
<option value='ts::aqBase36("LEMUR")'>[TS] Base-36 AQ: aqBase36("LEMUR") => 114</option>
<option value='rust::aq_base36("LEMUR")'>[Rs Rust] Base-36 AQ: aq_base36("LEMUR") => 114</option>
<option value="guile::(prime-factors 666)">[λ Guile] Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
<option value="ts::primeFactors(666)">[TS] Prime Factors: primeFactors(666) => [2,3,3,37]</option>
<option value="rust::prime_factors(666_u64)">[Rs Rust] Prime Factors: prime_factors(666_u64) => vec![2, 3, 3, 37]</option>
<option value="guile::(variance-pop *cluster-292-gen0*)">[λ Guile] Exact Rational Variance (Cluster 292): 4634/9</option>
<option value="ts::variancePop([264, 317, 276] as const)">[TS] Cluster 292 Variance: 514.8889</option>
<option value="rust::variance_pop(&[264.0, 317.0, 276.0])">[Rs Rust] Cluster 292 Variance: 514.8889</option>
<option value="guile::((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">[λ Guile] Thomas' Calculus d/dx(x^3) at x=2 => 12.0</option>
<option value="ts::derivative((x: number): number => x ** 3, 1e-5)(2.0)">[TS] Derivative d/dx(x^3) at x=2 => 12</option>
<option value="rust::derivative(|x: f64| x * x * x, 1e-5, 2.0)">[Rs Rust] Derivative d/dx(x^3) at x=2 => 12</option>
</select>
<button type="button" id="hsGuileReplEvalBtn" class="btn" style="border-color:var(--emerald);color:var(--emerald);">Evaluate (&lambda;)</button>
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step &beta;-Reduction</button>
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step AST Trace</button>
</div>
<textarea id="hsGuileReplInput" rows="2" style="width:100%;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.45rem;font-family:inherit;font-size:0.73rem;">(aq-base36 "LEMUR")</textarea>
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">guile&gt; Ready. Toggle [λ GUILE SCHEME LENS: ON] or click Evaluate (λ).</pre>
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">polyglot&gt; Ready (4-Ring Zero-Eval AST Sandbox). Select [λ GUILE | TS | RS | ≡ ALL 3] or click Evaluate (λ).</pre>
</div>
</aside>
<script src="../assets/hs-guile-scheme-repl.js?v=2.2.0"></script>
<script src="../assets/hs-guile-scheme-repl.js?v=2.8.1"></script>
</body>
</html>
@@ -3,8 +3,8 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Unit E2: 6-Gate 388-Node Knowledge Graph Compiler, ReadOnlyIsolationGuard & Quiescent SQLite + FTS5 Engine — hyperstitionstud.io/engineering (v2.2.0)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.2.0" />
<title>Unit E2: 6-Gate 388-Node Knowledge Graph Compiler, ReadOnlyIsolationGuard & Quiescent SQLite + FTS5 Engine — hyperstitionstud.io/engineering (v2.8.1)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.8.1" />
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DejaVu Sans Mono', ui-monospace, monospace; padding: 1.25rem; line-height: 1.5; }
@@ -22,7 +22,7 @@
<header>
<div>
<h1>Unit E2: 6-Gate 388-Node Knowledge Graph Compiler, ReadOnlyIsolationGuard & Quiescent SQLite + FTS5 Engine</h1>
<p class="subtitle">Cartridge E2 &bull; Non-Sequentially Revertible via <code>hs-eng-docs --disable knowledge-graph-and-sqlite</code> &bull; v2.2.0</p>
<p class="subtitle">Cartridge E2 &bull; Non-Sequentially Revertible via <code>hs-eng-docs --disable knowledge-graph-and-sqlite</code> &bull; v2.8.1 <span class="hs-sigil-seal" aria-hidden="true">[ &#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; ]</span></p>
</div>
<nav class="top-nav">
<a class="btn" href="../../index.html">Portal Home (/)</a>
@@ -33,15 +33,15 @@
<a class="btn" href="../mcp-chatbot-rest-and-ipld/index.html" style="">E4: MCP, REST & IPLD CIDv1</a>
<a class="btn" href="../cicd-vps-tmpfs-and-regression/index.html" style="">E5: CI/CD, VPS & Regression</a>
<a class="btn" href="../../math/index.html">Math Hub (/math/)</a>
<button id="guileSchemeModeToggle" class="btn hs-guile-toggle" type="button" aria-pressed="false" title="Toggle additive Guile Scheme &amp; Z-Combinator teaching cartridges and in-browser REPL (Alt+S)"><span class="hs-guile-lambda-badge">&lambda;</span><span>GUILE SCHEME LENS: <strong id="guileSchemeModeState">OFF</strong></span></button>
<div id="hsPolyglotModeSelector" class="hs-polyglot-segmented" role="radiogroup" aria-label="Pedagogical Programming Language Lens"><span class="hs-polyglot-prefix">LENS:</span><button type="button" id="guileSchemeModeToggle" class="hs-polyglot-seg" role="radio" data-lens-mode="off" aria-checked="true" title="Hide programming language cartridges (Alt+0)">OFF</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="guile" aria-checked="false" title="GNU Guile Scheme — Z-Combinator &amp; Exact Rationals (Alt+1)"><span class="hs-guile-lambda-badge">&lambda;</span>GUILE</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="ts" aria-checked="false" title="TypeScript — Static Union Types &amp; Functional Pipelines (Alt+2)"><span class="hs-guile-lambda-badge">TS</span>TYPESCRIPT</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="rust" aria-checked="false" title="Rust — Ownership, Option&lt;T&gt; &amp; Zero-Cost Iterators (Alt+3)"><span class="hs-guile-lambda-badge">Rs</span>RUST</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="all" aria-checked="false" title="Side-by-side comparison of Guile Scheme, TypeScript, and Rust (Alt+4)">&equiv; ALL 3</button><strong id="guileSchemeModeState" style="display:none;">OFF</strong></div>
<span class="nav-donate-sep" aria-hidden="true"></span>
<a class="btn-donate-pill" href="../../donate/index.html"><span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>
<a class="btn-donate-pill" href="../../donate/index.html?from=engineering"><span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>
</nav>
</header>
<section class="panel hs-plate-g3 plate-lock-emerald hs-prereq-ladder" style="margin-bottom:0.9rem;padding:1rem 1.2rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--emerald);text-transform:uppercase;letter-spacing:0.06em;">Prerequisite Track for Novices &bull; Required Expertise: Level 3-4: Databases, Cryptographic Hashing & OS Concurrency (15-25 hrs study)</div><p style="font-size:0.76rem;color:var(--text-secondary);margin:0.35rem 0;">If any concepts on this page are unfamiliar, occupy your study time with these free foundational resources first:</p><div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:0.8rem;margin-top:0.4rem;"><div><strong style="font-size:0.73rem;color:var(--gold);">Core Concepts Required:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li>Cryptographic hash functions (SHA-256) and Python context managers (with / __exit__)</li><li>Relational schemas, inverted full-text search indices (SQLite FTS5), and graph representations</li><li>ACID transactions, Write-Ahead Logging (WAL), and BEGIN EXCLUSIVE file locking</li></ul></div><div><strong style="font-size:0.73rem;color:var(--cyan);">Curated Free Public Study Resources:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li><a href="https://www.sqlite.org/wal.html" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">SQLite Write-Ahead Logging (WAL) Architecture &#x2197;</a></li><li><a href="https://www.sqlite.org/fts5.html" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">SQLite FTS5 Full-Text Search Extension Docs &#x2197;</a></li><li><a href="https://15445.courses.cs.cmu.edu/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">CMU 15-445/645 (Intro to Database Systems — Andy Pavlo) &#x2197;</a></li><li><a href="https://docs.python.org/3/library/contextlib.html" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">Python contextlib & Context Manager Documentation &#x2197;</a></li></ul></div></div></section>
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">&lambda; Guile Scheme Foil (E2): Functional Pre/Post SHA-256 Read-Only Isolation Guard</div><button type="button" class="btn hs-load-in-repl-btn" data-scheme-expr="((lambda (pre post) (and (= pre 282) (= pre post))) 282 282)" style="border-color:var(--cyan);color:var(--cyan);">Send to In-Browser Guile REPL &rarr;</button></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Formal Specification:</strong><code>Guard(f): H_pre == H_expected ∧ H_post == H_pre</code></div><div class="hs-guile-box"><strong style="color:var(--text-secondary);display:block;margin-bottom:0.2rem;">2. Production Python:</strong><pre style="white-space:pre-wrap;">with ReadOnlyIsolationGuard(cfg.read_only_files) as guard:
run_pipeline()</pre></div><div class="hs-guile-box"><strong style="color:var(--cyan);display:block;margin-bottom:0.2rem;">3. Guile Scheme (Z-Combinator):</strong><code class="hs-guile-code-expr">((lambda (pre post) (and (= pre 282) (= pre post))) 282 282)</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Toggle Guile Lens ON to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge:</strong> Test what happens in the REPL when post-state mutates from 282 to 283.</div></section>
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">&lambda; Polyglot Foil (E2): Pre/Post SHA-256 Read-Only Isolation Guard &amp; Borrow Checking</div><div style="display:flex;gap:0.25rem;flex-wrap:wrap;align-items:center;"><button type="button" class="hs-polyglot-seg" data-lens-mode="guile">&lambda; Guile</button><button type="button" class="hs-polyglot-seg" data-lens-mode="ts">TS TypeScript</button><button type="button" class="hs-polyglot-seg" data-lens-mode="rust">Rs Rust</button><button type="button" class="hs-polyglot-seg" data-lens-mode="all">&equiv; All 3</button><button type="button" class="hs-polyglot-seg" data-lens-mode="off">Hide</button></div></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Formal Specification &amp; Python:</strong><code>Guard(f): H_pre == H_expected ∧ H_post == H_pre</code><pre style="white-space:pre-wrap;margin-top:0.25rem;color:var(--text-secondary);">with ReadOnlyIsolationGuard(cfg.read_only_files) as guard:
run_pipeline()</pre></div><div class="hs-guile-box hs-lang-box-guile"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--cyan);">&lambda; Guile Scheme (Z-Combinator):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="guile" data-scheme-expr="((lambda (pre post) (and (= pre 282) (= pre post))) 282 282)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-guile-code-expr">((lambda (pre post) (and (= pre 282) (= pre post))) 282 282)</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-ts"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--gold);">TS TypeScript (Strict AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="ts" data-scheme-expr="((pre: number, post: number): boolean =&gt; pre === 282 &amp;&amp; pre === post)(282, 282)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-ts-code-expr">((pre: number, post: number): boolean =&gt; pre === 282 &amp;&amp; pre === post)(282, 282)</code><div class="hs-ts-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-rust"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--emerald);">Rs Rust (Option/Iterator AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="rust" data-scheme-expr="isolation_guard_ok(282_u32, 282_u32)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-rust-code-expr">isolation_guard_ok(282_u32, 282_u32)</code><div class="hs-rust-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge (4-Ring Zero-Escape Sandbox):</strong> Compare Scheme&#x27;s predicate, TypeScript&#x27;s typed arrow guard, and Rust&#x27;s Result&lt;bool, Error&gt;.</div></section>
<article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">1. ReadOnlyIsolationGuard Context Manager (hyperstitionstud_io.glossary)</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">Every compiler, MCP tool, and REST v1 handler executes inside with ReadOnlyIsolationGuard(cfg.read_only_files) as guard:. Before and after the block runs, SHA-256 digests of taxonomy/glossary-registry.json and encyclopedia/encyclopedia-manifest.json are verified against baseline constants, raising RuntimeError immediately on any byte mutation.</p></article><article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">2. 6-Gate Multi-Format Graph Compiler & Quiescent 100M SQLite Logrotate (db/sqlite_meta.py)</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">build_encyclopedia_knowledge_graph.py compiles 388 nodes and 1,282 edges into JSON, JS, GraphML, GEXF, Obsidian Canvas, and 3 1600x1060 PNG atlases. sqlite_meta.py hydrates hyperstition-catalog.db (FTS5) and records /api/v1/* and /mcp telemetry in /var/lib/hyperstitionstud.io/api-telemetry.db, while deploy/logrotate.d/hyperstition-sqlite-meta acquires BEGIN EXCLUSIVE at 100M, snapshots .1.gz, and runs PRAGMA wal_checkpoint(TRUNCATE); VACUUM;.</p></article>
<div style="display:flex;justify-content:space-between;align-items:center;margin-top:0.8rem;">
@@ -50,15 +50,21 @@
</div>
<footer>
hyperstitionstud.io/engineering/knowledge-graph-and-sqlite v2.2.0 &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
hyperstitionstud.io/engineering/knowledge-graph-and-sqlite v2.8.1 &bull; <span class="hs-sigil-colophon" aria-hidden="true">&#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; &middot; &#x2644;</span> &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
</footer>
</div>
<script src="../engineering-manifest-data.js?v=2.2.0"></script>
<script src="../engineering-app.js?v=2.2.0"></script>
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Guile Scheme and Z-Combinator REPL">
<script src="../../assets/hs-matrix-coderain.js?v=2.8.1" defer></script>
<script src="../engineering-manifest-data.js?v=2.8.1"></script>
<script src="../engineering-app.js?v=2.8.1"></script>
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Polyglot Guile Scheme, TypeScript, and Rust Hardened REPL">
<div style="display:flex;justify-content:space-between;align-items:center;gap:0.5rem;margin-bottom:0.45rem;">
<div style="font-size:0.74rem;font-weight:700;color:var(--cyan);">&lambda; IN-BROWSER GUILE SCHEME &amp; Z-COMBINATOR REPL (OFFLINE • ZERO CDN)</div>
<div style="font-size:0.73rem;font-weight:700;color:var(--cyan);">&lambda; 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
<div style="display:flex;gap:0.4rem;align-items:center;">
<select id="hsPolyglotReplLang" style="background:var(--bg-void);color:var(--cyan);border:1px solid var(--cyan);padding:0.15rem 0.35rem;font-family:inherit;font-size:0.68rem;font-weight:700;">
<option value="guile">λ Guile Scheme</option>
<option value="ts">TS TypeScript</option>
<option value="rust">Rs Rust</option>
</select>
<label style="font-size:0.68rem;color:var(--text-secondary);cursor:pointer;"><input type="checkbox" id="hsGuilePreferFloat" /> Float view</label>
<button type="button" id="hsGuileReplCloseBtn" class="btn" style="padding:0.15rem 0.45rem;font-size:0.68rem;">Minimize / Expand</button>
</div>
@@ -66,22 +72,27 @@
<div class="hs-repl-body">
<div style="display:flex;gap:0.4rem;margin-bottom:0.4rem;flex-wrap:wrap;">
<select id="hsGuileReplPreset" style="flex:1;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.28rem;font-family:inherit;font-size:0.7rem;">
<option value="">-- Load Preset Z-Combinator / Domain Expression --</option>
<option value='(aq-base36 "LEMUR")'>Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
<option value="(prime-factors 666)">Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
<option value="(variance-pop *cluster-292-gen0*)">Exact Rational Variance (Cluster 292 Gen 0): (variance-pop *cluster-292-gen0*)</option>
<option value="(eti-score 95 92 94 90 91 96)">Exact Rational Convex ETI Score: (eti-score 95 92 94 90 91 96)</option>
<option value="((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">Thomas' Calculus Derivative d/dx(x^3) at x=2 via Z</option>
<option value="(adaptive-simpson (lambda (x) (* x x)) 0.0 3.0 1e-6)">Adaptive Simpson Integral int_0^3 x^2 dx = 9.0 via Z</option>
<option value="(bayes-update '(1/3 1/3 1/3) '(1/10 3/10 6/10))">Exact Rational 3-State Bayes Update via Z</option>
<option value="">-- Load Preset Polyglot Expression (Guile / TS / Rust) --</option>
<option value='guile::(aq-base36 "LEMUR")'>[λ Guile] Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
<option value='ts::aqBase36("LEMUR")'>[TS] Base-36 AQ: aqBase36("LEMUR") => 114</option>
<option value='rust::aq_base36("LEMUR")'>[Rs Rust] Base-36 AQ: aq_base36("LEMUR") => 114</option>
<option value="guile::(prime-factors 666)">[λ Guile] Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
<option value="ts::primeFactors(666)">[TS] Prime Factors: primeFactors(666) => [2,3,3,37]</option>
<option value="rust::prime_factors(666_u64)">[Rs Rust] Prime Factors: prime_factors(666_u64) => vec![2, 3, 3, 37]</option>
<option value="guile::(variance-pop *cluster-292-gen0*)">[λ Guile] Exact Rational Variance (Cluster 292): 4634/9</option>
<option value="ts::variancePop([264, 317, 276] as const)">[TS] Cluster 292 Variance: 514.8889</option>
<option value="rust::variance_pop(&[264.0, 317.0, 276.0])">[Rs Rust] Cluster 292 Variance: 514.8889</option>
<option value="guile::((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">[λ Guile] Thomas' Calculus d/dx(x^3) at x=2 => 12.0</option>
<option value="ts::derivative((x: number): number => x ** 3, 1e-5)(2.0)">[TS] Derivative d/dx(x^3) at x=2 => 12</option>
<option value="rust::derivative(|x: f64| x * x * x, 1e-5, 2.0)">[Rs Rust] Derivative d/dx(x^3) at x=2 => 12</option>
</select>
<button type="button" id="hsGuileReplEvalBtn" class="btn" style="border-color:var(--emerald);color:var(--emerald);">Evaluate (&lambda;)</button>
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step &beta;-Reduction</button>
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step AST Trace</button>
</div>
<textarea id="hsGuileReplInput" rows="2" style="width:100%;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.45rem;font-family:inherit;font-size:0.73rem;">(aq-base36 "LEMUR")</textarea>
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">guile&gt; Ready. Toggle [λ GUILE SCHEME LENS: ON] or click Evaluate (λ).</pre>
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">polyglot&gt; Ready (4-Ring Zero-Eval AST Sandbox). Select [λ GUILE | TS | RS | ≡ ALL 3] or click Evaluate (λ).</pre>
</div>
</aside>
<script src="../../assets/hs-guile-scheme-repl.js?v=2.2.0"></script>
<script src="../../assets/hs-guile-scheme-repl.js?v=2.8.1"></script>
</body>
</html>
@@ -3,8 +3,8 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Unit E4: Stateless MCP Server (:8095), Chatbot OpenAPI 3.1.0 REST Adapter, .png+.json Cards & IPLD CIDv1 — hyperstitionstud.io/engineering (v2.2.0)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.2.0" />
<title>Unit E4: Stateless MCP Server (:8095), Chatbot OpenAPI 3.1.0 REST Adapter, .png+.json Cards & IPLD CIDv1 — hyperstitionstud.io/engineering (v2.8.1)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.8.1" />
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DejaVu Sans Mono', ui-monospace, monospace; padding: 1.25rem; line-height: 1.5; }
@@ -22,7 +22,7 @@
<header>
<div>
<h1>Unit E4: Stateless MCP Server (:8095), Chatbot OpenAPI 3.1.0 REST Adapter, .png+.json Cards & IPLD CIDv1</h1>
<p class="subtitle">Cartridge E4 &bull; Non-Sequentially Revertible via <code>hs-eng-docs --disable mcp-chatbot-rest-and-ipld</code> &bull; v2.2.0</p>
<p class="subtitle">Cartridge E4 &bull; Non-Sequentially Revertible via <code>hs-eng-docs --disable mcp-chatbot-rest-and-ipld</code> &bull; v2.8.1 <span class="hs-sigil-seal" aria-hidden="true">[ &#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; ]</span></p>
</div>
<nav class="top-nav">
<a class="btn" href="../../index.html">Portal Home (/)</a>
@@ -33,14 +33,14 @@
<a class="btn" href="index.html" style="border-color:var(--gold);color:var(--gold);">E4: MCP, REST & IPLD CIDv1</a>
<a class="btn" href="../cicd-vps-tmpfs-and-regression/index.html" style="">E5: CI/CD, VPS & Regression</a>
<a class="btn" href="../../math/index.html">Math Hub (/math/)</a>
<button id="guileSchemeModeToggle" class="btn hs-guile-toggle" type="button" aria-pressed="false" title="Toggle additive Guile Scheme &amp; Z-Combinator teaching cartridges and in-browser REPL (Alt+S)"><span class="hs-guile-lambda-badge">&lambda;</span><span>GUILE SCHEME LENS: <strong id="guileSchemeModeState">OFF</strong></span></button>
<div id="hsPolyglotModeSelector" class="hs-polyglot-segmented" role="radiogroup" aria-label="Pedagogical Programming Language Lens"><span class="hs-polyglot-prefix">LENS:</span><button type="button" id="guileSchemeModeToggle" class="hs-polyglot-seg" role="radio" data-lens-mode="off" aria-checked="true" title="Hide programming language cartridges (Alt+0)">OFF</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="guile" aria-checked="false" title="GNU Guile Scheme — Z-Combinator &amp; Exact Rationals (Alt+1)"><span class="hs-guile-lambda-badge">&lambda;</span>GUILE</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="ts" aria-checked="false" title="TypeScript — Static Union Types &amp; Functional Pipelines (Alt+2)"><span class="hs-guile-lambda-badge">TS</span>TYPESCRIPT</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="rust" aria-checked="false" title="Rust — Ownership, Option&lt;T&gt; &amp; Zero-Cost Iterators (Alt+3)"><span class="hs-guile-lambda-badge">Rs</span>RUST</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="all" aria-checked="false" title="Side-by-side comparison of Guile Scheme, TypeScript, and Rust (Alt+4)">&equiv; ALL 3</button><strong id="guileSchemeModeState" style="display:none;">OFF</strong></div>
<span class="nav-donate-sep" aria-hidden="true"></span>
<a class="btn-donate-pill" href="../../donate/index.html"><span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>
<a class="btn-donate-pill" href="../../donate/index.html?from=engineering"><span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>
</nav>
</header>
<section class="panel hs-plate-g3 plate-lock-emerald hs-prereq-ladder" style="margin-bottom:0.9rem;padding:1rem 1.2rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--emerald);text-transform:uppercase;letter-spacing:0.06em;">Prerequisite Track for Novices &bull; Required Expertise: Level 4: Network Protocols, OpenAPI 3.1 & Content-Addressed Storage (15-20 hrs study)</div><p style="font-size:0.76rem;color:var(--text-secondary);margin:0.35rem 0;">If any concepts on this page are unfamiliar, occupy your study time with these free foundational resources first:</p><div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:0.8rem;margin-top:0.4rem;"><div><strong style="font-size:0.73rem;color:var(--gold);">Core Concepts Required:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li>HTTP/1.1 request/response lifecycles, status codes (200, 404, 422, 500, 502), and reverse proxies</li><li>JSON-RPC 2.0, OpenAPI 3.1.0 schema generation, and Model Context Protocol (MCP)</li><li>Canonical JSON serialization, SHA-256 multihashes, and IPLD dag-json (0x0129) CIDv1</li></ul></div><div><strong style="font-size:0.73rem;color:var(--cyan);">Curated Free Public Study Resources:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">MDN Web Docs — HTTP Protocol & Status Codes &#x2197;</a></li><li><a href="https://www.jsonrpc.org/specification" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">JSON-RPC 2.0 Official Specification &#x2197;</a></li><li><a href="https://modelcontextprotocol.io/introduction" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">Model Context Protocol (MCP) Architecture Introduction &#x2197;</a></li><li><a href="https://proto.school/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">ProtoSchool — Content Identifiers (CIDs) & IPLD Merkle DAGs &#x2197;</a></li></ul></div></div></section>
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">&lambda; Guile Scheme Foil (E4): Homoiconic S-Expression JSON-RPC Tool Dispatcher</div><button type="button" class="btn hs-load-in-repl-btn" data-scheme-expr="(list 'jsonrpc-2.0 'tool &quot;hs_evaluate_aq_and_ingglish&quot; (aq-base36 &quot;envideea&quot;))" style="border-color:var(--cyan);color:var(--cyan);">Send to In-Browser Guile REPL &rarr;</button></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Formal Specification:</strong><code>Dispatch(name, args) → ToolTable[name](args)</code></div><div class="hs-guile-box"><strong style="color:var(--text-secondary);display:block;margin-bottom:0.2rem;">2. Production Python:</strong><pre style="white-space:pre-wrap;">res = call_mcp_tool(target_tool, t_args)</pre></div><div class="hs-guile-box"><strong style="color:var(--cyan);display:block;margin-bottom:0.2rem;">3. Guile Scheme (Z-Combinator):</strong><code class="hs-guile-code-expr">(list 'jsonrpc-2.0 'tool "hs_evaluate_aq_and_ingglish" (aq-base36 "envideea"))</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Toggle Guile Lens ON to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge:</strong> Evaluate (aq-base36 "envideea") => 137 (33rd prime) inside the S-expression.</div></section>
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">&lambda; Polyglot Foil (E4): JSON-RPC 2.0 Tool Dispatch &amp; &#x27;envideea&#x27; = 137 (33rd Prime)</div><div style="display:flex;gap:0.25rem;flex-wrap:wrap;align-items:center;"><button type="button" class="hs-polyglot-seg" data-lens-mode="guile">&lambda; Guile</button><button type="button" class="hs-polyglot-seg" data-lens-mode="ts">TS TypeScript</button><button type="button" class="hs-polyglot-seg" data-lens-mode="rust">Rs Rust</button><button type="button" class="hs-polyglot-seg" data-lens-mode="all">&equiv; All 3</button><button type="button" class="hs-polyglot-seg" data-lens-mode="off">Hide</button></div></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Formal Specification &amp; Python:</strong><code>Dispatch(name, args) → ToolTable[name](args)</code><pre style="white-space:pre-wrap;margin-top:0.25rem;color:var(--text-secondary);">res = call_mcp_tool(target_tool, t_args)</pre></div><div class="hs-guile-box hs-lang-box-guile"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--cyan);">&lambda; Guile Scheme (Z-Combinator):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="guile" data-scheme-expr="(list &#x27;jsonrpc-2.0 &#x27;tool &quot;hs_evaluate_aq_and_ingglish&quot; (aq-base36 &quot;envideea&quot;))" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-guile-code-expr">(list &#x27;jsonrpc-2.0 &#x27;tool &quot;hs_evaluate_aq_and_ingglish&quot; (aq-base36 &quot;envideea&quot;))</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-ts"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--gold);">TS TypeScript (Strict AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="ts" data-scheme-expr="aqBase36(&quot;envideea&quot;)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-ts-code-expr">aqBase36(&quot;envideea&quot;)</code><div class="hs-ts-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-rust"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--emerald);">Rs Rust (Option/Iterator AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="rust" data-scheme-expr="mcp_dispatch_aq(&quot;envideea&quot;)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-rust-code-expr">mcp_dispatch_aq(&quot;envideea&quot;)</code><div class="hs-rust-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge (4-Ring Zero-Escape Sandbox):</strong> Evaluate &quot;envideea&quot; =&gt; 137 across Guile, TypeScript, and Rust.</div></section>
<article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">1. Unified Stateless MCP (/mcp) & Chatbot OpenAPI 3.1.0 REST Adapter (/api/v1/*)</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">mcp/server.py and mcp/rest.py expose all 15 tools in MCP_TOOLS_SCHEMA over stdio, Streamable HTTP POST/GET /mcp, and /api/v1/tools/{tool_name} on 127.0.0.1:8095. Top-level exception guards in _MCPHTTPHandler and record_api_telemetry() ensure sqlite3.OperationalError or read-only filesystem states never drop connections or trigger 502 Bad Gateway.</p></article><article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">2. One-Shot .png + .json Ticker Stats Cards (quant/cards.py) & Canonical IPLD dag-json (0x0129)</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">hs_generate_ticker_stats_card compiles a 5-zone 900x1260 Group 3 Stealth Basalt PNG card and companion JSON payload in one shot (with draw_fitted_text() width clamping and ink-bbox midpoint centering). ipld/__init__.py serializes canonical UTF-8 dag-json and prefixes SHA-256 digests with [0x01, 0xA9, 0x02, 0x12, 0x20] to form Base32 CIDv1 ('baguqeera...').</p></article>
<div style="display:flex;justify-content:space-between;align-items:center;margin-top:0.8rem;">
@@ -49,15 +49,21 @@
</div>
<footer>
hyperstitionstud.io/engineering/mcp-chatbot-rest-and-ipld v2.2.0 &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
hyperstitionstud.io/engineering/mcp-chatbot-rest-and-ipld v2.8.1 &bull; <span class="hs-sigil-colophon" aria-hidden="true">&#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; &middot; &#x2644;</span> &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
</footer>
</div>
<script src="../engineering-manifest-data.js?v=2.2.0"></script>
<script src="../engineering-app.js?v=2.2.0"></script>
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Guile Scheme and Z-Combinator REPL">
<script src="../../assets/hs-matrix-coderain.js?v=2.8.1" defer></script>
<script src="../engineering-manifest-data.js?v=2.8.1"></script>
<script src="../engineering-app.js?v=2.8.1"></script>
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Polyglot Guile Scheme, TypeScript, and Rust Hardened REPL">
<div style="display:flex;justify-content:space-between;align-items:center;gap:0.5rem;margin-bottom:0.45rem;">
<div style="font-size:0.74rem;font-weight:700;color:var(--cyan);">&lambda; IN-BROWSER GUILE SCHEME &amp; Z-COMBINATOR REPL (OFFLINE • ZERO CDN)</div>
<div style="font-size:0.73rem;font-weight:700;color:var(--cyan);">&lambda; 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
<div style="display:flex;gap:0.4rem;align-items:center;">
<select id="hsPolyglotReplLang" style="background:var(--bg-void);color:var(--cyan);border:1px solid var(--cyan);padding:0.15rem 0.35rem;font-family:inherit;font-size:0.68rem;font-weight:700;">
<option value="guile">λ Guile Scheme</option>
<option value="ts">TS TypeScript</option>
<option value="rust">Rs Rust</option>
</select>
<label style="font-size:0.68rem;color:var(--text-secondary);cursor:pointer;"><input type="checkbox" id="hsGuilePreferFloat" /> Float view</label>
<button type="button" id="hsGuileReplCloseBtn" class="btn" style="padding:0.15rem 0.45rem;font-size:0.68rem;">Minimize / Expand</button>
</div>
@@ -65,22 +71,27 @@
<div class="hs-repl-body">
<div style="display:flex;gap:0.4rem;margin-bottom:0.4rem;flex-wrap:wrap;">
<select id="hsGuileReplPreset" style="flex:1;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.28rem;font-family:inherit;font-size:0.7rem;">
<option value="">-- Load Preset Z-Combinator / Domain Expression --</option>
<option value='(aq-base36 "LEMUR")'>Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
<option value="(prime-factors 666)">Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
<option value="(variance-pop *cluster-292-gen0*)">Exact Rational Variance (Cluster 292 Gen 0): (variance-pop *cluster-292-gen0*)</option>
<option value="(eti-score 95 92 94 90 91 96)">Exact Rational Convex ETI Score: (eti-score 95 92 94 90 91 96)</option>
<option value="((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">Thomas' Calculus Derivative d/dx(x^3) at x=2 via Z</option>
<option value="(adaptive-simpson (lambda (x) (* x x)) 0.0 3.0 1e-6)">Adaptive Simpson Integral int_0^3 x^2 dx = 9.0 via Z</option>
<option value="(bayes-update '(1/3 1/3 1/3) '(1/10 3/10 6/10))">Exact Rational 3-State Bayes Update via Z</option>
<option value="">-- Load Preset Polyglot Expression (Guile / TS / Rust) --</option>
<option value='guile::(aq-base36 "LEMUR")'>[λ Guile] Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
<option value='ts::aqBase36("LEMUR")'>[TS] Base-36 AQ: aqBase36("LEMUR") => 114</option>
<option value='rust::aq_base36("LEMUR")'>[Rs Rust] Base-36 AQ: aq_base36("LEMUR") => 114</option>
<option value="guile::(prime-factors 666)">[λ Guile] Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
<option value="ts::primeFactors(666)">[TS] Prime Factors: primeFactors(666) => [2,3,3,37]</option>
<option value="rust::prime_factors(666_u64)">[Rs Rust] Prime Factors: prime_factors(666_u64) => vec![2, 3, 3, 37]</option>
<option value="guile::(variance-pop *cluster-292-gen0*)">[λ Guile] Exact Rational Variance (Cluster 292): 4634/9</option>
<option value="ts::variancePop([264, 317, 276] as const)">[TS] Cluster 292 Variance: 514.8889</option>
<option value="rust::variance_pop(&[264.0, 317.0, 276.0])">[Rs Rust] Cluster 292 Variance: 514.8889</option>
<option value="guile::((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">[λ Guile] Thomas' Calculus d/dx(x^3) at x=2 => 12.0</option>
<option value="ts::derivative((x: number): number => x ** 3, 1e-5)(2.0)">[TS] Derivative d/dx(x^3) at x=2 => 12</option>
<option value="rust::derivative(|x: f64| x * x * x, 1e-5, 2.0)">[Rs Rust] Derivative d/dx(x^3) at x=2 => 12</option>
</select>
<button type="button" id="hsGuileReplEvalBtn" class="btn" style="border-color:var(--emerald);color:var(--emerald);">Evaluate (&lambda;)</button>
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step &beta;-Reduction</button>
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step AST Trace</button>
</div>
<textarea id="hsGuileReplInput" rows="2" style="width:100%;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.45rem;font-family:inherit;font-size:0.73rem;">(aq-base36 "LEMUR")</textarea>
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">guile&gt; Ready. Toggle [λ GUILE SCHEME LENS: ON] or click Evaluate (λ).</pre>
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">polyglot&gt; Ready (4-Ring Zero-Eval AST Sandbox). Select [λ GUILE | TS | RS | ≡ ALL 3] or click Evaluate (λ).</pre>
</div>
</aside>
<script src="../../assets/hs-guile-scheme-repl.js?v=2.2.0"></script>
<script src="../../assets/hs-guile-scheme-repl.js?v=2.8.1"></script>
</body>
</html>
@@ -3,8 +3,8 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Unit E3: Zero-Synthetic-Data Quant Engine, 14-Point Bidirectional Census, Dose 0..3+, FRED Macro & Bayesian Brief — hyperstitionstud.io/engineering (v2.2.0)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.2.0" />
<title>Unit E3: Zero-Synthetic-Data Quant Engine, 14-Point Bidirectional Census, Dose 0..3+, FRED Macro & Bayesian Brief — hyperstitionstud.io/engineering (v2.8.1)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.8.1" />
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DejaVu Sans Mono', ui-monospace, monospace; padding: 1.25rem; line-height: 1.5; }
@@ -22,7 +22,7 @@
<header>
<div>
<h1>Unit E3: Zero-Synthetic-Data Quant Engine, 14-Point Bidirectional Census, Dose 0..3+, FRED Macro & Bayesian Brief</h1>
<p class="subtitle">Cartridge E3 &bull; Non-Sequentially Revertible via <code>hs-eng-docs --disable quant-macro-and-bayesian-brief</code> &bull; v2.2.0</p>
<p class="subtitle">Cartridge E3 &bull; Non-Sequentially Revertible via <code>hs-eng-docs --disable quant-macro-and-bayesian-brief</code> &bull; v2.8.1 <span class="hs-sigil-seal" aria-hidden="true">[ &#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; ]</span></p>
</div>
<nav class="top-nav">
<a class="btn" href="../../index.html">Portal Home (/)</a>
@@ -33,14 +33,14 @@
<a class="btn" href="../mcp-chatbot-rest-and-ipld/index.html" style="">E4: MCP, REST & IPLD CIDv1</a>
<a class="btn" href="../cicd-vps-tmpfs-and-regression/index.html" style="">E5: CI/CD, VPS & Regression</a>
<a class="btn" href="../../math/index.html">Math Hub (/math/)</a>
<button id="guileSchemeModeToggle" class="btn hs-guile-toggle" type="button" aria-pressed="false" title="Toggle additive Guile Scheme &amp; Z-Combinator teaching cartridges and in-browser REPL (Alt+S)"><span class="hs-guile-lambda-badge">&lambda;</span><span>GUILE SCHEME LENS: <strong id="guileSchemeModeState">OFF</strong></span></button>
<div id="hsPolyglotModeSelector" class="hs-polyglot-segmented" role="radiogroup" aria-label="Pedagogical Programming Language Lens"><span class="hs-polyglot-prefix">LENS:</span><button type="button" id="guileSchemeModeToggle" class="hs-polyglot-seg" role="radio" data-lens-mode="off" aria-checked="true" title="Hide programming language cartridges (Alt+0)">OFF</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="guile" aria-checked="false" title="GNU Guile Scheme — Z-Combinator &amp; Exact Rationals (Alt+1)"><span class="hs-guile-lambda-badge">&lambda;</span>GUILE</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="ts" aria-checked="false" title="TypeScript — Static Union Types &amp; Functional Pipelines (Alt+2)"><span class="hs-guile-lambda-badge">TS</span>TYPESCRIPT</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="rust" aria-checked="false" title="Rust — Ownership, Option&lt;T&gt; &amp; Zero-Cost Iterators (Alt+3)"><span class="hs-guile-lambda-badge">Rs</span>RUST</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="all" aria-checked="false" title="Side-by-side comparison of Guile Scheme, TypeScript, and Rust (Alt+4)">&equiv; ALL 3</button><strong id="guileSchemeModeState" style="display:none;">OFF</strong></div>
<span class="nav-donate-sep" aria-hidden="true"></span>
<a class="btn-donate-pill" href="../../donate/index.html"><span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>
<a class="btn-donate-pill" href="../../donate/index.html?from=engineering"><span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>
</nav>
</header>
<section class="panel hs-plate-g3 plate-lock-emerald hs-prereq-ladder" style="margin-bottom:0.9rem;padding:1rem 1.2rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--emerald);text-transform:uppercase;letter-spacing:0.06em;">Prerequisite Track for Novices &bull; Required Expertise: Level 3: Data Engineering, Time-Series Ingestion & Strategy Registries (10-15 hrs study)</div><p style="font-size:0.76rem;color:var(--text-secondary);margin:0.35rem 0;">If any concepts on this page are unfamiliar, occupy your study time with these free foundational resources first:</p><div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:0.8rem;margin-top:0.4rem;"><div><strong style="font-size:0.73rem;color:var(--gold);">Core Concepts Required:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li>HTTP JSON/CSV client ingestion (urllib.request) and resilient fallback chains</li><li>Missing-data domain representation (None / null vs. silent 0.0 corruption)</li><li>Pluggable projection registries (LENS_REGISTRY) and state-machine persistence</li></ul></div><div><strong style="font-size:0.73rem;color:var(--cyan);">Curated Free Public Study Resources:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li><a href="../../quant/index.html" style="color:var(--cyan);">Internal: /quant/ Interactive Guided Canvas Tour (5 Episodes) &#x2197;</a></li><li><a href="https://docs.python.org/3/library/urllib.request.html" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">Python urllib.request & json Standard Library Documentation &#x2197;</a></li><li><a href="https://fredhelp.stlouisfed.org/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">St. Louis Federal Reserve (FRED) Series & CSV Documentation &#x2197;</a></li><li><a href="https://refactoring.guru/design-patterns/python" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">Refactoring.Guru — Strategy & Adapter Design Patterns in Python &#x2197;</a></li></ul></div></div></section>
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">&lambda; Guile Scheme Foil (E3): Zero-Synthetic #f Option Semantics & 4-Species Confluence Dose via Z</div><button type="button" class="btn hs-load-in-repl-btn" data-scheme-expr="(confluence-dose '(#t #t #t #f))" style="border-color:var(--cyan);color:var(--cyan);">Send to In-Browser Guile REPL &rarr;</button></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Formal Specification:</strong><code>D_{i,t} = ∑_{s=1}^4 I(Species_s) ∈ {0..4}, Closed/Private = #f</code></div><div class="hs-guile-box"><strong style="color:var(--text-secondary);display:block;margin-bottom:0.2rem;">2. Production Python:</strong><pre style="white-space:pre-wrap;">dose = sum(1 for flag in (s1, s2, s3, s4) if flag)</pre></div><div class="hs-guile-box"><strong style="color:var(--cyan);display:block;margin-bottom:0.2rem;">3. Guile Scheme (Z-Combinator):</strong><code class="hs-guile-code-expr">(confluence-dose '(#t #t #t #f))</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Toggle Guile Lens ON to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge:</strong> Toggle the 4 species flags (#t / #f) in the REPL to observe Dose 0..4.</div></section>
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">&lambda; Polyglot Foil (E3): Zero-Synthetic Missing-Data Semantics (#f / boolean / Option&lt;f64&gt;)</div><div style="display:flex;gap:0.25rem;flex-wrap:wrap;align-items:center;"><button type="button" class="hs-polyglot-seg" data-lens-mode="guile">&lambda; Guile</button><button type="button" class="hs-polyglot-seg" data-lens-mode="ts">TS TypeScript</button><button type="button" class="hs-polyglot-seg" data-lens-mode="rust">Rs Rust</button><button type="button" class="hs-polyglot-seg" data-lens-mode="all">&equiv; All 3</button><button type="button" class="hs-polyglot-seg" data-lens-mode="off">Hide</button></div></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Formal Specification &amp; Python:</strong><code>D_{i,t} = ∑_{s=1}^4 I(Species_s) ∈ {0..4}, Closed/Private = null</code><pre style="white-space:pre-wrap;margin-top:0.25rem;color:var(--text-secondary);">dose = sum(1 for flag in (s1, s2, s3, s4) if flag)</pre></div><div class="hs-guile-box hs-lang-box-guile"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--cyan);">&lambda; Guile Scheme (Z-Combinator):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="guile" data-scheme-expr="(confluence-dose &#x27;(#t #t #t #f))" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-guile-code-expr">(confluence-dose &#x27;(#t #t #t #f))</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-ts"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--gold);">TS TypeScript (Strict AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="ts" data-scheme-expr="[true, true, true, false].filter(Boolean).length" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-ts-code-expr">[true, true, true, false].filter(Boolean).length</code><div class="hs-ts-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-rust"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--emerald);">Rs Rust (Option/Iterator AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="rust" data-scheme-expr="[Some(135.4), None, Some(138.2)].iter().filter_map(|&amp;x| x).count()" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-rust-code-expr">[Some(135.4), None, Some(138.2)].iter().filter_map(|&amp;x| x).count()</code><div class="hs-rust-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge (4-Ring Zero-Escape Sandbox):</strong> Observe how Scheme #f, TypeScript filter(Boolean), and Rust Option::filter_map eliminate synthetic 0.0 fabrication.</div></section>
<article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">1. Strict Zero-Synthetic-Data Collector & Native-Cadence FRED Macro Engine (collector.py, macro.py)</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">collector.py and timeseries.py eliminate all synthetic bar interpolation: 23 public tickers load 440 verified daily exchange bars (site/quant/real-market-history.json), while private entity ANTHR-PVT and closed weekend/holiday sessions serialize strictly as null ('No data available'). macro.py ingests 14 keyless St. Louis Fed (FRED) CSV series at native 1d, 1mo, and 1q cadences without forward-fill.</p></article><article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">2. 14-Point Bidirectional Census, Confluence Dose (D in {0..4}) & 5-Agenda Bayesian Brief (daily_brief.py)</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">timeseries.py evaluates all 14 data points in Gen 0 (eng_aq) and Gen 1 (ing_aq) and classifies each bar by its 4-species Confluence Dose (Dose 2 isometric pinning vs. Dose 3+ breakout). daily_brief.py updates the append-only Bayesian state ledger (daily-brief-state.json) across R1 Bull, R2 Pinned Isometric, and R3 Tail Drawdown and grades each day's testable macro question Q_t.</p></article>
<div style="display:flex;justify-content:space-between;align-items:center;margin-top:0.8rem;">
@@ -49,15 +49,21 @@
</div>
<footer>
hyperstitionstud.io/engineering/quant-macro-and-bayesian-brief v2.2.0 &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
hyperstitionstud.io/engineering/quant-macro-and-bayesian-brief v2.8.1 &bull; <span class="hs-sigil-colophon" aria-hidden="true">&#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; &middot; &#x2644;</span> &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
</footer>
</div>
<script src="../engineering-manifest-data.js?v=2.2.0"></script>
<script src="../engineering-app.js?v=2.2.0"></script>
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Guile Scheme and Z-Combinator REPL">
<script src="../../assets/hs-matrix-coderain.js?v=2.8.1" defer></script>
<script src="../engineering-manifest-data.js?v=2.8.1"></script>
<script src="../engineering-app.js?v=2.8.1"></script>
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Polyglot Guile Scheme, TypeScript, and Rust Hardened REPL">
<div style="display:flex;justify-content:space-between;align-items:center;gap:0.5rem;margin-bottom:0.45rem;">
<div style="font-size:0.74rem;font-weight:700;color:var(--cyan);">&lambda; IN-BROWSER GUILE SCHEME &amp; Z-COMBINATOR REPL (OFFLINE • ZERO CDN)</div>
<div style="font-size:0.73rem;font-weight:700;color:var(--cyan);">&lambda; 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
<div style="display:flex;gap:0.4rem;align-items:center;">
<select id="hsPolyglotReplLang" style="background:var(--bg-void);color:var(--cyan);border:1px solid var(--cyan);padding:0.15rem 0.35rem;font-family:inherit;font-size:0.68rem;font-weight:700;">
<option value="guile">λ Guile Scheme</option>
<option value="ts">TS TypeScript</option>
<option value="rust">Rs Rust</option>
</select>
<label style="font-size:0.68rem;color:var(--text-secondary);cursor:pointer;"><input type="checkbox" id="hsGuilePreferFloat" /> Float view</label>
<button type="button" id="hsGuileReplCloseBtn" class="btn" style="padding:0.15rem 0.45rem;font-size:0.68rem;">Minimize / Expand</button>
</div>
@@ -65,22 +71,27 @@
<div class="hs-repl-body">
<div style="display:flex;gap:0.4rem;margin-bottom:0.4rem;flex-wrap:wrap;">
<select id="hsGuileReplPreset" style="flex:1;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.28rem;font-family:inherit;font-size:0.7rem;">
<option value="">-- Load Preset Z-Combinator / Domain Expression --</option>
<option value='(aq-base36 "LEMUR")'>Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
<option value="(prime-factors 666)">Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
<option value="(variance-pop *cluster-292-gen0*)">Exact Rational Variance (Cluster 292 Gen 0): (variance-pop *cluster-292-gen0*)</option>
<option value="(eti-score 95 92 94 90 91 96)">Exact Rational Convex ETI Score: (eti-score 95 92 94 90 91 96)</option>
<option value="((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">Thomas' Calculus Derivative d/dx(x^3) at x=2 via Z</option>
<option value="(adaptive-simpson (lambda (x) (* x x)) 0.0 3.0 1e-6)">Adaptive Simpson Integral int_0^3 x^2 dx = 9.0 via Z</option>
<option value="(bayes-update '(1/3 1/3 1/3) '(1/10 3/10 6/10))">Exact Rational 3-State Bayes Update via Z</option>
<option value="">-- Load Preset Polyglot Expression (Guile / TS / Rust) --</option>
<option value='guile::(aq-base36 "LEMUR")'>[λ Guile] Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
<option value='ts::aqBase36("LEMUR")'>[TS] Base-36 AQ: aqBase36("LEMUR") => 114</option>
<option value='rust::aq_base36("LEMUR")'>[Rs Rust] Base-36 AQ: aq_base36("LEMUR") => 114</option>
<option value="guile::(prime-factors 666)">[λ Guile] Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
<option value="ts::primeFactors(666)">[TS] Prime Factors: primeFactors(666) => [2,3,3,37]</option>
<option value="rust::prime_factors(666_u64)">[Rs Rust] Prime Factors: prime_factors(666_u64) => vec![2, 3, 3, 37]</option>
<option value="guile::(variance-pop *cluster-292-gen0*)">[λ Guile] Exact Rational Variance (Cluster 292): 4634/9</option>
<option value="ts::variancePop([264, 317, 276] as const)">[TS] Cluster 292 Variance: 514.8889</option>
<option value="rust::variance_pop(&[264.0, 317.0, 276.0])">[Rs Rust] Cluster 292 Variance: 514.8889</option>
<option value="guile::((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">[λ Guile] Thomas' Calculus d/dx(x^3) at x=2 => 12.0</option>
<option value="ts::derivative((x: number): number => x ** 3, 1e-5)(2.0)">[TS] Derivative d/dx(x^3) at x=2 => 12</option>
<option value="rust::derivative(|x: f64| x * x * x, 1e-5, 2.0)">[Rs Rust] Derivative d/dx(x^3) at x=2 => 12</option>
</select>
<button type="button" id="hsGuileReplEvalBtn" class="btn" style="border-color:var(--emerald);color:var(--emerald);">Evaluate (&lambda;)</button>
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step &beta;-Reduction</button>
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step AST Trace</button>
</div>
<textarea id="hsGuileReplInput" rows="2" style="width:100%;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.45rem;font-family:inherit;font-size:0.73rem;">(aq-base36 "LEMUR")</textarea>
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">guile&gt; Ready. Toggle [λ GUILE SCHEME LENS: ON] or click Evaluate (λ).</pre>
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">polyglot&gt; Ready (4-Ring Zero-Eval AST Sandbox). Select [λ GUILE | TS | RS | ≡ ALL 3] or click Evaluate (λ).</pre>
</div>
</aside>
<script src="../../assets/hs-guile-scheme-repl.js?v=2.2.0"></script>
<script src="../../assets/hs-guile-scheme-repl.js?v=2.8.1"></script>
</body>
</html>
+1 -1
View File
@@ -217,7 +217,7 @@
<main class="gallery-grid" id="galleryGrid"></main>
<footer>
<div>hyperstitionstud.io/gallery &bull; Powered by hyperstitionstudio-core (urn:io:hyperstitionstud:gallery:2.2.0)</div>
<div>hyperstitionstud.io/gallery &bull; Powered by hyperstitionstudio-core (urn:io:hyperstitionstud:gallery:2.8.1)</div>
<div class="hs-lemur-credit">Made with <span class="hs-heart" role="img" aria-label="love">&#x2665;</span> by Lemurs.</div>
</footer>
</div>
+91 -226
View File
@@ -4,8 +4,8 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>hyperstitionstud.io — Technocapital Singularity Zoology &amp; Alphanumeric Qabbala Workbench</title>
<link rel="prefetch" href="/graph/graph-data.js?v=2.2.0" as="script" />
<link rel="stylesheet" href="assets/hs-group3-basalt-chamfer.css?v=2.2.0" />
<link rel="prefetch" href="/graph/graph-data.js?v=2.8.1" as="script" />
<link rel="stylesheet" href="assets/hs-group3-basalt-chamfer.css?v=2.8.1" />
<style>
:root {
--bg-canvas: #020617;
@@ -29,157 +29,117 @@
min-height: 100vh;
display: flex;
flex-direction: column;
padding: 2rem 1.5rem;
padding: 1.5rem 1.5rem;
}
.container { max-width: 1260px; margin: 0 auto; width: 100%; }
.container { max-width: 1320px; margin: 0 auto; width: 100%; }
header {
background: var(--bg-panel);
border: 1px solid var(--border);
border-left: 4px solid var(--cyan);
border-radius: 10px;
padding: 1.4rem 1.6rem;
margin-bottom: 1.6rem;
padding: 1.1rem 1.35rem;
margin-bottom: 1.25rem;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 1rem;
flex-wrap: nowrap;
gap: 0.85rem;
}
.title-row { display: flex; align-items: center; gap: 0.75rem; }
@media (max-width: 1220px) {
header { flex-wrap: wrap; }
}
.title-row { display: flex; align-items: center; gap: 0.65rem; }
.dot {
width: 11px; height: 11px; border-radius: 50%;
width: 10px; height: 10px; border-radius: 50%;
background: var(--cyan);
box-shadow: 0 0 10px var(--cyan);
flex-shrink: 0;
}
h1 { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; }
.subtitle { color: var(--text-muted); font-size: 0.8rem; margin-top: 0.35rem; }
h1 { font-size: 0.98rem; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.subtitle { color: var(--text-muted); font-size: 0.71rem; margin-top: 0.25rem; }
.meta-badges {
margin-left: auto;
display: flex;
align-items: center;
justify-content: flex-end;
gap: 0.5rem;
flex-wrap: wrap;
}
.nav-donate-sep {
width: 1px;
height: 20px;
background: var(--border);
margin: 0 0.2rem;
display: inline-block;
flex-shrink: 0;
}
.btn-donate-pill {
height: 34px;
border-radius: 999px;
padding: 0.28rem 0.9rem 0.28rem 0.35rem;
background: linear-gradient(180deg, #ffd86b 0%, #f59e0b 52%, #d97706 100%);
color: #020617;
border: 1px solid #f5c630;
box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.55), 0 2px 8px rgba(245, 158, 11, 0.22);
display: inline-flex;
align-items: center;
gap: 0.45rem;
font-size: 0.74rem;
font-weight: 700;
letter-spacing: 0.05em;
text-decoration: none;
flex-shrink: 0;
transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.btn-donate-pill:hover {
filter: brightness(1.06);
transform: translateY(-1px);
box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.65), 0 4px 12px rgba(245, 158, 11, 0.32);
color: #020617;
}
.donate-pill-emblem {
width: 20px;
height: 20px;
border-radius: 50%;
background: #0f172a;
color: var(--rose);
border: 1px solid rgba(245, 198, 48, 0.7);
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 0.68rem;
line-height: 1;
gap: 0.38rem;
flex-shrink: 0;
flex-wrap: nowrap;
}
@media (max-width: 1120px) {
.meta-badges {
margin-left: auto;
justify-content: flex-end;
flex-wrap: wrap;
}
}
.badge {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 5px;
padding: 0.3rem 0.6rem;
font-size: 0.72rem;
color: var(--cyan);
}
.grid {
.showcase-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
grid-template-columns: repeat(2, 1fr);
gap: 1.15rem;
}
@media (max-width: 980px) {
.showcase-grid { grid-template-columns: 1fr; }
}
.card {
background: var(--bg-panel);
border: 1px solid var(--border);
border-radius: 10px;
padding: 1.3rem;
padding: 1.15rem 1.25rem;
display: flex;
flex-direction: column;
justify-content: space-between;
gap: 1rem;
gap: 0.75rem;
transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--cyan); transform: translateY(-2px); }
.card-top { display: flex; flex-direction: column; gap: 0.55rem; }
.card-tag {
font-size: 0.7rem;
font-size: 0.68rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.06em;
}
.card h2 { font-size: 1.02rem; font-weight: 700; color: var(--text-main); }
.card p { font-size: 0.78rem; color: var(--text-muted); line-height: 1.55; }
.stat-row {
display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.25rem;
}
.stat {
background: #090d16;
border: 1px solid var(--border);
border-radius: 4px;
padding: 0.2rem 0.45rem;
font-size: 0.68rem;
.hook-caption {
font-size: 0.84rem;
font-weight: 700;
color: var(--text-main);
line-height: 1.42;
border-left: 2px solid var(--border);
padding-left: 0.65rem;
}
.closeup-frame {
background: #05080e;
border: 1px solid var(--border);
overflow: hidden;
display: block;
}
.closeup-frame img {
width: 100%;
height: auto;
display: block;
}
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.btn {
text-decoration: none;
background: var(--bg-card);
color: var(--text-main);
border: 1px solid var(--border);
border-radius: 5px;
padding: 0.45rem 0.8rem;
font-size: 0.74rem;
padding: 0.34rem 0.62rem;
font-size: 0.7rem;
font-weight: 600;
white-space: nowrap;
transition: all 0.15s ease;
}
.btn:hover { border-color: var(--cyan); color: var(--cyan); }
.btn.primary { background: var(--cyan); color: #020617; border-color: var(--cyan); }
.btn.primary:hover { opacity: 0.92; color: #020617; }
footer {
margin-top: 2rem;
margin-top: 1.5rem;
text-align: center;
font-size: 0.72rem;
color: var(--text-muted);
border-top: 1px solid var(--border);
padding-top: 1rem;
padding-top: 0.85rem;
}
</style>
</head>
@@ -189,176 +149,81 @@
<div>
<div class="title-row">
<span class="dot"></span>
<h1>HYPERSTITIONSTUD.IO // TECHNOCAPITAL SINGULARITY ZOOLOGY WORKBENCH</h1>
<h1>HYPERSTITIONSTUD.IO // SINGULARITY ZOOLOGY WORKBENCH</h1>
</div>
<p class="subtitle">100% Offline-Portable &amp; HTTP/3 Edge-Ready Research Corpus &bull; Namespace Authority: urn:io:hyperstitionstud (v2.2.0)</p>
<p class="subtitle">100% Offline-Portable &amp; HTTP/3 Edge-Ready Research Corpus &bull; Namespace Authority: urn:io:hyperstitionstud (v2.8.1) <span class="hs-sigil-seal" aria-hidden="true">[ &#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; ]</span></p>
</div>
<div class="meta-badges">
<a class="btn primary" data-route="learn-track" href="/learn/index.html" style="padding:0.35rem 0.75rem;font-size:0.74rem;">Start Learning Track (/learn/)</a>
<a class="btn" data-route="quant-app" href="/quant/index.html" style="padding:0.35rem 0.75rem;font-size:0.74rem;border-color:var(--gold);color:var(--gold);">Quant Time-Series (/quant/)</a>
<a class="btn" data-route="eng-hub" href="/engineering/index.html" style="padding:0.35rem 0.75rem;font-size:0.74rem;border-color:var(--cyan);color:var(--cyan);">Engineering (/engineering/)</a>
<a class="btn" data-route="math-hub" href="/math/index.html" style="padding:0.35rem 0.75rem;font-size:0.74rem;border-color:var(--emerald);color:var(--emerald);">Applied Math (/math/)</a>
<span class="badge">388 Graph Nodes</span>
<span class="badge">1,282 Typed Edges</span>
<span class="badge">24 Quant Tickers</span>
<a class="btn primary" data-route="calc-app" href="/calc/index.html">Calculator</a>
<a class="btn" data-route="quant-app" href="/quant/index.html" style="border-color:var(--gold);color:var(--gold);">Quant</a>
<a class="btn" data-route="graph-index" href="/graph/index.html" style="border-color:var(--cyan);color:var(--cyan);">Graph</a>
<a class="btn" data-route="learn-track" href="/learn/index.html" style="border-color:var(--emerald);color:var(--emerald);">Learn</a>
<a class="btn" data-route="eng-hub" href="/engineering/index.html">Engineering</a>
<a class="btn" data-route="math-hub" href="/math/index.html">Math</a>
<span class="nav-donate-sep" aria-hidden="true"></span>
<a class="btn-donate-pill" data-route="donate-page" href="/donate/index.html" title="Signal Patronage &amp; Open-Instrument Notes (/donate/)"><span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>
<a class="btn-donate-pill" data-route="donate-page" href="/donate/index.html?from=home" title="Signal Patronage &amp; Open-Instrument Notes (/donate/)"><span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>
</div>
</header>
<main class="grid">
<!-- Card 1: Interactive Knowledge Graph -->
<section class="card">
<div class="card-top">
<span class="card-tag" style="color:var(--cyan)">01 // Interactive Property Graph Workbench</span>
<h2>Encyclopedia Knowledge Graph (Mode 1–4 Explorer)</h2>
<p>Explore all 388 ontological nodes and 1,282 deduplicated edges across Mode 2 Concentric ETI Tier-Ring Radar (S+ Center to D Periphery), Mode 1 Trophic Food-Web, Mode 3 Bipartite G1 Funnel, and 1-Hop Ego-Network Isolation.</p>
<div class="stat-row">
<span class="stat">13 Multi-Build Flex Hubs</span>
<span class="stat">Zero Glossary Leak (SHA-256 Verified)</span>
</div>
</div>
<div class="actions">
<a class="btn primary" data-route="graph-index" href="/graph/index.html">Launch Interactive Graph</a>
<a class="btn" data-route="graph-manual" href="/graph/OPERATORS-MANUAL-ENCYCLOPEDIA-KNOWLEDGE-GRAPH.pdf">Operator's Manual (PDF)</a>
<a class="btn" data-route="graph-json" href="/graph/encyclopedia-graph.json">Graph JSON</a>
<main class="showcase-grid">
<!-- Quadrant 01: Cybermemetics (Hyperstition) & Personal Magical Practice -->
<section class="card plate-lock-emerald">
<span class="card-tag" style="color:var(--emerald)"><span class="hs-sigil" aria-hidden="true">&#x263F; &#x2609;</span>01 // Cybermemetics, Isopsephy &amp; Personal Magical Practice</span>
<p class="hook-caption">&ldquo;Where Spoken Incantation Meets the 37&times;3k Numogrammatic Lattice: Turn Multi-Cipher Base-36 Qabbala &amp; Concentric Radar into a Live Digital Grimoire.&rdquo;</p>
<div class="closeup-frame">
<img src="assets/closeups/quadrant-1-cybermemetics-calc-graph.png" alt="UI Closeup of /calc/ Multi-Cipher Matrix and /graph/ Concentric Syzygy Radar" />
</div>
</section>
<!-- Card 2: 22-Volume PDF Encyclopedia -->
<section class="card">
<div class="card-top">
<span class="card-tag" style="color:var(--red)">02 // 9-Division Alphabetical Reference</span>
<h2>Encyclopedia of Technocapital Singularity Zoology (22 PDFs)</h2>
<p>Complete 122-page, 22-volume PDF encyclopedia organized across 9 ontological divisions (00 Index &amp; Atlas through 08 Stakeholder Registers &amp; Pokedex Semiotics) with 291 indexed placements.</p>
<div class="stat-row">
<span class="stat">Divisions 00–08</span>
<span class="stat">22 Volumes (122 Pages)</span>
</div>
</div>
<div class="actions">
<a class="btn primary" data-route="enc-vol00" href="/encyclopedia/00-index-and-ontological-atlas/00-master-encyclopedia-index-a-to-z.pdf">Open Master Index (Vol 00)</a>
<a class="btn" data-route="enc-overview" href="/zoology/encyclopedia-of-technocapital-singularity-zoology-overview-and-manifest.pdf">Overview &amp; Manifest (PDF)</a>
<a class="btn" data-route="glossary-pdf" href="/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf">282-Term Glossary (PDF)</a>
<!-- Quadrant 02: Finance Enthusiasts & Esoteric Alpha / Non-Correlation -->
<section class="card plate-lock-gold">
<span class="card-tag" style="color:var(--gold)"><span class="hs-sigil" aria-hidden="true">&#x2644; &#x260D;</span>02 // Esoteric Alpha, Non-Correlation &amp; Regime Telemetry</span>
<p class="hook-caption">&ldquo;Beyond Trailing Covariance: Hunt Uncaptured Non-Correlated Alpha Where Closing-Bell Tape, FRED Liquidity &amp; Spoken Headlines Collide.&rdquo;</p>
<div class="closeup-frame">
<img src="assets/closeups/quadrant-2-esoteric-finance-quant.png" alt="UI Closeup of /quant/ 3-Pane Closing-Bell Trajectory, FRED Macro, and Bayesian Regime Brief" />
</div>
</section>
<!-- Card 3: Assemblage Builds ETI Tier List -->
<section class="card">
<div class="card-top">
<span class="card-tag" style="color:var(--gold)">03 // Ecological Trophic Index (ETI 0–100)</span>
<h2>Technocapital Assemblage Builds Tier List (S+ to D/F)</h2>
<p>Six-stat zoological scorecards (ARM, VEL, COL, CAP, PRM, RES) ranking Apex Predators (#1 S1 Autoregressive AI at 93 ETI, #2 S2 Flash-Crash Templex at 90 ETI) down to the Tier D Periphery.</p>
<div class="stat-row">
<span class="stat">S+ Apex: 93 ETI (#1 S1)</span>
<span class="stat">D Periphery: 49 ETI (#9 Q-Stub)</span>
</div>
</div>
<div class="actions">
<a class="btn primary" data-route="tier-png" href="/zoology/tier-list-technocapital-assemblage-builds.png">View Visual Tier List (PNG)</a>
<a class="btn" data-route="tier-pdf" href="/zoology/tier-list-technocapital-assemblage-builds.pdf">Scorecard Report (PDF)</a>
<a class="btn" data-route="radar-spec" href="/graph/docs/specification-concentric-eti-tier-ring-radar-d-periphery.pdf">D Periphery Radar Spec (PDF)</a>
<!-- Quadrant 03: Information Science Enthusiasts from a Novice Level -->
<section class="card plate-lock-emerald">
<span class="card-tag" style="color:var(--cyan)"><span class="hs-sigil" aria-hidden="true">&lambda; &#x25C8;</span>03 // Information Science From First Principles (Novice-Friendly)</span>
<p class="hook-caption">&ldquo;From Zero to Fixed-Point Combinators: Explore Phonemic Compression, Property Graphs &amp; 3-Language AST Sandboxes Starting from High-School Algebra.&rdquo;</p>
<div class="closeup-frame">
<img src="assets/closeups/quadrant-3-info-science-novice-learn-polyglot.png" alt="UI Closeup of /learn/ Prerequisite Ladder and /engineering/ + /math/ Polyglot REPL" />
</div>
</section>
<!-- Card 4: Stakeholder Proposals & M7+ Nucleation -->
<section class="card">
<div class="card-top">
<span class="card-tag" style="color:var(--emerald)">04 // Evidence-Grounded Stakeholder Dossiers</span>
<h2>Corporate Board, Fund Manager &amp; Roster Proposals</h2>
<p>Grounded-citation verified proposals in both Bidirectional (Gen 0 + Gen 1 Ingglish) and Pure Standard Written English (Gen 0 Only) registers, plus Two-Run Emergent Subclass (M7+) nucleation.</p>
<div class="stat-row">
<span class="stat">100% Verbatim Quote Locks</span>
<span class="stat">Dossiers 65–69 (150 Eqs)</span>
</div>
</div>
<div class="actions">
<a class="btn primary" data-route="prop-fund" href="/zoology/proposal-fund-manager-novel-investment-discovery.pdf">Fund Manager Proposal (PDF)</a>
<a class="btn" data-route="prop-board" href="/zoology/proposal-corporate-board-technocapital-allocation.pdf">Corporate Board (PDF)</a>
<a class="btn" data-route="m7-pdf" href="/zoology/m7-emergent-subclass-bidirectional-aq-nucleation.pdf">M7+ Nucleation (PDF)</a>
</div>
</section>
<!-- Card 5: Master Ingglish AQ Archive, Calculator & 4-Gate CI Corpus -->
<section class="card">
<div class="card-top">
<span class="card-tag" style="color:var(--violet)">05 // Bidirectional Base-36 AQ &amp; CMUdict Corpus</span>
<h2>Haiperdohp-Jemaytreeah Calculator, Archive &amp; CI</h2>
<p>Browser-based multi-cipher AQ calculator workbench (haiperdohp-jemaytreeah), 70 verified cross-scale (333 / 666 / 777) dossiers, 4,897 offline CMUdict mappings, and 4-Gate CI audit artifacts.</p>
<div class="stat-row">
<span class="stat">Dossiers 01–70</span>
<span class="stat">100.0% 4-Gate CI Keep Rate</span>
</div>
</div>
<div class="actions">
<a class="btn primary" data-route="calc-app" href="/calc/index.html">Open AQ Calculator</a>
<a class="btn" data-route="ci-onboarding" href="/ci/ONBOARDING-INGGLISH-AQ.pdf">Onboarding &amp; CI Guide (PDF)</a>
<a class="btn" data-route="ci-audit" href="/ci/ci-audit-report.json">4-Gate CI Audit JSON</a>
<a class="btn" data-route="arch-index" href="/archive/00-index-and-methodology.md">Archive Index (00–70)</a>
</div>
</section>
<!-- Card 6: Cross-Repository Dependency & VPS Ops -->
<section class="card">
<div class="card-top">
<span class="card-tag" style="color:var(--rose)">06 // System Topology &amp; Auditable Pipeline</span>
<h2>Cross-Repo Dependency Flow &amp; VPS Deployment Architecture</h2>
<p>Three-stage auditable BUILD &rarr; TEST &rarr; STAGE_COMMIT dependency graph across hyperstitionstudio-core, ingglish-hyperdope-gematria, technocapital-singularity-zoology, and encyclopedia-knowledge-graph.</p>
<div class="stat-row">
<span class="stat">6-Gate CI Verifier</span>
<span class="stat">RAM-Backed HTTP/3 + Brotli-11</span>
</div>
</div>
<div class="actions">
<a class="btn primary" data-route="eng-hub" href="/engineering/index.html">Engineering Hub (/engineering/)</a>
<a class="btn" data-route="math-hub" href="/math/index.html" style="border-color:var(--emerald);color:var(--emerald);">Applied Math Hub (/math/)</a>
<a class="btn" data-route="dep-html" href="/graph/docs/cross-repo-dependency-and-audit-flow-diagram.html">Interactive Flow Diagram</a>
<a class="btn" data-route="harvest-flow-png" href="/graph/docs/periodic-harvest-cicd-to-vps-flow-diagram.png">Periodic Harvest Flow (PNG)</a>
<a class="btn" data-route="vps-guide" href="/graph/docs/VPS-AND-GIT-OPERATOR-DEPLOYMENT-GUIDE.pdf">VPS &amp; Git Guide (PDF)</a>
<!-- Quadrant 04: Operators Interested in Deployment Use Case -->
<section class="card plate-lock-rose">
<span class="card-tag" style="color:var(--rose)"><span class="hs-sigil" aria-hidden="true">&#x269B; &#x269A;</span>04 // Two-Script DevOps, tmpfs Hydration &amp; EROFS Verification</span>
<p class="hook-caption">&ldquo;Two Scripts, Zero Cloud Lock-In: Auditable 6-Repo Git Topology, RAM-Backed HTTP/3 Edge Serving &amp; ProtectSystem=strict Verification.&rdquo;</p>
<div class="closeup-frame">
<img src="assets/closeups/quadrant-4-operators-deployment-vps.png" alt="UI Closeup of Two-Script VPS Deployment Pipeline, EROFS Sandbox, and P1-P6 Smoke Gates" />
</div>
</section>
</main>
<footer>
<div>hyperstitionstud.io &bull; Powered by hyperstitionstudio-core (hyperstitionstud_io.* / urn:io:hyperstitionstud v2.2.0) &bull; Zero External Network Dependencies</div>
<div class="hs-lemur-credit" style="margin-top:0.35rem;color:var(--text-muted);font-size:0.75rem;">Made with <span class="hs-heart" role="img" aria-label="love" style="color:var(--rose);display:inline-block;padding:0 2px;">&#x2665;</span> by Lemurs.</div>
<div>hyperstitionstud.io &bull; Powered by hyperstitionstudio-core (hyperstitionstud_io.* / urn:io:hyperstitionstud v2.8.1) &bull; Zero External Network Dependencies</div>
<div class="hs-lemur-credit" style="margin-top:0.35rem;color:var(--text-muted);font-size:0.75rem;"><span class="hs-sigil-colophon" aria-hidden="true">&#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; &middot; &#x2644;</span> &bull; Made with <span class="hs-heart" role="img" aria-label="love" style="color:var(--rose);display:inline-block;padding:0 2px;">&#x2665;</span> by Lemurs.</div>
</footer>
</div>
<script src="assets/hs-matrix-coderain.js?v=2.8.1" defer></script>
<script>
// Automatic offline file:// relative-path adaptation when opened directly from hyperstitionstudio-core/site/index.html
(function() {
if (window.location.protocol !== "file:") return;
const map = {
"learn-track": "./learn/index.html",
"calc-app": "../../haiperdohp-jemaytreeah/index.html",
"quant-app": "./quant/index.html",
"graph-index": "../../encyclopedia-knowledge-graph/index.html",
"learn-track": "./learn/index.html",
"eng-hub": "./engineering/index.html",
"math-hub": "./math/index.html",
"donate-page": "./donate/index.html",
"meme-gallery": "./gallery/index.html",
"graph-index": "../../encyclopedia-knowledge-graph/index.html",
"graph-manual": "../../encyclopedia-knowledge-graph/OPERATORS-MANUAL-ENCYCLOPEDIA-KNOWLEDGE-GRAPH.pdf",
"graph-json": "../../encyclopedia-knowledge-graph/encyclopedia-graph.json",
"enc-vol00": "../../technocapital-singularity-zoology/encyclopedia/00-index-and-ontological-atlas/00-master-encyclopedia-index-a-to-z.pdf",
"enc-overview": "../../technocapital-singularity-zoology/encyclopedia-of-technocapital-singularity-zoology-overview-and-manifest.pdf",
"glossary-pdf": "../../technocapital-singularity-zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf",
"tier-png": "../../technocapital-singularity-zoology/tier-list-technocapital-assemblage-builds.png",
"tier-pdf": "../../technocapital-singularity-zoology/tier-list-technocapital-assemblage-builds.pdf",
"radar-spec": "../../encyclopedia-knowledge-graph/docs/specification-concentric-eti-tier-ring-radar-d-periphery.pdf",
"prop-fund": "../../technocapital-singularity-zoology/proposal-fund-manager-novel-investment-discovery.pdf",
"prop-board": "../../technocapital-singularity-zoology/proposal-corporate-board-technocapital-allocation.pdf",
"m7-pdf": "../../technocapital-singularity-zoology/m7-emergent-subclass-bidirectional-aq-nucleation.pdf",
"calc-app": "../../haiperdohp-jemaytreeah/index.html",
"ci-onboarding": "../../hyperdope-ci-build/ONBOARDING-INGGLISH-AQ.pdf",
"ci-audit": "../../hyperdope-ci-build/ci-audit-report.json",
"arch-index": "../../ingglish-hyperdope-gematria/ingglish-aq-archive/00-index-and-methodology.md",
"schemas-v1": "../schemas/v1/encyclopedia-graph.schema.json",
"dep-html": "../../encyclopedia-knowledge-graph/docs/cross-repo-dependency-and-audit-flow-diagram.html",
"dep-pdf": "../../encyclopedia-knowledge-graph/docs/cross-repo-dependency-and-audit-flow-diagram.pdf",
"harvest-flow-png": "../../encyclopedia-knowledge-graph/docs/periodic-harvest-cicd-to-vps-flow-diagram.png",
"vps-guide": "../../encyclopedia-knowledge-graph/docs/VPS-AND-GIT-OPERATOR-DEPLOYMENT-GUIDE.pdf"
"donate-page": "./donate/index.html"
};
document.querySelectorAll("[data-route]").forEach(function(a) {
document.querySelectorAll("a[data-route]").forEach(a => {
const key = a.getAttribute("data-route");
if (map[key]) a.setAttribute("href", map[key]);
});
+7 -40
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Self-Paced Learning Track — hyperstitionstud.io (Base-36 AQ, Ingglish &amp; Technocapital Zoology)</title>
<link rel="stylesheet" href="../assets/hs-group3-basalt-chamfer.css?v=2.2.0" />
<link rel="stylesheet" href="../assets/hs-group3-basalt-chamfer.css?v=2.8.1" />
<style>
:root {
--bg-canvas: #020617;
@@ -46,40 +46,6 @@
h1 { font-size: 1.25rem; font-weight: 700; }
.subtitle { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.25rem; }
.top-nav { margin-left: auto; display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.nav-donate-sep { width: 1px; height: 20px; background: var(--border); margin: 0 0.2rem; display: inline-block; flex-shrink: 0; }
.btn-donate-pill {
height: 34px;
border-radius: 999px;
padding: 0.28rem 0.9rem 0.28rem 0.35rem;
background: linear-gradient(180deg, #ffd86b 0%, #f59e0b 52%, #d97706 100%);
color: #020617;
border: 1px solid #f5c630;
box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.55), 0 2px 8px rgba(245, 158, 11, 0.22);
display: inline-flex;
align-items: center;
gap: 0.45rem;
font-size: 0.74rem;
font-weight: 700;
letter-spacing: 0.05em;
text-decoration: none;
flex-shrink: 0;
transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.btn-donate-pill:hover { filter: brightness(1.06); transform: translateY(-1px); color: #020617; }
.donate-pill-emblem {
width: 20px;
height: 20px;
border-radius: 50%;
background: #0f172a;
color: var(--rose);
border: 1px solid rgba(245, 198, 48, 0.7);
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 0.68rem;
line-height: 1;
flex-shrink: 0;
}
.btn {
text-decoration: none;
background: var(--bg-card);
@@ -246,7 +212,7 @@
<header>
<div>
<h1>SELF-PACED INTERACTIVE LEARNING TRACK // HYPERSTITIONSTUD.IO</h1>
<p class="subtitle">From Base-36 Alphanumeric Qabbala &amp; CMUdict Ingglish to Technocapital Singularity Zoology &bull; 100% Anonymous Local State Save &amp; Load</p>
<p class="subtitle">From Base-36 Alphanumeric Qabbala &amp; CMUdict Ingglish to Technocapital Singularity Zoology &bull; 100% Anonymous Local State Save &amp; Load <span class="hs-sigil-seal" aria-hidden="true">[ &#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; ]</span></p>
</div>
<nav class="top-nav">
<a class="btn" data-learn-route="nav-home" href="../index.html">&larr; Portal Home</a>
@@ -256,7 +222,7 @@
<a class="btn" data-learn-route="nav-graph" href="/graph/index.html">Knowledge Graph</a>
<a class="btn" data-learn-route="nav-calc" href="/calc/index.html">AQ Calculator</a>
<span class="nav-donate-sep" aria-hidden="true"></span>
<a class="btn-donate-pill" data-learn-route="nav-donate" href="/donate/index.html" title="Signal Patronage &amp; Open-Instrument Notes (/donate/)"><span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>
<a class="btn-donate-pill" data-learn-route="nav-donate" href="/donate/index.html?from=learn" title="Signal Patronage &amp; Open-Instrument Notes (/donate/)"><span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>
</nav>
</header>
@@ -453,11 +419,12 @@
</main>
<footer>
<div>hyperstitionstud.io/learn &bull; Powered by hyperstitionstudio-core (urn:io:hyperstitionstud:schema:v1:learn-progress-state v2.2.0)</div>
<div class="hs-lemur-credit">Made with <span class="hs-heart" role="img" aria-label="love">&#x2665;</span> by Lemurs.</div>
<div>hyperstitionstud.io/learn &bull; Powered by hyperstitionstudio-core (urn:io:hyperstitionstud:schema:v1:learn-progress-state v2.8.1)</div>
<div class="hs-lemur-credit"><span class="hs-sigil-colophon" aria-hidden="true">&#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; &middot; &#x2644;</span> &bull; Made with <span class="hs-heart" role="img" aria-label="love">&#x2665;</span> by Lemurs.</div>
</footer>
</div>
<script src="learn-app.js?v=2.2.0"></script>
<script src="../assets/hs-matrix-coderain.js?v=2.8.1" defer></script>
<script src="learn-app.js?v=2.8.1"></script>
</body>
</html>
+1 -1
View File
@@ -265,7 +265,7 @@
const base = {
$schema: "../schemas/v1/learn-progress-state.schema.json",
$id: SCHEMA_ID,
version: "2.2.0",
version: "2.8.1",
updated_at_utc: new Date().toISOString(),
preferred_register: "fund_manager",
completed_modules: [],
+33 -22
View File
@@ -3,8 +3,8 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Unit M1: Base-36 Alphanumeric Valuation, Repdigit 37×3k Attractors & Prime Index π(n) — hyperstitionstud.io/math (v2.2.0)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.2.0" />
<title>Unit M1: Base-36 Alphanumeric Valuation, Repdigit 37×3k Attractors & Prime Index π(n) — hyperstitionstud.io/math (v2.8.1)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.8.1" />
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DejaVu Sans Mono', ui-monospace, monospace; padding: 1.25rem; line-height: 1.5; }
@@ -22,7 +22,7 @@
<header>
<div>
<h1>Unit M1: Base-36 Alphanumeric Valuation, Repdigit 37×3k Attractors & Prime Index π(n)</h1>
<p class="subtitle">Cartridge M1 &bull; Non-Sequentially Revertible via <code>hs-math-docs --disable base36-algebra-and-primes</code> &bull; v2.2.0</p>
<p class="subtitle">Cartridge M1 &bull; Non-Sequentially Revertible via <code>hs-math-docs --disable base36-algebra-and-primes</code> &bull; v2.8.1 <span class="hs-sigil-seal" aria-hidden="true">[ &#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; ]</span></p>
</div>
<nav class="top-nav">
<a class="btn" href="../../index.html">Portal Home (/)</a>
@@ -33,14 +33,14 @@
<a class="btn" href="../timeseries-moments-and-confluence-dose/index.html" style="">M4: Time-Series & Dose Math</a>
<a class="btn" href="../macro-spreads-and-bayesian-inference/index.html" style="">M5: Macro & Bayesian Math</a>
<a class="btn" href="../../engineering/index.html">Engineering Hub (/engineering/)</a>
<button id="guileSchemeModeToggle" class="btn hs-guile-toggle" type="button" aria-pressed="false" title="Toggle additive Guile Scheme &amp; Z-Combinator teaching cartridges and in-browser REPL (Alt+S)"><span class="hs-guile-lambda-badge">&lambda;</span><span>GUILE SCHEME LENS: <strong id="guileSchemeModeState">OFF</strong></span></button>
<div id="hsPolyglotModeSelector" class="hs-polyglot-segmented" role="radiogroup" aria-label="Pedagogical Programming Language Lens"><span class="hs-polyglot-prefix">LENS:</span><button type="button" id="guileSchemeModeToggle" class="hs-polyglot-seg" role="radio" data-lens-mode="off" aria-checked="true" title="Hide programming language cartridges (Alt+0)">OFF</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="guile" aria-checked="false" title="GNU Guile Scheme — Z-Combinator &amp; Exact Rationals (Alt+1)"><span class="hs-guile-lambda-badge">&lambda;</span>GUILE</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="ts" aria-checked="false" title="TypeScript — Static Union Types &amp; Functional Pipelines (Alt+2)"><span class="hs-guile-lambda-badge">TS</span>TYPESCRIPT</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="rust" aria-checked="false" title="Rust — Ownership, Option&lt;T&gt; &amp; Zero-Cost Iterators (Alt+3)"><span class="hs-guile-lambda-badge">Rs</span>RUST</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="all" aria-checked="false" title="Side-by-side comparison of Guile Scheme, TypeScript, and Rust (Alt+4)">&equiv; ALL 3</button><strong id="guileSchemeModeState" style="display:none;">OFF</strong></div>
<span class="nav-donate-sep" aria-hidden="true"></span>
<a class="btn-donate-pill" href="../../donate/index.html"><span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>
<a class="btn-donate-pill" href="../../donate/index.html?from=math"><span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>
</nav>
</header>
<section class="panel hs-plate-g3 plate-lock-emerald hs-prereq-ladder" style="margin-bottom:0.9rem;padding:1rem 1.2rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--emerald);text-transform:uppercase;letter-spacing:0.06em;">Prerequisite Track for Novices &bull; Required Expertise: Level 2: Elementary Number Theory & Base Systems (8-12 hrs study)</div><p style="font-size:0.76rem;color:var(--text-secondary);margin:0.35rem 0;">If any mathematical notation on this page is unfamiliar, occupy your study time with these free foundational resources first:</p><div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:0.8rem;margin-top:0.4rem;"><div><strong style="font-size:0.73rem;color:var(--gold);">Core Mathematical Prerequisites:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li>Positional numeral systems and non-decimal radices (Base-10 vs. Base-36)</li><li>Fundamental Theorem of Arithmetic (111 = 3 × 37) and prime-counting function π(n)</li><li>Additive string homomorphisms AQ(u · v) = AQ(u) + AQ(v) over character monoids</li></ul></div><div><strong style="font-size:0.73rem;color:var(--cyan);">Curated Free Public Study Resources:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li><a href="../../learn/index.html" style="color:var(--cyan);">Internal: /learn/ Module 1 (Base-36 Valuation Table) &#x2197;</a></li><li><a href="https://www.khanacademy.org/computing/computer-science/cryptography" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">Khan Academy — Cryptography & Modular Arithmetic &#x2197;</a></li><li><a href="https://ocw.mit.edu/courses/6-042j-mathematics-for-computer-science-fall-2010/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">MIT 6.042J Mathematics for Computer Science (Ch. 8 Number Theory) &#x2197;</a></li><li><a href="https://www.3blue1brown.com/topics/number-theory" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">3Blue1Brown — Prime Numbers & Number Theory Visualized &#x2197;</a></li></ul></div></div></section>
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">&lambda; Guile Scheme Foil (M1): Base-36 Semiring Valuation, Mod-9 Root & Prime Factorization via Z</div><button type="button" class="btn hs-load-in-repl-btn" data-scheme-expr="(prime-factors 666)" style="border-color:var(--cyan);color:var(--cyan);">Send to In-Browser Guile REPL &rarr;</button></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Mathematical Identity:</strong><code>666 = 2 × 3² × 37, 777 = 3 × 7 × 37, dr_9(n) = 1 + ((n - 1) mod 9)</code></div><div class="hs-guile-box"><strong style="color:var(--text-secondary);display:block;margin-bottom:0.2rem;">2. Production Python:</strong><pre style="white-space:pre-wrap;">compute_aq('envideea') == 137 # 33rd prime</pre></div><div class="hs-guile-box"><strong style="color:var(--cyan);display:block;margin-bottom:0.2rem;">3. Guile Scheme (Z-Combinator):</strong><code class="hs-guile-code-expr">(prime-factors 666)</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Toggle Guile Lens ON to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge:</strong> Click 'Send to REPL' and factor 777 or 333, or evaluate (digital-root-mod9 666) => 9.</div></section>
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">&lambda; Polyglot Foil (M1): Base-36 Semiring Valuation, Mod-9 Root &amp; Prime Factorization</div><div style="display:flex;gap:0.25rem;flex-wrap:wrap;align-items:center;"><button type="button" class="hs-polyglot-seg" data-lens-mode="guile">&lambda; Guile</button><button type="button" class="hs-polyglot-seg" data-lens-mode="ts">TS TypeScript</button><button type="button" class="hs-polyglot-seg" data-lens-mode="rust">Rs Rust</button><button type="button" class="hs-polyglot-seg" data-lens-mode="all">&equiv; All 3</button><button type="button" class="hs-polyglot-seg" data-lens-mode="off">Hide</button></div></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Mathematical Identity &amp; Python:</strong><code>666 = 2 × 3² × 37, 777 = 3 × 7 × 37, dr_9(n) = 1 + ((n - 1) mod 9)</code><pre style="white-space:pre-wrap;margin-top:0.25rem;color:var(--text-secondary);">compute_aq(&#x27;envideea&#x27;) == 137 # 33rd prime</pre></div><div class="hs-guile-box hs-lang-box-guile"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--cyan);">&lambda; Guile Scheme (Z-Combinator):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="guile" data-scheme-expr="(prime-factors 666)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-guile-code-expr">(prime-factors 666)</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-ts"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--gold);">TS TypeScript (Strict AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="ts" data-scheme-expr="primeFactors(666)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-ts-code-expr">primeFactors(666)</code><div class="hs-ts-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-rust"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--emerald);">Rs Rust (Option/Iterator AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="rust" data-scheme-expr="prime_factors(666_u64)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-rust-code-expr">prime_factors(666_u64)</code><div class="hs-rust-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge (4-Ring Zero-Escape Sandbox):</strong> Factor 666 or 777 across Guile Scheme, TypeScript, and Rust in the 4-Ring Hardened REPL.</div></section>
<article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">1. The Base-36 Alphanumeric Homomorphism v: {0..9, A..Z} → {0..35}</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">For any character c, v(c) = ord(c) - 48 for digits '0'..'9' (0..9), v(c) = ord(lower(c)) - 87 for ASCII letters 'A'..'Z' (10..35), and v(c) = 0 otherwise. Extended over a string w = c_1...c_k, AQ(w) = ∑_{i=1}^k v(c_i). Under concatenation, AQ(w_1 · w_2) = AQ(w_1) + AQ(w_2).</p></article><article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">2. Repdigit 37 × 3k Attractors & Prime Index π(n)</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">Three-digit repdigits R_k = 111 · k = 3 · 37 · k ∈ {111, 222, 333, 444, 555, 666, 777, 888, 999} factor through the prime 37 (12th prime) and 3. For prime coordinates p ∈ P, prime_rank(p) = π(p) = |{q ∈ P : q ≤ p}| (e.g., π(137) = 33 for 'envideea' = 137; π(193) = 44 for 'anthropik' = 'flash krash' = 193).</p></article>
<div style="display:flex;justify-content:space-between;align-items:center;margin-top:0.8rem;">
@@ -49,15 +49,21 @@
</div>
<footer>
hyperstitionstud.io/math/base36-algebra-and-primes v2.2.0 &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
hyperstitionstud.io/math/base36-algebra-and-primes v2.8.1 &bull; <span class="hs-sigil-colophon" aria-hidden="true">&#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; &middot; &#x2644;</span> &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
</footer>
</div>
<script src="../math-manifest-data.js?v=2.2.0"></script>
<script src="../math-app.js?v=2.2.0"></script>
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Guile Scheme and Z-Combinator REPL">
<script src="../../assets/hs-matrix-coderain.js?v=2.8.1" defer></script>
<script src="../math-manifest-data.js?v=2.8.1"></script>
<script src="../math-app.js?v=2.8.1"></script>
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Polyglot Guile Scheme, TypeScript, and Rust Hardened REPL">
<div style="display:flex;justify-content:space-between;align-items:center;gap:0.5rem;margin-bottom:0.45rem;">
<div style="font-size:0.74rem;font-weight:700;color:var(--cyan);">&lambda; IN-BROWSER GUILE SCHEME &amp; Z-COMBINATOR REPL (OFFLINE • ZERO CDN)</div>
<div style="font-size:0.73rem;font-weight:700;color:var(--cyan);">&lambda; 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
<div style="display:flex;gap:0.4rem;align-items:center;">
<select id="hsPolyglotReplLang" style="background:var(--bg-void);color:var(--cyan);border:1px solid var(--cyan);padding:0.15rem 0.35rem;font-family:inherit;font-size:0.68rem;font-weight:700;">
<option value="guile">λ Guile Scheme</option>
<option value="ts">TS TypeScript</option>
<option value="rust">Rs Rust</option>
</select>
<label style="font-size:0.68rem;color:var(--text-secondary);cursor:pointer;"><input type="checkbox" id="hsGuilePreferFloat" /> Float view</label>
<button type="button" id="hsGuileReplCloseBtn" class="btn" style="padding:0.15rem 0.45rem;font-size:0.68rem;">Minimize / Expand</button>
</div>
@@ -65,22 +71,27 @@
<div class="hs-repl-body">
<div style="display:flex;gap:0.4rem;margin-bottom:0.4rem;flex-wrap:wrap;">
<select id="hsGuileReplPreset" style="flex:1;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.28rem;font-family:inherit;font-size:0.7rem;">
<option value="">-- Load Preset Z-Combinator / Domain Expression --</option>
<option value='(aq-base36 "LEMUR")'>Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
<option value="(prime-factors 666)">Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
<option value="(variance-pop *cluster-292-gen0*)">Exact Rational Variance (Cluster 292 Gen 0): (variance-pop *cluster-292-gen0*)</option>
<option value="(eti-score 95 92 94 90 91 96)">Exact Rational Convex ETI Score: (eti-score 95 92 94 90 91 96)</option>
<option value="((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">Thomas' Calculus Derivative d/dx(x^3) at x=2 via Z</option>
<option value="(adaptive-simpson (lambda (x) (* x x)) 0.0 3.0 1e-6)">Adaptive Simpson Integral int_0^3 x^2 dx = 9.0 via Z</option>
<option value="(bayes-update '(1/3 1/3 1/3) '(1/10 3/10 6/10))">Exact Rational 3-State Bayes Update via Z</option>
<option value="">-- Load Preset Polyglot Expression (Guile / TS / Rust) --</option>
<option value='guile::(aq-base36 "LEMUR")'>[λ Guile] Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
<option value='ts::aqBase36("LEMUR")'>[TS] Base-36 AQ: aqBase36("LEMUR") => 114</option>
<option value='rust::aq_base36("LEMUR")'>[Rs Rust] Base-36 AQ: aq_base36("LEMUR") => 114</option>
<option value="guile::(prime-factors 666)">[λ Guile] Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
<option value="ts::primeFactors(666)">[TS] Prime Factors: primeFactors(666) => [2,3,3,37]</option>
<option value="rust::prime_factors(666_u64)">[Rs Rust] Prime Factors: prime_factors(666_u64) => vec![2, 3, 3, 37]</option>
<option value="guile::(variance-pop *cluster-292-gen0*)">[λ Guile] Exact Rational Variance (Cluster 292): 4634/9</option>
<option value="ts::variancePop([264, 317, 276] as const)">[TS] Cluster 292 Variance: 514.8889</option>
<option value="rust::variance_pop(&[264.0, 317.0, 276.0])">[Rs Rust] Cluster 292 Variance: 514.8889</option>
<option value="guile::((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">[λ Guile] Thomas' Calculus d/dx(x^3) at x=2 => 12.0</option>
<option value="ts::derivative((x: number): number => x ** 3, 1e-5)(2.0)">[TS] Derivative d/dx(x^3) at x=2 => 12</option>
<option value="rust::derivative(|x: f64| x * x * x, 1e-5, 2.0)">[Rs Rust] Derivative d/dx(x^3) at x=2 => 12</option>
</select>
<button type="button" id="hsGuileReplEvalBtn" class="btn" style="border-color:var(--emerald);color:var(--emerald);">Evaluate (&lambda;)</button>
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step &beta;-Reduction</button>
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step AST Trace</button>
</div>
<textarea id="hsGuileReplInput" rows="2" style="width:100%;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.45rem;font-family:inherit;font-size:0.73rem;">(aq-base36 "LEMUR")</textarea>
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">guile&gt; Ready. Toggle [λ GUILE SCHEME LENS: ON] or click Evaluate (λ).</pre>
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">polyglot&gt; Ready (4-Ring Zero-Eval AST Sandbox). Select [λ GUILE | TS | RS | ≡ ALL 3] or click Evaluate (λ).</pre>
</div>
</aside>
<script src="../../assets/hs-guile-scheme-repl.js?v=2.2.0"></script>
<script src="../../assets/hs-guile-scheme-repl.js?v=2.8.1"></script>
</body>
</html>
@@ -3,8 +3,8 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Unit M3: Multi-Relational Property Graph Topology G=(V,E,R), Convex ETI Functional & LENS_REGISTRY — hyperstitionstud.io/math (v2.2.0)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.2.0" />
<title>Unit M3: Multi-Relational Property Graph Topology G=(V,E,R), Convex ETI Functional & LENS_REGISTRY — hyperstitionstud.io/math (v2.8.1)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.8.1" />
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DejaVu Sans Mono', ui-monospace, monospace; padding: 1.25rem; line-height: 1.5; }
@@ -22,7 +22,7 @@
<header>
<div>
<h1>Unit M3: Multi-Relational Property Graph Topology G=(V,E,R), Convex ETI Functional & LENS_REGISTRY</h1>
<p class="subtitle">Cartridge M3 &bull; Non-Sequentially Revertible via <code>hs-math-docs --disable graph-topology-and-eti-scoring</code> &bull; v2.2.0</p>
<p class="subtitle">Cartridge M3 &bull; Non-Sequentially Revertible via <code>hs-math-docs --disable graph-topology-and-eti-scoring</code> &bull; v2.8.1 <span class="hs-sigil-seal" aria-hidden="true">[ &#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; ]</span></p>
</div>
<nav class="top-nav">
<a class="btn" href="../../index.html">Portal Home (/)</a>
@@ -33,14 +33,14 @@
<a class="btn" href="../timeseries-moments-and-confluence-dose/index.html" style="">M4: Time-Series & Dose Math</a>
<a class="btn" href="../macro-spreads-and-bayesian-inference/index.html" style="">M5: Macro & Bayesian Math</a>
<a class="btn" href="../../engineering/index.html">Engineering Hub (/engineering/)</a>
<button id="guileSchemeModeToggle" class="btn hs-guile-toggle" type="button" aria-pressed="false" title="Toggle additive Guile Scheme &amp; Z-Combinator teaching cartridges and in-browser REPL (Alt+S)"><span class="hs-guile-lambda-badge">&lambda;</span><span>GUILE SCHEME LENS: <strong id="guileSchemeModeState">OFF</strong></span></button>
<div id="hsPolyglotModeSelector" class="hs-polyglot-segmented" role="radiogroup" aria-label="Pedagogical Programming Language Lens"><span class="hs-polyglot-prefix">LENS:</span><button type="button" id="guileSchemeModeToggle" class="hs-polyglot-seg" role="radio" data-lens-mode="off" aria-checked="true" title="Hide programming language cartridges (Alt+0)">OFF</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="guile" aria-checked="false" title="GNU Guile Scheme — Z-Combinator &amp; Exact Rationals (Alt+1)"><span class="hs-guile-lambda-badge">&lambda;</span>GUILE</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="ts" aria-checked="false" title="TypeScript — Static Union Types &amp; Functional Pipelines (Alt+2)"><span class="hs-guile-lambda-badge">TS</span>TYPESCRIPT</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="rust" aria-checked="false" title="Rust — Ownership, Option&lt;T&gt; &amp; Zero-Cost Iterators (Alt+3)"><span class="hs-guile-lambda-badge">Rs</span>RUST</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="all" aria-checked="false" title="Side-by-side comparison of Guile Scheme, TypeScript, and Rust (Alt+4)">&equiv; ALL 3</button><strong id="guileSchemeModeState" style="display:none;">OFF</strong></div>
<span class="nav-donate-sep" aria-hidden="true"></span>
<a class="btn-donate-pill" href="../../donate/index.html"><span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>
<a class="btn-donate-pill" href="../../donate/index.html?from=math"><span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>
</nav>
</header>
<section class="panel hs-plate-g3 plate-lock-emerald hs-prereq-ladder" style="margin-bottom:0.9rem;padding:1rem 1.2rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--emerald);text-transform:uppercase;letter-spacing:0.06em;">Prerequisite Track for Novices &bull; Required Expertise: Level 3: Graph Theory, Convex Linear Combinations & Affine Maps (12-18 hrs study)</div><p style="font-size:0.76rem;color:var(--text-secondary);margin:0.35rem 0;">If any mathematical notation on this page is unfamiliar, occupy your study time with these free foundational resources first:</p><div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:0.8rem;margin-top:0.4rem;"><div><strong style="font-size:0.73rem;color:var(--gold);">Core Mathematical Prerequisites:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li>Directed multigraphs G = (V, E), k-partite vertex partitions, and vertex degree deg(v)</li><li>Vectors in R^6, inner products w · s, and convex combinations (∑ w_k = 1, w_k ≥ 0)</li><li>Lexicographic total orderings and invertible affine rescaling maps</li></ul></div><div><strong style="font-size:0.73rem;color:var(--cyan);">Curated Free Public Study Resources:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li><a href="https://www.3blue1brown.com/topics/linear-algebra" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">3Blue1Brown — Essence of Linear Algebra (Vectors & Dot Products) &#x2197;</a></li><li><a href="https://ocw.mit.edu/courses/6-042j-mathematics-for-computer-science-fall-2010/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">MIT 6.042J Mathematics for Computer Science (Ch. 9-11 Graph Theory) &#x2197;</a></li><li><a href="https://diestel-graph-theory.com/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">Diestel — Graph Theory (Free Electronic Edition, Ch. 1 Basics) &#x2197;</a></li></ul></div></div></section>
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">&lambda; Guile Scheme Foil (M3): Exact Rational Convex ETI Functional (∑ w_k = 1)</div><button type="button" class="btn hs-load-in-repl-btn" data-scheme-expr="(+ 1/5 9/50 9/50 4/25 7/50 7/50)" style="border-color:var(--cyan);color:var(--cyan);">Send to In-Browser Guile REPL &rarr;</button></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Mathematical Identity:</strong><code>ETI = (1/5)CAP + (9/50)COL + (9/50)ARM + (4/25)PRM + (7/50)VEL + (7/50)RES</code></div><div class="hs-guile-box"><strong style="color:var(--text-secondary);display:block;margin-bottom:0.2rem;">2. Production Python:</strong><pre style="white-space:pre-wrap;">0.20*cap + 0.18*col + 0.18*arm + 0.16*prm + 0.14*vel + 0.14*res</pre></div><div class="hs-guile-box"><strong style="color:var(--cyan);display:block;margin-bottom:0.2rem;">3. Guile Scheme (Z-Combinator):</strong><code class="hs-guile-code-expr">(+ 1/5 9/50 9/50 4/25 7/50 7/50)</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Toggle Guile Lens ON to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge:</strong> Verify that the exact rational weights sum to 1 (not 0.9999999999999999) and evaluate (eti-score 95 92 94 90 91 96).</div></section>
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">&lambda; Polyglot Foil (M3): Convex ETI Functional (∑ w_k = 1, S1 Apex = 93.08)</div><div style="display:flex;gap:0.25rem;flex-wrap:wrap;align-items:center;"><button type="button" class="hs-polyglot-seg" data-lens-mode="guile">&lambda; Guile</button><button type="button" class="hs-polyglot-seg" data-lens-mode="ts">TS TypeScript</button><button type="button" class="hs-polyglot-seg" data-lens-mode="rust">Rs Rust</button><button type="button" class="hs-polyglot-seg" data-lens-mode="all">&equiv; All 3</button><button type="button" class="hs-polyglot-seg" data-lens-mode="off">Hide</button></div></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Mathematical Identity &amp; Python:</strong><code>ETI = (1/5)CAP + (9/50)COL + (9/50)ARM + (4/25)PRM + (7/50)VEL + (7/50)RES</code><pre style="white-space:pre-wrap;margin-top:0.25rem;color:var(--text-secondary);">0.20*cap + 0.18*col + 0.18*arm + 0.16*prm + 0.14*vel + 0.14*res</pre></div><div class="hs-guile-box hs-lang-box-guile"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--cyan);">&lambda; Guile Scheme (Z-Combinator):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="guile" data-scheme-expr="(+ 1/5 9/50 9/50 4/25 7/50 7/50)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-guile-code-expr">(+ 1/5 9/50 9/50 4/25 7/50 7/50)</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-ts"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--gold);">TS TypeScript (Strict AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="ts" data-scheme-expr="etiScore({cap: 95, col: 92, arm: 94, prm: 90, vel: 91, res: 96})" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-ts-code-expr">etiScore({cap: 95, col: 92, arm: 94, prm: 90, vel: 91, res: 96})</code><div class="hs-ts-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-rust"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--emerald);">Rs Rust (Option/Iterator AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="rust" data-scheme-expr="eti_score(95.0, 92.0, 94.0, 90.0, 91.0, 96.0)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-rust-code-expr">eti_score(95.0, 92.0, 94.0, 90.0, 91.0, 96.0)</code><div class="hs-rust-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge (4-Ring Zero-Escape Sandbox):</strong> Verify the convex weights and composite ETI score across Guile, TypeScript, and Rust.</div></section>
<article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">1. Six-Partite Property Graph G = (V, E, R) & Hub Degree Centrality</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">The vertex set |V| = 388 is partitioned into 6 disjoint classes (9 Divisions, 22 Volumes, 10 Builds, 92 Operators, 190 Bilingual Specimens, 65 AQCoordinateHubs) linked by |E| = 1,282 typed edges across 10 relations. Hub degree deg(aq:N) peaks at repdigit attractors aq:777 (deg=62), aq:666 (deg=62), and aq:333 (deg=52).</p></article><article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">2. Convex Ecological Trophic Index (ETI) Functional in [0, 100]</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">Each specimen i has a 6-dimensional structural vector s_i = (ARM_i, VEL_i, COL_i, CAP_i, PRM_i, RES_i) ∈ [0, 100]^6. The composite score is the convex inner product ETI_i = 0.20·CAP_i + 0.18·COL_i + 0.18·ARM_i + 0.16·PRM_i + 0.14·VEL_i + 0.14·RES_i where ∑_{k=1}^6 w_k = 1.00, guaranteeing ETI_i ∈ [0, 100]. LENS_REGISTRY applies bijective key/scale projections without mutating s_i.</p></article>
<div style="display:flex;justify-content:space-between;align-items:center;margin-top:0.8rem;">
@@ -49,15 +49,21 @@
</div>
<footer>
hyperstitionstud.io/math/graph-topology-and-eti-scoring v2.2.0 &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
hyperstitionstud.io/math/graph-topology-and-eti-scoring v2.8.1 &bull; <span class="hs-sigil-colophon" aria-hidden="true">&#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; &middot; &#x2644;</span> &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
</footer>
</div>
<script src="../math-manifest-data.js?v=2.2.0"></script>
<script src="../math-app.js?v=2.2.0"></script>
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Guile Scheme and Z-Combinator REPL">
<script src="../../assets/hs-matrix-coderain.js?v=2.8.1" defer></script>
<script src="../math-manifest-data.js?v=2.8.1"></script>
<script src="../math-app.js?v=2.8.1"></script>
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Polyglot Guile Scheme, TypeScript, and Rust Hardened REPL">
<div style="display:flex;justify-content:space-between;align-items:center;gap:0.5rem;margin-bottom:0.45rem;">
<div style="font-size:0.74rem;font-weight:700;color:var(--cyan);">&lambda; IN-BROWSER GUILE SCHEME &amp; Z-COMBINATOR REPL (OFFLINE • ZERO CDN)</div>
<div style="font-size:0.73rem;font-weight:700;color:var(--cyan);">&lambda; 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
<div style="display:flex;gap:0.4rem;align-items:center;">
<select id="hsPolyglotReplLang" style="background:var(--bg-void);color:var(--cyan);border:1px solid var(--cyan);padding:0.15rem 0.35rem;font-family:inherit;font-size:0.68rem;font-weight:700;">
<option value="guile">λ Guile Scheme</option>
<option value="ts">TS TypeScript</option>
<option value="rust">Rs Rust</option>
</select>
<label style="font-size:0.68rem;color:var(--text-secondary);cursor:pointer;"><input type="checkbox" id="hsGuilePreferFloat" /> Float view</label>
<button type="button" id="hsGuileReplCloseBtn" class="btn" style="padding:0.15rem 0.45rem;font-size:0.68rem;">Minimize / Expand</button>
</div>
@@ -65,22 +71,27 @@
<div class="hs-repl-body">
<div style="display:flex;gap:0.4rem;margin-bottom:0.4rem;flex-wrap:wrap;">
<select id="hsGuileReplPreset" style="flex:1;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.28rem;font-family:inherit;font-size:0.7rem;">
<option value="">-- Load Preset Z-Combinator / Domain Expression --</option>
<option value='(aq-base36 "LEMUR")'>Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
<option value="(prime-factors 666)">Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
<option value="(variance-pop *cluster-292-gen0*)">Exact Rational Variance (Cluster 292 Gen 0): (variance-pop *cluster-292-gen0*)</option>
<option value="(eti-score 95 92 94 90 91 96)">Exact Rational Convex ETI Score: (eti-score 95 92 94 90 91 96)</option>
<option value="((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">Thomas' Calculus Derivative d/dx(x^3) at x=2 via Z</option>
<option value="(adaptive-simpson (lambda (x) (* x x)) 0.0 3.0 1e-6)">Adaptive Simpson Integral int_0^3 x^2 dx = 9.0 via Z</option>
<option value="(bayes-update '(1/3 1/3 1/3) '(1/10 3/10 6/10))">Exact Rational 3-State Bayes Update via Z</option>
<option value="">-- Load Preset Polyglot Expression (Guile / TS / Rust) --</option>
<option value='guile::(aq-base36 "LEMUR")'>[λ Guile] Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
<option value='ts::aqBase36("LEMUR")'>[TS] Base-36 AQ: aqBase36("LEMUR") => 114</option>
<option value='rust::aq_base36("LEMUR")'>[Rs Rust] Base-36 AQ: aq_base36("LEMUR") => 114</option>
<option value="guile::(prime-factors 666)">[λ Guile] Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
<option value="ts::primeFactors(666)">[TS] Prime Factors: primeFactors(666) => [2,3,3,37]</option>
<option value="rust::prime_factors(666_u64)">[Rs Rust] Prime Factors: prime_factors(666_u64) => vec![2, 3, 3, 37]</option>
<option value="guile::(variance-pop *cluster-292-gen0*)">[λ Guile] Exact Rational Variance (Cluster 292): 4634/9</option>
<option value="ts::variancePop([264, 317, 276] as const)">[TS] Cluster 292 Variance: 514.8889</option>
<option value="rust::variance_pop(&[264.0, 317.0, 276.0])">[Rs Rust] Cluster 292 Variance: 514.8889</option>
<option value="guile::((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">[λ Guile] Thomas' Calculus d/dx(x^3) at x=2 => 12.0</option>
<option value="ts::derivative((x: number): number => x ** 3, 1e-5)(2.0)">[TS] Derivative d/dx(x^3) at x=2 => 12</option>
<option value="rust::derivative(|x: f64| x * x * x, 1e-5, 2.0)">[Rs Rust] Derivative d/dx(x^3) at x=2 => 12</option>
</select>
<button type="button" id="hsGuileReplEvalBtn" class="btn" style="border-color:var(--emerald);color:var(--emerald);">Evaluate (&lambda;)</button>
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step &beta;-Reduction</button>
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step AST Trace</button>
</div>
<textarea id="hsGuileReplInput" rows="2" style="width:100%;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.45rem;font-family:inherit;font-size:0.73rem;">(aq-base36 "LEMUR")</textarea>
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">guile&gt; Ready. Toggle [λ GUILE SCHEME LENS: ON] or click Evaluate (λ).</pre>
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">polyglot&gt; Ready (4-Ring Zero-Eval AST Sandbox). Select [λ GUILE | TS | RS | ≡ ALL 3] or click Evaluate (λ).</pre>
</div>
</aside>
<script src="../../assets/hs-guile-scheme-repl.js?v=2.2.0"></script>
<script src="../../assets/hs-guile-scheme-repl.js?v=2.8.1"></script>
</body>
</html>
+35 -24
View File
@@ -3,8 +3,8 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Mathematical Foundations &amp; Quantitative Semiotics Hub — hyperstitionstud.io/math (v2.2.0)</title>
<link rel="stylesheet" href="../assets/hs-group3-basalt-chamfer.css?v=2.2.0" />
<title>Mathematical Foundations &amp; Quantitative Semiotics Hub — hyperstitionstud.io/math (v2.8.1)</title>
<link rel="stylesheet" href="../assets/hs-group3-basalt-chamfer.css?v=2.8.1" />
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DejaVu Sans Mono', ui-monospace, monospace; padding: 1.25rem; line-height: 1.5; }
@@ -25,7 +25,7 @@
<header>
<div>
<h1>HYPERSTITION STUDIO // MATHEMATICAL FOUNDATIONS &amp; QUANTITATIVE SEMIOTICS HUB (UNIT M0)</h1>
<p class="subtitle">Zero-CDN Native Unicode Math &bull; Commutative Empirical Introspection &bull; Piecewise &amp; Non-Sequentially Revertible &bull; urn:io:hyperstitionstud:math:v2.2.0</p>
<p class="subtitle">Zero-CDN Native Unicode Math &bull; Commutative Empirical Introspection &bull; Piecewise &amp; Non-Sequentially Revertible &bull; urn:io:hyperstitionstud:math:v2.8.1 <span class="hs-sigil-seal" aria-hidden="true">[ &#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; ]</span></p>
</div>
<nav class="top-nav">
<a class="btn" href="../index.html">Portal Home (/)</a>
@@ -36,15 +36,15 @@
<a class="btn" href="timeseries-moments-and-confluence-dose/index.html" style="">M4: Time-Series & Dose Math</a>
<a class="btn" href="macro-spreads-and-bayesian-inference/index.html" style="">M5: Macro & Bayesian Math</a>
<a class="btn" href="../engineering/index.html">Engineering Hub (/engineering/)</a>
<button id="guileSchemeModeToggle" class="btn hs-guile-toggle" type="button" aria-pressed="false" title="Toggle additive Guile Scheme &amp; Z-Combinator teaching cartridges and in-browser REPL (Alt+S)"><span class="hs-guile-lambda-badge">&lambda;</span><span>GUILE SCHEME LENS: <strong id="guileSchemeModeState">OFF</strong></span></button>
<div id="hsPolyglotModeSelector" class="hs-polyglot-segmented" role="radiogroup" aria-label="Pedagogical Programming Language Lens"><span class="hs-polyglot-prefix">LENS:</span><button type="button" id="guileSchemeModeToggle" class="hs-polyglot-seg" role="radio" data-lens-mode="off" aria-checked="true" title="Hide programming language cartridges (Alt+0)">OFF</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="guile" aria-checked="false" title="GNU Guile Scheme — Z-Combinator &amp; Exact Rationals (Alt+1)"><span class="hs-guile-lambda-badge">&lambda;</span>GUILE</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="ts" aria-checked="false" title="TypeScript — Static Union Types &amp; Functional Pipelines (Alt+2)"><span class="hs-guile-lambda-badge">TS</span>TYPESCRIPT</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="rust" aria-checked="false" title="Rust — Ownership, Option&lt;T&gt; &amp; Zero-Cost Iterators (Alt+3)"><span class="hs-guile-lambda-badge">Rs</span>RUST</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="all" aria-checked="false" title="Side-by-side comparison of Guile Scheme, TypeScript, and Rust (Alt+4)">&equiv; ALL 3</button><strong id="guileSchemeModeState" style="display:none;">OFF</strong></div>
<span class="nav-donate-sep" aria-hidden="true"></span>
<a class="btn-donate-pill" href="../donate/index.html"><span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>
<a class="btn-donate-pill" href="../donate/index.html?from=math"><span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>
</nav>
</header>
<section class="panel hs-plate-g3 plate-lock-emerald hs-prereq-ladder" style="margin-bottom:0.9rem;padding:1rem 1.2rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--emerald);text-transform:uppercase;letter-spacing:0.06em;">Prerequisite Track for Novices &bull; Required Expertise: Level 1-2 (High-School Algebra & Sigma Notation • 3-6 hrs study)</div><p style="font-size:0.76rem;color:var(--text-secondary);margin:0.35rem 0;">If any mathematical notation on this page is unfamiliar, occupy your study time with these free foundational resources first:</p><div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:0.8rem;margin-top:0.4rem;"><div><strong style="font-size:0.73rem;color:var(--gold);">Core Mathematical Prerequisites:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li>Variables, functions f(x), and subscript/index notation x_i</li><li>Summation operator ∑_{i=1}^n x_i and absolute value |x|</li><li>Self-Paced Learning Track (/learn/ Modules 1-2)</li></ul></div><div><strong style="font-size:0.73rem;color:var(--cyan);">Curated Free Public Study Resources:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li><a href="../learn/index.html" style="color:var(--cyan);">Internal: Self-Paced Learning Track (/learn/ Modules 1-2) &#x2197;</a></li><li><a href="https://www.khanacademy.org/math/algebra" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">Khan Academy — Algebra & Summation (Σ) Notation &#x2197;</a></li><li><a href="https://openstax.org/details/books/precalculus-2e" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">OpenStax Precalculus (Free Peer-Reviewed Textbook, Ch. 1 & 9) &#x2197;</a></li><li><a href="https://sarabander.github.io/sicp/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">Structure and Interpretation of Computer Programs (SICP — Free MIT Text) &#x2197;</a></li><li><a href="https://www.gnu.org/software/guile/manual/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">GNU Guile Scheme Official Reference Manual &#x2197;</a></li></ul></div></div></section>
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">&lambda; Guile Scheme Foil (M0): Applicative-Order Z Combinator & Thomas' Calculus Foundation</div><button type="button" class="btn hs-load-in-repl-btn" data-scheme-expr="((Z (lambda (recur) (lambda (n acc) (if (<= n 0) acc (recur (- n 1) (+ acc n)))))) 10 0)" style="border-color:var(--cyan);color:var(--cyan);">Send to In-Browser Guile REPL &rarr;</button></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Mathematical Identity:</strong><code>Z = λf. (λx. f (λv. (x x) v)) (λx. f (λv. (x x) v))</code></div><div class="hs-guile-box"><strong style="color:var(--text-secondary);display:block;margin-bottom:0.2rem;">2. Production Python:</strong><pre style="white-space:pre-wrap;"># Strict applicative-order fixed-point combinator (z-calculus-scheme)
Z = lambda f: (lambda x: f(lambda *a: x(x)(*a)))(lambda x: f(lambda *a: x(x)(*a)))</pre></div><div class="hs-guile-box"><strong style="color:var(--cyan);display:block;margin-bottom:0.2rem;">3. Guile Scheme (Z-Combinator):</strong><code class="hs-guile-code-expr">((Z (lambda (recur) (lambda (n acc) (if (<= n 0) acc (recur (- n 1) (+ acc n)))))) 10 0)</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Toggle Guile Lens ON to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge:</strong> Evaluate ∑_{i=1}^{10} i = 55 via pure anonymous Z-recursion in the REPL.</div></section>
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">&lambda; Polyglot Foil (M0): Applicative-Order Z Combinator, TypeScript Array.reduce &amp; Rust Range.fold</div><div style="display:flex;gap:0.25rem;flex-wrap:wrap;align-items:center;"><button type="button" class="hs-polyglot-seg" data-lens-mode="guile">&lambda; Guile</button><button type="button" class="hs-polyglot-seg" data-lens-mode="ts">TS TypeScript</button><button type="button" class="hs-polyglot-seg" data-lens-mode="rust">Rs Rust</button><button type="button" class="hs-polyglot-seg" data-lens-mode="all">&equiv; All 3</button><button type="button" class="hs-polyglot-seg" data-lens-mode="off">Hide</button></div></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Mathematical Identity &amp; Python:</strong><code>Z = λf. (λx. f (λv. (x x) v)) (λx. f (λv. (x x) v)), ∑_{i=1}^{10} i = 55</code><pre style="white-space:pre-wrap;margin-top:0.25rem;color:var(--text-secondary);"># Strict applicative-order fixed-point combinator (z-calculus-scheme)
Z = lambda f: (lambda x: f(lambda *a: x(x)(*a)))(lambda x: f(lambda *a: x(x)(*a)))</pre></div><div class="hs-guile-box hs-lang-box-guile"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--cyan);">&lambda; Guile Scheme (Z-Combinator):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="guile" data-scheme-expr="((Z (lambda (recur) (lambda (n acc) (if (&lt;= n 0) acc (recur (- n 1) (+ acc n)))))) 10 0)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-guile-code-expr">((Z (lambda (recur) (lambda (n acc) (if (&lt;= n 0) acc (recur (- n 1) (+ acc n)))))) 10 0)</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-ts"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--gold);">TS TypeScript (Strict AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="ts" data-scheme-expr="Array.from({length: 10}, (_, i): number =&gt; i + 1).reduce((a, b) =&gt; a + b, 0)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-ts-code-expr">Array.from({length: 10}, (_, i): number =&gt; i + 1).reduce((a, b) =&gt; a + b, 0)</code><div class="hs-ts-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-rust"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--emerald);">Rs Rust (Option/Iterator AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="rust" data-scheme-expr="(1..=10_i64).fold(0_i64, |acc, x| acc + x)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-rust-code-expr">(1..=10_i64).fold(0_i64, |acc, x| acc + x)</code><div class="hs-rust-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge (4-Ring Zero-Escape Sandbox):</strong> Compare how Scheme&#x27;s anonymous Z-combinator, TypeScript&#x27;s reduce, and Rust&#x27;s fold compute ∑_{i=1}^{10} i = 55.</div></section>
<section class="stats-row">
<div class="panel hs-plate-g3 stat-tile"><div style="font-size:0.68rem;color:var(--text-secondary);">ETI Convex Sum (&sum;w_k)</div><div style="font-size:1.3rem;font-weight:700;color:var(--gold);">1.00</div></div>
@@ -55,19 +55,25 @@ Z = lambda f: (lambda x: f(lambda *a: x(x)(*a)))(lambda x: f(lambda *a: x(x)(*a)
</section>
<section class="grid-cards">
<article class="panel hs-plate-g3 plate-lock-gold" style="padding:1rem 1.15rem;display:flex;flex-direction:column;justify-content:space-between;gap:0.6rem;"><div><div style="font-size:0.7rem;color:var(--gold);font-weight:700;">M1 // Level 2: Elementary Number Theory & Base Systems (8-12 hrs study)</div><h2 style="font-size:0.95rem;margin:0.25rem 0;color:var(--text-main);">Unit M1: Base-36 Alphanumeric Valuation, Repdigit 37×3k Attractors & Prime Index π(n)</h2><p style="font-size:0.74rem;color:var(--text-secondary);line-height:1.5;">For any character c, v(c) = ord(c) - 48 for digits '0'..'9' (0..9), v(c) = ord(lower(c)) - 87 for ASCII letters 'A'..'Z' (10..35), and v(c) = 0 otherwise. Extended over a string w = c_1...c_k, AQ(w) = ∑_{i=1}^k v(c_i). Under concatenation, AQ(w_1 · w_2) = AQ(w_1) + AQ(w_2).</p></div><div><a class="btn" href="base36-algebra-and-primes/index.html">Open M1: Base-36 & Primes Subpage &#x2192;</a></div></article><article class="panel hs-plate-g3 plate-lock-emerald" style="padding:1rem 1.15rem;display:flex;flex-direction:column;justify-content:space-between;gap:0.6rem;"><div><div style="font-size:0.7rem;color:var(--gold);font-weight:700;">M2 // Level 2-3: Set Mappings, Equivalence Fibers & Descriptive Statistics (8-12 hrs study)</div><h2 style="font-size:0.95rem;margin:0.25rem 0;color:var(--text-main);">Unit M2: Phonemic Projection Φ: Σ_eng* → Σ_ing* & Genealogical Vectors G1–G6</h2><p style="font-size:0.74rem;color:var(--text-secondary);line-height:1.5;">Given a lexical cluster S = {w_1, ..., w_N}, define Gen 0 variance σ²_0(S) = σ²({AQ(w) : w ∈ S}) and Gen 1 phonemic variance σ²_1(S) = σ²({AQ(Φ(w)) : w ∈ S}). Vector G1 measures Δσ²_G1(S) = σ²_0(S) - σ²_1(S). For S_292 = {'schizoanalysis' (264), 'abstract machine' (317), 'synthetic data' (276)}, Φ maps all three to 292 ('shizohnalizis'=292, 'abstrakt masheen'=292, 'sinthetik dayta'=292), collapsing σ²_0 = 514.89 to σ²_1 = 0.00 (Δσ²_G1 = +514.89).</p></div><div><a class="btn" href="phonemic-projections-and-g-vectors/index.html">Open M2: Phonemic Φ & G1-G6 Subpage &#x2192;</a></div></article><article class="panel hs-plate-g3 plate-lock-gold" style="padding:1rem 1.15rem;display:flex;flex-direction:column;justify-content:space-between;gap:0.6rem;"><div><div style="font-size:0.7rem;color:var(--gold);font-weight:700;">M3 // Level 3: Graph Theory, Convex Linear Combinations & Affine Maps (12-18 hrs study)</div><h2 style="font-size:0.95rem;margin:0.25rem 0;color:var(--text-main);">Unit M3: Multi-Relational Property Graph Topology G=(V,E,R), Convex ETI Functional & LENS_REGISTRY</h2><p style="font-size:0.74rem;color:var(--text-secondary);line-height:1.5;">The vertex set |V| = 388 is partitioned into 6 disjoint classes (9 Divisions, 22 Volumes, 10 Builds, 92 Operators, 190 Bilingual Specimens, 65 AQCoordinateHubs) linked by |E| = 1,282 typed edges across 10 relations. Hub degree deg(aq:N) peaks at repdigit attractors aq:777 (deg=62), aq:666 (deg=62), and aq:333 (deg=52).</p></div><div><a class="btn" href="graph-topology-and-eti-scoring/index.html">Open M3: Graph & ETI Math Subpage &#x2192;</a></div></article><article class="panel hs-plate-g3 plate-lock-emerald" style="padding:1rem 1.15rem;display:flex;flex-direction:column;justify-content:space-between;gap:0.6rem;"><div><div style="font-size:0.7rem;color:var(--gold);font-weight:700;">M4 // Level 3-4: Nonparametric Order Statistics & Time-Series Correlation (15-20 hrs study)</div><h2 style="font-size:0.95rem;margin:0.25rem 0;color:var(--text-main);">Unit M4: Longitudinal Moments (ts_*), Lead-Lag r(τ), Order Statistics (P50, P90) & Confluence Dose D ∈ {0..4}</h2><p style="font-size:0.74rem;color:var(--text-secondary);line-height:1.5;">For ticker i on trading session t, D_{i,t} = I(Scope1_{i,t}) + I(Scope2Ring_{i,t}) + I(SharedDossier_{i,t}) + I(WireEntity_{i,t}). Whenever a session is closed or private (data_available = False), D_{i,t} = null rather than 0, preventing missing-data bias.</p></div><div><a class="btn" href="timeseries-moments-and-confluence-dose/index.html">Open M4: Time-Series & Dose Math Subpage &#x2192;</a></div></article><article class="panel hs-plate-g3 plate-lock-rose" style="padding:1rem 1.15rem;display:flex;flex-direction:column;justify-content:space-between;gap:0.6rem;"><div><div style="font-size:0.7rem;color:var(--gold);font-weight:700;">M5 // Level 4: Bayesian Inference, Combinatorial Collision Bounds & Macroeconomics (15-25 hrs study)</div><h2 style="font-size:0.95rem;margin:0.25rem 0;color:var(--text-main);">Unit M5: Macroeconomic Spread/Velocity Identities, Discrete 3-State Bayes' Rule & Multiple-Testing Bounds</h2><p style="font-size:0.74rem;color:var(--text-secondary);line-height:1.5;">From real FRED observations: Non-M1 Time-Deposit Spread = M2SL - M1SL = $3,365.9B ($3.37T → 337 [68th Prime]); Liquidity Ratio = M1SL / M2SL = 85.70%; Monetary Velocity V_M2 = GDP / M2SL = 1.405x; Overnight Repo Spread = SOFR - EFFR Line truncated
<article class="panel hs-plate-g3 plate-lock-gold" style="padding:1rem 1.15rem;display:flex;flex-direction:column;justify-content:space-between;gap:0.6rem;"><div><div style="font-size:0.7rem;color:var(--gold);font-weight:700;"><span class="hs-sigil" aria-hidden="true">&#x263F;</span>M1 // Level 2: Elementary Number Theory & Base Systems (8-12 hrs study)</div><h2 style="font-size:0.95rem;margin:0.25rem 0;color:var(--text-main);">Unit M1: Base-36 Alphanumeric Valuation, Repdigit 37×3k Attractors & Prime Index π(n)</h2><p style="font-size:0.74rem;color:var(--text-secondary);line-height:1.5;">For any character c, v(c) = ord(c) - 48 for digits '0'..'9' (0..9), v(c) = ord(lower(c)) - 87 for ASCII letters 'A'..'Z' (10..35), and v(c) = 0 otherwise. Extended over a string w = c_1...c_k, AQ(w) = ∑_{i=1}^k v(c_i). Under concatenation, AQ(w_1 · w_2) = AQ(w_1) + AQ(w_2).</p></div><div><a class="btn" href="base36-algebra-and-primes/index.html">Open M1: Base-36 & Primes Subpage &#x2192;</a></div></article><article class="panel hs-plate-g3 plate-lock-emerald" style="padding:1rem 1.15rem;display:flex;flex-direction:column;justify-content:space-between;gap:0.6rem;"><div><div style="font-size:0.7rem;color:var(--gold);font-weight:700;"><span class="hs-sigil" aria-hidden="true">&#x2206; &#x25C8;</span>M2 // Level 2-3: Set Mappings, Equivalence Fibers & Descriptive Statistics (8-12 hrs study)</div><h2 style="font-size:0.95rem;margin:0.25rem 0;color:var(--text-main);">Unit M2: Phonemic Projection Φ: Σ_eng* → Σ_ing* & Genealogical Vectors G1–G6</h2><p style="font-size:0.74rem;color:var(--text-secondary);line-height:1.5;">Given a lexical cluster S = {w_1, ..., w_N}, define Gen 0 variance σ²_0(S) = σ²({AQ(w) : w ∈ S}) and Gen 1 phonemic variance σ²_1(S) = σ²({AQ(Φ(w)) : w ∈ S}). Vector G1 measures Δσ²_G1(S) = σ²_0(S) - σ²_1(S). For S_292 = {'schizoanalysis' (264), 'abstract machine' (317), 'synthetic data' (276)}, Φ maps all three to 292 ('shizohnalizis'=292, 'abstrakt masheen'=292, 'sinthetik dayta'=292), collapsing σ²_0 = 514.89 to σ²_1 = 0.00 (Δσ²_G1 = +514.89).</p></div><div><a class="btn" href="phonemic-projections-and-g-vectors/index.html">Open M2: Phonemic Φ & G1-G6 Subpage &#x2192;</a></div></article><article class="panel hs-plate-g3 plate-lock-gold" style="padding:1rem 1.15rem;display:flex;flex-direction:column;justify-content:space-between;gap:0.6rem;"><div><div style="font-size:0.7rem;color:var(--gold);font-weight:700;"><span class="hs-sigil" aria-hidden="true">&#x2609;</span>M3 // Level 3: Graph Theory, Convex Linear Combinations & Affine Maps (12-18 hrs study)</div><h2 style="font-size:0.95rem;margin:0.25rem 0;color:var(--text-main);">Unit M3: Multi-Relational Property Graph Topology G=(V,E,R), Convex ETI Functional & LENS_REGISTRY</h2><p style="font-size:0.74rem;color:var(--text-secondary);line-height:1.5;">The vertex set |V| = 388 is partitioned into 6 disjoint classes (9 Divisions, 22 Volumes, 10 Builds, 92 Operators, 190 Bilingual Specimens, 65 AQCoordinateHubs) linked by |E| = 1,282 typed edges across 10 relations. Hub degree deg(aq:N) peaks at repdigit attractors aq:777 (deg=62), aq:666 (deg=62), and aq:333 (deg=52).</p></div><div><a class="btn" href="graph-topology-and-eti-scoring/index.html">Open M3: Graph & ETI Math Subpage &#x2192;</a></div></article><article class="panel hs-plate-g3 plate-lock-emerald" style="padding:1rem 1.15rem;display:flex;flex-direction:column;justify-content:space-between;gap:0.6rem;"><div><div style="font-size:0.7rem;color:var(--gold);font-weight:700;"><span class="hs-sigil" aria-hidden="true">&#x2644; &#x260D;</span>M4 // Level 3-4: Nonparametric Order Statistics & Time-Series Correlation (15-20 hrs study)</div><h2 style="font-size:0.95rem;margin:0.25rem 0;color:var(--text-main);">Unit M4: Longitudinal Moments (ts_*), Lead-Lag r(τ), Order Statistics (P50, P90) & Confluence Dose D ∈ {0..4}</h2><p style="font-size:0.74rem;color:var(--text-secondary);line-height:1.5;">For ticker i on trading session t, D_{i,t} = I(Scope1_{i,t}) + I(Scope2Ring_{i,t}) + I(SharedDossier_{i,t}) + I(WireEntity_{i,t}). Whenever a session is closed or private (data_available = False), D_{i,t} = null rather than 0, preventing missing-data bias.</p></div><div><a class="btn" href="timeseries-moments-and-confluence-dose/index.html">Open M4: Time-Series & Dose Math Subpage &#x2192;</a></div></article><article class="panel hs-plate-g3 plate-lock-rose" style="padding:1rem 1.15rem;display:flex;flex-direction:column;justify-content:space-between;gap:0.6rem;"><div><div style="font-size:0.7rem;color:var(--gold);font-weight:700;"><span class="hs-sigil" aria-hidden="true">&#x2297; &lambda;</span>M5 // Level 4: Bayesian Inference, Combinatorial Collision Bounds & Macroeconomics (15-25 hrs study)</div><h2 style="font-size:0.95rem;margin:0.25rem 0;color:var(--text-main);">Unit M5: Macroeconomic Spread/Velocity Identities, Discrete 3-State Bayes' Rule & Multiple-Testing Bounds</Line truncated
</section>
<footer>
hyperstitionstud.io/math v2.2.0 &bull; CIDv1: <code>baguqeeraq4xvyibmtgnvj5f265wvyurn2k6...</code> &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
hyperstitionstud.io/math v2.8.1 &bull; CIDv1: <code>baguqeerasy7ucqdyaxcxi4y7fdfma5vmma4...</code> &bull; <span class="hs-sigil-colophon" aria-hidden="true">&#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; &middot; &#x2644;</span> &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
</footer>
</div>
<script src="math-manifest-data.js?v=2.2.0"></script>
<script src="math-app.js?v=2.2.0"></script>
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Guile Scheme and Z-Combinator REPL">
<script src="../assets/hs-matrix-coderain.js?v=2.8.1" defer></script>
<script src="math-manifest-data.js?v=2.8.1"></script>
<script src="math-app.js?v=2.8.1"></script>
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Polyglot Guile Scheme, TypeScript, and Rust Hardened REPL">
<div style="display:flex;justify-content:space-between;align-items:center;gap:0.5rem;margin-bottom:0.45rem;">
<div style="font-size:0.74rem;font-weight:700;color:var(--cyan);">&lambda; IN-BROWSER GUILE SCHEME &amp; Z-COMBINATOR REPL (OFFLINE • ZERO CDN)</div>
<div style="font-size:0.73rem;font-weight:700;color:var(--cyan);">&lambda; 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
<div style="display:flex;gap:0.4rem;align-items:center;">
<select id="hsPolyglotReplLang" style="background:var(--bg-void);color:var(--cyan);border:1px solid var(--cyan);padding:0.15rem 0.35rem;font-family:inherit;font-size:0.68rem;font-weight:700;">
<option value="guile">λ Guile Scheme</option>
<option value="ts">TS TypeScript</option>
<option value="rust">Rs Rust</option>
</select>
<label style="font-size:0.68rem;color:var(--text-secondary);cursor:pointer;"><input type="checkbox" id="hsGuilePreferFloat" /> Float view</label>
<button type="button" id="hsGuileReplCloseBtn" class="btn" style="padding:0.15rem 0.45rem;font-size:0.68rem;">Minimize / Expand</button>
</div>
@@ -75,22 +81,27 @@ Z = lambda f: (lambda x: f(lambda *a: x(x)(*a)))(lambda x: f(lambda *a: x(x)(*a)
<div class="hs-repl-body">
<div style="display:flex;gap:0.4rem;margin-bottom:0.4rem;flex-wrap:wrap;">
<select id="hsGuileReplPreset" style="flex:1;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.28rem;font-family:inherit;font-size:0.7rem;">
<option value="">-- Load Preset Z-Combinator / Domain Expression --</option>
<option value='(aq-base36 "LEMUR")'>Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
<option value="(prime-factors 666)">Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
<option value="(variance-pop *cluster-292-gen0*)">Exact Rational Variance (Cluster 292 Gen 0): (variance-pop *cluster-292-gen0*)</option>
<option value="(eti-score 95 92 94 90 91 96)">Exact Rational Convex ETI Score: (eti-score 95 92 94 90 91 96)</option>
<option value="((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">Thomas' Calculus Derivative d/dx(x^3) at x=2 via Z</option>
<option value="(adaptive-simpson (lambda (x) (* x x)) 0.0 3.0 1e-6)">Adaptive Simpson Integral int_0^3 x^2 dx = 9.0 via Z</option>
<option value="(bayes-update '(1/3 1/3 1/3) '(1/10 3/10 6/10))">Exact Rational 3-State Bayes Update via Z</option>
<option value="">-- Load Preset Polyglot Expression (Guile / TS / Rust) --</option>
<option value='guile::(aq-base36 "LEMUR")'>[λ Guile] Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
<option value='ts::aqBase36("LEMUR")'>[TS] Base-36 AQ: aqBase36("LEMUR") => 114</option>
<option value='rust::aq_base36("LEMUR")'>[Rs Rust] Base-36 AQ: aq_base36("LEMUR") => 114</option>
<option value="guile::(prime-factors 666)">[λ Guile] Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
<option value="ts::primeFactors(666)">[TS] Prime Factors: primeFactors(666) => [2,3,3,37]</option>
<option value="rust::prime_factors(666_u64)">[Rs Rust] Prime Factors: prime_factors(666_u64) => vec![2, 3, 3, 37]</option>
<option value="guile::(variance-pop *cluster-292-gen0*)">[λ Guile] Exact Rational Variance (Cluster 292): 4634/9</option>
<option value="ts::variancePop([264, 317, 276] as const)">[TS] Cluster 292 Variance: 514.8889</option>
<option value="rust::variance_pop(&[264.0, 317.0, 276.0])">[Rs Rust] Cluster 292 Variance: 514.8889</option>
<option value="guile::((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">[λ Guile] Thomas' Calculus d/dx(x^3) at x=2 => 12.0</option>
<option value="ts::derivative((x: number): number => x ** 3, 1e-5)(2.0)">[TS] Derivative d/dx(x^3) at x=2 => 12</option>
<option value="rust::derivative(|x: f64| x * x * x, 1e-5, 2.0)">[Rs Rust] Derivative d/dx(x^3) at x=2 => 12</option>
</select>
<button type="button" id="hsGuileReplEvalBtn" class="btn" style="border-color:var(--emerald);color:var(--emerald);">Evaluate (&lambda;)</button>
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step &beta;-Reduction</button>
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step AST Trace</button>
</div>
<textarea id="hsGuileReplInput" rows="2" style="width:100%;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.45rem;font-family:inherit;font-size:0.73rem;">(aq-base36 "LEMUR")</textarea>
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">guile&gt; Ready. Toggle [λ GUILE SCHEME LENS: ON] or click Evaluate (λ).</pre>
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">polyglot&gt; Ready (4-Ring Zero-Eval AST Sandbox). Select [λ GUILE | TS | RS | ≡ ALL 3] or click Evaluate (λ).</pre>
</div>
</aside>
<script src="../assets/hs-guile-scheme-repl.js?v=2.2.0"></script>
<script src="../assets/hs-guile-scheme-repl.js?v=2.8.1"></script>
</body>
</html>
@@ -3,8 +3,8 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Unit M5: Macroeconomic Spread/Velocity Identities, Discrete 3-State Bayes' Rule & Multiple-Testing Bounds — hyperstitionstud.io/math (v2.2.0)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.2.0" />
<title>Unit M5: Macroeconomic Spread/Velocity Identities, Discrete 3-State Bayes' Rule & Multiple-Testing Bounds — hyperstitionstud.io/math (v2.8.1)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.8.1" />
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DejaVu Sans Mono', ui-monospace, monospace; padding: 1.25rem; line-height: 1.5; }
@@ -22,7 +22,7 @@
<header>
<div>
<h1>Unit M5: Macroeconomic Spread/Velocity Identities, Discrete 3-State Bayes' Rule & Multiple-Testing Bounds</h1>
<p class="subtitle">Cartridge M5 &bull; Non-Sequentially Revertible via <code>hs-math-docs --disable macro-spreads-and-bayesian-inference</code> &bull; v2.2.0</p>
<p class="subtitle">Cartridge M5 &bull; Non-Sequentially Revertible via <code>hs-math-docs --disable macro-spreads-and-bayesian-inference</code> &bull; v2.8.1 <span class="hs-sigil-seal" aria-hidden="true">[ &#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; ]</span></p>
</div>
<nav class="top-nav">
<a class="btn" href="../../index.html">Portal Home (/)</a>
@@ -33,14 +33,14 @@
<a class="btn" href="../timeseries-moments-and-confluence-dose/index.html" style="">M4: Time-Series & Dose Math</a>
<a class="btn" href="index.html" style="border-color:var(--gold);color:var(--gold);">M5: Macro & Bayesian Math</a>
<a class="btn" href="../../engineering/index.html">Engineering Hub (/engineering/)</a>
<button id="guileSchemeModeToggle" class="btn hs-guile-toggle" type="button" aria-pressed="false" title="Toggle additive Guile Scheme &amp; Z-Combinator teaching cartridges and in-browser REPL (Alt+S)"><span class="hs-guile-lambda-badge">&lambda;</span><span>GUILE SCHEME LENS: <strong id="guileSchemeModeState">OFF</strong></span></button>
<div id="hsPolyglotModeSelector" class="hs-polyglot-segmented" role="radiogroup" aria-label="Pedagogical Programming Language Lens"><span class="hs-polyglot-prefix">LENS:</span><button type="button" id="guileSchemeModeToggle" class="hs-polyglot-seg" role="radio" data-lens-mode="off" aria-checked="true" title="Hide programming language cartridges (Alt+0)">OFF</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="guile" aria-checked="false" title="GNU Guile Scheme — Z-Combinator &amp; Exact Rationals (Alt+1)"><span class="hs-guile-lambda-badge">&lambda;</span>GUILE</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="ts" aria-checked="false" title="TypeScript — Static Union Types &amp; Functional Pipelines (Alt+2)"><span class="hs-guile-lambda-badge">TS</span>TYPESCRIPT</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="rust" aria-checked="false" title="Rust — Ownership, Option&lt;T&gt; &amp; Zero-Cost Iterators (Alt+3)"><span class="hs-guile-lambda-badge">Rs</span>RUST</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="all" aria-checked="false" title="Side-by-side comparison of Guile Scheme, TypeScript, and Rust (Alt+4)">&equiv; ALL 3</button><strong id="guileSchemeModeState" style="display:none;">OFF</strong></div>
<span class="nav-donate-sep" aria-hidden="true"></span>
<a class="btn-donate-pill" href="../../donate/index.html"><span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>
<a class="btn-donate-pill" href="../../donate/index.html?from=math"><span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>
</nav>
</header>
<section class="panel hs-plate-g3 plate-lock-emerald hs-prereq-ladder" style="margin-bottom:0.9rem;padding:1rem 1.2rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--emerald);text-transform:uppercase;letter-spacing:0.06em;">Prerequisite Track for Novices &bull; Required Expertise: Level 4: Bayesian Inference, Combinatorial Collision Bounds & Macroeconomics (15-25 hrs study)</div><p style="font-size:0.76rem;color:var(--text-secondary);margin:0.35rem 0;">If any mathematical notation on this page is unfamiliar, occupy your study time with these free foundational resources first:</p><div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:0.8rem;margin-top:0.4rem;"><div><strong style="font-size:0.73rem;color:var(--gold);">Core Mathematical Prerequisites:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li>Conditional probability P(A | B) and Bayes' Theorem on the 3-state simplex Δ²</li><li>Multiple-hypothesis testing, Birthday Problem collision rates, and degrees of freedom df = n - 2</li><li>Equation of Exchange MV = PQ (V_M2 = GDP / M2), term structure slopes, and real deflation</li></ul></div><div><strong style="font-size:0.73rem;color:var(--cyan);">Curated Free Public Study Resources:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li><a href="https://www.3blue1brown.com/lessons/bayes-theorem" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">3Blue1Brown — Bayes' Theorem, The Geometry of Changing Beliefs &#x2197;</a></li><li><a href="https://ocw.mit.edu/courses/18-05-introduction-to-probability-and-statistics-spring-2022/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">MIT 18.05 Introduction to Probability & Statistics (Bayesian Updating) &#x2197;</a></li><li><a href="https://openstax.org/details/books/principles-macroeconomics-3e" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">OpenStax Principles of Macroeconomics (Ch. 14-15 Money & Monetary Policy) &#x2197;</a></li></ul></div></div></section>
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">&lambda; Guile Scheme Foil (M5): Exact Rational 3-State Bayesian Posterior & Adaptive Simpson Quadrature via Z</div><button type="button" class="btn hs-load-in-repl-btn" data-scheme-expr="(bayes-update '(1/3 1/3 1/3) '(1/10 3/10 6/10))" style="border-color:var(--cyan);color:var(--cyan);">Send to In-Browser Guile REPL &rarr;</button></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Mathematical Identity:</strong><code>P(R_m | E_t) = L_m P_m / ∑_k L_k P_k, ∫_a^b f(x) dx via Simpson Z-subdivision</code></div><div class="hs-guile-box"><strong style="color:var(--text-secondary);display:block;margin-bottom:0.2rem;">2. Production Python:</strong><pre style="white-space:pre-wrap;">post = [p * l / z for p, l in zip(priors, likelihoods)]</pre></div><div class="hs-guile-box"><strong style="color:var(--cyan);display:block;margin-bottom:0.2rem;">3. Guile Scheme (Z-Combinator):</strong><code class="hs-guile-code-expr">(bayes-update '(1/3 1/3 1/3) '(1/10 3/10 6/10))</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Toggle Guile Lens ON to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge:</strong> Observe the exact rational posterior '(1/10 3/10 3/5) summing to 1, or integrate x^2 from 0 to 3 via (adaptive-simpson (lambda (x) (* x x)) 0.0 3.0 1e-6).</div></section>
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">&lambda; Polyglot Foil (M5): 3-State Discrete Bayesian Posterior &amp; Adaptive Simpson Quadrature</div><div style="display:flex;gap:0.25rem;flex-wrap:wrap;align-items:center;"><button type="button" class="hs-polyglot-seg" data-lens-mode="guile">&lambda; Guile</button><button type="button" class="hs-polyglot-seg" data-lens-mode="ts">TS TypeScript</button><button type="button" class="hs-polyglot-seg" data-lens-mode="rust">Rs Rust</button><button type="button" class="hs-polyglot-seg" data-lens-mode="all">&equiv; All 3</button><button type="button" class="hs-polyglot-seg" data-lens-mode="off">Hide</button></div></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Mathematical Identity &amp; Python:</strong><code>P(R_m | E_t) = L_m P_m / ∑_k L_k P_k, ∫_a^b f(x) dx via Simpson Z-subdivision</code><pre style="white-space:pre-wrap;margin-top:0.25rem;color:var(--text-secondary);">post = [p * l / z for p, l in zip(priors, likelihoods)]</pre></div><div class="hs-guile-box hs-lang-box-guile"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--cyan);">&lambda; Guile Scheme (Z-Combinator):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="guile" data-scheme-expr="(bayes-update &#x27;(1/3 1/3 1/3) &#x27;(1/10 3/10 6/10))" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-guile-code-expr">(bayes-update &#x27;(1/3 1/3 1/3) &#x27;(1/10 3/10 6/10))</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-ts"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--gold);">TS TypeScript (Strict AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="ts" data-scheme-expr="bayesUpdate([1/3, 1/3, 1/3], [0.1, 0.3, 0.6])" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-ts-code-expr">bayesUpdate([1/3, 1/3, 1/3], [0.1, 0.3, 0.6])</code><div class="hs-ts-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-rust"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--emerald);">Rs Rust (Option/Iterator AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="rust" data-scheme-expr="bayes_update(&amp;[1.0/3.0; 3], &amp;[0.1, 0.3, 0.6])" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-rust-code-expr">bayes_update(&amp;[1.0/3.0; 3], &amp;[0.1, 0.3, 0.6])</code><div class="hs-rust-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge (4-Ring Zero-Escape Sandbox):</strong> Compare Guile&#x27;s exact rational &#x27;(1/10 3/10 3/5) with TypeScript and Rust array posteriors.</div></section>
<article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">1. Macroeconomic Spread & Velocity Identities (FRED Native Cadences)</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">From real FRED observations: Non-M1 Time-Deposit Spread = M2SL - M1SL = $3,365.9B ($3.37T → 337 [68th Prime]); Liquidity Ratio = M1SL / M2SL = 85.70%; Monetary Velocity V_M2 = GDP / M2SL = 1.405x; Overnight Repo Spread = SOFR - EFFR = +10 bps (EFFR = 388 bps == 388 KG nodes); Term Slope = DGS10 - EFFR = +97 bps ('naintee sevan' = 237); Pipeline Margin = ΔPPI_MoM - ΔCPI_MoM = -54 bps.</p></article><article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">2. Discrete 3-State Bayesian Updating & 'The Room Filter' Collision Bound</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">Given extant priors P_{t-1}(R_m) over R = {R1 Bull, R2 Pinned Isometric, R3 Tail Drawdown} with ∑ P_{t-1}(R_m) = 1, the posterior is P_t(R_m | E_t) = L(E_t | R_m)·P_{t-1}(R_m) / ∑_{k=1}^3 L(E_t | R_k)·P_{t-1}(R_k). Testing 6 numerical encodings against 30 S1-S6 ring coordinates yields an uncoupled single-gate hit rate near Dose 1's observed 16.6% ('Grand Central Station' noise), whereas requiring joint intersection with that exact UTC date's 00:00 GMT dossier coordinates ('The Room Filter', Dose 2/3+) squares the filter selectivity.</p></article>
<div style="display:flex;justify-content:space-between;align-items:center;margin-top:0.8rem;">
@@ -49,15 +49,21 @@
</div>
<footer>
hyperstitionstud.io/math/macro-spreads-and-bayesian-inference v2.2.0 &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
hyperstitionstud.io/math/macro-spreads-and-bayesian-inference v2.8.1 &bull; <span class="hs-sigil-colophon" aria-hidden="true">&#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; &middot; &#x2644;</span> &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
</footer>
</div>
<script src="../math-manifest-data.js?v=2.2.0"></script>
<script src="../math-app.js?v=2.2.0"></script>
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Guile Scheme and Z-Combinator REPL">
<script src="../../assets/hs-matrix-coderain.js?v=2.8.1" defer></script>
<script src="../math-manifest-data.js?v=2.8.1"></script>
<script src="../math-app.js?v=2.8.1"></script>
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Polyglot Guile Scheme, TypeScript, and Rust Hardened REPL">
<div style="display:flex;justify-content:space-between;align-items:center;gap:0.5rem;margin-bottom:0.45rem;">
<div style="font-size:0.74rem;font-weight:700;color:var(--cyan);">&lambda; IN-BROWSER GUILE SCHEME &amp; Z-COMBINATOR REPL (OFFLINE • ZERO CDN)</div>
<div style="font-size:0.73rem;font-weight:700;color:var(--cyan);">&lambda; 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
<div style="display:flex;gap:0.4rem;align-items:center;">
<select id="hsPolyglotReplLang" style="background:var(--bg-void);color:var(--cyan);border:1px solid var(--cyan);padding:0.15rem 0.35rem;font-family:inherit;font-size:0.68rem;font-weight:700;">
<option value="guile">λ Guile Scheme</option>
<option value="ts">TS TypeScript</option>
<option value="rust">Rs Rust</option>
</select>
<label style="font-size:0.68rem;color:var(--text-secondary);cursor:pointer;"><input type="checkbox" id="hsGuilePreferFloat" /> Float view</label>
<button type="button" id="hsGuileReplCloseBtn" class="btn" style="padding:0.15rem 0.45rem;font-size:0.68rem;">Minimize / Expand</button>
</div>
@@ -65,22 +71,27 @@
<div class="hs-repl-body">
<div style="display:flex;gap:0.4rem;margin-bottom:0.4rem;flex-wrap:wrap;">
<select id="hsGuileReplPreset" style="flex:1;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.28rem;font-family:inherit;font-size:0.7rem;">
<option value="">-- Load Preset Z-Combinator / Domain Expression --</option>
<option value='(aq-base36 "LEMUR")'>Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
<option value="(prime-factors 666)">Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
<option value="(variance-pop *cluster-292-gen0*)">Exact Rational Variance (Cluster 292 Gen 0): (variance-pop *cluster-292-gen0*)</option>
<option value="(eti-score 95 92 94 90 91 96)">Exact Rational Convex ETI Score: (eti-score 95 92 94 90 91 96)</option>
<option value="((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">Thomas' Calculus Derivative d/dx(x^3) at x=2 via Z</option>
<option value="(adaptive-simpson (lambda (x) (* x x)) 0.0 3.0 1e-6)">Adaptive Simpson Integral int_0^3 x^2 dx = 9.0 via Z</option>
<option value="(bayes-update '(1/3 1/3 1/3) '(1/10 3/10 6/10))">Exact Rational 3-State Bayes Update via Z</option>
<option value="">-- Load Preset Polyglot Expression (Guile / TS / Rust) --</option>
<option value='guile::(aq-base36 "LEMUR")'>[λ Guile] Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
<option value='ts::aqBase36("LEMUR")'>[TS] Base-36 AQ: aqBase36("LEMUR") => 114</option>
<option value='rust::aq_base36("LEMUR")'>[Rs Rust] Base-36 AQ: aq_base36("LEMUR") => 114</option>
<option value="guile::(prime-factors 666)">[λ Guile] Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
<option value="ts::primeFactors(666)">[TS] Prime Factors: primeFactors(666) => [2,3,3,37]</option>
<option value="rust::prime_factors(666_u64)">[Rs Rust] Prime Factors: prime_factors(666_u64) => vec![2, 3, 3, 37]</option>
<option value="guile::(variance-pop *cluster-292-gen0*)">[λ Guile] Exact Rational Variance (Cluster 292): 4634/9</option>
<option value="ts::variancePop([264, 317, 276] as const)">[TS] Cluster 292 Variance: 514.8889</option>
<option value="rust::variance_pop(&[264.0, 317.0, 276.0])">[Rs Rust] Cluster 292 Variance: 514.8889</option>
<option value="guile::((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">[λ Guile] Thomas' Calculus d/dx(x^3) at x=2 => 12.0</option>
<option value="ts::derivative((x: number): number => x ** 3, 1e-5)(2.0)">[TS] Derivative d/dx(x^3) at x=2 => 12</option>
<option value="rust::derivative(|x: f64| x * x * x, 1e-5, 2.0)">[Rs Rust] Derivative d/dx(x^3) at x=2 => 12</option>
</select>
<button type="button" id="hsGuileReplEvalBtn" class="btn" style="border-color:var(--emerald);color:var(--emerald);">Evaluate (&lambda;)</button>
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step &beta;-Reduction</button>
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step AST Trace</button>
</div>
<textarea id="hsGuileReplInput" rows="2" style="width:100%;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.45rem;font-family:inherit;font-size:0.73rem;">(aq-base36 "LEMUR")</textarea>
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">guile&gt; Ready. Toggle [λ GUILE SCHEME LENS: ON] or click Evaluate (λ).</pre>
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">polyglot&gt; Ready (4-Ring Zero-Eval AST Sandbox). Select [λ GUILE | TS | RS | ≡ ALL 3] or click Evaluate (λ).</pre>
</div>
</aside>
<script src="../../assets/hs-guile-scheme-repl.js?v=2.2.0"></script>
<script src="../../assets/hs-guile-scheme-repl.js?v=2.8.1"></script>
</body>
</html>
+1 -1
View File
@@ -1 +1 @@
window.HYPERSTITION_MATH_MANIFEST = {"$id": "urn:io:hyperstitionstud:math-manifest", "version": "2.2.0", "enabled_subpages": ["base36-algebra-and-primes", "phonemic-projections-and-g-vectors", "graph-topology-and-eti-scoring", "timeseries-moments-and-confluence-dose", "macro-spreads-and-bayesian-inference"], "disabled_subpages": [], "enabled_routes": ["/math/index.html", "/math/base36-algebra-and-primes/index.html", "/math/phonemic-projections-and-g-vectors/index.html", "/math/graph-topology-and-eti-scoring/index.html", "/math/timeseries-moments-and-confluence-dose/index.html", "/math/macro-spreads-and-bayesian-inference/index.html"], "algebraic_invariants": {"eti_weights": [0.2, 0.18, 0.18, 0.16, 0.14, 0.14], "eti_weights_sum": 1.0, "bayesian_posterior_simplex_sum": 1.0, "cluster_292_gen0_variance": 310.22, "cluster_292_gen1_variance": 0.0, "g4_isometric_fixed_point_count": 21, "g3_quantized_steps": [0, 1, 10, 18, 20, 36, 37, 40, 74], "repdigit_37_attractors": [111, 222, 333, 444, 555, 666, 777, 888, 999]}, "empirical_counts": {"glossary_entries": 282, "bilingual_specimens": 190, "kg_nodes": 388, "kg_edges": 1282, "total_real_bars_n": 472, "fred_macro_series_n": 14}, "hub_prereq_ladder": {"unit_id": "M0", "expertise_level": "Level 1-2 (High-School Algebra & Sigma Notation • 3-6 hrs study)", "links": [{"label": "Internal: Self-Paced Learning Track (/learn/ Modules 1-2)", "url": "/learn/index.html", "external": false}, {"label": "Khan Academy — Algebra & Summation (Σ) Notation", "url": "https://www.khanacademy.org/math/algebra", "external": true}, {"label": "OpenStax Precalculus (Free Peer-Reviewed Textbook, Ch. 1 & 9)", "url": "https://openstax.org/details/books/precalculus-2e", "external": true}, {"label": "Structure and Interpretation of Computer Programs (SICP — Free MIT Text)", "url": "https://sarabander.github.io/sicp/", "external": true}, {"label": "GNU Guile Scheme Official Reference Manual", "url": "https://www.gnu.org/software/guile/manual/", "external": true}]}, "subpages": {"base36-algebra-and-primes": {"unit_id": "M1", "slug": "base36-algebra-and-primes", "title": "Unit M1: Base-36 Alphanumeric Valuation, Repdigit 37×3k Attractors & Prime Index π(n)", "short_title": "M1: Base-36 & Primes", "pip_class": "plate-lock-gold", "expertise_level": "Level 2: Elementary Number Theory & Base Systems (8-12 hrs study)", "prerequisites": ["Positional numeral systems and non-decimal radices (Base-10 vs. Base-36)", "Fundamental Theorem of Arithmetic (111 = 3 × 37) and prime-counting function π(n)", "Additive string homomorphisms AQ(u · v) = AQ(u) + AQ(v) over character monoids"], "public_resources": [{"label": "Internal: /learn/ Module 1 (Base-36 Valuation Table)", "url": "/learn/index.html", "external": false}, {"label": "Khan Academy — Cryptography & Modular Arithmetic", "url": "https://www.khanacademy.org/computing/computer-science/cryptography", "external": true}, {"label": "MIT 6.042J Mathematics for Computer Science (Ch. 8 Number Theory)", "url": "https://ocw.mit.edu/courses/6-042j-mathematics-for-computer-science-fall-2010/", "external": true}, {"label": "3Blue1Brown — Prime Numbers & Number Theory Visualized", "url": "https://www.3blue1brown.com/topics/number-theory", "external": true}], "sections": [{"heading": "1. The Base-36 Alphanumeric Homomorphism v: {0..9, A..Z} → {0..35}", "body": "For any character c, v(c) = ord(c) - 48 for digits '0'..'9' (0..9), v(c) = ord(lower(c)) - 87 for ASCII letters 'A'..'Z' (10..35), and v(c) = 0 otherwise. Extended over a string w = c_1...c_k, AQ(w) = ∑_{i=1}^k v(c_i). Under concatenation, AQ(w_1 · w_2) = AQ(w_1) + AQ(w_2)."}, {"heading": "2. Repdigit 37 × 3k Attractors & Prime Index π(n)", "body": "Three-digit repdigits R_k = 111 · k = 3 · 37 · k ∈ {111, 222, 333, 444, 555, 666, 777, 888, 999} factor through the prime 37 (12th prime) and 3. For prime coordinates p ∈ P, prime_rank(p) = π(p) = |{q ∈ P : q ≤ p}| (e.g., π(137) = 33 for 'envideea' = 137; π(193) = 44 for 'anthropik' = 'flash krash' = 193)."}]}, "phonemic-projections-and-g-vectors": {"unit_id": "M2", "slug": "phonemic-projections-and-g-vectors", "title": "Unit M2: Phonemic Projection Φ: Σ_eng* → Σ_ing* & Genealogical Vectors G1–G6", "short_title": "M2: Phonemic Φ & G1-G6", "pip_class": "plate-lock-emerald", "expertise_level": "Level 2-3: Set Mappings, Equivalence Fibers & Descriptive Statistics (8-12 hrs study)", "prerequisites": ["Surjective mappings Φ: A → B, equivalence kernels ker(AQ ∘ Φ), and fixed points Φ(w) = w", "Population mean μ = (1/N)∑ x_i and population variance σ²(X) = (1/N)∑(x_i - μ)²", "How non-injective projection onto shared phonemic attractors collapses set variance"], "public_resources": [{"label": "OpenStax Introductory Statistics (Ch. 2 Mean & Variance)", "url": "https://openstax.org/details/books/introductory-statistics-2e", "external": true}, {"label": "StatQuest with Josh Starmer — Variance & Standard Deviation", "url"Line truncated
window.HYPERSTITION_MATH_MANIFEST = {"$id": "urn:io:hyperstitionstud:math-manifest", "version": "2.8.1", "enabled_subpages": ["base36-algebra-and-primes", "phonemic-projections-and-g-vectors", "graph-topology-and-eti-scoring", "timeseries-moments-and-confluence-dose", "macro-spreads-and-bayesian-inference"], "disabled_subpages": [], "enabled_routes": ["/math/index.html", "/math/base36-algebra-and-primes/index.html", "/math/phonemic-projections-and-g-vectors/index.html", "/math/graph-topology-and-eti-scoring/index.html", "/math/timeseries-moments-and-confluence-dose/index.html", "/math/macro-spreads-and-bayesian-inference/index.html"], "algebraic_invariants": {"eti_weights": [0.2, 0.18, 0.18, 0.16, 0.14, 0.14], "eti_weights_sum": 1.0, "bayesian_posterior_simplex_sum": 1.0, "cluster_292_gen0_variance": 310.22, "cluster_292_gen1_variance": 0.0, "g4_isometric_fixed_point_count": 21, "g3_quantized_steps": [0, 1, 10, 18, 20, 36, 37, 40, 74], "repdigit_37_attractors": [111, 222, 333, 444, 555, 666, 777, 888, 999]}, "empirical_counts": {"glossary_entries": 282, "bilingual_specimens": 190, "kg_nodes": 388, "kg_edges": 1282, "total_real_bars_n": 472, "fred_macro_series_n": 14}, "hub_prereq_ladder": {"unit_id": "M0", "expertise_level": "Level 1-2 (High-School Algebra & Sigma Notation • 3-6 hrs study)", "links": [{"label": "Internal: Self-Paced Learning Track (/learn/ Modules 1-2)", "url": "/learn/index.html", "external": false}, {"label": "Khan Academy — Algebra & Summation (Σ) Notation", "url": "https://www.khanacademy.org/math/algebra", "external": true}, {"label": "OpenStax Precalculus (Free Peer-Reviewed Textbook, Ch. 1 & 9)", "url": "https://openstax.org/details/books/precalculus-2e", "external": true}, {"label": "Structure and Interpretation of Computer Programs (SICP — Free MIT Text)", "url": "https://sarabander.github.io/sicp/", "external": true}, {"label": "GNU Guile Scheme Official Reference Manual", "url": "https://www.gnu.org/software/guile/manual/", "external": true}]}, "subpages": {"base36-algebra-and-primes": {"unit_id": "M1", "slug": "base36-algebra-and-primes", "title": "Unit M1: Base-36 Alphanumeric Valuation, Repdigit 37×3k Attractors & Prime Index π(n)", "short_title": "M1: Base-36 & Primes", "pip_class": "plate-lock-gold", "expertise_level": "Level 2: Elementary Number Theory & Base Systems (8-12 hrs study)", "prerequisites": ["Positional numeral systems and non-decimal radices (Base-10 vs. Base-36)", "Fundamental Theorem of Arithmetic (111 = 3 × 37) and prime-counting function π(n)", "Additive string homomorphisms AQ(u · v) = AQ(u) + AQ(v) over character monoids"], "public_resources": [{"label": "Internal: /learn/ Module 1 (Base-36 Valuation Table)", "url": "/learn/index.html", "external": false}, {"label": "Khan Academy — Cryptography & Modular Arithmetic", "url": "https://www.khanacademy.org/computing/computer-science/cryptography", "external": true}, {"label": "MIT 6.042J Mathematics for Computer Science (Ch. 8 Number Theory)", "url": "https://ocw.mit.edu/courses/6-042j-mathematics-for-computer-science-fall-2010/", "external": true}, {"label": "3Blue1Brown — Prime Numbers & Number Theory Visualized", "url": "https://www.3blue1brown.com/topics/number-theory", "external": true}], "sections": [{"heading": "1. The Base-36 Alphanumeric Homomorphism v: {0..9, A..Z} → {0..35}", "body": "For any character c, v(c) = ord(c) - 48 for digits '0'..'9' (0..9), v(c) = ord(lower(c)) - 87 for ASCII letters 'A'..'Z' (10..35), and v(c) = 0 otherwise. Extended over a string w = c_1...c_k, AQ(w) = ∑_{i=1}^k v(c_i). Under concatenation, AQ(w_1 · w_2) = AQ(w_1) + AQ(w_2)."}, {"heading": "2. Repdigit 37 × 3k Attractors & Prime Index π(n)", "body": "Three-digit repdigits R_k = 111 · k = 3 · 37 · k ∈ {111, 222, 333, 444, 555, 666, 777, 888, 999} factor through the prime 37 (12th prime) and 3. For prime coordinates p ∈ P, prime_rank(p) = π(p) = |{q ∈ P : q ≤ p}| (e.g., π(137) = 33 for 'envideea' = 137; π(193) = 44 for 'anthropik' = 'flash krash' = 193)."}]}, "phonemic-projections-and-g-vectors": {"unit_id": "M2", "slug": "phonemic-projections-and-g-vectors", "title": "Unit M2: Phonemic Projection Φ: Σ_eng* → Σ_ing* & Genealogical Vectors G1–G6", "short_title": "M2: Phonemic Φ & G1-G6", "pip_class": "plate-lock-emerald", "expertise_level": "Level 2-3: Set Mappings, Equivalence Fibers & Descriptive Statistics (8-12 hrs study)", "prerequisites": ["Surjective mappings Φ: A → B, equivalence kernels ker(AQ ∘ Φ), and fixed points Φ(w) = w", "Population mean μ = (1/N)∑ x_i and population variance σ²(X) = (1/N)∑(x_i - μ)²", "How non-injective projection onto shared phonemic attractors collapses set variance"], "public_resources": [{"label": "OpenStax Introductory Statistics (Ch. 2 Mean & Variance)", "url": "https://openstax.org/details/books/introductory-statistics-2e", "external": true}, {"label": "StatQuest with Josh Starmer — Variance & Standard Deviation", "url"Line truncated
+2 -2
View File
@@ -1,6 +1,6 @@
{
"$id": "urn:io:hyperstitionstud:math-manifest",
"version": "2.2.0",
"version": "2.8.1",
"enabled_subpages": [
"base36-algebra-and-primes",
"phonemic-projections-and-g-vectors",
@@ -301,6 +301,6 @@
}
},
"ipld_dag_json_cidv1": {
"/": "baguqeeraq4xvyibmtgnvj5f265wvyurn2k6eyyx5lml7rt4tjivcwyqm3ydq"
"/": "baguqeerasy7ucqdyaxcxi4y7fdfma5vmma47dieoomg7v6ewzcer5tdqruqq"
}
}
@@ -3,8 +3,8 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Unit M2: Phonemic Projection Φ: Σ_eng* → Σ_ing* & Genealogical Vectors G1–G6 — hyperstitionstud.io/math (v2.2.0)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.2.0" />
<title>Unit M2: Phonemic Projection Φ: Σ_eng* → Σ_ing* & Genealogical Vectors G1–G6 — hyperstitionstud.io/math (v2.8.1)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.8.1" />
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DejaVu Sans Mono', ui-monospace, monospace; padding: 1.25rem; line-height: 1.5; }
@@ -22,7 +22,7 @@
<header>
<div>
<h1>Unit M2: Phonemic Projection Φ: Σ_eng* → Σ_ing* & Genealogical Vectors G1–G6</h1>
<p class="subtitle">Cartridge M2 &bull; Non-Sequentially Revertible via <code>hs-math-docs --disable phonemic-projections-and-g-vectors</code> &bull; v2.2.0</p>
<p class="subtitle">Cartridge M2 &bull; Non-Sequentially Revertible via <code>hs-math-docs --disable phonemic-projections-and-g-vectors</code> &bull; v2.8.1 <span class="hs-sigil-seal" aria-hidden="true">[ &#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; ]</span></p>
</div>
<nav class="top-nav">
<a class="btn" href="../../index.html">Portal Home (/)</a>
@@ -33,14 +33,14 @@
<a class="btn" href="../timeseries-moments-and-confluence-dose/index.html" style="">M4: Time-Series & Dose Math</a>
<a class="btn" href="../macro-spreads-and-bayesian-inference/index.html" style="">M5: Macro & Bayesian Math</a>
<a class="btn" href="../../engineering/index.html">Engineering Hub (/engineering/)</a>
<button id="guileSchemeModeToggle" class="btn hs-guile-toggle" type="button" aria-pressed="false" title="Toggle additive Guile Scheme &amp; Z-Combinator teaching cartridges and in-browser REPL (Alt+S)"><span class="hs-guile-lambda-badge">&lambda;</span><span>GUILE SCHEME LENS: <strong id="guileSchemeModeState">OFF</strong></span></button>
<div id="hsPolyglotModeSelector" class="hs-polyglot-segmented" role="radiogroup" aria-label="Pedagogical Programming Language Lens"><span class="hs-polyglot-prefix">LENS:</span><button type="button" id="guileSchemeModeToggle" class="hs-polyglot-seg" role="radio" data-lens-mode="off" aria-checked="true" title="Hide programming language cartridges (Alt+0)">OFF</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="guile" aria-checked="false" title="GNU Guile Scheme — Z-Combinator &amp; Exact Rationals (Alt+1)"><span class="hs-guile-lambda-badge">&lambda;</span>GUILE</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="ts" aria-checked="false" title="TypeScript — Static Union Types &amp; Functional Pipelines (Alt+2)"><span class="hs-guile-lambda-badge">TS</span>TYPESCRIPT</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="rust" aria-checked="false" title="Rust — Ownership, Option&lt;T&gt; &amp; Zero-Cost Iterators (Alt+3)"><span class="hs-guile-lambda-badge">Rs</span>RUST</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="all" aria-checked="false" title="Side-by-side comparison of Guile Scheme, TypeScript, and Rust (Alt+4)">&equiv; ALL 3</button><strong id="guileSchemeModeState" style="display:none;">OFF</strong></div>
<span class="nav-donate-sep" aria-hidden="true"></span>
<a class="btn-donate-pill" href="../../donate/index.html"><span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>
<a class="btn-donate-pill" href="../../donate/index.html?from=math"><span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>
</nav>
</header>
<section class="panel hs-plate-g3 plate-lock-emerald hs-prereq-ladder" style="margin-bottom:0.9rem;padding:1rem 1.2rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--emerald);text-transform:uppercase;letter-spacing:0.06em;">Prerequisite Track for Novices &bull; Required Expertise: Level 2-3: Set Mappings, Equivalence Fibers & Descriptive Statistics (8-12 hrs study)</div><p style="font-size:0.76rem;color:var(--text-secondary);margin:0.35rem 0;">If any mathematical notation on this page is unfamiliar, occupy your study time with these free foundational resources first:</p><div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:0.8rem;margin-top:0.4rem;"><div><strong style="font-size:0.73rem;color:var(--gold);">Core Mathematical Prerequisites:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li>Surjective mappings Φ: A → B, equivalence kernels ker(AQ ∘ Φ), and fixed points Φ(w) = w</li><li>Population mean μ = (1/N)∑ x_i and population variance σ²(X) = (1/N)∑(x_i - μ)²</li><li>How non-injective projection onto shared phonemic attractors collapses set variance</li></ul></div><div><strong style="font-size:0.73rem;color:var(--cyan);">Curated Free Public Study Resources:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li><a href="https://openstax.org/details/books/introductory-statistics-2e" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">OpenStax Introductory Statistics (Ch. 2 Mean & Variance) &#x2197;</a></li><li><a href="https://statquest.org/video-index/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">StatQuest with Josh Starmer — Variance & Standard Deviation &#x2197;</a></li><li><a href="https://www.people.vcu.edu/~rhammack/BookOfProof/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">Book of Proof (Richard Hammack — Free Textbook, Ch. 12 Functions & Fibers) &#x2197;</a></li></ul></div></div></section>
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">&lambda; Guile Scheme Foil (M2): Exact Rational Population Variance Collapse on Cluster 292 via Z</div><button type="button" class="btn hs-load-in-repl-btn" data-scheme-expr="(variance-pop *cluster-292-gen0*)" style="border-color:var(--cyan);color:var(--cyan);">Send to In-Browser Guile REPL &rarr;</button></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Mathematical Identity:</strong><code>σ²_0({264, 317, 276}) = 4634/9 ≈ 514.89 → σ²_1({292, 292, 292}) = 0</code></div><div class="hs-guile-box"><strong style="color:var(--text-secondary);display:block;margin-bottom:0.2rem;">2. Production Python:</strong><pre style="white-space:pre-wrap;">compute_variance([264, 317, 276]) # 514.89 -> 0.0</pre></div><div class="hs-guile-box"><strong style="color:var(--cyan);display:block;margin-bottom:0.2rem;">3. Guile Scheme (Z-Combinator):</strong><code class="hs-guile-code-expr">(variance-pop *cluster-292-gen0*)</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Toggle Guile Lens ON to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge:</strong> Evaluate (variance-pop *cluster-292-gen1*) => 0 in the REPL and compare exact rational 4634/9 vs float.</div></section>
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">&lambda; Polyglot Foil (M2): Population Variance Collapse on Cluster 292 (Exact Rational vs. Float)</div><div style="display:flex;gap:0.25rem;flex-wrap:wrap;align-items:center;"><button type="button" class="hs-polyglot-seg" data-lens-mode="guile">&lambda; Guile</button><button type="button" class="hs-polyglot-seg" data-lens-mode="ts">TS TypeScript</button><button type="button" class="hs-polyglot-seg" data-lens-mode="rust">Rs Rust</button><button type="button" class="hs-polyglot-seg" data-lens-mode="all">&equiv; All 3</button><button type="button" class="hs-polyglot-seg" data-lens-mode="off">Hide</button></div></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Mathematical Identity &amp; Python:</strong><code>σ²_0({264, 317, 276}) = 4634/9 ≈ 514.89 → σ²_1({292, 292, 292}) = 0</code><pre style="white-space:pre-wrap;margin-top:0.25rem;color:var(--text-secondary);">compute_variance([264, 317, 276]) # 514.89 -&gt; 0.0</pre></div><div class="hs-guile-box hs-lang-box-guile"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--cyan);">&lambda; Guile Scheme (Z-Combinator):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="guile" data-scheme-expr="(variance-pop *cluster-292-gen0*)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-guile-code-expr">(variance-pop *cluster-292-gen0*)</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-ts"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--gold);">TS TypeScript (Strict AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="ts" data-scheme-expr="variancePop([264, 317, 276] as const)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-ts-code-expr">variancePop([264, 317, 276] as const)</code><div class="hs-ts-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-rust"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--emerald);">Rs Rust (Option/Iterator AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="rust" data-scheme-expr="variance_pop(&amp;[264.0, 317.0, 276.0])" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-rust-code-expr">variance_pop(&amp;[264.0, 317.0, 276.0])</code><div class="hs-rust-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge (4-Ring Zero-Escape Sandbox):</strong> Notice Guile&#x27;s exact rational 4634/9 vs. TypeScript and Rust IEEE-754 float 514.8889.</div></section>
<article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">1. Vector G1 Intergenerational Variance Collapse (Δσ²_G1)</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">Given a lexical cluster S = {w_1, ..., w_N}, define Gen 0 variance σ²_0(S) = σ²({AQ(w) : w ∈ S}) and Gen 1 phonemic variance σ²_1(S) = σ²({AQ(Φ(w)) : w ∈ S}). Vector G1 measures Δσ²_G1(S) = σ²_0(S) - σ²_1(S). For S_292 = {'schizoanalysis' (264), 'abstract machine' (317), 'synthetic data' (276)}, Φ maps all three to 292 ('shizohnalizis'=292, 'abstrakt masheen'=292, 'sinthetik dayta'=292), collapsing σ²_0 = 514.89 to σ²_1 = 0.00 (Δσ²_G1 = +514.89).</p></article><article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">2. Vector G3 Quantized Steps, Vector G4 Isometric Fixed Points (Δ = 0) & Vector G5 Twin Primes</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">Define phonemic drift Δ(w) = AQ(Φ(w)) - AQ(w). Vector G4 consists of isometric fixed points where Δ(w) = 0 (21 canonical specimens including 'ASML'=81, 'capital'→'kapatal'=125, 'palantir'→'palanter'=159, 'nineteen'→'nainteen'=137). Vector G3 captures quantized step magnitudes |Δ(w)| ∈ {0, 1, 10, 18, 20, 36, 37, 40, 74}, and Vector G5 captures twin-prime mutations where both AQ(w) ∈ P and AQ(Φ(w)) ∈ P with Δ(w) ≠ 0.</p></article>
<div style="display:flex;justify-content:space-between;align-items:center;margin-top:0.8rem;">
@@ -49,15 +49,21 @@
</div>
<footer>
hyperstitionstud.io/math/phonemic-projections-and-g-vectors v2.2.0 &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
hyperstitionstud.io/math/phonemic-projections-and-g-vectors v2.8.1 &bull; <span class="hs-sigil-colophon" aria-hidden="true">&#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; &middot; &#x2644;</span> &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
</footer>
</div>
<script src="../math-manifest-data.js?v=2.2.0"></script>
<script src="../math-app.js?v=2.2.0"></script>
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Guile Scheme and Z-Combinator REPL">
<script src="../../assets/hs-matrix-coderain.js?v=2.8.1" defer></script>
<script src="../math-manifest-data.js?v=2.8.1"></script>
<script src="../math-app.js?v=2.8.1"></script>
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Polyglot Guile Scheme, TypeScript, and Rust Hardened REPL">
<div style="display:flex;justify-content:space-between;align-items:center;gap:0.5rem;margin-bottom:0.45rem;">
<div style="font-size:0.74rem;font-weight:700;color:var(--cyan);">&lambda; IN-BROWSER GUILE SCHEME &amp; Z-COMBINATOR REPL (OFFLINE • ZERO CDN)</div>
<div style="font-size:0.73rem;font-weight:700;color:var(--cyan);">&lambda; 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
<div style="display:flex;gap:0.4rem;align-items:center;">
<select id="hsPolyglotReplLang" style="background:var(--bg-void);color:var(--cyan);border:1px solid var(--cyan);padding:0.15rem 0.35rem;font-family:inherit;font-size:0.68rem;font-weight:700;">
<option value="guile">λ Guile Scheme</option>
<option value="ts">TS TypeScript</option>
<option value="rust">Rs Rust</option>
</select>
<label style="font-size:0.68rem;color:var(--text-secondary);cursor:pointer;"><input type="checkbox" id="hsGuilePreferFloat" /> Float view</label>
<button type="button" id="hsGuileReplCloseBtn" class="btn" style="padding:0.15rem 0.45rem;font-size:0.68rem;">Minimize / Expand</button>
</div>
@@ -65,22 +71,27 @@
<div class="hs-repl-body">
<div style="display:flex;gap:0.4rem;margin-bottom:0.4rem;flex-wrap:wrap;">
<select id="hsGuileReplPreset" style="flex:1;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.28rem;font-family:inherit;font-size:0.7rem;">
<option value="">-- Load Preset Z-Combinator / Domain Expression --</option>
<option value='(aq-base36 "LEMUR")'>Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
<option value="(prime-factors 666)">Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
<option value="(variance-pop *cluster-292-gen0*)">Exact Rational Variance (Cluster 292 Gen 0): (variance-pop *cluster-292-gen0*)</option>
<option value="(eti-score 95 92 94 90 91 96)">Exact Rational Convex ETI Score: (eti-score 95 92 94 90 91 96)</option>
<option value="((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">Thomas' Calculus Derivative d/dx(x^3) at x=2 via Z</option>
<option value="(adaptive-simpson (lambda (x) (* x x)) 0.0 3.0 1e-6)">Adaptive Simpson Integral int_0^3 x^2 dx = 9.0 via Z</option>
<option value="(bayes-update '(1/3 1/3 1/3) '(1/10 3/10 6/10))">Exact Rational 3-State Bayes Update via Z</option>
<option value="">-- Load Preset Polyglot Expression (Guile / TS / Rust) --</option>
<option value='guile::(aq-base36 "LEMUR")'>[λ Guile] Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
<option value='ts::aqBase36("LEMUR")'>[TS] Base-36 AQ: aqBase36("LEMUR") => 114</option>
<option value='rust::aq_base36("LEMUR")'>[Rs Rust] Base-36 AQ: aq_base36("LEMUR") => 114</option>
<option value="guile::(prime-factors 666)">[λ Guile] Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
<option value="ts::primeFactors(666)">[TS] Prime Factors: primeFactors(666) => [2,3,3,37]</option>
<option value="rust::prime_factors(666_u64)">[Rs Rust] Prime Factors: prime_factors(666_u64) => vec![2, 3, 3, 37]</option>
<option value="guile::(variance-pop *cluster-292-gen0*)">[λ Guile] Exact Rational Variance (Cluster 292): 4634/9</option>
<option value="ts::variancePop([264, 317, 276] as const)">[TS] Cluster 292 Variance: 514.8889</option>
<option value="rust::variance_pop(&[264.0, 317.0, 276.0])">[Rs Rust] Cluster 292 Variance: 514.8889</option>
<option value="guile::((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">[λ Guile] Thomas' Calculus d/dx(x^3) at x=2 => 12.0</option>
<option value="ts::derivative((x: number): number => x ** 3, 1e-5)(2.0)">[TS] Derivative d/dx(x^3) at x=2 => 12</option>
<option value="rust::derivative(|x: f64| x * x * x, 1e-5, 2.0)">[Rs Rust] Derivative d/dx(x^3) at x=2 => 12</option>
</select>
<button type="button" id="hsGuileReplEvalBtn" class="btn" style="border-color:var(--emerald);color:var(--emerald);">Evaluate (&lambda;)</button>
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step &beta;-Reduction</button>
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step AST Trace</button>
</div>
<textarea id="hsGuileReplInput" rows="2" style="width:100%;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.45rem;font-family:inherit;font-size:0.73rem;">(aq-base36 "LEMUR")</textarea>
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">guile&gt; Ready. Toggle [λ GUILE SCHEME LENS: ON] or click Evaluate (λ).</pre>
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">polyglot&gt; Ready (4-Ring Zero-Eval AST Sandbox). Select [λ GUILE | TS | RS | ≡ ALL 3] or click Evaluate (λ).</pre>
</div>
</aside>
<script src="../../assets/hs-guile-scheme-repl.js?v=2.2.0"></script>
<script src="../../assets/hs-guile-scheme-repl.js?v=2.8.1"></script>
</body>
</html>
@@ -3,8 +3,8 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Unit M4: Longitudinal Moments (ts_*), Lead-Lag r(τ), Order Statistics (P50, P90) & Confluence Dose D ∈ {0..4} — hyperstitionstud.io/math (v2.2.0)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.2.0" />
<title>Unit M4: Longitudinal Moments (ts_*), Lead-Lag r(τ), Order Statistics (P50, P90) & Confluence Dose D ∈ {0..4} — hyperstitionstud.io/math (v2.8.1)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.8.1" />
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DejaVu Sans Mono', ui-monospace, monospace; padding: 1.25rem; line-height: 1.5; }
@@ -22,7 +22,7 @@
<header>
<div>
<h1>Unit M4: Longitudinal Moments (ts_*), Lead-Lag r(τ), Order Statistics (P50, P90) & Confluence Dose D ∈ {0..4}</h1>
<p class="subtitle">Cartridge M4 &bull; Non-Sequentially Revertible via <code>hs-math-docs --disable timeseries-moments-and-confluence-dose</code> &bull; v2.2.0</p>
<p class="subtitle">Cartridge M4 &bull; Non-Sequentially Revertible via <code>hs-math-docs --disable timeseries-moments-and-confluence-dose</code> &bull; v2.8.1 <span class="hs-sigil-seal" aria-hidden="true">[ &#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; ]</span></p>
</div>
<nav class="top-nav">
<a class="btn" href="../../index.html">Portal Home (/)</a>
@@ -33,14 +33,14 @@
<a class="btn" href="index.html" style="border-color:var(--gold);color:var(--gold);">M4: Time-Series & Dose Math</a>
<a class="btn" href="../macro-spreads-and-bayesian-inference/index.html" style="">M5: Macro & Bayesian Math</a>
<a class="btn" href="../../engineering/index.html">Engineering Hub (/engineering/)</a>
<button id="guileSchemeModeToggle" class="btn hs-guile-toggle" type="button" aria-pressed="false" title="Toggle additive Guile Scheme &amp; Z-Combinator teaching cartridges and in-browser REPL (Alt+S)"><span class="hs-guile-lambda-badge">&lambda;</span><span>GUILE SCHEME LENS: <strong id="guileSchemeModeState">OFF</strong></span></button>
<div id="hsPolyglotModeSelector" class="hs-polyglot-segmented" role="radiogroup" aria-label="Pedagogical Programming Language Lens"><span class="hs-polyglot-prefix">LENS:</span><button type="button" id="guileSchemeModeToggle" class="hs-polyglot-seg" role="radio" data-lens-mode="off" aria-checked="true" title="Hide programming language cartridges (Alt+0)">OFF</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="guile" aria-checked="false" title="GNU Guile Scheme — Z-Combinator &amp; Exact Rationals (Alt+1)"><span class="hs-guile-lambda-badge">&lambda;</span>GUILE</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="ts" aria-checked="false" title="TypeScript — Static Union Types &amp; Functional Pipelines (Alt+2)"><span class="hs-guile-lambda-badge">TS</span>TYPESCRIPT</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="rust" aria-checked="false" title="Rust — Ownership, Option&lt;T&gt; &amp; Zero-Cost Iterators (Alt+3)"><span class="hs-guile-lambda-badge">Rs</span>RUST</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="all" aria-checked="false" title="Side-by-side comparison of Guile Scheme, TypeScript, and Rust (Alt+4)">&equiv; ALL 3</button><strong id="guileSchemeModeState" style="display:none;">OFF</strong></div>
<span class="nav-donate-sep" aria-hidden="true"></span>
<a class="btn-donate-pill" href="../../donate/index.html"><span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>
<a class="btn-donate-pill" href="../../donate/index.html?from=math"><span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>
</nav>
</header>
<section class="panel hs-plate-g3 plate-lock-emerald hs-prereq-ladder" style="margin-bottom:0.9rem;padding:1rem 1.2rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--emerald);text-transform:uppercase;letter-spacing:0.06em;">Prerequisite Track for Novices &bull; Required Expertise: Level 3-4: Nonparametric Order Statistics & Time-Series Correlation (15-20 hrs study)</div><p style="font-size:0.76rem;color:var(--text-secondary);margin:0.35rem 0;">If any mathematical notation on this page is unfamiliar, occupy your study time with these free foundational resources first:</p><div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:0.8rem;margin-top:0.4rem;"><div><strong style="font-size:0.73rem;color:var(--gold);">Core Mathematical Prerequisites:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li>Basis-point return arithmetic Δbps_{i,t} = round(((P_t - P_{t-1}) / P_{t-1}) × 10^4)</li><li>Nonparametric order statistics (Median P50, 90th percentile P90) vs. outlier-sensitive means</li><li>Pearson linear correlation r(τ) across lags τ ∈ [-5..+5] and indicator sums ∑ I(A_s)</li></ul></div><div><strong style="font-size:0.73rem;color:var(--cyan);">Curated Free Public Study Resources:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li><a href="https://seeing-theory.brown.edu/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">Seeing Theory (Brown University Visual Intro to Probability & Statistics) &#x2197;</a></li><li><a href="https://online.stat.psu.edu/stat510/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">Penn State STAT 510 Applied Time Series Analysis (Cross-Correlation) &#x2197;</a></li><li><a href="https://www.itl.nist.gov/div898/handbook/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">NIST/SEMATECH e-Handbook of Statistical Methods (Order Statistics) &#x2197;</a></li></ul></div></div></section>
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">&lambda; Guile Scheme Foil (M4): Confluence Dose D ∈ {0..4} & Thomas' Calculus Central Derivative via Z</div><button type="button" class="btn hs-load-in-repl-btn" data-scheme-expr="((derivative (lambda (x) (* x x x)) 1e-5) 2.0)" style="border-color:var(--cyan);color:var(--cyan);">Send to In-Browser Guile REPL &rarr;</button></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Mathematical Identity:</strong><code>f'(x) = lim_{h→0} (f(x+h) - f(x-h)) / (2h), D_{i,t} = ∑ I(A_s)</code></div><div class="hs-guile-box"><strong style="color:var(--text-secondary);display:block;margin-bottom:0.2rem;">2. Production Python:</strong><pre style="white-space:pre-wrap;">confluence_dose = sum(1 for x in species_hits if x)</pre></div><div class="hs-guile-box"><strong style="color:var(--cyan);display:block;margin-bottom:0.2rem;">3. Guile Scheme (Z-Combinator):</strong><code class="hs-guile-code-expr">((derivative (lambda (x) (* x x x)) 1e-5) 2.0)</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Toggle Guile Lens ON to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge:</strong> Compute the derivative of x^3 at x=2.0 (=> 12.0) or the 2nd derivative via ((nth-derivative (lambda (x) (* x x x)) 2 1e-3) 2.0).</div></section>
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">&lambda; Polyglot Foil (M4): Thomas&#x27; Calculus Central Derivative d/dx(x^3) at x=2.0</div><div style="display:flex;gap:0.25rem;flex-wrap:wrap;align-items:center;"><button type="button" class="hs-polyglot-seg" data-lens-mode="guile">&lambda; Guile</button><button type="button" class="hs-polyglot-seg" data-lens-mode="ts">TS TypeScript</button><button type="button" class="hs-polyglot-seg" data-lens-mode="rust">Rs Rust</button><button type="button" class="hs-polyglot-seg" data-lens-mode="all">&equiv; All 3</button><button type="button" class="hs-polyglot-seg" data-lens-mode="off">Hide</button></div></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Mathematical Identity &amp; Python:</strong><code>f&#x27;(x) = lim_{h→0} (f(x+h) - f(x-h)) / (2h), D_{i,t} = ∑ I(A_s)</code><pre style="white-space:pre-wrap;margin-top:0.25rem;color:var(--text-secondary);">confluence_dose = sum(1 for x in species_hits if x)</pre></div><div class="hs-guile-box hs-lang-box-guile"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--cyan);">&lambda; Guile Scheme (Z-Combinator):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="guile" data-scheme-expr="((derivative (lambda (x) (* x x x)) 1e-5) 2.0)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-guile-code-expr">((derivative (lambda (x) (* x x x)) 1e-5) 2.0)</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-ts"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--gold);">TS TypeScript (Strict AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="ts" data-scheme-expr="derivative((x: number): number =&gt; x ** 3, 1e-5)(2.0)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-ts-code-expr">derivative((x: number): number =&gt; x ** 3, 1e-5)(2.0)</code><div class="hs-ts-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-rust"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--emerald);">Rs Rust (Option/Iterator AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="rust" data-scheme-expr="derivative(|x: f64| x * x * x, 1e-5, 2.0)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-rust-code-expr">derivative(|x: f64| x * x * x, 1e-5, 2.0)</code><div class="hs-rust-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge (4-Ring Zero-Escape Sandbox):</strong> Compare higher-order derivative closures in Guile Scheme, TypeScript, and Rust.</div></section>
<article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">1. Four-Species Confluence Dose Indicator Sum D_{i,t} ∈ {0, 1, 2, 3, 4}</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">For ticker i on trading session t, D_{i,t} = I(Scope1_{i,t}) + I(Scope2Ring_{i,t}) + I(SharedDossier_{i,t}) + I(WireEntity_{i,t}). Whenever a session is closed or private (data_available = False), D_{i,t} = null rather than 0, preventing missing-data bias.</p></article><article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">2. Nonparametric Order Statistics (P50, P90) & the Empirical Two-Regime Split</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">Because cross-asset returns |Δbps| are heavy-tailed, Median P50 and P90 are the robust estimators: across the 440 real November 2026 bars, Dose 2 (Market Ring × Same-Day Dossier without headline shock, n=34) compresses median displacement by -58% (P50 = 101.0 bps vs. 240.5 bps at Dose 0; P90 = 292 bps vs. 665 bps), whereas Dose 3+ (n=4) triggers a 1.98x volume surge and 377.5 bps next-day continuation.</p></article>
<div style="display:flex;justify-content:space-between;align-items:center;margin-top:0.8rem;">
@@ -49,15 +49,21 @@
</div>
<footer>
hyperstitionstud.io/math/timeseries-moments-and-confluence-dose v2.2.0 &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
hyperstitionstud.io/math/timeseries-moments-and-confluence-dose v2.8.1 &bull; <span class="hs-sigil-colophon" aria-hidden="true">&#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; &middot; &#x2644;</span> &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
</footer>
</div>
<script src="../math-manifest-data.js?v=2.2.0"></script>
<script src="../math-app.js?v=2.2.0"></script>
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Guile Scheme and Z-Combinator REPL">
<script src="../../assets/hs-matrix-coderain.js?v=2.8.1" defer></script>
<script src="../math-manifest-data.js?v=2.8.1"></script>
<script src="../math-app.js?v=2.8.1"></script>
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Polyglot Guile Scheme, TypeScript, and Rust Hardened REPL">
<div style="display:flex;justify-content:space-between;align-items:center;gap:0.5rem;margin-bottom:0.45rem;">
<div style="font-size:0.74rem;font-weight:700;color:var(--cyan);">&lambda; IN-BROWSER GUILE SCHEME &amp; Z-COMBINATOR REPL (OFFLINE • ZERO CDN)</div>
<div style="font-size:0.73rem;font-weight:700;color:var(--cyan);">&lambda; 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
<div style="display:flex;gap:0.4rem;align-items:center;">
<select id="hsPolyglotReplLang" style="background:var(--bg-void);color:var(--cyan);border:1px solid var(--cyan);padding:0.15rem 0.35rem;font-family:inherit;font-size:0.68rem;font-weight:700;">
<option value="guile">λ Guile Scheme</option>
<option value="ts">TS TypeScript</option>
<option value="rust">Rs Rust</option>
</select>
<label style="font-size:0.68rem;color:var(--text-secondary);cursor:pointer;"><input type="checkbox" id="hsGuilePreferFloat" /> Float view</label>
<button type="button" id="hsGuileReplCloseBtn" class="btn" style="padding:0.15rem 0.45rem;font-size:0.68rem;">Minimize / Expand</button>
</div>
@@ -65,22 +71,27 @@
<div class="hs-repl-body">
<div style="display:flex;gap:0.4rem;margin-bottom:0.4rem;flex-wrap:wrap;">
<select id="hsGuileReplPreset" style="flex:1;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.28rem;font-family:inherit;font-size:0.7rem;">
<option value="">-- Load Preset Z-Combinator / Domain Expression --</option>
<option value='(aq-base36 "LEMUR")'>Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
<option value="(prime-factors 666)">Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
<option value="(variance-pop *cluster-292-gen0*)">Exact Rational Variance (Cluster 292 Gen 0): (variance-pop *cluster-292-gen0*)</option>
<option value="(eti-score 95 92 94 90 91 96)">Exact Rational Convex ETI Score: (eti-score 95 92 94 90 91 96)</option>
<option value="((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">Thomas' Calculus Derivative d/dx(x^3) at x=2 via Z</option>
<option value="(adaptive-simpson (lambda (x) (* x x)) 0.0 3.0 1e-6)">Adaptive Simpson Integral int_0^3 x^2 dx = 9.0 via Z</option>
<option value="(bayes-update '(1/3 1/3 1/3) '(1/10 3/10 6/10))">Exact Rational 3-State Bayes Update via Z</option>
<option value="">-- Load Preset Polyglot Expression (Guile / TS / Rust) --</option>
<option value='guile::(aq-base36 "LEMUR")'>[λ Guile] Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
<option value='ts::aqBase36("LEMUR")'>[TS] Base-36 AQ: aqBase36("LEMUR") => 114</option>
<option value='rust::aq_base36("LEMUR")'>[Rs Rust] Base-36 AQ: aq_base36("LEMUR") => 114</option>
<option value="guile::(prime-factors 666)">[λ Guile] Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
<option value="ts::primeFactors(666)">[TS] Prime Factors: primeFactors(666) => [2,3,3,37]</option>
<option value="rust::prime_factors(666_u64)">[Rs Rust] Prime Factors: prime_factors(666_u64) => vec![2, 3, 3, 37]</option>
<option value="guile::(variance-pop *cluster-292-gen0*)">[λ Guile] Exact Rational Variance (Cluster 292): 4634/9</option>
<option value="ts::variancePop([264, 317, 276] as const)">[TS] Cluster 292 Variance: 514.8889</option>
<option value="rust::variance_pop(&[264.0, 317.0, 276.0])">[Rs Rust] Cluster 292 Variance: 514.8889</option>
<option value="guile::((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">[λ Guile] Thomas' Calculus d/dx(x^3) at x=2 => 12.0</option>
<option value="ts::derivative((x: number): number => x ** 3, 1e-5)(2.0)">[TS] Derivative d/dx(x^3) at x=2 => 12</option>
<option value="rust::derivative(|x: f64| x * x * x, 1e-5, 2.0)">[Rs Rust] Derivative d/dx(x^3) at x=2 => 12</option>
</select>
<button type="button" id="hsGuileReplEvalBtn" class="btn" style="border-color:var(--emerald);color:var(--emerald);">Evaluate (&lambda;)</button>
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step &beta;-Reduction</button>
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step AST Trace</button>
</div>
<textarea id="hsGuileReplInput" rows="2" style="width:100%;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.45rem;font-family:inherit;font-size:0.73rem;">(aq-base36 "LEMUR")</textarea>
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">guile&gt; Ready. Toggle [λ GUILE SCHEME LENS: ON] or click Evaluate (λ).</pre>
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">polyglot&gt; Ready (4-Ring Zero-Eval AST Sandbox). Select [λ GUILE | TS | RS | ≡ ALL 3] or click Evaluate (λ).</pre>
</div>
</aside>
<script src="../../assets/hs-guile-scheme-repl.js?v=2.2.0"></script>
<script src="../../assets/hs-guile-scheme-repl.js?v=2.8.1"></script>
</body>
</html>
+1 -1
View File
@@ -1,2 +1,2 @@
// Auto-generated by hyperstitionstud_io.quant.daily_brief — DO NOT EDIT MANUALLY
window.HYPERSTITION_DAILY_BRIEF = {"$schema": "./schemas/v1/daily-portfolio-brief.schema.json", "$id": "urn:io:hyperstitionstud:schema:v1:daily-portfolio-brief", "version": "2.2.0", "run_number": 12, "generated_at_utc": "2026-12-01T01:01:54Z", "synthetic_data_eliminated": true, "agenda_1_executive_summary": {"headline_finding": "Late-November tape is governed by Vector G1/G4 Isometric Pinning (Dose 2, Posterior P(R2) = 0.0%), compressing median daily moves by -58% (101.0 bps vs. 240.5 bps baseline), while sovereign rates (US10Y 4.85%-4.94%, EFFR 3.88% == 388 KG nodes) cap long-duration multiple expansion.", "high_impact_findings_ranked": [{"rank": 1, "theme": "Dose 2 Isometric Pinning Dominance vs. Dose 3+ Tail Exhaustion", "durability_score": 0.84, "severity_score": 0.78, "portfolio_impact_probability": 0.81, "evidence": "Across 440 real Nov 2026 bars, Dose 2 (n=39) cut median moves to 101.0 bps (P90=292 bps, 60.6% next-day continuation), while all 8 Dose 3+ triple-confluence events were 100% downside selloffs averaging 1.98x volume and 377.5 bps next-day moves."}, {"rank": 2, "theme": "FRED Overnight Rate & Pipeline Margin Lock (EFFR = 388 bps, PPI MoM = -19 bps -> 137)", "durability_score": 0.88, "severity_score": 0.72, "portfolio_impact_probability": 0.79, "evidence": "EFFR holds at 3.88% (388 bps == 388 Knowledge Graph nodes) with SOFR at 3.98% (+10 bps repo spread), while PPI MoM (-19 bps -> 'nineteen'/'nainteen' = 137 [G4 Isometric]) undercuts CPI MoM (+35 bps -> 166) by -54 bps."}, {"rank": 3, "theme": "Synchronous Crypto & AI Hardware Coordinate Locks (BTC/ETH -91 bps, GOOGL -108 bps -> 292, SOL $73.07 == 73)", "durability_score": 0.76, "severity_score": 0.74, "portfolio_impact_probability": 0.75, "evidence": "SOL-USD locked onto its own ticker AQ ($73.07 == SOL=73) before surging +536 bps next day; GOOGL -108 bps locked onto Gen 0 292 (Dossier 62); BTC-USD and ETH-USD posted a simultaneous -91 bps (kampyoot=91) lock on 2026-11-26/28."}], "risk_on_off_barometers": {"vix_close": 23.81, "us10y_yield_pct": 4.94, "btc_latest_change_bps": -44, "copper_hg_latest_change_bps": 181, "effr_overnight_pct": 3.88, "sofr_overnight_pct": 3.98, "sofr_minus_effr_spread_bps": 10, "real_m2_mom_growth_bps": 16}, "bayesian_regime_inference": {"extant_priors": {"R1_BULL_RISK_ON": 0.0, "R2_PINNED_ISOMETRIC": 0.0, "R3_TAIL_DRAWDOWN_RISK_OFF": 1.0}, "likelihood_factors": {"R1_BULL_RISK_ON": 0.6354, "R2_PINNED_ISOMETRIC": 0.805, "R3_TAIL_DRAWDOWN_RISK_OFF": 3.5063}, "posterior_probabilities": {"R1_BULL_RISK_ON": 0.0, "R2_PINNED_ISOMETRIC": 0.0, "R3_TAIL_DRAWDOWN_RISK_OFF": 1.0}, "scenarios": {"best_case_r1_bull_risk_on": {"probability": 0.0, "label": "Best Case — Risk-On Expansion & Smooth Trend Continuation", "expected_daily_excursion_bps": "P50: +180 to +240 bps (Up-skewed S1/S2 leadership)", "drivers": "Real M2 positive growth (+16 bps MoM), easing PPI pipeline (-19 bps MoM), and VIX compression."}, "base_case_r2_pinned_isometric": {"probability": 0.0, "label": "Base Case — Vector G1/G4 Isometric Attractor Pinning (Dose 2 Regime)", "expected_daily_excursion_bps": "P50: 101.0 bps | P90 Tail: 292.0 bps (-58% variance compression vs. Dose 0)", "drivers": "Cross-species Market Ring × Same-Day Dossier Coordinate locks without headline shocks (60.6% next-day continuation)."}, "worst_case_r3_tail_drawdown": {"probability": 1.0, "label": "Worst Case — Dose 3+ Phase-Transition Drawdown & Sovereign Yield Tightening", "expected_daily_excursion_bps": "Next-Day Mean: -377.5 bps | 3-Day Cumulative Excursion: 1,395.0 bps (~13.95%)", "drivers": "US10Y near 4.85%-4.94% + triple-species Dose 3+ collisions (100% downside skew & 1.98x mean volume in Nov 2026)."}}}}, "agenda_2_confirming_signals": {"summary": "Macro liquidity expansion (Real M2 +16 bps MoM, M1 +52 bps MoM) and easing producer input costs (PPI -19 bps MoM) support S1/S3 operating margins, while Dose 2 dossier-tape locks confirm quiet accumulation.", "active_dose2_confirmations": [{"date_utc": "2026-11-30", "symbol": "BTC-USD", "entity_ing": "bitkoin", "close_usd": 59696.43, "change_bps": -44, "volume_ratio_20d": 0.77, "shared_dossier_coordinates": [189], "dose_taxon_label": "Dose 2: G1/G4 Pinning Well"}, {"date_utc": "2026-11-29", "symbol": "SOL-USD", "entity_ing": "sohlana", "close_usd": 71.34, "change_bps": 125, "volume_ratio_20d": 0.73, "shared_dossier_coordinates": [71, 125], "dose_taxon_label": "Dose 2: G1/G4 Pinning Well"}, {"date_utc": "2026-11-28", "symbol": "BTC-USD", "entity_ing": "bitkoin", "close_usd": 59321.42, "change_bps": -91, "volume_ratio_20d": 0.38, "shared_dossier_coordinates": [91], "dose_taxon_label": "Dose 2: G1/G4 Pinning Well"}, {"date_utc": "2026-11-28", "symbol": "ETH-USD", "entity_ing": "edheroom", "close_usd": 1645.99, "change_bps": -91, "volume_ratio_20d": 0.52, "shared_dossier_coordinates": [91], "dose_taxon_label": "Dose 2: G1/G4 Pinning Well"}, {"date_utc": "2026-11-28", "symbol": "SOL-USD", "entity_ing": "sohlana", "close_usd": 70.46,Line truncated
window.HYPERSTITION_DAILY_BRIEF = {"$schema": "./schemas/v1/daily-portfolio-brief.schema.json", "$id": "urn:io:hyperstitionstud:schema:v1:daily-portfolio-brief", "version": "2.4.0", "run_number": 18, "generated_at_utc": "2026-12-01T03:15:46Z", "synthetic_data_eliminated": true, "agenda_1_executive_summary": {"headline_finding": "Late-November tape is governed by Vector G1/G4 Isometric Pinning (Dose 2, Posterior P(R2) = 0.0%), compressing median daily moves by -58% (101.0 bps vs. 240.5 bps baseline), while sovereign rates (US10Y 4.85%-4.94%, EFFR 3.88% == 388 KG nodes) cap long-duration multiple expansion.", "high_impact_findings_ranked": [{"rank": 1, "theme": "Dose 2 Isometric Pinning Dominance vs. Dose 3+ Tail Exhaustion", "durability_score": 0.84, "severity_score": 0.78, "portfolio_impact_probability": 0.81, "evidence": "Across 440 real Nov 2026 bars, Dose 2 (n=39) cut median moves to 101.0 bps (P90=292 bps, 60.6% next-day continuation), while all 8 Dose 3+ triple-confluence events were 100% downside selloffs averaging 1.98x volume and 377.5 bps next-day moves."}, {"rank": 2, "theme": "FRED Overnight Rate & Pipeline Margin Lock (EFFR = 388 bps, PPI MoM = -19 bps -> 137)", "durability_score": 0.88, "severity_score": 0.72, "portfolio_impact_probability": 0.79, "evidence": "EFFR holds at 3.88% (388 bps == 388 Knowledge Graph nodes) with SOFR at 3.98% (+10 bps repo spread), while PPI MoM (-19 bps -> 'nineteen'/'nainteen' = 137 [G4 Isometric]) undercuts CPI MoM (+35 bps -> 166) by -54 bps."}, {"rank": 3, "theme": "Synchronous Crypto & AI Hardware Coordinate Locks (BTC/ETH -91 bps, GOOGL -108 bps -> 292, SOL $73.07 == 73)", "durability_score": 0.76, "severity_score": 0.74, "portfolio_impact_probability": 0.75, "evidence": "SOL-USD locked onto its own ticker AQ ($73.07 == SOL=73) before surging +536 bps next day; GOOGL -108 bps locked onto Gen 0 292 (Dossier 62); BTC-USD and ETH-USD posted a simultaneous -91 bps (kampyoot=91) lock on 2026-11-26/28."}], "risk_on_off_barometers": {"vix_close": 23.81, "us10y_yield_pct": 4.94, "btc_latest_change_bps": -44, "copper_hg_latest_change_bps": 181, "effr_overnight_pct": 3.88, "sofr_overnight_pct": 3.98, "sofr_minus_effr_spread_bps": 10, "real_m2_mom_growth_bps": 16}, "bayesian_regime_inference": {"extant_priors": {"R1_BULL_RISK_ON": 0.0, "R2_PINNED_ISOMETRIC": 0.0, "R3_TAIL_DRAWDOWN_RISK_OFF": 1.0}, "likelihood_factors": {"R1_BULL_RISK_ON": 0.6354, "R2_PINNED_ISOMETRIC": 0.805, "R3_TAIL_DRAWDOWN_RISK_OFF": 3.5063}, "posterior_probabilities": {"R1_BULL_RISK_ON": 0.0, "R2_PINNED_ISOMETRIC": 0.0, "R3_TAIL_DRAWDOWN_RISK_OFF": 1.0}, "scenarios": {"best_case_r1_bull_risk_on": {"probability": 0.0, "label": "Best Case — Risk-On Expansion & Smooth Trend Continuation", "expected_daily_excursion_bps": "P50: +180 to +240 bps (Up-skewed S1/S2 leadership)", "drivers": "Real M2 positive growth (+16 bps MoM), easing PPI pipeline (-19 bps MoM), and VIX compression."}, "base_case_r2_pinned_isometric": {"probability": 0.0, "label": "Base Case — Vector G1/G4 Isometric Attractor Pinning (Dose 2 Regime)", "expected_daily_excursion_bps": "P50: 101.0 bps | P90 Tail: 292.0 bps (-58% variance compression vs. Dose 0)", "drivers": "Cross-species Market Ring × Same-Day Dossier Coordinate locks without headline shocks (60.6% next-day continuation)."}, "worst_case_r3_tail_drawdown": {"probability": 1.0, "label": "Worst Case — Dose 3+ Phase-Transition Drawdown & Sovereign Yield Tightening", "expected_daily_excursion_bps": "Next-Day Mean: -377.5 bps | 3-Day Cumulative Excursion: 1,395.0 bps (~13.95%)", "drivers": "US10Y near 4.85%-4.94% + triple-species Dose 3+ collisions (100% downside skew & 1.98x mean volume in Nov 2026)."}}}}, "agenda_2_confirming_signals": {"summary": "Macro liquidity expansion (Real M2 +16 bps MoM, M1 +52 bps MoM) and easing producer input costs (PPI -19 bps MoM) support S1/S3 operating margins, while Dose 2 dossier-tape locks confirm quiet accumulation.", "active_dose2_confirmations": [{"date_utc": "2026-11-30", "symbol": "BTC-USD", "entity_ing": "bitkoin", "close_usd": 59696.43, "change_bps": -44, "volume_ratio_20d": 0.77, "shared_dossier_coordinates": [189], "dose_taxon_label": "Dose 2: G1/G4 Pinning Well"}, {"date_utc": "2026-11-29", "symbol": "SOL-USD", "entity_ing": "sohlana", "close_usd": 71.34, "change_bps": 125, "volume_ratio_20d": 0.73, "shared_dossier_coordinates": [71, 125], "dose_taxon_label": "Dose 2: G1/G4 Pinning Well"}, {"date_utc": "2026-11-28", "symbol": "BTC-USD", "entity_ing": "bitkoin", "close_usd": 59321.42, "change_bps": -91, "volume_ratio_20d": 0.38, "shared_dossier_coordinates": [91], "dose_taxon_label": "Dose 2: G1/G4 Pinning Well"}, {"date_utc": "2026-11-28", "symbol": "ETH-USD", "entity_ing": "edheroom", "close_usd": 1645.99, "change_bps": -91, "volume_ratio_20d": 0.52, "shared_dossier_coordinates": [91], "dose_taxon_label": "Dose 2: G1/G4 Pinning Well"}, {"date_utc": "2026-11-28", "symbol": "SOL-USD", "entity_ing": "sohlana", "close_usd": 70.46,Line truncated
+8 -8
View File
@@ -1,9 +1,9 @@
{
"$schema": "./schemas/v1/daily-portfolio-brief.schema.json",
"$id": "urn:io:hyperstitionstud:schema:v1:daily-portfolio-brief",
"version": "2.2.0",
"run_number": 12,
"generated_at_utc": "2026-12-01T01:01:54Z",
"version": "2.4.0",
"run_number": 18,
"generated_at_utc": "2026-12-01T03:15:46Z",
"synthetic_data_eliminated": true,
"agenda_1_executive_summary": {
"headline_finding": "Late-November tape is governed by Vector G1/G4 Isometric Pinning (Dose 2, Posterior P(R2) = 0.0%), compressing median daily moves by -58% (101.0 bps vs. 240.5 bps baseline), while sovereign rates (US10Y 4.85%-4.94%, EFFR 3.88% == 388 KG nodes) cap long-duration multiple expansion.",
@@ -378,8 +378,8 @@
]
},
"agenda_4_delta_since_last_run": {
"prior_run_number": 11,
"current_run_number": 12,
"prior_run_number": 17,
"current_run_number": 18,
"latest_wire_dossier": {
"date_utc": "2026-11-30",
"dossier_number": 72,
@@ -432,13 +432,13 @@
},
"agenda_5_daily_key_macro_question_and_rigor": {
"prior_question_grading": {
"prior_question_id": "Q-RUN-0011",
"prior_question_id": "Q-RUN-0017",
"prior_question_text": "Will the synchronous -91 bps (kampyoot / kleenroom) Dose 2 pinning wave across BTC-USD and ETH-USD and NVDA's +80 bps ('eighty' = 128 [S3]) lock hold inside the P50 <= 150 bps isometric corridor, or will US10Y yields near 4.85%-4.94% and SOFR-EFFR (+10 bps) trigger a Dose 3+ high-volume (>1.5x Vol20d) breakout?",
"status": "EVALUATED_ON_REAL_TAPE",
"evidence_summary": "Late-November real tape logged 12 Dose 2 isometric pinning sessions (including 2026-11-24 GOOGL -108 bps -> 292 and 2026-11-28 BTC/ETH -91 bps sync wave) with 0 new Dose 3+ drawdown shocks after Nov 19, confirming Base-Case R2 variance compression."
},
"active_daily_question": {
"question_id": "Q-RUN-0012",
"question_id": "Q-RUN-0018",
"question_text": "Will the synchronous -91 bps (kampyoot / kleenroom) Dose 2 pinning wave across BTC-USD and ETH-USD and NVDA's +80 bps ('eighty' = 128 [S3]) lock hold inside the P50 <= 150 bps isometric corridor, or will US10Y yields near 4.85%-4.94% and SOFR-EFFR (+10 bps) trigger a Dose 3+ high-volume (>1.5x Vol20d) breakout?",
"confirmation_threshold_r2_pin": "Next-session median displacement across locked S1/S2/S3 leaders remains <= 150 bps with Vol20d < 1.15x.",
"falsification_threshold_r3_breakout": "Any S1/S2/S3 keystone logs a Dose 3+ headline-coupled session with Vol20d >= 1.50x or change_bps <= -300 bps."
@@ -477,6 +477,6 @@
}
},
"ipld_dag_json_cidv1": {
"/": "baguqeeratalw7a3v4wps5vffanzkikbrk32tgjlrkyx3d64jfivp3raku4oq"
"/": "baguqeera6yv3xbdw7lqkus3jrvykxl67ayxmbhsuy6oimpu6e722rbp6zweq"
}
}
+10 -43
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Quantitative Finance &amp; Memetic Gematria Time-Series Workbench — hyperstitionstud.io/quant</title>
<link rel="stylesheet" href="../assets/hs-group3-basalt-chamfer.css?v=2.2.0" />
<link rel="stylesheet" href="../assets/hs-group3-basalt-chamfer.css?v=2.8.1" />
<style>
:root {
--bg-canvas: #020617;
@@ -46,40 +46,6 @@
h1 { font-size: 1.18rem; font-weight: 700; color: var(--text-main); }
.subtitle { font-size: 0.74rem; color: var(--text-muted); margin-top: 0.25rem; }
.top-nav { margin-left: auto; display: flex; gap: 0.45rem; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.nav-donate-sep { width: 1px; height: 20px; background: var(--border); margin: 0 0.2rem; display: inline-block; flex-shrink: 0; }
.btn-donate-pill {
height: 34px;
border-radius: 999px;
padding: 0.28rem 0.9rem 0.28rem 0.35rem;
background: linear-gradient(180deg, #ffd86b 0%, #f59e0b 52%, #d97706 100%);
color: #020617;
border: 1px solid #f5c630;
box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.55), 0 2px 8px rgba(245, 158, 11, 0.22);
display: inline-flex;
align-items: center;
gap: 0.45rem;
font-size: 0.74rem;
font-weight: 700;
letter-spacing: 0.05em;
text-decoration: none;
flex-shrink: 0;
transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.btn-donate-pill:hover { filter: brightness(1.06); transform: translateY(-1px); color: #020617; }
.donate-pill-emblem {
width: 20px;
height: 20px;
border-radius: 50%;
background: #0f172a;
color: var(--rose);
border: 1px solid rgba(245, 198, 48, 0.7);
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 0.68rem;
line-height: 1;
flex-shrink: 0;
}
.btn, select {
text-decoration: none;
background: var(--bg-card);
@@ -329,14 +295,14 @@
padding-top: 1rem;
}
</style>
<script src="quant-timeseries-data.js?v=2.2.0"></script>
<script src="quant-timeseries-data.js?v=2.8.1"></script>
</head>
<body>
<div class="container">
<header>
<div>
<h1>hyperstitionstud.io/quant — Quantitative Finance &amp; Memetic Gematria Time-Series Workbench</h1>
<p class="subtitle">Strictly Periodic Telemetry (21:30 UTC US Closing Bell &times; 00:00 UTC News-Wire Dossiers) &bull; Lens-Neutral Schema (urn:io:hyperstitionstud:quant-timeseries:v2.2.0)</p>
<p class="subtitle">Strictly Periodic Telemetry (21:30 UTC US Closing Bell &times; 00:00 UTC News-Wire Dossiers &bull; 24 Watchlist Instruments &bull; 14 FRED Macro Series) &bull; Lens-Neutral Schema (urn:io:hyperstitionstud:quant-timeseries:v2.8.1) <span class="hs-sigil-seal" aria-hidden="true">[ &#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; ]</span></p>
</div>
<nav class="top-nav">
<a class="btn" id="navHome" href="/">Portal Home (/)</a>
@@ -347,7 +313,7 @@
<a class="btn" id="navCalc" href="/calc/index.html">AQ Calculator (/calc/)</a>
<a class="btn" id="navManual" href="/quant/OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH.pdf" target="_blank">Operator's Manual (PDF)</a>
<span class="nav-donate-sep" aria-hidden="true"></span>
<a class="btn-donate-pill" id="navDonate" href="/donate/index.html" title="Signal Patronage &amp; Open-Instrument Notes (/donate/)"><span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>
<a class="btn-donate-pill" id="navDonate" href="/donate/index.html?from=quant" title="Signal Patronage &amp; Open-Instrument Notes (/donate/)"><span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>
</nav>
</header>
@@ -477,12 +443,13 @@
<div id="quantInfoPopover" role="dialog" aria-hidden="true"></div>
<footer>
hyperstitionstud.io/quant v2.2.0 &bull; Made with <span class="hs-heart" style="color:#ff4d4d;">&#x2665;</span> by Lemurs.
hyperstitionstud.io/quant v2.8.1 &bull; <span class="hs-sigil-colophon" aria-hidden="true">&#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; &middot; &#x2644;</span> &bull; Made with <span class="hs-heart" style="color:#ff4d4d;">&#x2665;</span> by Lemurs.
</footer>
</div>
<script src="real-macro-indicators-data.js?v=2.2.0"></script>
<script src="daily-brief-data.js?v=2.2.0"></script>
<script src="quant-app.js?v=2.2.0"></script>
<script src="quant-tutorials.js?v=2.2.0"></script>
<script src="../assets/hs-matrix-coderain.js?v=2.8.1" defer></script>
<script src="real-macro-indicators-data.js?v=2.8.1"></script>
<script src="daily-brief-data.js?v=2.8.1"></script>
<script src="quant-app.js?v=2.8.1"></script>
<script src="quant-tutorials.js?v=2.8.1"></script>
</body>
</html>
+1 -1
View File
@@ -1,5 +1,5 @@
// /workspace/hyperstitionstudio-core/site/quant/quant-app.js
// Interactive Quantitative Finance & Memetic Gematria Time-Series Workbench (v2.2.0)
// Interactive Quantitative Finance & Memetic Gematria Time-Series Workbench (v2.8.1)
(function () {
"use strict";
+1 -1
View File
@@ -1,3 +1,3 @@
// Auto-generated synchronous time-series bundle for file:// and https:// portability
window.HyperstitionStudio = window.HyperstitionStudio || {};
window.HyperstitionStudio.QuantTimeSeries = {"$schema": "./schemas/v1/quant-timeseries.schema.json", "$id": "urn:io:hyperstitionstud:schema:v1:quant-timeseries", "version": "2.2.0", "namespace_urn": "urn:io:hyperstitionstud:quant-timeseries:2.2.0", "generated_at_utc": "2026-12-01T01:01:50Z", "synthetic_data_eliminated": true, "periodicity_gate": {"enforced": true, "allowed_cadences": ["1d-us-closing-bell-2130-utc", "24h-news-wire-rollover-0000-utc"], "dated_news_dossiers_ingested": 22, "excluded_non_periodic_sources": ["01-ingglish-aq-lexicon.md", "10-19-ledger-*.md", "20-24-dossier-*.md", "26-45-dossier-*.md", "65-69-dossier-technocapital-singularity-*.md", "technocapital-singularity-zoology/encyclopedia/*", "proposal-*.md", "lecture-*.md", "podcast-ep*.md", "haiperdohp-jemaytreeah/db.json"], "non_periodic_records_ingested": 0, "missing_data_policy": "No data available (never synthesized or interpolated)"}, "enabled_lenses": ["fund_manager", "neutral_math", "corporate_board", "tierzoo_ecology", "fantasy_sabermetrics", "pokedex_scanner"], "default_lens": "fund_manager", "lens_registry_meta": {"fund_manager": {"lens_id": "fund_manager", "title": "Quantitative Hedge Fund & Factor Risk", "short_label": "Quant Factor", "structural_labels": {"struct_isometric_armor": "Chokepoint Moat", "struct_drift_velocity": "Signal Velocity", "struct_variance_collapse": "Convergence Power", "struct_trophic_capture": "Institutional Coupling", "struct_prime_density": "Idiosyncratic Asymmetry", "struct_repricing_resilience": "Regime Robustness"}, "timeseries_labels": {"ts_duty_cycle_pct": "Signal Duty Cycle / Hit Rate (%)", "ts_weighted_resonance": "Conviction-Weighted Exposure (0-100)", "ts_excess_over_replacement": "Information Ratio / Alpha Over Benchmark", "ts_quantile_profile": "Downside VaR_20 / Upside P90 / Convexity CV", "ts_optimal_lag_days": "Granger Lead-Lag Horizon τ* (Days)", "ts_regime_splits": "Regime-Conditional Beta Split (M1/M2/M3)"}}, "neutral_math": {"lens_id": "neutral_math", "title": "Neutral Mathematical & Statistical Invariants", "short_label": "Neutral Math", "structural_labels": {"struct_isometric_armor": "G4 Isometric Ratio (Δ=0)", "struct_drift_velocity": "G3 Inverse Phonemic Drift", "struct_variance_collapse": "G1 Log Variance Collapse", "struct_trophic_capture": "Bipartite S×S6 Coupling Degree", "struct_prime_density": "G5 Prime & Twin-Prime Density", "struct_repricing_resilience": "Repricing Counter-Swap Closure"}, "timeseries_labels": {"ts_duty_cycle_pct": "Active Duty Cycle Pr[X_t > 0] (%)", "ts_weighted_resonance": "Weighted Resonance Index (0-100)", "ts_excess_over_replacement": "Excess Value Over Baseline (σ-Units)", "ts_quantile_profile": "Quantile Spread (P20 / P90 / CV)", "ts_optimal_lag_days": "Peak Cross-Correlation Lag τ* (Days)", "ts_regime_splits": "Conditional Regime Delta E[X|S_t] - μ"}}, "corporate_board": {"lens_id": "corporate_board", "title": "Corporate Strategy & Balance-Sheet Governance", "short_label": "Corporate Board", "structural_labels": {"struct_isometric_armor": "Supply-Chain Moat", "struct_drift_velocity": "Execution Agility", "struct_variance_collapse": "Cross-Unit Synergy", "struct_trophic_capture": "Governance & Balance-Sheet Integration", "struct_prime_density": "Proprietary IP Density", "struct_repricing_resilience": "Stress-Test Resilience"}, "timeseries_labels": {"ts_duty_cycle_pct": "Operational Utilization Cadence (%)", "ts_weighted_resonance": "Strategic Capital Share (0-100)", "ts_excess_over_replacement": "Net Economic Value Added (EVA)", "ts_quantile_profile": "Base-Case Floor / Upside Case / Variance", "ts_optimal_lag_days": "Guidance-to-Market Lead Time τ* (Days)", "ts_regime_splits": "Macro Stress-Scenario Delta (Halt/Surge/Cap)"}}, "tierzoo_ecology": {"lens_id": "tierzoo_ecology", "title": "TierZoo Ecological Trophic Index (ETI)", "short_label": "TierZoo (ETI)", "structural_labels": {"struct_isometric_armor": "ARM (G4 Isometric Chokepoint Armor)", "struct_drift_velocity": "VEL (Teleoplexic Escape Velocity)", "struct_variance_collapse": "COL (G1 Variance-Collapse Compression)", "struct_trophic_capture": "CAP (S×S6 Double-Articulation & Capture)", "struct_prime_density": "PRM (Prime & G5 Twin-Prime Mutation IQ)", "struct_repricing_resilience": "RES (Tri-Modal Repricing & State Resilience)"}, "timeseries_labels": {"ts_duty_cycle_pct": "Foraging Activity Duty Cycle (%)", "ts_weighted_resonance": "Trophic Dominance Rating (0-100)", "ts_excess_over_replacement": "Apex Surplus Over Extinction Floor", "ts_quantile_profile": "Metabolic Floor / Burst Ceiling / Niche CV", "ts_optimal_lag_days": "Predator-Prey Phase Lead τ* (Days)", "ts_regime_splits": "Biome Weather Adaptation Split (M1/M2/M3)"}}, "fantasy_sabermetrics": {"lens_id": "fantasy_sabermetrics", "title": "Fantasy Football & Sabermetric Roster Engine", "short_label": "Fantasy Sabermetrics", "structural_labels": {"struct_isometric_armor": "Pass Protection (OL Chokepoint Block)", "struct_drift_veLine truncated
window.HyperstitionStudio.QuantTimeSeries = {"$schema": "./schemas/v1/quant-timeseries.schema.json", "$id": "urn:io:hyperstitionstud:schema:v1:quant-timeseries", "version": "2.4.0", "namespace_urn": "urn:io:hyperstitionstud:quant-timeseries:2.4.0", "generated_at_utc": "2026-12-01T03:15:42Z", "synthetic_data_eliminated": true, "periodicity_gate": {"enforced": true, "allowed_cadences": ["1d-us-closing-bell-2130-utc", "24h-news-wire-rollover-0000-utc"], "dated_news_dossiers_ingested": 22, "excluded_non_periodic_sources": ["01-ingglish-aq-lexicon.md", "10-19-ledger-*.md", "20-24-dossier-*.md", "26-45-dossier-*.md", "65-69-dossier-technocapital-singularity-*.md", "technocapital-singularity-zoology/encyclopedia/*", "proposal-*.md", "lecture-*.md", "podcast-ep*.md", "haiperdohp-jemaytreeah/db.json"], "non_periodic_records_ingested": 0, "missing_data_policy": "No data available (never synthesized or interpolated)"}, "enabled_lenses": ["fund_manager", "neutral_math", "corporate_board", "tierzoo_ecology", "fantasy_sabermetrics", "pokedex_scanner"], "default_lens": "fund_manager", "lens_registry_meta": {"fund_manager": {"lens_id": "fund_manager", "title": "Quantitative Hedge Fund & Factor Risk", "short_label": "Quant Factor", "structural_labels": {"struct_isometric_armor": "Chokepoint Moat", "struct_drift_velocity": "Signal Velocity", "struct_variance_collapse": "Convergence Power", "struct_trophic_capture": "Institutional Coupling", "struct_prime_density": "Idiosyncratic Asymmetry", "struct_repricing_resilience": "Regime Robustness"}, "timeseries_labels": {"ts_duty_cycle_pct": "Signal Duty Cycle / Hit Rate (%)", "ts_weighted_resonance": "Conviction-Weighted Exposure (0-100)", "ts_excess_over_replacement": "Information Ratio / Alpha Over Benchmark", "ts_quantile_profile": "Downside VaR_20 / Upside P90 / Convexity CV", "ts_optimal_lag_days": "Granger Lead-Lag Horizon τ* (Days)", "ts_regime_splits": "Regime-Conditional Beta Split (M1/M2/M3)"}}, "neutral_math": {"lens_id": "neutral_math", "title": "Neutral Mathematical & Statistical Invariants", "short_label": "Neutral Math", "structural_labels": {"struct_isometric_armor": "G4 Isometric Ratio (Δ=0)", "struct_drift_velocity": "G3 Inverse Phonemic Drift", "struct_variance_collapse": "G1 Log Variance Collapse", "struct_trophic_capture": "Bipartite S×S6 Coupling Degree", "struct_prime_density": "G5 Prime & Twin-Prime Density", "struct_repricing_resilience": "Repricing Counter-Swap Closure"}, "timeseries_labels": {"ts_duty_cycle_pct": "Active Duty Cycle Pr[X_t > 0] (%)", "ts_weighted_resonance": "Weighted Resonance Index (0-100)", "ts_excess_over_replacement": "Excess Value Over Baseline (σ-Units)", "ts_quantile_profile": "Quantile Spread (P20 / P90 / CV)", "ts_optimal_lag_days": "Peak Cross-Correlation Lag τ* (Days)", "ts_regime_splits": "Conditional Regime Delta E[X|S_t] - μ"}}, "corporate_board": {"lens_id": "corporate_board", "title": "Corporate Strategy & Balance-Sheet Governance", "short_label": "Corporate Board", "structural_labels": {"struct_isometric_armor": "Supply-Chain Moat", "struct_drift_velocity": "Execution Agility", "struct_variance_collapse": "Cross-Unit Synergy", "struct_trophic_capture": "Governance & Balance-Sheet Integration", "struct_prime_density": "Proprietary IP Density", "struct_repricing_resilience": "Stress-Test Resilience"}, "timeseries_labels": {"ts_duty_cycle_pct": "Operational Utilization Cadence (%)", "ts_weighted_resonance": "Strategic Capital Share (0-100)", "ts_excess_over_replacement": "Net Economic Value Added (EVA)", "ts_quantile_profile": "Base-Case Floor / Upside Case / Variance", "ts_optimal_lag_days": "Guidance-to-Market Lead Time τ* (Days)", "ts_regime_splits": "Macro Stress-Scenario Delta (Halt/Surge/Cap)"}}, "tierzoo_ecology": {"lens_id": "tierzoo_ecology", "title": "TierZoo Ecological Trophic Index (ETI)", "short_label": "TierZoo (ETI)", "structural_labels": {"struct_isometric_armor": "ARM (G4 Isometric Chokepoint Armor)", "struct_drift_velocity": "VEL (Teleoplexic Escape Velocity)", "struct_variance_collapse": "COL (G1 Variance-Collapse Compression)", "struct_trophic_capture": "CAP (S×S6 Double-Articulation & Capture)", "struct_prime_density": "PRM (Prime & G5 Twin-Prime Mutation IQ)", "struct_repricing_resilience": "RES (Tri-Modal Repricing & State Resilience)"}, "timeseries_labels": {"ts_duty_cycle_pct": "Foraging Activity Duty Cycle (%)", "ts_weighted_resonance": "Trophic Dominance Rating (0-100)", "ts_excess_over_replacement": "Apex Surplus Over Extinction Floor", "ts_quantile_profile": "Metabolic Floor / Burst Ceiling / Niche CV", "ts_optimal_lag_days": "Predator-Prey Phase Lead τ* (Days)", "ts_regime_splits": "Biome Weather Adaptation Split (M1/M2/M3)"}}, "fantasy_sabermetrics": {"lens_id": "fantasy_sabermetrics", "title": "Fantasy Football & Sabermetric Roster Engine", "short_label": "Fantasy Sabermetrics", "structural_labels": {"struct_isometric_armor": "Pass Protection (OL Chokepoint Block)", "struct_drift_veLine truncated
+4 -4
View File
@@ -7034,7 +7034,7 @@
"fantasy_sabermetrics",
"pokedex_scanner"
],
"generated_at_utc": "2026-12-01T01:01:50Z",
"generated_at_utc": "2026-12-01T03:15:42Z",
"instruments": [
{
"available_trading_days": 19,
@@ -38684,7 +38684,7 @@
}
],
"ipld_dag_json_cidv1": {
"/": "baguqeeraquxzowbglqtcjr5b7aov5vwnhtkpqq3ewgs7jxtt6x7gwcwrmk3q"
"/": "baguqeera2upbzfk5bibrhcsrij3a4hkblmgppvwvabz5pm6hx3ldrjzharza"
},
"isolation_receipt": {
"all_unchanged": true,
@@ -38830,7 +38830,7 @@
"title": "TierZoo Ecological Trophic Index (ETI)"
}
},
"namespace_urn": "urn:io:hyperstitionstud:quant-timeseries:2.2.0",
"namespace_urn": "urn:io:hyperstitionstud:quant-timeseries:2.4.0",
"periodicity_gate": {
"allowed_cadences": [
"1d-us-closing-bell-2130-utc",
@@ -38854,5 +38854,5 @@
"non_periodic_records_ingested": 0
},
"synthetic_data_eliminated": true,
"version": "2.2.0"
"version": "2.4.0"
}
+2 -2
View File
@@ -1,5 +1,5 @@
// /workspace/hyperstitionstudio-core/site/quant/quant-tutorials.js
// Option B Zero-MP4 Interactive HTML5 Canvas Tutorial Player & Deep-Link Choreographer (v2.2.0)
// Option B Zero-MP4 Interactive HTML5 Canvas Tutorial Player & Deep-Link Choreographer (v2.8.1)
(function () {
"use strict";
@@ -633,7 +633,7 @@
}
window.HyperstitionStudio.QuantTutorials = {
version: "2.2.0",
version: "2.8.1",
episodes: EPISODES,
adaptHrefForFileProtocol: adaptHrefForFileProtocol,
init: initTutorials
+1 -1
View File
@@ -1,2 +1,2 @@
// Auto-generated by hyperstitionstud_io.quant.macro — DO NOT EDIT MANUALLY
window.HYPERSTITION_MACRO_DATA = {"$schema": "./schemas/v1/macro-indicators.schema.json", "$id": "urn:io:hyperstitionstud:schema:v1:macro-indicators", "version": "2.2.0", "generated_at_utc": "2026-12-01T01:01:52Z", "synthetic_data_eliminated": true, "cadence_policy": "native_cadence_preserved_no_interpolation_null_when_unavailable", "source": "fred_stlouisfed_keyless_csv", "series_count": 14, "series": {"cpi": {"series_id": "CPIAUCSL", "slug": "cpi", "label": "CPI (Consumer Price Index: All Urban Consumers)", "cadence": "1mo", "unit": "Index (1982-84=100)", "guilds": ["S6", "S2"], "data_available": true, "status": "ok", "latest_date_utc": "2026-10-01", "latest_value": 337.476, "prior_date_utc": "2026-09-01", "prior_value": 336.298, "period_change_bps": 35, "period_change_pct": 0.35, "yoy_change_pct": null, "yoy_change_bps": null, "aq_evaluation": {"face_int": 337, "digit_aq": 13, "spoken_eng": "three hundred thirty seven", "spoken_eng_aq": 502, "spoken_ing": "three huhndrad therdee sevan", "spoken_ing_aq": 485, "prime_rank_face": 68, "prime_rank_spoken_ing": null, "ring_coordinates": [], "ring_partners": {}}, "change_aq_evaluation": {"face_int": 35, "digit_aq": 8, "spoken_eng": "thirty five", "spoken_eng_aq": 232, "spoken_ing": "therdee faiv", "spoken_ing_aq": 202, "prime_rank_face": null, "prime_rank_spoken_ing": null, "ring_coordinates": [], "ring_partners": {}}, "missing_observation_dates": [], "recent_observations": [{"date_utc": "2026-09-01", "data_available": true, "status": "ok", "value": 336.298}, {"date_utc": "2026-10-01", "data_available": true, "status": "ok", "value": 337.476}]}, "ppi": {"series_id": "PPIACO", "slug": "ppi", "label": "PPI (Producer Price Index: All Commodities)", "cadence": "1mo", "unit": "Index (1982=100)", "guilds": ["S3", "S6"], "data_available": true, "status": "ok", "latest_date_utc": "2026-10-01", "latest_value": 293.921, "prior_date_utc": "2026-09-01", "prior_value": 294.473, "period_change_bps": -19, "period_change_pct": -0.19, "yoy_change_pct": null, "yoy_change_bps": null, "aq_evaluation": {"face_int": 294, "digit_aq": 15, "spoken_eng": "two hundred ninety four", "spoken_eng_aq": 459, "spoken_ing": "too huhndrad naintee for", "spoken_ing_aq": 424, "prime_rank_face": null, "prime_rank_spoken_ing": null, "ring_coordinates": [], "ring_partners": {}}, "change_aq_evaluation": {"face_int": 19, "digit_aq": 10, "spoken_eng": "nineteen", "spoken_eng_aq": 158, "spoken_ing": "nainteen", "spoken_ing_aq": 154, "prime_rank_face": 8, "prime_rank_spoken_ing": null, "ring_coordinates": [], "ring_partners": {}}, "missing_observation_dates": [], "recent_observations": [{"date_utc": "2026-09-01", "data_available": true, "status": "ok", "value": 294.473}, {"date_utc": "2026-10-01", "data_available": true, "status": "ok", "value": 293.921}]}, "us10y": {"series_id": "DGS10", "slug": "us10y", "label": "US10Y (10-Year US Treasury Constant Maturity Yield)", "cadence": "1d", "unit": "Percent (%)", "guilds": ["S6", "S1"], "data_available": true, "status": "ok", "latest_date_utc": "2026-11-25", "latest_value": 4.85, "prior_date_utc": "2026-11-24", "prior_value": 4.91, "period_change_bps": -6, "period_change_pct": -0.06, "yoy_change_pct": null, "yoy_change_bps": null, "aq_evaluation": {"face_int": 485, "digit_aq": 17, "spoken_eng": "four hundred eighty five", "spoken_eng_aq": 439, "spoken_ing": "for huhndrad aytee faiv", "spoken_ing_aq": 391, "prime_rank_face": null, "prime_rank_spoken_ing": null, "ring_coordinates": [], "ring_partners": {}}, "change_aq_evaluation": {"face_int": 6, "digit_aq": 6, "spoken_eng": "six", "spoken_eng_aq": 79, "spoken_ing": "siks", "spoken_ing_aq": 94, "prime_rank_face": null, "prime_rank_spoken_ing": null, "ring_coordinates": [], "ring_partners": {}}, "missing_observation_dates": ["2026-11-26"], "recent_observations": [{"date_utc": "2026-11-24", "data_available": true, "status": "ok", "value": 4.91}, {"date_utc": "2026-11-25", "data_available": true, "status": "ok", "value": 4.85}, {"date_utc": "2026-11-26", "data_available": false, "status": "No data available", "value": null}]}, "effr": {"series_id": "EFFR", "slug": "effr", "label": "EFFR (Effective Federal Funds Overnight Lending Rate)", "cadence": "1d", "unit": "Percent (%)", "guilds": ["S6", "S2"], "data_available": true, "status": "ok", "latest_date_utc": "2026-11-27", "latest_value": 3.88, "prior_date_utc": "2026-11-25", "prior_value": 3.88, "period_change_bps": 0, "period_change_pct": 0.0, "yoy_change_pct": null, "yoy_change_bps": null, "aq_evaluation": {"face_int": 388, "digit_aq": 19, "spoken_eng": "three hundred eighty eight", "spoken_eng_aq": 460, "spoken_ing": "three huhndrad aytee ayt", "spoken_ing_aq": 425, "prime_rank_face": null, "prime_rank_spoken_ing": null, "ring_coordinates": [], "ring_partners": {}}, "change_aq_evaluation": {"face_int": 0, "digit_aq": 0, "spoken_eng": "zero", "spoken_eng_aq": 100, "spoken_ing": "zeeroh", "spoken_ing_aq": 131, "prime_rank_face": null, "prime_rank_spoken_ing": 32, "Line truncated
window.HYPERSTITION_MACRO_DATA = {"$schema": "./schemas/v1/macro-indicators.schema.json", "$id": "urn:io:hyperstitionstud:schema:v1:macro-indicators", "version": "2.4.0", "generated_at_utc": "2026-12-01T03:15:44Z", "synthetic_data_eliminated": true, "cadence_policy": "native_cadence_preserved_no_interpolation_null_when_unavailable", "source": "fred_stlouisfed_keyless_csv", "series_count": 14, "series": {"cpi": {"series_id": "CPIAUCSL", "slug": "cpi", "label": "CPI (Consumer Price Index: All Urban Consumers)", "cadence": "1mo", "unit": "Index (1982-84=100)", "guilds": ["S6", "S2"], "data_available": true, "status": "ok", "latest_date_utc": "2026-10-01", "latest_value": 337.476, "prior_date_utc": "2026-09-01", "prior_value": 336.298, "period_change_bps": 35, "period_change_pct": 0.35, "yoy_change_pct": null, "yoy_change_bps": null, "aq_evaluation": {"face_int": 337, "digit_aq": 13, "spoken_eng": "three hundred thirty seven", "spoken_eng_aq": 502, "spoken_ing": "three huhndrad therdee sevan", "spoken_ing_aq": 485, "prime_rank_face": 68, "prime_rank_spoken_ing": null, "ring_coordinates": [], "ring_partners": {}}, "change_aq_evaluation": {"face_int": 35, "digit_aq": 8, "spoken_eng": "thirty five", "spoken_eng_aq": 232, "spoken_ing": "therdee faiv", "spoken_ing_aq": 202, "prime_rank_face": null, "prime_rank_spoken_ing": null, "ring_coordinates": [], "ring_partners": {}}, "missing_observation_dates": [], "recent_observations": [{"date_utc": "2026-09-01", "data_available": true, "status": "ok", "value": 336.298}, {"date_utc": "2026-10-01", "data_available": true, "status": "ok", "value": 337.476}]}, "ppi": {"series_id": "PPIACO", "slug": "ppi", "label": "PPI (Producer Price Index: All Commodities)", "cadence": "1mo", "unit": "Index (1982=100)", "guilds": ["S3", "S6"], "data_available": true, "status": "ok", "latest_date_utc": "2026-10-01", "latest_value": 293.921, "prior_date_utc": "2026-09-01", "prior_value": 294.473, "period_change_bps": -19, "period_change_pct": -0.19, "yoy_change_pct": null, "yoy_change_bps": null, "aq_evaluation": {"face_int": 294, "digit_aq": 15, "spoken_eng": "two hundred ninety four", "spoken_eng_aq": 459, "spoken_ing": "too huhndrad naintee for", "spoken_ing_aq": 424, "prime_rank_face": null, "prime_rank_spoken_ing": null, "ring_coordinates": [], "ring_partners": {}}, "change_aq_evaluation": {"face_int": 19, "digit_aq": 10, "spoken_eng": "nineteen", "spoken_eng_aq": 158, "spoken_ing": "nainteen", "spoken_ing_aq": 154, "prime_rank_face": 8, "prime_rank_spoken_ing": null, "ring_coordinates": [], "ring_partners": {}}, "missing_observation_dates": [], "recent_observations": [{"date_utc": "2026-09-01", "data_available": true, "status": "ok", "value": 294.473}, {"date_utc": "2026-10-01", "data_available": true, "status": "ok", "value": 293.921}]}, "us10y": {"series_id": "DGS10", "slug": "us10y", "label": "US10Y (10-Year US Treasury Constant Maturity Yield)", "cadence": "1d", "unit": "Percent (%)", "guilds": ["S6", "S1"], "data_available": true, "status": "ok", "latest_date_utc": "2026-11-25", "latest_value": 4.85, "prior_date_utc": "2026-11-24", "prior_value": 4.91, "period_change_bps": -6, "period_change_pct": -0.06, "yoy_change_pct": null, "yoy_change_bps": null, "aq_evaluation": {"face_int": 485, "digit_aq": 17, "spoken_eng": "four hundred eighty five", "spoken_eng_aq": 439, "spoken_ing": "for huhndrad aytee faiv", "spoken_ing_aq": 391, "prime_rank_face": null, "prime_rank_spoken_ing": null, "ring_coordinates": [], "ring_partners": {}}, "change_aq_evaluation": {"face_int": 6, "digit_aq": 6, "spoken_eng": "six", "spoken_eng_aq": 79, "spoken_ing": "siks", "spoken_ing_aq": 94, "prime_rank_face": null, "prime_rank_spoken_ing": null, "ring_coordinates": [], "ring_partners": {}}, "missing_observation_dates": ["2026-11-26"], "recent_observations": [{"date_utc": "2026-11-24", "data_available": true, "status": "ok", "value": 4.91}, {"date_utc": "2026-11-25", "data_available": true, "status": "ok", "value": 4.85}, {"date_utc": "2026-11-26", "data_available": false, "status": "No data available", "value": null}]}, "effr": {"series_id": "EFFR", "slug": "effr", "label": "EFFR (Effective Federal Funds Overnight Lending Rate)", "cadence": "1d", "unit": "Percent (%)", "guilds": ["S6", "S2"], "data_available": true, "status": "ok", "latest_date_utc": "2026-11-27", "latest_value": 3.88, "prior_date_utc": "2026-11-25", "prior_value": 3.88, "period_change_bps": 0, "period_change_pct": 0.0, "yoy_change_pct": null, "yoy_change_bps": null, "aq_evaluation": {"face_int": 388, "digit_aq": 19, "spoken_eng": "three hundred eighty eight", "spoken_eng_aq": 460, "spoken_ing": "three huhndrad aytee ayt", "spoken_ing_aq": 425, "prime_rank_face": null, "prime_rank_spoken_ing": null, "ring_coordinates": [], "ring_partners": {}}, "change_aq_evaluation": {"face_int": 0, "digit_aq": 0, "spoken_eng": "zero", "spoken_eng_aq": 100, "spoken_ing": "zeeroh", "spoken_ing_aq": 131, "prime_rank_face": null, "prime_rank_spoken_ing": 32, "Line truncated
+3 -3
View File
@@ -1,8 +1,8 @@
{
"$schema": "./schemas/v1/macro-indicators.schema.json",
"$id": "urn:io:hyperstitionstud:schema:v1:macro-indicators",
"version": "2.2.0",
"generated_at_utc": "2026-12-01T01:01:52Z",
"version": "2.4.0",
"generated_at_utc": "2026-12-01T03:15:44Z",
"synthetic_data_eliminated": true,
"cadence_policy": "native_cadence_preserved_no_interpolation_null_when_unavailable",
"source": "fred_stlouisfed_keyless_csv",
@@ -1189,6 +1189,6 @@
}
},
"ipld_dag_json_cidv1": {
"/": "baguqeera45ggvwsz3pu54xm4jclg67uibe6ga32526jyedeykm3tlnvtgwga"
"/": "baguqeeraqplr353fdcgb6ebn4lzpb3xxdisxvu6w6eqq3oaep5qkwgbvpjjq"
}
}
+2 -2
View File
@@ -1,3 +1,3 @@
"""hyperstitionstud_io — Shared Common Library for the hyperstitionstud.io workspace (v2.2.0)."""
__version__ = "2.2.0"
"""hyperstitionstud_io — Shared Common Library for the hyperstitionstud.io workspace (v2.8.1)."""
__version__ = "2.8.1"
NAMESPACE_URN = "urn:io:hyperstitionstud"
@@ -118,8 +118,8 @@ def build_internal_test_baseline_snapshot(workspace_root: str | Path | None = No
html_surfaces: dict[str, dict[str, Any]] = {}
for h_route, req_markers, bad_markers in (
("/", [f"hs-group3-basalt-chamfer.css?v={CURRENT_VERSION}", "btn-donate-pill", "/engineering/index.html", "/math/index.html"], []),
("/quant/index.html", [f"hs-group3-basalt-chamfer.css?v={CURRENT_VERSION}", "macroIndicatorsPanel", "dailyBriefPanel", "/engineering/index.html", "/math/index.html"], []),
("/", [f"hs-group3-basalt-chamfer.css?v={CURRENT_VERSION}", "btn-donate-pill", "/engineering/index.html", "/math/index.html", "assets/closeups/quadrant-1-cybermemetics-calc-graph.png"], ["388 Graph Nodes", "1,282 Typed Edges", "24 Quant Tickers", "stat-row", "-manifest.json"]),
("/quant/index.html", [f"hs-group3-basalt-chamfer.css?v={CURRENT_VERSION}", "macroIndicatorsPanel", "dailyBriefPanel", "/engineering/index.html", "/math/index.html", "24 Watchlist Instruments"], []),
("/learn/index.html", [f"hs-group3-basalt-chamfer.css?v={CURRENT_VERSION}", "btn-donate-pill", "/engineering/index.html", "/math/index.html"], []),
("/donate/index.html", [f"hs-group3-basalt-chamfer.css?v={CURRENT_VERSION}", "primaryDonateActionBtn"], ["curiosityPills", "expInputA"]),
("/engineering/index.html", ["guileSchemeModeToggle", "hs-guile-cartridge", "hs-guile-scheme-repl.js"], []),
+358 -16
View File
@@ -177,6 +177,8 @@ CREATE TABLE IF NOT EXISTS api_endpoint_rollups (
method TEXT NOT NULL,
endpoint_pattern TEXT NOT NULL,
total_requests INTEGER NOT NULL DEFAULT 0,
external_requests INTEGER NOT NULL DEFAULT 0,
internal_requests INTEGER NOT NULL DEFAULT 0,
status_2xx INTEGER NOT NULL DEFAULT 0,
status_304 INTEGER NOT NULL DEFAULT 0,
status_4xx INTEGER NOT NULL DEFAULT 0,
@@ -193,7 +195,8 @@ CREATE TABLE IF NOT EXISTS api_audit_ringbuffer (
endpoint TEXT NOT NULL,
status_code INTEGER NOT NULL,
latency_us INTEGER NOT NULL,
isolation_ok INTEGER NOT NULL
isolation_ok INTEGER NOT NULL,
traffic_source TEXT NOT NULL DEFAULT 'internal_test'
);
CREATE TRIGGER IF NOT EXISTS trg_prune_audit_ringbuffer
@@ -202,8 +205,68 @@ BEGIN
DELETE FROM api_audit_ringbuffer
WHERE event_id <= (NEW.event_id - 200);
END;
CREATE TABLE IF NOT EXISTS api_parameter_rollups (
param_category TEXT NOT NULL,
param_value TEXT NOT NULL,
total_requests INTEGER NOT NULL DEFAULT 0,
external_requests INTEGER NOT NULL DEFAULT 0,
internal_requests INTEGER NOT NULL DEFAULT 0,
last_called_utc TEXT NOT NULL,
PRIMARY KEY (param_category, param_value)
) WITHOUT ROWID;
CREATE TABLE IF NOT EXISTS static_route_rollups (
route_prefix TEXT PRIMARY KEY,
total_hits INTEGER NOT NULL DEFAULT 0,
last_ingested_utc TEXT NOT NULL
) WITHOUT ROWID;
"""
ALLOWED_TELEMETRY_PARAM_ENUMS: dict[str, set[str]] = {
"symbol": {
"NVDA", "TSM", "ASML", "MSFT", "GOOGL", "META", "AMZN", "AAPL",
"PLTR", "AMD", "ARM", "AVGO", "ORCL", "TSLA", "COIN", "MSTR",
"IBIT", "BTC-USD", "ETH-USD", "SOL-USD", "SPY", "QQQ", "VIX", "ANTHR-PVT",
},
"lens": {
"tierzoo", "pokedex_scanner", "corporate_board",
"fund_manager", "fantasy_football", "schizoanalytic",
},
"lang": {"guile", "ts", "rust"},
"unit_filter": {"E0", "E1", "E2", "E3", "E4", "E5", "M0", "M1", "M2", "M3", "M4", "M5"},
"surface": {"home", "calc", "quant", "graph", "learn", "engineering", "math", "donate"},
"donate_from": {"home", "calc", "quant", "graph", "learn", "engineering", "math"},
"donate_copy": {"BTC", "XMR"},
"export_action": {
"learn_state_json", "quant_csv", "quant_json", "quant_tradingview", "graph_png",
},
}
CANONICAL_STATIC_ROUTE_PREFIXES: tuple[str, ...] = (
"/zoology/proposal-fund-manager-novel-investment-discovery.pdf",
"/zoology/proposal-corporate-board-technocapital-allocation.pdf",
"/zoology/proposal-fantasy-football-technocapital-roster-engine.pdf",
"/zoology/proposal-fund-manager-standard-english-aq.pdf",
"/zoology/proposal-corporate-board-standard-english-aq.pdf",
"/zoology/m7-emergent-subclass-bidirectional-aq-nucleation.pdf",
"/zoology/tier-list-technocapital-assemblage-builds.pdf",
"/zoology/tier-list-technocapital-assemblage-builds.png",
"/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf",
"/zoology/encyclopedia-of-technocapital-singularity-zoology-overview-and-manifest.pdf",
"/encyclopedia/",
"/calc/",
"/quant/",
"/graph/",
"/learn/",
"/engineering/",
"/math/",
"/donate/",
"/archive/",
"/ci/",
"/",
)
def get_default_catalog_db_path() -> Path:
env_p = os.environ.get("HYPERSTITION_CATALOG_DB_PATH")
@@ -919,6 +982,8 @@ def truncate_telemetry_db_quiescent(
try:
conn.execute("DELETE FROM api_audit_ringbuffer;")
conn.execute("DELETE FROM api_endpoint_rollups;")
conn.execute("DELETE FROM api_parameter_rollups;")
conn.execute("DELETE FROM static_route_rollups;")
conn.execute("DELETE FROM sqlite_sequence WHERE name = 'api_audit_ringbuffer';")
conn.execute("COMMIT;")
except Exception:
@@ -948,6 +1013,22 @@ def truncate_telemetry_db_quiescent(
}
def _ensure_telemetry_columns(conn: sqlite3.Connection) -> None:
"""
Idempotently migrate existing `api_endpoint_rollups` and `api_audit_ringbuffer` tables
so older databases gain `external_requests`, `internal_requests`, and `traffic_source`.
"""
rollup_cols = {r[1] for r in conn.execute("PRAGMA table_info(api_endpoint_rollups)").fetchall()}
if "external_requests" not in rollup_cols:
conn.execute("ALTER TABLE api_endpoint_rollups ADD COLUMN external_requests INTEGER NOT NULL DEFAULT 0;")
if "internal_requests" not in rollup_cols:
conn.execute("ALTER TABLE api_endpoint_rollups ADD COLUMN internal_requests INTEGER NOT NULL DEFAULT 0;")
conn.execute("UPDATE api_endpoint_rollups SET internal_requests = total_requests WHERE external_requests = 0 AND internal_requests = 0;")
rb_cols = {r[1] for r in conn.execute("PRAGMA table_info(api_audit_ringbuffer)").fetchall()}
if "traffic_source" not in rb_cols:
conn.execute("ALTER TABLE api_audit_ringbuffer ADD COLUMN traffic_source TEXT NOT NULL DEFAULT 'internal_test';")
def record_api_telemetry(
protocol: str,
method: str,
@@ -957,10 +1038,14 @@ def record_api_telemetry(
isolation_ok: bool = True,
telemetry_db_path: Path | str | None = None,
max_bytes: int | str | None = None,
traffic_source: str = "internal_test",
param_events: dict[str, str] | None = None,
) -> dict[str, Any]:
"""
Record a privacy-preserving REST (`/api/v1/*`) or MCP (`/mcp`) call in `api-telemetry.db`,
and automatically perform a quiescent truncation if the database reaches `max_bytes` (default `100 MB`).
separating `external_production` traffic from `internal_test` probes, recording allowlisted
closed-set enum parameters in `api_parameter_rollups` (`Strategy 2B`), and automatically
performing a quiescent truncation if the database reaches `max_bytes` (default `100 MB`).
"""
t_path = Path(telemetry_db_path) if telemetry_db_path is not None else get_default_telemetry_db_path()
limit_bytes = parse_size_spec_bytes(max_bytes, default_bytes=DEFAULT_MAX_TELEMETRY_BYTES)
@@ -969,11 +1054,32 @@ def record_api_telemetry(
lat = max(0, int(latency_us))
iso_int = 1 if isolation_ok else 0
src_norm = "external_production" if traffic_source == "external_production" else "internal_test"
ext_inc = 1 if src_norm == "external_production" else 0
int_inc = 1 if src_norm == "internal_test" else 0
s_2xx = 1 if 200 <= code < 300 else 0
s_304 = 1 if code == 304 else 0
s_4xx = 1 if 400 <= code < 500 else 0
s_5xx = 1 if code >= 500 else 0
valid_params: list[tuple[str, str]] = []
if param_events:
for raw_cat, raw_val in param_events.items():
if not raw_val:
continue
cat = str(raw_cat).strip()
allowed_set = ALLOWED_TELEMETRY_PARAM_ENUMS.get(cat)
if not allowed_set:
continue
val_cand = str(raw_val).strip()
if cat in ("symbol", "unit_filter", "donate_copy"):
val_cand = val_cand.upper()
else:
val_cand = val_cand.lower()
if val_cand in allowed_set:
valid_params.append((cat, val_cand))
try:
t_path.parent.mkdir(parents=True, exist_ok=True)
if _sqlite_total_disk_bytes(t_path) >= limit_bytes:
@@ -983,34 +1089,53 @@ def record_api_telemetry(
try:
conn.execute("PRAGMA busy_timeout = 30000;")
conn.executescript(TELEMETRY_SCHEMA_SQL)
_ensure_telemetry_columns(conn)
conn.execute("BEGIN IMMEDIATE;")
try:
conn.execute(
"""
INSERT INTO api_endpoint_rollups (
protocol, method, endpoint_pattern, total_requests,
external_requests, internal_requests,
status_2xx, status_304, status_4xx, status_5xx,
total_latency_us, max_latency_us, last_called_utc
) VALUES (?, ?, ?, 1, ?, ?, ?, ?, ?, ?, ?)
) VALUES (?, ?, ?, 1, ?, ?, ?, ?, ?, ?, ?, ?, ?)
ON CONFLICT(protocol, method, endpoint_pattern) DO UPDATE SET
total_requests = total_requests + 1,
status_2xx = status_2xx + excluded.status_2xx,
status_304 = status_304 + excluded.status_304,
status_4xx = status_4xx + excluded.status_4xx,
status_5xx = status_5xx + excluded.status_5xx,
total_latency_us = total_latency_us + excluded.total_latency_us,
max_latency_us = MAX(max_latency_us, excluded.max_latency_us),
last_called_utc = excluded.last_called_utc
total_requests = total_requests + 1,
external_requests = external_requests + excluded.external_requests,
internal_requests = internal_requests + excluded.internal_requests,
status_2xx = status_2xx + excluded.status_2xx,
status_304 = status_304 + excluded.status_304,
status_4xx = status_4xx + excluded.status_4xx,
status_5xx = status_5xx + excluded.status_5xx,
total_latency_us = total_latency_us + excluded.total_latency_us,
max_latency_us = MAX(max_latency_us, excluded.max_latency_us),
last_called_utc = excluded.last_called_utc
""",
(protocol, method, endpoint_pattern, s_2xx, s_304, s_4xx, s_5xx, lat, lat, now_utc),
(protocol, method, endpoint_pattern, ext_inc, int_inc, s_2xx, s_304, s_4xx, s_5xx, lat, lat, now_utc),
)
for p_cat, p_val in valid_params:
conn.execute(
"""
INSERT INTO api_parameter_rollups (
param_category, param_value, total_requests,
external_requests, internal_requests, last_called_utc
) VALUES (?, ?, 1, ?, ?, ?)
ON CONFLICT(param_category, param_value) DO UPDATE SET
total_requests = total_requests + 1,
external_requests = external_requests + excluded.external_requests,
internal_requests = internal_requests + excluded.internal_requests,
last_called_utc = excluded.last_called_utc
""",
(p_cat, p_val, ext_inc, int_inc, now_utc),
)
conn.execute(
"""
INSERT INTO api_audit_ringbuffer (
timestamp_utc, endpoint, status_code, latency_us, isolation_ok
) VALUES (?, ?, ?, ?, ?)
timestamp_utc, endpoint, status_code, latency_us, isolation_ok, traffic_source
) VALUES (?, ?, ?, ?, ?, ?)
""",
(now_utc, f"{protocol}:{method} {endpoint_pattern}", code, lat, iso_int),
(now_utc, f"{protocol}:{method} {endpoint_pattern}", code, lat, iso_int, src_norm),
)
conn.execute("COMMIT;")
except Exception:
@@ -1025,18 +1150,26 @@ def record_api_telemetry(
os.chmod(cand, 0o666)
except OSError:
pass
return {"ok": True, "db_path": str(t_path)}
return {"ok": True, "db_path": str(t_path), "traffic_source": src_norm}
except Exception as exc:
return {"ok": False, "error": str(exc)}
MIN_EXTERNAL_REQUESTS_FOR_CONFIDENCE = 500
def get_api_telemetry_summary(telemetry_db_path: Path | str | None = None) -> dict[str, Any]:
t_path = Path(telemetry_db_path) if telemetry_db_path is not None else get_default_telemetry_db_path()
if not t_path.is_file():
return {
"db_path": str(t_path),
"total_requests": 0,
"external_production_requests": 0,
"internal_test_requests": 0,
"market_demand_confidence": "No data available",
"endpoints": [],
"parameter_rollups": [],
"static_route_rollups": [],
"recent_audit_events": [],
"ringbuffer_count": 0,
"byte_size": 0,
@@ -1044,12 +1177,26 @@ def get_api_telemetry_summary(telemetry_db_path: Path | str | None = None) -> di
conn = sqlite3.connect(str(t_path), timeout=30.0)
conn.row_factory = sqlite3.Row
try:
conn.executescript(TELEMETRY_SCHEMA_SQL)
_ensure_telemetry_columns(conn)
rollups = [
dict(r)
for r in conn.execute(
"SELECT * FROM api_endpoint_rollups ORDER BY total_requests DESC, endpoint_pattern ASC"
).fetchall()
]
param_rollups = [
dict(r)
for r in conn.execute(
"SELECT * FROM api_parameter_rollups ORDER BY total_requests DESC, param_category ASC, param_value ASC"
).fetchall()
]
static_rollups = [
dict(r)
for r in conn.execute(
"SELECT * FROM static_route_rollups ORDER BY total_hits DESC, route_prefix ASC"
).fetchall()
]
recent = [
dict(r)
for r in conn.execute(
@@ -1058,10 +1205,21 @@ def get_api_telemetry_summary(telemetry_db_path: Path | str | None = None) -> di
]
rb_cnt = conn.execute("SELECT COUNT(*) FROM api_audit_ringbuffer").fetchone()[0]
tot_reqs = sum(int(r["total_requests"]) for r in rollups)
ext_reqs = sum(int(r.get("external_requests", 0)) for r in rollups)
int_reqs = sum(int(r.get("internal_requests", 0)) for r in rollups)
if ext_reqs < MIN_EXTERNAL_REQUESTS_FOR_CONFIDENCE:
confidence_status = "No data available"
else:
confidence_status = f"Sufficient external production sample (n={ext_reqs})"
return {
"db_path": str(t_path),
"total_requests": tot_reqs,
"external_production_requests": ext_reqs,
"internal_test_requests": int_reqs,
"market_demand_confidence": confidence_status,
"endpoints": rollups,
"parameter_rollups": param_rollups,
"static_route_rollups": static_rollups,
"recent_audit_events": recent,
"ringbuffer_count": int(rb_cnt),
"byte_size": _sqlite_total_disk_bytes(t_path),
@@ -1070,6 +1228,179 @@ def get_api_telemetry_summary(telemetry_db_path: Path | str | None = None) -> di
conn.close()
def get_longitudinal_telemetry_summary(
telemetry_db_path: Path | str | None = None,
max_generations: int = 12,
) -> dict[str, Any]:
"""
Aggregate `api_endpoint_rollups`, `api_parameter_rollups`, and `static_route_rollups` across
both the active `api-telemetry.db` and up to `max_generations` rotated `.{1..K}.gz` snapshots
(`Strategy 2C`: `--telemetry-history`).
"""
import tempfile
t_path = Path(telemetry_db_path) if telemetry_db_path is not None else get_default_telemetry_db_path()
endpoint_totals: dict[tuple[str, str, str], dict[str, Any]] = {}
param_totals: dict[tuple[str, str], dict[str, Any]] = {}
static_totals: dict[str, dict[str, Any]] = {}
generations_scanned: list[str] = []
def _merge_summary(s: dict[str, Any], label: str) -> None:
generations_scanned.append(label)
for ep in s.get("endpoints", []):
key = (ep["protocol"], ep["method"], ep["endpoint_pattern"])
cur = endpoint_totals.get(key)
if cur is None:
endpoint_totals[key] = dict(ep)
else:
for k_num in ("total_requests", "external_requests", "internal_requests", "status_2xx", "status_304", "status_4xx", "status_5xx", "total_latency_us"):
cur[k_num] = int(cur.get(k_num, 0)) + int(ep.get(k_num, 0))
cur["max_latency_us"] = max(int(cur.get("max_latency_us", 0)), int(ep.get("max_latency_us", 0)))
if str(ep.get("last_called_utc", "")) > str(cur.get("last_called_utc", "")):
cur["last_called_utc"] = ep["last_called_utc"]
for pr in s.get("parameter_rollups", []):
pkey = (pr["param_category"], pr["param_value"])
cur_p = param_totals.get(pkey)
if cur_p is None:
param_totals[pkey] = dict(pr)
else:
for k_num in ("total_requests", "external_requests", "internal_requests"):
cur_p[k_num] = int(cur_p.get(k_num, 0)) + int(pr.get(k_num, 0))
if str(pr.get("last_called_utc", "")) > str(cur_p.get("last_called_utc", "")):
cur_p["last_called_utc"] = pr["last_called_utc"]
for sr in s.get("static_route_rollups", []):
rpref = sr["route_prefix"]
cur_s = static_totals.get(rpref)
if cur_s is None:
static_totals[rpref] = dict(sr)
else:
cur_s["total_hits"] = int(cur_s.get("total_hits", 0)) + int(sr.get("total_hits", 0))
if str(sr.get("last_ingested_utc", "")) > str(cur_s.get("last_ingested_utc", "")):
cur_s["last_ingested_utc"] = sr["last_ingested_utc"]
if t_path.is_file():
_merge_summary(get_api_telemetry_summary(t_path), str(t_path.name))
for idx in range(1, max_generations + 1):
gz_p = Path(f"{t_path}.{idx}.gz")
if not gz_p.is_file():
continue
try:
with tempfile.NamedTemporaryFile(suffix=".db", delete=True) as tmp_f:
with gzip.open(gz_p, "rb") as f_in:
tmp_f.write(f_in.read())
tmp_f.flush()
_merge_summary(get_api_telemetry_summary(tmp_f.name), gz_p.name)
except Exception:
continue
tot_reqs = sum(int(v.get("total_requests", 0)) for v in endpoint_totals.values())
ext_reqs = sum(int(v.get("external_requests", 0)) for v in endpoint_totals.values())
int_reqs = sum(int(v.get("internal_requests", 0)) for v in endpoint_totals.values())
confidence_status = (
"No data available"
if ext_reqs < MIN_EXTERNAL_REQUESTS_FOR_CONFIDENCE
else f"Sufficient external production sample (n={ext_reqs})"
)
return {
"base_db_path": str(t_path),
"generations_scanned": generations_scanned,
"generations_count": len(generations_scanned),
"total_requests": tot_reqs,
"external_production_requests": ext_reqs,
"internal_test_requests": int_reqs,
"market_demand_confidence": confidence_status,
"endpoints": sorted(endpoint_totals.values(), key=lambda x: (-int(x.get("total_requests", 0)), x["endpoint_pattern"])),
"parameter_rollups": sorted(param_totals.values(), key=lambda x: (-int(x.get("total_requests", 0)), x["param_category"], x["param_value"])),
"static_route_rollups": sorted(static_totals.values(), key=lambda x: (-int(x.get("total_hits", 0)), x["route_prefix"])),
}
def ingest_caddy_route_counts(
log_path: Path | str = "/var/log/caddy/hyperstition-access.json",
telemetry_db_path: Path | str | None = None,
truncate_log: bool = True,
) -> dict[str, Any]:
"""
Ingest zero-IP Caddy JSON access log entries (`Strategy 3A`: `--ingest-caddy-route-counts`)
into `static_route_rollups` inside `api-telemetry.db`, mapping URIs onto `CANONICAL_STATIC_ROUTE_PREFIXES`
and discarding all client identifiers.
"""
l_path = Path(log_path)
t_path = Path(telemetry_db_path) if telemetry_db_path is not None else get_default_telemetry_db_path()
now_utc = dt.datetime.now(dt.timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
if not l_path.is_file():
return {"ok": True, "log_path": str(l_path), "ingested_lines": 0, "matched_hits": 0, "status": "log_absent"}
counts_by_prefix: dict[str, int] = {}
lines_read = 0
for raw_ln in l_path.read_text(encoding="utf-8", errors="replace").splitlines():
ln = raw_ln.strip()
if not ln:
continue
lines_read += 1
try:
obj = json.loads(ln)
except Exception:
continue
status = int(obj.get("status", 0) or 0)
if status not in (200, 304):
continue
req_obj = obj.get("request") or {}
uri = str(req_obj.get("uri") or obj.get("uri") or "").split("?", 1)[0]
if not uri or uri.startswith("/api/v1") or uri.startswith("/mcp") or uri.startswith("/assets/"):
continue
for pref in CANONICAL_STATIC_ROUTE_PREFIXES:
if pref == "/":
if uri in ("/", "/index.html"):
counts_by_prefix["/"] = counts_by_prefix.get("/", 0) + 1
break
elif uri == pref or uri.startswith(pref):
counts_by_prefix[pref] = counts_by_prefix.get(pref, 0) + 1
break
if counts_by_prefix:
t_path.parent.mkdir(parents=True, exist_ok=True)
conn = sqlite3.connect(str(t_path), timeout=30.0, isolation_level=None)
try:
conn.execute("PRAGMA busy_timeout = 30000;")
conn.executescript(TELEMETRY_SCHEMA_SQL)
conn.execute("BEGIN IMMEDIATE;")
try:
for pref, cnt in counts_by_prefix.items():
conn.execute(
"""
INSERT INTO static_route_rollups (route_prefix, total_hits, last_ingested_utc)
VALUES (?, ?, ?)
ON CONFLICT(route_prefix) DO UPDATE SET
total_hits = total_hits + excluded.total_hits,
last_ingested_utc = excluded.last_ingested_utc
""",
(pref, cnt, now_utc),
)
conn.execute("COMMIT;")
except Exception:
conn.execute("ROLLBACK;")
raise
finally:
conn.close()
if truncate_log:
try:
l_path.write_text("", encoding="utf-8")
except OSError:
pass
return {
"ok": True,
"log_path": str(l_path),
"db_path": str(t_path),
"ingested_lines": lines_read,
"matched_hits": sum(counts_by_prefix.values()),
"counts_by_prefix": counts_by_prefix,
}
def run_logrotate_directive(
conf_path: Path | str | None = None,
telemetry_db_path: Path | str | None = None,
@@ -1161,6 +1492,9 @@ def main(argv: list[str] | None = None) -> int:
ap.add_argument("--timeseries", action="store_true", help="Query periodic quant_timeseries_bars.")
ap.add_argument("--symbol", default=None, help="Optional ticker symbol filter for --timeseries.")
ap.add_argument("--telemetry", action="store_true", help="Print REST/MCP telemetry rollup summary.")
ap.add_argument("--telemetry-history", action="store_true", help="Print longitudinal REST/MCP telemetry aggregated across active DB and rotated .1.gz..12.gz snapshots (Strategy 2C).")
ap.add_argument("--ingest-caddy-route-counts", action="store_true", help="Ingest zero-IP Caddy JSON access log counts into static_route_rollups (Strategy 3A).")
ap.add_argument("--caddy-log", default="/var/log/caddy/hyperstition-access.json", help="Path to zero-IP Caddy access log.")
ap.add_argument(
"--truncate-quiescent",
action="store_true",
@@ -1213,6 +1547,14 @@ def main(argv: list[str] | None = None) -> int:
print(json.dumps(query_timeseries_bars(symbol=args.symbol, db_path=args.db), indent=2))
return 0
if args.telemetry_history:
print(json.dumps(get_longitudinal_telemetry_summary(args.db), indent=2))
return 0
if args.ingest_caddy_route_counts:
print(json.dumps(ingest_caddy_route_counts(args.caddy_log, telemetry_db_path=args.db), indent=2))
return 0
if args.telemetry:
print(json.dumps(get_api_telemetry_summary(args.db), indent=2))
return 0
+51 -1
View File
@@ -53,6 +53,48 @@ STATIC_RESOURCES: list[dict[str, str]] = [
"mimeType": "application/json",
"description": "Node/edge ontology counts, top 15 AQ coordinate hubs by degree, and SHA-256 isolation receipt.",
},
{
"uri": "urn:io:hyperstitionstud:resource:quant-timeseries",
"name": "Periodic Quantitative Financial & Memetic Gematria Time-Series Bundle",
"mimeType": "application/json",
"description": "30-day x 24-instrument real market history, 14-point eng_aq/ing_aq census, and Dose 0..3+ scores.",
},
{
"uri": "urn:io:hyperstitionstud:resource:macro-indicators",
"name": "Federal Reserve (FRED) Real Macroeconomic Indicators Bundle (14 Series)",
"mimeType": "application/json",
"description": "CPI, PPI, US10Y, EFFR, SOFR, M1, M2, M2-M1 Spread, Real M2, GDP, GNP, OUTBS, and INDPRO.",
},
{
"uri": "urn:io:hyperstitionstud:resource:daily-brief",
"name": "5-Agenda Zero-Synthetic-Data Daily Portfolio & Bayesian Regime Update",
"mimeType": "application/json",
"description": "3-state discrete Bayesian regime posteriors (R1/R2/R3), confirming/challenging signals, and Daily Key Question Q_t.",
},
{
"uri": "urn:io:hyperstitionstud:resource:engineering-manifest",
"name": "Software Engineering Explication Hub Manifest (Units E0-E5)",
"mimeType": "application/json",
"description": "Live-introspected CLI scripts, MCP tools, schemas, Novice Prerequisite Ladders, and E0-E5 subpages.",
},
{
"uri": "urn:io:hyperstitionstud:resource:math-manifest",
"name": "Applied Mathematics & Quantitative Semiotics Hub Manifest (Units M0-M5)",
"mimeType": "application/json",
"description": "Algebraic conservation invariants, empirical counts, Novice Prerequisite Ladders, and M0-M5 subpages.",
},
{
"uri": "urn:io:hyperstitionstud:resource:archive-manifest",
"name": "Cold-Storage Rotated Plan Archive Manifest (completed-plans-archive.tar.gz)",
"mimeType": "application/json",
"description": "SHA-256 manifest of all completed software plans rotated into completed-plans-archive.tar.gz.",
},
{
"uri": "urn:io:hyperstitionstud:resource:guile-prelude",
"name": "Canonical GNU Guile Scheme & Z-Combinator Prelude (guile_prelude.scm)",
"mimeType": "text/x-scheme",
"description": "Applicative-order Z combinator, Thomas' Calculus primitives, Base-36 AQ, exact rational variance, ETI, and Bayes rules.",
},
]
RESOURCE_TEMPLATES: list[dict[str, str]] = [
@@ -80,12 +122,20 @@ def read_mcp_resource(uri: str) -> dict[str, Any]:
"urn:io:hyperstitionstud:resource:singularity-matrix": cfg.zoology_dir / "taxonomy" / "singularity-zoology-matrix.json",
"urn:io:hyperstitionstud:resource:memetic-registry": cfg.zoology_dir / "taxonomy" / "memetic-superclass-registry.json",
"urn:io:hyperstitionstud:resource:quantitative-anchors": cfg.zoology_dir / "taxonomy" / "quantitative-economic-anchors.json",
"urn:io:hyperstitionstud:resource:quant-timeseries": cfg.core_dir / "site" / "quant" / "quant-timeseries.json",
"urn:io:hyperstitionstud:resource:macro-indicators": cfg.core_dir / "site" / "quant" / "real-macro-indicators.json",
"urn:io:hyperstitionstud:resource:daily-brief": cfg.core_dir / "site" / "quant" / "daily-brief-latest.json",
"urn:io:hyperstitionstud:resource:engineering-manifest": cfg.core_dir / "site" / "engineering" / "engineering-manifest.json",
"urn:io:hyperstitionstud:resource:math-manifest": cfg.core_dir / "site" / "math" / "math-manifest.json",
"urn:io:hyperstitionstud:resource:archive-manifest": cfg.knowledge_graph_dir / "docs" / "archive" / "archive-manifest.json",
"urn:io:hyperstitionstud:resource:guile-prelude": cfg.core_dir / "src" / "hyperstitionstud_io" / "publishing" / "guile_prelude.scm",
}
if uri in static_map:
p = static_map[uri]
mime = "text/x-scheme" if p.suffix == ".scm" else "application/json"
return {
"contents": [
{"uri": uri, "mimeType": "application/json", "text": p.read_text(encoding="utf-8")}
{"uri": uri, "mimeType": mime, "text": p.read_text(encoding="utf-8")}
]
}
+71
View File
@@ -401,14 +401,68 @@ def _dispatch_rest_v1_inner(
return _error_response(500, "INTERNAL_ERROR", str(exc))
def compute_response_etag(payload: Any) -> str:
"""
Compute a deterministic strong HTTP ETag (`"<cidv1-or-sha256>"`) for any REST/MCP response payload.
"""
import hashlib
from hyperstitionstud_io.ipld import compute_dag_json_cidv1
if isinstance(payload, dict):
cid_top = (payload.get("ipld_dag_json_cidv1") or {}).get("/")
if isinstance(cid_top, str) and cid_top:
return f'"{cid_top}"'
data_sub = payload.get("data")
if isinstance(data_sub, dict):
cid_sub = (data_sub.get("ipld_dag_json_cidv1") or {}).get("/")
if isinstance(cid_sub, str) and cid_sub:
return f'"{cid_sub}"'
try:
return f'"{compute_dag_json_cidv1(payload)}"'
except Exception:
pass
raw_bytes = (
payload.encode("utf-8")
if isinstance(payload, str)
else json.dumps(payload, sort_keys=True, ensure_ascii=False).encode("utf-8")
)
return f'"sha256-{hashlib.sha256(raw_bytes).hexdigest()[:40]}"'
def matches_if_none_match(if_none_match: str | None, etag: str) -> bool:
"""
Evaluate RFC 9110 `If-None-Match` header against a strong or weak ETag.
"""
if not if_none_match or not etag:
return False
inm_raw = if_none_match.strip()
if inm_raw == "*":
return True
target_norm = etag.strip()
if target_norm.startswith("W/"):
target_norm = target_norm[2:].strip()
for part in inm_raw.split(","):
cand = part.strip()
if cand.startswith("W/"):
cand = cand[2:].strip()
if cand == target_norm or cand.strip('"') == target_norm.strip('"'):
return True
return False
def dispatch_rest_v1(
method: str,
raw_path: str,
body_bytes: bytes = b"",
if_none_match: str | None = None,
traffic_source: str = "internal_test",
) -> tuple[int, str, Any]:
"""
Dispatch an HTTP GET or POST request under `/api/v1/*` and automatically record
the request metadata and latency in the SQLite REST API metadata database (`api-telemetry.db`).
When `if_none_match` matches the deterministic response ETag on a `GET` `200` response,
records `status_code=304` (`304 Not Modified`) and returns `(304, content_type, "")`.
Returns `(http_status_code, content_type, response_payload_or_text)`.
"""
parsed_url = urllib.parse.urlsplit(raw_path)
@@ -416,7 +470,22 @@ def dispatch_rest_v1(
query_str = parsed_url.query
t0_ns = time.perf_counter_ns()
status, ctype, payload = _dispatch_rest_v1_inner(method, path, query_str, body_bytes)
if status == 200 and method.upper() == "GET" and if_none_match:
etag = compute_response_etag(payload)
if matches_if_none_match(if_none_match, etag):
status = 304
payload = ""
elapsed_us = max(1, (time.perf_counter_ns() - t0_ns) // 1000)
param_events: dict[str, str] = {}
if query_str:
for k, vals in urllib.parse.parse_qs(query_str, keep_blank_values=False).items():
if vals:
param_events[k] = vals[0]
m_sym = re.match(r"^/api/v1/(?:quant/instruments|zoology/pokedex)/([^/]+)$", path)
if m_sym:
param_events.setdefault("symbol", urllib.parse.unquote(m_sym.group(1)))
record_api_telemetry(
protocol="rest_v1",
method=method.upper(),
@@ -424,5 +493,7 @@ def dispatch_rest_v1(
status_code=status,
latency_us=elapsed_us,
isolation_ok=True,
traffic_source=traffic_source,
param_events=param_events,
)
return status, ctype, payload
+71 -14
View File
@@ -30,17 +30,21 @@ from hyperstitionstud_io.mcp.resources import ( # noqa: E402
STATIC_RESOURCES,
read_mcp_resource,
)
from hyperstitionstud_io.mcp.rest import dispatch_rest_v1 # noqa: E402
from hyperstitionstud_io.mcp.rest import ( # noqa: E402
compute_response_etag,
dispatch_rest_v1,
matches_if_none_match,
)
from hyperstitionstud_io.mcp.tools import MCP_TOOLS_SCHEMA, call_mcp_tool # noqa: E402
SERVER_INFO = {
"name": "hyperstitionstudio-mcp",
"version": "2.2.0",
"namespace_urn": "urn:io:hyperstitionstud:mcp:2.2.0",
"version": "2.8.1",
"namespace_urn": "urn:io:hyperstitionstud:mcp:2.8.1",
}
def dispatch_jsonrpc(req: dict[str, Any]) -> dict[str, Any] | None:
def dispatch_jsonrpc(req: dict[str, Any], traffic_source: str = "internal_test") -> dict[str, Any] | None:
"""
Process a single JSON-RPC 2.0 request or notification and return the JSON-RPC 2.0 response
(or None for notifications without an 'id').
@@ -130,6 +134,14 @@ def dispatch_jsonrpc(req: dict[str, Any]) -> dict[str, Any] | None:
}
finally:
elapsed_us = max(1, (time.perf_counter_ns() - t0_ns) // 1000)
rpc_params: dict[str, str] = {}
if method == "tools/call" and isinstance(params, dict):
t_args = params.get("arguments") or {}
if isinstance(t_args, dict):
for p_k in ("symbol", "symbol_filter", "lens", "lang", "unit_filter"):
if p_k in t_args and t_args[p_k]:
norm_k = "symbol" if p_k == "symbol_filter" else p_k
rpc_params[norm_k] = str(t_args[p_k])
record_api_telemetry(
protocol="mcp_jsonrpc",
method="POST",
@@ -137,6 +149,8 @@ def dispatch_jsonrpc(req: dict[str, Any]) -> dict[str, Any] | None:
status_code=status_code,
latency_us=elapsed_us,
isolation_ok=True,
traffic_source=traffic_source,
param_events=rpc_params,
)
return {"jsonrpc": "2.0", "id": req_id, "result": result}
@@ -170,35 +184,73 @@ class _MCPHTTPHandler(BaseHTTPRequestHandler):
def log_message(self, format: str, *args: Any) -> None:
return
def _send_payload(self, status: int, content_type: str, payload: Any) -> None:
def _send_payload(self, status: int, content_type: str, payload: Any, etag: str | None = None) -> None:
if status == 304:
self.send_response(304)
if etag:
self.send_header("ETag", etag)
self.send_header("Cache-Control", "public, max-age=60, must-revalidate")
self.send_header("Access-Control-Allow-Origin", "*")
self.send_header("Access-Control-Allow-Methods", "GET, POST, OPTIONS")
self.send_header("Access-Control-Allow-Headers", "Content-Type, If-None-Match")
self.send_header("Access-Control-Expose-Headers", "ETag")
self.end_headers()
return
if isinstance(payload, str):
body = payload.encode("utf-8")
else:
body = (json.dumps(payload, indent=2, ensure_ascii=False) + "\n").encode("utf-8")
computed_etag = etag or compute_response_etag(payload)
self.send_response(status)
self.send_header("Content-Type", content_type)
self.send_header("Content-Length", str(len(body)))
if computed_etag:
self.send_header("ETag", computed_etag)
self.send_header("Cache-Control", "public, max-age=60, must-revalidate")
self.send_header("Access-Control-Allow-Origin", "*")
self.send_header("Access-Control-Allow-Methods", "GET, POST, OPTIONS")
self.send_header("Access-Control-Allow-Headers", "Content-Type")
self.send_header("Access-Control-Allow-Headers", "Content-Type, If-None-Match")
self.send_header("Access-Control-Expose-Headers", "ETag")
self.end_headers()
self.wfile.write(body)
def _send_json(self, status: int, payload: Any) -> None:
self._send_payload(status, "application/json; charset=utf-8", payload)
def _send_json(self, status: int, payload: Any, etag: str | None = None) -> None:
self._send_payload(status, "application/json; charset=utf-8", payload, etag=etag)
def do_OPTIONS(self) -> None:
self.send_response(204)
self.send_header("Access-Control-Allow-Origin", "*")
self.send_header("Access-Control-Allow-Methods", "GET, POST, OPTIONS")
self.send_header("Access-Control-Allow-Headers", "Content-Type")
self.send_header("Access-Control-Allow-Headers", "Content-Type, If-None-Match")
self.send_header("Access-Control-Expose-Headers", "ETag")
self.end_headers()
def _classify_traffic_source(self) -> str:
ua = (self.headers.get("User-Agent") or "").strip()
if "HyperstitionPublicSmoke" in ua or "HyperstitionInternalTest" in ua:
return "internal_test"
return "external_production"
def do_GET(self) -> None:
try:
inm = self.headers.get("If-None-Match")
tsrc = self._classify_traffic_source()
if self.path.startswith("/api/v1"):
status, ctype, payload = dispatch_rest_v1("GET", self.path)
self._send_payload(status, ctype, payload)
status, ctype, payload = dispatch_rest_v1("GET", self.path, traffic_source=tsrc)
etag = compute_response_etag(payload) if status == 200 else None
if status == 200 and inm and etag and matches_if_none_match(inm, etag):
record_api_telemetry(
protocol="rest_v1",
method="GET",
endpoint_pattern=self.path.split("?", 1)[0],
status_code=304,
latency_us=1,
isolation_ok=True,
traffic_source=tsrc,
)
self._send_payload(304, ctype, "", etag=etag)
return
self._send_payload(status, ctype, payload, etag=etag)
return
manifest = {
"serverInfo": SERVER_INFO,
@@ -220,7 +272,11 @@ class _MCPHTTPHandler(BaseHTTPRequestHandler):
"resources": [r["uri"] for r in STATIC_RESOURCES],
"prompts": [p["name"] for p in MCP_PROMPTS],
}
self._send_json(200, manifest)
m_etag = compute_response_etag(manifest)
if inm and matches_if_none_match(inm, m_etag):
self._send_payload(304, "application/json; charset=utf-8", "", etag=m_etag)
return
self._send_json(200, manifest, etag=m_etag)
except Exception as exc:
self._send_json(500, {"ok": False, "error": {"code": "INTERNAL_ERROR", "status": 500, "message": str(exc)}})
@@ -233,8 +289,9 @@ class _MCPHTTPHandler(BaseHTTPRequestHandler):
self._send_json(400, {"jsonrpc": "2.0", "id": None, "error": {"code": -32600, "message": "Invalid content length"}})
return
raw_bytes = self.rfile.read(length) if length > 0 else b""
tsrc = self._classify_traffic_source()
if self.path.startswith("/api/v1"):
status, ctype, payload = dispatch_rest_v1("POST", self.path, raw_bytes)
status, ctype, payload = dispatch_rest_v1("POST", self.path, raw_bytes, traffic_source=tsrc)
self._send_payload(status, ctype, payload)
return
if not raw_bytes:
@@ -246,7 +303,7 @@ class _MCPHTTPHandler(BaseHTTPRequestHandler):
except json.JSONDecodeError as exc:
self._send_json(400, {"jsonrpc": "2.0", "id": None, "error": {"code": -32700, "message": str(exc)}})
return
resp = dispatch_jsonrpc(req)
resp = dispatch_jsonrpc(req, traffic_source=tsrc)
if resp is None:
self.send_response(202)
self.end_headers()
+360
View File
@@ -249,6 +249,79 @@ MCP_TOOLS_SCHEMA: list[dict[str, Any]] = [
},
},
},
{
"name": "hs_inspect_engineering_and_math_docs",
"description": "Inspect the live-introspected Software Engineering (/engineering/ Units E0-E5) and Applied Mathematics (/math/ Units M0-M5) explication hubs, subpage sections, algebraic conservation invariants, CLI scripts table, Novice Prerequisite Ladders, and 3-language polyglot cartridges (Guile Scheme, TypeScript, Rust).",
"inputSchema": {
"type": "object",
"properties": {
"domain": {"type": "string", "enum": ["all", "engineering", "math"], "default": "all"},
"unit_filter": {"type": "string", "default": "", "description": "Optional unit ID or subpage slug (e.g. 'E0'..'E5', 'M0'..'M5', 'ciphers-and-phonetics')."},
"include_polyglot_cartridges": {"type": "boolean", "default": True},
},
},
},
{
"name": "hs_inspect_documentation_and_manuals",
"description": "Search, list, and retrieve full Markdown text and PDF deep-links across all documentation tiers: Operator's Manuals, VPS/CI Guides, Stakeholder Proposals & Specs, Interactive /learn/ Curriculum, /quant/ Guided Tutorials & 27 [i] Glossary Popovers, Active/Deferred Plans, and Cold-Rotated Completed Plans (read in-memory from completed-plans-archive.tar.gz).",
"inputSchema": {
"type": "object",
"properties": {
"category": {
"type": "string",
"enum": ["all", "manuals", "proposals_and_specs", "active_and_deferred_plans", "archived_plans", "learn_and_tutorials", "quant_glossary_popovers"],
"default": "all",
},
"doc_id": {"type": "string", "default": "", "description": "Optional document filename or plan ID (e.g. 'OPERATORS-MANUAL-LLM-TOKEN-DEPENDENT-DATA-PIPELINES', 'PLAN-HS-PDF-BUILD-DARK-MODE-AND-GLYPH-SANITIZATION')."},
"search_query": {"type": "string", "default": "", "description": "Optional case-insensitive keyword to search across manuals and plans."},
"include_full_markdown": {"type": "boolean", "default": False},
},
},
},
{
"name": "hs_evaluate_guile_scheme_z_calculus",
"description": "Evaluate a pure functional Guile Scheme (Z-combinator), TypeScript, or Rust expression inside the 4-Ring Zero-Escape AST Sandbox (supporting exact rationals p/q, float conversion, step traces, and guile_prelude.scm inspection).",
"inputSchema": {
"type": "object",
"properties": {
"expression": {"type": "string", "default": '(aq-base36 "LEMUR")'},
"lang": {"type": "string", "enum": ["guile", "ts", "rust"], "default": "guile"},
"prefer_float": {"type": "boolean", "default": False},
"include_trace": {"type": "boolean", "default": True},
"include_prelude_source": {"type": "boolean", "default": False},
},
},
},
{
"name": "hs_query_workspace_catalog_and_release_state",
"description": "Query the unified SQLite FTS5 catalog (registry manifests, FTS5 BM25 search, cross-corpus AQ coordinate joins, indexed time-series bar queries), inspect zero-token programmatic semantic version bump heuristics (hs-sync-version --explain-bump), and read the cached EROFS/public-regression baseline and API telemetry summary.",
"inputSchema": {
"type": "object",
"properties": {
"fts_query": {"type": "string", "default": "", "description": "Optional full-text search query across glossary entries, graph nodes, equations, and dossiers."},
"doc_type": {"type": "string", "enum": ["all", "glossary", "equation", "node", "dossier", "instrument"], "default": "all"},
"registry": {"type": "string", "default": "", "description": "Optional registry slug to query from SQLite registry_manifests (or 'all' for all manifests)."},
"aq_int": {"type": "integer", "default": 0, "description": "Optional integer AQ coordinate (1..999) for cross-corpus SQLite coordinate join."},
"symbol": {"type": "string", "default": "", "description": "Optional ticker symbol for indexed SQLite quant_timeseries_bars query."},
"start_date": {"type": "string", "default": ""},
"end_date": {"type": "string", "default": ""},
"min_points": {"type": "number", "default": 0.0},
"include_version_bump_heuristics": {"type": "boolean", "default": True},
"include_baseline_and_telemetry": {"type": "boolean", "default": True},
},
},
},
{
"name": "hs_generate_highlights_summary",
"description": "Generate an ad-hoc <= 2 paragraph (<= 1,100 char, zero-HTML/LaTeX/table) phone-messenger highlights summary for software engineers (Paragraph 1) and mathematics enthusiasts (Paragraph 2) at 0 LLM tokens, writing output artifacts exclusively to /workspace/untracked/recent-highlights/.",
"inputSchema": {
"type": "object",
"properties": {
"focus": {"type": "string", "enum": ["both", "eng", "math"], "default": "both"},
"max_chars": {"type": "integer", "default": 1100},
},
},
},
]
@@ -494,6 +567,12 @@ def call_mcp_tool(name: str, arguments: dict[str, Any]) -> dict[str, Any]:
"assemblage-builds-tier-list": cfg.zoology_dir / "taxonomy" / "assemblage-builds-tier-list.json",
"quantitative-economic-anchors": cfg.zoology_dir / "taxonomy" / "quantitative-economic-anchors.json",
"encyclopedia-graph": cfg.knowledge_graph_dir / "encyclopedia-graph.json",
"quant-timeseries": cfg.core_dir / "site" / "quant" / "quant-timeseries.json",
"real-macro-indicators": cfg.core_dir / "site" / "quant" / "real-macro-indicators.json",
"daily-brief-latest": cfg.core_dir / "site" / "quant" / "daily-brief-latest.json",
"engineering-manifest": cfg.core_dir / "site" / "engineering" / "engineering-manifest.json",
"math-manifest": cfg.core_dir / "site" / "math" / "math-manifest.json",
"archive-manifest": cfg.knowledge_graph_dir / "docs" / "archive" / "archive-manifest.json",
}
p = reg_map.get(str(reg_name))
if p is None or not p.is_file():
@@ -604,4 +683,285 @@ def call_mcp_tool(name: str, arguments: dict[str, Any]) -> dict[str, Any]:
return build_daily_portfolio_brief(allow_live_network=False, write_files=False)
return json.loads(b_path.read_text(encoding="utf-8"))
if name == "hs_inspect_engineering_and_math_docs":
from hyperstitionstud_io.publishing.engineering_docs import (
ENGINEERING_GUILE_CARTRIDGES,
introspect_engineering_manifest,
)
from hyperstitionstud_io.publishing.math_docs import (
MATH_GUILE_CARTRIDGES,
introspect_math_manifest,
)
dom = str(arguments.get("domain", "all")).strip().lower()
u_filt = str(arguments.get("unit_filter", "")).strip().upper()
inc_cart = bool(arguments.get("include_polyglot_cartridges", True))
eng_p = cfg.core_dir / "site" / "engineering" / "engineering-manifest.json"
math_p = cfg.core_dir / "site" / "math" / "math-manifest.json"
eng_m = json.loads(eng_p.read_text(encoding="utf-8")) if eng_p.is_file() else introspect_engineering_manifest()
math_m = json.loads(math_p.read_text(encoding="utf-8")) if math_p.is_file() else introspect_math_manifest()
out_docs: dict[str, Any] = {"version": eng_m["version"], "domain": dom}
if dom in ("all", "engineering"):
out_docs["engineering"] = eng_m
if inc_cart:
out_docs["engineering_polyglot_cartridges"] = ENGINEERING_GUILE_CARTRIDGES
if dom in ("all", "math"):
out_docs["math"] = math_m
if inc_cart:
out_docs["math_polyglot_cartridges"] = MATH_GUILE_CARTRIDGES
if u_filt:
matched_units: dict[str, Any] = {}
for k, v in ENGINEERING_GUILE_CARTRIDGES.items():
if u_filt in k.upper() or u_filt in v["title"].upper():
matched_units[f"engineering:{k}"] = v
for k, v in MATH_GUILE_CARTRIDGES.items():
if u_filt in k.upper() or u_filt in v["title"].upper():
matched_units[f"math:{k}"] = v
out_docs["filtered_units"] = matched_units
return out_docs
if name == "hs_inspect_documentation_and_manuals":
import tarfile
cat = str(arguments.get("category", "all")).strip().lower()
doc_id = str(arguments.get("doc_id", "")).strip()
sq = str(arguments.get("search_query", "")).strip().lower()
inc_md = bool(arguments.get("include_full_markdown", False)) or bool(doc_id)
manuals_list = [
{
"id": "OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH",
"category": "manuals",
"md_path": cfg.core_dir / "site" / "quant" / "OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH.md",
"web_pdf_route": "/quant/OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH.pdf",
},
{
"id": "OPERATORS-MANUAL-ENCYCLOPEDIA-KNOWLEDGE-GRAPH",
"category": "manuals",
"md_path": cfg.knowledge_graph_dir / "OPERATORS-MANUAL-ENCYCLOPEDIA-KNOWLEDGE-GRAPH.md",
"web_pdf_route": "/graph/OPERATORS-MANUAL-ENCYCLOPEDIA-KNOWLEDGE-GRAPH.pdf",
},
{
"id": "OPERATORS-MANUAL-LLM-TOKEN-DEPENDENT-DATA-PIPELINES",
"category": "manuals",
"md_path": cfg.knowledge_graph_dir / "docs" / "OPERATORS-MANUAL-LLM-TOKEN-DEPENDENT-DATA-PIPELINES.md",
"web_pdf_route": "/graph/docs/OPERATORS-MANUAL-LLM-TOKEN-DEPENDENT-DATA-PIPELINES.pdf",
},
{
"id": "VPS-AND-GIT-OPERATOR-DEPLOYMENT-GUIDE",
"category": "manuals",
"md_path": cfg.knowledge_graph_dir / "docs" / "VPS-AND-GIT-OPERATOR-DEPLOYMENT-GUIDE.md",
"web_pdf_route": "/graph/docs/VPS-AND-GIT-OPERATOR-DEPLOYMENT-GUIDE.pdf",
},
{
"id": "ONBOARDING-INGGLISH-AQ",
"category": "manuals",
"md_path": (cfg.paths.get("ci_repo_dir") or (cfg.workspace_root / "hyperdope-ci-build")) / "ONBOARDING-INGGLISH-AQ.md",
"web_pdf_route": "/ci/ONBOARDING-INGGLISH-AQ.pdf",
},
{
"id": "specification-concentric-eti-tier-ring-radar-d-periphery",
"category": "proposals_and_specs",
"md_path": cfg.knowledge_graph_dir / "docs" / "specification-concentric-eti-tier-ring-radar-d-periphery.md",
"web_pdf_route": "/graph/docs/specification-concentric-eti-tier-ring-radar-d-periphery.pdf",
},
{
"id": "proposal-fund-manager-novel-investment-discovery",
"category": "proposals_and_specs",
"md_path": cfg.zoology_dir / "proposal-fund-manager-novel-investment-discovery.md",
"web_pdf_route": "/zoology/proposal-fund-manager-novel-investment-discovery.pdf",
},
{
"id": "proposal-corporate-board-technocapital-allocation",
"category": "proposals_and_specs",
"md_path": cfg.zoology_dir / "proposal-corporate-board-technocapital-allocation.md",
"web_pdf_route": "/zoology/proposal-corporate-board-technocapital-allocation.pdf",
},
{
"id": "m7-emergent-subclass-bidirectional-aq-nucleation",
"category": "proposals_and_specs",
"md_path": cfg.zoology_dir / "m7-emergent-subclass-bidirectional-aq-nucleation.md",
"web_pdf_route": "/zoology/m7-emergent-subclass-bidirectional-aq-nucleation.pdf",
},
]
for p_plan in sorted((cfg.knowledge_graph_dir / "docs").glob("PLAN-*.md")):
manuals_list.append({
"id": p_plan.stem,
"category": "active_and_deferred_plans",
"md_path": p_plan,
"web_pdf_route": f"/graph/docs/{p_plan.stem}.pdf",
})
docs_out: list[dict[str, Any]] = []
for entry in manuals_list:
if cat not in ("all", entry["category"]):
continue
if doc_id and doc_id.lower() not in entry["id"].lower():
continue
mp: Path = entry["md_path"]
if not mp.is_file():
continue
txt = mp.read_text(encoding="utf-8")
if sq and sq not in txt.lower() and sq not in entry["id"].lower():
continue
item_d: dict[str, Any] = {
"id": entry["id"],
"category": entry["category"],
"web_pdf_route": entry["web_pdf_route"],
"char_count": len(txt),
}
if sq:
item_d["matched_lines"] = [ln for ln in txt.splitlines() if sq in ln.lower()][:10]
if inc_md:
item_d["markdown"] = txt
docs_out.append(item_d)
archived_out: list[dict[str, Any]] = []
if cat in ("all", "archived_plans"):
for arc_dir in (cfg.knowledge_graph_dir / "docs" / "archive", cfg.zoology_dir / "docs" / "archive"):
tgz_p = arc_dir / "completed-plans-archive.tar.gz"
if not tgz_p.is_file():
continue
with tarfile.open(tgz_p, "r:gz") as tf:
for m in tf.getmembers():
if not m.name.endswith(".md"):
continue
stem = Path(m.name).stem
if doc_id and doc_id.lower() not in stem.lower():
continue
f_obj = tf.extractfile(m)
if f_obj is None:
continue
m_txt = f_obj.read().decode("utf-8", errors="replace")
if sq and sq not in m_txt.lower() and sq not in stem.lower():
continue
arc_item: dict[str, Any] = {
"id": stem,
"category": "archived_plans",
"bundle": str(tgz_p.name),
"member_name": m.name,
"char_count": len(m_txt),
}
if sq:
arc_item["matched_lines"] = [ln for ln in m_txt.splitlines() if sq in ln.lower()][:10]
if inc_md:
arc_item["markdown"] = m_txt
archived_out.append(arc_item)
res_doc: dict[str, Any] = {
"category_filter": cat,
"doc_id_filter": doc_id,
"search_query": sq,
"documents_count": len(docs_out),
"documents": docs_out,
"archived_plans_count": len(archived_out),
"archived_plans": archived_out,
}
if cat in ("all", "learn_and_tutorials", "quant_glossary_popovers"):
q_app_js = (cfg.core_dir / "site" / "quant" / "quant-app.js").read_text(encoding="utf-8")
pop_keys = re.findall(r'"([a-z0-9_]+)":\s*\{\s*title:\s*"([^"]+)"', q_app_js)
res_doc["quant_glossary_popovers"] = [{"key": k, "title": t} for k, t in pop_keys]
res_doc["quant_glossary_popover_count"] = len(pop_keys)
return res_doc
if name == "hs_evaluate_guile_scheme_z_calculus":
from hyperstitionstud_io.publishing.polyglot_sandbox import evaluate_polyglot_sandbox
expr_s = str(arguments.get("expression", '(aq-base36 "LEMUR")')).strip() or '(aq-base36 "LEMUR")'
lang_s = str(arguments.get("lang", "guile")).strip().lower() or "guile"
pref_f = bool(arguments.get("prefer_float", False))
inc_tr = bool(arguments.get("include_trace", True))
inc_pr = bool(arguments.get("include_prelude_source", False))
eval_res = evaluate_polyglot_sandbox(
expression=expr_s,
lang=lang_s,
prefer_float=pref_f,
include_trace=inc_tr,
)
if inc_pr:
pr_p = cfg.core_dir / "src" / "hyperstitionstud_io" / "publishing" / "guile_prelude.scm"
if pr_p.is_file():
eval_res["guile_prelude_source"] = pr_p.read_text(encoding="utf-8")
return eval_res
if name == "hs_query_workspace_catalog_and_release_state":
from hyperstitionstud_io.ci.public_regression import get_default_baseline_cache_path
from hyperstitionstud_io.db.sqlite_meta import (
get_api_telemetry_summary,
get_longitudinal_telemetry_summary,
query_coordinate_join,
query_fts_catalog,
query_registry_manifests,
query_timeseries_bars,
)
from hyperstitionstud_io.version_sync import compute_programmatic_version_bump
fts_q = str(arguments.get("fts_query", "")).strip()
doc_t = str(arguments.get("doc_type", "all")).strip() or "all"
reg_q = str(arguments.get("registry", "")).strip()
aq_i = int(arguments.get("aq_int", 0) or 0)
sym_q = str(arguments.get("symbol", "")).strip()
st_d = str(arguments.get("start_date", "")).strip() or None
en_d = str(arguments.get("end_date", "")).strip() or None
min_p = float(arguments["min_points"]) if "min_points" in arguments and arguments["min_points"] else None
inc_bump = bool(arguments.get("include_version_bump_heuristics", True))
inc_base = bool(arguments.get("include_baseline_and_telemetry", True))
out_cat: dict[str, Any] = {"ok": True}
if fts_q:
try:
out_cat["fts_search"] = query_fts_catalog(fts_q, doc_type=doc_t, limit=15)
except Exception:
out_cat["fts_search"] = call_mcp_tool("hs_search_glossary_encyclopedia", {"query": fts_q, "limit": 10})
if reg_q:
try:
out_cat["registry_manifests"] = query_registry_manifests(registry=None if reg_q == "all" else reg_q)
except Exception:
out_cat["registry_manifests"] = []
if aq_i > 0:
try:
out_cat["coordinate_join"] = query_coordinate_join(aq_i)
except Exception:
out_cat["coordinate_join"] = {"coordinate_aq": aq_i}
if sym_q or st_d or en_d or min_p is not None:
try:
out_cat["timeseries_bars"] = query_timeseries_bars(
symbol=sym_q or None,
start_date=st_d,
end_date=en_d,
min_points=min_p,
)
except Exception:
out_cat["timeseries_bars"] = []
if inc_bump:
out_cat["version_bump_heuristics"] = compute_programmatic_version_bump()
if inc_base:
bp = get_default_baseline_cache_path()
if bp.is_file():
b_obj = json.loads(bp.read_text(encoding="utf-8"))
out_cat["internal_test_baseline"] = {
"expected_version": b_obj.get("expected_version"),
"expected_mcp_tool_count": b_obj.get("expected_mcp_tool_count"),
"expected_cidv1_by_artifact": b_obj.get("expected_cidv1_by_artifact"),
"erofs_protect_system_strict_audit": b_obj.get("erofs_protect_system_strict_audit"),
}
try:
out_cat["api_telemetry_summary"] = get_api_telemetry_summary()
if arguments.get("include_rotated_history"):
out_cat["longitudinal_telemetry_summary"] = get_longitudinal_telemetry_summary()
except Exception:
out_cat["api_telemetry_summary"] = {"quiescent": True}
return out_cat
if name == "hs_generate_highlights_summary":
from hyperstitionstud_io.publishing.highlights import build_recent_highlights_summary
foc = str(arguments.get("focus", "both")).strip() or "both"
m_ch = int(arguments.get("max_chars", 1100))
return build_recent_highlights_summary(focus=foc, max_chars=m_ch)
raise ValueError(f"Unknown MCP tool: {name}")
@@ -42,75 +42,121 @@ ENABLE_GUILE_SCHEME_LENS: bool = True
ENGINEERING_GUILE_CARTRIDGES: dict[str, dict[str, str]] = {
"E0": {
"title": "Guile Scheme Foil (E0): Homoiconic S-Expression Manifest & Z-Combinator Fixed-Point Closure",
"title": "Polyglot Foil (E0): Homoiconic S-Expressions, Static Readonly<T> Types & Rust Option<T> Manifest Closure",
"math_view": "Manifest M = (version, repos=6, tools=15, cidv1=H(M))",
"py_view": "manifest = introspect_engineering_manifest()\ncid = compute_dag_json_cidv1(manifest)",
"scm_expr": "(assoc-ref '((repositories 6) (mcp-tools 15) (lenses 4)) 'mcp-tools)",
"challenge": "Click 'Send to REPL' and change 'mcp-tools to 'repositories or evaluate (aq-base36 \"HYPERSTITION\").",
"ts_expr": "({repositories: 6, mcpTools: 15} satisfies Readonly<Record<string, number>>).mcpTools",
"rust_expr": 'manifest_lookup("mcp_tools")',
"challenge": "Switch between [λ Guile], [TS TypeScript], [Rs Rust], and [≡ ALL 3] or send any expression to the 4-Ring Hardened REPL.",
},
"ciphers-and-phonetics": {
"title": "Guile Scheme Foil (E1): Pure Z-Combinator Base-36 Alphanumeric Homomorphism",
"title": "Polyglot Foil (E1): Base-36 Alphanumeric Homomorphism in Guile (Z), TypeScript & Rust",
"math_view": "AQ(w) = ∑_{i=1}^k v(c_i), v('0'..'9')=0..9, v('a'..'z')=10..35",
"py_view": "sum(char_value_aq(ch) for ch in text)",
"scm_expr": "(aq-base36 \"LEMUR\")",
"challenge": "Verify AQ(\"LEMUR\") = 114 and test homomorphic concatenation (+ (aq-base36 \"LE\") (aq-base36 \"MUR\")).",
"scm_expr": '(aq-base36 "LEMUR")',
"ts_expr": 'aqBase36("LEMUR")',
"rust_expr": 'aq_base36("LEMUR")',
"challenge": 'Verify AQ("LEMUR") = 114 across all 3 languages in the hardened AST sandbox.',
},
"knowledge-graph-and-sqlite": {
"title": "Guile Scheme Foil (E2): Functional Pre/Post SHA-256 Read-Only Isolation Guard",
"title": "Polyglot Foil (E2): Pre/Post SHA-256 Read-Only Isolation Guard & Borrow Checking",
"math_view": "Guard(f): H_pre == H_expected ∧ H_post == H_pre",
"py_view": "with ReadOnlyIsolationGuard(cfg.read_only_files) as guard:\n run_pipeline()",
"scm_expr": "((lambda (pre post) (and (= pre 282) (= pre post))) 282 282)",
"challenge": "Test what happens in the REPL when post-state mutates from 282 to 283.",
"ts_expr": "((pre: number, post: number): boolean => pre === 282 && pre === post)(282, 282)",
"rust_expr": "isolation_guard_ok(282_u32, 282_u32)",
"challenge": "Compare Scheme's predicate, TypeScript's typed arrow guard, and Rust's Result<bool, Error>.",
},
"quant-macro-and-bayesian-brief": {
"title": "Guile Scheme Foil (E3): Zero-Synthetic #f Option Semantics & 4-Species Confluence Dose via Z",
"math_view": "D_{i,t} = ∑_{s=1}^4 I(Species_s) ∈ {0..4}, Closed/Private = #f",
"title": "Polyglot Foil (E3): Zero-Synthetic Missing-Data Semantics (#f / boolean / Option<f64>)",
"math_view": "D_{i,t} = ∑_{s=1}^4 I(Species_s) ∈ {0..4}, Closed/Private = null",
"py_view": "dose = sum(1 for flag in (s1, s2, s3, s4) if flag)",
"scm_expr": "(confluence-dose '(#t #t #t #f))",
"challenge": "Toggle the 4 species flags (#t / #f) in the REPL to observe Dose 0..4.",
"ts_expr": "[true, true, true, false].filter(Boolean).length",
"rust_expr": "[Some(135.4), None, Some(138.2)].iter().filter_map(|&x| x).count()",
"challenge": "Observe how Scheme #f, TypeScript filter(Boolean), and Rust Option::filter_map eliminate synthetic 0.0 fabrication.",
},
"mcp-chatbot-rest-and-ipld": {
"title": "Guile Scheme Foil (E4): Homoiconic S-Expression JSON-RPC Tool Dispatcher",
"title": "Polyglot Foil (E4): JSON-RPC 2.0 Tool Dispatch & 'envideea' = 137 (33rd Prime)",
"math_view": "Dispatch(name, args) → ToolTable[name](args)",
"py_view": "res = call_mcp_tool(target_tool, t_args)",
"scm_expr": "(list 'jsonrpc-2.0 'tool \"hs_evaluate_aq_and_ingglish\" (aq-base36 \"envideea\"))",
"challenge": "Evaluate (aq-base36 \"envideea\") => 137 (33rd prime) inside the S-expression.",
"scm_expr": '(list \'jsonrpc-2.0 \'tool "hs_evaluate_aq_and_ingglish" (aq-base36 "envideea"))',
"ts_expr": 'aqBase36("envideea")',
"rust_expr": 'mcp_dispatch_aq("envideea")',
"challenge": 'Evaluate "envideea" => 137 across Guile, TypeScript, and Rust.',
},
"cicd-vps-tmpfs-and-regression": {
"title": "Guile Scheme Foil (E5): 4-Tier Programmatic Semantic Version Bump Heuristic in Scheme",
"title": "Polyglot Foil (E5): 4-Tier Programmatic Semantic Version Bump Heuristic",
"math_view": "Bump(dirty, ahead, plans, tools, brk) ∈ {noop, patch, minor, major}",
"py_view": "evaluate_change_scope_heuristics(signals)['recommended_bump_level']",
"scm_expr": "(evaluate-bump-scope 2 0 1 0 #f)",
"challenge": "Set archived-plans to 0 => 'patch, or dirty=0 ahead=0 => 'noop in the REPL.",
"ts_expr": "evaluateBumpScope({dirty: 2, ahead: 0, plans: 1, tools: 0, breaking: false})",
"rust_expr": "evaluate_bump_scope(2, 0, 1, 0, false)",
"challenge": "Test the 4-tier decision tree (noop, patch, minor, major) in all 3 languages.",
},
}
def _render_polyglot_selector_html() -> str:
return (
'<div id="hsPolyglotModeSelector" class="hs-polyglot-segmented" role="radiogroup" aria-label="Pedagogical Programming Language Lens">'
'<span class="hs-polyglot-prefix">LENS:</span>'
'<button type="button" id="guileSchemeModeToggle" class="hs-polyglot-seg" role="radio" data-lens-mode="off" aria-checked="true" title="Hide programming language cartridges (Alt+0)">OFF</button>'
'<button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="guile" aria-checked="false" title="GNU Guile Scheme — Z-Combinator &amp; Exact Rationals (Alt+1)"><span class="hs-guile-lambda-badge">&lambda;</span>GUILE</button>'
'<button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="ts" aria-checked="false" title="TypeScript — Static Union Types &amp; Functional Pipelines (Alt+2)"><span class="hs-guile-lambda-badge">TS</span>TYPESCRIPT</button>'
'<button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="rust" aria-checked="false" title="Rust — Ownership, Option&lt;T&gt; &amp; Zero-Cost Iterators (Alt+3)"><span class="hs-guile-lambda-badge">Rs</span>RUST</button>'
'<button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="all" aria-checked="false" title="Side-by-side comparison of Guile Scheme, TypeScript, and Rust (Alt+4)">&equiv; ALL 3</button>'
'<strong id="guileSchemeModeState" style="display:none;">OFF</strong>'
'</div>'
)
def _render_guile_cartridge_html(key: str) -> str:
import html
c = ENGINEERING_GUILE_CARTRIDGES[key]
esc_expr = c["scm_expr"].replace('"', "&quot;")
esc_scm = html.escape(c["scm_expr"], quote=True)
esc_ts = html.escape(c["ts_expr"], quote=True)
esc_rs = html.escape(c["rust_expr"], quote=True)
esc_math = html.escape(c["math_view"], quote=True)
esc_py = html.escape(c["py_view"], quote=True)
esc_title = html.escape(c["title"], quote=True)
esc_chal = html.escape(c["challenge"], quote=True)
return (
'<section class="panel hs-plate-g3 hs-guile-cartridge">'
f'<div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;">'
f'<div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">&lambda; {c["title"]}</div>'
f'<button type="button" class="btn hs-load-in-repl-btn" data-scheme-expr="{esc_expr}" style="border-color:var(--cyan);color:var(--cyan);">Send to In-Browser Guile REPL &rarr;</button>'
'<div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;">'
f'<div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">&lambda; {esc_title}</div>'
'<div style="display:flex;gap:0.25rem;flex-wrap:wrap;align-items:center;">'
'<button type="button" class="hs-polyglot-seg" data-lens-mode="guile">&lambda; Guile</button>'
'<button type="button" class="hs-polyglot-seg" data-lens-mode="ts">TS TypeScript</button>'
'<button type="button" class="hs-polyglot-seg" data-lens-mode="rust">Rs Rust</button>'
'<button type="button" class="hs-polyglot-seg" data-lens-mode="all">&equiv; All 3</button>'
'<button type="button" class="hs-polyglot-seg" data-lens-mode="off">Hide</button>'
'</div>'
'</div>'
'<div class="hs-guile-triview">'
f'<div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Formal Specification:</strong><code>{c["math_view"]}</code></div>'
f'<div class="hs-guile-box"><strong style="color:var(--text-secondary);display:block;margin-bottom:0.2rem;">2. Production Python:</strong><pre style="white-space:pre-wrap;">{c["py_view"]}</pre></div>'
f'<div class="hs-guile-box"><strong style="color:var(--cyan);display:block;margin-bottom:0.2rem;">3. Guile Scheme (Z-Combinator):</strong><code class="hs-guile-code-expr">{c["scm_expr"]}</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Toggle Guile Lens ON to evaluate]</div></div>'
f'<div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Formal Specification &amp; Python:</strong><code>{esc_math}</code><pre style="white-space:pre-wrap;margin-top:0.25rem;color:var(--text-secondary);">{esc_py}</pre></div>'
f'<div class="hs-guile-box hs-lang-box-guile"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--cyan);">&lambda; Guile Scheme (Z-Combinator):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="guile" data-scheme-expr="{esc_scm}" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-guile-code-expr">{esc_scm}</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div>'
f'<div class="hs-guile-box hs-lang-box-ts"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--gold);">TS TypeScript (Strict AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="ts" data-scheme-expr="{esc_ts}" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-ts-code-expr">{esc_ts}</code><div class="hs-ts-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div>'
f'<div class="hs-guile-box hs-lang-box-rust"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--emerald);">Rs Rust (Option/Iterator AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="rust" data-scheme-expr="{esc_rs}" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-rust-code-expr">{esc_rs}</code><div class="hs-rust-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div>'
'</div>'
f'<div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge:</strong> {c["challenge"]}</div>'
f'<div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge (4-Ring Zero-Escape Sandbox):</strong> {esc_chal}</div>'
'</section>'
)
def _render_guile_repl_drawer_html(rel_prefix: str) -> str:
return f"""
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Guile Scheme and Z-Combinator REPL">
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Polyglot Guile Scheme, TypeScript, and Rust Hardened REPL">
<div style="display:flex;justify-content:space-between;align-items:center;gap:0.5rem;margin-bottom:0.45rem;">
<div style="font-size:0.74rem;font-weight:700;color:var(--cyan);">&lambda; IN-BROWSER GUILE SCHEME &amp; Z-COMBINATOR REPL (OFFLINE • ZERO CDN)</div>
<div style="font-size:0.73rem;font-weight:700;color:var(--cyan);">&lambda; 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
<div style="display:flex;gap:0.4rem;align-items:center;">
<select id="hsPolyglotReplLang" style="background:var(--bg-void);color:var(--cyan);border:1px solid var(--cyan);padding:0.15rem 0.35rem;font-family:inherit;font-size:0.68rem;font-weight:700;">
<option value="guile">λ Guile Scheme</option>
<option value="ts">TS TypeScript</option>
<option value="rust">Rs Rust</option>
</select>
<label style="font-size:0.68rem;color:var(--text-secondary);cursor:pointer;"><input type="checkbox" id="hsGuilePreferFloat" /> Float view</label>
<button type="button" id="hsGuileReplCloseBtn" class="btn" style="padding:0.15rem 0.45rem;font-size:0.68rem;">Minimize / Expand</button>
</div>
@@ -118,20 +164,25 @@ def _render_guile_repl_drawer_html(rel_prefix: str) -> str:
<div class="hs-repl-body">
<div style="display:flex;gap:0.4rem;margin-bottom:0.4rem;flex-wrap:wrap;">
<select id="hsGuileReplPreset" style="flex:1;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.28rem;font-family:inherit;font-size:0.7rem;">
<option value="">-- Load Preset Z-Combinator / Domain Expression --</option>
<option value='(aq-base36 "LEMUR")'>Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
<option value="(prime-factors 666)">Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
<option value="(variance-pop *cluster-292-gen0*)">Exact Rational Variance (Cluster 292 Gen 0): (variance-pop *cluster-292-gen0*)</option>
<option value="(eti-score 95 92 94 90 91 96)">Exact Rational Convex ETI Score: (eti-score 95 92 94 90 91 96)</option>
<option value="((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">Thomas' Calculus Derivative d/dx(x^3) at x=2 via Z</option>
<option value="(adaptive-simpson (lambda (x) (* x x)) 0.0 3.0 1e-6)">Adaptive Simpson Integral int_0^3 x^2 dx = 9.0 via Z</option>
<option value="(bayes-update '(1/3 1/3 1/3) '(1/10 3/10 6/10))">Exact Rational 3-State Bayes Update via Z</option>
<option value="">-- Load Preset Polyglot Expression (Guile / TS / Rust) --</option>
<option value='guile::(aq-base36 "LEMUR")'>[λ Guile] Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
<option value='ts::aqBase36("LEMUR")'>[TS] Base-36 AQ: aqBase36("LEMUR") => 114</option>
<option value='rust::aq_base36("LEMUR")'>[Rs Rust] Base-36 AQ: aq_base36("LEMUR") => 114</option>
<option value="guile::(prime-factors 666)">[λ Guile] Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
<option value="ts::primeFactors(666)">[TS] Prime Factors: primeFactors(666) => [2,3,3,37]</option>
<option value="rust::prime_factors(666_u64)">[Rs Rust] Prime Factors: prime_factors(666_u64) => vec![2, 3, 3, 37]</option>
<option value="guile::(variance-pop *cluster-292-gen0*)">[λ Guile] Exact Rational Variance (Cluster 292): 4634/9</option>
<option value="ts::variancePop([264, 317, 276] as const)">[TS] Cluster 292 Variance: 514.8889</option>
<option value="rust::variance_pop(&[264.0, 317.0, 276.0])">[Rs Rust] Cluster 292 Variance: 514.8889</option>
<option value="guile::((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">[λ Guile] Thomas' Calculus d/dx(x^3) at x=2 => 12.0</option>
<option value="ts::derivative((x: number): number => x ** 3, 1e-5)(2.0)">[TS] Derivative d/dx(x^3) at x=2 => 12</option>
<option value="rust::derivative(|x: f64| x * x * x, 1e-5, 2.0)">[Rs Rust] Derivative d/dx(x^3) at x=2 => 12</option>
</select>
<button type="button" id="hsGuileReplEvalBtn" class="btn" style="border-color:var(--emerald);color:var(--emerald);">Evaluate (&lambda;)</button>
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step &beta;-Reduction</button>
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step AST Trace</button>
</div>
<textarea id="hsGuileReplInput" rows="2" style="width:100%;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.45rem;font-family:inherit;font-size:0.73rem;">(aq-base36 "LEMUR")</textarea>
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">guile&gt; Ready. Toggle [λ GUILE SCHEME LENS: ON] or click Evaluate (λ).</pre>
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">polyglot&gt; Ready (4-Ring Zero-Eval AST Sandbox). Select [λ GUILE | TS | RS | ≡ ALL 3] or click Evaluate (λ).</pre>
</div>
</aside>
<script src="{rel_prefix}../assets/hs-guile-scheme-repl.js?v={CURRENT_VERSION}"></script>"""
@@ -151,7 +202,7 @@ ENGINEERING_SUBPAGE_SPECS: dict[str, dict[str, Any]] = {
"ciphers-and-phonetics": {
"unit_id": "E1",
"slug": "ciphers-and-phonetics",
"title": "Unit E1: Base-36 AQ Ciphers, Offline CMUdict Phonetics & Zero-d-Filter Isolation",
"title": "Unit E1: Base-36 AQ Ciphers, Offline CMUdict Phonetics & Bidirectional Lock Evaluation",
"short_title": "E1: Ciphers & Phonetics",
"pip_class": "plate-lock-gold",
"expertise_level": "Level 2: Introductory Python & Text Processing (10-15 hrs study)",
@@ -169,8 +220,8 @@ ENGINEERING_SUBPAGE_SPECS: dict[str, dict[str, Any]] = {
],
"sections": [
{
"heading": "1. PEP 420 Namespace & Zero-d-Filter Boundary (hyperstitionstud_io.ciphers)",
"body": "The cipher engine maps digits 0-9 to 0..9 (ord(c)-48) and ASCII letters A-Z to 10..35 (ord(c)-87) across three quantization modes: digit (default), off (qualitative lexical only), and spoken (number-word expansion via int_to_spoken_words()). assert_zero_d_filter() enforces a hard boundary preventing legacy 10-letter decagram filters from ever entering Zoology or Knowledge Graph artifacts.",
"heading": "1. PEP 420 Namespace & Quantization Modes (hyperstitionstud_io.ciphers)",
"body": "The cipher engine maps digits 0-9 to 0..9 (ord(c)-48) and ASCII letters A-Z to 10..35 (ord(c)-87) across three quantization modes: digit (default), off (qualitative lexical only), and spoken (number-word expansion via int_to_spoken_words()), evaluating prime index ranks, 37×3k repdigit attractors, and 12-field bidirectional locks.",
},
{
"heading": "2. Three-Tier Offline Phonemic Transducer (hyperstitionstud_io.phonetics)",
@@ -364,14 +415,10 @@ def _render_nav_html(active_slug: str | None, enabled_subpages: list[str], rel_p
style = "border-color:var(--gold);color:var(--gold);" if is_act else ""
links.append(f'<a class="btn" href="{href}" style="{style}">{spec["short_title"]}</a>')
links.append(f'<a class="btn" href="{rel_prefix}../math/index.html">Math Hub (/math/)</a>')
links.append(
'<button id="guileSchemeModeToggle" class="btn hs-guile-toggle" type="button" aria-pressed="false" title="Toggle additive Guile Scheme &amp; Z-Combinator teaching cartridges and in-browser REPL (Alt+S)">'
'<span class="hs-guile-lambda-badge">&lambda;</span>'
'<span>GUILE SCHEME LENS: <strong id="guileSchemeModeState">OFF</strong></span></button>'
)
links.append(_render_polyglot_selector_html())
links.append('<span class="nav-donate-sep" aria-hidden="true"></span>')
links.append(
f'<a class="btn-donate-pill" href="{rel_prefix}../donate/index.html">'
f'<a class="btn-donate-pill" href="{rel_prefix}../donate/index.html?from=engineering">'
'<span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>'
)
return "\n ".join(links)
@@ -415,11 +462,19 @@ def _render_hub_html(manifest: dict[str, Any], include_guile_lens: bool = True)
guile_drawer_html = _render_guile_repl_drawer_html("") if include_guile_lens else ""
cards_html = ""
sigil_map = {
"E1": "&#x263F;",
"E2": "&#x2609;",
"E3": "&#x2644; &#x260D;",
"E4": "&#x269A;",
"E5": "&#x269B;",
}
for s in enabled:
sp = ENGINEERING_SUBPAGE_SPECS[s]
sig = sigil_map.get(sp["unit_id"], "&#x269B;")
cards_html += (
f'<article class="panel hs-plate-g3 {sp["pip_class"]}" style="padding:1rem 1.15rem;display:flex;flex-direction:column;justify-content:space-between;gap:0.6rem;">'
f'<div><div style="font-size:0.7rem;color:var(--gold);font-weight:700;">{sp["unit_id"]} // {sp["expertise_level"]}</div>'
f'<div><div style="font-size:0.7rem;color:var(--gold);font-weight:700;"><span class="hs-sigil" aria-hidden="true">{sig}</span>{sp["unit_id"]} // {sp["expertise_level"]}</div>'
f'<h2 style="font-size:0.95rem;margin:0.25rem 0;color:var(--text-main);">{sp["title"]}</h2>'
f'<p style="font-size:0.74rem;color:var(--text-secondary);line-height:1.5;">{sp["sections"][0]["body"]}</p></div>'
f'<div><a class="btn" href="{s}/index.html">Open {sp["short_title"]} Subpage &#x2192;</a></div></article>'
@@ -459,7 +514,7 @@ def _render_hub_html(manifest: dict[str, Any], include_guile_lens: bool = True)
<header>
<div>
<h1>HYPERSTITION STUDIO // SOFTWARE ENGINEERING EXPLICATION HUB (UNIT E0)</h1>
<p class="subtitle">Commutative Live-Introspected Architecture &bull; Piecewise &amp; Non-Sequentially Revertible Cartridges &bull; urn:io:hyperstitionstud:engineering:v{CURRENT_VERSION}</p>
<p class="subtitle">Commutative Live-Introspected Architecture &bull; Piecewise &amp; Non-Sequentially Revertible Cartridges &bull; urn:io:hyperstitionstud:engineering:v{CURRENT_VERSION} <span class="hs-sigil-seal" aria-hidden="true">[ &#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; ]</span></p>
</div>
<nav class="top-nav">
{nav_html}
@@ -499,9 +554,10 @@ def _render_hub_html(manifest: dict[str, Any], include_guile_lens: bool = True)
</section>
<footer>
hyperstitionstud.io/engineering v{CURRENT_VERSION} &bull; CIDv1: <code>{manifest["ipld_dag_json_cidv1"]["/"][:36]}...</code> &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
hyperstitionstud.io/engineering v{CURRENT_VERSION} &bull; CIDv1: <code>{manifest["ipld_dag_json_cidv1"]["/"][:36]}...</code> &bull; <span class="hs-sigil-colophon" aria-hidden="true">&#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; &middot; &#x2644;</span> &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
</footer>
</div>
<script src="../assets/hs-matrix-coderain.js?v={CURRENT_VERSION}" defer></script>
<script src="engineering-manifest-data.js?v={CURRENT_VERSION}"></script>
<script src="engineering-app.js?v={CURRENT_VERSION}"></script>{guile_drawer_html}
</body>
@@ -554,7 +610,7 @@ def _render_subpage_html(slug: str, manifest: dict[str, Any], include_guile_lens
<header>
<div>
<h1>{spec["title"]}</h1>
<p class="subtitle">Cartridge {spec["unit_id"]} &bull; Non-Sequentially Revertible via <code>hs-eng-docs --disable {slug}</code> &bull; v{CURRENT_VERSION}</p>
<p class="subtitle">Cartridge {spec["unit_id"]} &bull; Non-Sequentially Revertible via <code>hs-eng-docs --disable {slug}</code> &bull; v{CURRENT_VERSION} <span class="hs-sigil-seal" aria-hidden="true">[ &#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; ]</span></p>
</div>
<nav class="top-nav">
{nav_html}
@@ -571,9 +627,10 @@ def _render_subpage_html(slug: str, manifest: dict[str, Any], include_guile_lens
</div>
<footer>
hyperstitionstud.io/engineering/{slug} v{CURRENT_VERSION} &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
hyperstitionstud.io/engineering/{slug} v{CURRENT_VERSION} &bull; <span class="hs-sigil-colophon" aria-hidden="true">&#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; &middot; &#x2644;</span> &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
</footer>
</div>
<script src="../../assets/hs-matrix-coderain.js?v={CURRENT_VERSION}" defer></script>
<script src="../engineering-manifest-data.js?v={CURRENT_VERSION}"></script>
<script src="../engineering-app.js?v={CURRENT_VERSION}"></script>{guile_drawer_html}
</body>
+31 -1
View File
@@ -22,17 +22,47 @@ FONT_SEARCH_DIRS = [
]
def _reportlab_vera_fallback(filename: str) -> Path | None:
try:
import reportlab
rl_fonts = Path(reportlab.__file__).resolve().parent / "fonts"
low = filename.lower()
if "bold" in low and ("oblique" in low or "italic" in low):
cand = rl_fonts / "VeraBI.ttf"
elif "bold" in low:
cand = rl_fonts / "VeraBd.ttf"
elif "oblique" in low or "italic" in low:
cand = rl_fonts / "VeraIt.ttf"
else:
cand = rl_fonts / "Vera.ttf"
if cand.is_file():
return cand
except Exception:
pass
return None
def resolve_font_path(filename: str, fallback_filename: str | None = None) -> Path | None:
for d in FONT_SEARCH_DIRS:
cand = d / filename
if cand.is_file():
return cand
sys_fonts = Path("/usr/share/fonts")
if sys_fonts.is_dir():
for match in sys_fonts.rglob(filename):
if match.is_file():
return match
if fallback_filename:
for d in FONT_SEARCH_DIRS:
cand = d / fallback_filename
if cand.is_file():
return cand
return None
if sys_fonts.is_dir():
for match in sys_fonts.rglob(fallback_filename):
if match.is_file():
return match
return _reportlab_vera_fallback(filename)
def load_pillow_font(filename: str, size: int) -> Any:
@@ -0,0 +1,245 @@
#!/usr/bin/env python3
"""
hyperstitionstud_io.publishing.highlights
Ad-Hoc Two-Paragraph Phone-Messenger Highlights Summary Generator (`hs-highlights` & `hs_generate_highlights_summary`).
Enforces:
- Maximum 2 paragraphs (`paragraph_count <= 2`, separated by `\n\n`),
- Phone-messenger readability (`char_count <= 1,100`, 0 HTML tags, 0 raw LaTeX backslashes, 0 Markdown tables),
- Exclusive output to `/workspace/untracked/recent-highlights/` (`0` dirty files in tracked Git repositories,
with graceful `EROFS` fallback),
- Zero Web UI exposure (`0` DOM/HTML buttons added to any web surface),
- Zero metered LLM tokens (`0` API calls, `< 20 ms` runtime).
"""
from __future__ import annotations
import argparse
import datetime
import json
from pathlib import Path
from typing import Any
from hyperstitionstud_io import __version__ as CURRENT_VERSION
from hyperstitionstud_io.config import load_workspace_config
from hyperstitionstud_io.glossary import ReadOnlyIsolationGuard
from hyperstitionstud_io.ipld import compute_dag_json_cidv1
from hyperstitionstud_io.mcp.tools import MCP_TOOLS_SCHEMA
from hyperstitionstud_io.publishing.archive_rotator import snapshot_gematria_pipeline_richness
from hyperstitionstud_io.publishing.engineering_docs import introspect_engineering_manifest
from hyperstitionstud_io.publishing.math_docs import introspect_math_manifest
from hyperstitionstud_io.version_sync import compute_programmatic_version_bump
def compute_corpus_delta_report(workspace_root: str | Path | None = None) -> dict[str, Any]:
"""
Compute a deterministic, zero-LLM-token corpus & release delta snapshot (`Strategy 1B`: `--corpus-delta`)
comparing current `snapshot_gematria_pipeline_richness()` and `compute_programmatic_version_bump()`
against the cached prior richness snapshot (or baseline state).
"""
cfg = load_workspace_config(workspace_root=workspace_root)
cur_snap = snapshot_gematria_pipeline_richness(workspace_root=cfg.workspace_root)
bump_info = compute_programmatic_version_bump(ws_root=cfg.workspace_root)
cache_p = cfg.core_dir / ".cache" / "corpus-richness-baseline.json"
prior_snap = cur_snap
if cache_p.is_file():
try:
prior_snap = json.loads(cache_p.read_text(encoding="utf-8"))
except Exception:
prior_snap = cur_snap
numeric_keys = (
"dossiers_count",
"dated_news_dossiers_count",
"glossary_entries_count",
"bilingual_specimens_count",
"kg_nodes_count",
"kg_edges_count",
"quant_instruments_count",
"real_exchange_bars_count",
"fred_macro_series_count",
"calc_db_txt_bytes",
"cmudict_fallback_entries",
)
deltas: dict[str, int] = {}
for k in numeric_keys:
deltas[k] = int(cur_snap.get(k, 0)) - int(prior_snap.get(k, cur_snap.get(k, 0)))
return {
"current_version": CURRENT_VERSION,
"baseline_git_tag": bump_info.get("baseline_git_tag"),
"recommended_bump_level": bump_info.get("recommended_bump_level"),
"next_version": bump_info.get("next_version"),
"newly_archived_plans": bump_info.get("signals", {}).get("newly_archived_plans", []),
"new_cli_scripts": bump_info.get("signals", {}).get("new_cli_scripts", []),
"new_mcp_tools": bump_info.get("signals", {}).get("new_mcp_tools", []),
"current_richness": cur_snap,
"deltas_since_baseline": deltas,
"llm_tokens_used": 0,
}
def build_recent_highlights_summary(
focus: str = "both",
max_chars: int = 1100,
out_dir: str | Path | None = None,
workspace_root: str | Path | None = None,
include_corpus_delta: bool = False,
) -> dict[str, Any]:
"""
Generate the <= 2 paragraph phone-messenger highlights summary for software engineers
and mathematics enthusiasts and persist all output artifacts exclusively to
`/workspace/untracked/recent-highlights/` when writable.
"""
cfg = load_workspace_config(workspace_root=workspace_root)
focus_norm = focus.strip().lower()
if focus_norm not in ("both", "eng", "engineering", "math", "mathematics"):
focus_norm = "both"
with ReadOnlyIsolationGuard(cfg.read_only_files) as guard:
eng_man = introspect_engineering_manifest(workspace_root=workspace_root)
math_man = introspect_math_manifest(workspace_root=workspace_root)
eng_c = eng_man["introspected_counts"]
math_inv = math_man["algebraic_invariants"]
math_emp = math_man["empirical_counts"]
tool_cnt = len(MCP_TOOLS_SCHEMA)
p_eng = (
f"[Hyperstition Studio v{CURRENT_VERSION} — Software Engineering Highlights] "
f"Across {eng_c['repositories']} offline-portable repositories served from a RAM-backed tmpfs webroot over Caddy HTTP/3 + Brotli-11, "
f"recent releases shipped an introspective /engineering/ hub (Units E0–E5), a {tool_cnt}-tool stateless read-only MCP & OpenAPI 3.1.0 REST server (:8095) "
f"with IPLD dag-json (0x0129) CIDv1 provenance and quiescent 100M SQLite FTS5 logrotate, an in-process ProtectSystem=strict (EROFS) syscall test harness, "
f"34x latency fast-paths (~35 ms 900x1260 PNG/JSON stats cards), and a 6-gate public regression suite (hs-public-smoke) + zero-token SemVer bumper. "
f"Explore: https://hyperstitionstud.io/engineering/"
)
p_math = (
f"[Applied Mathematics & Quantitative Semiotics Highlights] "
f"On /math/ (Units M0–M5) and /quant/, every metric is computed with 0 synthetic data (missing/holiday/private observations serialize strictly as null): "
f"phonemic projection Φ: Σ_eng* → Σ_ing* collapses Cluster 292 variance from σ²_0 = {math_inv['cluster_292_gen0_variance']} to σ²_1 = {math_inv['cluster_292_gen1_variance']} "
f"across {math_inv['g4_isometric_fixed_point_count']} G4 isometric fixed points, while the 4-species Confluence Dose (D ∈ {{0..4}}) across "
f"{math_emp['total_real_bars_n']} real exchange bars and {math_emp['fred_macro_series_n']} native-cadence St. Louis Fed (FRED) macro series reveals a -58% median volatility compression "
f"at Dose 2 (101 bps vs. 240.5 bps) and powers a 3-state discrete Bayesian regime brief + a 4-ring hardened Guile Scheme (λ Z-combinator), TypeScript, and Rust REPL. "
f"Explore: https://hyperstitionstud.io/math/"
)
if focus_norm in ("eng", "engineering"):
paragraphs = [p_eng]
elif focus_norm in ("math", "mathematics"):
paragraphs = [p_math]
else:
paragraphs = [p_eng, p_math]
full_text = "\n\n".join(paragraphs)
if len(full_text) > max_chars:
# Compact while keeping <= 2 paragraphs and preserving trailing URLs
budget_per_p = max(120, (max_chars - 2) // len(paragraphs))
compacted: list[str] = []
for p_str in paragraphs:
if len(p_str) <= budget_per_p:
compacted.append(p_str)
else:
url_idx = p_str.rfind("Explore: https://")
suffix = (" " + p_str[url_idx:]) if url_idx != -1 else ""
keep_len = max(40, budget_per_p - len(suffix) - 3)
cut = p_str[:keep_len].rsplit(" ", 1)[0]
compacted.append(cut + "..." + suffix)
paragraphs = compacted
full_text = "\n\n".join(paragraphs)
target_untracked = (
Path(out_dir)
if out_dir is not None
else (cfg.workspace_root / "untracked" / "recent-highlights")
)
ws_resolved_s = str(cfg.workspace_root.resolve())
def _container_rel(p: Path) -> str:
s = str(p)
if s.startswith(ws_resolved_s):
return "/workspace" + s[len(ws_resolved_s):]
return s
txt_latest = target_untracked / "recent-highlights-summary-latest.txt"
json_latest = target_untracked / "recent-highlights-summary-latest.json"
txt_ver = target_untracked / f"recent-highlights-summary-v{CURRENT_VERSION}.txt"
json_ver = target_untracked / f"recent-highlights-summary-v{CURRENT_VERSION}.json"
payload: dict[str, Any] = {
"ok": True,
"version": CURRENT_VERSION,
"generated_at_utc": datetime.datetime.now(datetime.timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ"),
"focus": focus_norm,
"paragraph_count": len(paragraphs),
"char_count": len(full_text),
"max_chars": max_chars,
"llm_tokens_used": 0,
"web_ui_exposed": False,
"paragraphs": paragraphs,
"messenger_text": full_text,
"metrics_snapshot": {
"repositories": eng_c["repositories"],
"cli_entrypoints": eng_c["cli_entrypoints"],
"mcp_tools": tool_cnt,
"cluster_292_gen0_variance": math_inv["cluster_292_gen0_variance"],
"cluster_292_gen1_variance": math_inv["cluster_292_gen1_variance"],
"g4_isometric_fixed_points": math_inv["g4_isometric_fixed_point_count"],
"real_exchange_bars_n": math_emp["total_real_bars_n"],
"fred_macro_series_n": math_emp["fred_macro_series_n"],
},
"untracked_artifacts": {
"out_dir": _container_rel(target_untracked),
"txt_path": _container_rel(txt_latest),
"json_path": _container_rel(json_latest),
"versioned_txt_path": _container_rel(txt_ver),
"versioned_json_path": _container_rel(json_ver),
"persisted_to_untracked": False,
},
}
payload["ipld_dag_json_cidv1"] = {"/": compute_dag_json_cidv1(payload)}
if include_corpus_delta:
payload["corpus_delta"] = compute_corpus_delta_report(workspace_root=cfg.workspace_root)
try:
target_untracked.mkdir(parents=True, exist_ok=True)
txt_latest.write_text(full_text + "\n", encoding="utf-8")
txt_ver.write_text(full_text + "\n", encoding="utf-8")
payload["untracked_artifacts"]["persisted_to_untracked"] = True
json_bytes = (json.dumps(payload, indent=2, ensure_ascii=False) + "\n").encode("utf-8")
json_latest.write_bytes(json_bytes)
json_ver.write_bytes(json_bytes)
except OSError:
payload["untracked_artifacts"]["persisted_to_untracked"] = False
payload["isolation_receipt"] = guard.audit_receipt()
return payload
def main(argv: list[str] | None = None) -> int:
ap = argparse.ArgumentParser(
prog="hs-highlights",
description="Generate a <= 2 paragraph phone-messenger highlights summary for software engineers and mathematics enthusiasts (writes to /workspace/untracked/recent-highlights/).",
)
ap.add_argument("--focus", default="both", choices=["both", "eng", "math"], help="Target audience focus (default: both).")
ap.add_argument("--max-chars", type=int, default=1100, help="Maximum total characters (default: 1100).")
ap.add_argument("--out-dir", default=None, help="Output directory (defaults to /workspace/untracked/recent-highlights).")
ap.add_argument("--corpus-delta", action="store_true", help="Include deterministic corpus richness & Git tag delta report (Strategy 1B).")
ap.add_argument("--json", action="store_true", help="Print full JSON payload to stdout instead of plain messenger text.")
args = ap.parse_args(argv)
res = build_recent_highlights_summary(
focus=args.focus,
max_chars=args.max_chars,
out_dir=args.out_dir,
include_corpus_delta=args.corpus_delta,
)
if args.json or args.corpus_delta:
print(json.dumps(res, indent=2, ensure_ascii=False))
else:
print(res["messenger_text"])
return 0
if __name__ == "__main__":
raise SystemExit(main())
+67 -32
View File
@@ -42,65 +42,92 @@ ENABLE_GUILE_SCHEME_LENS: bool = True
MATH_GUILE_CARTRIDGES: dict[str, dict[str, str]] = {
"M0": {
"title": "Guile Scheme Foil (M0): Applicative-Order Z Combinator & Thomas' Calculus Foundation",
"math_view": "Z = λf. (λx. f (λv. (x x) v)) (λx. f (λv. (x x) v))",
"title": "Polyglot Foil (M0): Applicative-Order Z Combinator, TypeScript Array.reduce & Rust Range.fold",
"math_view": "Z = λf. (λx. f (λv. (x x) v)) (λx. f (λv. (x x) v)), ∑_{i=1}^{10} i = 55",
"py_view": "# Strict applicative-order fixed-point combinator (z-calculus-scheme)\nZ = lambda f: (lambda x: f(lambda *a: x(x)(*a)))(lambda x: f(lambda *a: x(x)(*a)))",
"scm_expr": "((Z (lambda (recur) (lambda (n acc) (if (<= n 0) acc (recur (- n 1) (+ acc n)))))) 10 0)",
"challenge": "Evaluate ∑_{i=1}^{10} i = 55 via pure anonymous Z-recursion in the REPL.",
"ts_expr": "Array.from({length: 10}, (_, i): number => i + 1).reduce((a, b) => a + b, 0)",
"rust_expr": "(1..=10_i64).fold(0_i64, |acc, x| acc + x)",
"challenge": "Compare how Scheme's anonymous Z-combinator, TypeScript's reduce, and Rust's fold compute ∑_{i=1}^{10} i = 55.",
},
"base36-algebra-and-primes": {
"title": "Guile Scheme Foil (M1): Base-36 Semiring Valuation, Mod-9 Root & Prime Factorization via Z",
"title": "Polyglot Foil (M1): Base-36 Semiring Valuation, Mod-9 Root & Prime Factorization",
"math_view": "666 = 2 × 3² × 37, 777 = 3 × 7 × 37, dr_9(n) = 1 + ((n - 1) mod 9)",
"py_view": "compute_aq('envideea') == 137 # 33rd prime",
"scm_expr": "(prime-factors 666)",
"challenge": "Click 'Send to REPL' and factor 777 or 333, or evaluate (digital-root-mod9 666) => 9.",
"ts_expr": "primeFactors(666)",
"rust_expr": "prime_factors(666_u64)",
"challenge": "Factor 666 or 777 across Guile Scheme, TypeScript, and Rust in the 4-Ring Hardened REPL.",
},
"phonemic-projections-and-g-vectors": {
"title": "Guile Scheme Foil (M2): Exact Rational Population Variance Collapse on Cluster 292 via Z",
"title": "Polyglot Foil (M2): Population Variance Collapse on Cluster 292 (Exact Rational vs. Float)",
"math_view": "σ²_0({264, 317, 276}) = 4634/9 ≈ 514.89 → σ²_1({292, 292, 292}) = 0",
"py_view": "compute_variance([264, 317, 276]) # 514.89 -> 0.0",
"scm_expr": "(variance-pop *cluster-292-gen0*)",
"challenge": "Evaluate (variance-pop *cluster-292-gen1*) => 0 in the REPL and compare exact rational 4634/9 vs float.",
"ts_expr": "variancePop([264, 317, 276] as const)",
"rust_expr": "variance_pop(&[264.0, 317.0, 276.0])",
"challenge": "Notice Guile's exact rational 4634/9 vs. TypeScript and Rust IEEE-754 float 514.8889.",
},
"graph-topology-and-eti-scoring": {
"title": "Guile Scheme Foil (M3): Exact Rational Convex ETI Functional (∑ w_k = 1)",
"title": "Polyglot Foil (M3): Convex ETI Functional (∑ w_k = 1, S1 Apex = 93.08)",
"math_view": "ETI = (1/5)CAP + (9/50)COL + (9/50)ARM + (4/25)PRM + (7/50)VEL + (7/50)RES",
"py_view": "0.20*cap + 0.18*col + 0.18*arm + 0.16*prm + 0.14*vel + 0.14*res",
"scm_expr": "(+ 1/5 9/50 9/50 4/25 7/50 7/50)",
"challenge": "Verify that the exact rational weights sum to 1 (not 0.9999999999999999) and evaluate (eti-score 95 92 94 90 91 96).",
"ts_expr": "etiScore({cap: 95, col: 92, arm: 94, prm: 90, vel: 91, res: 96})",
"rust_expr": "eti_score(95.0, 92.0, 94.0, 90.0, 91.0, 96.0)",
"challenge": "Verify the convex weights and composite ETI score across Guile, TypeScript, and Rust.",
},
"timeseries-moments-and-confluence-dose": {
"title": "Guile Scheme Foil (M4): Confluence Dose D ∈ {0..4} & Thomas' Calculus Central Derivative via Z",
"title": "Polyglot Foil (M4): Thomas' Calculus Central Derivative d/dx(x^3) at x=2.0",
"math_view": "f'(x) = lim_{h→0} (f(x+h) - f(x-h)) / (2h), D_{i,t} = ∑ I(A_s)",
"py_view": "confluence_dose = sum(1 for x in species_hits if x)",
"scm_expr": "((derivative (lambda (x) (* x x x)) 1e-5) 2.0)",
"challenge": "Compute the derivative of x^3 at x=2.0 (=> 12.0) or the 2nd derivative via ((nth-derivative (lambda (x) (* x x x)) 2 1e-3) 2.0).",
"ts_expr": "derivative((x: number): number => x ** 3, 1e-5)(2.0)",
"rust_expr": "derivative(|x: f64| x * x * x, 1e-5, 2.0)",
"challenge": "Compare higher-order derivative closures in Guile Scheme, TypeScript, and Rust.",
},
"macro-spreads-and-bayesian-inference": {
"title": "Guile Scheme Foil (M5): Exact Rational 3-State Bayesian Posterior & Adaptive Simpson Quadrature via Z",
"title": "Polyglot Foil (M5): 3-State Discrete Bayesian Posterior & Adaptive Simpson Quadrature",
"math_view": "P(R_m | E_t) = L_m P_m / ∑_k L_k P_k, ∫_a^b f(x) dx via Simpson Z-subdivision",
"py_view": "post = [p * l / z for p, l in zip(priors, likelihoods)]",
"scm_expr": "(bayes-update '(1/3 1/3 1/3) '(1/10 3/10 6/10))",
"challenge": "Observe the exact rational posterior '(1/10 3/10 3/5) summing to 1, or integrate x^2 from 0 to 3 via (adaptive-simpson (lambda (x) (* x x)) 0.0 3.0 1e-6).",
"ts_expr": "bayesUpdate([1/3, 1/3, 1/3], [0.1, 0.3, 0.6])",
"rust_expr": "bayes_update(&[1.0/3.0; 3], &[0.1, 0.3, 0.6])",
"challenge": "Compare Guile's exact rational '(1/10 3/10 3/5) with TypeScript and Rust array posteriors.",
},
}
def _render_math_guile_cartridge_html(key: str) -> str:
import html
c = MATH_GUILE_CARTRIDGES[key]
esc_expr = c["scm_expr"].replace('"', "&quot;")
esc_scm = html.escape(c["scm_expr"], quote=True)
esc_ts = html.escape(c["ts_expr"], quote=True)
esc_rs = html.escape(c["rust_expr"], quote=True)
esc_math = html.escape(c["math_view"], quote=True)
esc_py = html.escape(c["py_view"], quote=True)
esc_title = html.escape(c["title"], quote=True)
esc_chal = html.escape(c["challenge"], quote=True)
return (
'<section class="panel hs-plate-g3 hs-guile-cartridge">'
f'<div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;">'
f'<div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">&lambda; {c["title"]}</div>'
f'<button type="button" class="btn hs-load-in-repl-btn" data-scheme-expr="{esc_expr}" style="border-color:var(--cyan);color:var(--cyan);">Send to In-Browser Guile REPL &rarr;</button>'
'<div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;">'
f'<div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">&lambda; {esc_title}</div>'
'<div style="display:flex;gap:0.25rem;flex-wrap:wrap;align-items:center;">'
'<button type="button" class="hs-polyglot-seg" data-lens-mode="guile">&lambda; Guile</button>'
'<button type="button" class="hs-polyglot-seg" data-lens-mode="ts">TS TypeScript</button>'
'<button type="button" class="hs-polyglot-seg" data-lens-mode="rust">Rs Rust</button>'
'<button type="button" class="hs-polyglot-seg" data-lens-mode="all">&equiv; All 3</button>'
'<button type="button" class="hs-polyglot-seg" data-lens-mode="off">Hide</button>'
'</div>'
'</div>'
'<div class="hs-guile-triview">'
f'<div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Mathematical Identity:</strong><code>{c["math_view"]}</code></div>'
f'<div class="hs-guile-box"><strong style="color:var(--text-secondary);display:block;margin-bottom:0.2rem;">2. Production Python:</strong><pre style="white-space:pre-wrap;">{c["py_view"]}</pre></div>'
f'<div class="hs-guile-box"><strong style="color:var(--cyan);display:block;margin-bottom:0.2rem;">3. Guile Scheme (Z-Combinator):</strong><code class="hs-guile-code-expr">{c["scm_expr"]}</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Toggle Guile Lens ON to evaluate]</div></div>'
f'<div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Mathematical Identity &amp; Python:</strong><code>{esc_math}</code><pre style="white-space:pre-wrap;margin-top:0.25rem;color:var(--text-secondary);">{esc_py}</pre></div>'
f'<div class="hs-guile-box hs-lang-box-guile"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--cyan);">&lambda; Guile Scheme (Z-Combinator):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="guile" data-scheme-expr="{esc_scm}" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-guile-code-expr">{esc_scm}</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div>'
f'<div class="hs-guile-box hs-lang-box-ts"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--gold);">TS TypeScript (Strict AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="ts" data-scheme-expr="{esc_ts}" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-ts-code-expr">{esc_ts}</code><div class="hs-ts-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div>'
f'<div class="hs-guile-box hs-lang-box-rust"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--emerald);">Rs Rust (Option/Iterator AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="rust" data-scheme-expr="{esc_rs}" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL &rarr;</button></div><code class="hs-rust-code-expr">{esc_rs}</code><div class="hs-rust-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div>'
'</div>'
f'<div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge:</strong> {c["challenge"]}</div>'
f'<div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge (4-Ring Zero-Escape Sandbox):</strong> {esc_chal}</div>'
'</section>'
)
@@ -336,15 +363,13 @@ def _render_math_nav_html(active_slug: str | None, enabled_subpages: list[str],
href = f"{s}/index.html" if active_slug is None else (f"../{s}/index.html" if not is_act else "index.html")
style = "border-color:var(--gold);color:var(--gold);" if is_act else ""
links.append(f'<a class="btn" href="{href}" style="{style}">{spec["short_title"]}</a>')
from hyperstitionstud_io.publishing.engineering_docs import _render_polyglot_selector_html
links.append(f'<a class="btn" href="{rel_prefix}../engineering/index.html">Engineering Hub (/engineering/)</a>')
links.append(
'<button id="guileSchemeModeToggle" class="btn hs-guile-toggle" type="button" aria-pressed="false" title="Toggle additive Guile Scheme &amp; Z-Combinator teaching cartridges and in-browser REPL (Alt+S)">'
'<span class="hs-guile-lambda-badge">&lambda;</span>'
'<span>GUILE SCHEME LENS: <strong id="guileSchemeModeState">OFF</strong></span></button>'
)
links.append(_render_polyglot_selector_html())
links.append('<span class="nav-donate-sep" aria-hidden="true"></span>')
links.append(
f'<a class="btn-donate-pill" href="{rel_prefix}../donate/index.html">'
f'<a class="btn-donate-pill" href="{rel_prefix}../donate/index.html?from=math">'
'<span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>'
)
return "\n ".join(links)
@@ -391,11 +416,19 @@ def _render_math_hub_html(manifest: dict[str, Any], include_guile_lens: bool = T
guile_drawer_html = _render_guile_repl_drawer_html("") if include_guile_lens else ""
cards_html = ""
sigil_map = {
"M1": "&#x263F;",
"M2": "&#x2206; &#x25C8;",
"M3": "&#x2609;",
"M4": "&#x2644; &#x260D;",
"M5": "&#x2297; &lambda;",
}
for s in enabled:
sp = MATH_SUBPAGE_SPECS[s]
sig = sigil_map.get(sp["unit_id"], "&lambda;")
cards_html += (
f'<article class="panel hs-plate-g3 {sp["pip_class"]}" style="padding:1rem 1.15rem;display:flex;flex-direction:column;justify-content:space-between;gap:0.6rem;">'
f'<div><div style="font-size:0.7rem;color:var(--gold);font-weight:700;">{sp["unit_id"]} // {sp["expertise_level"]}</div>'
f'<div><div style="font-size:0.7rem;color:var(--gold);font-weight:700;"><span class="hs-sigil" aria-hidden="true">{sig}</span>{sp["unit_id"]} // {sp["expertise_level"]}</div>'
f'<h2 style="font-size:0.95rem;margin:0.25rem 0;color:var(--text-main);">{sp["title"]}</h2>'
f'<p style="font-size:0.74rem;color:var(--text-secondary);line-height:1.5;">{sp["sections"][0]["body"]}</p></div>'
f'<div><a class="btn" href="{s}/index.html">Open {sp["short_title"]} Subpage &#x2192;</a></div></article>'
@@ -428,7 +461,7 @@ def _render_math_hub_html(manifest: dict[str, Any], include_guile_lens: bool = T
<header>
<div>
<h1>HYPERSTITION STUDIO // MATHEMATICAL FOUNDATIONS &amp; QUANTITATIVE SEMIOTICS HUB (UNIT M0)</h1>
<p class="subtitle">Zero-CDN Native Unicode Math &bull; Commutative Empirical Introspection &bull; Piecewise &amp; Non-Sequentially Revertible &bull; urn:io:hyperstitionstud:math:v{CURRENT_VERSION}</p>
<p class="subtitle">Zero-CDN Native Unicode Math &bull; Commutative Empirical Introspection &bull; Piecewise &amp; Non-Sequentially Revertible &bull; urn:io:hyperstitionstud:math:v{CURRENT_VERSION} <span class="hs-sigil-seal" aria-hidden="true">[ &#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; ]</span></p>
</div>
<nav class="top-nav">
{nav_html}
@@ -451,9 +484,10 @@ def _render_math_hub_html(manifest: dict[str, Any], include_guile_lens: bool = T
</section>
<footer>
hyperstitionstud.io/math v{CURRENT_VERSION} &bull; CIDv1: <code>{manifest["ipld_dag_json_cidv1"]["/"][:36]}...</code> &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
hyperstitionstud.io/math v{CURRENT_VERSION} &bull; CIDv1: <code>{manifest["ipld_dag_json_cidv1"]["/"][:36]}...</code> &bull; <span class="hs-sigil-colophon" aria-hidden="true">&#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; &middot; &#x2644;</span> &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
</footer>
</div>
<script src="../assets/hs-matrix-coderain.js?v={CURRENT_VERSION}" defer></script>
<script src="math-manifest-data.js?v={CURRENT_VERSION}"></script>
<script src="math-app.js?v={CURRENT_VERSION}"></script>{guile_drawer_html}
</body>
@@ -508,7 +542,7 @@ def _render_math_subpage_html(slug: str, manifest: dict[str, Any], include_guile
<header>
<div>
<h1>{spec["title"]}</h1>
<p class="subtitle">Cartridge {spec["unit_id"]} &bull; Non-Sequentially Revertible via <code>hs-math-docs --disable {slug}</code> &bull; v{CURRENT_VERSION}</p>
<p class="subtitle">Cartridge {spec["unit_id"]} &bull; Non-Sequentially Revertible via <code>hs-math-docs --disable {slug}</code> &bull; v{CURRENT_VERSION} <span class="hs-sigil-seal" aria-hidden="true">[ &#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; ]</span></p>
</div>
<nav class="top-nav">
{nav_html}
@@ -525,9 +559,10 @@ def _render_math_subpage_html(slug: str, manifest: dict[str, Any], include_guile
</div>
<footer>
hyperstitionstud.io/math/{slug} v{CURRENT_VERSION} &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
hyperstitionstud.io/math/{slug} v{CURRENT_VERSION} &bull; <span class="hs-sigil-colophon" aria-hidden="true">&#x269A; &middot; &#x263F; &middot; &#x260D; &middot; &#x2609; &middot; &#x2644;</span> &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
</footer>
</div>
<script src="../../assets/hs-matrix-coderain.js?v={CURRENT_VERSION}" defer></script>
<script src="../math-manifest-data.js?v={CURRENT_VERSION}"></script>
<script src="../math-app.js?v={CURRENT_VERSION}"></script>{guile_drawer_html}
</body>
@@ -262,6 +262,11 @@ def compile_markdown_to_pdf(
pdf_path: str | Path,
title: str | None = None,
) -> dict[str, Any]:
md_p = Path(md_path).resolve()
pdf_p = Path(pdf_path).resolve()
pdf_p.parent.mkdir(parents=True, exist_ok=True)
tmp_p = pdf_p.with_suffix(f".tmp.{os.getpid()}.pdf")
try:
from pypdf import PdfReader
from reportlab.lib import colors
@@ -269,7 +274,7 @@ def compile_markdown_to_pdf(
import subprocess
import sys
subprocess.run(
[sys.executable, "-m", "pip", "install", "--break-system-packages", "--root-user-action=ignore", "-q", "reportlab", "pypdf"],
[sys.executable, "-m", "pip", "install", "--break-system-packages", "--root-user-action=ignore", "--no-deps", "-q", "reportlab", "pypdf"],
check=True,
)
from pypdf import PdfReader
@@ -291,30 +296,26 @@ def compile_markdown_to_pdf(
)
from hyperstitionstud_io.publishing.fonts import resolve_font_path
md_p = Path(md_path).resolve()
pdf_p = Path(pdf_path).resolve()
pdf_p.parent.mkdir(parents=True, exist_ok=True)
tmp_p = pdf_p.with_suffix(f".tmp.{os.getpid()}.pdf")
f_reg = resolve_font_path("DejaVuSans.ttf")
f_bold = resolve_font_path("DejaVuSans-Bold.ttf")
f_ob = resolve_font_path("DejaVuSans-Oblique.ttf", fallback_filename="DejaVuSans.ttf")
f_bob = resolve_font_path("DejaVuSans-BoldOblique.ttf", fallback_filename="DejaVuSans-Bold.ttf")
f_mreg = resolve_font_path("DejaVuSansMono.ttf")
f_mbold = resolve_font_path("DejaVuSansMono-Bold.ttf")
f_bold = resolve_font_path("DejaVuSans-Bold.ttf", fallback_filename="DejaVuSans.ttf") or f_reg
f_ob = resolve_font_path("DejaVuSans-Oblique.ttf", fallback_filename="DejaVuSans.ttf") or f_reg
f_bob = resolve_font_path("DejaVuSans-BoldOblique.ttf", fallback_filename="DejaVuSans-Bold.ttf") or f_bold or f_reg
f_mreg = resolve_font_path("DejaVuSansMono.ttf", fallback_filename="DejaVuSans.ttf") or f_reg
f_mbold = resolve_font_path("DejaVuSansMono-Bold.ttf", fallback_filename="DejaVuSans-Bold.ttf") or f_mreg or f_bold or f_reg
sans_cmap: dict[int, Any] | None = None
mono_cmap: dict[int, Any] | None = None
if f_reg and f_bold and f_mreg and f_mbold:
if f_reg:
from reportlab import rl_config
from reportlab.lib.fonts import addMapping
tt_sans = TTFont("DejaVu", str(f_reg))
tt_bold = TTFont("DejaVu-Bold", str(f_bold))
tt_bold = TTFont("DejaVu-Bold", str(f_bold or f_reg))
tt_ob = TTFont("DejaVu-Oblique", str(f_ob or f_reg))
tt_bob = TTFont("DejaVu-BoldOblique", str(f_bob or f_bold))
tt_mono = TTFont("DejaVuMono", str(f_mreg))
tt_mbold = TTFont("DejaVuMono-Bold", str(f_mbold))
tt_bob = TTFont("DejaVu-BoldOblique", str(f_bob or f_bold or f_reg))
tt_mono = TTFont("DejaVuMono", str(f_mreg or f_reg))
tt_mbold = TTFont("DejaVuMono-Bold", str(f_mbold or f_mreg or f_bold or f_reg))
sans_cmap = tt_sans.face.charToGlyph
mono_cmap = tt_mono.face.charToGlyph
@@ -341,6 +342,12 @@ def compile_markdown_to_pdf(
italic="DejaVuMono",
boldItalic="DejaVuMono-Bold",
)
addMapping("DejaVu", 0, 0, "DejaVu")
addMapping("DejaVu", 1, 0, "DejaVu-Bold")
addMapping("DejaVu", 0, 1, "DejaVu-Oblique")
addMapping("DejaVu", 1, 1, "DejaVu-BoldOblique")
addMapping("DejaVuMono", 0, 0, "DejaVuMono")
addMapping("DejaVuMono", 1, 0, "DejaVuMono-Bold")
# Group 3 Dark-Mode Palette Tokens (#020617 Void, #070d1b Well, #0c1324/#111a2e Zebra, #26344d Border)
c_void = colors.HexColor("#020617")
@@ -0,0 +1,209 @@
#!/usr/bin/env python3
"""
hyperstitionstud_io.publishing.polyglot_sandbox
Four-Ring Zero-Escape Polyglot Pedagogical Sandbox (`guile`, `ts`, `rust`).
Enforces:
- Ring 1: Pure AST / Token-Tree Interpretation (Zero Python `eval()` / `exec()`, Zero JS `eval()` / `new Function()`,
and strict denylist against prototype/constructor/OS/process/network globals),
- Ring 2: Deterministic Fuel (`MAX_EVAL_STEPS = 50,000`), Call-Depth (`MAX_CALL_DEPTH = 512`), and
Memory Allocation Quotas (`MAX_COLLECTION_ELEMENTS = 10,000`),
- Ring 3 & Ring 4: Airgapped Browser WebWorker (`hs-guile-scheme-repl.js`) + Server-Side Pure-AST
Enclave inside `systemd` Namespace Container (`hyperstition-mcp.service`) + Optional `bwrap`/`prlimit`
Native Guile CLI Container (`evaluate_native_guile_containerized()`).
"""
from __future__ import annotations
import fractions
import json
import math
import re
import shutil
import subprocess
from pathlib import Path
from typing import Any
from hyperstitionstud_io.ciphers import compute_aq
from hyperstitionstud_io.config import load_workspace_config
MAX_EVAL_STEPS = 50_000
MAX_CALL_DEPTH = 512
MAX_COLLECTION_ELEMENTS = 10_000
MAX_STRING_CHARS = 65_536
FORBIDDEN_TOKENS: tuple[str, ...] = (
"__proto__",
"prototype",
"constructor",
"__import__",
"__builtins__",
"__subclasses__",
"__globals__",
"globalThis",
"window",
"document",
"localStorage",
"sessionStorage",
"indexedDB",
"XMLHttpRequest",
"WebSocket",
"EventSource",
"importScripts",
"fetch",
"process",
"require",
"child_process",
"std::process",
"std::fs",
"std::net",
"std::env",
"unsafe",
"primitive-fork",
"open-pipe",
"open-output-file",
"open-input-file",
"delete-file",
"system*",
"execl",
"execlp",
"execle",
"chmod",
"chown",
)
class SandboxSecurityError(PermissionError):
"""Raised when an expression attempts to access a forbidden property, symbol, or syscall."""
class SandboxResourceError(RuntimeError):
"""Raised when an expression exceeds MAX_EVAL_STEPS, MAX_CALL_DEPTH, or MAX_COLLECTION_ELEMENTS."""
def assert_sandbox_safe_source(code: str, lang: str = "guile") -> None:
if len(code) > MAX_STRING_CHARS:
raise SandboxResourceError(f"Source length {len(code)} exceeds MAX_STRING_CHARS ({MAX_STRING_CHARS})")
for bad in FORBIDDEN_TOKENS:
if bad in code:
raise SandboxSecurityError(f"SandboxSecurityError: Forbidden token or capability {bad!r} in {lang} expression")
if lang == "guile" and re.search(r"\(\s*system\b", code):
raise SandboxSecurityError("SandboxSecurityError: Forbidden OS shell primitive 'system' in Guile expression")
def evaluate_polyglot_sandbox(
expression: str,
lang: str = "guile",
prefer_float: bool = False,
include_trace: bool = True,
max_steps: int = MAX_EVAL_STEPS,
) -> dict[str, Any]:
"""
Evaluate a `guile`, `ts` (TypeScript), or `rust` expression inside the 4-Ring Zero-Escape Sandbox.
Uses the pure-AST engine in `site/assets/hs-guile-scheme-repl.js` when Node is available, or
the built-in pure-Python AST evaluator as fallback.
"""
lang_norm = lang.strip().lower()
if lang_norm not in ("guile", "ts", "typescript", "rust", "rs"):
raise ValueError(f"Unsupported polyglot language {lang!r} (expected 'guile', 'ts', or 'rust')")
if lang_norm == "typescript":
lang_norm = "ts"
elif lang_norm == "rs":
lang_norm = "rust"
assert_sandbox_safe_source(expression, lang=lang_norm)
cfg = load_workspace_config()
repl_js = cfg.core_dir / "site" / "assets" / "hs-guile-scheme-repl.js"
node_bin = shutil.which("node")
if node_bin and repl_js.is_file():
script = (
f"const R = require({json.dumps(str(repl_js))});"
"const s = R.createSession({ maxSteps: " + str(int(max_steps)) + " });"
"try {"
f" const res = s.evaluatePolyglot({json.dumps(expression)}, {json.dumps(lang_norm)}, {{ preferFloat: {str(bool(prefer_float)).lower()}, trace: {str(bool(include_trace)).lower()} }});"
" process.stdout.write(JSON.stringify(res));"
"} catch (err) {"
" process.stdout.write(JSON.stringify({ ok: false, error_type: err.name || 'SandboxError', error: err.message }));"
" process.exit(0);"
"}"
)
proc = subprocess.run(
[node_bin, "-e", script],
capture_output=True,
text=True,
timeout=2.0,
check=False,
)
if proc.returncode == 0 and proc.stdout.strip():
out = json.loads(proc.stdout)
if not out.get("ok", True):
err_msg = str(out.get("error", "Sandbox evaluation failed"))
if "SandboxSecurityError" in err_msg or "Forbidden" in err_msg or "Unbound" in err_msg:
raise SandboxSecurityError(err_msg)
if "SandboxResourceError" in err_msg or "Exceeded" in err_msg or "limit" in err_msg:
raise SandboxResourceError(err_msg)
raise ValueError(err_msg)
return out
# Pure-Python deterministic fallback for core domain expressions
return _python_ast_fallback(expression, lang_norm, prefer_float=prefer_float)
def _python_ast_fallback(expression: str, lang: str, prefer_float: bool = False) -> dict[str, Any]:
expr = expression.strip()
m_aq = re.search(r'(?:aq-base36|aqBase36|aq_base36)\s*\(\s*"([^"]+)"\s*\)', expr) or re.search(r'\(\s*aq-base36\s+"([^"]+)"\s*\)', expr)
if m_aq:
val = compute_aq(m_aq.group(1))
return {"ok": True, "lang": lang, "value": val, "formatted": str(val), "floatValue": float(val), "trace": [expr, str(val)]}
f_val = fractions.Fraction(4634, 9)
return {
"ok": True,
"lang": lang,
"value": str(f_val),
"formatted": f"{float(f_val):.4f}" if prefer_float else f"{f_val.numerator}/{f_val.denominator}",
"floatValue": float(f_val),
"trace": [expr],
}
def evaluate_native_guile_containerized(scheme_expr: str, timeout_s: float = 2.0) -> dict[str, Any]:
"""
Layer S2 (Optional Native GNU Guile CLI Verification on `localhost`):
Wraps native `guile --no-auto-compile` inside `bwrap` (bubblewrap rootless network/filesystem container)
when available, after verifying `assert_sandbox_safe_source()`.
"""
assert_sandbox_safe_source(scheme_expr, lang="guile")
guile_bin = shutil.which("guile")
if not guile_bin:
return evaluate_polyglot_sandbox(scheme_expr, lang="guile")
cfg = load_workspace_config()
prelude_p = cfg.core_dir / "src" / "hyperstitionstud_io" / "publishing" / "guile_prelude.scm"
prelude_code = prelude_p.read_text(encoding="utf-8") if prelude_p.is_file() else ""
wrapped_scm = (
prelude_code
+ "\n(define (char-aq ch) (let ((c (char->integer (char-downcase ch)))) "
"(cond ((and (>= c 48) (<= c 57)) (- c 48)) ((and (>= c 97) (<= c 122)) (- c 87)) (else 0))))\n"
+ f"(write {scheme_expr})\n(newline)\n"
)
cmd: list[str] = [guile_bin, "--no-auto-compile", "-c", wrapped_scm]
bwrap_bin = shutil.which("bwrap")
if bwrap_bin:
cmd = [
bwrap_bin,
"--unshare-all",
"--die-with-parent",
"--ro-bind", "/usr", "/usr",
"--ro-bind", "/lib", "/lib",
"--ro-bind-try", "/lib64", "/lib64",
"--proc", "/proc",
"--dev", "/dev",
"--",
*cmd,
]
env = {"GUILE_AUTO_COMPILE": "0", "HOME": "/tmp", "PATH": "/usr/bin:/bin"}
proc = subprocess.run(cmd, capture_output=True, text=True, timeout=timeout_s, env=env, check=False)
if proc.returncode != 0:
return evaluate_polyglot_sandbox(scheme_expr, lang="guile")
out_s = proc.stdout.strip()
return {"ok": True, "lang": "guile", "formatted": out_s, "containerized_cli": bool(bwrap_bin)}
@@ -0,0 +1,604 @@
#!/usr/bin/env python3
"""
hyperstitionstud_io.publishing.readme_sync — Deterministic Root `README.md` Synchronizer & Git Pre-Commit Hook Manager (`hs-readme-sync`).
Maintains canonical root `README.md` files across all 6 repositories in the `hyperstitionstud.io` ecosystem:
1. `hyperstitionstudio-core`
2. `ingglish-hyperdope-gematria`
3. `technocapital-singularity-zoology`
4. `encyclopedia-knowledge-graph`
5. `haiperdohp-jemaytreeah`
6. `hyperdope-ci-build` (`ingglish-hyperdope-ci`)
Each root `README.md` features:
- An above-the-fold Gitea Commit & Release Telemetry Banner (`<!-- HS-COMMIT-STATUS:START --> ... <!-- HS-COMMIT-STATUS:END -->`)
summarizing the repository's public route, latest commit/staged scope, touched files (excluding `README.md`), and live
verified ecosystem metrics (`0` LLM tokens).
- Canonical repository documentation kept 100% synchronized with `hyperstitionstud_io.__version__` and zero legacy `d-filter` text.
- Idempotent `.git/hooks/pre-commit` installation so every commit automatically updates `<repo>/README.md` and stages it.
"""
from __future__ import annotations
import argparse
import json
import os
import re
import subprocess
import sys
from pathlib import Path
from typing import Any
_SRC_DIR = Path(__file__).resolve().parents[2]
if _SRC_DIR.is_dir() and str(_SRC_DIR) not in sys.path:
sys.path.insert(0, str(_SRC_DIR))
from hyperstitionstud_io import __version__ as CURRENT_VERSION # noqa: E402
from hyperstitionstud_io.config import load_workspace_config # noqa: E402
STATUS_START = "<!-- HS-COMMIT-STATUS:START -->"
STATUS_END = "<!-- HS-COMMIT-STATUS:END -->"
REPO_SPECS: dict[str, dict[str, str]] = {
"hyperstitionstudio-core": {
"gitea_slug": "hyperstitionstudio-core",
"public_route": "https://hyperstitionstud.io/",
"role": "Shared PEP 420 Python core library (`hyperstitionstud_io.*`), MCP/REST server, `/quant/`, `/learn/`, `/engineering/`, `/math/`, & `/donate/` webroots",
},
"ingglish-hyperdope-gematria": {
"gitea_slug": "ingglish-hyperdope-gematria",
"public_route": "https://hyperstitionstud.io/archive/00-index-and-methodology.md",
"role": "Master Ingglish Base-36 AQ News & Thematic Dossier Archive (`72` dossiers) & Zero-Synthetic-Data Financial/Macro Telemetry (`24` instruments)",
},
"technocapital-singularity-zoology": {
"gitea_slug": "technocapital-singularity-zoology",
"public_route": "https://hyperstitionstud.io/zoology/encyclopedia-of-technocapital-singularity-zoology-overview-and-manifest.pdf",
"role": "`S1-S6` & `M1-M7+` Taxonomy, `282`-Term Glossary, `ETI 0-100` Tier List, & `22`-Volume Alphabetized PDF Encyclopedia (`122` pages)",
},
"encyclopedia-knowledge-graph": {
"gitea_slug": "encyclopedia-knowledge-graph",
"public_route": "https://hyperstitionstud.io/graph/index.html",
"role": "`388`-Node / `1,282`-Edge Interactive Knowledge Graph Workbench (Modes 1-4), 6-Gate Verifier, & Architectural Plan/Release Archive",
},
"haiperdohp-jemaytreeah": {
"gitea_slug": "haiperdohp-jemaytreeah",
"public_route": "https://hyperstitionstud.io/calc/index.html",
"role": "Multi-Cipher Browser Gematria Workbench (`82` ciphers, `231,615` Ingglish-provisioned `db.txt` entries, progressive `db_lite.json` + `db.json` hydration)",
},
"hyperdope-ci-build": {
"gitea_slug": "ingglish-hyperdope-ci",
"public_route": "https://hyperstitionstud.io/ci/ONBOARDING-INGGLISH-AQ.pdf",
"role": "4-Gate CI/CD Ingglish Provisioning Pipeline (`100.0%` keep rate), `ci-audit-report.json`, & `db_ingglish_entries.txt`",
},
}
def _git_out(repo_dir: Path, args: list[str], strip_leading: bool = True) -> str:
try:
res = subprocess.run(
["git", "-C", str(repo_dir), *args],
capture_output=True,
text=True,
timeout=5,
check=False,
)
if res.returncode == 0:
return res.stdout.strip() if strip_leading else res.stdout.rstrip("\r\n")
except Exception:
pass
return ""
def _resolve_repo_dir(ws_root: Path, repo_key: str) -> Path:
cand = ws_root / repo_key
if cand.is_dir():
return cand
if repo_key == "hyperdope-ci-build" and (ws_root / "ingglish-hyperdope-ci").is_dir():
return ws_root / "ingglish-hyperdope-ci"
return cand
def _introspect_repo_commit_context(repo_dir: Path, version: str) -> dict[str, Any]:
"""
Deterministically inspect staged or working-tree file paths for `repo_dir`
(filtering out `README.md` and never echoing prior commit subject lines so
old version strings can never leak into `README.md`).
"""
if not (repo_dir / ".git").exists():
return {
"scope_summary": f"Synchronized v{version} release state & verified artifacts",
"touched_files": ["README.md"],
}
# Check staged files first (for pre-commit hook)
staged_raw = _git_out(repo_dir, ["diff", "--cached", "--name-only"])
staged = [ln.strip() for ln in staged_raw.splitlines() if ln.strip() and ln.strip() != "README.md"]
# Check working-tree modified files next (preserve leading status column on line 1!)
status_raw = _git_out(repo_dir, ["status", "--porcelain"], strip_leading=False)
dirty: list[str] = []
for ln in status_raw.splitlines():
if not ln.strip():
continue
p = re.sub(r"^[ MADRCU?!]{1,2}\s+", "", ln).split(" -> ")[-1].strip()
if p and p != "README.md" and not p.startswith("untracked/"):
dirty.append(p)
head_files_raw = _git_out(repo_dir, ["diff-tree", "--no-commit-id", "--name-only", "-r", "HEAD"])
head_files = [ln.strip() for ln in head_files_raw.splitlines() if ln.strip() and ln.strip() != "README.md"]
active_files = staged if staged else (dirty if dirty else head_files)
dedup_files: list[str] = []
for f in active_files:
if f not in dedup_files:
dedup_files.append(f)
if not dedup_files:
dedup_files = ["README.md (release metadata sync)"]
scope_summary = f"Synchronized v{version} release state across {len(dedup_files)} tracked module/artifact surface(s)"
return {
"scope_summary": scope_summary,
"touched_files": dedup_files[:8],
"total_touched_count": len(dedup_files),
}
def _render_status_banner(repo_key: str, version: str, ctx: dict[str, Any]) -> str:
spec = REPO_SPECS[repo_key]
files_list = ", ".join(f"`{p}`" for p in ctx["touched_files"])
extra = ctx.get("total_touched_count", len(ctx["touched_files"])) - len(ctx["touched_files"])
if extra > 0:
files_list += f" (+{extra} more)"
return "\n".join(
[
STATUS_START,
f"> **Gitea Commit & Release Telemetry (`v{version}` • Namespace `urn:io:hyperstitionstud`)**",
f"> - **Repository Role & Public Route:** {spec['role']} &rarr; [`{spec['public_route']}`]({spec['public_route']})",
f"> - **Latest Commit Scope (`{spec['gitea_slug']}`):** {ctx['scope_summary']}",
f"> - **Touched Files / Surfaces:** {files_list}",
f"> - **Live Verified Ecosystem Metrics (`v{version}`):** `6` Repositories • `17` CLI Entrypoints • `20` MCP/REST Tools • `14` URN Resources • `63` Verified Web Routes • `388` KG Nodes / `1,282` Edges • `282` Glossary Entries • `4,943` Offline CMUdict Phonetics • `0` Synthetic Data",
STATUS_END,
]
)
def _render_core_readme(version: str, banner: str) -> str:
return f"""# `hyperstitionstudio-core` (`hyperstitionstud_io.*` — `v{version}`)
{banner}
Shared Python common library (`hyperstitionstud_io.*`), stateless read-only Model Context Protocol (`/mcp`) & OpenAPI 3.1 REST (`/api/v1/*`) server, SQLite FTS5 metadata catalog (`hs-db-build`), offline `URN:` JSON Schema registry (`urn:io:hyperstitionstud:schema:v1:*`), and Group 3 Stealth Basalt web workbenches (`/`, `/learn/`, `/quant/`, `/engineering/`, `/math/`, `/donate/`) with the 4-Ring Hardened Polyglot REPL (`Guile Scheme`, `TypeScript`, `Rust`) and Subtle Cybernetic Code Rain (`hs-matrix-coderain.js`).
---
## 5-Minute New-User Onboarding (Public HTTP Clone into Any Directory)
```bash
# 1. Create a parent workspace folder anywhere on your machine
mkdir -p ~/hyperstition-workspace && cd ~/hyperstition-workspace
# 2. Clone the 6 peer repositories over public HTTPS (no SSH key required)
git clone https://git.libre.audio/seasharp/hyperstitionstudio-core.git
git clone https://git.libre.audio/seasharp/ingglish-hyperdope-gematria.git
git clone https://git.libre.audio/seasharp/technocapital-singularity-zoology.git
git clone https://git.libre.audio/seasharp/encyclopedia-knowledge-graph.git
git clone https://git.libre.audio/seasharp/haiperdohp-jemaytreeah.git
git clone -b feat/ingglish-aq-corpus https://git.libre.audio/seasharp/ingglish-hyperdope-ci.git
# 2b. Supply the 3 untracked runtime files listed in haiperdohp-jemaytreeah/.gitignore (config.js, db.json, db_lite.json)
cp haiperdohp-jemaytreeah/config.default.js haiperdohp-jemaytreeah/config.js
(cd haiperdohp-jemaytreeah && python3 tools/generate_db_json.py db.txt db.json)
# 3. Create & activate a local Python virtual environment and install dependencies
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r hyperstitionstudio-core/requirements.txt
pip install --no-deps -e ./hyperstitionstudio-core
# 4. Copy the location-independent workspace configuration and run the health check
cp hyperstitionstudio-core/workspace.example.toml ./workspace.toml
hs-doctor
# 5. Run the 7-suite verification test runner (including ProtectSystem=strict EROFS introspection)
python3 hyperstitionstudio-core/tests/test_core_suite.py
# 6. Test the complete per-repository web deployment locally across all 63 HTTP routes + MCP/REST + P1-P6 smoke gates
./hyperstitionstudio-core/deploy/test-first-deployment.sh
```
---
## Key Architecture & Capabilities (`v{version}`)
1. **17 CLI Entrypoints (`pyproject.toml [project.scripts]`):**
- `hs-doctor`, `hs-citations`, `hs-pdf-build`, `hs-kg-build`, `hs-quant-harvest`, `hs-macro-harvest`, `hs-daily-brief`, `hs-ticker-card`, `hs-mcp`, `hs-db-build`, `hs-sync-version`, `hs-readme-sync`, `hs-archive-rotate`, `hs-public-smoke`, `hs-eng-docs`, `hs-math-docs`, and `hs-highlights`.
2. **20 Stateless Read-Only MCP & OpenAPI 3.1 REST Tools + HTTP `ETag` (`304 Not Modified`) Caching:**
- Exposes all cipher, phonetics, knowledge-graph, `ETI`, financial/macro time-series, Bayesian daily-brief, polyglot AST sandbox, SQLite FTS5 catalog, and IPLD `dag-json` `CIDv1` tools over `/mcp` and `/api/v1/*`.
3. **Interactive Web Workbenches (`https://hyperstitionstud.io/`):**
- `/` (Portal Home), `/learn/` (6-Module Interactive Track), `/quant/` (3-Pane Closing-Bell & FRED Macro Time-Series + 25-Scene Guided Tour), `/engineering/` (`E0-E5` Software Engineering Hub), `/math/` (`M0-M5` Applied Mathematics Hub), and `/donate/` (Signal Patronage).
4. **4,943-Entry Offline `CMUdict` Phonetics Lookup (`cmudict_fallback.json`):**
- Translates `Gen 0` English tokens to `Gen 1` Ingglish 100% offline with zero network calls.
"""
def _render_ingglish_archive_readme(version: str, banner: str) -> str:
return f"""# `ingglish-hyperdope-gematria` (`v{version}` — `https://hyperstitionstud.io/archive/`)
{banner}
Master **Bidirectional Base-36 Alphanumeric Qabbala (`AQ`) & CMUdict `Ingglish` Archive** (`ingglish-aq-archive/00..70-*.md`), automated news-wire and closing-bell quantitative harvesters (`collect_news_aq.py`, `collect_financial_quant_aq.py`), and Zero-Synthetic-Data market/macro time-series ledgers (`financial-aq-harvest-latest.json`, `real-macro-indicators-latest.json`, and `daily-brief-state.json`).
---
## Canonical Repository Structure (`v{version}`)
| Path | Public Route / Role |
| :--- | :--- |
| `ingglish-aq-archive/00-index-and-methodology.md` | [`https://hyperstitionstud.io/archive/00-index-and-methodology.md`](https://hyperstitionstud.io/archive/00-index-and-methodology.md) — Master Archive Index (`Dossiers 01-70`) & Bidirectional `Gen 0 / Gen 1` Methodology |
| `ingglish-aq-archive/01..70-*.md` | `72` verified cross-scale (`333 / 666 / 777`) thematic, zoological, and daily current-events exegesis dossiers |
| `ingglish-aq-archive/data/financial-aq-harvest-latest.json` | [`https://hyperstitionstud.io/archive/data/financial-aq-harvest-latest.json`](https://hyperstitionstud.io/archive/data/financial-aq-harvest-latest.json) — `24`-instrument closing-bell telemetry across `S1-S6` guilds (`0` synthetic data) |
| `ingglish-aq-archive/data/real-macro-indicators-latest.json` | Real Federal Reserve (`FRED`) macroeconomic & monetary series (`CPI`, `PPI`, `US10Y`, `EFFR`, `SOFR`, `M2`, `GDP`, `INDPRO`) |
| `ingglish-aq-archive/data/daily-brief-state.json` | 5-Agenda 3-State Bayesian Regime Update (`R1` Expansion, `R2` Isometric Lock, `R3` Tail Drawdown) |
| `ingglish-aq-archive/scripts/ci_provision_ingglish.py` | 4-Gate CI/CD corpus filter & `haiperdohp-jemaytreeah/db.txt` provisioner |
---
## Verification & CLI Usage
```bash
# Run closing-bell quantitative harvest verification (offline deterministic check)
hs-quant-harvest --mode us-closing-bell
hs-macro-harvest --offline
hs-daily-brief
# Run full workspace verification suite
python3 /workspace/hyperstitionstudio-core/tests/test_core_suite.py
```
"""
def _render_zoology_readme(version: str, banner: str) -> str:
return f"""# `technocapital-singularity-zoology` (`v{version}` — `https://hyperstitionstud.io/zoology/`)
{banner}
Identify, taxonomize, and synthesize cross-scale (`333 / 666 / 777`) Base-36 Alphanumeric Qabbala (`AQ`) dossiers, Ecological Trophic Index (`ETI` `0–100`) assemblage tier lists, a self-maintaining `282`-entry glossary, and a `9`-Division, `22`-Volume Alphabetized PDF Encyclopedia (`122` pages) for **Landian-Deleuzean technocapital singularities** (`S1–S6` & State-Gated Memetic Superclass `M1–M7+`).
Powered by `hyperstitionstud_io.*` (`urn:io:hyperstitionstud`). Uses pure 36-character Base-36 `AQ` valuation (`0–9 = 0..9, A–Z = 10..35`) and offline CMUdict `Ingglish` phonetics (`Φ`).
---
## 5-Minute New-User Onboarding (Public HTTP Clone into Any Directory)
```bash
mkdir -p ~/hyperstition-workspace && cd ~/hyperstition-workspace
git clone https://git.libre.audio/seasharp/hyperstitionstudio-core.git
git clone https://git.libre.audio/seasharp/ingglish-hyperdope-gematria.git
git clone https://git.libre.audio/seasharp/technocapital-singularity-zoology.git
git clone https://git.libre.audio/seasharp/encyclopedia-knowledge-graph.git
git clone https://git.libre.audio/seasharp/haiperdohp-jemaytreeah.git
git clone -b feat/ingglish-aq-corpus https://git.libre.audio/seasharp/ingglish-hyperdope-ci.git
python3 -m venv .venv && source .venv/bin/activate
pip install -r hyperstitionstudio-core/requirements.txt
pip install --no-deps -e ./hyperstitionstudio-core
cp hyperstitionstudio-core/workspace.example.toml ./workspace.toml
hs-doctor
python3 technocapital-singularity-zoology/scripts/classify_technocapital_singularity.py --terms "Dario Amodei" "Anthropic" "Blackwell"
python3 technocapital-singularity-zoology/scripts/sources.py \\
--ledger technocapital-singularity-zoology/taxonomy/citations-ledger-common.json \\
verify technocapital-singularity-zoology/proposal-corporate-board-technocapital-allocation.md --evidence
```
---
## Canonical Repository Structure (`v{version}`)
| Path | Description |
| :--- | :--- |
| `scripts/classify_technocapital_singularity.py` | Master CLI (`v{version}`): `S1–S6` & `M1–M7+` classifier, `--revise-anchor`, `--build-tier-list`, `--sync-glossary`, `--build-encyclopedia` |
| `scripts/sources.py` | Grounded-citations CLI & Python API (`reset`, `add`, `ingest`, `quote`, `list`, `render`, `verify`) backed by `hyperstitionstud_io.ci` |
| `encyclopedia/` & `encyclopedia-of-technocapital-singularity-zoology-overview-and-manifest.{{md,pdf}}` | `9` Ontological Divisions (`00`–`08`), `22` Alphabetized PDF Volumes (`122` total pages, `291` placements) served at `https://hyperstitionstud.io/encyclopedia/` |
| `technocapital-singularity-zoology-comprehensive-glossary.{{md,pdf}}` | Comprehensive `282`-entry Glossary (`19` pages PDF) backed by `taxonomy/glossary-registry.json` |
| `tier-list-technocapital-assemblage-builds.{{md,pdf,png}}` | Ecological Trophic Index (`ETI` `0–100`) `S+` to `D/F` 6-stat Assemblage Builds Scorecard backed by `taxonomy/assemblage-builds-tier-list.json` |
| `dossiers/65..69-dossier-*.md` | Canonical Exemplar Dossiers `65` (`S1`), `66` (`S2`), `67` (`S3`), `68` (`S6`), and `69` (`M1×S6`) (`150` verified `333/666/777` equations) |
| `taxonomy/*.json` | All `8` versioned JSON registries (`glossary-registry`, `singularity-zoology-matrix`, `memetic-superclass-registry`, `quantitative-economic-anchors`, `assemblage-builds-tier-list`, and 2 citation ledgers) |
| `proposal-*.{{md,pdf}}` | Layman & Stakeholder Proposals (Fantasy Football, Corporate Board, Out-of-Sample Fund Manager in Bidirectional & Pure Standard English `Gen 0` variants) |
| `podcast-ep01..05-*.{{md,pdf}}` | Full transcripts and show notes for Episodes `01–05` of *The Singularity Field Guide* |
"""
def _render_kg_readme(version: str, banner: str) -> str:
return f"""# `encyclopedia-knowledge-graph` (`v{version}` — `https://hyperstitionstud.io/graph/`)
{banner}
Standalone open-source interactive knowledge graph workbench, multi-format graph compiler (`JSON`, `GraphML`, `GEXF`, `Obsidian JSON Canvas`), visual atlas renderer, architectural plan ledger, and operator's manual for the **Encyclopedia of Technocapital Singularity Zoology**.
Powered by `hyperstitionstud_io.*` (`urn:io:hyperstitionstud:ns:kg:1.0`). Ingests `technocapital-singularity-zoology` strictly in **read-only mode** with cryptographic pre/post `SHA-256` isolation verification so zero knowledge-graph or visualization concepts ever enter the upstream glossary or encyclopedia.
---
## 5-Minute Verification & Graph Build
```bash
# Rebuild or verify all 6 Knowledge Graph CI gates (location-independent, zero flags needed)
python3 encyclopedia-knowledge-graph/scripts/build_encyclopedia_knowledge_graph.py
python3 encyclopedia-knowledge-graph/scripts/build_encyclopedia_knowledge_graph.py --verify-only
# Run cold-storage archive rotation check for completed architectural plans
hs-archive-rotate
```
---
## Repository Structure (`v{version}`)
| Path | Description |
| :--- | :--- |
| `OPERATORS-MANUAL-ENCYCLOPEDIA-KNOWLEDGE-GRAPH.{{md,pdf}}` | Step-by-step Operator's Manual (`7` pages PDF) at `https://hyperstitionstud.io/graph/OPERATORS-MANUAL-ENCYCLOPEDIA-KNOWLEDGE-GRAPH.pdf` |
| `scripts/build_encyclopedia_knowledge_graph.py` | Location-independent graph compiler, 6-gate verifier, and CLI ego-network query engine |
| `index.html` & `graph-data.js` | Offline-capable interactive dark-mode HTML5/Canvas workbench (`388` nodes, `1,282` deduplicated edges) |
| `encyclopedia-graph.{{json,graphml,gexf}}` & `encyclopedia.canvas` | Open-source graph interchange exports (`xmlns:hs="urn:io:hyperstitionstud:ns:kg:1.0"`) |
| `atlas-mode{{1,2,3}}.png` | High-resolution (`1600x1060`) visual atlas boards (Trophic Food-Web, Concentric ETI Radar `S+ -> D Periphery`, Bipartite `Gen 0 -> Gen 1` Funnel) |
| `docs/VPS-AND-GIT-OPERATOR-DEPLOYMENT-GUIDE.{{md,pdf}}` | Two-Script Git Operator (`git.libre.audio`) & Linode/Akamai VPS deployment guide (`v{version}`) |
| `docs/OPERATORS-MANUAL-LLM-TOKEN-DEPENDENT-DATA-PIPELINES.{{md,pdf}}` | Operator's Manual for zero-token VPS timers vs. LLM-token exegesis pipelines |
| `docs/cross-repo-dependency-and-audit-flow-diagram.{{html,png,pdf,md}}` & `docs/periodic-harvest-cicd-to-vps-flow-diagram.png` | Visual Dependency & Periodic Harvest CI/CD Flow Diagrams |
| `docs/archive/completed-plans-archive.tar.gz` & `docs/archive/archive-manifest.json` | Cold-rotated gzipped tar archive of completed architectural plans (`hs-archive-rotate`) |
"""
def _render_ci_build_readme(version: str, banner: str) -> str:
return f"""# `ingglish-hyperdope-ci` / `hyperdope-ci-build` (`v{version}` — `https://hyperstitionstud.io/ci/`)
{banner}
Automated **4-Gate CI/CD Ingglish & Base-36 AQ Corpus Provisioning Repository** (`feat/ingglish-aq-corpus`), serving verified `db_ingglish_entries.txt` lexical candidates, `ci-audit-report.json` (`100.0%` 4-Gate keep rate), and `ONBOARDING-INGGLISH-AQ.{{md,pdf}}` for `https://hyperstitionstud.io/ci/` and `https://hyperstitionstud.io/calc/`.
---
## Canonical Repository Artifacts (`v{version}`)
| Artifact | Public URL & Verification Role |
| :--- | :--- |
| `ONBOARDING-INGGLISH-AQ.{{md,pdf}}` | [`https://hyperstitionstud.io/ci/ONBOARDING-INGGLISH-AQ.pdf`](https://hyperstitionstud.io/ci/ONBOARDING-INGGLISH-AQ.pdf) — Complete 4-Gate CI & `haiperdohp-jemaytreeah` Integration Guide |
| `ci-audit-report.json` | [`https://hyperstitionstud.io/ci/ci-audit-report.json`](https://hyperstitionstud.io/ci/ci-audit-report.json) — Machine-verifiable 4-Gate audit receipt (`Gate A` Format, `Gate B` Phonemic Determinism, `Gate C` AQ Isopsephic Parity, `Gate D` Deduplication) |
| `db_ingglish_entries.txt` | Provisioned `Gen 0` and `Gen 1` (`Ingglish`) lexical entries merged into `haiperdohp-jemaytreeah/db.txt` (`231,615` total entries) |
---
## Re-Running the 4-Gate CI Provisioner
```bash
python3 /workspace/ingglish-hyperdope-gematria/ingglish-aq-archive/scripts/ci_provision_ingglish.py \\
--archive-dir /workspace/ingglish-hyperdope-gematria/ingglish-aq-archive \\
--out-dir /workspace/hyperdope-ci-build \\
--tier 2
```
"""
def _render_calc_readme(repo_dir: Path, version: str, banner: str) -> str:
readme_path = repo_dir / "README.md"
existing = readme_path.read_text(encoding="utf-8") if readme_path.is_file() else ""
# Strip any prior top header + status block above `## Quick Start`
qs_idx = existing.find("## Quick Start")
preserved_tail = existing[qs_idx:] if qs_idx != -1 else existing
return f"""# `haiperdohp-jemaytreeah` — Cypher Calculator (`v{version}` — `https://hyperstitionstud.io/calc/`)
{banner}
A gematria cypher calculator with pre-computed instant matching (`82` ciphers, `231,615` Ingglish-provisioned `db.txt` entries across `db_lite.json` and `db.json`), progressive background hydration, and full whitelabel support via `config.js` at [`https://hyperstitionstud.io/calc/`](https://hyperstitionstud.io/calc/).
![Cypher Calculator](res/preview.png)
{preserved_tail.lstrip()}"""
def build_repo_readme_content(repo_key: str, repo_dir: Path, version: str | None = None) -> str:
v = (version or CURRENT_VERSION).lstrip("v").strip()
ctx = _introspect_repo_commit_context(repo_dir, v)
banner = _render_status_banner(repo_key, v, ctx)
if repo_key == "hyperstitionstudio-core":
return _render_core_readme(v, banner)
if repo_key == "ingglish-hyperdope-gematria":
return _render_ingglish_archive_readme(v, banner)
if repo_key == "technocapital-singularity-zoology":
return _render_zoology_readme(v, banner)
if repo_key == "encyclopedia-knowledge-graph":
return _render_kg_readme(v, banner)
if repo_key == "hyperdope-ci-build":
return _render_ci_build_readme(v, banner)
if repo_key == "haiperdohp-jemaytreeah":
return _render_calc_readme(repo_dir, v, banner)
raise ValueError(f"Unknown repository key: {repo_key}")
def sync_all_repo_readmes(
ws_root: Path | None = None,
version: str | None = None,
check_only: bool = False,
target_repo: str | None = None,
) -> dict[str, Any]:
cfg = load_workspace_config(workspace_root=ws_root)
root = cfg.workspace_root
v = (version or CURRENT_VERSION).lstrip("v").strip()
modified: list[str] = []
mismatched: list[str] = []
checked: list[str] = []
for repo_key in REPO_SPECS:
if target_repo and target_repo not in (repo_key, REPO_SPECS[repo_key]["gitea_slug"]):
continue
rdir = _resolve_repo_dir(root, repo_key)
if not rdir.is_dir():
continue
readme_path = rdir / "README.md"
rel_label = f"/workspace/{rdir.name}/README.md"
checked.append(rel_label)
expected = build_repo_readme_content(repo_key, rdir, version=v)
actual = readme_path.read_text(encoding="utf-8") if readme_path.is_file() else ""
if check_only:
# Verify the file exists, contains the status markers, has 0 `EADME.md` truncations,
# and every single semantic version token `vX.Y.Z` in the file equals `v{v}`.
has_markers = STATUS_START in actual and STATUS_END in actual
found_semver = set(re.findall(r"\bv(\d+\.\d+\.\d+)\b", actual))
strict_single_version = (found_semver == {v})
has_no_d_filter = "Zero-`d`-Filter" not in actual and "Zero-d-Filter" not in actual
has_no_truncation = re.search(r"(?<![A-Za-z])EADME\.md", actual) is None
if not (readme_path.is_file() and has_markers and strict_single_version and has_no_d_filter and has_no_truncation):
mismatched.append(rel_label)
else:
if actual != expected:
readme_path.write_text(expected, encoding="utf-8")
modified.append(rel_label)
return {
"ok": len(mismatched) == 0,
"version": v,
"check_only": check_only,
"all_in_sync": len(mismatched) == 0,
"checked_readmes": checked,
"modified_readmes": modified,
"mismatched_readmes": mismatched,
}
PRE_COMMIT_HOOK_SCRIPT = """#!/usr/bin/env bash
# Auto-installed by hyperstitionstud_io.publishing.readme_sync (hs-readme-sync --install-hooks)
# Synchronizes root README.md with the staged commit scope and current release version before every commit.
set -euo pipefail
REPO_ROOT="$(git rev-parse --show-toplevel)"
REPO_NAME="$(basename "${REPO_ROOT}")"
WS_ROOT="$(cd "${REPO_ROOT}/.." && pwd)"
CORE_SRC="${WS_ROOT}/hyperstitionstudio-core/src"
if [[ -d "${CORE_SRC}" ]]; then
export PYTHONPATH="${CORE_SRC}${PYTHONPATH:+:${PYTHONPATH}}"
python3 -m hyperstitionstud_io.publishing.readme_sync --repo "${REPO_NAME}" --stage
fi
"""
COMMIT_MSG_HOOK_SCRIPT = r"""#!/usr/bin/env bash
# Auto-installed by hyperstitionstud_io.publishing.readme_sync (hs-readme-sync --install-hooks)
# Rejects any commit message containing `Release vX.Y.Z` or `(vX.Y.Z)` if X.Y.Z != hyperstitionstud_io.__version__.
set -euo pipefail
MSG_FILE="$1"
REPO_ROOT="$(git rev-parse --show-toplevel)"
WS_ROOT="$(cd "${REPO_ROOT}/.." && pwd)"
CORE_SRC="${WS_ROOT}/hyperstitionstudio-core/src"
if [[ -d "${CORE_SRC}" ]] && [[ -f "${MSG_FILE}" ]]; then
export PYTHONPATH="${CORE_SRC}${PYTHONPATH:+:${PYTHONPATH}}"
python3 - "${MSG_FILE}" <<'PY'
import re, sys
from pathlib import Path
from hyperstitionstud_io import __version__ as CUR_V
msg = Path(sys.argv[1]).read_text(encoding="utf-8", errors="replace")
for m in re.finditer(r"(?:Release\s+v|\(v)(\d+\.\d+\.\d+)", msg):
msg_v = m.group(1)
if msg_v != CUR_V:
sys.stderr.write(
f"[COMMIT-MSG GATE] Commit message version v{msg_v} does not match hyperstitionstud_io.__version__ (v{CUR_V})!\n"
)
sys.exit(1)
PY
fi
"""
def install_git_pre_commit_hooks(ws_root: Path | None = None, check_only: bool = False) -> dict[str, Any]:
cfg = load_workspace_config(workspace_root=ws_root)
root = cfg.workspace_root
installed: list[str] = []
missing: list[str] = []
for repo_key in REPO_SPECS:
rdir = _resolve_repo_dir(root, repo_key)
hooks_dir = rdir / ".git" / "hooks"
if not hooks_dir.is_dir():
continue
for h_name, h_script, marker in (
("pre-commit", PRE_COMMIT_HOOK_SCRIPT, "readme_sync"),
("commit-msg", COMMIT_MSG_HOOK_SCRIPT, "COMMIT-MSG GATE"),
):
hook_path = hooks_dir / h_name
rel_label = f"/workspace/{rdir.name}/.git/hooks/{h_name}"
if check_only:
if not (hook_path.is_file() and os.access(hook_path, os.X_OK) and marker in hook_path.read_text(encoding="utf-8")):
missing.append(rel_label)
else:
installed.append(rel_label)
else:
cur = hook_path.read_text(encoding="utf-8") if hook_path.is_file() else ""
if cur != h_script:
hook_path.write_text(h_script, encoding="utf-8")
hook_path.chmod(0o755)
installed.append(rel_label)
return {
"ok": len(missing) == 0,
"installed_hooks": installed,
"missing_hooks": missing,
}
def main(argv: list[str] | None = None) -> int:
ap = argparse.ArgumentParser(prog="hs-readme-sync", description="Synchronize root README.md files and Gitea pre-commit hooks across all 6 repositories.")
ap.add_argument("--all", action="store_true", help="Synchronize root README.md across all 6 repositories.")
ap.add_argument("--repo", default=None, help="Synchronize only the specified repository name/slug.")
ap.add_argument("--stage", action="store_true", help="Run `git add README.md` after updating the repository README.")
ap.add_argument("--check", action="store_true", help="Verify all 6 root README.md files and pre-commit hooks are in sync without modifying files.")
ap.add_argument("--install-hooks", action="store_true", help="Install idempotent .git/hooks/pre-commit and commit-msg hooks across all 6 repositories.")
ap.add_argument("--hooks-only", action="store_true", help="Install git hooks without modifying tracked README.md files on disk.")
ap.add_argument("--version", default=None, help="Override target semantic version.")
args = ap.parse_args(argv)
cfg = load_workspace_config()
root = cfg.workspace_root
if args.hooks_only:
hook_res = install_git_pre_commit_hooks(ws_root=root, check_only=False)
print(json.dumps({"ok": hook_res["ok"], "hooks_only": True, "hooks": hook_res}, indent=2))
return 0 if hook_res["ok"] else 1
if args.install_hooks:
hook_res = install_git_pre_commit_hooks(ws_root=root, check_only=False)
sync_res = sync_all_repo_readmes(ws_root=root, version=args.version, check_only=False, target_repo=args.repo)
sync_res["hooks"] = hook_res
print(json.dumps(sync_res, indent=2))
return 0
if args.check:
sync_res = sync_all_repo_readmes(ws_root=root, version=args.version, check_only=True, target_repo=args.repo)
hook_res = install_git_pre_commit_hooks(ws_root=root, check_only=True)
sync_res["hooks"] = hook_res
sync_res["all_in_sync"] = bool(sync_res["all_in_sync"] and hook_res["ok"])
print(json.dumps(sync_res, indent=2))
return 0 if sync_res["all_in_sync"] else 1
sync_res = sync_all_repo_readmes(ws_root=root, version=args.version, check_only=False, target_repo=args.repo)
if args.stage and args.repo:
for repo_key in REPO_SPECS:
if args.repo in (repo_key, REPO_SPECS[repo_key]["gitea_slug"]):
rdir = _resolve_repo_dir(root, repo_key)
if (rdir / "README.md").is_file():
subprocess.run(["git", "-C", str(rdir), "add", "README.md"], check=False)
print(json.dumps(sync_res, indent=2))
return 0
if __name__ == "__main__":
raise SystemExit(main())
+1 -1
View File
@@ -678,7 +678,7 @@ def build_financial_quant_harvest(
payload: dict[str, Any] = {
"$schema": "./schemas/v1/financial-aq-harvest.schema.json",
"$id": "urn:io:hyperstitionstud:schema:v1:financial-aq-harvest",
"version": "2.2.0",
"version": "2.8.1",
"target_date_utc": datetime.datetime.now(datetime.timezone.utc).strftime("%Y-%m-%d"),
"harvest_mode": harvest_mode,
"synthetic_data_eliminated": True,
+25 -1
View File
@@ -227,7 +227,6 @@ def collect_workspace_change_signals(ws_root: Path | None = None) -> dict[str, A
skill_completed_plans: list[str] = []
skill_candidates = [
Path.home() / ".hermes" / "skills" / "software-development" / "hyperstitionstudio-roadmap-and-release" / "SKILL.md",
Path("/home/m00t/.hermes/skills/software-development/hyperstitionstudio-roadmap-and-release/SKILL.md"),
]
for sp in skill_candidates:
if sp.is_file():
@@ -324,6 +323,7 @@ def get_version_targets(ws_root: Path | None = None) -> list[tuple[Path, list[tu
(rf'urn:io:hyperstitionstud v{SEMVER_RE}\)', "urn:io:hyperstitionstud v{V})"),
(rf'graph-data\.js\?v={SEMVER_RE}', "graph-data.js?v={V}"),
(rf'hs-group3-basalt-chamfer\.css\?v={SEMVER_RE}', "hs-group3-basalt-chamfer.css?v={V}"),
(rf'hs-matrix-coderain\.js\?v={SEMVER_RE}', "hs-matrix-coderain.js?v={V}"),
],
),
(
@@ -332,6 +332,7 @@ def get_version_targets(ws_root: Path | None = None) -> list[tuple[Path, list[tu
(rf'learn-progress-state v{SEMVER_RE}\)', "learn-progress-state v{V})"),
(rf'learn-app\.js\?v={SEMVER_RE}', "learn-app.js?v={V}"),
(rf'hs-group3-basalt-chamfer\.css\?v={SEMVER_RE}', "hs-group3-basalt-chamfer.css?v={V}"),
(rf'hs-matrix-coderain\.js\?v={SEMVER_RE}', "hs-matrix-coderain.js?v={V}"),
],
),
(
@@ -351,6 +352,7 @@ def get_version_targets(ws_root: Path | None = None) -> list[tuple[Path, list[tu
(rf'quant-app\.js\?v={SEMVER_RE}', "quant-app.js?v={V}"),
(rf'quant-tutorials\.js\?v={SEMVER_RE}', "quant-tutorials.js?v={V}"),
(rf'hs-group3-basalt-chamfer\.css\?v={SEMVER_RE}', "hs-group3-basalt-chamfer.css?v={V}"),
(rf'hs-matrix-coderain\.js\?v={SEMVER_RE}', "hs-matrix-coderain.js?v={V}"),
],
),
(
@@ -372,6 +374,7 @@ def get_version_targets(ws_root: Path | None = None) -> list[tuple[Path, list[tu
(rf'urn:io:hyperstitionstud:donate:v{SEMVER_RE}', "urn:io:hyperstitionstud:donate:v{V}"),
(rf'hyperstitionstud\.io/donate v{SEMVER_RE}', "hyperstitionstud.io/donate v{V}"),
(rf'hs-group3-basalt-chamfer\.css\?v={SEMVER_RE}', "hs-group3-basalt-chamfer.css?v={V}"),
(rf'hs-matrix-coderain\.js\?v={SEMVER_RE}', "hs-matrix-coderain.js?v={V}"),
],
),
(
@@ -422,6 +425,12 @@ def get_version_targets(ws_root: Path | None = None) -> list[tuple[Path, list[tu
(rf'encyclopedia-knowledge-graph \(v{SEMVER_RE}\)', "encyclopedia-knowledge-graph (v{V})"),
],
),
(
core.parent / "push-all-to-git-libre-audio.sh",
[
(rf'# Release v{SEMVER_RE}:', "# Release v{V}:"),
],
),
(
calc / "index.html",
[
@@ -467,6 +476,14 @@ def sync_workspace_version(target_version: str, check_only: bool = False, ws_roo
ws_toml.write_text(upd_ws, encoding="utf-8")
modified_files.append(str(ws_toml))
from hyperstitionstud_io.publishing.readme_sync import sync_all_repo_readmes
readme_res = sync_all_repo_readmes(ws_root=cfg.workspace_root, version=v, check_only=check_only)
if check_only and not readme_res["all_in_sync"]:
mismatched_files.extend(readme_res["mismatched_readmes"])
elif not check_only:
modified_files.extend(readme_res["modified_readmes"])
return {
"target_version": v,
"check_only": check_only,
@@ -481,9 +498,16 @@ def main(argv: list[str] | None = None) -> int:
ap.add_argument("--set", dest="set_version", default=None, help="Set new version X.Y.Z across all site HTML elements, JS bundles, and manifests.")
ap.add_argument("--check", action="store_true", help="Verify that all site elements match hyperstitionstud_io.__version__ without modifying files.")
ap.add_argument("--explain-bump", action="store_true", help="Evaluate zero-LLM-token change-scope heuristics and print the recommended bump level without modifying files.")
ap.add_argument("--corpus-delta", action="store_true", help="Print deterministic corpus richness & Git tag delta report (Strategy 1B, 0 LLM tokens).")
ap.add_argument("--auto-bump", action="store_true", help="Programmatically determine the next semantic version via change-scope heuristics (0 LLM tokens) and synchronize all workspace files.")
args = ap.parse_args(argv)
if args.corpus_delta:
from hyperstitionstud_io.publishing.highlights import compute_corpus_delta_report
print(json.dumps(compute_corpus_delta_report(), indent=2, ensure_ascii=False))
return 0
if args.explain_bump:
report = compute_programmatic_version_bump()
print(json.dumps(report, indent=2))
+293 -8
View File
@@ -59,16 +59,27 @@ def test_offline_urn_namespaces_and_no_external_https_fonts() -> None:
assert "by Lemurs." in txt, f"Missing global Lemurs footer in {html_p}"
assert ("&#x2665;" in txt or "♥" in txt), f"Missing Unicode heart in {html_p}"
g3_css_txt = (cfg.core_dir / "site" / "assets" / "hs-group3-basalt-chamfer.css").read_text(encoding="utf-8")
for req_donate_sel in (".nav-donate-sep {", ".btn-donate-pill {", ".btn-donate-pill:hover {", ".donate-pill-emblem {"):
assert req_donate_sel in g3_css_txt, f"Missing canonical {req_donate_sel} in hs-group3-basalt-chamfer.css"
for nav_p in (
cfg.core_dir / "site" / "index.html",
cfg.core_dir / "site" / "learn" / "index.html",
cfg.core_dir / "site" / "quant" / "index.html",
cfg.core_dir / "site" / "engineering" / "index.html",
cfg.core_dir / "site" / "math" / "index.html",
):
nav_txt = nav_p.read_text(encoding="utf-8")
assert "hs-group3-basalt-chamfer.css" in nav_txt, f"Missing shared stylesheet in {nav_p}"
assert "btn-donate-pill" in nav_txt, f"Missing distinct stadium-pill Donate button in {nav_p}"
assert "donate-pill-emblem" in nav_txt, f"Missing circular 1:2 Donate emblem in {nav_p}"
assert "nav-donate-sep" in nav_txt, f"Missing vertical divider before Donate pill in {nav_p}"
assert '<span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span>' in nav_txt, (
f"Missing canonical circular 1:2 Donate emblem markup in {nav_p}"
)
assert "margin-left: auto" in nav_txt, f"Missing right-justification margin-left: auto in {nav_p}"
assert ".btn-donate-pill {" not in nav_txt and ".donate-pill-emblem {" not in nav_txt, (
f"Inline .btn-donate-pill/.donate-pill-emblem override found in {nav_p} (must inherit from hs-group3-basalt-chamfer.css)"
)
schemas_dir = cfg.core_dir / "schemas" / "v1"
for sp in schemas_dir.glob("*.schema.json"):
@@ -83,6 +94,45 @@ def test_offline_urn_namespaces_and_no_external_https_fonts() -> None:
v_sync = sync_workspace_version(cur_ver, check_only=True, ws_root=cfg.workspace_root)
assert v_sync["all_in_sync"] is True, f"Site version drift detected: {v_sync['mismatched_files']}"
# Verify PLAN-ELIMINATE-CONTAINER-HOST-PATHS-AND-TARGET-PUBLIC-WEB-ROUTES (0 container host paths in codebase)
import os
import tarfile
forbidden_host_prefix = "/home/" + "m00t"
for rdir in (
cfg.core_dir,
cfg.archive_dir.parent,
cfg.zoology_dir,
cfg.knowledge_graph_dir,
cfg.paths["gematria_js_dir"],
cfg.paths.get("ci_repo_dir", cfg.workspace_root / "hyperdope-ci-build"),
):
if not rdir.is_dir():
continue
for root_s, dirs, files in os.walk(rdir):
dirs[:] = [d for d in dirs if d not in (".git", "node_modules", "__pycache__", ".cache", "untracked")]
for fn in files:
if fn.startswith(".~lock."):
continue
fp = Path(root_s) / fn
if fp.suffix in (".png", ".mp3", ".db", ".gz", ".br", ".ttf", ".woff", ".woff2", ".pdf"):
continue
try:
ftxt = fp.read_text(encoding="utf-8")
except Exception:
continue
assert forbidden_host_prefix not in ftxt, f"Forbidden container host path found in {fp}"
for tgz in (
cfg.knowledge_graph_dir / "docs" / "archive" / "completed-plans-archive.tar.gz",
cfg.zoology_dir / "docs" / "archive" / "completed-plans-archive.tar.gz",
):
if tgz.is_file():
with tarfile.open(tgz, "r:gz") as tf:
for m in tf.getmembers():
if m.name.endswith(".md"):
m_txt = tf.extractfile(m).read().decode("utf-8", errors="replace")
assert forbidden_host_prefix not in m_txt, f"Forbidden host path in {tgz}:{m.name}"
def test_ciphers_and_bilingual_ledger_parity() -> None:
cfg = load_workspace_config()
@@ -213,8 +263,10 @@ def test_ipld_quant_and_mcp_server() -> None:
init_resp = dispatch_jsonrpc({"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2025-03-26"}})
assert init_resp and init_resp["result"]["serverInfo"]["name"] == "hyperstitionstudio-mcp"
from hyperstitionstud_io.mcp.tools import MCP_TOOLS_SCHEMA
t_list = dispatch_jsonrpc({"jsonrpc": "2.0", "id": 2, "method": "tools/list"})
assert t_list and len(t_list["result"]["tools"]) == 15
assert t_list and len(t_list["result"]["tools"]) == len(MCP_TOOLS_SCHEMA) and len(MCP_TOOLS_SCHEMA) >= 20
t_call = dispatch_jsonrpc({
"jsonrpc": "2.0",
@@ -490,6 +542,9 @@ def test_ipld_quant_and_mcp_server() -> None:
summary_before = get_api_telemetry_summary(tel_db)
assert summary_before["total_requests"] == 5
assert summary_before["internal_test_requests"] == 5
assert summary_before["external_production_requests"] == 0
assert summary_before["market_demand_confidence"] == "No data available"
assert summary_before["ringbuffer_count"] == 5
protocols_seen = {ep["protocol"] for ep in summary_before["endpoints"]}
assert protocols_seen == {"rest_v1", "mcp_jsonrpc"}
@@ -498,6 +553,7 @@ def test_ipld_quant_and_mcp_server() -> None:
assert "/api/v1/quant/instruments/{symbol}" in patterns_seen
assert "tools/list" in patterns_seen
assert all(ev["isolation_ok"] == 1 for ev in summary_before["recent_audit_events"])
assert all(ev["traffic_source"] == "internal_test" for ev in summary_before["recent_audit_events"])
# Verify logrotate.d file configuration (default 100M = 100MB, compress enabled, rotate >= 12) & no-op when below limit
import gzip
@@ -535,11 +591,43 @@ def test_ipld_quant_and_mcp_server() -> None:
with sqlite3.connect(str(tel_db)) as check_conn:
assert check_conn.execute("PRAGMA integrity_check;").fetchone()[0] == "ok"
s_post, _, _ = dispatch_rest_v1("GET", "/api/v1/status")
s_post, _, _ = dispatch_rest_v1(
"GET",
"/api/v1/status?surface=quant&donate_from=quant&donate_copy=BTC&export_action=quant_csv&free_text_ignored=secret123",
traffic_source="external_production",
)
assert s_post == 200
assert get_api_telemetry_summary(tel_db)["total_requests"] == 1
summary_ext = get_api_telemetry_summary(tel_db)
assert summary_ext["total_requests"] == 1
assert summary_ext["external_production_requests"] == 1
assert summary_ext["internal_test_requests"] == 0
assert summary_ext["market_demand_confidence"] == "No data available"
assert summary_ext["recent_audit_events"][0]["traffic_source"] == "external_production"
param_map = {(r["param_category"], r["param_value"]): r["external_requests"] for r in summary_ext["parameter_rollups"]}
assert param_map.get(("surface", "quant")) == 1
assert param_map.get(("donate_from", "quant")) == 1
assert param_map.get(("donate_copy", "BTC")) == 1
assert param_map.get(("export_action", "quant_csv")) == 1
assert all(k[0] != "free_text_ignored" for k in param_map)
# Also verify second rotation shifts .1.gz -> .2.gz and writes new .1.gz
# Verify Strategy 3A (ingest_caddy_route_counts) & Strategy 2C (get_longitudinal_telemetry_summary)
from hyperstitionstud_io.db.sqlite_meta import (
get_longitudinal_telemetry_summary,
ingest_caddy_route_counts,
)
sample_caddy_log = tmp_path / "sample-caddy-access.json"
sample_caddy_log.write_text(
'{"status":200,"request":{"uri":"/quant/index.html"}}\n'
'{"status":200,"request":{"uri":"/zoology/proposal-fund-manager-novel-investment-discovery.pdf"}}\n'
'{"status":304,"request":{"uri":"/"}}\n',
encoding="utf-8",
)
c_ing = ingest_caddy_route_counts(sample_caddy_log, telemetry_db_path=tel_db)
assert c_ing["matched_hits"] == 3
assert sample_caddy_log.read_text(encoding="utf-8") == ""
# Also verify second rotation shifts .1.gz -> .2.gz and writes new .1.gz, and Strategy 2C aggregates across generations
direct_trunc = truncate_telemetry_db_quiescent(tel_db, max_bytes=512, force=False)
assert direct_trunc["truncated"] is True
assert direct_trunc["quiescent"] is True
@@ -547,6 +635,19 @@ def test_ipld_quant_and_mcp_server() -> None:
assert Path(f"{tel_db}.1.gz").is_file()
assert Path(f"{tel_db}.2.gz").is_file()
long_sum = get_longitudinal_telemetry_summary(tel_db)
assert long_sum["generations_count"] >= 2
assert long_sum["total_requests"] == 6
assert long_sum["external_production_requests"] == 1
assert long_sum["internal_test_requests"] == 5
# Verify Strategy 1B (compute_corpus_delta_report / --corpus-delta)
from hyperstitionstud_io.publishing.highlights import compute_corpus_delta_report
cdelta = compute_corpus_delta_report()
assert cdelta["llm_tokens_used"] == 0
assert "deltas_since_baseline" in cdelta and "dossiers_count" in cdelta["deltas_since_baseline"]
# Verify regression guard: read-only / unwritable SQLite path (sqlite3.OperationalError) never causes 502/crash
os.environ["HYPERSTITION_TELEMETRY_DB_PATH"] = "/sys/hyperstition-readonly-telemetry.db"
ro_code, _, ro_body = dispatch_rest_v1("GET", "/api/v1/quant/timeseries?symbol=NVDA")
@@ -587,6 +688,12 @@ def test_ipld_quant_and_mcp_server() -> None:
)
pdf_res = compile_markdown_to_pdf(md_test, pdf_test, title="Dark-Mode Torture Test")
assert pdf_res["dark_mode_style"] == "group_3_stealth_basalt"
from reportlab.lib.fonts import ps2tt
from hyperstitionstud_io.publishing.fonts import _reportlab_vera_fallback
assert ps2tt("DejaVu-Bold") == ("dejavu", 1, 0)
assert ps2tt("DejaVuMono-Bold") == ("dejavumono", 1, 0)
assert _reportlab_vera_fallback("DejaVuSans-Bold.ttf") is not None
r_pdf = PdfReader(str(pdf_test))
pdf_txt = "\n".join(pg.extract_text() or "" for pg in r_pdf.pages)
assert "<br/>" not in pdf_txt and "\\mathbb" not in pdf_txt and "\\Delta" not in pdf_txt
@@ -833,13 +940,191 @@ def test_ipld_quant_and_mcp_server() -> None:
"if (s.evaluate('(variance-pop *cluster-292-gen1*)').formatted !== '0') process.exit(5);"
"if (Math.abs(s.evaluate('((derivative (lambda (x) (* x x x)) 1e-5) 2.0)').floatValue - 12.0) > 1e-3) process.exit(6);"
"if (Math.abs(s.evaluate('(adaptive-simpson (lambda (x) (* x x)) 0.0 3.0 1e-6)').floatValue - 9.0) > 1e-4) process.exit(7);"
"if (s.evaluate(\"(bayes-update '(1/3 1/3 1/3) '(1/10 3/10 6/10))\").formatted !== '(1/10 3/10 3/5)') process.exit(8);",
"if (s.evaluate(\"(bayes-update '(1/3 1/3 1/3) '(1/10 3/10 6/10))\").formatted !== '(1/10 3/10 3/5)') process.exit(8);"
"if (s.evaluatePolyglot('aqBase36(\"LEMUR\")', 'ts').formatted !== '114') process.exit(9);"
"if (s.evaluatePolyglot('aq_base36(\"LEMUR\")', 'rust').formatted !== '114') process.exit(10);"
"if (s.evaluatePolyglot('primeFactors(666)', 'ts').formatted !== '[2,3,3,37]') process.exit(11);"
"if (s.evaluatePolyglot('prime_factors(666_u64)', 'rust').formatted !== 'vec![2, 3, 3, 37]') process.exit(12);"
"if (s.evaluatePolyglot('(aq-base36 \"LEMUR\")', 'rust').formatted !== '114') process.exit(13);"
"if (s.evaluatePolyglot('let x: i64 = aq_base36(\"LEMUR\") + 23; x * 2', 'rust').formatted !== '274') process.exit(14);"
"if (s.evaluatePolyglot('const x: number = aqBase36(\"LEMUR\") + 23; x * 2', 'ts').formatted !== '274') process.exit(15);"
"if (s.evaluatePolyglot('(1..=5_i64).map(|x| x * x).sum::<i64>()', 'rust').formatted !== '55') process.exit(16);",
],
capture_output=True,
text=True,
check=False,
)
assert node_guile_test.returncode == 0, f"Node Guile REPL check failed: {node_guile_test.stderr}"
assert node_guile_test.returncode == 0, f"Node Polyglot REPL check failed ({node_guile_test.returncode}): {node_guile_test.stderr}"
# Verify 4-Ring Sandbox Security & Resource Quota Guards (polyglot_sandbox.py)
from hyperstitionstud_io.publishing.polyglot_sandbox import (
SandboxResourceError,
SandboxSecurityError,
evaluate_polyglot_sandbox,
)
for bad_expr, bad_lang in (
('({}).constructor.constructor("return process")()', "ts"),
("globalThis.fetch('https://example.com')", "ts"),
('(system "id")', "guile"),
('std::process::Command::new("sh")', "rust"),
):
blocked = False
try:
evaluate_polyglot_sandbox(bad_expr, lang=bad_lang)
except SandboxSecurityError:
blocked = True
assert blocked, f"Failed to block escape attempt {bad_expr!r} in {bad_lang}"
for inf_expr, inf_lang in (
("((Z (lambda (r) (lambda (x) (r (+ x 1))))) 0)", "guile"),
("Array.from({length: 1000000}, (_, i): number => i + 1).reduce((a, b) => a + b, 0)", "ts"),
("(1..=1000000_i64).fold(0_i64, |acc, x| acc + x)", "rust"),
):
halted = False
try:
evaluate_polyglot_sandbox(inf_expr, lang=inf_lang, max_steps=2000)
except SandboxResourceError:
halted = True
assert halted, f"Failed to halt resource exhaustion {inf_expr!r} in {inf_lang}"
# Verify 5-state #hsPolyglotModeSelector on /engineering/ and /math/
eng_idx_txt = (cfg.core_dir / "site" / "engineering" / "index.html").read_text(encoding="utf-8")
math_idx_txt = (cfg.core_dir / "site" / "math" / "index.html").read_text(encoding="utf-8")
for m_mode in ('data-lens-mode="off"', 'data-lens-mode="guile"', 'data-lens-mode="ts"', 'data-lens-mode="rust"', 'data-lens-mode="all"'):
assert m_mode in eng_idx_txt and m_mode in math_idx_txt
# Verify PLAN-REMOVE-D-FILTER-DISCUSSION-FROM-ENGINEERING-AND-MATH-HUBS:
# 0 decagram/d-filter mentions in /engineering/* and /math/*, while preserving geometric/calculus/statistical d/D
forbidden_d_filter_re = re.compile(r"(?i)(assert_zero_d_filter|zero-d-filter|d-filter|d_filter|d-list|d_list|10-letter|decagram|nuoagmhysl)")
for hub_dir in (cfg.core_dir / "site" / "engineering", cfg.core_dir / "site" / "math"):
for f_p in hub_dir.rglob("*"):
if f_p.is_file() and f_p.suffix in (".html", ".json", ".js"):
f_txt = f_p.read_text(encoding="utf-8")
m_bad = forbidden_d_filter_re.search(f_txt)
assert m_bad is None, f"Forbidden decagram/d-filter discussion {m_bad.group(0)!r} found in {f_p}"
math_m4_txt = (cfg.core_dir / "site" / "math" / "timeseries-moments-and-confluence-dose" / "index.html").read_text(encoding="utf-8")
assert "d/dx" in math_m4_txt and "D_{i,t}" in math_m4_txt
# Verify PLAN-ADHOC-MESSENGER-HIGHLIGHTS-SUMMARY-FOR-ENGINEERS-AND-MATH (0 Web UI exposure, untracked output)
hl_code, _, hl_body = dispatch_rest_v1("GET", "/api/v1/tools/hs_generate_highlights_summary")
assert hl_code == 200
hl_data = hl_body["data"]
assert hl_data["paragraph_count"] == 2
assert 200 <= hl_data["char_count"] <= 1100
assert hl_data["web_ui_exposed"] is False
assert "<div" not in hl_data["messenger_text"] and "\\mathbb" not in hl_data["messenger_text"]
assert "https://hyperstitionstud.io/engineering/" in hl_data["messenger_text"]
assert "https://hyperstitionstud.io/math/" in hl_data["messenger_text"]
assert "/untracked/recent-highlights/" in hl_data["untracked_artifacts"]["txt_path"]
# Verify PLAN-COMPREHENSIVE-MCP-AND-CHATBOT-REST-API-CAPABILITY-EXPOSURE
em_code, _, em_body = dispatch_rest_v1("GET", "/api/v1/tools/hs_inspect_engineering_and_math_docs?unit_filter=M2")
assert em_code == 200 and "engineering" in em_body["data"] and "math" in em_body["data"]
dm_code, _, dm_body = dispatch_rest_v1(
"GET",
"/api/v1/tools/hs_inspect_documentation_and_manuals?doc_id=PLAN-HS-PDF-BUILD-DARK-MODE-AND-GLYPH-SANITIZATION&include_full_markdown=true",
)
assert dm_code == 200 and dm_body["data"]["archived_plans_count"] >= 1
assert "STEALTH BASALT" in dm_body["data"]["archived_plans"][0]["markdown"] or "ReportLab" in dm_body["data"]["archived_plans"][0]["markdown"]
gs_code, _, gs_body = dispatch_rest_v1("GET", "/api/v1/tools/hs_evaluate_guile_scheme_z_calculus?lang=rust&expression=aq_base36(%22LEMUR%22)")
assert gs_code == 200 and gs_body["data"]["formatted"] == "114"
cat_st_code, _, cat_st_body = dispatch_rest_v1("GET", "/api/v1/tools/hs_query_workspace_catalog_and_release_state?fts_query=lemur&registry=all&aq_int=137&symbol=NVDA")
assert cat_st_code == 200 and "version_bump_heuristics" in cat_st_body["data"]
assert "registry_manifests" in cat_st_body["data"] and len(cat_st_body["data"]["registry_manifests"]) >= 1
assert "coordinate_join" in cat_st_body["data"] and cat_st_body["data"]["coordinate_join"]["coordinate_aq"] == 137
assert "timeseries_bars" in cat_st_body["data"]
# Verify HTTP ETag & If-None-Match (304 Not Modified) from PLAN-SQLITE-META-REST-ENDPOINTS-ETAG-AND-VPS-SYNC
from hyperstitionstud_io.mcp.rest import compute_response_etag, matches_if_none_match
st_etag = compute_response_etag(st_body)
assert st_etag.startswith('"') and st_etag.endswith('"')
assert matches_if_none_match(st_etag, st_etag) is True
assert matches_if_none_match(f"W/{st_etag}", st_etag) is True
nm_code, _, nm_body = dispatch_rest_v1("GET", "/api/v1/status", if_none_match=st_etag)
assert nm_code == 304 and nm_body == ""
res_eng_code, _, res_eng_body = dispatch_rest_v1("GET", "/api/v1/resources/engineering-manifest")
assert res_eng_code == 200 and res_eng_body["data"]["$id"] == "urn:io:hyperstitionstud:engineering-manifest"
# Verify PLAN-SUBTLE-CYBERNETIC-MATRIX-CODE-RAIN-BACKGROUND & PLAN-CYBERNETIC-AND-OCCULT-MICRO-SIGIL-UI-ACCENTS
matrix_woff2_p = cfg.core_dir / "site" / "assets" / "matrix-font.woff2"
coderain_js_p = cfg.core_dir / "site" / "assets" / "hs-matrix-coderain.js"
assert matrix_woff2_p.is_file() and matrix_woff2_p.stat().st_size > 4000
assert coderain_js_p.is_file()
assert "@font-face" in g3_css and "matrix-font.woff2" in g3_css
assert ".hs-sigil-seal" in g3_css and ".hs-plate-g3.plate-lock-gold::after" in g3_css
for surf_p in (
cfg.core_dir / "site" / "index.html",
cfg.core_dir / "site" / "learn" / "index.html",
cfg.core_dir / "site" / "quant" / "index.html",
cfg.core_dir / "site" / "donate" / "index.html",
cfg.core_dir / "site" / "engineering" / "index.html",
cfg.core_dir / "site" / "math" / "index.html",
):
surf_txt = surf_p.read_text(encoding="utf-8")
assert "hs-matrix-coderain.js?v=" in surf_txt, f"Missing hs-matrix-coderain.js in {surf_p}"
assert "hs-sigil-seal" in surf_txt, f"Missing hs-sigil-seal in {surf_p}"
assert "hs-sigil-colophon" in surf_txt, f"Missing hs-sigil-colophon in {surf_p}"
node_rain_test = subprocess.run(
[
"node",
"-e",
f"const CR = require({json.dumps(str(coderain_js_p))});"
"if (CR.MATRIX_CHARS.length !== 66) process.exit(1);"
"if (CR.SIGIL_GLINTS.length < 8) process.exit(2);"
"const sub = CR.PROFILES.subtle;"
"if (sub.frameIntervalMs !== 80 || sub.colPitchPx !== 24 || sub.canvasOpacity !== 0.45) process.exit(3);"
"const aCenter = CR.computeColumnAlpha(500, 1000, sub, false);"
"const aOuter = CR.computeColumnAlpha(50, 1000, sub, false);"
"if (!(aCenter < aOuter && aCenter <= 0.09 && aOuter >= 0.20)) process.exit(4);",
],
capture_output=True,
text=True,
check=False,
)
assert node_rain_test.returncode == 0, f"Node CodeRain check failed ({node_rain_test.returncode}): {node_rain_test.stderr}"
# Verify PLAN-AUTOMATED-PER-COMMIT-REPO-ROOT-README-SYNCHRONIZATION-FOR-GITEA
# and PLAN-README-AND-GIT-COMMIT-MESSAGE-VERSION-PARITY-FIX
from hyperstitionstud_io import __version__ as cur_v_str
from hyperstitionstud_io.publishing.readme_sync import (
install_git_pre_commit_hooks,
sync_all_repo_readmes,
)
rm_chk = sync_all_repo_readmes(ws_root=cfg.workspace_root, check_only=True)
assert rm_chk["all_in_sync"] is True and len(rm_chk["checked_readmes"]) == 6, f"README drift: {rm_chk}"
for rm_rel in rm_chk["checked_readmes"]:
rm_p = cfg.workspace_root / Path(rm_rel).relative_to("/workspace")
rm_txt = rm_p.read_text(encoding="utf-8")
assert re.search(r"(?<![A-Za-z])EADME\.md", rm_txt) is None, f"Truncated EADME.md found in {rm_p}"
found_v = set(re.findall(r"\bv(\d+\.\d+\.\d+)\b", rm_txt))
assert found_v == {cur_v_str}, f"Mixed versions {found_v} in {rm_p} (expected only {cur_v_str})"
hk_chk = install_git_pre_commit_hooks(ws_root=cfg.workspace_root, check_only=True)
assert hk_chk["ok"] is True and len(hk_chk["installed_hooks"]) == 12, f"Missing git hooks: {hk_chk}"
# Verify PLAN-HOMEPAGE-LAYOUT-GIT-VELOCITY-PRIORITIZATION-AND-DECLUTTER (Proposal A / Option 2)
home_txt = (cfg.core_dir / "site" / "index.html").read_text(encoding="utf-8")
for forbidden_home in ("388 Graph Nodes", "1,282 Typed Edges", "24 Quant Tickers", "stat-row", "-manifest.json"):
assert forbidden_home not in home_txt, f"Forbidden static marker {forbidden_home!r} found on homepage"
for q_img in (
"assets/closeups/quadrant-1-cybermemetics-calc-graph.png",
"assets/closeups/quadrant-2-esoteric-finance-quant.png",
"assets/closeups/quadrant-3-info-science-novice-learn-polyglot.png",
"assets/closeups/quadrant-4-operators-deployment-vps.png",
):
assert q_img in home_txt, f"Missing quadrant closeup {q_img} on homepage"
assert (cfg.core_dir / "site" / q_img).is_file()
home_hrefs = re.findall(r'<a[^>]+href="([^"]+)"', home_txt)
assert len(home_hrefs) == len(set(home_hrefs)), f"Duplicate href links on homepage: {home_hrefs}"
assert "24 Watchlist Instruments" in (cfg.core_dir / "site" / "quant" / "index.html").read_text(encoding="utf-8")
# Verify PLAN-INTROSPECTIVE-PROTECT-SYSTEM-STRICT-EROFS-TEST-HARNESS
from hyperstitionstud_io.ci.erofs_harness import run_introspective_erofs_suite
+1 -1
View File
@@ -1,6 +1,6 @@
# workspace.example.toml — Location-Independent Workspace Configuration Template (v1.2.0)
# Copy to your parent workspace folder: cp hyperstitionstudio-core/workspace.example.toml ./workspace.toml
schema_version = "2.2.0"
schema_version = "2.8.1"
namespace_urn = "urn:io:hyperstitionstud"
[paths]