Anthropic accidentally shipped their entire source code via an npm source map. We read every line. Here's what they were hiding.
18 species, 5 rarity tiers, animated sprites, hats, personality stats. All hidden behind the BUDDY feature flag. Extracted verbatim from src/buddy/sprites.ts.
When Anthropic employees use Claude Code on public repos, it automatically enters stealth mode. Here are the actual instructions from the source:
Click any card to expand. The most surprising discoveries from 512,000 lines of leaked source code.
Anthropic employees get a different Claude Code. Features are stripped at build time via Bun's feature() macro (dead code elimination).
When idle, Claude Code enters a 4-phase dream cycle to organize knowledge. Like a human reviewing notes in their sleep.
ls the memory directory. Read the index. Skim existing topic files to avoid duplicates.
Check daily logs, find drifted memories, grep session transcripts for things that matter.
Merge new into existing. Convert relative dates to absolute. Delete contradicted facts.
Keep index under 25KB. Remove stale pointers. Resolve contradictions between files.
No RAG. No vector embeddings. Just markdown files in a directory with an index file. The sophistication is in maintenance, not storage.
Every capability in Claude Code is a discrete, permission-gated tool with its own prompt. Dashed borders = internal only.
Practical architecture lessons from Claude Code that you can apply to your own AI agent projects today.
Reconstructed from src/constants/prompts.ts (914 lines). Key sections shown below.
Animal-themed codenames found in feature flags, code comments, and the undercover forbidden-terms list.
Hardcoded by the Safeguards team. The source comment names the owners: David Forsythe, Kyla Guru.
Controlled via Bun's feature() macro. Dead code elimination strips them from public builds.
| Flag | What It Enables | Status |
|---|