refactor: remove Gas Town references from codebase
Replace Gas Town-specific terminology with generic orchestrator concepts: - "Gas Town" → "orchestrator" or "multi-clone" - Hardcoded ~/gt/ paths → GT_ROOT environment variable - signalGasTownActivity → signalOrchestratorActivity - GUPP → hook-based work assignment Updated 21 files across CHANGELOG, cmd/bd/, internal/, docs/, scripts. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Executed-By: beads/crew/dave Rig: beads Role: crew
This commit is contained in:
@@ -603,7 +603,7 @@ func findDatabaseInTree() string {
|
||||
// FindAllDatabases scans the directory hierarchy for the closest .beads directory.
|
||||
// Returns a slice with at most one DatabaseInfo - the closest database to CWD.
|
||||
// Stops searching upward as soon as a .beads directory is found,
|
||||
// because in multi-workspace setups (like Gas Town), nested .beads directories
|
||||
// because in multi-workspace setups, nested .beads directories
|
||||
// are intentional and separate - parent directories are out of scope.
|
||||
// Redirect files are supported: if a .beads/redirect file exists, its contents
|
||||
// are used as the actual .beads directory path.
|
||||
|
||||
@@ -64,7 +64,7 @@ func TestFindAllDatabases(t *testing.T) {
|
||||
databases := FindAllDatabases()
|
||||
|
||||
// Should find only the closest database (gt-bzd: stop searching when .beads found)
|
||||
// Parent .beads directories are out of scope in multi-workspace setups like Gas Town
|
||||
// Parent .beads directories are out of scope in multi-workspace setups
|
||||
if len(databases) != 1 {
|
||||
t.Fatalf("expected 1 database (closest only), got %d", len(databases))
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ type Parser struct {
|
||||
|
||||
// NewParser creates a new formula parser.
|
||||
// searchPaths are directories to search for formulas when resolving extends.
|
||||
// Default paths are: .beads/formulas, ~/.beads/formulas, ~/gt/.beads/formulas
|
||||
// Default paths are: .beads/formulas, ~/.beads/formulas, $GT_ROOT/.beads/formulas
|
||||
func NewParser(searchPaths ...string) *Parser {
|
||||
paths := searchPaths
|
||||
if len(paths) == 0 {
|
||||
@@ -65,9 +65,11 @@ func defaultSearchPaths() []string {
|
||||
// User-level formulas
|
||||
if home, err := os.UserHomeDir(); err == nil {
|
||||
paths = append(paths, filepath.Join(home, ".beads", "formulas"))
|
||||
}
|
||||
|
||||
// Gas Town formulas
|
||||
paths = append(paths, filepath.Join(home, "gt", ".beads", "formulas"))
|
||||
// Orchestrator formulas (via GT_ROOT)
|
||||
if gtRoot := os.Getenv("GT_ROOT"); gtRoot != "" {
|
||||
paths = append(paths, filepath.Join(gtRoot, ".beads", "formulas"))
|
||||
}
|
||||
|
||||
return paths
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
//
|
||||
// Molecules are loaded from multiple locations in priority order (later overrides earlier):
|
||||
// 1. Built-in molecules (shipped with bd binary)
|
||||
// 2. Town-level: ~/gt/.beads/molecules.jsonl (if Gas Town is detected)
|
||||
// 2. Town-level: $GT_ROOT/.beads/molecules.jsonl (if orchestrator detected via GT_ROOT)
|
||||
// 3. User-level: ~/.beads/molecules.jsonl
|
||||
// 4. Project-level: .beads/molecules.jsonl in the current project
|
||||
//
|
||||
@@ -77,7 +77,7 @@ func (l *Loader) LoadAll(ctx context.Context, beadsDir string) (*LoadResult, err
|
||||
}
|
||||
}
|
||||
|
||||
// 2. Load town-level molecules (Gas Town: ~/gt/.beads/molecules.jsonl)
|
||||
// 2. Load town-level molecules ($GT_ROOT/.beads/molecules.jsonl)
|
||||
townPath := getTownMoleculesPath()
|
||||
if townPath != "" {
|
||||
if molecules, err := loadMoleculesFromFile(townPath); err == nil && len(molecules) > 0 {
|
||||
@@ -220,15 +220,15 @@ func loadMoleculesFromFile(path string) ([]*types.Issue, error) {
|
||||
}
|
||||
|
||||
// getTownMoleculesPath returns the path to town-level molecules.jsonl
|
||||
// if Gas Town is detected (~/gt/.beads/molecules.jsonl).
|
||||
// if an orchestrator is detected via GT_ROOT environment variable.
|
||||
func getTownMoleculesPath() string {
|
||||
homeDir, err := os.UserHomeDir()
|
||||
if err != nil {
|
||||
gtRoot := os.Getenv("GT_ROOT")
|
||||
if gtRoot == "" {
|
||||
return ""
|
||||
}
|
||||
|
||||
// Check for Gas Town installation
|
||||
gtPath := filepath.Join(homeDir, "gt", ".beads", MoleculeFileName)
|
||||
// Check for orchestrator molecules file
|
||||
gtPath := filepath.Join(gtRoot, ".beads", MoleculeFileName)
|
||||
if _, err := os.Stat(gtPath); err == nil {
|
||||
return gtPath
|
||||
}
|
||||
|
||||
@@ -221,7 +221,7 @@ func ResolveToExternalRef(id, beadsDir string) string {
|
||||
|
||||
// ResolveBeadsDirForID determines which beads directory contains the given issue ID.
|
||||
// It first checks the local beads directory, then consults routes.jsonl for prefix-based routing.
|
||||
// If routes.jsonl is not found locally, it searches up to the Gas Town root.
|
||||
// If routes.jsonl is not found locally, it searches up to the town root.
|
||||
//
|
||||
// Parameters:
|
||||
// - ctx: context for database operations
|
||||
@@ -273,7 +273,7 @@ func ResolveBeadsDirForID(ctx context.Context, id, currentBeadsDir string) (stri
|
||||
return currentBeadsDir, false, nil
|
||||
}
|
||||
|
||||
// findTownRoot walks up from startDir looking for a Gas Town root.
|
||||
// findTownRoot walks up from startDir looking for a town root.
|
||||
// Returns the town root path, or empty string if not found.
|
||||
// A town root is identified by the presence of mayor/town.json.
|
||||
func findTownRoot(startDir string) string {
|
||||
@@ -294,7 +294,7 @@ func findTownRoot(startDir string) string {
|
||||
// findTownRoutes searches for routes.jsonl at the town level.
|
||||
// It walks up from currentBeadsDir to find the town root, then loads routes
|
||||
// from <townRoot>/.beads/routes.jsonl.
|
||||
// Returns (routes, townRoot). Returns nil routes if not in a Gas Town or no routes found.
|
||||
// Returns (routes, townRoot). Returns nil routes if not in an orchestrator town or no routes found.
|
||||
func findTownRoutes(currentBeadsDir string) ([]Route, string) {
|
||||
// First try the current beads dir (works if we're already at town level)
|
||||
routes, err := LoadRoutes(currentBeadsDir)
|
||||
@@ -306,7 +306,7 @@ func findTownRoutes(currentBeadsDir string) ([]Route, string) {
|
||||
// Walk up to find town root
|
||||
townRoot := findTownRoot(currentBeadsDir)
|
||||
if townRoot == "" {
|
||||
return nil, "" // Not in a Gas Town
|
||||
return nil, "" // Not in a town
|
||||
}
|
||||
|
||||
// Load routes from town beads
|
||||
|
||||
Reference in New Issue
Block a user