EMBED-AND-CI-07: Parse JSON findings in a script
What it demonstrates
Section titled “What it demonstrates”Emitting –format json and processing the stable Finding[] shape downstream.
Builds on: EMBED-AND-CI-05: Fail CI on the exit code
How it’s done
Section titled “How it’s done”A terminal session: the command as you’d run it, followed by the output it prints; trailing comments note the exit status.
npx markdown-contract validate docs/planning --format json \ | jq -r '.[] | select(.level=="error") | "\(.path):\(.pos.line) \(.id)"'# each element is a Finding: { id, level, path, pos:{line,col}, message, fix? }Surfaces exercised
Section titled “Surfaces exercised”CLI --format jsonformatJsonFinding shape (id, level, path, pos, message)