Compare commits

...
5 Commits
31 changed files with 1104 additions and 839 deletions

No files matched your search

@@ -4,7 +4,7 @@
- **Standalone Knowledge Graph Repository:** `/workspace/encyclopedia-knowledge-graph` (`branch: main`, `tag: v1.0.0`)
- **Upstream Read-Only Sibling Repository:** `/workspace/technocapital-singularity-zoology` (`v1.7.0`)
- **Knowledge Graph Compiler CLI:** `/workspace/encyclopedia-knowledge-graph/scripts/build_encyclopedia_knowledge_graph.py`
- **Interactive Browser Workbench:** `/workspace/encyclopedia-knowledge-graph/index.html` (`file:///home/m00t/hermes/workspace/encyclopedia-knowledge-graph/index.html`)
- **Interactive Browser Workbench:** `/workspace/encyclopedia-knowledge-graph/index.html` (`https://hyperstitionstud.io/graph/index.html`)
- **Strict Isolation Standard:** Read-Only Upstream Ingestion (`0` Graph/Visualization Concepts Permitted in `/workspace/technocapital-singularity-zoology/taxonomy/glossary-registry.json` or `encyclopedia/`)
---
@@ -124,7 +124,7 @@ python3 /workspace/encyclopedia-knowledge-graph/scripts/build_encyclopedia_knowl
Because `index.html` loads `window.ENCYCLOPEDIA_GRAPH_DATA` synchronously from the co-located `graph-data.js` bundle, operators can open the workbench in two ways:
1. **Direct Local `file://` Open (Zero Server Required):**
Open `file:///home/m00t/hermes/workspace/encyclopedia-knowledge-graph/index.html` directly in Firefox, Chromium, or Brave.
Open `https://hyperstitionstud.io/graph/index.html` directly in Firefox, Chromium, or Brave.
2. **Local HTTP Server (Serving `/workspace` Parent Directory):**
```bash
python3 -m http.server 8090 --bind 127.0.0.1 --directory /workspace
Binary file not shown.
@@ -40,7 +40,7 @@
| **2** | `ModuleNotFoundError: No module named 'io.hyperstitionstud'; 'io' is not a package`. | `io` is a built-in C stdlib module in Python (`sys.builtin_module_names`), which cannot act as a PEP 420 namespace package root. | Named the top-level Python package `hyperstitionstud_io` (`from hyperstitionstud_io.ciphers import ...`) while retaining `urn:io:hyperstitionstud:*` for XML/JSON URNs. |
| **3** | Citation URL resolution risked coupling to `git remote` subprocesses or fabricating dead global namespace URLs. | Mixing code/schema identity (`hyperstitionstud.io`) with artifact hosting location. | Restricted `resolve_citation_target()` in `hyperstitionstud_io.ci.citation_sources` strictly to `[citations.path_mounts]` in local `workspace.toml`, falling back to the verified local filesystem path (`0%` VCS subprocesses). |
| **4** | Outside `/workspace`, `build_encyclopedia_knowledge_graph.py` dropped all `281` `IN_VOLUME` edges. | `encyclopedia-manifest.json` stores `/workspace/...` in `vol["md_path"]`; checking `Path(vol["md_path"]).exists()` failed in other directories. | Resolved volume Markdown files relative to `upstream_repo / "encyclopedia" / div_id / f"{slug}.md"` first, keeping `encyclopedia-manifest.json`'s locked SHA-256 untouched. |
| **5** | `push-all-to-git-libre-audio.sh` failed under host `zsh`/`sh` with `No module named 'hyperstitionstud_io'`. | `${BASH_SOURCE[0]}` is unset in `zsh`/`sh`, and `PYTHONPATH` had no exported default value. | Used `${BASH_SOURCE[0]:-$0}` with explicit `/home/m00t/hermes/workspace` fallback and `export PYTHONPATH="${WORKSPACE_DIR}/hyperstitionstudio-core/src..."`. |
| **5** | `push-all-to-git-libre-audio.sh` failed under host `zsh`/`sh` with `No module named 'hyperstitionstud_io'`. | `${BASH_SOURCE[0]}` is unset in `zsh`/`sh`, and `PYTHONPATH` had no exported default value. | Used `${BASH_SOURCE[0]:-$0}` with explicit `/workspace` fallback and `export PYTHONPATH="${WORKSPACE_DIR}/hyperstitionstudio-core/src..."`. |
| **6** | `hs-doctor` failed on the VPS in Step 5 (`Verify environment & all 6 Knowledge Graph CI gates`). | In `src/hyperstitionstud_io/config/__init__.py`, `Path(__file__).resolve().parents[2]` stopped at `hyperstitionstudio-core/src` instead of `parents[3]` (`hyperstitionstudio-core`), so `WORKSPACE_ROOT` missed `/srv/hyperstitionstud.io/repos/workspace.toml`. | Updated `CORE_REPO_ROOT` to `parents[3]` and added `Path.cwd() / "workspace.toml"` to the configuration search candidates. |
| **7** | `haiperdohp-jemaytreeah` fresh clones lacked `config.js`, `db.json`, and `db_lite.json` (`404` on `/calc/*`). | `haiperdohp-jemaytreeah/.gitignore` excludes those 3 files, and `generate_db_json.py` requires explicit `db.txt db.json` arguments. | Added explicit Step 2b / Step 5 instructions and automated `cp config.default.js config.js` + `python3 tools/generate_db_json.py db.txt db.json` inside `deploy/sync-vps-repos.sh`. |
| **8** | `sudo apt update` on Debian VPS reported `NO_PUBKEY ABA1F9B8875A6661` on Caddy's Cloudsmith repo. | Cloudsmith rotated the GPG signing key for `dl.cloudsmith.io/public/caddy/stable`. | Added the GPG keyring refresh (`curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' \| sudo gpg --dearmor --yes -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg`) directly into Step 3 of the VPS deployment guide. |
@@ -1,95 +0,0 @@
# Plan: Comprehensive Exposure of All Workspace Capabilities, Compilers, Curricula & Documentation via MCP (`/mcp`) and Chatbot REST API (`/api/v1/*`) (`v2.2.1`)
- **Document ID:** `PLAN-COMPREHENSIVE-MCP-AND-CHATBOT-REST-API-CAPABILITY-EXPOSURE` (`v2.2.1`)
- **Roadmap Status:** **ACTIVE / READY**
- **Core Architectural & Governance Mandates:**
1. **100% Capability & Documentation Coverage Across All 6 Repositories:** Every functional capability, quantitative/macro/Bayesian dataset, Guile Scheme `Z`-combinator evaluator, programmatic SemVer/EROFS diagnostic, `/engineering/` (`E0–E5`) and `/math/` (`M0–M5`) explication hub/subpage, Novice Prerequisite Ladder, `/learn/` module, `/quant/` tutorial episode & `ⓘ` popover glossary, Operator's Manual, stakeholder proposal, active/deferred plan, and cold-rotated historical plan (`completed-plans-archive.tar.gz`) must be inspectable and queryable via both **MCP (`/mcp`)** and the **Chatbot OpenAPI 3.1.0 REST Adapter (`/api/v1/tools/*` & `/api/v1/resources/*`)**.
2. **Zero New Bespoke REST Routes in `src/hyperstitionstud_io/mcp/rest.py`:** All new capabilities are registered in `MCP_TOOLS_SCHEMA` (`src/hyperstitionstud_io/mcp/tools.py`), `STATIC_RESOURCES` / `RESOURCE_TEMPLATES` (`src/hyperstitionstud_io/mcp/resources.py`), and `MCP_PROMPTS` (`src/hyperstitionstud_io/mcp/prompts.py`), so the existing generic `/api/v1/tools/{tool_name}`, `/api/v1/resources/{slug}`, and `/api/v1/openapi.json` adapter exposes them automatically (`0` custom route patterns added to `rest.py`).
3. **100% Read-Only & `ProtectSystem=strict` (`EROFS`) Compliant (`0` LLM Tokens):** Cold-rotated plans inside `completed-plans-archive.tar.gz` are extracted strictly in memory via `tarfile` without touching disk, and every new tool is automatically swept under simulated `ProtectSystem=strict` (`EROFS`) by `src/hyperstitionstud_io/ci/erofs_harness.py`.
- **Target Modules & Files:**
- `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/mcp/tools.py`
- `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/mcp/resources.py`
- `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/mcp/prompts.py`
- `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/ci/erofs_harness.py`
- `/workspace/hyperstitionstudio-core/tests/test_core_suite.py`
---
## 1. Exhaustive Capability & Documentation Gap Audit (`v2.2.1`)
| Capability / Documentation Domain | Current State in `v2.2.1` | Gap Addressed by This Plan |
| :--- | :--- | :--- |
| **1. `/engineering/` (`E0–E5`) & `/math/` (`M0–M5`) Explication Hubs, Subpages & Novice Prerequisite Ladders** | Generated as static HTML/JSON in `site/engineering/` and `site/math/`, but **not** exposed via MCP tools or `/api/v1/*`. | Expose via new MCP tool **`hs_inspect_engineering_and_math_docs`** and static resources `engineering-manifest` & `math-manifest`. |
| **2. Guile Scheme & `Z`-Combinator Pedagogical Lens (`guile_prelude.scm` & S-Expression Evaluation)** | Runs in browser (`hs-guile-scheme-repl.js`), but cannot be evaluated or queried via MCP or Chatbot REST API. | Expose via new MCP tool **`hs_evaluate_guile_scheme_z_calculus`** (supporting exact rationals `p/q`, float conversion, `β-reduction` trace, and cartridge lookup) + resource `guile-prelude`. |
| **3. Operator's Manuals, Deployment Guides, Stakeholder Proposals & Specifications** | Stored as `.md`/`.pdf` files on disk (`OPERATORS-MANUAL-*`, `VPS-AND-GIT-OPERATOR-DEPLOYMENT-GUIDE`, `ONBOARDING-INGGLISH-AQ`, `proposal-*`, `specification-*`), but only `dossier:{01..71}` is readable via MCP. | Expose via new MCP tool **`hs_inspect_documentation_and_manuals`** (with keyword/passage search, full Markdown retrieval, and PDF deep-link URLs) and resource template `urn:io:hyperstitionstud:doc:{doc_slug}`. |
| **4. Cold-Rotated Completed Plans (`completed-plans-archive.tar.gz`) & Active/Deferred Roadmap Plans** | `76` completed `.md`/`.pdf` files in `encyclopedia-knowledge-graph/docs/archive/completed-plans-archive.tar.gz` + `5` in `zoology/docs/archive/` are indexed in `archive-manifest.json` but not queryable via API. | Expose in-memory `.tar.gz` plan listing and full `.md` extraction inside **`hs_inspect_documentation_and_manuals`** (`archive_rotator.py` in-memory `tarfile` reader — `0` disk writes, `EROFS`-safe). |
| **5. Interactive `/learn/` Curriculum (`Modules 1–6`) & `/quant/` Guided Tour (`5` Episodes) + `27` `ⓘ` Glossary Popovers** | Embedded in `site/learn/learn-app.js`, `site/quant/quant-tutorials.js`, and `site/quant/quant-app.js`, but not exposed via `/mcp` or `/api/v1/*`. | Expose structured `/learn/` curriculum modules, `/quant/` 5-episode tutorial scenes, and all `27` `QUANT_TERM_GLOSSARY` `ⓘ` definitions + PDF deep-links via **`hs_inspect_documentation_and_manuals`**. |
| **6. SQLite FTS5 Unified Catalog Search (`hyperstition-meta.db`), Programmatic Version Heuristics (`--explain-bump`) & `EROFS`/Baseline Audit State** | Implemented in `db/sqlite_meta.py`, `version_sync.py`, and `ci/public_regression.py`, but not exposed via MCP tools. | Expose via new MCP tool **`hs_query_workspace_catalog_and_release_state`**. |
| **7. IPLD `dag-json` (`0x0129`) `CIDv1` Registry Map (`hs_compute_ipld_dag_json_cid`)** | `reg_map` in `mcp/tools.py` only lists 7 v1 registries (`glossary-registry` .. `encyclopedia-graph`). | Expand `reg_map` to include `quant-timeseries`, `real-macro-indicators`, `daily-brief-latest`, `engineering-manifest`, `math-manifest`, and `archive-manifest` (`13` named registries total). |
---
## 2. Detailed Specification of the 4 New MCP / Chatbot REST Tools (`MCP_TOOLS_SCHEMA`)
### 2.1 `hs_inspect_engineering_and_math_docs`
- **Endpoint:** `GET/POST /api/v1/tools/hs_inspect_engineering_and_math_docs` & MCP `tools/call`
- **Parameters:**
- `domain` (`"all" | "engineering" | "math"`, default `"all"`): Select `/engineering/` (`E0–E5`), `/math/` (`M0–M5`), or both.
- `unit_filter` (`string`, default `""`): Optional unit ID or subpage slug (`"E0".."E5"`, `"M0".."M5"`, `"ciphers-and-phonetics"`, `"base36-algebra-and-primes"`, etc.).
- `include_guile_cartridges` (`boolean`, default `True`): Include the 3-column Homoiconic Tri-View (`math_view`, `py_view`, `scm_expr`, and `challenge`) for each unit.
- **Returns:**
- Full live-introspected manifests (`engineering-manifest.json` & `math-manifest.json`), algebraic conservation invariants, CLI scripts table, Novice Prerequisite Ladders (`expertise_level`, `prerequisites`, `public_resources`), subpage explication sections, and Guile Scheme cartridges.
### 2.2 `hs_inspect_documentation_and_manuals`
- **Endpoint:** `GET/POST /api/v1/tools/hs_inspect_documentation_and_manuals` & MCP `tools/call`
- **Parameters:**
- `category` (`"all" | "manuals" | "proposals_and_specs" | "active_and_deferred_plans" | "archived_plans" | "learn_and_tutorials" | "quant_glossary_popovers"`, default `"all"`).
- `doc_id` (`string`, default `""`): Optional document slug or plan ID (e.g. `"OPERATORS-MANUAL-LLM-TOKEN-DEPENDENT-DATA-PIPELINES"`, `"VPS-AND-GIT-OPERATOR-DEPLOYMENT-GUIDE"`, `"PLAN-LOCAL-SERVER-SIDE-WEB-CHATBOT-GUI"`, or any cold-archived plan like `"PLAN-HS-PDF-BUILD-DARK-MODE-AND-GLYPH-SANITIZATION"`).
- `search_query` (`string`, default `""`): Optional case-insensitive keyword or phrase to search across all manuals, plans (including inside `completed-plans-archive.tar.gz` in memory!), `/learn/` modules, and `/quant/` tutorial scenes / `ⓘ` popovers.
- `include_full_markdown` (`boolean`, default `False`): When `True` (or when `doc_id` is specified), returns the complete Markdown text of the matching document(s).
- **Returns:**
- Catalog of all documentation artifacts with canonical web PDF routes (`/graph/*.pdf`, `/quant/*.pdf`, `/zoology/*.pdf`, `/ci/*.pdf`), cold-archive manifest metadata (`bundle_sha256`, `member_count`), matched passages with line numbers, `/learn/` modules, `/quant/` tutorial scenes, and `27` `ⓘ` popover definitions.
### 2.3 `hs_evaluate_guile_scheme_z_calculus`
- **Endpoint:** `GET/POST /api/v1/tools/hs_evaluate_guile_scheme_z_calculus` & MCP `tools/call`
- **Parameters:**
- `expression` (`string`, default `'(aq-base36 "LEMUR")'`): S-expression to evaluate against the preloaded `guile_prelude.scm` environment (`Z`, `limit`, `derivative`, `nth-derivative`, `riemann-integral`, `adaptive-simpson`, `aq-base36`, `digital-root-mod9`, `prime-factors`, `variance-pop`, `eti-score`, `confluence-dose`, `bayes-update`, `evaluate-bump-scope`).
- `include_trace` (`boolean`, default `True`): Return step-by-step `β-reduction` call trace.
- `include_prelude_source` (`boolean`, default `False`): Include the full canonical `publishing/guile_prelude.scm` source code.
- **Returns:**
- Exact rational / symbolic result (`formatted`), floating-point approximation (`float_value`), `β-reduction` trace steps, and optional `guile_prelude.scm` source.
### 2.4 `hs_query_workspace_catalog_and_release_state`
- **Endpoint:** `GET/POST /api/v1/tools/hs_query_workspace_catalog_and_release_state` & MCP `tools/call`
- **Parameters:**
- `fts_query` (`string`, default `""`): Optional SQLite FTS5 full-text search query across `glossary_entries`, `kg_nodes`, and `dossiers` in `.cache/hyperstition-meta.db` (with automatic read-only JSON fallback if the `.cache` DB is absent).
- `include_version_bump_heuristics` (`boolean`, default `True`): Include the zero-token `compute_programmatic_version_bump()` (`--explain-bump`) report.
- `include_baseline_and_telemetry` (`boolean`, default `True`): Include the cached `.cache/internal-test-baseline-latest.json` summary (`erofs_protect_system_strict_audit`, canary values, `CIDv1` map) and `get_api_telemetry_summary()`.
---
## 3. Expanded MCP URN Resources (`src/hyperstitionstud_io/mcp/resources.py`)
Add 7 new static URN resources to `STATIC_RESOURCES` (all automatically accessible via `GET /api/v1/resources/{slug}` and MCP `resources/read`):
1. `urn:io:hyperstitionstud:resource:quant-timeseries` (`site/quant/quant-timeseries.json`)
2. `urn:io:hyperstitionstud:resource:macro-indicators` (`site/quant/real-macro-indicators.json`)
3. `urn:io:hyperstitionstud:resource:daily-brief` (`site/quant/daily-brief-latest.json`)
4. `urn:io:hyperstitionstud:resource:engineering-manifest` (`site/engineering/engineering-manifest.json`)
5. `urn:io:hyperstitionstud:resource:math-manifest` (`site/math/math-manifest.json`)
6. `urn:io:hyperstitionstud:resource:archive-manifest` (`encyclopedia-knowledge-graph/docs/archive/archive-manifest.json`)
7. `urn:io:hyperstitionstud:resource:guile-prelude` (`src/hyperstitionstud_io/publishing/guile_prelude.scm`, `text/x-scheme`)
---
## 4. Synergy with `PLAN-LOCAL-SERVER-SIDE-WEB-CHATBOT-GUI` & Verification Gates
- **Seamless Integration with `PLAN-LOCAL-SERVER-SIDE-WEB-CHATBOT-GUI`:**
- When `PLAN-COMPREHENSIVE-MCP-AND-CHATBOT-REST-API-CAPABILITY-EXPOSURE` is implemented first, `chatbot.py` (`hs_ask_chatbot`) can delegate documentation, manual, archived-plan, `/engineering/`, `/math/`, `/learn/`, Guile Scheme `Z`-combinator, and SQLite FTS5 queries directly to these 4 new MCP tools!
- **Automated Verification (`tests/test_core_suite.py` & `ci/erofs_harness.py`):**
- Because `ci/erofs_harness.py` dynamically iterates over `MCP_TOOLS_SCHEMA`, all 4 new tools are automatically tested under simulated `ProtectSystem=strict` (`EROFS`) on every test run.
- Add explicit assertions in `tests/test_core_suite.py` verifying:
- `hs_inspect_engineering_and_math_docs` returns all `E0–E5` and `M0–M5` units, Novice Prerequisite Ladders, and Guile cartridges,
- `hs_inspect_documentation_and_manuals` reads both live Operator's Manuals and cold-rotated `.md` plans from `completed-plans-archive.tar.gz` in memory under `EROFS`,
- `hs_evaluate_guile_scheme_z_calculus` evaluates `Z`-combinator expressions and returns exact rationals + `β-reduction` traces,
- `hs_query_workspace_catalog_and_release_state` returns SQLite FTS5 search hits, `--explain-bump` heuristics, and the `EROFS` baseline receipt, and
- `hs_compute_ipld_dag_json_cid` supports all 13 workspace registries.
@@ -0,0 +1,67 @@
# Plan: Ecosystem-Wide Economization Evaluation & Concrete Optimization Vectors (`Vectors E1–E7`) Across CPU, LLM Tokens, Disk/Web Footprint & Operator Time (`v2.2.2`)
- **Document ID:** `PLAN-ECOSYSTEM-WIDE-ECONOMIZATION-EVALUATION-AND-VECTORS` (`v2.2.2`)
- **Roadmap Status:** **DEFERRED (Long-Term Inactive — Preserved for Future Reference)**
- **Core Conservation Constraint (What Must NEVER Be Economized Away):**
1. **Zero-Synthetic-Data Mandate:** Never trade away observational honesty (`None`/`null` -> `"No data available"`).
2. **Gematria-Pipeline Richness Invariant:** Never prune or compress live gematria, phonemic, zoological, or knowledge-graph corpora (`146` dossiers, `282` glossary entries, `190` bilingual specimens, `388` KG nodes, `1,282` edges, `4,943+` offline CMUdict mappings).
3. **Two-Script Manual Operator Deployment Invariant:** `/workspace/push-all-to-git-libre-audio.sh` and `deploy/sync-vps-repos.sh` remain the only two manual deployment steps.
- **Target Modules & Scripts:**
- `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/phonetics/{__init__.py,cmudict_fallback.json}` (`Vector E1`)
- `/workspace/hyperstitionstudio-core/deploy/sync-vps-repos.sh` (`Vector E2`)
- `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/quant/daily_brief.py` (`Vector E3`)
- `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/mcp/tools.py` (`Vector E4`)
- `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/version_sync.py` (`Vector E5`)
- `/workspace/encyclopedia-knowledge-graph/scripts/build_encyclopedia_knowledge_graph.py` (`Vector E6`)
---
## 1. Synthesis of Prior Economizations Already Achieved in Session History (`v2.0.25–v2.2.2`)
| Prior Economization Milestone | Primary Dimension Saved | Measured Impact |
| :--- | :--- | :--- |
| **1. `T_math/T_char/T_elem/T_box` PDF Sanitizer (`pdf_compiler.py`)** | LLM Token Spend | **`-11,488` BPE tokens** saved across `38` docs (`0` LLM tokens per PDF compile) |
| **2. Cold-Storage Plan Archive Rotator (`hs-archive-rotate`)** | Disk / `rglob` / Token Spend | **`76` completed `.md`/`.pdf` plan files (`4.30 MB`)** compressed into `completed-plans-archive.tar.gz` (`3.59 MB`) and excluded from stylistic PDF refreshes |
| **3. Decommissioning Non-Exegesis `localhost` Cronjobs (`29c871eb6b78` & `7effa9679803`)** | Metered LLM Cron Turns | **`-12` LLM agent cron turns/week (`-63%`)** by migrating deterministic harvests to VPS `systemd` timers (`0` LLM tokens) |
| **4. Programmatic SemVer Heuristics (`hs-sync-version --auto-bump`)** | LLM & Operator Time | **`0` LLM tokens** and **`< 80 ms`** to classify `noop / patch / minor / major` from Git & archive deltas |
| **5. Pre-Compiled `quant-timeseries.json` Fast-Path in `quant/cards.py`** | CPU Time (API & Tests) | **`34x` speedup (`1,186 ms -> ~35 ms` per card)**, saving `~3.4 s` per test suite run |
| **6. Single Introspective `ProtectSystem=strict` (`EROFS`) Harness (`ci/erofs_harness.py`)** | LLM Maintenance & Operator Time | Automatically sweeps all `MCP_TOOLS_SCHEMA` tools under simulated `EROFS` with **`0` future test-authoring tokens** |
---
## 2. Empirical Profiling of Current Bottlenecks (`v2.2.2` Baseline Telemetry)
Profiling `tests/test_core_suite.py` (`6,653.8 ms` total) and repository artifact sizes across `/workspace` reveals exactly where the remaining CPU time, disk/Git churn, and payload bytes are concentrated:
- **Test Suite CPU Breakdown:**
- Suites `1–6` combined (`test_offline_urn_namespaces` through `test_doctor_all_checks_pass`): **`85.3 ms` (`1.3%`)**
- Suite `7` (`test_ipld_quant_and_mcp_server`): **`6,568.5 ms` (`98.7%`)**, dominated by:
- `build_quant_timeseries_bundle()` (called 2x in Suite 7): **`1,147.2 ms` + `1,107.8 ms` = `2,255.0 ms`**
- `run_introspective_erofs_suite()`: **`780.2 ms`**
- `build_catalog_sqlite_db()`: **`442.0 ms`**
- `render_periodic_harvest_cicd_flow_diagram_png()`: **`295.9 ms`**
- **Root Cause of the `1,147 ms` `build_quant_timeseries_bundle()` Bottleneck:**
- Out of `~350` English strings passed to `translate_batch()` in `timeseries.py`, `332` hit `cmudict_fallback.json` in `0.2 ms`, while **18 static ticker abbreviations** (`ANTHR`, `AVGO`, `BLK`, `BTC`, `CEG`, `ETH`, `GOOGL`, `HG`, `LLY`, `LMT`, `MSFT`, `NVDA`, `ORCL`, `PLTR`, `RTX`, `SOL`, `TNX`, `TSM`) are absent from `cmudict_fallback.json` (`4,943` entries), causing `translate_batch()` to spawn a cold `node --input-type=module` subprocess (`~1,100 ms`) on every single call without memoizing the result in `_FALLBACK_CACHE`!
---
## 3. Seven Concrete Project-Wide Economization Vectors (`Vectors E1–E7`)
| Vector | Target Module / Script | Economization Mechanism | Dimension(s) Optimized | Measured Expected Savings |
| :---: | :--- | :--- | :--- | :--- |
| **`E1`** | `src/hyperstitionstud_io/phonetics/{__init__.py,cmudict_fallback.json}` | 1. Add the 18 canonical watchlist ticker symbols (and FRED unit tokens) to `cmudict_fallback.json` (`4,943 -> 4,961` entries).<br/>2. Memoize any runtime `node` translations into `_FALLBACK_CACHE` in memory so `node` is never spawned twice for the same token in a process. | **CPU Time** & **Offline Phonetic Richness** | • `build_quant_timeseries_bundle()` drops from **`1,147 ms` to `~18 ms` (`63x` faster)**.<br/>• `test_core_suite.py` saves **`~2.2 seconds` (`-34%`)** per run. |
| **`E2`** | `deploy/sync-vps-repos.sh` (Step `[4/5]`) | Replace unconditional `find ... -exec gzip -9 -k -f` and `brotli -q 11 -k -f` over every file in `${LIVE_REPOS}` with an incremental `mtime` check (`[[ ! -f "${f}.gz" \|\| "${f}" -nt "${f}.gz" ]]` and `[[ ! -f "${f}.br" \|\| "${f}" -nt "${f}.br" ]]`). | **VPS Sync CPU Time** & **Deploy Latency** | Cuts Step `[4/5]` pre-compression CPU time on incremental deploys and `00:20 UTC` / `21:30 UTC` VPS runs by **`~85–92%`**. |
| **`E3`** | `src/hyperstitionstud_io/quant/daily_brief.py` | Compute `input_observations_sha256` over `(real-market-history.json, real-macro-indicators.json, latest_dated_dossier)`. When unchanged (and `--force-advance` is not passed), preserve the current `run_number` (`Q-RUN-NNNN`) and Bayesian posterior state instead of advancing a duplicate run on code-only releases. | **Git Repo Churn**, **Bayesian State Integrity** & **Operator Diff Clarity** | Eliminates spurious `Q-RUN-NNNN` state mutations and `ingglish-hyperdope-gematria` commits on code/doc-only releases. |
| **`E4`** | `src/hyperstitionstud_io/mcp/tools.py` | Add `mtime_ns`-keyed in-memory read-only JSON registry caching (`_load_json_cached(path)`) across `glossary-registry.json`, `encyclopedia-graph.json`, `quant-timeseries.json`, `real-macro-indicators.json`, and `daily-brief-latest.json`. | **API / MCP Latency** & **Test Suite CPU Time** | • Cuts `run_introspective_erofs_suite()` from `780 ms` to **`< 90 ms`**.<br/>• Speeds up live `/api/v1/*` and `/mcp` queries by **`5x–15x`**. |
| **`E5`** | `src/hyperstitionstud_io/version_sync.py` (`--prepare-release`) | Add `--prepare-release` to `hs-sync-version` to run `hs-archive-rotate`, `--auto-bump`, and selective regeneration of derived manifests in a single zero-token Python invocation. | **Manual Operator Time** & **LLM Turn Count** | Collapses **10 separate pre-push CLI commands into 1 command** (`0` LLM tokens). |
| **`E6`** | `encyclopedia-knowledge-graph/scripts/build_encyclopedia_knowledge_graph.py` | Keep `encyclopedia-graph.json` pretty-printed (`indent=2`) for Git readability, while serializing `graph-data.js` with compact `separators=(",", ":")` (matching `engineering-manifest-data.js` and `math-manifest-data.js`). | **Web / RAM `tmpfs` Footprint** | Reduces `graph-data.js` from **`892 KB` to `~625 KB` (`-267 KB` / `-30%`)** with `0` data loss. |
| **`E7`** | `hyperstitionstudio-roadmap-and-release/SKILL.md` | Keep `SKILL.md` `< 8,000` chars (`< 2,000` BPE tokens) by storing completed/active plan ledger tables in `references/roadmap-plan-ledger.md`. | **LLM Context Window** | Saves **`~4,200` BPE tokens** on every session turn where the skill is loaded. |
---
## 4. Test-Suite Appropriateness & Verification Gates (`tests/test_core_suite.py`)
1. **Appropriate for `tests/test_core_suite.py`:**
- Assert that `cmudict_fallback.json` contains `>= 4,961` entries including all 18 canonical ticker abbreviations (`"nvda"`, `"pltr"`, `"sol"`, `"tsm"`, `"anthr"`, etc.) so `build_quant_timeseries_bundle(write_files=False)` completes in `< 150 ms` with `0` subprocess spawns.
- Assert that calling `build_daily_portfolio_brief(allow_live_network=False, write_files=False)` twice on identical underlying market/macro/dossier inputs preserves the same `run_number` (`Q-RUN-NNNN`) and `input_observations_sha256` unless `force_advance=True` is passed.
- Assert that `graph-data.js` is compactly serialized (`< 700,000` bytes) while `encyclopedia-graph.json` retains all `388` nodes and `1,282` edges.
@@ -0,0 +1,143 @@
# PLAN: HyperstitionStudio Polyglot SDK & Zero-Drift Client Libraries (`hs-sdk-build` & `/sdk/`)
**Document ID:** `PLAN-HYPERSTITIONSTUDIO-POLYGLOT-SDK-AND-CLIENT-LIBRARIES`
**Status:** `ACTIVE / READY FOR IMPLEMENTATION`
**Target Ecosystem Version:** `v2.4.0`
**Target Repositories:** `hyperstitionstudio-core`, `encyclopedia-knowledge-graph`
**Author:** m00t & Hermes Agent
**Date:** 2026-11-30
---
## 1. Executive Summary & Architectural Objective
As of `v2.3.0`, `hyperstitionstud.io` exposes **20 deterministic MCP & Chatbot REST API tools** (`/api/v1/tools/*` and JSON-RPC 2.0 `/mcp`), **14 static URN resources** (`/api/v1/resources/*`), **6 parameterized URI templates**, **4 guided prompts**, **5 JSON Schema Draft 2020-12 contracts** (`/schemas/v1/*.schema.json`), and a **3-language polyglot pedagogical lens** (`Guile Scheme`, `TypeScript`, and `Rust`) across `/engineering/` and `/math/`.
This plan specifies the **HyperstitionStudio Polyglot Software Development Kit (`hs-sdk-build` & `/sdk/`)**: a **zero-LLM-token, schema-driven SDK generator and multi-language client library suite** providing ergonomic, strongly-typed programmatic access to `hyperstitionstud.io` across **Python**, **TypeScript / JavaScript (ESM + `.d.ts`)**, **Rust**, and **GNU Guile Scheme**.
### Core Design Principles
1. **Zero-Drift Schema-Driven Code Generation (`0` LLM Tokens):**
- `src/hyperstitionstud_io/sdk/generator.py` (`hs-sdk-build`) introspects `MCP_TOOLS_SCHEMA` (`20` tools), `STATIC_RESOURCES` (`14` URN resources), `RESOURCE_TEMPLATES` (`6` templates), `build_openapi_v1_spec()`, and `site/schemas/v1/*.schema.json` directly in Python (`<40 ms`, `0` LLM tokens) to emit synchronized client libraries, type declarations, and `/sdk/sdk-manifest.json`.
- Adding a 21st tool to `MCP_TOOLS_SCHEMA` automatically generates the corresponding typed method across Python, TypeScript, Rust, and Guile Scheme on the next `hs-sdk-build --sync` pass.
2. **Offline Local Algebra (`LocalAlgebra`) + Remote API Client (`HyperstitionClient`) Dual Architecture:**
- Every SDK target ships with two complementary modules:
- **`LocalAlgebra` (Offline, `0` Network Calls):** Pure, deterministic implementations of Base-36 Alphanumeric Qabbala (`aq_base36`), mod-9 digital root (`dr9`), trial-division prime factorization (`prime_factors`), exact/IEEE-754 population variance (`variance_pop`), Ecological Trophic Index (`eti_score`), 3-state discrete Bayesian updating (`bayes_update`), and RFC 8785 JCS + SHA-256 `CIDv1` (`baguqeera...`) verification.
- **`HyperstitionClient` (Typed Remote & In-Process Client):** Strongly-typed methods for all `20` MCP/REST tools, `14` static URN resources, `6` URI templates, and `4` prompts, targeting `https://hyperstitionstud.io` by default or any custom `base_url` (including `in_process` zero-socket dispatch in Python).
3. **Strict Zero-Synthetic-Data Contract Preservation:**
- SDK response types explicitly model nullable observations (`float | None` in Python, `number | null` in TypeScript, `Option<f64>` in Rust, `#f` / `'null` in Guile Scheme) alongside `data_available: bool` and `status: "No data available"`. The SDK never coerces missing or private-equity observations (`ANTHR-PVT`, weekend/holiday bars) to `0.0` or synthetic defaults.
4. **Global Zero-Host-Path & Two-Script Deployment Compliance:**
- All public SDK download routes, module imports, and documentation deep-links target `https://hyperstitionstud.io/sdk/...` (`Class W`), while all `localhost` developer CLI instructions use container-relative `/workspace/...` paths (`Class L`).
- `hs-sdk-build --sync` is wired into `/workspace/push-all-to-git-libre-audio.sh` and `/srv/hyperstitionstud.io/repos/hyperstitionstudio-core/deploy/sync-vps-repos.sh` so the **Two-Script Deployment Invariant** remains unbroken.
---
## 2. Four Target SDK Languages & Distribution Surfaces
| SDK Target | Generated Artifact Path (Web Route under `https://hyperstitionstud.io/sdk/`) | Runtime Dependencies | Supported Transports | Primary Audience & Use Case |
| :--- | :--- | :--- | :--- | :--- |
| **1. Python SDK (`hyperstitionstud_io.sdk` + standalone single-file `hyperstition_sdk.py`)** | `/sdk/python/hyperstition_sdk.py` (also importable via `from hyperstitionstud_io.sdk import HyperstitionClient, LocalAlgebra`) | **Zero external deps** (Python `>=3.10` stdlib `urllib.request`, `dataclasses`, `fractions.Fraction`, `hashlib`) | `rest` (`/api/v1/*`), `mcp_http` (JSON-RPC 2.0 `/mcp`), and `in_process` (`ReadOnlyIsolationGuard`) | Quantitative researchers, data pipelines, Jupyter notebooks, and AI agents |
| **2. TypeScript / JavaScript ESM SDK (`hyperstition-sdk.mjs` + `hyperstition-sdk.d.ts`)** | `/sdk/ts/hyperstition-sdk.mjs`, `/sdk/ts/hyperstition-sdk.d.ts`, `/sdk/ts/package.json` | **Zero external deps** (Standard `fetch` + `WebCrypto` `crypto.subtle.digest`) | `rest` (`/api/v1/*`) & `mcp_http` (`/mcp`) in Browser `<script type="module">`, Node.js `>=18`, Deno, and Bun | Web developers, browser dashboards, TradingView/quant integrations, and TypeScript apps |
| **3. Rust Typed SDK (`hyperstition_sdk.rs` + `Cargo.toml`)** | `/sdk/rust/hyperstition_sdk.rs`, `/sdk/rust/Cargo.toml` | Pure `std` for `local_algebra`; optional `serde` + `serde_json` + `ureq`/`reqwest` for HTTP transport | `rest` (`/api/v1/*`) & `mcp_http` (`/mcp`) + zero-allocation `local_algebra` | Systems engineers, low-latency quant backtesters, and CLI tool authors |
| **4. GNU Guile Scheme SDK (`hyperstition-sdk.scm`)** | `/sdk/guile/hyperstition-sdk.scm` | GNU Guile `3.0+` (`(web client)`, `(web uri)`, `(ice-9 match)`, plus `guile_prelude.scm`) | `rest` (`/api/v1/*`), `mcp_http` (`/mcp`), & pure functional Z-calculus `local-algebra` | Functional programmers, `z-calculus-scheme` learners, and symbolic algebra explorers |
---
## 3. Detailed SDK Architecture & API Specification
### 3.1 Python SDK (`src/hyperstitionstud_io/sdk/client.py` & `/sdk/python/hyperstition_sdk.py`)
The Python SDK provides both a rich multi-transport package inside `hyperstitionstudio-core` and a self-contained single-file distribution (`/sdk/python/hyperstition_sdk.py`) that external users can download via `curl -sSLO https://hyperstitionstud.io/sdk/python/hyperstition_sdk.py`:
```python
from hyperstitionstud_io.sdk import HyperstitionClient, LocalAlgebra
# 1. Offline Local Algebra (0 network calls, exact rational & Base-36 AQ math)
assert LocalAlgebra.aq_base36("LEMUR") == 114
assert LocalAlgebra.prime_factors(666) == [2, 3, 3, 37]
assert LocalAlgebra.variance_pop_exact([272, 276, 286, 290, 292, 336]) == "4634/9"
assert LocalAlgebra.bayes_update_exact(["1/3", "1/3", "1/3"], ["1/10", "3/10", "6/10"]) == ["1/10", "3/10", "3/5"]
# 2. Remote REST / MCP HTTP or Local In-Process Client
client = HyperstitionClient(
base_url="https://hyperstitionstud.io", # or transport="in_process" inside /workspace
transport="rest", # "rest" | "mcp_http" | "in_process"
verify_cidv1=True, # Auto-verifies RFC 8785 JCS CIDv1 receipts when present
)
# Strongly-typed methods for all 20 MCP/Chatbot REST tools:
aq_res = client.evaluate_aq_and_ingglish(terms=["schizoanalysis", "abstract machine", "synthetic data"])
nvda_ts = client.inspect_quant_timeseries(symbol="NVDA", lens="fund_manager")
anthr_ts = client.inspect_quant_timeseries(symbol="ANTHR-PVT")
assert anthr_ts["instruments"][0]["data_available"] is False # Zero-Synthetic-Data preserved
macro_res = client.inspect_macro_indicators(category="all")
brief_res = client.generate_daily_portfolio_brief(refresh=False)
card_res = client.generate_ticker_stats_card(symbol="NVDA", register="fund_manager")
poly_res = client.evaluate_guile_scheme_z_calculus(expression='aq_base36("LEMUR")', lang="rust")
```
### 3.2 TypeScript / JavaScript ESM SDK (`/sdk/ts/hyperstition-sdk.mjs` & `/sdk/ts/hyperstition-sdk.d.ts`)
Can be imported directly in any browser or Deno/Node.js script from `https://hyperstitionstud.io/sdk/ts/hyperstition-sdk.mjs` (or locally from `/sdk/ts/hyperstition-sdk.mjs`):
```ts
import { HyperstitionClient, LocalAlgebra } from "https://hyperstitionstud.io/sdk/ts/hyperstition-sdk.mjs";
// Offline deterministic algebra (shared with /engineering/ and /math/ TS lens)
const aq = LocalAlgebra.aqBase36("LEMUR"); // 114
const factors = LocalAlgebra.primeFactors(666); // [2, 3, 3, 37]
// Typed REST + MCP JSON-RPC 2.0 client
const client = new HyperstitionClient({ baseUrl: "https://hyperstitionstud.io", transport: "rest" });
const brief = await client.generateDailyPortfolioBrief({ refresh: false });
const nvdaCard = await client.generateTickerStatsCard({ symbol: "NVDA", register: "fund_manager" });
```
### 3.3 Rust SDK (`/sdk/rust/hyperstition_sdk.rs` & `/sdk/rust/Cargo.toml`)
Provides zero-allocation `local_algebra` functions (`aq_base36`, `dr9`, `prime_factors`, `variance_pop`, `eti_score`, `bayes_update`) that compile with `rustc --edition=2021` using only the Rust standard library (`std`), plus typed request/response structs and a `HyperstitionClient` builder for all 20 tools.
### 3.4 GNU Guile Scheme SDK (`/sdk/guile/hyperstition-sdk.scm`)
Integrates `guile_prelude.scm` (applicative-order `Z` combinator, exact rational `p/q` arithmetic, Thomas' Calculus `derivative` / `adaptive-simpson`, and `aq-base36`) with JSON-RPC 2.0 / REST HTTP helpers (`hs-call-tool`, `hs-read-resource`, `hs-verify-isolation`).
---
## 4. Cryptographic `CIDv1` Verification & Zero-Synthetic-Data Guards
1. **Client-Side RFC 8785 JCS + `CIDv1` (`baguqeera...`) Verification (`LocalAlgebra.compute_dag_json_cidv1`):**
- Both the Python and TypeScript SDKs include a pure implementation of RFC 8785 JSON Canonicalization Scheme (JCS) + SHA-256 multihash + RFC 4648 lower-case Base32 (`baguqeera...`) so callers can verify offline that any registry fetched via `/api/v1/resources/<name>` or `/api/v1/tools/hs_compute_ipld_dag_json_cid` is bit-for-bit authentic.
2. **Explicit `NoDataAvailable` Helpers (`ZeroSyntheticDataGuard`):**
- The SDK includes helper predicates (`HyperstitionClient.is_observation_available(bar)`) that check `bar.get("data_available") is True and bar.get("close_usd") is not None` and raise a descriptive `SyntheticFallbackForbiddenError` if user code attempts an unsafe numeric coercion on a `"No data available"` record without explicit filtering.
---
## 5. Interactive `/sdk/` Documentation Hub & MCP/REST Introspection
1. **Group 3 Stealth Basalt `/sdk/` Hub (`site/sdk/index.html`):**
- Renders a Group 3 (`Stealth Basalt Plate & Micro-Pip Signal Ribbon`, `10px/4px` `45°` chamfers) developer portal at `https://hyperstitionstud.io/sdk/` featuring:
- Direct download links and SHA-256 checksums for all 4 language SDK bundles (`/sdk/python/hyperstition_sdk.py`, `/sdk/ts/hyperstition-sdk.mjs`, `/sdk/ts/hyperstition-sdk.d.ts`, `/sdk/rust/hyperstition_sdk.rs`, `/sdk/guile/hyperstition-sdk.scm`, `/sdk/sdk-manifest.json`),
- Synchronized 5-state polyglot code examples (`#hsPolyglotModeSelector`) showing identical SDK workflows across Python, TypeScript, Rust, and Guile Scheme,
- Complete method reference table auto-generated from the `20` `MCP_TOOLS_SCHEMA` entries and `14` `STATIC_RESOURCES`.
- Navigation buttons to `/sdk/` (`SDK (/sdk/)`) wired into `/engineering/index.html` and `/math/index.html`.
2. **Container-Relative Local CLI & Public Web Invocation:**
- **Localhost Terminal CLI (`/workspace`):**
```bash
PYTHONPATH=/workspace/hyperstitionstudio-core/src python3 -m hyperstitionstud_io.sdk.generator --sync
```
- **Public Web & REST Discovery (`https://hyperstitionstud.io`):**
- `https://hyperstitionstud.io/sdk/sdk-manifest.json`
- `https://hyperstitionstud.io/api/v1/resources/sdk-manifest` (`urn:io:hyperstitionstud:resource:sdk-manifest`)
---
## 6. Implementation & Verification Gates
1. **Unit & Cross-Language Parity Gate (`tests/test_core_suite.py`):**
- Verify that Python `HyperstitionClient(transport="in_process")` and `LocalAlgebra` execute all 20 tool methods and match the TypeScript ESM SDK (`/sdk/ts/hyperstition-sdk.mjs` tested via `node --input-type=module -e ...`) on `aqBase36("LEMUR") == 114`, `primeFactors(666) == [2, 3, 3, 37]`, and `computeDagJsonCidv1(...)`.
- Verify that `hs-sdk-build --check` detects zero drift between `MCP_TOOLS_SCHEMA` and `/sdk/sdk-manifest.json`.
- Verify that `run_introspective_erofs_suite()` passes with `0` `EROFS` escapes when `hs-sdk-build` or SDK tools run under simulated `ProtectSystem=strict`.
2. **Two-Script Deployment & 6-Gate Public Smoke (`deploy/test-first-deployment.sh`):**
- Wire `/sdk` symlink creation and `.gz`/`.br` pre-compression into `deploy/sync-vps-repos.sh` and `push-all-to-git-libre-audio.sh` (`0` `/dev/null` redirections).
- Verify `/sdk/index.html`, `/sdk/sdk-manifest.json`, `/sdk/python/hyperstition_sdk.py`, `/sdk/ts/hyperstition-sdk.mjs`, `/sdk/ts/hyperstition-sdk.d.ts`, `/sdk/rust/hyperstition_sdk.rs`, and `/sdk/guile/hyperstition-sdk.scm` return `HTTP 200 OK`.
+27 -17
View File
@@ -1,7 +1,8 @@
# Plan: Lightweight Local Server-Side Web Chatbot GUI (`/chat/` & Dockable Widget) Powered by `hyperstition-mcp.service` & SQLite FTS5 at Zero (`0`) LLM Token Cost (`v2.2.0`)
- **Document ID:** `PLAN-LOCAL-SERVER-SIDE-WEB-CHATBOT-GUI` (`v2.2.0`)
- **Roadmap Status:** **ACTIVE / READY**
- **Document ID:** `PLAN-LOCAL-SERVER-SIDE-WEB-CHATBOT-GUI` (`v2.2.2`)
- **Roadmap Status:** **DEFERRED (Long-Term Inactive — Preserved for Future Reference)**
- **Default UI Placement Choice:** **Option 2 — Dedicated `/chat/` Subpage Only (`site/chat/index.html`) + Single `Ask Corpus (/chat/)` Header Button on `/` (Zero Floating Widget Injection on `/` or Subpages)**
- **Core Architectural & Resource Mandates:**
1. **100% Local on the Web Host (`0` LLM Tokens, `0` External API Keys, `0` GPU RAM):**
Runs entirely inside the existing `hyperstition-mcp.service` Python daemon (`127.0.0.1:8095`) using a deterministic **Hybrid Intent Router + SQLite FTS5 BM25 Full-Text Retriever + 15-Tool MCP Orchestrator (`src/hyperstitionstud_io/mcp/chatbot.py`)**. Consumes `0` metered LLM tokens, `0` external API keys, `< 15 ms` CPU time per query, and `< 5 MB` RSS memory.
@@ -71,23 +72,32 @@ When the browser sends a user question `q` to `POST /api/v1/tools/hs_ask_chatbot
---
## 2. Lightweight Group 3 Stealth Basalt Web Chatbot GUI (`site/assets/hs-chatbot-widget.js` & `/chat/index.html`)
## 2. Review of Pros and Cons of Chatbot Placement on the Homepage (`/`) vs. Elsewhere & Default Choice (`Option 2`)
### 2.1 Floating Dockable Widget Across All Primary Pages (`site/assets/hs-chatbot-widget.js`)
- **Header & Bottom-Left Launcher (`#hsChatbotToggleBtn`):**
- Styled in Group 3 Stealth Basalt (`10px/4px` `45°` chamfers, `34px` height, `#38bdf8` interactive border/pip, keyboard shortcut `Alt+K`).
- Does not eclipse or clutter any page: remains a single compact pill (`[ ◈ ASK CORPUS ]`) until clicked.
- **Interactive Drawer (`#hsChatbotDrawer`, `420 × 540 px`):**
- **Context-Aware Quick-Prompt Chips:** Displays 5 one-click starter questions tailored to the current page (`/`, `/quant/`, `/learn/`, `/engineering/*`, `/math/*`).
- **Instant Local Execution Badge:** Shows `0 LLM Tokens • Local Server-Side Engine (<15 ms) • CIDv1 Verified` in the drawer header.
- **Rich Answer Cards:**
- Formatted answer text + bulleted key metrics,
- Clickable deep-link pills (`Open in /quant/`, `Open in /graph/`, `Glossary PDF #page=N`),
- Inline `900×1260` `.png` Stats Card preview whenever a ticker card is queried,
- Collapsible `<details>` block showing the exact `/api/v1/tools/hs_ask_chatbot` JSON payload and IPLD `CIDv1` receipt.
### 2.1 Baseline for Comparison Prior to Review
- **In the Live Codebase (`v2.2.2`):** No web chatbot GUI exists on any page; the backend Chatbot OpenAPI 3.1.0 REST Adapter (`/api/v1/tools/*`) and MCP server (`/mcp` on `127.0.0.1:8095`) run headlessly while the homepage (`/workspace/hyperstitionstudio-core/site/index.html`) is a pure, static 6-Card Portal (`< 18 KB` HTML, `0` external JS state machines).
- **In the Initial Draft of This Plan:** Originally proposed a Dual-Surface layout injecting a floating dockable widget (`site/assets/hs-chatbot-widget.js`) across `/`, `/quant/`, `/learn/`, `/engineering/*`, and `/math/*` alongside a dedicated `/chat/index.html` workbench.
### 2.2 Dedicated Full-Screen `/chat/` Workbench (`site/chat/index.html`)
- Accessible at `/chat/index.html` (with a navigation button added to `site/index.html` and the widget header `[ Expand Full /chat/ Workbench ↗ ]`).
### 2.2 Pros of Placing the Chatbot on the Homepage (`/`) Rather Than on Subpages
1. **Immediate "Concierge / Wayfinder" Discovery for First-Time Visitors:** A visitor landing on `https://hyperstitionstud.io/` encounters 6 dense domain cards (`388` graph nodes, `22` encyclopedia PDFs, `ETI` tier lists, `24` quant tickers, `FRED` macro series, `/engineering/`, `/math/`). Having the chatbot accessible from `/` lets a newcomer ask *"Where should I start?"* or *"What is NVDA's latest price and Dose?"* and receive a direct deep-link.
2. **Zero Floating-Drawer Collisions with Subpage Workbenches:** The subpages already host dense, specialized interactive overlays in the viewport corners (`/engineering/*` and `/math/*` have the dockable `#hsGuileReplDrawer` and 5-state `#hsPolyglotModeSelector`; `/quant/` has `#quantInfoPopover` and the `410px` canvas; `/graph/` has the full-viewport force/radar explorer). Keeping the chatbot off those subpages prevents overlapping drawers and z-index clutter.
3. **Single-Surface Maintenance & Smaller Subpage Footprint:** Avoids injecting chatbot JS/DOM into 16+ subpage HTML templates and multiple Python compilers (`engineering_docs.py`, `math_docs.py`).
### 2.3 Cons of Placing an Embedded/Floating Chatbot Widget Directly on the Homepage (`/`) Rather Than on a Dedicated `/chat/` Subpage
1. **Risk to the Homepage's Clean 6-Card Grid & Group 3 `90/7/3%` Sensory Budget:** `site/index.html` is a balanced `2 × 3` (6-card) grid with zero JavaScript state machines. Adding an embedded chat panel or floating drawer directly onto `/` would either break the 6-card symmetry or obscure Cards `05` and `06` on laptop/mobile screens, consuming part of the strict `7%` `#38bdf8` interactive highlight budget on `/`.
2. **Loss of Context-In-Place When Reading Deep Subpages:** If the chatbot only lived as an inline widget on `/`, a user reading `/quant/` or `/math/` would have to navigate back to `/` anyway (whereas a dedicated `/chat/` subpage can be kept open in a companion tab).
3. **Constrained Screen Real Estate for Rich Outputs (`900×1260` Stats Cards & Raw JSON/CIDv1 Provenance):** A small corner widget on `/` is far too cramped to comfortably render a `900×1260` Ticker Stats Card PNG preview, a table of `333/666/777` archive equations, and an expandable IPLD `dag-json` `CIDv1` provenance receipt side-by-side.
### 2.4 Comparison of the 3 Placement Options & Designation of Option 2 as the Default Choice
| Placement Option | Homepage (`/`) Impact | Subpage (`/quant/`, `/math/`, `/engineering/`) Impact | Status |
| :--- | :--- | :--- | :---: |
| **Option 1 (Homepage `/` Widget Only — Collapsed Drawer on `/`, Zero Subpage Injection)** | Adds a floating drawer/bar to `/` (`site/index.html`). | Zero clutter on subpages (`0` collision with `#hsGuileReplDrawer` or `#quantInfoPopover`). | Alternative |
| **Option 2 (DEFAULT CHOICE: Dedicated `/chat/` Subpage Only + Single Header Button on `/`)** | **Keeps `/` 100% pure static HTML** (adds only one `Ask Corpus (/chat/)` button in `<header>`). | **Zero clutter on subpages; full-screen split-pane space on `/chat/index.html` for `900×1260` cards & JSON/CIDv1 receipts.** | **DEFAULT** |
| **Option 3 (Initial Draft: Floating Widget on `/` + All Subpages + `/chat/`)** | Adds floating widget to `/` plus `/chat/` link. | High risk of corner-drawer collision with `#hsGuileReplDrawer` on `/engineering/` & `/math/` and `#quantInfoPopover` on `/quant/`. | Superseded |
### 2.5 Specification of the Default Option 2 (`/chat/index.html` Full-Screen Split-Pane Workbench)
- Accessible at `/chat/index.html` via a single `34px`-height Group 3 Stealth Basalt header button (`Ask Corpus (/chat/)`) on `/workspace/hyperstitionstudio-core/site/index.html` (with `0` floating widget scripts injected into `/`, `/quant/`, `/learn/`, `/engineering/*`, or `/math/*`).
- Provides a 2-column Group 3 Stealth Basalt layout:
- **Left Column (`60%`):** Full conversational Q&A history, categorized prompt library across all 8 intents (Watchlist Tickers, FRED Macro & Bayesian Brief, Base-36 & Ingglish Calculator, Glossary & Zoology, Knowledge Graph Hubs, 333/666/777 Archive Equations, Guile Scheme & Z-Calculus, and Novice Onboarding), and exportable `.json` transcript button.
- **Right Column (`40%`):** Live Server-Side Telemetry & Provenance Inspector displaying the triggered MCP tool chain, raw JSON response, IPLD `dag-json` `CIDv1` hash, and any rendered `900×1260` Ticker Stats Card PNG.
Binary file not shown.
+1 -1
View File
@@ -74,4 +74,4 @@ Currently, `/workspace/memes` is an un-remoted local directory in `/workspace`.
### Phase 3: Wire into `deploy/sync-vps-repos.sh`, `test-first-deployment.sh` & `test_core_suite.py`
1. Add `${SUDO} ln -sfn "hyperstitionstudio-core/site/gallery" "${LIVE_REPOS}/gallery"` in `deploy/sync-vps-repos.sh`.
2. Add `/gallery/index.html` and `/gallery/gallery-data.js` to `deploy/test-first-deployment.sh` and `tests/test_core_suite.py`, verify `HTTP 200 OK` across all routes, commit, and push via `/home/m00t/hermes/workspace/push-all-to-git-libre-audio.sh`.
2. Add `/gallery/index.html` and `/gallery/gallery-data.js` to `deploy/test-first-deployment.sh` and `tests/test_core_suite.py`, verify `HTTP 200 OK` across all routes, commit, and push via `/workspace/push-all-to-git-libre-audio.sh`.
Binary file not shown.
@@ -0,0 +1,147 @@
# PLAN: Migrate Final `00:00 UTC` Exegesis Cronjob (`d28b479ec217`) Off `localhost` with First-Class Dual-Mode Support, Offline-First Execution & Anonymous BTC/XMR Token-Budget Funding
**Document ID:** `PLAN-MIGRATE-FINAL-EXEGESIS-CRONJOB-WITH-DUAL-MODE-AND-CRYPTO-FUNDING`
**Status:** `ACTIVE / READY FOR IMPLEMENTATION`
**Target Ecosystem Version:** `v2.4.0`
**Target Repositories:** `hyperstitionstudio-core`, `ingglish-hyperdope-gematria`, `encyclopedia-knowledge-graph`
**Author:** m00t & Hermes Agent
**Date:** 2026-11-30
---
## 1. Executive Summary & Architectural Objective
Following `PLAN-MIGRATE-PERIODIC-DATA-PRODUCTION-FROM-LOCALHOST-TO-VPS` (`v2.0.30`) and `PLAN-CRONJOB-ARCHIVE-ROTATION-ON-HYPERSTITIONSTUD-IO` (`v2.1.0`), only **one** recurring job remained on `localhost`:
- **`d28b479ec217` (`current-events-isopsephic-exegesis-daily-0000-gmt`, `00:00 UTC` / `19:00 EST` Daily)** — which runs `collect_news_aq.py` (Step A, `0` tokens), synthesizes the daily news-wire dossier `<NN>-dossier-news-YYYY-MM-DD.md` under Division `08` *"The Room Filter"* (Step B), and runs `ci_provision_ingglish.py --tier 2 --apply-repo` (Step C, `0` tokens).
This plan completes the migration of the **final recurring cronjob (`d28b479ec217`) off `localhost` onto `hyperstitionstud.io`**, while:
1. **Preserving the current `localhost` Hermes configuration (`execution_mode = "localhost_hermes"`) as a first-class, one-switch option**,
2. **Enforcing `hyperstitionstud.io`'s Offline-First, Zero-External-Network-Dependencies ethos** via a 3-Tier Synthesis Hierarchy (`Tier 1: Offline Local GGUF Weights via llama.cpp` $\rightarrow$ `Tier 2: Optional Anonymous BTC/XMR-Funded Prepaid API` $\rightarrow$ `Tier 3: 100% Deterministic Zero-Token Structural Dossier Compiler`), so that `<NN>-dossier-news-YYYY-MM-DD.md` is guaranteed to compile at `00:00 UTC` even with **zero external LLM API keys, zero cloud tokens, and zero internet access to LLM providers**, and
3. **Integrating an Anonymous BTC (`bc1q...`) & Monero (`XMR` `83ZC...`) Token-Budget & Compute Funding Architecture** connected to `/donate/index.html` (`site/donate/reactor-fuel-status.json`), with strict Zero-Synthetic-Data compliance (`"No data available"` whenever live wallet/credit telemetry is absent).
---
## 2. Three First-Class Execution Topologies (`[exegesis] execution_mode` in `workspace.toml`)
Both `/workspace/workspace.toml` and `/workspace/hyperstitionstudio-core/workspace.example.toml` gain a declarative `[exegesis]` configuration section supporting three first-class operational modes without code edits:
| `execution_mode` Value | Where `00:00 UTC` Exegesis Runs | Status of `localhost` Hermes Cronjob `d28b479ec217` | Synthesis Engine Hierarchy (`hs-exegesis-run`) | External LLM API Dependency |
| :--- | :--- | :--- | :--- | :--- |
| **`"vps_offline_first"` (New Default — Moves Final Cronjob Off `localhost`)** | **`hyperstitionstud.io` VPS** (`hyperstition-utc-rollover-harvest.timer` at `00:00 UTC` Daily) | **Decommissioned / Removed on `localhost`** (`cronjob_manage(action="remove", job_id="d28b479ec217")`, leaving **`0` cronjobs on `localhost`**) | **1.** Local offline GGUF model (`/var/lib/hyperstitionstud.io/models/*.gguf` via `llama-cli --offline`) if present;<br/>**2.** Deterministic Zero-Token Structural Dossier Compiler (`compile_deterministic_news_dossier()`, `0` LLM tokens) | **`0` External LLM Network Calls / `0` API Keys** |
| **`"vps_crypto_funded"` (Autonomous VPS with BTC/XMR Prepaid Token Budget)** | **`hyperstitionstud.io` VPS** (`hyperstition-utc-rollover-harvest.timer` at `00:00 UTC` Daily) | **Decommissioned / Removed on `localhost`** (`0` cronjobs on `localhost`) | **1.** Checks anonymous BTC/XMR-funded prepaid credit ledger (`/etc/hyperstitionstud.io/exegesis-budget.env`, capped at `<= 35,000` tokens/day);<br/>**2.** Automatic zero-downtime fallback to `vps_offline_first` (`local_gguf` $\rightarrow$ `deterministic_structural`) if budget is `$0.00` or offline | Optional isolated `00:00 UTC` call when funded; `100%` offline fallback guaranteed |
| **`"localhost_hermes"` (Preserved First-Class Current Configuration)** | **`localhost` Hermes Agent** (`d28b479ec217` at `00:00 UTC` Daily, pushing to `git.libre.audio`) | **Active on `localhost`** (restorable in one command via `hs-exegesis-run --print-localhost-cron-spec`) | Localhost Hermes agent writes `<NN>-dossier-news-YYYY-MM-DD.md` and pushes to `git.libre.audio`; if `localhost` is asleep past `00:20 UTC`, VPS `run-vps-archive-rotation.sh` optionally backfills via `vps_offline_first` | Metered on `localhost` only; `0` keys on VPS |
---
## 3. Aligning Exegesis with the Offline-First, "Zero External Network Dependencies" Ethos (`src/hyperstitionstud_io/publishing/exegesis_runner.py`)
Why did `d28b479ec217` previously require an LLM agent? Only **Step B** (arranging the already-solved `collect_news_aq.py` `333 / 666 / 777` equations and story clusters into the Markdown dossier `<NN>-dossier-news-YYYY-MM-DD.md` and appending a row to `00-index-and-methodology.md`) used an LLM.
By introducing `src/hyperstitionstud_io/publishing/exegesis_runner.py` (`hs-exegesis-run` CLI & MCP tool `hs_inspect_exegesis_runner_status`), Step A, Step B, and Step C are unified into a deterministic, idempotent pipeline with a **3-Tier Offline-First Synthesis Hierarchy**:
### Tier 1: Airgapped Local CPU GGUF Weights (`synthesis_backend = "local_gguf"`, `0` External Network Calls)
- When a local quantized GGUF weight file (e.g., `Qwen2.5-7B-Instruct-Q4_K_M.gguf` or `Llama-3.1-8B-Instruct-Q4_K_M.gguf`) and `llama-cli` (`llama.cpp`) are present at `/var/lib/hyperstitionstud.io/models/`, `hs-exegesis-run` invokes `llama-cli` inside a network-isolated subprocess (`bwrap --unshare-net` when available).
- Every equation `(word, ing, eng_aq, ing_aq, breakdown = 333/666/777)` is injected from `collect_news_aq.py` as an immutable table block and verified post-generation by `ci_provision_ingglish.py` Gate 4 (`aq_mismatches == 0`).
### Tier 2: Deterministic Zero-Token Structural Exegesis Compiler (`synthesis_backend = "deterministic_structural"`, `0` LLM Tokens, `< 150 ms`)
- When no local GGUF model and no prepaid API token budget are configured, `compile_deterministic_news_dossier()` compiles `<NN>-dossier-news-YYYY-MM-DD.md` directly in pure Python (`0` LLM tokens, `0` external network calls):
1. Ingests the dated story clusters and verified `333 / 666 / 777` `eng_aq` and `ing_aq` equation locks from `news-aq-harvest-YYYY-MM-DD.json` (or cached local RSS/Wikipedia corpus).
2. Runs `hs_classify_singularity` across each story cluster to assign exact Landian-Deleuzean Singularity Classes (`S1–S6`), `S×S6` Double Articulation flags, and Two-Gate state-matched `M1–M7+` memetic activations.
3. Computes exact `G1` intergenerational variance collapse ($\Delta\sigma^2_{\text{G1}} = \sigma^2_0 - \sigma^2_1$), `G3` quantized steps, `G4` isometric fixed points ($\Delta = 0$), and `G5` twin-prime mutations for every equation lock.
4. Renders the complete Division `08` *"The Room Filter"* Markdown dossier (including YAML/header metadata, Story Cluster Analysis, Verified `333 / 666 / 777` Equation Ledger, Cross-Scale `S1–S6` & `Dose 0..3+` Market Confluence Table, and Grounded Citation Sources `[1]..[k]`), updates `00-index-and-methodology.md`, and runs `ci_provision_ingglish.py --tier 2 --apply-repo`.
5. **Explicit UI Provenance Tag:** Every dossier compiled in `deterministic_structural` mode carries the header badge `Synthesis Mode: DETERMINISTIC_ZERO_TOKEN_STRUCTURAL (0 LLM Tokens)` so readers and downstream tools know its exact provenance.
### Tier 3: Optional Anonymous Crypto-Funded Prepaid API (`synthesis_backend = "crypto_funded_api"`)
- Opt-in only when `/etc/hyperstitionstud.io/exegesis-budget.env` is populated and `remaining_tokens_budget >= 35000`; automatically degrades to Tier 1 or Tier 2 on any network error, `HTTP 402`, or budget exhaustion.
---
## 4. Anonymous BTC & Monero (XMR) Funding Architecture for the Exegesis Token & Compute Budget
`hyperstitionstud.io/donate/` already publishes two sovereign, zero-tracker contribution channels:
- **Bitcoin (`BTC // Layer-1`):** `bc1qcgkpl0j2ayxd68haeutfvarjgla2lmz30yd23e` (`AQ("bitcoin") = 152`)
- **Monero (`XMR // Zero-Trace`):** `83ZCDY7YpUHJRwwj4ETL2THYYWVxWti6sbyxvdJ7kGBoWyKR2Wt4of6YyFjmjZqJCjYSwKdWkBK36dhsNzrnwbnvMajDaEJ` (`193`, 44th Prime)
### 4.1 Token Economics of the Daily `00:00 UTC` Exegesis Job
- **Cadence:** `1` run per day (`365` runs/year).
- **Token Footprint (when using LLM synthesis):** `~18,000` input tokens + `~4,000` output tokens = `~22,000` tokens/day (`~660,000` tokens/month).
- **Monthly Cost Envelope:**
- **Pathway A (`vps_offline_first` — Deterministic or Local GGUF):** **`$0.00 / month` marginal token cost** (`100%` covered by existing VPS base lease).
- **Pathway B (`vps_crypto_funded` — Open-Weight / Frontier API via Anonymous XMR/BTC Gateway):** **`~$0.20 to $1.85 USD / month` (`~$2.40 to $22.00 USD / year`)**. A single `$10` equivalent contribution in XMR or BTC funds **5 to 48 months** of daily `00:00 UTC` exegesis runs.
### 4.2 Evaluation of Anonymous Crypto-to-Token & Crypto-to-Compute Pathways
| Pathway | Mechanism | Privacy & KYC Profile | Alignment with Offline-First / Zero-External-Deps Ethos | Recommended Role |
| :--- | :--- | :--- | :--- | :--- |
| **1. Direct XMR/BTC VPS Compute Funding + Local GGUF (`Pathway C1`)** | Patron BTC/XMR funds the VPS host directly (e.g. privacy-native hosts accepting XMR/BTC with zero KYC); exegesis runs locally via `llama.cpp` or `deterministic_structural`. | **Maximum (Zero KYC, Zero External API Traffic, Zero Prompt Logging)** | **100% Aligned:** `0` outbound network requests during Step B exegesis; works on an airgapped LAN. | **Primary Default (`vps_offline_first`)** |
| **2. Anonymous XMR / BTC-Lightning Prepaid Inference Gateways (`Pathway C2`: NanoGPT / PPQ.ai / L402 Macaroons)** | Non-KYC inference gateways (`nano-gpt.com` native XMR/BTC deposit, `ppq.ai` Lightning/XMR, or HTTP `402 Payment Required` L402 Lightning Macaroons) issue a bearer credential or per-call preimage funded directly from a Monero subaddress or Lightning channel. | **High (No account identity, email, or credit card; XMR ring-CT shields sender/receiver graph)** | **Opt-In Secondary (`vps_crypto_funded`):** Outbound HTTPS call occurs only once per 24h inside one-shot `hyperstition-exegesis.service` (never inside `hs-mcp`), with instant fallback to `Pathway C1`. | **First-Class Opt-In for Cloud-Model Prose** |
| **3. Watch-Only / View-Key Local Budget Ledger (`Pathway C3`: `reactor-fuel-status.json`)** | Operator or offline view-only wallet (`monero-wallet-cli --view-only` / BTC descriptor) exports a signed static JSON receipt (`site/donate/reactor-fuel-status.json`) consumed by `hs-exegesis-run` and `/donate/`. | **Maximum (`0` private spend keys ever touch the VPS; `0` third-party blockchain explorer scripts in the browser)** | **100% Aligned:** Browser loads only local static `reactor-fuel-status.json` from `tmpfs` (`0` external RPC calls from visitor browsers). | **Canonical Telemetry & Budget Governor** |
### 4.3 Security & Isolation Invariants for Crypto-Funded Credentials
1. **Zero Private Spend Keys on VPS:** Neither the BTC private key nor the XMR private spend key is ever stored on `hyperstitionstud.io` or in any Git repository. Only public addresses (`bc1q...`, `83ZC...`) and static signed budget receipts (`site/donate/reactor-fuel-status.json`) exist in the webroot.
2. **Process & Environment Isolation:** When `execution_mode = "vps_crypto_funded"` is used, the prepaid token key resides exclusively in `/etc/hyperstitionstud.io/exegesis-budget.env` (`chmod 0600 root:root`), read only by the one-shot `00:00 UTC` runner—never passed to `hyperstition-mcp.service` (`:8095`) or Caddy.
3. **Hard Daily Token Circuit-Breaker (`MAX_DAILY_EXEGESIS_TOKENS = 35,000`):** `hs-exegesis-run` tracks daily token usage in `/var/lib/hyperstitionstud.io/exegesis-budget-state.json`. If a run exceeds the daily cap or the prepaid balance is exhausted (`available_usd_equivalent <= 0`), it automatically switches to `vps_offline_first` (`local_gguf` $\rightarrow$ `deterministic_structural`) so the `00:00 UTC` dossier never fails.
4. **Strict Zero-Synthetic-Data Rule on `/donate/`:** In `site/donate/reactor-fuel-status.json` and `/donate/index.html`, if live wallet/credit balance telemetry has not been populated (`data_available: false`), all balance and runway fields serialize strictly as `null` (`"No data available"`)—never simulated or fabricated numbers.
---
## 5. Step-by-Step Implementation Specification
1. **Create `src/hyperstitionstud_io/publishing/exegesis_runner.py` (`hs-exegesis-run` CLI):**
- Implements:
- `run_daily_exegesis_pipeline(date_utc=None, execution_mode=None, synthesis_backend=None, dry_run=False)`:
- **Idempotency Gate:** Checks whether `/workspace/ingglish-hyperdope-gematria/ingglish-aq-archive/<NN>-dossier-news-YYYY-MM-DD.md` already exists for `target_date_utc`. If present (e.g. already pushed by `localhost` in `localhost_hermes` mode), logs `"already_synthesized": True` and proceeds directly to Step C verification (`0` duplicate work).
- **Step A:** Runs `collect_news_aq.py --date YYYY-MM-DD` (`0` tokens).
- **Step B:** Dispatches according to `[exegesis] execution_mode` and `synthesis_backend` (`local_gguf` $\rightarrow$ `crypto_funded_api` [if enabled & funded] $\rightarrow$ `deterministic_structural`).
- **Step C:** Runs `ci_provision_ingglish.py --tier 2 --apply-repo`, verifies all 4 CI gates (`aq_mismatches == 0`), and updates `site/donate/reactor-fuel-status.json`.
- `--print-localhost-cron-spec`: Prints the exact `cronjob_manage` JSON specification for `d28b479ec217` so an operator can restore `localhost_hermes` mode in one step at any time.
2. **Wire `hs-exegesis-run` into `deploy/run-vps-data-production.sh --window=utc-rollover` (`00:00 UTC` Daily on VPS):**
- Before recomputing `timeseries.py`, `hs-daily-brief`, and `build_encyclopedia_knowledge_graph.py`, `run-vps-data-production.sh --window=utc-rollover` invokes `hs-exegesis-run --auto` so the new UTC day's news dossier `<NN>-dossier-news-YYYY-MM-DD.md` is synthesized, verified by `ci_provision_ingglish.py`, and committed/pushed to `git.libre.audio` autonomously on `hyperstitionstud.io`.
3. **Decommission `d28b479ec217` on `localhost` (`Rule A` Source-Decommissioning) While Preserving First-Class Re-Enablement:**
- Remove `d28b479ec217` from the active `localhost` Hermes cron scheduler via `cronjob_manage(action="remove", job_id="d28b479ec217")` when activating `execution_mode = "vps_offline_first"`, bringing `localhost` recurring cronjobs from `1` down to **`0`**.
- Update `OPERATORS-MANUAL-LLM-TOKEN-DEPENDENT-DATA-PIPELINES.{md,pdf}` with the 3-mode switch table (`vps_offline_first`, `vps_crypto_funded`, `localhost_hermes`), one-command restoration instructions, and **SOP 3: Explicit `localhost` Exegesis Push & VPS Reflection Procedure** (detailed in Section 6 below).
4. **Add Static Reactor Fuel & Exegesis Mode Readout to `/donate/index.html` & `MCP_TOOLS_SCHEMA`:**
- Create `site/donate/reactor-fuel-status.json` (`data_available: false`, `status: "No data available"` for unpopulated balances; live introspection of `execution_mode`, `synthesis_backend`, `btc_address`, `xmr_address`, and `daily_token_cap: 35000`).
- Expose `reactor-fuel-status` via `hs_query_workspace_catalog_and_release_state` and `/donate/index.html`.
5. **Verification Gates (`tests/test_core_suite.py` & `deploy/test-first-deployment.sh`):**
- Test `compile_deterministic_news_dossier()` in `tests/test_core_suite.py` inside a temporary directory and under simulated `ProtectSystem=strict` (`EROFS`), verifying 4-gate `ci_provision_ingglish.py` compliance (`0` AQ mismatches, `0` external network calls, `0` LLM tokens) and strict `"No data available"` behavior on unpopulated wallet balances.
---
## 6. Explicit Documentation Plan for the `localhost` Exegesis Push Procedure in `OPERATORS-MANUAL-LLM-TOKEN-DEPENDENT-DATA-PIPELINES.{md,pdf}`
### 6.1 Audit of Extant Operator PDFs
An audit of all extant Operator's Manual PDFs confirmed a documentation gap:
- In `/workspace/encyclopedia-knowledge-graph/docs/OPERATORS-MANUAL-LLM-TOKEN-DEPENDENT-DATA-PIPELINES.{md,pdf}`, Section 1 (Row 1) and Section 3 (`SOP 1: Running or Backfilling d28b479ec217 for a Specific UTC Date (YYYY-MM-DD) on localhost`) stop at **Step C** (`ci_provision_ingglish.py --tier 2 --apply-repo`).
- While `SOP 2` mentions in a brief clause that `d28b479ec217` *"backfills the missed UTC news dossier ... and pushes to `git.libre.audio`"*, **neither `OPERATORS-MANUAL-LLM-TOKEN-DEPENDENT-DATA-PIPELINES.pdf` nor `VPS-AND-GIT-OPERATOR-DEPLOYMENT-GUIDE.pdf` explicitly documents the step-by-step `localhost` exegesis push procedure**—specifically: which repositories are dirtied by an exegesis run, how downstream time-series/Bayesian artifacts ingest the new dossier's `333 / 666 / 777` equation locks, and the exact commands required to push from `localhost` (`/workspace`) to `git.libre.audio` and reflect the dossier on `https://hyperstitionstud.io`.
### 6.2 Exact Addition to `OPERATORS-MANUAL-LLM-TOKEN-DEPENDENT-DATA-PIPELINES.{md,pdf}` (and Cross-Reference in `VPS-AND-GIT-OPERATOR-DEPLOYMENT-GUIDE.{md,pdf}`)
This plan updates `/workspace/encyclopedia-knowledge-graph/docs/OPERATORS-MANUAL-LLM-TOKEN-DEPENDENT-DATA-PIPELINES.md` and recompiles `/workspace/encyclopedia-knowledge-graph/docs/OPERATORS-MANUAL-LLM-TOKEN-DEPENDENT-DATA-PIPELINES.pdf` via `hs-pdf-build` (`--refresh-all-web-pdfs`) to add **Step D** to the Master Boundary Table and a complete **SOP 3: End-to-End `localhost` Exegesis Push & VPS Reflection Procedure** (strictly using container-relative `/workspace/...` paths):
#### A. Repositories & Files Dirtied on `localhost` by an Exegesis Run (`Steps A–C`)
1. `/workspace/ingglish-hyperdope-gematria`:
- `ingglish-aq-archive/<NN>-dossier-news-YYYY-MM-DD.md` (new Division `08` *"The Room Filter"* dossier),
- `ingglish-aq-archive/00-index-and-methodology.md` (updated master index table & dossier count),
- `ingglish-aq-archive/news-aq-harvest-YYYY-MM-DD.json` (raw deterministic headline + `eng_aq`/`ing_aq` harvest).
2. `/workspace/hyperdope-ci-build` & `/workspace/haiperdohp-jemaytreeah` (via Step C `ci_provision_ingglish.py --tier 2 --apply-repo`):
- `db.txt`, `db_ingglish_entries.txt`, `ci-audit-report.json`, and `ONBOARDING-INGGLISH-AQ.{md,pdf}` (plus untracked `haiperdohp-jemaytreeah/db.json` and `db_lite.json` when regenerated).
3. `/workspace/hyperstitionstudio-core` (Downstream Time-Series & Bayesian Brief Integration):
- `site/quant/quant-timeseries.json` and `site/quant/quant-timeseries-data.js` (`daily_wire_series` and `Dose 2 / Dose 3+` intersection counts for `YYYY-MM-DD`),
- `site/quant/daily-brief-latest.json` (5-Agenda Bayesian regime update incorporating the new wire dossier).
#### B. Two Supported Push & Deployment Workflows from `localhost` (`/workspace`)
- **Workflow 1 — Canonical Two-Script Operator Push & Immediate VPS Reflection (Recommended after Manual / Backfill Runs):**
1. **On `localhost` (`/workspace`):** Run the single master topological push script, which automatically recomputes `quant-timeseries.json` and `daily-brief-latest.json` against the new `<NN>-dossier-news-YYYY-MM-DD.md`, runs `hs-sync-version --auto-bump` (`0` LLM tokens), runs all 7 test suites in `tests/test_core_suite.py`, commits all modified repositories, and pushes commits and tags to `git.libre.audio`:
```bash
/workspace/push-all-to-git-libre-audio.sh
```
2. **On `hyperstitionstud.io` (VPS):** Run the single master VPS hydration script to pull from `git.libre.audio`, rebuild untracked `.cache/hyperstition-meta.db` and `haiperdohp-jemaytreeah/db.json`, and sync the RAM-backed `tmpfs` webroot (`/var/www/hyperstitionstud.io/repos`) with `.br` / `.gz` pre-compression:
```bash
sudo /srv/hyperstitionstud.io/repos/hyperstitionstudio-core/deploy/sync-vps-repos.sh
```
- **Workflow 2 — Unattended `00:00 UTC` `localhost_hermes` Push into the `00:20 UTC` VPS Pull Window:**
1. When `execution_mode = "localhost_hermes"` is active, `d28b479ec217` executes `/workspace/push-all-to-git-libre-audio.sh` as its final deterministic **Step D** terminal command (~`00:05 UTC`) after `ci_provision_ingglish.py --tier 2 --apply-repo` passes with `0` AQ mismatches.
2. At `00:20 UTC`, the VPS `/etc/cron.d/hyperstition-archive-rotate` / `hyperstition-archive-rotate.timer` job (`deploy/run-vps-archive-rotation.sh`) automatically pulls the pushed commits from `git.libre.audio` and hydrates `/var/www/hyperstitionstud.io/repos` (`tmpfs`) with zero manual operator intervention.
@@ -1,73 +0,0 @@
# Plan: Expose SQLite `/api/v1/meta/*` REST Endpoints, HTTP `ETag` (`304 Not Modified`), `hs_query_sqlite_catalog` MCP Tool & `sync-vps-repos.sh` Hydration (`v2.0.18`)
- **Document ID:** `PLAN-SQLITE-META-REST-ENDPOINTS-ETAG-AND-VPS-SYNC` (`v2.0.18`)
- **Roadmap Status:** **LONG-TERM INACTIVE PLAN (Deferred)** — Extracted from `PLAN-SQLITE-REST-API-METADATA-DB` and preserved as a long-term architectural specification alongside `PLAN-LLM-TOKEN-ECONOMIZER-AND-VARIANCE-ROUTING`, `PLAN-MEMETIC-GALLERY-SUBPAGE`, and `Episodes 06–09` of *The Encyclopedia Expeditions*; not scheduled for active implementation unless explicitly activated.
- **Prerequisite Module:** `hyperstitionstud_io.db.sqlite_meta` (`hs-db-build` CLI, `hyperstition-catalog.db`, and `api-telemetry.db` automatically populated by `dispatch_rest_v1()` and `dispatch_jsonrpc()`, defined in the active plan `/workspace/encyclopedia-knowledge-graph/docs/PLAN-SQLITE-REST-API-METADATA-DB.{md,pdf}`).
- **Target Modules (When Activated):**
- `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/mcp/rest.py` & `server.py`
- `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/mcp/tools.py`
- `/workspace/hyperstitionstudio-core/deploy/hyperstition-mcp.service`
- `/workspace/hyperstitionstudio-core/deploy/sync-vps-repos.sh` & `deploy/test-first-deployment.sh`
---
## 1. Scope of Deferred Integration
Once the standalone `hyperstitionstud_io.db.sqlite_meta` engine (`hyperstition-catalog.db` + `api-telemetry.db`) is built, this long-term plan specifies how to expose it over the public `/api/v1/meta/*` HTTP REST surface and `/mcp` JSON-RPC server and wire automatic RAM-`tmpfs` database hydration into the VPS deployment pipeline:
1. **Five `/api/v1/meta/*` HTTP REST Endpoints:**
Expose `/api/v1/meta/{manifests,search,coordinate/{aq_int},timeseries/query,telemetry}` on `hyperstitionstud_io.mcp.rest` and `server.py`.
2. **HTTP `ETag` / `If-None-Match` (`304 Not Modified`) Conditional Caching Middleware:**
Serve deterministic `ETag` headers backed by `registry_manifests.dag_json_cidv1` (or SHA-256) and short-circuit matching `If-None-Match` requests with `HTTP 304 Not Modified` in `< 0.1 ms`.
3. **MCP Tool `hs_query_sqlite_catalog`:**
Register `hs_query_sqlite_catalog` in `MCP_TOOLS_SCHEMA` (`src/hyperstitionstud_io/mcp/tools.py`) and expose it at `/mcp` (`tools/call`) and `/api/v1/tools/hs_query_sqlite_catalog`.
4. **VPS `tmpfs` Hydration in `deploy/sync-vps-repos.sh` & Systemd Sandboxing:**
Run `hs-db-build` (`"${PYTHON_BIN}" -m hyperstitionstud_io.db.sqlite_meta --build`) inside `deploy/sync-vps-repos.sh` so `/var/www/hyperstitionstud.io/repos/hyperstition-catalog.db` refreshes in the `512 MB` RAM `tmpfs` mount on every pull while keeping `ProtectSystem=strict` and `ReadOnlyIsolationGuard` intact.
---
## 2. `/api/v1/meta/*` REST Endpoints & `hs_query_sqlite_catalog` MCP Tool Specification
### 2.1 REST Endpoints (`src/hyperstitionstud_io/mcp/rest.py`)
| HTTP Method & Path | Query Parameters | What It Queries in SQLite (`< 1 ms`) |
| :--- | :--- | :--- |
| `GET /api/v1/meta/manifests` | `?registry=glossary-registry` (optional) | Calls `query_registry_manifests()` on `registry_manifests` for all compiled schemas/registries, their record counts, `raw_sha256`, `dag_json_cidv1`, and `ETag` headers. |
| `GET /api/v1/meta/search` | `?q=envideea+137&type=all\|glossary\|equation\|node&limit=25` | Calls `query_fts_catalog()` to execute a ranked **FTS5 `BM25` full-text search** across `fts_catalog` (searching glossary terms, 1,850+ equations, 388 graph nodes, and 24 tickers in `< 0.6 ms`). |
| `GET /api/v1/meta/coordinate/{aq_int}` | `aq_int` in `1..999` (e.g. `/api/v1/meta/coordinate/137` or `/api/v1/meta/coordinate/125`) | Calls `query_coordinate_join(aq_int)` for a **Unified Cross-Corpus Coordinate Join**: in a single indexed SQL query, returns every glossary term, bilingual specimen, Knowledge Graph node/edge, `333/666/777` archive equation, and `/quant/` closing-bell bar that locks onto integer coordinate `{aq_int}`. |
| `GET /api/v1/meta/timeseries/query` | `?symbol=NVDA&start=2026-11-10&end=2026-11-30&min_points=1.5` | Calls `query_timeseries_bars()` to execute indexed range queries over `quant_timeseries_bars` (`WHERE symbol = ? AND date_utc BETWEEN ? AND ? AND contingent_points >= ?`). |
| `GET /api/v1/meta/telemetry` | None | Calls `get_api_telemetry_summary()` on `api-telemetry.db`, returning live server uptime, total calls, cache hit rate (`304`), mean/max latency ($\mu\text{s}$) per endpoint, and `100%` isolation verification counts. |
### 2.2 MCP Tool `hs_query_sqlite_catalog` (`src/hyperstitionstud_io/mcp/tools.py`)
- **Tool Name:** `hs_query_sqlite_catalog`
- **Input Schema (`inputSchema`):**
- `mode`: `"manifests" | "search" | "coordinate" | "timeseries" | "telemetry"` (default `"search"`)
- `query`: `str` (FTS5 `BM25` search query when `mode == "search"`)
- `doc_type`: `"all" | "glossary" | "equation" | "node" | "dossier" | "instrument"` (default `"all"`)
- `aq_int`: `int` (`1..999`, required when `mode == "coordinate"`)
- `symbol`: `str` (optional ticker filter when `mode == "timeseries"`)
- `start_date`, `end_date`: `str` (`YYYY-MM-DD` bounds when `mode == "timeseries"`)
- `min_points`: `float` (default `0.0`)
- `limit`: `int` (`1..100`, default `25`)
- **Execution Guarantees:** Runs strictly inside `ReadOnlyIsolationGuard` against `file:/.../hyperstition-catalog.db?mode=ro` (`PRAGMA query_only = ON;`).
---
## 3. HTTP `ETag` / `If-None-Match` (`304 Not Modified`) & VPS Systemd Sandboxing
1. **HTTP `ETag` & `If-None-Match` (`304 Not Modified`) Middleware in `_MCPHTTPHandler` (`mcp/server.py`):**
- Every `GET /api/v1/*` response computes or looks up its deterministic `ETag` (`"<dag_json_cidv1>"` from `registry_manifests` or SHA-256 payload digest).
- If the client sends `If-None-Match: "<etag>"` (or a comma-separated list containing `"<etag>"`), `_MCPHTTPHandler` records a `status_304` hit in `api-telemetry.db` and returns `HTTP 304 Not Modified` with an empty body immediately (`~95%` bandwidth reduction on repeat polls).
2. **Read-Only Catalog DB Hydration in `deploy/sync-vps-repos.sh`:**
- During Step 2 of `deploy/sync-vps-repos.sh`, invoke `"${PYTHON_BIN}" -m hyperstitionstud_io.db.sqlite_meta --build --db "${LIVE_REPOS}/hyperstition-catalog.db"` so the `512 MB` RAM-backed `tmpfs` mount always holds an up-to-date catalog DB after every repository pull.
3. **Preserving `ProtectSystem=strict` & `ReadOnlyIsolationGuard` in `deploy/hyperstition-mcp.service`:**
- Configure `RuntimeDirectory=hyperstition-mcp` (or `PrivateTmp=true` writing to `/tmp/hyperstition-api-telemetry.db`) so `hyperstition-mcp.service` writes `api-telemetry.db` only to an ephemeral tmpfs path while `/srv/hyperstitionstud.io/repos` and `/var/www/hyperstitionstud.io/repos` remain **100% read-only**.
---
## 4. Activation & Verification Checklist (When Promoted from Inactive Backlog)
1. Wire `/api/v1/meta/{manifests,search,coordinate/{aq_int},timeseries/query,telemetry}` and `ETag` / `If-None-Match` (`304 Not Modified`) into `src/hyperstitionstud_io/mcp/rest.py` and `server.py`.
2. Add `hs_query_sqlite_catalog` to `MCP_TOOLS_SCHEMA` in `src/hyperstitionstud_io/mcp/tools.py`.
3. Wire `hs-db-build` into `deploy/sync-vps-repos.sh` and add HTTP checks for `/api/v1/meta/manifests`, `/api/v1/meta/search?q=envideea`, `/api/v1/meta/coordinate/137`, `If-None-Match` -> `304 Not Modified`, and `/api/v1/meta/telemetry` to `tests/test_core_suite.py` and `deploy/test-first-deployment.sh`.
@@ -51,7 +51,7 @@ Operators can supply these three untracked files on the target machine using **e
*(Note: `deploy/sync-vps-repos.sh` checks for `config.js`, `db.json`, and `db_lite.json` automatically and runs both commands if any of the three files is missing).*
- **Option B — Fast `rsync` Transfer of Pre-Built Files from Workstation to VPS (Skips ~3-Min CPU Build):**
```bash
rsync -avP /home/m00t/hermes/workspace/haiperdohp-jemaytreeah/{config.js,db.json,db_lite.json} \
rsync -avP /workspace/haiperdohp-jemaytreeah/{config.js,db.json,db_lite.json} \
<user>@<LINODE_IP>:/srv/hyperstitionstud.io/repos/haiperdohp-jemaytreeah/
```
Binary file not shown.
+7 -1
View File
@@ -7,7 +7,7 @@
> - **Production VPS & Git Operator Deployment Guide:** `../VPS-AND-GIT-OPERATOR-DEPLOYMENT-GUIDE.pdf` (and `.md`)
> - **Cross-Repository Dependency & Audit Flow Diagram:** `../cross-repo-dependency-and-audit-flow-diagram.html` (and `.png` / `.pdf`)
> - **Concentric ETI Radar (`D Periphery`) Specification:** `../specification-concentric-eti-tier-ring-radar-d-periphery.pdf` (and `.md`)
> - **Active / Deferred Roadmap Plans in `../`:** `../PLAN-LEXICAL-AND-ETYMOLOGICAL-SIMPLIFICATION.{md,pdf}`, `../PLAN-HEADER-SUBTITLE-TELEMETRY-CONSOLIDATION-ALTERNATIVE.{md,pdf}`, `../PLAN-SQLITE-META-REST-ENDPOINTS-ETAG-AND-VPS-SYNC.{md,pdf}`, `../PLAN-LLM-TOKEN-ECONOMIZER-AND-VARIANCE-ROUTING.{md,pdf}`, and `../PLAN-MEMETIC-GALLERY-SUBPAGE.{md,pdf}` are preserved in `../` as long-term inactive/deferred plans.
> - **Active / Deferred Roadmap Plans in `../`:** `../PLAN-LEXICAL-AND-ETYMOLOGICAL-SIMPLIFICATION.{md,pdf}`, `../PLAN-HEADER-SUBTITLE-TELEMETRY-CONSOLIDATION-ALTERNATIVE.{md,pdf}`, `../PLAN-SQLITE-META-REST-ENDPOINTS-ETAG-AND-VPS-SYNC.{md,pdf}`, `../PLAN-LLM-TOKEN-ECONOMIZER-AND-VARIANCE-ROUTING.{md,pdf}`, `../PLAN-ECOSYSTEM-WIDE-ECONOMIZATION-EVALUATION-AND-VECTORS.{md,pdf}`, `../PLAN-LOCAL-SERVER-SIDE-WEB-CHATBOT-GUI.{md,pdf}`, and `../PLAN-MEMETIC-GALLERY-SUBPAGE.{md,pdf}` are preserved in `../` as long-term inactive/deferred plans.
---
@@ -53,3 +53,9 @@
| `PLAN-INTROSPECTIVE-PROTECT-SYSTEM-STRICT-EROFS-TEST-HARNESS.{md,pdf}` | Specification for the single in-process `ProtectSystem=strict` (`EROFS`) test harness (`src/hyperstitionstud_io/ci/erofs_harness.py`) sweeping all `MCP_TOOLS_SCHEMA` tools, `dispatch_rest_v1` routes, and Contract B builders, plus the `34x` stats-card fast-path (`1,186 ms -> ~35 ms` in `quant/cards.py`); now implemented and cached in `.cache/internal-test-baseline-latest.json`. |
| `PLAN-HOMEPAGE-ENGINEERING-AND-MATH-NAVIGATION-WIRING.{md,pdf}` | Specification for wiring `Engineering (/engineering/)` and `Applied Math (/math/)` navigation buttons into `site/index.html`, `/learn/index.html`, `/quant/index.html`, and `hs-public-smoke` Gate `P6`; now implemented across all web surfaces. |
| `PLAN-GUILE-SCHEME-PEDAGOGICAL-TOGGLE-AND-IN-BROWSER-REPL.{md,pdf}` | Specification for the additive `[ λ GUILE SCHEME LENS: OFF / ON ]` toggle, 6 pedagogical modalities grounded in `z-calculus-scheme` (`guile_prelude.scm`), and the offline in-browser Guile Scheme & Z-combinator REPL (`site/assets/hs-guile-scheme-repl.js`) across `/engineering/` (`E0–E5`) and `/math/` (`M0–M5`); now implemented and verified in `tests/test_core_suite.py`. |
| `PLAN-ELIMINATE-CONTAINER-HOST-PATHS-AND-TARGET-PUBLIC-WEB-ROUTES.{md,pdf}` | Specification for eliminating all container host path references across scripts, Python modules, `encyclopedia-graph.json`/`graph-data.js` (`304` nodes rewritten to `https://hyperstitionstud.io/encyclopedia/...`), live `.md`/`.pdf` manuals, and cold-rotated `.tar.gz` archives; now implemented and enforced by `test_offline_urn_namespaces_and_no_external_https_fonts()`. |
| `PLAN-POLYGLOT-PROGRAMMING-LENS-GUILE-TYPESCRIPT-RUST-AND-SELECTOR.{md,pdf}` | Specification for the 3-language polyglot pedagogical lens (`λ Guile Scheme`, `TS TypeScript`, `Rs Rust`), `34px` 5-state segmented radiogroup (`#hsPolyglotModeSelector`), and 4-Ring Zero-Escape Sandbox (`polyglot_sandbox.py` & `hs-guile-scheme-repl.js`); now implemented across `/engineering/` (`E0–E5`) and `/math/` (`M0–M5`). |
| `PLAN-ADHOC-MESSENGER-HIGHLIGHTS-SUMMARY-FOR-ENGINEERS-AND-MATH.{md,pdf}` | Specification for the zero-Web-UI, `<= 2` paragraph (`<= 1,100` char) phone-messenger highlights generator (`hs-highlights` CLI & `hs_generate_highlights_summary`, `src/hyperstitionstud_io/publishing/highlights.py`) writing exclusively to `/workspace/untracked/recent-highlights/`; now implemented and verified in `tests/test_core_suite.py`. |
| `PLAN-COMPREHENSIVE-MCP-AND-CHATBOT-REST-API-CAPABILITY-EXPOSURE.{md,pdf}` | Specification for exposing all `/engineering/`, `/math/`, manuals, cold-rotated `.tar.gz` plans, `/learn/`, `/quant/` popovers, polyglot sandbox evaluations, and SQLite FTS5 / release state diagnostics via `MCP_TOOLS_SCHEMA` (`20` tools) and `STATIC_RESOURCES` (`14` resources) with `0` new custom REST routes in `rest.py`; now implemented in `src/hyperstitionstud_io/mcp/{tools,resources}.py`. |
| `PLAN-SQLITE-META-REST-ENDPOINTS-ETAG-AND-VPS-SYNC.{md,pdf}` | Specification for SQLite catalog query modes (`manifests`, `fts_search`, `coordinate_join`, `timeseries_bars`, `telemetry`), VPS `tmpfs` catalog hydration in `deploy/sync-vps-repos.sh`, and deterministic HTTP `ETag` (`"<dag_json_cidv1>"`) + `If-None-Match` (`304 Not Modified`) conditional caching middleware in `src/hyperstitionstud_io/mcp/{rest,server}.py`; now implemented and verified in `tests/test_core_suite.py`. |
| `PLAN-REMOVE-D-FILTER-DISCUSSION-FROM-ENGINEERING-AND-MATH-HUBS.{md,pdf}` | Specification for surgically removing all references to `assert_zero_d_filter`, `Zero-d-Filter`, `d-filter`, and `10-letter decagram` (`nuoagmhysl`) filters from `/engineering/` and `/math/` while preserving 100% of geometric (`d-periphery`), Confluence Dose ($D_{i,t}$), calculus ($d/dx$), and statistical ($df$) uses of `d`/`D`; now implemented in `src/hyperstitionstud_io/publishing/engineering_docs.py` and guarded in `tests/test_core_suite.py`. |
+85 -25
View File
@@ -1,11 +1,11 @@
{
"version": "2.1.1",
"version": "2.3.2",
"bundle_filename": "completed-plans-archive.tar.gz",
"bundle_size_bytes": 3593868,
"bundle_sha256": "107d4855162a725cb7864c4e39734df135fb6887456b12962972cd795fda6e29",
"bundle_size_bytes": 4132494,
"bundle_sha256": "b4961edb80aafcc51be0605bf49ab2e72542b567c134228e64a18c3ed9b2bce1",
"require_companion_md": true,
"member_count": 76,
"total_uncompressed_bytes": 4303478,
"member_count": 88,
"total_uncompressed_bytes": 4936403,
"preserved_standalone_pdfs": [],
"members": [
{
@@ -38,6 +38,16 @@
"size_bytes": 88362,
"sha256": "7b486fe3ac4ee7fa88342fd29c784da8e2d32a32f4670e7d834e6b27a051d6f3"
},
{
"name": "PLAN-ADHOC-MESSENGER-HIGHLIGHTS-SUMMARY-FOR-ENGINEERS-AND-MATH.md",
"size_bytes": 10374,
"sha256": "965e61b6974278a3da0b07f86739738512b3c512b2fd340571fafa186bf69f1c"
},
{
"name": "PLAN-ADHOC-MESSENGER-HIGHLIGHTS-SUMMARY-FOR-ENGINEERS-AND-MATH.pdf",
"size_bytes": 92433,
"sha256": "f9cd167b43e6c78a9f8e1a1a441b0136f809de4c080e6b1e796f9a873824b132"
},
{
"name": "PLAN-ADHOC-PUBLIC-API-AND-SURFACE-REGRESSION-TEST-SUITE.md",
"size_bytes": 12558,
@@ -60,13 +70,23 @@
},
{
"name": "PLAN-COMMON-LIBRARY-HYPERSTITIONSTUDIO.md",
"size_bytes": 17158,
"sha256": "54296f2cbc7cf80e557c9fde7614d44cdf6023a80c5a01ff0d7661194dd41af8"
"size_bytes": 17128,
"sha256": "f2a8af70dc688a3e71ec4124341f7c042d3c82e00d893ee7fc61659ee810139a"
},
{
"name": "PLAN-COMMON-LIBRARY-HYPERSTITIONSTUDIO.pdf",
"size_bytes": 97869,
"sha256": "aa03394a82c67edf785eeea8619f4b4be6b0ebe585b6785c330257966dd48b42"
"size_bytes": 97861,
"sha256": "a8955ce0f55c97db5343e035b91c268fe227fc12d22dfa6660a99e0370440df2"
},
{
"name": "PLAN-COMPREHENSIVE-MCP-AND-CHATBOT-REST-API-CAPABILITY-EXPOSURE.md",
"size_bytes": 12193,
"sha256": "124cc90e14fc23ee07ca619c73faf015a613f9b05633449364db6b977bb9e652"
},
{
"name": "PLAN-COMPREHENSIVE-MCP-AND-CHATBOT-REST-API-CAPABILITY-EXPOSURE.pdf",
"size_bytes": 94648,
"sha256": "e379b74dbdcb601509bfd3068fd613b45404cd4a437daa6563b71f5a8167acad"
},
{
"name": "PLAN-CRONJOB-ARCHIVE-ROTATION-ON-HYPERSTITIONSTUD-IO.md",
@@ -98,6 +118,16 @@
"size_bytes": 86622,
"sha256": "6c4f6cc2a6100a2dfa4c362b94767644652d720eea0a1a6d7a42046948e39321"
},
{
"name": "PLAN-ELIMINATE-CONTAINER-HOST-PATHS-AND-TARGET-PUBLIC-WEB-ROUTES.md",
"size_bytes": 12067,
"sha256": "2aa48c49d5e8be605b1f4de6bf8044f456cc69ec6ab09b880cb1428afa5f283c"
},
{
"name": "PLAN-ELIMINATE-CONTAINER-HOST-PATHS-AND-TARGET-PUBLIC-WEB-ROUTES.pdf",
"size_bytes": 93000,
"sha256": "136b94379f9d82098dd74dc37172e2eed59dfaf23c7edb74bd042b34338f9e4c"
},
{
"name": "PLAN-GIT-LIBRE-AUDIO-REPO-SYNC-FOR-VPS-INSTALL-DIRS.md",
"size_bytes": 16330,
@@ -120,13 +150,13 @@
},
{
"name": "PLAN-GLOBAL-SITE-FOOTER-LEMURS.md",
"size_bytes": 4043,
"sha256": "01d29260eca06d71cc9f11115bcb10cf9f87b33e2599523c7d07b93315e4cb9d"
"size_bytes": 4026,
"sha256": "b29be8241dd6167d451510559e7402b92e850e8da64db65db602098d59879c4f"
},
{
"name": "PLAN-GLOBAL-SITE-FOOTER-LEMURS.pdf",
"size_bytes": 85729,
"sha256": "31806f4bf3075a3e907aafcf5418932fa4f02b43cd1e0ce35a2723fde75ee470"
"size_bytes": 85710,
"sha256": "38efad63b69e66664c506398392be8b06aabc7360495028a908645bf04f1a1f9"
},
{
"name": "PLAN-GUILE-SCHEME-PEDAGOGICAL-TOGGLE-AND-IN-BROWSER-REPL.md",
@@ -190,13 +220,13 @@
},
{
"name": "PLAN-LINODE-AKAMAI-VPS-HOMEPAGE-DEPLOYMENT.md",
"size_bytes": 11793,
"sha256": "a544c349b642fcb90342f463e73fe77afb70aae304cc39dda09287afc7dcfe54"
"size_bytes": 11776,
"sha256": "0c54a023403f7a4b034ca7da782af5b7b103e69c593ec818279b5adc5797e73e"
},
{
"name": "PLAN-LINODE-AKAMAI-VPS-HOMEPAGE-DEPLOYMENT.pdf",
"size_bytes": 93572,
"sha256": "36a04cd2788a29dfb1a132f7573edd2e52af8c2cc76a23341064d39fe513cf2b"
"size_bytes": 93548,
"sha256": "b3570d5ef49aef6c6aee41fc7c6bb2c34baf501a10a3060842092709a3650b21"
},
{
"name": "PLAN-MACROECONOMIC-INDICATORS-INTEGRATION-CPI-PPI-RATES-M2-GDP.md",
@@ -230,13 +260,13 @@
},
{
"name": "PLAN-MCP-SERVER-HYPERSTITIONSTUDIO.md",
"size_bytes": 16435,
"sha256": "cf1f5c8cf9ddcde1b0a63af8ba3a36438cafd5eb00f27eb9104e2e51772b6893"
"size_bytes": 16401,
"sha256": "bca396d0685f9e31f0043a2b915c90e7e4fa62bd006baeb014aed22b58d021b2"
},
{
"name": "PLAN-MCP-SERVER-HYPERSTITIONSTUDIO.pdf",
"size_bytes": 99316,
"sha256": "7ec7f48410d6025dd2f5ddbe3aac2e6c2badfd988989f15d7ccef4b0baae8806"
"size_bytes": 99275,
"sha256": "fdbf9114bcdf10cd464e4cfe75769cc6d378f4df59c0c6370e6497cd9e83dac7"
},
{
"name": "PLAN-MIGRATE-PERIODIC-DATA-PRODUCTION-FROM-LOCALHOST-TO-VPS.md",
@@ -268,6 +298,16 @@
"size_bytes": 102299,
"sha256": "069cf4c2a294a30a4823548471fc5b4661a929882ac25313715749572dd3037b"
},
{
"name": "PLAN-POLYGLOT-PROGRAMMING-LENS-GUILE-TYPESCRIPT-RUST-AND-SELECTOR.md",
"size_bytes": 19580,
"sha256": "bc1eeb0f18975f246832522317b86ffa0edc13951a0317e1bf799640e051fa68"
},
{
"name": "PLAN-POLYGLOT-PROGRAMMING-LENS-GUILE-TYPESCRIPT-RUST-AND-SELECTOR.pdf",
"size_bytes": 104641,
"sha256": "cc8cdc2f1ad665cfe0d21f2c4b382d795b2370cc514c89ce3948a6c93ea11af0"
},
{
"name": "PLAN-PROGRAMMATIC-VERSION-BUMP-HEURISTICS-ZERO-TOKEN.md",
"size_bytes": 8606,
@@ -328,6 +368,16 @@
"size_bytes": 97326,
"sha256": "4411a46a00e79cf8a891766432e1b748c7feb85f394091d8983ce0315e9c7503"
},
{
"name": "PLAN-REMOVE-D-FILTER-DISCUSSION-FROM-ENGINEERING-AND-MATH-HUBS.md",
"size_bytes": 7744,
"sha256": "66e8086edfffe148d6cdeac645315a52b4f270fcbb18a0276da38f6407722c7c"
},
{
"name": "PLAN-REMOVE-D-FILTER-DISCUSSION-FROM-ENGINEERING-AND-MATH-HUBS.pdf",
"size_bytes": 89036,
"sha256": "56324f894bbeed5dab80666cd865df84db70c1d70ef7d6bc4655f4c54485a07a"
},
{
"name": "PLAN-SOFTWARE-ENGINEERING-EXPLICATION-HUB-AND-SUBPAGES.md",
"size_bytes": 19681,
@@ -338,6 +388,16 @@
"size_bytes": 105359,
"sha256": "ee62cbd81e85e90b8b35c5d32ba14f369155d2f23d2bda24937f0cd28bb2b7be"
},
{
"name": "PLAN-SQLITE-META-REST-ENDPOINTS-ETAG-AND-VPS-SYNC.md",
"size_bytes": 7611,
"sha256": "c0bb178c893ee471099e6cc0a811261eb5b6e653c8cf5843ba2c479ed9a6888d"
},
{
"name": "PLAN-SQLITE-META-REST-ENDPOINTS-ETAG-AND-VPS-SYNC.pdf",
"size_bytes": 89845,
"sha256": "6b4f3afe660fa38ada61f96a317f80bb5d4fb391b6b88ea2628a604ac018ba54"
},
{
"name": "PLAN-SQLITE-REST-API-METADATA-DB.md",
"size_bytes": 20367,
@@ -370,13 +430,13 @@
},
{
"name": "REVIEW-OUTSTANDING-PLANS-POST-V2-0-8.md",
"size_bytes": 5772,
"sha256": "8c2c3da4bfc0c9b5e9eca15e1b7aa39adfb11d90d2e358c1308aeab276fb05f3"
"size_bytes": 5742,
"sha256": "ce4d541462b463e7badc076cc13fbf4d934b184316928797332dbee2f07caec9"
},
{
"name": "REVIEW-OUTSTANDING-PLANS-POST-V2-0-8.pdf",
"size_bytes": 87220,
"sha256": "f3620c0b3f531612de5776f34cbd4b0717a50264edfcf00667af944c64177fc7"
"size_bytes": 87193,
"sha256": "18c9850c0fd78cbf3e197874b7944fc2d9e31627fda61162827f5e0570e6105a"
},
{
"name": "plan-interactive-knowledge-graph-encyclopedia.md",
Binary file not shown.
@@ -120,7 +120,7 @@
<div class="pulse-dot"></div>
<h1>Cross-Repository Dependency Graph &amp; Auditable Build &rarr; Test &rarr; Stage_Commit Pipeline</h1>
</div>
<p class="subtitle">Sibling Repositories under /workspace: ingglish-hyperdope-gematria &bull; technocapital-singularity-zoology (v2.2.2) &bull; encyclopedia-knowledge-graph (v2.2.2)</p>
<p class="subtitle">Sibling Repositories under /workspace: ingglish-hyperdope-gematria &bull; technocapital-singularity-zoology (v2.4.0) &bull; encyclopedia-knowledge-graph (v2.4.0)</p>
</div>
<!-- Main SVG Diagram -->
@@ -1,8 +1,8 @@
# Cross-Repository Dependency Graph & Auditable `BUILD -> TEST -> STAGE_COMMIT` Pipeline (`v1.0.0`)
- **Interactive HTML/SVG Diagram:** `/workspace/encyclopedia-knowledge-graph/docs/cross-repo-dependency-and-audit-flow-diagram.html` (`file:///home/m00t/hermes/workspace/encyclopedia-knowledge-graph/docs/cross-repo-dependency-and-audit-flow-diagram.html`)
- **High-Resolution PNG Flow Diagram (`1600x1120`):** `/workspace/encyclopedia-knowledge-graph/docs/cross-repo-dependency-and-audit-flow-diagram.png` (`file:///home/m00t/hermes/workspace/encyclopedia-knowledge-graph/docs/cross-repo-dependency-and-audit-flow-diagram.png`)
- **Companion Printable PDF:** `/workspace/encyclopedia-knowledge-graph/docs/cross-repo-dependency-and-audit-flow-diagram.pdf` (`file:///home/m00t/hermes/workspace/encyclopedia-knowledge-graph/docs/cross-repo-dependency-and-audit-flow-diagram.pdf`)
- **Interactive HTML/SVG Diagram:** `/workspace/encyclopedia-knowledge-graph/docs/cross-repo-dependency-and-audit-flow-diagram.html` (`https://hyperstitionstud.io/graph/docs/cross-repo-dependency-and-audit-flow-diagram.html`)
- **High-Resolution PNG Flow Diagram (`1600x1120`):** `/workspace/encyclopedia-knowledge-graph/docs/cross-repo-dependency-and-audit-flow-diagram.png` (`https://hyperstitionstud.io/graph/docs/cross-repo-dependency-and-audit-flow-diagram.png`)
- **Companion Printable PDF:** `/workspace/encyclopedia-knowledge-graph/docs/cross-repo-dependency-and-audit-flow-diagram.pdf` (`https://hyperstitionstud.io/graph/docs/cross-repo-dependency-and-audit-flow-diagram.pdf`)
---
Binary file not shown.

Before

Width:  |  Height:  |  Size: 284 KiB

After

Width:  |  Height:  |  Size: 285 KiB

+305 -305
View File
File diff suppressed because it is too large. Load diff
+305 -305
View File
File diff suppressed because it is too large. Load diff
+4 -4
View File
@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Encyclopedia of Technocapital Singularity Zoology — Interactive Knowledge Graph (v2.2.2)</title>
<title>Encyclopedia of Technocapital Singularity Zoology — Interactive Knowledge Graph (v2.4.0)</title>
<style>
:root {
--bg-canvas: #020617;
@@ -268,7 +268,7 @@
<header>
<div class="brand">
<h1>ENCYCLOPEDIA OF TECHNOCAPITAL SINGULARITY ZOOLOGY — INTERACTIVE KNOWLEDGE GRAPH</h1>
<p>Standalone Sibling Repository (/workspace/encyclopedia-knowledge-graph) • 388 Nodes • 1,282 Deduplicated Edges • Zero Glossary Leak &bull; v2.2.2</p>
<p>Standalone Sibling Repository (/workspace/encyclopedia-knowledge-graph) • 388 Nodes • 1,282 Deduplicated Edges • Zero Glossary Leak &bull; v2.4.0</p>
</div>
<div class="toolbar">
<button class="btn active" data-mode="mode2_radar">Mode 2: ETI Radar (S+ -> D Periphery)</button>
@@ -321,10 +321,10 @@
</aside>
</div>
<footer class="hs-global-footer" style="background:#1A1D26;border-top:1px solid #323846;padding:4px 14px;text-align:center;font-size:11px;color:#9BA3B8;z-index:20;">
<span class="hs-lemur-credit">hyperstitionstud.io/graph v2.2.2 &bull; Made with <span class="hs-heart" role="img" aria-label="love" style="color:#FB7185;display:inline-block;padding:0 2px;">&#x2665;</span> by Lemurs.</span>
<span class="hs-lemur-credit">hyperstitionstud.io/graph v2.4.0 &bull; Made with <span class="hs-heart" role="img" aria-label="love" style="color:#FB7185;display:inline-block;padding:0 2px;">&#x2665;</span> by Lemurs.</span>
</footer>
<script src="graph-data.js?v=2.2.2"></script>
<script src="graph-data.js?v=2.4.0"></script>
<script>
(function() {
const DATA = (window.HyperstitionStudio && window.HyperstitionStudio.EncyclopediaGraphData) || window.ENCYCLOPEDIA_GRAPH_DATA;
@@ -51,7 +51,7 @@ except ImportError:
return f"urn:io:hyperstitionstud:{domain}:{entity_type}:{entity_id}"
UPSTREAM_REPO_DEFAULT = WORKSPACE_ROOT / "technocapital-singularity-zoology"
HOST_UPSTREAM_ROOT = "/home/m00t/hermes/workspace/technocapital-singularity-zoology"
PUBLIC_WEB_ORIGIN = "https://hyperstitionstud.io"
FLEX_13_COORDS = {292, 256, 211, 193, 183, 153, 137, 136, 133, 125, 96, 95, 91, 81}
@@ -225,7 +225,7 @@ def build_graph(upstream_repo: Path = UPSTREAM_REPO_DEFAULT) -> dict[str, Any]:
"article_count": vol["article_count"],
"page_count": vol["page_count"],
"pdf_container_path": vol["pdf_path"],
"pdf_host_url": f"file://{HOST_UPSTREAM_ROOT}/encyclopedia/{pdf_rel}",
"pdf_host_url": f"{PUBLIC_WEB_ORIGIN}/encyclopedia/{pdf_rel}",
"vol_index": v_idx,
},
)
@@ -395,7 +395,7 @@ def build_graph(upstream_repo: Path = UPSTREAM_REPO_DEFAULT) -> dict[str, Any]:
"primary_guild": prim_cls,
"sample_equations": matched_eqs,
"volume_pdf_rel": pdf_rel,
"pdf_host_url": f"file://{HOST_UPSTREAM_ROOT}/encyclopedia/{pdf_rel}",
"pdf_host_url": f"{PUBLIC_WEB_ORIGIN}/encyclopedia/{pdf_rel}",
},
)
@@ -468,7 +468,7 @@ def build_graph(upstream_repo: Path = UPSTREAM_REPO_DEFAULT) -> dict[str, Any]:
"ing_aq": i_aq,
"delta": i_aq - e_aq,
"volume_pdf_rel": pdf_rel,
"pdf_host_url": f"file://{HOST_UPSTREAM_ROOT}/encyclopedia/{pdf_rel}",
"pdf_host_url": f"{PUBLIC_WEB_ORIGIN}/encyclopedia/{pdf_rel}",
},
)
if vol_nid:
@@ -705,7 +705,7 @@ def build_graph(upstream_repo: Path = UPSTREAM_REPO_DEFAULT) -> dict[str, Any]:
"$schema": "./schemas/v1/encyclopedia-graph.schema.json",
"$id": URN_SCHEMA_GRAPH,
"namespace_urn": URN_GRAPH_NS,
"version": "2.2.2",
"version": "2.4.0",
"encyclopedia_base_path": "../technocapital-singularity-zoology/encyclopedia",
"upstream_repository": str(upstream_repo),
"isolation_verified": {