feat(close): Add --suggest-next flag to show newly unblocked issues (GH#679)

When closing an issue, the new --suggest-next flag returns a list of
issues that became unblocked (ready to work on) as a result of the close.

This helps agents and users quickly identify what work is now available
after completing a blocker.

Example:
  $ bd close bd-5 --suggest-next
  ✓ Closed bd-5: Completed

  Newly unblocked:
    • bd-7 "Implement feature X" (P1)
    • bd-8 "Write tests for X" (P2)

Implementation:
- Added GetNewlyUnblockedByClose to storage interface
- Implemented efficient single-query for SQLite using blocked_issues_cache
- Added SuggestNext field to CloseArgs in RPC protocol
- Added CloseResult type for structured response
- CLI handles both daemon and direct modes

Thanks to @kraitsura for the detailed feature request and design.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-25 20:05:04 -08:00
parent 35ab0d7a7f
commit f3a5e02a35
16 changed files with 306 additions and 140 deletions

View File

@@ -249,20 +249,16 @@ type LoopSpec struct {
// OnCompleteSpec defines actions triggered when a step completes (gt-8tmz.8).
// Used for runtime expansion over step output (the for-each construct).
//
// Example JSON:
// Example YAML:
//
// {
// "id": "survey-workers",
// "on_complete": {
// "for_each": "output.polecats",
// "bond": "mol-polecat-arm",
// "vars": {
// "polecat_name": "{item.name}",
// "rig": "{item.rig}"
// },
// "parallel": true
// }
// }
// step: survey-workers
// on_complete:
// for_each: output.polecats
// bond: mol-polecat-arm
// vars:
// polecat_name: "{item.name}"
// rig: "{item.rig}"
// parallel: true
type OnCompleteSpec struct {
// ForEach is the path to the iterable collection in step output.
// Format: "output.<field>" or "output.<field>.<nested>"