Skip to content

How to keep the index fresh

Arun Soman edited this page Aug 31, 2026 · 1 revision

How-to: index and keep it fresh

Index once

cie index .        # 110 files / 1,900+ nodes in ~1.9s; writes .cie/graph.db

After changes

  • Single file: the reindex_file tool (or cie reindex <path>) re-extracts just that file and re-resolves its call edges in place.
  • Hands-off: cie watch (watchdog) auto-reindexes on file events; the start_watch/stop_watch MCP tools do it live from a client.
  • Bulk: re-run cie index . — it's a full replace, and fast.

Ask the graph how stale it is

The freshness_report tool (ToolService) returns per-file index age and missing/changed files since the last index — an honest answer, not a guess. If a file changed, its stale data is reported, not silently served as fresh.

Gotchas

  • Deleted .cie/? Just re-index — nothing else is needed.
  • Neo4j mode: freshness is per --project namespace.
  • cie index runs the full pipeline: extract → call resolution → TESTS pass (see Extraction pipeline).

Clone this wiki locally