feat: Add mol_type schema field for molecule type classification (bd-oxgi)

Add mol_type field to beads for swarm coordination:
- Values: 'swarm' (multi-polecat), 'patrol' (recurring ops), 'work' (default)
- Nullable, defaults to empty string (treated as 'work')

Changes:
- Add mol_type column to SQLite schema and migration 031
- Add MolType type with IsValid() validation in types.go
- Update insertIssue/GetIssue to handle mol_type
- Add --mol-type flag to create command
- Add mol_type filtering to list and ready commands
- Update RPC protocol for daemon mode support
- Update test schema in migrations_test.go

🤝 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-28 19:50:55 -08:00
parent 77ba8f3d10
commit f3dcafca66
13 changed files with 167 additions and 8 deletions

View File

@@ -47,6 +47,7 @@ var migrationsList = []Migration{
{"tombstone_closed_at", migrations.MigrateTombstoneClosedAt},
{"created_by_column", migrations.MigrateCreatedByColumn},
{"agent_fields", migrations.MigrateAgentFields},
{"mol_type_column", migrations.MigrateMolTypeColumn},
}
// MigrationInfo contains metadata about a migration for inspection
@@ -98,8 +99,12 @@ func getMigrationDescription(name string) string {
"remove_depends_on_fk": "Removes FK constraint on depends_on_id to allow external references",
"additional_indexes": "Adds performance optimization indexes for common query patterns",
"gate_columns": "Adds gate columns (await_type, await_id, timeout_ns, waiters) for async coordination",
"tombstone_closed_at": "Preserves closed_at timestamp when issues become tombstones",
"created_by_column": "Adds created_by column to track issue creator",
"agent_fields": "Adds agent identity fields (hook_bead, role_bead, agent_state, etc.) for agent-as-bead pattern",
"mol_type_column": "Adds mol_type column for molecule type classification (swarm/patrol/work)",
}
if desc, ok := descriptions[name]; ok {
return desc
}