Summary
--help is recognized anywhere in the argument list, but --version is only recognized as argv[2]. The two flags behave inconsistently, and the failure mode is a confusing error rather than the version.
packages/cli/src/cli.ts:
if (rawArgs.length === 0 || rawArgs[0] === "help" || rawArgs.includes("--help") || rawArgs.includes("-h")) { ... }
if (rawArgs[0] === "--version" || rawArgs[0] === "version") { ... } // first position only
Reproduction
node packages/cli/dist/cli.js plan --version
Unknown or incomplete option(s): --version
FixMap maps an issue, prompt, or diff to context files, test routes, and review risks.
...
Exit code 1. Whereas fixmap plan --help prints usage and exits 0, and fixmap --version prints 0.5.0.
Impact
<tool> <subcommand> --version is a near-universal habit and the first thing anyone does when filing a bug report. Getting "Unknown or incomplete option(s)" instead suggests the installed build is broken. There is also no -v short form.
Suggested fix
Treat --version the same way as --help:
if (rawArgs.includes("--version") || rawArgs.includes("-v") || rawArgs[0] === "version") { ... }
placed before command dispatch. Worth adding CLI-level tests for the flag matrix at the same time — packages/cli/src/cli.ts currently has no test file (see the separate entry-point coverage issue).
Summary
--helpis recognized anywhere in the argument list, but--versionis only recognized asargv[2]. The two flags behave inconsistently, and the failure mode is a confusing error rather than the version.packages/cli/src/cli.ts:Reproduction
Exit code 1. Whereas
fixmap plan --helpprints usage and exits 0, andfixmap --versionprints0.5.0.Impact
<tool> <subcommand> --versionis a near-universal habit and the first thing anyone does when filing a bug report. Getting "Unknown or incomplete option(s)" instead suggests the installed build is broken. There is also no-vshort form.Suggested fix
Treat
--versionthe same way as--help:placed before command dispatch. Worth adding CLI-level tests for the flag matrix at the same time —
packages/cli/src/cli.tscurrently has no test file (see the separate entry-point coverage issue).