Commit Graph

45 Commits

Author SHA1 Message Date
Steve Yegge
9446cd4806 Add mol-polecat-work, mol-polecat-lease, mol-gastown-boot formulas; fix spawn.go to use catalog ID 2025-12-25 11:47:06 -08:00
Steve Yegge
f86a73c2f0 feat: Add gcloud-style command grouping to gt help output
Organize 43 commands into 7 logical groups using cobra's built-in
AddGroup/GroupID feature:

- Work Management: spawn, sling, hook, handoff, done, mol, mq, etc.
- Agent Management: mayor, witness, refinery, deacon, polecat, etc.
- Communication: mail, nudge, broadcast, peek
- Services: daemon, start, stop, up, down, shutdown
- Workspace: rig, crew, init, install, git-init, namepool
- Configuration: account, theme, hooks, issue, completion
- Diagnostics: status, doctor, prime, version, help

Also renamed molecule to mol as the primary command name
(molecule is now an alias).

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 02:32:01 -08:00
Steve Yegge
cb8375a8bd spawn: write hook file to polecat worktree (gt-u2vg)
When spawning a polecat with --issue, now creates a wisp hook file in the
polecat's .beads/ directory. This allows gt mol status to find the slung
work via the propulsion protocol.

Changes:
- Import wisp package
- Get polecat object after creation to access ClonePath
- Write SlungWork hook file with bead ID, subject, and context
2025-12-25 01:56:54 -08:00
Steve Yegge
e8db866ddb refactor: move mol run semantics from bd into gt spawn (gt-r7jj2)
Replace bd mol run call with separate bd commands:
1. bd pour - creates issues from proto template
2. bd update --status=in_progress - claims work
3. bd pin - pins root for session recovery

This moves orchestration logic into gt (where it belongs) and keeps
bd as pure data operations. Coordinated with bd-00u3 which deprecates
bd mol run.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 01:05:28 -08:00
Steve Yegge
5803103e71 gt spawn: fix proto ID for mol-polecat-work (gt-lwuu)
The proto ID is gt-lwuu, not mol-polecat-work. bd mol run looks up
by ID, not title. Updated spawn to use correct proto ID.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 22:55:57 -08:00
Steve Yegge
fca57f7468 gt spawn: auto-use mol-polecat-work for issue-based spawns
Issue-based spawns now automatically use mol-polecat-work to give
polecats a structured workflow with crash recovery checkpoints.
Use --molecule to override with a different molecule.

Completes gt-qvn7.3.1 (Phase 3: Polecat Work Cycle)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 22:50:08 -08:00
Steve Yegge
4801a98793 feat: simplify mail wisps - single DB with --wisp flag (gt-fgms)
Removed dual-routing architecture that used separate .beads-wisp/ directory.
Now uses single .beads/ with --wisp flag passed to bd create.

Changes:
- router.go: Remove resolveWispDir(), simplify shouldBeWisp()
- mailbox.go: Remove wispDir field and dual-source query logic
- types.go: Rename Ephemeral to Wisp, remove MessageSource
- mail.go: Rename --ephemeral to --wisp flag
- spawn.go: Use Wisp field for lifecycle messages

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 20:16:14 -08:00
Steve Yegge
200a09a02d feat: mail uses wisps for ephemeral orchestration messages (gt-lg66)
Add dual-inbox architecture where ephemeral messages go to
.beads-wisp/.beads/ instead of .beads/. Lifecycle messages
(POLECAT_STARTED, NUDGE, etc.) auto-detect as ephemeral.

Changes:
- Add Ephemeral and Source fields to mail.Message
- Add --ephemeral flag to gt mail send
- Router auto-detects lifecycle message patterns
- Mailbox merges messages from both persistent and wisp storage
- Inbox displays (ephemeral) indicator for wisp messages
- Delete/archive works for both message types

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 20:03:58 -08:00
Steve Yegge
c10709dc3f terminology: spawn → pour/wisp for molecules (gt-9uy0)
Molecules use chemistry verbs, not spawn:
- pour = create persistent mol (liquid)
- wisp = create ephemeral wisp (vapor)
- spawn = polecats only (workers)

