refactor(types): remove Gas Town type constants from beads core (bd-w2zz4)

Remove Gas Town-specific type constants (TypeMolecule, TypeGate, TypeConvoy,
TypeMergeRequest, TypeSlot, TypeAgent, TypeRole, TypeRig, TypeEvent, TypeMessage)
from internal/types/types.go.

Beads now only has core work types built-in:
- bug, feature, task, epic, chore

All Gas Town types are now purely custom types with no special handling in beads.
Use string literals like "gate" or "molecule" when needed, and configure
types.custom in config.yaml for validation.

Changes:
- Remove Gas Town type constants from types.go
- Remove mr/mol aliases from Normalize()
- Update bd types command to only show core types
- Replace all constant usages with string literals throughout codebase
- Update tests to use string literals

This decouples beads from Gas Town, making it a generic issue tracker.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
collins
2026-01-21 10:30:38 -08:00
committed by Steve Yegge
parent 4a0f4abc70
commit 7cf67153de
25 changed files with 99 additions and 162 deletions

View File

@@ -4,7 +4,6 @@ import (
"context"
"fmt"
"os"
"strings"
"github.com/spf13/cobra"
"github.com/steveyegge/beads/internal/types"
@@ -22,24 +21,6 @@ var coreWorkTypes = []struct {
{types.TypeEpic, "Large body of work spanning multiple issues"},
}
// wellKnownCustomTypes are commonly used types that require types.custom configuration.
// These are used by Gas Town and other infrastructure that extends beads.
var wellKnownCustomTypes = []struct {
Type types.IssueType
Description string
}{
{types.TypeMolecule, "Template for issue hierarchies"},
{types.TypeGate, "Async coordination gate"},
{types.TypeConvoy, "Cross-project tracking with reactive completion"},
{types.TypeMergeRequest, "Merge queue entry for refinery processing"},
{types.TypeSlot, "Exclusive access slot (merge-slot gate)"},
{types.TypeAgent, "Agent identity bead"},
{types.TypeRole, "Agent role definition"},
{types.TypeRig, "Rig identity bead (multi-repo workspace)"},
{types.TypeEvent, "Operational state change record"},
{types.TypeMessage, "Ephemeral communication between workers"},
}
var typesCmd = &cobra.Command{
Use: "types",
GroupID: "views",
@@ -96,34 +77,12 @@ Examples:
if len(customTypes) > 0 {
fmt.Println("\nConfigured custom types:")
for _, t := range customTypes {
// Check if it's a well-known type and show description
desc := ""
for _, wk := range wellKnownCustomTypes {
if string(wk.Type) == t {
desc = wk.Description
break
}
}
if desc != "" {
fmt.Printf(" %-14s %s\n", t, desc)
} else {
fmt.Printf(" %s\n", t)
}
fmt.Printf(" %s\n", t)
}
} else {
fmt.Println("\nNo custom types configured.")
fmt.Println("Configure with: bd config set types.custom \"type1,type2,...\"")
}
// Show hint about well-known types if none are configured
if len(customTypes) == 0 {
fmt.Println("\nWell-known custom types (used by Gas Town):")
var typeNames []string
for _, t := range wellKnownCustomTypes {
typeNames = append(typeNames, string(t.Type))
}
fmt.Printf(" %s\n", strings.Join(typeNames, ", "))
}
},
}