Backend, systems & AI engineer.
I build systems that hold up, and write about how.
I’m Sanskar. I work across storage engines, backend infrastructure, LLM systems, and agents, mostly by building them from scratch. This is my notebook: long-form writing, the things I’ve built, and rougher notes in the margins.
- 01 Harness engineering: the layer that turns a model into an agent
An LLM is a stateless next-token predictor. Everything that makes it feel like an agent, the loop, the tools, the memory, the verification, lives in the harness. Here is what that layer actually does, why it moves benchmarks more than people expect, and where the real engineering is.
- 02 Writing an LSM-tree in Go
A from-scratch LSM storage engine: the skip-list memtable, the on-disk SSTable format block by block, Bloom filters, platform-aware mmap, the WAL and crash recovery, three live-switchable compaction strategies, and the Raft layer that wraps the whole thing.
- 03 Building an MCP server from scratch
What the Model Context Protocol actually is in 2026, the primitives that matter, and how to expose real tools to an LLM without hand-rolling an orchestration loop.
A from-scratch LSM-tree in Go: skip-list memtable, Bloom-filtered mmap SSTables, three live-switchable compaction strategies, and Raft quorum replication with multi-shard rebalancing behind one API.
Go · LSM · Bloom filters · mmap · RaftA replicated key/value store on a from-scratch Raft: linearizable reads via ReadIndex (no log write), streaming snapshots, joint-consensus membership changes, and correctness checked with Porcupine linearizability testing.
Go · Raft · linearizability · gRPCA multi-provider agent orchestrator with autonomous loops, cron, parallel swarms, hard token budgets, and a crash-safe SQLite state store. Recently ported from a Python control plane to a native Go runtime. On PyPI + npm.
Go · agents · SQLite · multi-providerAn LLM-evaluation and prompt-optimization pipeline: a calibrated LLM-as-judge, a statistical deploy gate (paired-bootstrap CI with Holm correction), and five optimizers including a from-scratch GEPA. On PyPI as promptline-opt.
Python · FastAPI · LLM-as-judge · GEPAA full-stack resume optimizer that rewrites LaTeX against a target job description, streams the compile, and scores ATS keyword coverage with pgvector semantic matching, showing exactly what a parser reads back.
Next.js · FastAPI · Celery · pgvectorA multi-tenant payment platform in Go using double-entry ledgering, a transactional outbox, and saga orchestration with explicit per-entity state machines, three-way reconciliation, and dead-letter handling.
Go · PostgreSQL · Saga · OutboxLSM-trees and B+Trees from scratch: WAL, MVCC, compaction, and crash recovery.
Raft, replication strategies, gossip, and tracing, plus the failure modes underneath.
Payment infrastructure, gRPC services, queues, reverse proxies, and the reliability plumbing.
Agent runtimes, prompt-optimization pipelines, evals, and MCP tooling.
- sapling Build it to understand it
The only reliable way I've found to actually understand a system.