fix(spawn): use rig-level beads instead of mayor/rig path

The spawn command and polecat manager were incorrectly looking for beads
in <rig>/mayor/rig/.beads instead of <rig>/.beads. This caused:
- `gt spawn --issue ga-xxp` to fail with "no issue found" even when
  `bd show ga-xxp` worked from the rig directory
- Polecats couldn't find rig-level issues (with ga- prefix) because
  mayor/rig has a different beads database (with gt- prefix)

This fix:
- spawn.go: Use r.Path instead of filepath.Join(r.Path, "mayor", "rig")
- polecat/manager.go: Use r.Path for beads.New() initialization
- session/manager.go: Use r.Path/.beads for BEADS_DIR environment

Closes beads-2nh

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-19 23:28:06 -08:00
parent 71d313ed60
commit 43641e1dfb
4 changed files with 13 additions and 7 deletions

View File

@@ -197,8 +197,8 @@ func runSpawn(cmd *cobra.Command, args []string) error {
}
}
// Beads operations use mayor/rig directory (rig-level beads)
beadsPath := filepath.Join(r.Path, "mayor", "rig")
// Beads operations use rig-level beads (at rig root, not mayor/rig)
beadsPath := r.Path
// Sync beads to ensure fresh state before spawn operations
if err := syncBeads(beadsPath, true); err != nil {