Description
Implement an LLM-powered code review system that automatically reviews pull
requests, suggests improvements, and catches potential issues.
Scope
Build intelligent code review assistant.
Files to Touch/Create
astroml/llm/code_review/__init__.py
astroml/llm/code_review/reviewer.py — Code review logic
astroml/llm/code_review/analyzers/ — Language-specific analyzers
astroml/llm/code_review/checks/ — Review check implementations
astroml/llm/code_review/suggestions.py — Improvement suggestions
.github/workflows/llm-code-review.yml — PR review workflow
Review Capabilities
- Security: SQL injection, XSS, auth issues
- Performance: Inefficient algorithms, memory leaks
- Style: PEP8, best practices
- Correctness: Logic errors, edge cases
- Testing: Missing tests, weak assertions
- Documentation: Missing docstrings
- Complexity: Overly complex functions
Implementation Details
- Analyze diffs, not entire files
- Context-aware: understand surrounding code
- Categorize issues by severity
- Suggest specific fixes with code snippets
- Learn from human reviewer decisions
- Integrate with GitHub PR comments
Acceptance Criteria
- Catches >70% of issues human reviewers find
- False positive rate <20%
- Review completes within 2min of PR creation
- Suggestions are actionable
- Learns from accepted/rejected suggestions
- Supports Python, SQL, YAML
Review Format
## Security
- **[HIGH]** SQL injection risk in `query.py:45`
- Use parameterized query instead of f-string
## Performance
- **[MEDIUM]** N+1 query in `accounts.py:123`
- Consider using `joinedload`
## Style
- **[LOW]** Consider extracting magic number to constant
Labels
enhancement, llm, code-review, developer-tools
Description
Implement an LLM-powered code review system that automatically reviews pull
requests, suggests improvements, and catches potential issues.
Scope
Build intelligent code review assistant.
Files to Touch/Create
astroml/llm/code_review/__init__.pyastroml/llm/code_review/reviewer.py— Code review logicastroml/llm/code_review/analyzers/— Language-specific analyzersastroml/llm/code_review/checks/— Review check implementationsastroml/llm/code_review/suggestions.py— Improvement suggestions.github/workflows/llm-code-review.yml— PR review workflowReview Capabilities
Implementation Details
Acceptance Criteria
Review Format
Labels
enhancement,llm,code-review,developer-tools