fix: Polecat identity detection - template path and env export (gt-si6am, gt-y41ep, gt-9ar8x)
Two bugs caused polecats to think they were mayor: 1. Template lookup path (gt-si6am): - Was looking at rig.Path/templates/ which doesn't exist - Now correctly looks at mayor/rig/templates/ - Polecats get the polecat CLAUDE.md instead of inheriting mayor's 2. Env var export (gt-y41ep): - tmux SetEnvironment only affects new panes, not current shell - Now exports GT_ROLE, GT_RIG, GT_POLECAT, BD_ACTOR inline before Claude - Matches how crew sessions work Combined effect (gt-9ar8x): Polecats now correctly identify as polecats and work from their own directory instead of mayor/rig. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -662,12 +662,14 @@ func (m *Manager) loadFromBeads(name string) (*Polecat, error) {
|
||||
// Template variables {{rig}} and {{name}} are substituted with actual values.
|
||||
// This provides polecats with context about their role and available commands.
|
||||
func (m *Manager) installCLAUDETemplate(polecatPath, name string) error {
|
||||
// Read template from rig's templates directory
|
||||
templatePath := filepath.Join(m.rig.Path, "templates", "polecat-CLAUDE.md")
|
||||
// Read template from mayor/rig/templates directory
|
||||
// Templates live in the mayor's clone, not at rig root
|
||||
templatePath := filepath.Join(m.rig.Path, "mayor", "rig", "templates", "polecat-CLAUDE.md")
|
||||
content, err := os.ReadFile(templatePath)
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
// Template doesn't exist - this is fine, just skip
|
||||
// Template doesn't exist - warn and skip (this is a setup issue)
|
||||
fmt.Printf("Warning: polecat template not found at %s\n", templatePath)
|
||||
return nil
|
||||
}
|
||||
return fmt.Errorf("reading template: %w", err)
|
||||
|
||||
Reference in New Issue
Block a user