refactor: use hq- prefix for role bead references

Migrate all role bead references from gt-*-role to hq-*-role using
beads.RoleBeadIDTown() function. Role beads are stored in town beads
(~/gt/.beads/) with the hq- prefix.

Changes:
- internal/cmd/prime.go: Use RoleBeadIDTown() for all roles
- internal/doctor/agent_beads_check.go: Use RoleBeadIDTown() for rig agents
- internal/polecat/manager.go: Use RoleBeadIDTown("polecat")
- internal/cmd/crew_add.go: Use RoleBeadIDTown("crew")
- internal/beads/beads.go: Update comments to document hq- convention
- Templates: Update bd show gt-deacon to bd show hq-deacon

Note: Tmux session names remain as gt-* (runtime identifiers).
Bead IDs use hq-* for town-level agents (persistent storage).

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
scrotus
2026-01-04 13:17:39 -08:00
committed by Steve Yegge
parent a0e5831f69
commit 4de5a96400
7 changed files with 26 additions and 21 deletions

View File

@@ -251,7 +251,7 @@ func (m *Manager) AddWithOptions(name string, opts AddOptions) (*Polecat, error)
RoleType: "polecat",
Rig: m.rig.Name,
AgentState: "spawning",
RoleBead: "gt-polecat-role",
RoleBead: beads.RoleBeadIDTown("polecat"),
HookBead: opts.HookBead, // Set atomically at spawn time
})
if err != nil {
@@ -467,7 +467,7 @@ func (m *Manager) RecreateWithOptions(name string, force bool, opts AddOptions)
RoleType: "polecat",
Rig: m.rig.Name,
AgentState: "spawning",
RoleBead: "gt-polecat-role",
RoleBead: beads.RoleBeadIDTown("polecat"),
HookBead: opts.HookBead, // Set atomically at spawn time
})
if err != nil {