Skip to content

Instantly share code, notes, and snippets.

@zkdiff
zkdiff / llm-wiki.md
Created April 23, 2026 05:58 — forked from karpathy/llm-wiki.md
llm-wiki

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

Handling Stale Symbols in Roslyn MSBuildWorkspace

The Problem

When performing refactorings across a project or solution using Roslyn, you face a fundamental challenge: symbols become stale the moment you make any edit.

Roslyn's entire workspace, solution, project, document, compilation, and symbol APIs are immutable. Every modification creates a new instance. This means:

  1. You find all symbols matching some criteria
  2. You process the first symbol and make an edit
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Application Wireframes</title>
<style>
* {
margin: 0;
padding: 0;

Hexagonal Architecture Explained

How the Ports & Adapters architecture simplifies your life, and how to implement it

image

Alistair Cockburn

Juan Manuel Garrido de Paz

@zkdiff
zkdiff / .Brewfile
Created January 30, 2024 00:37
.Brewfile
tap "homebrew/bundle"
brew "deno"
brew "flyctl"
brew "mkcert"
brew "nvm"
cask "docker"
cask "github"
cask "google-chrome"
cask "microsoft-auto-update"
cask "microsoft-teams"