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>
- Witness shows polecat count under management (👁 N polecats)
- Refinery shows MQ length and processing status (🏭 MQ: N or 🏭 idle)
- Both show mail count when messages pending
Closes: gt-bd2l, gt-zayu
Define the Deacon patrol molecule in builtin_molecules.go with 7 steps:
1. inbox-check - Handle callbacks from agents
2. health-scan - Ping Witnesses and Refineries
3. plugin-run - Execute registered plugins
4. orphan-check - Find abandoned work (uses wisp terminology)
5. session-gc - Clean dead sessions and wisp artifacts
6. context-check - Check own context limit
7. loop-or-exit - Burn and let daemon respawn, or exit if context high
Added DeaconPatrolMolecule() to BuiltinMolecules() list and added
corresponding test in builtin_molecules_test.go.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Checks whether the town root (~/gt) is under git version control.
Having the town harness in git is optional but recommended for:
- Backing up personal Gas Town configuration and history
- Tracking mail and coordination beads
- Easier federation across machines
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Changes mail identity format from hyphenated (gastown-Toast) to
slash-based (gastown/polecats/Toast) to:
- Match directory structure (REST-like)
- Distinguish from hyphenated bead IDs (gt-xyz) and molecule names
Updated:
- addressToIdentity(): preserve slashes instead of replacing with dashes
- identityToAddress(): simplified, identity == address now
- detectSender(): include /polecats/ in polecat addresses
- Tests updated for new format
Closes gt-cxtu: shared beads architecture verified working.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Check restart/shutdown before cycle to avoid matching 'lifecycle:' prefix.
Use ' cycle' (with leading space) for word boundary matching.
Resolved conflict: fixed variable name (title → subject).
The parseLifecycleRequest function was checking for "cycle" first,
but since the title already contains "lifecycle:" (which includes
"cycle"), all lifecycle messages matched as cycle actions, making
restart and shutdown unreachable.
Fixed by:
1. Checking restart/shutdown before cycle
2. Using " cycle" (with leading space) to match the word, not prefix
Closes gt-rixa
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This eliminates 'modified issues.jsonl' noise in git status on main.
bd sync commits to beads-sync branch, which has its own .gitignore
that continues to track issues.jsonl for multi-clone coordination.
Added molecule workflow integration to Gas Town:
1. spawn.go: MoleculeContext in work assignment mail
- Shows step N/M and molecule ID in subject
- Includes molecule workflow instructions
- Guides polecat through DAG execution
2. prime.go: outputMoleculeContext()
- Detects if in-progress issue is a molecule step
- Shows molecule progress and next steps
- Displays molecule work loop instructions
3. molecule.go: 'gt molecule progress' command
- Shows execution progress for molecule root
- Displays done/in-progress/ready/blocked steps
- Progress bar and completion percentage
- JSON output for Witness automation
This enables polecats to work through molecule DAGs:
- Receive molecule-aware work assignments
- See context in gt prime output
- Follow DAG with 'bd ready --parent <root>'
- Witness can monitor with 'gt molecule progress'
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update Finding Work section with mail cwd clarification
- Replace bd ready/list with molecule-based work assignment
- Workers now receive work from overseer, not by polling bd
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When running `gt crew at <name>` from inside the target session, we exec
Claude directly. Previously this meant we couldn't send `gt prime` afterward.
Now we pass "gt prime" as the initial prompt argument to the Claude CLI,
so Claude loads context immediately upon startup.
Closes gt-qivm
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When `gt mq submit` is run from a polecat work branch (polecat/<worker>/<issue>),
it now automatically triggers polecat shutdown after submitting the MR. The
polecat sends a lifecycle request to its Witness and waits for termination.
This eliminates the need for polecats to manually run `gt handoff --shutdown`
after completing work - they can just run `gt mq submit` and the cleanup
happens automatically.
Added `--no-cleanup` flag to disable auto-cleanup when needed (e.g., for
submitting multiple MRs or continuing work).
Closes gt-tca
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Closes gt-48bs: gt rig reset now clears stale mail messages.
- Non-pinned messages are closed with reason 'Cleared during reset'
- Pinned messages have their content cleared but remain open
- Works with both --mail flag and default reset (all state)
Implements gt-b2hj: Uses git fsck --unreachable to find orphaned commits
that were never merged to main.
Features:
- Filters to commits only (not blobs/trees)
- Date filtering (--days=N, default 7)
- Excludes stash commits (WIP on, index on, etc.)
- Excludes routine bd sync commits
- Shows recovery hints (cherry-pick, show, branch)
- docs/architecture.md: update mail routing explanation
- internal/witness/manager.go: fix actual bd mail calls to gt mail
- internal/cmd/mail.go: remove stale compatibility note
- internal/daemon/lifecycle.go: update comment
gt shutdown now performs full polecat cleanup after killing sessions:
- Removes worktrees
- Deletes polecat branches from mayor's clone
- Protects polecats with uncommitted work (refuses to clean)
Added --nuclear flag to force cleanup even with uncommitted work.
Closes gt-u1k
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Move router and polecatAddress definitions before if block to avoid
shadowing (defining same vars inside and after the block)
- Handle branch deletion failure in Recreate() by checking if branch
still exists and using WorktreeAddExisting like Add() does
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Models often guess --version exists. Cobra provides both --version and -v
when Version is set on the root command.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>