* refactor(app): export one function per command
Step 2 of #710. A command's logic was split between cmd and stage-shaped app calls; cmd now parses flags, calls one function and prints what it returns. An error means the command never ran, and a run that ended early says so in Summary.Err.
* fix(app): check dumpkeys and archive -o up front
A missing output directory was reported only after the keys were retrieved or the files copied.
* docs(rfcs): move restore's input out of the command layer
Restore now discovers its directories in an archive itself, so the command layer no longer holds the data it reads.
Bare dir now always means a user data dir, so the snapshot root, the export listing, and the
keys.json kind get their own words; names used only inside their package are no longer exported.
Tests now sit beside the code they cover; ones a golden or another test already pins are gone, and core tests gain the assertions a real regression would trip.
dumpkeys truncated keys.json before writing it, so a failed write left a partial file; app now writes it through the
same temp-file-and-rename path zips use. Unzipping moves next to zip writing and checks entries with filepath.IsLocal.
snapshot.Zip followed symlinks and kept an existing archive's mode, edge cases export's --zip never needed;
both now write a temp file beside the target and rename it into place.
Def, Request, DirID, and Source said too little, and short variables and doc comments that skip their name hid intent.
varnamelen and staticcheck ST1020-22 now keep both from coming back.
Comments that restated names or narrated the code are gone, and multi-line ones are cut to a line of why.
Only comments change: each edited Go file has the same token stream as before. winapi and abe come later.
One copier and one zip transport serve archive, restore, and every profile copy, so locked-file handling has one home.
Dropping otiai10/copy takes x/sync out of every binary and testing out of the Windows exe.