Remove default crew member creation from rig add

- Rig add now creates empty crew/ directory with README
- Crew members must be added explicitly with 'gt crew add <name>'
- Removed --crew flag from rig add command
- Updated help text and output to reflect new behavior

This gives users control over crew member names rather than defaulting to 'max'.
This commit is contained in:
Steve Yegge
2025-12-30 19:29:02 -08:00
parent 210554163f
commit 80cb1aa694
2 changed files with 28 additions and 32 deletions

View File

@@ -48,7 +48,7 @@ This creates a rig container with:
- plugins/ Rig-level plugin directory
- refinery/rig/ Canonical main clone
- mayor/rig/ Mayor's working clone
- crew/max/ Default human workspace
- crew/ Empty crew directory (add members with 'gt crew add')
- witness/ Witness agent directory
- polecats/ Worker directory (empty)
@@ -155,7 +155,6 @@ Examples:
// Flags
var (
rigAddPrefix string
rigAddCrew string
rigResetHandoff bool
rigResetMail bool
rigResetStale bool
@@ -176,7 +175,6 @@ func init() {
rigCmd.AddCommand(rigShutdownCmd)
rigAddCmd.Flags().StringVar(&rigAddPrefix, "prefix", "", "Beads issue prefix (default: derived from name)")
rigAddCmd.Flags().StringVar(&rigAddCrew, "crew", "", "Crew workspace name (default: from town config or 'max')")
rigResetCmd.Flags().BoolVar(&rigResetHandoff, "handoff", false, "Clear handoff content")
rigResetCmd.Flags().BoolVar(&rigResetMail, "mail", false, "Clear stale mail messages")
@@ -200,18 +198,6 @@ func runRigAdd(cmd *cobra.Command, args []string) error {
return fmt.Errorf("not in a Gas Town workspace: %w", err)
}
// Resolve crew name: --crew flag > town config > default constant
crewName := rigAddCrew
if crewName == "" {
// Try loading MayorConfig for default_crew_name
mayorConfigPath := filepath.Join(townRoot, "mayor", "config.json")
if mayorCfg, err := config.LoadMayorConfig(mayorConfigPath); err == nil && mayorCfg.DefaultCrewName != "" {
crewName = mayorCfg.DefaultCrewName
} else {
crewName = config.DefaultCrewName
}
}
// Load rigs config
rigsPath := filepath.Join(townRoot, "mayor", "rigs.json")
rigsConfig, err := config.LoadRigsConfig(rigsPath)
@@ -237,7 +223,6 @@ func runRigAdd(cmd *cobra.Command, args []string) error {
Name: name,
GitURL: gitURL,
BeadsPrefix: rigAddPrefix,
CrewName: crewName,
})
if err != nil {
return fmt.Errorf("adding rig: %w", err)
@@ -277,13 +262,13 @@ func runRigAdd(cmd *cobra.Command, args []string) error {
fmt.Printf(" ├── plugins/ (rig-level plugins)\n")
fmt.Printf(" ├── mayor/rig/ (clone: %s)\n", defaultBranch)
fmt.Printf(" ├── refinery/rig/ (worktree: %s, sees polecat branches)\n", defaultBranch)
fmt.Printf(" ├── crew/%s/ (your workspace)\n", crewName)
fmt.Printf(" ├── crew/ (empty - add crew with 'gt crew add')\n")
fmt.Printf(" ├── witness/\n")
fmt.Printf(" └── polecats/\n")
fmt.Printf("\nNext steps:\n")
fmt.Printf(" cd %s/crew/%s # Work in your clone\n", filepath.Join(townRoot, name), crewName)
fmt.Printf(" bd ready # See available work\n")
fmt.Printf(" gt crew add <name> %s # Create your workspace\n", name)
fmt.Printf(" cd %s/crew/<name> # Work in your clone\n", filepath.Join(townRoot, name))
return nil
}