[AIR-3][AIS-3][BPC-3][RES-3]
Contributing Guide [AIR-1][AIT-2]¶
Overview¶
Add a brief overview of this document here.
Table of Contents¶
This document provides guidelines for contributing to the Anya Core project. Please read these guidelines before submitting any contributions.
Code of Conduct¶
All contributors are expected to adhere to our Code of Conduct. Please read it before participating.
Getting Started¶
- Fork the repository
- Clone your fork:
git clone https://github.com/anya-org/anya-core.git - Create a new branch:
git checkout -b feature/your-feature-name - Set up your development environment following the Development Setup guide
Development Workflow¶
Branch Naming Convention¶
feature/- for new featuresfix/- for bug fixesdocs/- for documentation changesrefactor/- for code refactoringtest/- for adding or modifying tests
Commit Message Guidelines¶
Follow these guidelines for commit messages:
- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters or less
- Reference issues and pull requests liberally after the first line
- Consider starting the commit message with an applicable emoji:
- โจ
:sparkles:when adding a new feature - ๐
:bug:when fixing a bug - ๐
:books:when adding or updating documentation - โป๏ธ
:recycle:when refactoring code - ๐งช
:test_tube:when adding tests
Pull Request Process¶
- Update the README.md or documentation with details of changes if applicable
- Update the CHANGELOG.md with details of changes
- The PR should work for all supported platforms
- Ensure all tests pass
- Get approval from at least one maintainer
Coding Standards [AIT-2]¶
Rust Code Style¶
- Follow the Rust API Guidelines
- Use
rustfmtto format your code - Use
clippyto catch common mistakes - Document all public items with rustdoc comments
- Keep functions small and focused
- Write comprehensive tests for all new functionality
AI Labelling [AIR-1]¶
All new code must include appropriate AI labelling tags as defined in the AI Labelling Reference Guide. For example:
/// Redis-based cache implementation
/// \[AIR-2\]\[AIP-3\]\[RES-2\]
pub struct RedisCache {
// Implementation
}
Testing Requirements [AIT-2]¶
- Write unit tests for all new functionality
- Ensure test coverage remains high
- Include integration tests for complex features
- For Bitcoin-related functionality, include testnet validation
Documentation¶
Code Documentation¶
- Document all public functions, structs, and traits
- Include examples in documentation where appropriate
- Keep documentation up-to-date with code changes
Project Documentation¶
- Update relevant Markdown files when making significant changes
- Follow the AI labelling guidelines for all documentation
- Keep diagrams and architecture documents current
Bitcoin Improvement Proposals (BIPs) Compliance [AIR-1]¶
Contributions that touch Bitcoin-related functionality must comply with official Bitcoin Improvement Proposals (BIPs):
- Ensure protocol adherence to Bitcoin's core tenets
- Follow privacy-preserving architecture principles
- Adhere to asset management standards
- Implement proper security validation
- Follow hexagonal architecture patterns
Submitting Issues¶
Bug Reports¶
When submitting a bug report, please include:
- A clear, descriptive title
- Steps to reproduce the issue
- Expected behavior
- Actual behavior
- Screenshots or code examples if applicable
- Environment information (OS, Rust version, etc.)
Feature Requests¶
When submitting a feature request, please include:
- A clear, descriptive title
- A detailed description of the proposed feature
- Rationale for why this feature is needed
- Any relevant examples or mockups
Review Process¶
All contributions go through a review process:
- Automated checks (CI/CD pipeline)
- Code review by maintainers
- Security review for sensitive areas
- Final approval and merge
Getting Help¶
If you need help, you can:
- Open a discussion on GitHub
- Reach out on our Discord channel
- Contact the maintainers directly
License¶
By contributing to Anya Core, you agree that your contributions will be licensed under the project's license.
Last Updated¶
2025-03-12