Skip to content

Contributing

BlackCat edited this page Nov 29, 2026 · 1 revision

Contributing

TwilightMC is maintained by BlackCat and the TwilightMC contributors. The binding rules live in CONTRIBUTING.md; this page is the orientation.

Before you start

  • Open an issue for non-trivial features or breaking changes so the architecture can be discussed first.
  • Fork the repository and branch from main with a descriptive name (feat/asset-pipeline, fix/uuid-v3-generation).
  • Keep pull requests scoped to one feature or fix.
  • By submitting a PR, commit or patch you accept the CLA in CONTRIBUTING.md §1.

Quality gates

Every contribution must pass the same gates CI runs:

cargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace

The desktop frontend adds:

npm --prefix crates/twilight-ui/ui run check:locales
npm --prefix crates/twilight-ui/ui run build

Zero warnings are tolerated. See Building from source for the full toolchain setup.

Code rules

  • Pure idiomatic Rust. No Qt residue: no QObject, QString, QList, signals/slots or QThread. Use String, Vec, HashMap, bytes::Bytes, tokio and tokio::sync::mpsc.
  • Errors, not panics. Define domain errors with thiserror; no .unwrap() / .expect() in production library code.
  • Serde everywhere. Strict struct/enum types for every JSON manifest.
  • Submodule isolation. upstream/ is reference material only. Never compile, link or modify it; only twilight-horizon reads the upstream Horizon tree, read-only.
  • No bundled Mojang assets. Download textures, audio, language files and client.jar from Mojang's CDN at runtime.
  • Offline accounts use the standard v3 UUID (MD5("OfflinePlayer:" + username)) and --accessToken 0. Custom auth goes through -javaagent:authlib-injector.jar.

Automated agents

Automated coding agents (OpenClaw, NanoClaw, Cursor Agent, Devin, …) are allowed only for:

  • bug fixes tied to an existing issue;
  • security patches;
  • tests that improve coverage.

They may not add dependencies, rewrite architecture across crates, or touch upstream/ without prior human approval. Every agent commit and PR must link the issue it addresses, keep the diff minimal, and end with the robot signature on its own line:

🤖🤖🤖

Commits or PRs identified as agent-generated without that signature are rejected.

Commit conventions

Conventional Commits:

<type>(<scope>): <short description>

[optional body explaining WHAT and WHY]

[optional footer / agent signature]

Permitted types: feat, fix, test, refactor, docs, chore.

Examples:

feat(downloader): implement parallel sha1 verification
fix(manifest): correct rule evaluation on macOS arm64
docs(wiki): document the package repositories

What to work on

  • TODO.md tracks the milestone backlog.
  • Issues labelled good first issue are scoped for new contributors.
  • Documentation fixes are always welcome — including this wiki.

Where to go next

Clone this wiki locally