feat: default crew name to 'max', support town-level override

- Add DefaultCrewName constant ('max') to config package
- Add default_crew_name field to MayorConfig for town-level override
- Update gt rig add to resolve crew name: --crew flag > town config > default
- Update help text to reflect new default

Priority: --crew flag > MayorConfig.DefaultCrewName > config.DefaultCrewName ('max')
This commit is contained in:
Steve Yegge
2025-12-23 04:47:07 -08:00
parent e9729a3225
commit 42d8944f71
2 changed files with 26 additions and 10 deletions

View File

@@ -17,11 +17,12 @@ type TownConfig struct {
// MayorConfig represents town-level behavioral configuration (mayor/config.json).
// This is separate from TownConfig (identity) to keep configuration concerns distinct.
type MayorConfig struct {
Type string `json:"type"` // "mayor-config"
Version int `json:"version"` // schema version
Theme *TownThemeConfig `json:"theme,omitempty"` // global theme settings
Daemon *DaemonConfig `json:"daemon,omitempty"` // daemon settings
Deacon *DeaconConfig `json:"deacon,omitempty"` // deacon settings
Type string `json:"type"` // "mayor-config"
Version int `json:"version"` // schema version
Theme *TownThemeConfig `json:"theme,omitempty"` // global theme settings
Daemon *DaemonConfig `json:"daemon,omitempty"` // daemon settings
Deacon *DeaconConfig `json:"deacon,omitempty"` // deacon settings
DefaultCrewName string `json:"default_crew_name,omitempty"` // default crew name for new rigs
}
// DaemonConfig represents daemon process settings.
@@ -38,6 +39,9 @@ type DeaconConfig struct {
// CurrentMayorConfigVersion is the current schema version for MayorConfig.
const CurrentMayorConfigVersion = 1
// DefaultCrewName is the default name for crew workspaces when not overridden.
const DefaultCrewName = "max"
// RigsConfig represents the rigs registry (mayor/rigs.json).
type RigsConfig struct {
Version int `json:"version"`