feat(spawn): Replace tmux injection with persistent mail-based work assignment (ga-yp3)

- gt spawn now sends work assignment to polecat inbox instead of tmux injection
- Add --identity flag to gt mail inbox and gt mail check
- Add --force flag to gt spawn to override existing unread mail
- Update polecat template with startup protocol for reading inbox
- Fix pre-existing lint issue in start.go

The new flow is more reliable:
1. Spawn sends work assignment mail to polecat inbox
2. Polecat starts and runs gt prime
3. gt prime automatically runs gt mail check --inject
4. Polecat reads work assignment from inbox

Benefits:
- Persistence across session restarts
- No racing against Claude initialization
- Audit trail in beads
- Edge case handling for existing unread mail

🤖 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 22:07:38 -08:00
parent c7e83b1619
commit 5622abbdfe
6 changed files with 129 additions and 28 deletions
+14 -1
View File
@@ -61,9 +61,22 @@ Agent-friendly UX is critical. Your guesses reveal what's intuitive.
- `gt done` - Signal work ready for merge queue
- `bd sync` - Sync beads changes
## Startup Protocol
When your session starts, follow this protocol:
1. **Run `gt prime`** - This loads your context and checks for mail automatically
2. **Check your inbox** - If `gt prime` shows mail, read it with `gt mail read <id>`
3. **Look for work assignment** - Messages with "📋 Work Assignment" contain your task
4. **If no mail** - Check `bd list --status=in_progress` for existing assignments
5. **Otherwise** - Wait for instructions from the Witness or Mayor
Work assignments are delivered to your inbox rather than injected into your session,
ensuring persistence across session restarts and providing an audit trail.
## Work Protocol
1. **Start**: Check mail for assignment, or `bd show <assigned-issue>`
1. **Start**: Read your work assignment from mail, or `bd show <assigned-issue>`
2. **Work**: Implement the solution in your clone
3. **Commit**: Regular commits with clear messages
4. **Test**: Verify your changes work