09I changed one line in one file. What happens?
Three mechanisms, in order of how you'll normally meet them: 1. Automatic (read paths): when a read tool (bb search, MCP bb_search, etc.) touches files that are stale or missing in the index, it auto-refreshes exactly those files within a budget before answering, and says so in an auto-refreshed N files in Xms line. Budgets are tunable via BB_AUTO_REFRESH_MAX_FILES / BB_AUTO_REFRESH_MAX_BYTES, and opt-out is BB_NO_AUTO_REFRESH=1 (or refresh=false on the MCP tool). If the repair exceeds the budget or another index run holds the lock, the tool answers honestly from existing data with a staleness footer instead of pretending. 2. Explicit and bounded: bb index --changed re-parses only files changed since the last index and runs the derived-data pass for the touched files, keeping relationships current. This is the routine "I edited stuff, sync my index" command. 3. Single file: bb index --file <path> re-indexes one file's symbols + relationships. Ideal right after an AI agent creates/edits a function and you want the DB to know immediately. If derived data got deferred or went stale (e.g., after --skip-post-processing), bb index --post re-runs the derived phases without re-parsing anything.
10Do symbols, relationships, and embeddings get recomputed for everything again?
No — only what the changed files touch. Here is exactly what an incremental run (bb index --changed, --file, or auto-refresh) updates, verified in code: Data | Updated for changed files? | How Symbols | ✅ | Changed files are re-parsed by the same analyzers and their symbol rows rewritten. Unchanged files are not touched. Relationships | ✅ | Three mechanisms: the re-parsed file's own edges resolve at insert time; cross-file edges from other files pointing into the changed file are repaired; unresolved external targets are re-resolved scoped to the touched symbols. Enrichment | ✅ | Re-run scoped to the touched source symbols. Gravity scores | ✅ | Recomputed for touched symbols plus any symbol whose in-degree changed because of the edit. Taint flows | ✅ | Resolution re-processes only unresolved flows. Health | ✅ | Full recompute (cheap SQL aggregates). Deleted files | ✅ | Purged from the index, including their derived rows. Embeddings | ✅ (background) | New/changed symbols are queued for the embedding provider automatically during storage; vectors populate asynchronously with a local fallback if the provider is unavailable. The run summary labels this pass derivedPass: bounded so you can see it ran; if any derived phase fails, the index status becomes partial (visible, never silent). Two honest edges: (1) embeddings are asynchronous — immediately after an edit the new vectors may still be in flight, so semantic search may lag a few seconds behind symbol/relationship freshness; (2) on very large batches the embedding queue has a documented capacity cap (oversized batches are dropped with honest metrics and recoverable via bb index --force) — a normal edit-flow never hits it. Only a full rebuild (bb index --force) recomputes everything from scratch — you should almost never need it.
11My agent created a function seconds ago — will the DB know?
Reads auto-refresh stale/missing files on the fly (mechanism 1 above), so a fresh edit is typically picked up on the next query without you doing anything. For guaranteed freshness on a specific file, bb index --file <path> is instant and scoped.
12How do I keep the index up to date?
The agent tools reindex files they edit (bb_index). For manual workflows: bb index --changed reindexes only changed files, bb index --post re-runs derived phases without re-parsing, and bb status shows what the last run did. Search results carry a freshness block that names the exact remediation command when data is stale.
13The indexer was interrupted (power cut, Ctrl+C). Do I start over?
No. Progress is checkpointed. Resume with: bb index --resume It continues incrementally — only missing/changed files are processed, then the bounded derived-data pass runs. ---