feat: add intelligent AI context generator for enhanced code reviews
Add comprehensive context generation system that automatically analyzes projects and creates detailed context files to improve AI code review quality.
-
Automatic Context Generation: ai-generate-context CLI tool that analyzes project structure, dependencies, and code patterns to generate comprehensive context files
-
Hybrid LLM + Deterministic Analysis: Combines factual extraction (dependencies, file structure) with LLM-driven insights (architecture patterns, review focus areas)
-
Manual Section Preservation: Users can add domain-specific context in designated manual sections that are preserved during automatic updates
-
Partial Updates: Update specific sections (--section overview, tech_stack, structure, review_focus) while preserving others
-
Multi-Provider Support: Works with Anthropic, Gemini, and Ollama AI providers
-
Modular Design: Clean separation between facts extraction, code sampling, LLM analysis, and template rendering
-
Section-Based: Pluggable section system for extensibility
-
Template Engine: Markdown template system with manual section preservation
-
Comprehensive Testing: 90%+ test coverage with unit and integration tests
-
Project overview with purpose, type, and key dependencies
-
Technology stack with versions and usage guidance for reviewers
-
Architecture patterns and code organization principles
-
Review focus areas tailored to the tech stack
-
Manual sections for business logic, domain context, and special cases
-
Seamlessly integrates with existing ai-code-review workflow
-
Real project context file (.ai_review/project.md) serves as functional example
-
Comprehensive documentation with setup guides and best practices
-
Updated user guides to promote automatic context generation
This significantly enhances code review quality by providing AI reviewers with rich project context, leading to more accurate and relevant feedback.