# oslohaggadone/splitslice architecture

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

- Interactive diagram: https://gitdiagram.com/oslohaggadone/splitslice
- Repository: https://github.com/oslohaggadone/splitslice

## Overview

SplitSlice is a Python CLI for turning natural-language pizza requests into a structured, priced order, with follow-up edits and a dry-run checkout that does not place an order. The main flow runs from the customer through the orchestrator, which coordinates parsing, menu retrieval and fulfillment; preferences and order history inform that flow. The README identifies Gemini as the language API, and the source excerpts show Domino’s store, menu and pricing integration. Some subsystem links rely on the SOURCE INDEX or README because their implementation excerpts are incomplete.

Main entry points: [`SplitSlice/agents/orchestrator.py`](https://github.com/oslohaggadone/splitslice/blob/main/SplitSlice/agents/orchestrator.py) (Order orchestrator), [`SplitSlice/agents/retrieval_agent.py`](https://github.com/oslohaggadone/splitslice/blob/main/SplitSlice/agents/retrieval_agent.py) (Menu retrieval), [`SplitSlice/main.py`](https://github.com/oslohaggadone/splitslice/blob/main/SplitSlice/main.py) (CLI entry), [`SplitSlice/providers/dominos.py`](https://github.com/oslohaggadone/splitslice/blob/main/SplitSlice/providers/dominos.py) (Domino’s provider)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Order interaction"]
  node_main["CLI entry<br/>[main.py]"]
  node_orchestrator["Order orchestrator<br/>[orchestrator.py]"]
end

subgraph group_ordering["Order construction"]
  node_parser["Order parser<br/>[order_parser.py]"]
  node_retrieval["Menu retrieval<br/>[retrieval_agent.py]"]
  node_matching["Name matching<br/>[matching.py]"]
  node_fulfillment["Order fulfillment"]
  node_models["Order models<br/>[models.py]"]
  node_background["Background work<br/>[background.py]"]
end

subgraph group_provider["Store integration"]
  node_provider_base["Provider interface<br/>[base.py]"]
  node_dominos["Domino’s provider<br/>[dominos.py]"]
end

subgraph group_preferences["Preferences and history"]
  node_preference_agent["Preference agent"]
  node_preferences_cli["Preferences CLI<br/>[preferences_cli.py]"]
  node_storage[("Preference store<br/>[storage.py]")]
end

node_customer(("Customer"))
node_gemini(("Gemini API"))
node_dominos_service(("Domino’s services"))

node_customer -->|"starts CLI"| node_main
node_main -->|"runs order"| node_orchestrator
node_main -->|"starts lookup"| node_background
node_main -->|"creates provider"| node_dominos
node_orchestrator -->|"parses requests"| node_parser
node_orchestrator -->|"builds cart"| node_retrieval
node_orchestrator -->|"validates and prices"| node_fulfillment
node_orchestrator -->|"loads preferences"| node_preference_agent
node_orchestrator -->|"records orders"| node_storage
node_retrieval -->|"uses parsed requests"| node_parser
node_retrieval -->|"matches names"| node_matching
node_retrieval -->|"queries menu"| node_provider_base
node_retrieval -->|"runs lookups"| node_background
node_retrieval -->|"requests interpretation"| node_gemini
node_fulfillment -->|"validates and prices"| node_provider_base
node_fulfillment -->|"starts pricing"| node_background
node_provider_base -->|"implemented by"| node_dominos
node_dominos -->|"matches menu items"| node_matching
node_dominos -->|"queries store and menu"| node_dominos_service
node_preference_agent -->|"reads and writes"| node_storage
node_preferences_cli -->|"manages preferences"| node_preference_agent
node_preferences_cli -->|"accesses history"| node_storage

click node_main "https://github.com/oslohaggadone/splitslice/blob/main/SplitSlice/main.py"
click node_orchestrator "https://github.com/oslohaggadone/splitslice/blob/main/SplitSlice/agents/orchestrator.py"
click node_parser "https://github.com/oslohaggadone/splitslice/blob/main/SplitSlice/agents/order_parser.py"
click node_retrieval "https://github.com/oslohaggadone/splitslice/blob/main/SplitSlice/agents/retrieval_agent.py"
click node_matching "https://github.com/oslohaggadone/splitslice/blob/main/SplitSlice/matching.py"
click node_fulfillment "https://github.com/oslohaggadone/splitslice/blob/main/SplitSlice/agents/fulfillment_agent.py"
click node_models "https://github.com/oslohaggadone/splitslice/blob/main/SplitSlice/models.py"
click node_background "https://github.com/oslohaggadone/splitslice/blob/main/SplitSlice/background.py"
click node_provider_base "https://github.com/oslohaggadone/splitslice/blob/main/SplitSlice/providers/base.py"
click node_dominos "https://github.com/oslohaggadone/splitslice/blob/main/SplitSlice/providers/dominos.py"
click node_preference_agent "https://github.com/oslohaggadone/splitslice/blob/main/SplitSlice/agents/preference_agent.py"
click node_preferences_cli "https://github.com/oslohaggadone/splitslice/blob/main/SplitSlice/preferences_cli.py"
click node_storage "https://github.com/oslohaggadone/splitslice/blob/main/SplitSlice/storage.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_orchestrator toneBlue
class node_parser,node_retrieval,node_matching,node_fulfillment,node_models,node_background toneAmber
class node_provider_base,node_dominos,node_gemini toneMint
class node_preference_agent,node_preferences_cli,node_storage toneRose
class node_customer,node_dominos_service toneIndigo
```

## Components

### Order interaction

- [CLI entry](https://github.com/oslohaggadone/splitslice/blob/main/SplitSlice/main.py): `SplitSlice/main.py`
- [Order orchestrator](https://github.com/oslohaggadone/splitslice/blob/main/SplitSlice/agents/orchestrator.py): `SplitSlice/agents/orchestrator.py`

### Order construction

- [Order parser](https://github.com/oslohaggadone/splitslice/blob/main/SplitSlice/agents/order_parser.py): `SplitSlice/agents/order_parser.py`
- [Menu retrieval](https://github.com/oslohaggadone/splitslice/blob/main/SplitSlice/agents/retrieval_agent.py): `SplitSlice/agents/retrieval_agent.py`
- [Name matching](https://github.com/oslohaggadone/splitslice/blob/main/SplitSlice/matching.py): `SplitSlice/matching.py`
- [Order fulfillment](https://github.com/oslohaggadone/splitslice/blob/main/SplitSlice/agents/fulfillment_agent.py): `SplitSlice/agents/fulfillment_agent.py`
- [Order models](https://github.com/oslohaggadone/splitslice/blob/main/SplitSlice/models.py): `SplitSlice/models.py`
- [Background work](https://github.com/oslohaggadone/splitslice/blob/main/SplitSlice/background.py): `SplitSlice/background.py`

### Store integration

- [Provider interface](https://github.com/oslohaggadone/splitslice/blob/main/SplitSlice/providers/base.py): `SplitSlice/providers/base.py`
- [Domino’s provider](https://github.com/oslohaggadone/splitslice/blob/main/SplitSlice/providers/dominos.py): `SplitSlice/providers/dominos.py`

### Preferences and history

- [Preference agent](https://github.com/oslohaggadone/splitslice/blob/main/SplitSlice/agents/preference_agent.py): `SplitSlice/agents/preference_agent.py`
- [Preferences CLI](https://github.com/oslohaggadone/splitslice/blob/main/SplitSlice/preferences_cli.py): `SplitSlice/preferences_cli.py`
- [Preference store](https://github.com/oslohaggadone/splitslice/blob/main/SplitSlice/storage.py): `SplitSlice/storage.py`

### Other components

- **Customer**
- **Gemini API**
- **Domino’s services**

## Connections

- Customer → CLI entry: starts CLI (evidence: `README.md`)
- CLI entry → Order orchestrator: runs order (evidence: `SplitSlice/main.py`)
- CLI entry → Background work: starts lookup (evidence: `SplitSlice/main.py`)
- CLI entry → Domino’s provider: creates provider (evidence: `SplitSlice/main.py`)
- Order orchestrator → Order parser: parses requests (evidence: `SplitSlice/agents/orchestrator.py`)
- Order orchestrator → Menu retrieval: builds cart (evidence: `SplitSlice/agents/orchestrator.py`)
- Order orchestrator → Order fulfillment: validates and prices (evidence: `SplitSlice/agents/orchestrator.py`)
- Order orchestrator → Preference agent: loads preferences (evidence: `SplitSlice/agents/orchestrator.py`)
- Order orchestrator → Preference store: records orders (evidence: `SplitSlice/agents/orchestrator.py`)
- Menu retrieval → Order parser: uses parsed requests (evidence: `SplitSlice/agents/retrieval_agent.py`)
- Menu retrieval → Name matching: matches names (evidence: `SplitSlice/agents/retrieval_agent.py`)
- Menu retrieval → Provider interface: queries menu (evidence: `SplitSlice/agents/retrieval_agent.py`)
- Menu retrieval → Background work: runs lookups (evidence: `SplitSlice/agents/retrieval_agent.py`)
- Menu retrieval → Gemini API: requests interpretation (evidence: `README.md`)
- Order fulfillment → Provider interface: validates and prices (evidence: `SplitSlice/agents/fulfillment_agent.py`)
- Order fulfillment → Background work: starts pricing (evidence: `SplitSlice/agents/fulfillment_agent.py`)
- Provider interface → Domino’s provider: implemented by (evidence: `SplitSlice/providers/dominos.py`)
- Domino’s provider → Name matching: matches menu items (evidence: `SplitSlice/providers/dominos.py`)
- Domino’s provider → Domino’s services: queries store and menu (evidence: `SplitSlice/providers/dominos.py`)
- Preference agent → Preference store: reads and writes (evidence: `SplitSlice/agents/preference_agent.py`)
- Preferences CLI → Preference agent: manages preferences (evidence: `SplitSlice/preferences_cli.py`)
- Preferences CLI → Preference store: accesses history (evidence: `SplitSlice/preferences_cli.py`)
