# Architecture

`unmake` separates concerns into layered modules:

- `unmake.core`: orchestration (`HistoryManager`, `OperationRegistry`, session context).
- `unmake.storage`: storage backends (`InMemoryStorage`, `SQLiteStorage`).
- `unmake.models`: immutable-like records and status enums.
- `unmake.operations`: reusable operation implementations.
- `unmake.integrations`: external system integration placeholders.
- `unmake.utils`: validation and helper utilities.

## Session Lifecycle

1. `start_session()` persists a running session.
2. `record_operation()` appends ordered operation records.
3. Context exit marks session completed or failed.
4. `undo_session()` replays operations in reverse and optionally marks rolled back.
