← All Automations DESKTOP FILE ORGANIZER

The File Sorter

Point it at a messy folder. It reads what is actually inside each file, proposes a folder structure, and refuses to move a single thing until two independent judges agree the plan is good.

WHAT IT DOES

Eighty-six files. One command.

  • Reads the actual contents of each file, not just the extension — a PDF named untitled_3830 still lands in the right folder
  • Two judges grade every proposed plan — one a deterministic rules engine, one an AI critic. Neither sees the other's work, and both have to approve before anything moves
  • If the judges disagree, the plan is thrown out and rewritten. Up to three attempts, each one scored in the open
  • Sensitive files — bank statements, tax documents, medical records — are flagged for manual review instead of being quietly relocated
  • Every run writes an undo log. One command puts every file back exactly where it was
HOW IT WORKS

Nothing moves until both agree.

  1. Step 1 — Scan

    Walks the target folder and builds an inventory of every eligible file. Anything matching a privacy rule is pulled aside immediately and marked for review rather than entering the plan at all.

  2. Step 2 — Read and Categorize

    Claude reads the inventory and proposes a taxonomy — real folder names derived from what the files actually are, not a fixed template of Documents / Images / Other.

  3. Step 3 — Judge One: Rules

    A deterministic critic scores the plan against hard constraints — every file accounted for, no collisions, no orphan folders, no file left worse-placed than it started. No model involved, so this score is fully reproducible.

  4. Step 4 — Judge Two: Model

    A separate Claude call independently rates the taxonomy on whether a human would actually find things in it. It never sees the rules engine's verdict, so the two scores can't contaminate each other.

  5. Step 5 — Agree, or Retry

    Both judges must clear the bar. If either objects, the plan is discarded and rewritten with the objection as feedback — up to three attempts, every score visible on screen. Only a plan both judges pass gets applied, and applying it writes an undo log first.

SEE IT RUN

A real desktop, cleared.

Eighty-six real files on a real Desktop — scanned, planned, graded by both judges, then applied.

▶ Watch on YouTube ▶ Watch on TikTok ↓ GitHub
UNDER THE HOOD

Open source, fully reversible.

  1. CLI and a local web UI

    Run it headless from the terminal, or launch the Streamlit interface to click through scan, plan, and apply while watching both judges score in real time. Python 3.11, public on GitHub.

  2. Two critics, deliberately separate

    metrics.py is pure Python and scores the same plan the same way every time. critic.py is the model pass. Keeping them isolated is the whole point — a single grader can talk itself into its own plan.

  3. Privacy filter runs before the model does

    Sensitive-document detection happens locally, before anything is sent anywhere. Flagged files are surfaced for review and never included in an automatic move.

  4. Undo is not optional

    Applying a plan writes undo.jsonl before the first file moves. declutter undo replays it in reverse.

RUN IT YOURSELF

Point it at your own mess.

All of it's open source.

See the Code →