feat: extract Gas Town types from beads core (bd-i54l)

Remove Gas Town-specific issue types (agent, role, rig, convoy, slot)
from beads core. These types are now identified by labels instead:
- gt:agent, gt:role, gt:rig, gt:convoy, gt:slot

Changes:
- internal/types/types.go: Remove TypeAgent, TypeRole, TypeRig, TypeConvoy, TypeSlot constants
- cmd/bd/agent.go: Create agents with TypeTask + gt:agent label
- cmd/bd/merge_slot.go: Create slots with TypeTask + gt:slot label
- internal/storage/sqlite/queries.go, transaction.go: Query convoys by gt:convoy label
- internal/rpc/server_issues_epics.go: Check gt:agent label for role_type/rig label auto-add
- cmd/bd/create.go: Check gt:agent label for role_type/rig label auto-add
- internal/ui/styles.go: Remove agent/role/rig type colors
- cmd/bd/export_obsidian.go: Remove agent/role/rig/convoy type tag mappings
- Update all affected tests

This enables beads to be a generic issue tracker while Gas Town
uses labels for its specific type semantics.

🤖 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:
dave
2026-01-06 22:18:37 -08:00
committed by Steve Yegge
parent b7358f17bf
commit a70c3a8cbe
14 changed files with 139 additions and 93 deletions

View File

@@ -1151,15 +1151,16 @@ func (s *SQLiteStorage) CloseIssue(ctx context.Context, id string, reason string
// Reactive convoy completion: check if any convoys tracking this issue should auto-close
// Find convoys that track this issue (convoy.issue_id tracks closed_issue.depends_on_id)
// Uses gt:convoy label instead of issue_type for Gas Town separation
convoyRows, err := tx.QueryContext(ctx, `
SELECT DISTINCT d.issue_id
FROM dependencies d
JOIN issues i ON d.issue_id = i.id
JOIN labels l ON i.id = l.issue_id AND l.label = 'gt:convoy'
WHERE d.depends_on_id = ?
AND d.type = ?
AND i.issue_type = ?
AND i.status != ?
`, id, types.DepTracks, types.TypeConvoy, types.StatusClosed)
`, id, types.DepTracks, types.StatusClosed)
if err != nil {
return fmt.Errorf("failed to find tracking convoys: %w", err)
}

View File

@@ -1475,17 +1475,20 @@ func TestConvoyReactiveCompletion(t *testing.T) {
ctx := context.Background()
// Create a convoy
// Create a convoy (using task type with gt:convoy label)
convoy := &types.Issue{
Title: "Test Convoy",
Status: types.StatusOpen,
Priority: 2,
IssueType: types.TypeConvoy,
IssueType: types.TypeTask, // Use task type; gt:convoy label marks it as convoy
}
err := store.CreateIssue(ctx, convoy, "test-user")
if err != nil {
t.Fatalf("CreateIssue convoy failed: %v", err)
}
if err := store.AddLabel(ctx, convoy.ID, "gt:convoy", "test-user"); err != nil {
t.Fatalf("Failed to add gt:convoy label: %v", err)
}
// Create two issues to track
issue1 := &types.Issue{

View File

@@ -572,15 +572,16 @@ func (t *sqliteTxStorage) CloseIssue(ctx context.Context, id string, reason stri
// Reactive convoy completion: check if any convoys tracking this issue should auto-close
// Find convoys that track this issue (convoy.issue_id tracks closed_issue.depends_on_id)
// Uses gt:convoy label instead of issue_type for Gas Town separation
convoyRows, err := t.conn.QueryContext(ctx, `
SELECT DISTINCT d.issue_id
FROM dependencies d
JOIN issues i ON d.issue_id = i.id
JOIN labels l ON i.id = l.issue_id AND l.label = 'gt:convoy'
WHERE d.depends_on_id = ?
AND d.type = ?
AND i.issue_type = ?
AND i.status != ?
`, id, types.DepTracks, types.TypeConvoy, types.StatusClosed)
`, id, types.DepTracks, types.StatusClosed)
if err != nil {
return fmt.Errorf("failed to find tracking convoys: %w", err)
}