Back to Vault
Claude Code Internals
Tier 1

ClaudeCode-Source-Analysis (tammychurchly25)

View on GitHub Fetched 2026-07-02 2 related flows

Summary

A ~330-file markdown analysis of the leaked source (512,000+ lines, 1,906 files, TypeScript on Bun), organized module by module from the March 31, 2026 npm source-map leak. Its granularity makes it the best reference for looking up a specific subsystem.

Key Takeaways

  • Module-by-module markdown makes subsystem lookup fast
  • Documents the TypeScript-on-Bun runtime foundation
  • Useful index into planning/todo machinery and prompt assembly

Reliability Note

Independent reverse-engineering effort - unofficial, verify against official Anthropic docs and behavior. Original text largely in Chinese.

Flows informed by this source

2
Flows category icon
Agent Architecture

Add a Plan/Todo System to Your Agent

Give your agent the planning discipline of the leading harnesses: an explicit, model-visible todo list that survives long tasks.

01Design the todo data model and tool
02Render the plan into context every turn
03Enforce plan-first and completion gates

+1 more steps to Done

Best forbuilders who have shipped a basic app before

4 steps60-90 minutesIntermediate
Flows category icon
Agent Architecture

Assemble a System Prompt Like the Pros

Structure your agent's system prompt the way leading harnesses do: layered sections, dynamic context, and enforceable rules.

01Decompose the current prompt
02Build the section-based assembler
03Pair rules with enforcement

+1 more steps to Done

Best forbuilders who have shipped a basic app before

4 steps60-90 minutesIntermediate

Made with Emergent