Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1287e52b1f | ||
|
|
73eed52a43 | ||
|
|
d9f4413847 | ||
|
|
40be2ac8d3 |
No files matched your search
@@ -0,0 +1,95 @@
|
||||
# Plan: Comprehensive Exposure of All Workspace Capabilities, Compilers, Curricula & Documentation via MCP (`/mcp`) and Chatbot REST API (`/api/v1/*`) (`v2.2.1`)
|
||||
|
||||
- **Document ID:** `PLAN-COMPREHENSIVE-MCP-AND-CHATBOT-REST-API-CAPABILITY-EXPOSURE` (`v2.2.1`)
|
||||
- **Roadmap Status:** **ACTIVE / READY**
|
||||
- **Core Architectural & Governance Mandates:**
|
||||
1. **100% Capability & Documentation Coverage Across All 6 Repositories:** Every functional capability, quantitative/macro/Bayesian dataset, Guile Scheme `Z`-combinator evaluator, programmatic SemVer/EROFS diagnostic, `/engineering/` (`E0–E5`) and `/math/` (`M0–M5`) explication hub/subpage, Novice Prerequisite Ladder, `/learn/` module, `/quant/` tutorial episode & `ⓘ` popover glossary, Operator's Manual, stakeholder proposal, active/deferred plan, and cold-rotated historical plan (`completed-plans-archive.tar.gz`) must be inspectable and queryable via both **MCP (`/mcp`)** and the **Chatbot OpenAPI 3.1.0 REST Adapter (`/api/v1/tools/*` & `/api/v1/resources/*`)**.
|
||||
2. **Zero New Bespoke REST Routes in `src/hyperstitionstud_io/mcp/rest.py`:** All new capabilities are registered in `MCP_TOOLS_SCHEMA` (`src/hyperstitionstud_io/mcp/tools.py`), `STATIC_RESOURCES` / `RESOURCE_TEMPLATES` (`src/hyperstitionstud_io/mcp/resources.py`), and `MCP_PROMPTS` (`src/hyperstitionstud_io/mcp/prompts.py`), so the existing generic `/api/v1/tools/{tool_name}`, `/api/v1/resources/{slug}`, and `/api/v1/openapi.json` adapter exposes them automatically (`0` custom route patterns added to `rest.py`).
|
||||
3. **100% Read-Only & `ProtectSystem=strict` (`EROFS`) Compliant (`0` LLM Tokens):** Cold-rotated plans inside `completed-plans-archive.tar.gz` are extracted strictly in memory via `tarfile` without touching disk, and every new tool is automatically swept under simulated `ProtectSystem=strict` (`EROFS`) by `src/hyperstitionstud_io/ci/erofs_harness.py`.
|
||||
- **Target Modules & Files:**
|
||||
- `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/mcp/tools.py`
|
||||
- `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/mcp/resources.py`
|
||||
- `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/mcp/prompts.py`
|
||||
- `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/ci/erofs_harness.py`
|
||||
- `/workspace/hyperstitionstudio-core/tests/test_core_suite.py`
|
||||
|
||||
---
|
||||
|
||||
## 1. Exhaustive Capability & Documentation Gap Audit (`v2.2.1`)
|
||||
|
||||
| Capability / Documentation Domain | Current State in `v2.2.1` | Gap Addressed by This Plan |
|
||||
| :--- | :--- | :--- |
|
||||
| **1. `/engineering/` (`E0–E5`) & `/math/` (`M0–M5`) Explication Hubs, Subpages & Novice Prerequisite Ladders** | Generated as static HTML/JSON in `site/engineering/` and `site/math/`, but **not** exposed via MCP tools or `/api/v1/*`. | Expose via new MCP tool **`hs_inspect_engineering_and_math_docs`** and static resources `engineering-manifest` & `math-manifest`. |
|
||||
| **2. Guile Scheme & `Z`-Combinator Pedagogical Lens (`guile_prelude.scm` & S-Expression Evaluation)** | Runs in browser (`hs-guile-scheme-repl.js`), but cannot be evaluated or queried via MCP or Chatbot REST API. | Expose via new MCP tool **`hs_evaluate_guile_scheme_z_calculus`** (supporting exact rationals `p/q`, float conversion, `β-reduction` trace, and cartridge lookup) + resource `guile-prelude`. |
|
||||
| **3. Operator's Manuals, Deployment Guides, Stakeholder Proposals & Specifications** | Stored as `.md`/`.pdf` files on disk (`OPERATORS-MANUAL-*`, `VPS-AND-GIT-OPERATOR-DEPLOYMENT-GUIDE`, `ONBOARDING-INGGLISH-AQ`, `proposal-*`, `specification-*`), but only `dossier:{01..71}` is readable via MCP. | Expose via new MCP tool **`hs_inspect_documentation_and_manuals`** (with keyword/passage search, full Markdown retrieval, and PDF deep-link URLs) and resource template `urn:io:hyperstitionstud:doc:{doc_slug}`. |
|
||||
| **4. Cold-Rotated Completed Plans (`completed-plans-archive.tar.gz`) & Active/Deferred Roadmap Plans** | `76` completed `.md`/`.pdf` files in `encyclopedia-knowledge-graph/docs/archive/completed-plans-archive.tar.gz` + `5` in `zoology/docs/archive/` are indexed in `archive-manifest.json` but not queryable via API. | Expose in-memory `.tar.gz` plan listing and full `.md` extraction inside **`hs_inspect_documentation_and_manuals`** (`archive_rotator.py` in-memory `tarfile` reader — `0` disk writes, `EROFS`-safe). |
|
||||
| **5. Interactive `/learn/` Curriculum (`Modules 1–6`) & `/quant/` Guided Tour (`5` Episodes) + `27` `ⓘ` Glossary Popovers** | Embedded in `site/learn/learn-app.js`, `site/quant/quant-tutorials.js`, and `site/quant/quant-app.js`, but not exposed via `/mcp` or `/api/v1/*`. | Expose structured `/learn/` curriculum modules, `/quant/` 5-episode tutorial scenes, and all `27` `QUANT_TERM_GLOSSARY` `ⓘ` definitions + PDF deep-links via **`hs_inspect_documentation_and_manuals`**. |
|
||||
| **6. SQLite FTS5 Unified Catalog Search (`hyperstition-meta.db`), Programmatic Version Heuristics (`--explain-bump`) & `EROFS`/Baseline Audit State** | Implemented in `db/sqlite_meta.py`, `version_sync.py`, and `ci/public_regression.py`, but not exposed via MCP tools. | Expose via new MCP tool **`hs_query_workspace_catalog_and_release_state`**. |
|
||||
| **7. IPLD `dag-json` (`0x0129`) `CIDv1` Registry Map (`hs_compute_ipld_dag_json_cid`)** | `reg_map` in `mcp/tools.py` only lists 7 v1 registries (`glossary-registry` .. `encyclopedia-graph`). | Expand `reg_map` to include `quant-timeseries`, `real-macro-indicators`, `daily-brief-latest`, `engineering-manifest`, `math-manifest`, and `archive-manifest` (`13` named registries total). |
|
||||
|
||||
---
|
||||
|
||||
## 2. Detailed Specification of the 4 New MCP / Chatbot REST Tools (`MCP_TOOLS_SCHEMA`)
|
||||
|
||||
### 2.1 `hs_inspect_engineering_and_math_docs`
|
||||
- **Endpoint:** `GET/POST /api/v1/tools/hs_inspect_engineering_and_math_docs` & MCP `tools/call`
|
||||
- **Parameters:**
|
||||
- `domain` (`"all" | "engineering" | "math"`, default `"all"`): Select `/engineering/` (`E0–E5`), `/math/` (`M0–M5`), or both.
|
||||
- `unit_filter` (`string`, default `""`): Optional unit ID or subpage slug (`"E0".."E5"`, `"M0".."M5"`, `"ciphers-and-phonetics"`, `"base36-algebra-and-primes"`, etc.).
|
||||
- `include_guile_cartridges` (`boolean`, default `True`): Include the 3-column Homoiconic Tri-View (`math_view`, `py_view`, `scm_expr`, and `challenge`) for each unit.
|
||||
- **Returns:**
|
||||
- Full live-introspected manifests (`engineering-manifest.json` & `math-manifest.json`), algebraic conservation invariants, CLI scripts table, Novice Prerequisite Ladders (`expertise_level`, `prerequisites`, `public_resources`), subpage explication sections, and Guile Scheme cartridges.
|
||||
|
||||
### 2.2 `hs_inspect_documentation_and_manuals`
|
||||
- **Endpoint:** `GET/POST /api/v1/tools/hs_inspect_documentation_and_manuals` & MCP `tools/call`
|
||||
- **Parameters:**
|
||||
- `category` (`"all" | "manuals" | "proposals_and_specs" | "active_and_deferred_plans" | "archived_plans" | "learn_and_tutorials" | "quant_glossary_popovers"`, default `"all"`).
|
||||
- `doc_id` (`string`, default `""`): Optional document slug or plan ID (e.g. `"OPERATORS-MANUAL-LLM-TOKEN-DEPENDENT-DATA-PIPELINES"`, `"VPS-AND-GIT-OPERATOR-DEPLOYMENT-GUIDE"`, `"PLAN-LOCAL-SERVER-SIDE-WEB-CHATBOT-GUI"`, or any cold-archived plan like `"PLAN-HS-PDF-BUILD-DARK-MODE-AND-GLYPH-SANITIZATION"`).
|
||||
- `search_query` (`string`, default `""`): Optional case-insensitive keyword or phrase to search across all manuals, plans (including inside `completed-plans-archive.tar.gz` in memory!), `/learn/` modules, and `/quant/` tutorial scenes / `ⓘ` popovers.
|
||||
- `include_full_markdown` (`boolean`, default `False`): When `True` (or when `doc_id` is specified), returns the complete Markdown text of the matching document(s).
|
||||
- **Returns:**
|
||||
- Catalog of all documentation artifacts with canonical web PDF routes (`/graph/*.pdf`, `/quant/*.pdf`, `/zoology/*.pdf`, `/ci/*.pdf`), cold-archive manifest metadata (`bundle_sha256`, `member_count`), matched passages with line numbers, `/learn/` modules, `/quant/` tutorial scenes, and `27` `ⓘ` popover definitions.
|
||||
|
||||
### 2.3 `hs_evaluate_guile_scheme_z_calculus`
|
||||
- **Endpoint:** `GET/POST /api/v1/tools/hs_evaluate_guile_scheme_z_calculus` & MCP `tools/call`
|
||||
- **Parameters:**
|
||||
- `expression` (`string`, default `'(aq-base36 "LEMUR")'`): S-expression to evaluate against the preloaded `guile_prelude.scm` environment (`Z`, `limit`, `derivative`, `nth-derivative`, `riemann-integral`, `adaptive-simpson`, `aq-base36`, `digital-root-mod9`, `prime-factors`, `variance-pop`, `eti-score`, `confluence-dose`, `bayes-update`, `evaluate-bump-scope`).
|
||||
- `include_trace` (`boolean`, default `True`): Return step-by-step `β-reduction` call trace.
|
||||
- `include_prelude_source` (`boolean`, default `False`): Include the full canonical `publishing/guile_prelude.scm` source code.
|
||||
- **Returns:**
|
||||
- Exact rational / symbolic result (`formatted`), floating-point approximation (`float_value`), `β-reduction` trace steps, and optional `guile_prelude.scm` source.
|
||||
|
||||
### 2.4 `hs_query_workspace_catalog_and_release_state`
|
||||
- **Endpoint:** `GET/POST /api/v1/tools/hs_query_workspace_catalog_and_release_state` & MCP `tools/call`
|
||||
- **Parameters:**
|
||||
- `fts_query` (`string`, default `""`): Optional SQLite FTS5 full-text search query across `glossary_entries`, `kg_nodes`, and `dossiers` in `.cache/hyperstition-meta.db` (with automatic read-only JSON fallback if the `.cache` DB is absent).
|
||||
- `include_version_bump_heuristics` (`boolean`, default `True`): Include the zero-token `compute_programmatic_version_bump()` (`--explain-bump`) report.
|
||||
- `include_baseline_and_telemetry` (`boolean`, default `True`): Include the cached `.cache/internal-test-baseline-latest.json` summary (`erofs_protect_system_strict_audit`, canary values, `CIDv1` map) and `get_api_telemetry_summary()`.
|
||||
|
||||
---
|
||||
|
||||
## 3. Expanded MCP URN Resources (`src/hyperstitionstud_io/mcp/resources.py`)
|
||||
|
||||
Add 7 new static URN resources to `STATIC_RESOURCES` (all automatically accessible via `GET /api/v1/resources/{slug}` and MCP `resources/read`):
|
||||
1. `urn:io:hyperstitionstud:resource:quant-timeseries` (`site/quant/quant-timeseries.json`)
|
||||
2. `urn:io:hyperstitionstud:resource:macro-indicators` (`site/quant/real-macro-indicators.json`)
|
||||
3. `urn:io:hyperstitionstud:resource:daily-brief` (`site/quant/daily-brief-latest.json`)
|
||||
4. `urn:io:hyperstitionstud:resource:engineering-manifest` (`site/engineering/engineering-manifest.json`)
|
||||
5. `urn:io:hyperstitionstud:resource:math-manifest` (`site/math/math-manifest.json`)
|
||||
6. `urn:io:hyperstitionstud:resource:archive-manifest` (`encyclopedia-knowledge-graph/docs/archive/archive-manifest.json`)
|
||||
7. `urn:io:hyperstitionstud:resource:guile-prelude` (`src/hyperstitionstud_io/publishing/guile_prelude.scm`, `text/x-scheme`)
|
||||
|
||||
---
|
||||
|
||||
## 4. Synergy with `PLAN-LOCAL-SERVER-SIDE-WEB-CHATBOT-GUI` & Verification Gates
|
||||
|
||||
- **Seamless Integration with `PLAN-LOCAL-SERVER-SIDE-WEB-CHATBOT-GUI`:**
|
||||
- When `PLAN-COMPREHENSIVE-MCP-AND-CHATBOT-REST-API-CAPABILITY-EXPOSURE` is implemented first, `chatbot.py` (`hs_ask_chatbot`) can delegate documentation, manual, archived-plan, `/engineering/`, `/math/`, `/learn/`, Guile Scheme `Z`-combinator, and SQLite FTS5 queries directly to these 4 new MCP tools!
|
||||
- **Automated Verification (`tests/test_core_suite.py` & `ci/erofs_harness.py`):**
|
||||
- Because `ci/erofs_harness.py` dynamically iterates over `MCP_TOOLS_SCHEMA`, all 4 new tools are automatically tested under simulated `ProtectSystem=strict` (`EROFS`) on every test run.
|
||||
- Add explicit assertions in `tests/test_core_suite.py` verifying:
|
||||
- `hs_inspect_engineering_and_math_docs` returns all `E0–E5` and `M0–M5` units, Novice Prerequisite Ladders, and Guile cartridges,
|
||||
- `hs_inspect_documentation_and_manuals` reads both live Operator's Manuals and cold-rotated `.md` plans from `completed-plans-archive.tar.gz` in memory under `EROFS`,
|
||||
- `hs_evaluate_guile_scheme_z_calculus` evaluates `Z`-combinator expressions and returns exact rationals + `β-reduction` traces,
|
||||
- `hs_query_workspace_catalog_and_release_state` returns SQLite FTS5 search hits, `--explain-bump` heuristics, and the `EROFS` baseline receipt, and
|
||||
- `hs_compute_ipld_dag_json_cid` supports all 13 workspace registries.
|
||||
Binary file not shown.
@@ -1,118 +0,0 @@
|
||||
# Plan: Additive Guile Scheme Mode Toggle (`[ λ GUILE SCHEME LENS ]`) & Offline In-Browser Z-Combinator REPL Across `/engineering/` (`E0–E5`) and `/math/` (`M0–M5`) (`v2.1.0`)
|
||||
|
||||
- **Document ID:** `PLAN-GUILE-SCHEME-PEDAGOGICAL-TOGGLE-AND-IN-BROWSER-REPL` (`v2.1.0`)
|
||||
- **Roadmap Status:** **ACTIVE / READY**
|
||||
- **Core Pedagogical & Architectural Mandate:**
|
||||
1. **Zero Eclipse of Existing Curriculum:** The existing `/engineering/` (`E0–E5`) and `/math/` (`M0–M5`) curriculum (Novice Prerequisite Ladders `.hs-prereq-ladder`, formal theorems, Python/SQL/JS implementation tables, and live manifest invariants) remains **100% primary and untouched**. By default (`localStorage["hs:guile-scheme-mode:v1"] == "off"`), pages load in standard mode; toggling **`[ λ GUILE SCHEME LENS: ON ]`** (`Alt+S`) reveals additive **Guile Scheme Teaching Cartridges (`.hs-guile-cartridge`)** alongside each section plus a dockable **In-Browser Guile Scheme & Z-Combinator REPL Drawer (`#hsGuileReplDrawer`)**.
|
||||
2. **Multi-Modal Guile Scheme Pedagogy (`z-calculus-scheme` Integration):** Uses GNU Guile Scheme and the applicative-order `Z` combinator (`Z = λf. (λx. f (λv. (x x) v)) (λx. f (λv. (x x) v))`) to teach in **6 complementary ways**:
|
||||
- **(1) Homoiconic Tri-View (`Math Formula <-> Python/JS <-> Guile S-Expression AST`)**,
|
||||
- **(2) Anonymous Fixed-Point Recursion via `Z` (Thomas' Calculus & Discrete State Fold Lab)**,
|
||||
- **(3) Interactive Step-by-Step `β-Reduction` & Environment Substitution Tracer**,
|
||||
- **(4) Exact Rational (`p/q`) vs. IEEE-754 Floating-Point Precision Lab**,
|
||||
- **(5) Live Equivalence Proof (verifying Scheme output against live `engineering-manifest.json` / `math-manifest.json` invariants)**, and
|
||||
- **(6) One-Click `"Load in REPL"` Guided Lambda Micro-Challenges**.
|
||||
3. **Zero Metered LLM Tokens & Zero External CDN Dependencies:** All 12 subpage cartridges, the canonical `guile_prelude.scm` library, and the in-browser Scheme interpreter (`site/assets/hs-guile-scheme-repl.js`) are 100% deterministic local Python/JS/Scheme (`0` LLM tokens, `0` external HTTPS scripts).
|
||||
- **Target Modules & Assets:**
|
||||
- `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/publishing/guile_prelude.scm` (Canonical GNU Guile Scheme + `z-calculus-scheme` prelude)
|
||||
- `/workspace/hyperstitionstudio-core/site/assets/hs-guile-scheme-repl.js` (Offline client-side Guile Scheme S-Expression evaluator, exact rational tower, tail-call trampoline, β-reduction stepper, and dockable REPL UI)
|
||||
- `/workspace/hyperstitionstudio-core/site/assets/hs-group3-basalt-chamfer.css` (Group 3 Stealth Basalt styling for `#guileSchemeModeToggle`, `.hs-guile-cartridge`, and `#hsGuileReplDrawer`)
|
||||
- `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/publishing/{engineering_docs.py,math_docs.py}` (Piecewise toggleable `--with-guile-lens` / `--without-guile-lens` cartridge injection across `E0–E5` & `M0–M5`)
|
||||
- `/workspace/hyperstitionstudio-core/tests/test_core_suite.py`
|
||||
|
||||
---
|
||||
|
||||
## 1. Non-Eclipsing UI & State Architecture (`Group 3 Stealth Basalt` Compliant)
|
||||
|
||||
### 1.1 Header Toggle Pill & Cross-Page State Persistence
|
||||
- **Control Placement:** In the top navigation / command bar of `/engineering/` (`E0–E5`) and `/math/` (`M0–M5`), adjacent to the cross-links between `/engineering/` and `/math/`, add a `34px`-height Group 3 Stealth Basalt toggle button:
|
||||
```html
|
||||
<button id="guileSchemeModeToggle" class="hs-btn-basalt hs-guile-toggle" type="button" aria-pressed="false" title="Toggle additive Guile Scheme & Z-Combinator teaching cartridges and in-browser REPL (Alt+S)">
|
||||
<span class="hs-guile-lambda-badge">λ</span>
|
||||
<span class="hs-guile-toggle-label">GUILE SCHEME LENS: <strong id="guileSchemeModeState">OFF</strong></span>
|
||||
</button>
|
||||
```
|
||||
- **Sensory Budget Compliance (`90%` Basalt / `7%` `#38bdf8` Interactive / `3%` `#f59e0b` Beacon):**
|
||||
- When `OFF`, the toggle button sits quietly in matte basalt (`#0c1324` fill, `#1e293b` hairline border) and `.hs-guile-cartridge` blocks are hidden (`display: none`), ensuring zero visual distraction for readers focused solely on the core curriculum.
|
||||
- When toggled `ON` (`document.documentElement.setAttribute("data-guile-scheme-mode", "on")` + `localStorage.setItem("hs:guile-scheme-mode:v1", "on")`), the `28px` left-shoulder Signal Pip on each `.hs-guile-cartridge` lights up in `#38bdf8` cyan, expanding the Guile Scheme teaching foil directly beneath each curriculum card without hiding or displacing a single word of the primary explication.
|
||||
|
||||
### 1.2 Piecewise & Non-Sequential Revertability
|
||||
- In `publishing/engineering_docs.py` and `publishing/math_docs.py`, the Guile Scheme layer is governed by an orthogonal feature flag (`ENABLE_GUILE_SCHEME_LENS: bool = True`, CLI flags `--disable-guile-lens` / `--enable-guile-lens`) as well as per-unit overrides (`E0..E5`, `M0..M5`).
|
||||
- Disabling the Guile lens on any single subpage or globally requires a single deterministic `--sync` command (`0` LLM tokens) and leaves all `E0–E5` and `M0–M5` cartridges intact.
|
||||
|
||||
---
|
||||
|
||||
## 2. Six Pedagogical Ways Guile Scheme Teaches Across `/math/` (`M0–M5`) and `/engineering/` (`E0–E5`)
|
||||
|
||||
| # | Pedagogical Modality | How It Works Inside Each `.hs-guile-cartridge` | Why It Deepens Understanding Without Eclipsing the Main Text |
|
||||
| :---: | :--- | :--- | :--- |
|
||||
| **1** | **Homoiconic `S-Expression <-> Math <-> Python` Tri-View** | Side-by-side comparison showing how the mathematical notation ($\sum$, $\prod$, $\nabla$, $\pi_{\text{IPA}}$) and the production Python function map to a pure prefix S-expression `(op arg1 arg2 ...)`. | Eliminates operator-precedence ambiguity and shows novices that formulas, ASTs, and data structures are isomorphic. |
|
||||
| **2** | **Applicative-Order `Z`-Combinator Fixed-Point Enactment (`z-calculus-scheme`)** | Every iterative or recursive algorithm (limits, derivatives, Simpson quadrature, Base-36 folds, graph degree traversals, Bayesian updates) is written **without named self-reference** using `(Z (lambda (recur) (lambda (...) ...)))`. | Connects discrete software engineering (`E1–E5`) and continuous/discrete applied math (`M1–M5`) to a single atomic primitive from lambda calculus. |
|
||||
| **3** | **Interactive `β-Reduction` & Substitution Stepper** | Clicking `[ Step β-Reduction ]` advances one evaluation step at a time, showing the environment bindings (`chars`, `acc`, `priors`, `h`) and intermediate return values. | Makes invisible loop state and recursive call frames concretely visible to novices. |
|
||||
| **4** | **Exact Rational (`p/q`) vs. Floating-Point Contrast** | Evaluates expressions using exact rationals (`7/20 + 1/4 + 1/5 + 1/5 => 1`, `16378/45`) alongside IEEE-754 floats (`363.9555555555556`). | Teaches why exact rational arithmetic prevents rounding drift in convex combinations (`ETI`) and probability simplices, and why inexact floats (`1e-6`) are chosen for deep `Z` convergence loops. |
|
||||
| **5** | **Live Equivalence Verification Badge** | Automatically runs the cartridge's Scheme program on page load (when Scheme Mode is `ON`) and asserts `Scheme Result === Live Manifest Invariant` (`[ VERIFIED EQUAL ]`). | Proves to the learner that the functional Scheme specification and the production Python engine compute identical results on real repository data. |
|
||||
| **6** | **Guided `"Load in REPL"` Lambda Micro-Challenges** | Each subpage provides an interactive prompt (e.g., *"Change the prior in `(bayes-update ...)` or compute the 2nd derivative via `((nth-derivative f 2 1e-4) x)`"*) with a one-click `[ Send to REPL ]` button. | Turns passive reading into active experimentation inside the browser. |
|
||||
|
||||
---
|
||||
|
||||
## 3. Subpage-by-Subpage Guile Scheme Cartridge Curriculum (`M0–M5` & `E0–E5`)
|
||||
|
||||
### 3.1 Applied Mathematics & Statistics Subpages (`/math/` — Units `M0–M5`)
|
||||
- **`M0` (`/math/index.html` — Hub & Prerequisite Bridge):**
|
||||
- Introduces the applicative-order `Z` combinator (`(define Z (lambda (f) ((lambda (x) (f (lambda args (apply (x x) args)))) (lambda (x) (f (lambda args (apply (x x) args)))))))`), explains why the unguarded Y combinator diverges in strict evaluation while eta-expanded `Z` converges, and adds free novice Scheme resources (*Structure and Interpretation of Computer Programs (SICP)*, *The Little Schemer*, and the GNU Guile Reference Manual) to `.hs-prereq-ladder`.
|
||||
- **`M1` (`/math/base36-algebra-and-primes/` — Base-36 Semiring & Primes):**
|
||||
- Enacts `aq-base36` (homomorphic fold over character lists via `Z`), `digital-root-mod9` (fixed-point digit sum until `< 10`), and `prime-factors` (`(prime-factors 666) => (2 3 3 37)`, `(prime-factors 777) => (3 7 37)`).
|
||||
- **`M2` (`/math/phonemic-projections-and-g-vectors/` — Phonemic Projections & Variance Collapse):**
|
||||
- Enacts exact rational population & sample `variance` via `Z` on the `292` Synonym Cluster (`(variance-pop '(120 116 144 103 157)) => 8189/25` = `327.56` vs. `(variance-pop '(112 112 112 112 112)) => 0`) and classifies `G1` (`ing_aq` collapse) and `G4` (`eng_aq == ing_aq` fixed point).
|
||||
- **`M3` (`/math/graph-topology-and-eti-scoring/` — Graph Topology & ETI Scoring):**
|
||||
- Enacts exact rational `eti-score` (`(+ (* 7/20 s) (* 1/4 p) (* 1/5 c) (* 1/5 m))`) verifying that the rational weights sum to `1` (`20/20`), plus polar radar coordinate projection `(eti->polar eti theta r-min r-max)`.
|
||||
- **`M4` (`/math/timeseries-moments-and-confluence-dose/` — Time-Series Moments, Confluence Dose & Thomas' Calculus):**
|
||||
- Enacts `confluence-dose` ($D_{i,t} \in \{0..4\}$ as a `Z`-fold over the 4 species predicates) AND connects discrete bar series to continuous Thomas' Calculus via `limit` and central-difference `derivative` (`(derivative (lambda (t) (* 0.024 t t)) 1e-6)`).
|
||||
- **`M5` (`/math/macro-spreads-and-bayesian-inference/` — FRED Macro Spreads, Bayesian Inference & Quadrature):**
|
||||
- Enacts exact rational 3-state `bayes-update` (`P(R_k | E_t)`), `brier-score`, and `adaptive-simpson` numerical quadrature over continuous probability densities via `Z`.
|
||||
|
||||
### 3.2 Software Engineering Subpages (`/engineering/` — Units `E0–E5`)
|
||||
- **`E0` (`/engineering/index.html` — Hub & Homoiconic Introspection):**
|
||||
- Demonstrates homoiconic S-expression manifest introspection (`(assoc-ref manifest 'version) => "2.1.0"`) and how treating configuration, code, and theorems as uniform S-expression trees eliminates schema drift.
|
||||
- **`E1` (`/engineering/ciphers-and-phonetics/` — Pure Functional Phonetic Transducers):**
|
||||
- Enacts the zero-global-state lookup pipeline `(translate-word "hyperstition" cmudict-alist)` with fallback rule composition via `Z`.
|
||||
- **`E2` (`/engineering/knowledge-graph-and-sqlite/` — Immutable Graph Queries & Isolation Guards):**
|
||||
- Enacts higher-order `(with-isolation-guard pre-sha256 thunk post-sha256)` and `Z`-combinator multigraph edge filtering `(filter-edges-by-type edges 'G4_ISOMETRIC_INVARIANT)`.
|
||||
- **`E3` (`/engineering/quant-macro-and-bayesian-brief/` — Zero-Synthetic `#f` Option Semantics):**
|
||||
- Enacts explicit `#f` (`None`/`null`) handling in Scheme time-series folds: `(filter-valid-bars '((2026-11-27 135.40) (2026-11-28 #f) (2026-11-29 #f) (2026-11-30 138.25)))`, proving how functional filtering naturally forbids synthetic weekend/holiday interpolation.
|
||||
- **`E4` (`/engineering/mcp-chatbot-rest-and-ipld/` — S-Expression JSON-RPC Dispatcher & Canonical Sorting):**
|
||||
- Enacts a pure functional MCP tool router `((mcp-router tool-table) '(tools/call "hs_evaluate_aq_and_ingglish" "LEMUR"))` and recursive lexicographic key sorting for IPLD `dag-json` (`0x0129`) via `Z`.
|
||||
- **`E5` (`/engineering/cicd-vps-tmpfs-and-regression/` — Programmatic SemVer Heuristics & DAG Sort in Scheme):**
|
||||
- Enacts `evaluate-bump-scope` (the exact 4-tier `noop / patch / minor / major` decision tree from `version_sync.py`) and 6-gate regression conjunction `(all-gates-pass? gates)` via `Z`.
|
||||
|
||||
---
|
||||
|
||||
## 4. In-Browser Guile Scheme & Z-Combinator Interactive REPL Specification (`site/assets/hs-guile-scheme-repl.js`)
|
||||
|
||||
### 4.1 Capabilities of the Client-Side Scheme Engine (`0` External Dependencies)
|
||||
1. **Complete Core Scheme Special Forms & Tail-Call Trampoline:**
|
||||
- Supports `define`, `lambda` (both fixed `(lambda (x y) ...)` and variadic `(lambda args ...)` / dotted `(lambda (x . rest) ...)` required by the `Z` combinator!), `let`, `let*`, `if`, `cond`, `and`, `or`, `begin`, `quote` (`'expr`), and `apply`.
|
||||
- Uses a tail-call optimization (TCO) loop so deep `Z`-combinator recursions (thousands of steps in `riemann-integral`, `adaptive-simpson`, `series-sum`, or `rk4-integrate`) execute in `O(1)` JS stack frames without `RangeError: Maximum call stack size exceeded`.
|
||||
2. **Exact Rational (`p/q`) + Inexact Float Number Tower:**
|
||||
- Literal fractions like `7/20`, `1/3`, or exact integer divisions `(/ 16378 45)` preserve exact numerator/denominator GCD-reduced rationals (`363 43/45` / `16378/45`) until combined with an inexact float (`2.0`, `0.5`, `1e-6`) or converted via `(exact->inexact x)` / `(inexact->exact x)`.
|
||||
3. **Built-In `z-calculus-scheme` & Hyperstition Prelude:**
|
||||
- Pre-defines `Z`, `limit`, `derivative`, `nth-derivative`, `newton-solve`, `riemann-integral`, `adaptive-simpson`, `series-sum`, `rk4-integrate`, `gradient`, `aq-base36`, `digital-root-mod9`, `prime-factors`, `variance-pop`, `eti-score`, `confluence-dose`, `bayes-update`, `brier-score`, and `evaluate-bump-scope`.
|
||||
4. **Interactive REPL Drawer UI (`#hsGuileReplDrawer`):**
|
||||
- Docked at the bottom-right of any `/engineering/*` or `/math/*` page when Guile Scheme Mode is `ON` (collapsible/expandable).
|
||||
- Features:
|
||||
- Preset selector dropdown (loads any of the 12 subpage labs or `z-calculus-scheme` Modules 1–5),
|
||||
- Multi-line S-expression editor with parenthesis matching & `Ctrl+Enter` / `[ Evaluate (λ) ]` execution,
|
||||
- `[ Step β-Reduction ]` button showing the first 12 evaluation reductions step-by-step,
|
||||
- Exact Rational vs. Float display toggle, and
|
||||
- Command history (`Up`/`Down` arrows, persisted in `sessionStorage`).
|
||||
|
||||
---
|
||||
|
||||
## 5. Test-Suite Appropriateness Analysis & Verification Gates (`tests/test_core_suite.py` & `hs-public-smoke`)
|
||||
|
||||
1. **In-Process & Subprocess Verification (`tests/test_core_suite.py`):**
|
||||
- Verify that `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/publishing/guile_prelude.scm` and `/workspace/hyperstitionstudio-core/site/assets/hs-guile-scheme-repl.js` exist and contain `0` external `https://` script/font URLs.
|
||||
- Verify that all 6 `/engineering/*` HTML files and all 6 `/math/*` HTML files include `#guileSchemeModeToggle`, `.hs-guile-cartridge`, `#hsGuileReplDrawer`, and `/assets/hs-guile-scheme-repl.js` while retaining 100% of their existing curriculum sections and `.hs-prereq-ladder` blocks.
|
||||
- Verify piecewise revertability: calling `build_engineering_site(..., include_guile_lens=False)` and `build_math_site(..., include_guile_lens=False)` cleanly omits `.hs-guile-cartridge` while keeping all `E0–E5` and `M0–M5` content intact.
|
||||
- When `node` is available (already used in `test_core_suite.py`), execute `/workspace/hyperstitionstudio-core/site/assets/hs-guile-scheme-repl.js` headlessly in Node to verify that the in-browser Scheme engine evaluates `Z`-combinator `limit`, `derivative`, `adaptive-simpson`, `aq-base36`, exact rational `eti-score`, `variance-pop` on Cluster `292`, and `bayes-update` to the exact expected analytical values!
|
||||
2. **Public Surface Regression Gate (`hs-public-smoke` Gate `P6` & `deploy/test-first-deployment.sh`):**
|
||||
- Add `/assets/hs-guile-scheme-repl.js` to `ROUTES=()` in `deploy/test-first-deployment.sh` and verify `HTTP 200 OK`.
|
||||
Binary file not shown.
@@ -0,0 +1,111 @@
|
||||
# Plan: Lightweight Local Server-Side Web Chatbot GUI (`/chat/` & Dockable Widget) Powered by `hyperstition-mcp.service` & SQLite FTS5 at Zero (`0`) LLM Token Cost (`v2.2.0`)
|
||||
|
||||
- **Document ID:** `PLAN-LOCAL-SERVER-SIDE-WEB-CHATBOT-GUI` (`v2.2.0`)
|
||||
- **Roadmap Status:** **ACTIVE / READY**
|
||||
- **Core Architectural & Resource Mandates:**
|
||||
1. **100% Local on the Web Host (`0` LLM Tokens, `0` External API Keys, `0` GPU RAM):**
|
||||
Runs entirely inside the existing `hyperstition-mcp.service` Python daemon (`127.0.0.1:8095`) using a deterministic **Hybrid Intent Router + SQLite FTS5 BM25 Full-Text Retriever + 15-Tool MCP Orchestrator (`src/hyperstitionstud_io/mcp/chatbot.py`)**. Consumes `0` metered LLM tokens, `0` external API keys, `< 15 ms` CPU time per query, and `< 5 MB` RSS memory.
|
||||
2. **Chatbot REST API Exclusivity (`0` New Bespoke REST Routes in `rest.py`):**
|
||||
Exposes the server-side question-answering engine by registering **`hs_ask_chatbot`** in `MCP_TOOLS_SCHEMA` (`src/hyperstitionstud_io/mcp/tools.py`). The existing generic tool dispatcher in `src/hyperstitionstud_io/mcp/rest.py` automatically serves it at **`GET/POST /api/v1/tools/hs_ask_chatbot`** (and via MCP JSON-RPC `tools/call` on `/mcp`) with **`0` new custom route patterns** in `rest.py`.
|
||||
3. **Strict Zero-Synthetic-Data & `ProtectSystem=strict` (`EROFS`) Compliance:**
|
||||
Every answer is synthesized deterministically from verified server-side registries (`glossary-registry.json`, `encyclopedia-graph.json`, `quant-timeseries.json`, `real-macro-indicators.json`, `daily-brief-latest.json`, `hyperstition-meta.db` FTS5, and `72` archive dossiers). Missing/private/holiday fields report `"No data available"` (`null`), and `hs_ask_chatbot` is automatically swept under simulated `ProtectSystem=strict` (`EROFS`) by `src/hyperstitionstud_io/ci/erofs_harness.py`.
|
||||
4. **Two-Script Deployment Invariant Preserved:**
|
||||
All assets, symlinks (`/chat`), and tests are wired into `/workspace/push-all-to-git-libre-audio.sh` and `/workspace/hyperstitionstudio-core/deploy/sync-vps-repos.sh` so deployment requires no additional manual operator steps.
|
||||
- **Target Modules & Web Surfaces:**
|
||||
- `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/mcp/chatbot.py` (`answer_chatbot_query()` 8-intent router + SQLite FTS5 BM25 retriever + multi-tool orchestrator)
|
||||
- `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/mcp/tools.py` (Registers `hs_ask_chatbot` in `MCP_TOOLS_SCHEMA`)
|
||||
- `/workspace/hyperstitionstudio-core/site/assets/hs-chatbot-widget.js` (Lightweight `< 16 KB` dockable Group 3 Stealth Basalt chatbot drawer injected across `/`, `/quant/`, `/learn/`, `/engineering/*`, and `/math/*`)
|
||||
- `/workspace/hyperstitionstudio-core/site/chat/index.html` (Full-screen split-pane `/chat/` Corpus & Telemetry Query Workbench with live JSON/CIDv1 & Stats-Card inspector)
|
||||
- `/workspace/hyperstitionstudio-core/site/assets/hs-group3-basalt-chamfer.css` (Group 3 Stealth Basalt styling for `#hsChatbotToggleBtn`, `#hsChatbotDrawer`, and `/chat/`)
|
||||
- `/workspace/hyperstitionstudio-core/deploy/{sync-vps-repos.sh,test-first-deployment.sh}` & `/workspace/hyperstitionstudio-core/tests/test_core_suite.py`
|
||||
|
||||
---
|
||||
|
||||
## 1. Local Server-Side Question-Answering Architecture (`src/hyperstitionstud_io/mcp/chatbot.py`)
|
||||
|
||||
When the browser sends a user question `q` to `POST /api/v1/tools/hs_ask_chatbot` (or `GET /api/v1/tools/hs_ask_chatbot?query=...`), `answer_chatbot_query(query, page_context, lens, include_card)` executes a deterministic 3-stage pipeline in `< 15 ms`:
|
||||
|
||||
```text
|
||||
[User Question q in Browser]
|
||||
│
|
||||
▼ POST /api/v1/tools/hs_ask_chatbot (Caddy -> 127.0.0.1:8095 hyperstition-mcp.service)
|
||||
┌───────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Stage 1: Deterministic Intent & Entity Extractor (Regex + Watchlist/Glossary/Coord Matcher) │
|
||||
│ Extracts: ticker symbols (NVDA..ANTHR-PVT), AQ integers (1..999), FRED slugs (CPI..INDPRO), │
|
||||
│ quoted phrases ("..."), and intent keywords (price, dose, card, macro, brief, define, aq). │
|
||||
└───────────────────────────────────────────────┬───────────────────────────────────────────────┘
|
||||
│
|
||||
▼
|
||||
┌───────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Stage 2: Server-Side Tool & SQLite FTS5 Orchestration (100% Read-Only under EROFS) │
|
||||
│ • Intent 1 (Ticker / Price / Dose / Stats Card) -> hs_inspect_quant_timeseries + cards.py │
|
||||
│ • Intent 2 (Macro / Rates / CPI / M2 / GDP / Brief) -> hs_inspect_macro_indicators + brief │
|
||||
│ • Intent 3 (Calculate AQ / Ingglish / Prime / Mod-9) -> hs_evaluate_aq_and_ingglish │
|
||||
│ • Intent 4 (Define Term / S1-S6 / M1-M7 / G1-G6 / ETI) -> hs_search_glossary_encyclopedia │
|
||||
│ • Intent 5 (Graph Node / Hub / Coordinate aq:N) -> hs_query_knowledge_graph │
|
||||
│ • Intent 6 (333/666/777 Equations / News Dossier) -> hs_search_archive_equations │
|
||||
│ • Intent 7 (Guile Scheme / Z-Combinator / Novice Track) -> guile_prelude + /learn/ ladder │
|
||||
│ • Intent 8 (Open-Ended Question Fallback) -> SQLite FTS5 BM25 search across catalog tables │
|
||||
└───────────────────────────────────────────────┬───────────────────────────────────────────────┘
|
||||
│
|
||||
▼
|
||||
┌───────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Stage 3: Grounded Response Composer (Zero Hallucination, Full Citation & CIDv1 Provenance) │
|
||||
│ Returns: { answer_markdown, summary_bullets, detected_intent, invoked_tools, │
|
||||
│ citations: [{label, url}], stats_card_preview, data_available, ipld_cidv1 } │
|
||||
└───────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
### 1.1 Detailed Behavior of the 8 Server-Side Intent Handlers
|
||||
|
||||
| Intent ID | Example User Questions Answered Locally | Server-Side Data Sources Queried | Structured Output Returned to GUI |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| **`1. ticker_and_card`** | • *"What is NVDA's latest price and Confluence Dose?"*<br/>• *"Show me the stats card for SOL-USD"*<br/>• *"What is ANTHR-PVT's price?"* | `site/quant/quant-timeseries.json` + `quant/cards.py` (`35 ms` fast-path) | • Real close (`$135.40`), `change_bps`, `Vol20d`, `Dose 0..3+` taxon label, 6 TierZoo base stats, optional inline `900×1260` PNG card preview, and deep links to `/quant/` & `/graph/`.<br/>• For `ANTHR-PVT`: *"No market data available (private entity — 0 synthetic bars)."* |
|
||||
| **`2. macro_and_regime_brief`** | • *"What are the current Fed rates and M2 spread?"*<br/>• *"What is today's Bayesian market regime and key question?"*<br/>• *"What is the latest CPI and PPI?"* | `site/quant/real-macro-indicators.json` + `site/quant/daily-brief-latest.json` | • Live 3-state Bayesian posteriors (`R1`, `R2`, `R3`), active Daily Key Macro Question $Q_t$, and exact FRED series values (`EFFR = 388 bps`, `SOFR = 398 bps`, `M2-M1 = $3.37T`, `GDP`, `CPI`, `PPI`) with native cadence metadata. |
|
||||
| **`3. aq_and_ingglish_eval`** | • *"What is the AQ and Ingglish of 'abstract machine'?"*<br/>• *"Evaluate 'hyperstition'"* | `ciphers/aq.py` + `phonetics/__init__.py` (`4,943` offline CMUdict + fallback rules) + `encyclopedia-graph.json` | • `Gen 0` (`eng_aq`), `Gen 1` (`ing_aq` + Ingglish spelling), phonemic drift $\Delta$, prime rank $\pi(n)$, mod-9 digital root, and any matching specimens at that AQ coordinate. |
|
||||
| **`4. glossary_and_zoology`** | • *"What is Vector G1?"*<br/>• *"Explain The Room Filter"*<br/>• *"What are the S+ Apex builds in the ETI tier list?"* | `taxonomy/glossary-registry.json` (`282` terms, `190` bilingual specimens) + `assemblage-builds-tier-list.json` | • Concise definition, ontological division (`Div 00–08`), verbatim grounded quote, ETI score, and clickable `#page=N&search=...` deep-link to `/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf`. |
|
||||
| **`5. knowledge_graph_hub`** | • *"What connects to coordinate 292 or 666?"*<br/>• *"Inspect node aq:333"* | `encyclopedia-graph.json` (`388` nodes, `1,282` edges) | • Node type, degree centrality, incident `G1–G5` edges, guild membership, and `[ Open in /graph/?select=aq:N ]` deep-link. |
|
||||
| **`6. archive_equations_and_news`** | • *"Show me archive equations that equal 333 or 666"*<br/>• *"What is in the latest news dossier?"* | `ingglish-aq-archive/01..72-*.md` | • Matching verified `Gen 1 [Ingglish] = 333/666/777` equations with dossier numbers and `/api/v1/dossiers/{N}?highlight=...` links. |
|
||||
| **`7. guile_scheme_and_curriculum`** | • *"How does the Z combinator work in Guile Scheme?"*<br/>• *"Where should a novice start?"* | `publishing/guile_prelude.scm` + `engineering-manifest.json` + `math-manifest.json` | • Explains the `Z` combinator (`z-calculus-scheme`) or Novice Prerequisite Ladder, with links to `/learn/`, `/math/`, and `/engineering/`. |
|
||||
| **`8. sqlite_fts5_fallback`** | • Any free-form question across the 6 repositories | `.cache/hyperstition-meta.db` (`sqlite_meta.py` FTS5 tables + JSON fallback) | • Top-ranked corpus matches with verbatim snippets and deep links (or explicit `"No matching corpus record found"` with `0` hallucination). |
|
||||
|
||||
---
|
||||
|
||||
## 2. Lightweight Group 3 Stealth Basalt Web Chatbot GUI (`site/assets/hs-chatbot-widget.js` & `/chat/index.html`)
|
||||
|
||||
### 2.1 Floating Dockable Widget Across All Primary Pages (`site/assets/hs-chatbot-widget.js`)
|
||||
- **Header & Bottom-Left Launcher (`#hsChatbotToggleBtn`):**
|
||||
- Styled in Group 3 Stealth Basalt (`10px/4px` `45°` chamfers, `34px` height, `#38bdf8` interactive border/pip, keyboard shortcut `Alt+K`).
|
||||
- Does not eclipse or clutter any page: remains a single compact pill (`[ ◈ ASK CORPUS ]`) until clicked.
|
||||
- **Interactive Drawer (`#hsChatbotDrawer`, `420 × 540 px`):**
|
||||
- **Context-Aware Quick-Prompt Chips:** Displays 5 one-click starter questions tailored to the current page (`/`, `/quant/`, `/learn/`, `/engineering/*`, `/math/*`).
|
||||
- **Instant Local Execution Badge:** Shows `0 LLM Tokens • Local Server-Side Engine (<15 ms) • CIDv1 Verified` in the drawer header.
|
||||
- **Rich Answer Cards:**
|
||||
- Formatted answer text + bulleted key metrics,
|
||||
- Clickable deep-link pills (`Open in /quant/`, `Open in /graph/`, `Glossary PDF #page=N`),
|
||||
- Inline `900×1260` `.png` Stats Card preview whenever a ticker card is queried,
|
||||
- Collapsible `<details>` block showing the exact `/api/v1/tools/hs_ask_chatbot` JSON payload and IPLD `CIDv1` receipt.
|
||||
|
||||
### 2.2 Dedicated Full-Screen `/chat/` Workbench (`site/chat/index.html`)
|
||||
- Accessible at `/chat/index.html` (with a navigation button added to `site/index.html` and the widget header `[ Expand Full /chat/ Workbench ↗ ]`).
|
||||
- Provides a 2-column Group 3 Stealth Basalt layout:
|
||||
- **Left Column (`60%`):** Full conversational Q&A history, categorized prompt library across all 8 intents (Watchlist Tickers, FRED Macro & Bayesian Brief, Base-36 & Ingglish Calculator, Glossary & Zoology, Knowledge Graph Hubs, 333/666/777 Archive Equations, Guile Scheme & Z-Calculus, and Novice Onboarding), and exportable `.json` transcript button.
|
||||
- **Right Column (`40%`):** Live Server-Side Telemetry & Provenance Inspector displaying the triggered MCP tool chain, raw JSON response, IPLD `dag-json` `CIDv1` hash, and any rendered `900×1260` Ticker Stats Card PNG.
|
||||
|
||||
---
|
||||
|
||||
## 3. Test-Suite & Deployment Integration (`tests/test_core_suite.py`, `erofs_harness.py`, `sync-vps-repos.sh`)
|
||||
|
||||
1. **`src/hyperstitionstud_io/ci/erofs_harness.py`:**
|
||||
- Because `hs_ask_chatbot` is registered in `MCP_TOOLS_SCHEMA` (bringing the total MCP tool count from `15` to `16`), `run_introspective_erofs_suite()` **automatically** sweeps `hs_ask_chatbot` under simulated `ProtectSystem=strict` (`EROFS`) with zero extra harness code!
|
||||
2. **`tests/test_core_suite.py`:**
|
||||
- Test `hs_ask_chatbot` across all 8 intent families via `dispatch_rest_v1("GET", "/api/v1/tools/hs_ask_chatbot?query=...")` and `POST /api/v1/tools/hs_ask_chatbot`:
|
||||
- Verify `NVDA` ticker query returns real close `$135.40` and `data_available: True`,
|
||||
- Verify `ANTHR-PVT` query returns `data_available: False` and `"No data available"` (`0` synthetic data),
|
||||
- Verify FRED macro & Bayesian brief query returns `EFFR = 388 bps` and valid posterior simplex sum `== 1.0`,
|
||||
- Verify AQ/Ingglish query on `"schizoanalysis"` returns `eng_aq = 264`, `ing_aq = 292`,
|
||||
- Verify glossary query on `"Vector G1"` returns a valid `/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf#page=` deep-link.
|
||||
- Verify `0` new bespoke routes were added to `rest.py` (all chatbot queries flow through `/api/v1/tools/hs_ask_chatbot` and `/mcp`).
|
||||
3. **`deploy/sync-vps-repos.sh` & `deploy/test-first-deployment.sh`:**
|
||||
- Add `${LIVE_SUDO} ln -sfn "hyperstitionstudio-core/site/chat" "${LIVE_REPOS}/chat"` to Step `[3/5]` of `deploy/sync-vps-repos.sh`.
|
||||
- Add `/chat/index.html` and `/assets/hs-chatbot-widget.js` to `ROUTES=()` in `deploy/test-first-deployment.sh` and `hs-public-smoke` Gate `P1`/`P6`.
|
||||
Binary file not shown.
@@ -50,3 +50,6 @@
|
||||
| `PLAN-MATHEMATICAL-EXPLICATION-HUB-AND-SUBPAGES.{md,pdf}` | Specification for the live-introspected `/math/` Hub (`M0`) and 5 orthogonal subpages (`M1–M5`) with Novice Prerequisite Ladders and non-sequential revertability (`hs-math-docs`); now implemented in `src/hyperstitionstud_io/publishing/math_docs.py` and `site/math/`. |
|
||||
| `PLAN-PROGRAMMATIC-VERSION-BUMP-HEURISTICS-ZERO-TOKEN.{md,pdf}` | Specification for zero-LLM-token programmatic semantic version determination (`hs-sync-version --auto-bump` & `--explain-bump`) using change-scope heuristics and plan/skill artifacts; now implemented in `src/hyperstitionstud_io/version_sync.py`. |
|
||||
| `PLAN-CRONJOB-ARCHIVE-ROTATION-ON-HYPERSTITIONSTUD-IO.{md,pdf}` | Specification for daily `00:20 UTC` cold-archive rotation (`hs-archive-rotate`) and quiescent SQLite telemetry logrotate (`100M` `.1.gz`) on `hyperstitionstud.io` (`deploy/run-vps-archive-rotation.sh`, `deploy/cron.d/hyperstition-archive-rotate`, `deploy/hyperstition-archive-rotate.{service,timer}`, `0` LLM tokens, `0` API keys); now implemented in `deploy/`. |
|
||||
| `PLAN-INTROSPECTIVE-PROTECT-SYSTEM-STRICT-EROFS-TEST-HARNESS.{md,pdf}` | Specification for the single in-process `ProtectSystem=strict` (`EROFS`) test harness (`src/hyperstitionstud_io/ci/erofs_harness.py`) sweeping all `MCP_TOOLS_SCHEMA` tools, `dispatch_rest_v1` routes, and Contract B builders, plus the `34x` stats-card fast-path (`1,186 ms -> ~35 ms` in `quant/cards.py`); now implemented and cached in `.cache/internal-test-baseline-latest.json`. |
|
||||
| `PLAN-HOMEPAGE-ENGINEERING-AND-MATH-NAVIGATION-WIRING.{md,pdf}` | Specification for wiring `Engineering (/engineering/)` and `Applied Math (/math/)` navigation buttons into `site/index.html`, `/learn/index.html`, `/quant/index.html`, and `hs-public-smoke` Gate `P6`; now implemented across all web surfaces. |
|
||||
| `PLAN-GUILE-SCHEME-PEDAGOGICAL-TOGGLE-AND-IN-BROWSER-REPL.{md,pdf}` | Specification for the additive `[ λ GUILE SCHEME LENS: OFF / ON ]` toggle, 6 pedagogical modalities grounded in `z-calculus-scheme` (`guile_prelude.scm`), and the offline in-browser Guile Scheme & Z-combinator REPL (`site/assets/hs-guile-scheme-repl.js`) across `/engineering/` (`E0–E5`) and `/math/` (`M0–M5`); now implemented and verified in `tests/test_core_suite.py`. |
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"version": "2.1.0",
|
||||
"version": "2.1.1",
|
||||
"bundle_filename": "completed-plans-archive.tar.gz",
|
||||
"bundle_size_bytes": 3329253,
|
||||
"bundle_sha256": "b7789c11c6f3e19b49578a0feb494a4f92067abfef283fc89d53b9c97d5a59df",
|
||||
"bundle_size_bytes": 3593868,
|
||||
"bundle_sha256": "107d4855162a725cb7864c4e39734df135fb6887456b12962972cd795fda6e29",
|
||||
"require_companion_md": true,
|
||||
"member_count": 70,
|
||||
"total_uncompressed_bytes": 3998770,
|
||||
"member_count": 76,
|
||||
"total_uncompressed_bytes": 4303478,
|
||||
"preserved_standalone_pdfs": [],
|
||||
"members": [
|
||||
{
|
||||
@@ -128,6 +128,16 @@
|
||||
"size_bytes": 85729,
|
||||
"sha256": "31806f4bf3075a3e907aafcf5418932fa4f02b43cd1e0ce35a2723fde75ee470"
|
||||
},
|
||||
{
|
||||
"name": "PLAN-GUILE-SCHEME-PEDAGOGICAL-TOGGLE-AND-IN-BROWSER-REPL.md",
|
||||
"size_bytes": 15736,
|
||||
"sha256": "f29581a99474c8c4cd0e581fcef70e4d09093b12fe869d565f3ab436a9ccf835"
|
||||
},
|
||||
{
|
||||
"name": "PLAN-GUILE-SCHEME-PEDAGOGICAL-TOGGLE-AND-IN-BROWSER-REPL.pdf",
|
||||
"size_bytes": 100062,
|
||||
"sha256": "9c343742b0f654d63de73c67f57365af7db821a45be22084d989c8a6da0c63c8"
|
||||
},
|
||||
{
|
||||
"name": "PLAN-HAIPERDOHP-SILHOUETTE-HYPERSTITION-PALETTE-UNIFIED-STYLE-AUGMENTATION.md",
|
||||
"size_bytes": 31238,
|
||||
@@ -138,6 +148,16 @@
|
||||
"size_bytes": 115427,
|
||||
"sha256": "9569f5fb06bbe8680b6a99f47b1714bfb1fa4458dae67f5560f2faa81ad520f8"
|
||||
},
|
||||
{
|
||||
"name": "PLAN-HOMEPAGE-ENGINEERING-AND-MATH-NAVIGATION-WIRING.md",
|
||||
"size_bytes": 5880,
|
||||
"sha256": "f41583700c51c85e750ffb12f35ff55b993cf446ffacee0cd37194ea35c940d3"
|
||||
},
|
||||
{
|
||||
"name": "PLAN-HOMEPAGE-ENGINEERING-AND-MATH-NAVIGATION-WIRING.pdf",
|
||||
"size_bytes": 85808,
|
||||
"sha256": "69d9f8114060dae54128ddf0306ab9609818ab90bc953d84d049235dcc92d8c8"
|
||||
},
|
||||
{
|
||||
"name": "PLAN-HS-PDF-BUILD-DARK-MODE-AND-GLYPH-SANITIZATION.md",
|
||||
"size_bytes": 19409,
|
||||
@@ -148,6 +168,16 @@
|
||||
"size_bytes": 108319,
|
||||
"sha256": "be2a0b6115f8b4c80b0e85b4d2ca35a7734511590adf25be734dfb764bcfbe37"
|
||||
},
|
||||
{
|
||||
"name": "PLAN-INTROSPECTIVE-PROTECT-SYSTEM-STRICT-EROFS-TEST-HARNESS.md",
|
||||
"size_bytes": 7708,
|
||||
"sha256": "61fe0af6c52ea7dc6f21154cc3c229222a2b664f9eb31333e2b02f67a67b6228"
|
||||
},
|
||||
{
|
||||
"name": "PLAN-INTROSPECTIVE-PROTECT-SYSTEM-STRICT-EROFS-TEST-HARNESS.pdf",
|
||||
"size_bytes": 89514,
|
||||
"sha256": "f5e6b0f1b28cf5d550838677cfba4921d69f0f6c44828e95d5c404075f578814"
|
||||
},
|
||||
{
|
||||
"name": "PLAN-LEARNING-SUBPAGE-AND-LOCAL-STATE-PORTABILITY.md",
|
||||
"size_bytes": 13512,
|
||||
|
||||
Binary file not shown.
@@ -120,7 +120,7 @@
|
||||
<div class="pulse-dot"></div>
|
||||
<h1>Cross-Repository Dependency Graph & Auditable Build → Test → Stage_Commit Pipeline</h1>
|
||||
</div>
|
||||
<p class="subtitle">Sibling Repositories under /workspace: ingglish-hyperdope-gematria • technocapital-singularity-zoology (v2.1.0) • encyclopedia-knowledge-graph (v2.1.0)</p>
|
||||
<p class="subtitle">Sibling Repositories under /workspace: ingglish-hyperdope-gematria • technocapital-singularity-zoology (v2.2.2) • encyclopedia-knowledge-graph (v2.2.2)</p>
|
||||
</div>
|
||||
|
||||
<!-- Main SVG Diagram -->
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 285 KiB After Width: | Height: | Size: 284 KiB |
@@ -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.1.0",
|
||||
"version": "2.2.2",
|
||||
"encyclopedia_base_path": "../technocapital-singularity-zoology/encyclopedia",
|
||||
"upstream_repository": "/workspace/technocapital-singularity-zoology",
|
||||
"isolation_verified": {
|
||||
|
||||
+1
-1
@@ -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.1.0",
|
||||
"version": "2.2.2",
|
||||
"encyclopedia_base_path": "../technocapital-singularity-zoology/encyclopedia",
|
||||
"upstream_repository": "/workspace/technocapital-singularity-zoology",
|
||||
"isolation_verified": {
|
||||
|
||||
+4
-4
@@ -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.1.0)</title>
|
||||
<title>Encyclopedia of Technocapital Singularity Zoology — Interactive Knowledge Graph (v2.2.2)</title>
|
||||
<style>
|
||||
:root {
|
||||
--bg-canvas: #020617;
|
||||
@@ -268,7 +268,7 @@
|
||||
<header>
|
||||
<div class="brand">
|
||||
<h1>ENCYCLOPEDIA OF TECHNOCAPITAL SINGULARITY ZOOLOGY — INTERACTIVE KNOWLEDGE GRAPH</h1>
|
||||
<p>Standalone Sibling Repository (/workspace/encyclopedia-knowledge-graph) • 388 Nodes • 1,282 Deduplicated Edges • Zero Glossary Leak • v2.1.0</p>
|
||||
<p>Standalone Sibling Repository (/workspace/encyclopedia-knowledge-graph) • 388 Nodes • 1,282 Deduplicated Edges • Zero Glossary Leak • v2.2.2</p>
|
||||
</div>
|
||||
<div class="toolbar">
|
||||
<button class="btn active" data-mode="mode2_radar">Mode 2: ETI Radar (S+ -> D Periphery)</button>
|
||||
@@ -321,10 +321,10 @@
|
||||
</aside>
|
||||
</div>
|
||||
<footer class="hs-global-footer" style="background:#1A1D26;border-top:1px solid #323846;padding:4px 14px;text-align:center;font-size:11px;color:#9BA3B8;z-index:20;">
|
||||
<span class="hs-lemur-credit">hyperstitionstud.io/graph v2.1.0 • Made with <span class="hs-heart" role="img" aria-label="love" style="color:#FB7185;display:inline-block;padding:0 2px;">♥</span> by Lemurs.</span>
|
||||
<span class="hs-lemur-credit">hyperstitionstud.io/graph v2.2.2 • Made with <span class="hs-heart" role="img" aria-label="love" style="color:#FB7185;display:inline-block;padding:0 2px;">♥</span> by Lemurs.</span>
|
||||
</footer>
|
||||
|
||||
<script src="graph-data.js?v=2.1.0"></script>
|
||||
<script src="graph-data.js?v=2.2.2"></script>
|
||||
<script>
|
||||
(function() {
|
||||
const DATA = (window.HyperstitionStudio && window.HyperstitionStudio.EncyclopediaGraphData) || window.ENCYCLOPEDIA_GRAPH_DATA;
|
||||
|
||||
@@ -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.1.0",
|
||||
"version": "2.2.2",
|
||||
"encyclopedia_base_path": "../technocapital-singularity-zoology/encyclopedia",
|
||||
"upstream_repository": str(upstream_repo),
|
||||
"isolation_verified": {
|
||||
|
||||
Reference in new issue
Block a user