How to contribute
mcrs accepts outside pull requests. This page helps you choose a role, follow the clean-room rule and take a change from an issue to a merge. Read CONTRIBUTING.md before starting: its rules apply to contributors outside the team, including draft PRs. The team is the logins in .github/CODEOWNERS. Code owners are exempt from CONTRIBUTING.md and may override AGENTS.md for a task.
Pick a role
Section titled “Pick a role”| Role | What you do | Read first |
|---|---|---|
| Specification author | Write the behavior of the game as rules in docs/spec/. You may read the game’s code and sources permitted by the clean-room rule. |
Specs and parity |
| Implementer | Write Rust code and tests from a specification. You never read the game’s code. | Clean-room |
| Parity tester | Compare our output with output the game produced, and report or fix a difference. | Specs and parity |
| Docs and translation | Write or translate pages of this site. | Write these docs |
You can take a different role for each piece of work, but you cannot take two roles for the same behavior. The clean-room rule below is the reason.
What the clean-room rule asks
Section titled “What the clean-room rule asks”mcrs implements the behavior of the game from specifications and never from the game’s code. To keep it that way, two people do the two halves of the work.
A specification author may read the game’s code; the owner must approve a named third-party open source implementation first. The specification they write states behavior only, which means inputs, outputs, order, timing and constants. An implementer writes the code from that specification and reads only four things: docs/spec/, public player-facing documentation, artifacts the game produced, and repository code permitted by the clean-room rules. One person does not take both roles for the same behavior.
The repository also holds no names of classes, methods or fields of the game’s code. Eight names are exempt because the community uses them as common terms: ResourceKey, TagKey, BlockPos, SectionPos, ColumnPos, PalettedContainer, LootContext and NumberProvider. A tool that runs inside the game and drives the vanilla client, such as tools/vanilla-client, may also name the client classes it calls.
The full rules are in docs/clean-room.md, and Clean-room in practice retells them.
If you have read the game’s code
Section titled “If you have read the game’s code”If you have read the game’s code for a behavior, you can write its specification. You do not write its implementation here by hand.
You can still deliver the implementation by giving it to an AI agent. You read the specification and make sure that it is correct, and you make sure that the agent has no access to the game’s code or to pieces of it. mcrs does not restrict AI contributions. We welcome them, provided that you know how the game is structured. The conditions are in the section “Exception: an AI agent writes the code” of docs/clean-room.md.
These precautions make sure that nobody copies code or algorithms from the original game, or from modifications of it, by accident. If you are not sure whether you have read the code about a task, say so in the issue.
Rules for outside pull requests
Section titled “Rules for outside pull requests”Start from an open issue with a settled Decision and specification. Ask to take it and wait for an answer; an assigned issue is already taken. A small fix for an obvious bug needs no issue. Search the open pull requests before starting another change for the same problem.
| Rule | Limit |
|---|---|
| Scope | One problem in one crate group, including the code, tests and docs it needs. Unrelated renames, cleanup and refactors go in separate PRs. |
| Size | At most 1000 added lines, excluding generated data. Agree on a split into stacked PRs in the issue before starting a larger change. |
| Design | A new crate, dependency or subsystem needs a published RFD. |
| Project configuration | Changes to .github/, xtask/, .config/, clippy.toml or AGENTS.md need an issue that asks for them. |
Show the commands you ran and their actual output. Client, renderer and GUI changes need screenshots before and after. In the PR’s “Models” section, list every model used and what it did, including code, tests, specs, review or the PR text; write “none” if no model was used. The person opening the PR answers for every line and replies to review questions in their own words.
A rule violation gets a comment naming the rule and a 72-hour window to fix it before closure. A PR that conflicts with main for seven days without activity is closed. After closure, fix the problem and comment on the PR, or open a new one linking the old one. Following the rules does not guarantee a review or merge. Automated spam and behavior that obstructs review can lead to a ban.
The path of a pull request
Section titled “The path of a pull request”- Find or open an issue. A new issue uses one of two forms: a task, which asks for the goal, the settled decision, the observable result, what is out of scope, the check and the specification, or a bug report. A new game behavior needs two issues. The first asks for the specification, and the second asks for the implementation and cites the rule IDs of the specification. The section “A new behaviour” of
docs/clean-room.mddescribes the pair. - Write the specification, or implement an existing one. Implementation starts only when the specification is ready, which means that its section “Unresolved” is empty and no rule has the label
source_suggested. A test names the rule ID it checks. - Run the tests with the commands below.
- Open a PR. The pull request template starts with the line
Closes #Nfor your issue. It then asks what you changed and why, what a player, a test or a number shows now, how you checked it, and whether the docs are updated. CI fails a PR whose description has noCloses,Fixes,ResolvesorRefsline, unless the PR has the labelno-issue. - Wait for CI. The
issue-linkcheck always applies; Rust jobs run when the change needs them. Build and test explains each of them.
cargo nextest run -p <crate> # one cratecargo nextest run --workspace # everything, before a pushcargo nextest run --profile full # plus the exhaustive sweepsThese three commands come from the README Development section. They need the cargo-nextest runner installed, and the first run downloads the game’s client jar to get the data pack.
The section “Working discipline” of AGENTS.md gives the general scope rules. One issue is one pull request, and a new subsystem needs a published RFD with crate names, layers and migration path before its first code PR. Its general split threshold is about 3k added lines, generated data excluded, or more than one crate group. Outside contributors use the stricter 1000-line and one-group limits above. A refactor PR changes no behavior.
RFD 1: Requests for Discussion defines the process and states. RFD 2: Mission, principles and values guides choices that an existing rule does not settle.
Work with a coding agent
Section titled “Work with a coding agent”The instructions for coding agents live in the repository. AGENTS.md is the instruction file for every agent, and CLAUDE.md is a link to it. It holds the rules that apply everywhere: layers, clean-room, style, tests and the path to main. The more specific material sits in four places.
| Path | What is there |
|---|---|
| .agents/skills | Skills that AGENTS.md names with “Load <name>”, such as rust-style and efficient-testing. .claude/skills/ links to the same folders. |
| .agents/rules | One rule file per domain: codec, memory, rendering and simulation. The header of a rule lists the crate paths it covers. .claude/rules/ links to them. |
| .claude/agents | The roles implementer, spec-author and reviewer, and two read-only helpers: Explore finds code, and log-reader reports the failures in a test or CI log. Each file sets the model of its role. |
| .claude/hooks/cargo-guard.sh | A Claude Code hook that rejects cargo test. Build and test says why. |
Claude Code loads the skills, the rules and the roles by itself. With another tool you do the same by hand. Where AGENTS.md says “Load <name>”, read .agents/skills/<name>/SKILL.md. Before you edit a crate, read the rule of its domain. To give an agent a role, copy the text of that role from .claude/agents/ into the brief of the agent.
RFD 3: Using LLMs in mcrs states what agents handle and what remains a person’s decision, including public APIs and permission to push, open a PR or merge. Read it when directing an agent.
The agent roles keep the two clean-room roles apart. The spec-author writes behavior and no implementation code, and the implementer never reads decompiled, deobfuscated or mapped game code.
Docs go in the same PR
Section titled “Docs go in the same PR”If your change alters behavior that a page of this site describes, update the page in the same PR. A warning on the PR lists the pages whose sources files you touched, and it does not block the merge. Write these docs explains how to write a page.
Tasks for a first PR
Section titled “Tasks for a first PR”These four issues fit a first pull request. First tasks says what each one asks for and which role it needs.
- Typed packets for cookies, transfer and chat.1
- An echo chat bot over the network layer.2
- A packet inspector example.3
- A report of spec rules that no test names.4
Where to ask
Section titled “Where to ask”Questions go to Discord or to the issue you work on. Decisions are recorded in issues with the label decision.
Footnotes
Section titled “Footnotes”Sources and verification
Verified: 26.4-snapshot-7, 1cf84286c, 2026-11-30
- docs/clean-room.md
- docs/spec/README.md
- README.md
- .github/pull_request_template.md
- AGENTS.md
- CONTRIBUTING.md
- .claude/agents/implementer.md
- .claude/agents/spec-author.md
- .claude/agents/Explore.md
- .claude/agents/log-reader.md
- .claude/hooks/cargo-guard.sh
- .github/workflows/checks.yml
- .github/ISSUE_TEMPLATE/task.yml
- PR #687
- PR #832
- .github/CODEOWNERS
- PR #1070
- PR #1071
- issue #295
- issue #293
- issue #289
- issue #507
- docs/rfd/0001-requests-for-discussion.md
- docs/rfd/0002-mission-principles-values.md
- docs/rfd/0003-using-llms.md