Extraction level code-kb asks for on a new artifact: symbol core plus structural facts,
without the identifier, literal, and source-region tables code-kb never reads.
Cold-start background sweep: checks filesystem against SQLite files records.
Streams disk checks and uses an in-memory SQLite index to eliminate repository-wide heap HashMaps.
Creates a missing index. A git worktree copies its parent repository’s index and
reconciles it against the worktree files, which is much faster than a full scan;
anything else runs a full scan. A copy that another julie-extract wrote is rebuilt.
Tier 2: Just-In-Time Staleness Guard
Checks if a file on disk has been modified since it was indexed in SQLite.
If dirty or missing from index, re-extracts the file synchronously (< 5ms).
Rebuilds the index when it was written by a julie-extract other than the one in use or
at another extraction level. Returns true when a rebuild ran. An index that a newer
julie-extract wrote is kept, so an older binary never replaces it. The rebuild scans a
fresh artifact because the extractor refuses to write into one with an older schema.