Commit Graph

1918 Commits

Author SHA1 Message Date
gastown/polecats/cheedo
12543d1450 fix: Make ParseAgentBeadID accept any valid prefix (gt-w0fqg)
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>
2025-12-30 22:25:18 -08:00
gastown/crew/max
e539ea3cc8 Fix gt hook --json flag not working
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>
2025-12-30 22:24:35 -08:00
gastown/polecats/dag
58a7615801 Witness: Reduce chattiness, increase autonomy (gt-lxdn7)
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>
2025-12-30 22:16:47 -08:00
gastown/polecats/capable
c2a33be4e6 Make gt done MR creation idempotent (gt-svdsy)
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>
2025-12-30 22:15:57 -08:00
beads/polecats/pearl
49117c9a48 fix: increase ClaudeStartTimeout from 15s to 60s
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>
2025-12-30 22:15:30 -08:00
gastown/polecats/slit
3dd18a1981 Add Deacon stuck-session detection and force-kill protocol
Implements gt-l6ro3.4: Deacon can now detect and kill genuinely stuck/hung
Claude Code sessions during health rounds.

New commands:
- gt deacon health-check <agent>: Pings agent, waits for response, tracks
  consecutive failures. Returns exit code 2 when force-kill threshold reached.
- gt deacon force-kill <agent>: Kills tmux session, updates agent bead state,
  notifies mayor. Respects cooldown period.
- gt deacon health-state: Shows health check state for all monitored agents.

Detection protocol:
1. Send HEALTH_CHECK nudge to agent
2. Wait for agent bead update (configurable timeout, default 30s)
3. Track consecutive failures (default threshold: 3)
4. Recommend force-kill when threshold exceeded

Force-kill protocol:
1. Log intervention (mail to agent)
2. Kill tmux session
3. Update agent bead state to "killed"
4. Notify mayor (optional)

