TUI improvements for Christmas launch:
- Add phase transition table and lifecycle diagram to `gt molecule --help`
- Add swarm lifecycle diagram to `gt swarm --help`
- Add mail routing diagram to `gt mail --help`
- Add sling mechanics diagram to `gt sling --help`
- Create Lipgloss table helper (internal/style/table.go)
- Migrate mq_list to use styled tables with color-coded priorities
- Migrate molecule list to use styled tables
- Add fuzzy matching "did you mean" suggestions for polecat not found errors
- Add suggest package with Levenshtein distance implementation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create internal/claude package with embedded settings templates
- settings-autonomous.json: gt prime && gt mail check --inject (SessionStart)
- settings-interactive.json: gt prime only (SessionStart)
- Update witness.go: EnsureSettings before session, remove broken gt prime injection
- Update refinery/manager.go: EnsureSettings before session, remove broken NudgeSession
- Update session/manager.go: EnsureSettings for polecats, remove broken issue injection
All autonomous roles (polecat, witness, refinery) now get proper SessionStart hooks
automatically when their sessions are created. No more timing-based gt prime injection.
- Remove 3-second sleep and NudgeSession from spawn.go
(Claude takes 10-20s to initialize, message arrived too early)
- Add trigger-pending-spawns step to deacon patrol molecule
(Deacon polls with WaitForClaudeReady, sends trigger when ready)
- SessionStart hook handles gt prime (internal, reliable)
- Deacon sends minimal 'Begin.' trigger to start polecat working
The spawn command now returns immediately after starting the session.
The deacon's patrol cycle will trigger the polecat when it's ready.
Detects when multiple gt-* tmux sessions share the same pane,
which causes messages sent to one session to appear in another.
This catches the bug where gt-deacon and gt-mayor shared a pane,
causing daemon heartbeats to appear as user input in the Mayor.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Updates crew worker startup to detect and auto-continue attached molecules:
- prime.go: Add outputCrewAttachmentStatus() that detects pinned beads
with attached molecules and outputs "AUTO-CONTINUE MODE" directive
- prime.go: Update startup directive to explain the auto-continue pattern
- crew.md: Add "Session Wisp Model" section documenting autonomous work
Key insight: if attached work exists, continue without awaiting input.
This enables overnight autonomous work on long molecules.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When 'gt X attach' is run from inside a tmux session, link the target
session's window as a new tab instead of switching sessions entirely.
Use C-b n/p to navigate between tabs.
Outside tmux: unchanged behavior (full attach)
Inside tmux: links window as tab for convenient multi-session viewing
- Add tmux.LinkWindow() and tmux.IsInsideTmux()
- Update attachToTmuxSession() with smart detection
- Update mayor, deacon, crew, refinery attach commands
Adds --stale flag to gt rig reset that:
- Lists all in_progress issues
- Checks if assignee tmux session exists
- Resets orphans to open status with empty assignee
- Skips crew/* assignees (persistent identities)
Also adds --dry-run flag to preview what would be reset.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use attachToTmuxSession helper instead of tmux.AttachSession to properly
forward stdin/stdout/stderr when attaching.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Like gt crew at and gt mayor at, gt refinery attach now auto-starts
the refinery session if it is not already running.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
All gt refinery subcommands (start, stop, status, queue, attach) now
accept an optional rig argument. If not provided, the rig is inferred
from the current working directory.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- gt mol catalog: list available molecule protos
- gt mol burn: burn current molecule without digest
- gt mol squash: compress molecule into digest
- Wire --wisp flag in gt sling to use .beads-wisp/ storage
- Add IsWisp field to MoleculeContext
- Update prompts/roles/deacon.md with correct commands
Closes: gt-x74c, gt-9t14, gt-i4i2
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The unified work dispatch command that implements spawn + assign + pin
in one operation, based on the Universal Gas Town Propulsion Principle:
"If you find something on your hook, YOU RUN IT."
Supports:
- Proto names (e.g., gt sling feature polecat/alpha)
- Issue IDs with optional molecule (e.g., gt sling gt-xyz polecat/beta -m bugfix)
- Target addressing (polecat/name, deacon/, witness/, refinery/)
- --wisp flag for ephemeral molecules
- --force flag for hook collision override
- Hook collision detection
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add `gt mol status [target]` command to show what's on an agent's hook:
- Auto-detects current agent from working directory
- Shows pinned bead and attached molecule info
- Displays phase progress with progress bar
- Indicates wisp vs durable molecules
- Provides next action hints
Also adds `mol` alias for the `molecule` command.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds gt peek as ergonomic alias for gt session capture:
gt peek gastown/furiosa # Last 100 lines
gt peek gastown/furiosa 50 # Last 50 lines
Creates nudge/peek pair as canonical session interface:
gt nudge - send TO session (reliable delivery)
gt peek - read FROM session (capture-pane wrapper)
Adds docs/session-communication.md explaining:
- Why raw tmux send-keys is unreliable for Claude
- The reliable NudgeSession pattern (literal + delay + Enter)
- Command reference and common patterns
- Guidance for template authors
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Now accepts ergonomic rig/polecat addresses:
gt nudge gastown/furiosa "Check your mail"
Still supports raw session names for legacy use.
Reuses parseAddress and getSessionManager from session.go.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add doctor checks for new config architecture:
- SettingsCheck: Verify rigs have settings/ directory
- RuntimeGitignoreCheck: Verify .runtime/ is gitignored
- LegacyGastownCheck: Detect/remove old .gastown/ dirs
- Update .gitignore to include .runtime/
- Update architecture.md with new directory structure
- Update hq.md to clarify PGT vs GGT config locations
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- .beads-ephemeral/ -> .beads-wisp/
- Rename doctor checks: EphemeralCheck -> WispCheck
- Update all docs to use 'transient' for polecats, 'wisp' for molecules
- Preserve 'ephemeral' only as descriptive adjective for wisps
- Steam engine metaphor: wisps are steam vapors that dissipate
Part of Christmas launch wisp terminology unification.
- Add --all/-a flag to apply themes across all rigs, not just current
- Add proper handling for deacon and witness sessions in theme apply
- Fix crew status line to show full path: rig/crew/name
Previously, gt theme apply only applied to sessions in the current rig,
and skipped deacon/witness sessions due to different naming patterns.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The role icon is already shown on the left side of the status bar,
so repeating it on the right wastes space. Removed from:
- Mayor (🎩)
- Deacon (🦉)
- Witness (👁)
- Refinery (🏭)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- internal/lock: New package with PID-based lockfiles for worker identity
- gt prime: Acquire identity lock for crew/polecat roles, fail on collision
- gt agents check: Detect stale locks and identity collisions
- gt agents fix: Clean up stale locks
- gt doctor: New identity-collision check with --fix support
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Deacon:
- Now shows both rig count and polecat count
- Added mail preview (40 chars)
Witness:
- Shows polecat count and crew count (if any)
- Added mail preview (35 chars)
Refinery:
- Shows current item being merged (issue ID) instead of generic +1
- Shows queue count when items pending
- Added mail preview (30 chars)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Added GetPaneWorkDir to tmux package to get pane current directory
- Added getCurrentWork helper that queries beads for in_progress issues
- Worker status line now shows first in_progress issue (ID: title)
- Falls back to GT_ISSUE env var if set, or empty if no work in progress
- Truncated to 40 chars to fit status bar
Example: 👷 gt-44wh: Polecats must not create GitHu… |
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Left side simplified:
- Before: 🎩 [Mayor] coordinator (25+ chars)
- After: 🎩 Mayor (10 chars)
- Icon already identifies role, no need for redundancy
Right side expanded:
- status-right-length: 50 → 80
- Mail preview: 20-25 → 45 chars
- Shows more useful context at a glance
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Instead of just showing unread count, display truncated subject of first
unread message directly in the status bar. More useful than click-to-view
since terminal mouse support varies.
- Mayor: 20 char limit for subject preview
- Worker (crew/polecat): 25 char limit
- Falls back to count if subject unavailable
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- New `gt mail peek` command shows compact preview of first unread message
- Left-click on status-right (mail icon area) opens popup with mail preview
- Popup shows subject, sender, body preview (truncated to 500 chars)
- Shows count of additional unread messages if any
- Silent exit (code 1) when no unread mail
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Witness sessions use format gt-witness-<rig> but categorizeSession was
parsing them as gt-<rig>-<type>, incorrectly setting Rig="witness".
This caused the mayor status line to count "witness" as a third rig.
Added special case to handle gt-witness-<rig> format before the generic
rig-level parsing. Also updated tests to cover both actual and legacy formats.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace 95 lines of custom molecule instantiation with bd mol run:
- No more ephemeral beads layer
- No more manual molecule template handling
- bd mol run handles spawning, assignment, and pinning
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add getRig() helper in rig_helpers.go that encapsulates the common
boilerplate for finding town root, loading rigs config, and retrieving
a rig. This reduces duplication across 5 get*Manager functions:
- getPolecatManager
- getSessionManager
- getCrewManager
- getRefineryManager
- getWitnessManager
Closes gt-7sqi.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fixes gt-b6qm: redirect files can get deleted by git clean, causing
"no beads database found" errors.
Changes:
- crew.Manager.Add() now creates .beads/redirect during setup
- gt prime regenerates missing redirects silently on startup
The redirect points to the shared beads database at either:
- rig/mayor/rig/.beads/ (preferred)
- rig/.beads/ (fallback)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
CRITICAL FIX: Both `gt done` and `gt mq submit` were creating MR
records without pushing the branch to origin first. When polecat
worktrees were deleted, the unpushed branches were lost forever.
This caused 12 MQ items to become orphaned - merge requests existed
but their branches had vanished.
The fix adds a mandatory `git push origin <branch>` before creating
the MR record. If push fails, the MR is not created.
Fixes: gt-aqku
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Updates Deacon CLAUDE.md template with patrol execution instructions:
- Patrol molecule workflow (mol-deacon-patrol)
- Startup protocol: check for attached molecule, resume or bond
- Patrol execution loop: execute steps, close, loop or exit
- Nondeterministic idempotence for handoff
Enhances gt prime for Deacon:
- Adds patrol status section showing attached/naked state
- Shows molecule progress when patrol is in progress
- Includes Deacon-specific startup directive
Also adds standalone prompts/roles/deacon.md for reference.
Closes: gt-rana.4
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When --molecule is specified with gt spawn:
- Generate ephemeral instance ID (eph-abc123 format)
- Ensure .beads-ephemeral/ directory exists and is initialized
- Create ephemeral parent issue linking back to source issue
- Instantiate molecule steps in ephemeral beads
- Include ephemeral context in work assignment mail
This implements gt-3x0z.4 (Phase 2.1: gt spawn --molecule bonds in ephemeral).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add gt doctor checks for ephemeral beads repos:
- ephemeral-exists: Verify .beads-ephemeral/ exists for each rig (fixable)
- ephemeral-git: Verify it's a valid git repo (fixable)
- ephemeral-orphans: Detect molecules >24h old (needs manual review)
- ephemeral-size: Warn if repo >100MB
- ephemeral-stale: Detect molecules with no activity in last hour
Implements gt-3x0z.3.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implement AttachmentFields to track molecule attachments on pinned/handoff beads:
- AttachedMolecule: root issue ID of attached molecule
- AttachedAt: timestamp when attached
API:
- AttachMolecule(pinnedBeadID, moleculeID) - attach
- DetachMolecule(pinnedBeadID) - detach
- GetAttachment(pinnedBeadID) - query
- ParseAttachmentFields(issue) - parse from description
- FormatAttachmentFields(fields) - format for description
Includes comprehensive tests for parsing and API.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update .beads-ephemeral/ to .beads-wisp/ per beads v0.33.1:
- Renamed initEphemeralBeads to initWispBeads
- Changed directory from .beads-ephemeral/ to .beads-wisp/
- Changed config from ephemeral: true to wisp: true
- Updated help text and output messages
- Updated tests
Generated with Claude Code
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
During rig initialization, now creates a .beads-ephemeral/ directory:
- Initialized as a git repo (for local versioning)
- Contains config.yaml with ephemeral: true
- Automatically added to rig .gitignore
This provides a local-only beads database for runtime tracking of
wisps and molecules, separate from the synced .beads/ database.
Closes gt-3x0z.1
Generated with Claude Code
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>