Skip to content

feat: JSON report output (#3)#5

Merged
migmcc merged 2 commits into
mainfrom
feat/json-output
Jun 20, 2026
Merged

feat: JSON report output (#3)#5
migmcc merged 2 commits into
mainfrom
feat/json-output

Conversation

@migmcc

@migmcc migmcc commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Implements #3 — JSON report output.

What changed

  • New --format md|json option on qdv pfmea-control-plan (Markdown is the default; existing behaviour unchanged).
  • core/report.py: build_report_data() / render_json() / write_json().
  • README + CHANGELOG (Unreleased) updated.

JSON shape

metadata (tool, version, UTC ISO-8601 timestamp, format), inputs, verdict, score, summary (counts by severity and by finding type), and the full findings list (each: type, severity, operation_id, message).

Out of scope (unchanged)

Validation logic, scoring, matching, finding types, Markdown output. No CSV/UI/AI.

Checklist

  • v0.2 roadmap documented
  • --format flag + JSON serialisation
  • tests (default md, json on request, json.loads, metadata shape, finding types + summary consistency, clean-case score 100 / empty)
  • ruff + pytest green (28 tests)
  • CI green on branch

Closes #3 when merged.

Reframe the roadmap v0.2 section around the milestone issues with a recommended
order (JSON output first, then aliases, multi-sheet, and YAML-driven rules as a
stretch). Mark v0.1.0 as released. No behaviour change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@migmcc migmcc added this to the v0.2 milestone Jun 20, 2026
Add a machine-readable report alongside Markdown. Markdown stays the default;
`--format json` writes JSON with metadata (tool, version, UTC timestamp, format),
inputs, verdict, score, a summary (counts by severity and by finding type) and the
full findings list (findings expose `severity`).

No change to validation logic, scoring, matching, finding types or Markdown output.
Adds 5 tests (md default, json on request, parseable, metadata shape, expected
finding types + summary consistency, clean-case empty). ruff + pytest green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@migmcc migmcc marked this pull request as ready for review June 20, 2026 20:20
@migmcc migmcc merged commit 2ddd556 into main Jun 20, 2026
4 checks passed
@migmcc migmcc deleted the feat/json-output branch June 20, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add JSON report output (--format json)

1 participant