pub fn classify_effective_target(
identity: &WorktreeIdentity,
allowed_dirs: &[PathBuf],
) -> EffectiveTargetExpand description
What: Map a repository identity to the target worktree policies act on. Why: Bare and absent repositories have no worktree; a repository whose Git directory sits under an allowed tool cache is exempt before main/linked matters.
In TS you’d write (pseudocode):
function classifyEffectiveTarget(identity: WorktreeIdentity, allowedDirs: string[]): EffectiveTarget;