Skip to content
View kruschdev's full-sized avatar
💭
Got RAG?
💭
Got RAG?

Block or report kruschdev

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
kruschdev/README.md
Kevin Ruschman — @kruschdev



Website KruschStack Tech Stack MCP KruschGit KruschFS PostgreSQL LinkedIn X


Multi-Family Bare-Metal GPUs · Unified krusch-stack (39 MCP Tools) · @krusch/toolkit · PostgreSQL 16 State Planes


💡 Architectural Premise

Language models are stateless, interchangeable compute samplers—routing, working memory, codebase navigation, and filesystem mutations belong to a deterministic systems stack.

Instead of layering heavyweight prompt frameworks over a single metered cloud API and flat sliding-window RAG, my engineering stack inverts the model:

  • One-Command Unified Distribution (krusch-stack v1.0.0): Install the entire 7-pillar, 39-tool Sovereign AI Tech Stack in a single command (npx krusch-stack init for zero-Docker SQLite WAL, or docker compose up -d for full PostgreSQL 16 + pgvector), auto-configuring Claude Code, Cursor, Windsurf, and Antigravity.
  • Multi-Family GPU Isolation: 5 local bare-metal GPUs (57GB+ VRAM over 10GbE) + an on-demand 96GB Blackwell G4 burst tier run orthogonal model families (Qwen3, Gemma 4, Hermes 3, GPT-OSS, Gemini 4 Argon) so no model family ever grades its own homework.
  • Relational State & 7 Focused MCP Servers: Working memory, Git Commit DAGs, AST caller/callee graphs, and 8-node OS page trees live in PostgreSQL 16 + pgvector HNSW and zero-Docker SQLite WAL.
  • Zero-Bloat Shared Runtime (@krusch/toolkit & krusch_toolkit): Every Node.js 22 ESM and Python 3.12 repository imports unified LLM/vision clients, logprob routers, cross-family Referee gates, and context pruners from one monorepo toolkit.
  • Closed-Loop Self-Distillation: A 24/7 autonomous SRE daemon (Jean SRE) continuously sweeps 86 software targets, verifies fixes in hermetic test sandboxes, and distills test-gated Golden Remediations back into local weights via QLoRA.

🏗️ The 2026 Sovereign AI Tech Stack Overview

# Zero-config local install (Node.js 22+ built-in SQLite WAL) — auto-configures Claude Code, Cursor, Windsurf & Antigravity
npx krusch-stack init --ide all --mode unified --profile full && npx krusch-stack doctor
┌─────────────────────────────────────────────────────────────────────────────────────┐
│ UNIFIED DISTRIBUTION · krusch-stack v1.0.0 (npx krusch-stack init │ docker compose) │
│           7 Integrated Pillars · 39 Annotated MCP Tools · SQLite WAL + pgvector     │
├─────────────────────────────────────────────────────────────────────────────────────┤
│ LAYER 5 · SOVEREIGN DOMAIN ENGINES & EXECUTION SURFACES                             │
│           KruschNexus · KruschLaw (0.00% FSR) · KruschBiz · Companion · G-Krusch    │
├─────────────────────────────────────────────────────────────────────────────────────┤
│ LAYER 4 · AUTONOMOUS SRE, VERIFICATION & DUAL-TRACK QLoRA SELF-DISTILLATION         │
│           Jean SRE (86 Targets) · Spec-First Referee Gate · 9,377 SFT Trajectory DB │
├─────────────────────────────────────────────────────────────────────────────────────┤
│ LAYER 3 · ZERO-BLOAT RUNTIME & SHARED MONOREPO TOOLKITS                             │
│           @krusch/toolkit (Node 22 ESM · node:sqlite · node --test · oxlint)        │
│           krusch_toolkit  (Python 3.12 · FastAPI · SQLAlchemy 2.0 · PyArrow)        │
├─────────────────────────────────────────────────────────────────────────────────────┤
│ LAYER 2 · 7-SERVER MODEL CONTEXT PROTOCOL (MCP) & RELATIONAL STATE SUBSTRATE        │
│           PostgreSQL 16 + pgvector HNSW · SQLite WAL · Polygres Cloud Bridge        │
│           Tier 1: krusch-context-mcp │ Tier 2A: krusch-git │ Tier 2B: krusch-fs-mcp │
│           Tier 3: krusch-harness 2PC │ Domain: Gateway · Frontend · G-Krusch        │
├─────────────────────────────────────────────────────────────────────────────────────┤
│ LAYER 1 · COMPUTE, MULTI-FAMILY 5-GPU POOL & MICROSECOND CASCADE ROUTING            │
│           Stage 0 (<15µs CPU) ──► Stage 1 (<25µs / <50ms Centroids · 80.72% Acc)    │
│           ──► Local 5-GPU Pool (57GB+ VRAM · 10GbE) ──► 96GB Blackwell G4 (120B)    │
│           ──► Frontier Escalation & 3-Viewport Chrome UI Audit (Gemini 4 Argon)     │
└─────────────────────────────────────────────────────────────────────────────────────┘

