Thank you for your interest in Meta-Spec! We welcome contributions of all kinds.
- Check Issues to ensure the issue hasn't been reported
- Create a new Issue, including:
- Problem description
- Steps to reproduce
- Expected behavior vs actual behavior
- Environment information (Python version, OS, etc.)
- Related logs and screenshots
- Start a discussion in Discussions
- If approved, create a Feature Request Issue
- Describe clearly:
- Use case
- Suggested implementation
- Impact on existing features
- Fork the project
- Create a feature branch:
git checkout -b feature/your-feature - Write code and tests
- Commit:
git commit -m "feat: add your feature" - Push:
git push origin feature/your-feature - Create a Pull Request
- Python 3.11+
- Git
- uv (recommended) or pip
# 1. Fork and clone
git clone https://github.com/your-username/meta-spec.git
cd meta-spec
# 2. Install dependencies with uv (recommended)
uv venv
uv pip install -e ".[dev]"
# Or with pip
# pip install -e ".[dev]"
# 3. Verify installation
metaspec --help
# 4. Run tests
uv run pytest
# 5. Check code quality
uv run ruff check .
uv run mypy src/metaspec# Run all checks
uv run pytest # Tests
uv run ruff check . # Linting
uv run mypy src/metaspec # Type checking
# Format code
uv run black . # Code formatting
uv run ruff check --fix . # Auto-fix linting issues# Format code
uv run black .
# Lint code
uv run ruff check .
# Fix linting issues automatically
uv run ruff check --fix .# Sync templates from upstream
python scripts/sync-openspec-templates.py
python scripts/sync-spec-kit-templates.py- Use type annotations for all functions and methods
- Run mypy for type checking
# Check types
uv run mypy src/metaspec
# Check specific module
uv run mypy src/metaspec/models.pydef function_name(param: str) -> int:
"""
Brief description (one line)
Detailed description (optional, multiple lines)
Args:
param: Parameter description
Returns:
Return value description
Raises:
Exception description (if any)
Example:
>>> function_name("test")
42
"""
pass- New features must include tests
- Bug fixes should include regression tests
- Test coverage target: 70% overall
- Core modules (models, generator, registry): ≥ 90%
- CLI modules: ≥ 20% (focus on integration tests)
# Run all tests
pytest
# Run specific tests
pytest tests/test_parser.py
# View coverage report
pytest --cov=metaspec --cov-report=html
# Open htmlcov/index.html in browser
# Run with verbose output
pytest -v
# Run specific test file
pytest tests/unit/test_models.py -vtests/
├── unit/ # Unit tests
├── integration/ # Integration tests
└── fixtures/ # Test fixtures
- Code Documentation: Function and class docstrings
- User Documentation: Markdown in
docs/directory - Examples:
examples/directory
- Clear and concise
- Include examples
- Keep up to date
feature/xxx- New featuresfix/xxx- Bug fixesdocs/xxx- Documentation updatesrefactor/xxx- Refactoringtest/xxx- Test-related
Follow Conventional Commits:
<type>(<scope>): <subject>
<body>
<footer>
Types:
feat: New featurefix: Bug fixdocs: Documentationstyle: Formattingrefactor: Refactoringtest: Testingchore: Build/tools
Example:
feat(parser): add YAML validation
- Implement JSON Schema validation
- Add error reporting
- Update tests
Closes #123
- Code follows style guidelines
- Added necessary tests
- All tests pass
- Updated relevant documentation
- Commit messages follow conventions
- Resolved all review comments
## Description
Brief description of what this PR does
## Type
- [ ] Bug fix
- [ ] New feature
- [ ] Refactoring
- [ ] Documentation
## Testing
Describe how to test these changes
## Screenshots (if applicable)
## Related Issues
Closes #123We follow the Contributor Covenant:
- Respect and inclusivity
- Constructive feedback
- Focus on project goals
- GitHub Issues: Report problems
- GitHub Discussions: Discussions and questions
- Email: meta-spec@example.com
Thanks to all contributors! Your name will appear in CONTRIBUTORS.md
Thank you for your contribution! ❤️