Support headless agentic CLI backends (Pi / OpenCode) for deep reviews #28
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
nimmo/forgejo-auto-pr-review#28
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Enable the reviewer to delegate code review analysis to an external, headless coding agent CLI (such as
pioropencode), replacing diff-only limitations with mature, agentic codebase exploration.Context & Motivation
Diff-only reviews frequently suffer from false positives and shallow analysis because the model cannot inspect call sites, imported definitions, or type signatures outside the diff.
Rather than hand-rolling a custom tool-calling loop (managing
read_file,grep, AST search, and context budgets) insidereviewer.py, the runner environment already has mature, full-featured coding agent CLIs available (e.g.piwith Pangolin/Strata/Nova provider discovery and MCP support).In Forgejo Actions, the complete repository is already checked out on the runner disk before the review step runs. A headless agent CLI can be invoked directly in the checkout to investigate the changes, explore surrounding code, verify hypotheses, and emit a structured review report.
Proposed Architecture
.forgejo/ai-review.yml:reviewer.pyvalidates the generated JSON artifact against the review schema, formats the markdown report, and publishes the review/comment to Forgejo asclankbot.Scope
agent-cliprovider implementation inreviewer.py(or a dedicated action mode).ollamaandopenai-compatiblesingle-pass providers as lightweight alternatives.Acceptance Criteria
provider.type: agent-cli(orpi).Support agentic cross-file verification to reduce diff-only false positivesto Support headless agentic CLI backends (Pi / OpenCode) for deep reviews