We welcome contributions to the Universal AI Governor project! By contributing, you help us build a more secure and robust AI governance platform. Please take a moment to review this guide to ensure a smooth and effective contribution process.
This project adheres to a Code of Conduct. By participating, you are expected to uphold this Code. Please report unacceptable behavior to morningstar.xcd@gmail.com.
There are many ways to contribute, not just by writing code:
- Reporting Bugs: Identify and report issues to help us improve stability and reliability.
- Suggesting Enhancements: Propose new features or improvements to existing ones.
- Writing Documentation: Improve our guides, API references, and conceptual explanations.
- Writing Code: Implement new features, fix bugs, or improve performance.
- Reviewing Pull Requests: Provide constructive feedback on contributions from others.
Ensure you have the following installed:
- Rustup (for Rust toolchain management)
- Go (version 1.21 or higher)
- Docker Desktop (for containerization and local services)
- Homebrew (macOS) or your system's package manager (Linux) for system dependencies.
git clone https://github.com/morningstarxcdcode/universal-ai-governor.git
cd universal-ai-governorOur setup.sh script automates the installation of most development dependencies:
./scripts/setup.shThis script will:
- Install
rustfmtandclippycomponents for Rust. - Install system-level dependencies (e.g.,
tpm2-tss,json-c) via Homebrew on macOS orapt-geton Ubuntu. - Initialize Go modules and vendor dependencies.
To run the Governor in development mode with hot-reloading for Rust changes:
cargo watch -x 'run -- --config config/development.toml'We maintain high standards for code quality and consistency.
- Formatting: We use
rustfmt. Ensure your code is formatted correctly before committing:cargo fmt --all
- Linting: We use
clippywith strict warnings. Run clippy regularly to catch potential issues:cargo clippy --all-targets --all-features -- -D warnings
- Formatting: We use
gofmtandgoimports. These are typically run automatically by your IDE or can be run manually:go fmt ./... go run golang.org/x/tools/cmd/goimports@latest -w . - Linting: We use
golangci-lint. Install it and run before committing:go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest golangci-lint run
- Module Management: Keep
go.modandgo.sumclean:go mod tidy go mod vendor
All contributions should be accompanied by appropriate tests. We have unit, integration, and performance tests.
./scripts/test.shOr run them individually:
- Rust Tests:
cargo test --all-features --verbose - Go Tests:
go test -v ./...
- Unit Tests: Located alongside the code they test. Focus on individual functions/modules.
- Integration Tests: Located in the
tests/directory. Verify interactions between multiple components. - Benchmarks: Located in the
benches/directory (Rust) or_test.gofiles withBenchmarkprefix (Go). Ensure performance is maintained or improved.
- Fork the Repository: Start by forking the
universal-ai-governorrepository to your GitHub account. - Create a New Branch: Create a new branch for your feature or bug fix:
git checkout -b feature/your-feature-name
- Implement Your Changes: Write your code, tests, and update documentation as necessary.
- Ensure Code Quality: Run all formatting and linting checks (see Section 4).
- Run Tests: Ensure all tests pass (see Section 5).
- Commit Your Changes: Write clear, concise commit messages. Follow the Conventional Commits specification if possible.
- Push to Your Fork: Push your new branch to your forked repository.
- Create a Pull Request: Open a pull request against the
mainbranch of theuniversal-ai-governorrepository. Provide a detailed description of your changes and reference any relevant issues.
- Clarity and Precision: Ensure documentation is clear, accurate, and easy to understand.
- Examples: Provide code examples where appropriate.
- Updates: Update existing documentation when making code changes that affect functionality or architecture.
For any questions or further assistance, please open an issue on the GitHub repository or contact morningstar.xcd@gmail.com.