Unify agent startup with Manager pattern
Refactors all agent startup paths (witness, refinery, crew, polecat) to use a consistent Manager interface with Start(), Stop(), IsRunning(), and SessionName() methods. Includes: - Witness manager with GUPP propulsion nudge for startup - Refinery manager for engineer sessions - Crew manager for worker agents - Session/polecat manager updates - claude_settings_check doctor check for settings validation - Settings management consolidated from rig/manager.go - Settings location moved outside source repos to prevent conflicts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -85,16 +85,21 @@ func runUp(cmd *cobra.Command, args []string) error {
|
||||
deaconSession := getDeaconSessionName()
|
||||
mayorSession := getMayorSessionName()
|
||||
|
||||
// 2. Deacon (Claude agent)
|
||||
if err := ensureSession(t, deaconSession, townRoot, "deacon"); err != nil {
|
||||
// 2. Deacon (Claude agent) - runs from townRoot/deacon/
|
||||
deaconDir := filepath.Join(townRoot, "deacon")
|
||||
if err := ensureSession(t, deaconSession, deaconDir, "deacon"); err != nil {
|
||||
printStatus("Deacon", false, err.Error())
|
||||
allOK = false
|
||||
} else {
|
||||
printStatus("Deacon", true, deaconSession)
|
||||
}
|
||||
|
||||
// 3. Mayor (Claude agent)
|
||||
if err := ensureSession(t, mayorSession, townRoot, "mayor"); err != nil {
|
||||
// 3. Mayor (Claude agent) - runs from townRoot/mayor/
|
||||
// IMPORTANT: Both settings.json and CLAUDE.md must be in ~/gt/mayor/, NOT ~/gt/
|
||||
// Files at town root would be inherited by ALL agents via directory traversal,
|
||||
// causing crew/polecat/etc to receive Mayor-specific context.
|
||||
mayorDir := filepath.Join(townRoot, "mayor")
|
||||
if err := ensureSession(t, mayorSession, mayorDir, "mayor"); err != nil {
|
||||
printStatus("Mayor", false, err.Error())
|
||||
allOK = false
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user