90%+ fewer tokens per session by reading a pre-compiled wiki instead of exploring files cold. Built from Karpathy's workflow.
TL;DR Highlight
Pre-compiling a codebase into a wiki cut starting context from 47,450 to 360 tokens
Who Should Read
Backend developer who burns tokens on codebase exploration at the start of every Claude Code session
Core Mechanics
- Exploration cost repeats every session
- On a 40-file FastAPI project, exploration alone costs 47,450 tokens before any question.
- That exploration never carries over to the next conversation.
- Start with a 200-token index
- At session start Claude reads only an index of about 200 tokens.
- For a targeted question it pulls a single article like auth.md, database.md or payments.md (about 300 tokens).
- 47,450 → 360 tokens on FastAPI
- The author says they tested on 3 real TypeScript and Python codebases.
- They claim zero false positives.
- Compiles in 200ms without an LLM
- It uses the TypeScript compiler API for TypeScript and regex detection for Python, Go, Ruby and more.
- No LLM or API calls, so output is exactly what's in the code.
- Regex-found routes get an [inferred] tag
- Claude can tell which items to verify before trusting.
- Route paths, field types, foreign keys and middleware chains come straight from the AST.
Community Reactions
How to Apply
- Run codesight on a small project
- Run npx codesight --wiki at your repo root.
- Open the generated domain articles (e.g. auth.md) and check them against the code.
- Compare session-start tokens before and after
- Ask the same question before and after adding the wiki and record input tokens.
- Compare your result to the original numbers (47,450 → 360).
- Commit the wiki to git for the team
- Commit the generated wiki so every new session starts from the same context.
- Recompile after code changes to refresh it.
- Verify [inferred] items yourself
- Python, Go and Ruby routes come from regex, so check the [inferred] tags.
- Have Claude confirm tagged routes against the code.
Try It
# Run in terminal at project root (requires Node.js)
npx codesight --wiki
# Then open the generated wiki files (e.g. auth.md), check them against your code, and commit to gitTerminology
Related Papers
A Beginner's Guide to Local AI with Inkling, Qwen, and Unsloth
Install Unsloth Desktop, load a quantized Qwen model, and share a private ChatGPT-like AI on your home LAN.
Muru – AI-assisted Rust server for Python apps by mod_WSGI's creator
mod_wsgi's creator is building Muru, an AI-assisted Rust ASGI/WSGI server, documenting it in public
87% of the Anthropic power will come from gas and 11% from coal in 2028
Analysis of Anthropic's contracted data centers: 87% gas, 11% coal power in 2028
Anthropic’s Nasdaq debut
Anthropic listed on Nasdaq and closed its first day below its opening price.
OpenAI still has a WebRTC Problem
WebRTC drops late audio, hurting voice AI; MoQ retransmits and buffers instead
Gemini 4 Neon
Gemini 4 Neon cuts cost per task 32% versus Carbon, at $3 input and $15 output per million tokens
AI is killing All About Berlin
After Google AI Overviews, a Berlin guide site lost 70-75% of its traffic.
Not Everything Needs an LLM
PostHog used small decision models to skip 98.7% of expensive LLM calls