organizational_intelligence_plugin/
cli.rs1use clap::{Parser, Subcommand};
5use std::path::PathBuf;
6
7#[derive(Parser, Debug)]
8#[command(name = "oip")]
9#[command(about = "Organizational Intelligence Plugin - Defect Pattern Analysis", long_about = None)]
10#[command(version)]
11pub struct Cli {
12 #[command(subcommand)]
13 pub command: Commands,
14
15 #[arg(long, global = true)]
17 pub verbose: bool,
18
19 #[arg(long, global = true)]
21 pub config: Option<PathBuf>,
22}
23
24#[derive(Subcommand, Debug)]
25pub enum Commands {
26 Analyze {
28 #[arg(long, required = true)]
30 org: String,
31
32 #[arg(long, short, default_value = "defects.yaml")]
34 output: PathBuf,
35
36 #[arg(long, default_value = "10")]
38 max_concurrent: usize,
39 },
40
41 Summarize {
43 #[arg(long, short, required = true)]
45 input: PathBuf,
46
47 #[arg(long, short, required = true)]
49 output: PathBuf,
50
51 #[arg(long, default_value = "true")]
53 strip_pii: bool,
54
55 #[arg(long, default_value = "10")]
57 top_n: usize,
58
59 #[arg(long, default_value = "5")]
61 min_frequency: usize,
62
63 #[arg(long, default_value = "false")]
65 include_examples: bool,
66 },
67
68 ReviewPr {
70 #[arg(long, short, required = true)]
72 baseline: PathBuf,
73
74 #[arg(long, short, required = true)]
76 files: String,
77
78 #[arg(long, default_value = "markdown")]
80 format: String,
81
82 #[arg(long, short)]
84 output: Option<PathBuf>,
85 },
86}
87
88#[cfg(test)]
89mod tests {
90 use super::*;
91
92 #[test]
93 fn test_cli_structure_exists() {
94 let _cli_type_check: Option<Cli> = None;
97 let _commands_type_check: Option<Commands> = None;
98 }
99}