file-tidy
File Tidy
Keep a person's own files in one Root, grouped into numbered Categories, with every new file arriving through an Inbox. Read references/glossary.md first and use its terms in plans and reports, so the user sees the same words every run.
TIDY=<this skill's directory>/scripts/file_tidy.py is the engine (Python 3.9+, standard library only). It never decides where a file belongs: you decide, the user reviews, and the script moves, verifies and records. Use absolute paths for the script and for every plan entry, because the script may run from any working directory.
On Windows or WSL, read references/windows.md before the first step; it covers how to run the engine, path forms, drives and Windows-only tools.
Hard rules
Each rule protects something that is hard to get back.
- Never delete. The tool removes nothing. Byte-identical duplicates and installers of apps that are already installed go to the OS trash with the
trashaction, or to the Quarantine with thequarantineaction where the trash is unsafe (Windows: see windows.md > Duplicates and quarantine). Never replace duplicates with hard links: backup tools copy them back into separate files, and an edit through one name changes all of them. Only the owner empties the trash or the Quarantine, after checking the result. - Never open or print anything headed for the Sensitive Zone. Classify identity scans, passwords, tokens, keys and credentials by name, type and location alone, because their contents would end up in the transcript.
- Never move App Data, Code Roots or Notes, and never move or trash a Default Folder itself; move only the owner's files out of it. Apps recreate these folders and expect their own data to stay put. As a backstop the script refuses the home folder, Default Folders, system and app-data folders, the Root's
_systemfolder and anything underoutside_rootin the config (Windows: see windows.md > What never moves). - Keep original file names so the owner can still search for them. Name new directories by the config
naming:"en"(default) is lowercase English. If the user wants another language, setnamingand write the Category ids in it yourself, keeping the two-digit prefixes because they fix the sort order (example table in windows.md > Localized Category names). Any path an app, game, terminal or script uses stays English without spaces, because many programs break on non-ASCII paths. - Nothing moves before a Plan dry-run passes. Ask the user to confirm the Plan unless they already authorized the run. Always show
trash,quarantineand uncertain items separately, because those are the ones the user must judge.