feature/description # New features
fix/issue-number # Bug fixes
refactor/module # Code refactoring
docs/topic # Documentation
test/module # Test additions
type(scope): subject
body (optional)
footer (optional)
Types:
feat: New featurefix: Bug fixrefactor: Code refactoringtest: Test additions/changesdocs: Documentationstyle: Formatting changesperf: Performance improvementschore: Maintenance tasks
Examples:
git commit -m "feat(timer): add pause functionality"
git commit -m "fix(task): resolve cycling issue #42"
git commit -m "refactor(domain): extract timer state machine"graph LR
ISSUE[Pick Issue] --> BRANCH[Create Branch]
BRANCH --> DESIGN[Design Solution]
DESIGN --> TEST[Write Tests]
TEST --> CODE[Implement]
CODE --> VERIFY[Run Tests]
VERIFY --> LINT[Format & Lint]
LINT --> COMMIT[Commit]
COMMIT --> PR[Create PR]
PR --> REVIEW[Code Review]
REVIEW --> MERGE[Merge]
VERIFY -.Fail.-> CODE
REVIEW -.Changes.-> CODE
- Tests pass:
cargo test - Code formatted:
cargo fmt - No clippy warnings:
cargo clippy - Documentation updated
- Examples work (if applicable)
- Branch up-to-date with main
- Commit messages follow convention
- PR description complete
- CI/CD passes
- Self-review completed
- Design First: Document your domain model changes
- Test Domain Logic: Write unit tests
- Update Aggregates: Modify entities/value objects
- Emit Events: Add necessary domain events
- Define Interface: Start with use case interface
- Write Integration Test: Test the complete flow
- Implement Logic: Write the use case
- Handle Errors: Proper error handling
- Check Interfaces: Ensure domain interfaces are satisfied
- Test with Real Services: Integration tests
- Handle External Failures: Resilience patterns
- Document Configuration: Update configs
- Design Component: Sketch UI/UX
- Create View Model: State management
- Build Component: React component
- Test Interactions: Component tests
graph TD
E2E[E2E Tests<br/>Few, Slow, Broad]
INT[Integration Tests<br/>Some, Medium, Focused]
UNIT[Unit Tests<br/>Many, Fast, Specific]
E2E --> INT
INT --> UNIT
style E2E fill:#fdd
style INT fill:#ffd
style UNIT fill:#dfd
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn timer_should_start_in_idle_state() {
let timer = Timer::new(test_config());
assert_eq!(timer.state(), TimerState::Idle);
}
}#[tokio::test]
async fn complete_pomodoro_session() {
let context = TestContext::new().await;
context.start_timer().await;
context.advance_time(25.minutes()).await;
assert_eq!(context.timer_state(), TimerState::Break);
}- Self-Review First: Review your own changes
- Provide Context: Explain decisions in PR description
- Link Issues: Reference related issues
- Update Promptly: Address feedback quickly
- Understand Context: Read PR description and linked issues
- Check Tests: Ensure adequate test coverage
- Review Architecture: Verify layer boundaries
- Suggest Improvements: Be constructive
- Approve/Request Changes: Clear feedback
- Code follows project style
- Tests are comprehensive
- Documentation updated
- No security issues
- Performance considered
- Error handling appropriate
graph LR
PUSH[Push Code] --> LINT[Lint & Format]
LINT --> BUILD[Build]
BUILD --> TEST[Run Tests]
TEST --> COV[Coverage Check]
COV --> SEC[Security Scan]
SEC --> DONE[✓ Ready]
LINT -.Fail.-> FIX[Fix Issues]
BUILD -.Fail.-> FIX
TEST -.Fail.-> FIX
FIX --> PUSH
# Run what CI runs
./scripts/ci-local.sh
# Or manually:
cargo fmt --check
cargo clippy -- -D warnings
cargo test --workspace
cargo tarpaulin --min 80Releases are fully automated and tag-triggered. From a clean main:
just release VERSION=0.2.0This bumps version, commits, tags v0.2.0, pushes, and triggers CI to build
Windows / macOS (universal) / Linux installers automatically.
Follow semantic versioning:
- Major: Breaking changes
- Minor: New features (backward compatible)
- Patch: Bug fixes
See Releasing Workflow for the full step-by-step guide, changelog conventions, and recovery procedures.
- Write tests first (TDD)
- Keep commits atomic
- Document public APIs
- Use meaningful variable names
- Handle errors explicitly
- Follow SOLID principles
- Don't commit broken code
- Don't skip tests
- Don't ignore clippy warnings
- Don't violate layer boundaries
- Don't commit secrets
- Don't force push to main
- Check Documentation: Read relevant docs
- Search Codebase: Look for similar patterns
- Run Tests: Understand expected behavior
- Ask Questions: Create discussion/issue
- Pair Program: Work with another contributor
- Set up your development environment
- Understand the architecture
- Pick a workflow for your task