chore: remove obsolete BD_GUIDE.md references
BD_GUIDE.md generation was removed in125e36d5when 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 viaf1380e8b) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -113,19 +113,12 @@ bd info --whats-new
|
||||
# 2. Update git hooks to match new bd version
|
||||
bd hooks install
|
||||
|
||||
# 3. Regenerate BD_GUIDE.md if it exists (optional but recommended)
|
||||
bd onboard --output .beads/BD_GUIDE.md
|
||||
|
||||
# 4. Check for any outdated hooks (optional)
|
||||
# 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.
|
||||
|
||||
**About BD_GUIDE.md:** This is an optional auto-generated file that separates bd-specific instructions from project-specific ones. If your project uses this file (in `.beads/BD_GUIDE.md`), regenerate it after upgrades to get the latest bd documentation. The file is version-stamped and should never be manually edited.
|
||||
|
||||
**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:
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -111,7 +111,6 @@ The `.beads/` directory contains:
|
||||
| `config.yaml` | Project configuration |
|
||||
| `metadata.json` | Version tracking |
|
||||
| `deletions.jsonl` | Soft-deleted issues |
|
||||
| `BD_GUIDE.md` | AI agent instructions |
|
||||
| `README.md` | Human-readable overview |
|
||||
|
||||
Remove everything:
|
||||
|
||||
Reference in New Issue
Block a user