Thank you for your interest in contributing to AllBeads! This document provides guidelines and instructions for contributing.
By participating in this project, you agree to maintain a respectful and inclusive environment for everyone.
- Rust 1.75 or later
- Git
- A GitHub account
-
Fork and clone the repository:
git clone https://github.com/YOUR_USERNAME/AllBeads.git cd AllBeads -
Build the project:
cargo build
-
Run tests:
cargo test -
Run clippy (linter):
cargo clippy
-
Format code:
cargo fmt
We use AllBeads to track issues for AllBeads itself! After building:
# Create an alias for convenience
alias ab='cargo run --quiet --'
# View current work
ab stats
ab ready
ab tuiUse descriptive branch names:
feature/add-new-command- New featuresfix/resolve-cache-issue- Bug fixesdocs/update-readme- Documentation updatesrefactor/simplify-graph- Code refactoring
Follow conventional commit format:
type(scope): short description
Longer description if needed.
Co-Authored-By: Your Name <your.email@example.com>
Types: feat, fix, docs, style, refactor, test, chore
-
Create a feature branch:
git checkout -b feature/your-feature
-
Make your changes and test:
cargo test cargo clippy cargo fmt -- --check -
Commit your changes:
git add -A git commit -m "feat(scope): description" -
Push and create PR:
git push origin feature/your-feature
-
Fill out the PR template with:
- Summary of changes
- Related issues
- Testing performed
- Follow Rust API guidelines
- Use
clippyrecommendations - Prefer explicit types for public APIs
- Add documentation comments for public items
- Use
Result<T, E>for fallible operations - Avoid
unwrap()in library code
// Good: Use Result with context
fn load_config() -> Result<Config> {
std::fs::read_to_string("config.yaml")
.context("Failed to read config file")?;
// ...
}
// Bad: Panicking
fn load_config() -> Config {
std::fs::read_to_string("config.yaml").unwrap();
// ...
}- Write unit tests for new functionality
- Integration tests go in
tests/directory - Use descriptive test names
- Test both success and error paths
#[test]
fn test_bead_creation_with_valid_input() {
let bead = Bead::new("Test", Priority::P1);
assert_eq!(bead.title, "Test");
assert_eq!(bead.priority, Priority::P1);
}
#[test]
fn test_bead_creation_fails_with_empty_title() {
let result = Bead::new("", Priority::P1);
assert!(result.is_err());
}src/
├── main.rs # CLI entry point
├── lib.rs # Library root
├── aggregator/ # Multi-repo bead aggregation
├── cache/ # Local caching layer
├── config/ # Configuration management
├── graph/ # Bead graph data structures
├── integrations/ # JIRA, GitHub adapters
├── mail/ # Agent communication system
├── manifest/ # XML manifest parsing
├── sheriff/ # Background sync daemon
├── storage/ # Beads file format
├── swarm/ # Agent management
└── tui/ # Terminal UI (ratatui)
- Add the command to
Commandsenum insrc/main.rs - Add a handler function
handle_X_command() - Add the handler call in the
run()match statement - Add tests if applicable
- Update help text and documentation
- Create
src/tui/new_view.rs - Add to
src/tui/mod.rs - Add
Tab::NewViewvariant - Update
Appstruct with view state - Add drawing function in
ui.rs - Handle keybindings in
mod.rs
- Create
src/integrations/new_service.rs - Implement adapter trait pattern
- Add configuration in
src/config/mod.rs - Add CLI commands for the integration
- Write integration tests
Include:
- AllBeads version (
ab --version) - Operating system and version
- Steps to reproduce
- Expected vs actual behavior
- Relevant logs or error messages
Include:
- Use case description
- Proposed solution
- Alternative solutions considered
- Impact on existing functionality
- Documentation: Check
CLAUDE.mdandAGENTS.md - Issues: Search existing issues before creating new ones
- Discussions: Use GitHub Discussions for questions
By contributing, you agree that your contributions will be licensed under the MIT License.
Every contribution helps make AllBeads better. Whether it's fixing a typo, improving documentation, or adding new features - your help is appreciated!