feat: Add agent upgrade awareness documentation and tooling

Implements bd-hwmp and bd-5otr (part of epic bd-nxgk) to help AI agents
automatically detect and adapt to bd upgrades.

## Changes

### Documentation (bd-hwmp)
- Added "After Upgrading bd" section to AGENTS.md with step-by-step workflow
- Enhanced "Pro Tips for Agents" with upgrade detection guidance
- Documents bd info --whats-new and bd hooks install commands
- References GitHub Discussion #239

### Startup Hook (bd-5otr)
- Created examples/startup-hooks/bd-version-check.sh
  - Auto-detects bd version changes via .beads/metadata.json
  - Shows bd info --whats-new when upgrade detected
  - Auto-updates outdated git hooks
  - Handles edge cases (no jq, not in beads project, etc.)
- Created examples/startup-hooks/README.md with integration examples
  - Claude Code, GitHub Copilot, Cursor integration patterns
  - Comprehensive usage and troubleshooting guide
- Updated examples/README.md with new startup-hooks section

## Impact

Agents can now:
- Automatically detect bd upgrades at session start
- See what changed without re-reading all documentation
- Keep git hooks in sync automatically
- Adapt workflows based on new features

Works today with zero bd code changes required!

Related: #239

🤖 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 16:29:56 -08:00
parent 210789fa4d
commit 1cc238f61d
6 changed files with 273 additions and 4 deletions
+21
View File
@@ -27,6 +27,25 @@ This shows the last 3 versions with workflow-impacting changes, avoiding the nee
**Why this matters:** bd releases weekly with major versions. This command helps you quickly understand what changed without parsing the full CHANGELOG.
### 🔄 After Upgrading bd
When bd is upgraded to a new version, follow this workflow:
```bash
# 1. Check what changed
bd info --whats-new
# 2. Update git hooks to match new bd version
bd hooks install
# 3. Check for any outdated hooks (optional)
bd info # Shows warnings if hooks are outdated
```
**Why update hooks?** Git hooks (pre-commit, post-merge, pre-push) are versioned with bd. Outdated hooks may miss new auto-sync features or bug fixes. Running `bd hooks install` ensures hooks match your bd version.
**Related:** See GitHub Discussion #239 for background on agent upgrade workflows.
## Human Setup vs Agent Usage
**IMPORTANT:** If you need to initialize bd, use the `--quiet` flag:
@@ -475,6 +494,8 @@ See [AGENT_INSTRUCTIONS.md](AGENT_INSTRUCTIONS.md) for detailed instructions on:
- Always use `--json` flags for programmatic use
- **Always run `bd sync` at end of session** to flush/commit/push immediately
- **Check `bd info --whats-new` at session start** if bd was recently upgraded
- **Run `bd hooks install`** if `bd info` warns about outdated git hooks
- Link discoveries with `discovered-from` to maintain context
- Check `bd ready` before asking "what next?"
- Auto-sync batches changes in 30-second window - use `bd sync` to force immediate flush