detail
Built systems/commands/SNAPSHOT.php — takes a complete backup of every live file on the platform (PHP, HTML, MD, JSON, config, DBs — everything except backups/trash/logs/sessions themselves) into one dated ZIP at backups/platform-snapshots/platform_snapshot_[date].zip. First real snapshot: 761 files, 12.6MB source / 7.5MB compressed. Wired directly into CLEAN.php as a mandatory first gate (v1.2) — if no snapshot exists for the current date, CLEAN immediately returns status=blocked and refuses to proceed to any cleanup logic, with a clear message to run SNAPSHOT.php first. This directly addresses the 05-Front_end incident — there was no way to recover the directory except that David happened to still have his own local copy; if CLEAN had required a snapshot first, a full restore would have been trivial regardless of what got deleted or why. Philosophy going forward, per David: one full baseline covers everything currently existing; going forward only files that actually CHANGE need individual tracking (which the existing D101/D105 per-domain application backup system already handles) — SNAPSHOT.php is the safety net underneath that, not a replacement for it.