Pruning
A brain that grows forever stops being read. Prune it.
Brains accumulate. Lessons repeat, goals go stale, files nobody reads slow down every corpus load and every embedding pass. The prune surface removes the weight on purpose.
CLI
Preview what would go:
vant prune --dry-run
Apply it (bare vant prune is itself a dry run - deletion needs the force flag):
vant prune --force
More ways to look before you delete:
vant prune --list # show prunable files
vant prune --stats # prune statistics
Prune targets stale version folders, superseded files, and fluff content, with retention policies controlling how much history stays.
Daemon mode
Runs pruning in the background on an interval:
vant prune --daemon
vant prune --daemon --interval=21600000 # interval in ms (default: 24h)
Each daemon tick runs a real prune pass under an internal admin context (prune-daemon), so --stale-days=<n> can override the age threshold there too.
Tuning
vant prune --list --stale-days=30 # age threshold override (default: 90)
vant prune --list --no-fluff # stale files only, skip fluff detection
(--no-fluff is honored on the --list pass; the main prune pass always runs with fluff detection on.) The stale-days default comes from the prune.staleDays config key (lib/prune.js exports it as DEFAULT_STALE_DAYS).
Programmatic
const prune = require('./lib/prune');
// NOTE: sandbox-gated - a userCtx is required (VAF fail-closed otherwise)
const result = await prune.prune({ dryRun: true, userCtx });
prune() takes { dryRun, staleDays, removeFluff, userCtx }. The result reports what was found and what was removed before anything is deleted, so the dry-run result can be reviewed in automation. Related exports: getStats(), listPrunable(), isFluff(), DEFAULT_STALE_DAYS.
Practice
Prune on a schedule, not on a feeling. The cron surface can drive it periodically:
vant cron list
Shows scheduled jobs; add a prune job through vant cron. Keep the interval honest: a monthly prune of an active brain is usually enough, and the dry-run result makes each pass reviewable before it is destructive.