Changes:
- Delete chemistry-design-changes.md (migration doc)
- Remove migration tables from sling-design.md
- Update bond tables: Spawn → Pour/Wisp
- Rename spawnMoleculeFromProto → pourMoleculeFromProto
- Rename spawnMoleculeOnIssue → runMoleculeOnIssue
- Update templates: bd mol spawn → bd wisp
- Update prime.go: commands and messages
- Clean all docs and comments

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 14:04:19 -08:00
Steve Yegge
c483602231 refactor: remove Go patrol logic from witness manager (gt-kh6q)
Patrol logic is now handled by mol-witness-patrol molecule executed by Claude.
Removed ~985 lines of Go code:
- run(), checkAndProcess(), healthCheck()
- handleStuckPolecat(), getNudgeCount(), recordNudge(), clearNudgeCount()
- processShutdownRequests(), verifyPolecatState()
- autoSpawnForReadyWork(), getActivePolecatCount(), isAlreadySpawned(), spawnPolecat()
- Plus all helper functions

Kept: NewManager(), stateFile(), loadState(), saveState(), Status(), Start(), Stop()

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 23:44:54 -08:00
Steve Yegge
b685879b63 Refinery as worktree: local MR integration (gt-4u5z)
Architecture changes:
- Refinery created as worktree of mayor clone (shares .git)
- Polecat branches stay local (never pushed to origin)
- MRs stored as wisps in .beads-wisp/mq/ (ephemeral)
- Only main gets pushed to origin after merge

New mrqueue package for wisp-based MR storage.
Updated spawn, done, mq_submit, refinery, molecule templates.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 21:25:01 -08:00
Steve Yegge
ba2db2bc11 feat: implement account management for multi-account Claude Code (gt-3133)
Adds support for managing multiple Claude Code accounts in Gas Town:

- accounts.json config parsing in mayor/ directory
- gt account list/add/default commands
- GT_ACCOUNT env var support with priority resolution
- --account flag on gt spawn and gt crew at commands
- CLAUDE_CONFIG_DIR injection into tmux sessions

Priority order: GT_ACCOUNT env var > --account flag > default from config

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 04:05:14 -08:00
Steve Yegge
a3f2ceba5b fix: Use correct managers for refinery/witness auto-start in spawn (gt-bjft)
The previous implementation used session.Manager which only works for polecats.
Refinery and Witness have their own managers that handle their tmux sessions.

- Use refinery.Manager for refinery auto-start
- Use witness.Manager for witness auto-start
- Check state before starting to avoid duplicate starts

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 01:03:31 -08:00
Steve Yegge
a3c671188f feat: Auto-start refinery/witness on spawn, add refinery check to Witness patrol (gt-bjft)
Implements redundant systems to ensure infrastructure stays operational:
- gt spawn: Auto-starts refinery and witness if not running
- mol-witness-patrol: Added check-refinery step to verify refinery is alive

This ensures polecats don't wait forever for merges.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 00:52:45 -08:00
Steve Yegge
149d618286 gt spawn: Notify Deacon and Witness on polecat start (gt-r6td)
When gt spawn creates a polecat, it now sends POLECAT_STARTED notifications
to both Witness and Deacon:

- Witness receives: "POLECAT_STARTED <polecat>" with issue and session info
- Deacon receives: "POLECAT_STARTED <rig>/<polecat>" with issue and session info

This enables:
- Witness to bond a lease to its patrol wisp
- Deacon to verify worker started (redundancy)
- Both to nudge if worker is idle at prompt

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 22:55:13 -08:00
Steve Yegge
f23dadc8d1 Remove bd sync --from-main from polecat startup workflow
Polecats already have synced beads at spawn time (spawn command syncs before
spawning). Multiple polecats starting simultaneously were all trying to sync
the same shared beads, causing git conflicts/failures.

