use crate::cli::parse_vibe_budget;
use clap::{Args, Subcommand};
use std::path::PathBuf;
#[derive(Args)]
pub struct AiOptions {
#[command(subcommand)]
pub command: AiCommands,
}
#[derive(Subcommand)]
pub enum AiCommands {
#[command(
about = "Generate LLM-ready repository context from a scan",
after_help = "EXAMPLES:\n \
repopilot ai context .\n \
repopilot ai context . --focus security --budget 2k\n \
repopilot ai context . --no-header | pbcopy"
)]
Context(AiContextOptions),
#[command(
about = "Generate a prioritized remediation plan from scan findings",
after_help = "EXAMPLES:\n \
repopilot ai plan .\n \
repopilot ai plan . --focus security --budget 4k\n \
repopilot ai plan . --output harden.md"
)]
Plan(AiPlanOptions),
#[command(
about = "Generate an AI-ready remediation prompt from scan findings",
after_help = "EXAMPLES:\n \
repopilot ai prompt .\n \
repopilot ai prompt . --focus quality --budget 4k\n \
repopilot ai prompt . --output prompt.md"
)]
Prompt(AiPromptOptions),
}
#[derive(Args)]
pub struct AiContextOptions {
pub path: PathBuf,
#[arg(long)]
pub config: Option<PathBuf>,
#[arg(long, value_parser = ["security", "arch", "architecture", "quality", "framework", "all"])]
pub focus: Option<String>,
#[arg(long, value_parser = parse_vibe_budget)]
pub budget: Option<usize>,
#[arg(short, long)]
pub output: Option<PathBuf>,
#[arg(long)]
pub no_header: bool,
#[arg(long)]
pub no_task: bool,
#[arg(long)]
pub show_breakdown: bool,
}
#[derive(Args)]
pub struct AiPlanOptions {
pub path: PathBuf,
#[arg(long)]
pub config: Option<PathBuf>,
#[arg(long, value_parser = ["security", "arch", "architecture", "quality", "framework", "all"])]
pub focus: Option<String>,
#[arg(long, value_parser = parse_vibe_budget)]
pub budget: Option<usize>,
#[arg(short, long)]
pub output: Option<PathBuf>,
}
#[derive(Args)]
pub struct AiPromptOptions {
pub path: PathBuf,
#[arg(long)]
pub config: Option<PathBuf>,
#[arg(long, value_parser = ["security", "arch", "architecture", "quality", "framework", "all"])]
pub focus: Option<String>,
#[arg(long, value_parser = parse_vibe_budget)]
pub budget: Option<usize>,
#[arg(short, long)]
pub output: Option<PathBuf>,
}