Skip to content

Gardener

Virgile Thonnier edited this page Jul 17, 2026 · 2 revisions

Gardener

The gardener audits a directory and surfaces problems — as suggestions, never silent changes. It combines fast Rust heuristics with optional LLM enrichment.

What it looks for

  • Semantic / exact duplicates — files with identical content (content_hash) or highly similar meaning.
  • Empty folders — directories with nothing useful in them.
  • Excessive depth — trees nested far deeper than necessary.
  • "Junk-drawer" folders — catch-all directories with unrelated contents that would benefit from sorting.

How to use it

Run Analyze on a folder (analyze_directory). SenseTree computes the heuristics over the catalog and index, optionally enriches them with the reasoning model, and returns a list of findings.

Findings are read-only. To act on one, you turn it into a plan and go through the same Dry-Run flow: review a Before → After diff, then Approve or Discard. Nothing is moved or deleted without your click.

Relationship to the rest of SenseTree

  • Duplicate detection reuses the same SHA-256 content_hash computed during indexing, so it's essentially free.
  • Suggestions that involve moving/renaming/deleting flow through the transactional, roll-back-safe apply path.

The gardener is intentionally conservative: it's an advisor for keeping your tree tidy, not an autonomous cleaner. Proactive gardening is an area slated to grow in a future release.

Clone this wiki locally