Learn / Events, folds and gates
Where state lives, and what checks it
Foldkit Plus handles local state, synced documents, and server database rows with one rule for each:
| State kind | Storage | Transition | Server gate | History kept |
|---|---|---|---|---|
Local Model | Memory only | update | None (view/agent checks) | None |
| Sync document | Server journal (foldkit-durable) | update on replay | authorize, validate, laws | Until compacted |
| Remote row | Database table | Declared writes (Write) | Guards, when, invariant | None |
When server database rows are edited offline through a journal, edits replay into the database table as a read model; see Editing server data through a journal.