package cmd

import "github.com/spf13/cobra"

var reviewCmd = &cobra.Command{
	Use:                "review [desloppify-review-args...]",
	Short:              "Run holistic review via desloppify",
	DisableFlagParsing: true,
	RunE: func(cmd *cobra.Command, args []string) error {
		forward := []string{"review"}
		if len(args) == 0 {
			forward = append(forward,
				"--run-batches",
				"--runner", "codex",
				"--parallel",
				"--scan-after-import",
			)
		} else {
			forward = append(forward, args...)
		}
		return runDesloppifyFromCommand(cmd, forward, true)
	},
}

func init() {
	rootCmd.AddCommand(reviewCmd)
}
