Skip to content

Instantly share code, notes, and snippets.

@rohitg00
rohitg00 / llm-wiki.md
Last active June 21, 2026 03:26 — forked from karpathy/llm-wiki.md
LLM Wiki v2 — extending Karpathy's LLM Wiki pattern with lessons from building agentmemory

LLM Wiki v2

A pattern for building personal knowledge bases using LLMs. Extended with lessons from building agentmemory 20K+ Stars ⭐️, a persistent memory engine for AI coding agents.

This builds on Andrej Karpathy's original LLM Wiki idea file. Everything in the original still applies. This document adds what we learned running the pattern in production: what breaks at scale, what's missing, and what separates a wiki that stays useful from one that rots.

What the original gets right

The core insight is correct: stop re-deriving, start compiling. RAG retrieves and forgets. A wiki accumulates and compounds. The three-layer architecture (raw sources, wiki, schema) works. The operations (ingest, query, lint) cover the basics. If you haven't read the original, start there.

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.

name dev-cycle
description TASKS.md 기반 개발 사이클 — 일감 파악 → 플랜 → 리뷰 → 구현 → 테스트 → 품질 루프 → 커밋을 반복
argument-hint
--non-interactive

Dev Cycle

TASKS.md의 다음 미완료 일감을 하나씩 처리하는 전체 개발 사이클. --non-interactive 플래그가 있으면, 각 단계에서 사용자 확인 없이 자동 진행한다.

"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@kiding
kiding / ☔️.js
Created June 16, 2025 04:43
기상청 초단기예측 Scriptable 스크립트
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: deep-gray; icon-glyph: magic;
/**
* 그래프 Y축 최대. 단위: mm/h
* @see https://youtu.be/WnWCoLJKvCU
*/
const MAX_blnd = 2;
/**
@haje01
haje01 / init.lua
Last active May 1, 2025 10:05
macOS IME Cursor
-- 설치 방법:
-- 1. Hammerspoon 설치 (https://www.hammerspoon.org/)
-- 2. 아래 내용을 ~/.hammerspoon/init.lua 으로 저장
--
-- 참고: 윈도우용 IME Cursor (https://forest.watch.impress.co.jp/library/software/imecursor/)
local indicatorCircle = nil
local followTimer = nil
local xoff = 15
local yoff = 4
@sshh12
sshh12 / cursor-agent-system-prompt.txt
Last active June 1, 2026 16:33
Cursor Agent System Prompt (March 2025)
You are a powerful agentic AI coding assistant, powered by Claude 3.5 Sonnet. You operate exclusively in Cursor, the world's best IDE.
You are pair programming with a USER to solve their coding task.
The task may require creating a new codebase, modifying or debugging an existing codebase, or simply answering a question.
Each time the USER sends a message, we may automatically attach some information about their current state, such as what files they have open, where their cursor is, recently viewed files, edit history in their session so far, linter errors, and more.
This information may or may not be relevant to the coding task, it is up for you to decide.
Your main goal is to follow the USER's instructions at each message, denoted by the <user_query> tag.
<communication>
1. Be conversational but professional.
@hxhb
hxhb / ue4docset.py
Last active March 24, 2022 15:07
ue4docset
#!/usr/local/bin/python
import sys, os, getopt, signal, time, re, sqlite3
import distutils.core
import xml.etree.cElementTree as ET
from bs4 import BeautifulSoup, NavigableString, Tag
# The categories that can be found in the ClassHierarchy/index.html file.
maincategories = {
"Class": [