# hung1234ark-web/repository-name-minh_mini architecture

> Architecture diagram of the GitHub repository hung1234ark-web/repository-name-minh_mini, 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/hung1234ark-web/repository-name-minh_mini
- Repository: https://github.com/hung1234ark-web/repository-name-minh_mini

## Overview

Minh Mini is a conversational assistant whose central runtime accepts user input, reasons about intent, and coordinates responses or actions. The sampled code shows routing safeguards, handler dispatch, goal and planning concepts, and recovery checks; the source index also identifies evaluation, risk, memory/state, web, and model-integration modules. The README is empty, and several important files were not sampled, so edges for those subsystems are limited to relationships explicitly visible in the main module’s reference list or excerpt.

Main entry points: [`main.py`](https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/main.py) (Main runtime), [`execution_controller.py`](https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/execution_controller.py) (Execution controller), [`router_guard.py`](https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/router_guard.py) (Route guard), [`brain.py`](https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/brain.py) (Intent reasoning)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime orchestration"]
  node_main["Main runtime<br/>[main.py]"]
  node_router["Route guard<br/>[router_guard.py]"]
  node_controller["Execution controller"]
end

subgraph group_reasoning["Reasoning and planning"]
  node_brain["Intent reasoning<br/>[brain.py]"]
  node_goal["Goal manager<br/>[goal_manager.py]"]
  node_think["Think X planner<br/>[think_x.py]"]
  node_meta["Meta orchestrator"]
end

subgraph group_execution["Execution and responses"]
  node_contract["Execution contract"]
  node_action["Action handler<br/>[action.py]"]
  node_web["Web search<br/>[web.py]"]
  node_webai["Web AI<br/>[web_ai.py]"]
  node_chat["Chat handler<br/>[chat.py]"]
end

subgraph group_knowledge["State and evaluation"]
  node_recovery["Recovery and replanning<br/>[recovery_gate.py]"]
  node_state["State manager<br/>[state_manager.py]"]
  node_world["World model<br/>[world_model.py]"]
  node_critic["Critic and evaluation<br/>[critic.py]"]
  node_risk["Risk assessment<br/>[risk.py]"]
end

subgraph group_integrations["External integrations"]
  node_ollama["Ollama service"]
  node_gemini["Gemini service"]
end

node_user(("User"))

node_user -->|"submits input"| node_main
node_main -->|"checks recovery gate"| node_recovery
node_main -->|"reads state"| node_state
node_main -->|"uses world model"| node_world
node_main -->|"runs evaluation"| node_critic
node_main -->|"assesses risk"| node_risk
node_main -->|"requests answers"| node_gemini
node_main -->|"requests answers"| node_ollama
node_main -.-> node_brain
node_brain -.-> node_router
node_router -.-> node_controller
node_controller -.-> node_action
node_controller -.-> node_web
node_controller -.-> node_webai
node_controller -.-> node_chat
node_main -.-> node_goal
node_main -.-> node_think
node_main -.-> node_meta
node_main -.-> node_contract

click node_main "https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/main.py"
click node_router "https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/router_guard.py"
click node_controller "https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/execution_controller.py"
click node_brain "https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/brain.py"
click node_goal "https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/goal_manager.py"
click node_think "https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/think_x.py"
click node_meta "https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/meta_orchestrator.py"
click node_contract "https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/execution_contract.py"
click node_action "https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/action.py"
click node_web "https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/web.py"
click node_webai "https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/web_ai.py"
click node_chat "https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/chat.py"
click node_recovery "https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/recovery_gate.py"
click node_state "https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/state_manager.py"
click node_world "https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/world_model.py"
click node_critic "https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/critic.py"
click node_risk "https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/risk.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_main,node_router,node_controller,node_user toneBlue
class node_brain,node_goal,node_think,node_meta toneAmber
class node_contract,node_action,node_web,node_webai,node_chat toneMint
class node_recovery,node_state,node_world,node_critic,node_risk toneRose
class node_ollama,node_gemini toneIndigo
```

## Components

### Runtime orchestration

- [Main runtime](https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/main.py): `main.py`
- [Route guard](https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/router_guard.py): `router_guard.py`
- [Execution controller](https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/execution_controller.py): `execution_controller.py`

### Reasoning and planning

- [Intent reasoning](https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/brain.py): `brain.py`
- [Goal manager](https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/goal_manager.py): `goal_manager.py`
- [Think X planner](https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/think_x.py): `think_x.py`
- [Meta orchestrator](https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/meta_orchestrator.py): `meta_orchestrator.py`

### Execution and responses

- [Execution contract](https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/execution_contract.py): `execution_contract.py`
- [Action handler](https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/action.py): `action.py`
- [Web search](https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/web.py): `web.py`
- [Web AI](https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/web_ai.py): `web_ai.py`
- [Chat handler](https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/chat.py): `chat.py`

### State and evaluation

- [Recovery and replanning](https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/recovery_gate.py): `recovery_gate.py`
- [State manager](https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/state_manager.py): `state_manager.py`
- [World model](https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/world_model.py): `world_model.py`
- [Critic and evaluation](https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/critic.py): `critic.py`
- [Risk assessment](https://github.com/hung1234ark-web/repository-name-minh_mini/blob/main/risk.py): `risk.py`

### External integrations

- **Ollama service**
- **Gemini service**

### Other components

- **User**

## Connections

- User → Main runtime: submits input (evidence: `main.py`)
- Main runtime → Recovery and replanning: checks recovery gate (evidence: `main.py`)
- Main runtime → State manager: reads state (evidence: `main.py`)
- Main runtime → World model: uses world model (evidence: `main.py`)
- Main runtime → Critic and evaluation: runs evaluation (evidence: `main.py`)
- Main runtime → Risk assessment: assesses risk (evidence: `main.py`)
- Main runtime → Gemini service: requests answers (evidence: `main.py`)
- Main runtime → Ollama service: requests answers (evidence: `main.py`)
- Main runtime → Intent reasoning
- Intent reasoning → Route guard
- Route guard → Execution controller
- Execution controller → Action handler
- Execution controller → Web search
- Execution controller → Web AI
- Execution controller → Chat handler
- Main runtime → Goal manager (evidence: `main.py`)
- Main runtime → Think X planner (evidence: `main.py`)
- Main runtime → Meta orchestrator (evidence: `main.py`)
- Main runtime → Execution contract (evidence: `main.py`)
