Repository navigation
Open
Labels
ai: workingAn AI agent is implementing (incl. committed but not yet pushed)An AI agent is implementing (incl. committed but not yet pushed)featureNew feature or capabilityNew feature or capabilitystack: goRelated to Go codeRelated to Go code
Description
Goal
A repository whose identity or location is wrong is reported, and the mechanical cases can be
fixed in place.
Context
- Trigger: fourth milestone, independent of the fleet issue and runnable in parallel with it.
- Affected:
internal/doctor,cmd/gitcd.
This milestone is the fleet wide form of gitcd profile show, which the identity issue already
builds for a single repository. doctor is a loop over scan plus the global include checks.
The riskiest failure the tool exists to prevent is a commit landing under the wrong identity and
nobody noticing until it reaches a work remote. These checks are the last of the four defences
against it, after user.useConfigOnly, the clone read back and profile show.
Acceptance criteria
-
gitcd doctorreports a repository whose effective identity differs from the profile its
rules imply, and names both. - It reports a repository under
rootsitting at a path the layout would not render. - It reports a missing or stale include block in
~/.config/gitcd/includes.gitconfig. - It reports a global identity key positioned after the gitcd include, which would win
silently. - It reports a case mismatch between a rendered glob and the on disk spelling.
- It distinguishes a deliberate pin, marked by
gitcd.profile, from stale config. - It prints both config homes,
~/.gitcd.yamland~/.config/gitcd/, so neither surprises
the user. -
gitcd doctor --fixrepairs the stale include block, the ordering and the case mismatches,
and never touches identity keys it did not write. -
gitcd adopt <path>moves an existing clone into the layout, fixes its config, prints the
old and the new path, and asks before moving. -
gitcd adoptrefuses a repository withextensions.worktreeConfigenabled rather than
guessing which config file to write. - Exit code is non zero when any finding is reported, so CI and a shell prompt can use it.
- Tests cover one fixture per finding.
-
task checkpasses.
Out of scope
migratefor a changed layout template.adoptin a loop covers it until the layout changes.statusandsync.
Metadata
Metadata
Assignees
Labels
ai: workingAn AI agent is implementing (incl. committed but not yet pushed)An AI agent is implementing (incl. committed but not yet pushed)featureNew feature or capabilityNew feature or capabilitystack: goRelated to Go codeRelated to Go code
Activity
simonostendorf commentedon Nov 13, 2026
One criterion moves here from #8, because this is the milestone that builds
doctor.gitcd doctorreports an identity key in the global git config as a finding, naming theprofile it would belong in and that it defeats the per remote identity for every
repository no rule matches.
Context is in #8:
user.useConfigOnlyonly stops git guessing an identity from username andhostname. A global
user.emailis configuration, so git uses it, and an unmatched repositorythen commits under it. #8 handles the
initside of that; this issue handles the reportingside.
feat(git): list a repository's linked worktrees and identity keys
fix(doctor): refuse an ancestor two repositories spell differently
fix(cli): never move a repository git has linked elsewhere