feat: Standardize agent bead naming to prefix-rig-role-name (gt-zvte2)
Implements canonical naming convention for agent bead IDs: - Town-level: gt-mayor, gt-deacon (unchanged) - Rig-level: gt-<rig>-witness, gt-<rig>-refinery (was gt-witness-<rig>) - Named: gt-<rig>-crew-<name>, gt-<rig>-polecat-<name> (was gt-crew-<rig>-<name>) Changes: - Added AgentBeadID helper functions to internal/beads/beads.go - Updated all ID generation call sites to use helpers - Fixed session parsing in theme.go, statusline.go, agents.go - Updated doctor check and fix to use canonical format - Updated tests for new format 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -60,8 +60,8 @@ func runStatusLine(cmd *cobra.Command, args []string) error {
|
||||
return runDeaconStatusLine(t)
|
||||
}
|
||||
|
||||
// Witness status line (session naming: gt-witness-<rig>)
|
||||
if role == "witness" || strings.HasPrefix(statusLineSession, "gt-witness-") {
|
||||
// Witness status line (session naming: gt-<rig>-witness)
|
||||
if role == "witness" || strings.HasSuffix(statusLineSession, "-witness") {
|
||||
return runWitnessStatusLine(t, rigName)
|
||||
}
|
||||
|
||||
@@ -221,9 +221,9 @@ func runDeaconStatusLine(t *tmux.Tmux) error {
|
||||
// Shows: polecat count, crew count, mail preview
|
||||
func runWitnessStatusLine(t *tmux.Tmux, rigName string) error {
|
||||
if rigName == "" {
|
||||
// Try to extract from session name: gt-witness-<rig>
|
||||
if strings.HasPrefix(statusLineSession, "gt-witness-") {
|
||||
rigName = strings.TrimPrefix(statusLineSession, "gt-witness-")
|
||||
// Try to extract from session name: gt-<rig>-witness
|
||||
if strings.HasSuffix(statusLineSession, "-witness") && strings.HasPrefix(statusLineSession, "gt-") {
|
||||
rigName = strings.TrimPrefix(strings.TrimSuffix(statusLineSession, "-witness"), "gt-")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user