How ali-marandi/ai-code-reviewer works
AI-Code-Reviewer Enterprise is a local-first desktop and CLI tool for reviewing GitHub pull requests. The main workflow retrieves PR files, analyzes supported code with local rules and optional AI, then displays or posts findings and can save SARIF locally. The product also includes local findings trends, packaged localization, licensing and telemetry, plus versioned enterprise-analysis modules. Excerpts establish the main entry-point calls and storage behavior; some feature modules are not shown as wired into the primary workflow, so no such links are asserted.
Main entry points: app.py CLI and GUI entry · ai_engine.py AI and local SAST · github_client.py GitHub PR client · main_window.py Desktop review UI
Components 22
User Entry
- CLI and GUI entry
app.py - Desktop review UI
ui/main_window.py
Review Analysis
- GitHub PR client
core/github_client.py - AI and local SAST
core/ai_engine.py - Default rule pack
rules/enterprise_default_rules.json
Findings and History
- Review cache and trend store
core/ai_engine.py - SARIF export
core/ai_engine.py - PR findings comment
core/github_client.py
Application Support
- Packaged localization
core/i18n.py - Translation catalogs
translations - License status
core/license_manager.py - Local telemetry
core/telemetry.py
Enterprise Extensions
- Refactoring and exemptions
core/ai_engine_v120_features.py - Debt and repository analytics
core/ai_engine_v130_features.py - Exploitability analysis
core/ai_engine_v140_features.py - Compliance mapping
core/ai_engine_v150_features.py - Predictive patching
core/ai_engine_v150_features.py - Version 1.6 features
core/ai_engine_v160_features.py
Other components
- Reviewer / CI
- GitHub API
- OpenAI API
- Selected local rule pack
Connections 22
- Reviewer / CI → CLI and GUI entry: starts review
README.md - CLI and GUI entry → Desktop review UI: opens UI
app.py - CLI and GUI entry → GitHub PR client: creates client
app.py - CLI and GUI entry → AI and local SAST: creates engine
app.py - CLI and GUI entry → Packaged localization: installs locale
app.py - CLI and GUI entry → License status: creates manager
app.py - CLI and GUI entry → Local telemetry: creates logger
app.py - Desktop review UI → GitHub PR client: loads PR data
README.md - Desktop review UI → AI and local SAST: analyzes files
README.md - CLI and GUI entry → GitHub PR client: fetches PR files
app.py - CLI and GUI entry → AI and local SAST: analyzes code
app.py - CLI and GUI entry → SARIF export: exports findings
app.py - AI and local SAST → OpenAI API: requests AI review
core/ai_engine.py - AI and local SAST → Default rule pack: loads default rules
core/ai_engine.py - AI and local SAST → Selected local rule pack: loads selected rules
README.md - AI and local SAST → Review cache and trend store: stores scan metadata
core/ai_engine.py - Desktop review UI → Review cache and trend store: reads trend data
ui/main_window.py - GitHub PR client → GitHub API: calls API
core/github_client.py - GitHub PR client → PR findings comment: posts review comment
core/github_client.py - CLI and GUI entry → GitHub PR client: posts findings
app.py - Packaged localization → Translation catalogs: loads catalog
core/i18n.py - Desktop review UI → SARIF export: saves local export
README.md