mirror of
https://github.com/ProjectLeonida/mandy.git
synced 2026-12-06 12:28:38 +00:00
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.
122 lines
7.5 KiB
Markdown
122 lines
7.5 KiB
Markdown
# 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. `.gitignore` blocks the common
|
|
types; check `git status` and run `python -I scripts/check_no_game_data.py` before 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][claims] 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](https://github.com/ProjectLeonida/mandy/issues/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](https://github.com/ProjectLeonida/mandy/issues/17); rebase on `main`, 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/`](gpu-test-results);
|
|
[docs/testing.md](docs/testing.md) covers how to run the suite.
|
|
- The plan and status of the D3D12 → Vulkan layer are in [docs/d3d12_vulkan.md](docs/d3d12_vulkan.md).
|
|
|
|
[claims]: https://github.com/ProjectLeonida/mandy/issues?q=is%3Aissue%20is%3Aopen%20in%3Atitle%20%22Coordinating%20who%20works%20on%20what%22
|
|
|
|
## 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](AGENTS.md#engineering-bar)).
|
|
- **Python tools:** run with `python -I` and use only the standard library unless noted in
|
|
[AGENTS.md](AGENTS.md#conventions).
|
|
- **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-mode `NamedTemporaryFile`) so Windows
|
|
and Unix produce identical bytes. `tests/test_text_write_line_endings.py` enforces 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/rpf9dump` needs `git submodule update --init`.
|
|
- **Shader-translator rules:** add every new rule to the contract table in `docs/design.md` with how it was confirmed
|
|
(GPU test, Mesa/LLVM reference, or corpus count), plus a small hand-written `.asm` fixture in `tests/semantic/` (see
|
|
`tests/semantic/README.md`).
|
|
- **Running no-game-files tests:** see [AGENTS.md](AGENTS.md#test-without-the-game-first) for the full command
|
|
reference covering Python stdlib (`python -I tests/test_<name>.py`) vs `pytest` (`python -m pytest` for files using
|
|
`tests/requirements.txt` or without `__main__`), docs checks, viewer `.cjs` tests, the semantic translator suite,
|
|
`rpf9dump`, `runtime/` CMake/CTest, `d3d12/` Cargo, and `launcher/native/`.
|
|
- **GPU and pipeline tests:** small hand-written RDNA2 programs in `runtime/test/shaders` (`build.py` with `llvm-mc`
|
|
from LLVM 21+, `check.py` on your GPU; see [docs/testing.md](docs/testing.md)). The optional
|
|
`vk_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](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 to `main` — 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](.github/pull_request_template.md): the claim, `Depends on:`, `Fixes: #N` for 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 `main` is labeled `needs rebase` (`tools/pr_conflict_label.py`, run on every
|
|
push to `main` and hourly). Rebase it on `main` yourself; 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][claims] 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 `main` and passes with the pull request.
|
|
- No game data: `python -I scripts/check_no_game_data.py <files>`.
|
|
|
|
**Test it yourself**
|
|
|
|
- Merge `main` into 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.
|