- Add DisplayMessage/DisplayMessageDefault to tmux package for non-disruptive
status line notifications
- Change mail send to always notify recipients (not just high priority)
- Use display-message instead of send-keys to avoid disrupting agent input
- Support notifications for mayor, polecat, and refinery sessions
Closes gt-7lt
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements the agent-side lifecycle request command (gt-gby):
- Detects agent role via GT_ROLE env, tmux session, or directory
- Pre-flight checks (git clean) before retirement
- Sends handoff mail to self for context preservation
- Sends lifecycle request to manager (daemon/ for Mayor/Witness)
- Sets requesting_cycle state and waits for retirement
Usage:
gt handoff # Role-appropriate default
gt handoff --cycle # Restart with handoff mail
gt handoff --restart # Fresh restart
gt handoff --shutdown # Terminate without restart
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements the town daemon (gt-99m) that handles:
- Periodic heartbeat to poke Mayor and Witnesses
- Lifecycle request processing (cycle, restart, shutdown)
- Session management for agent restarts
Commands:
- gt daemon start: Start daemon in background
- gt daemon stop: Stop running daemon
- gt daemon status: Show daemon status and stats
- gt daemon logs: View daemon log file
The daemon is a "dumb scheduler" - all intelligence remains in agents.
It simply pokes them on schedule and executes lifecycle requests.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- ONE daemon for all Gas Town (not per-rig)
- Daemon pokes Mayor and all Witnesses (heartbeat)
- Unified gt handoff command for all agent types
- Lifecycle hierarchy: daemon → mayor/witnesses, witness → polecats/refinery
- Context-aware defaults: polecats shutdown, others cycle
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds git repository initialization for Gas Town harnesses:
1. New 'gt git-init' command for existing harnesses:
- Creates comprehensive .gitignore for Gas Town
- Initializes git repository if not present
- Optionally creates GitHub repo with --github flag
2. New flags on 'gt install':
- --git: Initialize git with .gitignore during install
- --github=owner/repo: Create and push to GitHub repo
- --private: Make GitHub repo private
The .gitignore properly excludes:
- Polecats and rig clones (recreated with gt spawn/rig add)
- Runtime state files (state.json, *.lock, registry.json)
- OS and editor files
And tracks:
- Role contexts (CLAUDE.md)
- .beads/ configuration and issues
- hop/ directory
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add Cobra aliases to match PGT abbreviation support:
- mayor → may (gt may at now works)
- session → sess
- refinery → ref
- spawn → sp
- polecat → cat
- status → stat
This enables the same abbreviated commands that worked in PGT, like
"gt may at" to attach to the Mayor session.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Auto-start Mayor session if not running (matches town mayor attach)
- Send `gt prime` after Claude starts to initialize context
- Use `exec claude` so /exit closes tmux session (no shell to return to)
- Add "may" alias for mayor command
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Auto-start Mayor session if not running (no need for gt mayor start first)
- Restart Claude if it has exited (detects shell in pane)
- Prime with gt prime after start/restart
- Refactor: extract startMayorSession helper
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Check pane_current_command to detect if Claude is still running
- If shell is detected (bash, zsh, etc.), Claude exited - restart it
- Re-prime after restart with gt prime
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Mayor has <rig>/mayor/rig/ clone (decentralized, discoverable)
- Rig .beads/ symlinks to mayor/rig/.beads (Mayor is beads authority)
- Polecats are worktrees from Mayor's clone (not Refinery)
- Updated architecture.md with new structure
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- gt crew at: auto-detect crew from cwd, run gt prime after launch
- Polecats now use git worktrees from refinery (faster than clones)
- Updated architecture.md for two-tier beads mail model
- Town beads (gm-*) for Mayor mail/coordination
- Rig .beads/ symlinks to refinery/rig/.beads
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The beads command for messaging is 'bd message', not 'bd mail'.
Fixed 4 locations:
- mailbox.go: inbox, read, ack commands
- router.go: send command (also fixed arg order to match bd API)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Implement AddRig with container-based approach (rig root is NOT a clone)
- Create internal/cmd/rig.go with add/list/remove subcommands
- Clone repo into refinery/rig/, mayor/rig/, crew/main/
- Initialize rig-level .beads/ with derived prefix
- Update docs/architecture.md to match implementation
- File gt-jpt epic for town-level beads redesign
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements gt-f9x.3: Create Gas Town workspace structure.
The install command creates a new harness (workspace) with:
- config/town.json - Town configuration with name and version
- config/rigs.json - Empty rigs registry
- mayor/ - Mayor agent home with:
- CLAUDE.md - Mayor role context from template
- config.json - Distinguishes town-level mayor
- mail/inbox.jsonl - Empty inbox
- state.json - Initial state
- .beads/redirect - Placeholder for default beads location
Usage:
gt install ~/gt # Create at path
gt install . --name mytown # Current dir with name
gt install ~/gt --no-beads # Skip beads setup
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fixes gt-e5o: When a rig has its own mayor/ directory, workspace
detection now continues searching upward for primary markers.
Changes:
- Add AlternativePrimaryMarker (mayor/config.json) to distinguish
town-level mayor from rig-level mayor clones
- Continue searching after finding secondary marker (mayor/) to
prefer primary matches higher in the tree
- Return the first secondary match only if no primary is found
This fixes role detection for polecats/refinery/witness when running
from within a rig that has its own mayor/ clone.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements gt-u1j.20: Prompt templates using go:embed.
- Add internal/templates package with embedded .md.tmpl files
- Role templates: mayor, witness, refinery, polecat, crew
- Message templates: spawn, nudge, escalation, handoff
- Update gt prime to use templates with fallback to hardcoded output
- Add crew role detection for <rig>/crew/<name>/ paths
- Include Gas Town architecture overview in all role contexts
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds health check framework with Check interface, Doctor runner,
and gt doctor CLI command.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
- Add 'gt mail check' with --inject flag for Claude Code hooks
- Update Mayor prime output to include mail commands and startup info
- Enables full cutover from PGT 'town' commands to GGT 'gt' commands
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Complete the mayor command set for GGT cutover.
Now have: start, stop, attach, status, restart.
Skipped wake-queue as it's part of the pooling model
being deprecated in favor of ephemeral polecats (gt-7ik).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add doctor package with:
- Check interface for implementing health checks
- CheckContext for passing context to checks
- CheckResult and CheckStatus types
- Report with summary and pretty printing
- Doctor runner with Run() and Fix() methods
- BaseCheck and FixableCheck for easy check implementation
- CLI command: gt doctor [--fix] [--verbose] [--rig <name>]
Built-in checks will be added in:
- gt-f9x.5: Town-level checks (config, state, mail, rigs)
- gt-f9x.6: Rig-level checks (refinery, clones, gitignore)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add four new commands for managing the Mayor tmux session:
- gt mayor start - Start the Mayor session
- gt mayor attach - Attach to running session
- gt mayor stop - Stop the session
- gt mayor status - Check if session is running
This allows full replacement of PGT's town mayor commands.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use errors.Is() instead of direct error comparison
- Add warning output when listing polecats fails for a rig
- Remove extra blank line
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update MRStatus to use beads-style statuses (open, in_progress, closed)
- Add CloseReason enum for tracking why MRs were closed
- Implement ValidateTransition() to enforce valid state transitions:
- open → in_progress (Engineer claims MR)
- in_progress → closed (merge success or rejection)
- in_progress → open (failure, reassign to worker)
- open → closed (manual rejection)
- closed → anything is blocked (immutable once closed)
- Add convenience methods: Claim(), Close(), Reopen(), SetStatus()
- Add status check methods: IsClosed(), IsOpen(), IsInProgress()
- Update ProcessMR and completeMR to use new state transition methods
- Update display code to handle new status values
- Add comprehensive tests for state transitions
Reference: docs/merge-queue-design.md#state-machine
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements gt polecat subcommands for managing polecats in rigs:
- list: Show polecats with state, issue, and session status
- add: Create new polecat with clone and work branch
- remove: Delete polecat (checks for running session, uncommitted changes)
- wake: Transition idle → active
- sleep: Transition active → idle (checks for running session)
Resolves: gt-u1j.17
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>