# phodal/auto-dev architecture

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

- Interactive diagram: https://gitdiagram.com/phodal/auto-dev
- Repository: https://github.com/phodal/auto-dev

## Overview

AutoDev Xiuper is a Kotlin Multiplatform AI development platform. A user works through a platform surface to a shared agent runtime, which supports document research, coding, review, database queries, artifact generation, and experimental web interaction. Coding tasks use tools and specialized subagents; parsing and project-rule discovery provide codebase context. The README documents these capabilities, but most runtime wiring was not sampled, so edges below reflect documented relationships rather than inferred calls. The source index names several files absent from the supplied tree; they are not represented with unsupported paths.

Main entry points: [`mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/core/MainAgent.kt`](https://github.com/phodal/auto-dev/blob/master/mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/core/MainAgent.kt) (Shared agent runtime), [`mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/CodingAgent.kt`](https://github.com/phodal/auto-dev/blob/master/mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/CodingAgent.kt) (Coding agent), [`mpp-ui/src/commonMain/kotlin/cc/unitmesh/devins/service/DocumentIndexService.kt`](https://github.com/phodal/auto-dev/blob/master/mpp-ui/src/commonMain/kotlin/cc/unitmesh/devins/service/DocumentIndexService.kt) (Multiplatform UI), [`mpp-idea/src/main/kotlin/cc/unitmesh/devins/idea/editor/multimodal/IdeaMultimodalService.kt`](https://github.com/phodal/auto-dev/blob/master/mpp-idea/src/main/kotlin/cc/unitmesh/devins/idea/editor/multimodal/IdeaMultimodalService.kt) (IntelliJ plugin)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_surfaces["Product surfaces"]
  node_ui["Multiplatform UI"]
  node_idea["IntelliJ plugin"]
  node_vscode["VS Code extension<br/>[App.tsx]"]
  node_server["Agent server<br/>[AgentService.kt]"]
end

subgraph group_runtime["Shared runtime"]
  node_engine["Shared agent runtime<br/>[MainAgent.kt]"]
  node_llm["LLM service<br/>[LLMService.kt]"]
  node_platform["Platform adapters<br/>[Platform.kt]"]
end

subgraph group_agents["Agent workflows"]
  node_document["Document research<br/>[DocumentAgent.kt]"]
  node_coding["Coding agent<br/>[CodingAgent.kt]"]
  node_review["Code review<br/>[CodeReviewAgent.kt]"]
  node_chatdb["ChatDB<br/>[ChatDBAgent.kt]"]
  node_artifact["Artifact generation<br/>[ArtifactAgent.kt]"]
  node_webagent["Web interaction<br/>[WebAgent.kt]"]
  node_subagents["Specialist subagents"]
end

subgraph group_tools["Tools and integrations"]
  node_tooling["Workspace tools"]
  node_orchestrator["Tool orchestration"]
  node_mcp["MCP integration"]
  node_prservices["PR review services<br/>[PRReviewService.kt]"]
  node_database[("Project database")]
end

subgraph group_intelligence["Code intelligence"]
  node_parser["Code parsing<br/>[CodeParser.kt]"]
  node_codegraph["Code graph"]
  node_rules["Project rule discovery"]
end

node_developer(("Developer"))

node_developer -->|"uses"| node_ui
node_developer -->|"uses"| node_idea
node_developer -->|"uses"| node_vscode
node_developer -->|"uses"| node_server
node_ui -->|"hosts agents"| node_engine
node_idea -->|"uses shared runtime"| node_engine
node_vscode -->|"uses shared runtime"| node_engine
node_server -->|"hosts agent"| node_engine
node_engine -->|"uses LLMs"| node_llm
node_engine -->|"runs across targets"| node_platform
node_engine -->|"offers agent"| node_document
node_engine -->|"offers agent"| node_coding
node_engine -->|"offers agent"| node_review
node_engine -->|"offers agent"| node_chatdb
node_engine -->|"offers agent"| node_artifact
node_engine -.->|"offers interaction"| node_webagent
node_coding -->|"uses tools"| node_tooling
node_coding -->|"orchestrates tools"| node_orchestrator
node_coding -->|"uses integrations"| node_mcp
node_coding -->|"invokes subagents"| node_subagents
node_review -->|"supports PR review"| node_prservices
node_document -.->|"queries data"| node_database
node_engine -->|"loads project rules"| node_rules
node_coding -->|"uses code parsing"| node_parser
node_parser -.->|"builds graph"| node_codegraph

click node_ui "https://github.com/phodal/auto-dev/blob/master/mpp-ui/src/commonMain/kotlin/cc/unitmesh/devins/service/DocumentIndexService.kt"
click node_idea "https://github.com/phodal/auto-dev/blob/master/mpp-idea/src/main/kotlin/cc/unitmesh/devins/idea/editor/multimodal/IdeaMultimodalService.kt"
click node_vscode "https://github.com/phodal/auto-dev/blob/master/mpp-vscode/webview/src/App.tsx"
click node_server "https://github.com/phodal/auto-dev/blob/master/mpp-server/src/main/kotlin/cc/unitmesh/server/service/AgentService.kt"
click node_engine "https://github.com/phodal/auto-dev/blob/master/mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/core/MainAgent.kt"
click node_llm "https://github.com/phodal/auto-dev/blob/master/mpp-core/src/commonMain/kotlin/cc/unitmesh/llm/LLMService.kt"
click node_platform "https://github.com/phodal/auto-dev/blob/master/mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/Platform.kt"
click node_document "https://github.com/phodal/auto-dev/blob/master/mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/document/DocumentAgent.kt"
click node_coding "https://github.com/phodal/auto-dev/blob/master/mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/CodingAgent.kt"
click node_review "https://github.com/phodal/auto-dev/blob/master/mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/CodeReviewAgent.kt"
click node_chatdb "https://github.com/phodal/auto-dev/blob/master/mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/chatdb/ChatDBAgent.kt"
click node_artifact "https://github.com/phodal/auto-dev/blob/master/mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/ArtifactAgent.kt"
click node_webagent "https://github.com/phodal/auto-dev/blob/master/mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/subagent/WebAgent.kt"
click node_subagents "https://github.com/phodal/auto-dev/tree/master/mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/subagent"
click node_tooling "https://github.com/phodal/auto-dev/tree/master/mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/tool/impl"
click node_orchestrator "https://github.com/phodal/auto-dev/blob/master/mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/orchestrator/ToolOrchestrator.kt"
click node_mcp "https://github.com/phodal/auto-dev/blob/master/mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/mcp/McpClientManager.kt"
click node_prservices "https://github.com/phodal/auto-dev/blob/master/mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/review/PRReviewService.kt"
click node_parser "https://github.com/phodal/auto-dev/blob/master/mpp-codegraph/src/commonMain/kotlin/cc/unitmesh/codegraph/parser/CodeParser.kt"
click node_codegraph "https://github.com/phodal/auto-dev/blob/master/mpp-codegraph/src/commonMain/kotlin/cc/unitmesh/codegraph/CodeGraphFactory.kt"
click node_rules "https://github.com/phodal/auto-dev/blob/master/mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/context/AgentContextDiscovery.kt"
click node_database "https://github.com/phodal/auto-dev/blob/master/mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/database/DatabaseConnection.kt"

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_ui,node_idea,node_vscode,node_server toneBlue
class node_engine,node_llm,node_platform toneAmber
class node_document,node_coding,node_review,node_chatdb,node_artifact,node_webagent,node_subagents toneMint
class node_tooling,node_orchestrator,node_mcp,node_prservices,node_database toneRose
class node_parser,node_codegraph,node_rules,node_developer toneIndigo
```

## Components

### Product surfaces

- [Multiplatform UI](https://github.com/phodal/auto-dev/blob/master/mpp-ui/src/commonMain/kotlin/cc/unitmesh/devins/service/DocumentIndexService.kt): `mpp-ui/src/commonMain/kotlin/cc/unitmesh/devins/service/DocumentIndexService.kt`
- [IntelliJ plugin](https://github.com/phodal/auto-dev/blob/master/mpp-idea/src/main/kotlin/cc/unitmesh/devins/idea/editor/multimodal/IdeaMultimodalService.kt): `mpp-idea/src/main/kotlin/cc/unitmesh/devins/idea/editor/multimodal/IdeaMultimodalService.kt`
- [VS Code extension](https://github.com/phodal/auto-dev/blob/master/mpp-vscode/webview/src/App.tsx): `mpp-vscode/webview/src/App.tsx`
- [Agent server](https://github.com/phodal/auto-dev/blob/master/mpp-server/src/main/kotlin/cc/unitmesh/server/service/AgentService.kt): `mpp-server/src/main/kotlin/cc/unitmesh/server/service/AgentService.kt`

### Shared runtime

- [Shared agent runtime](https://github.com/phodal/auto-dev/blob/master/mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/core/MainAgent.kt): `mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/core/MainAgent.kt`
- [LLM service](https://github.com/phodal/auto-dev/blob/master/mpp-core/src/commonMain/kotlin/cc/unitmesh/llm/LLMService.kt): `mpp-core/src/commonMain/kotlin/cc/unitmesh/llm/LLMService.kt`
- [Platform adapters](https://github.com/phodal/auto-dev/blob/master/mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/Platform.kt): `mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/Platform.kt`

### Agent workflows

- [Document research](https://github.com/phodal/auto-dev/blob/master/mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/document/DocumentAgent.kt): `mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/document/DocumentAgent.kt`
- [Coding agent](https://github.com/phodal/auto-dev/blob/master/mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/CodingAgent.kt): `mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/CodingAgent.kt`
- [Code review](https://github.com/phodal/auto-dev/blob/master/mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/CodeReviewAgent.kt): `mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/CodeReviewAgent.kt`
- [ChatDB](https://github.com/phodal/auto-dev/blob/master/mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/chatdb/ChatDBAgent.kt): `mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/chatdb/ChatDBAgent.kt`
- [Artifact generation](https://github.com/phodal/auto-dev/blob/master/mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/ArtifactAgent.kt): `mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/ArtifactAgent.kt`
- [Web interaction](https://github.com/phodal/auto-dev/blob/master/mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/subagent/WebAgent.kt): `mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/subagent/WebAgent.kt`
- [Specialist subagents](https://github.com/phodal/auto-dev/tree/master/mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/subagent): `mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/subagent`

### Tools and integrations

- [Workspace tools](https://github.com/phodal/auto-dev/tree/master/mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/tool/impl): `mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/tool/impl`
- [Tool orchestration](https://github.com/phodal/auto-dev/blob/master/mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/orchestrator/ToolOrchestrator.kt): `mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/orchestrator/ToolOrchestrator.kt`
- [MCP integration](https://github.com/phodal/auto-dev/blob/master/mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/mcp/McpClientManager.kt): `mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/mcp/McpClientManager.kt`
- [PR review services](https://github.com/phodal/auto-dev/blob/master/mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/review/PRReviewService.kt): `mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/review/PRReviewService.kt`
- [Project database](https://github.com/phodal/auto-dev/blob/master/mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/database/DatabaseConnection.kt): `mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/database/DatabaseConnection.kt`

### Code intelligence

- [Code parsing](https://github.com/phodal/auto-dev/blob/master/mpp-codegraph/src/commonMain/kotlin/cc/unitmesh/codegraph/parser/CodeParser.kt): `mpp-codegraph/src/commonMain/kotlin/cc/unitmesh/codegraph/parser/CodeParser.kt`
- [Code graph](https://github.com/phodal/auto-dev/blob/master/mpp-codegraph/src/commonMain/kotlin/cc/unitmesh/codegraph/CodeGraphFactory.kt): `mpp-codegraph/src/commonMain/kotlin/cc/unitmesh/codegraph/CodeGraphFactory.kt`
- [Project rule discovery](https://github.com/phodal/auto-dev/blob/master/mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/context/AgentContextDiscovery.kt): `mpp-core/src/commonMain/kotlin/cc/unitmesh/agent/context/AgentContextDiscovery.kt`

### Other components

- **Developer**

## Connections

- Developer → Multiplatform UI: uses
- Developer → IntelliJ plugin: uses
- Developer → VS Code extension: uses
- Developer → Agent server: uses
- Multiplatform UI → Shared agent runtime: hosts agents
- IntelliJ plugin → Shared agent runtime: uses shared runtime
- VS Code extension → Shared agent runtime: uses shared runtime
- Agent server → Shared agent runtime: hosts agent
- Shared agent runtime → LLM service: uses LLMs
- Shared agent runtime → Platform adapters: runs across targets
- Shared agent runtime → Document research: offers agent
- Shared agent runtime → Coding agent: offers agent
- Shared agent runtime → Code review: offers agent
- Shared agent runtime → ChatDB: offers agent
- Shared agent runtime → Artifact generation: offers agent
- Shared agent runtime → Web interaction: offers interaction
- Coding agent → Workspace tools: uses tools
- Coding agent → Tool orchestration: orchestrates tools
- Coding agent → MCP integration: uses integrations
- Coding agent → Specialist subagents: invokes subagents
- Code review → PR review services: supports PR review
- Document research → Project database: queries data
- Shared agent runtime → Project rule discovery: loads project rules
- Coding agent → Code parsing: uses code parsing
- Code parsing → Code graph: builds graph
