Persistent Code Index
The code index is a persistent, incremental index of a repository that Wayland Core can search without re-reading the tree every time.
wayland-core index buildwayland-core index statuswayland-core index search "<query>"wayland-core index verifyThe persistent index landed in v0.12.26. It builds on the same repository understanding described in RepoMap, but keeps its results on disk between runs.
Incremental and git-respecting
Section titled “Incremental and git-respecting”The index is incremental: a rebuild processes what changed rather than the whole tree.
Its scope is git-respecting, so files your repository already ignores are not indexed. You do not maintain a second ignore list that drifts out of step with the first one.
Steady-state size
Section titled “Steady-state size”The store is WAL checkpointed after each refresh. The practical effect is that index status reports a steady-state size rather than a figure that climbs with every refresh and then drops when something compacts in the background. The number you read is the number the index actually occupies.
Honest refusals
Section titled “Honest refusals”Two refusals are deliberate and worth knowing about.
Unknown store schema versions are refused explicitly. An index written by a newer Core is not opened on a best-effort basis by an older one. It is refused, by name, rather than read as though it were understood.
Unavailable semantic search says why. When semantic search cannot run, index status reports:
semantic status=unavailablewith a reason attached. A capability that is off tells you it is off and what would turn it on, instead of quietly degrading to a keyword match that you then mistake for semantic results.
Related
Section titled “Related”- RepoMap for how Core builds its picture of a repository.
- Built-in Tool Reference for the tools an agent uses to read code during a turn.