reindex
Re-walk, re-parse, and index project files into the database, detecting changed files by content hash so only updates are processed after git pulls, branch switches, or external edits.
Instructions
Re-walk, re-parse, and re-index project files into the database. Detects changed files via content hash and only re-processes what changed. Eagerly populates file and identifier embeddings unless no_embed=true or CONTEXTPRO_REINDEX_NO_EMBED is set. Use after git pull, branch switch, or external edits. Builds the import graph for related/test_map tools.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | Absolute project root. Required with linked worktrees; subagents must pass their own worktree root on every call. | |
| force | No | Force re-process all files, ignoring cache. Default: false. | |
| no_embed | No | Skip corpus embedding generation. Search does not generate corpus embeddings; it uses existing vectors or lexical fallback. Configure an embedding provider and run reindex with no_embed:false to populate vectors (also unset CONTEXTPRO_REINDEX_NO_EMBED). Default: false. | |
| auto_hubs | No | Generate feature-hub labels (one chat-model call per hub). Off by default to keep reindex fast and free. Or set CONTEXTPRO_AUTO_HUBS=1. | |
| target_path | No | Scope reindex to a specific directory (relative to root). |