Compare commits

..
6 Commits
22 changed files with 855 additions and 18 deletions

No files matched your search

@@ -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,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:** **ACTIVE / READY**
- **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,124 @@
# Plan: Inline `ⓘ` Info Icons, One-Paragraph Plain-English Definitions & Hyperlinked PDF Glossary Quotes Across the `/quant/` Interface (`v2.0.21`)
- **Document ID:** `PLAN-QUANT-INTERFACE-INFO-ICONS-AND-GLOSSARY-POPOVERS` (`v2.0.21`)
- **Roadmap Status:** **ACTIVE / READY**
- **Target Web Route:** `https://hyperstitionstud.io/quant/` (`/quant/index.html`)
- **Target Modules & Files:**
- `/workspace/hyperstitionstudio-core/site/quant/index.html` (CSS for `.hs-info-icon` & `#quantInfoPopover` floating card + inline `ⓘ` triggers on static headers/controls)
- `/workspace/hyperstitionstudio-core/site/quant/quant-app.js` (`QUANT_TERM_GLOSSARY` registry + dynamic `ⓘ` icon injection into Panel 1–4 headers, the 6 Date Inspector metric boxes, and the 6 `LENS_REGISTRY` rows)
- `/workspace/hyperstitionstudio-core/tests/test_core_suite.py` (Automated verification of all 27 term definitions, verbatim glossary quotes, and `#page=N&search=...` PDF target existence)
- **Primary PDF Glossary Target:**
`/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf` (`19` pages, `282` canonical entries + `92` conceptual/custom definitions from `/workspace/technocapital-singularity-zoology/taxonomy/glossary-registry.json`), paired with `/quant/OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH.pdf` (`5` pages).
---
## 1. UX & Interaction Design: Inline `ⓘ` Micro-Badges & Viewport-Clamped Glossary Popover
To make every control, chart legend, telemetry box, and lens metric on `/quant/` immediately self-explanatory to a first-time visitor without cluttering the dense workbench layout:
1. **Inline `ⓘ` Badge (`.hs-info-icon`):**
- A compact `15px × 15px` circular monospace badge (`border-radius: 50%`, `font-size: 0.62rem`, `color: var(--cyan)`, `border: 1px solid rgba(34, 211, 238, 0.55)`, `background: rgba(9, 13, 22, 0.85)`) rendered directly beside each interface term (`data-term-id="<slug>"`, `role="button"`, `tabindex="0"`, `aria-label="Definition and glossary citation for <Term>"`).
- Highlights in gold (`--gold: #f5c630`) on hover, keyboard focus, or when pinned open.
2. **Interactive Popover Card (`#quantInfoPopover`):**
- Opens on hover/focus (for instant scanning) and **pins open on click/Enter** so the user can move their cursor into the popover and click the hyperlinked PDF Glossary quote. Dismisses on `Escape`, clicking the `×` close button, or clicking outside.
- Automatically clamps its `(left, top)` coordinates inside `window.innerWidth × window.innerHeight` so it never overflows off the right or bottom edge of the screen.
- **Strict Two-Layer Layout inside Every Popover:**
```text
+-----------------------------------------------------------------------------------+
| [ⓘ TERM TITLE] [Pin / ×] |
|-----------------------------------------------------------------------------------|
| PLAIN-ENGLISH SUMMARY (<= 1 Short Paragraph, 2–3 Sentences): |
| Clear, jargon-free explanation of what this number or control means in plain |
| English and how to read it on the chart or table. |
|-----------------------------------------------------------------------------------|
| VERBATIM PDF GLOSSARY QUOTE (Click Quote to Open PDF at Exact Page): |
| > "Continuous Base-36 character-valuation cipher (formulated by Jim Lees in 1976 |
| > and adopted by the Ccru) where digits 0–9 map to face values 0–9 and letters |
| > A–Z map to 10–35..." |
| [ 📖 Open PDF Glossary (p.1 "Alphanumeric Qabbala") ↗ ] [ 📄 Operator's Manual ] |
+-----------------------------------------------------------------------------------+
```
- **Offline `file://` & Live `https://` Portability:** Every PDF link (`#page=N&search=...`) passes through `adaptHrefForFileProtocol()` so clicking the quote opens `/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf#page=N&search=...` on `https://` and `../../../technocapital-singularity-zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf#page=N&search=...` on `file://`.
---
## 2. Complete Master Lexicon of `/quant/` Interface Terms (`27` Terms), Plain-English Paragraphs & Verbatim Hyperlinked PDF Glossary Quotes
Every page number (`#page=1..11`) and verbatim quote below has been verified against `/workspace/technocapital-singularity-zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf` and `/workspace/technocapital-singularity-zoology/taxonomy/glossary-registry.json`:
### 2.1 Top Toolbar Controls (`4` Interface Terms)
| Term ID & UI Label | Plain-English Definition (`<= 1 Paragraph`) | Verbatim PDF Glossary Quote & Hyperlinked Target (`#page=N&search=...`) |
| :--- | :--- | :--- |
| **`guild_filter`**<br/>`Guild Filter (ALL / S1–S6)` | Filters the 24 market tickers by their primary technocapital sector ("Guild"): `S1` covers AI models and cloud software, `S2` covers high-frequency trading and crypto liquidity, `S3` covers semiconductor fabs and defense hardware, `S4` covers telecom carrier waves, `S5` covers biotech/pharma, and `S6` covers giant asset managers and banks. | **Quote:** *"Co-primary coupling between the Machinic Phylum (Classes S1–S5: models, HFT algorithms, EUV fabs, carrier waves, wetware) and Capital Organizational Capture (Class S6)."*<br/>**PDF Link:** `/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf#page=3&search=Double%20Articulation` |
| **`ticker_select`**<br/>`Ticker & TradingView (↗)` | Selects which of the 24 tracked companies or assets to inspect across all four panels. Clicking `Open TradingView Chart ↗` (or pressing `T`) opens that asset's live market chart on TradingView in a new browser tab without loading any external tracking scripts on this page. | **Quote:** *"A tracked real-world financial or industrial figure attached to an S1–S6 entity (lazarus_heist_6b = '$6B' / 'siks bilyan' [211]; anthropic_ipo_price_83 = '$83' [202] -> '$89' [193])."*<br/>**PDF Link:** `/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf#page=8&search=Quantitative%20Economic%20Anchor` |
| **`projection_lens`**<br/>`Projection Lens` | Changes the vocabulary used in Panel 3 to describe the exact same six underlying math scores. You can view the readout in plain math terms (`Neutral Math`), institutional investing terms (`Quant Factor`), executive governance terms (`Corporate Board`), ecological tier ratings (`TierZoo`), fantasy sports stats (`Fantasy Sabermetrics`), or `Pokédex` scanner stats. | **Quote:** *"The analytical gain achieved by reading Gen 0 (stated legal/filing form) and Gen 1 (operational phonemic stream) stereoscopically across Academic, Corporate Board, Out-of-Sample Fund Manager, and Fantasy Football registers."*<br/>**PDF Link:** `/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf#page=7&search=Vector%20G6` |
| **`metric_mode`**<br/>`Metric Mode (Spoken AQ / USD / BPS / Digit AQ)` | Chooses what the cyan line in the top chart plots over the 30-day timeline: `Spoken AQ (Gen 1)` scores the spoken English words for the closing price after stripping silent letters; `Close Price (USD)` plots the raw dollar price; `Move (BPS)` plots the daily percentage move in basis points (`100 bps = 1%`); and `Digit AQ` sums the raw digits of the price. | **Quote:** *"Continuous Base-36 character-valuation cipher (formulated by Jim Lees in 1976 and adopted by the Ccru) where digits 0–9 map to face values 0–9 and letters A–Z map to 10–35 (case-insensitive; non-alphanumeric symbols = 0)."*<br/>**PDF Link:** `/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf#page=1&search=Alphanumeric%20Qabbala` |
### 2.2 Panel 1 — 3-Pane Time-Series Canvas & Legend (`6` Interface Terms)
| Term ID & UI Label | Plain-English Definition (`<= 1 Paragraph`) | Verbatim PDF Glossary Quote & Hyperlinked Target (`#page=N&search=...`) |
| :--- | :--- | :--- |
| **`entity_threshold`**<br/>`Entity Phonemic Threshold (Dashed Crimson Line)` | The horizontal dashed red line marks the numerical score of the company's own name when spelled strictly by how it sounds out loud in `Gen 1` Ingglish (for example, `Nvidia` -> `envideea = 137`, `ASML` -> `asml = 81`). When the cyan curve touches this line, the market price or daily move matches the company's own name. | **Quote:** *"Deterministic phonemic English orthography backed by the 126,051-word CMU Pronouncing Dictionary (ingglish npm package) that strips silent etymological letters and maps each ARPAbet phoneme to a single invariant spelling."*<br/>**PDF Link:** `/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf#page=1&search=Phonemic%20Ingglish` |
| **`scope1_self_lock`**<br/>`Gold = Scope 1 Self-Lock` | A glowing gold circle on the curve means the asset's closing price or daily basis-point move landed on the exact number of its own name (such as Nvidia closing at `$137.00 == envideea [137]` or ASML moving `+81 bps == asml [81]`) or hit a repeating three-digit number (`$777.00` for Eli Lilly). | **Quote:** *"Forbids matching quantitative figures to random unrelated dictionary words; counter-substitutions are strictly restricted to: (1) Intra-Instrument Self-Locks (price or bps == entity's own AQ)..."*<br/>**PDF Link:** `/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf#page=9&search=Contingent%20Repricing%20Scope%20Rule` |
| **`scope2_ring_migration`**<br/>`Cyan = Scope 2 Ring Migration` | A cyan dot on the curve means the asset's price, spoken price score, or daily basis-point move landed on one of the 30 core supply-chain coordinates shared across the `S1–S6` ecosystem (such as `125`, `137`, `193`, `211`, `256`, or `292`), linking that day's market action to a broader sector hub. | **Quote:** *"Tracks which S1–S6 equivalence partners a spoken figure exits and enters when repriced (e.g., 'siks bilyan' [211 == wor masheen == koper waier] migrating to 'sevan bilyan' [222 = 6 x 37])."*<br/>**PDF Link:** `/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf#page=9&search=Type%202%20Revision` |
| **`scope3_wire_copresence`**<br/>`Emerald = News Wire Co-Presence` | In the middle bar chart, bars turn emerald green on days when that specific company was also named in the breaking midnight (`00:00 UTC`) news wire. This enforces "The Room Filter": we only flag a high-conviction signal when the news story and the market price happen on the same day. | **Quote:** *"'The Room Filter' requires that equated terms co-occur within a contingent historical event, supply chain, or balance sheet before their AQ identity is admitted as a real singularity."*<br/>**PDF Link:** `/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf#page=10&search=Room%20Filter` |
| **`wire_velocity_bars`**<br/>`Wire Eq (00:00 GMT Wire Velocity)` | The middle pane's vertical bars count how many verified `333`, `666`, and `777` phonemic equations were harvested from that day's breaking midnight (`00:00 GMT`) news dossier. Taller bars indicate heavier cross-scale resonance in the global news cycle on that date. | **Quote:** *"The three cross-scale target sums of every archive dossier (10 verified equations per scale = 30 per dossier), all governed by the prime generator 37 (3 x 37 = 111)."*<br/>**PDF Link:** `/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf#page=1&search=Primary%20Repdigit%20Attractors` |
| **`vol20d_regimes`**<br/>`Vol20d & M1–M3 Regimes` | The bottom pane plots the day's trading volume relative to its 20-day average (`Vol20d`) and colors each bar by market regime: Gold (`< 0.45x` volume) marks `M1` supply freezes/halts; Crimson (`>= 2.5x` volume or `<= -5%` drop) marks `M2` flash-crash surges; and Sky-Blue marks normal `M3` large-cap trading. | **Quote:** *"Methodological rule forbidding global dictionary fishing of horror/mythic tropes into unrelated stories: a memetic subclass M1–M6 may be invoked ONLY when (Gate 1) the news event exhibits the matching real-world thermodynamic state..."*<br/>**PDF Link:** `/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf#page=5&search=State-Gated%20Inheritance` |
### 2.3 Panel 2 & Panel 3 — Heatmap & Cross-Sectional Date Inspector Boxes (`7` Interface Terms)
| Term ID & UI Label | Plain-English Definition (`<= 1 Paragraph`) | Verbatim PDF Glossary Quote & Hyperlinked Target (`#page=N&search=...`) |
| :--- | :--- | :--- |
| **`heatmap_matrix`**<br/>`Panel 2: 24 × 30 Lock Heatmap` | A bird's-eye grid showing all 24 tickers (rows) across all 30 November UTC days (columns). Gold cells mark `Scope 1` self-locks, cyan cells mark `Scope 2` sector ring hits, and green borders mark days when the company appeared in the midnight news wire. Click any cell to inspect that ticker and date. | **Quote:** *"Shared numerical coordinates through which one singularity guild feeds or captures another across the technocapital food web (e.g., 211 linking S2 HFT, S3 Copper/War Machine, S4 Carrier Wave, and S6 $6B Heist)."*<br/>**PDF Link:** `/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf#page=8&search=Trophic%20Supply-Chain%20Bridges` |
| **`box_close_usd`**<br/>`Close USD (Change)` | The official `21:30 UTC` (`4:30 PM EST`) US closing-bell price in US dollars for the selected date, alongside the day's percentage move expressed in basis points (`100 bps = 1.00%`, so `+81 bps = +0.81%`). | **Quote:** *"CLI mode governing numeric tokens: 'off' (default 100% pure lexical/qualitative mode stripping numeric figures), 'spoken' (converting figures to spoken English -> Ingglish), and 'digit' (literal Base-36 digit sum)."*<br/>**PDF Link:** `/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf#page=9&search=Tri-Modal%20Quantitative%20Handling` |
| **`box_spoken_close`**<br/>`Spoken Close (Gen 1 AQ)` | Translates the integer dollar closing price into spoken words, strips silent letters into `Gen 1` phonemic Ingglish (for example, `$137` -> `"one hundred thirty seven"` -> `"wuhn huhndrad therdee sevan"`), and sums its Base-36 value. | **Quote:** *"Tracks which S1–S6 equivalence partners a spoken figure exits and enters when repriced (e.g., 'siks bilyan' [211 == wor masheen == koper waier] migrating to 'sevan bilyan' [222 = 6 x 37])."*<br/>**PDF Link:** `/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf#page=9&search=Type%202%20Revision` |
| **`box_scaled_cap`**<br/>`Scaled Cap (Gen 1 AQ)` | Takes the company's market capitalization string (such as `$3.35T` or `$61B`), expands it into spoken phonemic Ingglish (`"three point three faiv trilyan"`), and computes its Base-36 `AQ` score to detect macro-scale capital locks. | **Quote:** *"Activates under sovereign megaprojects, tech giants, trillion-dollar consolidation, and grid capture. Signature locks: kansorsheea == 189; leevaiathan == 179; monohpolee == 192."*<br/>**PDF Link:** `/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf#page=5&search=Subclass%20M3` |
| **`box_bps_vol`**<br/>`BPS Spoken AQ / Vol20d` | Shows the phonemic `AQ` score of the day's unsigned basis-point move next to `Vol20d` (how many times normal 20-day average volume traded hands that day). | **Quote:** *"Covers microsecond algorithmic order books, flash crashes, fiber-optic latency, derivatives, and crypto ledgers. Signature coordinates: 256 (akselerayshan == hai-freekwansee), 193 (flash krash == anthropik)..."*<br/>**PDF Link:** `/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf#page=4&search=Class%20S2` |
| **`box_active_locks`**<br/>`Active Contingent Locks` | Lists every `Scope 1` self-lock (where price or move matches the asset's own name or a `37 × k` repdigit) and `Scope 2` sector ring coordinate (`Ring 125`, `Ring 137`, `Ring 193`, etc.) triggered by this ticker on the selected date. | **Quote:** *"The 13 Ingglish AQ coordinates that simultaneously belong to 2–4 distinct Assemblage Builds and act as regime-reallocation pivots: 292, 256, 211, 193, 183, 153, 137, 136, 133, 125, 95, 91, and 81."*<br/>**PDF Link:** `/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf#page=7&search=Multi-Build%20Hybrid` |
| **`box_wire_copresent`**<br/>`00:00 GMT Wire Co-Present` | Indicates `YES (Scope 3 Lock)` when the company's name or ticker symbol appeared verbatim in that same UTC date's midnight news-wire dossier (`25..71-dossier-news-YYYY-MM-DD.md`), confirming real-world news and market co-presence. | **Quote:** *"'Grand Central Station' names the statistical crowding of 4-to-5-letter Base-36 words in the 65–140 interval; 'The Room Filter' requires that equated terms co-occur within a contingent historical event, supply chain, or balance sheet..."*<br/>**PDF Link:** `/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf#page=10&search=Grand%20Central%20Station` |
### 2.4 Panel 3 — Dynamic `LENS_REGISTRY` Time-Series Moments (`7` Interface Terms)
| Term ID & Underlying Key | Plain-English Definition (`<= 1 Paragraph`) | Verbatim PDF Glossary Quote & Hyperlinked Target (`#page=N&search=...`) |
| :--- | :--- | :--- |
| **`lens_archetype`**<br/>`Archetype & Tier Classification` | Summarizes the asset's 30-day behavioral profile—whether it acts as a steady "Ironclad Floor" chokepoint with consistent daily locks or a high-volatility "Templex Boom/Bust" surge asset—and grades its overall strength from `Tier S+` (Apex) to `Tier D` (Periphery). | **Quote:** *"Tier S+ (88–100 ETI, Crimson #FF4D4D: Apex Predator — #1 S1 AI [93], #2 S2 Liquidity [90]); Tier S (80–87 ETI, Coral #FF7F7F: Keystone Dominator — #3 S6 Capture [87], #4 S3 War Machine [83])..."*<br/>**PDF Link:** `/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf#page=8&search=Zoological%20Ecological%20Tiers` |
| **`ts_duty_cycle_pct`**<br/>`Duty Cycle % / SNAP% / Active Days` | The percentage of days over the 30-day window where this ticker fired at least one verified `Scope 1/2` coordinate lock or `Scope 3` midnight news-wire match. A higher percentage means the asset is consistently active in the signal stream rather than firing only once by chance. | **Quote:** *"Standalone 0–100 zoological grading standard for Technocapital Singularity Taxa & Assemblage Builds, computed as the weighted composite of six normalized base stats: ETI = round(0.20*CAP + 0.18*COL + 0.18*ARM + 0.16*PRM + 0.14*VEL + 0.14*RES)."*<br/>**PDF Link:** `/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf#page=7&search=Ecological%20Trophic` |
| **`ts_weighted_resonance`**<br/>`Weighted Resonance / WOPR` | Combines how often the ticker appears in the midnight news wire (`1.5× weight`) with its share of volume-weighted price movement on locked days (`0.7× weight`). It measures whether an asset is driving both headline attention and capital movement at the same time. | **Quote:** *"Highest-weighted zoological stat (0.20), scoring S[1–5] x S6 Double Articulation, cross-guild trophic bridge count, and G2 Cross-Generation Twin density."*<br/>**PDF Link:** `/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf#page=8&search=CAP` |
| **`ts_excess_over_replacement`**<br/>`Excess Over Replacement / WAR (30d)` | Measures how many more coordinate locks and resonance points this asset produced over 30 days compared to a random baseline (`Tier D = 49 ETI` replacement level). Positive values indicate structural outperformance above random numerical noise. | **Quote:** *"Plain-English Fantasy Football translations of Vector G1 Variance Collapse ('Stack Lock' — when 3+ assets that look different on paper snap onto the exact same number in Ingglish) and Vector G4 Isometric Invariance ('All-Weather Chokepoint')."*<br/>**PDF Link:** `/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf#page=10&search=Stack%20Lock` |
| **`ts_quantile_profile`**<br/>`P20 Floor / P90 Ceiling / Boom% / CV` | Breaks down the distribution of the asset's daily resonance points: `P20` is its quiet-day baseline floor, `P90` is its peak-day ceiling, `Boom%` is the share of days with major multi-lock spikes (`>= 3.0 pts`), and `CV` (coefficient of variation) measures how spiky vs. steady the signal is. | **Quote:** *"Quantifies a build's concentration of G4 Isometric Fixed Points (Delta = 0 chokepoints like ASML=81, TSMC=91, GPU=71, kapatal=125, charter=136) that remain numerically unperturbed across orthographic regimes."*<br/>**PDF Link:** `/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf#page=7&search=ARM` |
| **`ts_optimal_lag_days`**<br/>`Optimal Causal Lag τ* (Days)` | The day offset $\tau^* \in [-5, +5]$ where midnight news-wire activity and the ticker's price volatility correlate most strongly. Positive $\tau^* > 0$ means news-wire surges lead price volatility by $\tau^*$ days; $\tau^* = 0$ means they move on the same day; negative $\tau^* < 0$ means news headlines follow after the price move. | **Quote:** *"Cybernetic runaway (ruhnaway = 183 == tempaleks == laytansee) in which positive feedback (pozativ feedbak = 269 [57th PRIME]) folds future attractor states backward to assemble their own material preconditions."*<br/>**PDF Link:** `/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf#page=3&search=Teleoplexy` |
| **`ts_regime_splits`**<br/>`Conditional Regime Splits (M1 / M2 / M3)` | Shows the ticker's average daily resonance score during `M1` supply-freeze days, `M2` flash-crash/high-volume surge days, and `M3` normal large-cap days—revealing which market environment causes this asset's locks to light up. | **Quote:** *"Lineup/portfolio pivot at 137 [33rd PRIME] (daireeoh == envideea == hawlts == inersha): if a foundry delay or regulatory freeze halts the offensive line, reallocate immediately across the 137 bridge..."*<br/>**PDF Link:** `/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf#page=10&search=Supply-Halt%20Insurance%20Pivot` |
### 2.5 Panel 4 — Lead-Lag Cross-Correlation & Audit Footer (`3` Interface Terms)
| Term ID & UI Label | Plain-English Definition (`<= 1 Paragraph`) | Verbatim PDF Glossary Quote & Hyperlinked Target (`#page=N&search=...`) |
| :--- | :--- | :--- |
| **`lag_correlation_explorer`**<br/>`Lead-Lag Cross-Correlation r(τ)` | This 11-bar chart measures the statistical correlation $r(\tau) \in [-1, +1]$ between daily midnight news-wire equation counts and the ticker's daily price swing across time shifts from `-5` days to `+5` days. The gold bar highlights the strongest lead-lag relationship ($\tau^*$). | **Quote:** *"Landian terms for non-linear temporal folding in cybernetic markets: taim-serkat (207 == terbyalans == Gen 0 'infinitive') and tempaleks (183 == ruhnaway == laytansee == dhrakoola)."*<br/>**PDF Link:** `/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf#page=3&search=Time-Circuit` |
| **`periodicity_gate_badge`**<br/>`Periodicity Gate Enforced` | Confirms that every data point in `/quant/` comes strictly from daily timestamped observations (`21:30 UTC` market close and `00:00 UTC` news rollover), with zero undated dictionary lists or static essays mixed into the time-series math. | **Quote:** *"'The Room Filter' requires that equated terms co-occur within a contingent historical event, supply chain, or balance sheet before their AQ identity is admitted as a real singularity."*<br/>**PDF Link:** `/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf#page=10&search=Room%20Filter` |
| **`cidv1_provenance`**<br/>`IPLD dag-json CIDv1 (baguqeera...)` | A cryptographic content fingerprint (`CIDv1`) computed over the entire time-series bundle. If even a single price, date, or equation changes by one character, this `baguqeera...` hash changes—proving the readout you see matches the verified archive byte-for-byte. | **Quote:** *"Audit requirement that every Ingglish token in a technocapital dossier match unmodified ingglish.translate() output from CMUdict with 0 ad-hoc spelling tweaks."*<br/>**PDF Link:** `/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf#page=1&search=CMUdict%20Purity` |
---
## 3. Three-Phase Implementation Roadmap (`Phases 1–3`)
### Phase 1: Add `.hs-info-icon` & `#quantInfoPopover` Styling + Markup in `site/quant/index.html`
1. Add CSS styles in `/workspace/hyperstitionstudio-core/site/quant/index.html` for:
- `.hs-info-icon` (`15px × 15px` inline-flex badge with hover/focus/active states),
- `#quantInfoPopover` (fixed viewport-clamped card with `z-index: 90`, dark-slate `#0f172a` panel, `1px solid var(--cyan)` border, gold header bar, plain-English paragraph block, styled `<blockquote>` for the verbatim PDF Glossary quote, and clickable `#page=N&search=...` PDF links).
2. Add inline `<button type="button" class="hs-info-icon" data-term-id="...">i</button>` triggers next to the static toolbar labels (`Guild Filter`, `Ticker`, `Projection Lens`, `Metric Mode`) and Panel 1–4 headers/legend items in `site/quant/index.html`.
### Phase 2: Build `QUANT_TERM_GLOSSARY` & Dynamic Popover Controller in `site/quant/quant-app.js`
1. Define `QUANT_TERM_GLOSSARY` in `site/quant/quant-app.js` containing all `27` entries from Section 2 above (with `title`, `plain_english`, `glossary_quote`, `glossary_pdf_link`, and `manual_pdf_link`).
2. Inject `.hs-info-icon` triggers into:
- All 6 Date Inspector metric boxes in `renderInspectorAndLens()`,
- The `Archetype` header and all 6 dynamically labeled `LENS_REGISTRY` time-series rows in `#lensProjectionCard` (mapping each lens's display label back to its canonical `ts_*` key so the `ⓘ` icon always opens the right explanation regardless of which lens is active!), and
- The `Periodicity Gate` and `CIDv1` badges in `#periodicityAuditFooter`.
3. Attach delegated hover/focus/click/keyboard (`Enter`/`Space`/`Escape`) handlers so hovering previews the popover and clicking pins it open to allow clicking the hyperlinked PDF Glossary quote.
### Phase 3: Automated Verification in `tests/test_core_suite.py` & `deploy/test-first-deployment.sh`
1. Add unit assertions in `tests/test_core_suite.py` verifying:
- `QUANT_TERM_GLOSSARY` in `site/quant/quant-app.js` contains all `27` term definitions,
- Every entry has a single-paragraph plain-English explanation (`\n\n` not in `plain_english` and `40 <= len(plain_english) <= 420`),
- Every entry has a non-empty verbatim `glossary_quote` and a `glossary_pdf_link` pointing to `/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf#page=N&search=...`, and
- Every target `#page=N` is within `1..19` of `technocapital-singularity-zoology-comprehensive-glossary.pdf`.
@@ -0,0 +1,73 @@
# Plan: Expose SQLite `/api/v1/meta/*` REST Endpoints, HTTP `ETag` (`304 Not Modified`), `hs_query_sqlite_catalog` MCP Tool & `sync-vps-repos.sh` Hydration (`v2.0.18`)
- **Document ID:** `PLAN-SQLITE-META-REST-ENDPOINTS-ETAG-AND-VPS-SYNC` (`v2.0.18`)
- **Roadmap Status:** **LONG-TERM INACTIVE PLAN (Deferred)** — Extracted from `PLAN-SQLITE-REST-API-METADATA-DB` and preserved as a long-term architectural specification alongside `PLAN-LLM-TOKEN-ECONOMIZER-AND-VARIANCE-ROUTING`, `PLAN-MEMETIC-GALLERY-SUBPAGE`, and `Episodes 06–09` of *The Encyclopedia Expeditions*; not scheduled for active implementation unless explicitly activated.
- **Prerequisite Module:** `hyperstitionstud_io.db.sqlite_meta` (`hs-db-build` CLI, `hyperstition-catalog.db`, and `api-telemetry.db` automatically populated by `dispatch_rest_v1()` and `dispatch_jsonrpc()`, defined in the active plan `/workspace/encyclopedia-knowledge-graph/docs/PLAN-SQLITE-REST-API-METADATA-DB.{md,pdf}`).
- **Target Modules (When Activated):**
- `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/mcp/rest.py` & `server.py`
- `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/mcp/tools.py`
- `/workspace/hyperstitionstudio-core/deploy/hyperstition-mcp.service`
- `/workspace/hyperstitionstudio-core/deploy/sync-vps-repos.sh` & `deploy/test-first-deployment.sh`
---
## 1. Scope of Deferred Integration
Once the standalone `hyperstitionstud_io.db.sqlite_meta` engine (`hyperstition-catalog.db` + `api-telemetry.db`) is built, this long-term plan specifies how to expose it over the public `/api/v1/meta/*` HTTP REST surface and `/mcp` JSON-RPC server and wire automatic RAM-`tmpfs` database hydration into the VPS deployment pipeline:
1. **Five `/api/v1/meta/*` HTTP REST Endpoints:**
Expose `/api/v1/meta/{manifests,search,coordinate/{aq_int},timeseries/query,telemetry}` on `hyperstitionstud_io.mcp.rest` and `server.py`.
2. **HTTP `ETag` / `If-None-Match` (`304 Not Modified`) Conditional Caching Middleware:**
Serve deterministic `ETag` headers backed by `registry_manifests.dag_json_cidv1` (or SHA-256) and short-circuit matching `If-None-Match` requests with `HTTP 304 Not Modified` in `< 0.1 ms`.
3. **MCP Tool `hs_query_sqlite_catalog`:**
Register `hs_query_sqlite_catalog` in `MCP_TOOLS_SCHEMA` (`src/hyperstitionstud_io/mcp/tools.py`) and expose it at `/mcp` (`tools/call`) and `/api/v1/tools/hs_query_sqlite_catalog`.
4. **VPS `tmpfs` Hydration in `deploy/sync-vps-repos.sh` & Systemd Sandboxing:**
Run `hs-db-build` (`"${PYTHON_BIN}" -m hyperstitionstud_io.db.sqlite_meta --build`) inside `deploy/sync-vps-repos.sh` so `/var/www/hyperstitionstud.io/repos/hyperstition-catalog.db` refreshes in the `512 MB` RAM `tmpfs` mount on every pull while keeping `ProtectSystem=strict` and `ReadOnlyIsolationGuard` intact.
---
## 2. `/api/v1/meta/*` REST Endpoints & `hs_query_sqlite_catalog` MCP Tool Specification
### 2.1 REST Endpoints (`src/hyperstitionstud_io/mcp/rest.py`)
| HTTP Method & Path | Query Parameters | What It Queries in SQLite (`< 1 ms`) |
| :--- | :--- | :--- |
| `GET /api/v1/meta/manifests` | `?registry=glossary-registry` (optional) | Calls `query_registry_manifests()` on `registry_manifests` for all compiled schemas/registries, their record counts, `raw_sha256`, `dag_json_cidv1`, and `ETag` headers. |
| `GET /api/v1/meta/search` | `?q=envideea+137&type=all\|glossary\|equation\|node&limit=25` | Calls `query_fts_catalog()` to execute a ranked **FTS5 `BM25` full-text search** across `fts_catalog` (searching glossary terms, 1,850+ equations, 388 graph nodes, and 24 tickers in `< 0.6 ms`). |
| `GET /api/v1/meta/coordinate/{aq_int}` | `aq_int` in `1..999` (e.g. `/api/v1/meta/coordinate/137` or `/api/v1/meta/coordinate/125`) | Calls `query_coordinate_join(aq_int)` for a **Unified Cross-Corpus Coordinate Join**: in a single indexed SQL query, returns every glossary term, bilingual specimen, Knowledge Graph node/edge, `333/666/777` archive equation, and `/quant/` closing-bell bar that locks onto integer coordinate `{aq_int}`. |
| `GET /api/v1/meta/timeseries/query` | `?symbol=NVDA&start=2026-11-10&end=2026-11-30&min_points=1.5` | Calls `query_timeseries_bars()` to execute indexed range queries over `quant_timeseries_bars` (`WHERE symbol = ? AND date_utc BETWEEN ? AND ? AND contingent_points >= ?`). |
| `GET /api/v1/meta/telemetry` | None | Calls `get_api_telemetry_summary()` on `api-telemetry.db`, returning live server uptime, total calls, cache hit rate (`304`), mean/max latency ($\mu\text{s}$) per endpoint, and `100%` isolation verification counts. |
### 2.2 MCP Tool `hs_query_sqlite_catalog` (`src/hyperstitionstud_io/mcp/tools.py`)
- **Tool Name:** `hs_query_sqlite_catalog`
- **Input Schema (`inputSchema`):**
- `mode`: `"manifests" | "search" | "coordinate" | "timeseries" | "telemetry"` (default `"search"`)
- `query`: `str` (FTS5 `BM25` search query when `mode == "search"`)
- `doc_type`: `"all" | "glossary" | "equation" | "node" | "dossier" | "instrument"` (default `"all"`)
- `aq_int`: `int` (`1..999`, required when `mode == "coordinate"`)
- `symbol`: `str` (optional ticker filter when `mode == "timeseries"`)
- `start_date`, `end_date`: `str` (`YYYY-MM-DD` bounds when `mode == "timeseries"`)
- `min_points`: `float` (default `0.0`)
- `limit`: `int` (`1..100`, default `25`)
- **Execution Guarantees:** Runs strictly inside `ReadOnlyIsolationGuard` against `file:/.../hyperstition-catalog.db?mode=ro` (`PRAGMA query_only = ON;`).
---
## 3. HTTP `ETag` / `If-None-Match` (`304 Not Modified`) & VPS Systemd Sandboxing
1. **HTTP `ETag` & `If-None-Match` (`304 Not Modified`) Middleware in `_MCPHTTPHandler` (`mcp/server.py`):**
- Every `GET /api/v1/*` response computes or looks up its deterministic `ETag` (`"<dag_json_cidv1>"` from `registry_manifests` or SHA-256 payload digest).
- If the client sends `If-None-Match: "<etag>"` (or a comma-separated list containing `"<etag>"`), `_MCPHTTPHandler` records a `status_304` hit in `api-telemetry.db` and returns `HTTP 304 Not Modified` with an empty body immediately (`~95%` bandwidth reduction on repeat polls).
2. **Read-Only Catalog DB Hydration in `deploy/sync-vps-repos.sh`:**
- During Step 2 of `deploy/sync-vps-repos.sh`, invoke `"${PYTHON_BIN}" -m hyperstitionstud_io.db.sqlite_meta --build --db "${LIVE_REPOS}/hyperstition-catalog.db"` so the `512 MB` RAM-backed `tmpfs` mount always holds an up-to-date catalog DB after every repository pull.
3. **Preserving `ProtectSystem=strict` & `ReadOnlyIsolationGuard` in `deploy/hyperstition-mcp.service`:**
- Configure `RuntimeDirectory=hyperstition-mcp` (or `PrivateTmp=true` writing to `/tmp/hyperstition-api-telemetry.db`) so `hyperstition-mcp.service` writes `api-telemetry.db` only to an ephemeral tmpfs path while `/srv/hyperstitionstud.io/repos` and `/var/www/hyperstitionstud.io/repos` remain **100% read-only**.
---
## 4. Activation & Verification Checklist (When Promoted from Inactive Backlog)
1. Wire `/api/v1/meta/{manifests,search,coordinate/{aq_int},timeseries/query,telemetry}` and `ETag` / `If-None-Match` (`304 Not Modified`) into `src/hyperstitionstud_io/mcp/rest.py` and `server.py`.
2. Add `hs_query_sqlite_catalog` to `MCP_TOOLS_SCHEMA` in `src/hyperstitionstud_io/mcp/tools.py`.
3. Wire `hs-db-build` into `deploy/sync-vps-repos.sh` and add HTTP checks for `/api/v1/meta/manifests`, `/api/v1/meta/search?q=envideea`, `/api/v1/meta/coordinate/137`, `If-None-Match` -> `304 Not Modified`, and `/api/v1/meta/telemetry` to `tests/test_core_suite.py` and `deploy/test-first-deployment.sh`.
+14 -9
View File
@@ -4,12 +4,13 @@
- **Target Domain:** `https://hyperstitionstud.io` (and `https://www.hyperstitionstud.io` -> `308` redirect)
- **Upstream Git Forge:** `git.libre.audio` (`https://git.libre.audio/seasharp/<repo-slug>.git`)
- **Bundled Deployment Automation (`hyperstitionstudio-core/deploy/`):**
- `deploy/sync-vps-repos.sh` — Pulls from `git.libre.audio`, automatically supplies untracked `haiperdohp-jemaytreeah/.gitignore` runtime files (`config.js`, `db.json`, `db_lite.json`) if absent, runs `hs-doctor` and 6-gate Knowledge Graph verification, syncs per-repo install directories into RAM (`/var/www/hyperstitionstud.io/repos`), creates relative route symlinks (`/`, `/learn`, `/graph`, `/encyclopedia`, `/zoology`, `/archive`, `/calc`, `/ci`, `/schemas`), pre-compresses `.br` (Brotli-11) and `.gz` (Gzip-9) sidecars, and idempotently syncs `Caddyfile` + `systemd` units.
- `deploy/Caddyfile` — Production Caddy 2 configuration (`HTTP/3 QUIC` + `precompressed br gzip` + direct per-repo `handle_path` routing + `/mcp` reverse proxy to `127.0.0.1:8095`).
- `deploy/sync-vps-repos.sh` — Pulls from `git.libre.audio`, automatically supplies untracked `haiperdohp-jemaytreeah/.gitignore` runtime files (`config.js`, `db.json`, `db_lite.json`) if absent, runs `hs-doctor` and 6-gate Knowledge Graph verification, syncs per-repo install directories into RAM (`/var/www/hyperstitionstud.io/repos`), creates relative route symlinks (`/`, `/learn`, `/quant`, `/graph`, `/encyclopedia`, `/zoology`, `/archive`, `/calc`, `/ci`, `/schemas`), pre-compresses `.br` (Brotli-11) and `.gz` (Gzip-9) sidecars, and idempotently syncs `Caddyfile`, `systemd` units, and `/etc/logrotate.d/hyperstition-sqlite-meta`.
- `deploy/Caddyfile` — Production Caddy 2 configuration (`HTTP/3 QUIC` + `precompressed br gzip` + direct per-repo `handle_path` routing + `/mcp` and `/api/v1/*` reverse proxy to `127.0.0.1:8095`).
- `deploy/hyperstition-tmpfs-sync.service` — `systemd` unit that hydrates `/var/www/hyperstitionstud.io/repos` on VPS boot before Caddy starts.
- `deploy/hyperstition-mcp.service` — `systemd` unit running `hs-mcp --transport http --host 127.0.0.1 --port 8095` in strict read-only mode.
- `deploy/test-first-deployment.sh` — Automated 32-route + `/mcp` HTTP verification harness (verifies all portal, `/learn/`, graph, encyclopedia, `haiperdohp-jemaytreeah` `.gitignore` files `config.js`/`db_lite.json`/`db.json`, CI, schema, and `/mcp` JSON-RPC routes).
- **Bundled CLI Entrypoints (`hyperstitionstudio-core/pyproject.toml`):** `hs-doctor`, `hs-citations`, `hs-pdf-build`, `hs-kg-build`, `hs-quant-harvest` (`--mode us-closing-bell` default), `hs-mcp`, and `hs-sync-version`.
- `deploy/hyperstition-mcp.service` — `systemd` unit running `hs-mcp --transport http --host 127.0.0.1 --port 8095` in strict read-only mode while populating `/tmp/hyperstition-api-telemetry.db` (`HYPERSTITION_SQLITE_MAX_MB=100`).
- `deploy/logrotate.d/hyperstition-sqlite-meta` — Quiescent `logrotate.d` rule (`size 100M` default, `rotate 12`, `compress`, `delaycompress`, configurable via `HYPERSTITION_SQLITE_MAX_MB` / `HYPERSTITION_SQLITE_MAX_BYTES`) that compresses a consistent point-in-time SQLite snapshot (`<db>.1.gz` .. `<db>.12.gz`) and truncates the active SQLite REST/MCP API metadata database via `hs-db-build --truncate-quiescent --compress-archive` (`BEGIN EXCLUSIVE` + `PRAGMA wal_checkpoint(TRUNCATE)` + `VACUUM` + `PRAGMA integrity_check`).
- `deploy/test-first-deployment.sh` — Automated static route + `/mcp` + `/api/v1/*` + SQLite `logrotate.d` quiescent truncation verification harness.
- **Bundled CLI Entrypoints (`hyperstitionstudio-core/pyproject.toml`):** `hs-doctor`, `hs-citations`, `hs-pdf-build`, `hs-kg-build`, `hs-quant-harvest` (`--mode us-closing-bell` default), `hs-mcp`, `hs-sync-version`, and `hs-db-build`.
---
@@ -103,7 +104,7 @@ curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --d
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list >/dev/null
sudo chmod a+r /usr/share/keyrings/caddy-stable-archive-keyring.gpg /etc/apt/sources.list.d/caddy-stable.list
sudo apt update && sudo apt install -y git python3 python3-venv python3-pip brotli rsync curl caddy fonts-dejavu-core
sudo apt update && sudo apt install -y git python3 python3-venv python3-pip brotli rsync curl logrotate caddy fonts-dejavu-core
sudo tee /etc/sysctl.d/99-hyperstition-fastnet.conf >/dev/null <<'EOF'
net.core.default_qdisc = fq
@@ -164,11 +165,14 @@ python3 -m venv .venv
# 1. Hydrate /var/www/hyperstitionstud.io/repos and pre-compress (.br / .gz)
/srv/hyperstitionstud.io/repos/hyperstitionstudio-core/deploy/sync-vps-repos.sh --no-pull
# 2. Install systemd boot-time tmpfs hydration unit & read-only MCP HTTP server unit (127.0.0.1:8095)
# 2. Install systemd boot-time tmpfs hydration unit, read-only MCP HTTP server unit (127.0.0.1:8095), and quiescent SQLite logrotate rule
sudo cp /srv/hyperstitionstud.io/repos/hyperstitionstudio-core/deploy/hyperstition-tmpfs-sync.service \
/etc/systemd/system/hyperstition-tmpfs-sync.service
sudo cp /srv/hyperstitionstud.io/repos/hyperstitionstudio-core/deploy/hyperstition-mcp.service \
/etc/systemd/system/hyperstition-mcp.service
sudo cp /srv/hyperstitionstud.io/repos/hyperstitionstudio-core/deploy/logrotate.d/hyperstition-sqlite-meta \
/etc/logrotate.d/hyperstition-sqlite-meta
sudo chmod 0644 /etc/logrotate.d/hyperstition-sqlite-meta
sudo systemctl daemon-reload
sudo systemctl enable hyperstition-tmpfs-sync.service
sudo systemctl enable --now hyperstition-mcp.service
@@ -215,13 +219,14 @@ Sync the updated working tree(s) into the RAM mount and regenerate the `.br` / `
```
*(Note: If a remote tag was force-updated earlier and `git fetch --tags` rejects it with `would clobber existing tag` before `hyperstitionstudio-core` has pulled commit `b767f8a`, run `git -C /srv/hyperstitionstud.io/repos/hyperstitionstudio-core fetch --force origin main --tags && git -C /srv/hyperstitionstud.io/repos/hyperstitionstudio-core merge --ff-only origin/main` once first).*
### 5.3 Automatic Idempotent `Caddyfile` & `systemd` Sync (Default vs. `--no-caddy`)
### 5.3 Automatic Idempotent `Caddyfile`, `systemd` & `logrotate.d` Sync (Default vs. `--no-caddy`)
- **Idempotent by Default (`DO_CADDY=1`):**
Every run of `sync-vps-repos.sh` (unless `--no-caddy` or `--no-services` is passed) automatically compares `deploy/Caddyfile` against `/etc/caddy/Caddyfile` and `deploy/*.service` against `/etc/systemd/system/*.service` using `cmp -s`:
Every run of `sync-vps-repos.sh` (unless `--no-caddy` or `--no-services` is passed) automatically compares `deploy/Caddyfile` against `/etc/caddy/Caddyfile`, `deploy/*.service` against `/etc/systemd/system/*.service`, and `deploy/logrotate.d/hyperstition-sqlite-meta` against `/etc/logrotate.d/hyperstition-sqlite-meta` using `cmp -s`:
1. If `/etc/caddy/Caddyfile` is already byte-identical to `deploy/Caddyfile`, it prints `[5/5] /etc/caddy/Caddyfile is already identical to deploy/Caddyfile (no reload needed)` and performs zero unnecessary reloads.
2. If `deploy/Caddyfile` changed, it validates the new config first via `sudo caddy validate --config ... --adapter caddyfile`, copies it to `/etc/caddy/Caddyfile`, and executes a zero-downtime `sudo systemctl reload caddy`.
3. If `hyperstition-tmpfs-sync.service` or `hyperstition-mcp.service` changed, it updates `/etc/systemd/system/`, runs `sudo systemctl daemon-reload`, and ensures `hyperstition-mcp.service` is active.
4. If `/etc/logrotate.d/hyperstition-sqlite-meta` is missing or differs from `deploy/logrotate.d/hyperstition-sqlite-meta`, it installs the rule with `0644` permissions so the SQLite REST/MCP metadata database (`/tmp/hyperstition-api-telemetry.db`) is quiescently truncated at the configurable `100 MB` limit (`size 100M`, `HYPERSTITION_SQLITE_MAX_MB=100`).
- **Negating Service/Caddy Sync (`--no-caddy` / `--no-services`):**
Pass `--no-caddy` (e.g., `sync-vps-repos.sh --no-pull --no-caddy`) to sync only the RAM-backed webroot files and `.br`/`.gz` sidecars without touching `/etc/caddy/Caddyfile` or `systemd`.
- **Browser Cache Note:** `HTML`/`JS`/`JSON` routes carry `Cache-Control: public, max-age=300` (5 minutes); press `Ctrl+Shift+R` (`Cmd+Shift+R` on macOS) in your browser to bypass the 5-minute client cache immediately after syncing.
Binary file not shown.
@@ -0,0 +1,104 @@
# Plan: `/quant/` Zero-MP4 Interactive HTML5 Canvas Tutorial Tour, Interface Figure Guide & Passage-Encoded Deep-Link Citation Drawer (`v2.0.18`)
- **Document ID:** `PLAN-QUANT-TUTORIAL-VIDEO-SERIES-AND-CITATION-DEEP-LINKS` (`v2.0.18`)
- **Storage & Delivery Architecture (Option B — Zero-MP4 Interactive HTML5 Canvas / Subtitled Walkthrough, `< 150 KB` Total, 100% Git-Tracked):**
- Rather than committing multi-megabyte `.mp4` video binaries into Git or consuming space in the `512 MB` VPS `tmpfs` RAM mount, the 5-episode tutorial series resides directly in `/workspace/hyperstitionstudio-core/site/quant/` (`quant-tutorials.js`, `< 45 KB` uncompressed, `~12 KB` Brotli-11) as an **interactive, timeline-scrubbable 5-Episode Guided Canvas Player**.
- When a user plays an episode (`Ep 01` through `Ep 05`), the player programmatically drives the live `/quant/` interface in real time—switching tickers (`NVDA`, `ASML`, `ANTHR-PVT`, `LLY`), scrubbing UTC dates, toggling projection lenses, drawing animated spotlight callout rings and vector arrows directly over the live Panel 1–4 figures, displaying synchronized chapter subtitles (with optional zero-dependency browser `window.speechSynthesis` narration toggle), and presenting clickable passage-encoded citation cards at every keyframe!
- **Target Web Route & Tracked Files:**
- `/workspace/hyperstitionstudio-core/site/quant/index.html` & `quant-app.js`
- `/workspace/hyperstitionstudio-core/site/quant/quant-tutorials.js` (`window.HyperstitionStudio.QuantTutorials` — 5 episodes, 25 timed keyframes, animated canvas spotlight overlay, play/pause/scrub timeline bar, and clickable deep-link cards)
- `/workspace/hyperstitionstudio-core/site/quant/OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH.{md,pdf}` (Companion Reference Manual with clickable passage-encoded deep links)
- **Core Architectural Feature (Knowledge-Graph-Modeled Documentation & Passage-Encoded Deep-Link Citations):**
Models `/quant/`'s **Documentation & Citation Drawer** directly on the Encyclopedia Knowledge Graph's (`encyclopedia-knowledge-graph/index.html`) `ENC_BASE + volume_pdf_rel` inspector drawer, and extends every link with **RFC 3778 PDF Page/Search Fragments (`#page=N&search="verbatim_lock"`)** and **WICG Scroll-To-Text Fragments (`#:~:text=start_token,end_token`)** plus `/api/v1/dossiers/{N}?highlight=<passage>` and `/graph/index.html?select=aq:137` so clicking any figure or lock on `/quant/` (or inside the tutorial player) jumps straight to the cited passage.
---
## 1. Explaining Every Visual Figure & Numerical Readout in the `/quant/` Interface
Every curve, marker, bar, cell, and metric in `/quant/index.html` is spotlighted by the interactive tutorial player and linked in the **Documentation & Citation Drawer**:
### 1.1 Panel 1 — Synchronized 3-Pane Time-Series Canvas (`#tsCanvas`)
| Canvas Element / Figure | Visual Encoding on Screen | Mathematical & Gematrial Meaning | Passage-Encoded Encyclopedia & Dossier Deep Link |
| :--- | :--- | :--- | :--- |
| **1. Top-Pane Solid Cyan Curve** | Continuous `#22d3ee` cyan polyline across `30` UTC days (`2026-11-01 .. 2026-11-30`) | Plots the active metric selected in the **Metric Mode** bar for ticker $i$:<br/>• `Spoken AQ (Gen 1)`: $Q^{\text{spoken}}_{i,t} = \text{AQ}(\text{Ingglish}(\text{spoken}(\lfloor P_{i,t}\rceil)))$<br/>• `Close Price (USD)`: Official `21:30 UTC` closing price $P_{i,t}$<br/>• `Move (BPS)`: Daily basis-point change $\Delta\text{bps}_{i,t} = \text{round}(100 \times \Delta\%_{i,t})$<br/>• `Digit AQ`: Literal Base-36 digit sum of $\lfloor P_{i,t}\rceil$. | `/encyclopedia/01-cipher-and-orthographic-mechanics/a-to-g-alphanumeric-qabbala-to-gen-2-evolution.pdf#page=1&search=Alphanumeric%20Qabbala` |
| **2. Top-Pane Horizontal Dashed Crimson Line (`entity_ing = N`)** | Dashed `#ff4d4d` horizontal threshold line labeled with the ticker's `Gen 1` Ingglish name and `AQ` value (e.g., `envideea=137`, `asml=81`, `anthropik=193`) | Marks the instrument's **Intrinsic Phonemic Identity Coordinate ($\text{AQ}_{\text{Ing}}(\text{Entity}_i)$)**. When the cyan trajectory touches or crosses this dashed line, the asset's market price or basis-point move equals its own name in Base-36 space. | `/encyclopedia/03-machinic-phylum-singularities-s1-to-s5/s3-a-to-z-asml-to-wor-masheen.pdf#page=5&search=envideea` |
| **3. Top-Pane Gold Beacon Circles (`r = 5.2px`)** | Glowing `#f5c630` gold circles plotted directly on vertices of the cyan curve | **`Scope 1` Intra-Instrument Self-Lock or Repdigit Attractor:** Fires when $\lfloor P_{i,t}\rceil == \text{AQ}(\text{Entity}_i)$ (`NVDA` closing at `$137.00 == envideea [137]`), $|\Delta\text{bps}_{i,t}| == \text{AQ}(\text{Entity}_i)$ (`ASML` moving `+81 bps == asml [81]`), or $\lfloor P_{i,t}\rceil \equiv 0 \pmod{111}$ (`LLY` closing at `$777.00 == 7 × 111`). | `/encyclopedia/08-stakeholder-registers-idioms-and-pokedex-semiotics/a-to-h-ai-powered-race-to-hidden-chokepoint-screen.pdf#page=2&search=Room%20Filter` |
| **4. Top-Pane Cyan Beacon Circles (`r = 3.8px`)** | `#22d3ee` cyan vertex markers on the curve | **`Scope 2` Causal `S1–S6` Supply-Chain Ring Migration:** Fires when $\lfloor P_{i,t}\rceil$, $Q^{\text{spoken}}_{i,t}$, or $|\Delta\text{bps}_{i,t}|$ lands on one of the `30` canonical `S1–S6` signature ring coordinates (`71, 81, 91, 95, 115, 125, 128, 129, 133, 135, 136, 137, 153, 160, 163, 166, 183, 189, 191, 193, 197, 211, 215, 222, 237, 246, 256, 260, 292`). | `/encyclopedia/06-genealogical-vectors-and-flex-singularities/a-to-m-anchor-revision-to-multi-build-flex.pdf#page=2&search=Flex` |
| **5. Middle-Pane Violet & Emerald Histogram Bars (`Wire Eq`)** | Vertical bars showing the count of verified `333 / 666 / 777` equations synthesized in that UTC date's `00:00 GMT` news-wire dossier (`25..71-dossier-news-YYYY-MM-DD.md`) | • **Violet Bar (`#a78bfa`):** Standard `00:00 GMT` wire harvest day (ticker $i$ not named in top headlines).<br/>• **Emerald Bar (`#34d399`):** **`Scope 3` News-Wire Co-Presence Day ($C_{i,t} = 1$)** — Ticker $i$ or its entity name co-occurred in breaking wire headlines on the exact same UTC date as its market observation. | `/archive/71-dossier-news-2026-11-29.md#:~:text=Nvidia,73` |
| **6. Bottom-Pane Volume Ratio & Regime Color Bars (`Vol20d`)** | Vertical bars scaled to 20-day relative volume ($V_{i,t}/\bar{V}_{20}$) and color-coded by objective `Scope 3` thermodynamic regime | • **Gold Bar (`#f5c630`, `Vol20d < 0.45x`):** `M1_ENTROPIC_STAGNATION` (halts, low-volume freeze -> `137: hawlts == inersha == envideea`).<br/>• **Crimson Bar (`#ff4d4d`, `Δ% <= -5.0%` or `Vol20d >= 2.5x`):** `M2_FLASH_CRASH_TEMPLEX_SURGE` (`193: flash krash == anthropik`, `256: akselerayshan`).<br/>• **Sky-Blue Bar (`#38bdf8`):** Normal kinetic trading regime (`M3_LEVIATHAN` active for `$1T+` market caps). | `/encyclopedia/05-memetic-superclass-m1-to-m7/m1-a-to-m-anemia-to-monopoly.pdf#page=1&search=M1` |
| **7. Vertical Gold Crosshair Line** | Full-height vertical gold cursor line (`rgba(245,198,48,0.45)`) | Synchronizes all three canvas panes, the Panel 2 heatmap column, and the Panel 3 cross-sectional inspector to the selected UTC date $t$. | Interactive UI control (`Click` canvas or press `←` / `→`). |
### 1.2 Panel 2, Panel 3 & Panel 4 Figures
- **Panel 2 (`24 Tickers × 30 UTC Days` Spatiotemporal Heatmap):**
- Each row is one of the `24` `S1–S6` tickers (`↗` opens its live TradingView Superchart in a new browser window); each column is a UTC day (`01..30`).
- **Gold Cell (`hm-scope1`):** Scope 1 Intra-Instrument Self-Lock on that `(Ticker, Date)`.
- **Cyan Cell (`hm-scope2`):** Scope 2 `S1–S6` Ring Migration on that `(Ticker, Date)`.
- **Emerald Outline (`hm-wire`):** Ticker co-occurred in that UTC day's `00:00 GMT` news-wire dossier (`Scope 3`).
- **Panel 3 (Cross-Sectional Date Inspector, Multi-Lens Card, Documentation Citations & Verbatim Equation Tape):**
- Top 6 telemetry boxes display the exact values at date $t$: `Close USD (Change bps)`, `Spoken Close (Gen 1 AQ)`, `Scaled Cap (Gen 1 AQ)`, `BPS Spoken AQ / Vol20d`, `Active Contingent Locks`, and `00:00 GMT Wire Co-Present`.
- Middle **Lens Projection Card (`LENS_REGISTRY`)** dynamically projects the instrument's 6 lens-neutral time-series moments (`ts_duty_cycle_pct`, `ts_weighted_resonance`, `ts_excess_over_replacement`, `ts_quantile_profile`, `ts_optimal_lag_days`, `ts_regime_splits`) and 30-day sparkline (`▁▂▃▄▅▆▇█`) into the selected lens (`Quant Factor`, `Neutral Math`, `Corporate Board`, `TierZoo (ETI)`, `Fantasy Sabermetrics`, or `Pokédex Scanner`).
- **Knowledge-Graph-Modeled Documentation & Cited Passages Card:** Displays the ticker's Encyclopedia Volume PDF deep link (`#page=N&search=...`), Knowledge Graph node deep link (`/graph/index.html?select=aq:N`), exemplar Dossier scroll-to-text link (`#:~:text=...`), and REST API JSON/passage link (`/api/v1/dossiers/N?highlight=...`).
- Bottom **Dated Memetic Equation Tape** lists the verbatim `333 / 666 / 777` equations from that date's `*-dossier-news-YYYY-MM-DD.md` archive file, each with its own clickable `#:~:text=` passage deep link and inline REST passage preview button.
- **Panel 4 (Lead-Lag Cross-Correlation Histogram $r(\tau)$ at $\tau \in [-5, +5]$ Days):**
- Plots the empirical Pearson correlation $r(\tau)$ between daily news-wire equation velocity $M_t$ and unsigned ticker basis-point displacement $|\Delta\text{bps}_{i, t+\tau}|$, highlighting the optimal causal lag $\tau^*$ in gold.
---
## 2. Option B Interactive Tutorial Player Architecture (`/quant/quant-tutorials.js`)
Instead of static `.mp4` video files, `/quant/` includes an integrated **5-Episode Interactive Canvas Tutorial Player** directly below the top toolbar:
```text
+---------------------------------------------------------------------------------------------------+
| INTERACTIVE TUTORIAL SERIES PLAYER (Zero-MP4 Live Canvas Choreographer • < 45 KB Git-Tracked) |
| [ Ep 01: Periodicity Gate ] [ Ep 02: 3-Pane Canvas & Locks ] [ Ep 03: Heatmap & Deep Citations ] |
| [ Ep 04: Modular Lens Switcher ] [ Ep 05: Lead-Lag r(tau) & REST API ] |
| +-----------------------------------------------------------------------------------------------+ |
| | [ ▶ Play / Pause ] [ ⏮ Prev Step ] [ Step 2/5 (00:18 / 00:45) ━━━━●━━━━━━ ] [ ⏭ Next ] [ 🔊 ] | |
| | SUBTITLE & CALLOUT: "Notice the Gold Circle on Nov 30 ($137.00): NVDA's integer close equals | |
| | its own Gen 1 Ingglish coordinate (envideea = 137 [33rd PRIME])—a Scope 1 Self-Lock." | |
| | CITED SOURCES: [ 📄 Vol 03C PDF (p.5 "envideea") ↗ ] [ 📜 Dossier 71 Passage ↗ ] [ 🕸️ aq:137 ]| |
| +-----------------------------------------------------------------------------------------------+ |
+---------------------------------------------------------------------------------------------------+
```
### 2.1 How Each Episode Choreographs the Live Interface (`5` Episodes × `5` Timed Keyframes = `25` Interactive Scenes)
When an episode plays (auto-advancing every `7 seconds` per keyframe or stepped manually via `⏮ / ⏭` or timeline scrubbing):
1. **State Synchronization:** Each keyframe sets `{guildFilter, selectedSymbol, selectedLens, metricMode, selectedDateIdx}` on the live `/quant/` state machine and triggers `renderAll()`.
2. **Canvas Spotlight & Callout Overlay:** Draws a pulsing gold/rose spotlight ring, vector callout arrow, and HUD label directly on `#tsCanvas` (or highlights the target DOM panel `#heatmapTable`, `#lensProjectionCard`, `#docReferencesCard`, `#lagBarsContainer`) pointing to the exact figure being explained.
3. **Passage-Encoded Citation Bar:** Renders clickable deep-link pills for the exact Encyclopedia PDF page (`#page=N&search=...`), Dossier passage (`#:~:text=...`), REST API passage preview (`/api/v1/dossiers/{N}?highlight=...`), and Knowledge Graph node (`/graph/index.html?select=aq:N`) referenced in that scene.
| Episode ID | Title & Focus | Live State Choreography & Spotlighted Figures |
| :--- | :--- | :--- |
| **Ep 01** | **The Strict Periodicity Gate & Watchlist Topology** | Steps through `ALL -> S1 -> S3 -> S6` guild filters, spotlights the Periodicity Audit Footer (`20` dated `00:00 UTC` dossiers + `30` daily `21:30 UTC` closing-bell bars, `0` non-periodic static records), and links to `Vol 08A#page=2&search=Room%20Filter` and `/archive/00-index-and-methodology.md#:~:text=closing-bell,continuity`. |
| **Ep 02** | **Reading Panel 1: Spoken AQ Curves, Gold/Cyan Beacons & Regimes** | Focuses `NVDA` (`$137 == envideea [137]`), `ASML` (`+81 bps == asml [81]`), and `LLY` (`$777` repdigit); switches between `Close Price (USD)`, `Move (BPS)`, and `Spoken AQ (Gen 1)`; spotlights the dashed crimson `entity_ing=N` threshold, Gold (`Scope 1`) vs. Cyan (`Scope 2`) beacons, Emerald (`Scope 3`) wire co-presence bars, and `M1/M2/M3` volume bars. |
| **Ep 03** | **Panels 2 & 3: The 24×30 Lock Heatmap, TradingView & Deep Citations** | Scrubs across the `24 × 30` heatmap (`ANTHR-PVT` `$83 -> $89 [193]` on `2026-11-26`, `NVDA` on `2026-11-29`), highlights the `Open TradingView Chart ↗` launcher (`T`), and demonstrates clicking the passage-encoded Encyclopedia PDF (`#page & search`), Dossier (`#:~:text=`), and inline `/api/v1/dossiers/71?highlight=` preview buttons. |
| **Ep 04** | **Hot-Swapping Projection Lenses (`LENS_REGISTRY` Reversibility)** | Holds `NVDA` at `2026-11-30` while cycling the **Projection Lens** selector through `Quant Factor`, `Neutral Math`, `Corporate Board`, `TierZoo (ETI)`, `Fantasy Sabermetrics`, and `Pokédex Scanner` (`DEX #137`), proving how the exact same 6 lens-neutral mathematical moments (`ts_*`) re-project without altering a single underlying number. |
| **Ep 05** | **Panel 4: Lead-Lag Cross-Correlation $r(\tau)$, Exports & REST/SQLite APIs** | Spotlights Panel 4's correlation bars $r(\tau)$ across $\tau \in [-5, +5]$ days and the Gold optimal causal lag $\tau^*$, demonstrates `.CSV` and `.JSON` export, and links directly to `/api/v1/quant/timeseries?symbol=NVDA` and `/api/v1/openapi.json`. |
---
## 3. Four-Phase Implementation Roadmap (`Phases 1–4`)
### Phase 1: Enrich `quant/timeseries.py`, `mcp/rest.py` & `encyclopedia-knowledge-graph/index.html` with Deep-Link Resolution
1. In `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/quant/timeseries.py`, attach `doc_references` (`encyclopedia_volume_rel`, `encyclopedia_deep_link` with `#page=N&search=...`, `knowledge_graph_deep_link` with `/graph/index.html?select=aq:N`, `exemplar_dossier_deep_link` with `#:~:text=...`, `rest_api_deep_link`, and `verbatim_citation_passage`) to every instrument, guild build, and dated wire equation (`dossier_deep_link`, `api_highlight_link`, `graph_hub_links`), and regenerate `quant-timeseries.json` and `quant-timeseries-data.js`.
2. In `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/mcp/rest.py`, add `?highlight=<passage>` support to `GET /api/v1/dossiers/{number}` so it returns `matched_passages` (line numbers + verbatim surrounding lines) alongside the dossier Markdown.
3. In `/workspace/encyclopedia-knowledge-graph/index.html`, add URL query parameter handling (`?select=<node_id>&mode=<mode_id>`) on startup so clicking a Knowledge Graph deep link from `/quant/` immediately selects, centers, and opens the right-hand Encyclopedia drawer for that node.
### Phase 2: Build `/workspace/hyperstitionstudio-core/site/quant/quant-tutorials.js` & Update `/quant/index.html` + `quant-app.js`
1. Create `site/quant/quant-tutorials.js` containing the 5-episode, 25-keyframe interactive canvas choreographer, timeline scrubber, canvas spotlight/arrow overlay renderer, optional Web Speech narration toggle, and inline REST passage preview modal.
2. Update `site/quant/index.html` and `site/quant/quant-app.js` to render:
- The collapsible **Interactive Tutorial Series Player (`Ep 01–Ep 05`)** and **Visual Figure Legend**,
- The Knowledge-Graph-modeled **Documentation & Cited Passages Card** in Panel 3, and
- Passage-encoded `#:~:text=` deep links + inline passage preview buttons on every equation in the Dated Memetic Equation Tape.
3. Register `site/quant/quant-tutorials.js` in `version_sync.py`.
### Phase 3: Write `/quant/OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH.{md,pdf}`
1. Author `/workspace/hyperstitionstudio-core/site/quant/OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH.md` and compile `.pdf` via `hs-pdf-build`, providing the complete reference manual for `/quant/` with clickable passage-encoded links.
### Phase 4: Verification in `tests/test_core_suite.py` & `deploy/test-first-deployment.sh`
1. Add unit assertions in `tests/test_core_suite.py` verifying `doc_references` (`#page=`, `#:~:text=`, `?select=aq:`) on `/quant/` instruments and equations, and verifying `GET /api/v1/dossiers/65?highlight=292` returns `matched_passages`.
2. Add `/quant/quant-tutorials.js` and `/quant/OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH.pdf` to `deploy/test-first-deployment.sh`.
@@ -0,0 +1,246 @@
# Plan: Lightweight Standalone SQLite + FTS5 Metadata & Telemetry Database (`metadata.db`) Engine (`v2.0.18`)
- **Document ID:** `PLAN-SQLITE-REST-API-METADATA-DB` (`v2.0.18`)
- **Roadmap Status:** **ACTIVE / READY** (Core `hyperstitionstud_io.db.sqlite_meta` + `hs-db-build` CLI + automatic population of the SQLite metadata/telemetry database on every `/api/v1/*` REST and `/mcp` JSON-RPC call)
- **Target Modules:**
- `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/db/__init__.py` & `sqlite_meta.py` (`hs-db-build` CLI & SQLite/FTS5 catalog + telemetry engine)
- `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/mcp/rest.py` (`dispatch_rest_v1` telemetry hook populating SQLite on every `/api/v1/*` call)
- `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/mcp/server.py` (`dispatch_jsonrpc` telemetry hook populating SQLite on every `/mcp` JSON-RPC call)
- `/workspace/hyperstitionstudio-core/deploy/logrotate.d/hyperstition-sqlite-meta` (Quiescent `logrotate.d` truncation at configurable default `100M` / `100 MB` limit)
- `/workspace/hyperstitionstudio-core/pyproject.toml` (`hs-db-build` entry point)
- `/workspace/hyperstitionstudio-core/tests/test_core_suite.py` (Unit verification that `/api/v1/*` and `/mcp` calls populate the SQLite metadata/telemetry DB and `logrotate.d` quiescently truncates it)
- **Explicitly Deferred Scope (Moved to Long-Term Inactive Plan `PLAN-SQLITE-META-REST-ENDPOINTS-ETAG-AND-VPS-SYNC`):**
Exposing HTTP `/api/v1/meta/{manifests,search,coordinate/{aq_int},timeseries/query,telemetry}`, HTTP `ETag` / `If-None-Match` (`304 Not Modified`) middleware, MCP tool `hs_query_sqlite_catalog`, and wiring `hs-db-build` into `deploy/sync-vps-repos.sh` remain **inactive** in `/workspace/encyclopedia-knowledge-graph/docs/PLAN-SQLITE-META-REST-ENDPOINTS-ETAG-AND-VPS-SYNC.{md,pdf}` alongside all other inactive plans.
- **Zero External Dependencies:** Built **100% on Python's standard-library `sqlite3` module** (`0` third-party ORMs, `0` external DB daemons).
- **Core Architectural Separation (Immutable Catalog Index vs. Ephemeral Runtime Telemetry):**
To preserve the strict `ReadOnlyIsolationGuard` guarantees while enabling both sub-millisecond indexed search and local telemetry rollups in Python, the SQLite architecture splits cleanly into **two lightweight SQLite database files** (connected simultaneously via `ATTACH DATABASE` or dedicated connections):
1. **Catalog Metadata & FTS5 Index DB (`hyperstition-catalog.db`, Read-Only at Runtime, `mode=ro`):**
Compiled deterministically via `hs-db-build` (`python3 -m hyperstitionstud_io.db.sqlite_meta --build`). Indexes all `282` glossary entries, `190` bilingual lexical specimens, `388` Knowledge Graph nodes, `1,282` edges, `71` archive dossiers, `1,850+` verified `333/666/777` equations, `24 × 30` periodic time-series bars, and all `CIDv1` registry digests with **SQLite FTS5 (`BM25`) full-text search** and B-tree integer indices on `ing_aq`, `eng_aq`, `target_sum`, `symbol`, and `date_utc`.
2. **Runtime Telemetry & Audit DB (`api-telemetry.db`, WAL Mode):**
Lightweight, append-only SQLite database (`PRAGMA journal_mode=WAL; PRAGMA synchronous=NORMAL;`) that records privacy-preserving per-operation call counts, status tallies, execution latency ($\text{p50 / p95 / p99}$ microseconds), and `ReadOnlyIsolationGuard` audit receipts—without storing any client IP addresses, cookies, or PII.
---
## 1. Why a Standalone SQLite + FTS5 Metadata DB Transforms Local Corpus Querying & Observability
Currently, querying across `glossary-registry.json`, `encyclopedia-graph.json`, `quant-timeseries.json`, and the `71` Markdown dossiers requires reading and parsing multiple `.json` and `.md` files (`~12–45 ms` of file I/O and regex parsing per call).
By introducing the dual SQLite metadata layer (`hyperstitionstud_io.db.sqlite_meta`):
| Capability | Current File-Scan / Regex Behavior | With Standalone SQLite + FTS5 (`hyperstitionstud_io.db.sqlite_meta`) | Improvement |
| :--- | :--- | :--- | :--- |
| **1. Sub-Millisecond Indexed Lookups (`B-Tree`)** | Parses `encyclopedia-graph.json` (`1.4 MB`), `glossary-registry.json`, or `quant-timeseries.json` on each call (`12–28 ms`). | Point & range queries against B-tree indices (`idx_specimens_ing_aq`, `idx_bars_sym_date`, `idx_nodes_id`) execute in **`80–250 microseconds` (`< 0.25 ms`)**. | **`50x–120x` faster** |
| **2. Full-Text Search Across All 71 Dossiers & 282 Glossary Terms (`FTS5 BM25`)** | Linear `glob("*.md")` + Python substring/regex scan across 71 files (`25–45 ms`), no relevance ranking. | Single `SELECT ... FROM fts_catalog WHERE fts_catalog MATCH ? ORDER BY bm25(fts_catalog)` query with snippet highlighting and prefix matching in **`< 0.6 ms`**. | **Ranked `BM25` + `60x` faster** |
| **3. Multi-Table Relational Joins in One Query (`SQL`)** | Requires multiple separate Python passes to join a ticker (`NVDA`), its `AQ` coordinate (`137`), its Knowledge Graph neighbors, and its dated `333/666/777` archive equations. | Single indexed SQL join across `quant_timeseries_bars`, `kg_nodes`, `kg_edges`, and `archive_equations` via `query_coordinate_join(137)`. | **1 query instead of 4 passes** |
| **4. Cryptographic Provenance & `CIDv1` Registry Manifest Table** | Re-computes SHA-256 and `dag-json` `CIDv1` digests over raw files on demand. | `registry_manifests` table stores pre-computed `dag_json_cidv1` (`baguqeera...`), `raw_sha256`, and `record_count` per compiled registry. | **Instant `< 0.1 ms` digest lookup** |
| **5. Zero-PII Telemetry & Latency Rollups (`api-telemetry.db`)** | Stateless stdout only; zero structured persistence of query latency or `ReadOnlyIsolationGuard` verification counts. | Append-only WAL table `api_endpoint_rollups` and 200-event ring buffer `api_audit_ringbuffer` track call counts, status tallies, mean/max latency ($\mu\text{s}$), and `ReadOnlyIsolationGuard` pass counts in `<= 64 KB`. | **Deterministic local audit rollups** |
---
## 2. Relational & FTS5 Schema Design (`hyperstition-catalog.db` & `api-telemetry.db`)
### 2.1 Read-Only Catalog & Search Database (`hyperstition-catalog.db`)
```sql
-- 1. Cryptographic Registry & Schema Provenance Manifests
CREATE TABLE registry_manifests (
registry_slug TEXT PRIMARY KEY, -- e.g. 'glossary-registry', 'encyclopedia-graph', 'quant-timeseries'
source_path TEXT NOT NULL,
schema_urn TEXT NOT NULL,
version TEXT NOT NULL,
record_count INTEGER NOT NULL,
raw_sha256 TEXT NOT NULL,
dag_json_cidv1 TEXT NOT NULL, -- 'baguqeera...'
byte_size INTEGER NOT NULL,
compiled_at_utc TEXT NOT NULL
) WITHOUT ROWID;
-- 2. Canonical Glossary & Bilingual Vocabulary Specimens (282 Glossary + 190 Bilingual Specimens)
CREATE TABLE glossary_entries (
entry_id INTEGER PRIMARY KEY,
term TEXT NOT NULL UNIQUE,
category TEXT NOT NULL,
section_id TEXT NOT NULL,
eng_aq INTEGER NOT NULL,
ing_term TEXT NOT NULL,
ing_aq INTEGER NOT NULL,
delta INTEGER NOT NULL,
is_isometric INTEGER NOT NULL, -- 0 or 1
is_twin_prime INTEGER NOT NULL, -- 0 or 1
division_id TEXT,
volume_pdf TEXT,
definition TEXT NOT NULL
);
CREATE INDEX idx_glossary_ing_aq ON glossary_entries(ing_aq);
CREATE INDEX idx_glossary_eng_aq ON glossary_entries(eng_aq);
CREATE INDEX idx_glossary_cat ON glossary_entries(category);
-- 3. Knowledge Graph Nodes (388 Nodes) & Deduplicated Edges (1,282 Edges)
CREATE TABLE kg_nodes (
node_id TEXT PRIMARY KEY, -- e.g. 'aq:137', 'build:S1', 'spec:envideea'
node_urn TEXT NOT NULL UNIQUE,
node_type TEXT NOT NULL,
label TEXT NOT NULL,
aq_value INTEGER,
degree INTEGER NOT NULL,
is_flex_pivot INTEGER NOT NULL DEFAULT 0,
guild_id TEXT,
metadata_json TEXT NOT NULL
) WITHOUT ROWID;
CREATE INDEX idx_kg_nodes_aq ON kg_nodes(aq_value);
CREATE INDEX idx_kg_nodes_type ON kg_nodes(node_type);
CREATE TABLE kg_edges (
source_id TEXT NOT NULL,
target_id TEXT NOT NULL,
relation TEXT NOT NULL,
weight REAL NOT NULL DEFAULT 1.0,
PRIMARY KEY (source_id, target_id, relation)
) WITHOUT ROWID;
CREATE INDEX idx_kg_edges_target ON kg_edges(target_id);
CREATE INDEX idx_kg_edges_rel ON kg_edges(relation);
-- 4. Archive & Zoology Dossiers (01..71) & Verified Multi-Scale Equations (333 / 666 / 777)
CREATE TABLE dossiers (
dossier_number INTEGER PRIMARY KEY, -- 1..71
file_name TEXT NOT NULL UNIQUE,
title TEXT NOT NULL,
is_periodic_news INTEGER NOT NULL, -- 1 for *-dossier-news-YYYY-MM-DD.md, 0 for static dossiers
date_utc TEXT, -- 'YYYY-MM-DD' if periodic news/quant dossier, else NULL
equation_count INTEGER NOT NULL,
sha256 TEXT NOT NULL
);
CREATE INDEX idx_dossiers_date ON dossiers(date_utc) WHERE date_utc IS NOT NULL;
CREATE TABLE archive_equations (
eq_id TEXT PRIMARY KEY, -- Content-addressed key: e.g. 'eq_333_envideea_0042'
dossier_number INTEGER NOT NULL,
date_utc TEXT, -- Populated if from dated periodic dossier
target_sum INTEGER NOT NULL, -- 333, 666, 777, etc.
ing_phrase TEXT NOT NULL,
eng_gloss TEXT NOT NULL,
breakdown TEXT NOT NULL,
word_count INTEGER NOT NULL,
FOREIGN KEY (dossier_number) REFERENCES dossiers(dossier_number)
) WITHOUT ROWID;
CREATE INDEX idx_eq_target ON archive_equations(target_sum);
CREATE INDEX idx_eq_date ON archive_equations(date_utc) WHERE date_utc IS NOT NULL;
-- 5. Periodic Quantitative Financial Time-Series Bars (24 Tickers x T UTC Days — Strictly Periodic Only)
CREATE TABLE quant_timeseries_bars (
symbol TEXT NOT NULL,
date_utc TEXT NOT NULL,
entity_eng TEXT NOT NULL,
entity_ing TEXT NOT NULL,
entity_ing_aq INTEGER NOT NULL,
guilds_csv TEXT NOT NULL,
tradingview_symbol TEXT NOT NULL,
tradingview_url TEXT NOT NULL,
close_usd REAL NOT NULL,
change_pct REAL NOT NULL,
change_bps INTEGER NOT NULL,
volume_ratio_20d REAL NOT NULL,
market_cap_str TEXT NOT NULL,
close_digit_aq INTEGER NOT NULL,
close_spoken_ing TEXT NOT NULL,
close_spoken_ing_aq INTEGER NOT NULL,
scaled_cap_spoken_ing_aq INTEGER NOT NULL,
bps_spoken_ing_aq INTEGER NOT NULL,
co_present_in_news_wire INTEGER NOT NULL,
contingent_points REAL NOT NULL,
locks_json TEXT NOT NULL,
PRIMARY KEY (symbol, date_utc)
) WITHOUT ROWID;
CREATE INDEX idx_qbars_date ON quant_timeseries_bars(date_utc);
CREATE INDEX idx_qbars_close_aq ON quant_timeseries_bars(close_spoken_ing_aq);
CREATE INDEX idx_qbars_ent_aq ON quant_timeseries_bars(entity_ing_aq);
-- 6. Unified FTS5 Full-Text Search Virtual Table (BM25 Ranked Search Across Glossary, Graph & Equations)
CREATE VIRTUAL TABLE fts_catalog USING fts5(
doc_type, -- 'glossary' | 'equation' | 'node' | 'dossier' | 'instrument'
doc_id, -- Primary key / URI
title_or_ing, -- Headword or Ingglish phrase
gloss_or_body, -- English gloss, definition, or breakdown
aq_coord, -- Integer AQ coordinate(s) as text tokens
guild_tags, -- S1..S6, M1..M7+
tokenize = 'unicode61 remove_diacritics 2'
);
```
### 2.2 Runtime Telemetry & Audit Database (`api-telemetry.db` — WAL Mode, Zero PII)
```sql
PRAGMA journal_mode = WAL;
PRAGMA synchronous = NORMAL;
-- 1. Per-Operation Aggregated Request & Latency Rollups (Bounded to <= 100 rows total!)
CREATE TABLE IF NOT EXISTS api_endpoint_rollups (
protocol TEXT NOT NULL, -- 'python_api' | 'cli' | 'rest_v1' | 'mcp_jsonrpc'
method TEXT NOT NULL, -- 'CALL' | 'GET' | 'POST'
endpoint_pattern TEXT NOT NULL, -- e.g. 'sqlite_meta:query_coordinate_join'
total_requests INTEGER NOT NULL DEFAULT 0,
status_2xx INTEGER NOT NULL DEFAULT 0,
status_304 INTEGER NOT NULL DEFAULT 0,
status_4xx INTEGER NOT NULL DEFAULT 0,
status_5xx INTEGER NOT NULL DEFAULT 0,
total_latency_us INTEGER NOT NULL DEFAULT 0,
max_latency_us INTEGER NOT NULL DEFAULT 0,
last_called_utc TEXT NOT NULL,
PRIMARY KEY (protocol, method, endpoint_pattern)
) WITHOUT ROWID;
-- 2. Ring-Buffer of Last 200 Isolation & Harvest Audit Events (Auto-Pruned via Trigger)
CREATE TABLE IF NOT EXISTS api_audit_ringbuffer (
event_id INTEGER PRIMARY KEY AUTOINCREMENT,
timestamp_utc TEXT NOT NULL,
endpoint TEXT NOT NULL,
status_code INTEGER NOT NULL,
latency_us INTEGER NOT NULL,
isolation_ok INTEGER NOT NULL -- 1 = ReadOnlyIsolationGuard verified
);
```
*(By aggregating telemetry by `(protocol, method, endpoint_pattern)` and capping `api_audit_ringbuffer` at the most recent `200` rows, `api-telemetry.db` never grows past `~64 KB` on disk).*
---
## 3. Python Query & CLI Surface (`hyperstitionstud_io.db.sqlite_meta` & `hs-db-build`)
`hyperstitionstud_io.db.sqlite_meta` exposes a clean, self-contained Python API and CLI (`hs-db-build`) operating strictly over `hyperstition-catalog.db` (`mode=ro` on query) and `api-telemetry.db`:
| Python Function / CLI Flag | Arguments | What It Queries or Builds in SQLite (`< 1 ms`) |
| :--- | :--- | :--- |
| `build_catalog_sqlite_db(db_path=None)` / `hs-db-build --build` | `db_path: Path \| None` | Compiles `registry_manifests`, `glossary_entries`, `kg_nodes`, `kg_edges`, `dossiers`, `archive_equations`, `quant_timeseries_bars`, and `fts_catalog` while verifying source registries remain untouched under `ReadOnlyIsolationGuard`, then runs `PRAGMA optimize; VACUUM;`. |
| `query_registry_manifests(db_path=None, registry=None)` / `hs-db-build --manifests` | `registry: str \| None` | Queries `registry_manifests` for all compiled schemas/registries, their record counts, `raw_sha256`, and `dag_json_cidv1`. |
| `query_fts_catalog(query, doc_type="all", limit=25, db_path=None)` / `hs-db-build --search <q>` | `query: str`, `doc_type: str`, `limit: int` | Executes a ranked **FTS5 `BM25` full-text search** across `fts_catalog` (searching glossary terms, 1,850+ equations, 388 graph nodes, and 24 tickers in `< 0.6 ms`). |
| `query_coordinate_join(aq_int, db_path=None)` / `hs-db-build --coordinate <N>` | `aq_int: int` (`1..999`, e.g. `137` or `125`) | **Unified Cross-Corpus Coordinate Join:** In a single indexed SQL query, returns every glossary term, bilingual specimen, Knowledge Graph node/edge, `333/666/777` archive equation, and `/quant/` closing-bell bar that locks onto integer coordinate `aq_int`. |
| `query_timeseries_bars(symbol=None, start_date=None, end_date=None, min_points=0.0, db_path=None)` / `hs-db-build --timeseries` | `symbol`, `start_date`, `end_date`, `min_points` | Executes indexed range queries over `quant_timeseries_bars` (`WHERE symbol = ? AND date_utc BETWEEN ? AND ? AND contingent_points >= ?`). |
| `record_api_telemetry(...)` & `get_api_telemetry_summary(telemetry_db_path=None)` / `hs-db-build --telemetry` | `protocol`, `method`, `endpoint_pattern`, `status_code`, `latency_us`, `isolation_ok` | Writes/reads `api_endpoint_rollups` and the latest 25 rows of `api_audit_ringbuffer` in `api-telemetry.db` (`<= 200` ring-buffer cap). |
---
## 4. Three-Phase Implementation Roadmap (`Phases 1–3`)
### Phase 1: Implement `hyperstitionstud_io.db.sqlite_meta` & `hs-db-build` CLI
1. Create `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/db/__init__.py` and `sqlite_meta.py` implementing:
- `build_catalog_sqlite_db(db_path)` & `ensure_catalog_sqlite_db(db_path)` (compiles `registry_manifests`, `glossary_entries`, `kg_nodes`, `kg_edges`, `dossiers`, `archive_equations`, `quant_timeseries_bars`, and the `fts_catalog` FTS5 index while verifying source repositories are never mutated, then runs `PRAGMA optimize; VACUUM;`),
- `query_registry_manifests(db_path, registry=None)` (opens `file:...?mode=ro` with `PRAGMA query_only = ON;`),
- `query_fts_catalog(query, doc_type="all", limit=25, db_path=None)`,
- `query_coordinate_join(aq_int, db_path=None)`,
- `query_timeseries_bars(symbol=None, start_date=None, end_date=None, min_points=0.0, db_path=None)`, and
- `record_api_telemetry(protocol, method, endpoint_pattern, status_code, latency_us, isolation_ok, telemetry_db_path=None)` + `get_api_telemetry_summary(telemetry_db_path=None)`.
2. Register `hs-db-build = "hyperstitionstud_io.db.sqlite_meta:main"` in `/workspace/hyperstitionstudio-core/pyproject.toml`.
### Phase 2: Wire Automatic SQLite Population into `dispatch_rest_v1` (`mcp/rest.py`) & `dispatch_jsonrpc` (`mcp/server.py`)
1. In `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/mcp/rest.py`, wrap `dispatch_rest_v1(method, raw_path, body_bytes)` with high-resolution `time.perf_counter_ns()` timing and a `finally` hook calling `record_api_telemetry(protocol="rest_v1", method=method, endpoint_pattern=normalized_route, status_code=status, latency_us=elapsed_us, isolation_ok=isolation_verified)` so every `/api/v1/*` REST API call automatically populates `api_endpoint_rollups` and `api_audit_ringbuffer` in the SQLite metadata/telemetry database (`api-telemetry.db`).
2. In `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/mcp/server.py`, wrap `dispatch_jsonrpc(req)` with `time.perf_counter_ns()` timing and a `finally` hook calling `record_api_telemetry(protocol="mcp_jsonrpc", method="POST", endpoint_pattern=rpc_pattern, status_code=status, latency_us=elapsed_us, isolation_ok=isolation_verified)` (e.g. `tools/call:hs_evaluate_aq_and_ingglish`, `resources/read`, `prompts/get`) so every MCP call also populates the SQLite database.
3. Ensure `record_api_telemetry()` writes strictly to a safe writable path (`HYPERSTITION_TELEMETRY_DB_PATH` or `/tmp/hyperstition-api-telemetry.db` fallback when under systemd `ProtectSystem=strict`) and never raises if the filesystem is read-only.
4. Create `/workspace/hyperstitionstudio-core/deploy/logrotate.d/hyperstition-sqlite-meta` (`size 100M` default, `rotate 12`, `compress`, `delaycompress`, configurable via `HYPERSTITION_SQLITE_MAX_MB` / `HYPERSTITION_SQLITE_MAX_BYTES`) with a `prerotate` block calling `python3 -m hyperstitionstud_io.db.sqlite_meta --truncate-quiescent --compress-archive` (`BEGIN EXCLUSIVE` + consistent SQLite snapshot compressed to `<db>.1.gz` + table purge + `PRAGMA wal_checkpoint(TRUNCATE)` + `VACUUM` + `PRAGMA integrity_check == 'ok'`).
### Phase 3: Verification in `tests/test_core_suite.py`
1. Add unit tests in `tests/test_core_suite.py` verifying:
- `build_catalog_sqlite_db()` table row counts (`282+` glossary rows, `388` nodes, `1,282` edges, `71+` dossiers, `720` periodic time-series bars),
- Sub-millisecond FTS5 `BM25` search via `query_fts_catalog("envideea")`,
- Unified coordinate join via `query_coordinate_join(137)`,
- Indexed periodic bar range queries via `query_timeseries_bars(symbol="NVDA", min_points=1.0)`,
- Executing `/api/v1/*` REST API calls (`dispatch_rest_v1`) and `/mcp` JSON-RPC calls (`dispatch_jsonrpc`) automatically populates `api_endpoint_rollups` and `api_audit_ringbuffer` (`<= 200` ring-buffer cap, `status_2xx`, `isolation_ok == 1`) in the SQLite database while leaving all inactive plan routes (`/api/v1/meta/*`, `hs_query_sqlite_catalog`, `/gallery/`) unexposed, and
- Executing `run_logrotate_directive()` / `truncate_telemetry_db_quiescent()` against `/workspace/hyperstitionstudio-core/deploy/logrotate.d/hyperstition-sqlite-meta` verifies the default `100M` (`100 MB`) threshold and quiescently truncates the SQLite database when the threshold is reached (`PRAGMA integrity_check == 'ok'`).
Binary file not shown.
+137
View File
@@ -0,0 +1,137 @@
# Plan: Static Patronage & Signal-Support Subpage (`/donate/`) for `hyperstitionstud.io` (`v2.0.18`)
- **Document ID:** `PLAN-STATIC-DONATE-SUBPAGE` (`v2.0.18`)
- **Target Web Route:** `https://hyperstitionstud.io/donate/` (`/donate/index.html`)
- **Offline `file://` Path:** `/workspace/hyperstitionstudio-core/site/donate/index.html`
- **Editorial Approach:** **Rhetorical, Inquiry-Driven, and Accessible to a General Enthusiast Audience with a Touch of Cybernetic Edge.**
- *Show, Don't Perform:* Rather than talking about its own posture, disclaimers, or lack of paywalls ("you don't need to donate," "the servers are fine"), the page goes straight to the intrigue of the phenomenon itself—inviting the reader into the questions that drive the workbench: *Why do disconnected events in the evening news keep landing on the same coordinates? What happens when you strip away the polite spelling of a corporate filing and listen to the raw phonemic signal underneath? Where are the hidden load-bearing walls of the modern economy?*
- **Global Footer & Portability Compliance:** 100% static HTML/CSS/JS with zero external scripts or third-party payment trackers, automatic `file://` vs. `https://` navigation adaptation, participation in `hs-sync-version`, and the global `"Made with ♥ by Lemurs."` (`&#x2665;`) footer.
---
## 1. Rhetorical Translation: Turning Institutional Proposals into Open Questions That Spark Curiosity
The existing stakeholder proposals (`/workspace/technocapital-singularity-zoology/proposal-*.md`) argue that standard models are blind to structural convergence, hidden bottlenecks, and sudden regime flips. On `/donate/`, we strip away the institutional finance and systems-engineering armor and reframe those ideas as **invitations to look closer**:
| Core Theme from the Proposals | The Technical Trap (Avoided on `/donate/`) | The Rhetorical Hook on `/donate/` (Invoking Curiosity with a Cybernetic Edge) |
| :--- | :--- | :--- |
| **1. Paper Appearance vs. Spoken Signal** | Explaining CMUdict phoneme tables, Base-36 character offsets, and variance-collapse formulas. | **"Have you ever noticed how differently the world looks when you stop reading how it's spelled and start listening to how it sounds?"**<br/>On paper, *synthetic data*, an *abstract machine*, and *asset management* belong to separate professions. Strip away silent letters and score the raw spoken stream, and they snap onto the exact same coordinate. Coincidence is the easy answer—until it happens ten nights in a row. |
| **2. Flashy Surfaces vs. Quiet Bottlenecks** | Listing GICS sector classifications, supply-chain factor loadings, or isometric $\Delta = 0$ equations. | **"Everyone watches the spectacle on the stage. Who owns the floorboards?"**<br/>Every hype cycle has its stars, and every star depends on a handful of quiet, unmovable chokepoints—a single laser maker in the Netherlands, a single wafer foundry in Taiwan, a single clause in a corporate charter—that never budge when the narrative shifts. We map the floorboards. |
| **3. Signal vs. Apophenia (Why Context Matters)** | Detailing Scope 1–3 contingent meaning gates, null-hypothesis baselines, or cron schedules. | **"Anyone can find patterns in a phonebook if they look long enough. What happens when you refuse to look outside the room?"**<br/>We don't go fishing through dictionaries to force a match. We only pay attention when a collision happens inside the same news story, the same supply chain, or the same closing bell—when a chipmaker closes at the exact dollar figure of its own name on the night it leads the wire. |
| **4. Keeping the Cover Off the Circuit** | Listing Brotli-11 compression ratios, HTTP/3 QUIC headers, or self-referential "no paywall" disclaimers. | **"What happens when an instrument leaves the cover off so anyone can inspect the wiring?"**<br/>An instrument is most interesting when the readout is right in front of you—complete with the raw equations, the underlying graph, and the live tape—so you can test your own hypotheses and see what locks together next. |
---
## 2. Page Layout & Narrative Flow (`/donate/index.html`)
Styled in the signature `hyperstitionstud.io` dark-slate monospace palette (`#020617` canvas, `#0f172a` panels, `#22d3ee` cyan, `#f5c630` gold, `#34d399` emerald, `#fb7185` rose):
```text
+---------------------------------------------------------------------------------------------------+
| HEADER: hyperstitionstud.io/donate — Signal Patronage & Open-Instrument Notes |
| [ Portal Home (/) ] [ Time-Series (/quant/) ] [ Knowledge Graph (/graph/) ] [ Calculator (/calc/) ]|
+---------------------------------------------------------------------------------------------------+
| HERO ESSAY: "What If Language, Market Tape, and Breaking News Are Dials on the Same Circuit?" |
| +---------------------------------------------------------------+-----------------------------+ |
| | Opens directly on the phenomenon that caught the visitor's | +-----------------------+ | |
| | eye: watching scattered headlines, supply-chain bottlenecks, | | ( ♥ DONATE ↗ ) | | |
| | and closing-bell prices snap onto identical coordinates once | +-----------------------+ | |
| | silent letters drop away—and why this workbench leaves the | Prominent tactile vector | |
| | cover off the circuit so anyone can trace the signal. | pill button (gold/amber | |
| +---------------------------------------------------------------+ glossy bevel + heart/coin | |
| emblem, anchored to #fuel)| |
+---------------------------------------------------------------------------------------------------+
| SECTION 1: Three Questions That Keep This Workbench Running |
| +-------------------------------+-------------------------------+-----------------------------+ |
| | 01 // The Ghost in the | 02 // The Load-Bearing | 03 // The Discipline of | |
| | Spelling | Chokepoints | the Room | |
| | Written English is a museum | Every gold rush sells picks | Finding a match in a | |
| | of dead letters. What happens | and shovels—until there is | dictionary is a parlor | |
| | when you strip a headline | only one company on earth | trick. Finding it inside | |
| | down to pure spoken sound | that can print the shovel. | the same headline and the | |
| | and watch rival empires land | How do you spot the | same closing bell is a | |
| | on the same number? | unmovable nodes before the | signal worth watching. | |
| | | crowd does? | | |
| +-------------------------------+-------------------------------+-----------------------------+ |
+---------------------------------------------------------------------------------------------------+
| SECTION 2: "Try a Wire Experiment" — Interactive Curiosity Sandbox |
| • "Click a live collision below—or type two things that shouldn't belong together—and watch |
| what happens when the silent letters drop." |
| - Curated Curiosity Prompts: |
| [ The Founder & The Flash Crash ] [ Synthetic Data & Asset Management ] |
| [ The Chip Laser & The Balance Sheet ] [ The War Machine & The Copper Wire ] |
+---------------------------------------------------------------------------------------------------+
| SECTION 3: Backing the Signal (Where Patronage Goes) |
| • Direct, substantive note on what contributions fuel: expanding the daily midnight wire and |
| closing-bell harvests, producing new multi-voice audio expeditions, and extending the |
| open-source graph and encyclopedia volumes. |
+---------------------------------------------------------------------------------------------------+
| SECTION 4: Fuel the Reactor (Direct Contribution Channels) |
| • Centered Primary Tactile Vector Donate Button (`( ♥ DONATE )` — opens/copies active channel) |
| • One-click copyable addresses (`BTC`, `ETH`, `SOL`, `XMR`) & `git.libre.audio` patronage |
| • Open-source exploration paths: test an idea in `/calc/`, trace a bridge in `/graph/`, |
| or fork the repositories and build an instrument of your own. |
+---------------------------------------------------------------------------------------------------+
| FOOTER: hyperstitionstud.io/donate v2.0.18 • Made with ♥ by Lemurs. |
+---------------------------------------------------------------------------------------------------+
```
### 2.1 Prominent, Proportionally Scaled Tactile Vector "Donate" Button Specification (Inspired by Classic Adobe Stock Vector Donate Badges)
To give `/donate/` an unmistakable, tactile visual centerpiece—while keeping `0` external image requests (`100%` inline SVG + CSS3 gradients/bevels for offline `file://` portability)—the page features a **classic glossy vector pill "DONATE" button** situated prominently and proportionally in two places:
1. **Hero Split-Column Anchor (`260px × 68px` desktop / `220px × 58px` mobile):** Positioned in the right-hand column of the Hero Banner (`grid-template-columns: 1fr auto`, vertically centered with generous breathing room) so it immediately anchors the eye without crowding the typography, smooth-scrolling to `#fuel-channels` (and flashing the active patronage drawer) when clicked.
2. **Section 4 Primary Action Centerpiece (`280px × 72px`):** Centered above the contribution address cards, where clicking it copies the selected contribution address or opens the selected patronage URI with tactile press-down feedback (`transform: translateY(2px)`).
**Visual & Proportional Anatomy of the Inline SVG + CSS Tactile Donate Button:**
- **Shape & Proportions:** Classic stadium/pill silhouette (`border-radius: 999px`, `aspect-ratio ~ 3.8 : 1`), framed by a brushed metallic/dark-slate outer bezel (`3px` ring with subtle cyan/gold rim light) so the glossy vector badge sits naturally against the `#0f172a` dark panel.
- **Glossy Vector Surface & Bevel:** Warm amber-gold to crimson-coral multi-stop linear gradient (`linear-gradient(180deg, #ffd86b 0%, #f59e0b 48%, #d97706 52%, #b45309 100%)`) with a crisp top-half specular glass highlight arc (`rgba(255,255,255,0.38)`), inner top bevel (`inset 0 2px 2px rgba(255,255,255,0.6)`), and raised 3D drop shadow (`0 6px 0 #78350f, 0 12px 24px rgba(245, 158, 11, 0.35)`).
- **Left Emblem Badge (Circular Inset Coin/Heart-in-Hand SVG Icon):** A circular recessed badge (`44px × 44px`) on the left inside the pill containing a crisp vector **Heart-and-Signal-Coin SVG emblem**, paired with bold, high-contrast uppercase `DONATE` lettering (`font-size: 1.22rem`, `letter-spacing: 0.08em`, subtle text-emboss shadow) and a micro-subtitle (`TOSS FUEL IN THE REACTOR`).
---
## 3. Revised Full-Page Copy (`/donate/index.html`) — Zero Self-Referential Affect Claims
### 3.1 Hero Essay: *"What If Language, Market Tape, and Breaking News Are Dials on the Same Circuit?"*
> Spend ten minutes exploring the Knowledge Graph, the calculator, or the closing-bell timeline, and you will run into something that makes you pause.
>
> Strip away the silent letters of standard English, and *synthetic data* and *abstract machine* land on the exact same coordinate as written *asset management*. Follow the fault lines of a market selloff, and *Dario Amodei*, *Anthropic*, and *flash crash* lock together across written and spoken scripts—or a trillion-dollar chipmaker closes at the exact dollar price of its own phonemic name on the night it leads the global news wire.
>
> Most instruments are built to smooth those anomalies away—to sort the world into tidy, separate compartments where linguistics stays in one room, supply-chain bottlenecks stay in another, and market prices stay in a third.
>
> `hyperstitionstud.io` was built to see what happens when you wire those rooms together. Every evening at the US market close and the midnight UTC news rollover, our collectors harvest live headlines and core technocapital tickers, decode them into spoken phonemes, and map where the circuits cross—leaving the cover off the machine so anyone curious enough can trace the signal for themselves.
### 3.2 Three Questions That Keep This Workbench Running
1. **`01 // What is English hiding inside its spelling?`**
Written English is an archaeological dig. Every word carries centuries of silent letters, borrowed scribal habits, and visual camouflage. When you decode a sentence into pure spoken sound—one spelling per phoneme—the camouflage drops away. Concepts that look miles apart in a press release or an earnings report suddenly collapse onto the exact same coordinate. Is that just a quirk of information compression, or is language acting like a low-level routing protocol for how culture and capital organize themselves? We'd rather measure it than guess.
2. **`02 // Where are the quiet walls that never move?`**
Every technology boom is loud at the edges and silent at the center. Dozens of labs race to build the flashiest model or the fastest trading desk, while the entire spectacle quietly funnels through a handful of physical and legal bottlenecks—a single extreme-ultraviolet laser builder, a single wafer foundry, a corporate charter, a power grid. In our tables, certain words refuse to drift by a single point between how they are written on paper and how they sound out loud. Watching how the noisy stories orbit those fixed points tells you a lot about where leverage actually sits.
3. **`03 // What happens when you outlaw dictionary fishing?`**
Numerology gets a bad reputation for a simple reason: if you let yourself rummage through a 200,000-word dictionary after the fact, you can connect any number to anything. That's a parlor trick. So we enforce a stricter rule: *stay in the room*. Only evaluate the words, people, and prices that actually showed up together in the same day's news wire, the same supply chain, or the same closing bell. When the locks still fire under that constraint, the question stops being *"can you find a pattern?"* and becomes *"why did these specific pieces fall into place at the same time?"*
### 3.3 Backing the Signal
> Every tool on `hyperstitionstud.io`—the 388-node property graph, the 22-volume encyclopedia, the multi-cipher calculator, the closing-bell time-series workbench, and the public API—is open, downloadable for offline travel, and built to show you the raw readout so you can test your own hypotheses.
>
> Patronage directly fuels the next layer of the instrument: keeping the public HTTP/3 relays fast, expanding the daily midnight wire and closing-bell harvests, synthesizing new full-length episodes of *The Encyclopedia Expeditions*, and charting new divisions of the archive.
>
> If a lock, a dossier, or an hour spent exploring the graph sparked a new line of thought, you can toss fuel into the reactor via the button or addresses below—or fork the repositories on `git.libre.audio` and build an instrument of your own.
---
## 4. Three-Phase Implementation Roadmap (`Phases 1–3`)
### Phase 1: Build `/workspace/hyperstitionstudio-core/site/donate/index.html`
1. Create `/workspace/hyperstitionstudio-core/site/donate/index.html` featuring:
- The inquiry-driven hero essay and 3-question grid in Section 3 above (with zero self-referential "calm/unbothered" or "you don't need to donate" meta-commentary),
- The **Prominent Tactile Vector "DONATE" Button** (classic glossy bevel pill with circular SVG heart/coin emblem, top specular highlight arc, and 3D tactile press state, proportionally situated in the Hero right column and centered above Section 4's contribution channels),
- The **"Try a Wire Experiment"** interactive curiosity sandbox (4 clickable story pills—*The Founder & The Flash Crash*, *Synthetic Data & Asset Management*, *The Chip Laser & The Balance Sheet*, *The War Machine & The Copper Wire*—plus a live input box that reveals how written spelling strips down to spoken sound),
- Zero-tracker contribution cards (`BTC`, `ETH`, `SOL`, `XMR` one-click copy + `git.libre.audio/seasharp` open-source patronage + non-monetary exploration links),
- Automatic `file://` vs. `https://` link resolution, and
- The global `"Made with ♥ by Lemurs."` (`&#x2665;`) footer.
### Phase 2: Wire Right-Justified Stadium-Pill Donate Button (`Option 3`) & `version_sync.py`
1. In `site/index.html`, `site/quant/index.html`, and `site/learn/index.html`, place a right-justified (`margin-left: auto; justify-content: flex-end`), `34px`-tall stadium-pill `( ♥ DONATE )` button (`.btn-donate-pill`, `border-radius: 999px`, preceded by a `1px solid #334155` vertical divider `.nav-donate-sep`, featuring a `20px × 20px` circular inset `.donate-pill-emblem` and warm amber-gold bevel) as the `:last-child` flush with the right inner header padding boundary—without altering the single-row height or modifying existing `.badge` telemetry counters. *(Option 1—folding the 3 passive telemetry counters into `.subtitle`—is preserved as a separate Long-Term Inactive Plan in `docs/PLAN-HEADER-SUBTITLE-TELEMETRY-CONSOLIDATION-ALTERNATIVE.{md,pdf}`; Option 2 is discarded).*
2. Register `core / "site" / "donate" / "index.html"` in `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/version_sync.py` and in `test_offline_urn_namespaces_and_no_external_https_fonts()` inside `tests/test_core_suite.py`.
### Phase 3: Wire into `deploy/sync-vps-repos.sh` & `deploy/test-first-deployment.sh`
1. Add `${LIVE_SUDO} ln -sfn "hyperstitionstudio-core/site/donate" "${LIVE_REPOS}/donate"` in `/workspace/hyperstitionstudio-core/deploy/sync-vps-repos.sh`.
2. Add `"/donate/index.html"` to `ROUTES` in `/workspace/hyperstitionstudio-core/deploy/test-first-deployment.sh` and verify `HTTP 200 OK`.
Binary file not shown.
+4 -1
View File
@@ -7,7 +7,7 @@
> - **Production VPS & Git Operator Deployment Guide:** `../VPS-AND-GIT-OPERATOR-DEPLOYMENT-GUIDE.pdf` (and `.md`)
> - **Cross-Repository Dependency & Audit Flow Diagram:** `../cross-repo-dependency-and-audit-flow-diagram.html` (and `.png` / `.pdf`)
> - **Concentric ETI Radar (`D Periphery`) Specification:** `../specification-concentric-eti-tier-ring-radar-d-periphery.pdf` (and `.md`)
> - **Active / Deferred Roadmap Plans in `../`:** `../PLAN-LLM-TOKEN-ECONOMIZER-AND-VARIANCE-ROUTING.{md,pdf}` (active outstanding plan) and `../PLAN-MEMETIC-GALLERY-SUBPAGE.{md,pdf}` (long-term deferred plan).
> - **Active / Deferred Roadmap Plans in `../`:** All active `v2.0.19` plans are now implemented and archived below; `../PLAN-HEADER-SUBTITLE-TELEMETRY-CONSOLIDATION-ALTERNATIVE.{md,pdf}`, `../PLAN-SQLITE-META-REST-ENDPOINTS-ETAG-AND-VPS-SYNC.{md,pdf}`, `../PLAN-LLM-TOKEN-ECONOMIZER-AND-VARIANCE-ROUTING.{md,pdf}`, and `../PLAN-MEMETIC-GALLERY-SUBPAGE.{md,pdf}` are preserved in `../` as long-term inactive/deferred plans.
---
@@ -32,3 +32,6 @@
| `PLAN-TIERZOO-AND-POKEDEX-TIMESERIES-SABERMETRICS-ENRICHMENT.{md,pdf}` | Specification for longitudinal time-series moments (`SNAP%`, `WOPR`, `LOE`, `WAR_30d`, `Floor/Ceil/Boom%`, `Optimal Lag τ*`, `Regime Splits`) and deterministic Gen IV Pokédex attributes; now implemented in `hyperstitionstud_io.quant.timeseries` and `classify_technocapital_singularity.py --pokedex-card`. |
| `PLAN-QUANTITATIVE-FINANCE-TIMESERIES-SUBPAGE.{md,pdf}` | Specification for the `/quant/` interactive time-series workbench (`site/quant/{index.html,quant-app.js,quant-timeseries-data.js}`) and TradingView `EXCHANGE:SYMBOL` new-window launcher; now implemented and live at `/quant/`. |
| `PLAN-MCP-REST-API-ADAPTER.{md,pdf}` | Specification for the unified stateless REST API v1 (`/api/v1/*`) and OpenAPI 3.1.0 adapter (`/api/v1/openapi.json`) on `hs-mcp` (`127.0.0.1:8095`); now implemented in `hyperstitionstud_io.mcp.{rest,server}` and `deploy/Caddyfile`. |
| `PLAN-SQLITE-REST-API-METADATA-DB.{md,pdf}` | Specification for the standalone SQLite + FTS5 catalog & telemetry engine (`hyperstitionstud_io.db.sqlite_meta`, `hs-db-build`), automatic `/api/v1/*` and `/mcp` telemetry population (`api-telemetry.db`), and quiescent `logrotate.d` snapshot compression (`deploy/logrotate.d/hyperstition-sqlite-meta`, default `100M`); now implemented and verified in `tests/test_core_suite.py` and `deploy/test-first-deployment.sh`. |
| `PLAN-STATIC-DONATE-SUBPAGE.{md,pdf}` | Specification for the `/donate/` signal patronage & open-instrument subpage (`site/donate/index.html`) and Option 3 right-justified `34px` stadium-pill `( ♥ DONATE )` navbar button across `site/index.html`, `site/learn/index.html`, and `site/quant/index.html`; now implemented and live at `/donate/`. |
| `PLAN-QUANT-TUTORIAL-VIDEO-SERIES-AND-CITATION-DEEP-LINKS.{md,pdf}` | Specification for the Option B Zero-MP4 5-episode, 25-scene interactive HTML5 canvas tutorial player (`site/quant/quant-tutorials.js`), passage-encoded deep links (`#page=N&search=...`, `#:~:text=...`, `/graph/index.html?select=aq:N`, `/api/v1/dossiers/N?highlight=...`), and `site/quant/OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH.{md,pdf}`; now implemented and verified in `tests/test_core_suite.py` and `deploy/test-first-deployment.sh`. |
@@ -120,7 +120,7 @@
<div class="pulse-dot"></div>
<h1>Cross-Repository Dependency Graph &amp; Auditable Build &rarr; Test &rarr; Stage_Commit Pipeline</h1>
</div>
<p class="subtitle">Sibling Repositories under /workspace: ingglish-hyperdope-gematria &bull; technocapital-singularity-zoology (v2.0.18) &bull; encyclopedia-knowledge-graph (v2.0.18)</p>
<p class="subtitle">Sibling Repositories under /workspace: ingglish-hyperdope-gematria &bull; technocapital-singularity-zoology (v2.0.23) &bull; encyclopedia-knowledge-graph (v2.0.23)</p>
</div>
<!-- Main SVG Diagram -->
+1 -1
View File
@@ -2,7 +2,7 @@
"$schema": "./schemas/v1/encyclopedia-graph.schema.json",
"$id": "urn:io:hyperstitionstud:schema:v1:encyclopedia-graph",
"namespace_urn": "urn:io:hyperstitionstud:ns:kg:1.0",
"version": "2.0.18",
"version": "2.0.23",
"encyclopedia_base_path": "../technocapital-singularity-zoology/encyclopedia",
"upstream_repository": "/workspace/technocapital-singularity-zoology",
"isolation_verified": {
+1 -1
View File
@@ -3,7 +3,7 @@ window.HyperstitionStudio.EncyclopediaGraphData = {
"$schema": "./schemas/v1/encyclopedia-graph.schema.json",
"$id": "urn:io:hyperstitionstud:schema:v1:encyclopedia-graph",
"namespace_urn": "urn:io:hyperstitionstud:ns:kg:1.0",
"version": "2.0.18",
"version": "2.0.23",
"encyclopedia_base_path": "../technocapital-singularity-zoology/encyclopedia",
"upstream_repository": "/workspace/technocapital-singularity-zoology",
"isolation_verified": {
+32 -4
View File
@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Encyclopedia of Technocapital Singularity Zoology — Interactive Knowledge Graph (v2.0.18)</title>
<title>Encyclopedia of Technocapital Singularity Zoology — Interactive Knowledge Graph (v2.0.23)</title>
<style>
:root {
--bg-canvas: #121318;
@@ -268,7 +268,7 @@
<header>
<div class="brand">
<h1>ENCYCLOPEDIA OF TECHNOCAPITAL SINGULARITY ZOOLOGY — INTERACTIVE KNOWLEDGE GRAPH</h1>
<p>Standalone Sibling Repository (/workspace/encyclopedia-knowledge-graph) • 388 Nodes • 1,282 Deduplicated Edges • Zero Glossary Leak &bull; v2.0.18</p>
<p>Standalone Sibling Repository (/workspace/encyclopedia-knowledge-graph) • 388 Nodes • 1,282 Deduplicated Edges • Zero Glossary Leak &bull; v2.0.23</p>
</div>
<div class="toolbar">
<button class="btn active" data-mode="mode2_radar">Mode 2: ETI Radar (S+ -> D Periphery)</button>
@@ -321,7 +321,7 @@
</aside>
</div>
<footer class="hs-global-footer" style="background:#1A1D26;border-top:1px solid #323846;padding:4px 14px;text-align:center;font-size:11px;color:#9BA3B8;z-index:20;">
<span class="hs-lemur-credit">hyperstitionstud.io/graph v2.0.18 &bull; Made with <span class="hs-heart" role="img" aria-label="love" style="color:#FB7185;display:inline-block;padding:0 2px;">&#x2665;</span> by Lemurs.</span>
<span class="hs-lemur-credit">hyperstitionstud.io/graph v2.0.23 &bull; Made with <span class="hs-heart" role="img" aria-label="love" style="color:#FB7185;display:inline-block;padding:0 2px;">&#x2665;</span> by Lemurs.</span>
</footer>
<script src="graph-data.js"></script>
@@ -797,7 +797,35 @@
window.addEventListener("resize", resizeCanvas);
resizeCanvas();
selectNode(nodeMap["build:S1"] || DATA.nodes[0]);
// Deep-link query parameter support (?select=aq:137&mode=mode2_radar)
const urlParams = new URLSearchParams(window.location.search || "");
const reqMode = urlParams.get("mode");
if (reqMode && ["mode1_trophic", "mode2_radar", "mode3_bipartite"].includes(reqMode)) {
currentMode = reqMode;
document.querySelectorAll("[data-mode]").forEach(b => {
b.classList.toggle("active", b.getAttribute("data-mode") === reqMode);
});
}
const reqSelect = (urlParams.get("select") || "").trim();
let initialNode = nodeMap["build:S1"] || DATA.nodes[0];
if (reqSelect) {
const selLow = reqSelect.toLowerCase();
const selCoord = selLow.replace(/^aq:/, "");
const matchedNode = nodeMap[reqSelect] || DATA.nodes.find(n =>
String(n.id).toLowerCase() === selLow ||
String(n.ing_aq || "") === selCoord ||
String(n.aq_value || "") === selCoord ||
String(n.label || "").toLowerCase().includes(selLow)
);
if (matchedNode) {
initialNode = matchedNode;
}
}
selectNode(initialNode);
if (reqSelect && initialNode) {
centerOnNode(initialNode);
}
})();
</script>
</body>
@@ -705,7 +705,7 @@ def build_graph(upstream_repo: Path = UPSTREAM_REPO_DEFAULT) -> dict[str, Any]:
"$schema": "./schemas/v1/encyclopedia-graph.schema.json",
"$id": URN_SCHEMA_GRAPH,
"namespace_urn": URN_GRAPH_NS,
"version": "2.0.18",
"version": "2.0.23",
"encyclopedia_base_path": "../technocapital-singularity-zoology/encyclopedia",
"upstream_repository": str(upstream_repo),
"isolation_verified": {