feat: Add built-in version tracking to bd (bd-loka)

Implement automatic bd version tracking and upgrade awareness:

- Add LastBdVersion field to Config struct in metadata.json
- Auto-update version on every bd command in PersistentPreRun
- Add 'bd upgrade' command with status/review/ack subcommands
- Show upgrade notifications on 'bd ready' and 'bd list'
- Non-intrusive: only shows once per session, skipped for JSON output

The system tracks version changes automatically and helps users stay
aware of bd upgrades without manual intervention. Notifications are
graceful - failures don't break commands.

Example output on bd ready after upgrade:
  🔄 bd upgraded from v0.22.0 to v0.24.2 since last use
  💡 Run 'bd upgrade review' to see what changed

🤖 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-23 17:09:17 -08:00
parent 83e2221acd
commit 1f2a79dfce
7 changed files with 348 additions and 3 deletions

View File

@@ -301,6 +301,9 @@ var listCmd = &cobra.Command{
return
}
// Show upgrade notification if needed (bd-loka)
maybeShowUpgradeNotification()
var issues []*types.Issue
if err := json.Unmarshal(resp.Data, &issues); err != nil {
fmt.Fprintf(os.Stderr, "Error parsing response: %v\n", err)
@@ -400,6 +403,9 @@ var listCmd = &cobra.Command{
return
}
// Show upgrade notification if needed (bd-loka)
maybeShowUpgradeNotification()
// Load labels in bulk for display
issueIDs := make([]string, len(issues))
for i, issue := range issues {