Improve gt mol help and add gt formulas command

- Rewrote gt mol help to focus on agent operations (YOUR hook, YOUR work)
- Removed misleading "use bd mol pour" guidance (gt sling handles this)
- Added gt formulas command as convenience wrapper for bd formula list
- Agents no longer need to know about bd for common workflow operations

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
gastown/crew/max
2025-12-30 22:02:33 -08:00
committed by Steve Yegge
parent 112420dad0
commit 5be4255f35
2 changed files with 63 additions and 15 deletions

45
internal/cmd/formulas.go Normal file
View File

@@ -0,0 +1,45 @@
package cmd
import (
"os"
"os/exec"
"github.com/spf13/cobra"
)
var formulasCmd = &cobra.Command{
Use: "formulas",
Aliases: []string{"formula"},
GroupID: GroupWork,
Short: "List available workflow formulas",
Long: `List available workflow formulas (molecule templates).
Formulas are reusable workflow templates that can be instantiated via:
gt sling mol-xxx target # Pour formula and dispatch
This is a convenience alias for 'bd formula list'.
Examples:
gt formulas # List all formulas
gt formulas --json # JSON output`,
RunE: runFormulas,
}
var formulasJSON bool
func init() {
formulasCmd.Flags().BoolVar(&formulasJSON, "json", false, "Output as JSON")
rootCmd.AddCommand(formulasCmd)
}
func runFormulas(cmd *cobra.Command, args []string) error {
bdArgs := []string{"formula", "list"}
if formulasJSON {
bdArgs = append(bdArgs, "--json")
}
bdCmd := exec.Command("bd", bdArgs...)
bdCmd.Stdout = os.Stdout
bdCmd.Stderr = os.Stderr
return bdCmd.Run()
}