商业产业 Hacker News Claude 2026-09-18T01:14 正文 ok 130 words

🔶 从源码解析 Claude Code

英文标题:🔶 Claude Code from Source

Claude Code 的完整原始 TypeScript 代码通过 npm 发布包中的 `.js.map` 源映射文件被提取出来,这些文件的 `sourcesContent` 字段包含完整源码。该项目由 36 个 AI Agent 分四个阶段完成:遍历源码、撰写技术文档、改写为叙事章节,以及审阅修订。整个流程从源码提取到完成修订版书籍约耗时 6 小时,最终审计确认书中未保留逐字复制的源代码,所有代码块均改写为使用不同变量名的伪代码。
打开原文相关 3 · 机会 0
media109.8 KB media51.2 KB

中文

源码是从 npm 源映射中提取的——随 Claude Code 一同发布的 .js.map 文件包含一个 sourcesContent 字段,其中存有完整的原始 TypeScript。近两千个文件构成了完整的架构。

36 个 AI Agent 分四个阶段分析并撰写了整本书:

探索:6 个并行 Agent 阅读源码树中的每一个文件。

分析:12 个 Agent 撰写了 494KB 的原始技术文档。

写作:15 个 Agent 从零开始将全部内容改写为叙事性章节。

审阅与修订:3 名审阅者提供了 900 行反馈;3 个 Agent 应用了全部修复。

从源码提取到完成最终修订版书籍的整个过程,耗时约 6 小时。最终的审计检查确保未保留任何逐字复制的源代码——每个代码块都被改写为使用不同变量名的伪代码。

English / 原文

The source was extracted from npm source maps — the .js.map files that shipped with Claude Code contained a sourcesContent field with the full original TypeScript. Nearly two thousand files comprising the complete architecture.

36 AI agents analyzed and wrote the entire book in four phases:

Exploration 6 parallel agents read every file in the source tree

Analysis 12 agents wrote 494KB of raw technical documentation

Writing 15 agents rewrote everything from scratch as narrative chapters

Review & Revision 3 reviewers produced 900 lines of feedback; 3 agents applied all fixes

The entire process — from source extraction to final revised book — took approximately 6 hours. A final audit pass ensured no verbatim source code remained — every code block was rewritten as pseudocode with different variable names.