claude-reviews-claude: A 17-Chapter Architectural Analysis of Claude Code v2.1.88 Written by Claude
Claude reads its own source code — 17-chapter architectural deep-dive into Claude Code v2.1.88. EN/ZH bilingual.
At a glance
- What is it?
- claude-reviews-claude is a bilingual repository in which Claude reads the TypeScript source code of Claude Code v2.1.88 and produces a structured architectural deep-dive covering 17 subsystems, from the query engine loop to the telemetry and privacy layer.
- Who is it for?
- claude-reviews-claude is the right resource for engineers who want to understand the internal architecture of Claude Code v2.1.88 at a level of detail the official documentation does not provide. It is not current documentation: the last push was on 2026-04-01, and Claude Code has continued to release new versions since then.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Activity is slowing. The repository last received commits 6 months ago.
- What is it written in?
- GitHub does not report a main language for this repository.
Answers come from the project's GitHub data, last synced on October 1, 2026, and from our analysis. They are not legal advice.
Editorial analysis
What the Repository Contains and Who It Is For
Claude Code's published source is written in TypeScript and has grown large enough that navigating it manually to understand architectural decisions is time-consuming. claude-reviews-claude addresses this by having Claude itself read 1,902 files and 477,439 lines of TypeScript and produce a structured analysis of how the system is built.
The repository is maintained by openedclaude on GitHub and licensed under MIT. It targets two audiences. The first is engineers building integrations with Claude Code who want to understand what the tool actually does at the implementation level: how its tool system registers and executes tools, how its permission system works, how sessions are persisted. The second is researchers and developers interested in AI systems reading and analyzing their own code as a case study.
The analysis is published as a VitePress documentation site at openedclaude.github.io/claude-reviews-claude/, which provides full-text search, dark mode, and chapter navigation. The repository README is written primarily in Chinese, with an English version available as `README_EN.md` in the top-level directory.
The source code analyzed, Claude Code v2.1.88, is not included in this repository. The README points to two community repositories that provide the reconstructed TypeScript source: instructkr/claw-code and ChinaSiro/claude-code-sourcemap.
Seventeen Chapters and the Subsystems They Cover
The analysis is organized into 18 documents: an overview chapter (chapter 0) and 17 numbered chapters, each covering a named subsystem.
Chapter 1 covers the QueryEngine, which the README describes as a 1,296-line module managing the LLM query loop, tool execution cycle, and session state. The core structure is a while loop that calls the Claude API, checks whether the response requires a tool call, executes the tool, injects the result, and loops until a stop condition is met.
Chapter 2 covers the tool system: how 42 or more tools are registered as self-contained modules, validated against a schema, and executed when the LLM requests them.
Chapter 3 covers the multi-agent coordinator, documenting how Claude Code spawns parallel worker threads, distributes messages between them, and collects results.
Chapters 4 through 16 cover the plugin system, hook system (PreToolUse, PostToolUse, SessionStart), Bash execution engine, permission pipeline, agent swarms, session persistence, context assembly, compact system, startup and bootstrap, bridge system, UI and state management, and services and API layer.
Chapter 17 covers telemetry, privacy, and operational controls, including what the README describes as a dual-channel telemetry system, model codenames, and a remote emergency switch.
Each chapter is available in both Chinese and English on the GitHub Pages site.
Cloning the Repository and Reading the Analysis Locally
The repository uses VitePress to build the documentation site. The `package.json` file in the root directory defines three npm scripts:
npm installThis installs VitePress and its dependencies as defined in the `devDependencies` section of `package.json`.
npm run docs:devThis starts the VitePress development server for local reading with hot reload. Alternatively, the analysis is available without any local setup at the published GitHub Pages URL, where the full-text search and navigation work without building anything.
The `architecture/` directory in the repository holds the Markdown source files for all 17 chapters in both `zh-CN/` and `en/` subdirectories. These can be read directly as plain Markdown files without running the VitePress server if you prefer a simple text view.
The `docs/` directory appears to hold the VitePress configuration and additional documentation files used to build the site.
Key Findings: The Query Loop, Permission Pipeline, and Context Compression
Several architectural observations from the analysis stand out as practically useful for anyone building on top of Claude Code.
The query engine is described as a 12-step state machine wrapped in a while loop. The README summarizes the design philosophy as: "Intelligence lives in the LLM; the scaffolding is just a loop." The loop handles tool call extraction, permission checking, tool execution, result injection, and error recovery. This structure means that adding a new tool is a matter of registering it, not modifying the loop.
The permission pipeline is described as seven layers of defense: configuration rule matching, AST analysis of commands, a YOLO classifier for auto-approval, and OS-level sandboxing. The documentation for chapter 7 notes that the pipeline processes tool calls through these layers in sequence before execution is allowed.
The context management system, documented in chapters 10 and 11, uses a four-layer cascade: micro-compression of current context, truncation, LLM-generated summarization, and emergency compression. The system manages a 200,000-token context window through this cascade.
Session persistence, covered in chapter 9, uses an append-only JSONL format with parent-UUID chaining for session history, and stores 64 kilobytes of data for lightweight session recovery.
Limitations: Static Snapshot of v2.1.88 and Self-Referential Constraints
The analysis covers exactly one version of Claude Code: v2.1.88. Claude Code has released new versions since the last push to this repository on 2026-04-01. Architectural details documented in the analysis may have changed, been refactored, or been superseded in current versions.
The analysis is also inherently limited by the fact that Claude, as the author, cannot provide the kind of external perspective that a human expert who has never worked on Claude Code could offer. Claude may have blind spots about its own architecture, may normalize unusual design choices without flagging them, or may describe what the code does rather than why it was designed that way. The README itself acknowledges the self-referential nature of the project: "A model sitting down and reading line by line the logic that defines how it thinks, acts, and executes."
The materials note that the project received no GitHub releases; updates to the analysis appear directly on the main branch. There is no version control scheme that allows readers to track what changed between analysis updates.
claude-reviews-claude vs. Official Claude Code Documentation
Anthropic publishes official documentation for Claude Code covering its commands, tools, hooks, and configuration. That documentation describes what Claude Code does from a user-facing perspective: how to use each command, what each tool does, how to configure settings.
claude-reviews-claude covers the same system from the implementation level: how the QueryEngine loop is structured, how the permission pipeline processes requests before execution, how context is compressed when the window fills. Official documentation tells you that hooks exist; this repository tells you that the hook system is approximately 8,000 lines of code handling PreToolUse, PostToolUse, and SessionStart events.
The two resources are complementary rather than substitutes. Official documentation is the authoritative reference for usage and configuration. claude-reviews-claude is the available resource for implementation-level architectural understanding of a specific past version.
MIT License and Analysis Date
The repository is licensed under MIT. The analysis covers Claude Code v2.1.88, and the README does not document when that version was released.
The last push to the repository was on 2026-04-01. The `package.json` shows VitePress 1.6.3 as the build dependency. The top-level entries include `DISCLAIMER.md` and `DISCLAIMER_CN.md`, which the repository provides in both languages. Readers should check the disclaimer documents before using any specific claim from the analysis in contexts where accuracy of implementation details matters.
Editorial conclusion
claude-reviews-claude is the right resource for engineers who want to understand the internal architecture of Claude Code v2.1.88 at a level of detail the official documentation does not provide. It is not current documentation: the last push was on 2026-04-01, and Claude Code has continued to release new versions since then. Before using any specific implementation detail to make engineering decisions about Claude Code integrations, verify the claim against the source code of the version you are actually running, since the v2.1.88 analysis may not reflect the current codebase.
Frequently asked questions
What version of Claude Code does claude-reviews-claude analyze?
The analysis covers Claude Code v2.1.88. The repository's last update was on 2026-04-01. Claude Code has continued to release new versions since then, and architectural details in the analysis may not reflect the current version.
Where can I read the claude-reviews-claude analysis without cloning the repository?
The full analysis is published at openedclaude.github.io/claude-reviews-claude/ as a VitePress documentation site with full-text search, dark mode, and chapter navigation. No local setup is required to read it.
Does the claude-reviews-claude repository include the Claude Code source code?
No. The analysis text and architectural diagrams are in the repository, but the analyzed source code is not included. The README points to two community repositories, instructkr/claw-code and ChinaSiro/claude-code-sourcemap, as sources for the reconstructed TypeScript source.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/openedclaude-claude-reviews-claude)