Contributing to AIRS
A comprehensive guide to contributing to the AI-Rust Integration System ecosystem
Welcome Contributors!
AIRS thrives on community contributions, whether you're fixing a bug, adding a feature, improving documentation, or sharing insights from your AI-Rust integration journey. This guide will help you contribute effectively and align with our development philosophy.
Before You Begin
Understanding AIRS Philosophy
AIRS is built on these core principles:
๐ฏ Pragmatic Excellence: Balance engineering craft with delivery needs
๐ค AI-Human Synergy: Systematic collaboration between AI and human intelligence
๐ Knowledge Persistence: Capture and share learning through memory bank architecture
๐ง Production Quality: Real-world applicability over academic perfection
๐ฑ Incremental Growth: Build understanding and capability systematically
Development Methodology
We use a 6-phase specification-driven workflow:
- ANALYZE: Understand requirements and assess confidence
- DESIGN: Create comprehensive technical design and implementation plan
- IMPLEMENT: Write production-quality code following the design
- VALIDATE: Verify implementation meets requirements and quality standards
- REFLECT: Improve codebase and update documentation
- HANDOFF: Package work for review and transition to next task
Memory Bank Integration: All work is documented and captured in our memory bank structure for future reference and learning.
Types of Contributions
๐ Bug Reports and Fixes
Reporting Bugs:
- Use clear, descriptive titles
- Include steps to reproduce
- Provide environment details (Rust version, OS, etc.)
- Include relevant logs or error messages
- Reference related documentation if applicable
Bug Fix Process:
- ANALYZE: Understand the bug and its impact
- DESIGN: Plan the fix approach and test strategy
- IMPLEMENT: Fix the issue with comprehensive tests
- VALIDATE: Verify fix resolves issue without side effects
- REFLECT: Update documentation and identify prevention measures
- HANDOFF: Submit PR with detailed description and validation evidence
โจ New Features
Feature Proposal Process:
- Create Issue: Describe the feature, use cases, and expected benefits
- Discussion: Engage with maintainers and community for feedback
- Design: Create detailed technical design following our patterns
- Implementation: Follow the 6-phase workflow for development
- Review: Submit PR with comprehensive documentation and tests
Feature Development Requirements:
- Memory Bank Documentation: Update relevant memory bank files
- Comprehensive Tests: Unit, integration, and performance tests as appropriate
- Documentation: Update all relevant documentation including examples
- Backwards Compatibility: Maintain API stability unless major version change
๐ Documentation Improvements
Documentation Contributions:
- Technical Accuracy: Ensure all examples are tested and current
- Clarity: Write for developers at various experience levels
- Completeness: Include real-world examples and common pitfalls
- Memory Bank Updates: Keep memory bank documentation current with changes
Documentation Types:
- API Documentation: Code comments and generated docs
- User Guides: Practical implementation guidance
- Examples: Working code examples with explanations
- Memory Bank: Project knowledge and learning capture
๐ฏ Performance Improvements
Performance Contribution Guidelines:
- Benchmarking: Include before/after performance measurements
- Analysis: Document the performance issue and solution approach
- Testing: Verify improvements don't introduce regressions
- Documentation: Update performance guidance and best practices
Development Setup
Environment Preparation
Required Tools:
# Rust toolchain (latest stable)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Additional tools
cargo install mdbook # Documentation
cargo install cargo-watch # Development workflow
cargo install cargo-nextest # Advanced testing
Repository Setup:
# Fork and clone the repository
git clone https://github.com/your-username/airs
cd airs
# Set up development environment
cargo build --workspace
cargo test --workspace
Project Structure Understanding
Workspace Layout:
airs/
โโโ .copilot/memory_bank/ # Project knowledge and context
โโโ crates/
โ โโโ airs-mcp/ # Model Context Protocol implementation
โ โโโ airs-memspec/ # Memory bank toolkit
โโโ docs/ # Root documentation
โโโ examples/ # Cross-project examples
Memory Bank Structure:
.copilot/memory_bank/
โโโ current_context.md # Active project context
โโโ workspace/ # Workspace-level documentation
โ โโโ project_brief.md
โ โโโ shared_patterns.md
โ โโโ workspace_architecture.md
โโโ sub_projects/ # Individual project documentation
โโโ airs/
โโโ active_context.md
โโโ progress.md
โโโ tasks/
Memory Bank Integration
Reading Project Context: Always start by reading the memory bank to understand current context:
- Workspace Context: Read
workspace/
files for overall project understanding - Active Context: Check
current_context.md
for current focus areas - Project Context: Review relevant sub-project documentation
- Tasks: Check
tasks/
folder for current work items
Updating Memory Bank: When making significant contributions:
- Document Decisions: Add decision records for significant choices
- Update Progress: Reflect your contributions in progress tracking
- Capture Patterns: Document new patterns or improvements discovered
- Update Context: Keep active context current with your work
Development Workflow
Using the 6-Phase Process
Phase 1: ANALYZE
๐ฏ Understand the contribution scope
๐ Read existing code, docs, and tests
๐ Define requirements in EARS notation
๐ Identify dependencies and constraints
๐ Assess confidence level (0-100%)
Phase 2: DESIGN
๐๏ธ Create technical design
๐ Plan implementation approach
๐งช Define testing strategy
๐ Plan documentation updates
โ
Create task breakdown
Phase 3: IMPLEMENT
โก Code in small, testable increments
๐งช Write tests alongside implementation
๐ Add meaningful code comments
๐ Update task status regularly
โ
Follow project coding standards
Phase 4: VALIDATE
๐งช Run all tests (unit, integration, performance)
๐ Verify edge cases and error handling
๐ Check performance impact
๐ Validate documentation accuracy
โ
Ensure no regressions
Phase 5: REFLECT
๐ง Refactor for maintainability
๐ Update all relevant documentation
๐ก Identify potential improvements
๐ฏ Document lessons learned
๐๏ธ Address any technical debt
Phase 6: HANDOFF
๐ Create comprehensive PR description
๐ Link to validation artifacts
๐ Update memory bank documentation
๐ฏ Prepare for review process
โ
Ensure complete handoff package
Coding Standards
Rust Code Quality:
#![allow(unused)] fn main() { // Use meaningful names and clear intent fn handle_memory_bank_validation( request: ValidationRequest, ) -> Result<ValidationResponse, ValidationError> { // Document complex logic and decisions // Handle errors explicitly and meaningfully // Write code that tells a story } }
Documentation Standards:
- Code Comments: Focus on "why" not "what"
- API Docs: Include examples and common use cases
- Guides: Provide practical, tested examples
- Memory Bank: Capture decision context and learning
Testing Requirements:
- Unit Tests: Test individual components thoroughly
- Integration Tests: Verify component interactions
- Performance Tests: Benchmark critical paths
- Documentation Tests: Ensure examples compile and run
Contribution Workflow
Making Your Contribution
1. Preparation Phase
# Create feature branch
git checkout -b feature/your-contribution-name
# Read memory bank for context
# Start with ANALYZE phase
2. Development Phase
# Implement using 6-phase workflow
cargo watch -x "check --workspace" # Continuous validation
cargo test --workspace # Regular testing
3. Documentation Phase
# Update documentation
mdbook build docs # Validate documentation
mdbook serve docs --open # Review locally
4. Validation Phase
# Comprehensive validation
cargo test --workspace
cargo clippy --workspace --all-targets --all-features
cargo fmt --all
# Performance testing (if applicable)
cargo bench
5. Memory Bank Update
# Update memory bank with your contribution
# Document decisions, patterns, and learning
# Update progress and context as needed
Pull Request Process
PR Preparation Checklist:
-
All tests pass (
cargo test --workspace
) -
Code follows style guidelines (
cargo clippy
,cargo fmt
) -
Documentation is updated and builds (
mdbook build
) - Memory bank is updated with relevant context
- Performance impact is assessed (if applicable)
- Backwards compatibility is maintained (or explicitly noted)
PR Description Template:
## Contribution Summary
Brief description of what this PR accomplishes
## Changes Made
- Detailed list of changes
- Link to design documents if applicable
- Reference to memory bank updates
## Validation
- [ ] Unit tests pass
- [ ] Integration tests pass
- [ ] Documentation builds successfully
- [ ] Performance impact assessed
- [ ] Memory bank updated
## Related Issues
Fixes #issue-number
## Review Notes
Any specific areas for reviewer attention
Review Process
What to Expect:
- Automated Checks: CI will run tests, lints, and validation
- Technical Review: Maintainers will review code quality and design
- Documentation Review: Ensure documentation is clear and complete
- Memory Bank Review: Verify memory bank updates are appropriate
- Integration Testing: Verify changes work well with existing codebase
Addressing Feedback:
- Respond promptly to review comments
- Make requested changes in additional commits (don't squash during review)
- Update tests and documentation as needed
- Continue updating memory bank with review insights
Advanced Contribution Patterns
Cross-Project Integration
When Contributing Across Multiple Crates:
- Understand Dependencies: Map relationships between crates
- Coordinate Changes: Plan changes across dependent crates
- Test Integration: Verify cross-crate functionality
- Update Documentation: Keep all affected documentation current
Performance-Critical Contributions
For Performance-Sensitive Changes:
- Baseline Measurement: Establish current performance benchmarks
- Implementation with Monitoring: Track performance impact during development
- Comprehensive Benchmarking: Test various scenarios and edge cases
- Documentation: Update performance guidance and best practices
Memory Bank Methodology Improvements
Contributing to Memory Bank Patterns:
- Document Current Patterns: Understand existing memory bank methodology
- Identify Improvements: Find gaps or enhancement opportunities
- Prototype Changes: Test improvements in real scenarios
- Update Guidance: Improve memory bank documentation and examples
Community Guidelines
Communication
Be Respectful and Constructive:
- Focus on the code and ideas, not individuals
- Provide specific, actionable feedback
- Assume positive intent in all interactions
- Help others learn and improve
Technical Discussions:
- Support arguments with data and examples
- Reference existing patterns and documentation
- Consider long-term maintenance implications
- Think about impact on different user types
Knowledge Sharing
Share Your Learning:
- Document insights in memory bank structure
- Contribute examples from your experience
- Help improve documentation clarity
- Mentor other contributors
Collaborate Effectively:
- Communicate your plans early for large changes
- Ask questions when uncertain
- Share progress and blockers promptly
- Coordinate with maintainers on architectural decisions
Recognition and Growth
Contribution Recognition
How We Recognize Contributors:
- Code Contributions: Credit in commit messages and changelogs
- Documentation: Recognition in documentation improvements
- Memory Bank: Insights captured in project knowledge base
- Community: Acknowledgment of helpful community participation
Growth Opportunities
Becoming a Core Contributor:
- Consistent Quality: Demonstrate reliable, high-quality contributions
- Community Engagement: Help other contributors and users
- Technical Leadership: Take ownership of features or areas
- Memory Bank Stewardship: Help maintain and improve project knowledge
Maintainer Path:
- Sustained high-quality contributions
- Deep understanding of project architecture
- Strong communication and mentoring skills
- Commitment to project values and methodology
Getting Help
Resources
Documentation:
- Getting Started Guide - Introduction to AIRS ecosystem
- Technical Documentation - Deep implementation guidance
- Memory Bank - Project knowledge and patterns
Community Support:
- GitHub Issues: For bugs, features, and technical questions
- Pull Request Reviews: Direct feedback on contributions
- Documentation: Comprehensive guides and examples
Common Questions
Q: How do I understand the current project context?
A: Always start by reading the memory bank structure, particularly current_context.md
, workspace files, and relevant sub-project documentation.
Q: What if I'm not sure about the best approach? A: Create an issue to discuss your approach before implementation. Include your confidence assessment and proposed design.
Q: How do I handle memory bank updates? A: Document your decisions, learning, and patterns in the relevant memory bank files. Focus on capturing context that will help future contributors.
Q: What's the difference between AIRS-MCP and AIRS-MemSpec? A: AIRS-MCP handles Model Context Protocol integration for AI systems. AIRS-MemSpec provides memory bank validation and management tools.
Ready to Contribute?
- Start Small: Begin with documentation improvements or simple bug fixes
- Follow the Workflow: Use our 6-phase development process
- Engage the Community: Ask questions and share your progress
- Update Memory Bank: Capture your learning and decisions
- Build Iteratively: Grow your contributions over time
Thank you for contributing to AIRS! Your participation helps build better AI-Rust integration tools and methodologies for the entire community.
For technical questions, start with our Getting Started Guide.