repositories / pi-ext
pi-ext
bugabingas pi extensions
owned by bugabinga
extensions/ultra/workflows/review.json
Raw{
"name": "review",
"description": "Review a PR, branch, ref, recent changes, folder, or file; then adversarially verify each finding.",
"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"]
}
},
"phases": [
{
"id": "review",
"kind": "fanout",
"over": ["correctness", "security", "performance"],
"step": {
"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": {
"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"
}
}
],
"return": "{verify.results | where real}"
}