Architecture overview
Sorite is one Rust process with a native UI, plus one child process per active language server. Everything language-, file- and policy-related lives in a UI-independent core; the desktop app paints core state and turns input into core calls.
Arrows are compile-time dependencies (and, for the two external boxes, runtime communication). There are no cycles; the core does not depend on egui or on the AI crate.
Principles in practice
| Principle | How the MVP applies it |
|---|---|
| Lazy resource use | Folders load one directory at a time; grammars compile on first use; language servers start when a document needs them and stop after an idle grace period. |
| Bounded work | Syntax analysis is limited to files up to 1 MiB and 6 ms per keystroke; decorations are computed for visible lines only and capped per provider. |
| No hidden cost | The status bar and axiom-perf report memory for the whole process tree, language servers included. |
| No data loss | Saves refuse to overwrite files changed on disk; closing or quitting with unsaved changes asks first. |
| Least privilege | Untrusted folders never start language servers; extensions are declarative; AI requests are previewed and user-initiated. |