Development Workflow
Branch Management
- Branch naming convention: Use
github_username/descriptionformat (e.g.,caidanw/feature-auth,caidanw/fix-database-timeout) - Base branch: Always branch from
main - Create new branch:
git checkout -b username/feature-name
Code Quality Standards
Automated Checks
Every commit automatically runs:
- Trailing whitespace removal
- End-of-file fixing
- YAML/JSON/TOML validation
- Ruff linting and formatting
Manual Checks
Before pushing, run:
# Comprehensive linting check
uv run ruff check
# Format all code
uv run ruff format
# Type checking (on specific files/modules)
uv run mypy osprey_worker/src/osprey_worker/lib
# Or you can type check every module (this will happen in CI)
uv run mypy .
# Run all pre-commit hooks
uv run pre-commit run --all-files
Commit Standards
Follow Conventional Commits format:
feat: add user authentication system
fix: resolve database connection timeout
docs: update API documentation
refactor: simplify rule evaluation logic
Examples:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changesrefactor:- Code refactoringtest:- Adding or updating testschore:- Maintenance tasks
Making Changes
-
Create a new branch:
git checkout -b username/feature-name -
Make your changes
-
Run quality checks:
uv run ruff check --fix uv run ruff format -
Test your changes (if tests exist)
-
Commit your changes:
git add . git commit -m "feat: descriptive commit message"Pre-commit hooks will run automatically and may fix formatting issues.
-
Push your branch:
git push origin username/feature-name