Add tip system infrastructure (bd-d4i)

Implements a smart contextual hint system that shows helpful messages
to users after successful commands. Tips are filtered by conditions,
priority, frequency limits, and probability rolls to provide useful
information without being annoying.

Core Features:
- Tip struct with condition, message, frequency, priority, probability
- selectNextTip() filters eligible tips and applies probability
- Metadata storage tracks when tips were last shown
- Respects --json and --quiet flags
- Deterministic testing via BEADS_TIP_SEED env var

Integration Points:
- bd list: Shows tip after listing issues
- bd ready: Shows tip after showing ready work (or no work)
- bd create: Shows tip after creating issue
- bd show: Shows tip after showing issue details

Testing:
- Unit tests for tip selection logic
- Tests for frequency limits and probability
- Tests for metadata tracking
- Example tip definitions for documentation

Next Steps:
- bd-81a: Add programmatic tip injection API
- bd-tne: Add Claude setup tip with dynamic priority

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-11-24 10:56:14 -08:00
parent 22ba6ae4a7
commit 5f310bc7c2
8 changed files with 542 additions and 1 deletions

View File

@@ -142,6 +142,8 @@ var readyCmd = &cobra.Command{
yellow := color.New(color.FgYellow).SprintFunc()
fmt.Printf("\n%s No ready work found (all issues have blocking dependencies)\n\n",
yellow("✨"))
// Show tip even when no ready work found
maybeShowTip(store)
return
}
cyan := color.New(color.FgCyan).SprintFunc()
@@ -156,6 +158,9 @@ var readyCmd = &cobra.Command{
}
}
fmt.Println()
// Show tip after successful ready (direct mode only)
maybeShowTip(store)
},
}
var blockedCmd = &cobra.Command{