- Add gt polecat check-recovery command to check cleanup_status from agent bead
- Update gt polecat nuke to block on polecats with unpushed work (use --force to override)
- Add EscalateRecoveryNeeded function for RECOVERY_NEEDED escalations
- Update Witness template with dormant polecat recovery protocol
Prevents accidental data loss when cleaning up dormant polecats that have
unpushed commits. The Witness should now use check-recovery before nuking
and escalate NEEDS_RECOVERY cases to the Mayor.
(gt-cloml)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Parent commands (mol, mail, crew, polecat, etc.) previously showed help
and exited 0 for unknown subcommands like "gt mol foobar". This masked
errors in scripts and confused users.
Added requireSubcommand() helper to root.go and applied it to all parent
commands. Now unknown subcommands properly error with exit code 1.
Example before: gt mol unhook → shows help, exits 0
Example after: gt mol unhook → "Error: unknown command "unhook"", exits 1
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Clarifies the identity model:
- Human identity is global (email from git author)
- Polecats are ephemeral executors, not persistent identities
- Skills are derived from work evidence, not stored
- Multi-town aggregation via email
See docs/hop/decisions/008-identity-model.md for rationale.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Examples:
gt crew add murgen croaker goblin # Create all three
gt crew add dave # Still works for single
- Continues on failure (warns but doesn't abort)
- Shows summary at end
- Existing workspaces skipped with warning
- Rig add now creates empty crew/ directory with README
- Crew members must be added explicitly with 'gt crew add <name>'
- Removed --crew flag from rig add command
- Updated help text and output to reflect new behavior
This gives users control over crew member names rather than defaulting to 'max'.
Agents weren't auto-executing after gt handoff because the SessionStart
hook only outputs text - it doesn't inject a prompt. Claude needs actual
user input to trigger a response.
The fix: pass "gt prime" as an argument to claude, just like gt crew at
already does. This treats the argument as the first user prompt, which
triggers GUPP execution immediately.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add DefaultBranch() method to git package to detect repo's default branch
- Store default_branch in rig config.json
- Use detected branch for refinery worktree instead of hardcoding 'main'
- Add LoadRigConfig() to read rig config
- Display correct branch name in rig add output
Fixes wyvern rig creation (uses 'master' not 'main').
Agent beads must use gt- prefix (required by beads validation).
Only issue beads use rig-specific prefixes (ga-, bd-, etc.).
Fixed in:
- crew_add.go: Use CrewBeadID() not CrewBeadIDWithPrefix()
- prime.go: Use non-prefix variants for all agent types
- sling.go: Use non-prefix variants for all agent types
This fixes 'invalid agent ID' error when creating crew in rigs
with non-gt prefix (e.g., gastown with ga- prefix).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Convoy: Persistent tracking unit for batched work across rigs
- Swarm: Ephemeral workers on a convoy (no separate tracking)
Changes:
- docs/convoy.md: New comprehensive convoy documentation
- docs/swarm.md: Updated to explain ephemeral nature
- docs/reference.md: Replace swarm section with convoy commands
- internal/cmd/convoy.go: Clarify help text
- internal/cmd/swarm.go: Mark as deprecated
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Molecule for coordinated workspace sync across agents:
- Git pull/rebase with conflict preservation
- Beads sync and doctor check
- Build/test verification
- Worktree cleanup
- Readiness reporting
Designed for broadcast to all agents before batch assignments.
Cherry-picked from 77f9da07 - work that was done but never merged to main.
Found during orphan audit: 73 commits identified as potentially lost work.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements `gt worktree list` to show all cross-rig worktrees owned
by the current crew member. Scans all rigs and shows git status
summary for each worktree found.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Work is NOT landed until it's either on main or in the Refinery MQ.
Feature branches are dangerous in multi-agent environments - the repo
baseline can diverge wildly in hours.
Add documentation for crew workers using cross-rig worktrees:
- Added Cross-Rig Worktrees section to crew.md.tmpl template
- Created docs/understanding-gas-town.md with role taxonomy
Key points documented:
- Crew vs Dogs distinction (dogs = Deacon infra, not user work)
- Identity preservation across rigs (BD_ACTOR stays the same)
- When to use worktrees vs dispatch to local workers
- Directory structure convention: ~/gt/<rig>/crew/<source-rig>-<name>/
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Using "greenplace" (The Green Place from Mad Max: Fury Road) as the
canonical example project/rig name in documentation and help text.
This provides a clearer distinction from the actual gastown repo name.
Changes:
- docs/*.md: Updated all example paths and commands
- internal/cmd/*.go: Updated help text examples
- internal/templates/: Updated example references
- Tests: Updated to use greenplace in example session names
Note: Import paths (github.com/steveyegge/gastown) and actual code
paths referencing the gastown repo structure are unchanged.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements the gt worktree <rig> command that allows crew workers to
create worktrees in other rigs for cross-rig work while maintaining
their identity.
Features:
- Detects crew identity from cwd (requires crew/ directory)
- Creates worktree at <target-rig>/crew/<source-rig>-<name>/
- Sets up git config for identity preservation
- Handles edge cases: already exists, rig not found, wrong role
Usage: gt worktree beads (from gastown/crew/joe → beads/crew/gastown-joe/)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Inject an identity beacon as the first message when Gas Town starts Claude
sessions. This beacon becomes the session title in Claude Code '/resume
picker, enabling workers to find their predecessor sessions for debugging.
Beacon format: [GAS TOWN] <address> • <mol-id or "ready"> • <timestamp>
Examples:
- [GAS TOWN] gastown/crew/max • gt-abc12 • 2025-12-30T14:32
- [GAS TOWN] gastown/polecats/Toast • ready • 2025-12-30T09:15
- [GAS TOWN] deacon • patrol • 2025-12-30T08:00
Workers can now press / in /resume picker and search for their address
(e.g., "gastown/crew/max") to see all predecessor sessions.
Note: Respawn-loop agents (deacon/refinery via up.go) skip beacon injection
since Claude restarts multiple times - would need post-restart injection.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When spawning polecats in rigs with custom prefixes (e.g., beads uses bd-
instead of gt-), agent beads were being created with hardcoded gt- prefix,
causing warnings like issue ID gt-beads-polecat-obsidian does not match
configured prefix bd.
Changes:
- polecat/manager.go: agentBeadID() now looks up the rigs configured prefix
from routes.jsonl via beads.GetPrefixForRig()
- prime.go: getAgentBeadID() now uses prefix lookup for rig-level agents
(witness, refinery, polecat, crew)
Town-level agents (mayor, deacon) continue to use gt- prefix as expected.
The --notify flag on gt convoy create was captured but never used.
This fix:
1. Stores the notify address in a bd slot when convoy is created
2. Adds 'gt convoy notify <convoy-id>' command that:
- Reads the notify slot
- Sends mail to the configured address with convoy completion details
- Does nothing gracefully if no notification was configured
The convoy-cleanup formula can now call 'gt convoy notify {{convoy}}'
to trigger the configured notification when a convoy completes.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Polecats for a rig now cycle among themselves, like crew members.
Session groups are now:
- Town: Mayor ↔ Deacon
- Crew: All crew in same rig
- Rig infra: Witness ↔ Refinery
- Polecats: All polecats in same rig
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
New command that queries work history across multiple sources:
- Git commits authored by an actor
- Beads created/closed by an actor
- Town log events (spawn, done, handoff, etc.)
- Activity feed events
Supports --actor for filtering, --since for time range, --json for
machine-readable output, and -n/--limit for result count.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create() function now defaults Actor from BD_ACTOR env var when not provided
- CreateAgentBead() now passes --actor flag from BD_ACTOR for provenance tracking
- This ensures created_by is populated on all issue creation paths
Affects: merge requests, escalations, digests, agent beads, molecule steps
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>