Storage
JSON files plus a rebuildable index.json. No database. Core code depends on the SnapshotStore protocol so tests can use InMemorySnapshotStore.
- Snapshots are immutable after save. Only annotations (
label,note,isPinned,tags) mutate. SnapshotQuery.applyis the single filter implementation; stores must not reimplement filtering.- Duplicate saves throw
StorageError.alreadyExists. Missing deletes throw.notFound. - Corrupt snapshot files are skipped on
rebuildIndex, not fatal to the library. - Writes are atomic (temp file + replace).
Read Documentation/Storage.md. Tests: Tests/Domain/SnapshotServiceAndStoreTests.swift, Storage package suite.