# abdulrahman3m/ai-live-translator architecture

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

- Interactive diagram: https://gitdiagram.com/abdulrahman3m/ai-live-translator
- Repository: https://github.com/abdulrahman3m/ai-live-translator

## Overview

AI Live Translator is an instruction- and skill-based text interpreter for compatible AI chat hosts, not a translation engine. A user loads the skill or portable prompt, selects two languages, then sends messages for translation; explicit addresses and reserved commands instead invoke session control. Major capabilities include translation policy, language setup, speaker markers, host adapters, and multilingual examples. The Python router is only a reference classifier. Source excerpts cover scripts rather than the central skill and prompt, so documented relationships are shown from the README; implementation-level wiring remains limited.

Main entry points: [`skills/ai-live-translator/SKILL.md`](https://github.com/abdulrahman3m/ai-live-translator/blob/main/skills/ai-live-translator/SKILL.md) (Translator skill), [`prompt/live-translation.md`](https://github.com/abdulrahman3m/ai-live-translator/blob/main/prompt/live-translation.md) (Portable prompt), [`plugin/adapters`](https://github.com/abdulrahman3m/ai-live-translator/tree/main/plugin/adapters) (Host adapters), [`prompt/setup-messages.md`](https://github.com/abdulrahman3m/ai-live-translator/blob/main/prompt/setup-messages.md) (Language setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_activation["Activation and hosts"]
  node_skill["Translator skill<br/>[SKILL.md]"]
  node_prompt["Portable prompt"]
  node_adapters["Host adapters"]
end

subgraph group_session["Session control"]
  node_setup["Language setup<br/>[setup-messages.md]"]
  node_control["Control policies"]
  node_router["Reference router<br/>[router.py]"]
end

subgraph group_translation["Translation behavior"]
  node_translation_rules["Translation rules"]
  node_detection["Language detection"]
  node_speaker_rules["Speaker and control rules"]
end

subgraph group_resources["Reference resources"]
  node_examples["Translation examples"]
  node_references["Protocol references"]
  node_sample["Sample session"]
end

node_user(("User"))
node_host["AI chat host"]

node_user -->|"sends messages"| node_host
node_user -->|"loads skill"| node_skill
node_user -->|"loads prompt"| node_prompt
node_host -->|"asks languages"| node_setup
node_host -->|"translates messages"| node_translation_rules
node_host -->|"handles commands"| node_control
node_host -->|"applies markers"| node_speaker_rules
node_host -.->|"uses host guidance"| node_adapters
node_host -.->|"may classify controls"| node_router
node_host -.->|"uses examples"| node_examples
node_host -.->|"detects language"| node_detection
node_host -.->|"consults references"| node_references
node_host -.->|"may follow sample"| node_sample

click node_skill "https://github.com/abdulrahman3m/ai-live-translator/blob/main/skills/ai-live-translator/SKILL.md"
click node_prompt "https://github.com/abdulrahman3m/ai-live-translator/blob/main/prompt/live-translation.md"
click node_adapters "https://github.com/abdulrahman3m/ai-live-translator/tree/main/plugin/adapters"
click node_setup "https://github.com/abdulrahman3m/ai-live-translator/blob/main/prompt/setup-messages.md"
click node_control "https://github.com/abdulrahman3m/ai-live-translator/blob/main/prompt/control-commands.md"
click node_router "https://github.com/abdulrahman3m/ai-live-translator/blob/main/skills/ai-live-translator/scripts/router.py"
click node_translation_rules "https://github.com/abdulrahman3m/ai-live-translator/blob/main/skills/ai-live-translator/rules/translation-contract.md"
click node_detection "https://github.com/abdulrahman3m/ai-live-translator/blob/main/skills/ai-live-translator/rules/language-detection.md"
click node_speaker_rules "https://github.com/abdulrahman3m/ai-live-translator/blob/main/skills/ai-live-translator/rules/address-and-control.md"
click node_examples "https://github.com/abdulrahman3m/ai-live-translator/tree/main/skills/ai-live-translator/examples"
click node_references "https://github.com/abdulrahman3m/ai-live-translator/tree/main/skills/ai-live-translator/references"
click node_sample "https://github.com/abdulrahman3m/ai-live-translator/blob/main/skills/ai-live-translator/assets/sample-session-ar-en.md"

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_skill,node_prompt,node_adapters,node_user toneBlue
class node_setup,node_control,node_router toneAmber
class node_translation_rules,node_detection,node_speaker_rules toneMint
class node_examples,node_references,node_sample toneRose
class node_host toneIndigo
```

## Components

### Activation and hosts

- [Translator skill](https://github.com/abdulrahman3m/ai-live-translator/blob/main/skills/ai-live-translator/SKILL.md): `skills/ai-live-translator/SKILL.md`
- [Portable prompt](https://github.com/abdulrahman3m/ai-live-translator/blob/main/prompt/live-translation.md): `prompt/live-translation.md`
- [Host adapters](https://github.com/abdulrahman3m/ai-live-translator/tree/main/plugin/adapters): `plugin/adapters`

### Session control

- [Language setup](https://github.com/abdulrahman3m/ai-live-translator/blob/main/prompt/setup-messages.md): `prompt/setup-messages.md`
- [Control policies](https://github.com/abdulrahman3m/ai-live-translator/blob/main/prompt/control-commands.md): `prompt/control-commands.md`
- [Reference router](https://github.com/abdulrahman3m/ai-live-translator/blob/main/skills/ai-live-translator/scripts/router.py): `skills/ai-live-translator/scripts/router.py`

### Translation behavior

- [Translation rules](https://github.com/abdulrahman3m/ai-live-translator/blob/main/skills/ai-live-translator/rules/translation-contract.md): `skills/ai-live-translator/rules/translation-contract.md`
- [Language detection](https://github.com/abdulrahman3m/ai-live-translator/blob/main/skills/ai-live-translator/rules/language-detection.md): `skills/ai-live-translator/rules/language-detection.md`
- [Speaker and control rules](https://github.com/abdulrahman3m/ai-live-translator/blob/main/skills/ai-live-translator/rules/address-and-control.md): `skills/ai-live-translator/rules/address-and-control.md`

### Reference resources

- [Translation examples](https://github.com/abdulrahman3m/ai-live-translator/tree/main/skills/ai-live-translator/examples): `skills/ai-live-translator/examples`
- [Protocol references](https://github.com/abdulrahman3m/ai-live-translator/tree/main/skills/ai-live-translator/references): `skills/ai-live-translator/references`
- [Sample session](https://github.com/abdulrahman3m/ai-live-translator/blob/main/skills/ai-live-translator/assets/sample-session-ar-en.md): `skills/ai-live-translator/assets/sample-session-ar-en.md`

### Other components

- **User**
- **AI chat host**

## Connections

- User → AI chat host: sends messages (evidence: `README.md`)
- User → Translator skill: loads skill (evidence: `README.md`)
- User → Portable prompt: loads prompt (evidence: `README.md`)
- AI chat host → Language setup: asks languages (evidence: `README.md`)
- AI chat host → Translation rules: translates messages (evidence: `README.md`)
- AI chat host → Control policies: handles commands (evidence: `README.md`)
- AI chat host → Speaker and control rules: applies markers (evidence: `README.md`)
- AI chat host → Host adapters: uses host guidance (evidence: `README.md`)
- AI chat host → Reference router: may classify controls (evidence: `README.md`)
- AI chat host → Translation examples: uses examples (evidence: `README.md`)
- AI chat host → Language detection: detects language (evidence: `README.md`)
- AI chat host → Protocol references: consults references (evidence: `README.md`)
- AI chat host → Sample session: may follow sample (evidence: `README.md`)
