scry_surface
Rebuilds the marker database by scanning project files for @scry.* markers after file changes or to fix stale query results.
Instructions
Rebuild the DB from disk markers. Use after git pull, bulk file moves, or if query results seem stale. The file watcher handles live indexing — only call this for full re-scans.
Walks all project files, parses @scry.* markers, upserts to DB. Idempotent. Uses content-hash dedup.
Args: force: If true, hard-deletes records whose files no longer exist. If false (default), sets missing_since and warns. path: Optional scope, relative to project root. None (default) — full corpus walk. Current behavior, unchanged. — re-index exactly that one file. — re-index every file under that directory, recursively. If path does not exist on disk, returns a clear error. Scoped reconciliation: flagged_missing, misplaced_doc warnings, and force-deletes are all scoped to the path — docs outside the scope are never flagged as missing.
Returns JSON with counts per marker type, any warnings, and a scope field echoing the path argument (null for a full walk).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| force | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |