@krusch/toolkit & krusch_toolkit), cross-family Referee consensus, and 24/7 autonomous SRE sweeps that distill verified fixes back into local weights via QLoRA—all packaged for developers into a single one-command distribution (krusch-stack).
1. Why We Reject the Default 2026 AI Wrapper Stack
Across 28 active core repositories and 88 total audited software targets in our monorepo, every architectural decision traces back to a single observation: probabilistic models fail predictably when forced to act as their own router, database, memory manager, or code auditor.
The conventional industry stack attempts to paper over model stochasticity by adding more prompt instructions and heavier wrapper frameworks. Our engineering philosophy replaces prompt wishful thinking with hard systems boundaries:
- Multi-Family Model Isolation over Single-Vendor Monoculture: If a Qwen model writes code and another Qwen prompt grades that code, correlated training blind spots pass silently into production. We run distinct model families across distinct physical GPU servers so no model family ever grades its own homework.
- Microsecond CPU & Logprob Routing over LLM-as-Router Tax: Burning 500ms and $0.003 of frontier tokens just to classify an intent is an architectural bug. Our cascade router resolves syntactic patterns in
<15µson CPU and single-token logprob decisions via calibrated System-1 gates. - Relational Graphs & Span-Anchored Memory over Flat Vector Chunks: Arbitrary 500-token chunking severs AST symbol scopes, statutory preemption hierarchies, and PDF coordinate spines. We store Git DAGs, AST caller/callee edges, OS page trees, and governed working memory in PostgreSQL 16 +
pgvectorHNSW and local SQLite WAL. - Shared Zero-Dependency Primitives over Framework Sprawl: Instead of scattering 15 incompatible LangChain/ORM/auth setups across microservices, every Node.js 22 and Python 3.12 project imports from a single monorepo toolkit (
@krusch/toolkitandkrusch_toolkit) and ships to developers through a unified one-command installer (krusch-stack).
┌─────────────────────────────────────────────────────────────────────────────────────┐ │ THE 2026 KRUSCHDEV SOVEREIGN AI TECH STACK │ │ Unified Installer: `npx krusch-stack init` | `docker compose up -d` │ ├─────────────────────────────────────────────────────────────────────────────────────┤ │ PILLAR V · AUTONOMOUS SRE & SELF-DISTILLATION (Jean SRE · 88 Targets · QLoRA) │ │ Gemini 4 Argon + 120B Teacher ──(9,377 Test-Gated SFT)──► 30B Student │ ├─────────────────────────────────────────────────────────────────────────────────────┤ │ PILLAR IV · SPEC-FIRST & PARALLEL SUBAGENT ORCHESTRATION │ │ Frozen spec.md ──► Disjoint Subagents ──► Cross-Family Referee Gate │ ├─────────────────────────────────────────────────────────────────────────────────────┤ │ PILLAR III · ZERO-BLOAT RUNTIME & SHARED TOOLKIT (@krusch/toolkit · krusch_toolkit) │ │ Node 22 ESM (node:sqlite, node --test, oxlint) · Python 3.12 (FastAPI) │ ├─────────────────────────────────────────────────────────────────────────────────────┤ │ PILLAR II · 7-SERVER MODEL CONTEXT PROTOCOL (MCP) SUBSTRATE (`krusch-stack`) │ │ Tier 1: krusch-context-mcp │ Tier 2A: krusch-git │ Tier 2B: krusch-fs │ │ Tier 3: krusch-harness 2PC │ Domain: Gateway · Frontend · G-Krusch │ ├─────────────────────────────────────────────────────────────────────────────────────┤ │ PILLAR I · MULTI-FAMILY 5-GPU BARE-METAL + 96GB BLACKWELL G4 BURST PLANE │ │ L0 (<15µs CPU) ──► L1/L2 Local 5-GPU Pool (57GB+ VRAM · 10GbE Fabric) │ │ ──► L2.5 Blackwell G4 (gpt-oss:120b) ──► L3 Frontier (Gemini 4 Argon) │ └─────────────────────────────────────────────────────────────────────────────────────┘
2. Pillar I: Multi-Family 5-GPU Local Compute + 96GB Blackwell G4 Burst Topology
Rather than treating local inference and cloud inference as mutually exclusive ideologies, our compute plane operates as a 5-tier latency and capability cascade spanning an 8-node bare-metal Linux cluster interconnected over a dedicated 10GbE fabric, an on-demand cloud GPU burst tunnel, and frontier multimodal escalation.
A. The Bare-Metal 5-GPU Local Pool (100% GPU-Resident, keep_alive: -1)
Every local model is pinned in VRAM with keep_alive: -1, q8_0 quantized KV caches, and strict zero-CPU-spill guards so interactive coding agents and background daemons experience zero cold-start model loading latency:
| Compute Tier / Node Role | Hardware Profile | Pinned Models & KV Geometry | Architectural Responsibilities |
|---|---|---|---|
| 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( 16,384 ctx · q8_0 KV · 124.2 tok/s) |
Primary local code synthesis, 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 Database Array |
gemma4:e4b (16K ctx · native tools/thinking/vision/audio)hermes3:latest (16K ctx · q8_0 KV) |
Cross-Family Referee Pool (auditing Qwen outputs), Jean SRE tool executor, legal/contract prose synthesis, and primary PostgreSQL 16 + pgvector host. |
| Node-03 · Orchestrator Host Central Control Plane |
i7-5820K · 32GB RAM RTX 2080 Ti (11.2GB VRAM) |
bge-large:latest (512 ctx · 1,024-dim)qwen2.5-coder:7b (16K ctx · 74.6 tok/s)faster-whisper (base.en 16kHz ASR) |
Fleet-wide 1,024-dim semantic embedding engine, sub-second tag/intent router, local IDE completions, and real-time voice transcription. |
| 5 Specialized Edge Nodes Tailscale + LAN Mesh |
Surface Kiosk, Mobile Auditor, Sandbox Worker, Media/Backup & Staging Nodes | Zero-daemon SSH targets & lightweight SQLite/DBOS workers | Touch/voice companion dashboard, isolated sandbox test execution, media library management, and encrypted off-node backups. |
| Tier L2.5 · On-Demand Cloud Burst SSH Loopback Tunnel |
48 vCPU · 176GB RAM NVIDIA RTX PRO 6000 Blackwell (96GB VRAM) |
gpt-oss:120b( 131,072 ctx · ~117.7 tok/s · 4-bit MXFP4) |
Provisioned on-demand via CLI for 120B deep architectural audits and Dual-Track QLoRA Teacher/Student fine-tuning; auto-stopped on session close. |
| Tier L3 · Frontier Escalation Multimodal & Deep Reasoning |
Managed Frontier API + CLI (gemini-api v0.4.3) |
gemini-4-argon (65,536 max output · thinkingLevel · CONTINUATION)gemini-3.1-flash-lite |
Complex L0 architecture planning, 3-viewport headless Chrome visual UI auditing (375/768/1440px), and Golden Remediation teacher traces. |
B. Cross-Family Referee Consensus: Why No Model Grades Its Own Homework
A foundational rule in our stack is Cross-Family Referee Verification. When qwen3-coder-30b-moe on Node-02 synthesizes a patch or architectural audit, verification is never routed back to a Qwen model. Instead, @krusch/toolkit's runRefereeAuditPass and evaluateRefereeConsensus dispatch the diff and frozen specification to gemma4:e4b and hermes3:latest on Node-01 (or gpt-oss:120b / gemini-4-argon for L0 refactors). Because Qwen, Gemma 4, Hermes 3, GPT-OSS, and Gemini 4 have orthogonal pre-training distributions and tokenizer geometries, cross-family consensus eliminates self-reinforcing hallucination loops.
3. Pillar II: The 7-Server Model Context Protocol (MCP) Ecosystem
Giving an autonomous agent 80+ sprawling MCP tools pollutes the system prompt with thousands of schema tokens and degrades tool-selection accuracy. We organize our entire operational surface into 7 focused, opt-in MCP servers—each enforcing a compact verb contract (typically 350–450 tokens) and explicit behavioral annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint):
| MCP Server | Tier / Domain | Verb Contract | Storage & Key Architectural Invariants |
|---|---|---|---|
krusch-context-mcpv1.8.1 (72★) |
Tier 1 Working Memory & Invariants |
5 Verbs:retrieve, remember, revise, nudge, health |
Local node:sqlite WAL + PostgreSQL 16 dual-write. Enforces Turn-1 Zero-Trust Hydration, closed 5-category taxonomy, temporal decision lineage, bounded sub-5ms wildcard queries, and INV-12 span-grounded SHA-256 drift detection. |
krusch-gitv1.2.2 |
Tier 2A AST & Git DAG Substrate |
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 chunker with comment/regex masking, recursive SQL CTE caller/callee blast-radius walks, and Hybrid BM25 + 1,024-dim vector Reciprocal Rank Fusion (RRF). |
krusch-fs-mcpv0.3.1 |
Tier 2B 8-Node OS Page Memory |
6 Verbs:search, locate, page_tree, read_page, remember_on_page, sync |
SQLAlchemy SQLite WAL / Postgres + KruschNexus Library Mode. Indexes PDFs, DOCX, /etc/systemd, and /etc/fstab across all 8 fleet nodes over SSH with pointer-slice deduplication, SHA-256 PageMemory drift checks, and .env value redaction. |
krusch-harnessv0.1.0 |
Tier 3 Staged 2PC Execution |
7 Verbs:run, task_status, diff, apply_diff, explain, reject, abort |
PostgreSQL 16 state machine + Bubblewrap ephemeral sandboxes. Stages mutations in staged_diffs, runs hermetic tests + invariant gates, and commits to disk via <32ms two-phase commit (2PC) apply journals. |
krusch-gateway-mcp |
Domain RAG Legal, Contract & Compliance |
5 Verbs (<450 tok):ask_law, ask_biz, check_compliance, ingest, purge |
Unified stdio proxy routing across KruschLaw (0.00% FSR statutory DAGs), KruschBiz (confirmed-edge contract graphs), KruschBizLaw ("The Join"), and KruschNexus (layout-true coordinate extraction). |
krusch-frontend-mcp |
UI Design Canonical Web Primitives |
get_canonical_template, list_canonical_templates, query_design_rules, css_to_tailwind, etc. |
Guarantees bit-for-bit HTML/SVG consistency (article-shell, footer-deadbolt, deadbolt-svg, cyber-grid, nav-back) and responsive breakpoint generation across web surfaces. |
g-krusch |
Workspace Hub Google Drive, Docs, Cal & Mail |
12 Verbs:search_drive_rag, write_drive_file, get_agent_steering, etc. |
SQLite FTS5 + 1,024-dim hybrid Drive RAG, AES-256-GCM OAuth vault, and native server-side synthesis for Google Docs (.gdoc), Sheets (.gsheet), and Slides (.slides OpenXML with speaker notes) using zero extra OAuth scopes. |
One-Command Unified Distribution: krusch-stack (npx & Docker Compose)
While each MCP server is published as an independent repository, wiring 7 separate servers across Claude Code, Cursor, Windsurf, and Antigravity used to require manual configuration. To make the full architecture installable in under 30 seconds, we packaged the entire ecosystem into krusch-stack (v1.0.0):
- Zero-Setup Local SQLite Mode (
npx krusch-stack init): Uses Node.js 22 nativenode:sqlite(.krusch-stack/stack.db) out of the box—requiring zero external databases or Python virtual environments—and automatically generates or merges MCP configurations for Claude Code (.mcp.json), Cursor (.cursor/mcp.json), Windsurf, and Antigravity alongside.agent/AGENTS.md. - Unified vs. Modular Gateway Modes: Developers can either register a single
krusch-stackMCP entry exposing all 39 behavioral-annotated tools (or 27 core coding tools via--profile core) or pass--modularto register each pillar as its own dedicated MCP entry. - One-Command Docker Stack (
docker compose up -d): Spins uppgvector/pgvector:pg16with all 9 relational/vector tables pre-initialized alongside thekrusch-stackHTTP & MCP gateway on port3780.
# Option A: Zero-Docker local install (Node 22 native SQLite + multi-IDE auto-wiring) npx krusch-stack init --profile full npx krusch-stack doctor # Option B: Full PostgreSQL 16 + pgvector + Gateway container stack git clone https://github.com/kruschdev/krusch-stack.git cd krusch-stack && docker compose up -d curl http://127.0.0.1:3780/health
4. Pillar III: @krusch/toolkit & krusch_toolkit — The Zero-Bloat Application Runtime
Every application in our ecosystem—from real-time voice kiosks and ADHD priority boards to legal statutory engines and autonomous CI healers—runs on a deliberately standardized, minimal-dependency foundation:
- JavaScript / TypeScript Tier (Node.js 22+ ESM): We standardize on native ES Modules (
"type": "module"), Node 22's built-innode:sqlite(DatabaseSyncwith WAL mode and busy timeouts), the nativenode --testrunner, andoxlintfor sub-second static analysis. Frontend applications use React 18/19 + Vite + Tailwind CSS, while static and edge surfaces deploy to Cloudflare Pages & Workers. - Python Tier (Python 3.12+): Data-intensive, OCR, and fine-tuning services standardize on FastAPI, SQLAlchemy 2.0, Pydantic v2, PyArrow, and pytest inside isolated virtual environments.
- Dual-Storage Persistence: High-concurrency multi-node state, vector embeddings (
pgvectorHNSW), and 2PC staging live in PostgreSQL 16 on dedicated NVMe storage, while edge-local caches and standalone tools use zero-Docker SQLite WAL with automaticPRAGMA quick_checkcorruption detection and self-healing rotation.
Inside @krusch/toolkit: One Shared Library Across 28+ Projects
Instead of copying boilerplate across repositories, all shared infrastructure lives in @krusch/toolkit (JavaScript) and krusch_toolkit (Python):
// Example: Combining System-1 Logprob Routing, Cross-Family Referee Consensus,
// and Headless Chrome + Gemini 4 Argon Visual UI Auditing via @krusch/toolkit
import { decide } from '@krusch/toolkit/decide';
import { auditPageWithArgon } from '@krusch/toolkit/browser';
import {
createSpecAuditRunner,
runRefereeAuditPass,
evaluateRefereeConsensus,
checkConvergence
} from '@krusch/toolkit';
// 1. Sub-millisecond cached / single-token logprob routing decision
const tier = await decide({
prompt: 'Classify patch blast radius for AST symbol change in ast-chunker.js',
choices: ['L1_FAST', 'L2_LOCAL_30B', 'L2_5_BURST_120B', 'L3_ARGON'],
defaultChoice: 'L2_LOCAL_30B'
});
// 2. Cross-family Referee consensus (Generator: Qwen3-30B -> Referees: Gemma 4 + Hermes 3)
const refereeResult = await runRefereeAuditPass({
specMarkdown,
candidateDiff,
generatorFamily: 'qwen3',
refereeModels: ['gemma4:e4b', 'hermes3:latest']
});
const consensus = evaluateRefereeConsensus(refereeResult);
// 3. Multi-viewport (375px / 768px / 1440px) Chrome + Gemini 4 Argon UI verification
const uiAudit = await auditPageWithArgon({
url: 'http://localhost:4080/articles/the-sovereign-ai-tech-stack.html',
viewports: [375, 768, 1440],
thinkingLevel: 'HIGH'
});
| Toolkit Subpath | Key Exported Primitives | Engineering Problem Solved |
|---|---|---|
@krusch/toolkit/llm &@krusch/toolkit/vision |
chat, chatJson, callGeminiMedia, callGeminiMediaJson |
Unified client for local Ollama pools, xAI, and Gemini 4 Argon with thinkingLevel, 65,536 maxOutputTokens, and automatic multi-hop CONTINUATION stitching. |
@krusch/toolkit/browser |
scrapeHtml, captureResponsiveBreakpoints, auditPageWithArgon |
Stealth Puppeteer automation capturing 375/768/1440px viewports + console/network error telemetry for automated Gemini 4 Argon visual UI audits with deterministic offline CI fallback. |
@krusch/toolkit/decide |
decide, decideBatch, calibrateChoiceLogprobs, createSystem1Decider |
Single-token logprob classification router with temperature calibration, LRU memoization, and zero-network CI determinism. |
@krusch/toolkit(Spec & Referee Gate) |
createSpecAuditRunner, runRefereeAuditPass, evaluateRefereeConsensus, checkConvergence |
Enforces the Dual-Zero-Finding Convergence Gate across independent model families and synthesizes executable verification contracts. |
@krusch/toolkit(Memory & Context) |
createContextPruner, MemoryInvalidationEngine, ArtifactVerificationGraph |
3-stage context pruning (pre-retrieval, post-retrieval, pre-synthesis), temporal memory superseding, and SHA-256 artifact-anchored drift invalidation. |
@krusch/toolkit(Resilience & KV/GVA) |
createTrajectoryGuard, evaluateFutileReasoning, createKvCacheManager, createGvaAllocator |
Detects reasoning loops and goal drift, shields against prompt injection, and sizes multi-agent KV/GVA caches to prevent VRAM thrashing. |
5. Pillar IV: Spec-First Engineering & Disjoint Parallel Subagent Fan-Out
How do we build or refactor complex multi-service features without merge conflicts, broken imports, or context degradation? Whenever a task spans 3 or more independent modules (or mutates a database schema), our orchestrator enforces the L0 Spec-First & Disjoint Parallel Subagent Fan-Out Protocol (INV-606):
- Turn-1 Zero-Trust Hydration & Blast Radius Check: Before reading or editing code, the agent hydrates active project invariants via
krusch_context_retrieveand traces inbound callers and outbound callees viakrusch_git_dependency_graph. - Freeze the Contract in
spec.md: The parent orchestrator locks down exact function signatures, SQLite/PostgreSQL table schemas, and standard JSON return shapes ({ ok, tool, summary, data }) inspec.mdbefore any implementation code is written. - Disjoint Subagent Fan-Out (
STRICT BOUNDARY RULE): Parallel subagents are dispatched concurrently, with each subagent assigned ownership of 1–2 disjoint files. Each subagent must verify its module locally vianode --check,npx oxlint, orpytestand is strictly forbidden from touching shared choke points. - Choke-Point Wiring & Dual-Zero-Finding Gate: Only after all subagents return clean modules does the parent orchestrator wire shared entrypoints (such as
src/server.js,src/agent/tools.js, orclient/src/App.jsx), execute the full hermetic test suite, and runkrusch_context_nudge({ trigger: "pre_commit" }).
6. Pillar V: Closed-Loop Autonomous SRE & Dual-Track QLoRA Self-Distillation
The crowning loop of the KruschDev tech stack is that our infrastructure continuously audits, heals, and trains itself. On Node-02, our 24/7 autonomous daemon (Jean SRE, running jean-harness and jean-sweep) continuously rotates through all 88 homelab targets (28 active core projects, 5 root library packages, and 55 secondary/archived repositories) alongside 21+ infrastructure health checks.
A. Hermetic Verification & Portable SFT Trajectory Curation
During each sweep, Jean SRE builds a fresh AST symbol index, loads repo-specific rules (automatically switching between JavaScript ESM standards and Python 3.12 standards via pyproject.toml inspection), runs cross-family Referee audits, stages candidate fixes, and validates them inside isolated container test runners (node --test and pytest).
Every remediation that passes 100% of unit tests with zero linter warnings is normalized by normalizePortableSftText—stripping machine-specific absolute paths into portable $WORKSPACE_ROOT coordinates—and published to our 17,899-example Supervised Fine-Tuning (SFT) corpus on Hugging Face (krush420/sovereign-code-audit-sft across 3 splits: 401 Argon Golden Remediations, 2,208 Elitist 120B Teacher rows, and 15,290 11-phase Code Audit trajectories).
B. Dual-Track QLoRA Fine-Tuning on 96GB Blackwell G4 (120B Teacher & 30B Student)
Rather than letting frontier cloud escalations remain a sunk operating cost, we capture every high-complexity Gemini 4 Argon Golden Remediation and top rejection-sampled 120B trajectory (requiring >=3 exact file:line citations and zero hallucination flags) to run a Dual-Track QLoRA Distillation Pipeline on an on-demand 96GB NVIDIA RTX PRO 6000 Blackwell (G4) accelerator:
- Track 1 — 120B Elitist Teacher QLoRA (
krush420/gpt-oss-120b-sre-lora): Using native BlackwellMxfp4Config(dequantize=False), we keep all 128 Mixture-of-Experts (MoE) routed layers frozen in hardware-native 4-bit MXFP4 (~60.8GBVRAM) while training LoRA adapters (r=16, alpha=32) on BF16 attention projections (q_proj,k_proj,v_proj,o_proj) via the Pre-LN residual stream inside a single 96GB GPU—converging training loss from7.448 → 1.737(64.89%token accuracy). - Track 2 — 30B Local Workhorse Student QLoRA (
krush420/qwen3-coder-30b-sre-lora): Trained on our curated Elitist 120B + 2x-oversampled Argon Golden Remediations split—converging training loss from0.731 → 0.214(93.36%token accuracy) and deploying back to Node-02's dual bare-metal GPUs at 124.2 tok/s.
The result is a true flywheel: frontier cloud intelligence is invoked only at the edge of capability, verified deterministically by unit tests through krusch-stack, and distilled permanently into sovereign open-weights adapters.
7. Complete 2026 Tech Stack Reference Matrix
| Stack Layer | Primary Technologies & Projects | Key Metrics & Invariants |
|---|---|---|
| 0. Unified Distribution | krusch-stack (v1.0.0 · npx krusch-stack init / Docker Compose) |
Bundles all 7 pillars & 39 annotated MCP tools into a single install with zero-setup Node 22 SQLite default + pgvector upgrade. |
| 1. Routing & Gating | krusch-pre-router, krusch-cascade-router, @krusch/toolkit/decide |
<15µs Stage-0 CPU gate ($0.00), <25µs L1–L3 cascade, 80.72% RouterArena accuracy at $0.21/1K. |
| 2. Local GPU Pool | 5 Bare-Metal GPUs (57GB+ VRAM) over 10GbE · Ollama / vLLM (keep_alive: -1) |
qwen3-coder-30b-moe (124.2 tok/s), gemma4:e4b, hermes3:latest, qwen2.5-coder:7b (74.6 tok/s), bge-large (1,024-dim). |
| 3. Cloud Burst & Frontier | 96GB RTX PRO 6000 Blackwell G4 + gemini-4-argon (gemini-api v0.4.3) |
gpt-oss:120b (~117.7 tok/s, 131K ctx) on-demand SSH tunnel + Gemini 4 Argon 3-viewport Chrome UI visual auditor. |
| 4. 3-Tier Coding MCPs | krusch-context-mcp (v1.8.1), krusch-git (v1.2.2), krusch-fs-mcp (v0.3.1), krusch-harness |
Turn-1 Zero-Trust Hydration, relational AST caller/callee CTEs, 8-node SSH page trees with SHA-256 drift detection, and <32ms 2PC apply. |
| 5. Application Runtime | Node.js 22 ESM (node:sqlite, node --test, oxlint), Python 3.12 (FastAPI, SQLAlchemy, pytest), React + Vite + Tailwind |
Shared @krusch/toolkit & krusch_toolkit monorepo libraries; zero redundant wrapper dependencies. |
| 6. State & Databases | PostgreSQL 16 + pgvector HNSW, SQLite WAL, @krusch/polygres-connector, DBOS |
Dedicated NVMe storage isolation (OS drives strictly protected), automatic SQLite corruption self-healing, and hybrid Polygres sync. |
| 7. Domain Intelligence | KruschNexus, KruschLaw, KruschBiz, Authority Packs, krusch-gateway-mcp, g-krusch |
0.00% False Support Rate statutory grounding, 100% layout-true citation accuracy, and native Google Docs/Sheets/Slides synthesis. |
| 8. Autonomous SRE & R&D | jean-sre (24/7 daemon), krusch-ci-sentinel, Blackwell MXFP4 QLoRA pipeline |
88/88 repositories audited & test-verified; 17,899 published SFT trajectories + open-weights 30B & 120B QLoRA adapters on Hugging Face. |
Install the Unified KruschStack in 30 Seconds
npx krusch-stack init · MIT Licensed · Node 22 ESM & Docker Compose · 39 Annotated MCP Tools