⚡ Layer 1: Compute, Multi-Family GPU Pool & Cascade Routing

All local inference models are pinned 100% in VRAM (keep_alive: -1, q8_0 quantized KV caches, zero CPU spill) across an 8-node Linux fleet interconnected via a dedicated 10GbE fabric and encrypted Tailscale mesh:

Compute Tier / Node Role Hardware Profile Pinned Models & Throughput Role in the Stack
Stage 0 & Stage 1 Routers
krusch-pre-router · krusch-cascade-router
In-Process CPU + Local Embedding Centroids <15µs syntactic gate ($0.00)
<25µs / <50ms centroid cascade
Eliminates the 500ms LLM routing tax; benchmarked at 80.72% accuracy ($0.21/1K) on RouteWorks RouterArena with speculative parallel hedging.
Node-02 · Heavy Compute Host
(10GbE Compute Plane)
Dual Xeon 40T · 64GB ECC
Dual RTX 2080 Ti (22.5GB NVLink)
qwen3-coder-30b-moe:latest
(16K ctx · q8_0 KV · 124.2 tok/s)
Primary local code synthesis, multi-file AST refactoring, and Jean SRE autonomous persona reasoning.
Node-01 · State & Referee Host
(10GbE Production Plane)
Dual Xeon 40T · 80GB RAM
Dual RTX 3060 (24.5GB VRAM)
+ Dedicated NVMe DB Array
gemma4:e4b (16K ctx · native tools/thinking/vision/audio)
hermes3:latest (16K ctx · q8_0 KV)
Cross-Family Referee Pool (auditing Qwen outputs), SRE tool execution, statutory/contract prose, and primary PostgreSQL 16 + pgvector host.
Node-03 · Orchestrator Host
(Central Control Plane)
i7-5820K · 32GB RAM
RTX 2080 Ti (11.2GB VRAM) + 5 Edge Nodes
bge-large:latest (1,024-dim)
qwen2.5-coder:7b (74.6 tok/s)
faster-whisper (16kHz ASR)
Fleet-wide 1,024-dim semantic embeddings, sub-second tag/intent classification, local IDE coding, and real-time voice transcription.
Tier L2.5 · Cloud Burst
(On-Demand SSH Tunnel)
48 vCPU · 176GB RAM
RTX PRO 6000 Blackwell (96GB)
gpt-oss:120b
(131K ctx · ~117.7 tok/s · 4-bit MXFP4)
Ephemeral high-VRAM burst tier for 120B architectural synthesis and Dual-Track QLoRA Teacher/Student fine-tuning.
Tier L3 · Frontier & Vision
(Managed API & gemini-api CLI)
Frontier Cloud Escalation gemini-4-argon (65,536 max output · thinkingLevel · CONTINUATION) L0 architectural planning, Golden Remediation synthesis, and 3-viewport (375/768/1440px) headless Chrome visual UI auditing.

