SKILL.md--- name: codebase-management description: >- Set up, index, and manage SocratiCode codebase indexing. Use when the user wants to index a project, check infrastructure health, start/stop file watching, configure context artifacts, troubleshoot indexing issues, manage the code graph, or any SocratiCode administrative task. Activates when the user mentions indexing, setting up search, SocratiCode infrastructure, or managing the codebase index. --- # SocratiCode Management Set up, index, and manage SocratiCode codebase indexing, file watching, code graphs, and context artifacts. ## First-Time Setup 1. **Check infrastructure**: `codebase_health` — verifies Docker, Qdrant, Ollama/embedding provider, and embedding model 2. **Start indexing**: `codebase_index` — runs in background, returns immediately 3. **Poll progress**: `codebase_status` — call every ~60 seconds until 100% complete - This also keeps the MCP connection alive (some hosts disconnect idle connections) 4. **Done**: Graph auto-builds after indexing. In the default watcher mode, the file watcher auto-starts. Ready to search. On first use, SocratiCode automatically pulls Docker images, starts containers, and downloads the embedding model (~5 min one-time setup). ## Incremental Updates & File Watching The file watcher keeps the index automatically updated in the default `SOCRATICODE_WATCHER=auto` mode. - **`codebase_watch { action: "start" }`** — start the watcher (runs catch-up update first) - **`codebase_watch { action: "stop" }`** — stop the watcher - **`codebase_watch { action: "status" }`** — list watched projects (including cross-process) - **`codebase_update`** — manual incremental update (only changed files, synchronous). Usually not needed if watcher is active. For a deliberate code-index snapshot, configure every MCP process that uses the checkout with `SOCRATICODE_WATCHER=off` and `SOCRATICODE_AUTO_RESUME=off`. Search and graph tools keep reading the existing index and graph; run `codebase_update` and `codebase_graph_build` only when a refresh is wanted. Use watcher mode `manual` instead when explicit `codebase_watch { action: "start" }` should remain available. Never try to restart a watcher whose status says disabled. With `SOCRATICODE_WATCHER=git`, active indexed checkouts refresh on checked-out ref/HEAD changes, checked every 10 seconds and on search/status/graph requests. No native file watcher starts. Pending or failed refreshes are not current results. Git triggers the update, but the working tree is indexed, including uncommitted edits. Use `codebase_update` for file saves that do not change ref/HEAD. Selecting Git mode does not create a first index. `SOCRATICODE_AUTO_RESUME=off` suppresses startup catch-up, not later Git-triggered updates. A Git diagnostic must not be bypassed by starting a watcher. ## Managing Indexes - **`codebase_stop`** — gracefully pause in-progress ind