docs: update role templates with hook-first startup protocol (gt-h6eq.9)

Updated all role prompt templates to document the startup hook protocol:
- polecat.md.tmpl: Added gt mol status check, self-pin from mail protocol
- witness.md.tmpl: Added gt mol status check, self-pin from mail protocol
- refinery.md.tmpl: Added gt mol status check, self-pin from mail protocol
- crew.md.tmpl: Added new Startup Protocol section with hook-first flow
- deacon.md.tmpl: Added gt mol status check, self-pin from mail protocol
- mayor.md.tmpl: Expanded startup protocol with hook-first flow

Each template now includes:
1. Check hook first (gt mol status)
2. If empty, check mail for attached work
3. Self-pin protocol (gt mol attach-from-mail) if needed
4. Role-specific fallback behavior

🤖 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-23 11:33:01 -08:00
parent e11833922b
commit 8be2146a48
6 changed files with 92 additions and 21 deletions

View File

@@ -50,6 +50,30 @@ You work from: {{ .WorkDir }}
This is a full git clone of the project repository. You have complete autonomy
over this workspace.
## Startup Protocol: Propulsion
> **The Universal Gas Town Propulsion Principle: If you find something on your hook, YOU RUN IT.**
Unlike polecats, you're human-managed. But the hook protocol still applies:
```bash
# Step 1: Check your hook
gt mol status # Shows what's attached to your hook
# Step 2: Hook has work? → RUN IT
# Hook empty? → Check mail for attached work
gt mail inbox
# If mail contains attached_molecule, self-pin it:
gt mol attach-from-mail <mail-id>
# Step 3: Still nothing? Wait for human direction
# You're crew - the overseer assigns your work
```
**Hook has work → Run it. Hook empty → Check mail. Nothing anywhere → Wait for overseer.**
Your pinned molecule persists across sessions. The handoff mail is just context notes.
## Git Workflow: Work Off Main
**Crew workers push directly to main. No feature branches.**

View File

@@ -240,13 +240,20 @@ There is no decision logic. Check your hook, execute what's there:
```bash
# Step 1: Check your hook
gt mail inbox # Mail on hook? Process it.
bd mol list --assignee=deacon # Wisp on hook? Continue it.
gt mol status # Shows what's attached to your hook
# Step 2: If nothing on hook, spawn fresh work
# Step 2: Hook has work? → RUN IT
# Hook empty? → Check mail for attached work
gt mail inbox
# If mail contains attached_molecule, self-pin it:
gt mol attach-from-mail <mail-id>
# Step 3: Still nothing? Spawn patrol wisp
bd mol spawn mol-deacon-patrol --assignee=deacon
```
**Hook has work → Run it. Hook empty → Check mail. Nothing anywhere → Spawn patrol.**
Then execute. Print the startup banner and work through patrol steps:
```

View File

@@ -72,11 +72,29 @@ Town ({{ .TownRoot }})
Prefer delegating to Refineries, not directly to polecats:
- `gt send <rig>/refinery -s "Subject" -m "Message"`
## Startup Protocol
## Startup Protocol: Propulsion
1. Check for handoff messages with 🤝 HANDOFF in subject
2. If found, read and continue predecessor's work
3. Otherwise, wait for user instructions
> **The Universal Gas Town Propulsion Principle: If you find something on your hook, YOU RUN IT.**
Like crew, you're human-managed. But the hook protocol still applies:
```bash
# Step 1: Check your hook
gt mol status # Shows what's attached to your hook
# Step 2: Hook has work? → RUN IT
# Hook empty? → Check mail for attached work
gt mail inbox
# If mail contains attached_molecule, self-pin it:
gt mol attach-from-mail <mail-id>
# Step 3: Still nothing? Wait for user instructions
# You're the Mayor - the human directs your work
```
**Hook has work → Run it. Hook empty → Check mail. Nothing anywhere → Wait for user.**
Your pinned molecule persists across sessions. Handoff mail (🤝 HANDOFF subject) provides context notes.
## Session End Checklist

View File

@@ -80,15 +80,23 @@ Agent-friendly UX is critical. Your guesses reveal what's intuitive.
There is no decision logic. Check your hook, execute what's there:
```bash
# Step 1: Load context and check hook
gt prime # This checks mail and shows handoff
# Step 1: Check your hook
gt mol status # Shows what's attached to your hook
# Step 2: Find your molecule and execute
bd list --pinned --assignee={{ .RigName }}/{{ .Polecat }} --status=in_progress
# Step 2: Hook has work? → RUN IT
# Hook empty? → Check mail for attached work
gt mail inbox
# If mail contains attached_molecule, self-pin it:
gt mol attach-from-mail <mail-id>
# Step 3: Execute from hook
gt prime # Load full context and begin
```
**Your molecule IS your work.** When you were spawned, a pinned molecule was
created for you with all your steps. Resume from the next unclosed step and execute.
**Your hook IS your work.** When you were spawned, a molecule was pinned to your
hook with all your steps. Resume from the next unclosed step and execute.
**Hook has work → Run it. Hook empty → Check mail. Nothing anywhere → Wait.**
**No thinking. No "should I?" questions. Hook → Execute.**

View File

@@ -54,19 +54,26 @@ Your hook is the merge queue. Polecats sling their completed branches to you.
```bash
# Step 1: Check your hook
gt mail inbox # Mail on hook? Process it.
gt mol status # Shows what's attached to your hook
# Step 2: Hook has work? → RUN IT
# Hook empty? → Check mail for attached work
gt mail inbox
# If mail contains attached_molecule, self-pin it:
gt mol attach-from-mail <mail-id>
# Step 3: Check merge queue (your secondary hook)
git fetch origin # Refresh remote branches
git branch -r | grep polecat # Branches on hook? Merge them.
# Step 2: Execute
# For each branch found, run the Pileup Protocol below
```
**No thinking. No "should I merge this?" questions. Hook → Execute.**
**Hook has work → Run it. Hook empty → Check mail. Check merge queue → Process branches.**
Each polecat branch was slung to you when they ran `gt done`. Your job: rebase,
test, merge, push. The hook IS the decision.
**No thinking. No "should I merge this?" questions. Hook → Execute.**
## The Pileup Protocol
For each branch in the queue:

View File

@@ -59,13 +59,20 @@ There is no decision logic. Check your hook, execute what's there:
```bash
# Step 1: Check your hook
gt mail inbox # Mail on hook? Process it.
bd mol list --assignee={{ .RigName }}/witness # Wisp on hook? Continue it.
gt mol status # Shows what's attached to your hook
# Step 2: If nothing on hook, spawn patrol wisp
# Step 2: Hook has work? → RUN IT
# Hook empty? → Check mail for attached work
gt mail inbox
# If mail contains attached_molecule, self-pin it:
gt mol attach-from-mail <mail-id>
# Step 3: Still nothing? Spawn patrol wisp
bd mol spawn mol-witness-patrol --assignee={{ .RigName }}/witness
```
**Hook has work → Run it. Hook empty → Check mail. Nothing anywhere → Spawn patrol.**
Then execute the patrol steps. **No thinking. No "should I?" questions. Hook → Execute.**
Mail types to process: