# overtekk/call_me_maybe architecture

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

- Interactive diagram: https://gitdiagram.com/overtekk/call_me_maybe
- Repository: https://github.com/overtekk/call_me_maybe

## Overview

Call Me Maybe is a CLI tool that converts natural-language prompts into named function calls and typed parameters. Its main workflow parses options and validates function definitions and prompt inputs, then selects a function and generates its arguments using constrained LLM decoding, collects results, and writes JSON. The README also describes selectable models and visualizer/debug modes. The graph follows documented orchestration and source-index references; several implementation details are unsampled, so their internal links are omitted.

Main entry points: [`src/parser/parser.py`](https://github.com/overtekk/call_me_maybe/blob/main/src/parser/parser.py) (Input orchestrator), [`src/engine/CallMeMaybe.py`](https://github.com/overtekk/call_me_maybe/blob/main/src/engine/CallMeMaybe.py) (Constrained decoder), [`src/__main__.py`](https://github.com/overtekk/call_me_maybe/blob/main/src/__main__.py) (CLI entry point), [`src/generate.py`](https://github.com/overtekk/call_me_maybe/blob/main/src/generate.py) (Generation loop)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_input["Input and validation"]
  node_entry["CLI entry point<br/>[__main__.py]"]
  node_parser["Input orchestrator<br/>[parser.py]"]
  node_arguments["CLI arguments"]
  node_json["JSON validation<br/>[parse_json_file.py]"]
  node_schemas["Data schemas<br/>[schemas.py]"]
  node_sdkcheck["SDK path check"]
  node_pathcheck["Path checks<br/>[path_checker.py]"]
  node_argumentcheck["Argument checks"]
end

subgraph group_generation["Constrained generation"]
  node_promptqueue["Prompt selection<br/>[prompt.py]"]
  node_generator["Generation loop<br/>[generate.py]"]
  node_engine["Constrained decoder<br/>[CallMeMaybe.py]"]
  node_instructions["LLM instructions"]
  node_vocabulary["Token vocabulary<br/>[Vocabulary.py]"]
  node_llmsdk["LLM SDK model<br/>[__init__.py]"]
end

subgraph group_results["Results and output"]
  node_output["Result accumulator<br/>[Output.py]"]
  node_useresults["Results file"]
end

subgraph group_support["Runtime support"]
  node_debug["Debug output<br/>[print_debug.py]"]
  node_display["Console display<br/>[display.py]"]
  node_files["Filesystem helpers<br/>[files.py]"]
  node_timer["Timing utility<br/>[func_timer.py]"]
  node_logo["Program branding<br/>[logo.py]"]
end

node_user(("CLI user"))

node_user -->|"runs CLI"| node_entry
node_entry -->|"parses inputs"| node_parser
node_parser -->|"parses options"| node_arguments
node_parser -->|"checks SDK"| node_sdkcheck
node_parser -->|"validates files"| node_json
node_json -->|"validates against"| node_schemas
node_arguments -->|"checks paths"| node_pathcheck
node_arguments -.->|"checks arguments"| node_argumentcheck
node_entry -->|"starts generation"| node_generator
node_entry -->|"initializes"| node_promptqueue
node_generator -->|"gets prompts"| node_promptqueue
node_generator -->|"requests generation"| node_engine
node_generator -->|"stores results"| node_output
node_engine -->|"builds instructions"| node_instructions
node_engine -->|"loads vocabulary"| node_vocabulary
node_engine -->|"invokes model"| node_llmsdk
node_engine -->|"uses definitions"| node_schemas
node_engine -->|"reports generation"| node_debug
node_output -->|"writes JSON"| node_useresults
node_entry -->|"writes output"| node_output
node_parser -->|"prints validated data"| node_debug
node_parser -->|"prints logo"| node_logo
node_parser -->|"times parsing"| node_timer
node_output -->|"logs output"| node_display
node_sdkcheck -->|"checks filesystem"| node_files

click node_entry "https://github.com/overtekk/call_me_maybe/blob/main/src/__main__.py"
click node_parser "https://github.com/overtekk/call_me_maybe/blob/main/src/parser/parser.py"
click node_arguments "https://github.com/overtekk/call_me_maybe/blob/main/src/parser/arguments_checker.py"
click node_json "https://github.com/overtekk/call_me_maybe/blob/main/src/parser/parse_json_file.py"
click node_schemas "https://github.com/overtekk/call_me_maybe/blob/main/src/models/schemas.py"
click node_sdkcheck "https://github.com/overtekk/call_me_maybe/blob/main/src/parser/llm_path_checker.py"
click node_pathcheck "https://github.com/overtekk/call_me_maybe/blob/main/src/parser/path_checker.py"
click node_argumentcheck "https://github.com/overtekk/call_me_maybe/blob/main/src/parser/arguments_checker.py"
click node_promptqueue "https://github.com/overtekk/call_me_maybe/blob/main/src/engine/prompt.py"
click node_generator "https://github.com/overtekk/call_me_maybe/blob/main/src/generate.py"
click node_engine "https://github.com/overtekk/call_me_maybe/blob/main/src/engine/CallMeMaybe.py"
click node_instructions "https://github.com/overtekk/call_me_maybe/blob/main/src/engine/llm_instructions_model.py"
click node_vocabulary "https://github.com/overtekk/call_me_maybe/blob/main/src/engine/Vocabulary.py"
click node_llmsdk "https://github.com/overtekk/call_me_maybe/blob/main/llm_sdk/llm_sdk/__init__.py"
click node_output "https://github.com/overtekk/call_me_maybe/blob/main/src/engine/Output.py"
click node_debug "https://github.com/overtekk/call_me_maybe/blob/main/src/debug/print_debug.py"
click node_display "https://github.com/overtekk/call_me_maybe/blob/main/src/utils/display.py"
click node_files "https://github.com/overtekk/call_me_maybe/blob/main/src/utils/files.py"
click node_timer "https://github.com/overtekk/call_me_maybe/blob/main/src/utils/func_timer.py"
click node_logo "https://github.com/overtekk/call_me_maybe/blob/main/src/utils/logo.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_parser,node_arguments,node_json,node_schemas,node_sdkcheck,node_pathcheck,node_argumentcheck,node_user toneBlue
class node_promptqueue,node_generator,node_engine,node_instructions,node_vocabulary,node_llmsdk toneAmber
class node_output,node_useresults toneMint
class node_debug,node_display,node_files,node_timer,node_logo toneRose
```

## Components

### Input and validation

- [CLI entry point](https://github.com/overtekk/call_me_maybe/blob/main/src/__main__.py): `src/__main__.py`
- [Input orchestrator](https://github.com/overtekk/call_me_maybe/blob/main/src/parser/parser.py): `src/parser/parser.py`
- [CLI arguments](https://github.com/overtekk/call_me_maybe/blob/main/src/parser/arguments_checker.py): `src/parser/arguments_checker.py`
- [JSON validation](https://github.com/overtekk/call_me_maybe/blob/main/src/parser/parse_json_file.py): `src/parser/parse_json_file.py`
- [Data schemas](https://github.com/overtekk/call_me_maybe/blob/main/src/models/schemas.py): `src/models/schemas.py`
- [SDK path check](https://github.com/overtekk/call_me_maybe/blob/main/src/parser/llm_path_checker.py): `src/parser/llm_path_checker.py`
- [Path checks](https://github.com/overtekk/call_me_maybe/blob/main/src/parser/path_checker.py): `src/parser/path_checker.py`
- [Argument checks](https://github.com/overtekk/call_me_maybe/blob/main/src/parser/arguments_checker.py): `src/parser/arguments_checker.py`

### Constrained generation

- [Prompt selection](https://github.com/overtekk/call_me_maybe/blob/main/src/engine/prompt.py): `src/engine/prompt.py`
- [Generation loop](https://github.com/overtekk/call_me_maybe/blob/main/src/generate.py): `src/generate.py`
- [Constrained decoder](https://github.com/overtekk/call_me_maybe/blob/main/src/engine/CallMeMaybe.py): `src/engine/CallMeMaybe.py`
- [LLM instructions](https://github.com/overtekk/call_me_maybe/blob/main/src/engine/llm_instructions_model.py): `src/engine/llm_instructions_model.py`
- [Token vocabulary](https://github.com/overtekk/call_me_maybe/blob/main/src/engine/Vocabulary.py): `src/engine/Vocabulary.py`
- [LLM SDK model](https://github.com/overtekk/call_me_maybe/blob/main/llm_sdk/llm_sdk/__init__.py): `llm_sdk/llm_sdk/__init__.py`

### Results and output

- [Result accumulator](https://github.com/overtekk/call_me_maybe/blob/main/src/engine/Output.py): `src/engine/Output.py`
- **Results file**

### Runtime support

- [Debug output](https://github.com/overtekk/call_me_maybe/blob/main/src/debug/print_debug.py): `src/debug/print_debug.py`
- [Console display](https://github.com/overtekk/call_me_maybe/blob/main/src/utils/display.py): `src/utils/display.py`
- [Filesystem helpers](https://github.com/overtekk/call_me_maybe/blob/main/src/utils/files.py): `src/utils/files.py`
- [Timing utility](https://github.com/overtekk/call_me_maybe/blob/main/src/utils/func_timer.py): `src/utils/func_timer.py`
- [Program branding](https://github.com/overtekk/call_me_maybe/blob/main/src/utils/logo.py): `src/utils/logo.py`

### Other components

- **CLI user**

## Connections

- CLI user → CLI entry point: runs CLI (evidence: `README.md`)
- CLI entry point → Input orchestrator: parses inputs (evidence: `src/__main__.py`)
- Input orchestrator → CLI arguments: parses options (evidence: `src/parser/parser.py`)
- Input orchestrator → SDK path check: checks SDK (evidence: `src/parser/parser.py`)
- Input orchestrator → JSON validation: validates files (evidence: `src/parser/parser.py`)
- JSON validation → Data schemas: validates against (evidence: `src/parser/parse_json_file.py`)
- CLI arguments → Path checks: checks paths (evidence: `src/parser/arguments_checker.py`)
- CLI arguments → Argument checks: checks arguments (evidence: `src/parser/arguments_checker.py`)
- CLI entry point → Generation loop: starts generation (evidence: `src/__main__.py`)
- CLI entry point → Prompt selection: initializes (evidence: `src/__main__.py`)
- Generation loop → Prompt selection: gets prompts (evidence: `src/generate.py`)
- Generation loop → Constrained decoder: requests generation (evidence: `src/generate.py`)
- Generation loop → Result accumulator: stores results (evidence: `src/generate.py`)
- Constrained decoder → LLM instructions: builds instructions (evidence: `src/engine/CallMeMaybe.py`)
- Constrained decoder → Token vocabulary: loads vocabulary (evidence: `src/engine/CallMeMaybe.py`)
- Constrained decoder → LLM SDK model: invokes model (evidence: `src/engine/CallMeMaybe.py`)
- Constrained decoder → Data schemas: uses definitions (evidence: `src/engine/CallMeMaybe.py`)
- Constrained decoder → Debug output: reports generation (evidence: `src/engine/CallMeMaybe.py`)
- Result accumulator → Results file: writes JSON (evidence: `src/engine/Output.py`)
- CLI entry point → Result accumulator: writes output (evidence: `src/__main__.py`)
- Input orchestrator → Debug output: prints validated data (evidence: `src/parser/parser.py`)
- Input orchestrator → Program branding: prints logo (evidence: `src/parser/parser.py`)
- Input orchestrator → Timing utility: times parsing (evidence: `src/parser/parser.py`)
- Result accumulator → Console display: logs output (evidence: `src/engine/Output.py`)
- SDK path check → Filesystem helpers: checks filesystem (evidence: `src/parser/llm_path_checker.py`)
