Feature Development Workflow¶
Overview¶
Standard workflow for developing new features in audio-lab.
Process¶
1. Planning¶
- Create GitHub issue describing the feature
- Link to relevant architecture docs
- Define acceptance criteria
- Estimate complexity (small/medium/large)
2. Design¶
- Review existing patterns in codebase
- Check RT safety requirements (for audio thread features)
- Design API interface
- Consider cross-platform compatibility
- Document design decisions
3. Implementation¶
# Create feature branch
git checkout -b feature/descriptive-name
# Work in small, focused commits
# Follow commit conventions (see ../01_standards/commit_conventions.md)
Development checklist:
- [ ] Follow coding standards (see 03_10_coding_standards)
- [ ] Write unit tests alongside code
- [ ] Validate RT safety if applicable
- [ ] Keep commits atomic and well-described
- [ ] Run clang-format before committing
4. Testing¶
- Unit tests pass
- Integration tests (if applicable)
- Manual testing on target platforms
- Performance validation
- RT safety validation (lock-free structures, allocation-free)
5. Documentation¶
- Update inline code documentation
- Update relevant markdown docs
- Add examples if introducing new API
- Update CHANGELOG (if using)
6. Code Review¶
- Create PR using template
- Address CI failures
- Respond to review comments
- Squash/clean commits if needed
7. Merge¶
- All CI checks pass
- Approved by reviewer
- Merge to main
- Delete feature branch
Best Practices¶
Small, Incremental Changes¶
Prefer multiple small PRs over one large PR: - Easier to review - Faster to merge - Easier to debug if issues arise
RT Safety First¶
For audio thread code: - No locks - No allocations - No syscalls - Validate with RT validators
Test Coverage¶
- Aim for >80% coverage on new code
- Include edge cases
- Test failure scenarios
Cross-Platform Awareness¶
Test on: - Windows (MSVC) - Linux (GCC/Clang) - macOS (Clang)
Example Timeline¶
Small feature (1-2 days): - Planning: 30 min - Design: 1 hour - Implementation: 4-6 hours - Testing: 2 hours - Review/merge: 1-2 hours
Medium feature (3-5 days): - Planning: 1 hour - Design: 2-3 hours - Implementation: 1-2 days - Testing: 4-6 hours - Review/merge: 2-4 hours
Large feature (1-2 weeks): - Break into multiple smaller features - Follow same process for each part