Repository Management
Branching Strategy
Use a trunk-based model with short-lived branches.
- Protected branch:
main - Feature branches:
feature/<scope>-<summary> - Fix branches:
fix/<scope>-<summary> - Chore branches:
chore/<scope>-<summary> - Release branches (optional for stabilization):
release/<version>
Guidelines:
- Branch from latest
main. - Keep branches small and focused.
- Rebase or merge
mainfrequently to reduce drift. - Delete branches after merge.
Commit Strategy
Prefer small, logical commits.
- One concern per commit.
- Keep generated artifacts out of commits unless intentionally versioned.
- Use imperative commit messages.
Recommended commit style:
feat(api): add organization create endpointfix(docker): correct pgadmin preload mountdocs(repo): add release processchore(ci): add typecheck step
Pull Request Strategy
- Open PRs early as draft when work is in progress.
- Keep PR scope narrow.
- Include a short change summary and test notes.
- Link related issue(s).
PR checklist:
- Behavior verified locally
- Docs updated when behavior/config changed
- New config keys added to
.env*.example - No secrets committed
Release Strategy
Use semantic versioning (MAJOR.MINOR.PATCH).
PATCH: bug fixes, no breaking API changesMINOR: backward-compatible featuresMAJOR: breaking changes
Suggested release flow:
- Merge completed work into
main. - Create release PR or branch if stabilization is needed.
- Update changelog and version.
- Tag release:
vX.Y.Z. - Publish artifacts/deploy.
Hotfix Strategy
For production incidents:
- Branch from the production tag or release branch.
- Implement minimal fix.
- Open expedited PR with focused review.
- Release as patch (
vX.Y.Z+1equivalent patch bump). - Back-merge into
main.
Ownership and Code Review
- Require at least one reviewer before merge.
- Require passing CI for merge.
- Prefer CODEOWNERS for critical areas (
apps/api,infra,compose*).
Dependency and Security Hygiene
- Pin major versions for core runtime dependencies.
- Schedule periodic dependency updates.
- Run security scans in CI where possible.
- Rotate credentials and never commit real secrets.