How otherjl0/oatmeal works
Main Components Overview
a. Core Layers:
• Application Layer (UI/CLI interface)
• Domain Layer (Core business logic)
• Infrastructure Layer (External integrations)
b. External Components:
• LLM Backends (OpenAI, Ollama, LangChain, Claude, Gemini)
• Editor Integrations (Neovim, Clipboard)
• Configuration System
• Session Management
┌─────────────────────────────────────────────────────────────┐
• Application Layer │
• ┬─────────────────────────┬──────────────────┤
• CLI │ UI │ Configuration │
• ┬───────┴──────────┬──────────────┴────────┬─────────┘
┌───────▼───────┬──────────▼──────────┬───────────▼─────────┐
• Models │ Services │ Session Mgmt │
• Message │ - App State │ - Persistence │
• Author │ - Actions │ - History │
• Session │ - Events │ │
• ┬───────┴──────────┬──────────┴───────────┬─────────┘
┌───────▼───────┬──────────▼──────────┬──────────▼─────────┐
• LLM Backends │ Editor Integration │ Syntax Highlight │
• OpenAI │ - Neovim │ - Theme Engine │
• Ollama │ - Clipboard │ - Language Det. │
• Claude │ │ │
• Gemini │ │ │
• ┴────────────────────┴────────────────────┘
Key Architectural Elements to Highlight
a. Backend Integration System:
• How different LLM backends are abstracted
• Backend trait implementation
• Configuration paths for each backend
b. Editor Integration:
• Editor trait implementation
• Communication flow between editor and core system
• Clipboard as the default integration
c. Session Management:
• Persistence layer
• How sessions are loaded/saved
• Interaction with chat history
Implementation Details
• src/application/: UI and CLI interfaces
• src/domain/: Core business logic and models
• src/infrastructure/: External integrations
• src/configuration/: Config management
Testing Boundaries
• Unit test coverage
• Integration test coverage
• Snapshot test locations