Thank you for your interest in contributing to the Org Agentic Toolkit (OAT)! This document provides guidelines and instructions for contributing.
- Code of Conduct
- Getting Started
- Development Setup
- Project Structure
- Development Workflow
- Testing
- Code Style
- Submitting Changes
- Documentation
- Adding New Features
Be respectful, inclusive, and constructive in all interactions. We welcome contributions from everyone.
-
Fork the repository on GitHub
-
Clone your fork:
git clone https://github.com/your-username/org_agentic_toolkit.git cd org_agentic_toolkit -
Set up the upstream remote:
git remote add upstream https://github.com/alain-sv/org_agentic_toolkit.git
- Python 3.12+
- uv - Fast Python package installer and resolver
- Git
-
Install dependencies:
just install # or manually: uv pip install -e ".[dev]"
-
Verify installation:
oat --version
The project uses a justfile for common tasks:
# Show all available commands
just
# Run tests
just test
# Run tests with coverage
just coverage
# Run validation on current repo
just validate
# Clean build artifacts
just clean
# Build package
just buildorg_agentic_toolkit/
├── oat/ # Main package
│ ├── __init__.py
│ ├── cli.py # CLI commands (Click)
│ ├── compiler.py # Compilation engine
│ ├── config.py # YAML configuration loading
│ ├── discovery.py # Root discovery logic
│ ├── template_manager.py # Template management
│ ├── validator.py # Validation logic
│ └── templates/ # Package data (templates)
│ ├── toolkit/
│ ├── skills/
│ ├── personas/
│ └── ...
├── tests/ # Test suite
│ ├── test_cli_init.py
│ ├── test_compiler.py
│ ├── test_config.py
│ ├── test_discovery.py
│ └── test_validator.py
├── pyproject.toml # Package configuration
├── justfile # Development commands
└── README.md
-
Create a branch from
main:git checkout -b feature/your-feature-name # or git checkout -b fix/your-bug-fix -
Make your changes following the Code Style guidelines
-
Run tests to ensure everything works:
just test -
Run validation to check the repo configuration:
just validate
-
Commit your changes with clear, descriptive messages:
git add . git commit -m "Add feature: description of what you did"
-
Push to your fork:
git push origin feature/your-feature-name
-
Create a Pull Request on GitHub
# Run all tests
just test
# Run with coverage
just coverage
# Run specific test file
uv run --extra dev pytest tests/test_compiler.py
# Run specific test
uv run --extra dev pytest tests/test_compiler.py::test_specific_function- Tests use pytest
- Test files should be named
test_*.py - Test functions should be named
test_* - Place tests in the
tests/directory - Follow the existing test structure and patterns
Aim for high test coverage, especially for:
- Core compilation logic (
compiler.py) - Configuration loading (
config.py) - Validation logic (
validator.py) - Discovery mechanisms (
discovery.py)
- Follow PEP 8 style guidelines
- Use type hints where appropriate
- Keep functions focused and small
- Add docstrings for public functions and classes
The project doesn't enforce a specific formatter, but please:
- Use consistent indentation (4 spaces)
- Keep lines under 100 characters when possible
- Use meaningful variable and function names
- Group imports: standard library, third-party, local
- Use absolute imports
- Sort imports alphabetically within groups
Example:
import json
import sys
from pathlib import Path
import click
import yaml
from oat.compiler import compile_document
from oat.config import load_inherits_yaml- Use specific exception types
- Provide clear error messages
- Handle errors at appropriate levels
- Add docstrings to public functions and classes
- Use clear, concise language
- Include parameter and return type information when using type hints
- Keep PRs focused: One feature or fix per PR
- Write clear descriptions: Explain what and why, not just how
- Reference issues: Link to related issues if applicable
- Update documentation: Update README or docs if needed
- Add tests: Include tests for new features or bug fixes
- Ensure tests pass: All tests must pass before merging
When creating a PR, include:
- Description: What does this PR do?
- Type: Feature, Bug Fix, Documentation, Refactoring
- Testing: How was this tested?
- Breaking Changes: Are there any breaking changes?
Write clear, descriptive commit messages:
Add feature: support for custom target output paths
- Add --output-path option to compile command
- Update documentation
- Add tests for new functionality
- Add docstrings to all public functions and classes
- Document complex logic with inline comments
- Keep comments up-to-date with code changes
- Update
README.mdfor user-facing changes - Add examples for new features
- Update CLI help text if adding new commands
- Document design decisions in code comments
- Update this CONTRIBUTING.md if processes change
- Check existing issues: See if someone else is working on it
- Open an issue: Discuss the feature before implementing
- Get feedback: Ensure the feature aligns with project goals
- Design: Plan the feature and its integration points
- Implement: Write code following project standards
- Test: Add comprehensive tests
- Document: Update relevant documentation
- Validate: Run
oat validateto ensure configuration is valid
- Add command to
oat/cli.pyusing Click decorators - Implement the command logic
- Add tests in
tests/test_cli_*.py - Update
README.mdwith command documentation - Update help text and examples
- Add template files to
oat/templates/ - Update
template_manager.pyif needed - Test template loading and compilation
- Document template usage
- Create markdown files in appropriate
oat/templates/subdirectories - Follow existing template structure
- Test compilation with new skills/personas
- Update documentation if needed
- Open an issue for bugs or feature requests
- Check existing issues and discussions
- Review the README for usage examples
By contributing, you agree that your contributions will be licensed under the MIT License.