---
title: Development Workflow
summary: The daily branch, implementation, verification, formatting, and synchronization loop for BookWorm changes.
owners:
  - architecture-enabling-team
badges:
  - content: Workflow
    backgroundColor: teal
    textColor: teal
---

Keep each branch focused on one cohesive change. Use this loop for backend, frontend, and documentation work; the standards and test guides define the detailed rules for each area.

_Branching and Change Flow_

<MermaidFileLoader file="mermaids/git-flow.mmd" />

## Create a focused branch

After configuring the `upstream` remote, update `main` and branch from it:

```bash
git fetch upstream
git switch main
git merge --ff-only upstream/main
git switch -c feature/<short-description>
```

Replace `<short-description>` with a concise lowercase-kebab-case name. Use `feature/`, `fix/`, or `docs/` to identify the change type.

## Implement and verify in small steps

1. Confirm the owning service, frontend, or documentation area before editing.
2. Make one cohesive change and add or update focused tests when behavior changes.
3. Run the smallest relevant build, test, and formatting tasks. See [[doc|development/005-testing]] for test commands and [[doc|development/004-engineering-standards]] for enforced rules.
4. For rapid iteration, use `dotnet watch` from the relevant .NET project workspace or `bun run dev` from the relevant frontend workspace.

Useful formatting tasks include `mise run format:cs`, `mise run format:fe`, and `mise run format:docs`. Use `mise run format` when you want to format every supported workspace.

## Keep the branch current

When `main` advances, update your branch without discarding local work:

```bash
git fetch upstream
git merge upstream/main
```

Resolve conflicts deliberately, rerun the affected checks, and push the branch to your fork. Do not reset a branch that contains work you have not confirmed is safe to discard.

## Commit and hand off

Use a Conventional Commit prefix such as `feat:`, `fix:`, `docs:`, `refactor:`, `test:`, or `chore:` followed by a concise, imperative summary. Repository hooks run formatting, analyzers, and build checks on commit.

When the change is ready, follow [[doc|development/006-pull-request-process]]. Do not start the full Aspire application for routine code or documentation checks.
