feat(beads): Add hq- prefix helpers for town-level beads (gt-y24km, gt-qgmyz)
Phase 1: Create agent_ids.go with town-level bead ID helpers - MayorBeadIDTown(), DeaconBeadIDTown(), DogBeadIDTown() - RoleBeadIDTown() and role-specific helpers (hq-*-role) - Add deprecation notices to old gt-* prefix functions Phase 2: Create town-level agent beads during gt install - initTownAgentBeads() creates hq-mayor, hq-deacon agent beads - Creates role beads: hq-mayor-role, hq-deacon-role, etc. - Update rig/manager.go to use rig beads for Witness/Refinery This aligns with the two-level beads architecture: - Town beads (~/gt/.beads/): hq-* prefix for Mayor, Deacon, roles - Rig beads (<rig>/.beads/): <prefix>-* for Witness, Refinery, Polecats 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -50,3 +50,23 @@ func DeaconRoleBeadIDTown() string {
|
||||
func DogRoleBeadIDTown() string {
|
||||
return RoleBeadIDTown("dog")
|
||||
}
|
||||
|
||||
// WitnessRoleBeadIDTown returns the Witness role bead ID for town-level storage.
|
||||
func WitnessRoleBeadIDTown() string {
|
||||
return RoleBeadIDTown("witness")
|
||||
}
|
||||
|
||||
// RefineryRoleBeadIDTown returns the Refinery role bead ID for town-level storage.
|
||||
func RefineryRoleBeadIDTown() string {
|
||||
return RoleBeadIDTown("refinery")
|
||||
}
|
||||
|
||||
// PolecatRoleBeadIDTown returns the Polecat role bead ID for town-level storage.
|
||||
func PolecatRoleBeadIDTown() string {
|
||||
return RoleBeadIDTown("polecat")
|
||||
}
|
||||
|
||||
// CrewRoleBeadIDTown returns the Crew role bead ID for town-level storage.
|
||||
func CrewRoleBeadIDTown() string {
|
||||
return RoleBeadIDTown("crew")
|
||||
}
|
||||
|
||||
@@ -1188,6 +1188,8 @@ func DeaconBeadID() string {
|
||||
|
||||
// DogBeadID returns a Dog agent bead ID.
|
||||
// Dogs are town-level agents, so they follow the pattern: gt-dog-<name>
|
||||
// Deprecated: Use DogBeadIDTown() for town-level beads with hq- prefix.
|
||||
// Dogs are town-level agents and should use hq-dog-<name>, not gt-dog-<name>.
|
||||
func DogBeadID(name string) string {
|
||||
return "gt-dog-" + name
|
||||
}
|
||||
@@ -1398,6 +1400,8 @@ func IsAgentSessionBead(beadID string) bool {
|
||||
|
||||
// RoleBeadID returns the role bead ID for a given role type.
|
||||
// Role beads define lifecycle configuration for each agent type.
|
||||
// Deprecated: Use RoleBeadIDTown() for town-level beads with hq- prefix.
|
||||
// Role beads are global templates and should use hq-<role>-role, not gt-<role>-role.
|
||||
func RoleBeadID(roleType string) string {
|
||||
return "gt-" + roleType + "-role"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user