🛠️ Layer 2: The 7-Server Model Context Protocol (MCP) & State Substrate

Standardized across Antigravity, Claude Code, Cursor, and Windsurf. You can deploy the entire stack as a single unified server via krusch-stack (npx krusch-stack init) or run each modular MCP server independently with explicit behavioral annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint):

3-Tier Sovereign Agent MCP Ecosystem

Tier / Domain MCP Server & Package Verb Contract Storage Engine & Architectural Role
Unified Stack
All-in-One Bundle
krusch-stack v1.0.0 39 Verbs (All 7 Pillars):
npx krusch-stack init | doctor | mcp | serve
Zero-Docker node:sqlite WAL (.krusch-stack/stack.db) or docker compose up -d (PostgreSQL 16 + pgvector). Bundles Tiers 1–5 + Cascade Router into one MCP stdio/HTTP gateway (:3780).
Tier 1
Working Memory
krusch-context-mcp v1.8.1 5 Verbs:
retrieve, remember, revise, nudge, health
node:sqlite WAL + PostgreSQL 16. Enforces Turn-1 Zero-Trust Hydration, closed 5-category taxonomy, temporal lineage superseding, and INV-12 span-grounded SHA-256 drift detection.
Tier 2A
Code & Git DAG
krusch-git v1.2.2 7 Verbs:
search_symbols, dependency_graph, file_symbols, semantic_search, read_tree, read_blob, list_repos
PostgreSQL 16 + pgvector HNSW. Zero-dependency brace-matched AST symbol chunker, recursive SQL CTE caller/callee blast-radius checks, and Hybrid BM25 + 1,024-dim RRF with temporal decay.
Tier 2B
OS & Fleet Memory
krusch-fs-mcp v0.3.1 6 Verbs:
search, locate, page_tree, read_page, remember_on_page, sync
SQLite WAL / Postgres + KruschNexus Library Mode. Indexes PDFs, DOCX, /etc/systemd, and /etc/fstab across 8 SSH nodes into SHA-256 drift-verified page trees with .env secret value redaction.
Tier 3
2PC Execution
krusch (Harness) v0.1.0 7 Verbs:
run, task_status, diff, apply_diff, explain, reject, abort
PostgreSQL 16 finite state machine + Bubblewrap sandboxes. Stages patches in staged_diffs, runs isolated container tests, and commits to disk via <32ms two-phase commit (2PC) apply journals.
Domain RAG
Law & Contracts
krusch-gateway-mcp 5 Verbs (<450 tok):
ask_law, ask_biz, check_compliance, ingest, purge
Unified stdio router across KruschLaw (0.00% FSR statutory DAGs), KruschBiz (confirmed-edge contract graphs), KruschBizLaw ("The Join"), and KruschNexus.
Web Design
UI Primitives
krusch-frontend-mcp get_canonical_template, list_canonical_templates, query_design_rules, css_to_tailwind Serves bit-for-bit canonical HTML/SVG components (article-shell, footer-deadbolt, cyber-grid) and responsive layout rules.
Workspace Hub
Drive, Docs & Mail
g-krusch 12 Verbs:
search_drive_rag, write_drive_file, get_agent_steering, etc.
SQLite FTS5 + 1,024-dim Drive RAG, AES-256-GCM vault, and server-side OpenXML/HTML/CSV conversion for native Google Docs (.gdoc), Sheets (.gsheet), and Slides (.slides with speaker notes).
Hybrid Bridge
Cloud Substrate
@krusch/polygres-connector getSymbolContext, auditRefactor, sync Bridges local SQLite/PostgreSQL with Polygres Cloud (pgContext + pgGraph) with 40-char SHA pinning and fail-closed air-gap enforcement.

