# ragungnoviandri/debigbos architecture

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

- Interactive diagram: https://gitdiagram.com/ragungnoviandri/debigbos
- Repository: https://github.com/ragungnoviandri/debigbos

## Overview

de BigBos is an AI-powered CLI coding assistant. The main workflow is a user query entering through the CLI or chat UI, reaching the agent’s conversation/tool loop, and returning a model response; tool calls can inspect or change the workspace. Sessions, memory, skills, and soul shape ongoing conversations, while provider implementations connect to model services. The README documents further capabilities such as subagents, compaction, and session import that are not fully visible in the sampled source; those are represented only where paths and relationships are supported.

Main entry points: [`debigbos/core/agent.py`](https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/core/agent.py) (Agent Loop), [`debigbos/tui/screens/home.py`](https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/tui/screens/home.py) (Chat Screen), [`debigbos/tools/registry.py`](https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/tools/registry.py) (Tool Registry), [`debigbos/main.py`](https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/main.py) (CLI Commands)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User Interface"]
  node_cli["CLI Commands<br/>[main.py]"]
  node_tui["Textual App<br/>[app.py]"]
  node_chat["Chat Screen<br/>[home.py]"]
end

subgraph group_conversation["Conversation Runtime"]
  node_agent["Agent Loop<br/>[agent.py]"]
end

subgraph group_model["Models And Tools"]
  node_provider_registry["Provider Registry<br/>[registry.py]"]
  node_providers["Model Providers<br/>[provider.py]"]
  node_opencode["OpenCode Provider"]
  node_tool_registry["Tool Registry<br/>[registry.py]"]
  node_file_tools["File Tools<br/>[file_tools.py]"]
  node_bash_tool["Bash Tool<br/>[bash_tool.py]"]
  node_web_tool["Web Tool<br/>[web_tool.py]"]
end

subgraph group_state["Assistant State"]
  node_sessions["Sessions<br/>[session.py]"]
  node_memory[("Persistent Memory<br/>[memory.py]")]
  node_soul["Soul Persona<br/>[soul.py]"]
  node_skills["Skills<br/>[skills.py]"]
  node_config["Configuration<br/>[manager.py]"]
  node_auth[("Credential Store<br/>[auth.py]")]
end

subgraph group_workspace["Workspace Features"]
  node_git["Git Integration<br/>[git_utils.py]"]
end

node_user(("User"))
node_model_service(("Model Service"))
node_workspace_files[("Project Files")]
node_external_git(("Workspace Git"))

node_user -->|"runs commands"| node_cli
node_user -->|"sends messages"| node_chat
node_cli -->|"starts interactive UI"| node_tui
node_tui -->|"shows chat screen"| node_chat
node_chat -->|"submits prompts"| node_agent
node_agent -->|"streams responses"| node_chat
node_agent -->|"selects provider"| node_provider_registry
node_provider_registry -->|"creates provider"| node_providers
node_providers -->|"implements provider"| node_opencode
node_opencode -->|"sends model requests"| node_model_service
node_agent -->|"dispatches tool calls"| node_tool_registry
node_tool_registry -->|"invokes handlers"| node_file_tools
node_tool_registry -->|"invokes handlers"| node_bash_tool
node_tool_registry -->|"invokes handlers"| node_web_tool
node_file_tools -->|"reads and writes"| node_workspace_files
node_bash_tool -->|"runs workspace commands"| node_workspace_files
node_agent -->|"manages conversations"| node_sessions
node_agent -->|"loads and saves memories"| node_memory
node_agent -->|"builds assistant prompt"| node_soul
node_agent -->|"loads skills"| node_skills
node_agent -->|"uses runtime settings"| node_config
node_config -->|"resolves credentials"| node_auth
node_chat -->|"shows git status"| node_git
node_git -->|"reads repository state"| node_external_git

