General Pull Request Guidelines
Explain Your Changes
Every pull request should clearly communicate:- Why the change is needed: What problem does it solve?
- What the change does: How does it address the problem?
- Relevant context: Link to related issues or discussions
Keep PRs Focused
Small PRs are:- Easier to review
- Less likely to introduce bugs
- Faster to merge
- Easier to revert if needed
Mark PRs as Draft
Use GitHub’s draft PR feature when:- You haven’t tested the code yet
- You want early feedback on your approach
- The PR is a work in progress
Only mark the pull request as “Ready for review” when you have confirmed it works as intended. Test thoroughly and watch for edge cases.
Link Related Issues
Always link to:- The issue your PR addresses
- Any related discussions or feature requests
- Forum posts that provide context
AI-Assisted Code Contributions
Generated AI code can be accepted under specific conditions. If you used AI tools to generate or assist with code, you must:1. Review and Understand the Code
- Don’t blindly copy-paste AI-generated code
- Ensure the code follows Lichess conventions
- Verify the logic is correct and handles edge cases
2. Provide Proof of Testing
Include screenshots or ideally a video demonstrating that the changes work correctly.
- The feature working as intended
- Edge cases handled properly
- No regressions in existing functionality
3. Document AI Usage
In your pull request message or commit messages, include:- The AI tool you used (e.g., ChatGPT, GitHub Copilot, Claude)
- The prompts you used to generate the code
- Which parts were AI-generated vs. manually written
Before Submitting
Testing Checklist
Before marking your PR as ready:- Code runs without errors
- Feature works as intended
- Edge cases are handled
- No console errors or warnings
- Code follows style guidelines
- Tests pass (if applicable)
Ask First When Unsure
If you’re unsure about something or want to check if a change is desired before doing the work, ask in the programming channels on Discord.
Code Review Process
What Reviewers Look For
Reviewers will check:- Code quality: Follows Lichess conventions and style
- Functionality: Actually solves the stated problem
- Testing: Evidence of thorough testing
- Impact: Doesn’t break existing features
- Performance: Doesn’t introduce performance issues
Responding to Feedback
When you receive review comments:- Address all feedback promptly
- Ask questions if anything is unclear
- Make requested changes or explain why you disagree
- Mark conversations as resolved after addressing them
After Approval
Once your PR is approved:- A maintainer will merge it
- Your changes will be deployed to production
- The linked issue will be automatically closed
Common Pitfalls to Avoid
Don’t Submit Untested Code
Always run and test your code before marking a PR as ready. Reviewers expect that code works when they receive it.Don’t Make Assumptions About Difficulty
Don’t Submit Large Refactors Without Discussion
Large-scale refactoring or architectural changes should be discussed with maintainers first. Open an issue or ask on Discord before investing significant time.Don’t Commit Secrets
If you accidentally commit secrets:- Immediately revoke/rotate the compromised credentials
- Remove them from git history
- Notify maintainers
Getting Help
If you need assistance:- Discord: Join the Lichess Discord programming channels
- GitHub Issues: Comment on the issue you’re working on
- Documentation: Check the development wiki
Code Style
Learn Lichess coding conventions
Contributing Overview
Back to contributing overview