Fixes gt-oiv0

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 22:19:12 -08:00
Steve Yegge
5732218da3 Clean up redundant 'ephemeral' terminology in wisp docs (gt-3x0z.11)
Remove redundant phrases like 'ephemeral wisp' and 'ephemeral molecule'
since wisp already implies ephemeral. Keep 'ephemeral' only where it is
definitional (explaining what wisps are) or contrasting (vs durable mol).

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 21:43:27 -08:00
Steve Yegge
588c0f5c42 Fix spawn priming race: use deacon patrol instead of broken nudge (gt-6957)
- 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.
2025-12-22 17:30:41 -08:00
Steve Yegge
58ff4c1750 Add gt mol catalog/burn/squash, wire wisp flag, update deacon prompt
- 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>
2025-12-22 13:20:29 -08:00
Steve Yegge
bc334502cf Simplify spawn.go to use bd mol run for molecules (gt-47tq)
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>
2025-12-21 22:00:02 -08:00
Steve Yegge
8bde425bc5 feat(spawn): implement ephemeral molecule bonding
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>
2025-12-21 16:18:25 -08:00
Steve Yegge
308a7bc190 gt-975: Molecule execution support for polecats and crew
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>
2025-12-21 12:03:21 -08:00
Steve Yegge
ae6f4c8185 fix(spawn): resolve variable shadowing and branch deletion edge case
- 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>
2025-12-21 10:29:32 -08:00
Steve Yegge
82d718ee34 feat(spawn): always create fresh polecat worktrees
Fixes gt-9nf: gt spawn should create fresh polecat worktree, never reuse

Changes:
- Add Recreate() method to polecat manager that removes and recreates worktrees
- Modify spawn.go to always recreate existing polecats with fresh worktrees
- Preserves safety checks: blocks if polecat is working or has uncommitted work
- Use --force to bypass uncommitted work checks

This ensures polecats always start with the latest code from the base branch,
avoiding stale code, stale beads, and git history pollution.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 10:10:27 -08:00
Steve Yegge
4f21002132 feat(polecat): refuse to lose uncommitted work during cleanup (gt-8v8)
Add comprehensive uncommitted work checks before any polecat cleanup:
- Check for uncommitted changes (modified/untracked files)
- Check for stashes
- Check for unpushed commits

Affected commands:
- gt polecat remove: now refuses if uncommitted work exists
- gt rig shutdown: checks all polecats before shutdown
- Witness cleanup: refuses to clean polecats with uncommitted work
- gt spawn: warns if spawning to polecat with uncommitted work

Safety model:
- --force: bypasses uncommitted changes check only
- --nuclear: bypasses ALL safety checks (will lose work)

New git helpers:
- StashCount(): count stashes in repo
- UnpushedCommits(): count commits not pushed to upstream
- CheckUncommittedWork(): comprehensive work status check

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 16:54:16 -08:00
Steve Yegge
df20acf782 feat(spawn): Add handoff protocol to spawn priming (gt-8os8)
- Updated buildWorkAssignmentMail with handoff protocol section
- Added gt done command for polecats to signal completion
- Handoff protocol includes checklist: git clean, issue closed, beads synced, code pushed
- gt done verifies pre-flight checks before sending completion notification to Witness

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 16:52:40 -08:00
Steve Yegge
9509afa6b1 feat(nudge): Add gt nudge command for reliable Claude session messaging
Encapsulates tmux send-keys with: literal mode, 500ms debounce, separate Enter.
Tested and reliable. Updates spawn.go to use NudgeSession.

Related: gt-1hf, gt-lz2

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 13:19:39 -08:00
Steve Yegge
189d583518 spawn: add direct nudge after session start
Instead of relying solely on hooks or witness coordination, spawn now:
- Waits 3 seconds for Claude Code to fully initialize
- Sends a direct nudge to the polecat to check inbox
- Still notifies Witness as backup monitoring

This provides immediate feedback to polecats without waiting for
witness response.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 09:19:10 -08:00
Steve Yegge
2688a3fe9a spawn: use town-level beads for Witness notification
The SPAWN notification to Witness was going to rig-level beads,
but gt mail inbox checks town-level first. This caused messages
to get lost.

