Skip to content

Commit 5180986

Browse files
committed
docs: update line counts to match actual codebase (~1400 LoC)
The code has grown since initial release. Updated file-level line counts in the architecture section and total LoC references in both READMEs and pyproject.toml.
1 parent b701a11 commit 5180986

3 files changed

Lines changed: 34 additions & 34 deletions

File tree

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
[中文](README_CN.md) | [English](README.md) | [Claude Code Architecture Deep Dive (7 articles)](article/)
1212

13-
**512,000 lines of TypeScript → 950 lines of Python.**
13+
**512,000 lines of TypeScript → ~1,400 lines of Python.**
1414

1515
I spent two days reverse-engineering the leaked Claude Code source — all half a million lines. Then I stripped it down to the load-bearing walls and rebuilt them in Python. The result: **every key architectural pattern from Claude Code, in a codebase you can read in one sitting.**
1616

@@ -37,7 +37,7 @@ Fixed: halper → helper.
3737

3838
## What You Get
3939

40-
Claude Code's 512K lines distilled to 7 patterns that actually matter:
40+
Claude Code's 512K lines distilled into ~1,400 lines across 7 patterns that actually matter:
4141

4242
| Pattern | Claude Code | CoreCoder |
4343
|---|---|---|
@@ -94,21 +94,21 @@ The whole thing fits in your head:
9494

9595
```
9696
corecoder/
97-
├── cli.py REPL + commands 160 lines
98-
├── agent.py Agent loop + parallel tools 120 lines
99-
├── llm.py Streaming client + retry 150 lines
100-
├── context.py 3-layer compression 145 lines
101-
├── session.py Save/resume 65 lines
102-
├── prompt.py System prompt 35 lines
103-
├── config.py Env config 30 lines
97+
├── cli.py REPL + commands 218 lines
98+
├── agent.py Agent loop + parallel tools 122 lines
99+
├── llm.py Streaming client + retry 156 lines
100+
├── context.py 3-layer compression 196 lines
101+
├── session.py Save/resume 68 lines
102+
├── prompt.py System prompt 33 lines
103+
├── config.py Env config 55 lines
104104
└── tools/
105-
├── bash.py Shell + safety + cd tracking 95 lines
106-
├── edit.py Search-replace + diff 70 lines
107-
├── read.py File reading 40 lines
108-
├── write.py File writing 30 lines
109-
├── glob_tool.py File search 35 lines
110-
├── grep.py Content search 65 lines
111-
└── agent.py Sub-agent spawning 50 lines
105+
├── bash.py Shell + safety + cd tracking 115 lines
106+
├── edit.py Search-replace + diff 85 lines
107+
├── read.py File reading 53 lines
108+
├── write.py File writing 36 lines
109+
├── glob_tool.py File search 47 lines
110+
├── grep.py Content search 78 lines
111+
└── agent.py Sub-agent spawning 58 lines
112112
```
113113

114114
## Use as a Library
@@ -152,7 +152,7 @@ quit Exit
152152

153153
| | Claude Code | Claw-Code | Aider | CoreCoder |
154154
|---|---|---|---|---|
155-
| Code | 512K lines (closed) | 100K+ lines | 50K+ lines | **1,300 lines** |
155+
| Code | 512K lines (closed) | 100K+ lines | 50K+ lines | **~1,400 lines** |
156156
| Models | Anthropic only | Multi | Multi | **Any OpenAI-compatible** |
157157
| Readable? | No | Hard | Medium | **One afternoon** |
158158
| Purpose | Use it | Use it | Use it | **Understand it, build yours** |

README_CN.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[![License: MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE)
1111
[![Tests](https://github.com/he-yufeng/CoreCoder/actions/workflows/ci.yml/badge.svg)](https://github.com/he-yufeng/CoreCoder/actions)
1212

13-
**51万行 TypeScript → 950 行 Python。**
13+
**51万行 TypeScript → ~1400 行 Python。**
1414

1515
我逆向了 Claude Code 泄露的全部源码,然后把不承重的部分全扔掉,用 Python 重建了核心。成果:**Claude Code 的每一个关键架构模式,浓缩在一个下午能读完的代码库里。**
1616

@@ -94,21 +94,21 @@ corecoder -p "给 parse_config() 加上错误处理"
9494

9595
```
9696
corecoder/
97-
├── cli.py REPL + 命令 160
98-
├── agent.py Agent 循环 + 并行执行 120
99-
├── llm.py 流式客户端 + 重试 150
100-
├── context.py 三层压缩 145
101-
├── session.py 会话保存/恢复 65
102-
├── prompt.py 系统提示词 35
103-
├── config.py 环境变量配置 30
97+
├── cli.py REPL + 命令 218
98+
├── agent.py Agent 循环 + 并行执行 122
99+
├── llm.py 流式客户端 + 重试 156
100+
├── context.py 三层压缩 196
101+
├── session.py 会话保存/恢复 68
102+
├── prompt.py 系统提示词 33
103+
├── config.py 环境变量配置 55
104104
└── tools/
105-
├── bash.py Shell + 安全 + cd 追踪 95
106-
├── edit.py 搜索替换 + diff 70
107-
├── read.py 文件读取 40
108-
├── write.py 文件写入 30
109-
├── glob_tool.py 文件搜索 35
110-
├── grep.py 内容搜索 65
111-
└── agent.py 子代理生成 50
105+
├── bash.py Shell + 安全 + cd 追踪 115
106+
├── edit.py 搜索替换 + diff 85
107+
├── read.py 文件读取 53
108+
├── write.py 文件写入 36
109+
├── glob_tool.py 文件搜索 47
110+
├── grep.py 内容搜索 78
111+
└── agent.py 子代理生成 58
112112
```
113113

114114
## 当库用
@@ -152,7 +152,7 @@ quit 退出
152152

153153
| | Claude Code | Claw-Code | Aider | CoreCoder |
154154
|---|---|---|---|---|
155-
| 代码量 | 51万行(闭源) | 10万+行 | 5万+行 | **1300** |
155+
| 代码量 | 51万行(闭源) | 10万+行 | 5万+行 | **~1400** |
156156
| 模型 | 仅 Anthropic | 多模型 | 多模型 | **任意 OpenAI 兼容** |
157157
| 能通读吗? | 不能 | 很难 | 有点费劲 | **一个下午** |
158158
| 适合 | 直接用 | 直接用 | 直接用 | **先看懂,再造自己的** |

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "hatchling.build"
55
[project]
66
name = "corecoder"
77
version = "0.2.0"
8-
description = "Minimal AI coding agent (~1300 LoC) inspired by Claude Code. Works with any LLM. (formerly NanoCoder)"
8+
description = "Minimal AI coding agent (~1400 LoC) inspired by Claude Code. Works with any LLM. (formerly NanoCoder)"
99
readme = "README.md"
1010
license = "MIT"
1111
requires-python = ">=3.10"

0 commit comments

Comments
 (0)