Feature Branch Workflow

Step-by-step process from feature branch to production release.

Backy Feature Branch Workflow

Goal

Keep development, review, release notes, and versioning separated.

A branch is not allowed to become a release until:

The final merge to main is always manual.


1. Create a feature branch

Always branch from the latest main.

git checkout main
git pull
git checkout -b feature-name

Examples:

git checkout -b offline-favorites
git checkout -b video_stop_on_background
git checkout -b camera_roll_counter_fix

Implement the feature normally.


2. Sync with main before merge

Before starting the release process, bring the latest main into the feature branch.

git checkout feature-name
git merge main

Resolve conflicts if needed.

At this point the branch should contain:


3. Create Release Notes

Run:

create release notes using .ai/releaseNotes.md

Agent responsibilities:

Result:

releaseNotes.ts

contains an Unreleased entry for the current branch.


4. Run Code Review

Run:

do code review using .ai/code-review/code_review.md

Agent responsibilities:

backy-office/lib/codeReviews.ts

Possible outcomes:

PASSED
FAILED
NEEDS-APPROVAL
PENDING

The branch is not allowed to continue unless:

PASSED

and

confidence != low

5. Bump Version

Run:

do bump version using .ai/release/bump-version.md

Agent responsibilities:

Then:

Mobile

Update:

backy-android/app/build.gradle.kts

Increment:

versionName

only.

Do NOT change:

versionCode

Desktop

Update:

backy-desktop/version.go

Increment patch version only.

Release Notes

Promote:

Unreleased

to the newly generated version.

Set:

date = today

Keep:

highlights

6. Final Validation

Review final branch contents.

git diff main...HEAD
git status

Expected changes:

Nothing else.


7. Manual Merge

Merge is always manual.

git checkout main
git merge feature-name
git push

No agent is allowed to:

Those actions remain manual.


Summary

Feature Development
        ↓
Merge latest main into branch
        ↓
Create Release Notes
        ↓
Code Review
        ↓
PASSED
        ↓
Version Bump
        ↓
Manual Validation
        ↓
Manual Merge

8. Build & Publish Release Artifacts

After the feature has been:

the actual release artifacts are generated.

Run:

.\build-downloads.ps1

From PowerShell (sets JAVA_HOME and repo root):

$env:JAVA_HOME = "C:\Program Files\Android\Android Studio\jbr"; Set-Location "c:\Users\noamshe-dev\AndroidStudioProjects\Backy"; .\build-downloads.ps1

Purpose:

What the script does

Android

Builds:

backy-android/app/build/outputs/apk/debug/app-debug.apk

Produces:

backy.apk

for website download.

Desktop

Builds:

Backy-Desktop-Setup-*.exe

Produces:

Backy-Desktop-Setup.exe

for website download.

Website Version Sync

Reads versions from:

backy-android/app/build.gradle.kts
backy-desktop/version.go

Updates:

backy-web/client/src/versions.ts
backy-office/lib/versions.ts

This ensures:

Downloads Folder

Copies release artifacts into:

backy-web/client/public/downloads/

Files:

Backy-Desktop-Setup.exe
backy.apk

Git Staging

Automatically stages:

backy-web/client/public/downloads/*
backy-web/client/src/versions.ts
backy-office/lib/versions.ts

for commit.

Final Release Commit

Review the generated files:

git status
git diff

Then commit:

git add .
git commit -m "release: mobile X.Y.Z / desktop A.B.C"
git push

GitHub push triggers Vercel deployment.

Important

This step happens only after:

Feature branch
↓
Release notes
↓
Code review
↓
Version bump
↓
Merge to main
↓
Push main
↓
Build & Publish Artifacts

The build script is the final release step that synchronizes:


9. Cleanup After Release

Only after verifying deployment, delete the merged branch manually.

git branch -d feature-name
git push origin --delete feature-name

Verify deployment before deleting:

No agent is allowed to delete branches — this remains a manual step.