feat(spawn): Add handoff protocol to spawn priming (gt-8os8)

- Updated buildWorkAssignmentMail with handoff protocol section
- Added gt done command for polecats to signal completion
- Handoff protocol includes checklist: git clean, issue closed, beads synced, code pushed
- gt done verifies pre-flight checks before sending completion notification to Witness

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-19 23:22:27 -08:00
parent 6cfab58e86
commit df20acf782

View File

@@ -535,11 +535,11 @@ func buildSpawnContext(issue *BeadsIssue, message string) string {
sb.WriteString("\n## Workflow\n")
sb.WriteString("1. Run `gt prime` to load polecat context\n")
sb.WriteString("2. Run `bd sync --from-main` to get fresh beads\n")
sb.WriteString("3. Work on your task, commit changes\n")
sb.WriteString("3. Work on your task, commit changes regularly\n")
sb.WriteString("4. Run `bd close <issue-id>` when done\n")
sb.WriteString("5. Run `bd sync` to push beads changes\n")
sb.WriteString("6. Push code: `git push origin HEAD`\n")
sb.WriteString("7. Signal DONE with summary\n")
sb.WriteString("7. Run `gt done` to signal completion\n")
return sb.String()
}
@@ -573,11 +573,18 @@ func buildWorkAssignmentMail(issue *BeadsIssue, message, polecatAddress string)
body.WriteString("\n## Workflow\n")
body.WriteString("1. Run `gt prime` to load polecat context\n")
body.WriteString("2. Run `bd sync --from-main` to get fresh beads\n")
body.WriteString("3. Work on your task, commit changes\n")
body.WriteString("3. Work on your task, commit changes regularly\n")
body.WriteString("4. Run `bd close <issue-id>` when done\n")
body.WriteString("5. Run `bd sync` to push beads changes\n")
body.WriteString("6. Push code: `git push origin HEAD`\n")
body.WriteString("7. Signal DONE with summary\n")
body.WriteString("7. Run `gt done` to signal completion\n")
body.WriteString("\n## Handoff Protocol\n")
body.WriteString("Before signaling done, ensure:\n")
body.WriteString("- Git status is clean (no uncommitted changes)\n")
body.WriteString("- Issue is closed with `bd close`\n")
body.WriteString("- Beads are synced with `bd sync`\n")
body.WriteString("- Code is pushed to origin\n")
body.WriteString("\nThe `gt done` command verifies these and signals the Witness.\n")
return &mail.Message{
From: "mayor/",