feat(review): walkthrough/risk_verdict/test_coverage schema

This commit is contained in:
claude
2026-08-22 00:36:50 +00:00
parent 72b77a96e0
commit 2e982846d9
10 changed files with 170 additions and 23 deletions
+16
View File
@@ -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` (24 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` (26 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).