🧰 Layer 3: Zero-Bloat Runtime & Shared Monorepo Toolkits (@krusch/toolkit & krusch_toolkit)

We avoid heavyweight framework dependencies by standardizing every service across 27+ core repositories on Node.js 22+ ESM, Python 3.12, PostgreSQL 16, and a pair of zero-bloat shared monorepo libraries:

  • JavaScript / Web Stack: Node.js 22 ESM ("type": "module"), built-in node:sqlite (DatabaseSync with WAL + automatic PRAGMA quick_check corruption self-healing), native node --test, oxlint, Express, React + Vite + Tailwind CSS, and Cloudflare Pages/Workers.
  • Python / Data & ML Stack: Python 3.12, FastAPI, SQLAlchemy 2.0, Pydantic v2, PyArrow, Poppler TSV layout extraction, faster-whisper, and pytest.
Shared Module Exported Primitives What It Replaces / Provides
@krusch/toolkit/llm & /vision chat, chatJson, callGeminiMedia, callGeminiMediaJson Unified client for local Ollama pools, xAI, and gemini-4-argon (thinkingLevel, 65,536 maxOutputTokens, and multi-hop CONTINUATION stitching).
@krusch/toolkit/browser scrapeHtml, captureResponsiveBreakpoints, auditPageWithArgon Stealth Puppeteer capturing 375/768/1440px viewports + console/network telemetry routed to Gemini 4 Argon with deterministic offline CI fallback.
@krusch/toolkit/decide decide, decideBatch, calibrateChoiceLogprobs, createSystem1Decider Single-token logprob System-1 decision router with temperature calibration, LRU cache, and zero-network CI fallback.
@krusch/toolkit (Spec & Referee) createSpecAuditRunner, runRefereeAuditPass, evaluateRefereeConsensus, checkConvergence Enforces the Dual-Zero-Finding Convergence Gate across orthogonal model families (Qwen3 generator vs. Gemma 4 / Hermes 3 referees).
@krusch/toolkit (Context & Drift) createContextPruner, MemoryInvalidationEngine, ArtifactVerificationGraph 3-stage context pruning (pre-retrieval, post-retrieval, pre-synthesis), temporal fact superseding, and SHA-256 artifact-anchored drift invalidation.
@krusch/toolkit (Resilience & KV) createTrajectoryGuard, evaluateFutileReasoning, createKvCacheManager, createGvaAllocator Loop/goal-drift circuit breakers, prompt-injection sanitization, and Grouped Value Attention (GVA) / KV cache sizing across multi-GPU pools.
krusch_toolkit (Python) ai (chat, chat_json), db (SQLAlchemy), config, log, auth, decide Python 3.12 parity suite for LLM structured extraction, database pooling, rotating JSON logs, and logprob routing.

🔄 Layer 4: Autonomous SRE, Verification & Dual-Track QLoRA Self-Distillation

  1. Spec-First & Disjoint Parallel Subagent Fan-Out (INV-606): Multi-module builds freeze exports, schemas, and JSON contracts ({ ok, tool, summary, data }) in spec.md, fan out parallel subagents owning 1–2 disjoint files with local node --check / npx oxlint verification, and wire shared choke points exclusively in the parent orchestrator before running the Dual-Zero-Finding Convergence Gate.
  2. Jean SRE by Kruschdev (jean-sre) 24/7 Fleet & Codebase Sweeps: Our autonomous SRE daemon continuously audits all 88 software targets and 21+ infrastructure checks—building AST symbol indexes, running cross-family Referee audits, verifying candidate fixes inside hermetic container test suites (node --test and pytest), and publishing 17,899 test-verified SFT trajectories (krush420/sovereign-code-audit-sft).
  3. Dual-Track QLoRA Distillation on 96GB Blackwell G4 (Published on Hugging Face @krush420):
    • 120B Teacher Track (krush420/gpt-oss-120b-sre-lora): Uses native Blackwell Mxfp4Config(dequantize=False) to keep 128 MoE experts frozen in hardware-native 4-bit MXFP4 (~60.8GB VRAM) while training BF16 attention LoRA adapters (r=16, alpha=32, loss 7.448 -> 1.737, 64.89% token acc) on 2,208 elitist teacher rows (2x oversampled Gemini 4 Argon Golden Remediations + rejection-sampled 120B traces).
    • 30B Student Track (krush420/qwen3-coder-30b-sre-lora): Trained on our curated Elitist 120B + Argon Golden Remediations split (loss 0.731 -> 0.214, 93.36% token acc) to continuously upgrade our local 124.2 tok/s coding workhorse.

