chore: remove obsolete BD_GUIDE.md references

BD_GUIDE.md generation was removed in 125e36d5 when bd onboard was
simplified to output a minimal snippet pointing to bd prime.

This commit:
- Removes stale BD_GUIDE.md references from CLAUDE.md
- Removes dead checkAndSuggestBDGuideUpdate() code from version_tracking.go
- Removes BD_GUIDE.md from UNINSTALLING.md file list

Closes #660 (already fixed in v0.30.7 via f1380e8b)

🤖 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-20 20:50:33 -08:00
parent 5d2daf2e1e
commit 3743e9ed70
3 changed files with 1 additions and 67 deletions

View File

@@ -149,67 +149,9 @@ func maybeShowUpgradeNotification() {
fmt.Println("💡 Run 'bd upgrade review' to see what changed")
fmt.Println("💊 Run 'bd doctor' to verify upgrade completed cleanly")
// Check if BD_GUIDE.md exists and needs updating
checkAndSuggestBDGuideUpdate()
fmt.Println()
}
// checkAndSuggestBDGuideUpdate checks if .beads/BD_GUIDE.md exists and suggests regeneration if outdated.
// bd-woro: Auto-update BD_GUIDE.md on version changes
func checkAndSuggestBDGuideUpdate() {
beadsDir := beads.FindBeadsDir()
if beadsDir == "" {
return
}
guidePath := beadsDir + "/BD_GUIDE.md"
// Check if BD_GUIDE.md exists
if _, err := os.Stat(guidePath); os.IsNotExist(err) {
// File doesn't exist - no suggestion needed
return
}
// Read first few lines to check version stamp
// #nosec G304 - guidePath is constructed from beadsDir + constant string
content, err := os.ReadFile(guidePath)
if err != nil {
return // Silent failure
}
// Look for version in the first 200 bytes (should be in the header)
header := string(content)
if len(header) > 200 {
header = header[:200]
}
// Check if the file has the old version stamp
oldVersionStamp := fmt.Sprintf("bd v%s", previousVersion)
currentVersionStamp := fmt.Sprintf("bd v%s", Version)
if containsSubstring(header, oldVersionStamp) && !containsSubstring(header, currentVersionStamp) {
// BD_GUIDE.md is outdated
fmt.Printf("📄 BD_GUIDE.md is outdated (v%s → v%s)\n", previousVersion, Version)
fmt.Printf("💡 Run 'bd onboard --output .beads/BD_GUIDE.md' to regenerate\n")
}
}
// containsSubstring checks if haystack contains needle (case-sensitive)
func containsSubstring(haystack, needle string) bool {
return len(haystack) >= len(needle) && findSubstring(haystack, needle) >= 0
}
// findSubstring returns the index of needle in haystack, or -1 if not found
func findSubstring(haystack, needle string) int {
for i := 0; i <= len(haystack)-len(needle); i++ {
if haystack[i:i+len(needle)] == needle {
return i
}
}
return -1
}
// findActualJSONLFile scans .beads/ for the actual JSONL file in use.
// Prefers issues.jsonl over beads.jsonl (canonical name), skips backups and merge artifacts.
// Returns empty string if no JSONL file is found.