feat(config): move sync-branch to config.yaml as source of truth

Previously sync.branch was stored in the database via bd config set.
Now it is in config.yaml (version controlled, shared across clones):

  sync-branch: "beads-sync"

Changes:
- Add sync-branch to .beads/config.yaml
- Update syncbranch.Get() to check config.yaml before database
- Add syncbranch.GetFromYAML() and IsConfigured() for fast checks
- Update hooks to read sync-branch from config.yaml directly
- Update bd doctor to check config.yaml instead of database
- Remove auto-fix (config.yaml changes should be committed)

Precedence: BEADS_SYNC_BRANCH env > config.yaml > database (legacy)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-11-30 11:15:49 -08:00
parent d02905a4fa
commit 978cb1c31f
8 changed files with 117 additions and 158 deletions

View File

@@ -37,6 +37,13 @@ issue-prefix: "bd"
# Debounce interval for auto-flush (can also use BEADS_FLUSH_DEBOUNCE)
# flush-debounce: "5s"
# Sync branch for multi-clone setups
# When set, .beads changes are committed to this branch via worktree
# instead of the current branch. This allows multiple clones to sync
# beads data without polluting main branch commits.
# Can also be set via BEADS_SYNC_BRANCH environment variable.
sync-branch: "beads-sync"
# Integration settings (access with 'bd config get/set')
# These are stored in the database, not in this file:
# - jira.url
@@ -45,4 +52,3 @@ issue-prefix: "bd"
# - linear.api-key
# - github.org
# - github.repo
# - sync.branch - Git branch for beads commits (use BEADS_SYNC_BRANCH env var or bd config set)