feat(review): walkthrough/risk_verdict/test_coverage schema
This commit is contained in:
@@ -68,6 +68,12 @@ Return STRICT JSON only — same shape as the pragent primary's findings:
|
||||
}
|
||||
```
|
||||
|
||||
The full review-level JSON shape (used by the pragent primary) also
|
||||
includes three optional top-level fields — `walkthrough` (list[str]),
|
||||
`risk_verdict` (str), and `test_coverage` (str) — that the synthesizer
|
||||
fills in across all lenses. Lens output is free to omit them; the parser
|
||||
defaults to `[]` / `""` when absent (backward compatible).
|
||||
|
||||
`ruleId` examples: `QUALITY_DEAD_CODE`, `QUALITY_HIDDEN_COMPLEXITY`,
|
||||
`QUALITY_INVARIANT_DROP`, `QUALITY_NAMING_CONTRADICTS`,
|
||||
`QUALITY_SUPPRESSED_ERROR`, `QUALITY_DUPLICATED_LOGIC`. One stable
|
||||
|
||||
@@ -67,6 +67,12 @@ Return STRICT JSON only — same shape as the pragent primary's findings:
|
||||
}
|
||||
```
|
||||
|
||||
The full review-level JSON shape (used by the pragent primary) also
|
||||
includes three optional top-level fields — `walkthrough` (list[str]),
|
||||
`risk_verdict` (str), and `test_coverage` (str) — that the synthesizer
|
||||
fills in across all lenses. Lens output is free to omit them; the parser
|
||||
defaults to `[]` / `""` when absent (backward compatible).
|
||||
|
||||
`ruleId` examples: `DOCS_README_DRIFT`, `DOCS_FENCE_BROKEN`,
|
||||
`DOCS_ENV_UNDOCUMENTED`, `DOCS_LINK_ROT`, `DOCS_NO_CHANGELOG`. Use one
|
||||
stable ruleId per recurring pattern — it's how the synthesizer dedups
|
||||
|
||||
@@ -47,4 +47,10 @@ O(n²) over bounded small n, `low` for redundant-but-rare work.
|
||||
{"findings":[{"severity":"...","path":"...","line":0,"problem":"...","fix":"...","suggestion":"","reference":""}]}
|
||||
```
|
||||
|
||||
`line` must be a post-change line. No prose outside JSON.
|
||||
`line` must be a post-change line. No prose outside JSON.
|
||||
|
||||
The full review-level JSON shape (used by the pragent primary) also
|
||||
includes three optional top-level fields — `walkthrough` (list[str]),
|
||||
`risk_verdict` (str), and `test_coverage` (str) — that the synthesizer
|
||||
fills in across all lenses. Lens output is free to omit them; the parser
|
||||
defaults to `[]` / `""` when absent (backward compatible).
|
||||
@@ -160,6 +160,12 @@ containing STRICT JSON, nothing else after it:
|
||||
"risks": [
|
||||
"Bullets detailing potential bugs, edge cases, lifecycle issues, or performance risks found across the diff"
|
||||
],
|
||||
"walkthrough": [
|
||||
"a.py: adds X — short plain-prose bullet, file- or change-grouped",
|
||||
"b.py: refactors Y"
|
||||
],
|
||||
"risk_verdict": "Low|Medium|High|Critical risk: <one-line concrete reason>",
|
||||
"test_coverage": "Tests added" | "Tests changed" | "No tests for behavioral change" | "No test files in repo",
|
||||
"findings": [
|
||||
{
|
||||
"severity": "critical|high|medium|low|info|nit",
|
||||
@@ -178,6 +184,16 @@ Rules:
|
||||
- `summary_changes` (2–4 bullets) goes into the **Summary of Changes** section.
|
||||
`risks` (bullets) goes into **Key Risks & Concerns**. Both are required;
|
||||
empty arrays are fine when nothing applies.
|
||||
- `walkthrough` (2–6 bullets, file- or change-grouped) is the **Walkthrough**
|
||||
section: what the PR does, where, in plain prose. Default to `[]` for a
|
||||
trivial diff. Backward compatible — parsers default to `[]` if absent.
|
||||
- `risk_verdict` (exactly one line) goes into the **Risk Verdict** section.
|
||||
Lead with `Low|Medium|High|Critical risk:` followed by a concrete reason.
|
||||
Default to `""` when not applicable. Backward compatible.
|
||||
- `test_coverage` (short string) goes into the **Test Coverage** section.
|
||||
Use exactly one of `"Tests added"`, `"Tests changed"`,
|
||||
`"No tests for behavioral change"`, `"No test files in repo"`. Default to `""`.
|
||||
Backward compatible.
|
||||
- `suggestion` is the literal new code that replaces the flagged line(s). Minimal —
|
||||
just the changed lines, indented as they'd appear in the file. Empty string `""`
|
||||
when no safe textual replacement exists (e.g. missing test, architectural note).
|
||||
|
||||
@@ -50,4 +50,10 @@ security findings only:
|
||||
```
|
||||
|
||||
`line` must be a post-change (context or `+`) line. Empty `suggestion` when no
|
||||
safe replacement. No prose outside the JSON block.
|
||||
safe replacement. No prose outside the JSON block.
|
||||
|
||||
The full review-level JSON shape (used by the pragent primary) also
|
||||
includes three optional top-level fields — `walkthrough` (list[str]),
|
||||
`risk_verdict` (str), and `test_coverage` (str) — that the synthesizer
|
||||
fills in across all lenses. Lens output is free to omit them; the parser
|
||||
defaults to `[]` / `""` when absent (backward compatible).
|
||||
@@ -47,4 +47,10 @@ replacement); include a sketch only if a one-line test is obvious.
|
||||
{"findings":[{"severity":"...","path":"...","line":0,"problem":"...","fix":"...","suggestion":"","reference":""}]}
|
||||
```
|
||||
|
||||
`line` must be a post-change line in a source or test file. No prose outside JSON.
|
||||
`line` must be a post-change line in a source or test file. No prose outside JSON.
|
||||
|
||||
The full review-level JSON shape (used by the pragent primary) also
|
||||
includes three optional top-level fields — `walkthrough` (list[str]),
|
||||
`risk_verdict` (str), and `test_coverage` (str) — that the synthesizer
|
||||
fills in across all lenses. Lens output is free to omit them; the parser
|
||||
defaults to `[]` / `""` when absent (backward compatible).
|
||||
Reference in New Issue
Block a user