Code Review Process¶
This document outlines our code review process and guidelines for the AiluroCamp project.
Overview¶
Our code review process combines automated checks with AI-assisted reviews to ensure code quality and maintainability. The process is triggered automatically when a pull request is opened or updated.
Pre-Pull Request Checklist¶
Before creating a pull request, please ensure:
- Run
yarn formatto format your code according to project standards - Test your changes thoroughly
- Update relevant documentation
- Ensure all tests pass
Automated Checks¶
1. Code Formatting Check¶
Before any code review begins, an automated check ensures that all code follows our formatting standards:
- Uses the project's configured formatting rules
- Maintains consistent code style across the codebase
- Runs automatically on all pull requests
- Note: If this check fails, please run
yarn formatlocally and update your PR
2. AI-Assisted Code Review¶
Our AI code review system evaluates changes based on five key criteria:
Code Readability (0-20)¶
- Clarity of code structure
- Naming conventions
- Overall code organization
- Comments and documentation
Maintainability (0-20)¶
- Modularity of code
- Documentation quality
- Ease of future modifications
- Code reusability
Performance (0-20)¶
- Algorithm efficiency
- Resource usage
- Potential optimizations
- Scalability considerations
Security (0-20)¶
- Potential vulnerabilities
- Secure coding practices
- Data handling
- Authentication and authorization
Code Style (0-20)¶
- Adherence to coding standards
- Consistency with existing codebase
- Best practices implementation
- Code formatting
Important: If you believe the AI review feedback doesn't make sense or is incorrect, please reach out to the project maintainers for clarification. The AI review is meant to assist, not replace human judgment.
Review Process¶
-
Pull Request Creation
-
Create a pull request targeting the
mainbranch - Provide a clear description of changes
- Link any related issues or tickets
-
Ensure you've run
yarn formatbefore creating the PR -
Automated Checks
-
Code formatting check runs automatically
- AI review is triggered after formatting check passes
-
Review results are posted as comments on the PR
-
Review Criteria
-
Overall score must be 91/100 or higher
- Each category must score 16/20 or higher
-
Issues identified must be addressed before merging
-
Required Actions
- Address all identified issues
- Update code based on review feedback
- Ensure all automated checks pass
- Get approval from at least one team member
Best Practices¶
For Pull Request Authors¶
- Keep pull requests focused and manageable
- Write clear commit messages
- Update documentation as needed
- Test changes thoroughly
- Address review comments promptly
- Run
yarn formatbefore creating or updating PRs
For Reviewers¶
- Review code thoroughly and objectively
- Provide constructive feedback
- Focus on both technical and functional aspects
- Consider security implications
- Ensure documentation is updated
- Help clarify any AI review feedback that might be unclear
Excluded Files¶
The following files are excluded from the AI review process:
pnpm-lock.yamlpackage-lock.jsonyarn.lockpackage.json- Any other lock files
Getting Help¶
If you have questions about the code review process or need assistance:
- Check the project documentation
- Ask in the team's communication channel
- Contact the project maintainers
- If you disagree with AI review feedback, reach out to discuss it