Add identity collision prevention, detection, and correction (gt-xp2s)

- internal/lock: New package with PID-based lockfiles for worker identity
- gt prime: Acquire identity lock for crew/polecat roles, fail on collision
- gt agents check: Detect stale locks and identity collisions
- gt agents fix: Clean up stale locks
- gt doctor: New identity-collision check with --fix support

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-22 00:05:46 -08:00
parent 97db49f72c
commit 965644b0fe
5 changed files with 734 additions and 1 deletions

View File

@@ -60,6 +60,7 @@ func runDoctor(cmd *cobra.Command, args []string) error {
d.Register(doctor.NewOrphanProcessCheck())
d.Register(doctor.NewBranchCheck())
d.Register(doctor.NewBeadsSyncOrphanCheck())
d.Register(doctor.NewIdentityCollisionCheck())
// Ephemeral beads checks
d.Register(doctor.NewEphemeralExistsCheck())