# harooshia/ukagaka architecture

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

- Interactive diagram: https://gitdiagram.com/harooshia/ukagaka
- Repository: https://github.com/harooshia/ukagaka

## Overview

Kimiko is a desktop AI companion: the user enters chat or commands in a Tkinter overlay; the app handles commands locally or requests a model reply, while the core maintains conversation modes and persistent memory. The excerpts show the desktop-to-core calls and the core’s memory and model-request behavior. The model endpoint is described as local and OpenAI-compatible; its specific implementation is not in this repository tree.

Main entry points: [`kimiko_desktop.py`](https://github.com/harooshia/ukagaka/blob/main/kimiko_desktop.py) (Desktop overlay), [`kimiko_core.py`](https://github.com/harooshia/ukagaka/blob/main/kimiko_core.py) (Mode-aware conversation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop companion"]
  node_overlay["Desktop overlay<br/>[kimiko_desktop.py]"]
end

subgraph group_core["Conversation core"]
  node_commands["Command handling<br/>[kimiko_core.py]"]
  node_conversation["Mode-aware conversation<br/>[kimiko_core.py]"]
  node_memory[("Persistent memory<br/>[kimiko_core.py]")]
end

node_user(("User"))
node_model{{"Local model endpoint"}}

node_user -->|"enters input"| node_overlay
node_overlay -->|"checks command"| node_commands
node_overlay -->|"sends message"| node_conversation
node_conversation -->|"reads and saves"| node_memory
node_conversation -->|"posts request"| node_model

click node_overlay "https://github.com/harooshia/ukagaka/blob/main/kimiko_desktop.py"
click node_commands "https://github.com/harooshia/ukagaka/blob/main/kimiko_core.py"
click node_conversation "https://github.com/harooshia/ukagaka/blob/main/kimiko_core.py"
click node_memory "https://github.com/harooshia/ukagaka/blob/main/kimiko_core.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_overlay,node_user toneBlue
class node_commands,node_conversation,node_memory toneAmber
class node_model toneIndigo
```

## Components

### Desktop companion

- [Desktop overlay](https://github.com/harooshia/ukagaka/blob/main/kimiko_desktop.py): `kimiko_desktop.py`

### Conversation core

- [Command handling](https://github.com/harooshia/ukagaka/blob/main/kimiko_core.py): `kimiko_core.py`
- [Mode-aware conversation](https://github.com/harooshia/ukagaka/blob/main/kimiko_core.py): `kimiko_core.py`
- [Persistent memory](https://github.com/harooshia/ukagaka/blob/main/kimiko_core.py): `kimiko_core.py`

### Other components

- **User**
- **Local model endpoint**

## Connections

- User → Desktop overlay: enters input (evidence: `kimiko_desktop.py`)
- Desktop overlay → Command handling: checks command (evidence: `kimiko_desktop.py`)
- Desktop overlay → Mode-aware conversation: sends message (evidence: `kimiko_desktop.py`)
- Mode-aware conversation → Persistent memory: reads and saves (evidence: `kimiko_core.py`)
- Mode-aware conversation → Local model endpoint: posts request (evidence: `kimiko_core.py`)
