Active Engineering & Open Source · Los Angeles, CA
Kevin Ruschman

Kevin Ruschman

AI Systems Architect & Open Source Maintainer
Local-First Agent Infrastructure · PostgreSQL Transaction Invariants · Model Context Protocol (MCP)

I build local-first agent infrastructure so coding agents and company knowledge systems can plan and test without writing your disk until you approve — state in Postgres, models interchangeable.

Language models are probabilistic samplers; modifying your codebase or managing confidential client knowledge requires a deterministic transaction manager. My open-source architectures replace hallucination-prone prompt chains with hard transactional invariants, sandboxed test verification, and atomic two-phase commit disk updates.

Creator of krusch (coding harness), kd-Code (developer workbench with center-stage diff review), krusch-context-mcp (a 71★ sovereign 16-tool Model Context Protocol server), and krusch-cascade-router (sub-15µs CPU syntactic gates with neural centroid escalation).

PostgreSQL 16 & pgvector Two-Phase Commit (2PC) 16-Tool MCP Server Sub-15µs CPU Fast-Path Sandboxed Test Verification Local-First Inference Evidentiary Grounding

The Invariant Lifecycle: Stage → Verify → Commit

How krusch and kd-Code prevent coding agents from corrupting git repositories or applying broken refactors.

STEP 01
Stage in Postgres
ACID Isolation

The model plans and generates diffs directly into relational tables (staged_diffs). Zero unvetted file writes ever touch your physical working tree.

STEP 02
Sandboxed Verify
Ephemeral Runner

A shadow workspace runs automated test suites, typechecks, and linters in isolation. If a test fails, the staged turn aborts instantly without repo pollution.

STEP 03
Diff Review
kd-Code Workbench

Inspect side-by-side color-coded diffs via @pierre/diffs, symbol graph dependencies, and AST impact analysis before authorizing disk modification.

STEP 04
2PC Fsync Apply
<32ms Atomic Apply

Only on verified tests AND explicit human approval does the two-phase commit manager fsync changes to disk. Instant 1-click rollback preserves sanity.

Explore by Need: Three Doors

Select your entry point across developer harnesses, persistent memory, and sovereign enterprise pilots.

01 / DEVELOPERS v0.1 Preview

Coding Harness & Workbench

Stop coding agents from hallucinating broken repositories. Models plan in Postgres, test in sandboxes, and apply changes strictly via atomic 2PC commits.

0 Unvetted Writes Sandbox Gates 32ms Apply
03 / FIRMS & ENTERPRISE Advisory & Pilot

Sovereign On-Prem Systems

Air-gapped document intelligence and high-throughput data engineering for regulated practices and high-stakes operations. Deterministic page-and-line evidence grounding, messy OCR pipeline confidence, and de-risked 30-day pilots.

Air-Gapped Local Evidence Grounding Zero Lock-In
Additional Primitives & Developer Tooling
Stage-0 CPU syntactic gate and exact-match LRU memoization. Intercepts code fences, SQL, and stack traces in <10µs with $0.00 routing tax and 0 token burn.
AI styling assistant MCP server providing coding agents with 42 curated design heuristics, Figma token ingestion, and sqlite-vec semantic rule retrieval.

Core Architectural Invariants

The design rules governing every system in the KruschDev ecosystem.

01 / INVARIANTS

Invariants Over Prompts

Never trust language models to police their own file writes or follow conversational rules. Enforce constraints in PostgreSQL ACID tables, AST parsers, and atomic two-phase commit journals.

02 / ROUTING TAX

Multi-Tier Routing Cascades

Don't burn a 500ms LLM call just to choose an LLM. Intercept code fences and SQL on CPU in <15µs for $0.00, escalate to sub-50ms neural centroids, and only query frontier models when necessary.

03 / SOVEREIGNTY

Local-First Sovereignty

Run compute, vector indexes, and episodic memory on self-hosted bare-metal clusters. Privileged files, client discovery, and organizational memory never leak to third-party cloud APIs without explicit consent.

Technical Insights & Publications

Architectural breakdowns on memory substrates, agent steering, and sovereign infrastructure.

Flagship Architecture <15µs CPU Gate Speculative Hedging

⚡ Multi-Tier Cascade Routing: Slashing Enterprise Inference Budgets by 60–80%

Don't burn a 500ms LLM call just to choose an LLM. Systems architecture deep dive into krusch-pre-router (<15µs CPU gate, $0.00 routing tax), Stage-1 neural centroids (<50ms cosine routing), and speculative parallel hedging to eliminate fallback latency.

Read Cascade Routing Deep Dive →
Flagship Architecture Enterprise MCP PostgreSQL 16 + pgvector

⚡ Sovereign Context & Working-Memory Architecture for Coding Agents

Decoupling tool density, stratified decay, and transactional state for enterprise codebases. Systems architecture deep dive into krusch-context-mcp (v1.6.x) and the krusch (v0.1.0) 2PC apply harness: 2026 Streamable HTTP, domain-stratified λ-decay, declarative steering nuggets, and sovereign PostgreSQL 16 + pgvector persistence.

Read Context Architecture Deep Dive →
Flagship Harness Bubblewrap Sandbox PostgreSQL 16 ACID

🛡️ The Krusch Coding Harness: Why Autonomous Code Agents Require a Transaction Manager, Not a Prompt

Why unconstrained file writing breaks coding agents. Systems deep dive into krusch: pre-commit SHA-256 diff staging, Bubblewrap container isolation, storage-engine 2PC apply journals, row-locked catalog FSMs, and actionable failure attribution via Modular RSI.

Read Harness Architecture Deep Dive →
Flagship Architecture PostgreSQL State Plane

⚡ Postgres as the State Plane: Side Effects Require a Transaction Manager

A language model is a probabilistic sampler; side effects require a transaction manager. How krusch (coding harness), krusch-pre-router (sub-15µs CPU gate), krusch-cascade-router, and krusch-context-mcp unify into an invariant-gated developer harness.

Read Full Architecture Article →
Deep Dive Memory Substrates

🧠 Beyond Simple RAG: What Makes krusch-context-mcp Special

Exploring the core capabilities of krusch-context-mcp: mathematical temporal recency decay, declarative steering facts, company brain consensus, lakebase SQLite sync, and research engines.

Read Architecture Deep Dive →
Code-Agent Architecture PostgreSQL 16 + pgvector

⚡ Architecting Code-Agent Retrieval & Memory: Beyond Naive Vector Search

Why sliding-window RAG fails on codebases. Systems deep dive into krusch-context-mcp: single-store PostgreSQL 16 + pgvector, structural symbol extraction, SQL Reciprocal Rank Fusion (RRF), dependency graph walks, and deterministic server token budget packing.

Read Retrieval Architecture Article →
Hybrid Architecture PostgreSQL + pgGraph

🚀 Local-First Core, Hybrid Cloud Elasticity: Decoupling Agent Memory

Decoupling AI coding agent working memory into managed PostgreSQL (pgGraph + HNSW) and optional cloud embeddings for zero VRAM load and global context while keeping file writes strictly sovereign.

Read Full Article →