

I think you need something like restic with a retention policy
https://restic.readthedocs.io/en/stable/060_forget.html#removing-snapshots-according-to-a-policy
--keep-{hourly,daily,weekly,monthly,yearly}
other solutions that implement similar policies are kopia and rustic
the advantage of using an off the shelf solution is that it’s almost certainly more reliable than what anyone can come up with in a few hours, and, it works with incremental backups, so your space requirements are drastically reduced depending how often you run it.








use the LLM to generate regression tests for the large file, then start refactoring it