# mcalrifle789/omaris architecture

> Architecture diagram of the GitHub repository mcalrifle789/omaris, 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/mcalrifle789/omaris
- Repository: https://github.com/mcalrifle789/omaris

## Overview

Omaris is a Python implementation of a programming language centered on code-as-storage, with model lifecycle and extended app, audio, and agent features. The user workflow is to run a .omr program or enter the REPL; the interpreter parses and evaluates instructions, dispatching language operations against runtime state and producing effects such as output or WAV files. The implementation is concentrated in omaris.py. Feature branches reflect README capabilities; unsampled handler wiring is not expanded beyond documented dispatch.

Main entry points: [`omaris.py`](https://github.com/mcalrifle789/omaris/blob/main/omaris.py) (Tree Evaluator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Language Front End"]
  node_entry["CLI / REPL<br/>[omaris.py]"]
  node_lexer["Expression Tokenizer<br/>[omaris.py]"]
  node_parser["Parser<br/>[omaris.py]"]
end

subgraph group_core["Core Runtime"]
  node_evaluator["Tree Evaluator<br/>[omaris.py]"]
  node_functions["Functions &amp; Builtins<br/>[omaris.py]"]
  node_calculus["Native Calculus<br/>[omaris.py]"]
  node_state[("Interpreter State<br/>[omaris.py]")]
end

subgraph group_storage["Storage Domain"]
  node_storage_ops["Storage Instructions<br/>[omaris.py]"]
  node_pockets["Hidden Pockets<br/>[omaris.py]"]
  node_distribution["Distribution<br/>[omaris.py]"]
end

subgraph group_models["Model Lifecycle"]
  node_model_lifecycle["Model Lifecycle<br/>[omaris.py]"]
end

subgraph group_extended["Extended Edition"]
  node_text["Text Rendering<br/>[omaris.py]"]
  node_edm["EDM Control<br/>[omaris.py]"]
  node_app_web["App &amp; Web Builds<br/>[omaris.py]"]
  node_audio["Music &amp; Audio<br/>[omaris.py]"]
  node_agents["AI Agents<br/>[omaris.py]"]
end

node_user(("Programmer"))
node_program["Omaris Program"]
node_terminal["Console / REPL Output"]
node_wav["Playable WAV"]

node_user -->|"runs or enters"| node_entry
node_user -->|"supplies"| node_program
node_entry -->|"loads"| node_program
node_entry -->|"parses"| node_parser
node_parser -->|"tokenizes expressions"| node_lexer
node_parser -->|"passes syntax"| node_evaluator
node_evaluator -->|"invokes"| node_functions
node_evaluator -->|"evaluates operators"| node_calculus
node_evaluator -->|"dispatches"| node_storage_ops
node_evaluator -->|"dispatches"| node_pockets
node_evaluator -->|"dispatches"| node_distribution
node_evaluator -->|"dispatches"| node_model_lifecycle
node_evaluator -->|"dispatches"| node_text
node_evaluator -->|"dispatches"| node_edm
node_evaluator -->|"dispatches"| node_app_web
node_evaluator -->|"dispatches"| node_audio
node_evaluator -->|"dispatches"| node_agents
node_evaluator -->|"reads and updates"| node_state
node_storage_ops -->|"tracks stores"| node_state
node_pockets -->|"updates pockets"| node_state
node_distribution -->|"delivers items"| node_state
node_model_lifecycle -->|"tracks models"| node_state
node_app_web -->|"tracks builds"| node_state
node_audio -->|"tracks buffers"| node_state
node_agents -->|"tracks agents"| node_state
node_functions -->|"prints output"| node_terminal
node_text -->|"renders text"| node_terminal
node_audio -->|"writes audio"| node_wav

click node_entry "https://github.com/mcalrifle789/omaris/blob/main/omaris.py"
click node_lexer "https://github.com/mcalrifle789/omaris/blob/main/omaris.py"
click node_parser "https://github.com/mcalrifle789/omaris/blob/main/omaris.py"
click node_evaluator "https://github.com/mcalrifle789/omaris/blob/main/omaris.py"
click node_functions "https://github.com/mcalrifle789/omaris/blob/main/omaris.py"
click node_calculus "https://github.com/mcalrifle789/omaris/blob/main/omaris.py"
click node_state "https://github.com/mcalrifle789/omaris/blob/main/omaris.py"
click node_storage_ops "https://github.com/mcalrifle789/omaris/blob/main/omaris.py"
click node_pockets "https://github.com/mcalrifle789/omaris/blob/main/omaris.py"
click node_distribution "https://github.com/mcalrifle789/omaris/blob/main/omaris.py"
click node_model_lifecycle "https://github.com/mcalrifle789/omaris/blob/main/omaris.py"
click node_text "https://github.com/mcalrifle789/omaris/blob/main/omaris.py"
click node_edm "https://github.com/mcalrifle789/omaris/blob/main/omaris.py"
click node_app_web "https://github.com/mcalrifle789/omaris/blob/main/omaris.py"
click node_audio "https://github.com/mcalrifle789/omaris/blob/main/omaris.py"
click node_agents "https://github.com/mcalrifle789/omaris/blob/main/omaris.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_entry,node_lexer,node_parser toneBlue
class node_evaluator,node_functions,node_calculus,node_state toneAmber
class node_storage_ops,node_pockets,node_distribution toneMint
class node_model_lifecycle toneRose
class node_text,node_edm,node_app_web,node_audio,node_agents,node_user,node_program,node_terminal,node_wav toneIndigo
```

## Components

### Language Front End

- [CLI / REPL](https://github.com/mcalrifle789/omaris/blob/main/omaris.py): `omaris.py`
- [Expression Tokenizer](https://github.com/mcalrifle789/omaris/blob/main/omaris.py): `omaris.py`
- [Parser](https://github.com/mcalrifle789/omaris/blob/main/omaris.py): `omaris.py`

### Core Runtime

- [Tree Evaluator](https://github.com/mcalrifle789/omaris/blob/main/omaris.py): `omaris.py`
- [Functions & Builtins](https://github.com/mcalrifle789/omaris/blob/main/omaris.py): `omaris.py`
- [Native Calculus](https://github.com/mcalrifle789/omaris/blob/main/omaris.py): `omaris.py`
- [Interpreter State](https://github.com/mcalrifle789/omaris/blob/main/omaris.py): `omaris.py`

### Storage Domain

- [Storage Instructions](https://github.com/mcalrifle789/omaris/blob/main/omaris.py): `omaris.py`
- [Hidden Pockets](https://github.com/mcalrifle789/omaris/blob/main/omaris.py): `omaris.py`
- [Distribution](https://github.com/mcalrifle789/omaris/blob/main/omaris.py): `omaris.py`

### Model Lifecycle

- [Model Lifecycle](https://github.com/mcalrifle789/omaris/blob/main/omaris.py): `omaris.py`

### Extended Edition

- [Text Rendering](https://github.com/mcalrifle789/omaris/blob/main/omaris.py): `omaris.py`
- [EDM Control](https://github.com/mcalrifle789/omaris/blob/main/omaris.py): `omaris.py`
- [App & Web Builds](https://github.com/mcalrifle789/omaris/blob/main/omaris.py): `omaris.py`
- [Music & Audio](https://github.com/mcalrifle789/omaris/blob/main/omaris.py): `omaris.py`
- [AI Agents](https://github.com/mcalrifle789/omaris/blob/main/omaris.py): `omaris.py`

### Other components

- **Programmer**
- **Omaris Program**
- **Console / REPL Output**
- **Playable WAV**

## Connections

- Programmer → CLI / REPL: runs or enters
- Programmer → Omaris Program: supplies
- CLI / REPL → Omaris Program: loads
- CLI / REPL → Parser: parses
- Parser → Expression Tokenizer: tokenizes expressions
- Parser → Tree Evaluator: passes syntax
- Tree Evaluator → Functions & Builtins: invokes
- Tree Evaluator → Native Calculus: evaluates operators
- Tree Evaluator → Storage Instructions: dispatches
- Tree Evaluator → Hidden Pockets: dispatches
- Tree Evaluator → Distribution: dispatches
- Tree Evaluator → Model Lifecycle: dispatches
- Tree Evaluator → Text Rendering: dispatches
- Tree Evaluator → EDM Control: dispatches
- Tree Evaluator → App & Web Builds: dispatches
- Tree Evaluator → Music & Audio: dispatches
- Tree Evaluator → AI Agents: dispatches
- Tree Evaluator → Interpreter State: reads and updates
- Storage Instructions → Interpreter State: tracks stores
- Hidden Pockets → Interpreter State: updates pockets
- Distribution → Interpreter State: delivers items
- Model Lifecycle → Interpreter State: tracks models
- App & Web Builds → Interpreter State: tracks builds
- Music & Audio → Interpreter State: tracks buffers
- AI Agents → Interpreter State: tracks agents
- Functions & Builtins → Console / REPL Output: prints output
- Text Rendering → Console / REPL Output: renders text
- Music & Audio → Playable WAV: writes audio
