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
@@ -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()
|
||||||
|
}
|
||||||
+18
-15
@@ -17,23 +17,26 @@ var moleculeCmd = &cobra.Command{
|
|||||||
RunE: requireSubcommand,
|
RunE: requireSubcommand,
|
||||||
Long: `Agent-specific molecule workflow operations.
|
Long: `Agent-specific molecule workflow operations.
|
||||||
|
|
||||||
These commands operate on the current agent's hook and attached molecules.
|
These commands operate on YOUR hook and YOUR attached molecules.
|
||||||
For beads data operations (listing, showing, creating molecules), use bd:
|
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)
|
VIEWING YOUR WORK:
|
||||||
bd mol show Show molecule details (replaces gt mol show)
|
gt hook Show what's on your hook
|
||||||
bd mol pour Instantiate molecule (replaces gt mol instantiate)
|
gt mol current Show what you should be working on
|
||||||
bd mol bond Bond molecules together (replaces gt mol bond)
|
gt mol progress Show execution progress
|
||||||
|
|
||||||
AGENT COMMANDS:
|
WORKING ON STEPS:
|
||||||
status Show what's on current agent's hook
|
gt mol step done Complete current step (auto-continues)
|
||||||
current Show what agent should be working on
|
|
||||||
progress Show execution progress of attached molecule
|
LIFECYCLE:
|
||||||
attach Attach molecule to agent's hook
|
gt mol attach Attach molecule to your hook
|
||||||
detach Detach molecule from agent's hook
|
gt mol detach Detach molecule from your hook
|
||||||
burn Burn attached molecule (no record)
|
gt mol burn Discard attached molecule (no record)
|
||||||
squash Squash attached molecule (→ digest)
|
gt mol squash Compress to digest (permanent record)
|
||||||
step Step operations within a molecule`,
|
|
||||||
|
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