pub fn resolve_context_paths(start_dir: &Path) -> ContextPathsExpand description
Resolve worktree-aware context paths from start_dir.
Resolution order:
- Run
git rev-parse --git-common-dir --git-dirto locate the primary worktree.tracevault_dir = parent(git_common_dir)/.tracevault- If
git_dir == git_common_dir→ Primary scope. - Else → Linked scope with
key = basename(git_dir).
- Fallback (git not available or not a repo): delegate to
crate::paths::resolve_project_rootwhich walks up fromstart_dirto the nearest.tracevault/(or returnsstart_diras last resort). Treat as Primary scope in both cases.