click node_cli "https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/main.py"
click node_tui "https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/tui/app.py"
click node_chat "https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/tui/screens/home.py"
click node_agent "https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/core/agent.py"
click node_provider_registry "https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/models/registry.py"
click node_providers "https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/models/provider.py"
click node_opencode "https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/models/opencode_provider.py"
click node_tool_registry "https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/tools/registry.py"
click node_file_tools "https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/tools/file_tools.py"
click node_bash_tool "https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/tools/bash_tool.py"
click node_web_tool "https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/tools/web_tool.py"
click node_sessions "https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/core/session.py"
click node_memory "https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/core/memory.py"
click node_soul "https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/core/soul.py"
click node_skills "https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/core/skills.py"
click node_config "https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/config/manager.py"
click node_auth "https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/config/auth.py"
click node_git "https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/tools/git_utils.py"

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_cli,node_tui,node_chat,node_user toneBlue
class node_agent,node_workspace_files toneAmber
class node_provider_registry,node_providers,node_opencode,node_tool_registry,node_file_tools,node_bash_tool,node_web_tool toneMint
class node_sessions,node_memory,node_soul,node_skills,node_config,node_auth toneRose
class node_git,node_model_service,node_external_git toneIndigo
```

## Components

### User Interface

- [CLI Commands](https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/main.py): `debigbos/main.py`
- [Textual App](https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/tui/app.py): `debigbos/tui/app.py`
- [Chat Screen](https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/tui/screens/home.py): `debigbos/tui/screens/home.py`

### Conversation Runtime

- [Agent Loop](https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/core/agent.py): `debigbos/core/agent.py`

### Models And Tools

- [Provider Registry](https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/models/registry.py): `debigbos/models/registry.py`
- [Model Providers](https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/models/provider.py): `debigbos/models/provider.py`
- [OpenCode Provider](https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/models/opencode_provider.py): `debigbos/models/opencode_provider.py`
- [Tool Registry](https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/tools/registry.py): `debigbos/tools/registry.py`
- [File Tools](https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/tools/file_tools.py): `debigbos/tools/file_tools.py`
- [Bash Tool](https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/tools/bash_tool.py): `debigbos/tools/bash_tool.py`
- [Web Tool](https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/tools/web_tool.py): `debigbos/tools/web_tool.py`

### Assistant State

- [Sessions](https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/core/session.py): `debigbos/core/session.py`
- [Persistent Memory](https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/core/memory.py): `debigbos/core/memory.py`
- [Soul Persona](https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/core/soul.py): `debigbos/core/soul.py`
- [Skills](https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/core/skills.py): `debigbos/core/skills.py`
- [Configuration](https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/config/manager.py): `debigbos/config/manager.py`
- [Credential Store](https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/config/auth.py): `debigbos/config/auth.py`

### Workspace Features

- [Git Integration](https://github.com/ragungnoviandri/debigbos/blob/main/debigbos/tools/git_utils.py): `debigbos/tools/git_utils.py`

### Other components

- **User**
- **Model Service**
- **Project Files**
- **Workspace Git**

## Connections

- User → CLI Commands: runs commands
- User → Chat Screen: sends messages
- CLI Commands → Textual App: starts interactive UI
- Textual App → Chat Screen: shows chat screen
- Chat Screen → Agent Loop: submits prompts
- Agent Loop → Chat Screen: streams responses
- Agent Loop → Provider Registry: selects provider
- Provider Registry → Model Providers: creates provider
- Model Providers → OpenCode Provider: implements provider
- OpenCode Provider → Model Service: sends model requests
- Agent Loop → Tool Registry: dispatches tool calls
- Tool Registry → File Tools: invokes handlers
- Tool Registry → Bash Tool: invokes handlers
- Tool Registry → Web Tool: invokes handlers
- File Tools → Project Files: reads and writes
- Bash Tool → Project Files: runs workspace commands
- Agent Loop → Sessions: manages conversations
- Agent Loop → Persistent Memory: loads and saves memories
- Agent Loop → Soul Persona: builds assistant prompt
- Agent Loop → Skills: loads skills
- Agent Loop → Configuration: uses runtime settings
- Configuration → Credential Store: resolves credentials
- Chat Screen → Git Integration: shows git status
- Git Integration → Workspace Git: reads repository state
