chore: sync formula and recovery work
Some checks failed
CI / Check for .beads changes (push) Has been skipped
CI / Check embedded formulas (push) Failing after 17s
CI / Test (push) Failing after 1m20s
CI / Lint (push) Failing after 22s
CI / Integration Tests (push) Failing after 34s
CI / Coverage Report (push) Has been skipped
Windows CI / Windows Build and Unit Tests (push) Has been cancelled

- Update mol-deacon-patrol formula
- Fix sling helpers, doctor branch check
- Update startup session and tests
- Remove obsolete research doc

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
diesel
2026-01-26 14:23:10 -08:00
committed by John Ogle
parent 0e19529186
commit e2e43b8bf5
6 changed files with 65 additions and 418 deletions

View File

@@ -319,7 +319,7 @@ func injectStartPrompt(pane, beadID, subject, args string) error {
} else if subject != "" {
prompt = fmt.Sprintf("Work slung: %s (%s). Start working on it now - no questions, just begin.", beadID, subject)
} else {
prompt = fmt.Sprintf("Work slung: %s. Start working on it now - run `gt prime --hook` to load context, then begin.", beadID)
prompt = fmt.Sprintf("Work slung: %s. Start working on it now - run `gt hook` to see the hook, then begin.", beadID)
}
// Use the reliable nudge pattern (same as gt nudge / tmux.NudgeSession)

View File

@@ -1,13 +1,11 @@
package doctor
import (
"context"
"fmt"
"os"
"os/exec"
"path/filepath"
"strings"
"time"
)
// BranchCheck detects persistent roles (crew, witness, refinery) that are
@@ -89,18 +87,15 @@ func (c *BranchCheck) Run(ctx *CheckContext) *CheckResult {
}
}
// gitNetworkTimeout is the timeout for git network operations (pull, fetch).
const gitNetworkTimeout = 30 * time.Second
// Fix switches all off-main directories to main branch.
func (c *BranchCheck) Fix(checkCtx *CheckContext) error {
func (c *BranchCheck) Fix(ctx *CheckContext) error {
if len(c.offMainDirs) == 0 {
return nil
}
var lastErr error
for _, dir := range c.offMainDirs {
// git checkout main (local operation, short timeout)
// git checkout main
cmd := exec.Command("git", "checkout", "main")
cmd.Dir = dir
if err := cmd.Run(); err != nil {
@@ -108,16 +103,10 @@ func (c *BranchCheck) Fix(checkCtx *CheckContext) error {
continue
}
// git pull --rebase (network operation, needs timeout)
ctx, cancel := context.WithTimeout(context.Background(), gitNetworkTimeout)
cmd = exec.CommandContext(ctx, "git", "pull", "--rebase")
// git pull --rebase
cmd = exec.Command("git", "pull", "--rebase")
cmd.Dir = dir
err := cmd.Run()
cancel()
if err != nil {
if ctx.Err() == context.DeadlineExceeded {
lastErr = fmt.Errorf("%s: git pull timed out after %v", dir, gitNetworkTimeout)
}
if err := cmd.Run(); err != nil {
// Pull failure is not fatal, just warn
continue
}

View File

@@ -66,10 +66,8 @@ func FormatStartupBeacon(cfg BeaconConfig) string {
// For assigned, work is already on the hook - just tell them to run it
// This prevents the "helpful assistant" exploration pattern (see PRIMING.md)
// Use `gt prime --hook` instead of `gt hook` so polecats get full role context
// including THE IDLE POLECAT HERESY guidance about running `gt done`.
if cfg.Topic == "assigned" {
beacon += "\n\nWork is on your hook. Run `gt prime --hook` now and begin immediately."
beacon += "\n\nWork is on your hook. Run `gt hook` now and begin immediately."
}
// For start/restart, add fallback instructions in case SessionStart hook fails

View File

@@ -26,7 +26,7 @@ func TestFormatStartupBeacon(t *testing.T) {
"<- deacon",
"assigned:gt-abc12",
"Work is on your hook", // assigned includes actionable instructions
"gt prime --hook", // full context including IDLE POLECAT HERESY
"gt hook",
},
},
{