Type: feat · Branch: feat/issue-30-format-flag · Part of epic #26
Problem
The CLI contract lists -f/--format and mandates a non-zero error on the unimplemented msgpack value rather than a silent fallback (cli-contract.md:12,44-58). No such flag exists (src/cli.ts, src/options/options.ts), so the facade can neither pass a default -f json uniformly nor get a clean msgpack rejection.
Change
Add -f, --format <json|msgpack> (default json), mirroring the strict-validation pattern already at src/cli.ts:78-99; msgpack/unknown → non-zero error (error: msgpack output is not yet implemented; use --format json). Add format to AnalysisOptions (default "json").
Acceptance
--format msgpack (and any unknown value) exits non-zero; --format json and omission succeed.
- Covered in the flag-validation suite (pattern:
test/dataflow.test.ts:396-425).
Files: src/cli.ts, src/options/options.ts, flag-validation test.
Type: feat · Branch:
feat/issue-30-format-flag· Part of epic #26Problem
The CLI contract lists
-f/--formatand mandates a non-zero error on the unimplementedmsgpackvalue rather than a silent fallback (cli-contract.md:12,44-58). No such flag exists (src/cli.ts,src/options/options.ts), so the facade can neither pass a default-f jsonuniformly nor get a cleanmsgpackrejection.Change
Add
-f, --format <json|msgpack>(defaultjson), mirroring the strict-validation pattern already atsrc/cli.ts:78-99;msgpack/unknown → non-zero error (error: msgpack output is not yet implemented; use --format json). AddformattoAnalysisOptions(default"json").Acceptance
--format msgpack(and any unknown value) exits non-zero;--format jsonand omission succeed.test/dataflow.test.ts:396-425).Files:
src/cli.ts,src/options/options.ts, flag-validation test.