2025-03-05 15:21:35 -06:00
# Contribution
2026-01-14 11:37:21 -08:00
We would love feedback on our [Roadmap ](https://github.com/orgs/katanemo/projects/1 ) and we welcome contributions to **Plano** !
2024-10-09 10:12:36 -07:00
Whether you're fixing bugs, adding new features, improving documentation, or creating tutorials, your help is much appreciated.
## How to Contribute
### 1. Fork the Repository
2026-01-14 11:37:21 -08:00
Fork the repository to create your own version of **Plano** :
2024-10-09 10:12:36 -07:00
2026-01-14 11:37:21 -08:00
- Navigate to the [Plano GitHub repository ](https://github.com/katanemo/plano ).
2024-10-09 10:12:36 -07:00
- Click the "Fork" button in the upper right corner.
- This will create a copy of the repository under your GitHub account.
### 2. Clone Your Fork
2026-01-14 11:37:21 -08:00
Once you've forked the repository, clone it to your local machine (replace `<your-username>` with your GitHub username):
2024-10-09 10:12:36 -07:00
```bash
2026-02-01 09:55:56 -08:00
git clone git@github .com:< your-username > /plano.git
cd plano
2024-10-09 10:12:36 -07:00
```
2026-01-14 11:37:21 -08:00
### 3. Add Upstream Remote
Add the original repository as an upstream remote so you can keep your fork in sync:
```bash
2026-02-01 09:55:56 -08:00
git remote add upstream git@github .com:katanemo/plano.git
2026-01-14 11:37:21 -08:00
```
To sync your fork with the latest changes from the main repository:
```bash
2026-02-01 09:55:56 -08:00
git fetch upstream
git checkout main
git merge upstream/main
2026-01-14 11:37:21 -08:00
```
### 4. Install Prerequisites
**Install uv** (Python package manager for the planoai CLI):
```bash
2026-02-01 09:55:56 -08:00
curl -LsSf https://astral.sh/uv/install.sh | sh
2026-01-14 11:37:21 -08:00
```
**Install pre-commit hooks:**
Pre-commit hooks help maintain code quality by running automated checks before each commit. Install them with:
```bash
2026-02-01 09:55:56 -08:00
pip install pre-commit
pre-commit install
2026-01-14 11:37:21 -08:00
```
The pre-commit hooks will automatically run:
- YAML validation
- Code formatting checks (Rust with `cargo fmt` , Python with `black` )
- Linting checks (Rust with `cargo clippy` )
- Rust unit tests
### 5. Setup the planoai CLI
The planoai CLI is used to build, run, and manage Plano locally:
```bash
2026-02-01 09:55:56 -08:00
cd cli
uv sync
2026-01-14 11:37:21 -08:00
```
This creates a virtual environment in `.venv` and installs all dependencies.
Now you can use `planoai` commands from anywhere, or use `uv run planoai` from the `cli` directory.
### 6. Create a Branch
2025-03-05 15:21:35 -06:00
2024-10-09 10:12:36 -07:00
Use a descriptive name for your branch (e.g., fix-bug-123, add-feature-x).
2025-03-05 15:21:35 -06:00
2024-10-09 10:12:36 -07:00
```bash
2026-02-01 09:55:56 -08:00
git checkout -b < your-branch-name >
2024-10-09 10:12:36 -07:00
```
2026-01-14 11:37:21 -08:00
### 7. Make Your Changes
2024-10-09 10:12:36 -07:00
Make your changes in the relevant files. If you're adding new features or fixing bugs, please include tests where applicable.
2026-01-14 11:37:21 -08:00
### 8. Test Your Changes Locally
**Run Rust tests:**
```bash
2026-02-01 09:55:56 -08:00
cd crates
cargo test
2026-01-14 11:37:21 -08:00
```
For library tests only:
```bash
2026-02-01 09:55:56 -08:00
cargo test --lib
2026-01-14 11:37:21 -08:00
```
**Run Python CLI tests:**
2025-03-05 15:21:35 -06:00
2024-10-09 10:12:36 -07:00
```bash
2026-02-01 09:55:56 -08:00
cd cli
uv run pytest
2024-10-09 10:12:36 -07:00
```
2026-01-14 11:37:21 -08:00
Or with verbose output:
```bash
2026-02-01 09:55:56 -08:00
uv run pytest -v
2026-01-14 11:37:21 -08:00
```
**Run pre-commit checks manually:**
Before committing, you can run all pre-commit checks manually:
```bash
2026-02-01 09:55:56 -08:00
pre-commit run --all-files
2026-01-14 11:37:21 -08:00
```
2026-02-01 09:55:56 -08:00
### 9. Push changes, and create a Pull request
2024-10-09 10:12:36 -07:00
2026-01-14 11:37:21 -08:00
Go back to the original Plano repository, and you should see a "Compare & pull request" button. Click that to submit a Pull Request (PR). In your PR description, clearly explain the changes you made and why they are necessary.
2024-10-09 10:12:36 -07:00
We will review your pull request and provide feedback. Once approved, your contribution will be merged into the main repository!
2026-01-14 11:37:21 -08:00
## Contribution Guidelines
2024-10-09 10:12:36 -07:00
2026-01-14 11:37:21 -08:00
- Ensure that all existing tests pass.
- Write clear commit messages.
- Add tests for any new functionality.
- Follow the existing coding style (enforced by pre-commit hooks).
- Update documentation as needed.
- Pre-commit hooks must pass before committing.
2024-10-09 10:12:36 -07:00
2025-03-05 15:21:35 -06:00
To get in touch with us, please join our [discord server ](https://discord.gg/pGZf2gcwEc ). We will be monitoring that actively and offering support there.