When creating a polecat worktree, create a .beads/redirect file pointing
to the rig-level shared beads database. This eliminates git sync overhead
between polecats - they all connect to the same daemon and database.
Architecture:
gastown/
.beads/ <- Shared database (created if missing)
polecats/
nux/
.beads/
redirect <- Contains "../../.beads"
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add gt-zhpa epic: VC Pattern Integration (6 child tasks)
Extracted validated ideas from ~/src/vc that map to Gas Town primitives
- Close gt-5af: Deacon epic as over-engineered
Problem solved by hooks + gt prime
- Create lightweight successors:
- gt-htto: Heartbeat convention
- gt-bnch: Human escalation
- Disable beads MCP plugin for Gas Town
CLI works; MCP adds complexity without value
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Crew workers are trusted maintainers who push directly to main:
- Own their clones (no isolation needed)
- Fast work cycles (10-15 min) make branch overhead wasteful
- Branches go stale with context cycling
- Polecats use branches/MRs; crew does not need review
Also updated two-level beads docs (removed stale rig-level references).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- molecule.go: Use findLocalBeadsDir() for project-level beads
- statusline.go: Use findMailWorkDir() for mail count (town beads)
Part of two-level beads architecture cleanup.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace complex address-based routing with simple town root lookup.
All mail goes to ~/gt/.beads/ (town beads), eliminating the broken
rig-level routing.
Two-level model:
- Town beads (~/gt/.beads/): ALL mail and coordination
- Clone beads (<rig>/crew/*/.beads/): Project issues only
Fixes: gt-4qey
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add Pinned field to BeadsMessage and sort pinned messages before
unpinned ones in listBeads(). Within each group, sort by newest first.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace `bd mail send/inbox/read/ack` commands with `bd create/list/show/close`.
This separates the orchestration layer (gt) from the data plane (beads).
Changes:
- router.go: Use `bd create --type=message` instead of `bd mail send`
- mailbox.go: Use `bd list --type=message` and `bd show` for inbox/read
- types.go: Parse metadata from labels (from:, thread:, reply-to:)
- mail.go: Fix findBeadsWorkDir to prefer rig-level beads, fix crew address format
Messages are now stored as beads issues with type=message. Metadata (sender,
thread, reply-to) is stored in labels for retrieval.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add comprehensive uncommitted work checks before any polecat cleanup:
- Check for uncommitted changes (modified/untracked files)
- Check for stashes
- Check for unpushed commits
Affected commands:
- gt polecat remove: now refuses if uncommitted work exists
- gt rig shutdown: checks all polecats before shutdown
- Witness cleanup: refuses to clean polecats with uncommitted work
- gt spawn: warns if spawning to polecat with uncommitted work
Safety model:
- --force: bypasses uncommitted changes check only
- --nuclear: bypasses ALL safety checks (will lose work)
New git helpers:
- StashCount(): count stashes in repo
- UnpushedCommits(): count commits not pushed to upstream
- CheckUncommittedWork(): comprehensive work status check
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add --all flag to remove all polecats from a rig: `gt polecat remove gastown --all`
- Support multiple rig/polecat args: `gt polecat remove gastown/A gastown/B`
- Report summary of removed polecats and any failures
- Validate that --all is not used with rig/polecat format
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements the core Witness functionality:
- gt witness start: Creates tmux session with Claude, theming, auto-priming
- gt witness stop: Kills tmux session and updates state
- gt witness status: Shows session state reconciled with tmux
- Shutdown handler: Verifies git clean state before cleanup, sends nudges
- Auto-spawn: Spawns polecats for ready work up to configurable capacity
- Health checks: Monitors polecat activity, nudges stuck workers, escalates
Also updates handoff to include polecat name in lifecycle requests.
Closes: gt-53w6, gt-mxyj, gt-5wtw, gt-cpm2, gt-es1i
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When a polecat runs `gt handoff` (default: shutdown action), the current
branch is now automatically submitted to the merge queue if it follows
the polecat/<name>/<issue> naming convention.
This streamlines the polecat workflow:
- Work on assigned issue
- Commit changes
- Run `gt handoff` (automatically submits MR + retires)
The Refinery will process the merge request. If MR submission fails,
a warning is printed but handoff continues.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implement MoleculeCatalog for loading molecules from multiple sources:
1. Built-in molecules (shipped with the gt binary)
2. Town-level: <town>/.beads/molecules.jsonl
3. Rig-level: <rig>/.beads/molecules.jsonl
4. Project-level: .beads/molecules.jsonl
Changes:
- Add internal/beads/catalog.go with MoleculeCatalog type
- Update gt molecule list to show source (builtin, town, rig, project, database)
- Update gt molecule show to check catalog first, then database
- Update gt molecule instantiate to check catalog first
- Add gt molecule export command to export built-in molecules to JSONL
- Add --catalog and --db flags to gt molecule list
The catalog enables organizations to share molecule templates
independently of work item tracking, and allows customization
at different levels of the workspace hierarchy.
Closes gt-0ei3.
Generated with Claude Code
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add two new health checks to gt doctor:
1. orphan-sessions: Detects Gas Town tmux sessions (gt-*) that do not
match expected patterns (mayor, deacon, rig-witness, rig-refinery,
rig-polecat). Validates rig names against actual workspace structure.
2. orphan-processes: Detects Claude/claude-code processes without a
tmux parent. Walks process tree to find orphaned instances that
may be consuming resources.
Both checks support --fix to clean up detected orphans:
- Kills orphaned tmux sessions
- Sends SIGINT (then SIGKILL) to orphaned processes
Closes gt-qsvq.
Generated with Claude Code
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add `gt done` command as a convenience wrapper for polecats to signal
their work is ready for the merge queue. This addresses the missing
command referenced in polecat docs.
The command:
- Submits current branch to merge queue (same as gt mq submit)
- Auto-detects issue ID from branch name (polecat/<worker>/<issue>)
- Auto-detects integration branch if source issue has epic parent
- Provides polecat-friendly output messaging
Closes gt-qna4.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- gt-dsfi: Add periodic warning messages to handoff wait instead of
blocking forever with select{}. After 2 minutes, shows hints about
checking daemon/witness status and how to abort.
- gt-n7z7: Skip tmux session existence check when in foreground mode.
When background mode spawns foreground mode inside a tmux session,
the foreground check would find its own session and return "already
running". Now only checks PID when in foreground mode.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The sync-branch setting is up to the project's .beads/config.yaml,
not something Gas Town should force. Projects can use bd doctor --fix
to configure sync-branch if they want multi-clone coordination.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>