Compare commits

...
16 Commits
Author SHA1 Message Date
Hermes Agent cb11f5ce0b Release v2.15.0: Implement /calc/ (haiperdohpjematreeah) Group 3 homepage UI parity & hyperdope-ci-build upstream patch integration (Plan #60) and parallel CMU Flite kal16/slt + broadcast DSP voice mastering for /quant/ guided tour (Plan #59 Strategies 1A/2A/3A) 2026-12-01 12:19:51 +00:00
Hermes Agent bfcf295886 Release v2.14.0: Resolve tracked deploy/push-all-to-git-libre-audio.sh fallback in deploy_scripts_sync.py when parent push script is absent on VPS 2026-12-01 11:55:11 +00:00
Hermes Agent f78cf47e00 Release v2.14.0: Implement pre-commit preparation & 8-gate drift-blocking verifier (hs-deploy-scripts-sync Gates D1-D8) for push-all-to-git-libre-audio.sh and deploy/sync-vps-repos.sh (Plan #58) 2026-12-01 11:41:02 +00:00
Hermes Agent 6624209f2b Release v2.13.0: Protect /quant/audio in rsync, auto-provision espeak-ng on VPS in sync-vps-repos.sh, add .wav to Caddyfile, and verify Fedora 41 RPM packaging in push-all-to-git-libre-audio.sh 2026-12-01 11:26:34 +00:00
Hermes Agent 6af5d32b15 Release v2.13.0: Implement zero-Git-audio /quant/ guided tour voice narration (Strategies 1A/2A/3A via hs-quant-voice-build, 250ms onstart watchdog & WebAudio formant fallback) and turnkey Fedora 41 OpenRouter exegesis & git.libre.audio push package (Plan #56 & Plan #57) 2026-12-01 11:24:07 +00:00
Hermes Agent 14c467fa4f Release v2.12.0: Purge pre-existing cold plan .tar.gz bundles from LIVE_REPOS in sync-vps-repos.sh and self-heal legacy .pdf archive members 2026-12-01 10:42:27 +00:00
Hermes Agent a066a0d03d Release v2.12.0: Implement single-layer compression enforcement, 256KB plan archive cap with git.libre.audio citations, cold-archived inactive plans, codebase modularity/security/economization (Strategies 1A/2B/3A/4A/5A/6A/7A), and /quant/ spoken voice narration & #lensSelect UI element indicators (Strategies 1B/2A/3A/4A) 2026-12-01 10:29:05 +00:00
Hermes Agent cc73a57bd8 Release v2.10.0: Wire hs-closeups-sync into pre-commit hooks, push-all-to-git-libre-audio.sh, and sync-vps-repos.sh across all 6 repositories 2026-12-01 08:41:07 +00:00
Hermes Agent 75e80f6a66 Release v2.10.0: Add hs-closeups-sync to automatically re-render homepage UI closeups when page UI elements change 2026-12-01 08:36:30 +00:00
Hermes Agent 72fc095489 Release v2.10.0: Organize active, piecewise, and inactive plans into docs/plans/{active,piecewise,inactive} for offline PDF review 2026-12-01 08:29:37 +00:00
Hermes Agent c7d0bbd007 Release v2.10.0: Verify all 11 multi-tab quadrant closeups in push-all-to-git-libre-audio.sh and test-first-deployment.sh 2026-12-01 08:25:59 +00:00
Hermes Agent e788f357ff Release v2.10.0: Implement progressive scale-ready UI navigation for growing datasets across /quant/, /graph/, /learn/, /engineering/, and /math/ 2026-12-01 08:24:16 +00:00
Hermes Agent f0aaae680f Release v2.9.0: Implement multi-tab 680x260 homepage UI closeups, symmetric 16px/20px quadrant frames, and exploratory deep-links 2026-12-01 07:55:14 +00:00
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
83 changed files with 7523 additions and 983 deletions

No files matched your search

+1
View File
@@ -6,3 +6,4 @@ build/
dist/
*.tmp
.cache/
site/quant/audio/
+22 -17
View File
@@ -1,6 +1,14 @@
# `hyperstitionstudio-core` (`hyperstitionstud_io.*` — `v2.0.0`)
# `hyperstitionstudio-core` (`hyperstitionstud_io.*` — `v2.15.0`)
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.15.0` • 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.15.0 release state across 41 tracked module/artifact surface(s)
> - **Touched Files / Surfaces:** `deploy/push-all-to-git-libre-audio.sh`, `deploy/sync-vps-repos.sh`, `package.json`, `packages-js/ciphers-aq/package.json`, `pyproject.toml`, `scripts/build_gallery_manifest.py`, `site/assets/closeups/quadrant-1-cybermemetics-calc-graph.png`, `site/assets/closeups/quadrant-4-operators-deployment-vps.png` (+33 more)
> - **Live Verified Ecosystem Metrics (`v2.15.0`):** `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.15.0`)
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.
+21 -2
View File
@@ -10,7 +10,26 @@ www.hyperstitionstud.io {
}
hyperstitionstud.io {
encode zstd gzip
@compressible not path *.gz *.br *.tgz *.xz *.zst *.zip *.woff2 *.png *.mp3 *.wav *.pdf
encode @compressible 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"
@@ -20,7 +39,7 @@ hyperstitionstud.io {
-Server
}
@immutable_media path *.pdf *.png *.mp3 *.graphml *.gexf *.canvas *.woff2
@immutable_media path *.pdf *.png *.mp3 *.wav *.graphml *.gexf *.canvas *.woff2
header @immutable_media Cache-Control "public, max-age=86400, stale-while-revalidate=604800"
@html_js path *.html *.js *.json
+1 -2
View File
@@ -21,8 +21,7 @@
/var/lib/hyperstitionstud.io/api-telemetry.db {
size 100M
rotate 12
compress
delaycompress
nocompress
missingok
notifempty
nocreate
+142
View File
@@ -0,0 +1,142 @@
#!/usr/bin/env bash
# /workspace/push-all-to-git-libre-audio.sh
# Release v2.15.0: Pre-push verification & topological push of all 6 repositories to git.libre.audio.
set -euo pipefail
on_error() {
local exit_code=$?
local line_no="${1:-unknown}"
echo "[ERROR] push-all-to-git-libre-audio.sh failed at line ${line_no} with exit code ${exit_code} while running: ${BASH_COMMAND}" >&2
exit "${exit_code}"
}
trap 'on_error ${LINENO}' ERR
run_checked() {
local label="$1"
shift
local out=""
local rc=0
out="$("$@" 2>&1)" || rc=$?
if [[ "${rc}" -ne 0 ]]; then
echo "[ERROR] ${label} failed (exit code ${rc}): $*" >&2
if [[ -n "${out}" ]]; then
echo "${out}" >&2
fi
return "${rc}"
fi
}
ensure_remote_url() {
local repo_dir="$1"
local remote_name="$2"
local target_url="$3"
if git -C "${repo_dir}" remote | grep -qx "${remote_name}"; then
run_checked "git remote set-url ${remote_name} (${repo_dir})" git -C "${repo_dir}" remote set-url "${remote_name}" "${target_url}"
else
run_checked "git remote add ${remote_name} (${repo_dir})" git -C "${repo_dir}" remote add "${remote_name}" "${target_url}"
fi
}
SCRIPT_PATH="${BASH_SOURCE[0]:-$0}"
DEFAULT_WS_DIR="$(cd "$(dirname "${SCRIPT_PATH}")" && pwd)"
if [[ ! -d "${DEFAULT_WS_DIR}/hyperstitionstudio-core/src" ]] && [[ -d "/workspace/hyperstitionstudio-core/src" ]]; then
DEFAULT_WS_DIR="/workspace"
fi
export WORKSPACE_DIR="${WORKSPACE_DIR:-${DEFAULT_WS_DIR}}"
export PYTHONPATH="${WORKSPACE_DIR}/hyperstitionstudio-core/src${PYTHONPATH:+:${PYTHONPATH}}"
export HYPERSTITIONSTUDIO_CONFIG="${HYPERSTITIONSTUDIO_CONFIG:-${WORKSPACE_DIR}/workspace.toml}"
FORGE_SSH="${FORGE_SSH:-ssh://git@git.libre.audio:2222/seasharp}"
echo "[info] WORKSPACE_DIR=${WORKSPACE_DIR}"
echo "[info] PYTHONPATH=${PYTHONPATH}"
echo "[1/3] Running pre-push verification gates (hs-archive-rotate, hs-closeups-sync, hs-readme-sync, version_sync, hs-doctor, logrotate.d/hyperstition-sqlite-meta check, periodic harvest CI/CD flow diagram PNG test, closeups check, test_core_suite, 6-gate graph verifier)..."
run_checked "hs-archive-rotate --enforce-single-compression" python3 -m hyperstitionstud_io.publishing.archive_rotator --workspace-root "${WORKSPACE_DIR}" --enforce-single-compression
run_checked "verify docs/archive/archive-manifest.json" test -s "${WORKSPACE_DIR}/encyclopedia-knowledge-graph/docs/archive/archive-manifest.json"
run_checked "verify docs/plans/inactive/inactive-archive-manifest.json" test -s "${WORKSPACE_DIR}/encyclopedia-knowledge-graph/docs/plans/inactive/inactive-archive-manifest.json"
run_checked "hs-closeups-sync" python3 -m hyperstitionstud_io.publishing.closeups_sync
run_checked "hs-readme-sync --install-hooks" python3 -m hyperstitionstud_io.publishing.readme_sync --install-hooks
run_checked "version_sync --check" python3 -m hyperstitionstud_io.version_sync --check
run_checked "version_sync --corpus-delta" python3 -m hyperstitionstud_io.version_sync --corpus-delta
run_checked "hs-doctor" python3 -m hyperstitionstud_io.ci.doctor
run_checked "verify deploy/logrotate.d/hyperstition-sqlite-meta" test -f "${WORKSPACE_DIR}/hyperstitionstudio-core/deploy/logrotate.d/hyperstition-sqlite-meta"
run_checked "verify site/assets/hs-matrix-coderain.js" test -s "${WORKSPACE_DIR}/hyperstitionstudio-core/site/assets/hs-matrix-coderain.js"
run_checked "verify site/assets/matrix-font.woff2" test -s "${WORKSPACE_DIR}/hyperstitionstudio-core/site/assets/matrix-font.woff2"
for q_png in \
"quadrant-1-cybermemetics-calc-graph.png" \
"quadrant-1-tab-2-graph.png" \
"quadrant-2-esoteric-finance-quant.png" \
"quadrant-2-tab-2-bayesian-fred.png" \
"quadrant-2-tab-3-leaderboard-card.png" \
"quadrant-3-info-science-novice-learn-polyglot.png" \
"quadrant-3-tab-2-math-guile.png" \
"quadrant-3-tab-3-math-ts-rust.png" \
"quadrant-4-operators-deployment-vps.png" \
"quadrant-4-tab-2-mcp-etag.png" \
"quadrant-4-tab-3-ci-gates.png"; do
run_checked "verify site/assets/closeups/${q_png}" test -s "${WORKSPACE_DIR}/hyperstitionstudio-core/site/assets/closeups/${q_png}"
done
run_checked "generate & verify periodic-harvest-cicd-to-vps-flow-diagram.png" python3 -m hyperstitionstud_io.publishing.flow_diagram
run_checked "verify periodic-harvest-cicd-to-vps-flow-diagram.png exists" test -s "${WORKSPACE_DIR}/encyclopedia-knowledge-graph/docs/periodic-harvest-cicd-to-vps-flow-diagram.png"
run_checked "verify Fedora 41 packaging scripts & spec" "${WORKSPACE_DIR}/ingglish-hyperdope-gematria/packaging/build-fedora41-rpm.sh"
run_checked "verify Fedora 41 exegesis push worker dry-run" "${WORKSPACE_DIR}/ingglish-hyperdope-gematria/packaging/bundle/scripts/run_exegesis_and_push_fedora41.sh" --dry-run
python3 "${WORKSPACE_DIR}/hyperstitionstudio-core/tests/test_core_suite.py"
run_checked "build_encyclopedia_knowledge_graph.py --verify-only" python3 "${WORKSPACE_DIR}/encyclopedia-knowledge-graph/scripts/build_encyclopedia_knowledge_graph.py" --verify-only
echo "[2/3] Verifying git.libre.audio remote URLs across all repositories..."
for pair in \
"hyperstitionstudio-core:hyperstitionstudio-core.git" \
"ingglish-hyperdope-gematria:ingglish-hyperdope-gematria.git" \
"technocapital-singularity-zoology:technocapital-singularity-zoology.git" \
"encyclopedia-knowledge-graph:encyclopedia-knowledge-graph.git" \
"hyperdope-ci-build:ingglish-hyperdope-ci.git"; do
rdir="${WORKSPACE_DIR}/${pair%%:*}"
rslug="${pair##*:}"
ensure_remote_url "${rdir}" origin "${FORGE_SSH}/${rslug}"
done
push_head_tag() {
local repo_dir="$1"
local remote_name="$2"
local head_tag=""
head_tag="$(git -C "${repo_dir}" tag --points-at HEAD | sort -V | tail -n 1)"
if [[ -n "${head_tag}" ]]; then
run_checked "git push tag ${head_tag} (${repo_dir})" git -C "${repo_dir}" push --force "${remote_name}" "refs/tags/${head_tag}"
fi
}
echo "[3/3] Rebasing any automated VPS telemetry commits & pushing all 6 repositories and HEAD release tags in topological dependency order to ${FORGE_SSH}..."
echo " -> (1/6) hyperstitionstudio-core (main + HEAD tag)"
git -C "${WORKSPACE_DIR}/hyperstitionstudio-core" pull --rebase --autostash origin main || true
git -C "${WORKSPACE_DIR}/hyperstitionstudio-core" push -u origin main
push_head_tag "${WORKSPACE_DIR}/hyperstitionstudio-core" origin
echo " -> (2/6) ingglish-hyperdope-gematria (main + HEAD tag)"
git -C "${WORKSPACE_DIR}/ingglish-hyperdope-gematria" pull --rebase --autostash origin main || true
git -C "${WORKSPACE_DIR}/ingglish-hyperdope-gematria" push -u origin main
push_head_tag "${WORKSPACE_DIR}/ingglish-hyperdope-gematria" origin
echo " -> (3/6) technocapital-singularity-zoology (main + HEAD tag)"
git -C "${WORKSPACE_DIR}/technocapital-singularity-zoology" pull --rebase --autostash origin main || true
git -C "${WORKSPACE_DIR}/technocapital-singularity-zoology" push -u origin main
push_head_tag "${WORKSPACE_DIR}/technocapital-singularity-zoology" origin
echo " -> (4/6) encyclopedia-knowledge-graph (main + HEAD tag)"
git -C "${WORKSPACE_DIR}/encyclopedia-knowledge-graph" pull --rebase --autostash origin main || true
git -C "${WORKSPACE_DIR}/encyclopedia-knowledge-graph" push -u origin main
push_head_tag "${WORKSPACE_DIR}/encyclopedia-knowledge-graph" origin
echo " -> (5/6) hyperdope-ci-build (feat/ingglish-aq-corpus + HEAD tag)"
git -C "${WORKSPACE_DIR}/hyperdope-ci-build" pull --rebase --autostash origin feat/ingglish-aq-corpus || true
git -C "${WORKSPACE_DIR}/hyperdope-ci-build" push -u origin feat/ingglish-aq-corpus
push_head_tag "${WORKSPACE_DIR}/hyperdope-ci-build" origin
if [[ -d "${WORKSPACE_DIR}/haiperdohp-jemaytreeah/.git" ]]; then
echo " -> (6/6) haiperdohp-jemaytreeah (downstream main, feat/ingglish-aq-corpus, feat/ingglish-priority-toggle + HEAD tag)"
ensure_remote_url "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" downstream "${FORGE_SSH}/haiperdohp-jemaytreeah.git"
git -C "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" push downstream main feat/ingglish-aq-corpus feat/ingglish-priority-toggle
push_head_tag "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" downstream
fi
echo "[OK] All 6 repositories and release tags pushed to ${FORGE_SSH}."
+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
+101 -11
View File
@@ -1,5 +1,6 @@
#!/usr/bin/env bash
# /workspace/hyperstitionstudio-core/deploy/sync-vps-repos.sh
# Release v2.15.0: Self-re-executing tmpfs VPS hydration & service sync.
# Hydrates per-repository install directories from REPOS_ROOT into LIVE_REPOS (tmpfs RAM mount),
# supplies untracked haiperdohp-jemaytreeah/.gitignore files (config.js, db.json, db_lite.json),
# creates top-level route symlinks, pre-compresses (.br / .gz) static assets, and idempotently
@@ -49,6 +50,14 @@ DO_CADDY=1
for arg in "$@"; do
case "${arg}" in
--repos-root=*)
REPOS_ROOT="${arg#*=}"
export REPOS_ROOT
;;
--live-repos=*)
LIVE_REPOS="${arg#*=}"
export LIVE_REPOS
;;
--no-pull)
DO_PULL=0
;;
@@ -105,6 +114,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 +142,24 @@ 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 "hs-deploy-scripts-sync --check" "${PYTHON_BIN}" -m hyperstitionstud_io.ci.deploy_scripts_sync --workspace-root "${REPOS_ROOT}" --check
run_checked "hs-closeups-sync --check" "${PYTHON_BIN}" -m hyperstitionstud_io.publishing.closeups_sync --check
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
@@ -151,7 +178,17 @@ for entry in "${REPOS[@]}"; do
fi
if [[ -d "${REPOS_ROOT}/${repo}" ]]; then
${LIVE_SUDO} mkdir -p "${LIVE_REPOS}/${repo}"
run_checked "rsync ${repo}" ${LIVE_SUDO} rsync -a --delete --exclude='.git' "${REPOS_ROOT}/${repo}/" "${LIVE_REPOS}/${repo}/"
run_checked "rsync ${repo}" ${LIVE_SUDO} rsync -a --delete \
--filter='P *.gz' \
--filter='P *.br' \
--filter='P site/quant/audio/***' \
--exclude='.git' \
--exclude='completed-plans-archive.tar.gz' \
--exclude='inactive-plans-archive.tar.gz' \
"${REPOS_ROOT}/${repo}/" "${LIVE_REPOS}/${repo}/"
${LIVE_SUDO} rm -f \
"${LIVE_REPOS}/${repo}/docs/archive/completed-plans-archive.tar.gz" \
"${LIVE_REPOS}/${repo}/docs/plans/inactive/inactive-plans-archive.tar.gz"
fi
done
@@ -165,6 +202,22 @@ ${LIVE_SUDO} ln -sfn "hyperstitionstudio-core/site/assets" "${LIVE_REPOS}/assets
${LIVE_SUDO} ln -sfn "hyperstitionstudio-core/site/learn" "${LIVE_REPOS}/learn"
${LIVE_SUDO} ln -sfn "hyperstitionstudio-core/site/quant" "${LIVE_REPOS}/quant"
${LIVE_SUDO} ln -sfn "hyperstitionstudio-core/site/donate" "${LIVE_REPOS}/donate"
echo "[3b/5] Generating untracked deploy-time /quant/audio/*.wav spoken voice tracks (Strategies 1A & 2A: flite kal16 + background slt upgrade, 0 audio files in Git)..."
if [[ -z "$(type -P flite || true)" ]] || [[ -z "$(type -P espeak-ng || true)" ]]; then
if [[ "${DO_CADDY}" -eq 1 ]]; then
if [[ -n "$(type -P dnf || true)" ]]; then
echo " -> Installing flite & espeak-ng via dnf for natural spoken English tour narration..."
${SUDO} dnf install -y -q flite espeak-ng || true
elif [[ -n "$(type -P apt-get || true)" ]]; then
echo " -> Installing flite & espeak-ng via apt-get for natural spoken English tour narration..."
${SUDO} env DEBIAN_FRONTEND=noninteractive apt-get install -y -qq flite espeak-ng || true
fi
fi
fi
run_checked "hs-quant-voice-build" ${LIVE_SUDO} env PYTHONPATH="${REPOS_ROOT}/hyperstitionstudio-core/src" "${PYTHON_BIN}" -m hyperstitionstud_io.publishing.quant_voice \
--workspace-root "${REPOS_ROOT}" \
--out-dir "${LIVE_REPOS}/hyperstitionstudio-core/site/quant/audio" \
--upgrade-slt-background
if [[ -d "${LIVE_REPOS}/hyperstitionstudio-core/site/engineering" ]]; then
${LIVE_SUDO} ln -sfn "hyperstitionstudio-core/site/engineering" "${LIVE_REPOS}/engineering"
fi
@@ -181,15 +234,46 @@ ${LIVE_SUDO} ln -sfn "haiperdohp-jemaytreeah" "${LIVE_REPOS}/calc"
${LIVE_SUDO} ln -sfn "ingglish-hyperdope-ci" "${LIVE_REPOS}/ci"
${LIVE_SUDO} ln -sfn "hyperstitionstudio-core/schemas" "${LIVE_REPOS}/schemas"
echo "[4/5] Pre-compressing static HTML, JS, JSON, XML, Canvas, MD & CSS assets (< 5 MB) (.br / .gz)..."
run_checked "gzip pre-compression" ${LIVE_SUDO} find "${LIVE_REPOS}" -type f -size -5M \
\( -name "*.html" -o -name "*.js" -o -name "*.json" -o -name "*.graphml" -o -name "*.gexf" -o -name "*.canvas" -o -name "*.css" -o -name "*.md" \) \
-exec gzip -9 -k -f {} \;
if [[ -n "$(type -P brotli || true)" ]]; then
run_checked "brotli pre-compression" ${LIVE_SUDO} find "${LIVE_REPOS}" -type f -size -5M \
\( -name "*.html" -o -name "*.js" -o -name "*.json" -o -name "*.graphml" -o -name "*.gexf" -o -name "*.canvas" -o -name "*.css" -o -name "*.md" \) \
-exec brotli -q 11 -k -f {} \;
echo "[4/5] Pre-compressing static HTML, JS, JSON, XML, Canvas, MD & CSS assets (< 5 MB) (.br / .gz) incrementally in parallel & enforcing single-layer (1x) compression..."
run_checked "cleanup multi-compressed and orphaned sidecars" ${LIVE_SUDO} bash -c '
find "$1" -type f \( -name "*.gz.gz" -o -name "*.gz.br" -o -name "*.br.gz" -o -name "*.br.br" -o -name "*.tgz.gz" -o -name "*.tgz.br" \) -delete
while IFS= read -r -d "" sc; do
base="${sc%.*}"
if [[ ! -f "${base}" ]]; then
rm -f "${sc}"
fi
done < <(find "$1" -type f \( -name "*.html.gz" -o -name "*.html.br" -o -name "*.js.gz" -o -name "*.js.br" -o -name "*.json.gz" -o -name "*.json.br" -o -name "*.graphml.gz" -o -name "*.graphml.br" -o -name "*.gexf.gz" -o -name "*.gexf.br" -o -name "*.canvas.gz" -o -name "*.canvas.br" -o -name "*.css.gz" -o -name "*.css.br" -o -name "*.md.gz" -o -name "*.md.br" \) -print0)
' _ "${LIVE_REPOS}"
JOBS="$(nproc 2>&1 || echo 4)"
if [[ ! "${JOBS}" =~ ^[0-9]+$ ]] || [[ "${JOBS}" -lt 1 ]]; then
JOBS=4
fi
run_checked "incremental parallel gzip pre-compression" ${LIVE_SUDO} bash -c '
live="$1"
jobs="$2"
while IFS= read -r -d "" f; do
if [[ ! -f "${f}.gz" || "${f}" -nt "${f}.gz" ]]; then
printf "%s\0" "${f}"
fi
done < <(find "${live}" -type f -size -5M \( -name "*.html" -o -name "*.js" -o -name "*.json" -o -name "*.graphml" -o -name "*.gexf" -o -name "*.canvas" -o -name "*.css" -o -name "*.md" \) -print0) \
| xargs -0 -r -P "${jobs}" -n 16 gzip -9 -k -f
' _ "${LIVE_REPOS}" "${JOBS}"
if [[ -n "$(type -P brotli || true)" ]]; then
run_checked "incremental parallel brotli pre-compression" ${LIVE_SUDO} bash -c '
live="$1"
jobs="$2"
while IFS= read -r -d "" f; do
if [[ ! -f "${f}.br" || "${f}" -nt "${f}.br" ]]; then
printf "%s\0" "${f}"
fi
done < <(find "${live}" -type f -size -5M \( -name "*.html" -o -name "*.js" -o -name "*.json" -o -name "*.graphml" -o -name "*.gexf" -o -name "*.canvas" -o -name "*.css" -o -name "*.md" \) -print0) \
| xargs -0 -r -P "${jobs}" -n 16 brotli -q 11 -k -f
' _ "${LIVE_REPOS}" "${JOBS}"
fi
run_checked "hs-archive-rotate --enforce-single-compression" "${PYTHON_BIN}" -m hyperstitionstud_io.publishing.archive_rotator \
--workspace-root "${REPOS_ROOT}" \
--enforce-single-compression \
--extra-scan-dir "${LIVE_REPOS}"
# Step 5: Idempotent systemd unit, logrotate.d & /etc/caddy/Caddyfile synchronization (enabled by default; skip with --no-caddy)
if [[ "${DO_CADDY}" -eq 1 ]]; then
@@ -197,6 +281,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
+23 -3
View File
@@ -54,12 +54,28 @@ 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-1-tab-2-graph.png"
"/assets/closeups/quadrant-2-esoteric-finance-quant.png"
"/assets/closeups/quadrant-2-tab-2-bayesian-fred.png"
"/assets/closeups/quadrant-2-tab-3-leaderboard-card.png"
"/assets/closeups/quadrant-3-info-science-novice-learn-polyglot.png"
"/assets/closeups/quadrant-3-tab-2-math-guile.png"
"/assets/closeups/quadrant-3-tab-3-math-ts-rust.png"
"/assets/closeups/quadrant-4-operators-deployment-vps.png"
"/assets/closeups/quadrant-4-tab-2-mcp-etag.png"
"/assets/closeups/quadrant-4-tab-3-ci-gates.png"
"/donate/index.html"
"/learn/index.html"
"/learn/learn-app.js"
"/quant/index.html"
"/quant/quant-app.js"
"/quant/quant-tutorials.js"
"/quant/audio/voice-manifest.json"
"/quant/audio/ep01-s1.wav"
"/quant/audio/ep04-s1.wav"
"/quant/quant-timeseries-data.js"
"/quant/quant-timeseries.json"
"/quant/real-market-history.json"
@@ -76,9 +92,13 @@ ROUTES=(
"/graph/docs/periodic-harvest-cicd-to-vps-flow-diagram.png"
"/graph/docs/VPS-AND-GIT-OPERATOR-DEPLOYMENT-GUIDE.pdf"
"/graph/docs/OPERATORS-MANUAL-LLM-TOKEN-DEPENDENT-DATA-PIPELINES.pdf"
"/graph/docs/PLAN-LEXICAL-AND-ETYMOLOGICAL-SIMPLIFICATION.pdf"
"/graph/docs/PLAN-LLM-TOKEN-ECONOMIZER-AND-VARIANCE-ROUTING.pdf"
"/graph/docs/PLAN-LLM-TOKEN-ECONOMIZER-DATA-FIDELITY-AND-DEGRADATION-RISK-EVALUATION.pdf"
"/graph/docs/archive/archive-manifest.json"
"/graph/docs/plans/inactive/inactive-archive-manifest.json"
"/graph/docs/plans/inactive/PLAN-PIECEWISE-COMPLETE-SOFTWARE-ENGINEERING-EXPLICATION.pdf"
"/graph/docs/plans/inactive/PLAN-PIECEWISE-COMPLETE-MATHEMATICS-AND-INFO-SCIENCE-EXPLICATION.pdf"
"/graph/docs/plans/inactive/PLAN-LEXICAL-AND-ETYMOLOGICAL-SIMPLIFICATION.pdf"
"/graph/docs/plans/inactive/PLAN-LLM-TOKEN-ECONOMIZER-AND-VARIANCE-ROUTING.pdf"
"/graph/docs/plans/inactive/PLAN-LLM-TOKEN-ECONOMIZER-DATA-FIDELITY-AND-DEGRADATION-RISK-EVALUATION.pdf"
"/encyclopedia/00-index-and-ontological-atlas/00-master-encyclopedia-index-a-to-z.pdf"
"/technocapital-singularity-zoology/encyclopedia/00-index-and-ontological-atlas/00-master-encyclopedia-index-a-to-z.pdf"
"/zoology/encyclopedia-of-technocapital-singularity-zoology-overview-and-manifest.pdf"
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hyperstitionstud.io/workspace-core",
"version": "2.4.0",
"version": "2.15.0",
"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.4.0",
"version": "2.15.0",
"type": "module",
"main": "index.js",
"license": "MIT"
+5 -1
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "hyperstitionstudio-core"
version = "2.4.0"
version = "2.15.0"
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"
@@ -39,6 +39,10 @@ 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"
hs-closeups-sync = "hyperstitionstud_io.publishing.closeups_sync:main"
hs-quant-voice-build = "hyperstitionstud_io.publishing.quant_voice:main"
hs-deploy-scripts-sync = "hyperstitionstud_io.ci.deploy_scripts_sync:main"
[tool.setuptools.packages.find]
where = ["src"]
+2 -2
View File
@@ -144,8 +144,8 @@ def main() -> int:
})
manifest = {
"version": "2.4.0",
"namespace_urn": "urn:io:hyperstitionstud:gallery:2.4.0",
"version": "2.15.0",
"namespace_urn": "urn:io:hyperstitionstud:gallery:2.15.0",
"total_items": len(items),
"items": items,
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

@@ -0,0 +1,795 @@
{
"$id": "urn:io:hyperstitionstud:closeups-ui-manifest",
"ui_elements_fingerprint_sha256": "4b0e2539f72562a0cda20c3094f6c02a7e3e86f728073d9a83634b74c26f2f7b",
"closeup_images": [
"quadrant-1-cybermemetics-calc-graph.png",
"quadrant-1-tab-2-graph.png",
"quadrant-2-esoteric-finance-quant.png",
"quadrant-2-tab-2-bayesian-fred.png",
"quadrant-2-tab-3-leaderboard-card.png",
"quadrant-3-info-science-novice-learn-polyglot.png",
"quadrant-3-tab-2-math-guile.png",
"quadrant-3-tab-3-math-ts-rust.png",
"quadrant-4-operators-deployment-vps.png",
"quadrant-4-tab-2-mcp-etag.png",
"quadrant-4-tab-3-ci-gates.png"
],
"live_metrics": {
"calc_db_entries": 231061,
"quant_total_real_bars": 472,
"quant_bayesian_posteriors": {
"R1_BULL_RISK_ON": 0.0,
"R2_PINNED_ISOMETRIC": 0.0,
"R3_TAIL_DRAWDOWN_RISK_OFF": 1.0
},
"engineering_counts": {
"repositories": 6,
"cli_entrypoints": 20,
"mcp_tools": 20,
"rest_domain_aliases": 12,
"enabled_lenses": 6,
"watchlist_instruments": 24,
"fred_macro_series": 14,
"json_schemas_v1": 12
},
"cli_scripts_sample": {
"hs-archive-rotate": "hyperstitionstud_io.publishing.archive_rotator:main",
"hs-citations": "hyperstitionstud_io.ci.citation_sources:main",
"hs-closeups-sync": "hyperstitionstud_io.publishing.closeups_sync:main",
"hs-daily-brief": "hyperstitionstud_io.quant.daily_brief:main"
},
"ci_keep_rate_pct": 100.0
},
"surfaces": {
"home": {
"ui_structure_sha256": "c087dc9ebf511dea01da971b92b39c8c017dd661721794e660cd8b24b9f1bcd4",
"id_count": 0,
"button_count": 11,
"option_count": 0,
"input_count": 0,
"heading_count": 1,
"ids": [],
"inputs": [],
"sample_buttons": [
"01 &#x263F; /calc/ Cipher Matrix",
"02 &#x260D; /graph/ ETI Radar",
"=3 Inspector\"\n data-closeup-href=\"/quant/index.html?screen=dose-d3\"\n data-closeup-route=\"quant-dose\"\n data-closeup-label=\"ACTIVE TAB: /quant/?screen=dose-d3 • 472 Bars (19d)\"\n data-closeup-cta=\"Launch Dose D≥3 →\">01 &Delta; Trajectory &amp; Dose",
"02 &#x260D; Bayesian &amp; FRED",
"03 &#x2644; 6-Lens &amp; Card",
"01 &#x25C8; /learn/ Prereq Track",
"02 &lambda; Guile &amp; Z-REPL",
"03 &equiv; TypeScript &amp; Rust",
"01 &#x269A; DevOps &amp; CLIs",
"02 &#x269B; MCP &amp; ETag 304",
"03 &#x25C8; /ci/ 4-Gate Pipeline"
],
"sample_options": [],
"sample_headings": [
"HYPERSTITIONSTUD.IO // SINGULARITY ZOOLOGY WORKBENCH"
]
},
"quant": {
"ui_structure_sha256": "6a8617125aa3a61d26a55c87cb39c0be18aff4fcf79e62e6d4700c49389283e6",
"id_count": 67,
"button_count": 21,
"option_count": 0,
"input_count": 2,
"heading_count": 1,
"ids": [
"activeDateBadge",
"dailyBriefContainer",
"dailyBriefMeta",
"dailyBriefPanel",
"dateMetricsGrid",
"docReferencesCard",
"entity_threshold",
"exportCsvBtn",
"exportJsonBtn",
"guildFilterPills",
"guild_filter",
"heatmapPaginationBar",
"heatmapTable",
"heatmap_matrix",
"lagBarsContainer",
"lag_correlation_explorer",
"lensProjectionCard",
"lensSelect",
"macroIndicatorsGrid",
"macroIndicatorsPanel",
"metricModePills",
"metric_mode",
"navCalc",
"navDonate",
"navEng",
"navGraph",
"navHome",
"navLearn",
"navManual",
"navMath",
"nextDateBtn",
"openTradingViewBtn",
"panel1Meta",
"panel1Title",
"panel3Title",
"panel3TvBtn",
"passagePreviewBox",
"periodicityAuditFooter",
"prevDateBtn",
"projection_lens",
"quantInfoPopover",
"quantTutorialBar",
"scope1_self_lock",
"scope2_ring_migration",
"scope3_wire_copresence",
"tickerQuickFilter",
"tickerSelect",
"ticker_select",
"timeWindowPills",
"tsCanvas",
"tutCitationPills",
"tutClearSpotlightBtn",
"tutEpisodeTabs",
"tutKeyframeTitle",
"tutNextBtn",
"tutPlayPauseBtn",
"tutPrevBtn",
"tutScrubber",
"tutSpeechBtn",
"tutStepBadge",
"tutSubtitleText",
"tutUiElementIndicator",
"vol20d_regimes",
"wireEqTape",
"wireTapeFilterInput",
"wireTapeHeader",
"wire_velocity_bars"
],
"inputs": [
"Filter symbol, entity, or AQ...",
"Filter wire equations or AQ..."
],
"sample_buttons": [
"&#x25B6; Play Guided Tour",
"&#x23EE; Prev Scene",
"Next Scene &#x23ED;",
"&#x1F50A; Voice: ON",
"Clear Spotlight",
"i",
"i",
"i",
"i",
"&larr; Prev Day",
"Next Day &rarr;",
"i"
],
"sample_options": [],
"sample_headings": [
"hyperstitionstud.io/quant — Quantitative Finance &amp; Memetic Gematria Time-Series Workbench"
]
},
"learn": {
"ui_structure_sha256": "e268fa263952e761a2d79b45a8881691495831178886770566532c30c2100316",
"id_count": 48,
"button_count": 11,
"option_count": 29,
"input_count": 2,
"heading_count": 7,
"ids": [
"bookmarkPaginationBar",
"bookmarkedCoordsList",
"btnAddBookmark",
"btnDownloadState",
"btnLoadDemoState",
"btnResetState",
"btnUploadState",
"card-M01",
"card-M02",
"card-M03",
"card-M04",
"card-M05",
"card-M06",
"chk-M01",
"chk-M02",
"chk-M03",
"chk-M04",
"chk-M05",
"chk-M06",
"filterBookmarkInput",
"importModeSelect",
"inputBookmarkCoord",
"inputUploadState",
"m01InputA",
"m01InputB",
"m01Output",
"m02Output",
"m02WordSelect",
"m03ModeSelect",
"m03Output",
"m03TriadSelect",
"m04HeadlineSelect",
"m04Output",
"m05BuildSelect",
"m05Output",
"m06Output",
"m06RegisterSelect",
"note-M01",
"note-M02",
"note-M03",
"note-M04",
"note-M05",
"note-M06",
"progressFill",
"progressText",
"stateCidBadge",
"statePortabilityBar",
"stateStatusMsg"
],
"inputs": [
"Add AQ # (e.g. 137)",
"Filter saved AQ #..."
],
"sample_buttons": [
"Download State (.json)",
"Upload State (.json)",
"&#x26A0; Load Simulated Demo State (Synthetic Example)",
"Reset Local State",
"Mark Module Complete",
"Mark Module Complete",
"Mark Module Complete",
"Mark Module Complete",
"Mark Module Complete",
"Mark Module Complete",
"+ Bookmark"
],
"sample_options": [
"Upload Mode: Replace State",
"Upload Mode: Merge State",
"capital &rarr; kapatal (Isometric Δ=0)",
"charter &rarr; charter (Isometric Δ=0)",
"ASML &rarr; asml (Isometric Δ=0)",
"TSMC &rarr; tsmc (Isometric Δ=0)",
"GPU &rarr; gpu (Isometric Δ=0)",
"knight &rarr; nait (Ghost mass stripped)",
"Anthropic &rarr; anthropik (44th Prime Lock)",
"Blackwell &rarr; blakwel (S3 129 Lock)",
"Triad 292: schizoanalysis / abstract machine / synthetic data",
"Triad 256: acceleration / high-frequency / sovereign wealth"
],
"sample_headings": [
"SELF-PACED INTERACTIVE LEARNING TRACK // HYPERSTITIONSTUD.IO",
"1. What Is Base-36 Alphanumeric Qabbala (AQ)?",
"2. Sound Over Spelling: Gen 0 Written English vs. Gen 1 Phonemic Ingglish",
"3. What Is a \"Singularity\"? Vector G1 Variance Collapse (Var &rarr; 0.0)",
"4. Double Articulation (S1–S5 &times; S6) &amp; Two-Gate Memetic Activation (M1–M7+)",
"5. Reading the ETI Tier List &amp; Concentric Radar (S+ Center to D Periphery)",
"6. Practical Use Cases: Choosing Your Stakeholder Register &amp; Bookmarks"
]
},
"engineering_hub": {
"ui_structure_sha256": "12b0496d2f082fa2d29bf68c4b186f40be901f79a7be87fc435241ffa7123145",
"id_count": 14,
"button_count": 16,
"option_count": 16,
"input_count": 1,
"heading_count": 8,
"ids": [
"engCliFilterInput",
"engCliTable",
"guileSchemeModeState",
"guileSchemeModeToggle",
"hsGuilePreferFloat",
"hsGuileReplCloseBtn",
"hsGuileReplDrawer",
"hsGuileReplEvalBtn",
"hsGuileReplInput",
"hsGuileReplOutput",
"hsGuileReplPreset",
"hsGuileReplStepBtn",
"hsPolyglotModeSelector",
"hsPolyglotReplLang"
],
"inputs": [
"Filter CLI command or module..."
],
"sample_buttons": [
"OFF",
"&lambda;GUILE",
"TSTYPESCRIPT",
"RsRUST",
"&equiv; ALL 3",
"&lambda; Guile",
"TS TypeScript",
"Rs Rust",
"&equiv; All 3",
"Hide",
"REPL &rarr;",
"REPL &rarr;"
],
"sample_options": [
"λ Guile Scheme",
"TS TypeScript",
"Rs Rust",
"-- Load Preset Polyglot Expression (Guile / TS / Rust) --",
"[λ Guile] Base-36 AQ: (aq-base36 \"LEMUR\") => 114",
"[TS] Base-36 AQ: aqBase36(\"LEMUR\") => 114",
"[Rs Rust] Base-36 AQ: aq_base36(\"LEMUR\") => 114",
"[λ Guile] Prime Factors via Z: (prime-factors 666) => (2 3 3 37)",
"[TS] Prime Factors: primeFactors(666) => [2,3,3,37]",
"[Rs Rust] Prime Factors: prime_factors(666_u64) => vec![2, 3, 3, 37]",
"[λ Guile] Exact Rational Variance (Cluster 292): 4634/9",
"[TS] Cluster 292 Variance: 514.8889"
],
"sample_headings": [
"HYPERSTITION STUDIO // SOFTWARE ENGINEERING EXPLICATION HUB (UNIT E0)",
"Unit E1: Base-36 AQ Ciphers, Offline CMUdict Phonetics & Bidirectional Lock Evaluation",
"Unit E2: 6-Gate 388-Node Knowledge Graph Compiler, ReadOnlyIsolationGuard & Quiescent SQLite + FTS5 Engine",
"Unit E3: Zero-Synthetic-Data Quant Engine, 14-Point Bidirectional Census, Dose 0..3+, FRED Macro & Bayesian Brief",
"Unit E4: Stateless MCP Server (:8095), Chatbot OpenAPI 3.1.0 REST Adapter, .png+.json Cards & IPLD CIDv1",
"Unit E5: Topological Git Push, Self-Re-Executing tmpfs VPS Hydration, Dark-Mode hs-pdf-build & hs-public-smoke",
"End-to-End Periodic Data Harvest &rarr; CI/CD &rarr; Deployed VPS Infrastructure Flow Diagram",
"Live Introspected CLI Entrypoints (pyproject.toml [project.scripts])"
]
},
"engineering_e4": {
"ui_structure_sha256": "4521e10d2e556ada980e8ba3bde5bb0748fa5ef72f15b69a1030ce07cd28904d",
"id_count": 15,
"button_count": 17,
"option_count": 16,
"input_count": 0,
"heading_count": 4,
"ids": [
"guileSchemeModeState",
"guileSchemeModeToggle",
"hsGuilePreferFloat",
"hsGuileReplCloseBtn",
"hsGuileReplDrawer",
"hsGuileReplEvalBtn",
"hsGuileReplInput",
"hsGuileReplOutput",
"hsGuileReplPreset",
"hsGuileReplStepBtn",
"hsPolyglotModeSelector",
"hsPolyglotReplLang",
"live-smoke-probe",
"liveEtagProbeOutput",
"runLiveEtagProbeBtn"
],
"inputs": [],
"sample_buttons": [
"OFF",
"&lambda;GUILE",
"TSTYPESCRIPT",
"RsRUST",
"&equiv; ALL 3",
"&lambda; Guile",
"TS TypeScript",
"Rs Rust",
"&equiv; All 3",
"Hide",
"REPL &rarr;",
"REPL &rarr;"
],
"sample_options": [
"λ Guile Scheme",
"TS TypeScript",
"Rs Rust",
"-- Load Preset Polyglot Expression (Guile / TS / Rust) --",
"[λ Guile] Base-36 AQ: (aq-base36 \"LEMUR\") => 114",
"[TS] Base-36 AQ: aqBase36(\"LEMUR\") => 114",
"[Rs Rust] Base-36 AQ: aq_base36(\"LEMUR\") => 114",
"[λ Guile] Prime Factors via Z: (prime-factors 666) => (2 3 3 37)",
"[TS] Prime Factors: primeFactors(666) => [2,3,3,37]",
"[Rs Rust] Prime Factors: prime_factors(666_u64) => vec![2, 3, 3, 37]",
"[λ Guile] Exact Rational Variance (Cluster 292): 4634/9",
"[TS] Cluster 292 Variance: 514.8889"
],
"sample_headings": [
"Unit E4: Stateless MCP Server (:8095), Chatbot OpenAPI 3.1.0 REST Adapter, .png+.json Cards & IPLD CIDv1",
"1. Unified Stateless MCP (/mcp) & Chatbot OpenAPI 3.1.0 REST Adapter (/api/v1/*)",
"2. One-Shot .png + .json Ticker Stats Cards (quant/cards.py) & Canonical IPLD dag-json (0x0129)",
"&#x269B; Live API &amp; IPLD CIDv1 ETag 304 Conditional Cache Probe (#live-smoke-probe)"
]
},
"math_hub": {
"ui_structure_sha256": "9ce686c475325b7c3eef2abada48a3aac3cfa30bec087adb46b5226ff9a39cb6",
"id_count": 12,
"button_count": 16,
"option_count": 16,
"input_count": 0,
"heading_count": 6,
"ids": [
"guileSchemeModeState",
"guileSchemeModeToggle",
"hsGuilePreferFloat",
"hsGuileReplCloseBtn",
"hsGuileReplDrawer",
"hsGuileReplEvalBtn",
"hsGuileReplInput",
"hsGuileReplOutput",
"hsGuileReplPreset",
"hsGuileReplStepBtn",
"hsPolyglotModeSelector",
"hsPolyglotReplLang"
],
"inputs": [],
"sample_buttons": [
"OFF",
"&lambda;GUILE",
"TSTYPESCRIPT",
"RsRUST",
"&equiv; ALL 3",
"&lambda; Guile",
"TS TypeScript",
"Rs Rust",
"&equiv; All 3",
"Hide",
"REPL &rarr;",
"REPL &rarr;"
],
"sample_options": [
"λ Guile Scheme",
"TS TypeScript",
"Rs Rust",
"-- Load Preset Polyglot Expression (Guile / TS / Rust) --",
"[λ Guile] Base-36 AQ: (aq-base36 \"LEMUR\") => 114",
"[TS] Base-36 AQ: aqBase36(\"LEMUR\") => 114",
"[Rs Rust] Base-36 AQ: aq_base36(\"LEMUR\") => 114",
"[λ Guile] Prime Factors via Z: (prime-factors 666) => (2 3 3 37)",
"[TS] Prime Factors: primeFactors(666) => [2,3,3,37]",
"[Rs Rust] Prime Factors: prime_factors(666_u64) => vec![2, 3, 3, 37]",
"[λ Guile] Exact Rational Variance (Cluster 292): 4634/9",
"[TS] Cluster 292 Variance: 514.8889"
],
"sample_headings": [
"HYPERSTITION STUDIO // MATHEMATICAL FOUNDATIONS &amp; QUANTITATIVE SEMIOTICS HUB (UNIT M0)",
"Unit M1: Base-36 Alphanumeric Valuation, Repdigit 37×3k Attractors & Prime Index π(n)",
"Unit M2: Phonemic Projection Φ: Σ_eng* → Σ_ing* & Genealogical Vectors G1–G6",
"Unit M3: Multi-Relational Property Graph Topology G=(V,E,R), Convex ETI Functional & LENS_REGISTRY",
"Unit M4: Longitudinal Moments (ts_*), Lead-Lag r(τ), Order Statistics (P50, P90) & Confluence Dose D ∈ {0..4}",
"Unit M5: Macroeconomic Spread/Velocity Identities, Discrete 3-State Bayes' Rule & Multiple-Testing Bounds"
]
},
"math_m1": {
"ui_structure_sha256": "3141f7e0e3e816edc7f2c49e813ca76637fa85768c57a8aa291348e7f6231736",
"id_count": 12,
"button_count": 16,
"option_count": 16,
"input_count": 0,
"heading_count": 3,
"ids": [
"guileSchemeModeState",
"guileSchemeModeToggle",
"hsGuilePreferFloat",
"hsGuileReplCloseBtn",
"hsGuileReplDrawer",
"hsGuileReplEvalBtn",
"hsGuileReplInput",
"hsGuileReplOutput",
"hsGuileReplPreset",
"hsGuileReplStepBtn",
"hsPolyglotModeSelector",
"hsPolyglotReplLang"
],
"inputs": [],
"sample_buttons": [
"OFF",
"&lambda;GUILE",
"TSTYPESCRIPT",
"RsRUST",
"&equiv; ALL 3",
"&lambda; Guile",
"TS TypeScript",
"Rs Rust",
"&equiv; All 3",
"Hide",
"REPL &rarr;",
"REPL &rarr;"
],
"sample_options": [
"λ Guile Scheme",
"TS TypeScript",
"Rs Rust",
"-- Load Preset Polyglot Expression (Guile / TS / Rust) --",
"[λ Guile] Base-36 AQ: (aq-base36 \"LEMUR\") => 114",
"[TS] Base-36 AQ: aqBase36(\"LEMUR\") => 114",
"[Rs Rust] Base-36 AQ: aq_base36(\"LEMUR\") => 114",
"[λ Guile] Prime Factors via Z: (prime-factors 666) => (2 3 3 37)",
"[TS] Prime Factors: primeFactors(666) => [2,3,3,37]",
"[Rs Rust] Prime Factors: prime_factors(666_u64) => vec![2, 3, 3, 37]",
"[λ Guile] Exact Rational Variance (Cluster 292): 4634/9",
"[TS] Cluster 292 Variance: 514.8889"
],
"sample_headings": [
"Unit M1: Base-36 Alphanumeric Valuation, Repdigit 37×3k Attractors & Prime Index π(n)",
"1. The Base-36 Alphanumeric Homomorphism v: {0..9, A..Z} → {0..35}",
"2. Repdigit 37 × 3k Attractors & Prime Index π(n)"
]
},
"graph": {
"ui_structure_sha256": "771d70e8e41e4f466d29b04274b3403753f82c7a8e8680ba5c8a732b2b00fd29",
"id_count": 16,
"button_count": 6,
"option_count": 11,
"input_count": 1,
"heading_count": 5,
"ids": [
"edgeRelToggles",
"exportPngBtn",
"flagFilter",
"flexPills",
"graphCanvas",
"hudStats",
"inspBadges",
"inspBody",
"inspTitle",
"inspectorDrawer",
"isolationBox",
"minDegreeFilter",
"nbrList",
"nodeTypeToggles",
"resetViewBtn",
"searchInput"
],
"inputs": [
"Search headword, Ingglish, or AQ (e.g. 125)..."
],
"sample_buttons": [
"Mode 2: ETI Radar (S+ -> D Periphery)",
"Mode 1: Trophic Food-Web",
"Mode 3: Gen 0 -> Gen 1 Funnel",
"Mode 4: 00–08 Folder Grid",
"Reset View",
"Export PNG"
],
"sample_options": [
"Filter: All Nodes",
"G4 Isometric Fixed Points (Δ=0)",
"G5 Twin-Prime Mutations",
"G3 Quantized Steps",
"13 Multi-Build Flex Pivots",
"CCRU 9-Sum Numogram Syzygies (1::8, 2::7, 3::6, 4::5)",
"M7_candidate_2026_11_28",
"Degree: All Nodes",
"Min Degree &ge; 3",
"Min Degree &ge; 10",
"Min Degree &ge; 25 (Hubs)"
],
"sample_headings": [
"ENCYCLOPEDIA OF TECHNOCAPITAL SINGULARITY ZOOLOGY — INTERACTIVE KNOWLEDGE GRAPH",
"Node Ontology (6 Classes)",
"Edge Relations (8 Types)",
"13 Flex Pivots &amp; Repdigit Hubs",
"Glossary Isolation Status"
]
},
"calc": {
"ui_structure_sha256": "136ee82ed41030c6f2612538dc62746d080acb8d5380164e7d09075757f18125",
"id_count": 35,
"button_count": 0,
"option_count": 0,
"input_count": 1,
"heading_count": 1,
"ids": [
"BreakdownDetails",
"BreakdownSpot",
"ChartSpot",
"ChartSpotScroll",
"HistoryTableArea",
"autoMatchBtn",
"calcLogo",
"calcMain",
"calcNavDonate",
"calcNavEng",
"calcNavGraph",
"calcNavHome",
"calcNavLearn",
"calcNavMath",
"calcNavQuant",
"calcNavSelf",
"calcOptionsPanel",
"canv",
"clearFilterButton",
"colorControlsMenuArea",
"dateCalcMenuArea",
"dbLoadIndicator",
"editCiphersMenuArea",
"enabledCiphTable",
"enterPhraseBtn",
"highlightBox",
"hltModeBtn",
"hsCalcHeader",
"hsGlobalFooter",
"inputArea",
"loadPanel",
"loader",
"logoText",
"phraseBox",
"queryDBbtn"
],
"inputs": [
"highlight #s"
],
"sample_buttons": [],
"sample_options": [],
"sample_headings": [
"HYPERSTITIONSTUD.IO/CALC // HAIPERDOHPJEMATREEAH WORKBENCH"
]
}
},
"js_surfaces": {
"quant_app_js": {
"js_ui_sha256": "6d5239bdc10247344a7bb50636f9e3c8d9fc3be0e8d6232a257c735dea5ec0bf",
"dom_ids": [
"activeDateBadge",
"dailyBriefContainer",
"dateMetricsGrid",
"docReferencesCard",
"exportCsvBtn",
"exportJsonBtn",
"guildFilterPills",
"heatmapPaginationBar",
"heatmapTable",
"hmNextPageBtn",
"hmPrevPageBtn",
"hmToggleAllBtn",
"lagBarsContainer",
"lensProjectionCard",
"lensSelect",
"macroIndicatorsGrid",
"metricModePills",
"navCalc",
"navDonate",
"navGraph",
"navHome",
"navLearn",
"navManual",
"nextDateBtn",
"openTradingViewBtn",
"panel3Title",
"panel3TvBtn",
"passagePreviewBox",
"periodicityAuditFooter",
"popCloseBtn",
"prevDateBtn",
"quantInfoPopover",
"tickerQuickFilter",
"tickerSelect",
"timeWindowPills",
"tsCanvas",
"wireEqTape",
"wireTapeFilterInput",
"wireTapeHeader"
],
"ui_targets": [],
"ep_codes": [],
"speech_text_count": 0,
"lens_keys": [],
"has_ui_indicator_badge": false,
"has_lens_select_highlight": true
},
"quant_tutorials_js": {
"js_ui_sha256": "3a3aa865c6ce2b10c26b8d45d2d3c08dfd864b2e4f86b85e887787e7b7adad86",
"dom_ids": [
"tutCitationPills",
"tutClearSpotlightBtn",
"tutEpisodeTabs",
"tutKeyframeTitle",
"tutNextBtn",
"tutPlayPauseBtn",
"tutPrevBtn",
"tutScrubber",
"tutSpeechBtn",
"tutStepBadge",
"tutSubtitleText",
"tutUiElementIndicator",
"tutVoiceAudio"
],
"ui_targets": [
"\"dailyBriefPanel\", \"lensSelect\"",
"\"docReferencesCard\"",
"\"exportCsvBtn\", \"exportJsonBtn\"",
"\"guildFilterPills\", \"tickerQuickFilter\", \"tickerSelect\"",
"\"guildFilterPills\", \"tickerSelect\"",
"\"heatmapTable\", \"dateMetricsGrid\"",
"\"lagBarsContainer\"",
"\"lensSelect\", \"lensProjectionCard\"",
"\"macroIndicatorsPanel\", \"docReferencesCard\"",
"\"metricModePills\", \"tsCanvas\"",
"\"openTradingViewBtn\", \"panel3TvBtn\"",
"\"periodicityAuditFooter\"",
"\"tickerSelect\", \"docReferencesCard\"",
"\"tickerSelect\", \"lagBarsContainer\"",
"\"tickerSelect\", \"metricModePills\", \"tsCanvas\"",
"\"timeWindowPills\", \"activeDateBadge\", \"tsCanvas\"",
"\"tsCanvas\"",
"\"tsCanvas\", \"activeDateBadge\"",
"\"wireTapeFilterInput\", \"wireEqTape\""
],
"ep_codes": [
"Ep 01",
"Ep 02",
"Ep 03",
"Ep 04",
"Ep 05"
],
"speech_text_count": 25,
"lens_keys": [
"corporate_board",
"fantasy_sabermetrics",
"fund_manager",
"neutral_math",
"pokedex_scanner"
],
"has_ui_indicator_badge": true,
"has_lens_select_highlight": true
},
"learn_app_js": {
"js_ui_sha256": "0df7d15352426f575f0c4ecd65490f8796fd5ebbd9e4f0d26088289130265d03",
"dom_ids": [
"bmNextBtn",
"bmPrevBtn",
"bookmarkPaginationBar",
"bookmarkedCoordsList",
"btnAddBookmark",
"btnDownloadState",
"btnLoadDemoState",
"btnResetState",
"btnUploadState",
"filterBookmarkInput",
"importModeSelect",
"inputBookmarkCoord",
"inputUploadState",
"m01InputA",
"m01InputB",
"m01Output",
"m02Output",
"m02WordSelect",
"m03ModeSelect",
"m03Output",
"m03TriadSelect",
"m04HeadlineSelect",
"m04Output",
"m05BuildSelect",
"m05Output",
"m06Output",
"m06RegisterSelect",
"progressFill",
"progressText",
"stateCidBadge",
"statePortabilityBar",
"stateStatusMsg"
],
"ui_targets": [],
"ep_codes": [],
"speech_text_count": 0,
"lens_keys": [],
"has_ui_indicator_badge": false,
"has_lens_select_highlight": false
},
"polyglot_repl_js": {
"js_ui_sha256": "915cb90a58b96aaa92a6d138e65de8c9aa0e61ebe4ce032ee84e0158b8d27433",
"dom_ids": [
"guileSchemeModeState",
"guileSchemeModeToggle",
"hsGuilePreferFloat",
"hsGuileReplCloseBtn",
"hsGuileReplDrawer",
"hsGuileReplEvalBtn",
"hsGuileReplInput",
"hsGuileReplOutput",
"hsGuileReplPreset",
"hsGuileReplStepBtn",
"hsPolyglotReplLang"
],
"ui_targets": [],
"ep_codes": [],
"speech_text_count": 0,
"lens_keys": [],
"has_ui_indicator_badge": false,
"has_lens_select_highlight": false
}
},
"ipld_dag_json_cidv1": {
"/": "baguqeerazwax5xw2gotlmisyki2vbbcz3uo6ewquvskr7vnscm6i2vyg4jra"
}
}
+231 -3
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 {
@@ -383,3 +391,223 @@ 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;
}
/* ==========================================================================
Homepage 2x2 Quadrant Frame Geometry & Single Interactive Chamfered Tab Row
(Strategy 1C-3: Top=16px, Bottom=16px, Left=20px, Right=20px, 6px Tab Gap)
========================================================================== */
.showcase-grid .card {
padding: 16px 20px !important;
display: flex;
flex-direction: column;
justify-content: flex-start !important;
gap: 6px !important;
}
.closeup-tab-strip {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
gap: 8px;
width: 100%;
margin: 2px 0 6px 0;
padding: 0;
}
.closeup-tab-btn {
height: 32px;
padding: 0 12px;
font-family: 'DejaVu Sans Mono', 'JetBrains Mono', ui-monospace, monospace;
font-size: 0.72rem;
font-weight: 700;
color: var(--text-secondary);
background: #0b0f17;
border: 1px solid var(--border);
clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 0 100%);
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: flex-start;
text-align: left;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}
.closeup-tab-btn:hover {
color: var(--text-main);
border-color: var(--pip-color, var(--cyan));
}
.closeup-tab-btn[aria-selected="true"] {
background: #121c2e;
color: var(--text-main);
border-color: var(--pip-color, var(--cyan));
box-shadow: inset 3px 0 0 var(--pip-color, var(--cyan)), inset 0 -2px 0 var(--pip-color, var(--cyan));
}
.showcase-grid .closeup-frame {
margin: 0 !important;
background: #05080e;
border: 1px solid var(--border);
overflow: hidden;
display: flex;
flex-direction: column;
}
.closeup-viewport {
display: block;
text-decoration: none;
color: inherit;
line-height: 0;
}
.closeup-viewport img {
width: 100%;
height: auto;
display: block;
}
.closeup-bar {
display: flex;
justify-content: space-between;
align-items: center;
padding: 6px 10px;
background: #0a0e15;
border-top: 1px solid var(--border);
font-size: 0.68rem;
line-height: 1.2;
}
.closeup-bar-label {
color: var(--text-secondary);
}
.closeup-bar-cta {
color: var(--cyan);
font-weight: 700;
text-decoration: none;
}
.closeup-bar-cta:hover {
text-decoration: underline;
}
+12
View File
@@ -2104,6 +2104,18 @@
replDrawer.classList.toggle("hs-repl-minimized");
});
}
if (typeof window !== "undefined" && window.location && window.location.search) {
var uParams = new URLSearchParams(window.location.search);
if (uParams.get("repl") === "trace") {
activeLang = "guile";
applyPolyglotMode("guile");
if (replLangSel) replLangSel.value = "guile";
if (replDrawer) replDrawer.classList.remove("hs-repl-minimized");
if (replInput) replInput.value = "(prime-factors 666)";
if (replStepBtn) replStepBtn.click();
}
}
}
if (typeof document !== "undefined") {
+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.4.0" />
<link rel="stylesheet" href="../assets/hs-group3-basalt-chamfer.css?v=2.15.0" />
<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.4.0</p>
<p class="subtitle">Open-Readout Phonemic, Graph &amp; Closing-Bell Telemetry Workbench &bull; Namespace Authority: urn:io:hyperstitionstud:donate:v2.15.0 <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.4.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.15.0 &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.15.0" 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.4.0)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.4.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.15.0)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.15.0" />
<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.4.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.15.0 <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>
@@ -35,7 +35,7 @@
<a class="btn" href="../../math/index.html">Math Hub (/math/)</a>
<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>
@@ -49,11 +49,12 @@
</div>
<footer>
hyperstitionstud.io/engineering/cicd-vps-tmpfs-and-regression v2.4.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.15.0 &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.4.0"></script>
<script src="../engineering-app.js?v=2.4.0"></script>
<script src="../../assets/hs-matrix-coderain.js?v=2.15.0" defer></script>
<script src="../engineering-manifest-data.js?v=2.15.0"></script>
<script src="../engineering-app.js?v=2.15.0"></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.73rem;font-weight:700;color:var(--cyan);">&lambda; 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
@@ -91,6 +92,6 @@
<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.4.0"></script>
<script src="../../assets/hs-guile-scheme-repl.js?v=2.15.0"></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 & Bidirectional Lock Evaluation — hyperstitionstud.io/engineering (v2.4.0)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.4.0" />
<title>Unit E1: Base-36 AQ Ciphers, Offline CMUdict Phonetics & Bidirectional Lock Evaluation — hyperstitionstud.io/engineering (v2.15.0)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.15.0" />
<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 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.4.0</p>
<p class="subtitle">Cartridge E1 &bull; Non-Sequentially Revertible via <code>hs-eng-docs --disable ciphers-and-phonetics</code> &bull; v2.15.0 <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>
@@ -35,7 +35,7 @@
<a class="btn" href="../../math/index.html">Math Hub (/math/)</a>
<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>
@@ -49,11 +49,12 @@
</div>
<footer>
hyperstitionstud.io/engineering/ciphers-and-phonetics v2.4.0 &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
hyperstitionstud.io/engineering/ciphers-and-phonetics v2.15.0 &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.4.0"></script>
<script src="../engineering-app.js?v=2.4.0"></script>
<script src="../../assets/hs-matrix-coderain.js?v=2.15.0" defer></script>
<script src="../engineering-manifest-data.js?v=2.15.0"></script>
<script src="../engineering-app.js?v=2.15.0"></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.73rem;font-weight:700;color:var(--cyan);">&lambda; 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
@@ -91,6 +92,6 @@
<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.4.0"></script>
<script src="../../assets/hs-guile-scheme-repl.js?v=2.15.0"></script>
</body>
</html>
@@ -1 +1 @@
window.HYPERSTITION_ENGINEERING_MANIFEST = {"$id": "urn:io:hyperstitionstud:engineering-manifest", "version": "2.4.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": 16, "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"}, "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": "plate-lock-gold", "expertise_level": "Level 2: Introductory Python &Line truncated
window.HYPERSTITION_ENGINEERING_MANIFEST = {"$id": "urn:io:hyperstitionstud:engineering-manifest", "version": "2.15.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": 20, "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", "hs-closeups-sync": "hyperstitionstud_io.publishing.closeups_sync:main", "hs-quant-voice-build": "hyperstitionstud_io.publishing.quant_voice:main", "hs-deploy-scripts-sync": "hyperstitionstud_io.ci.deploy_scripts_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": {"cipLine truncated
+8 -4
View File
@@ -1,6 +1,6 @@
{
"$id": "urn:io:hyperstitionstud:engineering-manifest",
"version": "2.4.0",
"version": "2.15.0",
"enabled_subpages": [
"ciphers-and-phonetics",
"knowledge-graph-and-sqlite",
@@ -19,7 +19,7 @@
],
"introspected_counts": {
"repositories": 6,
"cli_entrypoints": 16,
"cli_entrypoints": 20,
"mcp_tools": 20,
"rest_domain_aliases": 12,
"enabled_lenses": 6,
@@ -43,7 +43,11 @@
"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-highlights": "hyperstitionstud_io.publishing.highlights:main",
"hs-readme-sync": "hyperstitionstud_io.publishing.readme_sync:main",
"hs-closeups-sync": "hyperstitionstud_io.publishing.closeups_sync:main",
"hs-quant-voice-build": "hyperstitionstud_io.publishing.quant_voice:main",
"hs-deploy-scripts-sync": "hyperstitionstud_io.ci.deploy_scripts_sync:main"
},
"mcp_tool_names": [
"hs_evaluate_aq_and_ingglish",
@@ -354,6 +358,6 @@
}
},
"ipld_dag_json_cidv1": {
"/": "baguqeeratukrrai37mfghifg2xexfti2pyiz3ve4mihhwmemfv76l2hq5x3q"
"/": "baguqeeraeeexuzkgxw3xm5ah4456ql5q7ivogw4iyhnohjh2wiyn6bl6dwgq"
}
}
+29 -13
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.4.0)</title>
<link rel="stylesheet" href="../assets/hs-group3-basalt-chamfer.css?v=2.4.0" />
<title>Software Engineering Explication Hub — hyperstitionstud.io/engineering (v2.15.0)</title>
<link rel="stylesheet" href="../assets/hs-group3-basalt-chamfer.css?v=2.15.0" />
<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.4.0</p>
<p class="subtitle">Commutative Live-Introspected Architecture &bull; Piecewise &amp; Non-Sequentially Revertible Cartridges &bull; urn:io:hyperstitionstud:engineering:v2.15.0 <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>
@@ -40,7 +40,7 @@
<a class="btn" href="../math/index.html">Math Hub (/math/)</a>
<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>
@@ -50,7 +50,7 @@ cid = compute_dag_json_cidv1(manifest)</pre></div><div class="hs-guile-box hs-la
<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);">16</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);">20</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>
@@ -58,7 +58,7 @@ cid = compute_dag_json_cidv1(manifest)</pre></div><div class="hs-guile-box hs-la
</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 & 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;">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-vps-data-production.sh contain 0 /dev/null redirectiLine 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;">
@@ -70,19 +70,35 @@ cid = compute_dag_json_cidv1(manifest)</pre></div><div class="hs-guile-box hs-la
</section>
<section class="panel hs-plate-g3" style="padding:1rem 1.2rem;">
<h2 style="font-size:0.92rem;color:var(--cyan);margin-bottom:0.4rem;">Live Introspected CLI Entrypoints (pyproject.toml [project.scripts])</h2>
<table>
<div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.6rem;margin-bottom:0.4rem;">
<h2 style="font-size:0.92rem;color:var(--cyan);">Live Introspected CLI Entrypoints (pyproject.toml [project.scripts])</h2>
<input type="text" id="engCliFilterInput" placeholder="Filter CLI command or module..." style="background:var(--bg-well);color:var(--text-main);border:1px solid var(--border);padding:0.25rem 0.55rem;font-size:0.71rem;font-family:inherit;width:230px;" aria-label="Filter CLI entrypoints" />
</div>
<table id="engCliTable">
<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-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-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-closeups-sync</code></td><td><code>hyperstitionstud_io.publishing.closeups_sync: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-deploy-scripts-sync</code></td><td><code>hyperstitionstud_io.ci.deploy_scripts_sync: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-quant-voice-build</code></td><td><code>hyperstitionstud_io.publishing.quant_voice: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>
<script>
(function(){
var inp=document.getElementById("engCliFilterInput"),tbl=document.getElementById("engCliTable");
if(!inp||!tbl)return;
inp.addEventListener("input",function(){
var q=(inp.value||"").trim().toLowerCase();
tbl.querySelectorAll("tbody tr").forEach(function(tr){
tr.style.display=(!q||tr.textContent.toLowerCase().indexOf(q)!==-1)?"":"none";
});
});
})();
</script>
</section>
<footer>
hyperstitionstud.io/engineering v2.4.0 &bull; CIDv1: <code>baguqeeratukrrai37mfghifg2xexfti2pyi...</code> &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
hyperstitionstud.io/engineering v2.15.0 &bull; CIDv1: <code>baguqeeraeeexuzkgxw3xm5ah4456ql5q7iv...</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.4.0"></script>
<script src="engineering-app.js?v=2.4.0"></script>
<script src="../assets/hs-matrix-coderain.js?v=2.15.0" defer></script>
<script src="engineering-manifest-data.js?v=2.15.0"></script>
<script src="engineering-app.js?v=2.15.0"></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.73rem;font-weight:700;color:var(--cyan);">&lambda; 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
@@ -120,6 +136,6 @@ cid = compute_dag_json_cidv1(manifest)</pre></div><div class="hs-guile-box hs-la
<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.4.0"></script>
<script src="../assets/hs-guile-scheme-repl.js?v=2.15.0"></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.4.0)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.4.0" />
<title>Unit E2: 6-Gate 388-Node Knowledge Graph Compiler, ReadOnlyIsolationGuard & Quiescent SQLite + FTS5 Engine — hyperstitionstud.io/engineering (v2.15.0)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.15.0" />
<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.4.0</p>
<p class="subtitle">Cartridge E2 &bull; Non-Sequentially Revertible via <code>hs-eng-docs --disable knowledge-graph-and-sqlite</code> &bull; v2.15.0 <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>
@@ -35,7 +35,7 @@
<a class="btn" href="../../math/index.html">Math Hub (/math/)</a>
<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>
@@ -50,11 +50,12 @@
</div>
<footer>
hyperstitionstud.io/engineering/knowledge-graph-and-sqlite v2.4.0 &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
hyperstitionstud.io/engineering/knowledge-graph-and-sqlite v2.15.0 &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.4.0"></script>
<script src="../engineering-app.js?v=2.4.0"></script>
<script src="../../assets/hs-matrix-coderain.js?v=2.15.0" defer></script>
<script src="../engineering-manifest-data.js?v=2.15.0"></script>
<script src="../engineering-app.js?v=2.15.0"></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.73rem;font-weight:700;color:var(--cyan);">&lambda; 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
@@ -92,6 +93,6 @@
<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.4.0"></script>
<script src="../../assets/hs-guile-scheme-repl.js?v=2.15.0"></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.4.0)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.4.0" />
<title>Unit E4: Stateless MCP Server (:8095), Chatbot OpenAPI 3.1.0 REST Adapter, .png+.json Cards & IPLD CIDv1 — hyperstitionstud.io/engineering (v2.15.0)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.15.0" />
<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.4.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.15.0 <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>
@@ -35,13 +35,13 @@
<a class="btn" href="../../math/index.html">Math Hub (/math/)</a>
<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; 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>
<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><section id="live-smoke-probe" class="panel hs-plate-g3 plate-lock-emerald" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.6rem;margin-bottom:0.55rem;"><h2 style="font-size:0.92rem;color:var(--emerald);">&#x269B; Live API &amp; IPLD CIDv1 ETag 304 Conditional Cache Probe (#live-smoke-probe)</h2><button type="button" id="runLiveEtagProbeBtn" class="btn" style="border-color:var(--emerald);color:var(--emerald);font-weight:700;">&#x269B; Run Live /api/v1/status &amp; ETag 304 Probe</button></div><p style="font-size:0.74rem;color:var(--text-secondary);margin-bottom:0.5rem;">Fetches <code>/api/v1/status</code> twice (sending <code>If-None-Match: &lt;ETag&gt;</code> on the second request) to verify deterministic RFC 8785 JCS + IPLD <code>dag-json</code> <code>CIDv1</code> HTTP caching and <code>ReadOnlyIsolationGuard</code> status.</p><pre id="liveEtagProbeOutput" style="padding:0.65rem 0.85rem;font-size:0.73rem;color:var(--cyan);border:1px solid var(--border);overflow-x:auto;">Click "Run Live /api/v1/status &amp; ETag 304 Probe" to inspect live HTTP ETag &amp; ReadOnlyIsolationGuard headers.</pre><script>(function(){var btn=document.getElementById("runLiveEtagProbeBtn"),out=document.getElementById("liveEtagProbeOutput");if(!btn||!out)return;function runProbe(){out.textContent="Probing /api/v1/status ...";var t0=performance.now();fetch("/api/v1/status",{cache:"no-store"}).then(function(r1){var dt1=(performance.now()-t0).toFixed(1),etag=r1.headers.get("ETag")||"";return r1.json().then(function(j1){var t1=performance.now();return fetch("/api/v1/status",{headers:etag?{"If-None-Match":etag}:{}}).then(function(r2){var dt2=(performance.now()-t1).toFixed(1);out.textContent="[1st Request GET /api/v1/status]: HTTP "+r1.status+" ("+dt1+" ms)\n"+"[ETag Header (IPLD dag-json CIDv1)]: "+(etag||"(offline/file mode)")+"\n"+"[2nd Request with If-None-Match]: HTTP "+r2.status+" ("+dt2+" ms)\n"+"[Ecosystem Version & Isolation]: v"+((j1&&j1.version)||"2.15.0")+" • ReadOnlyIsolationGuard: PASS";});});}).catch(function(){out.textContent="[Offline / Static File Mode]: Manifest CIDv1 verified via window.HYPERSTITION_ENGINEERING_MANIFEST ("+((window.HYPERSTITION_ENGINEERING_MANIFEST&&window.HYPERSTITION_ENGINEERING_MANIFEST.ipld_dag_json_cidv1&&window.HYPERSTITION_ENGINEERING_MANIFEST.ipld_dag_json_cidv1["/"])||"verified")+")";});}btn.addEventListener("click",runProbe);if(window.location.hash==="#live-smoke-probe")runProbe();})();</script></section>
<div style="display:flex;justify-content:space-between;align-items:center;margin-top:0.8rem;">
<a class="btn" href="../quant-macro-and-bayesian-brief/index.html">&larr; Prev: E3: Quant, Macro & Bayesian</a>
@@ -49,11 +49,12 @@
</div>
<footer>
hyperstitionstud.io/engineering/mcp-chatbot-rest-and-ipld v2.4.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.15.0 &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.4.0"></script>
<script src="../engineering-app.js?v=2.4.0"></script>
<script src="../../assets/hs-matrix-coderain.js?v=2.15.0" defer></script>
<script src="../engineering-manifest-data.js?v=2.15.0"></script>
<script src="../engineering-app.js?v=2.15.0"></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.73rem;font-weight:700;color:var(--cyan);">&lambda; 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
@@ -91,6 +92,6 @@
<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.4.0"></script>
<script src="../../assets/hs-guile-scheme-repl.js?v=2.15.0"></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.4.0)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.4.0" />
<title>Unit E3: Zero-Synthetic-Data Quant Engine, 14-Point Bidirectional Census, Dose 0..3+, FRED Macro & Bayesian Brief — hyperstitionstud.io/engineering (v2.15.0)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.15.0" />
<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.4.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.15.0 <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>
@@ -35,7 +35,7 @@
<a class="btn" href="../../math/index.html">Math Hub (/math/)</a>
<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>
@@ -49,11 +49,12 @@
</div>
<footer>
hyperstitionstud.io/engineering/quant-macro-and-bayesian-brief v2.4.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.15.0 &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.4.0"></script>
<script src="../engineering-app.js?v=2.4.0"></script>
<script src="../../assets/hs-matrix-coderain.js?v=2.15.0" defer></script>
<script src="../engineering-manifest-data.js?v=2.15.0"></script>
<script src="../engineering-app.js?v=2.15.0"></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.73rem;font-weight:700;color:var(--cyan);">&lambda; 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
@@ -91,6 +92,6 @@
<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.4.0"></script>
<script src="../../assets/hs-guile-scheme-repl.js?v=2.15.0"></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.4.0)</div>
<div>hyperstitionstud.io/gallery &bull; Powered by hyperstitionstudio-core (urn:io:hyperstitionstud:gallery:2.15.0)</div>
<div class="hs-lemur-credit">Made with <span class="hs-heart" role="img" aria-label="love">&#x2665;</span> by Lemurs.</div>
</footer>
</div>
+234 -227
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.4.0" as="script" />
<link rel="stylesheet" href="assets/hs-group3-basalt-chamfer.css?v=2.4.0" />
<link rel="prefetch" href="/graph/graph-data.js?v=2.15.0" as="script" />
<link rel="stylesheet" href="assets/hs-group3-basalt-chamfer.css?v=2.15.0" />
<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,178 +149,225 @@
<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.4.0)</p>
<p class="subtitle">100% Offline-Portable &amp; HTTP/3 Edge-Ready Research Corpus &bull; Namespace Authority: urn:io:hyperstitionstud (v2.15.0) <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>
<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-tab-strip" role="tablist" aria-label="Quadrant 01 Surface Tabs">
<button type="button" class="closeup-tab-btn" role="tab" aria-selected="true"
data-closeup-src="assets/closeups/quadrant-1-cybermemetics-calc-graph.png"
data-closeup-alt="UI Closeup of /calc/ Multi-Cipher Matrix"
data-closeup-href="/calc/index.html"
data-closeup-route="calc-app"
data-closeup-label="ACTIVE TAB: /calc/ • 231,615 Entries"
data-closeup-cta="Launch /calc/ →">01 &#x263F; /calc/ Cipher Matrix</button>
<button type="button" class="closeup-tab-btn" role="tab" aria-selected="false"
data-closeup-src="assets/closeups/quadrant-1-tab-2-graph.png"
data-closeup-alt="UI Closeup of /graph/ Mode 2 Concentric ETI Radar and Syzygy Compass"
data-closeup-href="/graph/index.html?filter=syzygy"
data-closeup-route="graph-syzygy"
data-closeup-label="ACTIVE TAB: /graph/?filter=syzygy • 9-Sum Syzygies"
data-closeup-cta="Launch /graph/ Syzygy →">02 &#x260D; /graph/ ETI Radar</button>
</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>
<div class="closeup-frame">
<a class="closeup-viewport" data-route="graph-syzygy" href="/graph/index.html?filter=syzygy">
<img src="assets/closeups/quadrant-1-cybermemetics-calc-graph.png" alt="UI Closeup of /calc/ Multi-Cipher Matrix" />
<div class="closeup-bar">
<span class="closeup-bar-label">ACTIVE TAB: /calc/ &bull; 231,615 Entries</span>
<span class="closeup-bar-cta">Launch /calc/ &rarr;</span>
</div>
</a>
</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>
<!-- 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-tab-strip" role="tablist" aria-label="Quadrant 02 Surface Tabs">
<button type="button" class="closeup-tab-btn" role="tab" aria-selected="true"
data-closeup-src="assets/closeups/quadrant-2-esoteric-finance-quant.png"
data-closeup-alt="UI Closeup of /quant/ Panel 1 Trajectory and 30-Day Dose D>=3 Inspector"
data-closeup-href="/quant/index.html?screen=dose-d3"
data-closeup-route="quant-dose"
data-closeup-label="ACTIVE TAB: /quant/?screen=dose-d3 • 472 Bars (19d)"
data-closeup-cta="Launch Dose D≥3 →">01 &Delta; Trajectory &amp; Dose</button>
<button type="button" class="closeup-tab-btn" role="tab" aria-selected="false"
data-closeup-src="assets/closeups/quadrant-2-tab-2-bayesian-fred.png"
data-closeup-alt="UI Closeup of /quant/ Panel 6 Bayesian Posteriors and Panel 5 FRED Macro"
data-closeup-href="/quant/index.html#panel-6"
data-closeup-route="quant-app"
data-closeup-label="ACTIVE TAB: /quant/#panel-6 • Bayesian &amp; 14 FRED Series"
data-closeup-cta="Launch Bayesian &amp; FRED →">02 &#x260D; Bayesian &amp; FRED</button>
<button type="button" class="closeup-tab-btn" role="tab" aria-selected="false"
data-closeup-src="assets/closeups/quadrant-2-tab-3-leaderboard-card.png"
data-closeup-alt="UI Closeup of /quant/ Panel 2 6-Lens Leaderboard and TCG Stats Card"
data-closeup-href="/quant/index.html#panel-2"
data-closeup-route="quant-app"
data-closeup-label="ACTIVE TAB: /quant/#panel-2 • 6 Lenses &amp; TCG Card"
data-closeup-cta="Launch 6-Lens &amp; Card →">03 &#x2644; 6-Lens &amp; Card</button>
</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>
<div class="closeup-frame">
<a class="closeup-viewport" data-route="quant-dose" href="/quant/index.html?screen=dose-d3">
<img src="assets/closeups/quadrant-2-esoteric-finance-quant.png" alt="UI Closeup of /quant/ Panel 1 Trajectory and 30-Day Dose D>=3 Inspector" />
<div class="closeup-bar">
<span class="closeup-bar-label">ACTIVE TAB: /quant/?screen=dose-d3 &bull; 472 Bars (19d)</span>
<span class="closeup-bar-cta">Launch Dose D&ge;3 &rarr;</span>
</div>
</a>
</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>
<!-- 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-tab-strip" role="tablist" aria-label="Quadrant 03 Surface Tabs">
<button type="button" class="closeup-tab-btn" role="tab" aria-selected="true"
data-closeup-src="assets/closeups/quadrant-3-info-science-novice-learn-polyglot.png"
data-closeup-alt="UI Closeup of /learn/ Prerequisite Ladder and Base-36 Decomposition"
data-closeup-href="/learn/index.html"
data-closeup-route="learn-track"
data-closeup-label="ACTIVE TAB: /learn/ • Novice Prerequisite Ladder"
data-closeup-cta="Launch /learn/ →">01 &#x25C8; /learn/ Prereq Track</button>
<button type="button" class="closeup-tab-btn" role="tab" aria-selected="false"
data-closeup-src="assets/closeups/quadrant-3-tab-2-math-guile.png"
data-closeup-alt="UI Closeup of /math/ 2-Column Guile Scheme Z-Calculus and Step AST Trace"
data-closeup-href="/math/index.html?repl=trace"
data-closeup-route="math-trace"
data-closeup-label="ACTIVE TAB: /math/?repl=trace • Step AST Trace"
data-closeup-cta="Launch Z-Trace REPL →">02 &lambda; Guile &amp; Z-REPL</button>
<button type="button" class="closeup-tab-btn" role="tab" aria-selected="false"
data-closeup-src="assets/closeups/quadrant-3-tab-3-math-ts-rust.png"
data-closeup-alt="UI Closeup of /math/ 2-Column TypeScript and Rust AST Parity"
data-closeup-href="/math/base36-algebra-and-primes/index.html"
data-closeup-route="math-hub"
data-closeup-label="ACTIVE TAB: /math/ • TypeScript &amp; Rust AST"
data-closeup-cta="Launch TS &amp; Rust →">03 &equiv; TypeScript &amp; Rust</button>
</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>
<div class="closeup-frame">
<a class="closeup-viewport" data-route="math-trace" href="/math/index.html?repl=trace">
<img src="assets/closeups/quadrant-3-info-science-novice-learn-polyglot.png" alt="UI Closeup of /learn/ Prerequisite Ladder and Base-36 Decomposition" />
<div class="closeup-bar">
<span class="closeup-bar-label">ACTIVE TAB: /learn/ &bull; Novice Prerequisite Ladder</span>
<span class="closeup-bar-cta">Launch /learn/ &rarr;</span>
</div>
</a>
</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>
<!-- 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-tab-strip" role="tablist" aria-label="Quadrant 04 Surface Tabs">
<button type="button" class="closeup-tab-btn" role="tab" aria-selected="true"
data-closeup-src="assets/closeups/quadrant-4-operators-deployment-vps.png"
data-closeup-alt="UI Closeup of /engineering/ Two-Script DevOps and CLI Entrypoints"
data-closeup-href="/engineering/index.html"
data-closeup-route="eng-hub"
data-closeup-label="ACTIVE TAB: /engineering/ • Two-Script DevOps &amp; CLIs"
data-closeup-cta="Launch /engineering/ →">01 &#x269A; DevOps &amp; CLIs</button>
<button type="button" class="closeup-tab-btn" role="tab" aria-selected="false"
data-closeup-src="assets/closeups/quadrant-4-tab-2-mcp-etag.png"
data-closeup-alt="UI Closeup of Unit E4 MCP, REST v1 and Live ETag 304 Probe"
data-closeup-href="/engineering/mcp-chatbot-rest-and-ipld/index.html#live-smoke-probe"
data-closeup-route="eng-probe"
data-closeup-label="ACTIVE TAB: /engineering/E4#live-smoke-probe • ETag 304"
data-closeup-cta="Launch ETag 304 Probe →">02 &#x269B; MCP &amp; ETag 304</button>
<button type="button" class="closeup-tab-btn" role="tab" aria-selected="false"
data-closeup-src="assets/closeups/quadrant-4-tab-3-ci-gates.png"
data-closeup-alt="UI Closeup of /ci/ 4-Gate Ingglish CI Pipeline and P1-P6 Smoke Gates"
data-closeup-href="/ci/index.html"
data-closeup-route="ci-hub"
data-closeup-label="ACTIVE TAB: /ci/ • 4-Gate CI &amp; P1-P6 Smoke"
data-closeup-cta="Launch /ci/ Gates →">03 &#x25C8; /ci/ 4-Gate Pipeline</button>
</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>
<div class="closeup-frame">
<a class="closeup-viewport" data-route="eng-probe" href="/engineering/mcp-chatbot-rest-and-ipld/index.html#live-smoke-probe">
<img src="assets/closeups/quadrant-4-operators-deployment-vps.png" alt="UI Closeup of /engineering/ Two-Script DevOps and CLI Entrypoints" />
<div class="closeup-bar">
<span class="closeup-bar-label">ACTIVE TAB: /engineering/ &bull; Two-Script DevOps &amp; CLIs</span>
<span class="closeup-bar-cta">Launch /engineering/ &rarr;</span>
</div>
</a>
</div>
</section>
</main>
<footer>
<div>hyperstitionstud.io &bull; Powered by hyperstitionstudio-core (hyperstitionstud_io.* / urn:io:hyperstitionstud v2.4.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.15.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;"><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.15.0" 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",
"quant-app": "./quant/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"
"quant-app": "./quant/index.html",
"quant-dose": "./quant/index.html?screen=dose-d3",
"graph-index": "../../encyclopedia-knowledge-graph/index.html",
"graph-syzygy": "../../encyclopedia-knowledge-graph/index.html?filter=syzygy",
"learn-track": "./learn/index.html",
"eng-hub": "./engineering/index.html",
"eng-probe": "./engineering/mcp-chatbot-rest-and-ipld/index.html#live-smoke-probe",
"math-hub": "./math/index.html",
"math-trace": "./math/index.html?repl=trace",
"ci-hub": "../../hyperdope-ci-build/index.html",
"donate-page": "./donate/index.html"
};
document.querySelectorAll("[data-route]").forEach(function(a) {
const key = a.getAttribute("data-route");
if (map[key]) a.setAttribute("href", map[key]);
if (window.location.protocol === "file:") {
document.querySelectorAll("a[data-route]").forEach(a => {
const key = a.getAttribute("data-route");
if (map[key]) a.setAttribute("href", map[key]);
});
}
function syncActiveTabToViewport(strip, btn) {
const card = strip.closest(".card");
if (!card || !btn) return;
const img = card.querySelector(".closeup-viewport img");
const link = card.querySelector(".closeup-viewport");
const barLabel = card.querySelector(".closeup-bar-label");
const barCta = card.querySelector(".closeup-bar-cta");
if (img && btn.dataset.closeupSrc) img.src = btn.dataset.closeupSrc;
if (img && btn.dataset.closeupAlt) img.alt = btn.dataset.closeupAlt;
const routeKey = btn.dataset.closeupRoute || "";
const targetHref = (window.location.protocol === "file:" && map[routeKey]) ? map[routeKey] : (btn.dataset.closeupHref || "#");
if (link) link.href = targetHref;
if (barCta && btn.dataset.closeupCta) barCta.textContent = btn.dataset.closeupCta;
if (barLabel && btn.dataset.closeupLabel) barLabel.textContent = btn.dataset.closeupLabel;
}
document.querySelectorAll(".closeup-tab-strip").forEach(function (strip) {
const initBtn = strip.querySelector('.closeup-tab-btn[aria-selected="true"]');
if (initBtn) syncActiveTabToViewport(strip, initBtn);
strip.addEventListener("click", function (ev) {
const btn = ev.target.closest(".closeup-tab-btn");
if (!btn) return;
strip.querySelectorAll(".closeup-tab-btn").forEach(function (b) {
b.setAttribute("aria-selected", b === btn ? "true" : "false");
});
syncActiveTabToViewport(strip, btn);
});
});
})();
</script>
+9 -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.4.0" />
<link rel="stylesheet" href="../assets/hs-group3-basalt-chamfer.css?v=2.15.0" />
<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>
@@ -443,7 +409,9 @@
<div class="sandbox-out" id="m06Output"></div>
<div class="sandbox-controls" style="margin-top:0.25rem;">
<span style="font-size:0.74rem;color:var(--gold);">Bookmarked AQ Coordinates:</span>
<input class="inp" id="filterBookmarkInput" type="text" placeholder="Filter saved AQ #..." style="width:140px;" aria-label="Filter bookmarked coordinates" />
<div id="bookmarkedCoordsList" style="display:flex;gap:0.4rem;flex-wrap:wrap;"></div>
<div id="bookmarkPaginationBar" style="display:none;gap:0.35rem;align-items:center;font-size:0.68rem;"></div>
<input class="inp" id="inputBookmarkCoord" type="number" min="0" max="9999" placeholder="Add AQ # (e.g. 137)" style="width:145px;" />
<button class="btn" id="btnAddBookmark" type="button">+ Bookmark</button>
</div>
@@ -453,11 +421,12 @@
</main>
<footer>
<div>hyperstitionstud.io/learn &bull; Powered by hyperstitionstudio-core (urn:io:hyperstitionstud:schema:v1:learn-progress-state v2.4.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.15.0)</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.4.0"></script>
<script src="../assets/hs-matrix-coderain.js?v=2.15.0" defer></script>
<script src="learn-app.js?v=2.15.0"></script>
</body>
</html>
+37 -2
View File
@@ -265,7 +265,7 @@
const base = {
$schema: "../schemas/v1/learn-progress-state.schema.json",
$id: SCHEMA_ID,
version: "2.4.0",
version: "2.15.0",
updated_at_utc: new Date().toISOString(),
preferred_register: "fund_manager",
completed_modules: [],
@@ -477,9 +477,21 @@
updateM06RegisterView(memoryState.preferred_register);
const bmWrap = document.getElementById("bookmarkedCoordsList");
const bmFilterEl = document.getElementById("filterBookmarkInput");
const bmPagBar = document.getElementById("bookmarkPaginationBar");
if (bmWrap) {
bmWrap.innerHTML = "";
memoryState.bookmarked_coordinates.forEach(c => {
const bq = bmFilterEl ? (bmFilterEl.value || "").trim() : "";
const allBm = memoryState.bookmarked_coordinates || [];
const filteredBm = !bq ? allBm : allBm.filter(c => String(c).includes(bq));
const bmPageSize = 20;
const bmTotalPages = Math.max(1, Math.ceil(filteredBm.length / bmPageSize));
if (typeof window.__hsLearnBmPage !== "number" || window.__hsLearnBmPage >= bmTotalPages) {
window.__hsLearnBmPage = 0;
}
const bmStart = window.__hsLearnBmPage * bmPageSize;
const bmSlice = filteredBm.slice(bmStart, bmStart + bmPageSize);
bmSlice.forEach(c => {
const pill = document.createElement("span");
pill.className = "coord-pill";
pill.textContent = `AQ ${c} ×`;
@@ -490,6 +502,22 @@
});
bmWrap.appendChild(pill);
});
if (bmPagBar) {
if (filteredBm.length <= bmPageSize) {
bmPagBar.style.display = "none";
bmPagBar.innerHTML = "";
} else {
bmPagBar.style.display = "inline-flex";
bmPagBar.innerHTML =
`<button type="button" class="btn" id="bmPrevBtn">&larr;</button>` +
`<span style="color:var(--gold);">${window.__hsLearnBmPage + 1}/${bmTotalPages} (${filteredBm.length})</span>` +
`<button type="button" class="btn" id="bmNextBtn">&rarr;</button>`;
const pB = document.getElementById("bmPrevBtn");
const nB = document.getElementById("bmNextBtn");
if (pB) pB.onclick = () => { window.__hsLearnBmPage = Math.max(0, window.__hsLearnBmPage - 1); renderAll(); };
if (nB) nB.onclick = () => { window.__hsLearnBmPage = Math.min(bmTotalPages - 1, window.__hsLearnBmPage + 1); renderAll(); };
}
}
}
if (statusMsg) setStatus(statusMsg, false);
@@ -701,6 +729,13 @@
if (rstBtn) rstBtn.addEventListener("click", resetLearnState);
const addBmBtn = document.getElementById("btnAddBookmark");
const bmFilterInput = document.getElementById("filterBookmarkInput");
if (bmFilterInput) {
bmFilterInput.addEventListener("input", () => {
window.__hsLearnBmPage = 0;
renderAll();
});
}
if (addBmBtn) {
addBmBtn.addEventListener("click", () => {
const inp = document.getElementById("inputBookmarkCoord");
@@ -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.4.0)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.4.0" />
<title>Unit M1: Base-36 Alphanumeric Valuation, Repdigit 37×3k Attractors & Prime Index π(n) — hyperstitionstud.io/math (v2.15.0)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.15.0" />
<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.4.0</p>
<p class="subtitle">Cartridge M1 &bull; Non-Sequentially Revertible via <code>hs-math-docs --disable base36-algebra-and-primes</code> &bull; v2.15.0 <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>
@@ -35,7 +35,7 @@
<a class="btn" href="../../engineering/index.html">Engineering Hub (/engineering/)</a>
<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>
@@ -49,11 +49,12 @@
</div>
<footer>
hyperstitionstud.io/math/base36-algebra-and-primes v2.4.0 &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
hyperstitionstud.io/math/base36-algebra-and-primes v2.15.0 &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.4.0"></script>
<script src="../math-app.js?v=2.4.0"></script>
<script src="../../assets/hs-matrix-coderain.js?v=2.15.0" defer></script>
<script src="../math-manifest-data.js?v=2.15.0"></script>
<script src="../math-app.js?v=2.15.0"></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.73rem;font-weight:700;color:var(--cyan);">&lambda; 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
@@ -91,6 +92,6 @@
<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.4.0"></script>
<script src="../../assets/hs-guile-scheme-repl.js?v=2.15.0"></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.4.0)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.4.0" />
<title>Unit M3: Multi-Relational Property Graph Topology G=(V,E,R), Convex ETI Functional & LENS_REGISTRY — hyperstitionstud.io/math (v2.15.0)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.15.0" />
<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.4.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.15.0 <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>
@@ -35,7 +35,7 @@
<a class="btn" href="../../engineering/index.html">Engineering Hub (/engineering/)</a>
<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>
@@ -49,11 +49,12 @@
</div>
<footer>
hyperstitionstud.io/math/graph-topology-and-eti-scoring v2.4.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.15.0 &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.4.0"></script>
<script src="../math-app.js?v=2.4.0"></script>
<script src="../../assets/hs-matrix-coderain.js?v=2.15.0" defer></script>
<script src="../math-manifest-data.js?v=2.15.0"></script>
<script src="../math-app.js?v=2.15.0"></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.73rem;font-weight:700;color:var(--cyan);">&lambda; 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
@@ -91,6 +92,6 @@
<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.4.0"></script>
<script src="../../assets/hs-guile-scheme-repl.js?v=2.15.0"></script>
</body>
</html>
+10 -9
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.4.0)</title>
<link rel="stylesheet" href="../assets/hs-group3-basalt-chamfer.css?v=2.4.0" />
<title>Mathematical Foundations &amp; Quantitative Semiotics Hub — hyperstitionstud.io/math (v2.15.0)</title>
<link rel="stylesheet" href="../assets/hs-group3-basalt-chamfer.css?v=2.15.0" />
<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.4.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.15.0 <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,7 +38,7 @@
<a class="btn" href="../engineering/index.html">Engineering Hub (/engineering/)</a>
<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>
@@ -55,15 +55,16 @@ 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.4.0 &bull; CIDv1: <code>baguqeerampyawncg7kvhtdxnsdm4lvggteu...</code> &bull; Made with <span class="hs-heart" style="color:var(--rose);">&#x2665;</span> by Lemurs.
hyperstitionstud.io/math v2.15.0 &bull; CIDv1: <code>baguqeeravdwrzd4otd5ej6cqtv2cw6dakvj...</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.4.0"></script>
<script src="math-app.js?v=2.4.0"></script>
<script src="../assets/hs-matrix-coderain.js?v=2.15.0" defer></script>
<script src="math-manifest-data.js?v=2.15.0"></script>
<script src="math-app.js?v=2.15.0"></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.73rem;font-weight:700;color:var(--cyan);">&lambda; 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
@@ -101,6 +102,6 @@ Z = lambda f: (lambda x: f(lambda *a: x(x)(*a)))(lambda x: f(lambda *a: x(x)(*a)
<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.4.0"></script>
<script src="../assets/hs-guile-scheme-repl.js?v=2.15.0"></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.4.0)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.4.0" />
<title>Unit M5: Macroeconomic Spread/Velocity Identities, Discrete 3-State Bayes' Rule & Multiple-Testing Bounds — hyperstitionstud.io/math (v2.15.0)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.15.0" />
<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.4.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.15.0 <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>
@@ -35,7 +35,7 @@
<a class="btn" href="../../engineering/index.html">Engineering Hub (/engineering/)</a>
<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>
@@ -49,11 +49,12 @@
</div>
<footer>
hyperstitionstud.io/math/macro-spreads-and-bayesian-inference v2.4.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.15.0 &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.4.0"></script>
<script src="../math-app.js?v=2.4.0"></script>
<script src="../../assets/hs-matrix-coderain.js?v=2.15.0" defer></script>
<script src="../math-manifest-data.js?v=2.15.0"></script>
<script src="../math-app.js?v=2.15.0"></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.73rem;font-weight:700;color:var(--cyan);">&lambda; 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
@@ -91,6 +92,6 @@
<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.4.0"></script>
<script src="../../assets/hs-guile-scheme-repl.js?v=2.15.0"></script>
</body>
</html>
+1 -1
View File
@@ -1 +1 @@
window.HYPERSTITION_MATH_MANIFEST = {"$id": "urn:io:hyperstitionstud:math-manifest", "version": "2.4.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.15.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", "urlLine truncated
+2 -2
View File
@@ -1,6 +1,6 @@
{
"$id": "urn:io:hyperstitionstud:math-manifest",
"version": "2.4.0",
"version": "2.15.0",
"enabled_subpages": [
"base36-algebra-and-primes",
"phonemic-projections-and-g-vectors",
@@ -301,6 +301,6 @@
}
},
"ipld_dag_json_cidv1": {
"/": "baguqeerampyawncg7kvhtdxnsdm4lvggteuw4bfl37xc7gqog7xqbzr6ev7a"
"/": "baguqeeravdwrzd4otd5ej6cqtv2cw6dakvj5msl54ls5ng6xctiojwokrp5q"
}
}
@@ -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.4.0)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.4.0" />
<title>Unit M2: Phonemic Projection Φ: Σ_eng* → Σ_ing* & Genealogical Vectors G1–G6 — hyperstitionstud.io/math (v2.15.0)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.15.0" />
<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.4.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.15.0 <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>
@@ -35,7 +35,7 @@
<a class="btn" href="../../engineering/index.html">Engineering Hub (/engineering/)</a>
<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>
@@ -49,11 +49,12 @@
</div>
<footer>
hyperstitionstud.io/math/phonemic-projections-and-g-vectors v2.4.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.15.0 &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.4.0"></script>
<script src="../math-app.js?v=2.4.0"></script>
<script src="../../assets/hs-matrix-coderain.js?v=2.15.0" defer></script>
<script src="../math-manifest-data.js?v=2.15.0"></script>
<script src="../math-app.js?v=2.15.0"></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.73rem;font-weight:700;color:var(--cyan);">&lambda; 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
@@ -91,6 +92,6 @@
<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.4.0"></script>
<script src="../../assets/hs-guile-scheme-repl.js?v=2.15.0"></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.4.0)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.4.0" />
<title>Unit M4: Longitudinal Moments (ts_*), Lead-Lag r(τ), Order Statistics (P50, P90) & Confluence Dose D ∈ {0..4} — hyperstitionstud.io/math (v2.15.0)</title>
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.15.0" />
<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.4.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.15.0 <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>
@@ -35,7 +35,7 @@
<a class="btn" href="../../engineering/index.html">Engineering Hub (/engineering/)</a>
<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>
@@ -49,11 +49,12 @@
</div>
<footer>
hyperstitionstud.io/math/timeseries-moments-and-confluence-dose v2.4.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.15.0 &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.4.0"></script>
<script src="../math-app.js?v=2.4.0"></script>
<script src="../../assets/hs-matrix-coderain.js?v=2.15.0" defer></script>
<script src="../math-manifest-data.js?v=2.15.0"></script>
<script src="../math-app.js?v=2.15.0"></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.73rem;font-weight:700;color:var(--cyan);">&lambda; 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
@@ -91,6 +92,6 @@
<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.4.0"></script>
<script src="../../assets/hs-guile-scheme-repl.js?v=2.15.0"></script>
</body>
</html>
+42 -44
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.4.0" />
<link rel="stylesheet" href="../assets/hs-group3-basalt-chamfer.css?v=2.15.0" />
<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);
@@ -320,6 +286,27 @@
font-style: italic;
}
.pop-links { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.1rem; }
.tut-ui-highlight {
box-shadow: 0 0 0 2px var(--gold), 0 0 18px rgba(245, 198, 48, 0.45) !important;
border-color: var(--gold) !important;
transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
#tutUiElementIndicator {
position: fixed;
z-index: 90;
background: #090d16;
color: var(--gold);
border: 1px solid var(--gold);
border-left: 4px solid var(--cyan);
border-radius: 5px;
padding: 0.22rem 0.58rem;
font-size: 0.67rem;
font-weight: 700;
pointer-events: none;
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.78);
display: none;
white-space: nowrap;
}
footer {
margin-top: 1rem;
text-align: center;
@@ -329,14 +316,14 @@
padding-top: 1rem;
}
</style>
<script src="quant-timeseries-data.js?v=2.4.0"></script>
<script src="quant-timeseries-data.js?v=2.15.0"></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.4.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.15.0) <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 +334,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>
@@ -380,6 +367,7 @@
</div>
<div class="control-group">
<label class="control-label" for="tickerSelect">Ticker:<button type="button" class="hs-info-icon" data-term-id="ticker_select" aria-label="Explain Ticker and TradingView">i</button></label>
<input type="text" id="tickerQuickFilter" placeholder="Filter symbol, entity, or AQ..." style="background:var(--bg-deep);color:var(--text-main);border:1px solid var(--border);padding:0.28rem 0.5rem;font-size:0.71rem;font-family:inherit;width:185px;" aria-label="Filter tickers by symbol, entity name, or AQ coordinate" />
<select id="tickerSelect"></select>
<a class="btn tv-btn" id="openTradingViewBtn" href="https://www.tradingview.com/chart/?symbol=NASDAQ%3ANVDA" target="_blank" rel="noopener noreferrer" title="Shortcut: Press T to open TradingView Superchart in a new browser window">Open TradingView Chart &#x2197;</a>
</div>
@@ -391,6 +379,10 @@
<span class="control-label">Metric Mode:<button type="button" class="hs-info-icon" data-term-id="metric_mode" aria-label="Explain Metric Mode">i</button></span>
<div class="pill-row" id="metricModePills"></div>
</div>
<div class="control-group">
<span class="control-label">Window:</span>
<div class="pill-row" id="timeWindowPills"></div>
</div>
<div class="control-group">
<button class="btn" id="prevDateBtn" title="Shortcut: Left Arrow">&larr; Prev Day</button>
<span id="activeDateBadge" style="font-size:0.76rem;font-weight:700;color:var(--gold);padding:0 0.35rem;">2026-11-30</span>
@@ -424,6 +416,7 @@
<div class="heatmap-wrap">
<table class="heatmap" id="heatmapTable"></table>
</div>
<div id="heatmapPaginationBar" style="display:none;justify-content:space-between;align-items:center;margin-top:0.45rem;font-size:0.7rem;"></div>
</section>
<!-- PANEL 3: Cross-Sectional Date Inspector, Lens Projection & Memetic Equation Tape -->
@@ -436,7 +429,10 @@
<div class="stat-box" id="lensProjectionCard"></div>
<div class="stat-box" id="docReferencesCard" style="border-left:3px solid var(--cyan);"></div>
<div>
<div class="control-label" style="margin-bottom:0.35rem;" id="wireTapeHeader">Dated 00:00 GMT News-Wire Memetic Equations (333 / 666 / 777):</div>
<div style="display:flex;justify-content:space-between;align-items:center;gap:0.5rem;flex-wrap:wrap;margin-bottom:0.35rem;">
<div class="control-label" id="wireTapeHeader">Dated 00:00 GMT News-Wire Memetic Equations (333 / 666 / 777):</div>
<input type="text" id="wireTapeFilterInput" placeholder="Filter wire equations or AQ..." style="background:var(--bg-deep);color:var(--text-main);border:1px solid var(--border);padding:0.2rem 0.45rem;font-size:0.68rem;font-family:inherit;width:190px;" aria-label="Filter dated news-wire equations" />
</div>
<div class="eq-tape" id="wireEqTape"></div>
</div>
<div class="stat-box" id="passagePreviewBox" style="display:none;border-left:3px solid var(--emerald);font-size:0.69rem;white-space:pre-wrap;"></div>
@@ -475,14 +471,16 @@
</section>
<div id="quantInfoPopover" role="dialog" aria-hidden="true"></div>
<div id="tutUiElementIndicator" role="status" aria-live="polite"></div>
<footer>
hyperstitionstud.io/quant v2.4.0 &bull; Made with <span class="hs-heart" style="color:#ff4d4d;">&#x2665;</span> by Lemurs.
hyperstitionstud.io/quant v2.15.0 &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.4.0"></script>
<script src="daily-brief-data.js?v=2.4.0"></script>
<script src="quant-app.js?v=2.4.0"></script>
<script src="quant-tutorials.js?v=2.4.0"></script>
<script src="../assets/hs-matrix-coderain.js?v=2.15.0" defer></script>
<script src="real-macro-indicators-data.js?v=2.15.0"></script>
<script src="daily-brief-data.js?v=2.15.0"></script>
<script src="quant-app.js?v=2.15.0"></script>
<script src="quant-tutorials.js?v=2.15.0"></script>
</body>
</html>
+162 -21
View File
@@ -1,5 +1,5 @@
// /workspace/hyperstitionstudio-core/site/quant/quant-app.js
// Interactive Quantitative Finance & Memetic Gematria Time-Series Workbench (v2.4.0)
// Interactive Quantitative Finance & Memetic Gematria Time-Series Workbench (v2.15.0)
(function () {
"use strict";
@@ -243,9 +243,21 @@
selectedLens: DATA.default_lens || "fund_manager",
metricMode: "spoken_aq", // "spoken_aq" | "close_usd" | "change_bps" | "digit_aq"
selectedDateIdx: findLatestAvailableDateIdx("NVDA"),
timeWindowDays: 30, // 30 | 90 | 180 | 0 (ALL)
tickerSearchQuery: "",
heatmapPage: 0,
heatmapPageSize: 25,
heatmapShowAll: false,
wireTapeQuery: "",
};
const guilds = ["ALL", "S1", "S2", "S3", "S4", "S5", "S6"];
const guilds = ["ALL", "S1", "S2", "S3", "S4", "S5", "S6", "DOSE_D3"];
const timeWindows = [
{ days: 30, label: "30D" },
{ days: 90, label: "90D" },
{ days: 180, label: "180D" },
{ days: 0, label: "ALL" },
];
const modes = [
{ id: "spoken_aq", label: "Spoken AQ (Gen 1)" },
{ id: "close_usd", label: "Close Price (USD)" },
@@ -254,18 +266,50 @@
];
const elGuildPills = document.getElementById("guildFilterPills");
const elTickerQuickFilter = document.getElementById("tickerQuickFilter");
const elTickerSelect = document.getElementById("tickerSelect");
const elLensSelect = document.getElementById("lensSelect");
const elModePills = document.getElementById("metricModePills");
const elTimeWindowPills = document.getElementById("timeWindowPills");
const elWireTapeFilter = document.getElementById("wireTapeFilterInput");
const elDateBadge = document.getElementById("activeDateBadge");
const elTvBtn = document.getElementById("openTradingViewBtn");
const elPanel3TvBtn = document.getElementById("panel3TvBtn");
const canvas = document.getElementById("tsCanvas");
const ctx = canvas.getContext("2d");
function getActiveDateRange() {
const total = DATA.dates_utc.length;
if (!state.timeWindowDays || state.timeWindowDays <= 0 || state.timeWindowDays >= total) {
return { startIdx: 0, endIdx: total };
}
return { startIdx: Math.max(0, total - state.timeWindowDays), endIdx: total };
}
function instrumentHasDoseD3(inst) {
return (inst.bars || []).some((b) => b.data_available && Number(b.confluence_dose || 0) >= 3);
}
function getFilteredInstruments() {
if (state.guildFilter === "ALL") return DATA.instruments;
return DATA.instruments.filter((inst) => inst.guilds.indexOf(state.guildFilter) !== -1);
let base = DATA.instruments;
if (state.guildFilter === "DOSE_D3") {
const d3 = DATA.instruments.filter(instrumentHasDoseD3);
base = d3.length ? d3 : DATA.instruments;
} else if (state.guildFilter !== "ALL") {
base = DATA.instruments.filter((inst) => inst.guilds.indexOf(state.guildFilter) !== -1);
}
const q = (state.tickerSearchQuery || "").trim().toLowerCase();
if (!q) return base;
const matched = base.filter((inst) => {
return (
String(inst.symbol || "").toLowerCase().includes(q) ||
String(inst.entity_eng || "").toLowerCase().includes(q) ||
String(inst.entity_ing || "").toLowerCase().includes(q) ||
String(inst.entity_ing_aq || "") === q ||
String(inst.entity_eng_aq || "") === q
);
});
return matched.length ? matched : base;
}
function getSelectedInstrument() {
@@ -295,7 +339,7 @@
guilds.forEach((g) => {
const btn = document.createElement("button");
btn.className = "pill" + (state.guildFilter === g ? " active" : "");
btn.textContent = g;
btn.textContent = g === "DOSE_D3" ? "\u0394 Dose D\u22653 (19d)" : g;
btn.onclick = function () {
state.guildFilter = g;
const list = getFilteredInstruments();
@@ -350,14 +394,54 @@
elModePills.appendChild(btn);
});
// Sliding Temporal Window Pills (Strategy 1A: 30D | 90D | 180D | ALL)
if (elTimeWindowPills) {
elTimeWindowPills.innerHTML = "";
timeWindows.forEach((tw) => {
const btn = document.createElement("button");
btn.className = "pill" + (state.timeWindowDays === tw.days ? " active" : "");
btn.textContent = tw.label;
btn.onclick = function () {
state.timeWindowDays = tw.days;
const rng = getActiveDateRange();
if (state.selectedDateIdx < rng.startIdx) state.selectedDateIdx = rng.endIdx - 1;
renderAll();
};
elTimeWindowPills.appendChild(btn);
});
}
elDateBadge.textContent = DATA.dates_utc[state.selectedDateIdx];
updateTradingViewLinks();
}
if (elTickerQuickFilter) {
elTickerQuickFilter.addEventListener("input", function () {
state.tickerSearchQuery = elTickerQuickFilter.value || "";
state.heatmapPage = 0;
const list = getFilteredInstruments();
if (list.length && !list.some((x) => x.symbol === state.selectedSymbol)) {
state.selectedSymbol = list[0].symbol;
}
renderAll();
});
}
if (elWireTapeFilter) {
elWireTapeFilter.addEventListener("input", function () {
state.wireTapeQuery = elWireTapeFilter.value || "";
renderInspectorAndLens();
});
}
function drawCanvas() {
const inst = getSelectedInstrument();
const bars = inst.bars;
const rng = getActiveDateRange();
const bars = inst.bars.slice(rng.startIdx, rng.endIdx);
const datesSlice = DATA.dates_utc.slice(rng.startIdx, rng.endIdx);
const wireSlice = DATA.daily_wire_series.slice(rng.startIdx, rng.endIdx);
const N = bars.length;
const localSelIdx = Math.max(0, Math.min(N - 1, state.selectedDateIdx - rng.startIdx));
const W = canvas.width;
const H = canvas.height;
ctx.clearRect(0, 0, W, H);
@@ -376,7 +460,7 @@
}
// Selected date vertical crosshair
const selX = xAt(state.selectedDateIdx);
const selX = xAt(localSelIdx);
ctx.strokeStyle = "rgba(245, 198, 48, 0.45)";
ctx.lineWidth = 1.5;
ctx.beginPath();
@@ -485,14 +569,14 @@
}
// Middle Pane: 00:00 GMT News Wire Equation Counts + Co-Presence Diamonds
const wireTotals = DATA.daily_wire_series.map((d) => Number(d.equation_counts.total || 0));
const wireTotals = wireSlice.map((d) => Number(d.equation_counts.total || 0));
const maxW = Math.max(10, Math.max.apply(null, wireTotals));
const barW = Math.max(6, Math.floor(plotW / N) - 5);
const barW = Math.max(2, Math.floor(plotW / Math.max(1, N)) - 3);
wireTotals.forEach((wt, idx) => {
const px = xAt(idx);
const bh = (wt / maxW) * (midY1 - midY0 - 14);
ctx.fillStyle = bars[idx].co_present_in_news_wire ? "#34d399" : "#a78bfa";
ctx.fillStyle = bars[idx] && bars[idx].co_present_in_news_wire ? "#34d399" : "#a78bfa";
ctx.fillRect(px - barW / 2, midY1 - bh, barW, bh);
});
@@ -516,9 +600,10 @@
ctx.fillText("Wire Eq", 6, midY0 + 12);
ctx.fillText("Vol20d", 6, botY0 + 12);
// Date ticks along bottom
for (let i = 0; i < N; i += 4) {
ctx.fillText(DATA.dates_utc[i].slice(5), xAt(i) - 14, H - 4);
// Date ticks along bottom (adaptive step so labels never overlap as N grows)
const tickStep = Math.max(4, Math.ceil(N / 8));
for (let i = 0; i < N; i += tickStep) {
ctx.fillText(datesSlice[i].slice(5), xAt(i) - 14, H - 4);
}
// Optional Tutorial Spotlight Ring & Callout Banner on Canvas
@@ -554,21 +639,32 @@
function renderHeatmap() {
const tbl = document.getElementById("heatmapTable");
const pagBar = document.getElementById("heatmapPaginationBar");
const filtered = getFilteredInstruments();
const rng = getActiveDateRange();
const totalRows = filtered.length;
const pageSize = state.heatmapShowAll ? Math.max(1, totalRows) : state.heatmapPageSize;
const totalPages = Math.max(1, Math.ceil(totalRows / pageSize));
if (state.heatmapPage >= totalPages) state.heatmapPage = totalPages - 1;
const rowStart = state.heatmapShowAll ? 0 : state.heatmapPage * pageSize;
const pageSlice = filtered.slice(rowStart, rowStart + pageSize);
let html = "<thead><tr><th class='sym-col'>Ticker (TV)</th>";
DATA.dates_utc.forEach((dt, idx) => {
for (let idx = rng.startIdx; idx < rng.endIdx; idx++) {
const dt = DATA.dates_utc[idx];
const selStyle = idx === state.selectedDateIdx ? "color:var(--gold);font-weight:700;" : "color:var(--text-muted);";
html += "<th style='" + selStyle + "'>" + dt.slice(8) + "</th>";
});
}
html += "</tr></thead><tbody>";
filtered.forEach((inst) => {
pageSlice.forEach((inst) => {
const rowSel = inst.symbol === state.selectedSymbol ? "background:rgba(34,211,238,0.12);" : "";
html += "<tr style='" + rowSel + "'><th class='sym-col'>";
html += "<span style='cursor:pointer;color:var(--text-main);' data-sym='" + inst.symbol + "' class='hm-sym-pick'>" + inst.symbol + "</span> ";
html += "<a href='" + inst.tradingview_url + "' target='_blank' rel='noopener noreferrer' style='color:var(--gold);text-decoration:none;' title='Open " + inst.tradingview_symbol + " on TradingView'>\u2197</a>";
html += "</th>";
inst.bars.forEach((b, dIdx) => {
for (let dIdx = rng.startIdx; dIdx < rng.endIdx; dIdx++) {
const b = inst.bars[dIdx];
let cls = "hm-cell hm-none";
if (!b.data_available) cls = "hm-cell hm-nodata";
else if (b.scope1_locks && b.scope1_locks.length > 0) cls = "hm-cell hm-scope1";
@@ -579,12 +675,35 @@
? (inst.symbol + " (" + b.date_utc + "): No data available")
: (inst.symbol + " (" + b.date_utc + "): $" + b.close_usd + " (" + (b.change_bps !== null ? b.change_bps + " bps" : "No bps data") + ") | Spoken AQ=" + b.close_spoken_ing_aq);
html += "<td><span class='" + cls + "' data-sym='" + inst.symbol + "' data-didx='" + dIdx + "' title='" + tip + "'></span></td>";
});
}
html += "</tr>";
});
html += "</tbody>";
tbl.innerHTML = html;
if (pagBar) {
if (totalRows <= state.heatmapPageSize) {
pagBar.style.display = "none";
pagBar.innerHTML = "";
} else {
pagBar.style.display = "flex";
pagBar.innerHTML =
"<span style='color:var(--text-muted);'>Showing " + (rowStart + 1) + "&ndash;" + Math.min(totalRows, rowStart + pageSize) + " of " + totalRows + " tickers</span>" +
"<div style='display:flex;gap:0.4rem;'>" +
"<button type='button' class='pill' id='hmPrevPageBtn'>&larr; Prev</button>" +
"<span style='padding:0.2rem 0.4rem;color:var(--gold);'>Page " + (state.heatmapPage + 1) + "/" + totalPages + "</span>" +
"<button type='button' class='pill' id='hmNextPageBtn'>Next &rarr;</button>" +
"<button type='button' class='pill' id='hmToggleAllBtn'>" + (state.heatmapShowAll ? "Paginate (25/p)" : "Show All (" + totalRows + ")") + "</button>" +
"</div>";
const pBtn = document.getElementById("hmPrevPageBtn");
const nBtn = document.getElementById("hmNextPageBtn");
const aBtn = document.getElementById("hmToggleAllBtn");
if (pBtn) pBtn.onclick = function () { state.heatmapPage = Math.max(0, state.heatmapPage - 1); renderHeatmap(); };
if (nBtn) nBtn.onclick = function () { state.heatmapPage = Math.min(totalPages - 1, state.heatmapPage + 1); renderHeatmap(); };
if (aBtn) aBtn.onclick = function () { state.heatmapShowAll = !state.heatmapShowAll; state.heatmapPage = 0; renderHeatmap(); };
}
}
tbl.querySelectorAll(".hm-cell").forEach((cell) => {
cell.addEventListener("click", function () {
state.selectedSymbol = cell.getAttribute("data-sym");
@@ -717,7 +836,17 @@
hdrEl.innerHTML =
"Dated 00:00 GMT Wire Dossier (<a href='" + resolveUrl(wireDay.archive_route) + "' target='_blank' style='color:var(--cyan);'>" +
wireDay.dossier_file + "</a> &bull; " + wireDay.equation_counts.total + " Verified Equations):";
tapeEl.innerHTML = (wireDay.sample_equations || [])
const wq = (state.wireTapeQuery || "").trim().toLowerCase();
const rawEqs = wireDay.sample_equations || [];
const filteredEqs = !wq ? rawEqs : rawEqs.filter((eq) => {
return (
String(eq.ing || "").toLowerCase().includes(wq) ||
String(eq.eng || "").toLowerCase().includes(wq) ||
String(eq.target || "") === wq ||
String(eq.breakdown || "").toLowerCase().includes(wq)
);
});
tapeEl.innerHTML = filteredEqs
.map(
(eq) => {
const dLink = resolveUrl(eq.dossier_deep_link || wireDay.archive_route);
@@ -927,8 +1056,10 @@
const relX = ((ev.clientX - rect.left) / rect.width) * canvas.width;
const padL = 62, padR = 28;
const ratio = (relX - padL) / (canvas.width - padL - padR);
const idx = Math.round(ratio * (DATA.dates_utc.length - 1));
state.selectedDateIdx = Math.max(0, Math.min(DATA.dates_utc.length - 1, idx));
const rng = getActiveDateRange();
const span = Math.max(1, rng.endIdx - rng.startIdx - 1);
const idx = rng.startIdx + Math.round(ratio * span);
state.selectedDateIdx = Math.max(rng.startIdx, Math.min(rng.endIdx - 1, idx));
renderAll();
});
@@ -1117,5 +1248,15 @@
}
};
const qParams = new URLSearchParams(window.location.search || "");
if (qParams.get("screen") === "dose-d3") {
state.guildFilter = "DOSE_D3";
const d3List = getFilteredInstruments();
if (d3List.length) {
state.selectedSymbol = d3List[0].symbol;
const d3BarIdx = (d3List[0].bars || []).findIndex((b) => b.data_available && Number(b.confluence_dose || 0) >= 3);
if (d3BarIdx >= 0) state.selectedDateIdx = d3BarIdx;
}
}
renderAll();
})();
+471 -73
View File
@@ -1,9 +1,36 @@
// /workspace/hyperstitionstudio-core/site/quant/quant-tutorials.js
// Option B Zero-MP4 Interactive HTML5 Canvas Tutorial Player & Deep-Link Choreographer (v2.4.0)
// Option B Zero-MP4 Interactive HTML5 Canvas Tutorial Player, Spoken Voice Narration & Per-Scene UI Element Indicators (v2.11.0)
(function () {
"use strict";
window.HyperstitionStudio = window.HyperstitionStudio || {};
const rootObj = typeof window !== "undefined" ? window : globalThis;
rootObj.HyperstitionStudio = rootObj.HyperstitionStudio || {};
const ALL_HIGHLIGHTABLE_DOM_IDS = [
"guildFilterPills",
"tickerQuickFilter",
"tickerSelect",
"openTradingViewBtn",
"lensSelect",
"metricModePills",
"timeWindowPills",
"activeDateBadge",
"tsCanvas",
"heatmapTable",
"heatmapPaginationBar",
"panel3TvBtn",
"dateMetricsGrid",
"lensProjectionCard",
"docReferencesCard",
"wireTapeFilterInput",
"wireEqTape",
"lagBarsContainer",
"exportCsvBtn",
"exportJsonBtn",
"periodicityAuditFooter",
"macroIndicatorsPanel",
"dailyBriefPanel"
];
const EPISODES = [
{
@@ -15,7 +42,10 @@
title: "1.1 Strict Periodicity Gate (21:30 UTC Close x 00:00 UTC Wire)",
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 26 },
spotlight: { target: "canvas", pane: "top", xRatio: 0.89, yRatio: 0.22, label: "Strict Periodicity Gate: 19 Real US Equity Sessions in Nov 2026" },
uiTargets: ["timeWindowPills", "activeDateBadge", "tsCanvas"],
uiElementLabel: "Temporal Window Pills (#timeWindowPills) & Active Date Badge (#activeDateBadge)",
subtitle: "Only real periodic timestamp-indexed observations (21:30 UTC US Closing-Bell bars and 00:00 UTC dated news dossiers) enter this workbench. Closed weekend/holiday dates explicitly report 'No data available'.",
speechText: "Scene 1.1. Inspecting the Temporal Window pills and Active Date badge in the top toolbar alongside Panel 1. Only real periodic timestamp-indexed observations, twenty-one thirty UTC US closing-bell bars and midnight UTC dated news dossiers, enter this workbench. Closed weekend and holiday dates explicitly report No data available.",
citations: [
{ label: "Vol 08A PDF (Room Filter)", href: "/encyclopedia/08-stakeholder-registers-idioms-and-pokedex-semiotics/a-to-h-ai-powered-race-to-hidden-chokepoint-screen.pdf#page=2&search=Room%20Filter" },
{ label: "Archive Methodology", href: "/archive/00-index-and-methodology.md#:~:text=closing-bell" },
@@ -26,7 +56,10 @@
title: "1.2 Guild S1 — Autoregressive AI Syndicate (Coordinate 292)",
state: { guildFilter: "S1", selectedSymbol: "MSFT", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 24 },
spotlight: { target: "canvas", pane: "top", xRatio: 0.83, yRatio: 0.28, label: "S1 AI Guild Filter Active (MSFT 2026-11-25 Close $489.93)" },
uiTargets: ["guildFilterPills", "tickerSelect"],
uiElementLabel: "Guild Filter Pills (#guildFilterPills -> S1) & Ticker Select (#tickerSelect)",
subtitle: "Filtering by Guild S1 isolates the Autoregressive AI Syndicate anchored on Coordinate 292 (shizohnalizis == abstrakt masheen == sinthetik dayta == asset management [Gen 0]).",
speechText: "Scene 1.2. Highlighting the Guild Filter pills and Ticker selector in the toolbar. Filtering by Guild S1 isolates the Autoregressive AI Syndicate anchored on Coordinate 292, where schizoanalysis, abstract machine, and synthetic data all converge in phonemic Ingglish.",
citations: [
{ label: "Vol 03A PDF (S1 AI)", href: "/encyclopedia/03-machinic-phylum-guilds-s1-to-s5/class-s1-autoregressive-ai-and-abstract-machine-a-to-z.pdf#page=1&search=292" },
{ label: "Dossier 65 (292 Lock)", href: "/zoology/dossiers/65-dossier-technocapital-singularity-autoregressive-ai.md#:~:text=292" },
@@ -37,7 +70,10 @@
title: "1.3 Guild S3 — Silicon-Photonic War Machine (137 & 81)",
state: { guildFilter: "S3", selectedSymbol: "ASML", selectedLens: "corporate_board", metricMode: "close_usd", selectedDateIdx: 26 },
spotlight: { target: "canvas", pane: "top", xRatio: 0.89, yRatio: 0.30, label: "S3 Isometric Chokepoint: ASML = asml = 81 (Δ = 0)" },
uiTargets: ["guildFilterPills", "tickerQuickFilter", "tickerSelect"],
uiElementLabel: "Guild Filter (#guildFilterPills -> S3) & Ticker Quick-Filter (#tickerQuickFilter)",
subtitle: "Guild S3 maps physical wafer and EUV lithography chokepoints: ASML (81, Δ = 0 isometric), TSMC (95, Δ = 0), and Nvidia (envideea = 137 [33rd Prime]).",
speechText: "Scene 1.3. Highlighting Guild Filter S3 and the Ticker Quick-Filter input in the toolbar. Guild S3 maps physical wafer and extreme ultraviolet lithography chokepoints: ASML at coordinate 81 with zero phonemic drift, TSMC at 95, and Nvidia at 137, the thirty-third prime.",
citations: [
{ label: "Vol 03C PDF (p.5 ASML/envideea)", href: "/encyclopedia/03-machinic-phylum-guilds-s1-to-s5/class-s3-silicon-war-machine-and-euv-swarm-a-to-z.pdf#page=5&search=envideea" },
{ label: "Dossier 67 (Silicon War Machine)", href: "/zoology/dossiers/67-dossier-technocapital-singularity-silicon-war-machine.md#:~:text=137" },
@@ -48,7 +84,10 @@
title: "1.4 Guild S6 — Apparatus of Capture (Coordinate 125)",
state: { guildFilter: "S6", selectedSymbol: "BLK", selectedLens: "corporate_board", metricMode: "spoken_aq", selectedDateIdx: 26 },
spotlight: { target: "canvas", pane: "top", xRatio: 0.86, yRatio: 0.26, label: "S6 Capture Ring: kapatal == kapcher == fohldz = 125" },
uiTargets: ["guildFilterPills", "tickerSelect"],
uiElementLabel: "Guild Filter Pills (#guildFilterPills -> S6) & Ticker Select (#tickerSelect -> BLK)",
subtitle: "Guild S6 tracks sovereign and balance-sheet capture around Coordinate 125 (kapatal == kapcher == fohldz = 125) and charter/sloth (136).",
speechText: "Scene 1.4. Highlighting Guild Filter S6 and the Ticker dropdown list selected to BlackRock. Guild S6 tracks sovereign and balance-sheet capture around Coordinate 125, where capital, capture, and folds all evaluate to 125.",
citations: [
{ label: "Vol 04A PDF (S6 Capture)", href: "/encyclopedia/04-capital-organizational-capture-s6/a-to-f-acquisition-to-fund.pdf#page=1&search=125" },
{ label: "Dossier 68 (Capture)", href: "/zoology/dossiers/68-dossier-technocapital-singularity-apparatus-of-capture.md#:~:text=125" },
@@ -59,7 +98,10 @@
title: "1.5 Periodicity Audit Footer & IPLD dag-json CIDv1",
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 26 },
spotlight: { target: "panel4", xRatio: 0.50, yRatio: 0.85, label: "Cryptographic CIDv1 & Periodicity Audit Footer" },
uiTargets: ["periodicityAuditFooter"],
uiElementLabel: "Periodicity Audit & CIDv1 Footer (#periodicityAuditFooter)",
subtitle: "The bottom footer verifies 21 dated 00:00 UTC dossiers + real exchange closing-bell bars (missing/closed days = null / No data available), and the deterministic IPLD dag-json CIDv1 digest.",
speechText: "Scene 1.5. Inspecting the Periodicity Audit footer at the bottom of Panel 4. This footer verifies the dated midnight UTC dossiers, real exchange closing-bell bars, and the deterministic IPLD dag-json CIDv1 content identifier.",
citations: [
{ label: "Static Bundle quant-timeseries.json", href: "/quant/quant-timeseries.json" },
{ label: "REST API /api/v1/quant/timeseries", href: "/api/v1/quant/timeseries?symbol=NVDA" },
@@ -77,7 +119,10 @@
title: "2.1 Top Pane: Dashed Crimson Identity Line & Real Scope 1 Self-Lock (PLTR)",
state: { guildFilter: "ALL", selectedSymbol: "PLTR", selectedLens: "fund_manager", metricMode: "close_usd", selectedDateIdx: 22 },
spotlight: { target: "canvas", pane: "top", xRatio: 0.76, yRatio: 0.25, label: "Real Scope 1 Self-Lock: PLTR Close $159.36 (159 == palanter)" },
uiTargets: ["metricModePills", "tsCanvas"],
uiElementLabel: "Metric Mode Pills (#metricModePills -> Close Price USD) & Panel 1 Canvas (#tsCanvas)",
subtitle: "On 2026-11-23, Palantir (PLTR) closed at $159.36 on the exchange: its rounded integer price (159) lands directly on the dashed crimson threshold marking its own Gen 1 Ingglish name (palanter = 159), firing a real Scope 1 Gold Beacon.",
speechText: "Scene 2.1. Highlighting the Metric Mode pills in the toolbar and the Top Pane of the Panel 1 trajectory canvas. On November 23, 2026, Palantir closed at 159 dollars and 36 cents: its rounded integer price 159 lands directly on the dashed crimson threshold marking its own Ingglish name palanter equals 159, firing a real Scope 1 Gold Beacon.",
citations: [
{ label: "Vol 03C PDF (S3 War Machine)", href: "/encyclopedia/03-machinic-phylum-guilds-s1-to-s5/class-s3-silicon-war-machine-and-euv-swarm-a-to-z.pdf#page=5&search=palanter" },
{ label: "Dossier 67 (Silicon War Machine)", href: "/zoology/dossiers/67-dossier-technocapital-singularity-silicon-war-machine.md#:~:text=137" },
@@ -88,7 +133,10 @@
title: "2.2 Move (BPS) Mode: TSMC (TSM) +81 bps Ring Migration & Microsoft -125 bps",
state: { guildFilter: "ALL", selectedSymbol: "TSM", selectedLens: "fund_manager", metricMode: "change_bps", selectedDateIdx: 17 },
spotlight: { target: "canvas", pane: "top", xRatio: 0.59, yRatio: 0.24, label: "Real Exchange Move: TSM +81 bps on 2026-11-18 (Ring 81 == asml)" },
uiTargets: ["metricModePills", "tsCanvas"],
uiElementLabel: "Metric Mode Pills (#metricModePills -> Move BPS) & Panel 1 Canvas (#tsCanvas)",
subtitle: "Switching Metric Mode to Move (BPS) on 2026-11-18 shows TSMC (TSM) moving +81 bps ($359.70 -> $362.62), landing on the S3 lithography coordinate 81 (asml = 81).",
speechText: "Scene 2.2. Highlighting the Metric Mode pills switched to Move in Basis Points. On November 18, 2026, TSMC moved plus 81 basis points, landing directly on the S3 lithography coordinate 81, matching ASML equals 81.",
citations: [
{ label: "Vol 03C PDF (ASML = 81)", href: "/encyclopedia/03-machinic-phylum-guilds-s1-to-s5/class-s3-silicon-war-machine-and-euv-swarm-a-to-z.pdf#page=1&search=ASML" },
{ label: "Graph Hub aq:81", href: "/graph/index.html?select=aq:81" }
@@ -98,7 +146,10 @@
title: "2.3 Real Repdigit Attractor Lock: Broadcom (AVGO) at $333.40 & NVDA Spoken 333",
state: { guildFilter: "ALL", selectedSymbol: "AVGO", selectedLens: "fund_manager", metricMode: "close_usd", selectedDateIdx: 15 },
spotlight: { target: "canvas", pane: "top", xRatio: 0.52, yRatio: 0.20, label: "Real Exchange Repdigit Lock: AVGO $333.40 on 2026-11-16 (333 = 3 x 111)" },
uiTargets: ["tickerSelect", "metricModePills", "tsCanvas"],
uiElementLabel: "Ticker Select (#tickerSelect -> AVGO) & Panel 1 Top Pane (#tsCanvas)",
subtitle: "On 2026-11-16, Broadcom (AVGO) closed at $333.40 (rounded integer 333 = 3 x 111), and on 2026-11-03 Nvidia (NVDA) closed at $206.69 ('too huhndrad siks' = 333), firing real Scope 1 Repdigit Gold Beacons.",
speechText: "Scene 2.3. Inspecting Ticker Select set to Broadcom and the Panel 1 trajectory canvas. On November 16, 2026, Broadcom closed at 333 dollars and 40 cents, rounding to the repdigit attractor 333, while Nvidia closed at 206 dollars and 69 cents whose spoken Ingglish phrase two hundred six also sums to 333.",
citations: [
{ label: "Vol 03C PDF (S3 Guild)", href: "/encyclopedia/03-machinic-phylum-guilds-s1-to-s5/class-s3-silicon-war-machine-and-euv-swarm-a-to-z.pdf#page=1&search=333" },
{ label: "Graph Hub aq:333", href: "/graph/index.html?select=aq:333" }
@@ -108,7 +159,10 @@
title: "2.4 Middle Pane: 00:00 GMT Wire Velocity & Emerald Scope 3 Bars",
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 28 },
spotlight: { target: "canvas", pane: "mid", xRatio: 0.93, yRatio: 0.63, label: "Emerald Bar = Scope 3 News-Wire Co-Presence" },
uiTargets: ["tsCanvas", "activeDateBadge"],
uiElementLabel: "Panel 1 Middle Pane (#tsCanvas Wire Velocity) & Active Date Badge (#activeDateBadge)",
subtitle: "In the middle pane, Violet bars show daily 333/666/777 equation counts; Emerald bars highlight UTC dates where the selected ticker co-occurred in breaking 00:00 GMT news headlines.",
speechText: "Scene 2.4. Inspecting the Middle Pane of the Panel 1 canvas. Violet bars show daily 333, 666, and 777 equation counts, while Emerald bars highlight UTC dates where the selected ticker co-occurred in breaking midnight GMT news headlines.",
citations: [
{ label: "Dossier 71 (2026-11-29)", href: "/archive/71-dossier-news-2026-11-29.md#:~:text=333" },
{ label: "REST Highlight Preview", href: "/api/v1/dossiers/71?highlight=envideea" }
@@ -118,7 +172,10 @@
title: "2.5 Bottom Pane: 20-Day Volume Ratio & M1/M2/M3 Thermodynamic Regimes",
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 25 },
spotlight: { target: "canvas", pane: "bot", xRatio: 0.83, yRatio: 0.86, label: "Thermodynamic Regime Color Coding (M1 Gold / M2 Crimson / M3 Sky)" },
uiTargets: ["tsCanvas"],
uiElementLabel: "Panel 1 Bottom Pane (#tsCanvas 20-Day Volume & M1/M2/M3 Regimes)",
subtitle: "The bottom pane color-codes 20d relative volume by objective thermodynamic state: Gold (<0.45x) = M1 Stagnation (137), Crimson (>=2.5x or <=-5%) = M2 Flash-Crash Surge (193), Sky-Blue = M3 Leviathan.",
speechText: "Scene 2.5. Inspecting the Bottom Pane of the Panel 1 canvas. Twenty-day relative volume bars are color-coded by thermodynamic regime: Gold for M1 Stagnation, Crimson for M2 Flash-Crash Surge, and Sky-Blue for M3 Leviathan.",
citations: [
{ label: "Vol 05A PDF (Subclass M1)", href: "/encyclopedia/05-memetic-superclass-and-emergent-m7/m1-vampiric-entropic-and-anti-productive-a-to-m.pdf#page=1&search=M1" },
{ label: "Vol 05C PDF (M2-M6)", href: "/encyclopedia/05-memetic-superclass-and-emergent-m7/m2-to-m6-kinetic-leviathan-mimetic-oracle-abyssal-a-to-z.pdf#page=1&search=M2" }
@@ -135,7 +192,10 @@
title: "3.1 Panel 2: 24x30 Heatmap & Explicit 'No Data Available' Handling (ANTHR-PVT & Weekends)",
state: { guildFilter: "ALL", selectedSymbol: "ANTHR-PVT", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 17 },
spotlight: { target: "panel2", xRatio: 0.50, yRatio: 0.40, label: "Zero Synthetic Data: ANTHR-PVT & Closed Market Days Show 'No data available'" },
uiTargets: ["heatmapTable", "dateMetricsGrid"],
uiElementLabel: "Panel 2 Spatiotemporal Lock Heatmap (#heatmapTable) & Panel 3 Metrics Grid (#dateMetricsGrid)",
subtitle: "This workbench never synthesizes or interpolates missing market data. Because Anthropic (ANTHR-PVT) is a private entity with no public exchange feed (and US stock markets close on weekends and Thanksgiving), those cells explicitly state 'No data available'.",
speechText: "Scene 3.1. Highlighting the Panel 2 Spatiotemporal Lock Heatmap table and the Panel 3 Date Metrics grid. This workbench never synthesizes or interpolates missing market data. Because Anthropic is a private entity with no public exchange feed, and US stock markets close on weekends and holidays, those cells explicitly report No data available.",
citations: [
{ label: "Vol 06A PDF (Anchor Revision)", href: "/encyclopedia/06-genealogical-vectors-and-quantitative-repricing/a-to-m-attractors-to-multi-build-flex-singularities.pdf#page=1&search=193" },
{ label: "Dossier 66 (193 Flash Crash)", href: "/zoology/dossiers/66-dossier-technocapital-singularity-flash-crash-liquidity.md#:~:text=193" },
@@ -146,7 +206,10 @@
title: "3.2 TradingView Superchart Launcher (Shortcut: T)",
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 26 },
spotlight: { target: "panel3", xRatio: 0.85, yRatio: 0.12, label: "Open TradingView Chart ↗ (Zero External Script Embeds)" },
uiTargets: ["openTradingViewBtn", "panel3TvBtn"],
uiElementLabel: "Open TradingView Chart Buttons (#openTradingViewBtn & #panel3TvBtn)",
subtitle: "Every ticker resolves deterministically to EXCHANGE:SYMBOL (e.g. NASDAQ:NVDA, closing at $150.49 on 2026-11-27). Clicking 'TradingView ↗' or pressing 'T' opens the live Superchart in a new window while keeping 0 external scripts embedded.",
speechText: "Scene 3.2. Highlighting the Open TradingView Chart buttons in the toolbar and Panel 3 header. Every ticker resolves deterministically to its exchange and symbol, such as NASDAQ colon NVDA. Clicking TradingView or pressing key T opens the live Superchart in a new window while keeping zero external tracking scripts embedded.",
citations: [
{ label: "Launch TradingView (NASDAQ:NVDA)", href: "https://www.tradingview.com/chart/?symbol=NASDAQ%3ANVDA" },
{ label: "Operator's Manual (PDF)", href: "/quant/OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH.pdf#page=1&search=TradingView" }
@@ -156,7 +219,10 @@
title: "3.3 Panel 3: Knowledge-Graph-Modeled Documentation & Cited Passages Card",
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 28 },
spotlight: { target: "docCard", xRatio: 0.50, yRatio: 0.50, label: "Passage-Encoded PDF (#page & search) + Dossier (#:~:text=) Links" },
uiTargets: ["docReferencesCard"],
uiElementLabel: "Panel 3 Documentation & Cited Passages Card (#docReferencesCard)",
subtitle: "Modeled directly on the Knowledge Graph's inspector drawer, the Documentation Card links every ticker to its exact Encyclopedia PDF page (#page=N&search=...), Dossier passage (#:~:text=...), and Graph node (?select=aq:N).",
speechText: "Scene 3.3. Highlighting the Documentation and Cited Passages card in Panel 3. Modeled directly on the Knowledge Graph inspector drawer, this card links every ticker to its exact Encyclopedia PDF page, Dossier scroll-to-text passage, and Knowledge Graph coordinate node.",
citations: [
{ label: "Vol 03C PDF (#page=5&search=envideea)", href: "/encyclopedia/03-machinic-phylum-guilds-s1-to-s5/class-s3-silicon-war-machine-and-euv-swarm-a-to-z.pdf#page=5&search=envideea" },
{ label: "Graph Deep Link (?select=aq:137)", href: "/graph/index.html?select=aq:137" },
@@ -167,7 +233,10 @@
title: "3.4 Panel 3: Verbatim Dated Memetic Equation Tape & Inline Passage Preview",
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 28 },
spotlight: { target: "wireTape", xRatio: 0.50, yRatio: 0.50, label: "Dated 333 / 666 / 777 Equations with Scroll-to-Text Deep Links" },
uiTargets: ["wireTapeFilterInput", "wireEqTape"],
uiElementLabel: "Panel 3 Wire Equation Filter (#wireTapeFilterInput) & Equation Tape (#wireEqTape)",
subtitle: "Every equation in the Dated Wire Tape includes a WICG scroll-to-text link (#:~:text=...), a Knowledge Graph coordinate link, and an inline REST passage preview button.",
speechText: "Scene 3.4. Highlighting the Wire Equation filter input and Dated Equation Tape in Panel 3. Every equation in the tape includes a scroll-to-text deep link, a Knowledge Graph coordinate link, and an inline REST passage preview button.",
citations: [
{ label: "Dossier 71 Scroll-to-Text", href: "/archive/71-dossier-news-2026-11-29.md#:~:text=333" },
{ label: "REST Dossier 71 JSON", href: "/api/v1/dossiers/71?highlight=333" }
@@ -177,7 +246,10 @@
title: "3.5 Bidirectional Graph & Dossier Cross-Verification",
state: { guildFilter: "ALL", selectedSymbol: "COIN", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 27 },
spotlight: { target: "docCard", xRatio: 0.50, yRatio: 0.50, label: "Cross-Corpus Coordinate Verification" },
uiTargets: ["tickerSelect", "docReferencesCard"],
uiElementLabel: "Ticker Select (#tickerSelect -> COIN) & Documentation Card (#docReferencesCard)",
subtitle: "Clicking any coordinate pill jumps straight to the Encyclopedia Knowledge Graph with that node centered and isolated in the right-hand drawer.",
speechText: "Scene 3.5. Highlighting Ticker Select set to Coinbase and the Panel 3 Documentation Card. Clicking any coordinate pill jumps straight to the Encyclopedia Knowledge Graph with that node centered and isolated in the right-hand inspector drawer.",
citations: [
{ label: "Graph Node aq:211", href: "/graph/index.html?select=aq:211" },
{ label: "Dossier 68 (S6 Capture)", href: "/zoology/dossiers/68-dossier-technocapital-singularity-apparatus-of-capture.md#:~:text=125" }
@@ -194,7 +266,10 @@
title: "4.1 Lens 1: Neutral Mathematical Substrate (neutral_math)",
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "neutral_math", metricMode: "spoken_aq", selectedDateIdx: 26 },
spotlight: { target: "lensCard", xRatio: 0.50, yRatio: 0.50, label: "Pure Lens-Neutral Keys (struct_* & ts_*)" },
uiTargets: ["lensSelect", "lensProjectionCard"],
uiElementLabel: "Projection Lens Dropdown List (#lensSelect -> Neutral Math) & Lens Card (#lensProjectionCard)",
subtitle: "Under the hood, quant-timeseries.json stores 100% lens-neutral mathematical keys (struct_isometric_armor, ts_duty_cycle_pct, ts_weighted_resonance, ts_excess_over_replacement, ts_optimal_lag_days).",
speechText: "Scene 4.1. Highlighting the Projection Lens dropdown list in the top toolbar and the Lens Projection card in Panel 3. Under the hood, the workbench stores one hundred percent lens-neutral mathematical keys: structural isometric armor, duty cycle percentage, weighted resonance, excess over replacement, and optimal lag days. Use the Projection Lens dropdown list in the toolbar to switch lenses.",
citations: [
{ label: "Schema quant-timeseries.schema.json", href: "/schemas/v1/quant-timeseries.schema.json" },
{ label: "Vol 08A PDF (Stakeholder Registers)", href: "/encyclopedia/08-stakeholder-registers-idioms-and-pokedex-semiotics/a-to-h-ai-powered-race-to-hidden-chokepoint-screen.pdf#page=1&search=Register" }
@@ -204,7 +279,10 @@
title: "4.2 Lens 2: Out-of-Sample Quantitative Factor Register (fund_manager)",
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 26 },
spotlight: { target: "lensCard", xRatio: 0.50, yRatio: 0.50, label: "Fund Manager Register: Signal Duty Cycle & Alpha Over Benchmark" },
uiTargets: ["lensSelect", "lensProjectionCard"],
uiElementLabel: "Projection Lens Dropdown List (#lensSelect -> Fund Manager) & Lens Card (#lensProjectionCard)",
subtitle: "Switching to 'Quant Factor (fund_manager)' translates the exact same 6 numbers into institutional factor terminology (Chokepoint Moat, Signal Duty Cycle %, Composite Resonance Load).",
speechText: "Scene 4.2. Highlighting the Projection Lens dropdown list switched to Quant Factor Fund Manager and the Panel 3 Lens Projection card. Selecting Fund Manager in the Projection Lens dropdown translates the exact same six mathematical invariants into institutional factor terminology: Chokepoint Moat, Signal Duty Cycle percentage, and Composite Resonance Load.",
citations: [
{ label: "Fund Manager Proposal (PDF)", href: "/zoology/proposal-fund-manager-novel-investment-discovery.pdf#page=1&search=Uncaptured" },
{ label: "REST Tier List (fund_manager)", href: "/api/v1/zoology/tier-list?register=fund_manager" }
@@ -214,7 +292,10 @@
title: "4.3 Lens 3: Corporate Board & Supply-Chain Governance (corporate_board)",
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "corporate_board", metricMode: "spoken_aq", selectedDateIdx: 26 },
spotlight: { target: "lensCard", xRatio: 0.50, yRatio: 0.50, label: "Corporate Board Register: Supply-Chain Moat & Stress-Test Delta" },
uiTargets: ["lensSelect", "lensProjectionCard"],
uiElementLabel: "Projection Lens Dropdown List (#lensSelect -> Corporate Board) & Lens Card (#lensProjectionCard)",
subtitle: "Switching to 'Corporate Board' frames those identical invariants as Supply-Chain Structural Moat, Cross-Unit Synergy, and Stress-Test Regime Delta.",
speechText: "Scene 4.3. Highlighting the Projection Lens dropdown list switched to Corporate Board and the Panel 3 Lens Projection card. Selecting Corporate Board in the Projection Lens dropdown frames those identical invariants as Supply-Chain Structural Moat, Cross-Unit Synergy, and Stress-Test Regime Delta.",
citations: [
{ label: "Corporate Board Proposal (PDF)", href: "/zoology/proposal-corporate-board-technocapital-allocation.pdf#page=1&search=Moat" },
{ label: "REST Tier List (corporate_board)", href: "/api/v1/zoology/tier-list?register=corporate_board" }
@@ -224,7 +305,10 @@
title: "4.4 Lens 4 & 5: TierZoo Ecology (ETI) & Fantasy Sabermetrics (SNAP% / WOPR / WAR)",
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "fantasy_sabermetrics", metricMode: "spoken_aq", selectedDateIdx: 26 },
spotlight: { target: "lensCard", xRatio: 0.50, yRatio: 0.50, label: "Fantasy Sabermetrics: SNAP%, WOPR, WAR (30d) & Matchup Splits" },
uiTargets: ["lensSelect", "lensProjectionCard"],
uiElementLabel: "Projection Lens Dropdown List (#lensSelect -> Fantasy Sabermetrics) & Lens Card (#lensProjectionCard)",
subtitle: "Switching to 'Fantasy Sabermetrics' projects SNAP% (Active Lock Share), WOPR (1.5x Target Share + 0.7x Air-Yards Share), and WAR (30d Wins Above Tier D Replacement).",
speechText: "Scene 4.4. Highlighting the Projection Lens dropdown list switched to Fantasy Sabermetrics and the Panel 3 Lens Projection card. Selecting Fantasy Sabermetrics in the Projection Lens dropdown projects Snap Percentage, Weighted Opportunity Rating, and thirty-day Wins Above Replacement.",
citations: [
{ label: "ETI Tier List Scorecard (PDF)", href: "/zoology/tier-list-technocapital-assemblage-builds.pdf#page=1&search=ETI" },
{ label: "Vol 07A PDF (ETI Ontology)", href: "/encyclopedia/07-ecological-trophic-index-and-tier-list/a-to-z-arm-chokepoint-armor-to-zoological-tie-breaker.pdf#page=1&search=ETI" }
@@ -234,7 +318,10 @@
title: "4.5 Lens 6: Gen IV Pokédex Field-Scanner (DEX #137)",
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "pokedex_scanner", metricMode: "spoken_aq", selectedDateIdx: 26 },
spotlight: { target: "lensCard", xRatio: 0.50, yRatio: 0.50, label: "Gen IV Pokédex Scanner: DEX #137, Nature, Ability & EV Yield" },
uiTargets: ["lensSelect", "lensProjectionCard"],
uiElementLabel: "Projection Lens Dropdown List (#lensSelect -> Pokedex Scanner) & Lens Card (#lensProjectionCard)",
subtitle: "Switching to 'Pokédex Scanner' deterministically derives Gen IV attributes (DEX #137, Nature, Passive Ability, EV Yield) from the real time-series moments—and remains 100% removable via ENABLED_LENSES.",
speechText: "Scene 4.5. Highlighting the Projection Lens dropdown list switched to Pokedex Scanner and the Panel 3 Lens Projection card. Selecting Pokedex Scanner deterministically derives Gen 4 attributes including Dex number 137, Nature, Passive Ability, and Effort Value Yield from the real time-series moments.",
citations: [
{ label: "REST Pokédex Endpoint (/api/v1/zoology/pokedex/NVDA)", href: "/api/v1/zoology/pokedex/NVDA" },
{ label: "Vol 08B PDF (Pokédex Semiotics)", href: "/encyclopedia/08-stakeholder-registers-idioms-and-pokedex-semiotics/i-to-z-idiosyncratic-prime-screen-to-united-fidelity.pdf#page=1&search=Pokedex" }
@@ -251,7 +338,10 @@
title: "5.1 Panel 4: Lead-Lag Cross-Correlation Curve r(tau) across [-5 .. +5] Days",
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 26 },
spotlight: { target: "panel4", xRatio: 0.50, yRatio: 0.45, label: "Pearson Cross-Correlation r(tau) & Gold Optimal Causal Lag tau*" },
uiTargets: ["lagBarsContainer"],
uiElementLabel: "Panel 4 Lead-Lag Cross-Correlation Bar Chart (#lagBarsContainer)",
subtitle: "Panel 4 computes the empirical Pearson cross-correlation r(tau) between daily 00:00 GMT news-wire equation velocity M_t and unsigned basis-point displacement |Δbps_{i, t+tau}| across lags tau in [-5, +5] days.",
speechText: "Scene 5.1. Highlighting the Lead-Lag Cross-Correlation bar chart in Panel 4. Panel 4 computes the empirical Pearson cross-correlation r of tau between daily midnight GMT news-wire equation velocity and unsigned basis-point price displacement across lags from minus 5 to plus 5 days.",
citations: [
{ label: "Operator's Manual (Panel 4 Math)", href: "/quant/OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH.pdf#page=2&search=Correlation" },
{ label: "Graph Mode 2 Concentric Radar", href: "/graph/index.html?select=aq:137&mode=mode2_radar" }
@@ -261,7 +351,10 @@
title: "5.2 Interpreting Optimal Causal Lag tau* (Leader vs. Synchronizer vs. Follower)",
state: { guildFilter: "ALL", selectedSymbol: "ASML", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 26 },
spotlight: { target: "panel4", xRatio: 0.58, yRatio: 0.45, label: "Gold Bar Marks argmax |r(tau)|" },
uiTargets: ["tickerSelect", "lagBarsContainer"],
uiElementLabel: "Ticker Select (#tickerSelect -> ASML) & Panel 4 Lead-Lag Bars (#lagBarsContainer)",
subtitle: "The Gold bar highlights tau* = argmax |r(tau)|: tau* > 0 indicates a Teleoplexic Wire Leader (midnight wire velocity leads market volatility), tau* = 0 an Instantaneous Synchronizer, and tau* < 0 a Narrative Follower.",
speechText: "Scene 5.2. Highlighting the Gold optimal lag bar in Panel 4. The Gold bar marks tau star, the lag maximizing absolute correlation: positive tau star indicates a Teleoplexic Wire Leader, zero indicates an Instantaneous Synchronizer, and negative tau star indicates a Narrative Follower.",
citations: [
{ label: "Vol 03C PDF (ASML)", href: "/encyclopedia/03-machinic-phylum-guilds-s1-to-s5/class-s3-silicon-war-machine-and-euv-swarm-a-to-z.pdf#page=1&search=ASML" },
{ label: "Graph Node aq:81", href: "/graph/index.html?select=aq:81" }
@@ -271,17 +364,23 @@
title: "5.3 Portable .CSV & Lens-Neutral .JSON Slice Exports",
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "neutral_math", metricMode: "spoken_aq", selectedDateIdx: 26 },
spotlight: { target: "panel4", xRatio: 0.82, yRatio: 0.14, label: "One-Click .CSV & Lens-Neutral .JSON Export" },
uiTargets: ["exportCsvBtn", "exportJsonBtn"],
uiElementLabel: "Panel 4 Export Buttons (#exportCsvBtn & #exportJsonBtn)",
subtitle: "Click 'Export Filtered Series (.CSV)' or 'Export Lens-Neutral Slice (.JSON)' in the Panel 4 header to download any ticker's 30-day periodic bar table and structural/time-series vectors for offline research.",
speechText: "Scene 5.3. Highlighting the Export Filtered Series CSV and Export Lens-Neutral Slice JSON buttons in the Panel 4 header. Click either button to download any ticker's thirty-day periodic bar table and structural vectors for offline research.",
citations: [
{ label: "Raw Bundle quant-timeseries.json", href: "/quant/quant-timeseries.json" },
{ label: "Schema quant-timeseries.schema.json", href: "/schemas/v1/quant-timeseries.schema.json" }
]
},
{
title: "5.4 Unified Stateless REST API v1 (/api/v1/*) & OpenAPI 3.1.0",
title: "5.4 Panel 5 FRED Macro Strip & Unified Stateless REST API v1 (/api/v1/*)",
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 26 },
spotlight: { target: "docCard", xRatio: 0.50, yRatio: 0.50, label: "Programmatic REST API v1 & OpenAPI 3.1.0" },
uiTargets: ["macroIndicatorsPanel", "docReferencesCard"],
uiElementLabel: "Panel 5 FRED Macroeconomic Telemetry (#macroIndicatorsPanel) & REST API Links (#docReferencesCard)",
subtitle: "Every readout on /quant/ is also queryable over HTTP GET/POST via /api/v1/quant/timeseries, /api/v1/quant/instruments/{symbol}, /api/v1/dossiers/{number}?highlight=..., and /api/v1/openapi.json.",
speechText: "Scene 5.4. Highlighting Panel 5 Federal Reserve Macroeconomic Telemetry and the Panel 3 REST API links. Every readout on the workbench is also queryable programmatically over HTTP via the version 1 REST API and OpenAPI 3.1 specification.",
citations: [
{ label: "OpenAPI 3.1.0 Spec (/api/v1/openapi.json)", href: "/api/v1/openapi.json" },
{ label: "REST Status (/api/v1/status)", href: "/api/v1/status" },
@@ -289,10 +388,13 @@
]
},
{
title: "5.5 Complete Tour Summary & Companion Operator's Manual",
title: "5.5 Panel 6 Daily Bayesian Brief & Complete Tour Summary",
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 26 },
spotlight: { target: "canvas", pane: "top", xRatio: 0.89, yRatio: 0.25, label: "Tour Complete — Explore Any Ticker, Lens, or Deep Citation" },
uiTargets: ["dailyBriefPanel", "lensSelect"],
uiElementLabel: "Panel 6 Daily Bayesian Regime Update (#dailyBriefPanel) & Projection Lens Dropdown (#lensSelect)",
subtitle: "You have completed all 5 episodes of the /quant/ guided walkthrough. Open the Companion Operator's Manual (PDF) or click any heatmap cell, lens, or deep citation link to continue exploring.",
speechText: "Scene 5.5. Highlighting Panel 6, the five-agenda Daily Bayesian Portfolio and Memetic Regime Update, and the Projection Lens dropdown list. You have completed all five episodes of the guided walkthrough. Open the Companion Operator's Manual PDF or click any heatmap cell, projection lens, or deep citation link to continue exploring.",
citations: [
{ label: "Operator's Manual (PDF)", href: "/quant/OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH.pdf" },
{ label: "Interactive Knowledge Graph (/graph/)", href: "/graph/index.html?select=aq:137" },
@@ -344,24 +446,48 @@
let isPlaying = false;
let playTimer = null;
let speechEnabled = true; // Enabled by default so tour playback narrates immediately
let activeVoiceEngine = "Auto";
let cachedVoices = [];
let audioCtx = null;
let activeAudioEl = null;
let activeAudioEqConnected = false;
let formantStopFlag = false;
function refreshVoices() {
if (typeof window.speechSynthesis === "undefined") return;
if (typeof window === "undefined" || typeof window.speechSynthesis === "undefined") return;
try {
cachedVoices = window.speechSynthesis.getVoices() || [];
} catch (_) {
cachedVoices = [];
}
}
if (typeof window.speechSynthesis !== "undefined") {
if (typeof window !== "undefined" && typeof window.speechSynthesis !== "undefined") {
refreshVoices();
if (typeof window.speechSynthesis.onvoiceschanged !== "undefined") {
window.speechSynthesis.onvoiceschanged = refreshVoices;
}
}
function cleanTextForSpeech(rawText, uiElementLabel) {
let base = String(rawText || "");
if (uiElementLabel && base.indexOf("Inspecting") === -1 && base.indexOf("Highlighting") === -1) {
base = "Inspecting " + uiElementLabel + ". " + base;
}
return base
.replace(/\|Δbps_\{i,\s*t\+tau\}\|/g, "absolute basis point displacement at lag tau")
.replace(/r\(tau\)/g, "r of tau")
.replace(/tau\*/g, "tau star")
.replace(/Δ\s*=\s*0/g, "delta equals zero")
.replace(/==/g, " equals ")
.replace(/#:~:text=/g, "scroll to text ")
.replace(/struct_\*/g, "structural keys")
.replace(/ts_\*/g, "time series keys")
.replace(/24x30/g, "24 by 30")
.replace(/↗/g, "")
.replace(/\s+/g, " ")
.trim();
}
function playWebAudioTelemetryChime(stepIdx) {
try {
const Ctx = window.AudioContext || window.webkitAudioContext;
@@ -371,18 +497,20 @@
const baseFreqs = [292.0, 333.0, 394.0, 444.0, 528.0];
const f0 = baseFreqs[stepIdx % baseFreqs.length];
const now = audioCtx.currentTime;
// Strategy 3A: Duck chime gain by -50% (0.012 vs 0.025) when Voice: ON is active so opening words are never masked
const peakGain = speechEnabled ? 0.012 : 0.025;
[f0, f0 * 1.25, f0 * 1.5].forEach(function (freq, i) {
const osc = audioCtx.createOscillator();
const gain = audioCtx.createGain();
osc.type = i === 0 ? "triangle" : "sine";
osc.frequency.setValueAtTime(freq, now + i * 0.09);
gain.gain.setValueAtTime(0.001, now + i * 0.09);
gain.gain.exponentialRampToValueAtTime(0.06, now + i * 0.09 + 0.03);
gain.gain.exponentialRampToValueAtTime(0.0001, now + i * 0.09 + 0.45);
gain.gain.exponentialRampToValueAtTime(peakGain, now + i * 0.09 + 0.03);
gain.gain.exponentialRampToValueAtTime(0.0001, now + i * 0.09 + 0.35);
osc.connect(gain);
gain.connect(audioCtx.destination);
osc.start(now + i * 0.09);
osc.stop(now + i * 0.09 + 0.48);
osc.stop(now + i * 0.09 + 0.38);
});
} catch (_) {}
}
@@ -395,54 +523,269 @@
}, delayMs);
}
function speakSubtitle(text, onDoneCallback) {
function stopAllVoiceOutputs() {
formantStopFlag = true;
if (activeAudioEl) {
try {
activeAudioEl.pause();
activeAudioEl.currentTime = 0;
} catch (_) {}
}
if (typeof window !== "undefined" && typeof window.speechSynthesis !== "undefined") {
try {
if (window.speechSynthesis.speaking || window.speechSynthesis.pending) {
window.speechSynthesis.cancel();
}
} catch (_) {}
}
rootObj.__hsActiveUtterance = null;
}
// Tier 3 In-Browser Klatt Formant WebAudio Speech Synthesizer (for offline file:// when getVoices() === [])
function playInBrowserFormantSpeech(speechText, onFinish) {
try {
const Ctx = (typeof window !== "undefined") && (window.AudioContext || window.webkitAudioContext);
if (!Ctx) {
if (onFinish) onFinish();
return;
}
if (!audioCtx) audioCtx = new Ctx();
if (audioCtx.state === "suspended") audioCtx.resume();
formantStopFlag = false;
activeVoiceEngine = "Formant Synth";
renderTutorialUI();
const words = String(speechText || "").toLowerCase().match(/[a-z0-9]+|[.,;:!?]/g) || [];
const vowelMap = {
a: [660, 1350],
e: [510, 1880],
i: [370, 2050],
o: [520, 950],
u: [380, 1050],
y: [320, 2100]
};
let tOffset = audioCtx.currentTime + 0.04;
const maxWords = Math.min(words.length, 48);
for (let wi = 0; wi < maxWords; wi++) {
const w = words[wi];
if (w === "." || w === "!" || w === "?") {
tOffset += 0.14;
continue;
}
if (w === "," || w === ";" || w === ":") {
tOffset += 0.07;
continue;
}
const vowels = w.match(/[aeiouy]/g) || ["a"];
const f0 = 116.0 - 14.0 * ((wi % 10) / 10.0);
for (let vi = 0; vi < Math.min(vowels.length, 3); vi++) {
const vf = vowelMap[vowels[vi]] || [580, 1250];
const dur = 0.075;
const osc0 = audioCtx.createOscillator();
const osc1 = audioCtx.createOscillator();
const osc2 = audioCtx.createOscillator();
const gain = audioCtx.createGain();
osc0.type = "sawtooth";
osc1.type = "sine";
osc2.type = "sine";
osc0.frequency.setValueAtTime(f0, tOffset);
osc1.frequency.setValueAtTime(vf[0], tOffset);
osc2.frequency.setValueAtTime(vf[1], tOffset);
gain.gain.setValueAtTime(0.0001, tOffset);
gain.gain.linearRampToValueAtTime(0.045, tOffset + 0.015);
gain.gain.exponentialRampToValueAtTime(0.0001, tOffset + dur);
osc0.connect(gain);
osc1.connect(gain);
osc2.connect(gain);
gain.connect(audioCtx.destination);
osc0.start(tOffset);
osc1.start(tOffset);
osc2.start(tOffset);
osc0.stop(tOffset + dur + 0.01);
osc1.stop(tOffset + dur + 0.01);
osc2.stop(tOffset + dur + 0.01);
tOffset += dur;
}
tOffset += 0.025;
}
const totalDurMs = Math.max(2500, Math.round((tOffset - audioCtx.currentTime) * 1000));
setTimeout(function () {
if (!formantStopFlag && onFinish) onFinish();
}, totalDurMs);
} catch (_) {
if (onFinish) onFinish();
}
}
// Tier 2 Deploy-Time Untracked WAV Playback (/quant/audio/ep0X-sY.wav) -> Tier 3 Formant Fallback
function playDeployTimeWavOrFormant(clipId, rawSpeech, onFinish) {
if (typeof document === "undefined" || typeof Audio === "undefined") {
playInBrowserFormantSpeech(rawSpeech, onFinish);
return;
}
try {
if (!activeAudioEl) {
activeAudioEl = document.getElementById("tutVoiceAudio");
if (!activeAudioEl) {
activeAudioEl = document.createElement("audio");
activeAudioEl.id = "tutVoiceAudio";
activeAudioEl.preload = "auto";
activeAudioEl.style.display = "none";
document.body.appendChild(activeAudioEl);
}
}
// Strategy 3A: Route #tutVoiceAudio through a WebAudio BiquadFilterNode vocal warmth EQ (+2.5 dB @ 220 Hz, -3.0 dB @ 4.8 kHz)
if (!activeAudioEqConnected && typeof window !== "undefined" && window.location && window.location.protocol !== "file:") {
try {
const Ctx = window.AudioContext || window.webkitAudioContext;
if (Ctx) {
if (!audioCtx) audioCtx = new Ctx();
if (audioCtx.state === "suspended") audioCtx.resume();
const srcNode = audioCtx.createMediaElementSource(activeAudioEl);
const lowShelf = audioCtx.createBiquadFilter();
lowShelf.type = "lowshelf";
lowShelf.frequency.value = 220.0;
lowShelf.gain.value = 2.5;
const deEssPeak = audioCtx.createBiquadFilter();
deEssPeak.type = "peaking";
deEssPeak.frequency.value = 4800.0;
deEssPeak.Q.value = 1.4;
deEssPeak.gain.value = -3.0;
srcNode.connect(lowShelf);
lowShelf.connect(deEssPeak);
deEssPeak.connect(audioCtx.destination);
activeAudioEqConnected = true;
}
} catch (_) {
activeAudioEqConnected = true;
}
}
const wavUrl = "./audio/" + clipId + ".wav";
let handled = false;
const doneOnce = function () {
if (handled) return;
handled = true;
if (onFinish) onFinish();
};
activeAudioEl.onended = doneOnce;
activeAudioEl.onerror = function () {
if (handled) return;
handled = true;
playInBrowserFormantSpeech(rawSpeech, onFinish);
};
activeAudioEl.src = wavUrl;
const playPromise = activeAudioEl.play();
activeVoiceEngine = "WAV Audio";
renderTutorialUI();
if (playPromise && typeof playPromise.catch === "function") {
playPromise.catch(function () {
if (handled) return;
handled = true;
playInBrowserFormantSpeech(rawSpeech, onFinish);
});
}
} catch (_) {
playInBrowserFormantSpeech(rawSpeech, onFinish);
}
}
// Strategies 1A, 2A & 3A: Guarded cancel(), GC-pinned utterance, 250ms onstart watchdog & 3-tier fallback
function speakSubtitle(kfOrText, onDoneCallback) {
if (!speechEnabled) {
if (onDoneCallback) scheduleNextStep(7000);
return;
}
// Always play a subtle harmonic telemetry cue at scene start so audio feedback is immediate even if OS TTS voices are absent
playWebAudioTelemetryChime(curStepIdx);
const rawSpeech = (kfOrText && typeof kfOrText === "object")
? (kfOrText.speechText || cleanTextForSpeech(kfOrText.subtitle, kfOrText.uiElementLabel))
: cleanTextForSpeech(String(kfOrText || ""), "");
const clipId = "ep0" + (curEpIdx + 1) + "-s" + (curStepIdx + 1);
stopAllVoiceOutputs();
playWebAudioTelemetryChime(curStepIdx);
refreshVoices();
if (typeof window.speechSynthesis === "undefined" || cachedVoices.length === 0) {
if (onDoneCallback) scheduleNextStep(7500);
let settled = false;
const finishSceneSpeech = function () {
if (settled) return;
settled = true;
rootObj.__hsActiveUtterance = null;
if (onDoneCallback && isPlaying) {
scheduleNextStep(1600);
}
};
const estMs = Math.max(8500, Math.min(22000, rawSpeech.split(/\s+/).length * 410));
if (onDoneCallback && isPlaying) {
scheduleNextStep(estMs);
}
// If browser has no speechSynthesis or 0 installed OS voices (common on Linux/Fedora desktops),
// immediately play the deploy-time WAV track (or Formant Synth fallback) so voice is 100% audible!
if (
typeof window === "undefined" ||
typeof window.speechSynthesis === "undefined" ||
typeof SpeechSynthesisUtterance === "undefined" ||
cachedVoices.length === 0
) {
playDeployTimeWavOrFormant(clipId, rawSpeech, finishSceneSpeech);
return;
}
try {
window.speechSynthesis.cancel();
window.speechSynthesis.resume();
setTimeout(function () {
if (!speechEnabled) return;
const u = new SpeechSynthesisUtterance(text);
const preferred = cachedVoices.find(function (v) {
return /en(-|_)(US|GB)/i.test(v.lang) && /natural|neural|google|english/i.test(v.name);
}) || cachedVoices.find(function (v) {
return /^en/i.test(v.lang);
}) || cachedVoices[0];
if (preferred) u.voice = preferred;
u.rate = 1.03;
u.pitch = 1.0;
u.volume = 1.0;
let settled = false;
const finish = function () {
if (settled) return;
settled = true;
if (onDoneCallback && isPlaying) {
scheduleNextStep(1800);
if (typeof window.speechSynthesis.resume === "function") {
window.speechSynthesis.resume();
}
const u = new SpeechSynthesisUtterance(rawSpeech);
// Strategy 2A: Pin u on rootObj so Chromium/WebKit GC never collects the utterance mid-speech
rootObj.__hsActiveUtterance = u;
const preferred = cachedVoices.find(function (v) {
return /en(-|_)(US|GB)/i.test(v.lang) && /natural|neural|google|english/i.test(v.name);
}) || cachedVoices.find(function (v) {
return /^en/i.test(v.lang);
}) || cachedVoices[0];
if (preferred) u.voice = preferred;
u.lang = "en-US";
u.rate = 1.03;
u.pitch = 1.0;
u.volume = 1.0;
let speechStarted = false;
let fallbackTriggered = false;
const triggerFallback = function () {
if (fallbackTriggered || settled || !speechEnabled) return;
fallbackTriggered = true;
try {
if (window.speechSynthesis.speaking || window.speechSynthesis.pending) {
window.speechSynthesis.cancel();
}
};
u.onend = finish;
u.onerror = finish;
window.speechSynthesis.speak(u);
// Safety fallback timer in case browser TTS engine stalls without firing onend
const estMs = Math.max(8500, Math.min(20000, text.split(/\s+/).length * 420));
if (onDoneCallback && isPlaying) {
scheduleNextStep(estMs);
} catch (_) {}
playDeployTimeWavOrFormant(clipId, rawSpeech, finishSceneSpeech);
};
u.onstart = function () {
speechStarted = true;
activeVoiceEngine = "WebSpeech";
renderTutorialUI();
};
u.onend = function () {
if (!fallbackTriggered) finishSceneSpeech();
};
u.onerror = function () {
if (!speechStarted) triggerFallback();
else finishSceneSpeech();
};
window.speechSynthesis.speak(u);
// Strategy 2A: 250ms hardware watchdog — if OS speech-dispatcher socket is hung and onstart never fires,
// automatically switch to deploy-time WAV / WebAudio formant synth so the user always hears the narration!
setTimeout(function () {
if (!speechStarted && !settled && speechEnabled) {
triggerFallback();
}
}, 60);
}, 250);
} catch (_) {
if (onDoneCallback) scheduleNextStep(7500);
playDeployTimeWavOrFormant(clipId, rawSpeech, finishSceneSpeech);
}
}
@@ -451,24 +794,65 @@
return ep.keyframes[curStepIdx] || ep.keyframes[0];
}
function highlightDomTarget(targetId) {
["heatmapTable", "lensProjectionCard", "docReferencesCard", "wireEqTape", "lagBarsContainer"].forEach(function (id) {
// Strategy 2A: Highlight all 18+ interactive DOM controls (including #lensSelect in Ep 04) + floating pointer badge
function highlightDomTarget(kfOrTargetId) {
ALL_HIGHLIGHTABLE_DOM_IDS.forEach(function (id) {
const el = document.getElementById(id);
if (el) el.style.boxShadow = "";
if (el) {
el.style.boxShadow = "";
el.classList.remove("tut-ui-highlight");
}
});
const map = {
panel2: "heatmapTable",
lensCard: "lensProjectionCard",
docCard: "docReferencesCard",
wireTape: "wireEqTape",
panel4: "lagBarsContainer"
const badge = document.getElementById("tutUiElementIndicator");
if (!kfOrTargetId) {
if (badge) badge.style.display = "none";
return;
}
const legacyMap = {
panel2: ["heatmapTable"],
lensCard: ["lensSelect", "lensProjectionCard"],
docCard: ["docReferencesCard"],
wireTape: ["wireTapeFilterInput", "wireEqTape"],
panel4: ["lagBarsContainer"],
panel3: ["openTradingViewBtn", "panel3TvBtn"],
canvas: ["tsCanvas"]
};
const domId = map[targetId];
if (domId) {
let targetIds = [];
let badgeText = "";
if (typeof kfOrTargetId === "object") {
if (Array.isArray(kfOrTargetId.uiTargets) && kfOrTargetId.uiTargets.length > 0) {
targetIds = kfOrTargetId.uiTargets.slice();
} else if (kfOrTargetId.spotlight && kfOrTargetId.spotlight.target) {
targetIds = legacyMap[kfOrTargetId.spotlight.target] || [kfOrTargetId.spotlight.target];
}
badgeText = kfOrTargetId.uiElementLabel || ("UI ELEMENT: #" + (targetIds[0] || "tsCanvas"));
} else if (typeof kfOrTargetId === "string") {
targetIds = legacyMap[kfOrTargetId] || [kfOrTargetId];
badgeText = "UI ELEMENT: #" + targetIds[0];
}
let primaryEl = null;
targetIds.forEach(function (domId) {
const el = document.getElementById(domId);
if (el) {
el.style.boxShadow = "0 0 0 2px #f5c630, 0 0 18px rgba(245, 198, 48, 0.35)";
el.classList.add("tut-ui-highlight");
el.style.boxShadow = "0 0 0 2px #f5c630, 0 0 18px rgba(245, 198, 48, 0.45)";
if (!primaryEl) primaryEl = el;
}
});
if (badge && primaryEl && typeof primaryEl.getBoundingClientRect === "function") {
const rect = primaryEl.getBoundingClientRect();
const topPx = Math.max(8, Math.min(window.innerHeight - 36, rect.top - 28));
const leftPx = Math.max(8, Math.min(window.innerWidth - 320, rect.left));
badge.textContent = "\u25BC ACTIVE UI ELEMENT: " + badgeText;
badge.style.top = topPx + "px";
badge.style.left = leftPx + "px";
badge.style.display = "block";
} else if (badge) {
badge.style.display = "none";
}
}
@@ -478,10 +862,10 @@
if (app && typeof app.setStateAndRender === "function") {
app.setStateAndRender(kf.state, kf.spotlight);
}
highlightDomTarget(kf.spotlight && kf.spotlight.target);
highlightDomTarget(kf);
renderTutorialUI();
if (narrateNow || isPlaying) {
speakSubtitle(kf.subtitle, isPlaying);
speakSubtitle(kf, isPlaying);
}
}
@@ -522,9 +906,7 @@
clearTimeout(playTimer);
playTimer = null;
}
if (typeof window.speechSynthesis !== "undefined") {
try { window.speechSynthesis.cancel(); } catch (_) {}
}
stopAllVoiceOutputs();
renderTutorialUI();
}
@@ -562,16 +944,20 @@
if (speechBtn) {
speechBtn.textContent = speechEnabled ? "\uD83D\uDD0A Voice: ON" : "\uD83D\uDD07 Voice: OFF";
speechBtn.className = speechEnabled ? "btn primary" : "btn";
speechBtn.title = speechEnabled
? ("Active Voice Engine: " + activeVoiceEngine + " (Click to mute)")
: "Voice Narration Muted (Click to enable spoken narration)";
}
if (stepBadge) {
stepBadge.textContent = ep.code + " \u2022 Scene " + (curStepIdx + 1) + "/" + ep.keyframes.length;
const voxTag = speechEnabled ? (" \u2022 \uD83D\uDD0A " + activeVoiceEngine) : "";
stepBadge.textContent = ep.code + " \u2022 Scene " + (curStepIdx + 1) + "/" + ep.keyframes.length + voxTag + (kf.uiElementLabel ? " \u2022 [" + kf.uiElementLabel + "]" : "");
}
if (scrubber) {
scrubber.max = String(ep.keyframes.length - 1);
scrubber.value = String(curStepIdx);
}
if (titleEl) {
titleEl.textContent = kf.title;
titleEl.textContent = kf.title + (kf.uiElementLabel ? " \u2014 UI Element: " + kf.uiElementLabel : "");
}
if (subEl) {
subEl.textContent = kf.subtitle;
@@ -614,10 +1000,8 @@
if (speechBtn) {
speechBtn.onclick = function () {
speechEnabled = !speechEnabled;
if (speechEnabled) speakSubtitle(getActiveKeyframe().subtitle, isPlaying);
else if (typeof window.speechSynthesis !== "undefined") {
try { window.speechSynthesis.cancel(); } catch (_) {}
}
if (speechEnabled) speakSubtitle(getActiveKeyframe(), isPlaying);
else stopAllVoiceOutputs();
renderTutorialUI();
};
}
@@ -629,19 +1013,33 @@
};
}
window.addEventListener("scroll", function () {
if (isPlaying) highlightDomTarget(getActiveKeyframe());
}, { passive: true });
renderTutorialUI();
}
window.HyperstitionStudio.QuantTutorials = {
version: "2.4.0",
const exportedApi = {
version: "2.15.0",
episodes: EPISODES,
allHighlightableDomIds: ALL_HIGHLIGHTABLE_DOM_IDS,
cleanTextForSpeech: cleanTextForSpeech,
highlightDomTarget: highlightDomTarget,
speakSubtitle: speakSubtitle,
adaptHrefForFileProtocol: adaptHrefForFileProtocol,
init: initTutorials
};
rootObj.HyperstitionStudio.QuantTutorials = exportedApi;
if (typeof module !== "undefined" && module.exports) {
module.exports = exportedApi;
}
if (document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", initTutorials);
} else {
initTutorials();
if (typeof document !== "undefined") {
if (document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", initTutorials);
} else {
initTutorials();
}
}
})();
+2 -2
View File
@@ -1,3 +1,3 @@
"""hyperstitionstud_io — Shared Common Library for the hyperstitionstud.io workspace (v2.4.0)."""
__version__ = "2.4.0"
"""hyperstitionstud_io — Shared Common Library for the hyperstitionstud.io workspace (v2.15.0)."""
__version__ = "2.15.0"
NAMESPACE_URN = "urn:io:hyperstitionstud"
@@ -0,0 +1,266 @@
#!/usr/bin/env python3
"""
hyperstitionstud_io.ci.deploy_scripts_sync (`hs-deploy-scripts-sync`)
Pre-Commit Preparation & 8-Gate Drift-Blocking Verifier (`Gates D1-D8`) for the Two Manual Operator
Deployment Scripts (`/workspace/push-all-to-git-libre-audio.sh` and `deploy/sync-vps-repos.sh`).
Wired directly into `.git/hooks/pre-commit`, `version_sync.py`, and `tests/test_core_suite.py` so that
`push-all-to-git-libre-audio.sh` (and its tracked mirror `hyperstitionstudio-core/deploy/push-all-to-git-libre-audio.sh`)
and `deploy/sync-vps-repos.sh` are always prepared, validated, and staged PRIOR to every commit.
"""
from __future__ import annotations
import argparse
import json
import os
import re
import subprocess
from pathlib import Path
from typing import Any
from hyperstitionstud_io import __version__ as CURRENT_VERSION
from hyperstitionstud_io.config import load_workspace_config
def _norm_ws_path(p: Path | str, workspace_root: str | Path | None = None) -> str:
cfg = load_workspace_config(workspace_root=workspace_root)
ws_res = str(cfg.workspace_root.resolve())
s = str(Path(p).resolve())
if s.startswith(ws_res):
return "/workspace" + s[len(ws_res):]
return str(p)
def prepare_and_verify_deploy_scripts(
workspace_root: str | Path | None = None,
target_version: str | None = None,
check_only: bool = False,
stage: bool = False,
) -> dict[str, Any]:
"""
Prepare and verify `/workspace/push-all-to-git-libre-audio.sh`,
`/workspace/hyperstitionstudio-core/deploy/push-all-to-git-libre-audio.sh`,
and `/workspace/hyperstitionstudio-core/deploy/sync-vps-repos.sh` across Gates D1-D8.
"""
cfg = load_workspace_config(workspace_root=workspace_root)
ws_root = cfg.workspace_root
core_dir = cfg.core_dir
ver = (target_version or CURRENT_VERSION).lstrip("v").strip()
ws_push_sh = ws_root / "push-all-to-git-libre-audio.sh"
tracked_push_sh = core_dir / "deploy" / "push-all-to-git-libre-audio.sh"
sync_vps_sh = core_dir / "deploy" / "sync-vps-repos.sh"
caddyfile_p = core_dir / "deploy" / "Caddyfile"
modified_files: list[str] = []
errors: list[str] = []
# Gate D1: Version Header & Tracked Mirror Parity
# Note: On VPS (/srv/hyperstitionstud.io/repos), the tracked copy is `hyperstitionstudio-core/deploy/push-all-to-git-libre-audio.sh`
# while the parent directory `ws_root/push-all-to-git-libre-audio.sh` may be absent until hydrated.
if ws_push_sh.is_file():
push_txt = ws_push_sh.read_text(encoding="utf-8")
upd_push = re.sub(r"^#\s*Release\s+v\d+\.\d+\.\d+:", f"# Release v{ver}:", push_txt, count=1, flags=re.M)
if upd_push != push_txt:
if check_only:
errors.append(f"Gate D1: {ws_push_sh} release header does not match v{ver}")
else:
ws_push_sh.write_text(upd_push, encoding="utf-8")
ws_push_sh.chmod(0o755)
modified_files.append(_norm_ws_path(ws_push_sh, workspace_root=ws_root))
push_txt = upd_push
tracked_txt = tracked_push_sh.read_text(encoding="utf-8") if tracked_push_sh.is_file() else ""
if tracked_txt != push_txt:
if check_only:
errors.append(f"Gate D1: Tracked mirror {tracked_push_sh} is out of sync with {ws_push_sh}")
else:
tracked_push_sh.parent.mkdir(parents=True, exist_ok=True)
tracked_push_sh.write_text(push_txt, encoding="utf-8")
tracked_push_sh.chmod(0o755)
modified_files.append(_norm_ws_path(tracked_push_sh, workspace_root=ws_root))
elif tracked_push_sh.is_file():
push_txt = tracked_push_sh.read_text(encoding="utf-8")
upd_push = re.sub(r"^#\s*Release\s+v\d+\.\d+\.\d+:", f"# Release v{ver}:", push_txt, count=1, flags=re.M)
if upd_push != push_txt:
if check_only:
errors.append(f"Gate D1: {tracked_push_sh} release header does not match v{ver}")
else:
tracked_push_sh.write_text(upd_push, encoding="utf-8")
tracked_push_sh.chmod(0o755)
modified_files.append(_norm_ws_path(tracked_push_sh, workspace_root=ws_root))
push_txt = upd_push
if not check_only:
try:
ws_push_sh.write_text(push_txt, encoding="utf-8")
ws_push_sh.chmod(0o755)
except OSError:
pass
else:
errors.append(f"Gate D1: Missing both {ws_push_sh} and {tracked_push_sh}")
if sync_vps_sh.is_file():
sync_txt = sync_vps_sh.read_text(encoding="utf-8")
if re.search(r"^#\s*Release\s+v\d+\.\d+\.\d+:", sync_txt, flags=re.M):
upd_sync = re.sub(r"^#\s*Release\s+v\d+\.\d+\.\d+:", f"# Release v{ver}:", sync_txt, count=1, flags=re.M)
else:
upd_sync = sync_txt.replace(
"# /workspace/hyperstitionstudio-core/deploy/sync-vps-repos.sh\n",
f"# /workspace/hyperstitionstudio-core/deploy/sync-vps-repos.sh\n# Release v{ver}: Self-re-executing tmpfs VPS hydration & service sync.\n",
1,
)
if upd_sync != sync_txt:
if check_only:
errors.append(f"Gate D1: {sync_vps_sh} release header does not match v{ver}")
else:
sync_vps_sh.write_text(upd_sync, encoding="utf-8")
sync_vps_sh.chmod(0o755)
modified_files.append(_norm_ws_path(sync_vps_sh, workspace_root=ws_root))
sync_txt = upd_sync
else:
errors.append(f"Gate D1: Missing {sync_vps_sh}")
gate_d1_ok = len(errors) == 0
# Gate D2 & D3: bash -n Syntax, Executable Permissions & Zero-/dev/null Redirections
scripts_to_audit = [
ws_push_sh,
tracked_push_sh,
sync_vps_sh,
core_dir / "deploy" / "run-vps-data-production.sh",
core_dir / "deploy" / "run-vps-archive-rotation.sh",
cfg.archive_dir / "packaging" / "build-fedora41-rpm.sh",
cfg.archive_dir / "packaging" / "bundle" / "scripts" / "run_exegesis_and_push_fedora41.sh",
]
gate_d2_ok = True
gate_d3_ok = True
for sp in scripts_to_audit:
if not sp.is_file():
continue
if not check_only and not os.access(sp, os.X_OK):
sp.chmod(0o755)
proc = subprocess.run(["bash", "-n", str(sp)], capture_output=True, text=True, check=False)
if proc.returncode != 0:
gate_d2_ok = False
errors.append(f"Gate D2: bash -n syntax error in {sp}: {proc.stderr.strip()}")
stxt = sp.read_text(encoding="utf-8")
if "/dev/null" in stxt:
gate_d3_ok = False
errors.append(f"Gate D3: Forbidden /dev/null found in {sp}")
# Gate D4: Untracked Runtime Artifact Hydration Parity (.gitignore vs. sync-vps-repos.sh)
sync_txt_cur = sync_vps_sh.read_text(encoding="utf-8") if sync_vps_sh.is_file() else ""
core_gi = (core_dir / ".gitignore").read_text(encoding="utf-8") if (core_dir / ".gitignore").is_file() else ""
gate_d4_ok = True
if "site/quant/audio/" in core_gi:
if "quant_voice" not in sync_txt_cur or "--filter='P site/quant/audio/***'" not in sync_txt_cur:
gate_d4_ok = False
errors.append("Gate D4: site/quant/audio/ is in .gitignore but quant_voice / rsync filter is missing in deploy/sync-vps-repos.sh")
if "generate_db_json.py" not in sync_txt_cur or "config.default.js" not in sync_txt_cur:
gate_d4_ok = False
errors.append("Gate D4: haiperdohp-jemaytreeah untracked artifact hydration missing in deploy/sync-vps-repos.sh")
# Gate D5: Cold *.tar.gz Archive Exclusion & Explicit rm -f Safety in sync-vps-repos.sh
gate_d5_ok = (
"--exclude='completed-plans-archive.tar.gz'" in sync_txt_cur
and "--exclude='inactive-plans-archive.tar.gz'" in sync_txt_cur
and 'docs/archive/completed-plans-archive.tar.gz"' in sync_txt_cur
and 'docs/plans/inactive/inactive-plans-archive.tar.gz"' in sync_txt_cur
)
if not gate_d5_ok:
errors.append("Gate D5: Cold plan .tar.gz exclusion or rm -f cleanup missing in deploy/sync-vps-repos.sh")
# Gate D6: Single-Layer 1x Compression & Caddyfile Media Extension Parity
caddy_txt = caddyfile_p.read_text(encoding="utf-8") if caddyfile_p.is_file() else ""
push_src = ws_push_sh if ws_push_sh.is_file() else tracked_push_sh
push_txt_cur = push_src.read_text(encoding="utf-8") if push_src.is_file() else ""
gate_d6_ok = (
"--enforce-single-compression" in push_txt_cur
and "--enforce-single-compression" in sync_txt_cur
and "@compressible not path" in caddy_txt
and "*.wav" in caddy_txt
and "*.pdf" in caddy_txt
)
if not gate_d6_ok:
errors.append("Gate D6: Single-layer compression enforcement or Caddyfile media extension parity missing")
# Gate D7: Topological 6-Repository Push & Force-Tag Sync Parity in push-all-to-git-libre-audio.sh
required_push_markers = (
"hyperstitionstudio-core",
"ingglish-hyperdope-gematria",
"technocapital-singularity-zoology",
"encyclopedia-knowledge-graph",
"hyperdope-ci-build",
"haiperdohp-jemaytreeah",
'push --force "${remote_name}" "refs/tags/${head_tag}"',
"build-fedora41-rpm.sh",
"run_exegesis_and_push_fedora41.sh",
)
gate_d7_ok = all(m in push_txt_cur for m in required_push_markers)
if not gate_d7_ok:
errors.append("Gate D7: Missing required repository, force-tag, or verification marker in push-all-to-git-libre-audio.sh")
# Gate D8: Automatic Git Staging Prior to Commit (--stage)
staged_files: list[str] = []
if stage and not check_only and (core_dir / ".git").exists():
for rel_s in ("deploy/push-all-to-git-libre-audio.sh", "deploy/sync-vps-repos.sh", "deploy/Caddyfile"):
cand_p = core_dir / rel_s
if cand_p.is_file():
subprocess.run(["git", "-C", str(core_dir), "add", rel_s], check=False)
staged_files.append(f"/workspace/hyperstitionstudio-core/{rel_s}")
all_ok = (
gate_d1_ok
and gate_d2_ok
and gate_d3_ok
and gate_d4_ok
and gate_d5_ok
and gate_d6_ok
and gate_d7_ok
and len(errors) == 0
)
return {
"ok": all_ok,
"version": ver,
"check_only": check_only,
"gates": {
"D1_version_header_and_tracked_mirror_parity": gate_d1_ok,
"D2_bash_syntax_and_exec_permissions": gate_d2_ok,
"D3_zero_dev_null_redirections": gate_d3_ok,
"D4_gitignore_untracked_runtime_hydration_parity": gate_d4_ok,
"D5_cold_tar_gz_tmpfs_exclusion_and_rm": gate_d5_ok,
"D6_single_layer_compression_and_caddy_parity": gate_d6_ok,
"D7_topological_6_repo_push_and_force_tags": gate_d7_ok,
"D8_pre_commit_auto_stage_ready": True,
},
"modified_files": modified_files,
"staged_files": staged_files,
"errors": errors,
}
def main(argv: list[str] | None = None) -> int:
ap = argparse.ArgumentParser(
prog="hs-deploy-scripts-sync",
description="Prepare, synchronize, and verify push-all-to-git-libre-audio.sh and deploy/sync-vps-repos.sh prior to commits.",
)
ap.add_argument("--check", action="store_true", help="Verify Gates D1-D8 without modifying files.")
ap.add_argument("--stage", action="store_true", help="Stage updated deploy scripts in hyperstitionstudio-core via git add.")
ap.add_argument("--version", default=None, help="Optional target semantic version override.")
ap.add_argument("--workspace-root", default=None, help="Optional workspace root directory.")
args = ap.parse_args(argv)
res = prepare_and_verify_deploy_scripts(
workspace_root=args.workspace_root,
target_version=args.version,
check_only=args.check,
stage=args.stage,
)
print(json.dumps(res, indent=2))
return 0 if res["ok"] else 1
if __name__ == "__main__":
raise SystemExit(main())
+1 -2
View File
@@ -64,8 +64,7 @@ def run_diagnostics(workspace_root: str | Path | None = None) -> dict[str, Any]:
and "/var/lib/hyperstitionstud.io/api-telemetry.db" in lr_txt
and "/tmp/" not in lr_txt
and "size 100M" in lr_txt
and "compress" in lr_txt
and "nocompress" not in lr_txt
and "nocompress" in lr_txt
and "rotate 0" not in lr_txt
and "--truncate-quiescent" in lr_txt
and "--compress-archive" in lr_txt
@@ -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"], []),
@@ -176,12 +176,14 @@ def write_internal_test_baseline_cache(
def _http_fetch(url: str, method: str = "GET", body_bytes: bytes | None = None, timeout: float = 10.0) -> tuple[int, bytes]:
from hyperstitionstud_io.security import safe_urlopen
headers = {"User-Agent": _USER_AGENT}
if body_bytes is not None:
headers["Content-Type"] = "application/json"
req = urllib.request.Request(url, data=body_bytes, headers=headers, method=method)
try:
with urllib.request.urlopen(req, timeout=timeout) as resp:
with safe_urlopen(req, timeout=timeout, allow_http_localhost=True) as resp:
return int(resp.status), resp.read()
except urllib.error.HTTPError as exc:
return int(exc.code), exc.read() if exc.fp else b""
@@ -78,6 +78,23 @@ def compute_aq(text: str, quant_mode: QuantMode = "digit") -> int:
return total
def char_value_aq(ch: str) -> int:
c = ch.lower()
if "0" <= c <= "9":
return ord(c) - 48
if "a" <= c <= "z":
return ord(c) - 87
return 0
def compute_english_ordinal(text: str) -> int:
return sum((ord(c) - 96) for c in text.lower() if "a" <= c <= "z")
def compute_full_reduction(text: str) -> int:
return sum(((ord(c) - 97) % 9) + 1 for c in text.lower() if "a" <= c <= "z")
def is_prime(n: int) -> bool:
if n < 2:
return False
@@ -7,6 +7,9 @@ hardcoded /workspace assumptions.
from __future__ import annotations
import copy
import functools
import json
import os
import tomllib
from dataclasses import dataclass, field
@@ -18,6 +21,23 @@ WORKSPACE_ROOT = CORE_REPO_ROOT.parent
USER_WORKSPACE_TOML = Path.home() / ".config" / "hyperstitionstud.io" / "workspace.toml"
@functools.lru_cache(maxsize=64)
def _parse_json_by_stat(resolved_path_str: str, st_mtime_ns: int, st_size: int) -> Any:
_ = (st_mtime_ns, st_size)
return json.loads(Path(resolved_path_str).read_text(encoding="utf-8"))
def load_json_cached(path: str | Path, *, copy_result: bool = True) -> Any:
"""
Load and parse a UTF-8 JSON file cached by `(resolved_path_str, st_mtime_ns, st_size)`.
Automatically invalidates the instant `st_mtime_ns` or `st_size` changes on disk.
"""
p = Path(path).resolve()
st = p.stat()
parsed = _parse_json_by_stat(str(p), st.st_mtime_ns, st.st_size)
return copy.deepcopy(parsed) if copy_result else parsed
@dataclass(frozen=True)
class WorkspaceConfig:
schema_version: str = "1.2.0"
+425 -19
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")
@@ -660,6 +723,8 @@ def _open_readonly_catalog(db_path: Path | str | None = None) -> sqlite3.Connect
conn = sqlite3.connect(uri, uri=True)
conn.row_factory = sqlite3.Row
conn.execute("PRAGMA query_only = ON;")
conn.execute("PRAGMA temp_store = MEMORY;")
conn.execute("PRAGMA cache_size = -8000;")
return conn
@@ -818,6 +883,44 @@ def query_timeseries_bars(
conn.close()
def ensure_single_layer_gzip_file(gz_path: Path | str) -> dict[str, Any]:
"""
Inspect `gz_path` and ensure its decompressed stream is compressed strictly once (`1x`).
If the decompressed payload itself begins with a gzip (`\\x1f\\x8b`) or xz (`\\xfd7zXZ\\x00`)
magic header, iteratively peel outer compression layers in-place until the inner stream
is the raw uncompressed payload (e.g., `"SQLite format 3\\x00"` or POSIX `ustar`).
"""
p = Path(gz_path)
if not p.is_file():
return {"path": str(p), "peeled_layers": 0, "single_layer_verified": False}
peeled = 0
while True:
with gzip.open(p, "rb") as f_gz:
head = f_gz.read(6)
if head.startswith(b"\x1f\x8b"):
f_gz.seek(0)
inner_bytes = f_gz.read()
elif head.startswith(b"\xfd7zXZ\x00"):
import lzma
f_gz.seek(0)
raw_unwrapped = lzma.decompress(f_gz.read())
tmp_p = p.with_suffix(p.suffix + f".peel.{os.getpid()}")
with open(tmp_p, "wb") as f_raw:
with gzip.GzipFile(filename="", mode="wb", fileobj=f_raw, compresslevel=9, mtime=0) as gz_out:
gz_out.write(raw_unwrapped)
os.replace(tmp_p, p)
peeled += 1
continue
else:
break
tmp_p = p.with_suffix(p.suffix + f".peel.{os.getpid()}")
tmp_p.write_bytes(inner_bytes)
os.replace(tmp_p, p)
peeled += 1
return {"path": str(p), "peeled_layers": peeled, "single_layer_verified": True}
def _rotate_compressed_archives(base_db_path: Path, rotate_keep: int = 12) -> Path:
"""
Shift existing `<base_db_path>.{1..K-1}.gz` archives up by 1 and return `<base_db_path>.1.gz`.
@@ -830,6 +933,7 @@ def _rotate_compressed_archives(base_db_path: Path, rotate_keep: int = 12) -> Pa
src = Path(f"{base_db_path}.{idx}.gz")
dst = Path(f"{base_db_path}.{idx + 1}.gz")
if src.exists():
ensure_single_layer_gzip_file(src)
src.replace(dst)
return Path(f"{base_db_path}.1.gz")
@@ -908,6 +1012,7 @@ def truncate_telemetry_db_quiescent(
gz_target = _rotate_compressed_archives(t_path, rotate_keep=rotate_keep)
with open(snap_tmp, "rb") as f_in, gzip.open(gz_target, "wb", compresslevel=9) as f_out:
f_out.write(f_in.read())
ensure_single_layer_gzip_file(gz_target)
compressed_archive_path = str(gz_target)
compressed_archive_bytes = gz_target.stat().st_size
finally:
@@ -919,6 +1024,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 +1055,43 @@ 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';")
_INITIALIZED_TELEMETRY_INODES: set[tuple[str, int, int]] = set()
def _ensure_telemetry_schema_initialized(conn: sqlite3.Connection, db_path: Path) -> None:
try:
st = db_path.stat()
inode_key = (str(db_path.resolve()), st.st_dev, st.st_ino)
except OSError:
inode_key = None
if inode_key is not None and inode_key in _INITIALIZED_TELEMETRY_INODES and st.st_size > 0:
return
conn.executescript(TELEMETRY_SCHEMA_SQL)
_ensure_telemetry_columns(conn)
if inode_key is not None:
try:
st_after = db_path.stat()
_INITIALIZED_TELEMETRY_INODES.add((str(db_path.resolve()), st_after.st_dev, st_after.st_ino))
except OSError:
pass
def record_api_telemetry(
protocol: str,
method: str,
@@ -957,10 +1101,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 +1117,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:
@@ -982,35 +1151,53 @@ def record_api_telemetry(
conn = sqlite3.connect(str(t_path), timeout=30.0, isolation_level=None)
try:
conn.execute("PRAGMA busy_timeout = 30000;")
conn.executescript(TELEMETRY_SCHEMA_SQL)
_ensure_telemetry_schema_initialized(conn, t_path)
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 +1212,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 +1239,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 +1267,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 +1290,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,
@@ -1091,8 +1484,10 @@ def run_logrotate_directive(
configured_size_str = m_size.group(1)
configured_bytes = parse_size_spec_bytes(configured_size_str)
if not re.search(r"^\s*compress\s*$", txt, flags=re.MULTILINE) or re.search(r"^\s*nocompress\s*$", txt, flags=re.MULTILINE):
raise ValueError(f"{c_path} must specify 'compress' (and not 'nocompress') so rotated archives are compressed rather than removed.")
if not re.search(r"^\s*nocompress\s*$", txt, flags=re.MULTILINE) or "--compress-archive" not in txt:
raise ValueError(
f"{c_path} must specify 'nocompress' in the outer logrotate block and '--compress-archive' in prerotate so sqlite_meta.py compresses rotated archives strictly once (1x)."
)
m_rot = re.search(r"^\s*rotate\s+(\d+)\s*$", txt, flags=re.MULTILINE)
rotate_count = int(m_rot.group(1)) if m_rot else 0
if rotate_count < 1:
@@ -1161,6 +1556,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 +1611,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
+10 -1
View File
@@ -4,13 +4,22 @@ hyperstitionstud_io.glossary — Provenance-Keyed Glossary Registry & Cryptograp
from __future__ import annotations
import functools
import hashlib
from pathlib import Path
from typing import Any, Iterable
@functools.lru_cache(maxsize=128)
def _sha256_by_stat(resolved_path_str: str, st_mtime_ns: int, st_size: int) -> str:
_ = (st_mtime_ns, st_size)
return hashlib.sha256(Path(resolved_path_str).read_bytes()).hexdigest()
def sha256_file(path: str | Path) -> str:
return hashlib.sha256(Path(path).read_bytes()).hexdigest()
p = Path(path).resolve()
st = p.stat()
return _sha256_by_stat(str(p), st.st_mtime_ns, st.st_size)
class ReadOnlyIsolationGuard:
+2 -2
View File
@@ -8,7 +8,7 @@ import json
import re
from typing import Any
from hyperstitionstud_io.config import load_workspace_config
from hyperstitionstud_io.config import load_json_cached, load_workspace_config
STATIC_RESOURCES: list[dict[str, str]] = [
{
@@ -140,7 +140,7 @@ def read_mcp_resource(uri: str) -> dict[str, Any]:
}
if uri == "urn:io:hyperstitionstud:resource:knowledge-graph-summary":
kg = json.loads((cfg.knowledge_graph_dir / "encyclopedia-graph.json").read_text(encoding="utf-8"))
kg = load_json_cached(cfg.knowledge_graph_dir / "encyclopedia-graph.json", copy_result=False)
summary = {
"version": kg.get("version"),
"namespace_urn": kg.get("namespace_urn"),
+13
View File
@@ -456,6 +456,7 @@ def dispatch_rest_v1(
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
@@ -475,6 +476,16 @@ def dispatch_rest_v1(
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(),
@@ -482,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
+25 -6
View File
@@ -39,12 +39,12 @@ from hyperstitionstud_io.mcp.tools import MCP_TOOLS_SCHEMA, call_mcp_tool # noq
SERVER_INFO = {
"name": "hyperstitionstudio-mcp",
"version": "2.4.0",
"namespace_urn": "urn:io:hyperstitionstud:mcp:2.4.0",
"version": "2.15.0",
"namespace_urn": "urn:io:hyperstitionstud:mcp:2.15.0",
}
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').
@@ -134,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",
@@ -141,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}
@@ -215,11 +225,18 @@ class _MCPHTTPHandler(BaseHTTPRequestHandler):
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)
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(
@@ -229,6 +246,7 @@ class _MCPHTTPHandler(BaseHTTPRequestHandler):
status_code=304,
latency_us=1,
isolation_ok=True,
traffic_source=tsrc,
)
self._send_payload(304, ctype, "", etag=etag)
return
@@ -271,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:
@@ -284,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()
+145 -48
View File
@@ -19,10 +19,11 @@ from hyperstitionstud_io.ciphers import (
is_repdigit_37,
prime_rank,
)
from hyperstitionstud_io.config import load_workspace_config
from hyperstitionstud_io.config import load_json_cached, load_workspace_config
from hyperstitionstud_io.ipld import inspect_dag_json_payload
from hyperstitionstud_io.phonetics import translate_batch
from hyperstitionstud_io.quant.collector import build_financial_quant_harvest
from hyperstitionstud_io.security import safe_tar_members
REGISTER_STAT_LABELS = {
"academic": {
@@ -355,8 +356,8 @@ def call_mcp_tool(name: str, arguments: dict[str, Any]) -> dict[str, Any]:
if name == "hs_classify_singularity":
terms = [str(t) for t in arguments.get("terms", [])]
headline = str(arguments.get("headline_text", "")).lower()
mat = json.loads((cfg.zoology_dir / "taxonomy" / "singularity-zoology-matrix.json").read_text(encoding="utf-8"))
mem = json.loads((cfg.zoology_dir / "taxonomy" / "memetic-superclass-registry.json").read_text(encoding="utf-8"))
mat = load_json_cached(cfg.zoology_dir / "taxonomy" / "singularity-zoology-matrix.json", copy_result=False)
mem = load_json_cached(cfg.zoology_dir / "taxonomy" / "memetic-superclass-registry.json", copy_result=False)
ing_map = translate_batch(terms)
classified = []
@@ -393,7 +394,7 @@ def call_mcp_tool(name: str, arguments: dict[str, Any]) -> dict[str, Any]:
q = str(arguments.get("query", "")).strip().lower()
inc_nbr = bool(arguments.get("include_neighbors", True))
kg_path = cfg.knowledge_graph_dir / "encyclopedia-graph.json"
kg = json.loads(kg_path.read_text(encoding="utf-8"))
kg = load_json_cached(kg_path, copy_result=False)
matches = []
for n in kg["nodes"]:
if (
@@ -429,7 +430,7 @@ def call_mcp_tool(name: str, arguments: dict[str, Any]) -> dict[str, Any]:
q = str(arguments.get("query", "")).strip().lower()
g_filt = str(arguments.get("guild_filter", "")).strip().upper()
limit = int(arguments.get("limit", 15))
gl = json.loads((cfg.zoology_dir / "taxonomy" / "glossary-registry.json").read_text(encoding="utf-8"))
gl = load_json_cached(cfg.zoology_dir / "taxonomy" / "glossary-registry.json", copy_result=False)
hits = []
for sec in gl.get("sections", []):
for ent in sec.get("entries", []):
@@ -454,7 +455,7 @@ def call_mcp_tool(name: str, arguments: dict[str, Any]) -> dict[str, Any]:
if name == "hs_inspect_eti_tier_list":
b_filt = str(arguments.get("build_filter", "all")).strip().upper()
reg = str(arguments.get("register", "academic")).strip().lower()
tl = json.loads((cfg.zoology_dir / "taxonomy" / "assemblage-builds-tier-list.json").read_text(encoding="utf-8"))
tl = load_json_cached(cfg.zoology_dir / "taxonomy" / "assemblage-builds-tier-list.json", copy_result=False)
labels = REGISTER_STAT_LABELS.get(reg, REGISTER_STAT_LABELS["academic"])
rows = []
for r in tl.get("rows", []):
@@ -486,7 +487,7 @@ def call_mcp_tool(name: str, arguments: dict[str, Any]) -> dict[str, Any]:
aid = str(arguments.get("anchor_id", "")).strip()
new_dig = str(arguments.get("new_digit_str", "")).strip()
new_sp_eng = str(arguments.get("new_spoken_eng", "")).strip()
anc_data = json.loads((cfg.zoology_dir / "taxonomy" / "quantitative-economic-anchors.json").read_text(encoding="utf-8"))
anc_data = load_json_cached(cfg.zoology_dir / "taxonomy" / "quantitative-economic-anchors.json", copy_result=False)
anchor = next((a for a in anc_data.get("anchors", []) if a["anchor_id"] == aid), None)
if anchor is None:
return {"error": f"Unknown anchor_id '{aid}'", "available_anchors": [a["anchor_id"] for a in anc_data.get("anchors", [])]}
@@ -573,6 +574,7 @@ def call_mcp_tool(name: str, arguments: dict[str, Any]) -> dict[str, Any]:
"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",
"inactive-archive-manifest": cfg.knowledge_graph_dir / "docs" / "plans" / "inactive" / "inactive-archive-manifest.json",
}
p = reg_map.get(str(reg_name))
if p is None or not p.is_file():
@@ -604,7 +606,7 @@ def call_mcp_tool(name: str, arguments: dict[str, Any]) -> dict[str, Any]:
lens_q = str(arguments.get("lens", "fund_manager")).strip()
ts_json_path = cfg.core_dir / "site" / "quant" / "quant-timeseries.json"
if ts_json_path.is_file():
bundle = json.loads(ts_json_path.read_text(encoding="utf-8"))
bundle = load_json_cached(ts_json_path, copy_result=False)
else:
bundle = build_quant_timeseries_bundle(write_files=False)
if sym_q:
@@ -662,7 +664,7 @@ def call_mcp_tool(name: str, arguments: dict[str, Any]) -> dict[str, Any]:
slug_f = str(arguments.get("indicator_slug", "")).strip().lower()
m_path = cfg.core_dir / "site" / "quant" / "real-macro-indicators.json"
if m_path.is_file():
m_bundle = json.loads(m_path.read_text(encoding="utf-8"))
m_bundle = load_json_cached(m_path, copy_result=False)
else:
m_bundle = build_macro_indicators_bundle(allow_live_network=False, write_files=False)
if slug_f and slug_f in (m_bundle.get("series") or {}):
@@ -681,7 +683,7 @@ def call_mcp_tool(name: str, arguments: dict[str, Any]) -> dict[str, Any]:
b_path = cfg.core_dir / "site" / "quant" / "daily-brief-latest.json"
if bool(arguments.get("refresh")) or not b_path.is_file():
return build_daily_portfolio_brief(allow_live_network=False, write_files=False)
return json.loads(b_path.read_text(encoding="utf-8"))
return load_json_cached(b_path)
if name == "hs_inspect_engineering_and_math_docs":
from hyperstitionstud_io.publishing.engineering_docs import (
@@ -699,8 +701,8 @@ def call_mcp_tool(name: str, arguments: dict[str, Any]) -> dict[str, Any]:
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()
eng_m = load_json_cached(eng_p, copy_result=False) if eng_p.is_file() else introspect_engineering_manifest()
math_m = load_json_cached(math_p, copy_result=False) 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"):
@@ -787,13 +789,24 @@ def call_mcp_tool(name: str, arguments: dict[str, Any]) -> dict[str, Any]:
},
]
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",
})
plan_search_dirs = [
cfg.knowledge_graph_dir / "docs",
cfg.knowledge_graph_dir / "docs" / "plans" / "active",
cfg.knowledge_graph_dir / "docs" / "plans" / "piecewise",
cfg.knowledge_graph_dir / "docs" / "plans" / "inactive",
]
for p_dir in plan_search_dirs:
if not p_dir.is_dir():
continue
rel_sub = p_dir.relative_to(cfg.knowledge_graph_dir / "docs").as_posix()
route_prefix = "/graph/docs" if rel_sub == "." else f"/graph/docs/{rel_sub}"
for p_plan in sorted(p_dir.glob("PLAN-*.md")):
manuals_list.append({
"id": p_plan.stem,
"category": "active_and_deferred_plans",
"md_path": p_plan,
"web_pdf_route": f"{route_prefix}/{p_plan.stem}.pdf",
})
docs_out: list[dict[str, Any]] = []
for entry in manuals_list:
@@ -821,35 +834,116 @@ def call_mcp_tool(name: str, arguments: dict[str, Any]) -> dict[str, Any]:
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)
from hyperstitionstud_io.publishing.archive_rotator import (
BUNDLE_FILENAME,
INACTIVE_BUNDLE_FILENAME,
INACTIVE_MANIFEST_FILENAME,
MANIFEST_FILENAME,
read_member_from_git_history,
)
arc_sources = [
(
cfg.knowledge_graph_dir / "docs" / "archive",
BUNDLE_FILENAME,
MANIFEST_FILENAME,
"archived_completed",
),
(
cfg.zoology_dir / "docs" / "archive",
BUNDLE_FILENAME,
MANIFEST_FILENAME,
"archived_completed",
),
(
cfg.knowledge_graph_dir / "docs" / "plans" / "inactive",
INACTIVE_BUNDLE_FILENAME,
INACTIVE_MANIFEST_FILENAME,
"archived_inactive",
),
]
for arc_dir, b_fname, m_fname, cls_tag in arc_sources:
tgz_p = arc_dir / b_fname
man_p = arc_dir / m_fname
man_obj: dict[str, Any] = {}
if man_p.is_file():
try:
man_obj = load_json_cached(man_p, copy_result=False)
except Exception:
man_obj = {}
cit_by_name = {
str(it.get("name")): it
for it in (man_obj.get("members") or []) + (man_obj.get("long_term_git_storage_citations") or [])
if it.get("name")
}
seen_names: set[str] = set()
if tgz_p.is_file():
with tarfile.open(tgz_p, "r:gz") as tf:
for m in safe_tar_members(tf):
if not m.name.endswith(".md"):
continue
seen_names.add(m.name)
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
cit_info = cit_by_name.get(m.name) or {}
arc_item: dict[str, Any] = {
"id": stem,
"category": "archived_plans",
"classification": cit_info.get("classification", cls_tag),
"storage_tier": "active_tar_gz_bundle",
"bundle": str(tgz_p.name),
"member_name": m.name,
"char_count": len(m_txt),
"git_citation_url": cit_info.get("git_citation_url"),
}
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)
# Also search long_term_git_storage_citations via local .git fallback
for lt in man_obj.get("long_term_git_storage_citations") or []:
lt_name = str(lt.get("name") or "")
if not lt_name.endswith(".md") or lt_name in seen_names:
continue
stem = Path(lt_name).stem
if doc_id and doc_id.lower() not in stem.lower():
continue
raw_b = read_member_from_git_history(
archive_dir=arc_dir,
member_name=lt_name,
citation_meta=lt,
bundle_filename=b_fname,
)
if raw_b is None:
continue
m_txt = raw_b.decode("utf-8", errors="replace")
if sq and sq not in m_txt.lower() and sq not in stem.lower():
continue
lt_item: dict[str, Any] = {
"id": stem,
"category": "archived_plans",
"classification": lt.get("classification", cls_tag),
"storage_tier": "git_source_control_long_term",
"bundle": str(tgz_p.name),
"member_name": lt_name,
"char_count": len(m_txt),
"git_citation_url": lt.get("git_citation_url"),
}
if sq:
lt_item["matched_lines"] = [ln for ln in m_txt.splitlines() if sq in ln.lower()][:10]
if inc_md:
lt_item["markdown"] = m_txt
archived_out.append(lt_item)
res_doc: dict[str, Any] = {
"category_filter": cat,
@@ -892,6 +986,7 @@ def call_mcp_tool(name: str, arguments: dict[str, Any]) -> dict[str, Any]:
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,
@@ -950,6 +1045,8 @@ def call_mcp_tool(name: str, arguments: dict[str, Any]) -> dict[str, Any]:
}
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
@@ -11,20 +11,15 @@ import shutil
import subprocess
from pathlib import Path
from hyperstitionstud_io.config import load_workspace_config
from hyperstitionstud_io.config import load_json_cached, load_workspace_config
_FALLBACK_PATH = Path(__file__).resolve().parent / "cmudict_fallback.json"
_FALLBACK_CACHE: dict[str, str] | None = None
def _load_fallback() -> dict[str, str]:
global _FALLBACK_CACHE
if _FALLBACK_CACHE is None:
if _FALLBACK_PATH.is_file():
_FALLBACK_CACHE = json.loads(_FALLBACK_PATH.read_text(encoding="utf-8"))
else:
_FALLBACK_CACHE = {}
return _FALLBACK_CACHE
if _FALLBACK_PATH.is_file():
return load_json_cached(_FALLBACK_PATH, copy_result=False)
return {}
def translate_batch(terms: list[str], workdir: str | Path | None = None) -> dict[str, str]:
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,765 @@
#!/usr/bin/env python3
"""
hyperstitionstud_io.publishing.closeups_sync
Deterministic Live-DOM-Introspected Homepage UI Closeup Compiler (`hs-closeups-sync`).
Automatically inspects the actual live HTML/JS/JSON surfaces across the workspace
(`/calc/`, `/graph/`, `/quant/`, `/learn/`, `/math/`, `/engineering/`, `/ci/`),
computes a structural UI element fingerprint (`ui-elements-manifest.json`), and
re-renders all 11 full-width `680x260` Group 3 UI closeups (`site/assets/closeups/*.png`)
whenever any page's UI elements (`id=...`, `<select><option>`, `.pill`, `<button>`,
`<section>`, `<table...>`, or corpus counts) are added, modified, or removed.
"""
from __future__ import annotations
import argparse
import hashlib
import json
import math
import re
from pathlib import Path
from typing import Any
from PIL import Image, ImageDraw
from hyperstitionstud_io import __version__ as CURRENT_VERSION
from hyperstitionstud_io.config import load_json_cached, load_workspace_config
from hyperstitionstud_io.glossary import ReadOnlyIsolationGuard
from hyperstitionstud_io.ipld import compute_dag_json_cidv1
from hyperstitionstud_io.publishing.fonts import (
GROUP3_PALETTE,
draw_group3_chamfered_plate,
load_pillow_font,
)
FONT_SANS = "DejaVuSans.ttf"
FONT_BOLD = "DejaVuSans-Bold.ttf"
FONT_MONO = "DejaVuSansMono.ttf"
FONT_MONO_B = "DejaVuSansMono-Bold.ttf"
VOID = GROUP3_PALETTE["BG_VOID"]
PLATE = GROUP3_PALETTE["BG_ODD"]
WELL = GROUP3_PALETTE["BG_EVEN"]
BORDER = GROUP3_PALETTE["BORDER_MUTED"]
TEXT = GROUP3_PALETTE["TXT_PRI"]
MUTED = GROUP3_PALETTE["TXT_SEC"]
CYAN = GROUP3_PALETTE["CYAN"]
GOLD = (245, 198, 48)
EMERALD = GROUP3_PALETTE["EMERALD"]
ROSE = GROUP3_PALETTE["ROSE"]
VIOLET = GROUP3_PALETTE["VIOLET"]
ALL_CLOSEUP_FILENAMES: tuple[str, ...] = (
"quadrant-1-cybermemetics-calc-graph.png",
"quadrant-1-tab-2-graph.png",
"quadrant-2-esoteric-finance-quant.png",
"quadrant-2-tab-2-bayesian-fred.png",
"quadrant-2-tab-3-leaderboard-card.png",
"quadrant-3-info-science-novice-learn-polyglot.png",
"quadrant-3-tab-2-math-guile.png",
"quadrant-3-tab-3-math-ts-rust.png",
"quadrant-4-operators-deployment-vps.png",
"quadrant-4-tab-2-mcp-etag.png",
"quadrant-4-tab-3-ci-gates.png",
)
def _fnt(path: str, size: int) -> Any:
return load_pillow_font(path, size)
def _extract_js_ui_signature(js_text: str) -> dict[str, Any]:
"""
Strategy 4A (Plan #51): Introspect companion `.js` files (`quant-app.js`, `quant-tutorials.js`,
`learn-app.js`, `hs-guile-scheme-repl.js`) for dynamic DOM IDs, episode/scene definitions,
highlightable UI targets, and control labels.
"""
clean = re.sub(r"\bv\d+\.\d+\.\d+\b", "vX.Y.Z", js_text)
dom_ids = sorted(set(re.findall(r'getElementById\(\s*["\']([^"\']+)["\']\s*\)', clean)))
ui_targets = sorted(set(re.findall(r'uiTargets:\s*\[([^\]]+)\]', clean)))
ep_codes = re.findall(r'code:\s*["\'](Ep\s*\d+)["\']', clean)
speech_texts = re.findall(r'speechText:\s*["\']([^"\']+)["\']', clean)
lens_keys = sorted(set(re.findall(r'selectedLens:\s*["\']([^"\']+)["\']', clean)))
payload = {
"dom_ids": dom_ids,
"ui_targets": ui_targets,
"ep_codes": ep_codes,
"speech_text_count": len(speech_texts),
"lens_keys": lens_keys,
"has_ui_indicator_badge": "tutUiElementIndicator" in clean,
"has_lens_select_highlight": '"lensSelect"' in clean,
}
digest = hashlib.sha256(json.dumps(payload, sort_keys=True, ensure_ascii=False).encode("utf-8")).hexdigest()
return {
"js_ui_sha256": digest,
**payload,
}
def _extract_dom_signature(html_text: str) -> dict[str, Any]:
"""Extract structural UI element IDs, classes, buttons, inputs, selects, and headings from an HTML surface."""
clean = re.sub(r"\bv\d+\.\d+\.\d+\b", "vX.Y.Z", html_text)
ids = sorted(set(re.findall(r'\bid=["\']([^"\']+)["\']', clean)))
classes = sorted(set(re.findall(r'\bclass=["\']([^"\']+)["\']', clean)))
buttons = [re.sub(r"<[^>]+>", "", b).strip() for b in re.findall(r"<button[^>]*>(.*?)</button>", clean, flags=re.S)]
options = [re.sub(r"<[^>]+>", "", o).strip() for o in re.findall(r"<option[^>]*>(.*?)</option>", clean, flags=re.S)]
inputs = sorted(set(re.findall(r'<input[^>]+placeholder=["\']([^"\']+)["\']', clean)))
headings = [re.sub(r"<[^>]+>", "", h).strip() for h in re.findall(r"<h[123][^>]*>(.*?)</h[123]>", clean, flags=re.S)]
payload = {
"ids": ids,
"classes": classes,
"buttons": buttons[:40],
"options": options[:40],
"inputs": inputs,
"headings": headings[:25],
}
digest = hashlib.sha256(json.dumps(payload, sort_keys=True, ensure_ascii=False).encode("utf-8")).hexdigest()
return {
"ui_structure_sha256": digest,
"id_count": len(ids),
"button_count": len(buttons),
"option_count": len(options),
"input_count": len(inputs),
"heading_count": len(headings),
"ids": ids,
"inputs": inputs,
"sample_buttons": buttons[:12],
"sample_options": options[:12],
"sample_headings": headings[:8],
}
def introspect_live_ui_elements(workspace_root: str | Path | None = None) -> dict[str, Any]:
"""
Introspect all target web pages and data registries to detect any added/removed UI elements
and extract live labels/counts for rendering the 11 `680x260` quadrant closeups.
"""
cfg = load_workspace_config(workspace_root=workspace_root)
core = cfg.core_dir
kg = cfg.knowledge_graph_dir
calc_dir = cfg.paths["gematria_js_dir"]
ci_dir = cfg.paths.get("ci_repo_dir") or (cfg.workspace_root / "hyperdope-ci-build")
surfaces: dict[str, Path] = {
"home": core / "site" / "index.html",
"quant": core / "site" / "quant" / "index.html",
"learn": core / "site" / "learn" / "index.html",
"engineering_hub": core / "site" / "engineering" / "index.html",
"engineering_e4": core / "site" / "engineering" / "mcp-chatbot-rest-and-ipld" / "index.html",
"math_hub": core / "site" / "math" / "index.html",
"math_m1": core / "site" / "math" / "base36-algebra-and-primes" / "index.html",
"graph": kg / "index.html",
"calc": calc_dir / "index.html",
}
surface_sigs: dict[str, Any] = {}
for k, p in surfaces.items():
if p.is_file():
surface_sigs[k] = _extract_dom_signature(p.read_text(encoding="utf-8"))
js_surfaces: dict[str, Path] = {
"quant_app_js": core / "site" / "quant" / "quant-app.js",
"quant_tutorials_js": core / "site" / "quant" / "quant-tutorials.js",
"learn_app_js": core / "site" / "learn" / "learn-app.js",
"polyglot_repl_js": core / "site" / "assets" / "hs-guile-scheme-repl.js",
}
js_sigs: dict[str, Any] = {}
for jk, jp in js_surfaces.items():
if jp.is_file():
js_sigs[jk] = _extract_js_ui_signature(jp.read_text(encoding="utf-8"))
# Live data counts from registries
ts_p = core / "site" / "quant" / "quant-timeseries.json"
ts_obj = load_json_cached(ts_p, copy_result=False) if ts_p.is_file() else {}
total_bars = sum(
sum(1 for b in (inst.get("bars") or []) if b.get("data_available"))
for inst in (ts_obj.get("instruments") or [])
)
brf_p = core / "site" / "quant" / "daily-brief-latest.json"
brf_obj = load_json_cached(brf_p, copy_result=False) if brf_p.is_file() else {}
post_probs = (
((brf_obj.get("agenda_1_executive_summary") or {}).get("bayesian_regime_inference") or {}).get("posterior_probabilities")
or {"R1_BULL_EXPANSION": 0.24, "R2_PINNED_ISOMETRIC": 0.61, "R3_TAIL_DRAWDOWN_RISK_OFF": 0.15}
)
eng_p = core / "site" / "engineering" / "engineering-manifest.json"
eng_obj = load_json_cached(eng_p, copy_result=False) if eng_p.is_file() else {}
eng_counts = eng_obj.get("introspected_counts") or {
"repositories": 6,
"cli_entrypoints": 17,
"mcp_tools": 20,
"watchlist_instruments": 24,
"fred_macro_series": 14,
}
cli_scripts = eng_obj.get("cli_scripts") or {
"hs-doctor": "ci.doctor:main",
"hs-mcp": "mcp.server:main",
"hs-kg-build": "graph.compiler:main",
"hs-public-smoke": "ci.public_regression:main",
}
db_txt_p = calc_dir / "db.txt"
db_entries_count = sum(1 for _ in db_txt_p.open(encoding="utf-8")) if db_txt_p.is_file() else 231615
ci_rep_p = ci_dir / "ci-audit-report.json"
ci_obj = load_json_cached(ci_rep_p, copy_result=False) if ci_rep_p.is_file() else {}
combined_hash = hashlib.sha256(
json.dumps(
{
"surfaces": {k: v["ui_structure_sha256"] for k, v in sorted(surface_sigs.items())},
"js_surfaces": {k: v["js_ui_sha256"] for k, v in sorted(js_sigs.items())},
"total_bars": total_bars,
"db_entries_count": db_entries_count,
"mcp_tools": eng_counts.get("mcp_tools", 20),
},
sort_keys=True,
).encode("utf-8")
).hexdigest()
manifest = {
"$id": "urn:io:hyperstitionstud:closeups-ui-manifest",
"ui_elements_fingerprint_sha256": combined_hash,
"closeup_images": list(ALL_CLOSEUP_FILENAMES),
"live_metrics": {
"calc_db_entries": db_entries_count,
"quant_total_real_bars": total_bars,
"quant_bayesian_posteriors": post_probs,
"engineering_counts": eng_counts,
"cli_scripts_sample": dict(list(sorted(cli_scripts.items()))[:4]),
"ci_keep_rate_pct": ci_obj.get("keep_rate_pct", 100.0),
},
"surfaces": surface_sigs,
"js_surfaces": js_sigs,
}
manifest["ipld_dag_json_cidv1"] = {"/": compute_dag_json_cidv1(manifest)}
return manifest
def _new_canvas() -> tuple[Image.Image, ImageDraw.ImageDraw]:
im = Image.new("RGB", (680, 260), VOID)
d = ImageDraw.Draw(im)
for gx in range(0, 680, 32):
d.line([(gx, 0), (gx, 260)], fill=(12, 18, 30), width=1)
for gy in range(0, 260, 32):
d.line([(0, gy), (680, gy)], fill=(12, 18, 30), width=1)
return im, d
def _draw_chamfer_box(
d: ImageDraw.ImageDraw,
box: tuple[int, int, int, int],
fill: tuple[int, int, int],
outline: tuple[int, int, int],
chamfer: int = 8,
pip: tuple[int, int, int] | None = None,
) -> None:
_ = chamfer
draw_group3_chamfered_plate(d, box, fill=fill, attention_color=outline, pip_color=pip)
def render_all_quadrant_closeups(
workspace_root: str | Path | None = None,
force: bool = False,
check_only: bool = False,
) -> dict[str, Any]:
"""
Compare the live UI element fingerprint against `site/assets/closeups/ui-elements-manifest.json`
and re-render all 11 `680x260` quadrant closeups whenever any page's UI elements change (or when `force=True`).
"""
cfg = load_workspace_config(workspace_root=workspace_root)
out_dir = cfg.core_dir / "site" / "assets" / "closeups"
out_dir.mkdir(parents=True, exist_ok=True)
manifest_path = out_dir / "ui-elements-manifest.json"
with ReadOnlyIsolationGuard(cfg.read_only_files) as guard:
live_manifest = introspect_live_ui_elements(workspace_root=workspace_root)
prev_fp = ""
if manifest_path.is_file():
try:
prev_obj = json.loads(manifest_path.read_text(encoding="utf-8"))
prev_fp = prev_obj.get("ui_elements_fingerprint_sha256", "")
except Exception:
prev_fp = ""
missing_pngs = [fn for fn in ALL_CLOSEUP_FILENAMES if not (out_dir / fn).is_file()]
needs_render = force or (prev_fp != live_manifest["ui_elements_fingerprint_sha256"]) or bool(missing_pngs)
if check_only:
return {
"ok": not needs_render,
"check_only": True,
"needs_render": needs_render,
"missing_pngs": missing_pngs,
"ui_elements_fingerprint_sha256": live_manifest["ui_elements_fingerprint_sha256"],
}
if not needs_render:
return {
"ok": True,
"rerendered": False,
"reason": "ui_elements_unchanged",
"ui_elements_fingerprint_sha256": live_manifest["ui_elements_fingerprint_sha256"],
"closeup_count": len(ALL_CLOSEUP_FILENAMES),
}
f_hdr = _fnt(FONT_MONO_B, 13)
f_mono_xs = _fnt(FONT_MONO, 11)
f_mono = _fnt(FONT_MONO, 12)
f_mono_b = _fnt(FONT_MONO_B, 12)
f_mono_md = _fnt(FONT_MONO_B, 14)
f_mono_lg = _fnt(FONT_MONO_B, 22)
f_mono_xl = _fnt(FONT_MONO_B, 26)
metrics = live_manifest["live_metrics"]
db_cnt_str = f"{metrics['calc_db_entries']:,}"
bars_cnt = metrics["quant_total_real_bars"]
eng_c = metrics["engineering_counts"]
surfaces = live_manifest["surfaces"]
# Detect live controls on /graph/, /quant/, /learn/, /engineering/ (HTML + JS)
quant_ids = set(surfaces.get("quant", {}).get("ids") or [])
quant_tut_js = (live_manifest.get("js_surfaces") or {}).get("quant_tutorials_js") or {}
graph_has_min_deg = "minDegreeFilter" in (surfaces.get("graph", {}).get("ids") or [])
quant_has_window = "timeWindowPills" in quant_ids
quant_has_quick_filter = "tickerQuickFilter" in quant_ids
quant_has_speech_btn = "tutSpeechBtn" in quant_ids
quant_has_lens_select = "lensSelect" in quant_ids
quant_has_ui_indicator = bool(quant_tut_js.get("has_ui_indicator_badge") or ("tutUiElementIndicator" in quant_ids))
learn_has_seal_ribbon = "grimoireSealRibbon" in (surfaces.get("learn", {}).get("ids") or [])
learn_has_sigil_svg = "grimoireSigilSvg" in (surfaces.get("learn", {}).get("ids") or [])
eng_has_cli_filter = "engCliFilterInput" in (surfaces.get("engineering_hub", {}).get("ids") or [])
# 1. Quadrant 01 Tab 1: /calc/ Cipher Matrix (haiperdohpjematreeah)
im, d = _new_canvas()
_draw_chamfer_box(d, (10, 10, 670, 250), PLATE, BORDER, chamfer=10, pip=EMERALD)
d.text((24, 20), "haiperdohpjematreeah • Multi-Cipher Phonetic & Base-36 AQ Matrix", font=f_hdr, fill=EMERALD)
d.rectangle([24, 44, 656, 74], fill=WELL, outline=EMERALD)
d.text((34, 51), "Query: sinthetik dayta", font=f_mono_md, fill=TEXT)
d.text((480, 52), f"db.txt: {db_cnt_str} Entries", font=f_mono, fill=CYAN)
ciphers = [
("haiperdohpjematreeah", "292", EMERALD),
("Phonemic Ingglish AQ", "292", CYAN),
("Written English AQ", "250", GOLD),
("Simple Ordinal", "178", ROSE),
]
cw = (656 - 24 - 24) // 4
for i, (clab, cval, ccol) in enumerate(ciphers):
bx = 24 + i * (cw + 8)
_draw_chamfer_box(d, (bx, 84, bx + cw, 152), WELL, ccol, chamfer=7, pip=ccol)
d.text((bx + 10, 90), clab[:19], font=f_mono_xs, fill=MUTED)
d.text((bx + 12, 110), cval, font=f_mono_xl, fill=ccol)
rows = [
("sinthetik dayta", "AQ = 292", "Cluster 292 • Gen 1 σ² = 0.00 • Syzygy 4::5"),
("abstrakt masheen", "AQ = 292", "Cluster 292 • Phonemic Convergence Partner"),
("shizohnalizis", "AQ = 292", "Cluster 292 • Landian-Deleuzean Attractor"),
]
for ri, (rw, raq, rmeta) in enumerate(rows):
ry = 162 + ri * 27
d.rectangle([24, ry, 656, ry + 23], fill=(14, 20, 31), outline=BORDER)
d.text((34, ry + 4), rw, font=f_mono_b, fill=TEXT)
d.text((230, ry + 4), raq, font=f_mono_b, fill=EMERALD)
d.text((335, ry + 4), rmeta, font=f_mono, fill=CYAN)
im.save(out_dir / "quadrant-1-cybermemetics-calc-graph.png", "PNG")
# 2. Quadrant 01 Tab 2: /graph/ Mode 2 ETI Radar
im, d = _new_canvas()
_draw_chamfer_box(d, (10, 10, 670, 250), PLATE, BORDER, chamfer=10, pip=CYAN)
hdr_g = "Mode 2: Concentric ETI Radar & Syzygy Compass" + (" [MinDeg+LOD]" if graph_has_min_deg else "")
d.text((24, 18), hdr_g, font=f_hdr, fill=CYAN)
d.rectangle([24, 42, 346, 240], fill=WELL, outline=BORDER)
cx_r, cy_r = 185, 141
for r_rad, r_col in [(90, (38, 52, 77)), (64, (45, 65, 95)), (36, (120, 98, 35))]:
d.ellipse([cx_r - r_rad, cy_r - r_rad, cx_r + r_rad, cy_r + r_rad], outline=r_col, width=1)
for ang_deg in range(0, 360, 60):
ar = math.radians(ang_deg)
d.line([(cx_r, cy_r), (cx_r + int(90 * math.cos(ar)), cy_r + int(90 * math.sin(ar)))], fill=(26, 36, 54), width=1)
nodes = [
(cx_r, cy_r, GOLD, "S1 (93)"),
(cx_r - 48, cy_r - 22, GOLD, "S3 (83)"),
(cx_r, cy_r - 78, CYAN, "aq:777"),
(cx_r + 58, cy_r + 8, EMERALD, "sinthetik dayta"),
(cx_r + 36, cy_r + 58, CYAN, "aq:292"),
]
for nx, ny, _, _ in nodes[1:]:
d.line([(cx_r, cy_r), (nx, ny)], fill=(56, 189, 248), width=2)
for nx, ny, ncol, nlab in nodes:
d.ellipse([nx - 7, ny - 7, nx + 7, ny + 7], fill=ncol, outline=VOID)
lx = nx + 10 if nx >= cx_r else nx - 58
ly = ny - 7
if nlab == "aq:777":
lx, ly = nx - 24, ny - 20
elif nlab == "S1 (93)":
lx, ly = nx - 24, ny + 10
d.text((lx, ly), nlab, font=f_mono_b, fill=ncol)
_draw_chamfer_box(d, (358, 42, 656, 240), WELL, CYAN, chamfer=8, pip=CYAN)
d.text((372, 52), "SELECTED NODE INSPECTOR", font=f_mono_b, fill=GOLD)
d.text((372, 72), "aq:292 • Cluster 292 Hub", font=f_mono_md, fill=TEXT)
badges = [("Class: AQHub", CYAN), ("Deg: 38", GOLD), ("dr_9: 4 (4::5)", EMERALD)]
bx_i = 372
for btxt, bcol in badges:
d.rectangle([bx_i, 96, bx_i + 86, 116], fill=PLATE, outline=bcol)
d.text((bx_i + 6, 99), btxt, font=f_mono_xs, fill=bcol)
bx_i += 92
insp_lines = [
("Filter:", "9-Sum Syzygies • MinDeg ≥ 0"),
("Gen 1 Locks:", "sinthetik dayta • abstrakt masheen"),
("Variance:", "σ²_0 = 310.22 -> σ²_1 = 0.00 (G1)"),
("Neighbors:", "Top 40 Cap + [Show All] Button"),
]
for li, (lk, lv) in enumerate(insp_lines):
ly = 128 + li * 25
d.rectangle([372, ly, 644, ly + 21], fill=PLATE, outline=BORDER)
d.text((380, ly + 3), lk, font=f_mono_b, fill=GOLD)
d.text((466, ly + 3), lv[:26], font=f_mono_xs, fill=TEXT)
im.save(out_dir / "quadrant-1-tab-2-graph.png", "PNG")
# 3. Quadrant 02 Tab 1: Panel 1 Trajectory & Dose (dynamically reflects #tutSpeechBtn, #timeWindowPills, #tickerQuickFilter)
im, d = _new_canvas()
_draw_chamfer_box(d, (10, 10, 670, 250), PLATE, BORDER, chamfer=10, pip=GOLD)
d.text((24, 18), "PANEL 1: Synchronized 2-Pane Trajectory & Dose D ∈ {0..4}", font=f_hdr, fill=GOLD)
win_badge = "[30D|90D|ALL]•" if quant_has_window else ""
flt_badge = "Filter•" if quant_has_quick_filter else ""
vox_badge = "🔊Voice:ON•" if quant_has_speech_btn else ""
d.rectangle([388, 16, 656, 36], fill=WELL, outline=GOLD)
d.text((394, 19), f"{vox_badge}{win_badge}{flt_badge}NVDA", font=f_mono_xs, fill=GOLD)
d.rectangle([24, 42, 656, 168], fill=WELL, outline=BORDER)
d.line([(36, 114), (644, 114)], fill=(180, 50, 70), width=1)
d.text((42, 96), "Entity Threshold: envideea = 137", font=f_mono_xs, fill=ROSE)
pts = [(48, 146), (130, 134), (215, 108), (305, 118), (395, 88), (490, 96), (575, 68), (632, 58)]
d.line(pts, fill=CYAN, width=3)
for px, py in pts:
d.ellipse([px - 4, py - 4, px + 4, py + 4], fill=GOLD, outline=VOID)
d.rectangle([180, 74, 290, 94], fill=PLATE, outline=GOLD)
d.text((188, 77), "Scope 1 (137)", font=f_mono_b, fill=GOLD)
d.rectangle([355, 56, 462, 76], fill=PLATE, outline=EMERALD)
d.text((363, 59), "Wire Eq (292)", font=f_mono_b, fill=EMERALD)
d.rectangle([530, 46, 638, 66], fill=PLATE, outline=CYAN)
d.text((538, 49), "Dose D=3 Lock", font=f_mono_b, fill=CYAN)
d.rectangle([24, 176, 656, 240], fill=(11, 16, 24), outline=BORDER)
d.text((34, 181), f"Pane 2: 30D Window Confluence Dose Inspector (N = 19 Trading Days • {bars_cnt} Bars)", font=f_mono_xs, fill=MUTED)
for bi in range(19):
bx = 36 + bi * 31
dose = 3 if bi in (4, 11, 16) else (2 if bi % 2 == 0 else 1)
bh = 10 + dose * 8
bcol = CYAN if dose == 3 else (EMERALD if dose == 2 else (71, 85, 105))
d.rectangle([bx, 234 - bh, bx + 22, 234], fill=bcol)
im.save(out_dir / "quadrant-2-esoteric-finance-quant.png", "PNG")
# 4. Quadrant 02 Tab 2: Panel 6 Bayesian & Panel 5 FRED
im, d = _new_canvas()
_draw_chamfer_box(d, (10, 10, 670, 250), PLATE, BORDER, chamfer=10, pip=GOLD)
d.text((24, 18), "PANEL 6 & PANEL 5: 3-State Bayesian Regime Posteriors & Real FRED Macro", font=f_hdr, fill=GOLD)
_draw_chamfer_box(d, (24, 42, 334, 240), WELL, GOLD, chamfer=8, pip=GOLD)
d.text((38, 52), "PANEL 6: 3-STATE BAYESIAN SIMPLEX", font=f_mono_b, fill=GOLD)
r1 = float(metrics["quant_bayesian_posteriors"].get("R1_BULL_EXPANSION", 0.24))
r2 = float(metrics["quant_bayesian_posteriors"].get("R2_PINNED_ISOMETRIC", 0.61))
r3 = float(metrics["quant_bayesian_posteriors"].get("R3_TAIL_DRAWDOWN_RISK_OFF", 0.15))
bars_b = [
("R1 Bull Expansion", r1, f"{r1 * 100:.1f}%", EMERALD),
("R2 Pinned Dose 2 (-58% P50)", r2, f"{r2 * 100:.1f}%", CYAN),
("R3 Tail Drawdown (D≥3)", r3, f"{r3 * 100:.1f}%", ROSE),
]
for bi, (blab, bval, bpct, bcol) in enumerate(bars_b):
by = 80 + bi * 44
d.text((38, by), blab, font=f_mono_xs, fill=TEXT)
d.text((272, by), bpct, font=f_mono_b, fill=bcol)
d.rectangle([38, by + 18, 318, by + 32], fill=PLATE, outline=BORDER)
d.rectangle([38, by + 18, 38 + int(280 * min(1.0, bval)), by + 32], fill=bcol)
d.rectangle([38, 212, 318, 232], fill=PLATE, outline=CYAN)
d.text((46, 215), "Simplex Σ P(R_k|E_t) = 1.0000", font=f_mono_xs, fill=CYAN)
_draw_chamfer_box(d, (346, 42, 656, 240), WELL, CYAN, chamfer=8, pip=CYAN)
d.text((360, 52), "PANEL 5: 14 REAL FRED MACRO SERIES", font=f_mono_b, fill=CYAN)
fred_rows = [
("EFFR / SOFR", "4.58% / 4.68%", "+10 bps Repo Spread"),
("M2 - M1 Spread", "$3,365.9B", "$3.37T -> 337 (68th Prime)"),
("M2 Velocity V_M2", "1.405x", "GDP / M2SL Ratio"),
("10Y - EFFR Slope", "+97 bps", "'naintee sevan' = 237"),
("Missing / Closed", "null", "Zero Forward-Fill Policy"),
]
for fi, (fk, fv, fn) in enumerate(fred_rows):
fy = 78 + fi * 30
d.rectangle([360, fy, 642, fy + 25], fill=PLATE, outline=BORDER)
d.text((368, fy + 5), fk, font=f_mono_b, fill=GOLD)
d.text((488, fy + 5), fv, font=f_mono_b, fill=TEXT)
d.text((568, fy + 5), fn[:11], font=f_mono_xs, fill=EMERALD)
im.save(out_dir / "quadrant-2-tab-2-bayesian-fred.png", "PNG")
# 5. Quadrant 02 Tab 3: Panel 2 6-Lens Leaderboard & TCG Card (dynamically reflects #lensSelect & UI indicator badge)
im, d = _new_canvas()
_draw_chamfer_box(d, (10, 10, 670, 250), PLATE, BORDER, chamfer=10, pip=GOLD)
hdr_q2_t3 = "PANEL 2 & 3: #lensSelect 6-Lens Leaderboard & TCG Card" if quant_has_lens_select else "PANEL 2 & 3: 6-Lens Assemblage Leaderboard & One-Shot TCG Stats Card"
d.text((24, 18), hdr_q2_t3, font=f_hdr, fill=GOLD)
if quant_has_ui_indicator:
d.rectangle([476, 15, 656, 35], fill=WELL, outline=GOLD)
d.text((482, 18), "▼ UI: #lensSelect", font=f_mono_xs, fill=GOLD)
_draw_chamfer_box(d, (24, 42, 416, 240), WELL, GOLD, chamfer=8, pip=GOLD)
lenses = ["[Fund Mgr]", "[TierZoo]", "[Board]", "[Sabermetric]"]
for li, ltxt in enumerate(lenses):
lx = 36 + li * 92
d.rectangle([lx, 50, lx + 86, 70], fill=PLATE, outline=GOLD if li == 0 else BORDER)
d.text((lx + 6, 53), ltxt, font=f_mono_xs, fill=GOLD if li == 0 else MUTED)
t_rows = [
("#1 S1 Cybernetic", "ETI 93", "Tier S+", "NVDA / PLTR / MSFT", GOLD),
("#2 S2 High-Freq", "ETI 90", "Tier S", "COIN / CME / VIRT", CYAN),
("#3 S6 Sovereign", "ETI 87", "Tier S", "BLK / JPM / GS", EMERALD),
("#4 S3 Lithography", "ETI 83", "Tier A", "ASML / TSM / AVGO", ROSE),
("#5 M3 Convergence", "ETI 76", "Tier B", "Cluster 292 / 333", VIOLET),
]
for ti, (tname, teti, ttier, tsyms, tcol) in enumerate(t_rows):
ty = 80 + ti * 30
d.rectangle([36, ty, 404, ty + 25], fill=PLATE, outline=BORDER)
d.text((44, ty + 5), tname, font=f_mono_b, fill=TEXT)
d.text((196, ty + 5), teti, font=f_mono_b, fill=tcol)
d.text((258, ty + 5), ttier, font=f_mono_xs, fill=GOLD)
d.text((314, ty + 5), tsyms[:12], font=f_mono_xs, fill=MUTED)
_draw_chamfer_box(d, (428, 42, 656, 240), WELL, CYAN, chamfer=8, pip=CYAN)
d.text((442, 52), "NVDA • S3 / S1 APEX", font=f_mono_b, fill=CYAN)
d.text((442, 70), "envideea • AQ = 137 (33rd Prime)", font=f_mono_xs, fill=GOLD)
stats = [("CAP", 96, GOLD), ("VEL", 92, CYAN), ("COL", 88, EMERALD), ("ARM", 85, ROSE)]
for si, (slab, sval, scol) in enumerate(stats):
sy = 94 + si * 26
d.text((442, sy), slab, font=f_mono_b, fill=TEXT)
d.rectangle([484, sy + 2, 604, sy + 14], fill=PLATE, outline=BORDER)
d.rectangle([484, sy + 2, 484 + int(1.2 * sval), sy + 14], fill=scol)
d.text((612, sy), str(sval), font=f_mono_b, fill=scol)
d.rectangle([442, 204, 642, 228], fill=PLATE, outline=EMERALD)
d.text((450, 209), "CIDv1: baguqeera... (35ms)", font=f_mono_xs, fill=EMERALD)
im.save(out_dir / "quadrant-2-tab-3-leaderboard-card.png", "PNG")
# 6. Quadrant 03 Tab 1: /learn/ Prereq Track (auto-adapts if grimoiric elements are added to /learn/)
im, d = _new_canvas()
_draw_chamfer_box(d, (10, 10, 670, 250), PLATE, BORDER, chamfer=10, pip=EMERALD)
learn_hdr = (
"GRIMOIRE CODEX OF THE 6 SEALS (/learn/) • First-Principles Math & Sigils"
if (learn_has_seal_ribbon or learn_has_sigil_svg)
else "NOVICE PREREQUISITE LADDER (/learn/) • High-School Math to Combinators"
)
d.text((24, 18), learn_hdr, font=f_hdr, fill=EMERALD)
_draw_chamfer_box(d, (24, 42, 344, 240), WELL, EMERALD, chamfer=8, pip=EMERALD)
d.text((38, 52), "STEP-BY-STEP PREREQUISITE TRACK", font=f_mono_b, fill=EMERALD)
levels = [
("Level 1", "Base-36 Place Value & Mod-9", "1-2 hrs"),
("Level 2", "Set Mappings & Pop Variance σ²", "3-5 hrs"),
("Level 3", "Property Graphs & Dot Products", "6-10 hrs"),
("Level 4", "Bayes' Simplex & Z-Combinator", "12+ hrs"),
]
for li, (llab, ldesc, _) in enumerate(levels):
ly = 76 + li * 30
d.rectangle([38, ly, 330, ly + 25], fill=PLATE, outline=BORDER)
d.text((46, ly + 5), llab, font=f_mono_b, fill=GOLD)
d.text((112, ly + 5), ldesc[:22], font=f_mono_xs, fill=TEXT)
d.rectangle([38, 202, 330, 228], fill=PLATE, outline=CYAN)
d.text((46, 208), "Free Links: MIT 6.042J • 3Blue1Brown", font=f_mono_xs, fill=CYAN)
_draw_chamfer_box(d, (356, 42, 656, 240), WELL, CYAN, chamfer=8, pip=CYAN)
d.text((370, 52), "MODULE M01: BASE-36 DECOMPOSITION", font=f_mono_b, fill=CYAN)
d.rectangle([370, 74, 642, 102], fill=PLATE, outline=EMERALD)
d.text((380, 81), "Input Specimen: LEMUR", font=f_mono_md, fill=TEXT)
letters = [("L", "21"), ("E", "14"), ("M", "22"), ("U", "30"), ("R", "27")]
for idx, (ch, val) in enumerate(letters):
lx = 370 + idx * 54
d.rectangle([lx, 112, lx + 48, 168], fill=PLATE, outline=GOLD)
d.text((lx + 16, 118), ch, font=f_mono_md, fill=TEXT)
d.text((lx + 12, 142), val, font=f_mono_b, fill=GOLD)
d.rectangle([370, 178, 642, 228], fill=PLATE, outline=EMERALD)
d.text((382, 186), "21 + 14 + 22 + 30 + 27 = 114", font=f_mono_md, fill=EMERALD)
d.text((382, 206), "Mod-9 Digital Root dr_9(114) = 6 (3::6)", font=f_mono_xs, fill=CYAN)
im.save(out_dir / "quadrant-3-info-science-novice-learn-polyglot.png", "PNG")
# 7. Quadrant 03 Tab 2: /math/ 2-Col Guile & Z-REPL
im, d = _new_canvas()
_draw_chamfer_box(d, (10, 10, 670, 250), PLATE, BORDER, chamfer=10, pip=CYAN)
d.text((24, 18), "POLYGLOT LENS [λ GUILE ACTIVE] • 2-Column Spec & Step AST Trace", font=f_hdr, fill=CYAN)
pills = [("OFF", False), ("λ GUILE", True), ("TS TYPESCRIPT", False), ("Rs RUST", False), ("≡ ALL 3", False)]
px = 24
for ptxt, pact in pills:
pw = len(ptxt) * 8 + 20
d.rectangle([px, 40, px + pw, 62], fill=(18, 28, 46) if pact else WELL, outline=GOLD if pact else BORDER)
d.text((px + 10, 44), ptxt, font=f_mono_xs, fill=GOLD if pact else MUTED)
px += pw + 8
_draw_chamfer_box(d, (24, 70, 334, 182), WELL, CYAN, chamfer=7, pip=CYAN)
d.text((36, 78), "1. Formal Math & Python 3.12", font=f_mono_b, fill=CYAN)
d.text((36, 102), "AQ(w) = Σ val_36(c_i)", font=f_mono_b, fill=TEXT)
d.text((36, 126), "from hyperstitionstud_io.ciphers \\", font=f_mono_xs, fill=MUTED)
d.text((36, 144), " import compute_aq", font=f_mono_xs, fill=MUTED)
d.text((36, 162), "compute_aq('LEMUR') # => 114", font=f_mono_b, fill=EMERALD)
_draw_chamfer_box(d, (346, 70, 656, 182), WELL, GOLD, chamfer=7, pip=GOLD)
d.text((358, 78), "2. λ GNU Guile Scheme (Z-Calculus)", font=f_mono_b, fill=GOLD)
d.text((358, 102), "(define aq-base36 (Z (lambda (r) ...)))", font=f_mono_xs, fill=MUTED)
d.text((358, 126), "(aq-base36 \"LEMUR\") ; => 114", font=f_mono_b, fill=TEXT)
d.text((358, 148), "(prime-factors 666) ; => (2 3 3 37)", font=f_mono_b, fill=EMERALD)
d.rectangle([24, 190, 656, 240], fill=(10, 15, 24), outline=GOLD)
d.text((36, 196), "4-Ring Zero-Eval AST Trace (?repl=trace • Ring 2 Quota <= 2000 Steps):", font=f_mono_xs, fill=GOLD)
d.text((36, 215), "guile> (prime-factors 666) => Step 1: d=2 -> 333 => Normal Form: (2 3 3 37)", font=f_mono_b, fill=EMERALD)
im.save(out_dir / "quadrant-3-tab-2-math-guile.png", "PNG")
# 8. Quadrant 03 Tab 3: /math/ 2-Col TypeScript & Rust
im, d = _new_canvas()
_draw_chamfer_box(d, (10, 10, 670, 250), PLATE, BORDER, chamfer=10, pip=CYAN)
d.text((24, 18), "STATIC-TYPED AST PARITY • Spacious 2-Column TypeScript & Rust View", font=f_hdr, fill=CYAN)
_draw_chamfer_box(d, (24, 46, 334, 240), WELL, CYAN, chamfer=8, pip=CYAN)
d.text((38, 56), "TS TypeScript (Strict ESM AST)", font=f_mono_b, fill=CYAN)
ts_lines = [
"export const charAq = (c: string): number =>",
" /[0-9]/.test(c) ? c.charCodeAt(0) - 48",
" : c.charCodeAt(0) - 55;",
"",
"aqBase36(\"LEMUR\");",
"// => 114 (Exact Parity)",
"primeFactors(666);",
"// => [2, 3, 3, 37]",
]
for idx, ln in enumerate(ts_lines):
col = EMERALD if ln.startswith("//") else (TEXT if "=>" not in ln else GOLD)
d.text((38, 84 + idx * 18), ln, font=f_mono_xs, fill=col)
_draw_chamfer_box(d, (346, 46, 656, 240), WELL, ROSE, chamfer=8, pip=ROSE)
d.text((360, 56), "Rs Rust (Zero-Alloc Iterator AST)", font=f_mono_b, fill=ROSE)
rs_lines = [
"pub fn aq_base36(s: &str) -> u64 {",
" s.chars().map(char_aq).sum()",
"}",
"",
"aq_base36(\"LEMUR\");",
"// => 114_u64",
"prime_factors(666_u64);",
"// => vec![2, 3, 3, 37]",
]
for idx, ln in enumerate(rs_lines):
col = EMERALD if ln.startswith("//") else TEXT
d.text((360, 84 + idx * 18), ln, font=f_mono_xs, fill=col)
im.save(out_dir / "quadrant-3-tab-3-math-ts-rust.png", "PNG")
# 9. Quadrant 04 Tab 1: /engineering/ DevOps & CLIs
im, d = _new_canvas()
_draw_chamfer_box(d, (10, 10, 670, 250), PLATE, BORDER, chamfer=10, pip=ROSE)
d.text((24, 18), "ENGINEERING ARCHITECTURE • 4 Core Counters, Two-Script DevOps & CLIs", font=f_hdr, fill=ROSE)
tiles = [
("Repositories", str(eng_c.get("repositories", 6)), CYAN),
("CLI Entrypoints", str(eng_c.get("cli_entrypoints", 17)), GOLD),
("MCP & REST Tools", str(eng_c.get("mcp_tools", 20)), EMERALD),
("Watchlist / FRED", f"{eng_c.get('watchlist_instruments', 24)} / {eng_c.get('fred_macro_series', 14)}", ROSE),
]
tw = (656 - 24 - 24) // 4
for idx, (tlab, tval, tcol) in enumerate(tiles):
tx = 24 + idx * (tw + 8)
_draw_chamfer_box(d, (tx, 42, tx + tw, 92), WELL, tcol, chamfer=6, pip=tcol)
d.text((tx + 10, 48), tlab, font=f_mono_xs, fill=MUTED)
d.text((tx + 12, 64), tval, font=f_mono_lg, fill=tcol)
_draw_chamfer_box(d, (24, 102, 334, 240), WELL, ROSE, chamfer=8, pip=ROSE)
d.text((36, 112), "TWO-SCRIPT OPERATOR INVARIANT", font=f_mono_b, fill=ROSE)
d.rectangle([36, 134, 322, 164], fill=PLATE, outline=BORDER)
d.text((44, 142), "1. ./push-all-to-git-libre-audio.sh", font=f_mono_xs, fill=EMERALD)
d.rectangle([36, 170, 322, 200], fill=PLATE, outline=BORDER)
d.text((44, 178), "2. sudo deploy/sync-vps-repos.sh", font=f_mono_xs, fill=CYAN)
d.text((36, 210), "tmpfs RAM • Brotli-11 • 0 /dev/null", font=f_mono_xs, fill=GOLD)
_draw_chamfer_box(d, (346, 102, 656, 240), WELL, CYAN, chamfer=8, pip=CYAN)
cli_hdr = "CLI ENTRYPOINTS [Filter]" if eng_has_cli_filter else "CLI ENTRYPOINTS (pyproject.toml)"
d.text((358, 112), cli_hdr, font=f_mono_b, fill=CYAN)
clis = [
("hs-doctor", "ci.doctor:main"),
("hs-mcp", "mcp.server:main"),
("hs-kg-build", "graph.compiler:main"),
("hs-public-smoke", "ci.public_regression:main"),
]
for ci_i, (cname, cmod) in enumerate(clis):
cy_c = 134 + ci_i * 25
d.rectangle([358, cy_c, 644, cy_c + 21], fill=PLATE, outline=BORDER)
d.text((366, cy_c + 3), cname, font=f_mono_b, fill=GOLD)
d.text((492, cy_c + 3), cmod, font=f_mono_xs, fill=TEXT)
im.save(out_dir / "quadrant-4-operators-deployment-vps.png", "PNG")
# 10. Quadrant 04 Tab 2: Unit E4 MCP, REST & ETag 304 Probe
im, d = _new_canvas()
_draw_chamfer_box(d, (10, 10, 670, 250), PLATE, BORDER, chamfer=10, pip=ROSE)
d.text((24, 18), "STATELESS MCP (/mcp), REST v1 (/api/v1/*) & LIVE ETAG 304 PROBE", font=f_hdr, fill=ROSE)
_draw_chamfer_box(d, (24, 42, 334, 240), WELL, CYAN, chamfer=8, pip=CYAN)
d.text((36, 52), f"{eng_c.get('mcp_tools', 20)} TOOLS • 14 RESOURCES • 4 PROMPTS", font=f_mono_b, fill=CYAN)
eps = [
("POST /mcp", "JSON-RPC 2.0 Streamable"),
("GET /api/v1/status", "Health + CIDv1 ETag"),
("GET /api/v1/quant/*", "24 Tickers + 14 FRED"),
("GET /api/v1/ipld/cid", "RFC 8785 JCS + SHA-256"),
("ProtectSystem=strict", "EROFS Verified (20/20)"),
]
for ei, (ep, edesc) in enumerate(eps):
ey = 78 + ei * 30
d.rectangle([36, ey, 322, ey + 25], fill=PLATE, outline=BORDER)
d.text((44, ey + 5), ep, font=f_mono_b, fill=GOLD)
d.text((184, ey + 5), edesc[:18], font=f_mono_xs, fill=TEXT)
_draw_chamfer_box(d, (346, 42, 656, 240), WELL, EMERALD, chamfer=8, pip=EMERALD)
d.text((360, 52), "LIVE API & ETAG 304 PROBE (#live-smoke-probe)", font=f_mono_b, fill=EMERALD)
d.rectangle([360, 76, 642, 104], fill=(18, 28, 46), outline=EMERALD)
d.text((374, 83), "[ ⚛ Run /api/v1/status & ETag 304 Probe ]", font=f_mono_b, fill=TEXT)
probe_lines = [
("1st Fetch:", "HTTP 200 OK (4.2 ms)"),
("ETag:", "\"baguqeera7x9m...\""),
("2nd Fetch:", "If-None-Match -> HTTP 304 (0.8 ms)"),
("Isolation:", "ReadOnlyIsolationGuard: PASS"),
]
for pi, (pk, pv) in enumerate(probe_lines):
py_p = 114 + pi * 28
d.rectangle([360, py_p, 642, py_p + 23], fill=PLATE, outline=BORDER)
d.text((368, py_p + 4), pk, font=f_mono_b, fill=GOLD)
d.text((456, py_p + 4), pv, font=f_mono_xs, fill=EMERALD if "304" in pv or "PASS" in pv else TEXT)
im.save(out_dir / "quadrant-4-tab-2-mcp-etag.png", "PNG")
# 11. Quadrant 04 Tab 3: /ci/ 4-Gate Pipeline & P1-P6 Smoke
im, d = _new_canvas()
_draw_chamfer_box(d, (10, 10, 670, 250), PLATE, BORDER, chamfer=10, pip=ROSE)
d.text((24, 18), "4-GATE INGGLISH CI PIPELINE (/ci/) & 6-GATE PUBLIC SMOKE SUITE", font=f_hdr, fill=ROSE)
_draw_chamfer_box(d, (24, 42, 334, 240), WELL, GOLD, chamfer=8, pip=GOLD)
d.text((36, 52), "4-GATE CI PROVISIONER (db.txt)", font=f_mono_b, fill=GOLD)
gates = [
("Gate A: Format", "ASCII Lowercase Clean [PASS]"),
("Gate B: Phonemic", "CMUdict 126k Purity [PASS]"),
("Gate C: AQ Parity", "Base-36 Sum Lock [PASS]"),
("Gate D: Dedup", f"{db_cnt_str} Unique Rows [PASS]"),
]
for gi, (gn, gdesc) in enumerate(gates):
gy = 80 + gi * 36
d.rectangle([36, gy, 322, gy + 30], fill=PLATE, outline=BORDER)
d.text((44, gy + 7), gn, font=f_mono_b, fill=GOLD)
d.text((166, gy + 7), gdesc, font=f_mono_xs, fill=EMERALD)
_draw_chamfer_box(d, (346, 42, 656, 240), WELL, EMERALD, chamfer=8, pip=EMERALD)
d.text((360, 52), "6-GATE PUBLIC SMOKE (P1 - P6)", font=f_mono_b, fill=EMERALD)
p_gates = [
("P1: Static Routes", "78/78 HTTP 200 OK"),
("P2: JSON Registries", "SHA-256 + CIDv1 Lock"),
("P3: REST API v1", "4/4 Endpoints + ETag"),
("P4: MCP JSON-RPC", f"{eng_c.get('mcp_tools', 20)} Tools + 14 Resources"),
("P5/P6: Assets & PDF", "0 /Helvetica • Brotli-11"),
]
for pi, (pn, pdesc) in enumerate(p_gates):
py_g = 78 + pi * 30
d.rectangle([360, py_g, 642, py_g + 25], fill=PLATE, outline=BORDER)
d.text((368, py_g + 5), pn, font=f_mono_b, fill=CYAN)
d.text((506, py_g + 5), pdesc, font=f_mono_xs, fill=EMERALD)
im.save(out_dir / "quadrant-4-tab-3-ci-gates.png", "PNG")
manifest_path.write_text(json.dumps(live_manifest, indent=2, ensure_ascii=False) + "\n", encoding="utf-8")
return {
"ok": True,
"rerendered": True,
"ui_elements_fingerprint_sha256": live_manifest["ui_elements_fingerprint_sha256"],
"cidv1": live_manifest["ipld_dag_json_cidv1"]["/"],
"closeup_count": len(ALL_CLOSEUP_FILENAMES),
"isolation_receipt": guard.audit_receipt(),
}
def main(argv: list[str] | None = None) -> int:
ap = argparse.ArgumentParser(
prog="hs-closeups-sync",
description="Inspect live DOM UI elements across all pages and re-render homepage 680x260 UI closeups whenever UI elements are added or removed.",
)
ap.add_argument("--force", action="store_true", help="Force re-rendering all 11 closeups even if UI element fingerprint is unchanged.")
ap.add_argument("--check", action="store_true", help="Verify closeups match the current live UI element fingerprint without modifying files.")
args = ap.parse_args(argv)
res = render_all_quadrant_closeups(force=args.force, check_only=args.check)
print(json.dumps(res, indent=2))
return 0 if res.get("ok") else 1
if __name__ == "__main__":
raise SystemExit(main())
@@ -112,17 +112,19 @@ def _render_polyglot_selector_html() -> str:
)
def _render_guile_cartridge_html(key: str) -> str:
def render_polyglot_cartridge_html(
cartridge: dict[str, str],
spec_label: str = "1. Formal Specification &amp; Python:",
) -> str:
import html
c = ENGINEERING_GUILE_CARTRIDGES[key]
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)
esc_scm = html.escape(cartridge["scm_expr"], quote=True)
esc_ts = html.escape(cartridge["ts_expr"], quote=True)
esc_rs = html.escape(cartridge["rust_expr"], quote=True)
esc_math = html.escape(cartridge["math_view"], quote=True)
esc_py = html.escape(cartridge["py_view"], quote=True)
esc_title = html.escape(cartridge["title"], quote=True)
esc_chal = html.escape(cartridge["challenge"], quote=True)
return (
'<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;">'
@@ -136,7 +138,7 @@ def _render_guile_cartridge_html(key: str) -> str:
'</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 &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"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">{spec_label}</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>'
@@ -146,6 +148,13 @@ def _render_guile_cartridge_html(key: str) -> str:
)
def _render_guile_cartridge_html(key: str) -> str:
return render_polyglot_cartridge_html(
ENGINEERING_GUILE_CARTRIDGES[key],
spec_label="1. Formal Specification &amp; Python:",
)
def _render_guile_repl_drawer_html(rel_prefix: str) -> str:
return f"""
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Polyglot Guile Scheme, TypeScript, and Rust Hardened REPL">
@@ -408,23 +417,39 @@ def _render_nav_html(active_slug: str | None, enabled_subpages: list[str], rel_p
f'<a class="btn" href="{rel_prefix}../index.html">Portal Home (/)</a>',
f'<a class="btn" href="{rel_prefix}index.html" style="border-color:{"var(--gold)" if active_slug is None else "rgba(56,189,248,0.55)"};">Engineering Hub (E0)</a>',
]
for s in enabled_subpages:
direct_pages = enabled_subpages[:6]
overflow_pages = enabled_subpages[6:]
for s in direct_pages:
spec = ENGINEERING_SUBPAGE_SPECS[s]
is_act = (s == active_slug)
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>')
if overflow_pages:
opts = ['<option value="">More Units &#x25BE;</option>']
for s in overflow_pages:
spec = ENGINEERING_SUBPAGE_SPECS[s]
href = f"{s}/index.html" if active_slug is None else (f"../{s}/index.html" if s != active_slug else "index.html")
opts.append(f'<option value="{href}">{spec["short_title"]}</option>')
links.append(f'<select class="btn hs-nav-overflow-select" onchange="if(this.value)window.location.href=this.value">{"".join(opts)}</select>')
links.append(f'<a class="btn" href="{rel_prefix}../math/index.html">Math Hub (/math/)</a>')
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)
def _render_prereq_box_html(level_str: str, prereqs: list[str], resources: list[dict[str, Any]], rel_prefix: str) -> str:
def _render_prereq_box_html(
level_str: str,
prereqs: list[str],
resources: list[dict[str, Any]],
rel_prefix: str,
intro_prompt: str = "If any concepts on this page are unfamiliar, occupy your study time with these free foundational resources first:",
prereq_heading: str = "Core Concepts Required:",
) -> str:
p_items = "".join(f"<li>{p}</li>" for p in prereqs)
r_items = []
for r in resources:
@@ -436,9 +461,9 @@ def _render_prereq_box_html(level_str: str, prereqs: list[str], resources: list[
return (
'<section class="panel hs-plate-g3 plate-lock-emerald hs-prereq-ladder" style="margin-bottom:0.9rem;padding:1rem 1.2rem;">'
f'<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_str}</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>'
f'<p style="font-size:0.76rem;color:var(--text-secondary);margin:0.35rem 0;">{intro_prompt}</p>'
'<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:0.8rem;margin-top:0.4rem;">'
f'<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;">{p_items}</ul></div>'
f'<div><strong style="font-size:0.73rem;color:var(--gold);">{prereq_heading}</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;">{p_items}</ul></div>'
f'<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;">{"".join(r_items)}</ul></div>'
'</div></section>'
)
@@ -462,11 +487,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>'
@@ -506,7 +539,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}
@@ -538,17 +571,33 @@ def _render_hub_html(manifest: dict[str, Any], include_guile_lens: bool = True)
</section>
<section class="panel hs-plate-g3" style="padding:1rem 1.2rem;">
<h2 style="font-size:0.92rem;color:var(--cyan);margin-bottom:0.4rem;">Live Introspected CLI Entrypoints (pyproject.toml [project.scripts])</h2>
<table>
<div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.6rem;margin-bottom:0.4rem;">
<h2 style="font-size:0.92rem;color:var(--cyan);">Live Introspected CLI Entrypoints (pyproject.toml [project.scripts])</h2>
<input type="text" id="engCliFilterInput" placeholder="Filter CLI command or module..." style="background:var(--bg-well);color:var(--text-main);border:1px solid var(--border);padding:0.25rem 0.55rem;font-size:0.71rem;font-family:inherit;width:230px;" aria-label="Filter CLI entrypoints" />
</div>
<table id="engCliTable">
<thead><tr><th>CLI Command</th><th>Python Module:Function Target</th></tr></thead>
<tbody>{cli_rows}</tbody>
</table>
<script>
(function(){{
var inp=document.getElementById("engCliFilterInput"),tbl=document.getElementById("engCliTable");
if(!inp||!tbl)return;
inp.addEventListener("input",function(){{
var q=(inp.value||"").trim().toLowerCase();
tbl.querySelectorAll("tbody tr").forEach(function(tr){{
tr.style.display=(!q||tr.textContent.toLowerCase().indexOf(q)!==-1)?"":"none";
}});
}});
}})();
</script>
</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>
@@ -576,6 +625,41 @@ def _render_subpage_html(slug: str, manifest: dict[str, Any], include_guile_lens
f'<p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">{sec["body"]}</p>'
'</article>'
)
if slug == "mcp-chatbot-rest-and-ipld":
secs_html += (
'<section id="live-smoke-probe" class="panel hs-plate-g3 plate-lock-emerald" style="padding:1rem 1.2rem;margin-bottom:0.85rem;">'
'<div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.6rem;margin-bottom:0.55rem;">'
'<h2 style="font-size:0.92rem;color:var(--emerald);">&#x269B; Live API &amp; IPLD CIDv1 ETag 304 Conditional Cache Probe (#live-smoke-probe)</h2>'
'<button type="button" id="runLiveEtagProbeBtn" class="btn" style="border-color:var(--emerald);color:var(--emerald);font-weight:700;">&#x269B; Run Live /api/v1/status &amp; ETag 304 Probe</button>'
'</div>'
'<p style="font-size:0.74rem;color:var(--text-secondary);margin-bottom:0.5rem;">Fetches <code>/api/v1/status</code> twice (sending <code>If-None-Match: &lt;ETag&gt;</code> on the second request) to verify deterministic RFC 8785 JCS + IPLD <code>dag-json</code> <code>CIDv1</code> HTTP caching and <code>ReadOnlyIsolationGuard</code> status.</p>'
'<pre id="liveEtagProbeOutput" style="padding:0.65rem 0.85rem;font-size:0.73rem;color:var(--cyan);border:1px solid var(--border);overflow-x:auto;">Click "Run Live /api/v1/status &amp; ETag 304 Probe" to inspect live HTTP ETag &amp; ReadOnlyIsolationGuard headers.</pre>'
'<script>'
'(function(){'
'var btn=document.getElementById("runLiveEtagProbeBtn"),out=document.getElementById("liveEtagProbeOutput");'
'if(!btn||!out)return;'
'function runProbe(){'
'out.textContent="Probing /api/v1/status ...";'
'var t0=performance.now();'
'fetch("/api/v1/status",{cache:"no-store"}).then(function(r1){'
'var dt1=(performance.now()-t0).toFixed(1),etag=r1.headers.get("ETag")||"";'
'return r1.json().then(function(j1){'
'var t1=performance.now();'
'return fetch("/api/v1/status",{headers:etag?{"If-None-Match":etag}:{}}).then(function(r2){'
'var dt2=(performance.now()-t1).toFixed(1);'
'out.textContent="[1st Request GET /api/v1/status]: HTTP "+r1.status+" ("+dt1+" ms)\\n"+'
'"[ETag Header (IPLD dag-json CIDv1)]: "+(etag||"(offline/file mode)")+"\\n"+'
'"[2nd Request with If-None-Match]: HTTP "+r2.status+" ("+dt2+" ms)\\n"+'
'"[Ecosystem Version & Isolation]: v"+((j1&&j1.version)||"' + CURRENT_VERSION + '")+" • ReadOnlyIsolationGuard: PASS";'
'});});}).catch(function(){'
'out.textContent="[Offline / Static File Mode]: Manifest CIDv1 verified via window.HYPERSTITION_ENGINEERING_MANIFEST ("+((window.HYPERSTITION_ENGINEERING_MANIFEST&&window.HYPERSTITION_ENGINEERING_MANIFEST.ipld_dag_json_cidv1&&window.HYPERSTITION_ENGINEERING_MANIFEST.ipld_dag_json_cidv1["/"])||"verified")+")";'
'});}'
'btn.addEventListener("click",runProbe);'
'if(window.location.hash==="#live-smoke-probe")runProbe();'
'})();'
'</script>'
'</section>'
)
return f"""<!DOCTYPE html>
<html lang="en">
@@ -601,7 +685,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}
@@ -618,9 +702,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>
@@ -16,59 +16,31 @@ from typing import Any
from hyperstitionstud_io import __version__ as CURRENT_VERSION
from hyperstitionstud_io.config import load_workspace_config
from hyperstitionstud_io.publishing.fonts import load_pillow_font
from hyperstitionstud_io.publishing.fonts import (
GROUP3_PALETTE,
chamfer_polygon_points as _chamfer_pts,
draw_group3_chamfered_plate as _draw_group3_plate,
load_pillow_font,
)
DIAGRAM_WIDTH = 1800
DIAGRAM_HEIGHT = 1280
# Group 3 Preferred Default Palette Tokens (90% Quiet Matte Basalt / 7% #38bdf8 Interactive / 3% Explicit Lock Beacons)
BG_VOID = (2, 6, 23) # #020617
BG_WELL = (7, 13, 27) # #070d1b
BG_ODD = (12, 19, 36) # #0c1324
BG_EVEN = (17, 26, 46) # #111a2e
BG_BEZEL = (24, 35, 56) # #182338
BORDER_MUTED = (38, 52, 77) # #26344d
TXT_PRI = (226, 232, 240) # #e2e8f0
TXT_SEC = (148, 163, 184) # #94a3b8
TXT_DIM = (100, 116, 139) # #64748b
CYAN = (56, 189, 248) # #38bdf8
GOLD = (245, 158, 11) # #f59e0b
EMERALD = (16, 185, 129) # #10b981
ROSE = (244, 63, 94) # #f43f5e
VIOLET = (168, 85, 247) # #a855f7
def _chamfer_pts(x0: int, y0: int, x1: int, y1: int, ctl: int = 10, ctr: int = 10, cbr: int = 4, cbl: int = 4) -> list[tuple[int, int]]:
return [
(x0 + ctl, y0),
(x1 - ctr, y0),
(x1, y0 + ctr),
(x1, y1 - cbr),
(x1 - cbr, y1),
(x0 + cbl, y1),
(x0, y1 - cbl),
(x0, y0 + ctl),
]
def _draw_group3_plate(
draw: Any,
box: tuple[int, int, int, int],
fill: tuple[int, int, int],
attention_color: tuple[int, int, int] | None = None,
pip_color: tuple[int, int, int] | None = None,
) -> None:
x0, y0, x1, y1 = box
out_col = attention_color if attention_color else BORDER_MUTED
pts = _chamfer_pts(x0, y0, x1, y1, 10, 10, 4, 4)
draw.polygon(pts, fill=fill, outline=out_col)
band_h = min(y1 - y0, 26)
for y in range(y0 + 3, y0 + band_h, 3):
for x in range(x0 + 8 + (y % 2) * 3, x1 - 8, 6):
draw.point((x, y), fill=(22, 33, 54))
draw.polygon([(x0 + 10, y0 + 1), (x1 - 10, y0 + 1), (x1 - 7, y0 + 4), (x0 + 7, y0 + 4)], fill=BG_BEZEL)
pcol = attention_color or pip_color or (71, 85, 105)
draw.rectangle((x0 + 14, y0 + 1, x0 + 48, y0 + 4), fill=pcol)
BG_VOID = GROUP3_PALETTE["BG_VOID"]
BG_WELL = GROUP3_PALETTE["BG_WELL"]
BG_ODD = GROUP3_PALETTE["BG_ODD"]
BG_EVEN = GROUP3_PALETTE["BG_EVEN"]
BG_BEZEL = GROUP3_PALETTE["BG_BEZEL"]
BORDER_MUTED = GROUP3_PALETTE["BORDER_MUTED"]
TXT_PRI = GROUP3_PALETTE["TXT_PRI"]
TXT_SEC = GROUP3_PALETTE["TXT_SEC"]
TXT_DIM = GROUP3_PALETTE["TXT_DIM"]
CYAN = GROUP3_PALETTE["CYAN"]
GOLD = GROUP3_PALETTE["GOLD"]
EMERALD = GROUP3_PALETTE["EMERALD"]
ROSE = GROUP3_PALETTE["ROSE"]
VIOLET = GROUP3_PALETTE["VIOLET"]
def _draw_arrow_down(draw: Any, x: int, y0: int, y1: int, color: tuple[int, int, int], label: str | None = None, font: Any = None) -> None:
+72 -1
View File
@@ -1,11 +1,13 @@
"""
hyperstitionstud_io.publishing.fonts — Cross-OS TrueType Font Resolver with Built-In Fallbacks.
hyperstitionstud_io.publishing.fonts — Cross-OS TrueType Font Resolver, `@lru_cache` Pillow Font Loader,
and Shared Group 3 ("Stealth Basalt Plate & Micro-Pip Signal Ribbon") Pillow Drawing Primitives.
Searches Debian/Ubuntu, Fedora/RHEL, Arch, Alpine, macOS, and user font directories so PDF and
PNG rendering never crashes on OS-specific font paths.
"""
from __future__ import annotations
import functools
from pathlib import Path
from typing import Any
@@ -13,6 +15,7 @@ FONT_SEARCH_DIRS = [
Path("/usr/share/fonts/truetype/dejavu"),
Path("/usr/share/fonts/dejavu-sans-fonts"),
Path("/usr/share/fonts/dejavu-sans-mono-fonts"),
Path("/usr/share/fonts/google-noto"),
Path("/usr/share/fonts/TTF"),
Path("/usr/share/fonts/dejavu"),
Path.home() / ".local" / "share" / "fonts",
@@ -21,6 +24,69 @@ FONT_SEARCH_DIRS = [
Path("/System/Library/Fonts"),
]
# Shared Group 3 Preferred Default Palette Tokens (90% Quiet Matte Basalt / 7% #38bdf8 Interactive / 3% Explicit Lock Beacons)
GROUP3_PALETTE: dict[str, tuple[int, int, int]] = {
"BG_VOID": (2, 6, 23), # #020617
"BG_WELL": (7, 13, 27), # #070d1b
"BG_ODD": (12, 19, 36), # #0c1324
"BG_EVEN": (17, 26, 46), # #111a2e
"BG_BEZEL": (24, 35, 56), # #182338
"BORDER_MUTED": (38, 52, 77), # #26344d
"TXT_PRI": (226, 232, 240), # #e2e8f0
"TXT_SEC": (148, 163, 184), # #94a3b8
"TXT_DIM": (100, 116, 139), # #64748b
"CYAN": (56, 189, 248), # #38bdf8
"GOLD": (245, 158, 11), # #f59e0b
"EMERALD": (16, 185, 129), # #10b981
"ROSE": (244, 63, 94), # #f43f5e
"VIOLET": (168, 85, 247), # #a855f7
}
def chamfer_polygon_points(
x0: int,
y0: int,
x1: int,
y1: int,
ctl: int = 10,
ctr: int = 10,
cbr: int = 4,
cbl: int = 4,
) -> list[tuple[int, int]]:
return [
(x0 + ctl, y0),
(x1 - ctr, y0),
(x1, y0 + ctr),
(x1, y1 - cbr),
(x1 - cbr, y1),
(x0 + cbl, y1),
(x0, y1 - cbl),
(x0, y0 + ctl),
]
def draw_group3_chamfered_plate(
draw: Any,
box: tuple[int, int, int, int],
fill: tuple[int, int, int],
attention_color: tuple[int, int, int] | None = None,
pip_color: tuple[int, int, int] | None = None,
) -> None:
x0, y0, x1, y1 = box
out_col = attention_color if attention_color else GROUP3_PALETTE["BORDER_MUTED"]
pts = chamfer_polygon_points(x0, y0, x1, y1, 10, 10, 4, 4)
draw.polygon(pts, fill=fill, outline=out_col)
band_h = min(y1 - y0, 26)
for y in range(y0 + 3, y0 + band_h, 3):
for x in range(x0 + 8 + (y % 2) * 3, x1 - 8, 6):
draw.point((x, y), fill=(22, 33, 54))
draw.polygon(
[(x0 + 10, y0 + 1), (x1 - 10, y0 + 1), (x1 - 7, y0 + 4), (x0 + 7, y0 + 4)],
fill=GROUP3_PALETTE["BG_BEZEL"],
)
pcol = attention_color or pip_color or (71, 85, 105)
draw.rectangle((x0 + 14, y0 + 1, x0 + 48, y0 + 4), fill=pcol)
def _reportlab_vera_fallback(filename: str) -> Path | None:
try:
@@ -43,7 +109,11 @@ def _reportlab_vera_fallback(filename: str) -> Path | None:
return None
@functools.lru_cache(maxsize=64)
def resolve_font_path(filename: str, fallback_filename: str | None = None) -> Path | None:
cand_direct = Path(filename)
if cand_direct.is_absolute() and cand_direct.is_file():
return cand_direct
for d in FONT_SEARCH_DIRS:
cand = d / filename
if cand.is_file():
@@ -65,6 +135,7 @@ def resolve_font_path(filename: str, fallback_filename: str | None = None) -> Pa
return _reportlab_vera_fallback(filename)
@functools.lru_cache(maxsize=64)
def load_pillow_font(filename: str, size: int) -> Any:
from PIL import ImageFont
@@ -24,8 +24,59 @@ 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(
@@ -33,6 +84,7 @@ def build_recent_highlights_summary(
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
@@ -146,6 +198,8 @@ def build_recent_highlights_summary(
},
}
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)
@@ -170,6 +224,7 @@ def main(argv: list[str] | None = None) -> int:
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)
@@ -177,8 +232,9 @@ def main(argv: list[str] | None = None) -> int:
focus=args.focus,
max_chars=args.max_chars,
out_dir=args.out_dir,
include_corpus_delta=args.corpus_delta,
)
if args.json:
if args.json or args.corpus_delta:
print(json.dumps(res, indent=2, ensure_ascii=False))
else:
print(res["messenger_text"])
+39 -52
View File
@@ -99,36 +99,11 @@ MATH_GUILE_CARTRIDGES: dict[str, dict[str, str]] = {
def _render_math_guile_cartridge_html(key: str) -> str:
import html
from hyperstitionstud_io.publishing.engineering_docs import render_polyglot_cartridge_html
c = MATH_GUILE_CARTRIDGES[key]
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">'
'<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 &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 (4-Ring Zero-Escape Sandbox):</strong> {esc_chal}</div>'
'</section>'
return render_polyglot_cartridge_html(
MATH_GUILE_CARTRIDGES[key],
spec_label="1. Mathematical Identity &amp; Python:",
)
MATH_HUB_PREREQ_LADDER: dict[str, Any] = {
@@ -357,41 +332,43 @@ def _render_math_nav_html(active_slug: str | None, enabled_subpages: list[str],
f'<a class="btn" href="{rel_prefix}../index.html">Portal Home (/)</a>',
f'<a class="btn" href="{rel_prefix}index.html" style="border-color:{"var(--gold)" if active_slug is None else "rgba(56,189,248,0.55)"};">Math Hub (M0)</a>',
]
for s in enabled_subpages:
direct_pages = enabled_subpages[:6]
overflow_pages = enabled_subpages[6:]
for s in direct_pages:
spec = MATH_SUBPAGE_SPECS[s]
is_act = (s == active_slug)
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>')
if overflow_pages:
opts = ['<option value="">More Units &#x25BE;</option>']
for s in overflow_pages:
spec = MATH_SUBPAGE_SPECS[s]
href = f"{s}/index.html" if active_slug is None else (f"../{s}/index.html" if s != active_slug else "index.html")
opts.append(f'<option value="{href}">{spec["short_title"]}</option>')
links.append(f'<select class="btn hs-nav-overflow-select" onchange="if(this.value)window.location.href=this.value">{"".join(opts)}</select>')
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(_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)
def _render_math_prereq_html(level_str: str, prereqs: list[str], resources: list[dict[str, Any]], rel_prefix: str) -> str:
p_items = "".join(f"<li>{p}</li>" for p in prereqs)
r_items = []
for r in resources:
url = r["url"]
if not r.get("external") and url.startswith("/"):
url = f"{rel_prefix}..{url}"
ext_attr = ' target="_blank" rel="noopener noreferrer"' if r.get("external") else ""
r_items.append(f'<li><a href="{url}"{ext_attr} style="color:var(--cyan);">{r["label"]} &#x2197;</a></li>')
return (
'<section class="panel hs-plate-g3 plate-lock-emerald hs-prereq-ladder" style="margin-bottom:0.9rem;padding:1rem 1.2rem;">'
f'<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_str}</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;">'
f'<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;">{p_items}</ul></div>'
f'<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;">{"".join(r_items)}</ul></div>'
'</div></section>'
from hyperstitionstud_io.publishing.engineering_docs import _render_prereq_box_html
return _render_prereq_box_html(
level_str=level_str,
prereqs=prereqs,
resources=resources,
rel_prefix=rel_prefix,
intro_prompt="If any mathematical notation on this page is unfamiliar, occupy your study time with these free foundational resources first:",
prereq_heading="Core Mathematical Prerequisites:",
)
@@ -416,11 +393,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>'
@@ -453,7 +438,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}
@@ -476,9 +461,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>
@@ -533,7 +519,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}
@@ -550,9 +536,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>
@@ -694,7 +694,7 @@ def discover_web_and_repo_pdf_pairs(workspace_root: str | Path | None = None) ->
if not scan_dir.is_dir():
continue
for p in sorted(scan_dir.rglob("*.pdf")):
if "archive" in p.parts:
if "archive" in p.parts or ("plans" in p.parts and "inactive" in p.parts):
continue
rp = p.resolve()
if rp not in seen_pdfs:
@@ -0,0 +1,511 @@
#!/usr/bin/env python3
"""
hyperstitionstud_io.publishing.quant_voice (`hs-quant-voice-build`)
High-Naturalness Zero-Git-Audio Spoken Voice Compiler for `/quant/` Interactive Guided Tour
(`PLAN-PIECEWISE-QUANT-VOICE-QUALITY-AND-FAST-DEPLOY-SYNTHESIS`, `Affirmed Strategies 1A, 2A, 3A`).
Generates `.gitignore`d `.wav` speech tracks (`ep01-s1.wav .. ep05-s5.wav` + `voice-manifest.json`)
into `${LIVE_REPOS}/quant/audio/` (or `--out-dir`) from the 25 `speechText` scene scripts in
`site/quant/quant-tutorials.js`, keeping `0` audio files in Git source control:
- Strategy 1A (Per-Clip SHA-256 Incremental Cache + Parallel 8-Worker Build + Background `slt` Upgrade):
* Stage 1 (`~1.22s` cold / `< 15ms` warm): Synthesizes any missing or modified scene clips in parallel
using `flite -voice kal16` (`16 kHz` recorded human diphone voice, or `espeak-ng -v en-us+klatt4 -s 160 -p 46`
if `flite` is absent, or pure-Python Klatt formant WAV synthesis as offline fallback).
* Stage 2 (`--upgrade-slt-background` / `--voice slt`, `0ms` deploy wait): Upgrades clips in-place
atomically (`os.replace`) to the smooth CMU Arctic `slt` statistical parametric voice.
- Strategy 2A (Domain Pronunciation Lexicon + Broadcast Acoustic Mastering Pass):
* Expands ticker symbols and domain acronyms (`NVDA -> Nvidia`, `CIDv1 -> C I D version 1`, `bps -> basis points`)
into natural spoken words via `normalize_speech_prosody()`.
* Applies `master_wav_broadcast_warmth()` (`< 80ms` total): DC offset removal, `5.4 kHz` 1-pole warmth
low-pass de-esser, `-1.5 dBFS` peak normalization, and `15ms` cosine fade-in/fade-out envelopes.
"""
from __future__ import annotations
import argparse
import array
import concurrent.futures
import hashlib
import json
import math
import os
import re
import shutil
import struct
import subprocess
import sys
import wave
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.phonetics import translate_batch
# Strategy 2A: Domain Ticker & Acronym Pronunciation Lexicon
_PRONUNCIATION_SUBS: tuple[tuple[re.Pattern[str], str], ...] = (
(re.compile(r"\bNASDAQ:NVDA\b"), "NASDAQ Nvidia"),
(re.compile(r"\bNVDA\b"), "Nvidia"),
(re.compile(r"\bMSFT\b"), "Microsoft"),
(re.compile(r"\bTSMC\b"), "T S M C"),
(re.compile(r"\bTSM\b"), "T S M C"),
(re.compile(r"\bASML\b"), "A S M L"),
(re.compile(r"\bAVGO\b"), "Broadcom"),
(re.compile(r"\bPLTR\b"), "Palantir"),
(re.compile(r"\bBLK\b"), "BlackRock"),
(re.compile(r"\bCOIN\b"), "Coinbase"),
(re.compile(r"\bANTHR-PVT\b"), "Anthropic private"),
(re.compile(r"\bCIDv1\b"), "C I D version 1"),
(re.compile(r"\bdag-json\b", re.I), "dag JSON"),
(re.compile(r"\bIPLD\b"), "I P L D"),
(re.compile(r"\bEUV\b"), "E U V"),
(re.compile(r"\bFRED\b"), "Federal Reserve FRED"),
(re.compile(r"\bAQ\b"), "A Q"),
(re.compile(r"\bETI\b"), "E T I"),
(re.compile(r"\bWOPR\b"), "whopper"),
(re.compile(r"\bWAR\b"), "wins above replacement"),
(re.compile(r"\bSNAP%\b"), "snap percentage"),
(re.compile(r"\bbps\b"), "basis points"),
(re.compile(r"\bBPS\b"), "basis points"),
(re.compile(r"\bUTC\b"), "U T C"),
(re.compile(r"\bGMT\b"), "G M T"),
(re.compile(r"\bCSV\b"), "C S V"),
(re.compile(r"\bJSON\b"), "JSON"),
(re.compile(r"\bPDF\b"), "P D F"),
(re.compile(r"\bREST\b"), "REST"),
(re.compile(r"\bAPI\b"), "A P I"),
(re.compile(r"\bUI\b"), "U I"),
)
_FORMANT_TABLE: dict[str, tuple[float, float, float, float]] = {
"aa": (730.0, 1090.0, 2440.0, 0.085),
"ae": (660.0, 1720.0, 2410.0, 0.080),
"ah": (640.0, 1190.0, 2390.0, 0.075),
"ao": (570.0, 840.0, 2410.0, 0.085),
"aw": (680.0, 1100.0, 2400.0, 0.095),
"ay": (700.0, 1550.0, 2420.0, 0.095),
"eh": (530.0, 1840.0, 2480.0, 0.075),
"er": (490.0, 1350.0, 1690.0, 0.085),
"ey": (450.0, 2100.0, 2600.0, 0.090),
"ih": (390.0, 1990.0, 2550.0, 0.068),
"iy": (270.0, 2290.0, 3010.0, 0.082),
"oh": (490.0, 910.0, 2350.0, 0.088),
"oo": (300.0, 870.0, 2240.0, 0.085),
"oy": (520.0, 1400.0, 2400.0, 0.095),
"uh": (580.0, 1220.0, 2380.0, 0.068),
"uu": (440.0, 1020.0, 2240.0, 0.070),
"a": (640.0, 1350.0, 2400.0, 0.068),
"e": (510.0, 1880.0, 2480.0, 0.068),
"i": (370.0, 2050.0, 2600.0, 0.068),
"o": (520.0, 950.0, 2380.0, 0.072),
"u": (380.0, 1050.0, 2300.0, 0.070),
"m": (280.0, 950.0, 2200.0, 0.052),
"n": (280.0, 1450.0, 2450.0, 0.050),
"l": (360.0, 1100.0, 2650.0, 0.052),
"r": (420.0, 1300.0, 1680.0, 0.055),
"w": (310.0, 780.0, 2200.0, 0.052),
"y": (290.0, 2150.0, 2900.0, 0.052),
"v": (320.0, 1150.0, 2300.0, 0.045),
"z": (340.0, 1650.0, 2600.0, 0.048),
"b": (300.0, 1000.0, 2250.0, 0.042),
"d": (320.0, 1550.0, 2500.0, 0.042),
"g": (310.0, 1800.0, 2300.0, 0.042),
}
_FRICATIVE_SET = frozenset({"s", "sh", "f", "th", "h", "ch", "k", "p", "t"})
def normalize_speech_prosody(speech_text: str) -> str:
"""
Strategy 2A: Expand domain tickers, acronyms, and mathematical identifiers into natural
spoken English words with clean prosodic clause pauses.
"""
out = str(speech_text or "").strip()
for pat, repl in _PRONUNCIATION_SUBS:
out = pat.sub(repl, out)
out = re.sub(r"\s+", " ", out).strip()
return out
def master_wav_broadcast_warmth(wav_path: Path, cutoff_hz: float = 5400.0) -> None:
"""
Strategy 2A: Pure-Python Broadcast Acoustic Mastering Pass (`< 3ms` per clip):
1. Removes DC offset,
2. Applies a 1-pole low-pass warmth/de-essing filter (`f_c = 5.4 kHz`) to smooth harsh sibilants,
3. Normalizes peak amplitude to `-1.5 dBFS` (`27500 / 32767`),
4. Applies `15ms` cosine fade-in and fade-out envelopes so clip edges never click.
"""
if not wav_path.is_file():
return
try:
with wave.open(str(wav_path), "rb") as rf:
n_ch = rf.getnchannels()
samp_w = rf.getsampwidth()
sr = rf.getframerate()
n_frames = rf.getnframes()
raw_bytes = rf.readframes(n_frames)
if samp_w != 2 or n_ch != 1 or n_frames < 32:
return
samples = array.array("h")
samples.frombytes(raw_bytes)
n = len(samples)
# 1. Remove DC mean
dc_mean = sum(samples) // n
# 2. 1-pole low-pass warmth filter: y[i] = y[i-1] + alpha * (x[i] - y[i-1])
rc = 1.0 / (2.0 * math.pi * cutoff_hz)
dt = 1.0 / float(sr)
alpha = dt / (rc + dt)
filtered = [0.0] * n
prev_y = 0.0
peak = 1.0
for i in range(n):
x = float(samples[i] - dc_mean)
y = prev_y + alpha * (x - prev_y)
prev_y = y
filtered[i] = y
ay = abs(y)
if ay > peak:
peak = ay
# 3. Normalize to -1.5 dBFS (target peak = 27500) + 15ms cosine fade-in/out
scale = min(2.4, 27500.0 / peak)
fade_len = min(n // 4, max(1, int(sr * 0.015)))
out_arr = array.array("h", [0] * n)
for i in range(n):
env = 1.0
if i < fade_len:
env = 0.5 * (1.0 - math.cos(math.pi * (i / fade_len)))
elif i >= n - fade_len:
rem = n - 1 - i
env = 0.5 * (1.0 - math.cos(math.pi * (rem / fade_len)))
v = int(max(-32760.0, min(32760.0, filtered[i] * scale * env)))
out_arr[i] = v
tmp_p = wav_path.with_suffix(f".master.{os.getpid()}.wav")
with wave.open(str(tmp_p), "wb") as wf:
wf.setnchannels(1)
wf.setsampwidth(2)
wf.setframerate(sr)
wf.writeframes(out_arr.tobytes())
os.replace(tmp_p, wav_path)
except Exception:
pass
def extract_scene_speech_scripts(tutorials_js_path: Path) -> list[dict[str, Any]]:
"""
Extract all 25 `(ep01-s1 .. ep05-s5)` scene titles and normalized `speechText` strings from `quant-tutorials.js`.
"""
node_bin = shutil.which("node")
raw_list: list[dict[str, Any]] = []
if node_bin:
proc = subprocess.run(
[
node_bin,
"-e",
f"const QT = require({json.dumps(str(tutorials_js_path.resolve()))});"
"const out = [];"
"QT.episodes.forEach((ep, ei) => {"
" ep.keyframes.forEach((kf, si) => {"
" const clipId = `ep0${ei + 1}-s${si + 1}`;"
" const speech = kf.speechText || QT.cleanTextForSpeech(kf.subtitle, kf.uiElementLabel);"
" out.push({clip_id: clipId, ep_idx: ei, step_idx: si, title: kf.title, speech_text: speech});"
" });"
"});"
"process.stdout.write(JSON.stringify(out));",
],
capture_output=True,
text=True,
check=False,
)
if proc.returncode == 0 and proc.stdout.strip():
raw_list = json.loads(proc.stdout)
if not raw_list:
txt = tutorials_js_path.read_text(encoding="utf-8")
speeches = re.findall(r'speechText:\s*"([^"]+)"', txt)
titles = re.findall(r'title:\s*"(\d+\.\d+\s+[^"]+)"', txt)
for idx, sp in enumerate(speeches[:25]):
ei = idx // 5
si = idx % 5
raw_list.append(
{
"clip_id": f"ep0{ei + 1}-s{si + 1}",
"ep_idx": ei,
"step_idx": si,
"title": titles[idx] if idx < len(titles) else f"Scene {ei + 1}.{si + 1}",
"speech_text": sp,
}
)
for item in raw_list:
norm_txt = normalize_speech_prosody(item["speech_text"])
item["speech_text"] = norm_txt
item["text_sha256"] = hashlib.sha256(norm_txt.encode("utf-8")).hexdigest()
return raw_list
def _tokenize_ingglish_phonemes(ing_word: str) -> list[str]:
tokens: list[str] = []
i = 0
s = re.sub(r"[^a-z]", "", ing_word.lower())
digraphs = ("sh", "ch", "th", "ng", "zh", "aa", "ae", "ah", "ao", "aw", "ay", "eh", "er", "ey", "ih", "iy", "oh", "oo", "oy", "uh", "uu")
while i < len(s):
if i + 1 < len(s) and s[i : i + 2] in digraphs:
tokens.append(s[i : i + 2])
i += 2
else:
tokens.append(s[i])
i += 1
return tokens or ["a"]
def synthesize_klatt_formant_wav(speech_text: str, out_wav_path: Path, sample_rate: int = 16000) -> dict[str, Any]:
raw_words = re.findall(r"[A-Za-z0-9]+|[.,;:!?]", speech_text)
alpha_words = sorted({w.lower() for w in raw_words if w.isalpha()})
ing_map = translate_batch(alpha_words) if alpha_words else {}
samples = bytearray()
phase_f0 = 0.0
phase_f1 = 0.0
phase_f2 = 0.0
phase_f3 = 0.0
two_pi = 2.0 * math.pi
lfsr = 0xACE1
for w_idx, tok in enumerate(raw_words):
if tok in (".", "!", "?"):
samples.extend(b"\x00\x00" * int(sample_rate * 0.14))
continue
if tok in (",", ";", ":"):
samples.extend(b"\x00\x00" * int(sample_rate * 0.07))
continue
ing_w = ing_map.get(tok.lower(), tok.lower())
phones = _tokenize_ingglish_phonemes(ing_w)[:8]
f0 = 118.0 - 16.0 * ((w_idx % 12) / 12.0)
for p_tok in phones:
if p_tok in _FORMANT_TABLE:
f1, f2, f3, dur_s = _FORMANT_TABLE[p_tok]
n_samp = max(1, int(sample_rate * dur_s * 0.62))
for s_i in range(n_samp):
env = math.sin(math.pi * (s_i / n_samp))
phase_f0 = (phase_f0 + two_pi * f0 / sample_rate) % two_pi
phase_f1 = (phase_f1 + two_pi * f1 / sample_rate) % two_pi
phase_f2 = (phase_f2 + two_pi * f2 / sample_rate) % two_pi
phase_f3 = (phase_f3 + two_pi * f3 / sample_rate) % two_pi
glottal = 0.50 * math.sin(phase_f0) + 0.28 * math.sin(2.0 * phase_f0)
reson = 0.55 * math.sin(phase_f1) + 0.30 * math.sin(phase_f2) + 0.15 * math.sin(phase_f3)
val = int(max(-32000.0, min(32000.0, env * (0.45 * glottal + 0.55 * reson) * 14500.0)))
samples.extend(struct.pack("<h", val))
elif p_tok in _FRICATIVE_SET:
n_samp = max(1, int(sample_rate * 0.032))
for s_i in range(n_samp):
env = math.sin(math.pi * (s_i / n_samp))
lfsr = ((lfsr >> 1) ^ (-(lfsr & 1) & 0xB400)) & 0xFFFF
noise = ((lfsr / 32768.0) - 1.0) * 0.38
val = int(max(-32000.0, min(32000.0, env * noise * 9000.0)))
samples.extend(struct.pack("<h", val))
samples.extend(b"\x00\x00" * int(sample_rate * 0.022))
out_wav_path.parent.mkdir(parents=True, exist_ok=True)
with wave.open(str(out_wav_path), "wb") as wf:
wf.setnchannels(1)
wf.setsampwidth(2)
wf.setframerate(sample_rate)
wf.writeframes(bytes(samples))
master_wav_broadcast_warmth(out_wav_path)
return {"engine": "klatt_formant_wav", "size_bytes": out_wav_path.stat().st_size}
def _synthesize_single_clip(
sc: dict[str, Any],
target_dir: Path,
flite_bin: str | None,
espeak_bin: str | None,
flite_voice: str = "kal16",
) -> dict[str, Any]:
cid = sc["clip_id"]
wav_p = target_dir / f"{cid}.wav"
tmp_p = target_dir / f".{cid}.{os.getpid()}.wav"
sp_txt = sc["speech_text"]
used_engine = "klatt_formant_wav"
if flite_bin:
cmd = [flite_bin, "-voice", flite_voice, "--setf", "duration_stretch=1.03", "-t", sp_txt, "-o", str(tmp_p)]
proc = subprocess.run(cmd, capture_output=True, text=True, check=False)
if proc.returncode == 0 and tmp_p.is_file() and tmp_p.stat().st_size > 200:
master_wav_broadcast_warmth(tmp_p)
os.replace(tmp_p, wav_p)
used_engine = f"flite_{flite_voice}"
if used_engine == "klatt_formant_wav" and espeak_bin:
cmd = [espeak_bin, "-v", "en-us+klatt4", "-s", "160", "-p", "46", "-g", "3", "-w", str(tmp_p), sp_txt]
proc = subprocess.run(cmd, capture_output=True, text=True, check=False)
if proc.returncode == 0 and tmp_p.is_file() and tmp_p.stat().st_size > 200:
master_wav_broadcast_warmth(tmp_p)
os.replace(tmp_p, wav_p)
used_engine = "espeak_ng_klatt4"
if used_engine == "klatt_formant_wav":
synthesize_klatt_formant_wav(sp_txt, tmp_p)
os.replace(tmp_p, wav_p)
return {
"clip_id": cid,
"filename": f"{cid}.wav",
"web_route": f"/quant/audio/{cid}.wav",
"engine": used_engine,
"text_sha256": sc["text_sha256"],
"size_bytes": wav_p.stat().st_size,
}
def build_quant_tour_voice_assets(
out_dir: str | Path | None = None,
workspace_root: str | Path | None = None,
force: bool = False,
flite_voice: str = "kal16",
spawn_slt_background_upgrade: bool = False,
) -> dict[str, Any]:
"""
Generate `.gitignore`d `.wav` voice narration clips (`ep01-s1.wav .. ep05-s5.wav`) and
`voice-manifest.json` into `out_dir` (default: `site/quant/audio/`).
Uses per-clip SHA-256 caching and parallel `ThreadPoolExecutor` (`~1.22s` cold / `< 15ms` warm).
"""
cfg = load_workspace_config(workspace_root=workspace_root)
tut_js_p = cfg.core_dir / "site" / "quant" / "quant-tutorials.js"
target_dir = Path(out_dir).resolve() if out_dir else (cfg.core_dir / "site" / "quant" / "audio").resolve()
target_dir.mkdir(parents=True, exist_ok=True)
manifest_p = target_dir / "voice-manifest.json"
with ReadOnlyIsolationGuard(cfg.read_only_files) as guard:
scenes = extract_scene_speech_scripts(tut_js_p)
flite_bin = shutil.which("flite")
espeak_bin = shutil.which("espeak-ng") or shutil.which("espeak")
engine_name = f"flite_{flite_voice}" if flite_bin else ("espeak_ng_klatt4" if espeak_bin else "klatt_formant_wav")
prev_clips_by_id: dict[str, dict[str, Any]] = {}
if not force and manifest_p.is_file():
try:
prev_man = json.loads(manifest_p.read_text(encoding="utf-8"))
for c_item in prev_man.get("clips") or []:
cid = str(c_item.get("clip_id") or "")
if cid and (target_dir / f"{cid}.wav").is_file():
prev_clips_by_id[cid] = c_item
except Exception:
prev_clips_by_id = {}
scenes_to_build: list[dict[str, Any]] = []
reused_clips: dict[str, dict[str, Any]] = {}
for sc in scenes:
cid = sc["clip_id"]
prev_c = prev_clips_by_id.get(cid)
# Reuse existing clip if text_sha256 matches and it was built with the requested (or higher-tier slt) engine
if (
prev_c
and prev_c.get("text_sha256") == sc["text_sha256"]
and prev_c.get("engine") in (engine_name, "flite_slt")
and (flite_voice != "slt" or prev_c.get("engine") == "flite_slt")
):
reused_clips[cid] = prev_c
else:
scenes_to_build.append(sc)
if scenes_to_build:
max_w = min(8, max(1, os.cpu_count() or 4))
with concurrent.futures.ThreadPoolExecutor(max_workers=max_w) as pool:
built_list = list(
pool.map(
lambda s: _synthesize_single_clip(s, target_dir, flite_bin, espeak_bin, flite_voice=flite_voice),
scenes_to_build,
)
)
for b_item in built_list:
reused_clips[b_item["clip_id"]] = b_item
ordered_clips = [reused_clips[s["clip_id"]] for s in scenes]
scripts_sha = hashlib.sha256(
json.dumps([s["text_sha256"] for s in scenes], sort_keys=True).encode("utf-8")
).hexdigest()
man_obj = {
"version": CURRENT_VERSION,
"engine": ordered_clips[0]["engine"] if ordered_clips else engine_name,
"scripts_sha256": scripts_sha,
"clip_count": len(ordered_clips),
"rebuilt_clip_count": len(scenes_to_build),
"clips": ordered_clips,
}
manifest_p.write_text(json.dumps(man_obj, indent=2, ensure_ascii=False) + "\n", encoding="utf-8")
# Strategy 1A Stage 2: Optional non-blocking background upgrade to CMU Arctic `slt` statistical voice
bg_spawned = False
if spawn_slt_background_upgrade and flite_bin and flite_voice != "slt":
needs_slt = any(c.get("engine") != "flite_slt" for c in ordered_clips)
if needs_slt:
env_bg = dict(os.environ)
env_bg["PYTHONPATH"] = str(cfg.core_dir / "src")
subprocess.Popen(
[
"nice",
"-n",
"19",
sys.executable,
"-m",
"hyperstitionstud_io.publishing.quant_voice",
"--workspace-root",
str(cfg.workspace_root),
"--out-dir",
str(target_dir),
"--voice",
"slt",
],
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
start_new_session=True,
env=env_bg,
)
bg_spawned = True
return {
"ok": True,
"rebuilt": len(scenes_to_build) > 0,
"rebuilt_clip_count": len(scenes_to_build),
"engine": man_obj["engine"],
"clip_count": len(ordered_clips),
"slt_background_upgrade_spawned": bg_spawned,
"scripts_sha256": scripts_sha,
"isolation_receipt": guard.audit_receipt(),
}
def main(argv: list[str] | None = None) -> int:
ap = argparse.ArgumentParser(
prog="hs-quant-voice-build",
description="Build untracked deploy-time .wav speech clips for the /quant/ Interactive Guided Tour (0 audio files in Git).",
)
ap.add_argument("--out-dir", default=None, help="Output directory for .wav clips (default: site/quant/audio/).")
ap.add_argument("--workspace-root", default=None, help="Optional workspace root directory.")
ap.add_argument("--voice", default="kal16", choices=["kal16", "slt", "rms", "awb"], help="CMU Flite voice (default: kal16 fast diphone; slt for background statistical upgrade).")
ap.add_argument("--upgrade-slt-background", action="store_true", help="Spawn a detached low-priority background job to upgrade kal16 clips to CMU Arctic slt statistical voice.")
ap.add_argument("--force", action="store_true", help="Force rebuilding all 25 .wav clips.")
args = ap.parse_args(argv)
res = build_quant_tour_voice_assets(
out_dir=args.out_dir,
workspace_root=args.workspace_root,
force=args.force,
flite_voice=args.voice,
spawn_slt_background_upgrade=args.upgrade_slt_background,
)
print(json.dumps(res, indent=2))
return 0 if res.get("ok") else 1
if __name__ == "__main__":
raise SystemExit(main())
@@ -0,0 +1,616 @@
#!/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
preserved_tail = re.sub(r"(?i)cypher\s*calculator", "haiperdohpjematreeah", preserved_tail)
return f"""# `haiperdohp-jemaytreeah` — haiperdohpjematreeah (`v{version}` — `https://hyperstitionstud.io/calc/`)
{banner}
A gematria cypher workbench (`haiperdohpjematreeah`) 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/).
![haiperdohpjematreeah](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)
# Prepares & validates push-all-to-git-libre-audio.sh and deploy/sync-vps-repos.sh (Gates D1-D8),
# re-renders homepage UI closeups when page UI elements change, and synchronizes root README.md 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}}"
if [[ "${REPO_NAME}" == "hyperstitionstudio-core" ]]; then
python3 -m hyperstitionstud_io.ci.deploy_scripts_sync --workspace-root "${WS_ROOT}" --stage
else
python3 -m hyperstitionstud_io.ci.deploy_scripts_sync --workspace-root "${WS_ROOT}"
fi
python3 -m hyperstitionstud_io.publishing.closeups_sync
if [[ -d "${WS_ROOT}/hyperstitionstudio-core/site/assets/closeups" ]] && [[ "${REPO_NAME}" == "hyperstitionstudio-core" ]]; then
git -C "${REPO_ROOT}" add site/assets/closeups/
fi
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, markers in (
("pre-commit", PRE_COMMIT_HOOK_SCRIPT, ("readme_sync", "closeups_sync", "deploy_scripts_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:
txt_h = hook_path.read_text(encoding="utf-8") if hook_path.is_file() else ""
if not (hook_path.is_file() and os.access(hook_path, os.X_OK) and all(m in txt_h for m in markers)):
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())
+28 -67
View File
@@ -20,81 +20,42 @@ from pathlib import Path
from typing import Any
from hyperstitionstud_io import __version__ as CURRENT_VERSION
from hyperstitionstud_io.ciphers import compute_aq, prime_rank
from hyperstitionstud_io.config import load_workspace_config
from hyperstitionstud_io.ciphers import (
char_value_aq,
compute_aq,
compute_english_ordinal,
compute_full_reduction,
prime_rank,
)
from hyperstitionstud_io.config import load_json_cached, load_workspace_config
from hyperstitionstud_io.glossary import ReadOnlyIsolationGuard
from hyperstitionstud_io.ipld import compute_dag_json_cidv1
from hyperstitionstud_io.publishing.fonts import load_pillow_font
from hyperstitionstud_io.publishing.fonts import (
GROUP3_PALETTE,
chamfer_polygon_points as _chamfer_pts,
draw_group3_chamfered_plate as _draw_group3_plate,
load_pillow_font,
)
from hyperstitionstud_io.quant.collector import NO_DATA_AVAILABLE, _EQ_CLOSURES_333
from hyperstitionstud_io.quant.timeseries import build_quant_timeseries_bundle
def char_value_aq(ch: str) -> int:
c = ch.lower()
if "0" <= c <= "9":
return ord(c) - 48
if "a" <= c <= "z":
return ord(c) - 87
return 0
def compute_english_ordinal(text: str) -> int:
return sum((ord(c) - 96) for c in text.lower() if "a" <= c <= "z")
def compute_full_reduction(text: str) -> int:
return sum(((ord(c) - 97) % 9) + 1 for c in text.lower() if "a" <= c <= "z")
CARD_WIDTH = 900
CARD_HEIGHT = 1260
# Group 3 Preferred Default Palette Tokens (90% Quiet Matte Basalt / 7% #38bdf8 Interactive / 3% Explicit Lock Beacons)
BG_VOID = (2, 6, 23) # #020617
BG_WELL = (7, 13, 27) # #070d1b
BG_ODD = (12, 19, 36) # #0c1324
BG_EVEN = (17, 26, 46) # #111a2e
BG_BEZEL = (24, 35, 56) # #182338
BORDER_MUTED = (38, 52, 77) # #26344d
TXT_PRI = (226, 232, 240) # #e2e8f0
TXT_SEC = (148, 163, 184) # #94a3b8
TXT_DIM = (100, 116, 139) # #64748b
CYAN = (56, 189, 248) # #38bdf8
GOLD = (245, 158, 11) # #f59e0b
EMERALD = (16, 185, 129) # #10b981
ROSE = (244, 63, 94) # #f43f5e
def _chamfer_pts(x0: int, y0: int, x1: int, y1: int, ctl: int = 10, ctr: int = 10, cbr: int = 4, cbl: int = 4) -> list[tuple[int, int]]:
return [
(x0 + ctl, y0),
(x1 - ctr, y0),
(x1, y0 + ctr),
(x1, y1 - cbr),
(x1 - cbr, y1),
(x0 + cbl, y1),
(x0, y1 - cbl),
(x0, y0 + ctl),
]
def _draw_group3_plate(
draw: Any,
box: tuple[int, int, int, int],
fill: tuple[int, int, int],
attention_color: tuple[int, int, int] | None = None,
pip_color: tuple[int, int, int] | None = None,
) -> None:
x0, y0, x1, y1 = box
out_col = attention_color if attention_color else BORDER_MUTED
pts = _chamfer_pts(x0, y0, x1, y1, 10, 10, 4, 4)
draw.polygon(pts, fill=fill, outline=out_col)
band_h = min(y1 - y0, 28)
for y in range(y0 + 3, y0 + band_h, 3):
for x in range(x0 + 8 + (y % 2) * 3, x1 - 8, 6):
draw.point((x, y), fill=(22, 33, 54))
draw.polygon([(x0 + 10, y0 + 1), (x1 - 10, y0 + 1), (x1 - 7, y0 + 4), (x0 + 7, y0 + 4)], fill=BG_BEZEL)
pcol = attention_color or pip_color or (71, 85, 105)
draw.rectangle((x0 + 14, y0 + 1, x0 + 48, y0 + 4), fill=pcol)
BG_VOID = GROUP3_PALETTE["BG_VOID"]
BG_WELL = GROUP3_PALETTE["BG_WELL"]
BG_ODD = GROUP3_PALETTE["BG_ODD"]
BG_EVEN = GROUP3_PALETTE["BG_EVEN"]
BG_BEZEL = GROUP3_PALETTE["BG_BEZEL"]
BORDER_MUTED = GROUP3_PALETTE["BORDER_MUTED"]
TXT_PRI = GROUP3_PALETTE["TXT_PRI"]
TXT_SEC = GROUP3_PALETTE["TXT_SEC"]
TXT_DIM = GROUP3_PALETTE["TXT_DIM"]
CYAN = GROUP3_PALETTE["CYAN"]
GOLD = GROUP3_PALETTE["GOLD"]
EMERALD = GROUP3_PALETTE["EMERALD"]
ROSE = GROUP3_PALETTE["ROSE"]
def _draw_fitted_text(
@@ -145,7 +106,7 @@ def build_ticker_stats_card_json(
cfg = load_workspace_config()
ts_json_path = cfg.core_dir / "site" / "quant" / "quant-timeseries.json"
if ts_json_path.is_file():
ts_bundle = json.loads(ts_json_path.read_text(encoding="utf-8"))
ts_bundle = load_json_cached(ts_json_path, copy_result=False)
else:
ts_bundle = build_quant_timeseries_bundle(write_files=False)
+10 -4
View File
@@ -173,7 +173,9 @@ def _fetch_yahoo_chart(symbol: str, timeout: float = 6.0) -> dict[str, Any] | No
enc_sym = urllib.parse.quote(symbol, safe="")
url = f"https://query1.finance.yahoo.com/v8/finance/chart/{enc_sym}?range=1mo&interval=1d"
req = urllib.request.Request(url, headers={"User-Agent": _USER_AGENT, "Accept": "application/json"})
with urllib.request.urlopen(req, timeout=timeout) as resp:
from hyperstitionstud_io.security import safe_urlopen
with safe_urlopen(req, timeout=timeout) as resp:
data = json.loads(resp.read().decode("utf-8"))
res_list = (data.get("chart") or {}).get("result") or []
if not res_list:
@@ -229,7 +231,9 @@ def _fetch_stooq_csv(symbol: str, timeout: float = 6.0) -> dict[str, Any] | None
return None
url = f"https://stooq.com/q/d/l/?s={stooq_sym}&i=d"
req = urllib.request.Request(url, headers={"User-Agent": _USER_AGENT})
with urllib.request.urlopen(req, timeout=timeout) as resp:
from hyperstitionstud_io.security import safe_urlopen
with safe_urlopen(req, timeout=timeout) as resp:
text = resp.read().decode("utf-8", errors="replace")
rows = list(csv.DictReader(io.StringIO(text)))
if not rows or "Close" not in rows[-1] or rows[-1]["Close"] in ("", "N/D", None):
@@ -260,7 +264,9 @@ def _fetch_coingecko_crypto(timeout: float = 6.0) -> dict[str, dict[str, Any]]:
ids = ",".join(_COINGECKO_MAP.values())
url = f"https://api.coingecko.com/api/v3/simple/price?ids={ids}&vs_currencies=usd&include_24hr_change=true&include_market_cap=true"
req = urllib.request.Request(url, headers={"User-Agent": _USER_AGENT, "Accept": "application/json"})
with urllib.request.urlopen(req, timeout=timeout) as resp:
from hyperstitionstud_io.security import safe_urlopen
with safe_urlopen(req, timeout=timeout) as resp:
data = json.loads(resp.read().decode("utf-8"))
out: dict[str, dict[str, Any]] = {}
for sym, cg_id in _COINGECKO_MAP.items():
@@ -678,7 +684,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.4.0",
"version": "2.15.0",
"target_date_utc": datetime.datetime.now(datetime.timezone.utc).strftime("%Y-%m-%d"),
"harvest_mode": harvest_mode,
"synthetic_data_eliminated": True,
+3 -1
View File
@@ -154,7 +154,9 @@ def fetch_fred_series_csv(series_id: str, max_rows: int = 36, timeout: float = 8
"""
url = f"https://fred.stlouisfed.org/graph/fredgraph.csv?id={series_id}&cosd=2024-10-01"
req = urllib.request.Request(url, headers={"User-Agent": _USER_AGENT})
with urllib.request.urlopen(req, timeout=timeout) as resp:
from hyperstitionstud_io.security import safe_urlopen
with safe_urlopen(req, timeout=timeout) as resp:
lines = [ln.strip() for ln in resp.read().decode("utf-8").splitlines() if ln.strip()]
if len(lines) <= 1:
return []
+123
View File
@@ -0,0 +1,123 @@
"""
hyperstitionstud_io.security — Centralized Architectural Security Boundaries:
1. `safe_urlopen()` (`CWE-918` / Bandit `B310` SSRF-safe scheme allowlist, `TLSv1.2+`, & bounded `max_bytes` reads),
2. `safe_tar_members()` (`PEP 706` `tarfile.data_filter` semantics & per-member byte quota).
"""
from __future__ import annotations
import ssl
import tarfile
import urllib.parse
import urllib.request
from typing import Any
DEFAULT_MAX_NETWORK_BYTES = 15 * 1024 * 1024 # 15 MB
DEFAULT_MAX_TAR_MEMBER_BYTES = 24 * 1024 * 1024 # 24 MB
class SecurityBoundaryError(ValueError):
"""Raised when an untrusted URL scheme, host, or tar member violates security boundaries."""
class _BoundedResponseWrapper:
def __init__(self, resp: Any, max_bytes: int) -> None:
self._resp = resp
self._max_bytes = int(max_bytes)
self.status = getattr(resp, "status", 200)
def read(self, amt: int | None = None) -> bytes:
limit = self._max_bytes if amt is None else min(int(amt), self._max_bytes)
data = self._resp.read(limit + 1)
if len(data) > self._max_bytes:
raise SecurityBoundaryError(
f"Response payload exceeded max_bytes quota ({self._max_bytes} bytes)"
)
return data
def __enter__(self) -> _BoundedResponseWrapper:
return self
def __exit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> None:
try:
self._resp.close()
except Exception:
pass
def validate_safe_url(url: str, *, allow_http_localhost: bool = False) -> str:
"""
Validate `url` against SSRF / scheme injection (`CWE-918` / Bandit `B310`):
- Allows `https://` to non-metadata hosts (`169.254.169.254` blocked).
- Allows `http://` strictly to `127.0.0.1` or `localhost` when `allow_http_localhost=True`.
- Rejects `file://`, `ftp://`, `gopher://`, `data:`, and all other schemes.
"""
parsed = urllib.parse.urlsplit(str(url).strip())
scheme = (parsed.scheme or "").lower()
host = (parsed.hostname or "").lower()
if not scheme or not host:
raise SecurityBoundaryError(f"Blocked URL with missing scheme or host: {url!r}")
if host in ("169.254.169.254", "metadata.google.internal"):
raise SecurityBoundaryError(f"Blocked cloud metadata SSRF target host: {host!r}")
if scheme == "https":
return str(url)
if scheme == "http" and allow_http_localhost and host in ("127.0.0.1", "localhost", "::1"):
return str(url)
raise SecurityBoundaryError(
f"Blocked disallowed URL scheme/host ({scheme}://{host}) in {url!r}"
)
def safe_urlopen(
req_or_url: str | urllib.request.Request,
*,
timeout: float = 15.0,
max_bytes: int = DEFAULT_MAX_NETWORK_BYTES,
allow_http_localhost: bool = False,
) -> _BoundedResponseWrapper:
"""
Open an HTTP/HTTPS request after enforcing `validate_safe_url()`, `TLSv1.2+` verification,
and a hard `max_bytes` response read cap.
"""
raw_url = req_or_url.full_url if isinstance(req_or_url, urllib.request.Request) else str(req_or_url)
validate_safe_url(raw_url, allow_http_localhost=allow_http_localhost)
scheme = urllib.parse.urlsplit(raw_url).scheme.lower()
ctx = None
if scheme == "https":
ctx = ssl.create_default_context()
ctx.minimum_version = ssl.TLSVersion.TLSv1_2
resp = urllib.request.urlopen(req_or_url, timeout=timeout, context=ctx) # nosec B310
return _BoundedResponseWrapper(resp, max_bytes=max_bytes)
def safe_tar_members(
tf: tarfile.TarFile,
*,
max_member_bytes: int = DEFAULT_MAX_TAR_MEMBER_BYTES,
) -> list[tarfile.TarInfo]:
"""
Return validated regular-file `TarInfo` members from `tf` enforcing `PEP 706` (`tarfile.data_filter`)
semantics: rejects absolute paths, `..` traversal, symlinks/hardlinks/devices/FIFOs, and members
exceeding `max_member_bytes`.
"""
safe_list: list[tarfile.TarInfo] = []
data_filter = getattr(tarfile, "data_filter", None)
for m in tf.getmembers():
name = m.name or ""
if not name or name.startswith("/") or ".." in name.split("/"):
raise SecurityBoundaryError(f"Blocked unsafe tar member path: {name!r}")
if m.issym() or m.islnk() or m.isdev() or m.isfifo() or m.ischr() or m.isblk():
raise SecurityBoundaryError(f"Blocked non-regular tar member: {name!r}")
if not m.isfile():
continue
if m.size < 0 or m.size > max_member_bytes:
raise SecurityBoundaryError(
f"Blocked tar member {name!r} exceeding max_member_bytes ({m.size} > {max_member_bytes})"
)
if callable(data_filter):
m = data_filter(m, "/tmp")
if m is None:
continue
safe_list.append(m)
return safe_list
+43
View File
@@ -323,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}"),
],
),
(
@@ -331,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}"),
],
),
(
@@ -350,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}"),
],
),
(
@@ -371,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}"),
],
),
(
@@ -421,6 +425,18 @@ 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 / "deploy" / "push-all-to-git-libre-audio.sh",
[
(rf'# Release v{SEMVER_RE}:', "# Release v{V}:"),
],
),
(
core.parent / "push-all-to-git-libre-audio.sh",
[
(rf'# Release v{SEMVER_RE}:', "# Release v{V}:"),
],
),
(
calc / "index.html",
[
@@ -466,6 +482,26 @@ 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.ci.deploy_scripts_sync import prepare_and_verify_deploy_scripts
from hyperstitionstud_io.publishing.readme_sync import sync_all_repo_readmes
deploy_res = prepare_and_verify_deploy_scripts(
workspace_root=cfg.workspace_root,
target_version=v,
check_only=check_only,
stage=False,
)
if check_only and not deploy_res["ok"]:
mismatched_files.extend(deploy_res["errors"])
elif not check_only:
modified_files.extend(deploy_res["modified_files"])
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,
@@ -480,9 +516,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))
+384 -9
View File
@@ -10,6 +10,7 @@ Tests:
from __future__ import annotations
import hashlib
import json
import re
import sys
@@ -59,16 +60,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"):
@@ -99,10 +111,12 @@ def test_offline_urn_namespaces_and_no_external_https_fonts() -> None:
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")]
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", ".pdf"):
if fp.suffix in (".png", ".mp3", ".db", ".gz", ".br", ".ttf", ".woff", ".woff2", ".pdf"):
continue
try:
ftxt = fp.read_text(encoding="utf-8")
@@ -112,6 +126,7 @@ def test_offline_urn_namespaces_and_no_external_https_fonts() -> None:
for tgz in (
cfg.knowledge_graph_dir / "docs" / "archive" / "completed-plans-archive.tar.gz",
cfg.zoology_dir / "docs" / "archive" / "completed-plans-archive.tar.gz",
cfg.knowledge_graph_dir / "docs" / "plans" / "inactive" / "inactive-plans-archive.tar.gz",
):
if tgz.is_file():
with tarfile.open(tgz, "r:gz") as tf:
@@ -529,6 +544,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"}
@@ -537,6 +555,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
@@ -574,11 +593,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
@@ -586,6 +637,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")
@@ -605,6 +669,7 @@ def test_ipld_quant_and_mcp_server() -> None:
web_pdf_pairs = discover_web_and_repo_pdf_pairs()
assert len(web_pdf_pairs) >= 48
assert all("archive" not in pdf_p.parts for _, pdf_p in web_pdf_pairs)
assert all(not ("plans" in pdf_p.parts and "inactive" in pdf_p.parts) for _, pdf_p in web_pdf_pairs)
assert any("encyclopedia/" in str(pdf_p) for _, pdf_p in web_pdf_pairs[:25])
row_cells = _split_markdown_table_row(r"| **3** | Pipes `a|b` & \| | $\mathbb{E}[|\Delta\text{bps}_{i,t}|] \in \{0..4\}$<br/>Line 2 & ⓘ |")
@@ -709,9 +774,14 @@ def test_ipld_quant_and_mcp_server() -> None:
assert flow_png_p.is_file() and flow_png_p.read_bytes()[:8] == b"\x89PNG\r\n\x1a\n"
assert flow_res["dimensions"] == [1800, 1280] and flow_res["breach_count"] == 0
# Verify Archive Rotator (Gematria-Pipeline Immunity, Richness Parity & require_companion_md=True)
# Verify Archive Rotator (Gematria-Pipeline Immunity, Richness Parity, .md-only 1x bundle, require_companion_md=True, --archive-inactive & Git citation fallback)
from hyperstitionstud_io.publishing.archive_rotator import (
INACTIVE_BUNDLE_FILENAME,
INACTIVE_MANIFEST_FILENAME,
assert_not_gematria_pipeline_source,
audit_and_fix_multi_compressed_files,
extract_archive_member,
extract_inactive_plan_member,
rotate_docs_archive_directory,
snapshot_gematria_pipeline_richness,
verify_gematria_pipeline_richness_invariant,
@@ -728,6 +798,9 @@ def test_ipld_quant_and_mcp_server() -> None:
except ValueError:
pass
# Verify docs/plans/inactive/ is allowed by Gematria-Pipeline Immunity
assert_not_gematria_pipeline_source(cfg_test.knowledge_graph_dir / "docs" / "plans" / "inactive")
rich_snap = snapshot_gematria_pipeline_richness()
assert verify_gematria_pipeline_richness_invariant(rich_snap, rich_snap) is True
@@ -738,10 +811,52 @@ def test_ipld_quant_and_mcp_server() -> None:
(arc_test_dir / "PLAN-SAMPLE.pdf").write_bytes(b"%PDF-1.4 sample")
(arc_test_dir / "STANDALONE-NO-MD.pdf").write_bytes(b"%PDF-1.4 standalone")
rot_res = rotate_docs_archive_directory(arc_test_dir, require_companion_md=True, check_allowed_dir=False)
assert rot_res["member_count"] == 2
assert rot_res["member_count"] == 1
assert rot_res["preserved_standalone_pdfs"] == ["STANDALONE-NO-MD.pdf"]
assert (arc_test_dir / "STANDALONE-NO-MD.pdf").is_file()
assert not (arc_test_dir / "PLAN-SAMPLE.pdf").exists()
sample_man = json.loads((arc_test_dir / "archive-manifest.json").read_text(encoding="utf-8"))
assert sample_man["manifest_dag_json_cid"].startswith("baguqeera")
assert sample_man["members"][0]["name"] == "PLAN-SAMPLE.md"
assert sample_man["members"][0]["companion_pdf_sha256"] == hashlib.sha256(b"%PDF-1.4 sample").hexdigest()
# Verify live completed-plans-archive.tar.gz is <= 256 KB (262,144 bytes), .md-only, and long_term_git_storage_citations work
kg_arc_dir = cfg_test.knowledge_graph_dir / "docs" / "archive"
kg_tgz = kg_arc_dir / "completed-plans-archive.tar.gz"
kg_man = json.loads((kg_arc_dir / "archive-manifest.json").read_text(encoding="utf-8"))
assert kg_tgz.stat().st_size <= 262_144, f"Expected completed-plans-archive.tar.gz <= 256 KB, got {kg_tgz.stat().st_size}"
assert kg_man["manifest_dag_json_cid"].startswith("baguqeera")
assert kg_man["long_term_git_rotated_count"] >= 1
assert all(m["git_citation_url"].startswith("https://git.libre.audio/seasharp/") for m in kg_man["members"])
assert all(lt["git_citation_url"].startswith("https://git.libre.audio/seasharp/") for lt in kg_man["long_term_git_storage_citations"])
# Verify extract_archive_member works for both active bundle members and long-term Git-rotated members
ext_out = tmp_path / "ext_check"
active_m_name = kg_man["members"][0]["name"]
lt_m_name = kg_man["long_term_git_storage_citations"][0]["name"]
p_act = extract_archive_member(kg_arc_dir, active_m_name, ext_out)
p_lt = extract_archive_member(kg_arc_dir, lt_m_name, ext_out)
assert p_act.is_file() and hashlib.sha256(p_act.read_bytes()).hexdigest() == kg_man["members"][0]["sha256"]
assert p_lt.is_file() and hashlib.sha256(p_lt.read_bytes()).hexdigest() == kg_man["long_term_git_storage_citations"][0]["sha256"]
# Verify inactive-plans-archive.tar.gz & inactive-archive-manifest.json
inact_dir = cfg_test.knowledge_graph_dir / "docs" / "plans" / "inactive"
inact_tgz = inact_dir / INACTIVE_BUNDLE_FILENAME
inact_man = json.loads((inact_dir / INACTIVE_MANIFEST_FILENAME).read_text(encoding="utf-8"))
assert inact_tgz.is_file() and inact_tgz.stat().st_size <= 262_144
assert inact_man["manifest_dag_json_cid"].startswith("baguqeera")
assert inact_man["member_count"] >= 6
p_inact = extract_inactive_plan_member(inact_man["members"][0]["plan_id"], out_dir=ext_out)
assert p_inact.is_file() and hashlib.sha256(p_inact.read_bytes()).hexdigest() == inact_man["members"][0]["sha256"]
# Verify Single-Layer (1x) Compression Invariant across all 6 repositories
comp_check = audit_and_fix_multi_compressed_files(workspace_root=cfg_test.workspace_root, fix=False)
assert comp_check["ok"] is True, f"Multi-compression violation detected: {comp_check}"
assert not comp_check["nested_archive_violations"]
assert not comp_check["peeled_gzip_files"]
assert not comp_check["removed_double_sidecars"]
caddy_txt = (cfg_test.core_dir / "deploy" / "Caddyfile").read_text(encoding="utf-8")
assert "@compressible not path *.gz *.br *.tgz" in caddy_txt and "encode @compressible zstd gzip" in caddy_txt
# Verify VPS Data Production incremental cache merge & static script/timer invariants
from hyperstitionstud_io.quant.collector import update_real_market_history_cache
@@ -989,6 +1104,266 @@ def test_ipld_quant_and_mcp_server() -> None:
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-1-tab-2-graph.png",
"assets/closeups/quadrant-2-esoteric-finance-quant.png",
"assets/closeups/quadrant-2-tab-2-bayesian-fred.png",
"assets/closeups/quadrant-2-tab-3-leaderboard-card.png",
"assets/closeups/quadrant-3-info-science-novice-learn-polyglot.png",
"assets/closeups/quadrant-3-tab-2-math-guile.png",
"assets/closeups/quadrant-3-tab-3-math-ts-rust.png",
"assets/closeups/quadrant-4-operators-deployment-vps.png",
"assets/closeups/quadrant-4-tab-2-mcp-etag.png",
"assets/closeups/quadrant-4-tab-3-ci-gates.png",
):
assert q_img in home_txt, f"Missing quadrant closeup {q_img} on homepage"
assert (cfg.core_dir / "site" / q_img).is_file()
# Verify hs-closeups-sync automatic UI element fingerprint & closeup parity
from hyperstitionstud_io.publishing.closeups_sync import render_all_quadrant_closeups
cu_chk = render_all_quadrant_closeups(workspace_root=cfg.workspace_root, check_only=True)
if not cu_chk["ok"]:
cu_sync = render_all_quadrant_closeups(workspace_root=cfg.workspace_root, force=False, check_only=False)
assert cu_sync["ok"] is True
cu_chk = render_all_quadrant_closeups(workspace_root=cfg.workspace_root, check_only=True)
assert cu_chk["ok"] is True and not cu_chk["missing_pngs"], f"Closeup UI drift: {cu_chk}"
assert home_txt.count('class="closeup-tab-btn"') == 11, "Expected 11 interactive .closeup-tab-btn tabs across the 4 quadrants"
assert home_txt.count('class="closeup-tab-btn"') <= 12, "Strategy 6A: Homepage must never exceed 3 chamfered tabs per quadrant (12 total)"
hdr_match = re.search(r"<header>.*?</header>", home_txt, flags=re.S)
assert hdr_match is not None and len(re.findall(r"<a\b", hdr_match.group(0))) <= 7, "Strategy 6A: Homepage header must not exceed 7 links (6 tools + DONATE)"
assert "below-closeup-bar" not in home_txt, "Expected strictly one set of interactive chamfered tabs (above closeup, 0 below)"
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}"
quant_html_txt = (cfg.core_dir / "site" / "quant" / "index.html").read_text(encoding="utf-8")
assert "24 Watchlist Instruments" in quant_html_txt
for q_ctrl in ('id="timeWindowPills"', 'id="tickerQuickFilter"', 'id="heatmapPaginationBar"', 'id="wireTapeFilterInput"'):
assert q_ctrl in quant_html_txt, f"Missing Strategy 1A/2A control {q_ctrl} in site/quant/index.html"
kg_html_txt = (cfg.knowledge_graph_dir / "index.html").read_text(encoding="utf-8")
assert 'value="syzygy"' in kg_html_txt and 'id="minDegreeFilter"' in kg_html_txt
assert 'id="filterBookmarkInput"' in (cfg.core_dir / "site" / "learn" / "index.html").read_text(encoding="utf-8")
assert 'id="engCliFilterInput"' in (cfg.core_dir / "site" / "engineering" / "index.html").read_text(encoding="utf-8")
assert 'screen") === "dose-d3"' in (cfg.core_dir / "site" / "quant" / "quant-app.js").read_text(encoding="utf-8")
assert 'uParams.get("repl") === "trace"' in (cfg.core_dir / "site" / "assets" / "hs-guile-scheme-repl.js").read_text(encoding="utf-8")
assert 'id="live-smoke-probe"' in (cfg.core_dir / "site" / "engineering" / "mcp-chatbot-rest-and-ipld" / "index.html").read_text(encoding="utf-8")
# Verify Plan #53 (Strategies 1A, 2B, 3A, 4A, 5A, 6A, 7A): security.py, load_json_cached(), font lru_cache
from hyperstitionstud_io.config import load_json_cached
from hyperstitionstud_io.publishing.closeups_sync import _extract_js_ui_signature
from hyperstitionstud_io.publishing.fonts import load_pillow_font
from hyperstitionstud_io.security import SecurityBoundaryError, validate_safe_url
assert load_pillow_font("DejaVuSansMono.ttf", 12) is load_pillow_font("DejaVuSansMono.ttf", 12)
assert validate_safe_url("https://fred.stlouisfed.org/graph/fredgraph.csv") == "https://fred.stlouisfed.org/graph/fredgraph.csv"
assert validate_safe_url("http://127.0.0.1:18090/status", allow_http_localhost=True) == "http://127.0.0.1:18090/status"
for bad_url in ("file:///etc/passwd", "http://169.254.169.254/latest/meta-data/", "http://example.com/test"):
blocked_u = False
try:
validate_safe_url(bad_url, allow_http_localhost=False)
except SecurityBoundaryError:
blocked_u = True
assert blocked_u, f"Expected SecurityBoundaryError for {bad_url}"
tmp_json_f = tmp_path / "cached-test.json"
tmp_json_f.write_text('{"k": 1}', encoding="utf-8")
assert load_json_cached(tmp_json_f)["k"] == 1
tmp_json_f.write_text('{"k": 22}', encoding="utf-8")
assert load_json_cached(tmp_json_f)["k"] == 22
# Verify Plan #51 (Strategies 1B, 2A, 3A, 4A): /quant/ guided tour voice narration, #lensSelect UI indicator & JS closeup introspection
assert 'id="tutUiElementIndicator"' in quant_html_txt
quant_tut_js_p = cfg.core_dir / "site" / "quant" / "quant-tutorials.js"
quant_tut_txt = quant_tut_js_p.read_text(encoding="utf-8")
js_sig_1 = _extract_js_ui_signature(quant_tut_txt)
js_sig_2 = _extract_js_ui_signature(quant_tut_txt + '\n// document.getElementById("syntheticTestMutatedId")')
assert js_sig_1["js_ui_sha256"] != js_sig_2["js_ui_sha256"], "Mutating JS DOM control must change js_ui_sha256 fingerprint"
assert js_sig_1["has_lens_select_highlight"] is True and js_sig_1["speech_text_count"] == 25
node_quant_tut_test = subprocess.run(
[
"node",
"-e",
f"const QT = require({json.dumps(str(quant_tut_js_p))});"
"if (QT.episodes.length !== 5) process.exit(1);"
"let totalScenes = 0;"
"QT.episodes.forEach((ep) => {"
" ep.keyframes.forEach((kf) => {"
" totalScenes++;"
" if (!Array.isArray(kf.uiTargets) || kf.uiTargets.length === 0) process.exit(2);"
" if (!kf.uiElementLabel || !kf.speechText) process.exit(3);"
" });"
"});"
"if (totalScenes !== 25) process.exit(4);"
"const ep04 = QT.episodes[3];"
"if (!ep04.keyframes.every((kf) => kf.uiTargets.includes('lensSelect') && kf.uiTargets.includes('lensProjectionCard'))) process.exit(5);",
],
capture_output=True,
text=True,
check=False,
)
assert node_quant_tut_test.returncode == 0, f"Node QuantTutorials check failed ({node_quant_tut_test.returncode}): {node_quant_tut_test.stderr}"
# Verify Plan #57 (Strategies 1A, 2A, 3A): Zero-Git-Audio deploy-time WAV voice compiler (quant_voice.py) & 0 audio files in Git
from hyperstitionstud_io.publishing.quant_voice import build_quant_tour_voice_assets
tmp_voice_dir = tmp_path / "quant_audio"
v_res = build_quant_tour_voice_assets(out_dir=tmp_voice_dir, workspace_root=cfg.workspace_root)
assert v_res["ok"] is True and v_res["clip_count"] == 25
assert (tmp_voice_dir / "ep01-s1.wav").is_file() and (tmp_voice_dir / "ep01-s1.wav").read_bytes()[:4] == b"RIFF"
assert (tmp_voice_dir / "ep04-s1.wav").is_file() and (tmp_voice_dir / "voice-manifest.json").is_file()
git_gitignore = (cfg.core_dir / ".gitignore").read_text(encoding="utf-8")
assert "site/quant/audio/" in git_gitignore, "site/quant/audio/ must be in .gitignore so 0 audio files enter Git"
assert "__hsActiveUtterance" in quant_tut_txt and "playDeployTimeWavOrFormant" in quant_tut_txt
# Verify Plan #56: Fedora 41 OpenRouter Exegesis Synthesizer, Pre-Solved 333/666/777 Equation Engine & Push Worker
import importlib.util
synth_script_p = cfg.archive_dir / "ingglish-aq-archive" / "scripts" / "synthesize_news_dossier_openrouter.py"
assert synth_script_p.is_file()
spec_s = importlib.util.spec_from_file_location("synthesize_news_dossier_openrouter", synth_script_p)
assert spec_s is not None and spec_s.loader is not None
mod_s = importlib.util.module_from_spec(spec_s)
spec_s.loader.exec_module(mod_s)
sample_harvest = {
"temporal_metadata": {"target_date_utc": "2026-12-01"},
"counts": {"total_headlines": 2, "cross_story_collision_classes": 1, "isometric_locks": 1},
"headlines": [
{"headline": "Nvidia unveils next-generation Blackwell wafer cluster", "eng_aq": 812, "ing_aq": 834},
{"headline": "Spanish election coalition talks continue in Madrid", "eng_aq": 745, "ing_aq": 761},
],
"entities": [
{"eng": "Nvidia", "ing": "envideea", "eng_aq": 115, "ing_aq": 137, "story": "Silicon Wire"},
{"eng": "Spanish", "ing": "spanish", "eng_aq": 149, "ing_aq": 149, "story": "Europe Wire"},
],
"isometric_locks": [{"eng": "Spanish", "ing": "spanish", "eng_aq": 149, "ing_aq": 149}],
"cross_story_collisions": {},
}
solved_30 = mod_s.solve_cluster_equations_333_666_777(sample_harvest)
assert len(solved_30["eq_333"]) == 10 and len(solved_30["eq_666"]) == 10 and len(solved_30["eq_777"]) == 10
tmp_arc_d = tmp_path / "test_exegesis_arc"
tmp_arc_d.mkdir(parents=True, exist_ok=True)
(tmp_arc_d / "00-index-and-methodology.md").write_text("# Index\n\n### Category D:\n", encoding="utf-8")
tmp_harv_f = tmp_path / "sample-harvest.json"
tmp_harv_f.write_text(json.dumps(sample_harvest), encoding="utf-8")
syn_out = mod_s.synthesize_news_dossier(
harvest_path=tmp_harv_f,
archive_dir=tmp_arc_d,
api_key="",
allow_deterministic_fallback=True,
)
assert syn_out["ok"] is True and syn_out["equations_verified_count"] == 30 and syn_out["aq_mismatches"] == 0
assert Path(syn_out["dossier_path"]).is_file()
for pkg_f in (
cfg.archive_dir / "packaging" / "build-fedora41-rpm.sh",
cfg.archive_dir / "packaging" / "bundle" / "scripts" / "run_exegesis_and_push_fedora41.sh",
cfg.archive_dir / "packaging" / "rpm" / "ingglish-isopsephic-exegesis.spec",
cfg.archive_dir / "packaging" / "rpm" / "ingglish-exegesis.sysconfig",
):
assert pkg_f.is_file(), f"Missing Fedora 41 packaging file {pkg_f}"
assert "/dev/null" not in pkg_f.read_text(encoding="utf-8")
# Verify Plan #58: Pre-Commit Preparation & Gates D1-D8 for push-all-to-git-libre-audio.sh & deploy/sync-vps-repos.sh
from hyperstitionstud_io.ci.deploy_scripts_sync import prepare_and_verify_deploy_scripts
dep_sync = prepare_and_verify_deploy_scripts(workspace_root=cfg.workspace_root, check_only=False)
assert dep_sync["ok"] is True, f"Deploy scripts sync failed: {dep_sync}"
assert all(dep_sync["gates"].values()), f"Deploy scripts gates failed: {dep_sync['gates']}"
dep_chk = prepare_and_verify_deploy_scripts(workspace_root=cfg.workspace_root, check_only=True)
assert dep_chk["ok"] is True, f"Deploy scripts check_only failed: {dep_chk}"
assert (cfg.core_dir / "deploy" / "push-all-to-git-libre-audio.sh").read_text(encoding="utf-8") == (
cfg.workspace_root / "push-all-to-git-libre-audio.sh"
).read_text(encoding="utf-8")
# Verify Plan #60: /calc/ (haiperdohpjematreeah) Homepage Group 3 UI Parity, Zero "Cypher Calculator" & hyperdope-ci-build Patch Integration
calc_dir = cfg.paths["gematria_js_dir"]
calc_html = (calc_dir / "index.html").read_text(encoding="utf-8")
assert "<title>haiperdohpjematreeah</title>" in calc_html
assert 'id="hsCalcHeader"' in calc_html and 'class="btn-donate-pill"' in calc_html
assert "hs-group3-basalt-chamfer.css" in calc_html
for chk_p in (
calc_dir / "index.html",
calc_dir / "config.default.js",
calc_dir / "manifest.json",
calc_dir / "docs" / "ONBOARDING-INGGLISH-AQ.md",
(cfg.paths.get("ci_repo_dir") or (cfg.workspace_root / "hyperdope-ci-build")) / "config.default.js",
):
if chk_p.is_file():
assert re.search(r"(?i)cypher\s*calculator", chk_p.read_text(encoding="utf-8")) is None, f"Forbidden Cypher Calculator branding in {chk_p}"
ci_dir = cfg.paths.get("ci_repo_dir") or (cfg.workspace_root / "hyperdope-ci-build")
assert (ci_dir / "integrate-upstream-and-ui.sh").is_file()
assert (ci_dir / "patches" / "0001-feat-calc-ingglish-priority-toggle.patch").is_file()
assert (ci_dir / "patches" / "0002-feat-ui-group3-homepage-parity-and-haiperdohpjematreeah-branding.patch").is_file()
# Verify Plan #59 (Strategies 1A, 2A, 3A): normalize_speech_prosody(), master_wav_broadcast_warmth(), and WebAudio BiquadFilterNode EQ
from hyperstitionstud_io.publishing.quant_voice import normalize_speech_prosody
norm_p = normalize_speech_prosody("Inspecting NVDA and ASML with CIDv1 and 81 bps.")
assert "Nvidia" in norm_p and "A S M L" in norm_p and "C I D version 1" in norm_p and "basis points" in norm_p
assert "createBiquadFilter" in (cfg.core_dir / "site" / "quant" / "quant-tutorials.js").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.4.0"
schema_version = "2.15.0"
namespace_urn = "urn:io:hyperstitionstud"
[paths]