{"agent":"claude","input":"Migrate this command-line tool from optparse to argparse without changing how users call it. Find every OptionParser, add_option, parse_args, OptionGroup, callback action and use of parser.error or print_help. Before editing, run the existing command with: --help, the version flag, no arguments, an unknown option, an option that needs a value without one, options placed before, between and after positional arguments, and a literal -- followed by an argument that starts with a dash. Save each stdout, stderr and exit status as a table. Port the parser to argparse. Keep every option string, dest, default and metavar. Escape literal percent signs in help strings and convert %prog and %default to argparse's %(prog)s and %(default)s. Turn leftover positional arguments into a declared positional argument, and choose nargs so that the behaviour with zero arguments, including the message and exit status, stays what it was. If the old parser accepted options interleaved with positionals, use parse_intermixed_args. Convert a hand-written version flag to action='version' only if the output and exit status stay the same. Add tests that call the parser with each case in the table. Run the table again against the new parser and report every row as same or different, with the old and new output for the different ones. Update any help text pasted into the README. Do not change option names, add subcommands or fix unrelated bugs; list those instead. Open a pull request.","resources":[{"url":"https://github.com/your-org/your-app"}]}