Enhance bd doctor with bd prime migration recommendations (bd-0fvq)

Add comprehensive detection and migration guidance for old beads integration
patterns. This helps users adopt the more efficient bd prime approach.

Changes:
- Enhanced CheckLegacyBeadsSlashCommands with detailed migration steps
  and token efficiency benefits (99% reduction: ~10.5k → ~50 tokens)
- Added CheckAgentDocumentation to detect missing AGENTS.md/CLAUDE.md
  and suggest bd onboard or bd setup claude
- Enhanced CheckClaude to recommend bd prime hooks for MCP-only setups
  with clear token efficiency messaging
- Added comprehensive tests for all new checks

bd doctor now detects:
1. Old slash command patterns (/beads:*) and recommends bd prime hooks
2. Missing agent documentation and suggests creating it
3. MCP-only setups without hooks and shows token savings potential
4. Provides clear migration paths and benefits for all scenarios

Token efficiency messaging:
- MCP mode: ~50 tokens vs ~10.5k for full scan (99% reduction)
- CLI mode: ~1-2k tokens with automatic context recovery
- Hooks auto-refresh context on SessionStart and PreCompact

🤖 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-20 19:35:18 -05:00
parent 1458519536
commit f01326832f
5 changed files with 3340 additions and 3014 deletions

View File

@@ -245,12 +245,17 @@ func runDiagnostics(path string) doctorResult {
result.Checks = append(result.Checks, claudeCheck)
// Don't fail overall check for missing Claude integration, just warn
// Check 12: Legacy beads slash commands in documentation
// Check 12: Agent documentation presence
agentDocsCheck := convertDoctorCheck(doctor.CheckAgentDocumentation(path))
result.Checks = append(result.Checks, agentDocsCheck)
// Don't fail overall check for missing docs, just warn
// Check 13: Legacy beads slash commands in documentation
legacyDocsCheck := convertDoctorCheck(doctor.CheckLegacyBeadsSlashCommands(path))
result.Checks = append(result.Checks, legacyDocsCheck)
// Don't fail overall check for legacy docs, just warn
// Check 13: Gitignore up to date
// Check 14: Gitignore up to date
gitignoreCheck := convertDoctorCheck(doctor.CheckGitignore())
result.Checks = append(result.Checks, gitignoreCheck)
// Don't fail overall check for gitignore, just warn