# Contributing to MON

Thanks for being here! MON is a community project, and we're excited to have you contribute.

## Quick Start

1. **Fork the repo** (once we're on GitHub)
2. **Create a branch**: `git checkout -b fix/your-awesome-feature`
3. **Write code** (follow the style guide below)
4. **Run tests**: `cargo test`
5. **Submit a PR**

That's it. No corporate bureaucracy, no gatekeeping.

---

## About the CLA (Don't Panic)

### Why It Exists

MON is **dual-licensed**:

- **AGPL** for the FOSS community (always free and open)
- **Commercial licenses** for companies that can't use AGPL

All external contributions must agree to our [Contributor License Agreement (CLA)](contributor-license-agreement.md). This is a simple process—just comment on your first PR:

```
I have read and agree to the CLA
```

The CLA lets us do both **without** locking contributors out or selling your code. It's the same model used by Rust, Apache, and other major FOSS projects.

**You retain full ownership of your contributions.**

### What It Actually Means

✅ **You keep ownership** of your code  
✅ **Your code stays AGPL** for everyone  
✅ **No copyright assignment**—you can use your code however you want  
✅ **We can offer commercial licenses** to companies (sustainable FOSS!)  
✅ **Protects against SaaS hijacking** (that's the whole point of AGPL)

**TL;DR:** You're licensing your contribution under AGPL, and we can also sublicense it commercially. You don't lose any rights.

### How to Sign (30 Seconds)

When you open your first PR:

1. A bot will comment with a link
2. Click it or reply: `I have read and agree to the CLA`
3. Done.

**Read the full CLA here:** [`CLA.md`](./CLA.md) (2 pages, plain language, no legalese I promise)

### FAQ

**"Isn't this just a corporate cash grab?"**  
No. The FOSS version is always free. Commercial licenses are for companies that **can't** use AGPL (e.g., proprietary integrations). It funds development without paywalling features.

**"What if I don't want to sign?"**  
That's fine! You can still report bugs, discuss features, and use the software. The CLA only applies if you're contributing code/docs.

**"I'm under 18, can I contribute?"**  
Yes! The CLA is valid, but double-check with a parent/guardian if you're unsure about legal stuff.

**"Will you sell my code?"**  
No. Your code is AGPL forever. We only license it commercially to companies that need proprietary use. Think of it like Red Hat or GitLab's model.

**Still skeptical?** Open an issue and we'll talk it through. We're not hiding anything.

---

## Code Style

- **Rust 2024 edition** (obviously)
- Run `cargo fmt` before committing
- Run `cargo clippy` and fix warnings
- Write tests for new features
- Document public APIs

## Reporting Bugs

Open an issue with:

- What you expected vs. what happened
- Steps to reproduce
- Your environment (OS, Rust version)

## Suggesting Features

We love new ideas! Just open an issue and describe:

- The problem it solves
- Your proposed solution
- Trade-offs or alternatives

## Code Review

1. Maintainers review your PR
2. You address feedback (if any)
3. PR gets merged
4. You get added to the contributors list 🎉

---

### Our Mission

We are not trying to be for-profit. MON exists to build a great CLI tool for Mycel Object Notation.

The CLA is here only to prevent bad actors or companies from exploiting our work.

If any revenue ever arises, it will be donated to support the Mycel Project and its contributors.

---

## Questions?

Open an issue or contact the maintainers.

**Let's build something cool.** :D

---

Made with ❤️
