fix(swarm): Remove non-existent --mol-type flag from bd update

gt swarm create was failing when using a pre-existing epic because
it tried to call `bd update --mol-type=swarm`, but bd update doesn't
support the --mol-type flag.

Fix: Only set mol-type during bd create (when epic doesn't exist.
Pre-existing epics work as-is since swarm functionality doesn't
depend on the mol-type field.

Closes gt-zqt4d

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
EOF
)
This commit is contained in:
splendid
2026-01-01 23:22:12 -08:00
committed by Steve Yegge
parent 092aa56b34
commit e7b9240238

View File

@@ -236,16 +236,8 @@ func runSwarmCreate(cmd *cobra.Command, args []string) error {
beadsPath := r.BeadsPath()
checkCmd := exec.Command("bd", "show", swarmEpic, "--json")
checkCmd.Dir = beadsPath
if err := checkCmd.Run(); err == nil {
// Epic exists, update it to be a swarm molecule
updateArgs := []string{"update", swarmEpic, "--mol-type=swarm"}
updateCmd := exec.Command("bd", updateArgs...)
updateCmd.Dir = beadsPath
if err := updateCmd.Run(); err != nil {
return fmt.Errorf("updating epic to swarm molecule: %w", err)
}
} else {
// Create new swarm epic
if err := checkCmd.Run(); err != nil {
// Epic doesn't exist, create it as a swarm molecule
createArgs := []string{
"create",
"--type=epic",