Pure CLI parser that returns a discriminated union instead
of calling process.exit mid-parse. The legacy parseCliArgs entry
point in article-generator.ts is preserved for backward compatibility
with existing callers and tests; new callers and unit tests should
prefer parseCliArgsSafe so the --help and error branches are
fully testable without spying on process.exit.
Description
Pure CLI parser that returns a discriminated union instead of calling
process.exitmid-parse. The legacyparseCliArgsentry point inarticle-generator.tsis preserved for backward compatibility with existing callers and tests; new callers and unit tests should prefer parseCliArgsSafe so the--helpand error branches are fully testable without spying onprocess.exit.