How sutt/lime works
High-Level Components
a. CLI Interface Layer:
• Main entry points: eval, agg, grade, initialize, check, render
• To the core processing layers below
b. Core Processing Layer (organize in three main vertical streams):
Evaluation Stream
• Markdown Parser
• Model Interface
• Grading System
Aggregation Stream
• Results Collector
• Analysis Engine
• Report Generator
Configuration Stream
• Config Parser
• State Management
• Error Handling
c. Model Integration Layer:
• Three parallel paths for different model types:
• OpenAI API
• Local LlamaCpp
• Custom Pipeline (CPL)
Component Relationships
Input Files (MD) → Parser → Model Interface → Grading → Output Files (JSON)
• ↓
• Aggregation Engine
• ↓
• Reports (MD/Terminal)
Specific Implementation Details
• MVC pattern in the common/ directory:
• Models: config.py, internal.py, state.py
• Views: agg/, msg/ directories
• Controllers: config_parse.py, parse.py
MD Files → Parser → Model → Grading → JSON → Aggregation → Reports
config.yaml → ConfigParser → State Management → Command Execution
Interface (base.py)
• ↓
• OpenAI (api_openai.py)
• LlamaCpp (local_llama_cpp.py)
• CPL (cpl_client.py, cpl_server.py)
Important Notes
• Clear separation between synchronous and asynchronous operations
• Version/configuration management flow
• Error handling paths
• Where extensibility points exist