gc
Run store-maintenance tasks: decay idle patterns, merge duplicates, remove orphaned aliases, and rebuild search index for accurate results.
Instructions
Run all store-maintenance tasks in one call: decay, dedup, orphans, FTS.
Combines four housekeeping steps:
1. Decay confidence on patterns idle beyond the staleness threshold.
2. Merge near-duplicates using the given similarity threshold.
3. Remove alias entries whose target no longer exists.
4. Rebuild the SQLite FTS index for accurate search results.
Safe and idempotent — running more than once per day is fine. For
finer control, the individual steps are available as find_duplicates()
+ alias_pattern() + (internal) decay.
Args:
dedup_threshold: Similarity cutoff for step 2, 0.0-1.0. Default
0.75. See find_duplicates() for tuning notes.
Returns:
Dict with keys: "decayed" (int), "merged" (int), "orphans_removed"
(int), "fts_rebuilt" (bool).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dedup_threshold | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||