feat: add --pretty flag to bd ready (bd-vjas)

Adds --pretty flag to bd ready for consistency with bd list.
Uses the same displayPrettyList() function to show issues in
a tree format with status/priority symbols.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
beads/crew/wolf
2026-01-01 11:17:31 -08:00
committed by Steve Yegge
parent 743a2d98aa
commit 33cf09ba3b

View File

@@ -41,6 +41,7 @@ This is useful for agents executing molecules to see which steps can run next.`,
issueType, _ := cmd.Flags().GetString("type") issueType, _ := cmd.Flags().GetString("type")
parentID, _ := cmd.Flags().GetString("parent") parentID, _ := cmd.Flags().GetString("parent")
molTypeStr, _ := cmd.Flags().GetString("mol-type") molTypeStr, _ := cmd.Flags().GetString("mol-type")
prettyFormat, _ := cmd.Flags().GetBool("pretty")
var molType *types.MolType var molType *types.MolType
if molTypeStr != "" { if molTypeStr != "" {
mt := types.MolType(molTypeStr) mt := types.MolType(molTypeStr)
@@ -147,20 +148,24 @@ This is useful for agents executing molecules to see which steps can run next.`,
} }
return return
} }
fmt.Printf("\n%s Ready work (%d issues with no blockers):\n\n", ui.RenderAccent("📋"), len(issues)) if prettyFormat {
for i, issue := range issues { displayPrettyList(issues, false)
fmt.Printf("%d. [%s] [%s] %s: %s\n", i+1, } else {
ui.RenderPriority(issue.Priority), fmt.Printf("\n%s Ready work (%d issues with no blockers):\n\n", ui.RenderAccent("📋"), len(issues))
ui.RenderType(string(issue.IssueType)), for i, issue := range issues {
ui.RenderID(issue.ID), issue.Title) fmt.Printf("%d. [%s] [%s] %s: %s\n", i+1,
if issue.EstimatedMinutes != nil { ui.RenderPriority(issue.Priority),
fmt.Printf(" Estimate: %d min\n", *issue.EstimatedMinutes) ui.RenderType(string(issue.IssueType)),
} ui.RenderID(issue.ID), issue.Title)
if issue.Assignee != "" { if issue.EstimatedMinutes != nil {
fmt.Printf(" Assignee: %s\n", issue.Assignee) fmt.Printf(" Estimate: %d min\n", *issue.EstimatedMinutes)
}
if issue.Assignee != "" {
fmt.Printf(" Assignee: %s\n", issue.Assignee)
}
} }
fmt.Println()
} }
fmt.Println()
return return
} }
// Direct mode // Direct mode
@@ -218,20 +223,24 @@ This is useful for agents executing molecules to see which steps can run next.`,
maybeShowTip(store) maybeShowTip(store)
return return
} }
fmt.Printf("\n%s Ready work (%d issues with no blockers):\n\n", ui.RenderAccent("📋"), len(issues)) if prettyFormat {
for i, issue := range issues { displayPrettyList(issues, false)
fmt.Printf("%d. [%s] [%s] %s: %s\n", i+1, } else {
ui.RenderPriority(issue.Priority), fmt.Printf("\n%s Ready work (%d issues with no blockers):\n\n", ui.RenderAccent("📋"), len(issues))
ui.RenderType(string(issue.IssueType)), for i, issue := range issues {
ui.RenderID(issue.ID), issue.Title) fmt.Printf("%d. [%s] [%s] %s: %s\n", i+1,
if issue.EstimatedMinutes != nil { ui.RenderPriority(issue.Priority),
fmt.Printf(" Estimate: %d min\n", *issue.EstimatedMinutes) ui.RenderType(string(issue.IssueType)),
} ui.RenderID(issue.ID), issue.Title)
if issue.Assignee != "" { if issue.EstimatedMinutes != nil {
fmt.Printf(" Assignee: %s\n", issue.Assignee) fmt.Printf(" Estimate: %d min\n", *issue.EstimatedMinutes)
}
if issue.Assignee != "" {
fmt.Printf(" Assignee: %s\n", issue.Assignee)
}
} }
fmt.Println()
} }
fmt.Println()
// Show tip after successful ready (direct mode only) // Show tip after successful ready (direct mode only)
maybeShowTip(store) maybeShowTip(store)
@@ -436,6 +445,7 @@ func init() {
readyCmd.Flags().String("mol", "", "Filter to steps within a specific molecule") readyCmd.Flags().String("mol", "", "Filter to steps within a specific molecule")
readyCmd.Flags().String("parent", "", "Filter to descendants of this bead/epic") readyCmd.Flags().String("parent", "", "Filter to descendants of this bead/epic")
readyCmd.Flags().String("mol-type", "", "Filter by molecule type: swarm, patrol, or work") readyCmd.Flags().String("mol-type", "", "Filter by molecule type: swarm, patrol, or work")
readyCmd.Flags().Bool("pretty", false, "Display issues in a tree format with status/priority symbols")
rootCmd.AddCommand(readyCmd) rootCmd.AddCommand(readyCmd)
blockedCmd.Flags().String("parent", "", "Filter to descendants of this bead/epic") blockedCmd.Flags().String("parent", "", "Filter to descendants of this bead/epic")
rootCmd.AddCommand(blockedCmd) rootCmd.AddCommand(blockedCmd)