docs(workspace): add CONTRIBUTING.md and CLA
This commit is contained in:
parent
fa7ec0e380
commit
99c407f57e
71
CLA.md
Normal file
71
CLA.md
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
# Synvael Contributor License Agreement
|
||||
|
||||
> ⚠️ **DRAFT — NOT YET LEGALLY REVIEWED.** This document has not been reviewed by legal counsel. It will be updated once a formal legal review is completed. The terms below represent the project's intent and will be finalized before contributions are accepted.
|
||||
|
||||
---
|
||||
|
||||
## Purpose
|
||||
|
||||
This Contributor License Agreement ("Agreement") establishes the terms under which contributions are made to the Synvael project, owned and maintained by Cryoforge Nexus ("the Project Maintainer"). "Cryoforge Nexus" refers to the legal entity registered under that name. Until formal registration is completed, this Agreement represents the project's stated intent and will become binding upon the entity's incorporation.
|
||||
|
||||
This Agreement is required because the Synvael project uses a dual-license model (AGPLv3 for source code, CC-BY-NC-SA 4.0 for assets) while also being commercially developed. Without this Agreement, contributed code and assets could not be included in a commercial release. The Agreement ensures that the Project Maintainer has the necessary rights to operate the project under both its open-source and commercial models, while contributors retain ownership of their work.
|
||||
|
||||
## Definitions
|
||||
|
||||
- **"Contribution"** means any original work of authorship — including source code, documentation, configuration, translations, textures, models, sounds, icons, shaders, and any other creative work — that is intentionally submitted by a Contributor to the Project for inclusion therein.
|
||||
|
||||
- **"Contributor"** (also "You") means the individual who submits a Contribution to the Project.
|
||||
|
||||
- **"Project"** means the Synvael software project and all associated repositories maintained by the Project Maintainer.
|
||||
|
||||
- **"Submit"** means any form of communication sent to the Project, including but not limited to pull requests, patches, commits, issues, and comments on any of the above, but excluding communications conspicuously marked or otherwise designated in writing as "Not a Contribution."
|
||||
|
||||
## 1. Grant of Copyright License
|
||||
|
||||
You hereby grant to the Project Maintainer a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute your Contributions and any derivative works thereof.
|
||||
|
||||
This license includes the right to relicense the Contribution under different license terms, including proprietary and commercial licenses, without further permission from or compensation to the Contributor.
|
||||
|
||||
## 2. Grant of Patent License
|
||||
|
||||
You hereby grant to the Project Maintainer a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Contribution, where such license applies only to those patent claims licensable by You that are necessarily infringed by Your Contribution alone or by combination of Your Contribution with the Project to which such Contribution was submitted.
|
||||
|
||||
If any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that Your Contribution or the Project constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Project terminate as of the date such litigation is filed.
|
||||
|
||||
## 3. Ownership
|
||||
|
||||
You represent that You are the original author of the Contribution and that You are legally entitled to grant the above licenses. You represent that Your Contribution does not include any third-party code, assets, or other material unless such material is clearly identified and licensed under terms compatible with this Agreement.
|
||||
|
||||
You retain all right, title, and interest in and to Your Contributions. This Agreement does not transfer copyright ownership. Apart from the licenses granted herein, You reserve all rights in Your Contributions.
|
||||
|
||||
## 4. Representations
|
||||
|
||||
You represent that:
|
||||
|
||||
(a) Each Contribution is Your original creation.
|
||||
|
||||
(b) You have the legal authority to enter into this Agreement and grant the licenses described herein. If Your employer has rights to intellectual property that You create, You represent that You have received permission to make Contributions on behalf of that employer, that Your employer has waived such rights for Your Contributions to the Project, or that Your employer has executed a separate agreement with the Project Maintainer.
|
||||
|
||||
(c) Your Contribution does not knowingly violate any third party's intellectual property rights.
|
||||
|
||||
## 5. No Obligation
|
||||
|
||||
You understand that the decision to include Your Contribution in the Project is entirely at the discretion of the Project Maintainer. The Project Maintainer is under no obligation to use, merge, or distribute any Contribution.
|
||||
|
||||
## 6. No Compensation
|
||||
|
||||
You acknowledge that contributions to the Project are made voluntarily and without expectation of compensation, equity, revenue share, or any other financial consideration. Recognition is provided as described in [CONTRIBUTING.md](CONTRIBUTING.md).
|
||||
|
||||
## 7. Applicability
|
||||
|
||||
This Agreement applies to all Contributions submitted to the Project, whether those Contributions consist of source code (licensed under AGPLv3), assets (licensed under CC-BY-NC-SA 4.0), or any other form of creative work.
|
||||
|
||||
## 8. How to Sign
|
||||
|
||||
This Agreement is accepted by posting the following statement as a comment on a pull request to the Project:
|
||||
|
||||
> **I have read the CLA and I agree**
|
||||
|
||||
By posting this statement, You acknowledge that You have read and understood this Agreement and that You agree to be bound by its terms for all current and future Contributions to the Project.
|
||||
|
||||
Signatures are recorded automatically by the Project's CLA enforcement bot and stored in the repository at [`.github/cla-signatures.json`](.github/cla-signatures.json).
|
||||
167
CONTRIBUTING.md
Normal file
167
CONTRIBUTING.md
Normal file
|
|
@ -0,0 +1,167 @@
|
|||
# Contributing to Synvael
|
||||
|
||||
Thank you for your interest in contributing to Synvael. This document explains how contributions work, what is expected, and what contributors receive in return.
|
||||
|
||||
## Philosophy
|
||||
|
||||
Synvael is **open-source and commercially developed**. The engine source code is licensed under AGPLv3, official game assets under CC-BY-NC-SA 4.0 (see [LICENSE.md](LICENSE.md) for full terms), and the project is built by Cryoforge Nexus, a commercial entity that intends to monetize the finished game.
|
||||
|
||||
Outside contributions are welcome and credited, but they do not carry equity or revenue share. If that trade does not work for you, please do not contribute. The project would rather be upfront about these terms than have anyone feel misled later.
|
||||
|
||||
## Contributor Tiers
|
||||
|
||||
### Core team
|
||||
|
||||
The core team makes architectural and roadmap decisions and is eligible for an ownership stake in Cryoforge Nexus, subject to the company's internal agreements.
|
||||
|
||||
Membership is not open by default, but there is a path in. A contributor becomes **eligible for consideration** when all of the following are met:
|
||||
|
||||
1. **Sustained contribution.** At least six months of active, merged contributions. Consistency and quality matter more than volume.
|
||||
2. **Architectural ownership.** The contributor has taken responsibility for at least one subsystem (meshing, networking, worldgen, a major Lua API surface, etc.) and has demonstrated the ability to make sound design decisions within it, not just implement assigned tasks.
|
||||
3. **Community trust.** A track record of constructive code reviews, issue discussions, and collaboration. No pattern of conflict or disregard for project norms.
|
||||
|
||||
When these criteria are met, an existing core member may **nominate** the contributor. Admission requires a **supermajority vote** (two-thirds or more) of current core members. The nominee may decline.
|
||||
|
||||
Meeting the criteria makes someone eligible for consideration, not entitled to membership. The final decision remains a human judgement about long-term fit with the team.
|
||||
|
||||
### Outside contributors
|
||||
|
||||
Anyone who submits a pull request, asset, bug report, translation, or documentation change. Outside contributors receive public credit, authorship on their work under the project's open-source licenses, code review, mentorship where useful, and a voice in technical discussion. They do not receive equity, revenue share, or a guarantee of future paid work.
|
||||
|
||||
## Contributor License Agreement (CLA)
|
||||
|
||||
Every contribution, code and assets alike, requires signing a [Contributor License Agreement](CLA.md) before a pull request can be merged. The CLA does **not** transfer copyright, contributors retain it. It grants Cryoforge Nexus a perpetual, irrevocable license to use, modify, sublicense, and relicense the contribution, including under commercial terms.
|
||||
|
||||
This is necessary because the public licenses (AGPLv3 + CC-BY-NC-SA 4.0) would otherwise prevent the planned monetization model. Without the CLA, contributed assets in particular would lock the project out of any commercial release.
|
||||
|
||||
### How to sign
|
||||
|
||||
When a pull request is opened, an automated check verifies whether all commit authors have signed the CLA. If not, it posts a comment with instructions. To sign, leave a comment on the pull request containing:
|
||||
|
||||
```
|
||||
I have read the CLA and I agree
|
||||
```
|
||||
|
||||
The bot records the signature and updates the check status automatically. Signing is a one-time action; once recorded, all future pull requests from the same GitHub account are accepted without re-signing.
|
||||
|
||||
## What is accepted
|
||||
|
||||
- **Code** in Rust (for engine crates) or Lua (for `assets/scripts/` and `mods/`), licensed under AGPLv3.
|
||||
- **Original assets** authored by the contributor: textures, models, sounds, icons, shaders. Licensed under CC-BY-NC-SA 4.0.
|
||||
- **Translations, documentation, bug reports, and design feedback.**
|
||||
|
||||
## What is not accepted
|
||||
|
||||
- **Assets derived from copyrighted third-party material** (other games, films, copyrighted art). All submitted assets must be original work.
|
||||
- **AI-generated assets.** Textures, models, sounds, icons, and other non-code assets must be original human-authored work. See [AI-Assisted Contributions](#ai-assisted-contributions) below.
|
||||
- **Contributions without a signed CLA.** The bot enforces this; unsigned pull requests cannot be merged.
|
||||
- **Native (Rust) mods submitted as pull requests.** Native mods that link against engine internals are derivative works under AGPLv3 and belong in their own repositories. Lua mods are welcome in `mods/`.
|
||||
|
||||
## Development Setup
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- [Rust](https://www.rust-lang.org/tools/install) (stable toolchain, edition 2024)
|
||||
- [Git LFS](https://git-lfs.com/) (binary assets are tracked via LFS)
|
||||
- A Vulkan-capable GPU with up-to-date drivers (Linux or Windows)
|
||||
|
||||
### Building
|
||||
|
||||
```bash
|
||||
git clone https://github.com/Cryoforge-Nexus/Synvael.git
|
||||
cd Synvael
|
||||
git lfs pull
|
||||
cargo build
|
||||
```
|
||||
|
||||
### Running
|
||||
|
||||
```bash
|
||||
cargo run -p client # windowed client
|
||||
cargo run -p server # dedicated server
|
||||
```
|
||||
|
||||
### Testing
|
||||
|
||||
```bash
|
||||
cargo test # all tests
|
||||
cargo test -p shared # tests for a single crate
|
||||
```
|
||||
|
||||
### Linting
|
||||
|
||||
The CI pipeline enforces strict linting. Run these locally before pushing:
|
||||
|
||||
```bash
|
||||
cargo fmt --all -- --check
|
||||
cargo clippy --all-targets --all-features -- -D warnings
|
||||
selene .
|
||||
stylua .
|
||||
```
|
||||
|
||||
Lua linting requires [Selene](https://kampfkarren.github.io/selene/) and [StyLua](https://github.com/JohnnyMorganz/StyLua). Install them via `cargo install selene` and `cargo install stylua`, or use the pre-built binaries from their release pages.
|
||||
|
||||
## Coding Standards
|
||||
|
||||
All conventions, commit format, documentation style, naming, architecture boundaries and lint rules are documented in [AGENTS.md](AGENTS.md). That file is the single source of truth; this section highlights the most relevant points for contributors.
|
||||
|
||||
### Commit format
|
||||
|
||||
[Conventional Commits](https://www.conventionalcommits.org/) with a mandatory crate-name scope:
|
||||
|
||||
```
|
||||
<type>(<crate>): <imperative subject>
|
||||
```
|
||||
|
||||
Types: `feat`, `fix`, `refactor`, `perf`, `docs`, `test`, `chore`, `build`, `ci`. Scope is the primary crate affected (`client`, `server`, `renderer`, `shared`, `scripting`) or `workspace` / `assets` for cross-cutting changes.
|
||||
|
||||
Examples:
|
||||
|
||||
```
|
||||
feat(scripting): expose blocks.register to lua
|
||||
fix(renderer): clamp swapchain extent to surface caps
|
||||
docs(assets): document texture-pack overlay layout
|
||||
```
|
||||
|
||||
### Documentation
|
||||
|
||||
- Formal, objective tone. No first-person or second-person pronouns.
|
||||
- Every public struct field requires a `///` doc comment.
|
||||
- Inline comments (`//`) above non-obvious logic.
|
||||
|
||||
### Architecture boundaries
|
||||
|
||||
- Protocol/data types → `shared`
|
||||
- Lua API and `mlua` integration → `scripting`
|
||||
- GPU/draw code → `renderer`
|
||||
- Input, windowing, presentation → `client`
|
||||
- Simulation, authoritative logic → `server`
|
||||
|
||||
Do not place simulation logic in `client`. See [AGENTS.md](AGENTS.md) for the full rationale.
|
||||
|
||||
## Pull Request Process
|
||||
|
||||
1. **Branch from `dev`.** The `main` branch is reserved for stable releases. All development happens on `dev`. For any feature of non-trivial scope, create a feature branch off `dev` (e.g., `feat/new-worldgen`).
|
||||
2. **One concept per pull request.** Keep changes focused. If a pull request touches multiple unrelated systems, split it.
|
||||
3. **Ensure CI passes.** The pipeline runs `cargo fmt`, `cargo clippy`, `selene`, and `stylua`. Pull requests with lint failures are not reviewed.
|
||||
4. **Sign the CLA.** The CLA bot must report a passing status before review begins.
|
||||
5. **Describe the change.** Explain what the pull request does, why it is needed, and any design decisions made. Link to relevant issues if applicable.
|
||||
6. **Respond to review feedback.** Maintainers may request changes. Please address them or discuss alternatives.
|
||||
|
||||
## Recognition
|
||||
|
||||
Every merged contribution earns an entry in `CREDITS.md`. Substantial or sustained contributions are highlighted on the project website. Standout contributors may, once the project has revenue, be offered paid bounties for specific scoped work, this is a transactional arrangement, not equity or an ongoing revenue share.
|
||||
|
||||
This is the honest ceiling of what outside contribution earns. If the goal is co-ownership of a game studio, this project is not the right fit.
|
||||
|
||||
## AI-Assisted Contributions
|
||||
|
||||
AI tools (code completion, generation, refactoring assistants) may be used as aids when writing code. The following rules apply:
|
||||
|
||||
- **AI-assisted code is accepted, with conditions.** The contributor must have genuinely reviewed every line of the submitted code and be able to explain what it does and why. Contributions where the author cannot answer questions about their own code during review will be rejected. The contributor, not the AI tool, is the responsible author.
|
||||
- **AI-generated assets are not accepted.** Textures, models, sounds, icons, and other non-code assets must be original human-authored work. This applies regardless of the AI tool or its training-data provenance.
|
||||
- **Disclosure is required.** If AI tools were used in a material way during the creation of a code contribution, this must be stated in the pull request description. A brief note (e.g., "AI-assisted: used Copilot for boilerplate generation") is sufficient.
|
||||
|
||||
## Questions?
|
||||
|
||||
Open an issue or start a discussion on the repository. Maintainers are happy to help with setup, answer questions about the architecture, or discuss proposed changes before work begins.
|
||||
Loading…
Reference in a new issue