Fixes part of gt-c6b.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 08:56:13 -08:00
Steve Yegge
4bf74f7a95 spawn: Use detectSender() for From field, document Deacon fallback 2025-12-20 08:44:17 -08:00
Steve Yegge
90e0fab85c spawn: Notify Witness instead of direct nudge
- Remove hacky 5-second delay from spawn
- Send SPAWN notification to Witness after starting polecat session
- Witness uses AI to monitor polecat startup and nudge when ready
- Added SPAWN REQUEST PROCESSING section to Witness template

This implements event-driven polecat readiness detection (gt-hb0).

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 08:38:05 -08:00
Steve Yegge
d0259af61e spawn: Add work instruction + export SessionName
- Export session.Manager.SessionName for spawn.go access
- Add --address alias for --identity in mail inbox/check
- Send explicit work instruction to polecat after spawn
- Add CapturePaneLines and WaitForClaudeReady helpers (unused for now)
- Proper solution filed as gt-hb0 (needs Witness/Deacon AI monitoring)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 08:15:23 -08:00
Steve Yegge
43641e1dfb fix(spawn): use rig-level beads instead of mayor/rig path
The spawn command and polecat manager were incorrectly looking for beads
in <rig>/mayor/rig/.beads instead of <rig>/.beads. This caused:
- `gt spawn --issue ga-xxp` to fail with "no issue found" even when
  `bd show ga-xxp` worked from the rig directory
- Polecats couldn't find rig-level issues (with ga- prefix) because
  mayor/rig has a different beads database (with gt- prefix)

This fix:
- spawn.go: Use r.Path instead of filepath.Join(r.Path, "mayor", "rig")
- polecat/manager.go: Use r.Path for beads.New() initialization
- session/manager.go: Use r.Path/.beads for BEADS_DIR environment

Closes beads-2nh

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-19 23:28:06 -08:00
Steve Yegge
5622abbdfe feat(spawn): Replace tmux injection with persistent mail-based work assignment (ga-yp3)
- gt spawn now sends work assignment to polecat inbox instead of tmux injection
- Add --identity flag to gt mail inbox and gt mail check
- Add --force flag to gt spawn to override existing unread mail
- Update polecat template with startup protocol for reading inbox
- Fix pre-existing lint issue in start.go

The new flow is more reliable:
1. Spawn sends work assignment mail to polecat inbox
2. Polecat starts and runs gt prime
3. gt prime automatically runs gt mail check --inject
4. Polecat reads work assignment from inbox

Benefits:
- Persistence across session restarts
- No racing against Claude initialization
- Audit trail in beads
- Edge case handling for existing unread mail

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-19 22:07:38 -08:00
Steve Yegge
4868a09e8e feat(polecat): add bounded name pooling for polecats (gt-frs)
Implement reusable name pool for polecat workers:
- Pool of 50 names (polecat-01 through polecat-50)
- Prefers lower-numbered slots for allocation
- Overflow uses rigname-N format when pool exhausted
- Pool names are reusable, overflow names are not
- State persisted to .gastown/namepool.json

Changes:
- Add NamePool type with Allocate/Release/Reconcile
- Integrate with polecat.Manager (auto-loads/saves)
- Update gt spawn to use AllocateName() from pool
- Remove legacy polecatNames list and generatePolecatName()
- Add comprehensive tests for name pooling

Benefits:
- Tmux sessions survive polecat restarts (same name)
- Users can stay attached and see work continue
- Bounded resource usage for common case
- Scales beyond 50 with overflow naming

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-19 16:29:51 -08:00
Steve Yegge
e859938545 feat(polecat): add beads environment and sync for worktrees
CRITICAL FIX: Polecats (git worktrees) now get proper beads environment:
- BEADS_DIR: Points to rig canonical beads directory
- BEADS_NO_DAEMON=1: Prevents daemon from corrupting worktree beads
- BEADS_AGENT_NAME: Identity for beads conflict resolution

Also adds:
- bd sync on spawn (before and after issue assignment)
- bd sync on session stop (before killing)
- gt polecat sync command for manual beads sync
- Polecat role prompt explaining two-level beads architecture
2025-12-19 13:11:03 -08:00
Steve Yegge
bbff3b2144 refactor(polecat): eliminate state.json, use beads assignee for state
Replace polecat state.json with beads assignee field for state management:

