Uses git rev-parse --git-common-dir to find the main worktree root, then resolves the DB path there. Prevents WAL/journal pollution on feature branch worktrees that caused merge conflicts on commonwealth.db. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>