{ "name": "review", "description": "Review a PR, branch, ref, recent changes, folder, or file; verify each finding; then synthesize analysis and next steps.", "args": { "hint": "[target]", "params": ["target"] }, "schemas": { "Findings": { "type": "object", "properties": { "findings": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string" }, "file": { "type": "string" }, "detail": { "type": "string" } }, "required": ["title", "file"] } } }, "required": ["findings"] }, "Verdict": { "type": "object", "properties": { "title": { "type": "string" }, "real": { "type": "boolean" }, "why": { "type": "string" }, "file": { "type": "string", "description": "echo of the reviewed finding's file, for correlation" } }, "required": ["title", "real", "file"] }, "ReviewReport": { "type": "object", "properties": { "analysis": { "type": "string" }, "findings": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string" }, "file": { "type": "string" }, "why": { "type": "string" }, "severity": { "type": "string" } }, "required": ["title", "file", "why", "severity"] } }, "recommendations": { "type": "array", "items": { "type": "string" } } }, "required": ["analysis", "findings", "recommendations"] } }, "phases": [ { "id": "review", "kind": "fanout", "over": ["correctness", "security", "performance"], "step": { "summary": "Review target for {item} issues", "prompt": "Review the requested target for {item} issues. Target: {args.target}\n\nThe target may be a PR, branch/ref, recent changes, folder, or file. If target is empty, inspect the working tree and recent local changes. Use git/read/grep/find/ls as appropriate; for PRs or branches, inspect the relevant diff; for folders/files, inspect that scope. Do not modify files. Return JSON matching the Findings schema, and set each finding's `file` to the path it concerns.", "tools": ["read", "bash", "grep", "find", "ls"], "model": "small", "thinkingLevel": "medium", "schema": "Findings" } }, { "id": "verify", "kind": "fanout", "over": "{review.results[].findings[]}", "step": { "summary": "Verify one candidate finding", "prompt": "Adversarially try to refute this finding. Default to real=false if uncertain. Echo the finding's `file` verbatim in your verdict's `file` field so the verdict ties back to its finding.\n\nFinding: {item}", "model": "big", "thinkingLevel": "high", "schema": "Verdict" } }, { "id": "report", "kind": "single", "step": { "summary": "Synthesize review analysis and next steps", "prompt": "Write the final human-readable review report for target: {args.target}. Candidate scans: {review.results}. Verification verdicts: {verify.results}. Include only verdicts with real=true in findings. Explain the overall code state in analysis, including material strengths, gaps, and review confidence. Give concrete ordered recommendations that move the work forward; when no finding is verified, recommend the most relevant validation or readiness step instead of generic filler. Keep prose concise and never dump source JSON into strings. Return JSON matching ReviewReport.", "model": "big", "thinkingLevel": "medium", "schema": "ReviewReport" } } ], "return": "{report.results}" }