feat(cmd): add desire-path commands for agent ergonomics
- gt hook --clear: alias for 'gt unhook' (gt-eod2iv) - gt close: wrapper for 'bd close' (gt-msak6o) - gt bead move: move beads between repos (gt-dzdbr7) These commands were natural guesses that agents tried but didn't exist. Following the desire-paths approach to improve agent ergonomics. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
committed by
Steve Yegge
parent
9b34b6bfec
commit
22a24c5648
@@ -89,6 +89,7 @@ var (
|
||||
hookMessage string
|
||||
hookDryRun bool
|
||||
hookForce bool
|
||||
hookClear bool
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -97,6 +98,7 @@ func init() {
|
||||
hookCmd.Flags().StringVarP(&hookMessage, "message", "m", "", "Message for handoff mail (optional)")
|
||||
hookCmd.Flags().BoolVarP(&hookDryRun, "dry-run", "n", false, "Show what would be done")
|
||||
hookCmd.Flags().BoolVarP(&hookForce, "force", "f", false, "Replace existing incomplete hooked bead")
|
||||
hookCmd.Flags().BoolVar(&hookClear, "clear", false, "Clear your hook (alias for 'gt unhook')")
|
||||
|
||||
// --json flag for status output (used when no args, i.e., gt hook --json)
|
||||
hookCmd.Flags().BoolVar(&moleculeJSON, "json", false, "Output as JSON (for status)")
|
||||
@@ -108,8 +110,15 @@ func init() {
|
||||
rootCmd.AddCommand(hookCmd)
|
||||
}
|
||||
|
||||
// runHookOrStatus dispatches to status or hook based on args
|
||||
// runHookOrStatus dispatches to status, clear, or hook based on args/flags
|
||||
func runHookOrStatus(cmd *cobra.Command, args []string) error {
|
||||
// --clear flag is alias for 'gt unhook'
|
||||
if hookClear {
|
||||
// Pass through dry-run and force flags
|
||||
unslingDryRun = hookDryRun
|
||||
unslingForce = hookForce
|
||||
return runUnsling(cmd, args)
|
||||
}
|
||||
if len(args) == 0 {
|
||||
// No args - show status
|
||||
return runMoleculeStatus(cmd, args)
|
||||
|
||||
Reference in New Issue
Block a user