What problem does it solve? Supabase Storage buckets in a roofing CRM accumulate orphaned, duplicate, misplaced, and improperly public files that are legal and claim evidence, so they cannot be safely hard-deleted without audit trails and retention controls. ## Core Features & Use Cases - Orphan Detection: Cross-references storage.objects against photos, documents, signed_documents, measurement_reports, permits, estimates, and other DB tables to find unlinked, duplicate, temp, and unreferenced mobile files. - Safe Quarantine Workflow: Moves flagged files to a quarantine bucket with checksum verification and a storage_quarantine audit row, never hard-deleting in the scanner. - Compliance Enforcement: Detects improperly public files containing signed docs, contracts, or PII and remediates them to private buckets with per-tenant scoping and legal-hold protection. - Use Case: A nightly pg_cron job scans each tenant's buckets in dry-run mode, writes findings to storage_orphan_scans, and a master-role admin reviews and restores or purges files from the /admin/storage-orphans UI after the retention window. ## Quick Start Ask the AI to run a dry-run storage orphan scan for one tenant and show which unlinked files would be quarantined.