Commit Graph

2177 Commits

Author SHA1 Message Date
markov-kernel
e7145cfd77 fix: Make Mayor/Deacon session names include town name
Session names `gt-mayor` and `gt-deacon` were hardcoded, causing tmux
session name collisions when running multiple towns simultaneously.

Changed to `gt-{town}-mayor` and `gt-{town}-deacon` format (e.g.,
`gt-ai-mayor`) to allow concurrent multi-town operation.

Key changes:
- session.MayorSessionName() and DeaconSessionName() now take townName param
- Added workspace.GetTownName() helper to load town name from config
- Updated all callers in cmd/, daemon/, doctor/, mail/, rig/, templates/
- Updated tests with new session name format
- Bead IDs remain unchanged (already scoped by .beads/ directory)

Fixes #60

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 21:37:05 +01:00
Olivier Debeuf De Rijcker
7f9795f630 fix: Close MR beads after successful merge from queue (#52)
The handleSuccessFromQueue function was missing critical steps that
exist in the legacy handleSuccess function:

1. Fetch and update the MR bead with merge_commit SHA and close_reason
2. Close the MR bead with CloseWithReason("merged", mr.ID)

Without these steps, the MR bead stayed "open" in beads even after the
queue file was deleted. This caused Mayor (which queries beads for open
merge-requests) to think there were pending MRs while Refinery (which
uses the queue) reported completion.

Fixes #46
2026-01-03 11:54:14 -08:00
Olivier Debeuf De Rijcker
047585866a fix: Add retry logic for Enter key send in NudgeSession/NudgePane (#53)
When sending messages to Claude sessions via tmux, the Enter key send
could fail silently. This caused polecats to receive their initial
prompt but never submit it - the message appeared in Claude's input
area but Enter was never pressed.

Add retry logic (up to 3 attempts with 200ms delays) for the Enter
send step in both NudgeSession() and NudgePane(). This ensures message
submission is more reliable even if tmux has transient issues.

Fixes #41
2026-01-03 11:53:49 -08:00
medley
eabb1c5aa6 fix(done): detect default branch instead of hardcoding 'main' (#42)
Adds RemoteDefaultBranch() to git.go that detects the repo's actual
default branch by checking origin/HEAD, then falling back to checking
for origin/master or origin/main.

Updates done.go to use this detection instead of hardcoded "main":
- Line 168: CommitsAhead now uses detected default branch
- Line 173: Error message uses detected branch name
- Line 187: Target branch defaults to detected branch

Fixes repos using 'master' as default branch (pre-2020 repos).

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

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Steve Yegge <steve.yegge@gmail.com>
2026-01-03 11:53:38 -08:00
Steve Yegge
cfd24b6831 Merge pull request #44 from austeane/fix-readme-quickstart
docs: Fix Quick Start to use gt mayor attach
2026-01-03 11:53:20 -08:00
mayor
aaa356aeb6 Merge: toast-mjxpchjl - Rename session gt-deacon-boot to fix prefix collision 2026-01-03 11:52:16 -08:00
nux
cf53e2852e feat(session): Include session ID in PropulsionNudge for /resume picker
PropulsionNudgeForRole now accepts a workDir parameter and reads
session ID from .runtime/session_id to append [session:xxx] to the
nudge message. This enables Claude Code's /resume picker to discover
Gas Town sessions.

(gt-u49zh)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 11:51:30 -08:00
Mike Lady
3488933cc2 Add 'gt dashboard' CLI command (hq-s1bg) (#65)
* Add LastActivity calculation for convoy dashboard (hq-x2xy)

Adds internal/activity package with color-coded activity tracking:
- Green: <2 minutes (active)
- Yellow: 2-5 minutes (stale)
- Red: >5 minutes (stuck)

Features:
- Calculate() function returns Info with formatted age and color class
- Helper methods: IsActive(), IsStale(), IsStuck()
- Handles edge cases: zero time, future time (clock skew)

Tests: 8 test functions with 25 sub-tests covering all thresholds.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add convoy dashboard HTML template with Last Activity (hq-fq1g)

Adds internal/web package with convoy dashboard template:
- convoy.html with Last Activity column and color coding
- Green (<2min), Yellow (2-5min), Red (>5min) activity indicators
- htmx auto-refresh every 30 seconds
- Progress bars for convoy completion
- Status indicators for open/closed convoys
- Empty state when no convoys

Also includes internal/activity package (dependency from hq-x2xy):
- Calculate() returns Info with formatted age and color class
- Helper methods: IsActive(), IsStale(), IsStuck()

Tests: 6 template tests + 8 activity tests, all passing.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add convoy list handler with activity data (hq-3edt)

Adds HTTP handler that wires convoy dashboard template to real data:
- ConvoyHandler: HTTP handler for GET / rendering convoy dashboard
- LiveConvoyFetcher: Fetches convoys from beads with activity data
- ConvoyFetcher interface: Enables mocking for tests

Features:
- Fetches open convoys from town beads
- Calculates progress (completed/total) from tracked issues
- Gets Last Activity from worker agent beads
- Color codes activity: Green (<2min), Yellow (2-5min), Red (>5min)

Includes dependencies (not yet merged):
- internal/activity: Activity calculation (hq-x2xy)
- internal/web/templates: HTML template (hq-fq1g)

Tests: 5 handler tests + 6 template tests + 8 activity tests = 19 total

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add 'gt dashboard' CLI command (hq-s1bg)

Add dashboard command to start the convoy tracking web server.

Usage: gt dashboard [--port=8080] [--open]

Features:
- --port: Configurable HTTP port (default 8080)
- --open: Auto-open browser on start
- Cross-platform browser launch (darwin/linux/windows)
- Graceful workspace detection

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 11:49:42 -08:00
Steve Yegge
7afcea935b Merge pull request #61 from danshapiro/fix/rig-beads-dir
feat: allow local repo reference clones to save disk
2026-01-03 11:48:58 -08:00
Steve Yegge
2dd0f1e6e3 Merge pull request #64 from dannomayernotabot/fix/daemon-witness-race-condition
fix: Add tmux health check fallback to prevent killing healthy sessions
2026-01-03 11:48:44 -08:00
gus
8bb981c7cf fix(tmux): Use exact matching for HasSession to prevent prefix matches
tmux has-session -t does prefix matching by default, so "gt-deacon-boot"
would match when checking for "gt-deacon". This caused gt start to think
the Deacon was running when only a stale gt-deacon-boot session existed.

Using "=" prefix forces exact matching in tmux.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 11:39:51 -08:00
mayor
e7994d98f7 feat(prime): Add --hook flag for LLM runtime session handling
Enables gt prime to receive session metadata from LLM runtime hooks.
When called with --hook, reads JSON from stdin containing session_id
and persists it to .runtime/session_id for use by PropulsionNudge.

- Add --hook flag for hook mode
- Parse Claude Code session JSON from stdin
- Support GT_SESSION_ID environment variable fallback
- Persist session ID to .runtime/session_id

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 11:30:28 -08:00
Dan Shapiro
4727f5079f feat: allow local repo reference clones to save disk
Use git --reference-if-able when a local repo is provided so rigs and crew share objects without changing remotes.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 09:27:58 -08:00
mayor
a83d5c6e0b fix: Add tmux health check fallback to prevent killing healthy sessions
When the daemon checks if Deacon/Witness is running, it first checks the
agent bead state. If this check fails (bead not found, JSON parse error,
or stale state), it would previously attempt to restart the session -
even if the tmux session was perfectly healthy.

This caused "session already exists" errors when:
1. Agent bead state couldn't be read (prefix mismatch, missing bead)
2. But the tmux session was actually running with Claude active

Fix: Add a tmux session health check as fallback before attempting restart.
If the session exists AND Claude is running in it, skip the restart and
log that we're preserving the healthy session despite stale bead state.

This maintains ZFC compliance (still trusts agent bead as primary source)
while adding a defensive check to prevent unnecessary session kills.

Fixes #63

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-03 09:01:34 -08:00
Austin Wallace
739681c883 docs: Fix Quick Start to use gt mayor attach
The Quick Start section incorrectly showed `cd ~/gt && gt prime` as the
way to enter the Mayor's office. However, `gt prime` only outputs role
context to stdout (for use in Claude Code prompt hooks) - it doesn't
start or attach to any session.

Changed to `gt mayor attach` which properly attaches to the Mayor tmux
session (and auto-starts it if not running).

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 20:59:04 -08:00
mayor
386dbf85fb Merge: nux-mjxn8p5t (gt-30i7v) - Add conflict resolution workflow for polecats 2026-01-02 18:57:45 -08:00
nux
e663928564 feat(formulas): Add conflict resolution workflow for polecats (gt-si8rq.5)
New molecule formula mol-polecat-conflict-resolve defines the workflow for
polecats handling merge conflict resolution tasks:

1. Load task and extract metadata from conflict-resolution bead
2. Acquire merge slot (prevents racing via "Monkey Knife Fight" prevention)
3. Checkout the conflicting branch
4. Rebase onto main and resolve conflicts
5. Run tests to verify resolution
6. Push resolved changes directly to main (bypasses queue)
7. Close original MR bead and source issue
8. Release merge slot for next waiter
9. Clean up and close the conflict-resolution task

This completes the polecat side of the ephemeral merge workflow architecture.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 18:57:34 -08:00
mayor
6400f94fdb Merge: rictus-mjxofiub (gt-2o3vq) - Add integration tests for beads routing 2026-01-02 18:56:59 -08:00
rictus
175c4d3996 test: Add integration tests for beads routing and redirects (gt-htlmp.4)
Validates:
- bd show routes to correct rig based on issue ID prefix
- bd show hq-* routes to town beads
- Redirect chains (.beads/redirect) resolve correctly
- bd list works from polecat/crew directories with redirects
- Prefix conflicts are detected in routes.jsonl
- Routes loading, appending, and removal work correctly
- GetPrefixForRig returns correct prefix for rig name

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 18:56:45 -08:00
toast
9dcbdf8106 fix(boot): Rename session gt-deacon-boot → gt-boot to fix prefix collision
The tmux session name "gt-deacon-boot" was causing HasSession("gt-deacon")
to return true due to tmux prefix matching behavior. This made the daemon
think the Deacon was running when only Boot was active, and caused commands
targeting "gt-deacon" to be sent to Boot session instead.

The fix renames Boot session from "gt-deacon-boot" to "gt-boot", which
has no prefix overlap with "gt-deacon".

Fixes: gt-sgzsb

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 18:56:40 -08:00
mayor
7f49d1ad96 Merge: morsov-mjxpeg1a (gt-zanca) - Add watchdog chain documentation 2026-01-02 18:56:20 -08:00
morsov
ea7f434e81 docs: Add watchdog chain documentation for Boot/Deacon lifecycle (gt-1847v)
Creates docs/watchdog-chain.md explaining the Daemon/Boot/Deacon architecture:
- Why two agents (Boot is ephemeral triage, Deacon is persistent patrol)
- Session ownership (gt-deacon-boot vs gt-deacon)
- Heartbeat mechanics and freshness thresholds
- Boot decision matrix (start/wake/nudge/nothing)
- Design decision: keep separation, fix implementation bugs

Cross-references added to operational-state.md and understanding-gas-town.md.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 18:56:09 -08:00
mayor
27618e5c2e Merge: valkyrie-mjxpdngw (gt-i9pl9) - Reconcile tmux session state with bead state 2026-01-02 18:55:28 -08:00
valkyrie
63d5502b4b fix(status): Reconcile tmux session state with bead state
The gt status command now properly reconciles the tmux session
existence with the agent bead state to surface mismatches:

- If session exists AND bead says running/idle → "running"
- If session exists BUT bead says stopped/dead → "running [bead: <state>]"
- If session gone BUT bead says running/idle → "running [dead]"
- If session gone AND bead says stopped → "stopped"

This surfaces the key mismatch case where a tmux session is actually
running but the bead state incorrectly says "stopped" or "dead".

Fixes: gt-doih4

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 18:55:13 -08:00
mayor
92106afd6a Merge: dag-mjxpcv5v (gt-vve6k) - Kill zombie tmux sessions before recreating 2026-01-02 18:54:56 -08:00
dag
9ad826cd8c fix(daemon): Kill zombie tmux sessions before recreating
The daemon was failing to restart agents when zombie tmux sessions existed
(session alive but Claude dead). Added EnsureSessionFresh() helper to
tmux package that:
- Checks if session exists
- If exists but Claude not running (zombie), kills the session
- Creates fresh session

Updated all daemon session creation points to use EnsureSessionFresh:
- ensureDeaconRunning()
- ensureWitnessRunning()
- restartPolecatSession()
- restartSession() in lifecycle.go

Added tests for the new helper function. (gt-j1i0r)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 18:54:39 -08:00
mayor
883997e044 Merge: keeper-mjxpe1ku - Add ensure semantics to witness/refinery start 2026-01-02 18:54:07 -08:00
keeper
354219033a feat: Add 'ensure' semantics to witness/refinery start commands
gt witness start and gt refinery start now detect zombie sessions
(tmux alive but Claude dead) and automatically kill and recreate them.

This makes the start commands idempotent:
- If no session exists → create new session
- If session exists and healthy → do nothing (already running)
- If session exists but zombie → kill and recreate

Previously users had to manually run stop then start, or use restart.

Closes: gt-ekc5u

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 18:53:52 -08:00
mayor
dd870bb3e4 Merge: cheedo-mjxpd9go (gt-42whv) - Add binary age detection to status command 2026-01-02 18:53:27 -08:00
cheedo
49116f2deb feat(daemon): Add binary age detection to status command
Shows binary modification time in gt daemon status and warns when
the binary is newer than the running process, suggesting a restart.
This helps detect when bug fixes or new features aren't active because
the daemon is running old code.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 18:53:13 -08:00
gastown/crew/joe
c31ae2cbfe docs: clarify crew workers never create PRs 2026-01-02 18:41:43 -08:00
mayor
05f4ed95db Merge PR #32: fix(beads): fix agent bead creation during rig add
Merged with conflict resolution after PR #34. Key fixes:

- Remove invalid --no-agents flag from bd init
- Agent beads now created in town beads (gt-* prefix) using NewWithBeadsDir
- Use canonical WitnessBeadID/RefineryBeadID functions
- Update test to verify town beads usage

Original PR by @PepijnSenders, conflict resolution applied.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 18:41:21 -08:00
capable
fa26265b32 test: Add integration tests for gt rig add command
Add comprehensive integration tests that validate gt rig add:
- TestRigAddCreatesCorrectStructure: Verify directory structure
- TestRigAddInitializesBeads: Verify beads prefix initialization
- TestRigAddUpdatesRoutes: Verify routes.jsonl is updated
- TestRigAddUpdatesRigsJson: Verify rigs.json is updated
- TestRigAddDerivesPrefix: Verify prefix derivation from name
- TestRigAddCreatesRigConfig: Verify config.json content
- TestRigAddCreatesAgentDirs: Verify agent state files
- TestRigAddRejectsInvalidNames: Verify name validation

Uses //go:build integration tag per design doc.
Run with: go test -tags=integration ./internal/cmd -run TestRigAdd

(gt-htlmp.3)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 18:31:15 -08:00
dementus
8f6e2d2174 test: Add integration tests for gt install command
- TestInstallCreatesCorrectStructure: validates directory structure
  (mayor/, rigs/, CLAUDE.md) and config files (town.json, rigs.json)
- TestInstallBeadsHasCorrectPrefix: verifies beads uses hq- prefix
- TestInstallIdempotent: tests --force flag behavior
- TestInstallNoBeadsFlag: tests --no-beads option

Run with: go test -tags=integration ./internal/cmd/ -run TestInstall

(gt-htlmp.2)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 18:30:30 -08:00
slit
89785378bf feat(costs): Wire up gt costs record to Stop hook
Add Claude Code Stop hook that automatically records session costs when
sessions end. The hook calls `gt costs record` which now can derive the
session name from GT_* environment variables (GT_RIG, GT_POLECAT, GT_CREW,
GT_ROLE).

Changes:
- Add deriveSessionName() to infer tmux session name from environment
- Add Stop hook to settings-autonomous.json and settings-interactive.json
- Add unit tests for deriveSessionName function

When a Gas Town session ends, the Stop hook fires and records the session
cost as a bead event. Costs then appear in `gt costs --today` output.

Closes: gt-ntzhc

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 18:29:25 -08:00
rictus
270be9b65c feat: Migrate handoff from commands to skills format (gt-nqtqp)
Claude Code v2.0+ deprecated .claude/commands/ in favor of .claude/skills/.
This migrates the handoff skill to the new format with proper YAML frontmatter.

Changes:
- Create .claude/skills/handoff/SKILL.md with frontmatter
- Remove deprecated .claude/commands/handoff.md

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 18:27:49 -08:00
furiosa
efd9434ee1 feat(refinery): Integrate merge-slot gate for conflict resolution
Adds merge-slot integration to the Refinery's Engineer for serializing
conflict resolution. When a conflict is detected:
- Acquire the merge slot before creating a conflict resolution task
- If slot is held, defer task creation (MR stays in queue)
- Release slot after successful merge

This prevents cascading conflicts from multiple polecats racing to
resolve conflicts simultaneously.

Adds MergeSlot wrapper functions to beads package for slot operations.

(gt-4u49x)

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 18:26:45 -08:00
nux
f7839c2724 feat(refinery): Non-blocking delegation via bead-gates (gt-hibbj)
When merge conflicts occur, the Refinery now creates a conflict resolution
task and blocks the MR on that task, allowing the queue to continue to the
next MR without waiting.

Changes:
- Add BlockedBy field to mrqueue.MR for tracking blocking tasks
- Update handleFailureFromQueue to set BlockedBy after creating conflict task
- Add ListReady method to mrqueue that filters out blocked MRs
- Add ListBlocked method for monitoring blocked MRs
- Add IsBeadOpen, ListReadyMRs, ListBlockedMRs helpers to Engineer
- Add 'gt refinery ready' command (unclaimed AND unblocked MRs)
- Add 'gt refinery blocked' command (shows blocked MRs)

When the conflict resolution task closes, the MR unblocks and re-enters
the ready queue for processing.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 18:25:15 -08:00
Jacob
aaee7fed40 fix(doctor): use route path directly for agent beads check (#36)
The agent-beads-exist check was hardcoding '/mayor/rig' suffix when
constructing the beads path, but routes.jsonl can contain paths like
'my-saas' without this suffix.

This caused the check to look for beads in the wrong location:
- Expected: <town>/<route-path>/.beads (e.g., ~/gt/my-saas/.beads)
- Actual: <town>/<rig>/mayor/rig/.beads (e.g., ~/gt/my-saas/mayor/rig/.beads)

The fix stores the full route path and uses it directly when creating
the beads client, instead of reconstructing an assumed path structure.

Fixes agent beads not being found when routes use simple rig names.
2026-01-02 18:19:58 -08:00
joe
c3e83a3d09 Fix remaining worker startups for gt seance metadata
- startCrewMember: now uses BuildCrewStartupCommand (was GetRuntimeCommand)
- refinery/manager.go: now uses BuildAgentStartupCommand (was GetRuntimeCommand)

Both now properly inject BD_ACTOR and GT_ROLE so seance can identify
sessions correctly. This completes the seance metadata fix started in
the previous commit.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 18:09:42 -08:00
gastown/witness
cadf09d98c bd sync: 2026-01-02 18:08:14 2026-01-02 18:08:14 -08:00
joe
49be394eef Fix crew startup to inject metadata for gt seance
gt crew start was using GetRuntimeCommand which doesn't set BD_ACTOR,
GT_RIG, GT_CREW, etc. This caused seance to misidentify crew sessions
(showing as "mayor" instead of their actual identity).

Now uses BuildCrewStartupCommand like gt crew restart does, ensuring
proper env var injection for session identification. (gt-jwxgb)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 17:42:27 -08:00
mayor
1805d5b011 Merge: toast-mjxm0mmo (gt-cikbu) - Add spawn as alias for start subcommand across roles 2026-01-02 17:30:33 -08:00
toast
9683744b53 feat: Add 'spawn' as alias for 'start' subcommand across roles
Added 'spawn' as an alias for 'start' in the following commands:
- gt witness start → also gt witness spawn
- gt refinery start → also gt refinery spawn
- gt deacon start → also gt deacon spawn
- gt crew start → also gt crew spawn

This improves discoverability since agents are guessing 'spawn'
when trying to start roles.

Note: gt polecat does not have a 'start' command - polecat spawning
is handled via 'gt sling'.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 17:30:24 -08:00
mayor
8273622806 Merge: rictus-mjxlzc5r (gt-l9toz) - Support batch slinging multiple beads to a rig 2026-01-02 17:30:00 -08:00
rictus
45265f779d feat(sling): Support batch slinging multiple beads to a rig
Allows slinging multiple beads in a single command:
  gt sling gt-abc gt-def gt-ghi gastown

Each bead gets its own freshly spawned polecat. This parallelizes
work dispatch without running gt sling N times manually.

Changes:
- Updated Args from RangeArgs(1,2) to MinimumNArgs(1)
- Added batch mode detection when len(args)>2 and last arg is a rig
- Added runBatchSling() to handle multiple beads with progress tracking

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 17:29:52 -08:00
mayor
a15f4bb753 Merge: dag-mjxm10sv (gt-j8kxo) - Add gt rig restart for multi-rig restart support 2026-01-02 17:29:28 -08:00
dag
7919129ff4 feat(rig): Add 'gt rig restart' for multi-rig restart support
Adds 'gt rig restart <rig>...' command that stops then starts witness
and refinery for one or more rigs. Supports --force and --nuclear flags
like the existing start/stop commands. (gt-s7t1h)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 17:29:21 -08:00
mayor
f4a823370e Merge: slit-mjxlyyte (gt-jhr85) - Provision .claude/commands for crew and polecat workspaces 2026-01-02 17:28:52 -08:00
slit
d4eed2dcf2 feat(crew): Provision .claude/commands/ for crew and polecat workspaces (gt-jhr85)
When adding a crew member with 'gt crew add' or spawning a polecat,
provision the .claude/commands/ directory with standard slash commands
like /handoff. This ensures all agents have Gas Town utilities even if
the source repo does not have them tracked.

Changes:
- Add embedded commands templates (internal/templates/commands/)
- Add ProvisionCommands() to templates package
- Call ProvisionCommands from crew and polecat managers
- Add gt doctor commands-provisioned check with --fix support
2026-01-02 17:28:40 -08:00