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:
committed by
Steve Yegge
parent
112420dad0
commit
5be4255f35
45
internal/cmd/formulas.go
Normal file
45
internal/cmd/formulas.go
Normal 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()
|
||||
}
|
||||
@@ -17,23 +17,26 @@ var moleculeCmd = &cobra.Command{
|
||||
RunE: requireSubcommand,
|
||||
Long: `Agent-specific molecule workflow operations.
|
||||
|
||||
These commands operate on the current agent's hook and attached molecules.
|
||||
For beads data operations (listing, showing, creating molecules), use bd:
|
||||
These commands operate on YOUR hook and YOUR attached molecules.
|
||||
Use 'gt hook' to see what's on your hook (alias for 'gt mol status').
|
||||
|
||||
bd formula list List molecule protos (replaces gt mol catalog)
|
||||
bd mol show Show molecule details (replaces gt mol show)
|
||||
bd mol pour Instantiate molecule (replaces gt mol instantiate)
|
||||
bd mol bond Bond molecules together (replaces gt mol bond)
|
||||
VIEWING YOUR WORK:
|
||||
gt hook Show what's on your hook
|
||||
gt mol current Show what you should be working on
|
||||
gt mol progress Show execution progress
|
||||
|
||||
AGENT COMMANDS:
|
||||
status Show what's on current agent's hook
|
||||
current Show what agent should be working on
|
||||
progress Show execution progress of attached molecule
|
||||
attach Attach molecule to agent's hook
|
||||
detach Detach molecule from agent's hook
|
||||
burn Burn attached molecule (no record)
|
||||
squash Squash attached molecule (→ digest)
|
||||
step Step operations within a molecule`,
|
||||
WORKING ON STEPS:
|
||||
gt mol step done Complete current step (auto-continues)
|
||||
|
||||
LIFECYCLE:
|
||||
gt mol attach Attach molecule to your hook
|
||||
gt mol detach Detach molecule from your hook
|
||||
gt mol burn Discard attached molecule (no record)
|
||||
gt mol squash Compress to digest (permanent record)
|
||||
|
||||
TO DISPATCH WORK (with molecules):
|
||||
gt sling mol-xxx target # Pour formula + sling to agent
|
||||
gt formulas # List available formulas`,
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user