Merge polecat/Cutter: built-in molecules (gt-4nn.4)

This commit is contained in:
Steve Yegge
2025-12-19 12:06:29 -08:00
3 changed files with 297 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ import (
"time"
"github.com/spf13/cobra"
"github.com/steveyegge/gastown/internal/beads"
"github.com/steveyegge/gastown/internal/config"
"github.com/steveyegge/gastown/internal/style"
"github.com/steveyegge/gastown/internal/templates"
@@ -168,6 +169,13 @@ func runInstall(cmd *cobra.Command, args []string) error {
fmt.Printf(" %s Could not initialize town beads: %v\n", style.Dim.Render("⚠"), err)
} else {
fmt.Printf(" ✓ Initialized .beads/ (town-level beads with gm- prefix)\n")
// Seed built-in molecules
if err := seedBuiltinMolecules(absPath); err != nil {
fmt.Printf(" %s Could not seed built-in molecules: %v\n", style.Dim.Render("⚠"), err)
} else {
fmt.Printf(" ✓ Seeded built-in molecules\n")
}
}
}
@@ -240,3 +248,11 @@ func initTownBeads(townPath string) error {
}
return nil
}
// seedBuiltinMolecules creates built-in molecule definitions in the beads database.
// These molecules provide standard workflows like engineer-in-box, quick-fix, and research.
func seedBuiltinMolecules(townPath string) error {
b := beads.New(townPath)
_, err := b.SeedBuiltinMolecules()
return err
}