How nikita-filonov/ai-review works
AI Review is a client-side AI code-review tool. A developer or CI job selects a CLI mode; the review service coordinates repository and diff context, policy and prompts, an LLM (optionally using repository-exploration agent mode), then review-specific runners and gateways post comments or replies through a configured VCS integration. The README documents inline, context, summary, and reply modes, multiple VCS/LLM providers, and configurable prompts. Edges are limited to relationships shown in excerpts, the SOURCE INDEX, or README; unsampled mode and provider internals are represented by their subsystem paths.
Main entry points: review/service.py Review coordinator · main.py Review CLI · vcs VCS adapters · loop/service.py Agent loop
Components 22
CLI and configuration
- Review CLI
ai_review/cli/main.py - Resolved settings
ai_review/config.py
Review workflow
- Review coordinator
ai_review/services/review/service.py - Review modes
ai_review/services/review/runner - Mode analysis
ai_review/services/review/internal - Agent loop
ai_review/services/agent/loop/service.py - Repository tools
ai_review/services/agent/tool/service.py - Prompt rendering
ai_review/services/prompt/service.py - Review policy
ai_review/services/policy/service.py
Review context
- Repository state
ai_review/services/git/service.py - Diff processing
ai_review/services/diff/service.py
Provider integrations
- LLM selection
ai_review/services/llm/factory.py - LLM providers
ai_review/services/llm
Review delivery
- VCS selection
ai_review/services/vcs/factory.py - VCS adapters
ai_review/services/vcs - Provider API clients
ai_review/clients - Comment gateways
ai_review/services/review/gateway - Review artifacts
ai_review/services/artifacts/service.py - Usage accounting
ai_review/services/cost/service.py
Other components
- Developer / CI
- Pull request platform
- LLM service
Connections 24
- Developer / CI → Review CLI: selects mode
- Review CLI → Review coordinator: starts review
- Review CLI → Resolved settings: shows config
ai_review/cli/main.py - Review coordinator → Resolved settings: reads settings
ai_review/services/review/service.py - Review coordinator → Review modes: constructs runners
ai_review/services/review/service.py - Review coordinator → Mode analysis: constructs services
ai_review/services/review/service.py - Review coordinator → Agent loop: configures agent
ai_review/services/review/service.py - Review coordinator → Repository tools: configures tools
ai_review/services/review/service.py - Review coordinator → Prompt rendering: configures prompts
ai_review/services/review/service.py - Review coordinator → Review policy: configures policy
ai_review/services/review/service.py - Review coordinator → Repository state: configures context
ai_review/services/review/service.py - Review coordinator → Diff processing: configures diff
ai_review/services/review/service.py - Review coordinator → LLM selection: selects LLM
ai_review/services/review/service.py - Review coordinator → VCS selection: selects VCS
ai_review/services/review/service.py - Review coordinator → Comment gateways: configures posting
ai_review/services/review/service.py - Review coordinator → Review artifacts: configures artifacts
ai_review/services/review/service.py - Review coordinator → Usage accounting: configures accounting
ai_review/services/review/service.py - Agent loop → Repository tools: uses tools
ai_review/services/agent/loop/service.py - LLM selection → LLM providers: selects provider
- LLM providers → LLM service: sends requests
- VCS selection → VCS adapters: selects adapter
- VCS adapters → Provider API clients: uses API clients
ai_review/services/vcs/gitlab/client.py - Provider API clients → Pull request platform: reads and posts
- Comment gateways → VCS adapters: posts feedback