feat: integrate detect-pollution into bd doctor --check=pollution (bd-kff0)

- Add --check flag to doctor for specific check modes
- Add --check=pollution to run detailed pollution detection
- Add --clean flag to delete detected test issues
- Mark detect-pollution command as hidden (deprecated)
- Update fix messages to point to new doctor --check=pollution

🤖 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-27 16:05:18 -08:00
parent 2810cf05cc
commit 2c82acd10b
4 changed files with 173 additions and 13 deletions
+7 -5
View File
@@ -12,15 +12,17 @@ import (
"github.com/steveyegge/beads/internal/ui"
)
// showDetectPollutionDeprecationHint shows a hint about bd doctor consolidation (bd-bqcc)
// showDetectPollutionDeprecationHint shows a hint about bd doctor consolidation (bd-kff0)
func showDetectPollutionDeprecationHint() {
fmt.Fprintln(os.Stderr, ui.RenderMuted("💡 Tip: 'bd doctor' now detects test pollution in the Metadata section"))
fmt.Fprintln(os.Stderr, ui.RenderMuted("💡 Tip: Use 'bd doctor --check=pollution' instead (this command is deprecated)"))
}
var detectPollutionCmd = &cobra.Command{
Use: "detect-pollution",
GroupID: "maint",
Short: "Detect and optionally clean test issues from database",
Use: "detect-pollution",
GroupID: "maint",
Hidden: true, // bd-kff0: deprecated, use 'bd doctor --check=pollution' instead
Deprecated: "use 'bd doctor --check=pollution' instead",
Short: "Detect and optionally clean test issues from database",
Long: `Detect test issues that leaked into production database using pattern matching.
This command finds issues that appear to be test data based on: