Getting Started
Create a feature branch
feature/- New featuresfix/- Bug fixesdocs/- Documentation updatesrefactor/- Code refactoring
Development Workflow
1. Make Your Changes
Write clean, well-documented code following the code style guidelines.2. Add Tests
All new features and bug fixes should include tests:3. Run Quality Checks
Before committing, run all checks:make fmt- Format codemake vet- Static analysismake lint- Lintingmake test- Full test suite
4. Commit Your Changes
Write clear, descriptive commit messages:- “Add support for custom player arguments”
- “Fix race condition in stream initialization”
- “Update configuration documentation”
- “Fixed stuff”
- “WIP”
- “Updates”
5. Push to Your Fork
6. Open a Pull Request
On GitHub:- Navigate to your fork
- Click “Pull Request”
- Select your feature branch
- Fill out the PR template with:
- Description of changes
- Related issue numbers (if any)
- Testing performed
- Screenshots (for UI changes)
Code Style Guidelines
General Principles
From AGENTS.md:- Write clean, readable Go code
- Follow standard Go conventions
- Keep functions focused and small (single responsibility)
- Use meaningful variable and function names
- Add comments for exported functions and types
Naming Conventions
Import Organization
Organize imports in groups (standard library first, then external):make fmt to organize automatically.
Error Handling
Always handle errors explicitly:Struct Tags
Use struct tags for configuration and serialization:Logging
Use the Charm log package consistently:CLI Commands
Use Cobra with helpful descriptions:Testing Requirements
Test Coverage
All new code should include tests:- New features: Add tests covering main functionality and edge cases
- Bug fixes: Add regression tests to prevent recurrence
- Refactoring: Ensure existing tests still pass
- Critical paths: 80%+
- Utilities: 70%+
- UI components: Best effort
Test Structure
Use table-driven tests:Documentation
Update documentation when:- Adding new features
- Changing configuration options
- Modifying CLI commands
- Changing behavior
README.md- Project overview and quick startAGENTS.md- Development guidelinesCHANGELOG.md- Version history- Code comments - Exported functions and types
Pull Request Guidelines
PR Checklist
Before submitting:- Code follows style guidelines
-
make checkpasses without errors - Tests added for new features/fixes
- Documentation updated
- Commit messages are clear and descriptive
- PR description explains changes and motivation
PR Review Process
- Automated checks: CI runs tests and linting
- Code review: Maintainers review your changes
- Feedback: Address review comments
- Approval: PR is approved and merged
Responding to Feedback
When reviewers request changes:- Make the requested changes
- Run
make checkagain - Commit and push updates
- Respond to review comments
Common Contribution Tasks
Adding a New Command
Adding a Configuration Option
Fixing a Bug
Dependencies
Adding Dependencies
When adding new dependencies:- Keep dependencies minimal
- Prefer well-maintained packages
- Check license compatibility (MIT preferred)
- Document why the dependency is needed
Updating Dependencies
Getting Help
If you need help:- Check existing issues: Search GitHub issues for similar problems
- Read documentation: Review README.md and AGENTS.md
- Ask questions: Open a GitHub issue with the “question” label
- Join discussions: Participate in GitHub Discussions
Code of Conduct
Be respectful and constructive:- Use welcoming and inclusive language
- Respect differing viewpoints and experiences
- Accept constructive criticism gracefully
- Focus on what is best for the community
Recognition
Contributors are recognized in:- GitHub contributors page
- CHANGELOG.md for significant contributions
- Project README for major features
Resources
Architecture
Understand the project structure
Building
Learn how to build from source
Testing
Testing guidelines and commands
Go Documentation
Official Go documentation