fix(beads): align agent bead prefixes and force multi-hyphen IDs (#482)

* fix(beads): align agent bead prefixes and force multi-hyphen IDs

* fix(checkpoint): treat threshold as stale at boundary
This commit is contained in:
JJ
2026-01-16 15:33:51 -05:00
committed by GitHub
parent 03213a7307
commit b1a5241430
17 changed files with 141 additions and 26 deletions
+9 -9
View File
@@ -232,7 +232,7 @@ func runPolecatIdentityAdd(cmd *cobra.Command, args []string) error {
// Check if identity already exists
bd := beads.New(r.Path)
beadID := beads.PolecatBeadID(rigName, polecatName)
beadID := polecatBeadIDForRig(r, rigName, polecatName)
existingIssue, _, _ := bd.GetAgentBead(beadID)
if existingIssue != nil && existingIssue.Status != "closed" {
return fmt.Errorf("identity bead %s already exists", beadID)
@@ -385,7 +385,7 @@ func runPolecatIdentityShow(cmd *cobra.Command, args []string) error {
// Get identity bead
bd := beads.New(r.Path)
beadID := beads.PolecatBeadID(rigName, polecatName)
beadID := polecatBeadIDForRig(r, rigName, polecatName)
issue, fields, err := bd.GetAgentBead(beadID)
if err != nil {
return fmt.Errorf("getting identity bead: %w", err)
@@ -414,10 +414,10 @@ func runPolecatIdentityShow(cmd *cobra.Command, args []string) error {
if polecatIdentityShowJSON {
output := struct {
IdentityInfo
Title string `json:"title"`
CreatedAt string `json:"created_at,omitempty"`
UpdatedAt string `json:"updated_at,omitempty"`
CV *CVSummary `json:"cv,omitempty"`
Title string `json:"title"`
CreatedAt string `json:"created_at,omitempty"`
UpdatedAt string `json:"updated_at,omitempty"`
CV *CVSummary `json:"cv,omitempty"`
}{
IdentityInfo: IdentityInfo{
Rig: rigName,
@@ -563,8 +563,8 @@ func runPolecatIdentityRename(cmd *cobra.Command, args []string) error {
}
bd := beads.New(r.Path)
oldBeadID := beads.PolecatBeadID(rigName, oldName)
newBeadID := beads.PolecatBeadID(rigName, newName)
oldBeadID := polecatBeadIDForRig(r, rigName, oldName)
newBeadID := polecatBeadIDForRig(r, rigName, newName)
// Check old identity exists
oldIssue, oldFields, err := bd.GetAgentBead(oldBeadID)
@@ -631,7 +631,7 @@ func runPolecatIdentityRemove(cmd *cobra.Command, args []string) error {
}
bd := beads.New(r.Path)
beadID := beads.PolecatBeadID(rigName, polecatName)
beadID := polecatBeadIDForRig(r, rigName, polecatName)
// Check identity exists
issue, fields, err := bd.GetAgentBead(beadID)