Implement BD_GUIDE.md generation for version-stamped documentation (bd-woro)
This implements the ability to separate bd-specific instructions from project-specific instructions by generating a canonical BD_GUIDE.md file. ## Changes 1. Added `--output` flag to `bd onboard` command - Generates version-stamped BD_GUIDE.md at specified path - Includes both agentsContent and copilotInstructionsContent - Auto-generated header warns against manual editing 2. Version tracking integration - checkAndSuggestBDGuideUpdate() detects outdated BD_GUIDE.md - Suggests regeneration when bd version changes - Integrated with maybeShowUpgradeNotification() 3. Comprehensive test coverage - Tests for BD_GUIDE.md generation - Tests for version stamp validation - Tests for content inclusion 4. Documentation updates - Updated AGENTS.md with BD_GUIDE.md workflow - Added regeneration instructions to upgrade workflow ## Benefits - Clear separation of concerns (bd vs project instructions) - Deterministic updates (no LLM involved) - Git-trackable diffs show exactly what changed - Progressive disclosure (agents read when needed) ## Usage \`\`\`bash # Generate BD_GUIDE.md bd onboard --output .beads/BD_GUIDE.md # After upgrading bd bd onboard --output .beads/BD_GUIDE.md # Regenerate \`\`\` Closes bd-woro
This commit is contained in:
@@ -38,12 +38,17 @@ bd info --whats-new
|
||||
# 2. Update git hooks to match new bd version
|
||||
bd hooks install
|
||||
|
||||
# 3. Check for any outdated hooks (optional)
|
||||
# 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)
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user