How chudickgumanoid/claude-code works
Claude Code is a terminal-based software-engineering assistant. Its documented workflow starts with a user invoking the CLI or a slash command, proceeds through the query engine’s model/tool-call loop, and returns results through the terminal UI. The wider product includes permissions, session persistence, IDE bridging, remote sessions, plugins, skills, task management, memory, and MCP/LSP integrations. Some subsystems are represented by enclosing paths because their implementations were not excerpted; edges are limited to relationships stated in the README or visible in the source index.
Main entry points: QueryEngine.ts Query engine · Tool.ts Tool system · api Anthropic API · directConnectManager.ts Direct connect
Components 19
CLI interaction
- Slash commands
src/commands.ts - Terminal UI
src/ink/components/App.tsx
Agent runtime
- Query engine
src/QueryEngine.ts - Tool system
src/Tool.ts - Tool permissions
src/hooks/toolPermission - Anthropic API
src/services/api
State and memory
- Configuration
src/utils/config.ts - Session history
src/utils/sessionStorage.ts - Persistent memory
src/memdir - Task management
src/tasks
Integrations
- IDE bridge
src/bridge/bridgeMain.ts - MCP connections
src/services/mcp/MCPConnectionManager.tsx - Language servers
src/services/lsp/LSPServerManager.ts - Plugin system
src/services/plugins/PluginInstallationManager.ts - Skills
src/skills
Remote operations
- Remote sessions
src/remote/RemoteSessionManager.ts - Direct connect
src/server/directConnectManager.ts
Other components
- Engineer
- Claude service
Connections 8
- Engineer → Slash commands: invokes
README.md - Query engine → Tool system: runs tool calls
README.md - Query engine → Anthropic API: calls model
README.md - Anthropic API → Claude service: sends requests
README.md - Tool system → Tool permissions: checks invocation
README.md - Query engine → Persistent memory: uses memory
src/QueryEngine.ts - Query engine → Session history: uses session history
src/QueryEngine.ts - Direct connect → Remote sessions: manages sessions
src/server/directConnectManager.ts