docs: add internal architecture deep-dive with diagrams by omarjmh · Pull Request #15 · codeaashu/claude-code · GitHub
Skip to content

docs: add internal architecture deep-dive with diagrams - #15

Open
omarjmh wants to merge 1 commit into
codeaashu:mainfrom
omarjmh:docs/internals-architecture-deepdive
Open

omarjmh wants to merge 1 commit into
codeaashu:mainfrom
omarjmh:docs/internals-architecture-deepdive

Conversation

@omarjmh

@omarjmh omarjmh commented Jun 15, 2026 •

Copy link
Copy Markdown

Summary

Adds docs/internals/ — a 14-part, code-grounded explanation of how the Claude Code CLI works internally, with 42 Mermaid architecture diagrams.

Covers, one doc per subsystem (each with file:line anchors + a key-symbols table):

  • Startup & entrypoints, the agentic query loop, context/prompt assembly + compaction
  • Tool system, slash commands, permissions
  • Services (API/auth/analytics/cost), MCP, multi-agent/coordinator/tasks
  • React+Ink UI/state, bridge/remote/server surfaces, plugins/skills/memory, build system + feature flags

Also adds a discoverability pointer from docs/architecture.md.

Notes

  • Documentation only — no changes to src/.
  • Diagrams are Mermaid (render on GitHub). Start at docs/internals/README.md.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added comprehensive internal architecture documentation guide with Mermaid diagrams and detailed walkthroughs covering system startup, query loop execution, context and prompt building, tool mechanisms, slash commands, permissions, API authentication, MCP integration, multi-agent coordination, UI rendering, remote sessions, plugin/skill extensibility, and build configuration.

Add docs/internals/ — a 14-part, code-grounded explanation of how the
Claude Code CLI works internally, with 42 Mermaid architecture diagrams.

Covers: startup/entrypoints, the agentic query loop, context & prompt
assembly + compaction, the tool system, slash commands, permissions,
services (API/auth/analytics/cost), MCP, multi-agent/coordinator/tasks,
React+Ink UI/state, bridge/remote/server surfaces, plugins/skills/memory,
and the build system + feature flags.

Each subsystem doc includes file:line anchors and a key-symbols table.
Also adds a discoverability pointer from docs/architecture.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 15, 2026 •

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant