Release v2.10.0: Organize active, piecewise, and inactive plans into docs/plans/{active,piecewise,inactive} for offline PDF review

This commit is contained in:
Hermes Agent committed 2026-12-01 08:29:37 +00:00
1 parent b569f49e32
commit b2049beb38
35 files changed
+27 -3

No files matched your search

@@ -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,26 @@
# Plan: Alternative Single-Row Header Layout — Folding Passive Telemetry Counters into `.subtitle` (`v2.0.19`)
- **Document ID:** `PLAN-HEADER-SUBTITLE-TELEMETRY-CONSOLIDATION-ALTERNATIVE` (`v2.0.19`)
- **Roadmap Status:** **LONG-TERM INACTIVE PLAN (Deferred Alternative)** — Preserved in the inactive backlog in case a future layout revision wishes to fold the three passive telemetry counter badges on `site/index.html` into `.subtitle` so the right-hand `.meta-badges` container holds exclusively interactive route buttons. Not active unless explicitly requested by the user.
- **Target File (When Activated):** `/workspace/hyperstitionstudio-core/site/index.html`
---
## 1. Motivation & Horizontal Budget Analysis
In `/workspace/hyperstitionstudio-core/site/index.html`, the `<header>` container has `max-width: 1260px` and `padding: 1.4rem 1.6rem` (`25.6px` per side), providing `1208.8px` of usable inner horizontal width:
- Currently (under implemented `Option 3` of `PLAN-STATIC-DONATE-SUBPAGE`), `.meta-badges` keeps the three passive `.badge` counters (`388 Graph Nodes`, `1,282 Typed Edges`, `24 Quant Tickers`) alongside the interactive route buttons (`Start Learning Track (/learn/)`, `Quant Time-Series (/quant/)`) and the terminal right-justified `( ♥ DONATE )` stadium pill (`.btn-donate-pill`), using `margin-left: auto; justify-content: flex-end;` so the cluster remains right-justified even when wrapping onto a second flex line.
- If a strictly non-wrapping single-row `<header>` at `1260px` desktop width is desired in the future without abbreviating button labels:
1. Move the three static counts (`388 Nodes • 1,282 Edges • 24 Tickers`) inline into the existing `.subtitle` paragraph under `<h1>` (`~710px` total left block width).
2. Reserve `.meta-badges` (`margin-left: auto; display: flex; align-items: center; gap: 0.55rem; flex-shrink: 0`) strictly for interactive navigation routes:
`[ Start Learning Track (/learn/) ] [ Quant Time-Series (/quant/) ] | ( ♥ DONATE )` (`~430px` total right block width).
3. Combined width: `710px + 16px gap + 430px = 1156px <= 1208.8px` (`~52px` of spare horizontal margin on a single unbroken row).
---
## 2. Implementation Specification (When Activated)
1. In `/workspace/hyperstitionstudio-core/site/index.html`, update `.subtitle` to include `388 Graph Nodes &bull; 1,282 Typed Edges &bull; 24 Quant Tickers` and remove the three `<span class="badge">...</span>` elements from `.meta-badges`.
2. Add `flex-wrap: nowrap` on desktop (`@media (min-width: 1180px)`) to `<header>` while retaining `flex-wrap: wrap` and `margin-left: auto; justify-content: flex-end` on `.meta-badges` below `1180px`.
3. Verify `version_sync --check` and `tests/test_core_suite.py` pass with zero regressions.
@@ -0,0 +1,46 @@
# PLAN: Retained & Deferred Candidate Strategies From `PLAN-HOMEPAGE-QUADRANT-EXPLORATORY-FEATURES-AND-BUTTON-GEOMETRY` (`Strategies 1A, 1B, 2A, 2C, 3A, 3C, 4B, 4C, 5A, 5C`)
**Document ID:** `PLAN-HOMEPAGE-QUADRANT-EXPLORATORY-FEATURES-DEFERRED-STRATEGIES`
**Status:** `INACTIVE / DEFERRED FOR FUTURE RE-EVALUATION`
**Target Ecosystem Version:** `Future Release (Post-v2.9.0)`
**Target Repositories:** `hyperstitionstudio-core`, `haiperdohp-jemaytreeah`, `encyclopedia-knowledge-graph`
**Author:** m00t & Hermes Agent
**Date:** 2026-11-30
---
## 1. Purpose (`Rule C.4` Active-vs-Inactive Piecewise Plan Partitioning)
Per `Rule C.4` of `hyperstitionstudio-roadmap-and-release`, this companion inactive document preserves all **retained-for-future** (`Strategies 2A, 2C, 3A, 3C, 4B, 4C, 5A, 5C`) and **deferred** (`1A, 1B`) candidate strategies from the stepwise review of `PLAN-HOMEPAGE-QUADRANT-EXPLORATORY-FEATURES-AND-BUTTON-GEOMETRY`, leaving exclusively the affirmed strategies (`1C-3, 2B, 3B, 4A, 5B`) inside the active plan.
---
## 2. Retained & Deferred Candidate Strategies Across Audit Points `1–5`
### 2.1 Audit Point 1 — Deferred Below-Closeup Button Bar Variations (`Strategies 1A & 1B`)
- **Strategy `1A` (Below-Closeup Adaptive Flush Button Grid) & Strategy `1B` (Below-Closeup Fixed 3-Column Button Grid):**
- Superseded by affirmed **`Strategy 1C-3`** (Single Interactive Chamfered Tab Row ABOVE Closeup with balanced `16px` vertical / `20px` horizontal 4-edge symmetry and `0` below-closeup buttons).
### 2.2 Audit Point 2 — Quadrant 01 Retained Strategies (`Strategies 2A & 2C`)
- **Strategy `2A` (`☉ Personal Grimoire Ledger` Deep-Link in `/learn/index.html#m06RegisterSelect`):**
- Retained for future implementation alongside Quadrant 01's 3rd `/learn/ Grimoire` tab (`Strategy 2A` of `PLAN-PIECEWISE-DECLUTTER-HOMEPAGE-UI-CLOSEUPS-DEFERRED-STRATEGIES`).
- **Strategy `2C` (`☿ Sigil & Mantra Forge` Canvas Modal in `/calc/index.html`):**
- Net-new SVG/Canvas kamea wheel sigil drawer inside `/workspace/haiperdohp-jemaytreeah/index.html` (`?mode=sigil-forge`); retained for future implementation.
### 2.3 Audit Point 3 — Quadrant 02 Retained Strategies (`Strategies 3A & 3C`)
- **Strategy `3A` (`♄ Uncaptured Gem Screener` Filter Pill in `/quant/index.html?screen=uncaptured-gems`):**
- Filters the `24` instruments and `9` assemblage builds to those matching the Fund Manager Proposal's `"Uncaptured Gem"` criterion (`COL >= 75` or `ARM >= 75`, `VEL >= 80`, and low institutional crowding `CAP <= 65`); retained for future implementation.
- **Strategy `3C` (`☍ Zero-Beta Pair Finder` in `/quant/index.html`):**
- Retained for future implementation once the historical bar cache accumulates $\ge 60–252$ trading days (currently constrained at $N = 19$ trading days, $SE \approx 0.25$).
### 2.4 Audit Point 4 — Quadrant 03 Retained Strategies (`Strategies 4B & 4C`)
- **Strategy `4B` (`◈ Phonemic Compression Sandbox` Deep-Link to `/learn/index.html#mod-M02`):**
- Retained for future implementation.
- **Strategy `4C` (`☉ 1-Hop Graph Walk Builder` Toy Widget on `/math/graph-topology-and-eti-scoring/`):**
- Retained for future implementation.
### 2.5 Audit Point 5 — Quadrant 04 Retained Strategies (`Strategies 5A & 5C`)
- **Strategy `5A` (`◈ DAG-JSON CIDv1 & Isolation Verifier` Deep-Link):**
- Retained for future implementation.
- **Strategy `5C` (`⚚ EROFS & tmpfs Mount Simulator UI`):**
- Retained for future implementation.
@@ -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:** `DEFERRED (Long-Term Inactive — Preserved for Future Reference)`
**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`.
@@ -0,0 +1,91 @@
# Plan: Simplifying Needless Lexical & Etymological Complexity Across the `hyperstitionstud.io` Ecosystem (`v2.0.22`)
- **Document ID:** `PLAN-LEXICAL-AND-ETYMOLOGICAL-SIMPLIFICATION` (`v2.0.22`)
- **Roadmap Status:** **DEFERRED (Long-Term Inactive)**
- **Core Editorial Principle:**
**Plain words for simple mechanics; save technical terms for the archive citations.**
The underlying mechanics of `hyperstitionstud.io` are straightforward:
1. Score letters and digits (`0–9 = 0..9`, `A–Z = 10..35`),
2. Strip silent letters so words are spelled the way they sound out loud,
3. Notice when separate words, headlines, and market prices land on the exact same number on the same day.
When UI headers, chart labels, tutorials, and API docs wrap those simple mechanics in heavy academic/Greek/Latin phrasing (*"diachronic/synchronic orthography," "spatiotemporal contingent lock matrix," "teleoplexic escape velocity," "stereoscopic diegetic expressivity," "intergenerational variance collapse"*), the phrasing obscures the signal instead of clarifying it.
- **Target Surfaces:**
1. `/workspace/hyperstitionstudio-core/site/index.html` (Portal Homepage cards & subtitles)
2. `/workspace/hyperstitionstudio-core/site/quant/{index.html,quant-app.js,quant-tutorials.js,OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH.md,pdf}` (`/quant/` panels, `ⓘ` popovers, tutorial narration & manual)
3. `/workspace/hyperstitionstudio-core/site/learn/{index.html,learn-app.js}` (`/learn/` 6-module guided curriculum)
4. `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/lenses/__init__.py` (`LENS_REGISTRY` human-readable labels)
5. `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/mcp/tools.py` (`MCP_TOOLS_SCHEMA` & OpenAPI 3.1.0 descriptions)
---
## 1. Strict Safety Boundary: What Must Remain Untouched (`ReadOnlyIsolationGuard` & Test Invariants)
To ensure simplifying the prose never breaks a single cryptographic hash, schema contract, or automated test in `tests/test_core_suite.py`:
| Protected Layer | Specific Files / Keys | Rule |
| :--- | :--- | :--- |
| **1. SHA-256 Locked Registries** | • `taxonomy/glossary-registry.json` (`7564ef40...`)<br/>• `encyclopedia/encyclopedia-manifest.json` (`0d7ce833...`) | **100% Read-Only.** Never edit bytes inside these two JSON files; translate their headwords into plain English at the UI/presentation layer. |
| **2. Grounded Citation Quotes in Proposals** | • `proposal-fund-manager-*.md`<br/>• `proposal-corporate-board-*.md`<br/>• `proposal-fantasy-football-*.md` | Keep all verbatim `[n]` evidence quotes intact so `verify_draft()` passes `100%`. |
| **3. Machine Keys & `Zero-d-Filter`** | • JSON keys (`struct_*`, `ts_*`, `S1..S6`, `M1..M7+`, `G1..G6`)<br/>• `assert_zero_d_filter()` | Keep all JSON property names, URL routes, and CLI flags unchanged; only simplify human-facing display labels, descriptions, and explanatory prose. |
---
## 2. Master Translation Table: Replacing Heavy Jargon with Direct Plain English
Every human-facing surface will replace needlessly ornate Greek/Latin/critical-theory phrasing with direct, everyday English (retaining short bracketed codes like `[Gen 0]`, `[Gen 1]`, `[G1]`, `[Scope 1]` only as compact cross-reference tags):
| Ornate / Etymologically Heavy Phrasing (Current) | Plain-English Replacement (Target) | Why It Is Clearer |
| :--- | :--- | :--- |
| *"Standard Etymological English (Diachronic Visual-Scribal Orthography)"* | **Written English (`Gen 0` — How It's Spelled on Paper)** | Immediately tells the reader we are scoring standard dictionary spelling, silent letters included. |
| *"Synchronic Phonemic Orthography (CMUdict Ingglish)"* | **Spoken Sound (`Gen 1 Ingglish` — Spelled How It Sounds)** | Explains the exact transformation in 5 plain words without requiring linguistics training. |
| *"Etymological Ghost Mass"* | **Silent Letters & Spelling Camouflage** | Self-explanatory on first read. |
| *"Vector G1: Intergenerational Variance Collapse ($\text{Var} \to 0.0$)"* | **Sound Convergence (`G1` — Different Words Landing on One Number)** | Describes what actually happens: words with different written scores land on the exact same spoken score. |
| *"Vector G4: Hereditary Isometric Chokepoint Invariance ($\Delta = 0$)"* | **Fixed Chokepoints (`G4` — Words Whose Score Never Changes, $\Delta = 0$)** | Directly states the mathematical property ($\text{Written Score} == \text{Spoken Score}$). |
| *"Vector G5: Twin-Prime Mutation IQ"* | **Prime-to-Prime Shifts (`G5` — Prime Written Score $\to$ Prime Spoken Score)** | States the exact arithmetic rule instead of a metaphor. |
| *"Double Articulation ($\text{S1–S5} \times \text{S6}$ Coupling)"* | **Tech + Capital Link (`S1–S5` Tech Paired with `S6` Finance/Legal Capture)** | Makes it obvious that a technical bottleneck is paired with a financial or legal owner. |
| *"Grand Central Station Pareidolia vs. The Room Filter (Contingent Meaning)"* | **No Dictionary Fishing ("Stay in the Room" Rule)** | Immediately communicates why we only test words and prices from the same day's news story or supply chain. |
| *"Scope 1 Intra-Instrument Self-Lock"* | **Self-Match (`Scope 1` — Price or Move Matches the Asset's Own Name)** | Eliminates Latin prefixes (*"intra-instrument"*); anyone understands *"Nvidia closing at `$137` matches `envideea = 137`."* |
| *"Scope 2 Supply-Chain Equivalence-Ring Migration"* | **Sector Hub Match (`Scope 2` — Lands on a Shared `S1–S6` Number)** | Explains that the price or move hit one of the 30 shared sector coordinates. |
| *"Scope 3 News-Wire Co-Presence"* | **In Today's News (`Scope 3` — Ticker Named in Midnight Headlines)** | Plainly states what turned the bar green. |
| *"Spatiotemporal Contingent Lock Heatmap (`24 × 30`)"* | **30-Day Signal Grid (`24 Tickers × 30 Days`)** | Replaces *"Spatiotemporal Contingent"* with what the user is actually looking at: a 30-day grid. |
| *"Cross-Sectional Date Inspector"* | **Single-Day Readout & Breakdown** | Simple, concrete description of Panel 3. |
| *"Teleoplexic Escape Velocity (`VEL`)"* | **Signal Speed (`VEL` — Low Spelling Drift)** | Removes obscure Landian neologisms (*"teleoplexic"*) from default UI labels. |
| *"Two-Gate State-Matched Thermodynamic Memetic Regime (`M1–M3`)"* | **Market Mood / Regime (`M1` Freeze/Halt, `M2` Crash/Surge, `M3` Mega-Cap)** | Connects `M1–M3` directly to observable market conditions (low volume halts, high-volume selloffs, trillion-dollar caps). |
| *"Isopsephic Exegesis / Gematrial Telemetry"* | **Number-Cipher & Phonetic Signal Readout** | Avoids archaic Greek (*"isopsephic"*) in UI copy and tool descriptions. |
---
## 3. Surface-by-Surface Simplification Specification (`Phases 1–5`)
### Phase 1: Portal Homepage (`site/index.html`)
1. Simplify the `<header>` subtitle and the 6 main workbench cards (`01` through `06`) so each card's 2-sentence summary states **what you can do or see inside that tool** in plain English:
- Card 1 (`/graph/`): *"Visual map of 388 terms, companies, and number hubs. Click any node to see which words, sectors, and PDF pages connect to it."*
- Card 2 (`/encyclopedia/`): *"22-volume, 122-page reference library organized A-to-Z across 9 topics, with direct links to every source equation."*
- Card 3 (`Tier List`): *"0-to-100 scorecard ranking 9 tech and finance groups across 6 core stats, from top-tier leaders (`S+`) down to single-event outliers (`D`)."*
- Card 4 (`Proposals`): *"Side-by-side reports written for fund managers, corporate boards, and fantasy-sports fans, backed by word-for-word news citations."*
- Card 5 (`/calc/` & `/archive/`): *"Type any word or phrase into the multi-cipher calculator, or browse 71 dated news dossiers and 1,850+ verified `333 / 666 / 777` equations."*
- Card 6 (`System Flow`): *"See how the 6 open-source repositories build, verify, and publish to the live server."*
### Phase 2: `/quant/` Time-Series Workbench, `ⓘ` Info Icons, Tutorials & Operator's Manual (`site/quant/*`)
1. Combine with `PLAN-QUANT-INTERFACE-INFO-ICONS-AND-GLOSSARY-POPOVERS`:
- Simplify Panel 1–4 headers in `site/quant/index.html` and `site/quant/quant-app.js` using the plain-English table in Section 2 above (e.g., `PANEL 1: 30-Day Price, Spoken Score, News Count & Volume Chart`, `PANEL 2: 30-Day Signal Grid (24 Tickers × 30 UTC Days)`, `PANEL 3: Single-Day Readout, Lens View & News Equations`, `PANEL 4: News-to-Price Lead/Lag Chart (-5 to +5 Days) & Data Export`).
- Add the `27` inline `ⓘ` info icons (`.hs-info-icon`) and `#quantInfoPopover` card so every label has a `<= 1 paragraph` plain-English explanation + hyperlinked verbatim PDF Glossary quote (`/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf#page=N&search=...`).
- Rewrite the 25 scene subtitles in `site/quant/quant-tutorials.js` and `/workspace/hyperstitionstudio-core/site/quant/OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH.{md,pdf}` in clear, conversational English so the voice narrator reads natural, easy-to-follow sentences aloud.
### Phase 3: `/learn/` Self-Paced Curriculum (`site/learn/index.html` & `site/learn/learn-app.js`)
1. Rewrite the 6 module titles and descriptions in `site/learn/index.html` so each module teaches one concept in plain English before introducing the archive's shorthand code:
- `Module 1`: *How the Base-36 Number Cipher Works (`0–9 = 0..9, A–Z = 10..35`)*
- `Module 2`: *Sound Over Spelling: Written English (`Gen 0`) vs. Spoken Ingglish (`Gen 1`)*
- `Module 3`: *When Separate Words Land on the Same Number (`G1` Convergence)*
- `Module 4`: *Tech Sectors (`S1–S5`), Big Capital (`S6`), and Market Moods (`M1–M7+`)*
- `Module 5`: *How the 0–100 Scorecard (`ETI`) and Radar Ring Work*
- `Module 6`: *Viewing the Same Math Through Different Lenses & Saving Bookmarks*
### Phase 4: `LENS_REGISTRY` Labels & MCP/REST OpenAPI Descriptions (`lenses/__init__.py` & `mcp/tools.py`)
1. In `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/lenses/__init__.py`, refine the display labels in `neutral_math` and `fund_manager` so they use crisp, plain English (`Fixed-Score Chokepoints`, `Low Spelling Drift`, `Score Convergence`, `Tech + Capital Coupling`, `Prime Score Rate`, `Repricing Stability`, `Active Signal Days (%)`, `News + Volume Weight`, `Score Above Baseline`, `Quiet Floor / Peak Ceiling`, `Best Lead/Lag (Days)`, `Score by Market Mood`).
2. In `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/mcp/tools.py`, simplify the `description` strings in `MCP_TOOLS_SCHEMA` (which also auto-compile `/api/v1/openapi.json`) so every tool description is direct and jargon-light while preserving all tool names and `inputSchema` parameters.
### Phase 5: Verification (`tests/test_core_suite.py` & `deploy/test-first-deployment.sh`)
1. Run `hs-sync-version`, regenerate `quant-timeseries.{json,data.js}` and `OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH.pdf`, and verify:
- `python3 /workspace/hyperstitionstudio-core/tests/test_core_suite.py` (`ALL 7 TEST SUITES PASSED`, including `ReadOnlyIsolationGuard` SHA-256 checks and proposal citation checks), and
- `/workspace/hyperstitionstudio-core/deploy/test-first-deployment.sh` (`42/42` static routes + `2` MCP endpoints + `6` REST API v1 endpoints returning `HTTP 200 OK`).
@@ -0,0 +1,113 @@
# Architecture & Economic Plan: Optimizing Python LLM Token Spend via Marginal Procedure-Step Variance ($\sigma^2_{\text{step}}$) & Tiered API Routing (`v2.0.0`)
- **Document ID:** `PLAN-LLM-TOKEN-ECONOMIZER-AND-VARIANCE-ROUTING` (`v2.0.17`)
- **Roadmap Status:** **LONG-TERM INACTIVE PLAN (Deferred)** — Preserved as a long-term architectural specification alongside `PLAN-LLM-TOKEN-ECONOMIZER-DATA-FIDELITY-AND-DEGRADATION-RISK-EVALUATION.{md,pdf}`; not scheduled for immediate active build.
- **Target Module in `hyperstitionstudio-core` (When Activated):** `hyperstitionstud_io.economizer` (`hs-route-job` CLI & Python router API)
- **Core Optimization Principle:** Never spend LLM tokens on steps with zero marginal procedure-step variance ($\sigma^2_{\text{step}} = 0$), and route non-zero-variance steps (`Tier 1` Economy Flash -> `Tier 2` Mid-Tier Workhorse -> `Tier 3` Frontier Reasoning) using a deterministic 5-factor composite complexity score ($J_{\text{score}} \in [0, 100]$) paired with Python oracle verification gates.
---
## 1. Defining Marginal Procedure-Step Variance ($\sigma^2_{\text{step}}$) Across Pipeline Workflows
Every workflow in the `hyperstitionstud.io` workspace decomposes into a directed sequence of procedure steps $J = (s_1, s_2, \dots, s_m)$. At each step $s_k$, the **marginal procedure-step variance** $\sigma^2_{\text{step}}(s_k \mid s_{k-1}, \text{Spec})$ measures the dispersion of valid outputs given the prior step's output and the formal specification:
$$\sigma^2_{\text{step}}(s_k) \propto H\!\left(Y_k \;\middle|\; Y_{k-1},\; \text{Constraints}(s_k)\right)$$
| Variance Regime | $\sigma^2_{\text{step}}$ Range | Mathematical Characterization | Qualified Compute / API Tier | Representative Cost per 1M Input / Output Tokens |
| :--- | :--- | :--- | :--- | :--- |
| **Regime 0: Deterministic / Algorithmic** | $\sigma^2_{\text{step}} = 0.00$ | Output $Y_k = f(Y_{k-1})$ is uniquely determined by arithmetic, phonetic lookup, regex, graph topology, or schema rules. | **Tier 0: Local Python Only (`hyperstitionstud_io.*`) — Zero LLM Calls** | **`$0.00 / $0.00`** (`0` tokens consumed) |
| **Regime 1: Constrained Selection & Tagging** | $0.00 < \sigma^2_{\text{step}} \le 0.15$ | Python pre-computes a small finite candidate set ($N \le 10$ valid equations or enum tags); step $s_k$ only selects the most natural candidate index or confirms a state gate. | **Tier 1: Economy / Flash-Lite Model** (e.g., `gemini-2.5-flash-lite`, `gpt-4o-mini`, `claude-3-5-haiku`, or local quantized `14B`) | **`~$0.07 / $0.30`** (`85–95%` savings vs. mid-tier; `98%` vs. frontier) |
| **Regime 2: Template-Bound Expository Synthesis** | $0.15 < \sigma^2_{\text{step}} \le 0.50$ | All numerical locks, `G1–G6` vectors, and `[n]` citation quotes are pre-locked in a compact JSON brief; step $s_k$ drafts register-specific prose around those fixed anchors. | **Tier 2: Mid-Tier Structured Workhorse** (e.g., `gemini-2.5-flash`, `claude-3-7-sonnet` non-thinking, `gpt-4o`) + **Prompt Caching** | **`~$0.30 / $1.50`** (with `75–90%` cache discount on static system prefix) |
| **Regime 3: High-Variance Architectural & Theoretical Design** | $\sigma^2_{\text{step}} > 0.50$ | Open-ended multi-constraint system architecture, novel Landian-Deleuzean theoretical synthesis, or root-cause debugging across unindexed failure modes. | **Tier 3: Frontier Reasoning Model** (e.g., `gemini-4-argon` / `claude-opus` / `o3`) — restricted strictly to the design/synthesis step | **`$2.50–$15.00 / $10.00–$75.00`** (invoked only when $J_{\text{score}} > 65$) |
---
## 2. Five-Factor Qualification Model for API Tier Selection ($J_{\text{score}} \in [0, 100]$)
Marginal procedure-step variance ($\sigma^2_{\text{step}}$) is the primary driver, but four additional structural factors determine whether a low-cost API can safely execute a step without quality degradation or retry loops. `hyperstitionstud_io.economizer` evaluates a deterministic 5-factor score:
$$J_{\text{score}} = \text{round}\!\left(0.35 \cdot V_{\text{step}} + 0.25 \cdot D_{\text{verif}} + 0.15 \cdot C_{\text{ctx}} + 0.15 \cdot S_{\text{struct}} + 0.10 \cdot R_{\text{blast}}\right)$$
*(With the hard override: if $V_{\text{step}} == 0$, then $J_{\text{score}} = 0 \implies \textbf{Tier 0 Local Python}$).*
### The Five Qualification Factors
1. **`V_step` (`0–100`, Weight `0.35`) — Marginal Procedure-Step Variance:**
- `0`: Pure calculation, lookup, formatting, graph build, PDF/PNG compilation, or schema validation.
- `15–25`: Selecting the best 3 pre-verified equations from a Python-generated candidate list of 12, or classifying a headline into `S1–S6` / `M1–M6`.
- `45–60`: Writing a 3-paragraph dossier exegesis, barstool glossary entry, or 5-voice podcast dialogue turn from a structured JSON outline.
- `80–100`: Designing a new cross-repository architecture or formulating a novel philosophical thesis across unseen texts.
2. **`D_verif` (`0–100`, Weight `0.25`) — Absence of a Deterministic Python Verification Oracle ("Oracle Discount"):**
- **Crucial Economic Insight:** When Python has a fast, deterministic pass/fail oracle—such as `ci_provision_ingglish.py` (4-Gate CI check), `sources.py verify --evidence` (citation & verbatim quote check), or `build_encyclopedia_knowledge_graph.py --verify-only` (6-Gate graph check)—a **cheap Tier 1 or Tier 2 model can be tried first (`D_verif = 10`)**, because Python catches any formatting or citation error in `5 ms` for `$0.00`!
- Conversely, when no deterministic verifier exists for the output's semantic correctness (`D_verif = 85`), a higher-tier model is justified on the first pass to avoid undetected subtle errors.
3. **`C_ctx` (`0–100`, Weight `0.15`) — Effective Input Context Complexity & Cross-Hop Reasoning:**
- `10`: Single-item or pre-filtered 1-hop ego-network JSON payload (`< 1,500` tokens).
- `50`: Multi-story daily wire harvest synthesis (`3,000–8,000` tokens).
- `90`: Cross-repository architectural audit requiring multi-hop reasoning across 5+ modules.
4. **`S_struct` (`0–100`, Weight `0.15`) — Output Structural Freedom:**
- `10`: Constrained JSON Schema output (`enum`, boolean flags, integer array of selected equation IDs).
- `50`: Markdown table or section following a fixed dossier/proposal template.
- `90`: Free-form multi-file code refactor or philosophical essay.
5. **`R_blast` (`0–100`, Weight `0.10`) — Error Blast Radius & Reversibility:**
- `0`: Sidecar execution protected by `ReadOnlyIsolationGuard` and `.tmp -> os.replace()` atomic rollback.
- `80`: Modifying shared library APIs or public deployment configurations.
---
## 3. Concrete Audit of All Workspace Jobs Under the Economizer Rubric
Applying the 5-factor rubric across our actual workspace pipelines shows how **splitting monolithic LLM tasks into `Tier 0` Python pre/post-stages + minimal `Tier 1/2` LLM micro-steps cuts total LLM token expenditure by `88%–96%`**:
| Workspace Job / Pipeline Step | `V_step` | `D_verif` | `C_ctx` | `S_struct` | `R_blast` | $J_{\text{score}}$ | Assigned Tier & Token-Saving Mechanism |
| :--- | :-: | :-: | :-: | :-: | :-: | :-: | :--- |
| **1. Base-36 `AQ`, `Ingglish` G2P, Prime Ranks & `G1–G6` Locks** | `0` | `0` | `0` | `0` | `0` | **`0`** | **`Tier 0` (100% Python `hyperstitionstud_io`):** Never ask an LLM to compute `AQ` sums or translate Ingglish in-prompt (`$0.00`). |
| **2. Candidate `333 / 666 / 777` Equation Search & Gate 1–4 CI Filtering** | `0` | `0` | `0` | `0` | `0` | **`0`** | **`Tier 0` (100% Python Combinatorial Solver):** Python pre-solves exact `333/666/777` sums from headline/guild pools and filters for `dict_hits >= 0.40 * nw` before any LLM call (`$0.00`). |
| **3. Knowledge Graph Build (`388` Nodes, `1,282` Edges), Atlas PNGs & PDF Compilation** | `0` | `0` | `0` | `0` | `0` | **`0`** | **`Tier 0` (100% Python `build_encyclopedia_knowledge_graph.py` & `hs-pdf-build`):** Zero LLM tokens used for layout, XML/Canvas export, or ReportLab PDF generation (`$0.00`). |
| **4. Selecting Top 3 Natural Equations from Pre-Solved Python Candidates & Tagging `M1–M6` State** | `20` | `10` | `15` | `10` | `10` | **`14`** | **`Tier 1` (Economy Flash-Lite API):** Python sends only 10 pre-verified equations (`~400` input tokens); model returns JSON `{selected_ids: [0, 3, 7], state_gate: "M1"}` (`~40` output tokens). |
| **5. Daily `00:00 GMT` News Wire & `21:30 GMT` Quant Dossier Prose Synthesis** | `45` | `15` | `40` | `45` | `15` | **`34`** | **`Tier 2` (Mid-Tier Workhorse + Prompt Caching + Batch API):** Python supplies pre-verified locks; model writes Markdown prose; Python immediately verifies via `ci_provision_ingglish.py`. |
| **6. Stakeholder Proposal Translation (`Fund Manager` / `Board` / `Fantasy` Registers)** | `40` | `10` | `35` | `45` | `15` | **`30`** | **`Tier 1 -> Tier 2` Cascade with `sources.py verify --evidence` Oracle:** Try Tier 1/2 with cached style guide; Python `verify_draft()` validates 100% of `[n]` citations and verbatim quotes. |
| **7. Multi-Voice Podcast Script Act Generation (`< 90 min` `edge-tts` pipeline)** | `50` | `20` | `45` | `50` | `10` | **`38`** | **`Tier 2` (Mid-Tier Workhorse):** Python extracts exact Division/Volume article JSON cards (`~1,200` tokens per act); Tier 2 writes dialogue; `Tier 0` `edge-tts` + `ffmpeg` + `mutagen` synthesizes audio (`$0.00` LLM audio cost). |
| **8. Novel Cross-Repo Architecture & New `M7+` Philosophical Operator Discovery** | `85` | `70` | `80` | `80` | `60` | **`77`** | **`Tier 3` (Frontier Reasoning API):** Reserved strictly for high-variance architectural planning and novel theoretical discovery. |
---
## 4. Six Concrete Token-Economizing Techniques Built Into `hyperstitionstud_io.economizer`
### 4.1 Technique 1: Python Pre-Computation of All Combinatorial Search Spaces (`Zero-Math-in-Prompt`)
LLMs are notoriously expensive and error-prone when asked to search for phrases whose character values sum to `333`, `666`, or `777` (burning thousands of reasoning tokens on trial-and-error arithmetic).
- **Rule:** Python (`hyperstitionstud_io.ciphers`) **always** executes the combinatorial sum search locally in `< 20 ms` (`$0.00`), filters out candidates that would fail Gate 2 (`dict_hits < 0.40 * nw`), and passes only a numbered list of already-valid equations (`[0]..[9]`) to the LLM. The LLM's output token budget drops from `~4,000` reasoning tokens to a `25`-token JSON array `{"picked": [1, 4, 8]}`.
### 4.2 Technique 2: 1-Hop Sub-Graph & `CIDv1` Delta Slicing (`98%` Input Token Reduction)
Never feed full workspace registries (`glossary-registry.json` = `~28,000` tokens; `encyclopedia-graph.json` = `~65,000` tokens) into an LLM context window.
- **Rule:** Use `hs_query_knowledge_graph(query)` or `hyperstitionstud_io.ipld` `CIDv1` diffing to extract **only** the modified entries or the 1-hop ego-network (`~350–600` tokens) relevant to the current task.
### 4.3 Technique 3: "Cascade with Oracle" (Try `Tier 1` First Whenever `D_verif <= 20`)
Because `hyperstitionstud_io` includes three deterministic verification oracles:
1. `ci_provision_ingglish.py` (verifies equation formatting, `normalize_caps`, `classify_candidates`, and `AQ` math),
2. `sources.py verify --evidence` (verifies `[n]` citation IDs, URLs, and verbatim quotes), and
3. `build_encyclopedia_knowledge_graph.py --verify-only` (verifies 6 graph & SHA-256 isolation gates),
`hyperstitionstud_io.economizer.run_with_oracle_cascade()` can dispatch structured drafting tasks to **Tier 1 (`~$0.10/1M`)** first, run the Python oracle (`$0.00`, `5 ms`), and escalate to **Tier 2 or Tier 3** *only* on the rare subset of items where the oracle returns a non-zero exit code.
### 4.4 Technique 4: Immutable Prompt-Prefix Ordering for `75%–90%` Prompt Cache Discounts
Modern LLM APIs (OpenRouter, Anthropic, Google Gemini, OpenAI) apply automatic or explicit prompt-cache discounts (`75%–90%` off input token pricing) when the leading prefix of a prompt (`>= 1,024` tokens) is byte-for-byte identical across calls.
- **Rule in `hyperstitionstud_io.economizer.build_cached_messages()`:**
1. **Message 0 (Immutable System Prefix):** Static cipher rules, `S1–S6` / `M1–M6` coordinate table, and output JSON Schema (byte-identical across all calls -> **cached after Call #1**).
2. **Message 1 (Variable Task Tail):** Only the current headline or delta-sliced JSON payload (`< 500` tokens).
### 4.5 Technique 5: Compact Index-Reference Output Schemas (Eliminating Echoed Input Tokens)
Output tokens cost **`3x to 5x` more per token** than input tokens across almost every commercial LLM API.
- **Rule:** Never ask an LLM to re-emit full equation strings, long URLs, or verbatim quotes that Python already holds in memory. Have the LLM emit **integer indices** (`{"selected_eq_indices": [2, 5], "citation_ids": [3, 8]}`), and let Python's `render_sources()` and dossier formatter expand those indices into the final Markdown and PDF documents for `$0.00`.
### 4.6 Technique 6: Asynchronous Provider Batch APIs (`50%` Discount) for Scheduled Cron Harvests
The `21:30 GMT` US market closing-bell harvest and the `00:00 GMT` daily wire news harvest are non-interactive background jobs (`cronjob_manage`). Routing their Tier 1/2 narrative synthesis calls through provider Batch APIs (or OpenRouter economy routing with `max_price` caps) halves per-token cost again.
---
## 5. Planned Implementation in `/workspace/hyperstitionstudio-core` (`Phases 1–2`)
### Phase 1: Implement `src/hyperstitionstud_io/economizer/__init__.py` & `hs-route-job` CLI
1. Implement `JobProfile`, `score_job_complexity()`, `select_api_tier()`, `build_cached_messages()`, and `estimate_token_cost()` in `src/hyperstitionstud_io/economizer/__init__.py`.
2. Register `hs-route-job` in `pyproject.toml` so scripts, cron pipelines, and MCP clients can query the exact `Tier 0..3` assignment, recommended model slug, and estimated USD cost before making any API call.
### Phase 2: Add Pre-Solved Candidate Menus to `collect_news_aq.py` & `collect_financial_quant_aq.py`
1. Ensure both periodic collectors pre-solve and pre-filter candidate `333 / 666 / 777` equations in `Tier 0` Python so downstream LLM synthesis operates strictly on pre-verified index menus (`Regime 1 / Regime 2`).
@@ -0,0 +1,96 @@
# Data Degradation & Fidelity Impact Risk Evaluation for `PLAN-LLM-TOKEN-ECONOMIZER-AND-VARIANCE-ROUTING` (`v2.0.14`)
- **Document ID:** `PLAN-LLM-TOKEN-ECONOMIZER-DATA-FIDELITY-AND-DEGRADATION-RISK-EVALUATION` (`v2.0.17`)
- **Roadmap Status:** **LONG-TERM INACTIVE PLAN (Deferred)** — Companion fidelity risk evaluation for `PLAN-LLM-TOKEN-ECONOMIZER-AND-VARIANCE-ROUTING.{md,pdf}`; preserved in the long-term inactive backlog until the Token Economizer is activated.
- **Companion Plan Evaluated:** `PLAN-LLM-TOKEN-ECONOMIZER-AND-VARIANCE-ROUTING` (`hyperstitionstud_io.economizer` / `hs-route-job`)
- **Evaluation Scope:** Quantifying and mitigating every pathway where routing tasks across `Tier 0` (Local Python), `Tier 1` (Economy Flash-Lite), `Tier 2` (Mid-Tier Workhorse + Prompt Caching), and `Tier 3` (Frontier Reasoning) could degrade arithmetic exactness, CMUdict phonemic purity, citation ground-truth, graph topology, or philosophical-rhetorical depth.
---
## 1. Executive Summary: Separating Zero-Degradation (`Tier 0`) Invariants from Stochastic (`Tier 1–3`) Fidelity Risks
The central finding of this evaluation is that **shifting algorithmic steps from LLMs (`Tier 1–3`) to `Tier 0` Local Python (`hyperstitionstud_io.*`) does not degrade data fidelity—it strictly increases fidelity from `~72%–91%` (stochastic LLM token prediction) to `100.0%` (deterministic machine precision)**.
However, **six genuine data degradation and fidelity risks (`R1` through `R6`)** emerge at the handoff boundaries where `Tier 0` Python compresses context, pre-filters candidate pools, or delegates prose/selection tasks down to `Tier 1` and `Tier 2` models:
| Risk ID & Boundary | Degradation Mechanism if Unmitigated | Severity (Raw) | Deterministic Guardrail & Residual Risk |
| :--- | :--- | :---: | :--- |
| **`R1` — Candidate-Pool Truncation Bias (`Tier 0 -> Tier 1/2`)** | Pre-solving and slicing candidate `333/666/777` equations to a small top-$K$ menu (`K = 10`) can prune semantically brilliant equations in favor of high-frequency dictionary words. | **HIGH** | **Stratified Diversity Sampling ($K = 24$ across 4 syntactic templates + guild anchor pinning) -> `0.0%` arithmetic loss, `< 2%` stylistic narrowing.** |
| **`R2` — 1-Hop Ego-Graph Horizon Blindness (`Tier 0 -> Tier 2`)** | Passing only a 1-hop ego-network (`~400` tokens) instead of the full `388`-node graph blinds the model to 2-hop and 3-hop Flex-Pivot bridges (`13` multi-guild hubs). | **HIGH** | **1.5-Hop + Flex-Pivot Bridge Injection (`include_flex_pivots=True`, `~650` tokens) -> `100%` retention of cross-guild trophic paths.** |
| **`R3` — `Tier 1` Semantic Flattening & False-Positive Oracle Pass (`Tier 1 -> Oracle`)** | A `Tier 1` Flash-Lite model can satisfy `ci_provision_ingglish.py` (`Gate 1–4`) and `sources.py verify --evidence` syntactically while producing repetitive "template-ese" prose or misclassifying subtle `M1–M6` irony. | **MEDIUM-HIGH** | **Lexical Entropy & Jargon-Register Floor inside the Oracle (`H_lex >= 4.2 bits`, register forbidden-term check) before accepting a `Tier 1` draft.** |
| **`R4` — Index-Reference Off-by-One / Hallucinated Pointer Drift (`Tier 1/2 -> Tier 0`)** | When the LLM returns compact integer indices (`{"selected_eq_indices": [2, 5], "citation_ids": [3]}`) instead of strings, a `0`-based vs. `1`-based slip silently splices the wrong equation or citation into the final PDF. | **MEDIUM** | **Content-Addressed Short-Hash Keys (`"eq_137_a9f"`, `"cite_03_nvda"`) instead of bare integers -> `100%` immunity to off-by-one pointer drift.** |
| **`R5` — Stale Prompt-Cache Prefix Desynchronization (`Tier 2` Cache)** | Caching the static system prefix across calls can serve stale `S1–S6` / `M7+` coordinates if `glossary-registry.json` or `quantitative-economic-anchors.json` updates mid-window. | **LOW-MEDIUM** | **Keying the prompt-cache salt directly to the IPLD `dag-json` `CIDv1` (`baguqeera...`) of the active registries -> automatic cache invalidation on any byte change.** |
| **`R6` — Batch API Temporal Staleness on Live Wire Rollovers (`Cron -> Batch`)** | Provider Batch APIs (`50%` discount) allow up to a 24-hour completion window, which breaks the 10-minute `00:00 GMT -> 00:10 GMT` CI cron chain (`d28b479ec217 -> 7effa9679803`). | **MEDIUM** | **Restrict Asynchronous Batch APIs strictly to offline corpus backfills and multi-episode podcast scripts; keep live `16:30 EST` & `00:00 GMT` cronjobs on synchronous cached endpoints.** |
---
## 2. Layer-by-Layer Fidelity Impact Matrix (`Baseline Monolithic LLM` vs. `Economizer Tier 0–3`)
| Data / Artifact Layer | Monolithic LLM Prompting Fidelity | Economizer (`Tier 0–3`) Fidelity | Net Fidelity Delta & Mathematical Reason |
| :--- | :---: | :---: | :--- |
| **1. Base-36 `AQ` Sums & Prime Factorizations** | `~74%–88%` (frequent carry/sum hallucinations on 8-word strings) | **`100.0%` (`Tier 0`)** | **`+12% to +26%` Fidelity Gain:** `compute_aq()` and `prime_rank()` execute in pure Python (`0` LLM tokens, `0` arithmetic variance). |
| **2. `Gen 0 -> Gen 1` CMUdict `Ingglish` Orthography** | `~65%–82%` (LLMs guess phonetic spellings like `*nvidya` instead of `envideea`) | **`100.0%` (`Tier 0`)** | **`+18% to +35%` Fidelity Gain:** `translate_batch()` uses the locked `4,943`-key `cmudict_fallback.json` + official CMUdict `ingglish` package. |
| **3. `hyperdope-gematria` 4-Gate CI Keep Rate (`Gate 1–4`)** | `~81%` (drops on `long-scraped` `dict_hits < 0.40 * nw` or Roman numerals) | **`100.0%` (`Tier 0`)** | **`+19%` Fidelity Gain:** Candidate equations are pre-filtered by `classify_candidates` in Python before the LLM ever sees them. |
| **4. Grounded `[n]` Citations & Verbatim Quotes (`hs-citations`)** | `~85%` (paraphrased quotes or dead `#fragment` URLs) | **`100.0%` (`Tier 0` + Oracle)** | **`+15%` Fidelity Gain:** Python holds verbatim quotes in memory and expands `cite_<id>_<hash>` keys directly via `render_sources()`. |
| **5. `S1–S6` & `M1–M6` State-Gate Classification** | `~94%` (`Tier 3`) vs. `~86%` (unassisted `Tier 1`) | **`98.5%` (`Tier 0` Pre-Scorer + `Tier 1/2` Cascade)** | **`+4.5%` Net Gain:** Objective quantitative thresholds (`VIX`, bps, volume ratio, ring collisions) are pre-evaluated in `Tier 0` before `Tier 1` confirms context. |
| **6. Expository Prose & Philosophical Synthesis (`Dossiers / Podcasts`)** | `96%` (`Tier 3`) vs. `78%` (`Tier 1`) | **`95%–97%` (`Tier 2/3` with `H_lex` Gate)** | **Zero Degradation (`0%` loss):** Never route `V_step >= 45` prose synthesis to `Tier 1`; enforce minimum `Tier 2` workhorse (`J_score >= 30`) and `Tier 3` (`J_score > 65`) for novel theory. |
---
## 3. Deep-Dive Analysis of the Six Fidelity Risks & Mandatory Architectural Fixes
### 3.1 Risk `R1`: Combinatorial Candidate-Pool Truncation Bias (`Pre-Solved Menu Narrowing`)
- **The Vulnerability:** In `PLAN-LLM-TOKEN-ECONOMIZER-AND-VARIANCE-ROUTING` Section 4.1, Python solves `333 / 666 / 777` equations locally and passes a 10-item menu (`[0]..[9]`) to `Tier 1`. If Python sorts candidates purely by dictionary-hit ratio or alphabetical order, the top 10 items will be dominated by repetitive short words (`in`, `on`, `at`, `tab`, `lap`), starving the dossier of high-impact domain vocabulary (`lathografee`, `kansorsheeam`, `slawterbots`, `shizohnalizis`).
- **Mandatory Mitigation in `precompute_candidate_equations_menu()`:**
1. **Stratified Template Quota ($K = 24$ instead of $10$):** Emit `8` candidates per target (`333`, `666`, `777`) stratified across distinct grammatical templates (`[anchor] [verb] [noun]`, `[noun] [prep] [anchor]`, `[anchor] [verb] dha [adj] [noun] [prep] [noun2]`).
2. **Maximum Lexical Reuse Cap (`max_word_reuse = 2`):** No non-article word (`verb`, `adj`, `noun`) may appear more than twice inside the 24-item candidate menu.
3. **Domain Specificity Ranking:** Rank valid Gate-2-passing candidates by `S1–S6` guild signature weight (`G1` variance collapsed + `G4` isometric chokepoint count) rather than generic word frequency.
### 3.2 Risk `R2`: 1-Hop Sub-Graph Slicing & Multi-Hop Trophic Blindness
- **The Vulnerability:** Section 4.2 proposes slicing `encyclopedia-graph.json` (`388` nodes, `1,282` edges) down to a 1-hop ego-network (`~350` tokens). However, double-articulated singularities (`S[1–5] x S6`) and the `13` Flex-Pivot coordinates (`292, 256, 211, 193, 183, 153, 137, 136, 133, 125, 96, 95, 81/91`) connect across **2 hops** (`Entity -> Coordinate Node -> Partner Guild Build -> Cross-Guild Entity`). A strict 1-hop slice severs the second hop, causing the LLM to miss cross-guild trophic bridges.
- **Mandatory Mitigation in `slice_context_subgraph()`:**
1. Always extract the **1-hop neighborhood PLUS all incident `TROPHIC_GUILD_BRIDGE` and `FLEX_PIVOT` edges at hop 2** (`1.5-hop trophic closure`).
2. This increases payload size by only `~220` tokens (`~350 -> ~570` tokens, still a `99.1%` reduction vs. `65,000` tokens) while preserving `100.0%` of cross-guild double-articulation paths.
### 3.3 Risk `R3`: "Oracle Gaming" — Syntactic Pass with Semantic/Stylistic Degradation in `Tier 1` Cascades
- **The Vulnerability:** Section 4.3 ("Cascade with Oracle") assigns `D_verif = 10` whenever a deterministic Python verifier (`ci_provision_ingglish.py` or `sources.py verify --evidence`) exists, allowing `Tier 1` (`~$0.07/1M`) to attempt drafting first. While the Python oracle catches `100%` of math, spelling, and citation-link errors, it is blind to **semantic flatness** (e.g., `Tier 1` writing robotic, repetitive sentences or leaking prohibited Continental philosophy jargon into a Corporate Board / Fantasy Football stakeholder proposal).
- **Mandatory Mitigation in `run_with_oracle_cascade()`:**
1. **Hard Floor on Prose Synthesis (`V_step >= 40 => Minimum Tier 2`):** Restrict `Tier 1` strictly to structured selection, tagging, and metadata extraction (`S_struct <= 25`). Never allow `Tier 1` to draft final dossier or podcast prose.
2. **Semantic & Register Quality Gate (`verify_prose_fidelity()`):** Augment the Python oracle with three deterministic text-fidelity checks before accepting any `Tier 2` draft:
- *Register Forbidden-Vocabulary Audit:* Rejects stakeholder proposals (`proposal-*.md`) if any prohibited arcane term (*Landian-Deleuzean, Machinic Phylum, Schizoanalysis, Body without Organs, Isopsephic*) appears in the text.
- *Filler-Token Ban (`0.0%` Padding Invariant):* Rejects any dossier containing banned padding tokens (`seekrat`, `hidan`).
- *Shannon Lexical Diversity Floor:* Rejects prose blocks where type-token ratio (`TTR`) or trigram uniqueness drops below the archive baseline (`unique_trigrams / total_trigrams >= 0.88`).
### 3.4 Risk `R4`: Index-Pointer Hallucination & Off-by-One Splicing Corruption
- **The Vulnerability:** Section 4.5 replaces string output with integer index arrays (`{"selected_eq_indices": [2, 5], "citation_ids": [3, 8]}`). Smaller models frequently confuse `0`-based array indices with `1`-based human numbering (or transpose two adjacent digits), which would cause Python to splice Equation `#3` where Equation `#2` belonged—corrupting the surrounding prose explanation without raising a JSON schema error.
- **Mandatory Mitigation (`Content-Addressed Composite Keys`):**
1. Replace bare integer indices with **short deterministic composite IDs** that embed the target coordinate and headword prefix: e.g., `"eq_333_envideea_01"` or `"cite_03_nvda_137"`.
2. These keys cost only `3–4` tokens each (still saving `92%` of output tokens compared to echoing full 25-word equations and URLs), but make accidental off-by-one transposition impossible because Python validates that `"eq_333_envideea_01"` matches both the target sum (`333`) and the paragraph's subject entity (`envideea`).
### 3.5 Risk `R5`: Prompt-Cache Prefix Staleness Across Registry Updates
- **The Vulnerability:** Section 4.4 caches `Message 0` (the static system prefix containing `S1–S6` / `M1–M6` coordinates and rules). If an anchor revision (`--revise-anchor`) or emergent `M7+` promotion occurs, a cached prefix without version salting could serve outdated coordinate rings for the remainder of the cache TTL.
- **Mandatory Mitigation (`CIDv1` Cache-Salt Header):**
1. Prepend the IPLD `dag-json` `CIDv1` digest (`baguqeera...`) of `glossary-registry.json`, `quantitative-economic-anchors.json`, and `financial-aq-harvest-latest.json` into the first line of `Message 0`.
2. When registries are unchanged (`99%` of intra-day calls), the prefix is 100% byte-identical and hits the `75%–90%` prompt cache discount; the instant any registry changes, the `CIDv1` changes and cleanly invalidates the stale cache.
### 3.6 Risk `R6`: Asynchronous Batch API Latency vs. Chained Cron Deadlines
- **The Vulnerability:** Section 4.6 suggests using Asynchronous Provider Batch APIs (`50%` discount) for scheduled cron harvests. However, the daily `00:00 GMT` news harvest (`d28b479ec217`) chains directly into the `00:10 GMT` CI provisioning job (`7effa9679803`, `context_from=["d28b479ec217"]`) 10 minutes later, and each Hermes cron run enforces a 3-minute foreground timeout.
- **Mandatory Mitigation (`Cron Execution Mode Guard`):**
1. Set `allow_async_batch = False` for all live time-critical cronjobs (`29c871eb6b78` at `16:30 EST`, `d28b479ec217` at `19:00 EST`, and `7effa9679803` at `19:10 EST`), using synchronous `Tier 0` + cached `Tier 2` calls instead.
2. Reserve `allow_async_batch = True` exclusively for non-blocking offline bulk jobs (such as multi-episode podcast script generation or historical archive backfills).
---
## 4. Updated Implementation Checklist for `hyperstitionstud_io.economizer` (`v2.0.14`)
1. **Core Scorer & Tier Router (`src/hyperstitionstud_io/economizer/__init__.py`):**
- Enforce $V_{\text{step}} == 0 \implies J_{\text{score}} = 0$ (`Tier 0` Local Python).
- Enforce $V_{\text{step}} \ge 40 \implies \text{Tier} \ge 2$ (preventing `Tier 1` semantic flattening on prose tasks).
2. **Stratified Candidate Menu Builder (`precompute_candidate_equations_menu`):**
- Emit $K = 24$ Gate-2-verified equations keyed by content-addressed IDs (`eq_<target>_<anchor>_<nn>`) with `max_word_reuse = 2`.
3. **1.5-Hop Trophic Sub-Graph Slicer (`slice_context_subgraph`):**
- Include 1-hop neighbors plus all hop-2 `TROPHIC_GUILD_BRIDGE` and `13` Flex-Pivot nodes.
4. **Prose & Citation Fidelity Oracle (`verify_prose_fidelity`):**
- Combine `ci_provision_ingglish.py` (4-Gate math/CI check) + `hs-citations verify --evidence` + register forbidden-term check + `0.0%` `seekrat`/`hidan` padding check + trigram diversity floor (`>= 0.88`).
5. **`CIDv1`-Salted Prompt Cache Builder (`build_cached_messages`):**
- Embed the live `dag-json` `CIDv1` registry digest in `Message 0` to guarantee zero stale-cache drift.
@@ -0,0 +1,121 @@
# 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.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.
2. **Chatbot REST API Exclusivity (`0` New Bespoke REST Routes in `rest.py`):**
Exposes the server-side question-answering engine by registering **`hs_ask_chatbot`** in `MCP_TOOLS_SCHEMA` (`src/hyperstitionstud_io/mcp/tools.py`). The existing generic tool dispatcher in `src/hyperstitionstud_io/mcp/rest.py` automatically serves it at **`GET/POST /api/v1/tools/hs_ask_chatbot`** (and via MCP JSON-RPC `tools/call` on `/mcp`) with **`0` new custom route patterns** in `rest.py`.
3. **Strict Zero-Synthetic-Data & `ProtectSystem=strict` (`EROFS`) Compliance:**
Every answer is synthesized deterministically from verified server-side registries (`glossary-registry.json`, `encyclopedia-graph.json`, `quant-timeseries.json`, `real-macro-indicators.json`, `daily-brief-latest.json`, `hyperstition-meta.db` FTS5, and `72` archive dossiers). Missing/private/holiday fields report `"No data available"` (`null`), and `hs_ask_chatbot` is automatically swept under simulated `ProtectSystem=strict` (`EROFS`) by `src/hyperstitionstud_io/ci/erofs_harness.py`.
4. **Two-Script Deployment Invariant Preserved:**
All assets, symlinks (`/chat`), and tests are wired into `/workspace/push-all-to-git-libre-audio.sh` and `/workspace/hyperstitionstudio-core/deploy/sync-vps-repos.sh` so deployment requires no additional manual operator steps.
- **Target Modules & Web Surfaces:**
- `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/mcp/chatbot.py` (`answer_chatbot_query()` 8-intent router + SQLite FTS5 BM25 retriever + multi-tool orchestrator)
- `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/mcp/tools.py` (Registers `hs_ask_chatbot` in `MCP_TOOLS_SCHEMA`)
- `/workspace/hyperstitionstudio-core/site/assets/hs-chatbot-widget.js` (Lightweight `< 16 KB` dockable Group 3 Stealth Basalt chatbot drawer injected across `/`, `/quant/`, `/learn/`, `/engineering/*`, and `/math/*`)
- `/workspace/hyperstitionstudio-core/site/chat/index.html` (Full-screen split-pane `/chat/` Corpus & Telemetry Query Workbench with live JSON/CIDv1 & Stats-Card inspector)
- `/workspace/hyperstitionstudio-core/site/assets/hs-group3-basalt-chamfer.css` (Group 3 Stealth Basalt styling for `#hsChatbotToggleBtn`, `#hsChatbotDrawer`, and `/chat/`)
- `/workspace/hyperstitionstudio-core/deploy/{sync-vps-repos.sh,test-first-deployment.sh}` & `/workspace/hyperstitionstudio-core/tests/test_core_suite.py`
---
## 1. Local Server-Side Question-Answering Architecture (`src/hyperstitionstud_io/mcp/chatbot.py`)
When the browser sends a user question `q` to `POST /api/v1/tools/hs_ask_chatbot` (or `GET /api/v1/tools/hs_ask_chatbot?query=...`), `answer_chatbot_query(query, page_context, lens, include_card)` executes a deterministic 3-stage pipeline in `< 15 ms`:
```text
[User Question q in Browser]
│
▼ POST /api/v1/tools/hs_ask_chatbot (Caddy -> 127.0.0.1:8095 hyperstition-mcp.service)
┌───────────────────────────────────────────────────────────────────────────────────────────────┐
│ Stage 1: Deterministic Intent & Entity Extractor (Regex + Watchlist/Glossary/Coord Matcher) │
│ Extracts: ticker symbols (NVDA..ANTHR-PVT), AQ integers (1..999), FRED slugs (CPI..INDPRO), │
│ quoted phrases ("..."), and intent keywords (price, dose, card, macro, brief, define, aq). │
└───────────────────────────────────────────────┬───────────────────────────────────────────────┘
│
▼
┌───────────────────────────────────────────────────────────────────────────────────────────────┐
│ Stage 2: Server-Side Tool & SQLite FTS5 Orchestration (100% Read-Only under EROFS) │
│ • Intent 1 (Ticker / Price / Dose / Stats Card) -> hs_inspect_quant_timeseries + cards.py │
│ • Intent 2 (Macro / Rates / CPI / M2 / GDP / Brief) -> hs_inspect_macro_indicators + brief │
│ • Intent 3 (Calculate AQ / Ingglish / Prime / Mod-9) -> hs_evaluate_aq_and_ingglish │
│ • Intent 4 (Define Term / S1-S6 / M1-M7 / G1-G6 / ETI) -> hs_search_glossary_encyclopedia │
│ • Intent 5 (Graph Node / Hub / Coordinate aq:N) -> hs_query_knowledge_graph │
│ • Intent 6 (333/666/777 Equations / News Dossier) -> hs_search_archive_equations │
│ • Intent 7 (Guile Scheme / Z-Combinator / Novice Track) -> guile_prelude + /learn/ ladder │
│ • Intent 8 (Open-Ended Question Fallback) -> SQLite FTS5 BM25 search across catalog tables │
└───────────────────────────────────────────────┬───────────────────────────────────────────────┘
│
▼
┌───────────────────────────────────────────────────────────────────────────────────────────────┐
│ Stage 3: Grounded Response Composer (Zero Hallucination, Full Citation & CIDv1 Provenance) │
│ Returns: { answer_markdown, summary_bullets, detected_intent, invoked_tools, │
│ citations: [{label, url}], stats_card_preview, data_available, ipld_cidv1 } │
└───────────────────────────────────────────────────────────────────────────────────────────────┘
```
### 1.1 Detailed Behavior of the 8 Server-Side Intent Handlers
| Intent ID | Example User Questions Answered Locally | Server-Side Data Sources Queried | Structured Output Returned to GUI |
| :--- | :--- | :--- | :--- |
| **`1. ticker_and_card`** | • *"What is NVDA's latest price and Confluence Dose?"*<br/>• *"Show me the stats card for SOL-USD"*<br/>• *"What is ANTHR-PVT's price?"* | `site/quant/quant-timeseries.json` + `quant/cards.py` (`35 ms` fast-path) | • Real close (`$135.40`), `change_bps`, `Vol20d`, `Dose 0..3+` taxon label, 6 TierZoo base stats, optional inline `900×1260` PNG card preview, and deep links to `/quant/` & `/graph/`.<br/>• For `ANTHR-PVT`: *"No market data available (private entity — 0 synthetic bars)."* |
| **`2. macro_and_regime_brief`** | • *"What are the current Fed rates and M2 spread?"*<br/>• *"What is today's Bayesian market regime and key question?"*<br/>• *"What is the latest CPI and PPI?"* | `site/quant/real-macro-indicators.json` + `site/quant/daily-brief-latest.json` | • Live 3-state Bayesian posteriors (`R1`, `R2`, `R3`), active Daily Key Macro Question $Q_t$, and exact FRED series values (`EFFR = 388 bps`, `SOFR = 398 bps`, `M2-M1 = $3.37T`, `GDP`, `CPI`, `PPI`) with native cadence metadata. |
| **`3. aq_and_ingglish_eval`** | • *"What is the AQ and Ingglish of 'abstract machine'?"*<br/>• *"Evaluate 'hyperstition'"* | `ciphers/aq.py` + `phonetics/__init__.py` (`4,943` offline CMUdict + fallback rules) + `encyclopedia-graph.json` | • `Gen 0` (`eng_aq`), `Gen 1` (`ing_aq` + Ingglish spelling), phonemic drift $\Delta$, prime rank $\pi(n)$, mod-9 digital root, and any matching specimens at that AQ coordinate. |
| **`4. glossary_and_zoology`** | • *"What is Vector G1?"*<br/>• *"Explain The Room Filter"*<br/>• *"What are the S+ Apex builds in the ETI tier list?"* | `taxonomy/glossary-registry.json` (`282` terms, `190` bilingual specimens) + `assemblage-builds-tier-list.json` | • Concise definition, ontological division (`Div 00–08`), verbatim grounded quote, ETI score, and clickable `#page=N&search=...` deep-link to `/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf`. |
| **`5. knowledge_graph_hub`** | • *"What connects to coordinate 292 or 666?"*<br/>• *"Inspect node aq:333"* | `encyclopedia-graph.json` (`388` nodes, `1,282` edges) | • Node type, degree centrality, incident `G1–G5` edges, guild membership, and `[ Open in /graph/?select=aq:N ]` deep-link. |
| **`6. archive_equations_and_news`** | • *"Show me archive equations that equal 333 or 666"*<br/>• *"What is in the latest news dossier?"* | `ingglish-aq-archive/01..72-*.md` | • Matching verified `Gen 1 [Ingglish] = 333/666/777` equations with dossier numbers and `/api/v1/dossiers/{N}?highlight=...` links. |
| **`7. guile_scheme_and_curriculum`** | • *"How does the Z combinator work in Guile Scheme?"*<br/>• *"Where should a novice start?"* | `publishing/guile_prelude.scm` + `engineering-manifest.json` + `math-manifest.json` | • Explains the `Z` combinator (`z-calculus-scheme`) or Novice Prerequisite Ladder, with links to `/learn/`, `/math/`, and `/engineering/`. |
| **`8. sqlite_fts5_fallback`** | • Any free-form question across the 6 repositories | `.cache/hyperstition-meta.db` (`sqlite_meta.py` FTS5 tables + JSON fallback) | • Top-ranked corpus matches with verbatim snippets and deep links (or explicit `"No matching corpus record found"` with `0` hallucination). |
---
## 2. Review of Pros and Cons of Chatbot Placement on the Homepage (`/`) vs. Elsewhere & Default Choice (`Option 2`)
### 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 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.
---
## 3. Test-Suite & Deployment Integration (`tests/test_core_suite.py`, `erofs_harness.py`, `sync-vps-repos.sh`)
1. **`src/hyperstitionstud_io/ci/erofs_harness.py`:**
- Because `hs_ask_chatbot` is registered in `MCP_TOOLS_SCHEMA` (bringing the total MCP tool count from `15` to `16`), `run_introspective_erofs_suite()` **automatically** sweeps `hs_ask_chatbot` under simulated `ProtectSystem=strict` (`EROFS`) with zero extra harness code!
2. **`tests/test_core_suite.py`:**
- Test `hs_ask_chatbot` across all 8 intent families via `dispatch_rest_v1("GET", "/api/v1/tools/hs_ask_chatbot?query=...")` and `POST /api/v1/tools/hs_ask_chatbot`:
- Verify `NVDA` ticker query returns real close `$135.40` and `data_available: True`,
- Verify `ANTHR-PVT` query returns `data_available: False` and `"No data available"` (`0` synthetic data),
- Verify FRED macro & Bayesian brief query returns `EFFR = 388 bps` and valid posterior simplex sum `== 1.0`,
- Verify AQ/Ingglish query on `"schizoanalysis"` returns `eng_aq = 264`, `ing_aq = 292`,
- Verify glossary query on `"Vector G1"` returns a valid `/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf#page=` deep-link.
- Verify `0` new bespoke routes were added to `rest.py` (all chatbot queries flow through `/api/v1/tools/hs_ask_chatbot` and `/mcp`).
3. **`deploy/sync-vps-repos.sh` & `deploy/test-first-deployment.sh`:**
- Add `${LIVE_SUDO} ln -sfn "hyperstitionstudio-core/site/chat" "${LIVE_REPOS}/chat"` to Step `[3/5]` of `deploy/sync-vps-repos.sh`.
- Add `/chat/index.html` and `/assets/hs-chatbot-widget.js` to `ROUTES=()` in `deploy/test-first-deployment.sh` and `hs-public-smoke` Gate `P1`/`P6`.
@@ -0,0 +1,77 @@
# Plan: Read-Only Memetic Artifact Gallery Sub-Page (`/gallery/`) for `hyperstitionstud.io` (`v2.0.0`)
- **Document ID:** `PLAN-MEMETIC-GALLERY-SUBPAGE` (`v2.0.0`)
- **Roadmap Status:** **LONG-TERM PLAN (Disabled in Production `Caddyfile` for Now)** — Caddy explicitly blocks `/gallery` and `/gallery/*` (`respond "404 Not Found" 404`) and `deploy/sync-vps-repos.sh` omits `${LIVE_REPOS}/gallery` in current deployments while preserving the gallery specification and staged scaffolding for long-term activation.
- **Target Web Route (When Activated):** `https://hyperstitionstud.io/gallery/` (`/gallery/index.html`)
- **Offline `file://` Path:** `/workspace/hyperstitionstudio-core/site/gallery/index.html`
- **Functional Scope:** **100% Read-Only Gallery Browsing** over the existing `35` generated visual/memetic artifacts (`.png`, `.pdf`, `.mp4`), with category filters, instant keyword/coordinate search, and a keyboard-navigable lightbox inspector. **Zero creative/generation/editing controls.**
- **Global Footer Compliance:** Includes the global site footer `"Made with ♥ by Lemurs."` (`&#x2665;`).
---
## 1. Inventory of Existing Memetic Artifacts Leveraged (`35` Visual Specimens)
An audit of `/workspace/memes/` (`31` PNGs, `2` companion PDFs, `1` MP4/HTML slideshow) and the visual boards in `/workspace/technocapital-singularity-zoology/` and `/workspace/encyclopedia-knowledge-graph/` provides `35` ready-to-browse artifacts organized into four browsable collections:
| Collection ID & Filter Tab | Artifact Count | Existing Files Leveraged (Zero New Generation Required) |
| :--- | :--- | :--- |
| **`1. Technocapital Zoology & Pokedex Cards`** (`zoology`) | `3` PNGs + `2` Companion PDFs | • `meme_1_custom_pokedex_technocapital_zoology_m7_129_125.{png,pdf}` (`1024x652` Gen IV INFO Pokedex Field-Scanner: `M7_candidate_2026_11_28` / `129` / `125` / `193` / `191`)<br/>• `meme_1_custom_technocapital_zoology_gta6_huawei_260_22.{png,pdf}` (`GTA 6` / `Huawei` / `260 == teknohkapital == kiler rohbots`)<br/>• `demos/meme_1_custom_ants_assets_demo.png` (`ants` / `assets` AQ lock specimen) |
| **`2. Stand-Up Comedy & Philosophical Exegesis`** (`philosophy_comedy`) | `18` PNGs + `1` MP4 Slideshow | • `meme_1_custom_iasip_bergson_russell_fucked_you_up.png` (Bergson / Russell / IASIP)<br/>• `meme_1_custom_carlin_matrix_morpheus.png` (George Carlin / Morpheus)<br/>• `meme_1_custom_hedberg_10_guy.png` (Mitch Hedberg / 10 Guy)<br/>• `meme_1_custom_wright_roll_safe.png` (Steven Wright / Roll Safe)<br/>• `meme_1_custom_norm_macdonald_success_kid.png` (Norm Macdonald / Success Kid)<br/>• `meme_1_custom_emo_philips_futurama_fry.png` (Emo Philips / Futurama Fry)<br/>• `meme_1_custom_demetri_martin_sudden_clarity_clarence.png` (Demetri Martin)<br/>• `meme_1_custom_jeselnik_confession_bear.png` (Anthony Jeselnik)<br/>• `meme_1_custom_chris_rock_condescending_wonka.png` (Chris Rock / Wonka)<br/>• `meme_1_custom_groucho_philosoraptor.png` (Groucho Marx / Philosoraptor)<br/>• `meme_1_custom_youngman_bad_joke_eel.png` (Henny Youngman / Bad Joke Eel)<br/>• `meme_1_custom_dangerfield_awesome_awkward_penguin.png` (Rodney Dangerfield)<br/>• `meme_1_custom_seinfeld_conspiracy_keanu.png` & `meme_1_custom_seinfeld_costanza_not_a_lie.png`<br/>• `meme_1_custom_parks_rec_ron_swanson_whole_ass.png`<br/>• `meme_1_custom_simpsons_alcohol_interesting_man.png`<br/>• `meme_1_custom_antijoke_{chicken_brick,disaster_girl_ice_cream,harold_bar_alcoholism}.png`<br/>• `mid2000s_standup_meme_slideshow.{mp4,html}` |
| **`3. Classic Template & Multi-Provider Specimens`** (`classic_demos`) | `10` PNGs | • `demos/meme_1_custom_ackbar_thug_scumbag_ytmnd.png`<br/>• `demos/meme_1_custom_awkward_moment_seal_id_ams.png` & `demos/meme_2_memegen_awkward_moment_seal_id_ams.png`<br/>• `demos/meme_1_custom_bad_luck_brian_doorjamb.png`<br/>• `demos/meme_1_imgflip_anakin_padme_4_panel.png`<br/>• `demos/meme_1_makeameme_rainbow_spongebob.png`<br/>• `demos/meme_1_memegen_do_you_want_ants_id_ants.png` & `demos/meme_2_memegen_do_you_want_ants_id_ants.png`<br/>• `demos/meme_2_memegen_it_s_a_trap_id_ackbar.png` & `demos/meme_3_memegen_it_s_a_trap_id_ackbar.png`<br/>• `demos/meme_3_supermeme_corporate_wants_you_to_find_the_differen.png` |
| **`4. Ecological Tier-List & Knowledge Graph Atlas Boards`** (`atlas_boards`) | `4` High-Res PNGs + `1` PDF | • `tier-list-technocapital-assemblage-builds.{png,pdf}` (`ETI 0–100` `S+` to `D/F` Scorecard)<br/>• `atlas-mode2-concentric-eti-radar.png` (`1600x1060` Concentric Radar `S+ -> D Periphery`)<br/>• `atlas-mode1-trophic-food-web.png` (`1600x1060` Trophic Food-Web)<br/>• `atlas-mode3-bipartite-g1-funnel.png` (`1600x1060` Bipartite `Gen 0 -> Gen 1` Funnel) |
---
## 2. Read-Only Gallery Browsing UX & Component Design (`/gallery/index.html`)
### 2.1 Top Filter & Search Bar (Zero Editing / Creation UI)
- **Category Filter Pills:**
- `All Specimens (35)`
- `Pokedex & Technocapital Zoology (3)`
- `Stand-Up & Philosophy (18)`
- `Classic Template Demos (10)`
- `Tier-List & Atlas Boards (4)`
- **Instant Client-Side Search Input:**
Filters cards in real time by title, comedian/philosopher, template name, guild (`S1..S6`, `M7+`), or `AQ` coordinate (`125`, `129`, `191`, `193`, `260`).
- **Grid Density Toggle:**
Switch between `Comfortable Grid (3 columns)` and `Compact Contact Sheet (5 columns)`.
### 2.2 Specimen Card Grid (`loading="lazy"`, `decoding="async"`)
Each gallery card displays:
1. **Aspect-Preserving Thumbnail Preview** (`object-fit: contain` on a `#090d16` dark slate frame so non-square memes are never cropped).
2. **Specimen Title & Collection Pill** (e.g., `Gen IV INFO Pokedex: M7_candidate_2026_11_28` • `ZOOLOGY`).
3. **Technical Telemetry Footer:** Pixel resolution (`1024 × 652`), file size (`225 KB`), and direct action links (`Inspect Fullscreen`, `Download PNG`, and `Open Companion PDF` when a `.pdf` pair exists).
### 2.3 Fullscreen Lightbox Modal Inspector
Clicking any card opens a zero-dependency fullscreen lightbox overlay featuring:
- **Keyboard & Click Navigation:** `←` / `→` arrow keys to step through the filtered collection, `Z` or click to toggle `1:1` native pixel zoom, and `Esc` to close.
- **Metadata Drawer:** Displays the full title, collection category, pixel dimensions, file size, SHA-256 digest, associated `AQ` / `Ingglish` locks (for Zoology/Pokedex specimens), and direct `Open Raw PNG` / `Open Companion PDF` buttons.
---
## 3. Repository & VPS Hosting Architecture (`100%` Offline `file://` + `https://hyperstitionstud.io/gallery/`)
Currently, `/workspace/memes` is an un-remoted local directory in `/workspace`. To ensure `/gallery/` works seamlessly both offline (`file://`) and on the Linode/Akamai VPS (`https://hyperstitionstud.io/gallery/`) via `sync-vps-repos.sh`:
1. **Gallery Application Location:**
- `/workspace/hyperstitionstudio-core/site/gallery/index.html`
- `/workspace/hyperstitionstudio-core/site/gallery/gallery-data.js` (`window.HyperstitionStudio.GalleryData = [...]`, compiled deterministically by a read-only catalog script `scripts/build_gallery_manifest.py` so `<script src="gallery-data.js">` works on `file://` without `fetch()` CORS errors).
2. **Serving the Image Assets on the VPS & Locally:**
- **Option A (Self-Contained inside `hyperstitionstudio-core/site/gallery/media/`):** Copy the curated PNG/PDF meme artifacts into `hyperstitionstudio-core/site/gallery/media/` (while referencing the 4 existing Zoology/Graph atlas PNGs via `/zoology/...` and `/graph/...` on HTTP and `../../../../technocapital-singularity-zoology/...` on `file://`) so a single `git pull` of `hyperstitionstudio-core` deploys the entire gallery to the VPS automatically.
- **Option B (Dedicated `/memes/` Route in `sync-vps-repos.sh` & Caddy):** Map `${LIVE_REPOS}/memes -> memes` and `${LIVE_REPOS}/gallery -> hyperstitionstudio-core/site/gallery` in `deploy/sync-vps-repos.sh` and `deploy/Caddyfile`.
*(Option A is recommended for the `31` meme PNGs (`~11 MB` total excluding the `.mp4`) because `hyperstitionstudio-core` is already cloned on the VPS, requiring zero new repository creation on `git.libre.audio`).*
---
## 4. Three-Step Implementation Roadmap (`Phases 1–3`)
### Phase 1: Build Deterministic Catalog Script & `gallery-data.js`
1. Write `/workspace/hyperstitionstudio-core/scripts/build_gallery_manifest.py` to inspect the existing PNG/PDF artifacts, read their exact `(width, height)` dimensions via Pillow and byte sizes, and emit `/workspace/hyperstitionstudio-core/site/gallery/gallery-data.js` (`window.HyperstitionStudio.GalleryData`).
### Phase 2: Build `/workspace/hyperstitionstudio-core/site/gallery/index.html` & Portal Homepage Link
1. Create `site/gallery/index.html` with the 4 category filter tabs, search bar, density toggle, lazy-loaded specimen grid, keyboard-navigable lightbox modal, automatic `file://` vs. `https://` asset path resolution, and the `"Made with ♥ by Lemurs."` global footer.
2. Update Card 4 / Header in `/workspace/hyperstitionstudio-core/site/index.html` to include a direct **`Open Memetic Gallery (/gallery/)`** launch button.
### 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 `/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:** `DEFERRED (Long-Term Inactive — Preserved for Future Reference)`
**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.
@@ -0,0 +1,32 @@
# PLAN: Deferred Candidate Strategies From `PLAN-PIECEWISE-DECLUTTER-AND-ACCENTUATE-HOMEPAGE-UI-CLOSEUPS` (`Strategies 1B, 1C, 2A, 2C, 3B, 3C, 4B, 4C, 5B, 5C`)
**Document ID:** `PLAN-PIECEWISE-DECLUTTER-HOMEPAGE-UI-CLOSEUPS-DEFERRED-STRATEGIES`
**Status:** `INACTIVE / DEFERRED FOR FUTURE RE-EVALUATION`
**Target Ecosystem Version:** `Future Release (Post-v2.9.0)`
**Target Repositories:** `hyperstitionstudio-core`, `encyclopedia-knowledge-graph`
**Author:** m00t & Hermes Agent
**Date:** 2026-11-30
---
## 1. Purpose (`Rule C.4` Active-vs-Inactive Piecewise Plan Partitioning)
Per `Rule C.4` of `hyperstitionstudio-roadmap-and-release`, this companion inactive document preserves all **retained-for-future** (`Strategy 2A`, `Strategy 3B`) and **deferred** (`1B, 1C, 2C, 3C, 4B, 4C, 5B, 5C`) candidate strategies from the stepwise review of `PLAN-PIECEWISE-DECLUTTER-AND-ACCENTUATE-HOMEPAGE-UI-CLOSEUPS`, leaving only the affirmed strategies (`1A, 2B, 3A, 4A, 5A`) inside the active plan.
---
## 2. Retained & Deferred Candidate Strategies Across Audit Points `1–5`
### 2.1 Retained for Future Implementation (`Strategies 2A & 3B`)
- **Strategy `2A` (Quadrant 01 — 3rd Tab Extension: `Tab 3: ☉ /learn/ Personal Grimoire & Convergence`):**
- Adds a 3rd tab (`☉ /learn/ Grimoire` -> `/learn/index.html`) to Quadrant 01 showcasing a full `680×260` closeup of `/learn/` (`Module M02: Phonemic Convergence` sandbox on the left + `Personal Grimoire Ledger` `localStorage` saved `AQ=292` locks and `[Export JSON]` on the right).
- **Strategy `3B` (Quadrant 02 — 2-Tab Condensed Mode: `Tab 1: Panel 1 Trajectory` • `Tab 2: Panel 6 Bayesian Brief`):**
- Condenses Quadrant 02 from 3 tabs down to 2 tabs (`Panel 1` and `Panel 6 + Panel 5`) if a symmetric 2-tab layout with Quadrant 01 is desired in the future.
### 2.2 Deferred Candidate Strategies (`Strategies 1B, 1C, 2C, 3C, 4B, 4C, 5B, 5C`)
- **Strategy `1B` (Fixed 2-Tab Strip Only):** Superseded by `1A` (`repeat(auto-fit, minmax(120px, 1fr))` supporting `2` tabs in Quadrant 01 and `3` tabs in Quadrants 02–04).
- **Strategy `1C` (No Tabs, 1 Static Image Per Quadrant):** Superseded by `1A`.
- **Strategy `2C` (Single Split-Pane `/calc/ + /graph/` Image):** Superseded by `2B`.
- **Strategy `3C` (Single Split-Pane `Panel 1 + Panel 6` Image):** Superseded by `3A`.
- **Strategy `4B` (2 Tabs for Quadrant 03) & Strategy `4C` (1 Static Image for Quadrant 03):** Superseded by `4A`.
- **Strategy `5B` (2 Tabs for Quadrant 04) & Strategy `5C` (1 Static Image for Quadrant 04):** Superseded by `5A`.
@@ -0,0 +1,28 @@
# PLAN: Deferred / Unaffirmed Candidate Market-Research Strategies (`Strategies 1C, 3C, 4A, 5C`) Extracted from `PLAN-PIECEWISE-MARKET-RESEARCH-ICP-MVP-AND-COMPETITIVE-STRATEGY`
**Document ID:** `PLAN-PIECEWISE-MARKET-RESEARCH-DEFERRED-CANDIDATE-STRATEGIES`
**Status:** `DEFERRED (Long-Term Inactive Piecewise Plan — Preserved for Future Reference)`
**Parent Active Plan:** `PLAN-PIECEWISE-MARKET-RESEARCH-ICP-MVP-AND-COMPETITIVE-STRATEGY`
**Target Ecosystem Version:** `v2.8.0+`
**Target Repositories:** `hyperstitionstudio-core`, `encyclopedia-knowledge-graph`
**Author:** m00t & Hermes Agent
**Date:** 2026-11-30
---
## 1. Executive Summary & Extraction Rationale
During the stepwise Ground-Truth Audit review (`Audit Points 1–5`) of `PLAN-PIECEWISE-MARKET-RESEARCH-ICP-MVP-AND-COMPETITIVE-STRATEGY`, nine strategies were affirmed for active implementation/retention (`Strategies 1A, 1B, 2A, 2B, 2C, 3A, 3B, 4B, 4C, 5A, 5B`), while **four candidate strategies (`Strategies 1C, 3C, 4A, 5C`)** were left unaffirmed.
Per `Rule C.4` of `hyperstitionstudio-roadmap-and-release` (**Active vs. Inactive Partitioning of Piecewise Plans**), this companion long-term inactive plan preserves those four unaffirmed candidate strategies outside the active build queue so `PLAN-PIECEWISE-MARKET-RESEARCH-ICP-MVP-AND-COMPETITIVE-STRATEGY` contains **exclusively affirmed, ready-to-execute deliverables**.
---
## 2. Preserved Unaffirmed Candidate Strategies (`Strategies 1C, 3C, 4A, 5C`)
| Audit Point | Deferred Strategy ID & Name | Mechanism & Target Modules | Why Deferred / Condition for Future Re-Activation |
| :--- | :--- | :--- | :--- |
| **Audit Point 1**<br/>*(Internal Technical & Corpus Inventory)* | **`Strategy 1C` — Schema-Driven Polyglot SDK Distribution (`hs-sdk-build` & `/sdk/`)** | Introspects `MCP_TOOLS_SCHEMA` (`20` tools), `STATIC_RESOURCES` (`14` URN resources), `RESOURCE_TEMPLATES` (`6`), and `/schemas/v1/*.schema.json` via `src/hyperstitionstud_io/sdk/generator.py` (`0` LLM tokens) to emit zero-dependency client libraries (`HyperstitionClient` + `LocalAlgebra`) for Python, TypeScript/ESM, Rust, and GNU Guile Scheme *(tracked in detail in `PLAN-HYPERSTITIONSTUDIO-POLYGLOT-SDK-AND-CLIENT-LIBRARIES.{md,pdf}`)*. | **Condition to Activate:** Wait until `Strategy 2A` (`get_api_telemetry_summary()`) and `Strategy 2C` (`--telemetry-history`) record `external_production_requests >= 500` on `/api/v1/*` and `/mcp` so external API demand is empirically proven before maintaining 4 generated client SDKs. |
| **Audit Point 3**<br/>*(Static HTML, PDF & PNG Route Traffic)* | **`Strategy 3C` — Pure Zero-Telemetry Stance for Static Pages** | Leaves all static HTML, PDF, and PNG routes (`69` routes) completely uncounted on the server, relying solely on `/api/v1/*` and `/mcp` tool calls (`Strategies 2A–2C`). | **Superseded by Affirmed `Strategies 3A & 3B`:** Preserved only as a fallback option if the operator ever wishes to disable `Strategy 3A` (`--ingest-caddy-route-counts`) and `Strategy 3B` (`GET /api/v1/status?surface=<slug>`). |
| **Audit Point 4**<br/>*(Patronage Conversion on `/donate/`)* | **`Strategy 4A` — Watch-Only Public BTC Mempool/Block-Explorer Balance Check (`bc1q...`) + Manual Operator XMR View-Key Ledger (`site/donate/reactor-fuel-status.json`)** | Queries a keyless public Bitcoin block explorer for confirmed UTXO balances on `bc1qcgkpl0j2ayxd68haeutfvarjgla2lmz30yd23e` and merges an optional operator-maintained Monero (`XMR`) view-key balance from `/etc/hyperstitionstud.io/exegesis-budget.env` into `site/donate/reactor-fuel-status.json` (`null` / `"No data available"` when offline) *(tracked in detail in `PLAN-MIGRATE-FINAL-EXEGESIS-CRONJOB-WITH-DUAL-MODE-AND-CRYPTO-FUNDING.{md,pdf}`)*. | **Condition to Activate:** Deferred alongside `PLAN-MIGRATE-FINAL-EXEGESIS-CRONJOB-WITH-DUAL-MODE-AND-CRYPTO-FUNDING`; affirmed `Strategy 4B` (`donate_from` & `donate_copy=BTC\|XMR` in `api_parameter_rollups`) and `Strategy 4C` (`stakeholder-proposal-authoring` + `Strategy 3A` PDF route counters) cover `/donate/` attribution with `0` external network calls. |
| **Audit Point 5**<br/>*(External User Feedback & PMF Qualification)* | **`Strategy 5C` — Opt-In 1-Question Static Feedback Link (`?template=feedback.md` / `mailto`) in Global Footer** | Appends a direct feedback link (`https://git.libre.audio/seasharp/hyperstitionstudio-core/issues/new?template=feedback.md`) to the global `<footer>` across `/`, `/learn/`, `/quant/`, `/donate/`, `/engineering/*`, and `/math/*`. | **Superseded by Affirmed `Strategies 5A & 5B`:** Omitted to keep the global footer clean (`⚚ · ☿ · ☍ · ☉ · ♄ • Made with ♥ by Lemurs` + `☿ RAIN: SUBTLE` toggle) while `Strategy 5A` (Gitea issues/stars/PRs) and `Strategy 5B` (`export_action` revealed-preference counters) capture user signal with zero footer clutter. |
@@ -0,0 +1,38 @@
# PLAN: Retained & Deferred Candidate Strategies From `PLAN-PIECEWISE-UI-EVOLUTION-FOR-GROWING-DATASETS` (`Strategies 1B, 1C, 2B, 2C, 3B, 3C, 4B, 4C, 5B, 5C, 6B, 6C`)
**Document ID:** `PLAN-PIECEWISE-UI-EVOLUTION-FOR-GROWING-DATASETS-DEFERRED-STRATEGIES`
**Status:** `INACTIVE / DEFERRED FOR FUTURE RE-EVALUATION`
**Target Ecosystem Version:** `Future Release (Post-v2.10.0)`
**Target Repositories:** `hyperstitionstudio-core`, `encyclopedia-knowledge-graph`, `haiperdohp-jemaytreeah`
**Author:** m00t & Hermes Agent
**Date:** 2026-11-30
---
## 1. Purpose (`Rule C.4` Active-vs-Inactive Piecewise Plan Partitioning)
Per `Rule C.4` of `hyperstitionstudio-roadmap-and-release`, this companion inactive document preserves all **retained-for-future** (`Strategies 1B, 3B, 4B, 6B`) and **deferred** (`1C, 2B, 2C, 3C, 4C, 5B, 5C, 6C`) candidate strategies from the stepwise review of `PLAN-PIECEWISE-UI-EVOLUTION-FOR-GROWING-DATASETS`, leaving exclusively the affirmed strategies (`1A, 2A, 3A, 4A, 5A, 6A`) inside the active plan.
---
## 2. Retained for Future Implementation (`Strategies 1B, 3B, 4B, 6B`)
- **Strategy `1B` (`/quant/` Longitudinal Time Axis — Two-Tier Hot/Cold Historical Bundle Split at `> 2,500` Bars):**
- Splits `quant-timeseries-data.js` into a hot 90-day bundle (`quant-timeseries-recent-90d.js`, `< 250 KB`) plus on-demand yearly archive chunks (`quant-timeseries-2026.json`, `quant-timeseries-2027.json`) once total bars exceed `2,500+`.
- **Strategy `3B` (`/graph/` Ontology & Canvas — Zero-Dependency Hybrid Dual-Canvas: Native `canvas.getContext("webgl2")` Instanced Point/Edge Layer + 2D `ctx.fillText()` HUD Overlay at `> 5,000` Nodes):**
- Uses 100% native browser WebGL2 (`0` external third-party libraries, `file://` safe) to draw `10,000–100,000` edges and node circles in a single GPU draw call while layering the existing 2D `<canvas>` on top for crisp monospace text labels once the graph crosses `5,000+` nodes.
- **Strategy `4B` (`/calc/` Lexical Corpus — Shard `db.json` Into 36 Base-36 Prefix Chunks at `> 1,000,000` Entries):**
- Splits `db.json` into `db_0.json .. db_z.json` on-demand shards once `db.txt` exceeds `1,000,000+` entries.
- **Strategy `6B` (Homepage — Dynamic "Latest Newswire / Ticker Tape" Strip on `/index.html` If a Future Homepage UI Redesign Is Intended):**
- Retained only if a future homepage UI redesign intends to add a live newswire/ticker tape to `/index.html` (not intended under the current `2×2` showcase design).
---
## 3. Deferred Candidate Strategies (`Strategies 1C, 2B, 2C, 3C, 4C, 5B, 5C, 6C`)
- **Strategy `1C` (Downsample Older Bars into Weekly/Monthly Candles Only):** Deferred (loses exact single-day `Scope 1/2/3` Confluence Dose event precision).
- **Strategy `2B` (Virtual-Scroll DOM Recycler for `1,000+` Simultaneous Tickers) & Strategy `2C` (Unbounded Table):** Superseded by `2A`.
- **Strategy `3C` (Unculled 2D Canvas Rendering):** Superseded by `3A`.
- **Strategy `4C` (Unbounded `/learn/` Lists):** Superseded by `4A`.
- **Strategy `5B` (Left-Sidebar Tree Navigation on `/engineering/` & `/math/`) & Strategy `5C` (Unbounded Top-Bar Buttons):** Superseded by `5A`.
- **Strategy `6C` (No Formal Cap on Homepage Tabs/Links):** Superseded by `6A`.
+7
View File
@@ -0,0 +1,7 @@
# Inactive & Deferred Plans (`docs/plans/inactive/`)
This directory holds **Long-Term Inactive / Deferred Plans** and **Companion Deferred Strategy Plans** (`PLAN-*.md` and their compiled Dark-Mode ReportLab PDF companions `PLAN-*.pdf`) for offline PDF review.
- **Active Non-Piecewise Plans (`Tier 1`):** Located in `../active/`
- **Piecewise Plans (`Tier 2–4`):** Located in `../piecewise/`
- **Completed Cold-Rotated Plans:** Located in `../../archive/completed-plans-archive.tar.gz`