File rename CLI spec
You're having an AI agent build a Rust CLI that bulk-renames files by a user-supplied pattern (think a small `rename` tool). Write the spec that makes it safe and pleasant to use. What behavioral contracts, flags, and failure modes must you specify — and what does a casual 'write a file-rename CLI' prompt get wrong?
Implement
check_rename_plan(sources: list[str], targets: list[str], existing_files: list[str], force: bool) → list[str]Examples
in
[["a.txt","b.txt"],["a1.txt","b1.txt"],["a.txt","b.txt"],false]out["ok","ok"]in
[["a.txt","b.txt"],["c.txt","c.txt"],["a.txt","b.txt"],false]out["collision","collision"]What a strong answer looks like
Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.
0:00 of about 16 min
Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.
Run or narrate your approach, then ask the coach.