Home > Contributing
Contributing Guide
How to contribute to Sound Forge Alchemy.
Table of Contents
- Code of Conduct
- Getting Started
- Branch Strategy
- Commit Convention
- Pull Request Process
- Testing Requirements
- Code Style
- Documentation Standards
- Issue Reporting
Code of Conduct
Be respectful. Constructive feedback only. No personal attacks.
Getting Started
- Fork the repository on GitHub
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/sound-forge-alchemy.git - Follow the Installation Guide to set up your dev environment
- Create a feature branch:
git checkout -b feature/your-feature-name - Make your changes with tests
- Run
mix precommitto verify everything passes - Open a pull request
Branch Strategy
| Branch | Purpose |
|---|---|
main |
Production-ready code. Protected. |
feature/* |
New features |
fix/* |
Bug fixes |
refactor/* |
Code improvements without behavior change |
docs/* |
Documentation only |
chore/* |
Dependency updates, CI changes |
Branches are merged via PR only. Direct pushes to main are disabled.
Commit Convention
Use Conventional Commits:
<type>(<scope>): <description>
[optional body]
[optional footer]
Types:
| Type | Description |
|---|---|
feat |
New feature |
fix |
Bug fix |
refactor |
Code change without behavior change |
docs |
Documentation only |
test |
Adding/updating tests |
chore |
Build, CI, dependencies |
perf |
Performance improvement |
Examples:
feat(agents): add LibraryAgent for playlist curation
fix(demucs): handle htdemucs_6s model in DemucsPort valid list
docs(api): add WebSocket channel event reference
test(music): add AnalysisResult factory
Pull Request Process
- Ensure all tests pass:
mix test - Ensure
mix precommitpasses (compile, format, unused deps, test) - Write a clear PR description explaining:
- What problem this solves
- How the implementation works
- Any migration steps required
- Link related issues with
Closes #123 - Request review from at least one maintainer
- Address review comments before merge
PR Checklist
- Tests added/updated for all changed behavior
mix precommitpasses with no warnings- Documentation updated if adding/changing public APIs
- Migration added if changing DB schema
CHANGELOG.mdentry added if user-facing change
Testing Requirements
All pull requests must:
- Maintain or improve test coverage
- Include unit tests for all new context functions
- Include LiveView tests for new UI interactions
- Not break existing tests (run
mix test --failedto check)
Test organization:
test/
├── sound_forge/ # Unit tests (context, domain)
│ ├── music_test.exs
│ ├── agents/
│ └── llm/
└── sound_forge_web/ # Integration + LiveView tests
├── live/
└── controllers/
Run tests:
mix test # All tests
mix test test/sound_forge/ # Unit tests only
mix test test/sound_forge_web/live/ # LiveView tests only
mix test --failed # Rerun failed tests
mix test test/sound_forge/music_test.exs:42 # Specific test
Code Style
Elixir
Follow the Elixir Style Guide.
Key rules enforced by mix format and mix credo:
- 2-space indentation
- Trailing commas in multi-line lists
- Pipe operator over nested function calls
- Pattern matching over conditionals where natural
@moduledocand@docon all public functions@spectype annotations on all public functions- No
any()types without justification
TypeScript / JavaScript
Asset files follow standard Prettier formatting. JS hooks should be minimal — business logic belongs in Elixir.
Documentation Standards
When adding or changing functionality:
- Update relevant docs pages in
docs/ - Add
@docand@specto all new public Elixir functions - Update Changelog with a new entry
- Ensure all internal links in docs resolve (no dead links)
Documentation pages must:
- Start with a breadcrumb
- Have a clear
# Title - Include a table of contents for pages over 200 words
- Have a “See Also” section
- End with prev/next navigation
Issue Reporting
For bugs, please provide:
- SFA version (
mix phx.serveroutput orApplication.spec(:sound_forge, :vsn)) - OS and Elixir version
- Steps to reproduce
- Expected vs. actual behavior
- Relevant log output (sanitize any API keys)
For feature requests:
- Describe the use case (not just the implementation)
- Explain why existing features don’t solve it
- Note if you’re willing to implement it
See Also
| ← Changelog | Back to Home → |