Developers are increasingly skeptical of generic AI file organizers that ignore personal workflow nuances. Enter sloth-tidy, a local file organizer submitted for the Hacktoberfest Open-Source AI Challenge Week 3. Unlike competitors that rely on static assumptions, sloth-tidy builds a habit profile from your existing directories and treats every undo command as a permanent correction to its model.
Habit Profiling and Correction Loops
The core innovation lies in how sloth-tidy handles errors. Most AI organizers fail because they repeat the same misclassification night after night. Sloth-tidy solves this with an 'undo-as-feedback' mechanism. When a user reverses a filing, the system records that action as a correction. The next time the tool runs, its classification prompt explicitly includes these past rejections, instructing the model not to repeat the mistake. This creates a self-correcting loop that improves with every user interaction.
Safety-First Architecture
Because sloth-tidy operates autonomously, safety is baked into the architecture rather than treated as an afterthought. The tool defaults to a dry-run mode, requiring an explicit --apply flag to move files. It uses a journal-first approach with an SQLite database, recording every move as 'pending' before the filesystem change occurs. If a crash happens, the system can identify incomplete moves. Furthermore, the codebase restricts filesystem verbs to shutil.move only, ensuring no files are ever deleted or overwritten, with collisions resolved via automatic suffixes.
Local LLMs and Consensus Modeling
Sloth-tidy runs entirely on local open-weight models via Ollama, prioritizing privacy and cost-efficiency. The primary classifier is gemma3:4b, which uses schema-constrained decoding to ensure outputs match the userβs actual folder taxonomy. If the primary modelβs confidence falls below 0.7, a second model, qwen2.5:3b, provides a consensus vote. Disagreements between the two models trigger a reconsideration pass or result in the file being placed in an 'Unsorted' directory, preserving the original filename to prevent data loss.
Key Takeaways
- Sloth-tidy learns from user undo commands, preventing repeated filing errors.
- The tool uses a journal-first SQLite architecture to ensure crash recovery and data integrity.
- Classification relies on local models like
gemma3:4bandqwen2.5:3bvia Ollama, keeping data offline. - A dry-run default and move-only operations prevent accidental deletions or overwrites.
The Bottom Line
Sloth-tidy proves that local AI agents can be both powerful and safe by treating user corrections as training data rather than failures. For developers drowning in digital clutter, this approach offers a trustworthy alternative to cloud-based organizers that never learn from their mistakes.