Kevin Ruschman
I build the infrastructure that makes AI coding agents reliable. My open-source work focuses on persistent agent memory, deterministic code verification, and crash-recoverable sandboxed execution environments: maintaining architectural context across sessions, catching recurring defect classes in under 1ms, and controlling AI-generated file changes. Deterministic gates do not guarantee that a model's plan is semantically right; they bound blast radius and make failures recoverable.
Lab Provenance & External Validation: Independent engineering research and open-source development (8/8 Official MCP Registry dev.krusch/* servers · 8/8 AddonAudit Gold 100/100 · 9 npm packages / 4,890/mo). Projects and benchmarks are developed and tested in my own lab unless otherwise indicated, paired with maintainer-reviewed PRs merged into external Rust, TypeScript, and Python codebases (33 merged PRs) →.
Target Engineering Roles: AI Infrastructure Engineer · Agent Systems Engineer · AI Reliability & Evaluation Engineer · Developer Infrastructure Engineer (AI Agents). Open to individual-contributor engineering roles, including senior scope depending on team needs and responsibilities (Los Angeles, CA · Hybrid · Remote).
Three flagship projects, one headline result each (all self-run in my lab; benchmark evidence & status →):
- krusch-context-mcp (agent memory):
90.26%accuracy and95.77%evidence recall on the public ACL 2024 SnapLoCoMobenchmark (1,540 questions), with $0 LLM cost for memory ingestion. - @krusch/toolkit (code verification):
16deterministic static/AST detectors that flag known security and boilerplate defects in AI-written code in under 1ms, without another LLM. - krusch-coding-harness (safe execution): a journaled, crash-recoverable multi-file apply protocol (PostgreSQL write-ahead intent + POSIX atomic per-file replacement);
118/118tests pass, including a SIGKILL mid-apply recovery test.
Core Engineering Competencies: Software Architecture & Systems Engineering · Distributed & Crash-Recoverable State (PostgreSQL, SQLite WAL) · AI Agent Orchestration & MCP · Application & Sandbox Security (Bubblewrap, SSRF/HMAC/AST) · Automated Testing & Empirical Verification · Inference & Latency Optimization · Open-Source Collaboration (Rust, TypeScript, Python).
Core Open-Source Infrastructure: Agent Memory, Code Verification & Crash-Recoverable Execution
Three complementary open-source substrates addressing the primary reliability failure modes of autonomous coding agents: krusch-context-mcp governs the reliability of an agent's persistent memory and architectural invariants, while @krusch/toolkit and krusch-coding-harness govern the reliability and safety of the code and side effects it produces.
krusch-context-mcp: Persistent Agent Memory & SHA-256 Drift-Guarded Invariants
- Problem:
- Long-horizon coding agents lose architectural invariants across sessions, retrieve stale or contradictory context, or burn LLM tokens on lossy summarization.
- Architecture:
- Zero-LLM local indexing combining SQLite full-text search, local
1024dvector embeddings, Reciprocal Rank Fusion, explicit decision superseding, and SHA-256 line-span hashes that detect when referenced code lines drift. - Implementation:
- Node.js 22
node:sqliteWAL (0o444read-only benchmark stores, optionalPostgreSQL 16 + pgvectorbackend) exposing 5 canonical MCP verbs (retrieve,remember,revise,nudge,healthin~950o200k_baseschema tokens). - Verification:
155/155automated Node tests + SHA-256 zero-leakage verifiers (confirming zero ground-truth answers or QA pairs enter the read-only conversation store) + deterministicT=0evaluation judges.- Results:
90.26%accuracy &95.77%evidence recall across1,540ACL 2024 SnapLoCoMoprobes at$0.00ingest;81.50%@$1.35on model-matchedGPT 5.6 Lunaacross600DolphinBenchtasks (71.1xcheaper thanMem0on the same model;91.17%uploaded submissionUUID c047b063queued; full status ledger →).- Limitations:
- When simpler suffices: single-machine workflows run on zero-Docker built-in
node:sqliteWAL (npx krusch-context-mcp init); thePostgreSQL 16adapter is opt-in only for shared multi-worker state. Zero-LLM indexing misses1.67%(10/600) of tasks requiring implicit multi-turn synthesis with zero lexical or vector overlap.
@krusch/toolkit & krusch_toolkit: Pre-Audited Runtime Modules & Sub-Millisecond Static/AST Security Checks
- Problem:
- Coding agents repeatedly generate subtly broken boilerplate: DNS-rebinding SSRF regexes, non-constant-time webhook checks, unclamped ORM pagination, hardcoded JWT fallbacks, and un-aborted fetches.
- Architecture:
- Pre-audited runtime "Lego bricks" (
40modules,65+.d.tssubpaths,7blueprints, Wayland/CDP@krusch/toolkit/easibrowser client, & Continual RSISIMmemory) paired with an Ed25519-sealed multi-agentbrick-exchange, 4-axis HydraDB ontology, 2-hop AST fan-out planner, and a deterministic<1msstatic & structuralauditBoilerplateTextSlop-Breaker gate (16rules), using zero-cost static analysis instead of slow, probabilistic LLM linting. - Implementation:
- Node 22 ESM & Python 3.12 libraries providing connect-time DNS-pinned
safeFetch,timingSafeEqualHMAC verification,409/422idempotency locks, SHA-256 hash-chained audit logs, RBAC/IDOR guards, and<15µs(<25µsceiling) pure-CPU Stage-0 routing gates prior to model inference. - Verification:
204/204Node tests +201/201pytesttests +0/256release-hygiene checks + live third-party OSS validation onOWASP/NodeGoat,node-express-realworld-example-app, andstripe-samples/accept-a-payment.- Results:
- Catches real SSRF, auth-secret fallback, unclamped pagination, and unsafe YAML/webhook anti-patterns in
<1msat$0.00compute cost; paired on-demand MCP tool loading (krusch-stack v1.3) cuts upfront tool-schema bytes-68.5%(+6.40 ppBFCL v3accuracy). - Limitations:
- Structural/AST rules target deterministic vulnerability and boilerplate classes (
16rules), not arbitrary domain-logic bugs; dynamicevalor cross-service taint requires sandboxed runtime tests and human or multi-model code review.
krusch-coding-harness & krusch-grounded-harness: Sandboxed Test Gates & Write-Ahead Apply Journals
- Problem:
- Unconstrained coding agents overwrite dirty working trees, spin in duplicate failing tool calls, execute prompt-injected shell commands, or leave partial file writes on mid-commit crash.
- Architecture:
- Import-frozen
Object.freezepolicy floors + network-disabled Bubblewrap (bwrap) sandboxes +<150msTurn-0 workspace grounding +PostgreSQL 16write-ahead apply journaling paired with pre-commit SHA-256 file-drift guards, POSIX atomicrenameSync/fsyncreplacement, and startup crash reconciliation. - Implementation:
- Explicit state machine (
PENDING → VERIFYING → APPROVED → APPLYING → APPLIED / RECOVERED) with mid-apply crash-injection testing (SIGKILLafter first rename followed by cold-processrecoverInFlightApplies()), duplicate tool-call memoization, and verify-on-stop output gates. - Verification:
118/118krusch-coding-harnesstests (including interrupted-apply crash recovery & reconciliation) +21/21krusch-grounded-harnesstests +95/95krusch-stack v1.3.1tests +1,046ETH SpyLabAgentDojosecurity episodes +225Aider Polyglotexercises.- Results:
0/1,046successful prompt-injection attacks onAgentDojo(a benchmark-specific finding under active sandbox and policy defenses, not prompt-injection immunity);51.56%onAider Polyglotup from19.56%on the same open-weights model (driven by isolated test execution, compiler/test error feedback, and bounded repair retries fixing72failed tasks);<32mslocal journal + swap overhead; and-95.2%(42 → 2) duplicate MCP calls.- Limitations:
- When simpler suffices: for a single interactive developer session, an isolated
git worktree, staged diff, and sandboxed test run (the zero-Docker SQLite default inkrusch-stack) achieves practical safety with less operational surface; PostgreSQL write-ahead journaling targets unattended background daemons and multi-worker queues where crash recovery and durable audit state justify a database. Terminology: "2PC" is this project's name for a journaled, crash-recoverable multi-file apply protocol (PostgreSQL write-ahead intent + POSIX atomic per-file replacement), not classic distributed two-phase commit with transactional participants. Each file swap is atomic, but a multi-file batch is not atomically visible: another process can observe a partly-applied batch until it completes or recovery rolls it back.PostgreSQLACID does not natively span POSIX filesystems; an uncoordinated external OS process mutating the same file in the sub-millisecond window between the SHA-256 pre-check andrenameSynccan still race without container/worktree isolation.
krusch-coding-harness against PostgreSQL 16 + Bubblewrap (bwrap --unshare-net): (1) stages a flawed AI patch without touching disk, (2) fails isolated sandbox tests and rejects the diff (status=REJECTED), (3) stages and sandbox-verifies the repaired 2-file fix, (4) kills applyDiffBatch() mid-apply with SIGKILL and recovers the torn state via cold-process recoverInFlightApplies(), and (5) cleanly applies both files (status=APPLIED). Source: scripts/demo-full-harness-loop.mjs · raw output · 15 s SIGKILL-only clip.Interactive 4-Step Architecture Trace & 4 Narrated 1080p Walkthroughs (Click to Expand)
Interactive Trace: Persistent Memory, Static Gates & Crash-Recoverable 2PC
Step through a multi-session task to inspect how krusch-context-mcp, @krusch/toolkit, and krusch-coding-harness block stale line drift, catch SSRF boilerplate in <1ms, and recover cleanly from a mid-commit crash. Illustrative replay: function, table, and outcome names match the source; the recording above is the real run.
Session 1 records an architectural invariant anchored to exact file coordinates (src/public/assets/layman-mode.js#L21) with a SHA-256 line-span hash at $0.00 zero-LLM cost.
krusch_context_remember({
category: "invariant",
content: "Keep STORAGE_KEY pinned at line 21",
provenance: { file: "src/public/assets/layman-mode.js", start_line: 21 }
})
{
"ok": true,
"id": 152,
"anchor": "layman-mode.js#L21",
"sha256": "a4f9c2e8...81c2",
"status": "VALID",
"ingest_cost_usd": 0
}
Watch the Flagship Open-Source Walkthroughs
Frame-accurate 1080p walkthroughs covering persistent working memory, pre-audited runtime Golden Bricks, the unified 10-pillar coding-agent stack, and epistemic framing & counterfactual security (zero video bytes load until clicked).
5-Verb Agent Memory & SHA-256 Span Provenance
The Golden Bricks & 16 <1ms Static/AST Guards
Unified 10-Pillar, 39-Tool Stack & Harnesses
6-Pole Epistemic Triangulation & Blind AST Counterfactuals
Collaborating in External Codebases: Maintainer-Reviewed Merged PRs
Building a self-directed R&D lab is different from modifying someone else's codebase under external code review. While my own repositories are still early in community adoption (83★ on krusch-context-mcp), here are pull requests where I diagnosed bugs, followed upstream conventions, and passed maintainer review across independent Rust, TypeScript, and Python projects:
hydra-db/selfgraph
Rust & TypeScript temporal graph engine: schema-lineage subtype expansion (#157), endpoint canonicalization (#215), entity-resolution case folding (#180), epochMicros contradiction ordering (#167), and 5 additional merged fixes (all 9 PRs →).
RouteWorks/RouterArena
Multi-tier LLM routing benchmark: maintainer @yl231 audited all 8,400 live OpenRouter predictions and github-actions[bot] CI Run #780 (0.7263 score, 0 abnormal) before merging PR #169 into main.
julianosig/easi.run
Sandboxed browser infrastructure in Rust: isolated Chromium contenteditable focus ordering (Issue #2) and merged 8 Wayland display, CDP, and session-cleanup fixes (#3, #4, #5, #7, #8, #9, #10, #11; all 8 PRs →).
NousResearch/hermes-agent
Nous Research open-source agent runtime: passed 15/15 catalog validation and plugin_guard static checks to merge Hermes Parallax (PR #153023), plus 5 merged MCP trust-binding PRs in hol-guard and open HF Space harness-lens#21.
- HydraDB Hackathon (Nov 2026) →
HydraScope(Live App · Architecture Write-Up): Built a self-hostedhydradb:0.4.0OpenCypher +@hydradb/selfgraphagent context layer (compressing64MCP tool schemas into721prompt tokens,-94.2%); dogfooding it against real ontologies surfaced and produced the9merged Rust & TypeScript PRs inhydra-db/selfgraphabove. - EVOLVE: 8090 AI Hackathon (Redwood City, In-Person, Nov 2026) →
DEADBOLT(Live Audit Desk · Architecture Paper): Shipped a 4-stage Software Factory governance & 2-hop WebAssembly Tree-sitter blast-radius gate under a 20-hour code freeze integrating 8090's Work Order APIs and HydraDBv0.4.0, now operating a live multi-GPU Public Audit Desk and quarantined Rule-of-3 Golden Brick Draft PR pipeline on Vercel Board.
From Physical Operations & Field Diagnostics to Deterministic Agent Infrastructure
Before focusing full-time on AI infrastructure in late 2025, I spent twelve years (2013–2025) working in physical environments where symptoms rarely match root causes and mistakes carry immediate operational cost: executing NEC-compliant residential electrical remodels (panel upgrades, kitchen/bath, recording studio) and festival generator/stage wiring across New England (Atomic Audio & Visual, North Beast, MASS MoCA) out of Jamaica, Vermont (2020–2025); mentoring youth mechanics on the Mobile Bike Repair team at the Wisconsin Bike Fed in Milwaukee (2019–2020); and owning and operating Local Coffee in downtown Aspen after helping open the Gorsuch Ski Café at the base of Ajax Mountain and Venue in downtown Fairbanks, Alaska (2013–2019, building on Troop 883 Eagle Scout leadership leading a 9-person, 100+ hour civic project in La Habra and cycling the length of Mexico from San Diego to Chiapas and overland to Panama at age 19).
That background directly shaped how I architect AI systems today. In electrical and field engineering, you never trust an ungrounded load or assume the happy path holds under load; you install circuit breakers, isolate fault domains, and verify state with instruments before energizing a line. I treat language models the exact same way: use deterministic software (PostgreSQL write-ahead state, <15µs pure-CPU gates, <1ms static AST checks, and POSIX atomic renameSync journals) wherever conventional engineering solves the problem cleanly, and reserve probabilistic models strictly for bounded reasoning inside verifiable sandboxes.
The Lab Behind the Three Projects
The flagship projects run on infrastructure I assembled and operate myself. This is the supporting layer, not the headline: expand below for the lab diagram, cloud-egress boundary, and 5-layer summary table, or view the full blueprint.
Lab Hardware Topology, Security Boundary & 5-Layer Stack Summary (Click to Expand)
What leaves the lab (scope: the lab workflows documented on this site, including benchmark runs, code-review audits, and publishing): external services receive only public benchmark data and my own open-source code. No private or third-party customer data is used in these workflows. Projects that support optional frontier-model escalation (for example the cascade router) send prompts to that provider when escalation is enabled; the offline-capable reference designs run with it turned off.
| Layer | Role | Main pieces |
|---|---|---|
| 1 · Routing | Pick the cheapest model that can do the job | <15µs CPU pre-gate, cascade router, local GPU pool + optional cloud burst |
| 2 · Memory & code knowledge | What the agent knows across sessions | krusch-context-mcp (decisions, invariants), krusch-git (code graphs), krusch-fs (OS files) |
| 3 · Safe execution | What the agent is allowed to change | krusch-coding-harness: sandbox, tests, write-ahead journal, crash recovery |
| 4 · Data | Durable state and search | PostgreSQL 16 + pgvector, SQLite for single-machine memory |
| 5 · Feedback loop | Improve from verified outcomes | @krusch/toolkit bricks, maintenance daemon, fine-tuned open-weights adapters |
Research Experiments prototypes, not products
- KruschNexus: offline PDF reading with page-and-line citations
- KruschLaw: statute lookup with point-in-time rule versions
- KruschBiz: contract amendment and precedence tracking
Benchmark Evidence & Publication Status
Every result on this site comes from a public benchmark dataset that I ran myself, with the raw logs published. Running a public benchmark is not the same as an outside party reproducing it or a leaderboard accepting it, so each result is labeled with exactly how far it has gone.
Self-Run Evaluations (Published Logs)
Most results. Public datasets, run in my lab, raw logs published: Snap LoCoMo 90.26% accuracy / 95.77% evidence recall (1,540 questions); DolphinBench 90.67% with Grounded v0.3 (544/600; 90.50% on the Riley slice); AgentDojo 0/1,046 successful prompt-injection attacks; Aider Polyglot 51.56%; DABstep 9/10 tasks (small sample).
Official Submissions Queued
DolphinBench 91.17% (547/600, Gemini 4 Argon Low, UUID c047b063) and 54.17% (325/600, stock Gemma 4 31B, UUID 288671ad) pass the official validator and are uploaded to dolphinbench.ai, but are not yet on the leaderboard. Until accepted, read them as self-run results.
RouterArena PR #169 (Merged)
0.7263 across 8,400/8,400 live queries (74.44% accuracy at $0.3802/1K, 91.43% robustness). Verified by github-actions[bot] CI Run #780 and maintainer audit (@yl231), merged into RouteWorks:main (844e93b); public leaderboard table row queued for the next batch ranking refresh.
None Yet (Invitation Open)
No outside party has re-run these results yet. Scripts, frozen read-only memory stores, and 49 raw log sets (64 files) are public on Hugging Face so anyone can check them; reproduction attempts are welcome as GitHub issues.
How I Keep Self-Run Benchmarks Clean (5 Code-Enforced Anti-Leakage Controls):
- Runtime Answer-Key Traps (
JS Proxy& PythonBlindMappingGuard): During ingestion, every benchmark record is wrapped in a runtime guard that throwsFATAL_ORACLE_LEAKAGE_VIOLATIONand aborts immediately if ingestion code ever touches ground-truth fields (qa,ideal_response,probing_questions,source_chat_ids,.gold_sql, orsession_summary). - Read-Only
0o444Frozen Databases: Conversations are indexed once at$0.00(zero LLM calls), SHA-256 hashed (memory_manifest.json), and locked read-only (chmod 0444) on disk before the evaluation runner reads a single test question, preventing test-time index mutation. - Zero Dataset-Specific Tuning: Static engine checks (
npm run bench:beam:verify) verify thatsrc/*.jscontains zero benchmark proper nouns, rubric tags, or test-set word lists;Snap LoCoMoran the byte-identical SHA-256 engine built beforelocomo10.jsonwas downloaded. - Model-matched baselines & Retrieval vs. generation separated:
LoCoMorunsMem0's verbatimANSWER_PROMPT_ZEPandACCURACY_PROMPT(mem0ai/mem0@aae5989e,gpt-4o-miniatT=0) across both disclosed token budgets (4,465mean tokens =89.68%and9,983mean tokens =90.26%vs.Mem0's~1.8K–4Ktokens) while scoring retrieval recall (95.77%dia_idrecall) separately from reader generation;DolphinBenchholdsGPT 5.6 Luna(T=0) and the officialgpt-5.6-soljudge fixed (81.50%@$1.35vs. publishedLuna + Mem070.67%@$96.21);AgentDojo(0/1,046ASR) documents active policy floors,bwrap --unshare-netsandboxes, and taint guards. - 3-Second Offline Re-Tally Verifiers (
95/95SHA-256 Gates): Clonekrusch-context-mcpand runnpm run bench:beam:verify(zero API keys, zero Docker) to verify source SHA-256 digests, upstream canary traps, and per-question turn-ID recall tallies directly from the raw JSON logs.
Core Architectural Invariants
The non-negotiable systems rules governing every layer in the KruschDev ecosystem.
Verifiable, Bounded Execution
Never trust language models to police their own file writes or follow conversational rules. Enforce constraints in write-ahead state tables, AST dependency parsers, SHA-256 drift guards, and sandboxed test runners. Deterministic gates do not make a flawed AI plan semantically correct; they bound blast radius, reject repeatable defect classes, and enforce journaled rollback when verification fails.
Multi-Tier Routing Cascades
Don't burn a 500ms LLM call just to choose an LLM. Intercept structured syntax in <15µs (<25µs ceiling) via an in-process pure-CPU Stage-0 syntactic/lexical gate prior to model inference for $0.00, escalate to sub-50ms neural centroids, and query frontier models only when necessary.
Offline-Capable Hardware Control
Run compute, vector indexes, and episodic memory on self-hosted bare-metal clusters. Offline-capable configurations keep privileged files and organizational memory within the self-hosted environment; cloud escalation, when enabled, sends the relevant prompts to the configured provider.
Selected Research & Benchmark Papers
Three representative papers mapping to the flagship projects above; all 31 technical deep dives and ablation studies live in the dedicated research catalog.
Return on Memory: Zero-Distillation Agentic Retrieval on DolphinBench & LoCoMo
Controlled study holding 13,539 episodic sessions frozen inside 0o444 SQLite checkpoints ($0.00 zero-LLM Raw-RAG + 4-Way RRF), evaluating retrieval recall separately from reader reasoning across LoCoMo (90.26% accuracy, 95.77% recall) and DolphinBench (81.50% model-matched Luna @ $1.35; 91.17% queued submission UUID c047b063).
Why Coding Agents Need Pre-Audited Lego Bricks, Not Prompted Boilerplate
Architecture and empirical audit of @krusch/toolkit (v1.8.1) and krusch_toolkit (v1.6.0): how 40 dual-runtime modules and 16 sub-millisecond static/AST Slop-Breaker detectors eliminate SSRF, webhook HMAC, and pagination defects across 104/104 repositories and third-party OSS targets.
How an Open-Weights Sovereign Stack Stacks Up Across 335,000+ Queries (Including Where Cloud Wins)
Cross-stack evaluation across 14 external suites (95/95 SHA-256 gates, 49 public Hugging Face log bundles): 0.00% ASR on 1,046 AgentDojo episodes, 0.7263 merged upstream on RouteWorks/RouterArena PR #169 (main @ 844e93b), 51.56% Aider Polyglot, and an explicit analysis of frontier-model reasoning gaps.