feat(doctor): Add rig-level health checks (gt-f9x.6)

Add 7 new checks for rig health when using `gt doctor --rig <name>`:

- rig-is-git-repo: Verify mayor/rig/ is a valid git clone
- git-exclude-configured: Check .git/info/exclude has Gas Town dirs (fixable)
- witness-exists: Verify witness/ structure exists (fixable)
- refinery-exists: Verify refinery/ structure exists (fixable)
- mayor-clone-exists: Verify mayor/rig/ clone exists (fixable)
- polecat-clones-valid: Verify polecat directories are valid clones
- beads-config-valid: Verify beads configuration works (fixable)

Checks are only registered when --rig flag is provided.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
dag
2026-01-01 19:08:04 -08:00
committed by Steve Yegge
parent dae85ef764
commit b6eeac416d
2 changed files with 773 additions and 0 deletions

View File

@@ -37,6 +37,15 @@ Clone divergence checks:
- persistent-role-branches Detect crew/witness/refinery not on main
- clone-divergence Detect clones significantly behind origin/main
Rig checks (with --rig flag):
- rig-is-git-repo Verify rig is a valid git repository
- git-exclude-configured Check .git/info/exclude has Gas Town dirs (fixable)
- witness-exists Verify witness/ structure exists (fixable)
- refinery-exists Verify refinery/ structure exists (fixable)
- mayor-clone-exists Verify mayor/rig/ clone exists (fixable)
- polecat-clones-valid Verify polecat directories are valid clones
- beads-config-valid Verify beads configuration (fixable)
Routing checks (fixable):
- routes-config Check beads routing configuration
@@ -119,6 +128,11 @@ func runDoctor(cmd *cobra.Command, args []string) error {
d.Register(doctor.NewHookSingletonCheck())
d.Register(doctor.NewOrphanedAttachmentsCheck())
// Rig-specific checks (only when --rig is specified)
if doctorRig != "" {
d.RegisterAll(doctor.RigChecks()...)
}
// Run checks
var report *doctor.Report
if doctorFix {