Documentation Index
Fetch the complete documentation index at: https://docs.canthus.org/llms.txt
Use this file to discover all available pages before exploring further.
Principles
- Flags default to local - no network required to evaluate them
- A flag must never silently change behaviour - every flag state change is recorded with a version
- Flags must not affect the determinism of the mana engine: given the same inputs, mana output must be identical regardless of flag state
- Remote flags are a future extension, not a current dependency
Flag storage
Flags are stored locally in a dedicated Drift table, separate from user data.version column is the auditability requirement: no flag change can occur without version incrementing. This makes flag state traceable in crash reports and support sessions.
Flag evaluation
Flags are evaluated through a Domain service, never read from storage directly in UI or business logic.isEnabled - they have no knowledge of where flags are stored or how they are set.
Setting flags
During development, flags are toggled via a hidden debug screen (long-press on the app version label). In production, the debug screen is compiled out. Every write goes through the service, never directly to the table:Remote flags (future)
When remote flag support is added:- Remote values are fetched and written into the same local table via the sync layer
- Evaluation does not change - the service still reads from local storage
- A
sourcecolumn (local|remote) distinguishes origin for auditability - Remote flags must not be evaluated before the first successful fetch - local defaults apply until then