From a76b9af1a6e6a45e1da0003157ecdc8bc1230616 Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Fri, 26 Dec 2025 16:53:05 -0800 Subject: [PATCH 1/3] Fix deacon template test to match actual content MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Test expected "Patrol Execution Protocol" but template uses "Startup Protocol: Propulsion" heading instead. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- internal/templates/templates_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/templates/templates_test.go b/internal/templates/templates_test.go index 4e814510..06437809 100644 --- a/internal/templates/templates_test.go +++ b/internal/templates/templates_test.go @@ -102,8 +102,8 @@ func TestRenderRole_Deacon(t *testing.T) { if !strings.Contains(output, "Patrol Executor") { t.Error("output missing role description") } - if !strings.Contains(output, "Patrol Execution Protocol") { - t.Error("output missing patrol execution section") + if !strings.Contains(output, "Startup Protocol: Propulsion") { + t.Error("output missing startup protocol section") } if !strings.Contains(output, "mol-deacon-patrol") { t.Error("output missing patrol molecule reference") From 495f31e8a03409335ffd9a7dcc2baa55ae9acbee Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Fri, 26 Dec 2025 16:25:40 -0800 Subject: [PATCH 2/3] molecule_status.go: Remove SlungWork field and output (gt-rgd9x.1) --- internal/cmd/molecule_status.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/cmd/molecule_status.go b/internal/cmd/molecule_status.go index d2a3f579..be00f2d3 100644 --- a/internal/cmd/molecule_status.go +++ b/internal/cmd/molecule_status.go @@ -27,7 +27,7 @@ type MoleculeProgressInfo struct { Complete bool `json:"complete"` } -// MoleculeStatusInfo contains status information for an agent's hook. +// MoleculeStatusInfo contains status information for an agent's work. type MoleculeStatusInfo struct { Target string `json:"target"` Role string `json:"role"` From 62413d55cbb0a40cba7586d09e32370618b0a5ca Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Fri, 26 Dec 2025 16:52:38 -0800 Subject: [PATCH 3/3] Fix GT_ROLE not set for crew workers (gt-sij0a) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit crew_at.go and crew_lifecycle.go were not setting GT_ROLE when starting crew sessions. This caused crew workers to inherit GT_ROLE from the parent environment (often "mayor"), leading to incorrect role detection. Now properly exports GT_ROLE=crew along with GT_RIG, GT_CREW, and BD_ACTOR when spawning Claude for crew workers. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- internal/cmd/crew_at.go | 9 +++++++-- internal/cmd/crew_lifecycle.go | 6 +++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/internal/cmd/crew_at.go b/internal/cmd/crew_at.go index ae5e99a5..e2373a59 100644 --- a/internal/cmd/crew_at.go +++ b/internal/cmd/crew_at.go @@ -91,6 +91,7 @@ func runCrewAt(cmd *cobra.Command, args []string) error { } // Set environment (non-fatal: session works without these) + _ = t.SetEnvironment(sessionID, "GT_ROLE", "crew") _ = t.SetEnvironment(sessionID, "GT_RIG", r.Name) _ = t.SetEnvironment(sessionID, "GT_CREW", name) @@ -120,7 +121,9 @@ func runCrewAt(cmd *cobra.Command, args []string) error { // Use respawn-pane to replace shell with Claude directly // This gives cleaner lifecycle: Claude exits → session ends (no intermediate shell) // Pass "gt prime" as initial prompt so Claude loads context immediately - claudeCmd := `claude --dangerously-skip-permissions "gt prime"` + // Export GT_ROLE and BD_ACTOR since tmux SetEnvironment only affects new panes + bdActor := fmt.Sprintf("%s/crew/%s", r.Name, name) + claudeCmd := fmt.Sprintf(`export GT_ROLE=crew GT_RIG=%s GT_CREW=%s BD_ACTOR=%s && claude --dangerously-skip-permissions "gt prime"`, r.Name, name, bdActor) if err := t.RespawnPane(paneID, claudeCmd); err != nil { return fmt.Errorf("starting claude: %w", err) } @@ -143,7 +146,9 @@ func runCrewAt(cmd *cobra.Command, args []string) error { // Use respawn-pane to replace shell with Claude directly // Pass "gt prime" as initial prompt so Claude loads context immediately - claudeCmd := `claude --dangerously-skip-permissions "gt prime"` + // Export GT_ROLE and BD_ACTOR since tmux SetEnvironment only affects new panes + bdActor := fmt.Sprintf("%s/crew/%s", r.Name, name) + claudeCmd := fmt.Sprintf(`export GT_ROLE=crew GT_RIG=%s GT_CREW=%s BD_ACTOR=%s && claude --dangerously-skip-permissions "gt prime"`, r.Name, name, bdActor) if err := t.RespawnPane(paneID, claudeCmd); err != nil { return fmt.Errorf("restarting claude: %w", err) } diff --git a/internal/cmd/crew_lifecycle.go b/internal/cmd/crew_lifecycle.go index 4538aa48..cc8fda92 100644 --- a/internal/cmd/crew_lifecycle.go +++ b/internal/cmd/crew_lifecycle.go @@ -221,6 +221,7 @@ func runCrewRestart(cmd *cobra.Command, args []string) error { } // Set environment + t.SetEnvironment(sessionID, "GT_ROLE", "crew") t.SetEnvironment(sessionID, "GT_RIG", r.Name) t.SetEnvironment(sessionID, "GT_CREW", name) @@ -234,7 +235,10 @@ func runCrewRestart(cmd *cobra.Command, args []string) error { } // Start claude with skip permissions (crew workers are trusted) - if err := t.SendKeys(sessionID, "claude --dangerously-skip-permissions"); err != nil { + // Export GT_ROLE and BD_ACTOR since tmux SetEnvironment only affects new panes + bdActor := fmt.Sprintf("%s/crew/%s", r.Name, name) + claudeCmd := fmt.Sprintf("export GT_ROLE=crew GT_RIG=%s GT_CREW=%s BD_ACTOR=%s && claude --dangerously-skip-permissions", r.Name, name, bdActor) + if err := t.SendKeys(sessionID, claudeCmd); err != nil { return fmt.Errorf("starting claude: %w", err) }