use crate::cli::{CompareOutputFormatArg, KnowledgeSectionArg, SeverityArg};
use clap::{Args, Subcommand};
use std::path::PathBuf;
#[derive(Args)]
pub struct InspectOptions {
#[command(subcommand)]
pub command: InspectCommands,
}
#[derive(Subcommand)]
pub enum InspectCommands {
#[command(
about = "Explain file context classification and rule decisions",
after_help = "EXAMPLES:\n \
repopilot inspect explain src/main.rs\n \
repopilot inspect explain src/main.rs --rule language.rust.panic-risk --signal rust.unwrap\n \
repopilot inspect explain src/App.tsx --format markdown --output explain.md"
)]
Explain(ExplainOptions),
#[command(
about = "Inspect RepoPilot bundled knowledge",
after_help = "EXAMPLES:\n \
repopilot inspect knowledge\n \
repopilot inspect knowledge --section languages\n \
repopilot inspect knowledge --section rules --format json"
)]
Knowledge(KnowledgeOptions),
}
#[derive(Args)]
pub struct ExplainOptions {
pub path: PathBuf,
#[arg(long)]
pub rule: Option<String>,
#[arg(long)]
pub signal: Option<String>,
#[arg(long, value_enum, default_value = "medium")]
pub severity: SeverityArg,
#[arg(long, value_enum, default_value = "console")]
pub format: CompareOutputFormatArg,
#[arg(short, long)]
pub output: Option<PathBuf>,
}
#[derive(Args)]
pub struct KnowledgeOptions {
#[arg(long, value_enum, default_value = "all")]
pub section: KnowledgeSectionArg,
#[arg(long, value_enum, default_value = "console")]
pub format: CompareOutputFormatArg,
#[arg(short, long)]
pub output: Option<PathBuf>,
}