# itsgrj/sigmaflow architecture

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

- Interactive diagram: https://gitdiagram.com/itsgrj/sigmaflow
- Repository: https://github.com/itsgrj/sigmaflow

## Overview

SigmaFlow is a macOS writing assistant for dictation, AI-assisted replies and rewriting, meeting recordings, and live notes. The main workflow captures speech, transcribes and refines it, then inserts the result at the cursor; meeting and notes workflows instead save transcripts and media to a local library. The README documents semantic search, image understanding, and browser context as additional capabilities. Source excerpts show key orchestration calls; links for unsampled subsystems are included only where documented, with evidence limits reflected in the graph.

Main entry points: [`Sources/SigmaFlow/Core/DictationController.swift`](https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Core/DictationController.swift) (Dictation controller), [`Sources/SigmaFlow/Meetings/MeetingSession.swift`](https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Meetings/MeetingSession.swift) (Meeting capture), [`Sources/SigmaFlow/Notes/NotesSession.swift`](https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Notes/NotesSession.swift) (Live notes), [`Sources/SigmaFlow/Meetings/MeetingLibrary.swift`](https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Meetings/MeetingLibrary.swift) (Meeting library)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Dictation and writing"]
  node_controller["Dictation controller"]
  node_audio["Audio capture<br/>[AudioCapture.swift]"]
  node_speech["Transcription engines"]
  node_inject["Text insertion<br/>[TextInjector.swift]"]
  node_autowrite["AI replies<br/>[Autowrite.swift]"]
  node_styles["Style rewriting"]
  node_snippets[("Text snippets<br/>[SnippetStore.swift]")]
end

subgraph group_meetings["Meetings and notes"]
  node_meetingsession["Meeting capture"]
  node_recorder["Meeting recorder"]
  node_notes["Live notes<br/>[NotesSession.swift]"]
  node_library[("Meeting library")]
end

subgraph group_intelligence["Language and search"]
  node_dictionary[("Correction dictionary")]
  node_dictmodel["Dictionary entries"]
  node_formatter["Text formatter"]
  node_localmodels["Local models<br/>[LocalModels.swift]"]
  node_search["Meaning and image search"]
end

subgraph group_app["App and integrations"]
  node_app["SigmaFlow app<br/>[SigmaFlowApp.swift]"]
  node_settings[("Preferences<br/>[Settings.swift]")]
  node_browser["Browser context bridge"]
  node_extension["Browser extension<br/>[background.js]"]
  node_permissions["Permissions<br/>[Permissions.swift]"]
  node_logs[("Run and usage records<br/>[RunLog.swift]")]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -.->|"starts"| node_controller
node_controller -->|"captures"| node_audio
node_controller -->|"feeds audio"| node_speech
node_controller -->|"formats text"| node_formatter
node_controller -->|"corrects text"| node_dictionary
node_controller -.->|"inserts text"| node_inject
node_dictionary -->|"stores entries"| node_dictmodel
node_controller -->|"reads preferences"| node_settings
node_controller -->|"reads page context"| node_browser
node_browser -.->|"exchanges page data"| node_extension
node_user -->|"requests reply"| node_autowrite
node_user -->|"rewrites selection"| node_styles
node_user -->|"speaks shortcut"| node_snippets
node_controller -->|"warms model"| node_localmodels
node_user -->|"starts recording"| node_meetingsession
node_meetingsession -->|"records audio"| node_recorder
node_meetingsession -->|"files recording"| node_library
node_user -->|"starts live notes"| node_notes
node_notes -->|"records audio"| node_recorder
node_notes -->|"files conversation"| node_library
node_user -->|"searches conversations"| node_search
node_library -.->|"indexes conversations"| node_search
node_meetingsession -->|"checks microphone"| node_permissions

