three-layer-architecture
IN premise
The codebase is a three-layer stack: data model (`__init__.py`), TMS engine (`network.py`), and persistence (`storage.py`), with `api.py` providing functional API and `cli.py` as a thin argparse wrapper.
Summary
The system is organized into clean, well-separated layers where data structures, reasoning logic, and database storage each live in their own module. This means changes to how beliefs are stored on disk, for example, shouldn't require touching the reasoning engine, and the CLI is intentionally kept thin so the real work happens in the API layer underneath.
Dependents
These beliefs depend on this one:
- three-layer-stack-has-clean-boundaries — The architecture enforces strict layer separation: pure data model at bottom, context-managed API with dict returns in the middle, and pure-formatter CLI at the top
Details
| Source | entries/2026/04/23/scan-ftl-reasons.md |