- Remove state.json read/write from polecat.Manager
- Add loadFromBeads() to derive state from issue.assignee field
- Update AssignIssue() to set issue.assignee in beads
- Update ClearIssue() to clear assignee from beads
- Update SetState() to work with beads or gracefully degrade
- Add ListByAssignee and GetAssignedIssue to beads package
- Update spawn to create beads issues for free-form tasks
- Update tests for new beads-based architecture

State derivation:
- Polecat exists: worktree directory exists
- Polecat assigned: issue.assignee = 'rig/polecatName'
- Polecat working: issue.status = open/in_progress
- Polecat done: issue.status = closed or no assignee

Fixes: gt-qp98

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-19 12:47:15 -08:00
Steve Yegge
4c064aff5d feat(molecule): add molecule CLI commands and spawn integration
Add `gt molecule` subcommands for managing workflow templates:
- list: Show all molecules (type=molecule issues)
- show: Display molecule with parsed step structure
- parse: Validate molecule and show parsed details
- instantiate: Create child beads from molecule template
- instances: Show all instantiations of a molecule

Also add `--molecule` flag to `gt spawn` for molecule-based workflows.
When specified, the molecule is instantiated on the parent issue first,
then the polecat is spawned on the first ready step.

🤝 Co-authored-by: Claude <noreply@anthropic.com>
2025-12-19 12:00:30 -08:00
Steve Yegge
231e7a422e Add --polecat flag to gt spawn command
The spawn command now accepts --polecat and --rig flags as an
alternative to the positional rig/polecat argument. When using
--polecat without --rig, the rig is inferred from the current
working directory.

Examples:
  gt spawn --issue gt-xyz --polecat Angharad
  gt spawn --issue gt-abc --rig gastown --polecat Toast

Fixes gt-selw

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-19 01:46:23 -08:00
Steve Yegge
1907eea102 fix(spawn): auto-add polecat when --create flag is set
When using `gt spawn rig --create` and no polecats exist (or all are
busy), the command now automatically generates a Mad Max themed polecat
name and creates it, rather than failing with "no available polecats".

This improves agent UX by making the --create flag work intuitively.

Fixes: gt-szsq

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-19 00:29:57 -08:00
Steve Yegge
dc09b0987e feat: swarm worker spawning, mail routing improvements, beads sync 2025-12-18 18:49:54 -08:00
Steve Yegge
6e29231094 feat: add command aliases for PGT parity (may, sess, ref, sp, cat, stat)
Add Cobra aliases to match PGT abbreviation support:
- mayor → may (gt may at now works)
- session → sess
- refinery → ref
- spawn → sp
- polecat → cat
- status → stat

This enables the same abbreviated commands that worked in PGT, like
"gt may at" to attach to the Mayor session.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 00:31:35 -08:00
Steve Yegge
691971a16a feat: crew attach auto-detection, worktree polecats, beads mail
- gt crew at: auto-detect crew from cwd, run gt prime after launch
- Polecats now use git worktrees from refinery (faster than clones)
- Updated architecture.md for two-tier beads mail model
- Town beads (gm-*) for Mayor mail/coordination
- Rig .beads/ symlinks to refinery/rig/.beads

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 19:51:36 -08:00
Steve Yegge
e1c041f3b0 fix: spawn and swarm bug fixes from MVP testing
- spawn.go: Parse bd show --json as array, fix issue_type json tag
- session/manager.go: Check filesystem directly in hasPolecat()
  to handle newly-created polecats
- swarm/manager.go: Use bd show to get children via dependents field
  instead of non-existent bd list --parent flag

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 22:07:13 -08:00
Steve Yegge
b26e9aa308 feat: add CLI spawn command for polecat work assignment
- gt spawn <rig/polecat> --issue <id>: Assign issue and start session
- gt spawn <rig> --issue <id>: Auto-select idle polecat
- gt spawn -m task: Free-form task assignment
- --create: Create polecat if does not exist
- --no-start: Assign without starting session
- Fetches issue details from beads for rich context
- Auto-selects idle polecats when polecat not specified

Closes gt-u1j.19

Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 14:14:02 -08:00