click node_app "https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/SigmaFlowApp.swift"
click node_controller "https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Core/DictationController.swift"
click node_audio "https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Core/AudioCapture.swift"
click node_speech "https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Transcription/TranscriptionEngine.swift"
click node_inject "https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Core/TextInjector.swift"
click node_autowrite "https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Core/Autowrite.swift"
click node_styles "https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Styles/SelectionRewriter.swift"
click node_snippets "https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Snippets/SnippetStore.swift"
click node_dictionary "https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Dictionary/DictionaryStore.swift"
click node_dictmodel "https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlowDictionary/DictionaryEntry.swift"
click node_formatter "https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Formatting/TextFormatter.swift"
click node_localmodels "https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Support/LocalModels.swift"
click node_meetingsession "https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Meetings/MeetingSession.swift"
click node_recorder "https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Meetings/MeetingRecorder.swift"
click node_notes "https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Notes/NotesSession.swift"
click node_library "https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Meetings/MeetingLibrary.swift"
click node_search "https://github.com/itsgrj/sigmaflow/tree/main/Sources/SigmaFlow/Search"
click node_settings "https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Support/Settings.swift"
click node_browser "https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Support/BrowserBridge.swift"
click node_extension "https://github.com/itsgrj/sigmaflow/blob/main/BrowserExtension/background.js"
click node_permissions "https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Support/Permissions.swift"
click node_logs "https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Support/RunLog.swift"

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_controller,node_audio,node_speech,node_inject,node_autowrite,node_styles,node_snippets,node_user toneBlue
class node_meetingsession,node_recorder,node_notes,node_library toneAmber
class node_dictionary,node_dictmodel,node_formatter,node_localmodels,node_search toneMint
class node_app,node_settings,node_browser,node_extension,node_permissions,node_logs toneRose
```

## Components

### Dictation and writing

- [Dictation controller](https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Core/DictationController.swift): `Sources/SigmaFlow/Core/DictationController.swift`
- [Audio capture](https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Core/AudioCapture.swift): `Sources/SigmaFlow/Core/AudioCapture.swift`
- [Transcription engines](https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Transcription/TranscriptionEngine.swift): `Sources/SigmaFlow/Transcription/TranscriptionEngine.swift`
- [Text insertion](https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Core/TextInjector.swift): `Sources/SigmaFlow/Core/TextInjector.swift`
- [AI replies](https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Core/Autowrite.swift): `Sources/SigmaFlow/Core/Autowrite.swift`
- [Style rewriting](https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Styles/SelectionRewriter.swift): `Sources/SigmaFlow/Styles/SelectionRewriter.swift`
- [Text snippets](https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Snippets/SnippetStore.swift): `Sources/SigmaFlow/Snippets/SnippetStore.swift`

### Meetings and notes

- [Meeting capture](https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Meetings/MeetingSession.swift): `Sources/SigmaFlow/Meetings/MeetingSession.swift`
- [Meeting recorder](https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Meetings/MeetingRecorder.swift): `Sources/SigmaFlow/Meetings/MeetingRecorder.swift`
- [Live notes](https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Notes/NotesSession.swift): `Sources/SigmaFlow/Notes/NotesSession.swift`
- [Meeting library](https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Meetings/MeetingLibrary.swift): `Sources/SigmaFlow/Meetings/MeetingLibrary.swift`

### Language and search

- [Correction dictionary](https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Dictionary/DictionaryStore.swift): `Sources/SigmaFlow/Dictionary/DictionaryStore.swift`
- [Dictionary entries](https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlowDictionary/DictionaryEntry.swift): `Sources/SigmaFlowDictionary/DictionaryEntry.swift`
- [Text formatter](https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Formatting/TextFormatter.swift): `Sources/SigmaFlow/Formatting/TextFormatter.swift`
- [Local models](https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Support/LocalModels.swift): `Sources/SigmaFlow/Support/LocalModels.swift`
- [Meaning and image search](https://github.com/itsgrj/sigmaflow/tree/main/Sources/SigmaFlow/Search): `Sources/SigmaFlow/Search`

### App and integrations

- [SigmaFlow app](https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/SigmaFlowApp.swift): `Sources/SigmaFlow/SigmaFlowApp.swift`
- [Preferences](https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Support/Settings.swift): `Sources/SigmaFlow/Support/Settings.swift`
- [Browser context bridge](https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Support/BrowserBridge.swift): `Sources/SigmaFlow/Support/BrowserBridge.swift`
- [Browser extension](https://github.com/itsgrj/sigmaflow/blob/main/BrowserExtension/background.js): `BrowserExtension/background.js`
- [Permissions](https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Support/Permissions.swift): `Sources/SigmaFlow/Support/Permissions.swift`
- [Run and usage records](https://github.com/itsgrj/sigmaflow/blob/main/Sources/SigmaFlow/Support/RunLog.swift): `Sources/SigmaFlow/Support/RunLog.swift`

### Other components

- **User**

## Connections

- User → SigmaFlow app: uses
- SigmaFlow app → Dictation controller: starts
- Dictation controller → Audio capture: captures (evidence: `Sources/SigmaFlow/Core/DictationController.swift`)
- Dictation controller → Transcription engines: feeds audio (evidence: `Sources/SigmaFlow/Core/DictationController.swift`)
- Dictation controller → Text formatter: formats text (evidence: `Sources/SigmaFlow/Core/DictationController.swift`)
- Dictation controller → Correction dictionary: corrects text (evidence: `Sources/SigmaFlow/Core/DictationController.swift`)
- Dictation controller → Text insertion: inserts text (evidence: `Sources/SigmaFlow/Core/DictationController.swift`)
- Correction dictionary → Dictionary entries: stores entries (evidence: `Sources/SigmaFlow/Dictionary/DictionaryStore.swift`)
- Dictation controller → Preferences: reads preferences (evidence: `Sources/SigmaFlow/Core/DictationController.swift`)
- Dictation controller → Browser context bridge: reads page context (evidence: `Sources/SigmaFlow/Core/DictationController.swift`)
- Browser context bridge → Browser extension: exchanges page data
- User → AI replies: requests reply
- User → Style rewriting: rewrites selection
- User → Text snippets: speaks shortcut
- Dictation controller → Local models: warms model (evidence: `Sources/SigmaFlow/Core/DictationController.swift`)
- User → Meeting capture: starts recording
- Meeting capture → Meeting recorder: records audio (evidence: `Sources/SigmaFlow/Meetings/MeetingSession.swift`)
- Meeting capture → Meeting library: files recording (evidence: `Sources/SigmaFlow/Meetings/MeetingSession.swift`)
- User → Live notes: starts live notes
- Live notes → Meeting recorder: records audio (evidence: `Sources/SigmaFlow/Notes/NotesSession.swift`)
- Live notes → Meeting library: files conversation (evidence: `Sources/SigmaFlow/Notes/NotesSession.swift`)
- User → Meaning and image search: searches conversations
- Meeting library → Meaning and image search: indexes conversations (evidence: `Sources/SigmaFlow/Meetings/MeetingLibrary.swift`)
- Meeting capture → Permissions: checks microphone (evidence: `Sources/SigmaFlow/Meetings/MeetingSession.swift`)
