Contributing to NAAb Pivot
February 26, 2026 ยท View on GitHub
Thank you for your interest in contributing!
Ways to Contribute
- Report Bugs: https://github.com/b-macker/naab-pivot/issues
- Suggest Features: Open feature request issue
- Write Code: Submit pull requests
- Improve Docs: Fix typos, add examples
- Create Plugins: Share custom analyzers/synthesizers
- Write Templates: Add new target languages
- Share Examples: Real-world use cases
Getting Started
1. Fork Repository
# Fork on GitHub
# https://github.com/b-macker/naab-pivot/fork
# Clone your fork
git clone --recursive https://github.com/YOUR_USERNAME/naab-pivot.git
cd naab-pivot
2. Create Branch
git checkout -b feature/my-feature
3. Make Changes
# Build and test
bash build.sh
cd tests && bash run-all-tests.sh
4. Commit Changes
git add .
git commit -m "feat: Add my feature
Detailed description of changes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>"
5. Push and Create PR
git push origin feature/my-feature
# Create PR on GitHub
Development Setup
Dependencies
# Ubuntu/Debian
sudo apt-get install cmake build-essential golang rustc g++ clang python3 ruby nodejs npm php zig julia
# macOS
brew install cmake go rust llvm python ruby node php zig julia
Build NAAb
bash build.sh
# Verify
./naab/build/naab-lang --version
Run Tests
cd tests
bash run-all-tests.sh
# Run specific test
bash run-all-tests.sh unit
bash run-all-tests.sh integration
Code Guidelines
Commit Messages
Follow Conventional Commits:
feat: Add new feature
fix: Fix bug
docs: Update documentation
test: Add tests
refactor: Refactor code
perf: Improve performance
chore: Maintenance tasks
Code Style
- NAAb: Follow existing style (snake_case functions, clear names)
- Go:
gofmt - Rust:
rustfmt - C++: Clang-format
Documentation
- Add docstrings to functions
- Update README.md if adding features
- Add examples in
examples/for new functionality - Update relevant docs in
docs/
Adding Features
Adding New Template
- Create template file:
cp templates/go_template.naab templates/v_template.naab
- Update template engine:
// In modules/template_engine.naab
fn get_extension(target) {
if target == "V" { return "v" }
// ...
}
- Add tests:
# Create test case
cat > tests/unit/test-v-template.naab <<'EOF'
// Test V template
use template_engine
main {
let code = template_engine.generate({...}, "V")
// Assert expectations
}
EOF
- Update documentation:
# Add to docs/templates.md
Adding New Profile
- Create profile file:
cat > profiles/my-profile.json <<'EOF'
{
"name": "my-profile",
"optimization_level": 2,
...
}
EOF
- Document in
docs/profiles.md
Adding New Plugin
- Create plugin directory:
mkdir -p plugins/analyzers/my-plugin
- Create metadata:
cat > plugins/analyzers/my-plugin/my-plugin.json <<'EOF'
{
"id": "my-plugin",
"version": "1.0.0",
"type": "analyzer"
}
EOF
- Implement plugin:
cat > plugins/analyzers/my-plugin/my-plugin.naab <<'EOF'
export fn execute(input_data) {
return {"status": "SUCCESS"}
}
EOF
-
Add tests
-
Document in
docs/plugins.md
Testing Guidelines
Unit Tests
Test individual modules:
// tests/unit/test-analyze.naab
use analyzer
main {
let result = analyzer.analyze_file("fixture.py")
assert(result["status"] == "ANALYZED")
}
Integration Tests
Test full pipeline:
// tests/integration/test-full-pipeline.naab
use analyzer
use synthesizer
use validator
main {
// Test analyze โ synthesize โ validate
}
Performance Tests
Track performance regressions:
// tests/performance/bench-analyzer.naab
use benchmark
main {
let result = benchmark.run_single_benchmark("analyzer.bench.json")
assert(result["mean"] < 1000) // < 1 second
}
Pull Request Checklist
Before submitting PR:
- Tests pass:
bash tests/run-all-tests.sh - Code formatted
- Documentation updated
- Examples added (if new feature)
- CHANGELOG.md updated
- Commits follow conventional commits
- No merge conflicts
- PR description explains changes
Review Process
- Automated Checks: CI runs tests, linters, security scans
- Code Review: Maintainer reviews code
- Feedback: Address reviewer comments
- Approval: PR approved and merged
- Release: Included in next release
Code of Conduct
Be respectful, inclusive, and constructive. See CODE_OF_CONDUCT.md.
Questions?
- Discord: https://discord.gg/naab-pivot
- GitHub Discussions: https://github.com/b-macker/naab-pivot/discussions
- Email: dev@naab-pivot.dev
Thank you for contributing! ๐