feat(doctor): add routing-mode check to detect .beads-planning routing bug (#810)

Adds a new doctor check that detects when beads routing.mode is set to
"auto" (or unset, which defaults to auto). In auto mode, beads uses
git remote URL to detect user role, and non-SSH URLs are interpreted
as "contributor" mode, which routes all writes to ~/.beads-planning
instead of the local .beads directory.

This causes mail and issues to silently go to the wrong location,
breaking inter-agent communication.

The check:
- Warns when routing.mode is not set or not "explicit"
- Is auto-fixable via `gt doctor --fix`
- References beads issue #1165 for context

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Adam Zionts
2026-01-20 17:09:39 -05:00
committed by GitHub
parent 371074cc67
commit 6c5c671595
2 changed files with 148 additions and 0 deletions

View File

@@ -134,6 +134,7 @@ func runDoctor(cmd *cobra.Command, args []string) error {
d.Register(doctor.NewPrefixMismatchCheck())
d.Register(doctor.NewRoutesCheck())
d.Register(doctor.NewRigRoutesJSONLCheck())
d.Register(doctor.NewRoutingModeCheck())
d.Register(doctor.NewOrphanSessionCheck())
d.Register(doctor.NewZombieSessionCheck())
d.Register(doctor.NewOrphanProcessCheck())