Repository navigation
Closed
Description
Summary
Add an AI-powered code review feature that analyzes PR diffs and posts inline review comments on GitHub. Each AI provider uses 3 specialized review agents (quality, guidelines, security) downloaded from myk-org/pi-config. When multiple providers are configured, they enter a peer review consensus loop.
Problem / Motivation
Currently, code reviews are entirely manual. An AI-powered review system can catch common issues (security vulnerabilities, code quality problems, guideline violations) automatically on every PR, reducing reviewer burden and improving code quality. The peer review consensus loop (when multiple AI providers are configured) reduces false positives and increases confidence in findings.
Requirements
- New
ai-reviewconfig section under existingai-featuresinschema.yaml - Config supports single provider (standard review) and multiple providers (peer review with consensus)
- Config available at global level, per-repo in
config.yaml, and per-repo in.github-webhook-server.yaml - Trigger on PR
openedandsynchronize(new commits), skip on clean rebase (existing detection) - Download 3 review agent files from
myk-org/pi-configto all provider dirs (.claude/agents/,.gemini/agents/,.cursor/agents/) before each review - Each AI provider runs all 3 agents (quality, guidelines, security) and consolidates findings
- Peer review loop adapted from jenkins-job-insight: anti-sycophancy prompts, cross-peer visibility, consensus checking
- Post inline review comments via GitHub Pull Request Review API (
create_review) - real code comments on diff lines - Review summary with severity counts (CRITICAL/WARNING/SUGGESTION)
- Fire-and-forget background task (same pattern as test-oracle)
- Default timeout: 30 minutes per AI CLI call
- Never break webhook processing on failures
Deliverables
- Add
ai-reviewschema towebhook_server/config/schema.yaml(under$defs.ai-featuresand repo-level) - Create
webhook_server/libs/ai_review.py(agent setup, prompts, JSON parsing, peer review loop, posting) - Extract
ai_review_configinwebhook_server/libs/github_api.py - Integrate trigger in
webhook_server/libs/handlers/pull_request_handler.py(opened + synchronize non-clean) - Create
webhook_server/tests/test_ai_review.pywith comprehensive tests - Update
AGENTS.mdwith AI review documentation - Ensure 90% test coverage for new code
Metadata
Metadata
Assignees
Labels
No labels
Activity
feat: add AI code review integration (#1067)
myakove commentedon Apr 30, 2026
Closing — decided not to implement this feature.