🚀 Layer 5: Sovereign Domain Engines & Applications Built on the Stack

System Domain How It Leverages the Stack
Krusch Companion v1.2 Voice-First Personal AI & Priority Engine Local faster-whisper ASR, Dual-Axis Priority Board (4 Lanes × 6 Pillars), 20-tool <holodata> proxy with Confirm-Before-Act gates, Opt-In Headless Chrome + Gemini 4 Argon UI Auditor, and SQLite WAL fact superseding.
KruschNexus v0.3.1 Layout-True Document Ingestion Spine 7-parser-family Poppler TSV bounding-box ingestion (100% held-out citation accuracy, 96.2% span precision) preserving physical pdf_page, printed_page, bbox, and char_start..end coordinates.
KruschLaw & Authority Packs Air-Gapped Legal RAG & Statutory DAGs Enforces a 0.00% False Support Rate via two-pass proposition entailment, versioned statutory preemption DAGs (resolve_controlling_law with as_of_date), 16 certified Authority Packs, and cryptographic purge.
KruschBiz & KruschBizLaw Contract Graphs & Statutory Compliance Confirmed-edge commercial contract precedence graph (MSA/SOW/Amendment overrides), unexecuted draft isolation, and "The Join" (auditing contract slots directly against statutory floors/ceilings).

📊 Verified Systems & Performance Benchmarks

Systems & Performance Benchmarks

GitHub Streak Stats

📖 Selected Architecture Papers (All 20 on krusch.dev →)


Engineered by Kevin Ruschman (@kruschdev) · krusch.dev

Pinned Loading

  1. krusch-companion krusch-companion Public

    Sovereign, local-first personal AI assistant & daily companion (like Grokbot, OpenAI Dot, or Muse). Captures ambient voice thought streams into prioritized action boards with durable local memory, …

    JavaScript

  2. krusch-context-mcp krusch-context-mcp Public

    Persistent working memory and invariant steering MCP server for AI coding agents (Claude Code, Cursor, Windsurf). Captures architectural decisions, enforces project rules with pre-commit audits, an…

    JavaScript 77 6

  3. krusch-git krusch-git Public

    Git DAG indexing, AST symbol graphs, and hybrid semantic code search MCP server for AI coding agents (Claude Code, Cursor, Windsurf). Maps repositories into PostgreSQL + pgvector with recursive cal…

    JavaScript

  4. krusch-nexus krusch-nexus Public

    Air-gapped multi-format document ingestion, local OCR fallback, structural legal/business chunking, and PostgreSQL/pgvector indexing for the Krusch Ecosystem.

    Python 1 1

  5. krusch-cascade-router krusch-cascade-router Public

    Dual-stage cascade router for LLMs and agent swarms. Intercepts code, SQL, and math on CPU in <15µs for $0.00 without pre-flight model calls—saving 300–800ms TTFT per turn. Features L2 neural centr…

    JavaScript

  6. G-krusch G-krusch Public

    Sovereign Google Workspace Hub & MCP Server for AI Agents — Cloud-synced agent.md steering, hybrid Vector + SQLite FTS5 BM25 Drive RAG, page-faithful PDF parsing, and Google Docs, Calendar & Gmail …

    JavaScript