feat: uniform findings JSON — the diagnostics convergence (FR-E1, stacked on #112) - #114
Draft
HenryCFnord wants to merge 4 commits into
Draft
feat: uniform findings JSON — the diagnostics convergence (FR-E1, stacked on #112)#114HenryCFnord wants to merge 4 commits into
HenryCFnord wants to merge 4 commits into
Conversation
REQ-04-01-10-03 on US-04-01-10: lint frontmatter, lint requirements, and trace markers answer --format json with the shared diagnostics payload instead of the unversioned findings/summary shape inherited from the retired reference checkers; text output and exit codes stay byte-identical, supplementary payloads stay additive keys. This supersedes the oracle-shape JSON pins in the three command tests: the contract those pins froze is retired with its oracle, and the requirement change precedes the test change per the AGENTS.md rule. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gie4jfrHKCxQktD2UsvH4Q
A new cross-command test (REQ-04-01-10-03) drives all three findings surfaces through --format json and demands the shared payload; the three oracle-shape pins are rewritten to the same contract — the shape they froze retired with its oracle, and the requirement change landed first (previous commit). All four red: the commands still answer with findings/summary. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gie4jfrHKCxQktD2UsvH4Q
Green for REQ-04-01-10-03: lint frontmatter and lint requirements map their findings through the shared Diagnostic (severity, code, message, file) and emit via diag::emit; trace markers versions its payload and carries findings as error diagnostics and kind warnings as warning diagnostics, the coverage counters staying additive keys. The two oracle-shape emitters and their json_string helpers are deleted; text output and exit codes are byte-identical. Full just ci green before this commit (unpiped log, exit 0). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gie4jfrHKCxQktD2UsvH4Q
The ICD diagnostics unit names the checker and marker-gate rule families as code values of the one payload; roadmap and program status log FR-E1 as landed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gie4jfrHKCxQktD2UsvH4Q
HenryCFnord
force-pushed
the
claude/personas-user-stories-jynl8i
branch
2 times, most recently
from
July 29, 2026 12:23
3585b7c to
900e4c0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #112 (base is that PR's branch — retarget to
mainafter #112 merges; independent of #113). Draft until the base lands.FR-E1 from the PSI feedback: "stable JSON on all commands, so an orchestrating agent branches on results without parsing prose." The investigation narrowed it to three commands —
lint frontmatter,lint requirements, andtrace markers— which still answered--format jsonwith an unversionedfindings/summaryshape inherited from the retired Python reference checkers (path/rule/levelinstead offile/code/severity, noschema_version). Everything else already speaks the diagnostics contract (ADR-0006 layer 2, ICD Diagnostics).The change
All three now emit the one documented payload:
{"schema_version": 1, "diagnostics": [ {"severity": "error", "code": "FM-001", "message": "…", "file": "docs/…", "line": 12} ]}Finding→ sharedDiagnosticand emit throughdiag::emit; the two duplicated oracle-shape emitters are deleted (net −23 lines).trace markersfolds its findings (errors, withline) and kind warnings (warnings) intodiagnosticsand keepstests_files/coverage_by_kindas additive keys.Process note: the superseded oracle pins
The three commands' JSON tests were oracle-shape pins. The shape they froze retired with its oracle (PR #88), so per the AGENTS.md rule the spec change landed first (REQ-04-01-10-03 on US-04-01-10, the canonical diagnostics story — goals-not-features: no new story), then the pins were rewritten to the new contract in the red commit, keeping their original requirement markers so no requirement loses verified coverage (ratchet stays green). A new cross-command test in
tests/cli.rsverifies REQ-04-01-10-03 by driving all three surfaces in one scratch.Red evidence (verbatim):
All four green afterwards; full
just cigreen before every commit (unpiped log, exit 0).Breaking change, deliberately
Consumers parsing the old checker JSON (the PSI corpus may) must switch
findings→diagnostics,path→file,rule→code,level→severity, and derive counts instead of readingsummary. The old shape carried noschema_versionto negotiate with — that defect is exactly what this closes. The ICD diagnostics unit documents the converged surface.🤖 Generated with Claude Code
https://claude.ai/code/session_01Gie4jfrHKCxQktD2UsvH4Q
Generated by Claude Code