# shrec/exorcist architecture

> Architecture diagram of the GitHub repository shrec/exorcist, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shrec/exorcist
- Repository: https://github.com/shrec/exorcist

## Overview

Exorcist is a native C++/Qt IDE. A developer opens a workspace, edits and navigates code, and uses language services, Git, terminal/build tools, or the built-in AI to produce changes and feedback. Its principal AI workflow is documented as chat or inline assistance with context and tools, streamed provider responses, and persistent sessions. The graph also preserves the documented search, plugin, MCP, and shared-daemon capabilities. Relationship evidence is primarily the README; sampled excerpts clarify Lua execution, plugin activation, remote LSP setup, and review parsing, but do not establish most cross-subsystem calls.

Main entry points: [`src/mainwindow.cpp`](https://github.com/shrec/exorcist/blob/main/src/mainwindow.cpp) (Main Window), [`src/agent/agentorchestrator.cpp`](https://github.com/shrec/exorcist/blob/main/src/agent/agentorchestrator.cpp) (Agent Orchestrator), [`src/pluginmanager.cpp`](https://github.com/shrec/exorcist/blob/main/src/pluginmanager.cpp) (Plugin Manager), [`src/agent/agentchatpanel.cpp`](https://github.com/shrec/exorcist/blob/main/src/agent/agentchatpanel.cpp) (AI Chat)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workbench["IDE Workbench"]
  node_mainwindow["Main Window<br/>[mainwindow.cpp]"]
  node_project["Project Manager<br/>[projectmanager.cpp]"]
end

subgraph group_coding["Code Workflow"]
  node_editor["Code Editor<br/>[editorview.cpp]"]
  node_lsp["LSP Client<br/>[lspclient.cpp]"]
  node_clangd["Clangd Manager<br/>[clangdmanager.cpp]"]
  node_search["Workspace Search<br/>[searchworker.cpp]"]
  node_codegraph[("Code Graph<br/>[codegraphquery.cpp]")]
  node_git["Git Service<br/>[gitservice.cpp]"]
  node_terminal["Terminal Backend"]
  node_qttools["Qt Tools"]
end

subgraph group_intelligence["AI Intelligence"]
  node_agentui["AI Chat<br/>[agentchatpanel.cpp]"]
  node_orchestrator["Agent Orchestrator"]
  node_context["Context Builder<br/>[contextbuilder.cpp]"]
  node_tools["Agent Tools"]
  node_review["Code Review<br/>[reviewmanager.cpp]"]
  node_providers["AI Providers<br/>[claudeprovider.cpp]"]
end

subgraph group_extensions["Extensions"]
  node_pluginmanager["Plugin Manager<br/>[pluginmanager.cpp]"]
  node_manifest["Plugin Manifest<br/>[pluginmanifest.h]"]
  node_luascript["Lua Runtime"]
  node_contributions["Contribution Registry"]
end

subgraph group_bridge["Shared Services"]
  node_mcp["MCP Server Manager"]
  node_bridge["ExoBridge Services<br/>[main.cpp]"]
  node_tokens[("Auth Token Store")]
end

node_developer(("Developer"))

node_developer -->|"uses"| node_mainwindow
node_mainwindow -->|"opens workspace"| node_project
node_project -->|"opens files"| node_editor
node_editor -->|"requests intelligence"| node_lsp
node_lsp -->|"manages clangd"| node_clangd
node_mainwindow -->|"searches workspace"| node_search
node_search -.->|"uses symbol index"| node_codegraph
node_mainwindow -->|"manages changes"| node_git
node_mainwindow -->|"opens terminal"| node_terminal
node_mainwindow -.->|"opens Qt tools"| node_qttools
node_developer -->|"asks for help"| node_agentui
node_agentui -.->|"submits turns"| node_orchestrator
node_orchestrator -.->|"builds context"| node_context
node_orchestrator -->|"invokes tools"| node_tools
node_orchestrator -.->|"requests completion"| node_providers
node_agentui -.->|"requests review"| node_review
node_pluginmanager -->|"reads metadata"| node_manifest
node_pluginmanager -->|"runs scripts"| node_luascript
node_pluginmanager -->|"registers contributions"| node_contributions
node_developer -->|"configures tools"| node_mcp
node_mcp -->|"shares services"| node_bridge
node_bridge -.->|"stores credentials"| node_tokens

click node_mainwindow "https://github.com/shrec/exorcist/blob/main/src/mainwindow.cpp"
click node_project "https://github.com/shrec/exorcist/blob/main/src/project/projectmanager.cpp"
click node_editor "https://github.com/shrec/exorcist/blob/main/src/editor/editorview.cpp"
click node_lsp "https://github.com/shrec/exorcist/blob/main/src/lsp/lspclient.cpp"
click node_clangd "https://github.com/shrec/exorcist/blob/main/src/lsp/clangdmanager.cpp"
click node_search "https://github.com/shrec/exorcist/blob/main/src/search/searchworker.cpp"
click node_codegraph "https://github.com/shrec/exorcist/blob/main/src/codegraph/codegraphquery.cpp"
click node_git "https://github.com/shrec/exorcist/blob/main/src/git/gitservice.cpp"
click node_terminal "https://github.com/shrec/exorcist/blob/main/components/terminal/terminalcomponent.cpp"
click node_qttools "https://github.com/shrec/exorcist/blob/main/plugins/qt-tools/kitmanagerdialog.cpp"
click node_agentui "https://github.com/shrec/exorcist/blob/main/src/agent/agentchatpanel.cpp"
click node_orchestrator "https://github.com/shrec/exorcist/blob/main/src/agent/agentorchestrator.cpp"
click node_context "https://github.com/shrec/exorcist/blob/main/src/agent/contextbuilder.cpp"
click node_tools "https://github.com/shrec/exorcist/blob/main/src/agent/tools/filesystemtools.cpp"
click node_review "https://github.com/shrec/exorcist/blob/main/src/agent/reviewmanager.cpp"
click node_providers "https://github.com/shrec/exorcist/blob/main/plugins/claude/claudeprovider.cpp"
click node_pluginmanager "https://github.com/shrec/exorcist/blob/main/src/pluginmanager.cpp"
click node_manifest "https://github.com/shrec/exorcist/blob/main/src/plugin/pluginmanifest.h"
click node_luascript "https://github.com/shrec/exorcist/blob/main/src/sdk/luajit/luascriptengine.cpp"
click node_contributions "https://github.com/shrec/exorcist/blob/main/src/sdk/contributionregistry.h"
click node_mcp "https://github.com/shrec/exorcist/blob/main/src/mcp/mcpservermanager.cpp"
click node_bridge "https://github.com/shrec/exorcist/blob/main/server/main.cpp"
click node_tokens "https://github.com/shrec/exorcist/blob/main/server/authtokenservice.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_mainwindow,node_project toneBlue
class node_editor,node_lsp,node_clangd,node_search,node_codegraph,node_git,node_terminal,node_qttools toneAmber
class node_agentui,node_orchestrator,node_context,node_tools,node_review,node_providers toneMint
class node_pluginmanager,node_manifest,node_luascript,node_contributions toneRose
class node_mcp,node_bridge,node_tokens,node_developer toneIndigo
```

## Components

### IDE Workbench

- [Main Window](https://github.com/shrec/exorcist/blob/main/src/mainwindow.cpp): `src/mainwindow.cpp`
- [Project Manager](https://github.com/shrec/exorcist/blob/main/src/project/projectmanager.cpp): `src/project/projectmanager.cpp`

### Code Workflow

- [Code Editor](https://github.com/shrec/exorcist/blob/main/src/editor/editorview.cpp): `src/editor/editorview.cpp`
- [LSP Client](https://github.com/shrec/exorcist/blob/main/src/lsp/lspclient.cpp): `src/lsp/lspclient.cpp`
- [Clangd Manager](https://github.com/shrec/exorcist/blob/main/src/lsp/clangdmanager.cpp): `src/lsp/clangdmanager.cpp`
- [Workspace Search](https://github.com/shrec/exorcist/blob/main/src/search/searchworker.cpp): `src/search/searchworker.cpp`
- [Code Graph](https://github.com/shrec/exorcist/blob/main/src/codegraph/codegraphquery.cpp): `src/codegraph/codegraphquery.cpp`
- [Git Service](https://github.com/shrec/exorcist/blob/main/src/git/gitservice.cpp): `src/git/gitservice.cpp`
- [Terminal Backend](https://github.com/shrec/exorcist/blob/main/components/terminal/terminalcomponent.cpp): `components/terminal/terminalcomponent.cpp`
- [Qt Tools](https://github.com/shrec/exorcist/blob/main/plugins/qt-tools/kitmanagerdialog.cpp): `plugins/qt-tools/kitmanagerdialog.cpp`

### AI Intelligence

- [AI Chat](https://github.com/shrec/exorcist/blob/main/src/agent/agentchatpanel.cpp): `src/agent/agentchatpanel.cpp`
- [Agent Orchestrator](https://github.com/shrec/exorcist/blob/main/src/agent/agentorchestrator.cpp): `src/agent/agentorchestrator.cpp`
- [Context Builder](https://github.com/shrec/exorcist/blob/main/src/agent/contextbuilder.cpp): `src/agent/contextbuilder.cpp`
- [Agent Tools](https://github.com/shrec/exorcist/blob/main/src/agent/tools/filesystemtools.cpp): `src/agent/tools/filesystemtools.cpp`
- [Code Review](https://github.com/shrec/exorcist/blob/main/src/agent/reviewmanager.cpp): `src/agent/reviewmanager.cpp`
- [AI Providers](https://github.com/shrec/exorcist/blob/main/plugins/claude/claudeprovider.cpp): `plugins/claude/claudeprovider.cpp`

### Extensions

- [Plugin Manager](https://github.com/shrec/exorcist/blob/main/src/pluginmanager.cpp): `src/pluginmanager.cpp`
- [Plugin Manifest](https://github.com/shrec/exorcist/blob/main/src/plugin/pluginmanifest.h): `src/plugin/pluginmanifest.h`
- [Lua Runtime](https://github.com/shrec/exorcist/blob/main/src/sdk/luajit/luascriptengine.cpp): `src/sdk/luajit/luascriptengine.cpp`
- [Contribution Registry](https://github.com/shrec/exorcist/blob/main/src/sdk/contributionregistry.h): `src/sdk/contributionregistry.h`

### Shared Services

- [MCP Server Manager](https://github.com/shrec/exorcist/blob/main/src/mcp/mcpservermanager.cpp): `src/mcp/mcpservermanager.cpp`
- [ExoBridge Services](https://github.com/shrec/exorcist/blob/main/server/main.cpp): `server/main.cpp`
- [Auth Token Store](https://github.com/shrec/exorcist/blob/main/server/authtokenservice.cpp): `server/authtokenservice.cpp`

### Other components

- **Developer**

## Connections

- Developer → Main Window: uses (evidence: `README.md`)
- Main Window → Project Manager: opens workspace (evidence: `README.md`)
- Project Manager → Code Editor: opens files (evidence: `README.md`)
- Code Editor → LSP Client: requests intelligence (evidence: `README.md`)
- LSP Client → Clangd Manager: manages clangd (evidence: `README.md`)
- Main Window → Workspace Search: searches workspace (evidence: `README.md`)
- Workspace Search → Code Graph: uses symbol index (evidence: `README.md`)
- Main Window → Git Service: manages changes (evidence: `README.md`)
- Main Window → Terminal Backend: opens terminal (evidence: `README.md`)
- Main Window → Qt Tools: opens Qt tools (evidence: `README.md`)
- Developer → AI Chat: asks for help (evidence: `README.md`)
- AI Chat → Agent Orchestrator: submits turns
- Agent Orchestrator → Context Builder: builds context
- Agent Orchestrator → Agent Tools: invokes tools (evidence: `README.md`)
- Agent Orchestrator → AI Providers: requests completion
- AI Chat → Code Review: requests review
- Plugin Manager → Plugin Manifest: reads metadata (evidence: `src/pluginmanager.cpp`)
- Plugin Manager → Lua Runtime: runs scripts (evidence: `src/pluginmanager.cpp`)
- Plugin Manager → Contribution Registry: registers contributions (evidence: `src/pluginmanager.cpp`)
- Developer → MCP Server Manager: configures tools (evidence: `README.md`)
- MCP Server Manager → ExoBridge Services: shares services (evidence: `README.md`)
- ExoBridge Services → Auth Token Store: stores credentials (evidence: `README.md`)
