From fca57f74686491179efda0a6f3aa970c53945fc6 Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Wed, 24 Dec 2025 22:50:08 -0800 Subject: [PATCH] gt spawn: auto-use mol-polecat-work for issue-based spawns MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- internal/cmd/spawn.go | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/internal/cmd/spawn.go b/internal/cmd/spawn.go index 54091bfd..d1a7309d 100644 --- a/internal/cmd/spawn.go +++ b/internal/cmd/spawn.go @@ -45,20 +45,21 @@ var spawnCmd = &cobra.Command{ Assigns an issue or task to a polecat and starts a session. If no polecat is specified, auto-selects an idle polecat in the rig. -When --molecule is specified, the molecule is first instantiated on the parent -issue (creating child steps), then the polecat is spawned on the first ready step. +Issue-based spawns automatically use mol-polecat-work for structured workflow +with crash recovery checkpoints. Use --molecule to override with a different +molecule, or -m/--message for free-form tasks without a molecule. Examples: - gt spawn gastown/Toast --issue gt-abc + gt spawn gastown/Toast --issue gt-abc # uses mol-polecat-work gt spawn gastown --issue gt-def # auto-select polecat - gt spawn gastown/Nux -m "Fix the tests" # free-form task + gt spawn gastown/Nux -m "Fix the tests" # free-form task (no molecule) gt spawn gastown/Capable --issue gt-xyz --create # create if missing # Flag-based selection (rig inferred from current directory): gt spawn --issue gt-xyz --polecat Angharad gt spawn --issue gt-abc --rig gastown --polecat Toast - # With molecule workflow: + # With custom molecule workflow: gt spawn --issue gt-abc --molecule mol-engineer-box`, Args: cobra.MaximumNArgs(1), RunE: runSpawn, @@ -98,6 +99,13 @@ func runSpawn(cmd *cobra.Command, args []string) error { return fmt.Errorf("--molecule requires --issue to be specified") } + // Auto-use mol-polecat-work for issue-based spawns (Phase 3: Polecat Work Cycle) + // This gives polecats a structured workflow with checkpoints for crash recovery. + // Can be overridden with explicit --molecule flag. + if spawnIssue != "" && spawnMolecule == "" { + spawnMolecule = "mol-polecat-work" + } + // Find workspace first (needed for rig inference) townRoot, err := workspace.FindFromCwdOrError() if err != nil {