---
name: "Configurable base branch name in project.toml"
---

# Story 387: Configurable base branch name in project.toml

## User Story

As a project owner, I want to configure the main branch name in project.toml (e.g. "main", "master", "develop"), so that the system doesn't hardcode "master" and works with any branching convention.

## Acceptance Criteria

- [ ] New optional `base_branch` setting in project.toml (e.g. base_branch = "main")
- [ ] When set, all worktree creation, merge operations, and agent prompts use the configured branch name
- [ ] When not set, falls back to the existing auto-detection logic (detect_base_branch) which reads the current git branch
- [ ] The hardcoded "master" fallback in detect_base_branch is replaced by the project.toml setting when available
- [ ] Agent prompt template {{base_branch}} resolves to the configured value
- [ ] Existing projects without the setting continue to work unchanged (backwards compatible)
- [ ] project.toml.example uses base_branch = \"main\" as the example value; the actual project.toml uses base_branch = \"master\"

## Out of Scope

- TBD
