How Organization Works
Sorty uses AI to analyze your files holistically, considering names, extensions, sizes, dates, and contextual relationships to create a clean, intuitive folder structure.Organization Phases
The organization process runs through five distinct phases:Scanning
Directory is scanned and files are indexed. Deep Scan mode optionally extracts metadata from PDFs, images (EXIF), documents, and media files.
AI Analysis
Files are sent to your configured AI provider. The AI analyzes patterns, naming conventions, file types, and semantic relationships.
Validation
The proposed structure is validated against exclusion rules, folder limits, and naming conflicts.
Organization States
The system maintains clear state transitions throughout the process:The state machine enforces valid transitions. For example, you can’t jump from
scanning directly to applying without going through organizing and ready first.AI Analysis Details
What the AI Sees
- Filename Only
- Deep Scan
- Vision Mode
Default mode - Only filenames and metadata are sent:
- File names and extensions
- File sizes and dates
- Directory structure
- Detected patterns (e.g., “invoice_jan”, “invoice_feb”)
Intelligent Grouping Strategies
The AI uses multiple strategies to understand your files:Semantic Grouping
Semantic Grouping
Files are grouped by meaning, not just extension:
proposal_v1.docx,proposal_budget.xlsx,proposal_mockup.png→ Proposal/ folder- Detects shared prefixes, suffixes, and stems
- Recognizes client/project identifiers
Project Detection
Project Detection
Automatically identifies software projects:
- Looks for
package.json,Cargo.toml,go.mod,.xcodeproj,Makefile - Groups all related source files, configs, and assets
- Recognizes paired files (
report.tex+report.bib)
Date-Aware Clustering
Date-Aware Clustering
Temporal organization for time-based files:
- Recognizes patterns:
YYYY-MM-DD,MM-DD-YYYY, “Jan 2026” - Creates temporal subfolders:
2026-01/orQ1-2026/ - Groups recurring files: monthly reports, weekly logs
Mixed Type Intelligence
Mixed Type Intelligence
Keeps related files together despite different types:
- Data analysis project:
.py+.csv+.png→ Data Analysis/ - Design project:
.psd+.png+.svg→ Design/ - Documentation:
.md+ images + diagrams → Docs/
System Prompt & Constraints
Sorty’s AI operates under strict rules defined inSystemPrompt.swift:
Hard Limits
Top-Level Folders
Maximum 10 top-level folders (configurable)The AI must count and merge categories if it exceeds this limit.
Folder Depth
Maximum 3 levels deepPrevents overly complex nested structures.
Naming Conflicts
Never create a folder with the same name as an existing file.
User Instructions
Custom instructions override all default rules.
Streaming Progress Updates
During organization, the AI emits live progress updates:File Tagging
When enabled, Sorty applies Finder-compatible color tags:| Tag | Semantic Meaning | Use Case |
|---|---|---|
| Red | Urgent, Important, Critical | Unpaid invoices, urgent documents |
| Orange | Needs Attention, Review, In Progress | Draft proposals, pending reviews |
| Yellow | Draft, Pending, Temporary | Work in progress |
| Green | Complete, Verified, Approved, Final | Completed projects, signed contracts |
| Blue | Reference, Info, Documentation | Manuals, guides, references |
| Purple | Creative, Design, Media | Photos, designs, videos |
| Gray | Archive, Old, Inactive | Old versions, archived files |
Tags are Spotlight-searchable and visible in Finder’s sidebar.
Temperature Control
Adjust the AI’s creativity (0.0-1.0):- Low (0.0-0.3)
- Medium (0.4-0.6)
- High (0.7-1.0)
Predictable & Conservative
- Strict, conventional categorization
- Follows standard file type groupings
- Minimal creative interpretation
Output Format
The AI returns a structured JSON response:The
rule_id field tracks which learned pattern was applied, enabling feedback loops with The Learnings system.Validation & Safety
Before applying changes, the system validates:Validation Checklist
Validation Checklist
- ✓ All input files appear exactly once in output
- ✓ Every file has a
tagsarray with 1-3 tags (if tagging enabled) - ✓ Folder depth ≤ 3 levels
- ✓ Top-level folders ≤ configured limit
- ✓ No folder name matches an existing file
- ✓ No empty folders
- ✓ All filenames match input exactly (unless renaming enabled)
- ✓ Custom user instructions followed
- ✓ Exclusion rules respected
Performance Optimization
Steady Progress Animation
During AI processing, Sorty maintains smooth progress:Streaming Display Throttling
UI updates are throttled to prevent layout thrashing:Related Features
The Learnings
Passive learning system that improves organization over time
Personas
Customize organization behavior for different workflows
AI Providers
Configure OpenAI, Anthropic, Ollama, or Apple Intelligence
Duplicate Detection
Find and merge duplicate files before organizing