package cli

import (
	"github.com/spf13/cobra"
)

// newPlanCmd returns the plan parent command.
//
// Subcommands: init (scaffold plan.json from template), compile (validate and
// render review artifact).
func newPlanCmd() *cobra.Command {
	cmd := &cobra.Command{
		Use:   "plan",
		Short: "Manage the plan.json lifecycle (init, compile)",
		Long: `Manage the migration plan: scaffold a fresh plan.json from the embedded
template, then validate and render a compiled JSON for review. Runtime
artifacts are created later by prepare.`,
		SilenceUsage: true,
	}
	cmd.AddCommand(newPlanInitCmd(), newPlanCompileCmd())
	return cmd
}
