feat: add bd admin parent command for cleanup/compact/reset (bd-3u8m)

Move cleanup, compact, and reset commands under `bd admin` namespace.
Creates hidden aliases for backwards compatibility that show deprecation
notice when used.

- Create cmd/bd/admin.go with parent command
- Create cmd/bd/admin_aliases.go for hidden backwards-compat aliases
- Update cleanup.go, compact.go, reset.go to remove rootCmd.AddCommand
- Update all documentation to use `bd admin <cmd>` syntax

🤖 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:07:13 -08:00
parent 2c82acd10b
commit d77a697cee
18 changed files with 173 additions and 63 deletions

View File

@@ -30,14 +30,14 @@ fi
# Preview candidates
echo "--- Preview Tier 1 Candidates ---"
bd compact --dry-run --all
bd admin compact --dry-run --all
echo
read -p "Proceed with Tier 1 compaction? (y/N) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo "--- Running Tier 1 Compaction ---"
bd compact --all
bd admin compact --all
echo "✅ Tier 1 compaction complete"
else
echo "⏭️ Skipping Tier 1"
@@ -46,14 +46,14 @@ fi
# Preview Tier 2
echo
echo "--- Preview Tier 2 Candidates ---"
bd compact --dry-run --all --tier 2
bd admin compact --dry-run --all --tier 2
echo
read -p "Proceed with Tier 2 compaction? (y/N) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo "--- Running Tier 2 Compaction ---"
bd compact --all --tier 2
bd admin compact --all --tier 2
echo "✅ Tier 2 compaction complete"
else
echo "⏭️ Skipping Tier 2"
@@ -62,7 +62,7 @@ fi
# Show stats
echo
echo "--- Final Statistics ---"
bd compact --stats
bd admin compact --stats
echo
echo "=== Compaction Complete ==="