Thanks for your interest in contributing.
BitBishop is primarily a learning project, but outside contributions are very welcome when they are clear, focused, and aligned with the project structure. Good contributions are not limited to code: tests, documentation, bug reports, and design feedback are all valuable.
For small fixes, typo corrections, documentation updates, or narrowly scoped tests, feel free to open a pull request directly.
For larger work, please open an issue first so the design and scope can be aligned before implementation. This is especially helpful for:
- search changes
- evaluation heuristics
- architecture refactors
- new protocol features
- build system or CI changes
- CMake 3.27 or newer
- vcpkg with
VCPKG_ROOTconfigured - Clang plus Ninja on Unix-like systems, or Visual Studio 2022 on Windows
Optional tools:
clang-formatclang-tidyllvm-covllvm-profdata
Unix-like systems:
cmake --preset clang_debug
cmake --build --preset clang_debugWindows:
cmake --preset msvc_debug
cmake --build --preset msvc_debugFor the full preset matrix, coverage workflow, and packaging notes, see docs/cmake.md.
Run the quick validation suite before opening a pull request.
Unix-like systems:
ctest --preset quick-validation-clang-debugWindows:
ctest --preset quick-validation-msvc-debugDepending on the kind of change, you may also want to run deeper validation:
intermediate-validation-*for standard perft coveragedeep-validation-*for exhaustive validationfull-suite-*when you want the broadest confidence
Pull requests targeting main run a baseline CI set on GitHub Actions:
- Linux
clang_debugbuild withquick-validation-clang-debugonubuntu-24.04-arm clang-tidylinting onubuntu-24.04-armwhen the PR is updated
When you are close to merge, add the label run-pre-merge-checks to the pull
request to trigger the full cross-platform suite (Linux, macOS, and Windows
release builds). The label stays active, so new pushes will re-run the full
matrix until it is removed.
After the PR is merged, pushes to main publish coverage to GitHub Pages and
refresh the README badges.
For the full matrix and workflow definitions, see docs/ci.md.
- Changes in
attacks/,lookups/,movegen/, ormoves/should usually come with targeted unit tests. - Changes affecting legal move generation should be validated with perft when possible.
- Interface changes should include or update UCI-facing tests when relevant.
- Documentation-only changes do not require tests, but links and examples should still be checked carefully.
BitBishop is intentionally structured by responsibility. Before making changes, please read the architecture guide:
As a rule of thumb:
lookups/is for compile-time geometryattacks/is for occupancy-aware attack queriesmovegen/is for legal move generationmoves/is for applying and reverting chosen movesengine/is for evaluation and searchinterface/is for UCI and external controltools/is for developer-facing validation helpers
If a change crosses these boundaries, please explain why in the pull request.
Please prefer small, reviewable pull requests over large mixed changes.
Good examples:
- one bug fix with tests
- one refactor in a single subsystem
- one documentation update tied to a specific feature
Less helpful examples:
- unrelated cleanup mixed with functional changes
- formatting-only edits across the whole repository in a feature PR
- architecture changes without a written explanation
- Follow the existing naming and file layout conventions.
- Keep comments useful and concise.
- Prefer readable, explicit code over clever but opaque code.
- Preserve the current architectural boundaries unless there is a strong reason to change them.
If formatting or linting is available in your environment, please run:
cmake --build --preset <build-preset> --target clang-format
cmake --build --preset <build-preset> --target clang-tidyExample:
cmake --build --preset clang_debug --target clang-format
cmake --build --preset clang_debug --target clang-tidyPlease update documentation when your change affects:
- public behavior
- build or test workflow
- architecture or folder responsibilities
- protocol behavior
- debugging or contributor workflow
Relevant documentation lives in:
Before requesting review, please make sure that:
- the change is scoped to one main concern
- the code builds on the relevant preset
- the relevant tests pass locally
- new behavior is covered by tests when appropriate
- documentation is updated when needed
- the pull request description explains the motivation and the validation steps
The repository already provides a pull request template in .github/pull_request_template.md.
If you are not ready to contribute code, issues are still very helpful.
For bugs, please include:
- reproduction steps
- a FEN when relevant
- the expected behavior
- the actual behavior
- platform and compiler details when they matter
If you believe the bug has a security impact, please do not file it publicly. Use SECURITY.md instead.
For features, please describe:
- the goal
- the subsystem affected
- the intended behavior
- any constraints or tradeoffs you already see
The existing issue templates under .github/ISSUE_TEMPLATE/
are a good starting point.
By participating in this project, you agree to follow the Code of Conduct.