feat(beads): Add TownBeadsPrefix constant for hq- prefix
Introduces a const TownBeadsPrefix = "hq" to centralize the town-level beads prefix. Updates all hq- string literals in agent_ids.go to use the constant, making prefix changes easier and reducing duplication. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,10 @@ package beads
|
|||||||
|
|
||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
||||||
|
// TownBeadsPrefix is the prefix used for town-level agent beads stored in ~/gt/.beads/.
|
||||||
|
// This distinguishes them from rig-level beads (which use project prefixes like "gt-").
|
||||||
|
const TownBeadsPrefix = "hq"
|
||||||
|
|
||||||
// Town-level agent bead IDs use the "hq-" prefix and are stored in town beads.
|
// Town-level agent bead IDs use the "hq-" prefix and are stored in town beads.
|
||||||
// These are global agents that operate at the town level (mayor, deacon, dogs).
|
// These are global agents that operate at the town level (mayor, deacon, dogs).
|
||||||
//
|
//
|
||||||
@@ -14,26 +18,26 @@ import "fmt"
|
|||||||
// MayorBeadIDTown returns the Mayor agent bead ID for town-level beads.
|
// MayorBeadIDTown returns the Mayor agent bead ID for town-level beads.
|
||||||
// This uses the "hq-" prefix for town-level storage.
|
// This uses the "hq-" prefix for town-level storage.
|
||||||
func MayorBeadIDTown() string {
|
func MayorBeadIDTown() string {
|
||||||
return "hq-mayor"
|
return TownBeadsPrefix + "-mayor"
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeaconBeadIDTown returns the Deacon agent bead ID for town-level beads.
|
// DeaconBeadIDTown returns the Deacon agent bead ID for town-level beads.
|
||||||
// This uses the "hq-" prefix for town-level storage.
|
// This uses the "hq-" prefix for town-level storage.
|
||||||
func DeaconBeadIDTown() string {
|
func DeaconBeadIDTown() string {
|
||||||
return "hq-deacon"
|
return TownBeadsPrefix + "-deacon"
|
||||||
}
|
}
|
||||||
|
|
||||||
// DogBeadIDTown returns a Dog agent bead ID for town-level beads.
|
// DogBeadIDTown returns a Dog agent bead ID for town-level beads.
|
||||||
// Dogs are town-level agents, so they follow the pattern: hq-dog-<name>
|
// Dogs are town-level agents, so they follow the pattern: hq-dog-<name>
|
||||||
func DogBeadIDTown(name string) string {
|
func DogBeadIDTown(name string) string {
|
||||||
return fmt.Sprintf("hq-dog-%s", name)
|
return fmt.Sprintf("%s-dog-%s", TownBeadsPrefix, name)
|
||||||
}
|
}
|
||||||
|
|
||||||
// RoleBeadIDTown returns the role bead ID for town-level storage.
|
// RoleBeadIDTown returns the role bead ID for town-level storage.
|
||||||
// Role beads define lifecycle configuration for each agent type.
|
// Role beads define lifecycle configuration for each agent type.
|
||||||
// Uses "hq-" prefix for town-level storage: hq-<role>-role
|
// Uses "hq-" prefix for town-level storage: hq-<role>-role
|
||||||
func RoleBeadIDTown(role string) string {
|
func RoleBeadIDTown(role string) string {
|
||||||
return fmt.Sprintf("hq-%s-role", role)
|
return fmt.Sprintf("%s-%s-role", TownBeadsPrefix, role)
|
||||||
}
|
}
|
||||||
|
|
||||||
// MayorRoleBeadIDTown returns the Mayor role bead ID for town-level storage.
|
// MayorRoleBeadIDTown returns the Mayor role bead ID for town-level storage.
|
||||||
|
|||||||
Reference in New Issue
Block a user