Clarify in docs/agent_collaboration.md, AGENTS.md, and CONTRIBUTING.md that agents may open, change, merge, and close pull requests on separate branches, while keeping the strict rule that nobody (human or agent) ever pushes directly to main.
7.5 KiB
Contributing
Thanks for helping. A few rules keep the project safe to host:
- No game data, ever. That covers archives, the executable, carved files, shaders (DXBC, FSSM, disassembly,
SPIR-V), textures, models, audio, videos, and reports or logs that quote them.
.gitignoreblocks the common types; checkgit statusand runpython -I scripts/check_no_game_data.pybefore committing. - No keys, decryption or protection workarounds, and no links to where to get them. The tools only read files that are already plain on disk.
- Nothing online: no Xbox Live or Rockstar services or domains.
- Short excerpts needed to explain a format (a few header bytes, one instruction sequence) are fine in docs and comments.
Before you start
Claim the work in the coordination issue first: the open issue titled "Coordinating who works on what" (it
moves to a new issue when the thread gets long, so the link searches for it). Check its tables and the open pull
requests, post claiming: <ID> there (or a one-line description for something not listed yet), and put the ID in
your pull request. When the pull request is open, post done: <ID> -> #<PR> there. Found something that needs doing
but won't do it yourself? Post finding: <one line> there, with where it is and why it matters, and it goes on the
list for others. When two pull requests overlap anyway, the one that lands first is merged and the other is asked to
rebase or close. Pull requests target main.
The original repository (ItsNotRexed/Leonida) went private on 23 November 2026, and its issues and pull requests
went with it. A #N from before that date is an old number and links nowhere now (including old #166 and #313):
- Old open issues are indexed by title in #18; open a new issue here and link the index to carry one on.
- Old open pull requests are kept as
old-pr/<old number>branches in #17; rebase onmain, keep the author's commits and open a pull request here. - A GPU test result is a pull request adding a file to
gpu-test-results/; docs/testing.md covers how to run the suite. - The plan and status of the D3D12 → Vulkan layer are in docs/d3d12_vulkan.md.
Working on the code
- Engineering bar: fix root causes instead of stacking workarounds, and keep changes simple, clean, modular, maintainable and performant (see AGENTS.md).
- Python tools: run with
python -Iand use only the standard library unless noted in AGENTS.md. - Deterministic line endings: every text file a tool writes (JSON, CSV, manifests, assembly listings) must pass
encoding="utf-8", newline="\n"(open,Path.open,Path.write_text, text-modeNamedTemporaryFile) so Windows and Unix produce identical bytes.tests/test_text_write_line_endings.pyenforces this. - Report paths: a report writer refuses an output naming one of its inputs or another output via
tools/report_paths.same_report_path(a, b)(tests/test_report_paths.py). - Submodule:
tools/rpf9dumpneedsgit submodule update --init. - Shader-translator rules: add every new rule to the contract table in
docs/design.mdwith how it was confirmed (GPU test, Mesa/LLVM reference, or corpus count), plus a small hand-written.asmfixture intests/semantic/(seetests/semantic/README.md). - Running no-game-files tests: see AGENTS.md for the full command
reference covering Python stdlib (
python -I tests/test_<name>.py) vspytest(python -m pytestfor files usingtests/requirements.txtor without__main__), docs checks, viewer.cjstests, the semantic translator suite,rpf9dump,runtime/CMake/CTest,d3d12/Cargo, andlauncher/native/. - GPU and pipeline tests: small hand-written RDNA2 programs in
runtime/test/shaders(build.pywithllvm-mcfrom LLVM 21+,check.pyon your GPU; see docs/testing.md). The optionalvk_pipeline_check <spirv dir> [cache.bin] [--jobs N]builds a module (and compute pipeline) for every translated shader and reports failures.
AI-assisted contributions
Read AGENTS.md before letting an agent edit the repository. Match the model to the work and review its output independently:
- New code and reviews: Claude Opus or Fable; GPT Sol or Astra; Gemini Neon or Carbon.
- Documentation and simple fixes: at least Claude Sonnet or better, GPT Terra or better, Gemini Hydrogen or better, Muse Wonder or better, DeepSeek v4.1 or better, Kimi K3.1 Pro or better, or Qwen 4 Max or better.
- Separate reviewer agent: Always run a separate, read-only reviewer agent (using one of the models listed for new code and reviews above) to independently audit diffs, edge cases, tests and clean-room rules before opening or updating a pull request.
- Disclosure and verification: Note in the pull request that the change was AI-assisted and which specific models were used (including the reviewer agent), along with what you tested and on which GPU and driver.
Pull requests
- Never push directly to
main. Nobody (human or agent) pushes directly tomain— always create a separate branch and open a pull request so every change goes through CI and review. - One topic per pull request, based on current
main. Follow-up work goes in a new pull request, not into an open one. - Fill in the template: the claim,
Depends on:,Fixes: #Nfor an issue it closes, what you tested,GPUs tested:(vendor, model, driver and OS) and whether it was AI-assisted. - A pull request that conflicts with
mainis labeledneeds rebase(tools/pr_conflict_label.py, run on every push tomainand hourly). Rebase it onmainyourself; the label goes within the hour once it merges cleanly. Reviews start with the pull requests that do.
Maintainer quick guide
How maintainers review and merge pull requests.
Before you start
- Read every comment on the pull request first. An open request from a maintainer means waiting for the author.
- Check the pull request's head right before you act: authors often push while you review.
Is it mergeable?
- It is claimed in the coordination issue by the pull request's author.
- One topic, not a duplicate of another open pull request. If two fix the same thing, the better one wins.
- A new test that fails on
mainand passes with the pull request. - No game data:
python -I scripts/check_no_game_data.py <files>.
Test it yourself
- Merge
maininto the branch. Never rebase, never force-push. - Run the pull request's own tests, then the full suite once, and compare with plain
main. - Don't wait for GitHub CI: the queue takes hours.
Then
- Ready: merge it (one pull request at a time) with a short comment saying what you tested and on which GPU.
- Not ready: comment with each blocker, one line each.
- A duplicate, or already in
main: close it with a kind comment that links what landed.
Don't
- Push directly to
main; every change lands through a branch and pull request. - Merge your own pull request (exceptions: a fix for a regression a merge just caused, or something important).
- Post game content (logs, screenshots, shader dumps).
- Forget to say you used AI.