Files
av-club/commanders
pastilhasandClaude Opus 5 5b2fe03ffd Convert on arrival — the first plugin-shipped commander
watches a folder and converts what lands in it, so a photo uploaded from a phone is
immediately something a browser can show and a thumbnail can be made from.

configurable, which is the point: watch_dir, extensions, output_format, lossless,
delete_source. only watch_dir has no default, so it is the only thing that blocks
arming.

IT CALLS av-club RATHER THAN ffmpeg OR sharp. everything that makes a conversion
safe lives behind that API, and a watcher shelling out itself would have none of it.

it also breaks the usual commander shape deliberately, and says so. the standard is
"wait, then spawn a headless agent to exercise judgement" — but there is no
judgement in "a HEIC arrived and needs converting", and an agent per photograph
costs real money to reach the same answer every time. so the loop calls the API
directly and only involves an agent when something goes wrong.

three things in the watcher that are not obvious and each cost somebody an
afternoon somewhere:

  close_write and moved_to, never create — `create` fires when a file is opened for
    writing, before it has any bytes
  two identical size readings before touching a file — a file still being copied in
    converts to a truncated result and gets marked done
  a failure is recorded as SEEN — the same file fails identically every tick, and a
    watcher retrying forever is the failure mode that costs money. it is in the log
    and the owner can clear the line.

the brief tells it to offer the Convert Image task for the BACKLOG before arming
anything. a watcher only sees what arrives, and one armed over a quiet folder looks
broken while working perfectly.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-29 02:45:09 +01:00
..