Repository navigation
Open
Labels
improvementImprovement to an existing featureImprovement to an existing featurestack: goRelated to Go codeRelated to Go code
Description
Goal
One walk over root, used by every command that needs the repositories under it.
Context
- Trigger: feat: list and cd with fuzzy matching #3 and feat: status, sync and open across repositories #5 were implemented in parallel and both needed the same walk. feat: status, sync and open across repositories #5 was told to
build the minimum it needed rather than block on feat: list and cd with fuzzy matching #3, so the duplication is deliberate and was
recorded inAGENTS.mdand in both pull request bodies. It was never meant to survive. - Affected:
cmd/gitcd/discover.go, already onmainthrough feat: status, sync and open across repositories #14, andinternal/scan, which
arrives with feat: list and cd with fuzzy matching #3.
discoverRepos returns a path list. scan.Walk returns Result values carrying the richer
profile.Repo, and since #3's rework it also asks git for each repository's own linked
worktrees, which discoverRepos does not. So the two already disagree: path, open, status
and sync cannot see a worktree that list and cd can.
Acceptance criteria
-
internal/scanis the only walk overrootin the repository. -
cmd/gitcd/discover.gois gone, andpath,open,statusandsyncuse
internal/scan. - A linked worktree nested at
<repo>/.claude/worktrees/<branch>is reachable from every
command that takes a repository query, not only fromlistandcd. - Whether each command includes linked worktrees by default is stated once and tested, rather
than decided separately per command as it is today. - A nested independent repository is still never reported, with the existing test kept.
-
AGENTS.mdno longer carries the reconciliation note. -
task checkpasses.
Out of scope
- Changing the boundary rule itself, or how
profile.Inspectresolves a repository. - Any new command.
Metadata
Metadata
Assignees
Labels
improvementImprovement to an existing featureImprovement to an existing featurestack: goRelated to Go codeRelated to Go code
Activity