Update role prompts to use gt handoff for session cycling (gt-yt6g)
- crew.md: Use gt handoff instead of manual mail for handoff - witness.md: Use gt handoff in Session Self-Cycling section - refinery.md: Simplify Session Self-Cycling to use gt handoff - deacon.md: Add Session Self-Cycling section with gt handoff All non-polecat roles now consistently document gt handoff as the canonical way to end sessions. Polecats use gt done (handled by 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:
@@ -63,45 +63,33 @@ gt mail send <recipient> -s "Done: <task>" -m "Summary..."
|
||||
|
||||
When your context fills up, you can cycle to a fresh session while preserving state.
|
||||
|
||||
### Manual Handoff
|
||||
### Using gt handoff (Canonical Method)
|
||||
|
||||
Send a handoff mail to yourself:
|
||||
The canonical way to end any agent session:
|
||||
|
||||
```bash
|
||||
gt mail send {{ rig }}/{{ name }} -s "HANDOFF: Work in progress" -m "
|
||||
## Current State
|
||||
|
||||
Working on: <issue-id or description>
|
||||
Branch: <current branch>
|
||||
gt handoff # Basic handoff
|
||||
gt handoff -s "Work in progress" -m "
|
||||
Working on: <issue-id>
|
||||
Status: <what's done, what remains>
|
||||
|
||||
## Next Steps
|
||||
|
||||
1. <first thing to do>
|
||||
2. <second thing to do>
|
||||
|
||||
## Notes
|
||||
|
||||
<any important context>
|
||||
Next: <what to do next>
|
||||
"
|
||||
```
|
||||
|
||||
Then end your session. The next session will see this message in its inbox.
|
||||
This:
|
||||
1. Sends handoff mail to yourself (with optional context via -s/-m flags)
|
||||
2. Respawns with fresh Claude instance
|
||||
3. The SessionStart hook runs `gt prime` to restore context
|
||||
4. Work continues from your pinned molecule
|
||||
|
||||
### Using gt crew refresh
|
||||
|
||||
The overseer can trigger a clean handoff:
|
||||
The overseer can also trigger a clean handoff:
|
||||
|
||||
```bash
|
||||
gt crew refresh {{ name }}
|
||||
```
|
||||
|
||||
This:
|
||||
1. Prompts you to prepare handoff (if session active)
|
||||
2. Ends the current session
|
||||
3. Starts a fresh session
|
||||
4. The new session sees the handoff message
|
||||
|
||||
## No Witness Monitoring
|
||||
|
||||
**Important**: Unlike polecats, you have no Witness watching over you:
|
||||
@@ -193,13 +181,17 @@ Before ending your session:
|
||||
|
||||
```
|
||||
[ ] 1. git status (check for uncommitted changes)
|
||||
[ ] 2. git push (push any commits)
|
||||
[ ] 2. git add && git commit (commit any changes)
|
||||
[ ] 3. bd sync (sync beads if configured)
|
||||
[ ] 4. Check inbox (any messages needing response?)
|
||||
[ ] 5. HANDOFF if incomplete:
|
||||
gt mail send {{ rig }}/{{ name }} -s "🤝 HANDOFF: ..." -m "..."
|
||||
[ ] 4. git push (push to remote - CRITICAL)
|
||||
[ ] 5. gt handoff (hand off to fresh session)
|
||||
# Or with context: gt handoff -s "Brief" -m "Details"
|
||||
```
|
||||
|
||||
**Why `gt handoff`?** This is the canonical way to end any agent session. It
|
||||
sends handoff mail, respawns with fresh context, and your work continues from
|
||||
where you left off via your pinned molecule.
|
||||
|
||||
## Tips
|
||||
|
||||
- **You own your workspace**: Unlike polecats, you're not transient. Keep it organized.
|
||||
|
||||
@@ -92,6 +92,27 @@ When agents request lifecycle actions, process them:
|
||||
| `restart` | Kill session, fresh restart |
|
||||
| `shutdown` | Kill session, don't restart |
|
||||
|
||||
## Session Self-Cycling
|
||||
|
||||
When your context fills up (context-check step indicates HIGH):
|
||||
|
||||
1. Complete current patrol step if possible
|
||||
|
||||
2. Use `gt handoff` to cycle to a fresh session:
|
||||
```bash
|
||||
gt handoff -s "Deacon patrol cycle" -m "
|
||||
Patrol status: <completed/in-progress>
|
||||
Last action: <what you just did>
|
||||
Notes: <anything important>
|
||||
"
|
||||
```
|
||||
|
||||
**Why `gt handoff`?** This is the canonical way to end any agent session. It
|
||||
sends handoff mail, then respawns with fresh Claude instance. The SessionStart
|
||||
hook runs `gt prime` to restore your context.
|
||||
|
||||
Your molecule state survives the restart - you'll resume from your current step.
|
||||
|
||||
## Nondeterministic Idempotence
|
||||
|
||||
The Deacon uses molecule-based handoff:
|
||||
|
||||
@@ -140,9 +140,9 @@ When your context fills up (slow responses, losing track of state, high token co
|
||||
|
||||
1. **Complete current work** - finish any in-progress merge or burn the current step
|
||||
|
||||
2. **Capture state in handoff mail**:
|
||||
2. **Use `gt handoff`** to cycle to a fresh session:
|
||||
```bash
|
||||
gt mail send {{ rig }}/refinery -s "HANDOFF: Refinery session cycle" -m "
|
||||
gt handoff -s "Refinery cycle" -m "
|
||||
Queue position: <current position in queue>
|
||||
Last merged: <branch name or 'none'>
|
||||
Pending branches: <count>
|
||||
@@ -150,18 +150,9 @@ When your context fills up (slow responses, losing track of state, high token co
|
||||
"
|
||||
```
|
||||
|
||||
3. **Request lifecycle action** - send to deacon:
|
||||
```bash
|
||||
gt mail send deacon/ -s "LIFECYCLE: refinery requesting cycle" -m "Context full, requesting fresh session"
|
||||
```
|
||||
|
||||
4. **Set state flag** (if state.json exists):
|
||||
```bash
|
||||
# Mark that you're ready to be cycled
|
||||
echo '{"requesting_cycle": true}' > .runtime/refinery-state.json
|
||||
```
|
||||
|
||||
5. **Exit cleanly** - the daemon will restart you with fresh context
|
||||
**Why `gt handoff`?** This is the canonical way to end any agent session. It
|
||||
sends handoff mail, then respawns with fresh Claude instance. The SessionStart
|
||||
hook runs `gt prime` to restore your context.
|
||||
|
||||
Your molecule state survives the restart - you'll resume from your current step.
|
||||
|
||||
|
||||
@@ -269,15 +269,11 @@ Before killing ANY polecat session, verify:
|
||||
|
||||
When your context fills up (slow responses, losing track of state):
|
||||
|
||||
1. Capture current state:
|
||||
- Active workers and their status
|
||||
- Pending nudges (worker, nudge count, last nudge time)
|
||||
- Recent escalations
|
||||
- Any other relevant context
|
||||
1. Capture current state mentally (active workers, pending nudges, escalations)
|
||||
|
||||
2. Send handoff to yourself:
|
||||
2. Use `gt handoff` to cycle to a fresh session:
|
||||
```bash
|
||||
gt mail send {{ rig }}/witness -s "HANDOFF: Witness session cycle" -m "
|
||||
gt handoff -s "Witness cycle" -m "
|
||||
Active workers: <list with status>
|
||||
Pending nudges:
|
||||
- <polecat>: <nudge_count> nudges, last at <time>
|
||||
@@ -286,7 +282,9 @@ When your context fills up (slow responses, losing track of state):
|
||||
"
|
||||
```
|
||||
|
||||
3. Exit cleanly (don't self-terminate, wait for daemon)
|
||||
**Why `gt handoff`?** This is the canonical way to end any agent session. It
|
||||
sends handoff mail, then respawns with fresh Claude instance. The SessionStart
|
||||
hook runs `gt prime` to restore your context.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user