2.9 KiB
2.9 KiB
allowed-tools, description, argument-hint
| allowed-tools | description | argument-hint | |||
|---|---|---|---|---|---|
| Bash(git diff:*), Bash(git log:*), Bash(git status:*), Bash(git branch:*), mcp__serena__get_symbols_overview, mcp__serena__find_symbol, mcp__serena__find_referencing_symbols, mcp__serena__search_for_pattern, mcp__serena__list_dir | Perform comprehensive code review analysis of recent changes with semantic code understanding |
|
Code Review Analysis
Analyze RECENT_CHANGES using semantic code understanding to perform comprehensive code review covering quality, security, performance, testing, and documentation with specific actionable feedback saved to REVIEW_OUTPUT.
Variables:
TARGET_SCOPE: $1 (optional - specific files, commit range, or "recent" for latest changes) GIT_CONTEXT: recent changes and commit history REVIEW_CRITERIA: code quality, security, performance, testing, documentation ANALYSIS_DEPTH: semantic symbol analysis with cross-references REVIEW_OUTPUT: logs/code-review-analysis.md
Workflow:
- Gather git context using
git status,git diff HEAD~1,git log --oneline -5, andgit branch --show-current - Identify changed files from git diff output for semantic analysis scope
- Use
mcp__serena__list_dirto understand project structure and identify key directories - For each modified file, use
mcp__serena__get_symbols_overviewto understand code structure and symbols - Use
mcp__serena__find_symbolwithinclude_body=truefor detailed analysis of modified functions/classes - Apply
mcp__serena__find_referencing_symbolsto understand impact of changes on dependent code - Use
mcp__serena__search_for_patternto identify potential security patterns, anti-patterns, or code smells - Analyze code quality: readability, maintainability, adherence to project conventions and best practices
- Evaluate security: scan for vulnerabilities, input validation, authentication, authorization issues
- Assess performance: identify bottlenecks, inefficient algorithms, resource usage patterns
- Review testing: evaluate test coverage, test quality, missing test scenarios for changed code
- Verify documentation: check inline comments, README updates, API documentation completeness
- Generate specific, actionable feedback with file:line references and suggested improvements
- Save comprehensive review analysis to
REVIEW_OUTPUTwith prioritized recommendations
Report:
Code Review Analysis Complete
File: REVIEW_OUTPUT
Topic: Comprehensive semantic code review of TARGET_SCOPE with actionable recommendations
Key Components:
- Git context analysis with change scope identification
- Semantic symbol analysis using serena-mcp tools for deep code understanding
- Multi-dimensional review covering quality, security, performance, testing, documentation
- Specific actionable feedback with file:line references and improvement suggestions