feat(standards): anvil requirement matrix honors --json for both kinds
The global --json flag was already wired through set_json_mode/is_json
in src/output.rs but the matrix path emitted human tables regardless.
Both matrix_requirements and matrix_standards now short-circuit on
output::is_json() and pretty-print the server's response verbatim.
Useful for piping into compliance dashboards, SOC2 audit exports, or
ad-hoc jq queries:
anvil --json requirement matrix --kind standard --organization fangorn \
| jq '.matrix[] | select(.standard.mandatory) | .standard.requirement_id'
Server response shape is stable per REQ-STD-025, so the JSON is
already a documented contract — no transformation needed.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
SHA:
6532c17ef9e6ac3f21d5e922c5486c95f2cbf1f3
Author:
CI <ci@anvil.test>
Date:
2026-05-24 22:56
Parents:
40a6a03
1 files changed
+16
-0
| Type | ||
|---|---|---|
|
|
src/commands/requirement.rs | +16 −0 |
|
||