Configurable parameters:
- --timeout: How long to wait for response (default 30s)
- --failures: Consecutive failures before force-kill (default 3)
- --cooldown: Minimum time between force-kills (default 5m)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 22:14:05 -08:00
gastown/polecats/furiosa
108afdbc52 Remove keepalive file infrastructure for feed-based wake model (gt-vdprb.2)
- 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>
2025-12-30 22:13:14 -08:00
gastown/polecats/rictus
637e959c48 Add Boot shutdown to gt down command (gt-xyzb5)
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>
2025-12-30 22:12:10 -08:00
gastown/polecats/dementus
fb5870350c Add isQueueAddress() and parseQueueName() helpers to router.go (gt-0q3cg)
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>
2025-12-30 22:11:27 -08:00
gastown/polecats/toast
52fe464d10 Fix patrol wisp status: use hooked instead of pinned (gt-bpiph)
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>
2025-12-30 22:10:25 -08:00
gastown/crew/max
b4a7b930e5 Update all prompts to use gt hook instead of gt mol status
- 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>
2025-12-30 22:10:08 -08:00
gastown/polecats/capable
23ee6efd41 Fix Boot spawn: use bootDir and add initial triage prompt
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>
2025-12-30 22:05:45 -08:00
gastown/crew/max
5be4255f35 Improve gt mol help and add gt formulas command
- 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>
2025-12-30 22:02:45 -08:00
gastown/polecats/dementus
112420dad0 Add Boot health check to gt doctor (gt-k1sl4)
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>
2025-12-30 22:01:38 -08:00
gastown/polecats/rictus
06f5541502 mol-deacon-patrol: Add health ping nudges to clear agent backoff (gt-l6ro3.2)
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>
2025-12-30 22:00:37 -08:00
gastown/crew/max
94a6784c1e Add gt hook status alias for gt mol status
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>
2025-12-30 21:48:28 -08:00
beads/crew/wolf
80a049cfd9 Update Mayor prompting: coordinator role, no code editing in mayor/rig
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>
2025-12-30 21:26:20 -08:00
beads/crew/wolf
e23b3b1955 Restore convoy add command and feed deduplication logic
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>
2025-12-30 21:18:59 -08:00
mayor
a453c4c4be fix(session): Wait 10s for GUPP reliability - WaitForClaudeReady has false positives
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 21:17:01 -08:00
beads/crew/wolf
d72cb6b9cf Add gt worktree remove command and fix cross-rig worktree creation
- 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>
2025-12-30 21:16:43 -08:00
gastown/crew/joe
920507cbe3 bd sync: 2025-12-30 21:14:12 2025-12-30 21:15:54 -08:00
gastown/polecats/testcat
12e6bf6a5d Add gt convoy add command for adding issues to existing convoys (gt-nq3pr)
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>
2025-12-30 21:14:39 -08:00
gastown/crew/joe
60ef12305c Fix gt feed: filter empty bead IDs and deduplicate rapid updates
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>
2025-12-30 21:14:07 -08:00
mayor
ef7f15cfc5 feat(session): Add GUPP propulsion nudge for autonomous work execution
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>
2025-12-30 21:06:56 -08:00
gastown/crew/jack
45b021cf7f Add enterprise framing for HOP-aligned features
- 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>
2025-12-30 21:05:25 -08:00
gastown/polecats/nux
38fc95d6a7 Witness: Block nuke if polecat has unpushed work
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>
2025-12-30 21:01:21 -08:00
gastown/polecats/furiosa
6d4e0f0c96 gt done: Require pushed branch before MR creation (gt-bca67)
Add BranchPushedToRemote check before creating MR bead.
Prevents work loss when polecat is nuked with unpushed commits.
2025-12-30 21:01:02 -08:00
gastown/polecats/slit
aed2482d88 Witness: Add recovery escalation for dormant polecats with unpushed work
- 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>
2025-12-30 20:59:46 -08:00
gastown/polecats/furiosa
d006b20d7c bd sync: 2025-12-30 20:54:24 2025-12-30 20:54:24 -08:00
gastown/crew/joe
df46e75a51 Fix: Unknown subcommands now error instead of silently showing help
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>
2025-12-30 20:52:23 -08:00
gastown/crew/max
3d09c679e2 Add -m flag to gt nudge command (gt-41m3x) 2025-12-30 20:51:49 -08:00
gastown/crew/max
aa2aa64f59 bd sync: 2025-12-30 20:51:38 2025-12-30 20:51:38 -08:00
mayor
53e36bedbe docs: Add CV/skill accumulation section to identity.md
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>
2025-12-30 20:34:13 -08:00
Steve Yegge
c3e379deb1 bd sync: 2025-12-30 19:43:38 2025-12-30 19:43:47 -08:00
Steve Yegge
db07394dbe Support multiple names in gt crew add
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
2025-12-30 19:43:17 -08:00
Steve Yegge
e2ce6148b7 bd sync: 2025-12-30 19:37:33 2025-12-30 19:37:33 -08:00
gastown/crew/joe
4c783bbcae bd sync: 2025-12-30 19:36:57 2025-12-30 19:37:05 -08:00
Steve Yegge
adc76d55aa Add convoy section to understanding-gas-town, update reference.md 2025-12-30 19:32:36 -08:00
Steve Yegge
01bd60b570 Update convoy docs to match implementation (hq-cv-*, --all flag, examples) 2025-12-30 19:32:36 -08:00
Steve Yegge
36eb63b8df bd sync: 2025-12-30 19:16:00 2025-12-30 19:29:11 -08:00
Steve Yegge
cdcd677631 bd sync: 2025-12-30 19:09:25 2025-12-30 19:29:11 -08:00
Steve Yegge
24fed6ae5a bd sync: 2025-12-30 19:08:21 2025-12-30 19:29:11 -08:00
Steve Yegge
d87086962b bd sync: 2025-12-30 18:55:47 2025-12-30 19:29:11 -08:00
Steve Yegge
e192b96a6d bd sync: 2025-12-30 18:55:31 2025-12-30 19:29:11 -08:00
Steve Yegge
80cb1aa694 Remove default crew member creation from rig add
- 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'.
2025-12-30 19:29:02 -08:00
Steve Yegge
210554163f Add --all flag to convoy list to show closed convoys 2025-12-30 19:27:55 -08:00
gastown/crew/joe
d55858b554 Fix GUPP: inject "gt prime" as initial prompt in handoff
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>
2025-12-30 19:25:50 -08:00
Steve Yegge
38bf896296 Support non-main default branches in rig add
- 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').
2025-12-30 19:16:19 -08:00
Steve Yegge
8c80ad0aff Fix agent bead ID prefix - always use gt- not rig prefix
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>
2025-12-30 19:12:39 -08:00
Steve Yegge
bf390dee86 Add cv- prefix and 🚚 emoji to convoy display 2025-12-30 19:09:18 -08:00