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

@@ -26,9 +26,8 @@ func showCleanupDeprecationHint() {
}
var cleanupCmd = &cobra.Command{
Use: "cleanup",
GroupID: "maint",
Short: "Delete closed issues and prune expired tombstones",
Use: "cleanup",
Short: "Delete closed issues and prune expired tombstones",
Long: `Delete closed issues and prune expired tombstones to reduce database size.
This command:
@@ -271,5 +270,5 @@ func init() {
cleanupCmd.Flags().Int("older-than", 0, "Only delete issues closed more than N days ago (0 = all closed issues)")
cleanupCmd.Flags().Bool("hard", false, "Bypass tombstone TTL safety; use --older-than days as cutoff")
cleanupCmd.Flags().Bool("ephemeral", false, "Only delete closed wisps (transient molecules)")
rootCmd.AddCommand(cleanupCmd)
// Note: cleanupCmd is added to adminCmd in admin.go
}