Self-driving optimize (dry-run default)
litescope_autopilotDerives safe and risky SQLite database maintenance actions (ANALYZE, PRAGMA optimize, indexing, VACUUM) with dry-run by default; apply to execute.
Instructions
Self-driving DBA for a local SQLite database. Derives safe maintenance and optimization actions — ANALYZE, PRAGMA optimize, missing foreign-key indexes, and (when fragmented) VACUUM / redundant-index cleanup — each explained in plain language.
Dry-run by default (apply=false): returns the plan without changing anything. apply=true executes the safe actions and requires --allow-writes; a snapshot is taken first so the run is one litescope_restore away from undo. Risky actions (VACUUM, dropping indexes) only run with aggressive=true. Local files only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apply | No | Execute the safe actions. Default false (dry-run). Requires --allow-writes. | |
| source | Yes | Local SQLite file path. | |
| aggressive | No | Also run risky actions (VACUUM, drop redundant indexes). |