The problem

Every NAS accumulates a Downloads folder nobody dares clean: three years of installers, phone videos across four shares, contracts in directories named after the year someone happened to create them. Existing organizers ask for trust up front and give no receipt. One wrong rule and four thousand files are somewhere else, with no record of where. The cost is not the storage — it is that people stop organizing at all.

What it does

reversible-archive makes archiving a reviewable, reversible transaction.

  1. Collect source, destination, rule and copy-or-move. A vague rule ("old files") gets a question, not a guess.
  2. Scan with ug-filesystem find — pattern, type, size range, date range, depth.
  3. Compare against the destination with ls and sha256sum: every candidate becomes new, duplicate or conflict.
  4. Plan at most 50 rows, plus total count, total bytes, skip count and the top three skip reasons.
  5. Confirm once, with the exact count and bytes. Silence is not consent.
  6. Execute one file per call: the manifest header first, then cpmv + digest verification + one manifest line per success.
  7. Undo later reads that manifest, reverses in descending id, and refuses to delete anything whose digest changed.

Why it is different

  • No delete path for source files. Copy is the default; move is opt-in. The worst case of a bad rule is a rollback, not data loss.
  • The receipt is a plain file on the user's own share — JSON Lines, readable with cat, surviving reinstalls. Not an app database.
  • Conflicts stop instead of being guessed at. A destination file with different content is reported, never overwritten.
  • The header lands before the first file. A run that dies at file 400 still has an exact record of 1–399.

How it is built

SKILL.md is an orchestration contract; every NAS action is delegated to the registered file-agent expert, never called directly. Three references carry the manifest schema, the plan and confirmation contract, and the recovery decision tree. The official UGOS Skill Creation Tool checker returns static-pass with zero errors and zero warnings.

What is next

Scheduled rulesets, a content index written beside the manifest, and a restore-point view per share — all reusing the same receipt format.

Built With

  • json-lines
  • markdown
  • sha-256
  • ug-filesystem
  • ugos
  • uliya-skills-hub
Share this project:

Updates

Submission history