Contributing to Promptise Foundry
April 23, 2026 ยท View on GitHub
Thank you for your interest in contributing to Promptise Foundry! This document provides guidelines and instructions for contributing.
๐ Quick Start
- Fork and clone the repository
git clone https://github.com/promptise-com/foundry.git
cd promptise
- Create a virtual environment
python3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
- Install development dependencies
pip install -e ".[dev,docs]"
- Create a feature branch
git checkout -b feature/your-feature-name
๐งช Testing
Run all tests
pytest tests/ -v
Run tests with coverage
pytest tests/ -v --cov=src/promptise --cov-report=term-missing
Run specific test files
# Test SuperAgent features
pytest tests/test_env_resolver.py -v
pytest tests/test_superagent_schema.py -v
pytest tests/test_superagent_loader.py -v
Test CLI commands manually
# Generate a test config
promptise init -o test.superagent -t basic
# Validate it
promptise validate test.superagent --no-check-env
# Clean up
rm test.superagent
๐ Code Quality
Linting
# Check code style
ruff check .
# Auto-fix issues
ruff check . --fix
# Check formatting
ruff format --check .
# Apply formatting
ruff format .
Type Checking
# Type-check the source code
mypy src
# Type-check with strict mode (for new modules)
mypy --strict src/promptise/your_new_module.py
Run all quality checks
# Lint
ruff check .
ruff format --check .
# Type-check
mypy src
# Test
pytest tests/ -v --cov=src/promptise
๐ Documentation
Build documentation locally
# Install docs dependencies
pip install -e ".[docs]"
# Serve docs locally (live reload)
mkdocs serve
# Build static docs
mkdocs build --strict
Visit http://127.0.0.1:8000 to view the documentation.
Documentation structure
docs/- Documentation source files (Markdown)docs/images/- Images and diagramsmkdocs.yml- MkDocs configuration
Writing documentation
- Use clear, concise language
- Include code examples
- Add diagrams where helpful (Mermaid supported)
- Follow existing style and structure
๐ฏ Contribution Guidelines
Code Style
- Follow PEP 8 style guide
- Use type hints for all functions
- Write docstrings for all public APIs
- Keep functions focused and small
- Use meaningful variable names
Commit Messages
Use conventional commits format:
type(scope): description
[optional body]
[optional footer]
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringtest: Adding or updating testschore: Build process, dependencies, etc.
Examples:
feat(superagent): add template generator command
fix(env-resolver): handle empty default values correctly
docs(readme): update installation instructions
test(loader): add tests for circular reference detection
Pull Request Process
-
Before submitting:
- Run all tests:
pytest tests/ -v - Run linting:
ruff check . - Run type checking:
mypy src - Update documentation if needed
- Add tests for new features
- Run all tests:
-
Submit PR:
- Use a clear, descriptive title
- Reference related issues (e.g., "Fixes #123")
- Describe what changed and why
- Include screenshots for UI changes
- Add examples for new features
-
After submission:
- Watch for CI/CD pipeline results
- Address review feedback promptly
- Keep PR focused and small when possible
What to Contribute
Good first issues:
- Documentation improvements
- Bug fixes
- Test coverage improvements
- Example configurations
- Error message improvements
Feature contributions:
- New CLI commands
- Additional SuperAgent templates
- Server type implementations
- Cross-agent patterns
- Tool integrations
Before starting large features:
- Open an issue to discuss the approach
- Get feedback from maintainers
- Break work into smaller PRs when possible
๐ Reporting Bugs
When reporting bugs, please include:
-
Environment:
- OS and version
- Python version
- Foundry version
- Relevant dependencies
-
Steps to reproduce:
- Minimal code example
- Configuration files (with secrets removed)
- Command-line invocation
-
Expected vs actual behavior:
- What should happen
- What actually happens
- Error messages or stack traces
-
Additional context:
- Screenshots if applicable
- Related issues or PRs
๐ก Suggesting Features
When suggesting features, please include:
-
Problem statement:
- What problem does this solve?
- Who benefits from this feature?
-
Proposed solution:
- How should it work?
- API design or user interface
- Example usage
-
Alternatives considered:
- Other approaches
- Trade-offs
-
Additional context:
- Related features
- Similar implementations elsewhere
๐ฆ Project Structure
promptise/
โโโ .github/
โ โโโ workflows/ # CI/CD pipelines
โโโ docs/ # Documentation
โโโ examples/
โ โโโ agents/ # Example .superagent files
โ โโโ servers/ # Example MCP servers
โโโ src/promptise/
โ โโโ agent.py # Agent builder
โ โโโ cli.py # CLI commands
โ โโโ clients.py # MCP client wrapper
โ โโโ config.py # Server specs
โ โโโ cross_agent.py # Cross-agent communication
โ โโโ env_resolver.py # Environment variable resolution
โ โโโ exceptions.py # Custom exceptions
โ โโโ prompt.py # System prompts
โ โโโ superagent.py # SuperAgent file loader
โ โโโ superagent_schema.py # Pydantic schemas
โ โโโ tools.py # Tool loader
โโโ tests/ # Test suite
โโโ pyproject.toml # Project configuration
โโโ README.md
๐ง Development Tips
Running from source
# Install in editable mode
pip install -e ".[dev]"
# Now changes are reflected immediately
promptise --version
Debugging tests
# Run with verbose output
pytest tests/ -vv
# Run specific test
pytest tests/test_superagent_loader.py::test_load_valid_file -vv
# Drop into debugger on failure
pytest tests/ -vv --pdb
Debugging CLI
# Add print statements or use debugger
python -m pdb -m promptise.cli agent test.superagent
๐ Getting Help
- Questions: Open a GitHub Discussion
- Bug reports: Open a GitHub Issue
- Feature requests: Open a GitHub Issue
- Security issues: See SECURITY.md
๐ License
By contributing, you agree that your contributions will be licensed under the Apache License 2.0.
๐ Thank You!
Every contribution, no matter how small, is appreciated and helps make Promptise Foundry better for everyone!