Agent bead ID validation was hardcoded to only accept "gt-" prefix, which
caused errors when spawning beads polecats (which use "bd-" prefix):
Error: invalid agent ID: agent ID must start with 'gt-' (got "bd-beads-polecat-pearl")
Changed ParseAgentBeadID to accept any 2-3 character prefix (gt-, bd-, hq-)
instead of hardcoding "gt-". Updated tests to cover other prefixes.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The --json flag was only registered on the status subcommand, not the
parent hook command. When running `gt hook --json` (no args), it would
fail with "unknown flag". Now the flag is registered on both.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove routine POLECAT_PROCESSED and WITNESS_REPORT/REFINERY_REPORT
mail types from Witness→Mayor communication.
Changes:
- Remove Notify Mayor step for routine polecat processing from
witness-CLAUDE.md template
- Remove WITNESS_REPORT and REFINERY_REPORT callback types from
callbacks.go (pattern matching, handlers, constants)
- Update callback help text to reflect new behavior
Witness now handles routine lifecycle autonomously. Only genuine
problems that require human/Mayor intervention are escalated:
- ESCALATION (problems Witness cannot resolve)
- BLOCKED (needs human decision)
- CRASH_RECOVERY (informational)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add FindMRForBranch helper to check for existing MR beads before creating.
If an MR already exists for the branch, skip creation and reuse it.
This makes gt done safe to re-run if interrupted mid-execution.
Implements Option C from gt-svdsy: idempotent operations that check
if already done before doing, making it safe to retry.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Claude can take 30s+ to start on slower machines, causing
premature GUPP nudges before Claude is ready.
(bd-11lm)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove TouchTownActivity() calls from root.go PersistentPreRun hook
- Remove ReadTownActivity() and activity-based backoff from daemon.go
- Delete TouchTownActivity/ReadTownActivity functions from keepalive.go
- Replace dynamic backoff with fixed 10-min recovery heartbeat
Normal wake is now handled by feed subscription (bd activity --follow).
The daemon is a safety net for dead sessions, GUPP violations, and orphaned work.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Boot is spawned by the daemon as the Deacons watchdog. During shutdown
Boot was never explicitly stopped. Now gt down stops Boot between Mayor
and Deacon (step 3) to ensure clean shutdown.
Generated with Claude Code
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add queue address detection following the same pattern as list address
detection. Includes tests in router_test.go.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Changed autoSpawnPatrol to use --status=hooked instead of --status=pinned.
This ensures patrol wisps are visible to gt mol status and trigger autonomous mode.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Role templates (crew, polecat, mayor, deacon, witness, refinery)
- prime.go startup protocol messages
- Documentation (propulsion, reference, molecules, wisp architecture)
- Session hints and sling prompts
- Formula template instructions
- CLAUDE.md
The hook is the user-facing concept, molecules are implementation details.
Agents should use `gt hook` to check what work is assigned to them.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Boot was spawning in deaconDir, causing it to read Deacon's CLAUDE.md
instead of its own role context. Now:
- Creates session in ~/gt/deacon/dogs/boot/
- Ensures bootDir exists with Boot's CLAUDE.md
- Passes "gt boot triage" as initial prompt for immediate execution
(gt-tc58x)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Rewrote gt mol help to focus on agent operations (YOUR hook, YOUR work)
- Removed misleading "use bd mol pour" guidance (gt sling handles this)
- Added gt formulas command as convenience wrapper for bd formula list
- Agents no longer need to know about bd for common workflow operations
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements "vet mode" - the doctor checks on the Boot watchdog:
- Boot directory presence
- Session status (alive/not running)
- Last execution status and errors
- Marker file freshness (stale marker indicates crash)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The health-scan step now includes gt nudge commands that serve dual purposes:
1. Liveness verification - agent responds to prove it's alive
2. Backoff reset - any nudge resets agent's backoff to base interval
This ensures patrol agents (witness/refinery) remain responsive even during
quiet periods when the feed has no mutations. Since Deacon patrols every
~1-2 minutes, maximum backoff is bounded by the ping interval.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Makes 'gt hook' (no args) show hook status instead of requiring a bead ID.
Also adds 'gt hook status' subcommand for explicit usage. The hook concept
is user-facing while molecules are implementation details.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The Mayor should dispatch work to crew/polecats, not edit code directly.
mayor/rig exists as the source for worktrees, not as a working directory.
Key changes:
- Remove "Edit code here" instruction
- Add warning about staged changes accumulating
- Point to gt worktree for cross-rig work
- Clarify coordinator vs implementer distinction
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Accidentally included staged reverts in previous commit. Restoring:
- convoyAddCmd for 'gt convoy add' command
- Event filtering/deduplication in feed model
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add WorktreeAddExistingForce to git package (uses --force flag)
- Fix worktree creation: use force flag so main can be checked out
in multiple worktrees (needed for cross-rig work)
- Implement 'gt worktree remove <rig>' with --force flag
- Refuse to remove worktrees with uncommitted changes unless forced
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements the 'add' subcommand to convoy that:
- Validates the convoy exists
- Automatically reopens closed convoys
- Adds 'tracks' dependency for each issue
- Warns but doesn't fail on issues that can't be added
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Two issues with the feed reported by user:
1. Empty entries showing "→ updated" with no bead ID
2. Same bead updated 8 times in 2 seconds (when adding multiple deps)
Fixes:
- Filter out update events with empty Target (bead ID)
- Deduplicate rapid updates to same bead within 2 second window
Root cause of empty IDs is in beads daemon (filed bd-sco6).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
SessionStart now sends a PropulsionNudge after the beacon to trigger
Claude to check the hook and begin work immediately. This makes the
propulsion principle bulletproof - agents no longer wait for witness
to nudge them.
GUPP = Gas Town Universal Propulsion Principle:
"If work is on your hook, YOU RUN IT."
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- New: why-these-features.md explaining enterprise justification for each feature
- Updated: understanding-gas-town.md with "Why Gas Town Exists" and A/B testing section
- Updated: identity.md with "Why Identity Matters" and enterprise use cases
- Updated: federation.md with "Why Federation?" and enterprise benefits table
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add safety check to HandleMerged that verifies cleanup_status from the
polecat's agent bead before allowing nuke. This prevents work loss when:
- MERGED signal arrives for a stale MR (already merged via different path)
- Polecat has new unpushed work since the MR was created
- Race condition between merge and nuke
The Witness now blocks nuke and sets an error for escalation when:
- has_uncommitted: polecat has uncommitted changes
- has_stash: polecat has stashed work
- has_unpushed: polecat has unpushed commits (critical)
Clean status or unknown status (backward compat) allows nuke to proceed.
(gt-5q6jr)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- 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>